0x1998 - MANAGER
DΓΌzenlenen Dosya: index-Dl6Y4CEN.js
(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))a(o);new MutationObserver(o=>{for(const c of o)if(c.type==="childList")for(const f of c.addedNodes)f.tagName==="LINK"&&f.rel==="modulepreload"&&a(f)}).observe(document,{childList:!0,subtree:!0});function n(o){const c={};return o.integrity&&(c.integrity=o.integrity),o.referrerPolicy&&(c.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?c.credentials="include":o.crossOrigin==="anonymous"?c.credentials="omit":c.credentials="same-origin",c}function a(o){if(o.ep)return;o.ep=!0;const c=n(o);fetch(o.href,c)}})();var em={exports:{}},Nl={};var cv;function NA(){if(cv)return Nl;cv=1;var s=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function n(a,o,c){var f=null;if(c!==void 0&&(f=""+c),o.key!==void 0&&(f=""+o.key),"key"in o){c={};for(var p in o)p!=="key"&&(c[p]=o[p])}else c=o;return o=c.ref,{$$typeof:s,type:a,key:f,ref:o!==void 0?o:null,props:c}}return Nl.Fragment=e,Nl.jsx=n,Nl.jsxs=n,Nl}var uv;function RA(){return uv||(uv=1,em.exports=NA()),em.exports}var h=RA(),tm={exports:{}},Te={};var hv;function xA(){if(hv)return Te;hv=1;var s=Symbol.for("react.transitional.element"),e=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),c=Symbol.for("react.consumer"),f=Symbol.for("react.context"),p=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),y=Symbol.for("react.memo"),T=Symbol.for("react.lazy"),b=Symbol.for("react.activity"),N=Symbol.iterator;function P(O){return O===null||typeof O!="object"?null:(O=N&&O[N]||O["@@iterator"],typeof O=="function"?O:null)}var G={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},K=Object.assign,Y={};function ne(O,J,ae){this.props=O,this.context=J,this.refs=Y,this.updater=ae||G}ne.prototype.isReactComponent={},ne.prototype.setState=function(O,J){if(typeof O!="object"&&typeof O!="function"&&O!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,O,J,"setState")},ne.prototype.forceUpdate=function(O){this.updater.enqueueForceUpdate(this,O,"forceUpdate")};function re(){}re.prototype=ne.prototype;function oe(O,J,ae){this.props=O,this.context=J,this.refs=Y,this.updater=ae||G}var de=oe.prototype=new re;de.constructor=oe,K(de,ne.prototype),de.isPureReactComponent=!0;var fe=Array.isArray;function _e(){}var C={H:null,A:null,T:null,S:null},w=Object.prototype.hasOwnProperty;function I(O,J,ae){var le=ae.ref;return{$$typeof:s,type:O,key:J,ref:le!==void 0?le:null,props:ae}}function M(O,J){return I(O.type,J,O.props)}function j(O){return typeof O=="object"&&O!==null&&O.$$typeof===s}function L(O){var J={"=":"=0",":":"=2"};return"$"+O.replace(/[=:]/g,function(ae){return J[ae]})}var R=/\/+/g;function Xe(O,J){return typeof O=="object"&&O!==null&&O.key!=null?L(""+O.key):J.toString(36)}function Ye(O){switch(O.status){case"fulfilled":return O.value;case"rejected":throw O.reason;default:switch(typeof O.status=="string"?O.then(_e,_e):(O.status="pending",O.then(function(J){O.status==="pending"&&(O.status="fulfilled",O.value=J)},function(J){O.status==="pending"&&(O.status="rejected",O.reason=J)})),O.status){case"fulfilled":return O.value;case"rejected":throw O.reason}}throw O}function $(O,J,ae,le,ve){var Ae=typeof O;(Ae==="undefined"||Ae==="boolean")&&(O=null);var Me=!1;if(O===null)Me=!0;else switch(Ae){case"bigint":case"string":case"number":Me=!0;break;case"object":switch(O.$$typeof){case s:case e:Me=!0;break;case T:return Me=O._init,$(Me(O._payload),J,ae,le,ve)}}if(Me)return ve=ve(O),Me=le===""?"."+Xe(O,0):le,fe(ve)?(ae="",Me!=null&&(ae=Me.replace(R,"$&/")+"/"),$(ve,J,ae,"",function(ua){return ua})):ve!=null&&(j(ve)&&(ve=M(ve,ae+(ve.key==null||O&&O.key===ve.key?"":(""+ve.key).replace(R,"$&/")+"/")+Me)),J.push(ve)),1;Me=0;var jt=le===""?".":le+":";if(fe(O))for(var st=0;st<O.length;st++)le=O[st],Ae=jt+Xe(le,st),Me+=$(le,J,ae,Ae,ve);else if(st=P(O),typeof st=="function")for(O=st.call(O),st=0;!(le=O.next()).done;)le=le.value,Ae=jt+Xe(le,st++),Me+=$(le,J,ae,Ae,ve);else if(Ae==="object"){if(typeof O.then=="function")return $(Ye(O),J,ae,le,ve);throw J=String(O),Error("Objects are not valid as a React child (found: "+(J==="[object Object]"?"object with keys {"+Object.keys(O).join(", ")+"}":J)+"). If you meant to render a collection of children, use an array instead.")}return Me}function se(O,J,ae){if(O==null)return O;var le=[],ve=0;return $(O,le,"","",function(Ae){return J.call(ae,Ae,ve++)}),le}function ge(O){if(O._status===-1){var J=O._result;J=J(),J.then(function(ae){(O._status===0||O._status===-1)&&(O._status=1,O._result=ae)},function(ae){(O._status===0||O._status===-1)&&(O._status=2,O._result=ae)}),O._status===-1&&(O._status=0,O._result=J)}if(O._status===1)return O._result.default;throw O._result}var ke=typeof reportError=="function"?reportError:function(O){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var J=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof O=="object"&&O!==null&&typeof O.message=="string"?String(O.message):String(O),error:O});if(!window.dispatchEvent(J))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",O);return}console.error(O)},He={map:se,forEach:function(O,J,ae){se(O,function(){J.apply(this,arguments)},ae)},count:function(O){var J=0;return se(O,function(){J++}),J},toArray:function(O){return se(O,function(J){return J})||[]},only:function(O){if(!j(O))throw Error("React.Children.only expected to receive a single React element child.");return O}};return Te.Activity=b,Te.Children=He,Te.Component=ne,Te.Fragment=n,Te.Profiler=o,Te.PureComponent=oe,Te.StrictMode=a,Te.Suspense=g,Te.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=C,Te.__COMPILER_RUNTIME={__proto__:null,c:function(O){return C.H.useMemoCache(O)}},Te.cache=function(O){return function(){return O.apply(null,arguments)}},Te.cacheSignal=function(){return null},Te.cloneElement=function(O,J,ae){if(O==null)throw Error("The argument must be a React element, but you passed "+O+".");var le=K({},O.props),ve=O.key;if(J!=null)for(Ae in J.key!==void 0&&(ve=""+J.key),J)!w.call(J,Ae)||Ae==="key"||Ae==="__self"||Ae==="__source"||Ae==="ref"&&J.ref===void 0||(le[Ae]=J[Ae]);var Ae=arguments.length-2;if(Ae===1)le.children=ae;else if(1<Ae){for(var Me=Array(Ae),jt=0;jt<Ae;jt++)Me[jt]=arguments[jt+2];le.children=Me}return I(O.type,ve,le)},Te.createContext=function(O){return O={$$typeof:f,_currentValue:O,_currentValue2:O,_threadCount:0,Provider:null,Consumer:null},O.Provider=O,O.Consumer={$$typeof:c,_context:O},O},Te.createElement=function(O,J,ae){var le,ve={},Ae=null;if(J!=null)for(le in J.key!==void 0&&(Ae=""+J.key),J)w.call(J,le)&&le!=="key"&&le!=="__self"&&le!=="__source"&&(ve[le]=J[le]);var Me=arguments.length-2;if(Me===1)ve.children=ae;else if(1<Me){for(var jt=Array(Me),st=0;st<Me;st++)jt[st]=arguments[st+2];ve.children=jt}if(O&&O.defaultProps)for(le in Me=O.defaultProps,Me)ve[le]===void 0&&(ve[le]=Me[le]);return I(O,Ae,ve)},Te.createRef=function(){return{current:null}},Te.forwardRef=function(O){return{$$typeof:p,render:O}},Te.isValidElement=j,Te.lazy=function(O){return{$$typeof:T,_payload:{_status:-1,_result:O},_init:ge}},Te.memo=function(O,J){return{$$typeof:y,type:O,compare:J===void 0?null:J}},Te.startTransition=function(O){var J=C.T,ae={};C.T=ae;try{var le=O(),ve=C.S;ve!==null&&ve(ae,le),typeof le=="object"&&le!==null&&typeof le.then=="function"&&le.then(_e,ke)}catch(Ae){ke(Ae)}finally{J!==null&&ae.types!==null&&(J.types=ae.types),C.T=J}},Te.unstable_useCacheRefresh=function(){return C.H.useCacheRefresh()},Te.use=function(O){return C.H.use(O)},Te.useActionState=function(O,J,ae){return C.H.useActionState(O,J,ae)},Te.useCallback=function(O,J){return C.H.useCallback(O,J)},Te.useContext=function(O){return C.H.useContext(O)},Te.useDebugValue=function(){},Te.useDeferredValue=function(O,J){return C.H.useDeferredValue(O,J)},Te.useEffect=function(O,J){return C.H.useEffect(O,J)},Te.useEffectEvent=function(O){return C.H.useEffectEvent(O)},Te.useId=function(){return C.H.useId()},Te.useImperativeHandle=function(O,J,ae){return C.H.useImperativeHandle(O,J,ae)},Te.useInsertionEffect=function(O,J){return C.H.useInsertionEffect(O,J)},Te.useLayoutEffect=function(O,J){return C.H.useLayoutEffect(O,J)},Te.useMemo=function(O,J){return C.H.useMemo(O,J)},Te.useOptimistic=function(O,J){return C.H.useOptimistic(O,J)},Te.useReducer=function(O,J,ae){return C.H.useReducer(O,J,ae)},Te.useRef=function(O){return C.H.useRef(O)},Te.useState=function(O){return C.H.useState(O)},Te.useSyncExternalStore=function(O,J,ae){return C.H.useSyncExternalStore(O,J,ae)},Te.useTransition=function(){return C.H.useTransition()},Te.version="19.2.4",Te}var dv;function Km(){return dv||(dv=1,tm.exports=xA()),tm.exports}var V=Km(),nm={exports:{}},Rl={},im={exports:{}},sm={};var fv;function IA(){return fv||(fv=1,(function(s){function e($,se){var ge=$.length;$.push(se);e:for(;0<ge;){var ke=ge-1>>>1,He=$[ke];if(0<o(He,se))$[ke]=se,$[ge]=He,ge=ke;else break e}}function n($){return $.length===0?null:$[0]}function a($){if($.length===0)return null;var se=$[0],ge=$.pop();if(ge!==se){$[0]=ge;e:for(var ke=0,He=$.length,O=He>>>1;ke<O;){var J=2*(ke+1)-1,ae=$[J],le=J+1,ve=$[le];if(0>o(ae,ge))le<He&&0>o(ve,ae)?($[ke]=ve,$[le]=ge,ke=le):($[ke]=ae,$[J]=ge,ke=J);else if(le<He&&0>o(ve,ge))$[ke]=ve,$[le]=ge,ke=le;else break e}}return se}function o($,se){var ge=$.sortIndex-se.sortIndex;return ge!==0?ge:$.id-se.id}if(s.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var c=performance;s.unstable_now=function(){return c.now()}}else{var f=Date,p=f.now();s.unstable_now=function(){return f.now()-p}}var g=[],y=[],T=1,b=null,N=3,P=!1,G=!1,K=!1,Y=!1,ne=typeof setTimeout=="function"?setTimeout:null,re=typeof clearTimeout=="function"?clearTimeout:null,oe=typeof setImmediate<"u"?setImmediate:null;function de($){for(var se=n(y);se!==null;){if(se.callback===null)a(y);else if(se.startTime<=$)a(y),se.sortIndex=se.expirationTime,e(g,se);else break;se=n(y)}}function fe($){if(K=!1,de($),!G)if(n(g)!==null)G=!0,_e||(_e=!0,L());else{var se=n(y);se!==null&&Ye(fe,se.startTime-$)}}var _e=!1,C=-1,w=5,I=-1;function M(){return Y?!0:!(s.unstable_now()-I<w)}function j(){if(Y=!1,_e){var $=s.unstable_now();I=$;var se=!0;try{e:{G=!1,K&&(K=!1,re(C),C=-1),P=!0;var ge=N;try{t:{for(de($),b=n(g);b!==null&&!(b.expirationTime>$&&M());){var ke=b.callback;if(typeof ke=="function"){b.callback=null,N=b.priorityLevel;var He=ke(b.expirationTime<=$);if($=s.unstable_now(),typeof He=="function"){b.callback=He,de($),se=!0;break t}b===n(g)&&a(g),de($)}else a(g);b=n(g)}if(b!==null)se=!0;else{var O=n(y);O!==null&&Ye(fe,O.startTime-$),se=!1}}break e}finally{b=null,N=ge,P=!1}se=void 0}}finally{se?L():_e=!1}}}var L;if(typeof oe=="function")L=function(){oe(j)};else if(typeof MessageChannel<"u"){var R=new MessageChannel,Xe=R.port2;R.port1.onmessage=j,L=function(){Xe.postMessage(null)}}else L=function(){ne(j,0)};function Ye($,se){C=ne(function(){$(s.unstable_now())},se)}s.unstable_IdlePriority=5,s.unstable_ImmediatePriority=1,s.unstable_LowPriority=4,s.unstable_NormalPriority=3,s.unstable_Profiling=null,s.unstable_UserBlockingPriority=2,s.unstable_cancelCallback=function($){$.callback=null},s.unstable_forceFrameRate=function($){0>$||125<$?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):w=0<$?Math.floor(1e3/$):5},s.unstable_getCurrentPriorityLevel=function(){return N},s.unstable_next=function($){switch(N){case 1:case 2:case 3:var se=3;break;default:se=N}var ge=N;N=se;try{return $()}finally{N=ge}},s.unstable_requestPaint=function(){Y=!0},s.unstable_runWithPriority=function($,se){switch($){case 1:case 2:case 3:case 4:case 5:break;default:$=3}var ge=N;N=$;try{return se()}finally{N=ge}},s.unstable_scheduleCallback=function($,se,ge){var ke=s.unstable_now();switch(typeof ge=="object"&&ge!==null?(ge=ge.delay,ge=typeof ge=="number"&&0<ge?ke+ge:ke):ge=ke,$){case 1:var He=-1;break;case 2:He=250;break;case 5:He=1073741823;break;case 4:He=1e4;break;default:He=5e3}return He=ge+He,$={id:T++,callback:se,priorityLevel:$,startTime:ge,expirationTime:He,sortIndex:-1},ge>ke?($.sortIndex=ge,e(y,$),n(g)===null&&$===n(y)&&(K?(re(C),C=-1):K=!0,Ye(fe,ge-ke))):($.sortIndex=He,e(g,$),G||P||(G=!0,_e||(_e=!0,L()))),$},s.unstable_shouldYield=M,s.unstable_wrapCallback=function($){var se=N;return function(){var ge=N;N=se;try{return $.apply(this,arguments)}finally{N=ge}}}})(sm)),sm}var mv;function CA(){return mv||(mv=1,im.exports=IA()),im.exports}var am={exports:{}},Xt={};var pv;function DA(){if(pv)return Xt;pv=1;var s=Km();function e(g){var y="https://react.dev/errors/"+g;if(1<arguments.length){y+="?args[]="+encodeURIComponent(arguments[1]);for(var T=2;T<arguments.length;T++)y+="&args[]="+encodeURIComponent(arguments[T])}return"Minified React error #"+g+"; visit "+y+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var a={d:{f:n,r:function(){throw Error(e(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},o=Symbol.for("react.portal");function c(g,y,T){var b=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:b==null?null:""+b,children:g,containerInfo:y,implementation:T}}var f=s.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function p(g,y){if(g==="font")return"";if(typeof y=="string")return y==="use-credentials"?y:""}return Xt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,Xt.createPortal=function(g,y){var T=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!y||y.nodeType!==1&&y.nodeType!==9&&y.nodeType!==11)throw Error(e(299));return c(g,y,null,T)},Xt.flushSync=function(g){var y=f.T,T=a.p;try{if(f.T=null,a.p=2,g)return g()}finally{f.T=y,a.p=T,a.d.f()}},Xt.preconnect=function(g,y){typeof g=="string"&&(y?(y=y.crossOrigin,y=typeof y=="string"?y==="use-credentials"?y:"":void 0):y=null,a.d.C(g,y))},Xt.prefetchDNS=function(g){typeof g=="string"&&a.d.D(g)},Xt.preinit=function(g,y){if(typeof g=="string"&&y&&typeof y.as=="string"){var T=y.as,b=p(T,y.crossOrigin),N=typeof y.integrity=="string"?y.integrity:void 0,P=typeof y.fetchPriority=="string"?y.fetchPriority:void 0;T==="style"?a.d.S(g,typeof y.precedence=="string"?y.precedence:void 0,{crossOrigin:b,integrity:N,fetchPriority:P}):T==="script"&&a.d.X(g,{crossOrigin:b,integrity:N,fetchPriority:P,nonce:typeof y.nonce=="string"?y.nonce:void 0})}},Xt.preinitModule=function(g,y){if(typeof g=="string")if(typeof y=="object"&&y!==null){if(y.as==null||y.as==="script"){var T=p(y.as,y.crossOrigin);a.d.M(g,{crossOrigin:T,integrity:typeof y.integrity=="string"?y.integrity:void 0,nonce:typeof y.nonce=="string"?y.nonce:void 0})}}else y==null&&a.d.M(g)},Xt.preload=function(g,y){if(typeof g=="string"&&typeof y=="object"&&y!==null&&typeof y.as=="string"){var T=y.as,b=p(T,y.crossOrigin);a.d.L(g,T,{crossOrigin:b,integrity:typeof y.integrity=="string"?y.integrity:void 0,nonce:typeof y.nonce=="string"?y.nonce:void 0,type:typeof y.type=="string"?y.type:void 0,fetchPriority:typeof y.fetchPriority=="string"?y.fetchPriority:void 0,referrerPolicy:typeof y.referrerPolicy=="string"?y.referrerPolicy:void 0,imageSrcSet:typeof y.imageSrcSet=="string"?y.imageSrcSet:void 0,imageSizes:typeof y.imageSizes=="string"?y.imageSizes:void 0,media:typeof y.media=="string"?y.media:void 0})}},Xt.preloadModule=function(g,y){if(typeof g=="string")if(y){var T=p(y.as,y.crossOrigin);a.d.m(g,{as:typeof y.as=="string"&&y.as!=="script"?y.as:void 0,crossOrigin:T,integrity:typeof y.integrity=="string"?y.integrity:void 0})}else a.d.m(g)},Xt.requestFormReset=function(g){a.d.r(g)},Xt.unstable_batchedUpdates=function(g,y){return g(y)},Xt.useFormState=function(g,y,T){return f.H.useFormState(g,y,T)},Xt.useFormStatus=function(){return f.H.useHostTransitionStatus()},Xt.version="19.2.4",Xt}var gv;function jA(){if(gv)return am.exports;gv=1;function s(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(s)}catch(e){console.error(e)}}return s(),am.exports=DA(),am.exports}var _v;function OA(){if(_v)return Rl;_v=1;var s=CA(),e=Km(),n=jA();function a(t){var i="https://react.dev/errors/"+t;if(1<arguments.length){i+="?args[]="+encodeURIComponent(arguments[1]);for(var r=2;r<arguments.length;r++)i+="&args[]="+encodeURIComponent(arguments[r])}return"Minified React error #"+t+"; visit "+i+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function c(t){var i=t,r=t;if(t.alternate)for(;i.return;)i=i.return;else{t=i;do i=t,(i.flags&4098)!==0&&(r=i.return),t=i.return;while(t)}return i.tag===3?r:null}function f(t){if(t.tag===13){var i=t.memoizedState;if(i===null&&(t=t.alternate,t!==null&&(i=t.memoizedState)),i!==null)return i.dehydrated}return null}function p(t){if(t.tag===31){var i=t.memoizedState;if(i===null&&(t=t.alternate,t!==null&&(i=t.memoizedState)),i!==null)return i.dehydrated}return null}function g(t){if(c(t)!==t)throw Error(a(188))}function y(t){var i=t.alternate;if(!i){if(i=c(t),i===null)throw Error(a(188));return i!==t?null:t}for(var r=t,l=i;;){var d=r.return;if(d===null)break;var m=d.alternate;if(m===null){if(l=d.return,l!==null){r=l;continue}break}if(d.child===m.child){for(m=d.child;m;){if(m===r)return g(d),t;if(m===l)return g(d),i;m=m.sibling}throw Error(a(188))}if(r.return!==l.return)r=d,l=m;else{for(var v=!1,S=d.child;S;){if(S===r){v=!0,r=d,l=m;break}if(S===l){v=!0,l=d,r=m;break}S=S.sibling}if(!v){for(S=m.child;S;){if(S===r){v=!0,r=m,l=d;break}if(S===l){v=!0,l=m,r=d;break}S=S.sibling}if(!v)throw Error(a(189))}}if(r.alternate!==l)throw Error(a(190))}if(r.tag!==3)throw Error(a(188));return r.stateNode.current===r?t:i}function T(t){var i=t.tag;if(i===5||i===26||i===27||i===6)return t;for(t=t.child;t!==null;){if(i=T(t),i!==null)return i;t=t.sibling}return null}var b=Object.assign,N=Symbol.for("react.element"),P=Symbol.for("react.transitional.element"),G=Symbol.for("react.portal"),K=Symbol.for("react.fragment"),Y=Symbol.for("react.strict_mode"),ne=Symbol.for("react.profiler"),re=Symbol.for("react.consumer"),oe=Symbol.for("react.context"),de=Symbol.for("react.forward_ref"),fe=Symbol.for("react.suspense"),_e=Symbol.for("react.suspense_list"),C=Symbol.for("react.memo"),w=Symbol.for("react.lazy"),I=Symbol.for("react.activity"),M=Symbol.for("react.memo_cache_sentinel"),j=Symbol.iterator;function L(t){return t===null||typeof t!="object"?null:(t=j&&t[j]||t["@@iterator"],typeof t=="function"?t:null)}var R=Symbol.for("react.client.reference");function Xe(t){if(t==null)return null;if(typeof t=="function")return t.$$typeof===R?null:t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case K:return"Fragment";case ne:return"Profiler";case Y:return"StrictMode";case fe:return"Suspense";case _e:return"SuspenseList";case I:return"Activity"}if(typeof t=="object")switch(t.$$typeof){case G:return"Portal";case oe:return t.displayName||"Context";case re:return(t._context.displayName||"Context")+".Consumer";case de:var i=t.render;return t=t.displayName,t||(t=i.displayName||i.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case C:return i=t.displayName||null,i!==null?i:Xe(t.type)||"Memo";case w:i=t._payload,t=t._init;try{return Xe(t(i))}catch{}}return null}var Ye=Array.isArray,$=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,se=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ge={pending:!1,data:null,method:null,action:null},ke=[],He=-1;function O(t){return{current:t}}function J(t){0>He||(t.current=ke[He],ke[He]=null,He--)}function ae(t,i){He++,ke[He]=t.current,t.current=i}var le=O(null),ve=O(null),Ae=O(null),Me=O(null);function jt(t,i){switch(ae(Ae,i),ae(ve,t),ae(le,null),i.nodeType){case 9:case 11:t=(t=i.documentElement)&&(t=t.namespaceURI)?jy(t):0;break;default:if(t=i.tagName,i=i.namespaceURI)i=jy(i),t=Oy(i,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}J(le),ae(le,t)}function st(){J(le),J(ve),J(Ae)}function ua(t){t.memoizedState!==null&&ae(Me,t);var i=le.current,r=Oy(i,t.type);i!==r&&(ae(ve,t),ae(le,r))}function sr(t){ve.current===t&&(J(le),J(ve)),Me.current===t&&(J(Me),bl._currentValue=ge)}var ar,rr;function ai(t){if(ar===void 0)try{throw Error()}catch(r){var i=r.stack.trim().match(/\n( *(at )?)/);ar=i&&i[1]||"",rr=-1<r.stack.indexOf(` at`)?" (<anonymous>)":-1<r.stack.indexOf("@")?"@unknown:0:0":""}return` `+ar+t+rr}var bo=!1;function ha(t,i){if(!t||bo)return"";bo=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(i){var X=function(){throw Error()};if(Object.defineProperty(X.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(X,[])}catch(F){var H=F}Reflect.construct(t,[],X)}else{try{X.call()}catch(F){H=F}t.call(X.prototype)}}else{try{throw Error()}catch(F){H=F}(X=t())&&typeof X.catch=="function"&&X.catch(function(){})}}catch(F){if(F&&H&&typeof F.stack=="string")return[F.stack,H.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var d=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");d&&d.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var m=l.DetermineComponentFrameRoot(),v=m[0],S=m[1];if(v&&S){var x=v.split(` `),B=S.split(` `);for(d=l=0;l<x.length&&!x[l].includes("DetermineComponentFrameRoot");)l++;for(;d<B.length&&!B[d].includes("DetermineComponentFrameRoot");)d++;if(l===x.length||d===B.length)for(l=x.length-1,d=B.length-1;1<=l&&0<=d&&x[l]!==B[d];)d--;for(;1<=l&&0<=d;l--,d--)if(x[l]!==B[d]){if(l!==1||d!==1)do if(l--,d--,0>d||x[l]!==B[d]){var Q=` `+x[l].replace(" at new "," at ");return t.displayName&&Q.includes("<anonymous>")&&(Q=Q.replace("<anonymous>",t.displayName)),Q}while(1<=l&&0<=d);break}}}finally{bo=!1,Error.prepareStackTrace=r}return(r=t?t.displayName||t.name:"")?ai(r):""}function So(t,i){switch(t.tag){case 26:case 27:case 5:return ai(t.type);case 16:return ai("Lazy");case 13:return t.child!==i&&i!==null?ai("Suspense Fallback"):ai("Suspense");case 19:return ai("SuspenseList");case 0:case 15:return ha(t.type,!1);case 11:return ha(t.type.render,!1);case 1:return ha(t.type,!0);case 31:return ai("Activity");default:return""}}function Ao(t){try{var i="",r=null;do i+=So(t,r),r=t,t=t.return;while(t);return i}catch(l){return` Error generating stack: `+l.message+` `+l.stack}}var Et=Object.prototype.hasOwnProperty,Ot=s.unstable_scheduleCallback,ys=s.unstable_cancelCallback,td=s.unstable_shouldYield,_c=s.unstable_requestPaint,sn=s.unstable_now,da=s.unstable_getCurrentPriorityLevel,wo=s.unstable_ImmediatePriority,No=s.unstable_UserBlockingPriority,vs=s.unstable_NormalPriority,nd=s.unstable_LowPriority,yc=s.unstable_IdlePriority,vc=s.log,Ec=s.unstable_setDisableYieldValue,Hn=null,Bt=null;function Rn(t){if(typeof vc=="function"&&Ec(t),Bt&&typeof Bt.setStrictMode=="function")try{Bt.setStrictMode(Hn,t)}catch{}}var gt=Math.clz32?Math.clz32:bc,Tc=Math.log,or=Math.LN2;function bc(t){return t>>>=0,t===0?32:31-(Tc(t)/or|0)|0}var ri=256,fa=262144,Tt=4194304;function oi(t){var i=t&42;if(i!==0)return i;switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return t&261888;case 262144:case 524288:case 1048576:case 2097152:return t&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function li(t,i,r){var l=t.pendingLanes;if(l===0)return 0;var d=0,m=t.suspendedLanes,v=t.pingedLanes;t=t.warmLanes;var S=l&134217727;return S!==0?(l=S&~m,l!==0?d=oi(l):(v&=S,v!==0?d=oi(v):r||(r=S&~t,r!==0&&(d=oi(r))))):(S=l&~m,S!==0?d=oi(S):v!==0?d=oi(v):r||(r=l&~t,r!==0&&(d=oi(r)))),d===0?0:i!==0&&i!==d&&(i&m)===0&&(m=d&-d,r=i&-i,m>=r||m===32&&(r&4194048)!==0)?i:d}function qn(t,i){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&i)===0}function id(t,i){switch(t){case 1:case 2:case 4:case 8:case 64:return i+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return i+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Sc(){var t=Tt;return Tt<<=1,(Tt&62914560)===0&&(Tt=4194304),t}function ci(t){for(var i=[],r=0;31>r;r++)i.push(t);return i}function ma(t,i){t.pendingLanes|=i,i!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function sd(t,i,r,l,d,m){var v=t.pendingLanes;t.pendingLanes=r,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=r,t.entangledLanes&=r,t.errorRecoveryDisabledLanes&=r,t.shellSuspendCounter=0;var S=t.entanglements,x=t.expirationTimes,B=t.hiddenUpdates;for(r=v&~r;0<r;){var Q=31-gt(r),X=1<<Q;S[Q]=0,x[Q]=-1;var H=B[Q];if(H!==null)for(B[Q]=null,Q=0;Q<H.length;Q++){var F=H[Q];F!==null&&(F.lane&=-536870913)}r&=~X}l!==0&&pa(t,l,0),m!==0&&d===0&&t.tag!==0&&(t.suspendedLanes|=m&~(v&~i))}function pa(t,i,r){t.pendingLanes|=i,t.suspendedLanes&=~i;var l=31-gt(i);t.entangledLanes|=i,t.entanglements[l]=t.entanglements[l]|1073741824|r&261930}function Ro(t,i){var r=t.entangledLanes|=i;for(t=t.entanglements;r;){var l=31-gt(r),d=1<<l;d&i|t[l]&i&&(t[l]|=i),r&=~d}}function xo(t,i){var r=i&-i;return r=(r&42)!==0?1:ga(r),(r&(t.suspendedLanes|i))!==0?0:r}function ga(t){switch(t){case 2:t=1;break;case 8:t=4;break;case 32:t=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:t=128;break;case 268435456:t=134217728;break;default:t=0}return t}function ki(t){return t&=-t,2<t?8<t?(t&134217727)!==0?32:268435456:8:2}function Ac(){var t=se.p;return t!==0?t:(t=window.event,t===void 0?32:nv(t.type))}function Fn(t,i){var r=se.p;try{return se.p=t,i()}finally{se.p=r}}var Gn=Math.random().toString(36).slice(2),bt="__reactFiber$"+Gn,Pt="__reactProps$"+Gn,ui="__reactContainer$"+Gn,lr="__reactEvents$"+Gn,ad="__reactListeners$"+Gn,wc="__reactHandles$"+Gn,Nc="__reactResources$"+Gn,hi="__reactMarker$"+Gn;function cr(t){delete t[bt],delete t[Pt],delete t[lr],delete t[ad],delete t[wc]}function di(t){var i=t[bt];if(i)return i;for(var r=t.parentNode;r;){if(i=r[ui]||r[bt]){if(r=i.alternate,i.child!==null||r!==null&&r.child!==null)for(t=zy(t);t!==null;){if(r=t[bt])return r;t=zy(t)}return i}t=r,r=t.parentNode}return null}function xn(t){if(t=t[bt]||t[ui]){var i=t.tag;if(i===5||i===6||i===13||i===31||i===26||i===27||i===3)return t}return null}function yn(t){var i=t.tag;if(i===5||i===26||i===27||i===6)return t.stateNode;throw Error(a(33))}function fi(t){var i=t[Nc];return i||(i=t[Nc]={hoistableStyles:new Map,hoistableScripts:new Map}),i}function St(t){t[hi]=!0}var Io=new Set,Co={};function mi(t,i){pi(t,i),pi(t+"Capture",i)}function pi(t,i){for(Co[t]=i,t=0;t<i.length;t++)Io.add(i[t])}var Do=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),jo={},Oo={};function Rc(t){return Et.call(Oo,t)?!0:Et.call(jo,t)?!1:Do.test(t)?Oo[t]=!0:(jo[t]=!0,!1)}function ur(t,i,r){if(Rc(i))if(r===null)t.removeAttribute(i);else{switch(typeof r){case"undefined":case"function":case"symbol":t.removeAttribute(i);return;case"boolean":var l=i.toLowerCase().slice(0,5);if(l!=="data-"&&l!=="aria-"){t.removeAttribute(i);return}}t.setAttribute(i,""+r)}}function vn(t,i,r){if(r===null)t.removeAttribute(i);else{switch(typeof r){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(i);return}t.setAttribute(i,""+r)}}function At(t,i,r,l){if(l===null)t.removeAttribute(r);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(r);return}t.setAttributeNS(i,r,""+l)}}function kt(t){switch(typeof t){case"bigint":case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function Es(t){var i=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(i==="checkbox"||i==="radio")}function Mo(t,i,r){var l=Object.getOwnPropertyDescriptor(t.constructor.prototype,i);if(!t.hasOwnProperty(i)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var d=l.get,m=l.set;return Object.defineProperty(t,i,{configurable:!0,get:function(){return d.call(this)},set:function(v){r=""+v,m.call(this,v)}}),Object.defineProperty(t,i,{enumerable:l.enumerable}),{getValue:function(){return r},setValue:function(v){r=""+v},stopTracking:function(){t._valueTracker=null,delete t[i]}}}}function qe(t){if(!t._valueTracker){var i=Es(t)?"checked":"value";t._valueTracker=Mo(t,i,""+t[i])}}function _a(t){if(!t)return!1;var i=t._valueTracker;if(!i)return!0;var r=i.getValue(),l="";return t&&(l=Es(t)?t.checked?"true":"false":t.value),t=l,t!==r?(i.setValue(t),!0):!1}function gi(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}var ya=/[\n"\\]/g;function ln(t){return t.replace(ya,function(i){return"\\"+i.charCodeAt(0).toString(16)+" "})}function hr(t,i,r,l,d,m,v,S){t.name="",v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"?t.type=v:t.removeAttribute("type"),i!=null?v==="number"?(i===0&&t.value===""||t.value!=i)&&(t.value=""+kt(i)):t.value!==""+kt(i)&&(t.value=""+kt(i)):v!=="submit"&&v!=="reset"||t.removeAttribute("value"),i!=null?Po(t,v,kt(i)):r!=null?Po(t,v,kt(r)):l!=null&&t.removeAttribute("value"),d==null&&m!=null&&(t.defaultChecked=!!m),d!=null&&(t.checked=d&&typeof d!="function"&&typeof d!="symbol"),S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"?t.name=""+kt(S):t.removeAttribute("name")}function xc(t,i,r,l,d,m,v,S){if(m!=null&&typeof m!="function"&&typeof m!="symbol"&&typeof m!="boolean"&&(t.type=m),i!=null||r!=null){if(!(m!=="submit"&&m!=="reset"||i!=null)){qe(t);return}r=r!=null?""+kt(r):"",i=i!=null?""+kt(i):r,S||i===t.value||(t.value=i),t.defaultValue=i}l=l??d,l=typeof l!="function"&&typeof l!="symbol"&&!!l,t.checked=S?t.checked:!!l,t.defaultChecked=!!l,v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"&&(t.name=v),qe(t)}function Po(t,i,r){i==="number"&&gi(t.ownerDocument)===t||t.defaultValue===""+r||(t.defaultValue=""+r)}function Ts(t,i,r,l){if(t=t.options,i){i={};for(var d=0;d<r.length;d++)i["$"+r[d]]=!0;for(r=0;r<t.length;r++)d=i.hasOwnProperty("$"+t[r].value),t[r].selected!==d&&(t[r].selected=d),d&&l&&(t[r].defaultSelected=!0)}else{for(r=""+kt(r),i=null,d=0;d<t.length;d++){if(t[d].value===r){t[d].selected=!0,l&&(t[d].defaultSelected=!0);return}i!==null||t[d].disabled||(i=t[d])}i!==null&&(i.selected=!0)}}function Ic(t,i,r){if(i!=null&&(i=""+kt(i),i!==t.value&&(t.value=i),r==null)){t.defaultValue!==i&&(t.defaultValue=i);return}t.defaultValue=r!=null?""+kt(r):""}function bs(t,i,r,l){if(i==null){if(l!=null){if(r!=null)throw Error(a(92));if(Ye(l)){if(1<l.length)throw Error(a(93));l=l[0]}r=l}r==null&&(r=""),i=r}r=kt(i),t.defaultValue=r,l=t.textContent,l===r&&l!==""&&l!==null&&(t.value=l),qe(t)}function cn(t,i){if(i){var r=t.firstChild;if(r&&r===t.lastChild&&r.nodeType===3){r.nodeValue=i;return}}t.textContent=i}var Cc=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function ko(t,i,r){var l=i.indexOf("--")===0;r==null||typeof r=="boolean"||r===""?l?t.setProperty(i,""):i==="float"?t.cssFloat="":t[i]="":l?t.setProperty(i,r):typeof r!="number"||r===0||Cc.has(i)?i==="float"?t.cssFloat=r:t[i]=(""+r).trim():t[i]=r+"px"}function Lo(t,i,r){if(i!=null&&typeof i!="object")throw Error(a(62));if(t=t.style,r!=null){for(var l in r)!r.hasOwnProperty(l)||i!=null&&i.hasOwnProperty(l)||(l.indexOf("--")===0?t.setProperty(l,""):l==="float"?t.cssFloat="":t[l]="");for(var d in i)l=i[d],i.hasOwnProperty(d)&&r[d]!==l&&ko(t,d,l)}else for(var m in i)i.hasOwnProperty(m)&&ko(t,m,i[m])}function dr(t){if(t.indexOf("-")===-1)return!1;switch(t){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Dc=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),Ss=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function fr(t){return Ss.test(""+t)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":t}function Yn(){}var Vo=null;function In(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var As=null,_i=null;function va(t){var i=xn(t);if(i&&(t=i.stateNode)){var r=t[Pt]||null;e:switch(t=i.stateNode,i.type){case"input":if(hr(t,r.value,r.defaultValue,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name),i=r.name,r.type==="radio"&&i!=null){for(r=t;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll('input[name="'+ln(""+i)+'"][type="radio"]'),i=0;i<r.length;i++){var l=r[i];if(l!==t&&l.form===t.form){var d=l[Pt]||null;if(!d)throw Error(a(90));hr(l,d.value,d.defaultValue,d.defaultValue,d.checked,d.defaultChecked,d.type,d.name)}}for(i=0;i<r.length;i++)l=r[i],l.form===t.form&&_a(l)}break e;case"textarea":Ic(t,r.value,r.defaultValue);break e;case"select":i=r.value,i!=null&&Ts(t,!!r.multiple,i,!1)}}}var mr=!1;function ws(t,i,r){if(mr)return t(i,r);mr=!0;try{var l=t(i);return l}finally{if(mr=!1,(As!==null||_i!==null)&&(Au(),As&&(i=As,t=_i,_i=As=null,va(i),t)))for(i=0;i<t.length;i++)va(t[i])}}function Kn(t,i){var r=t.stateNode;if(r===null)return null;var l=r[Pt]||null;if(l===null)return null;r=l[i];e:switch(i){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(l=!l.disabled)||(t=t.type,l=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!l;break e;default:t=!1}if(t)return null;if(r&&typeof r!="function")throw Error(a(231,i,typeof r));return r}var Cn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ea=!1;if(Cn)try{var Ke={};Object.defineProperty(Ke,"passive",{get:function(){Ea=!0}}),window.addEventListener("test",Ke,Ke),window.removeEventListener("test",Ke,Ke)}catch{Ea=!1}var yi=null,Uo=null,Ta=null;function zo(){if(Ta)return Ta;var t,i=Uo,r=i.length,l,d="value"in yi?yi.value:yi.textContent,m=d.length;for(t=0;t<r&&i[t]===d[t];t++);var v=r-t;for(l=1;l<=v&&i[r-l]===d[m-l];l++);return Ta=d.slice(t,1<l?1-l:void 0)}function ba(t){var i=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&i===13&&(t=13)):t=i,t===10&&(t=13),32<=t||t===13?t:0}function Li(){return!0}function Qn(){return!1}function Ht(t){function i(r,l,d,m,v){this._reactName=r,this._targetInst=d,this.type=l,this.nativeEvent=m,this.target=v,this.currentTarget=null;for(var S in t)t.hasOwnProperty(S)&&(r=t[S],this[S]=r?r(m):m[S]);return this.isDefaultPrevented=(m.defaultPrevented!=null?m.defaultPrevented:m.returnValue===!1)?Li:Qn,this.isPropagationStopped=Qn,this}return b(i.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=Li)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=Li)},persist:function(){},isPersistent:Li}),i}var Vi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},vi=Ht(Vi),Ns=b({},Vi,{view:0,detail:0}),Bo=Ht(Ns),Rs,pr,Ei,gr=b({},Ns,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:xs,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==Ei&&(Ei&&t.type==="mousemove"?(Rs=t.screenX-Ei.screenX,pr=t.screenY-Ei.screenY):pr=Rs=0,Ei=t),Rs)},movementY:function(t){return"movementY"in t?t.movementY:pr}}),Ho=Ht(gr),Sa=b({},gr,{dataTransfer:0}),jc=Ht(Sa),Oc=b({},Ns,{relatedTarget:0}),Aa=Ht(Oc),qo=b({},Vi,{animationName:0,elapsedTime:0,pseudoElement:0}),Mc=Ht(qo),_r=b({},Vi,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),Pc=Ht(_r),kc=b({},Vi,{data:0}),Ti=Ht(kc),Lc={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Vc={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"},Uc={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function zc(t){var i=this.nativeEvent;return i.getModifierState?i.getModifierState(t):(t=Uc[t])?!!i[t]:!1}function xs(){return zc}var an=b({},Ns,{key:function(t){if(t.key){var i=Lc[t.key]||t.key;if(i!=="Unidentified")return i}return t.type==="keypress"?(t=ba(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?Vc[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:xs,charCode:function(t){return t.type==="keypress"?ba(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?ba(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),Bc=Ht(an),Hc=b({},gr,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Ui=Ht(Hc),u=b({},Ns,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:xs}),_=Ht(u),E=b({},Vi,{propertyName:0,elapsedTime:0,pseudoElement:0}),A=Ht(E),U=b({},gr,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),q=Ht(U),ie=b({},Vi,{newState:0,oldState:0}),be=Ht(ie),_t=[9,13,27,32],Ue=Cn&&"CompositionEvent"in window,at=null;Cn&&"documentMode"in document&&(at=document.documentMode);var Dn=Cn&&"TextEvent"in window&&!at,bi=Cn&&(!Ue||at&&8<at&&11>=at),$n=" ",Wn=!1;function wa(t,i){switch(t){case"keyup":return _t.indexOf(i.keyCode)!==-1;case"keydown":return i.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function yr(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var vr=!1;function WS(t,i){switch(t){case"compositionend":return yr(i);case"keypress":return i.which!==32?null:(Wn=!0,$n);case"textInput":return t=i.data,t===$n&&Wn?null:t;default:return null}}function XS(t,i){if(vr)return t==="compositionend"||!Ue&&wa(t,i)?(t=zo(),Ta=Uo=yi=null,vr=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(i.ctrlKey||i.altKey||i.metaKey)||i.ctrlKey&&i.altKey){if(i.char&&1<i.char.length)return i.char;if(i.which)return String.fromCharCode(i.which)}return null;case"compositionend":return bi&&i.locale!=="ko"?null:i.data;default:return null}}var JS={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 qp(t){var i=t&&t.nodeName&&t.nodeName.toLowerCase();return i==="input"?!!JS[t.type]:i==="textarea"}function Fp(t,i,r,l){As?_i?_i.push(l):_i=[l]:As=l,i=Du(i,"onChange"),0<i.length&&(r=new vi("onChange","change",null,r,l),t.push({event:r,listeners:i}))}var Fo=null,Go=null;function ZS(t){Ny(t,0)}function qc(t){var i=yn(t);if(_a(i))return t}function Gp(t,i){if(t==="change")return i}var Yp=!1;if(Cn){var rd;if(Cn){var od="oninput"in document;if(!od){var Kp=document.createElement("div");Kp.setAttribute("oninput","return;"),od=typeof Kp.oninput=="function"}rd=od}else rd=!1;Yp=rd&&(!document.documentMode||9<document.documentMode)}function Qp(){Fo&&(Fo.detachEvent("onpropertychange",$p),Go=Fo=null)}function $p(t){if(t.propertyName==="value"&&qc(Go)){var i=[];Fp(i,Go,t,In(t)),ws(ZS,i)}}function e0(t,i,r){t==="focusin"?(Qp(),Fo=i,Go=r,Fo.attachEvent("onpropertychange",$p)):t==="focusout"&&Qp()}function t0(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return qc(Go)}function n0(t,i){if(t==="click")return qc(i)}function i0(t,i){if(t==="input"||t==="change")return qc(i)}function s0(t,i){return t===i&&(t!==0||1/t===1/i)||t!==t&&i!==i}var En=typeof Object.is=="function"?Object.is:s0;function Yo(t,i){if(En(t,i))return!0;if(typeof t!="object"||t===null||typeof i!="object"||i===null)return!1;var r=Object.keys(t),l=Object.keys(i);if(r.length!==l.length)return!1;for(l=0;l<r.length;l++){var d=r[l];if(!Et.call(i,d)||!En(t[d],i[d]))return!1}return!0}function Wp(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function Xp(t,i){var r=Wp(t);t=0;for(var l;r;){if(r.nodeType===3){if(l=t+r.textContent.length,t<=i&&l>=i)return{node:r,offset:i-t};t=l}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=Wp(r)}}function Jp(t,i){return t&&i?t===i?!0:t&&t.nodeType===3?!1:i&&i.nodeType===3?Jp(t,i.parentNode):"contains"in t?t.contains(i):t.compareDocumentPosition?!!(t.compareDocumentPosition(i)&16):!1:!1}function Zp(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var i=gi(t.document);i instanceof t.HTMLIFrameElement;){try{var r=typeof i.contentWindow.location.href=="string"}catch{r=!1}if(r)t=i.contentWindow;else break;i=gi(t.document)}return i}function ld(t){var i=t&&t.nodeName&&t.nodeName.toLowerCase();return i&&(i==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||i==="textarea"||t.contentEditable==="true")}var a0=Cn&&"documentMode"in document&&11>=document.documentMode,Er=null,cd=null,Ko=null,ud=!1;function eg(t,i,r){var l=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;ud||Er==null||Er!==gi(l)||(l=Er,"selectionStart"in l&&ld(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),Ko&&Yo(Ko,l)||(Ko=l,l=Du(cd,"onSelect"),0<l.length&&(i=new vi("onSelect","select",null,i,r),t.push({event:i,listeners:l}),i.target=Er)))}function Na(t,i){var r={};return r[t.toLowerCase()]=i.toLowerCase(),r["Webkit"+t]="webkit"+i,r["Moz"+t]="moz"+i,r}var Tr={animationend:Na("Animation","AnimationEnd"),animationiteration:Na("Animation","AnimationIteration"),animationstart:Na("Animation","AnimationStart"),transitionrun:Na("Transition","TransitionRun"),transitionstart:Na("Transition","TransitionStart"),transitioncancel:Na("Transition","TransitionCancel"),transitionend:Na("Transition","TransitionEnd")},hd={},tg={};Cn&&(tg=document.createElement("div").style,"AnimationEvent"in window||(delete Tr.animationend.animation,delete Tr.animationiteration.animation,delete Tr.animationstart.animation),"TransitionEvent"in window||delete Tr.transitionend.transition);function Ra(t){if(hd[t])return hd[t];if(!Tr[t])return t;var i=Tr[t],r;for(r in i)if(i.hasOwnProperty(r)&&r in tg)return hd[t]=i[r];return t}var ng=Ra("animationend"),ig=Ra("animationiteration"),sg=Ra("animationstart"),r0=Ra("transitionrun"),o0=Ra("transitionstart"),l0=Ra("transitioncancel"),ag=Ra("transitionend"),rg=new Map,dd="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");dd.push("scrollEnd");function Xn(t,i){rg.set(t,i),mi(i,[t])}var Fc=typeof reportError=="function"?reportError:function(t){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var i=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof t=="object"&&t!==null&&typeof t.message=="string"?String(t.message):String(t),error:t});if(!window.dispatchEvent(i))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",t);return}console.error(t)},jn=[],br=0,fd=0;function Gc(){for(var t=br,i=fd=br=0;i<t;){var r=jn[i];jn[i++]=null;var l=jn[i];jn[i++]=null;var d=jn[i];jn[i++]=null;var m=jn[i];if(jn[i++]=null,l!==null&&d!==null){var v=l.pending;v===null?d.next=d:(d.next=v.next,v.next=d),l.pending=d}m!==0&&og(r,d,m)}}function Yc(t,i,r,l){jn[br++]=t,jn[br++]=i,jn[br++]=r,jn[br++]=l,fd|=l,t.lanes|=l,t=t.alternate,t!==null&&(t.lanes|=l)}function md(t,i,r,l){return Yc(t,i,r,l),Kc(t)}function xa(t,i){return Yc(t,null,null,i),Kc(t)}function og(t,i,r){t.lanes|=r;var l=t.alternate;l!==null&&(l.lanes|=r);for(var d=!1,m=t.return;m!==null;)m.childLanes|=r,l=m.alternate,l!==null&&(l.childLanes|=r),m.tag===22&&(t=m.stateNode,t===null||t._visibility&1||(d=!0)),t=m,m=m.return;return t.tag===3?(m=t.stateNode,d&&i!==null&&(d=31-gt(r),t=m.hiddenUpdates,l=t[d],l===null?t[d]=[i]:l.push(i),i.lane=r|536870912),m):null}function Kc(t){if(50<pl)throw pl=0,Af=null,Error(a(185));for(var i=t.return;i!==null;)t=i,i=t.return;return t.tag===3?t.stateNode:null}var Sr={};function c0(t,i,r,l){this.tag=t,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=i,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Tn(t,i,r,l){return new c0(t,i,r,l)}function pd(t){return t=t.prototype,!(!t||!t.isReactComponent)}function zi(t,i){var r=t.alternate;return r===null?(r=Tn(t.tag,i,t.key,t.mode),r.elementType=t.elementType,r.type=t.type,r.stateNode=t.stateNode,r.alternate=t,t.alternate=r):(r.pendingProps=i,r.type=t.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=t.flags&65011712,r.childLanes=t.childLanes,r.lanes=t.lanes,r.child=t.child,r.memoizedProps=t.memoizedProps,r.memoizedState=t.memoizedState,r.updateQueue=t.updateQueue,i=t.dependencies,r.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext},r.sibling=t.sibling,r.index=t.index,r.ref=t.ref,r.refCleanup=t.refCleanup,r}function lg(t,i){t.flags&=65011714;var r=t.alternate;return r===null?(t.childLanes=0,t.lanes=i,t.child=null,t.subtreeFlags=0,t.memoizedProps=null,t.memoizedState=null,t.updateQueue=null,t.dependencies=null,t.stateNode=null):(t.childLanes=r.childLanes,t.lanes=r.lanes,t.child=r.child,t.subtreeFlags=0,t.deletions=null,t.memoizedProps=r.memoizedProps,t.memoizedState=r.memoizedState,t.updateQueue=r.updateQueue,t.type=r.type,i=r.dependencies,t.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext}),t}function Qc(t,i,r,l,d,m){var v=0;if(l=t,typeof t=="function")pd(t)&&(v=1);else if(typeof t=="string")v=mA(t,r,le.current)?26:t==="html"||t==="head"||t==="body"?27:5;else e:switch(t){case I:return t=Tn(31,r,i,d),t.elementType=I,t.lanes=m,t;case K:return Ia(r.children,d,m,i);case Y:v=8,d|=24;break;case ne:return t=Tn(12,r,i,d|2),t.elementType=ne,t.lanes=m,t;case fe:return t=Tn(13,r,i,d),t.elementType=fe,t.lanes=m,t;case _e:return t=Tn(19,r,i,d),t.elementType=_e,t.lanes=m,t;default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case oe:v=10;break e;case re:v=9;break e;case de:v=11;break e;case C:v=14;break e;case w:v=16,l=null;break e}v=29,r=Error(a(130,t===null?"null":typeof t,"")),l=null}return i=Tn(v,r,i,d),i.elementType=t,i.type=l,i.lanes=m,i}function Ia(t,i,r,l){return t=Tn(7,t,l,i),t.lanes=r,t}function gd(t,i,r){return t=Tn(6,t,null,i),t.lanes=r,t}function cg(t){var i=Tn(18,null,null,0);return i.stateNode=t,i}function _d(t,i,r){return i=Tn(4,t.children!==null?t.children:[],t.key,i),i.lanes=r,i.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},i}var ug=new WeakMap;function On(t,i){if(typeof t=="object"&&t!==null){var r=ug.get(t);return r!==void 0?r:(i={value:t,source:i,stack:Ao(i)},ug.set(t,i),i)}return{value:t,source:i,stack:Ao(i)}}var Ar=[],wr=0,$c=null,Qo=0,Mn=[],Pn=0,Is=null,Si=1,Ai="";function Bi(t,i){Ar[wr++]=Qo,Ar[wr++]=$c,$c=t,Qo=i}function hg(t,i,r){Mn[Pn++]=Si,Mn[Pn++]=Ai,Mn[Pn++]=Is,Is=t;var l=Si;t=Ai;var d=32-gt(l)-1;l&=~(1<<d),r+=1;var m=32-gt(i)+d;if(30<m){var v=d-d%5;m=(l&(1<<v)-1).toString(32),l>>=v,d-=v,Si=1<<32-gt(i)+d|r<<d|l,Ai=m+t}else Si=1<<m|r<<d|l,Ai=t}function yd(t){t.return!==null&&(Bi(t,1),hg(t,1,0))}function vd(t){for(;t===$c;)$c=Ar[--wr],Ar[wr]=null,Qo=Ar[--wr],Ar[wr]=null;for(;t===Is;)Is=Mn[--Pn],Mn[Pn]=null,Ai=Mn[--Pn],Mn[Pn]=null,Si=Mn[--Pn],Mn[Pn]=null}function dg(t,i){Mn[Pn++]=Si,Mn[Pn++]=Ai,Mn[Pn++]=Is,Si=i.id,Ai=i.overflow,Is=t}var qt=null,et=null,Oe=!1,Cs=null,kn=!1,Ed=Error(a(519));function Ds(t){var i=Error(a(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw $o(On(i,t)),Ed}function fg(t){var i=t.stateNode,r=t.type,l=t.memoizedProps;switch(i[bt]=t,i[Pt]=l,r){case"dialog":Ie("cancel",i),Ie("close",i);break;case"iframe":case"object":case"embed":Ie("load",i);break;case"video":case"audio":for(r=0;r<_l.length;r++)Ie(_l[r],i);break;case"source":Ie("error",i);break;case"img":case"image":case"link":Ie("error",i),Ie("load",i);break;case"details":Ie("toggle",i);break;case"input":Ie("invalid",i),xc(i,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0);break;case"select":Ie("invalid",i);break;case"textarea":Ie("invalid",i),bs(i,l.value,l.defaultValue,l.children)}r=l.children,typeof r!="string"&&typeof r!="number"&&typeof r!="bigint"||i.textContent===""+r||l.suppressHydrationWarning===!0||Cy(i.textContent,r)?(l.popover!=null&&(Ie("beforetoggle",i),Ie("toggle",i)),l.onScroll!=null&&Ie("scroll",i),l.onScrollEnd!=null&&Ie("scrollend",i),l.onClick!=null&&(i.onclick=Yn),i=!0):i=!1,i||Ds(t,!0)}function mg(t){for(qt=t.return;qt;)switch(qt.tag){case 5:case 31:case 13:kn=!1;return;case 27:case 3:kn=!0;return;default:qt=qt.return}}function Nr(t){if(t!==qt)return!1;if(!Oe)return mg(t),Oe=!0,!1;var i=t.tag,r;if((r=i!==3&&i!==27)&&((r=i===5)&&(r=t.type,r=!(r!=="form"&&r!=="button")||Uf(t.type,t.memoizedProps)),r=!r),r&&et&&Ds(t),mg(t),i===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(a(317));et=Uy(t)}else if(i===31){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(a(317));et=Uy(t)}else i===27?(i=et,Gs(t.type)?(t=Ff,Ff=null,et=t):et=i):et=qt?Vn(t.stateNode.nextSibling):null;return!0}function Ca(){et=qt=null,Oe=!1}function Td(){var t=Cs;return t!==null&&(fn===null?fn=t:fn.push.apply(fn,t),Cs=null),t}function $o(t){Cs===null?Cs=[t]:Cs.push(t)}var bd=O(null),Da=null,Hi=null;function js(t,i,r){ae(bd,i._currentValue),i._currentValue=r}function qi(t){t._currentValue=bd.current,J(bd)}function Sd(t,i,r){for(;t!==null;){var l=t.alternate;if((t.childLanes&i)!==i?(t.childLanes|=i,l!==null&&(l.childLanes|=i)):l!==null&&(l.childLanes&i)!==i&&(l.childLanes|=i),t===r)break;t=t.return}}function Ad(t,i,r,l){var d=t.child;for(d!==null&&(d.return=t);d!==null;){var m=d.dependencies;if(m!==null){var v=d.child;m=m.firstContext;e:for(;m!==null;){var S=m;m=d;for(var x=0;x<i.length;x++)if(S.context===i[x]){m.lanes|=r,S=m.alternate,S!==null&&(S.lanes|=r),Sd(m.return,r,t),l||(v=null);break e}m=S.next}}else if(d.tag===18){if(v=d.return,v===null)throw Error(a(341));v.lanes|=r,m=v.alternate,m!==null&&(m.lanes|=r),Sd(v,r,t),v=null}else v=d.child;if(v!==null)v.return=d;else for(v=d;v!==null;){if(v===t){v=null;break}if(d=v.sibling,d!==null){d.return=v.return,v=d;break}v=v.return}d=v}}function Rr(t,i,r,l){t=null;for(var d=i,m=!1;d!==null;){if(!m){if((d.flags&524288)!==0)m=!0;else if((d.flags&262144)!==0)break}if(d.tag===10){var v=d.alternate;if(v===null)throw Error(a(387));if(v=v.memoizedProps,v!==null){var S=d.type;En(d.pendingProps.value,v.value)||(t!==null?t.push(S):t=[S])}}else if(d===Me.current){if(v=d.alternate,v===null)throw Error(a(387));v.memoizedState.memoizedState!==d.memoizedState.memoizedState&&(t!==null?t.push(bl):t=[bl])}d=d.return}t!==null&&Ad(i,t,r,l),i.flags|=262144}function Wc(t){for(t=t.firstContext;t!==null;){if(!En(t.context._currentValue,t.memoizedValue))return!0;t=t.next}return!1}function ja(t){Da=t,Hi=null,t=t.dependencies,t!==null&&(t.firstContext=null)}function Ft(t){return pg(Da,t)}function Xc(t,i){return Da===null&&ja(t),pg(t,i)}function pg(t,i){var r=i._currentValue;if(i={context:i,memoizedValue:r,next:null},Hi===null){if(t===null)throw Error(a(308));Hi=i,t.dependencies={lanes:0,firstContext:i},t.flags|=524288}else Hi=Hi.next=i;return r}var u0=typeof AbortController<"u"?AbortController:function(){var t=[],i=this.signal={aborted:!1,addEventListener:function(r,l){t.push(l)}};this.abort=function(){i.aborted=!0,t.forEach(function(r){return r()})}},h0=s.unstable_scheduleCallback,d0=s.unstable_NormalPriority,wt={$$typeof:oe,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function wd(){return{controller:new u0,data:new Map,refCount:0}}function Wo(t){t.refCount--,t.refCount===0&&h0(d0,function(){t.controller.abort()})}var Xo=null,Nd=0,xr=0,Ir=null;function f0(t,i){if(Xo===null){var r=Xo=[];Nd=0,xr=Cf(),Ir={status:"pending",value:void 0,then:function(l){r.push(l)}}}return Nd++,i.then(gg,gg),i}function gg(){if(--Nd===0&&Xo!==null){Ir!==null&&(Ir.status="fulfilled");var t=Xo;Xo=null,xr=0,Ir=null;for(var i=0;i<t.length;i++)(0,t[i])()}}function m0(t,i){var r=[],l={status:"pending",value:null,reason:null,then:function(d){r.push(d)}};return t.then(function(){l.status="fulfilled",l.value=i;for(var d=0;d<r.length;d++)(0,r[d])(i)},function(d){for(l.status="rejected",l.reason=d,d=0;d<r.length;d++)(0,r[d])(void 0)}),l}var _g=$.S;$.S=function(t,i){ey=sn(),typeof i=="object"&&i!==null&&typeof i.then=="function"&&f0(t,i),_g!==null&&_g(t,i)};var Oa=O(null);function Rd(){var t=Oa.current;return t!==null?t:Je.pooledCache}function Jc(t,i){i===null?ae(Oa,Oa.current):ae(Oa,i.pool)}function yg(){var t=Rd();return t===null?null:{parent:wt._currentValue,pool:t}}var Cr=Error(a(460)),xd=Error(a(474)),Zc=Error(a(542)),eu={then:function(){}};function vg(t){return t=t.status,t==="fulfilled"||t==="rejected"}function Eg(t,i,r){switch(r=t[r],r===void 0?t.push(i):r!==i&&(i.then(Yn,Yn),i=r),i.status){case"fulfilled":return i.value;case"rejected":throw t=i.reason,bg(t),t;default:if(typeof i.status=="string")i.then(Yn,Yn);else{if(t=Je,t!==null&&100<t.shellSuspendCounter)throw Error(a(482));t=i,t.status="pending",t.then(function(l){if(i.status==="pending"){var d=i;d.status="fulfilled",d.value=l}},function(l){if(i.status==="pending"){var d=i;d.status="rejected",d.reason=l}})}switch(i.status){case"fulfilled":return i.value;case"rejected":throw t=i.reason,bg(t),t}throw Pa=i,Cr}}function Ma(t){try{var i=t._init;return i(t._payload)}catch(r){throw r!==null&&typeof r=="object"&&typeof r.then=="function"?(Pa=r,Cr):r}}var Pa=null;function Tg(){if(Pa===null)throw Error(a(459));var t=Pa;return Pa=null,t}function bg(t){if(t===Cr||t===Zc)throw Error(a(483))}var Dr=null,Jo=0;function tu(t){var i=Jo;return Jo+=1,Dr===null&&(Dr=[]),Eg(Dr,t,i)}function Zo(t,i){i=i.props.ref,t.ref=i!==void 0?i:null}function nu(t,i){throw i.$$typeof===N?Error(a(525)):(t=Object.prototype.toString.call(i),Error(a(31,t==="[object Object]"?"object with keys {"+Object.keys(i).join(", ")+"}":t)))}function Sg(t){function i(k,D){if(t){var z=k.deletions;z===null?(k.deletions=[D],k.flags|=16):z.push(D)}}function r(k,D){if(!t)return null;for(;D!==null;)i(k,D),D=D.sibling;return null}function l(k){for(var D=new Map;k!==null;)k.key!==null?D.set(k.key,k):D.set(k.index,k),k=k.sibling;return D}function d(k,D){return k=zi(k,D),k.index=0,k.sibling=null,k}function m(k,D,z){return k.index=z,t?(z=k.alternate,z!==null?(z=z.index,z<D?(k.flags|=67108866,D):z):(k.flags|=67108866,D)):(k.flags|=1048576,D)}function v(k){return t&&k.alternate===null&&(k.flags|=67108866),k}function S(k,D,z,W){return D===null||D.tag!==6?(D=gd(z,k.mode,W),D.return=k,D):(D=d(D,z),D.return=k,D)}function x(k,D,z,W){var me=z.type;return me===K?Q(k,D,z.props.children,W,z.key):D!==null&&(D.elementType===me||typeof me=="object"&&me!==null&&me.$$typeof===w&&Ma(me)===D.type)?(D=d(D,z.props),Zo(D,z),D.return=k,D):(D=Qc(z.type,z.key,z.props,null,k.mode,W),Zo(D,z),D.return=k,D)}function B(k,D,z,W){return D===null||D.tag!==4||D.stateNode.containerInfo!==z.containerInfo||D.stateNode.implementation!==z.implementation?(D=_d(z,k.mode,W),D.return=k,D):(D=d(D,z.children||[]),D.return=k,D)}function Q(k,D,z,W,me){return D===null||D.tag!==7?(D=Ia(z,k.mode,W,me),D.return=k,D):(D=d(D,z),D.return=k,D)}function X(k,D,z){if(typeof D=="string"&&D!==""||typeof D=="number"||typeof D=="bigint")return D=gd(""+D,k.mode,z),D.return=k,D;if(typeof D=="object"&&D!==null){switch(D.$$typeof){case P:return z=Qc(D.type,D.key,D.props,null,k.mode,z),Zo(z,D),z.return=k,z;case G:return D=_d(D,k.mode,z),D.return=k,D;case w:return D=Ma(D),X(k,D,z)}if(Ye(D)||L(D))return D=Ia(D,k.mode,z,null),D.return=k,D;if(typeof D.then=="function")return X(k,tu(D),z);if(D.$$typeof===oe)return X(k,Xc(k,D),z);nu(k,D)}return null}function H(k,D,z,W){var me=D!==null?D.key:null;if(typeof z=="string"&&z!==""||typeof z=="number"||typeof z=="bigint")return me!==null?null:S(k,D,""+z,W);if(typeof z=="object"&&z!==null){switch(z.$$typeof){case P:return z.key===me?x(k,D,z,W):null;case G:return z.key===me?B(k,D,z,W):null;case w:return z=Ma(z),H(k,D,z,W)}if(Ye(z)||L(z))return me!==null?null:Q(k,D,z,W,null);if(typeof z.then=="function")return H(k,D,tu(z),W);if(z.$$typeof===oe)return H(k,D,Xc(k,z),W);nu(k,z)}return null}function F(k,D,z,W,me){if(typeof W=="string"&&W!==""||typeof W=="number"||typeof W=="bigint")return k=k.get(z)||null,S(D,k,""+W,me);if(typeof W=="object"&&W!==null){switch(W.$$typeof){case P:return k=k.get(W.key===null?z:W.key)||null,x(D,k,W,me);case G:return k=k.get(W.key===null?z:W.key)||null,B(D,k,W,me);case w:return W=Ma(W),F(k,D,z,W,me)}if(Ye(W)||L(W))return k=k.get(z)||null,Q(D,k,W,me,null);if(typeof W.then=="function")return F(k,D,z,tu(W),me);if(W.$$typeof===oe)return F(k,D,z,Xc(D,W),me);nu(D,W)}return null}function ce(k,D,z,W){for(var me=null,Le=null,ue=D,we=D=0,De=null;ue!==null&&we<z.length;we++){ue.index>we?(De=ue,ue=null):De=ue.sibling;var Ve=H(k,ue,z[we],W);if(Ve===null){ue===null&&(ue=De);break}t&&ue&&Ve.alternate===null&&i(k,ue),D=m(Ve,D,we),Le===null?me=Ve:Le.sibling=Ve,Le=Ve,ue=De}if(we===z.length)return r(k,ue),Oe&&Bi(k,we),me;if(ue===null){for(;we<z.length;we++)ue=X(k,z[we],W),ue!==null&&(D=m(ue,D,we),Le===null?me=ue:Le.sibling=ue,Le=ue);return Oe&&Bi(k,we),me}for(ue=l(ue);we<z.length;we++)De=F(ue,k,we,z[we],W),De!==null&&(t&&De.alternate!==null&&ue.delete(De.key===null?we:De.key),D=m(De,D,we),Le===null?me=De:Le.sibling=De,Le=De);return t&&ue.forEach(function(Ws){return i(k,Ws)}),Oe&&Bi(k,we),me}function ye(k,D,z,W){if(z==null)throw Error(a(151));for(var me=null,Le=null,ue=D,we=D=0,De=null,Ve=z.next();ue!==null&&!Ve.done;we++,Ve=z.next()){ue.index>we?(De=ue,ue=null):De=ue.sibling;var Ws=H(k,ue,Ve.value,W);if(Ws===null){ue===null&&(ue=De);break}t&&ue&&Ws.alternate===null&&i(k,ue),D=m(Ws,D,we),Le===null?me=Ws:Le.sibling=Ws,Le=Ws,ue=De}if(Ve.done)return r(k,ue),Oe&&Bi(k,we),me;if(ue===null){for(;!Ve.done;we++,Ve=z.next())Ve=X(k,Ve.value,W),Ve!==null&&(D=m(Ve,D,we),Le===null?me=Ve:Le.sibling=Ve,Le=Ve);return Oe&&Bi(k,we),me}for(ue=l(ue);!Ve.done;we++,Ve=z.next())Ve=F(ue,k,we,Ve.value,W),Ve!==null&&(t&&Ve.alternate!==null&&ue.delete(Ve.key===null?we:Ve.key),D=m(Ve,D,we),Le===null?me=Ve:Le.sibling=Ve,Le=Ve);return t&&ue.forEach(function(wA){return i(k,wA)}),Oe&&Bi(k,we),me}function We(k,D,z,W){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 P:e:{for(var me=z.key;D!==null;){if(D.key===me){if(me=z.type,me===K){if(D.tag===7){r(k,D.sibling),W=d(D,z.props.children),W.return=k,k=W;break e}}else if(D.elementType===me||typeof me=="object"&&me!==null&&me.$$typeof===w&&Ma(me)===D.type){r(k,D.sibling),W=d(D,z.props),Zo(W,z),W.return=k,k=W;break e}r(k,D);break}else i(k,D);D=D.sibling}z.type===K?(W=Ia(z.props.children,k.mode,W,z.key),W.return=k,k=W):(W=Qc(z.type,z.key,z.props,null,k.mode,W),Zo(W,z),W.return=k,k=W)}return v(k);case G:e:{for(me=z.key;D!==null;){if(D.key===me)if(D.tag===4&&D.stateNode.containerInfo===z.containerInfo&&D.stateNode.implementation===z.implementation){r(k,D.sibling),W=d(D,z.children||[]),W.return=k,k=W;break e}else{r(k,D);break}else i(k,D);D=D.sibling}W=_d(z,k.mode,W),W.return=k,k=W}return v(k);case w:return z=Ma(z),We(k,D,z,W)}if(Ye(z))return ce(k,D,z,W);if(L(z)){if(me=L(z),typeof me!="function")throw Error(a(150));return z=me.call(z),ye(k,D,z,W)}if(typeof z.then=="function")return We(k,D,tu(z),W);if(z.$$typeof===oe)return We(k,D,Xc(k,z),W);nu(k,z)}return typeof z=="string"&&z!==""||typeof z=="number"||typeof z=="bigint"?(z=""+z,D!==null&&D.tag===6?(r(k,D.sibling),W=d(D,z),W.return=k,k=W):(r(k,D),W=gd(z,k.mode,W),W.return=k,k=W),v(k)):r(k,D)}return function(k,D,z,W){try{Jo=0;var me=We(k,D,z,W);return Dr=null,me}catch(ue){if(ue===Cr||ue===Zc)throw ue;var Le=Tn(29,ue,null,k.mode);return Le.lanes=W,Le.return=k,Le}}}var ka=Sg(!0),Ag=Sg(!1),Os=!1;function Id(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Cd(t,i){t=t.updateQueue,i.updateQueue===t&&(i.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,callbacks:null})}function Ms(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function Ps(t,i,r){var l=t.updateQueue;if(l===null)return null;if(l=l.shared,(ze&2)!==0){var d=l.pending;return d===null?i.next=i:(i.next=d.next,d.next=i),l.pending=i,i=Kc(t),og(t,null,r),i}return Yc(t,l,i,r),Kc(t)}function el(t,i,r){if(i=i.updateQueue,i!==null&&(i=i.shared,(r&4194048)!==0)){var l=i.lanes;l&=t.pendingLanes,r|=l,i.lanes=r,Ro(t,r)}}function Dd(t,i){var r=t.updateQueue,l=t.alternate;if(l!==null&&(l=l.updateQueue,r===l)){var d=null,m=null;if(r=r.firstBaseUpdate,r!==null){do{var v={lane:r.lane,tag:r.tag,payload:r.payload,callback:null,next:null};m===null?d=m=v:m=m.next=v,r=r.next}while(r!==null);m===null?d=m=i:m=m.next=i}else d=m=i;r={baseState:l.baseState,firstBaseUpdate:d,lastBaseUpdate:m,shared:l.shared,callbacks:l.callbacks},t.updateQueue=r;return}t=r.lastBaseUpdate,t===null?r.firstBaseUpdate=i:t.next=i,r.lastBaseUpdate=i}var jd=!1;function tl(){if(jd){var t=Ir;if(t!==null)throw t}}function nl(t,i,r,l){jd=!1;var d=t.updateQueue;Os=!1;var m=d.firstBaseUpdate,v=d.lastBaseUpdate,S=d.shared.pending;if(S!==null){d.shared.pending=null;var x=S,B=x.next;x.next=null,v===null?m=B:v.next=B,v=x;var Q=t.alternate;Q!==null&&(Q=Q.updateQueue,S=Q.lastBaseUpdate,S!==v&&(S===null?Q.firstBaseUpdate=B:S.next=B,Q.lastBaseUpdate=x))}if(m!==null){var X=d.baseState;v=0,Q=B=x=null,S=m;do{var H=S.lane&-536870913,F=H!==S.lane;if(F?(Ce&H)===H:(l&H)===H){H!==0&&H===xr&&(jd=!0),Q!==null&&(Q=Q.next={lane:0,tag:S.tag,payload:S.payload,callback:null,next:null});e:{var ce=t,ye=S;H=i;var We=r;switch(ye.tag){case 1:if(ce=ye.payload,typeof ce=="function"){X=ce.call(We,X,H);break e}X=ce;break e;case 3:ce.flags=ce.flags&-65537|128;case 0:if(ce=ye.payload,H=typeof ce=="function"?ce.call(We,X,H):ce,H==null)break e;X=b({},X,H);break e;case 2:Os=!0}}H=S.callback,H!==null&&(t.flags|=64,F&&(t.flags|=8192),F=d.callbacks,F===null?d.callbacks=[H]:F.push(H))}else F={lane:H,tag:S.tag,payload:S.payload,callback:S.callback,next:null},Q===null?(B=Q=F,x=X):Q=Q.next=F,v|=H;if(S=S.next,S===null){if(S=d.shared.pending,S===null)break;F=S,S=F.next,F.next=null,d.lastBaseUpdate=F,d.shared.pending=null}}while(!0);Q===null&&(x=X),d.baseState=x,d.firstBaseUpdate=B,d.lastBaseUpdate=Q,m===null&&(d.shared.lanes=0),zs|=v,t.lanes=v,t.memoizedState=X}}function wg(t,i){if(typeof t!="function")throw Error(a(191,t));t.call(i)}function Ng(t,i){var r=t.callbacks;if(r!==null)for(t.callbacks=null,t=0;t<r.length;t++)wg(r[t],i)}var jr=O(null),iu=O(0);function Rg(t,i){t=Ji,ae(iu,t),ae(jr,i),Ji=t|i.baseLanes}function Od(){ae(iu,Ji),ae(jr,jr.current)}function Md(){Ji=iu.current,J(jr),J(iu)}var bn=O(null),Ln=null;function ks(t){var i=t.alternate;ae(yt,yt.current&1),ae(bn,t),Ln===null&&(i===null||jr.current!==null||i.memoizedState!==null)&&(Ln=t)}function Pd(t){ae(yt,yt.current),ae(bn,t),Ln===null&&(Ln=t)}function xg(t){t.tag===22?(ae(yt,yt.current),ae(bn,t),Ln===null&&(Ln=t)):Ls()}function Ls(){ae(yt,yt.current),ae(bn,bn.current)}function Sn(t){J(bn),Ln===t&&(Ln=null),J(yt)}var yt=O(0);function su(t){for(var i=t;i!==null;){if(i.tag===13){var r=i.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||Hf(r)||qf(r)))return i}else if(i.tag===19&&(i.memoizedProps.revealOrder==="forwards"||i.memoizedProps.revealOrder==="backwards"||i.memoizedProps.revealOrder==="unstable_legacy-backwards"||i.memoizedProps.revealOrder==="together")){if((i.flags&128)!==0)return i}else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===t)break;for(;i.sibling===null;){if(i.return===null||i.return===t)return null;i=i.return}i.sibling.return=i.return,i=i.sibling}return null}var Fi=0,Se=null,Qe=null,Nt=null,au=!1,Or=!1,La=!1,ru=0,il=0,Mr=null,p0=0;function dt(){throw Error(a(321))}function kd(t,i){if(i===null)return!1;for(var r=0;r<i.length&&r<t.length;r++)if(!En(t[r],i[r]))return!1;return!0}function Ld(t,i,r,l,d,m){return Fi=m,Se=i,i.memoizedState=null,i.updateQueue=null,i.lanes=0,$.H=t===null||t.memoizedState===null?h_:Jd,La=!1,m=r(l,d),La=!1,Or&&(m=Cg(i,r,l,d)),Ig(t),m}function Ig(t){$.H=rl;var i=Qe!==null&&Qe.next!==null;if(Fi=0,Nt=Qe=Se=null,au=!1,il=0,Mr=null,i)throw Error(a(300));t===null||Rt||(t=t.dependencies,t!==null&&Wc(t)&&(Rt=!0))}function Cg(t,i,r,l){Se=t;var d=0;do{if(Or&&(Mr=null),il=0,Or=!1,25<=d)throw Error(a(301));if(d+=1,Nt=Qe=null,t.updateQueue!=null){var m=t.updateQueue;m.lastEffect=null,m.events=null,m.stores=null,m.memoCache!=null&&(m.memoCache.index=0)}$.H=d_,m=i(r,l)}while(Or);return m}function g0(){var t=$.H,i=t.useState()[0];return i=typeof i.then=="function"?sl(i):i,t=t.useState()[0],(Qe!==null?Qe.memoizedState:null)!==t&&(Se.flags|=1024),i}function Vd(){var t=ru!==0;return ru=0,t}function Ud(t,i,r){i.updateQueue=t.updateQueue,i.flags&=-2053,t.lanes&=~r}function zd(t){if(au){for(t=t.memoizedState;t!==null;){var i=t.queue;i!==null&&(i.pending=null),t=t.next}au=!1}Fi=0,Nt=Qe=Se=null,Or=!1,il=ru=0,Mr=null}function rn(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Nt===null?Se.memoizedState=Nt=t:Nt=Nt.next=t,Nt}function vt(){if(Qe===null){var t=Se.alternate;t=t!==null?t.memoizedState:null}else t=Qe.next;var i=Nt===null?Se.memoizedState:Nt.next;if(i!==null)Nt=i,Qe=t;else{if(t===null)throw Se.alternate===null?Error(a(467)):Error(a(310));Qe=t,t={memoizedState:Qe.memoizedState,baseState:Qe.baseState,baseQueue:Qe.baseQueue,queue:Qe.queue,next:null},Nt===null?Se.memoizedState=Nt=t:Nt=Nt.next=t}return Nt}function ou(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function sl(t){var i=il;return il+=1,Mr===null&&(Mr=[]),t=Eg(Mr,t,i),i=Se,(Nt===null?i.memoizedState:Nt.next)===null&&(i=i.alternate,$.H=i===null||i.memoizedState===null?h_:Jd),t}function lu(t){if(t!==null&&typeof t=="object"){if(typeof t.then=="function")return sl(t);if(t.$$typeof===oe)return Ft(t)}throw Error(a(438,String(t)))}function Bd(t){var i=null,r=Se.updateQueue;if(r!==null&&(i=r.memoCache),i==null){var l=Se.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(i={data:l.data.map(function(d){return d.slice()}),index:0})))}if(i==null&&(i={data:[],index:0}),r===null&&(r=ou(),Se.updateQueue=r),r.memoCache=i,r=i.data[i.index],r===void 0)for(r=i.data[i.index]=Array(t),l=0;l<t;l++)r[l]=M;return i.index++,r}function Gi(t,i){return typeof i=="function"?i(t):i}function cu(t){var i=vt();return Hd(i,Qe,t)}function Hd(t,i,r){var l=t.queue;if(l===null)throw Error(a(311));l.lastRenderedReducer=r;var d=t.baseQueue,m=l.pending;if(m!==null){if(d!==null){var v=d.next;d.next=m.next,m.next=v}i.baseQueue=d=m,l.pending=null}if(m=t.baseState,d===null)t.memoizedState=m;else{i=d.next;var S=v=null,x=null,B=i,Q=!1;do{var X=B.lane&-536870913;if(X!==B.lane?(Ce&X)===X:(Fi&X)===X){var H=B.revertLane;if(H===0)x!==null&&(x=x.next={lane:0,revertLane:0,gesture:null,action:B.action,hasEagerState:B.hasEagerState,eagerState:B.eagerState,next:null}),X===xr&&(Q=!0);else if((Fi&H)===H){B=B.next,H===xr&&(Q=!0);continue}else X={lane:0,revertLane:B.revertLane,gesture:null,action:B.action,hasEagerState:B.hasEagerState,eagerState:B.eagerState,next:null},x===null?(S=x=X,v=m):x=x.next=X,Se.lanes|=H,zs|=H;X=B.action,La&&r(m,X),m=B.hasEagerState?B.eagerState:r(m,X)}else H={lane:X,revertLane:B.revertLane,gesture:B.gesture,action:B.action,hasEagerState:B.hasEagerState,eagerState:B.eagerState,next:null},x===null?(S=x=H,v=m):x=x.next=H,Se.lanes|=X,zs|=X;B=B.next}while(B!==null&&B!==i);if(x===null?v=m:x.next=S,!En(m,t.memoizedState)&&(Rt=!0,Q&&(r=Ir,r!==null)))throw r;t.memoizedState=m,t.baseState=v,t.baseQueue=x,l.lastRenderedState=m}return d===null&&(l.lanes=0),[t.memoizedState,l.dispatch]}function qd(t){var i=vt(),r=i.queue;if(r===null)throw Error(a(311));r.lastRenderedReducer=t;var l=r.dispatch,d=r.pending,m=i.memoizedState;if(d!==null){r.pending=null;var v=d=d.next;do m=t(m,v.action),v=v.next;while(v!==d);En(m,i.memoizedState)||(Rt=!0),i.memoizedState=m,i.baseQueue===null&&(i.baseState=m),r.lastRenderedState=m}return[m,l]}function Dg(t,i,r){var l=Se,d=vt(),m=Oe;if(m){if(r===void 0)throw Error(a(407));r=r()}else r=i();var v=!En((Qe||d).memoizedState,r);if(v&&(d.memoizedState=r,Rt=!0),d=d.queue,Yd(Mg.bind(null,l,d,t),[t]),d.getSnapshot!==i||v||Nt!==null&&Nt.memoizedState.tag&1){if(l.flags|=2048,Pr(9,{destroy:void 0},Og.bind(null,l,d,r,i),null),Je===null)throw Error(a(349));m||(Fi&127)!==0||jg(l,i,r)}return r}function jg(t,i,r){t.flags|=16384,t={getSnapshot:i,value:r},i=Se.updateQueue,i===null?(i=ou(),Se.updateQueue=i,i.stores=[t]):(r=i.stores,r===null?i.stores=[t]:r.push(t))}function Og(t,i,r,l){i.value=r,i.getSnapshot=l,Pg(i)&&kg(t)}function Mg(t,i,r){return r(function(){Pg(i)&&kg(t)})}function Pg(t){var i=t.getSnapshot;t=t.value;try{var r=i();return!En(t,r)}catch{return!0}}function kg(t){var i=xa(t,2);i!==null&&mn(i,t,2)}function Fd(t){var i=rn();if(typeof t=="function"){var r=t;if(t=r(),La){Rn(!0);try{r()}finally{Rn(!1)}}}return i.memoizedState=i.baseState=t,i.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Gi,lastRenderedState:t},i}function Lg(t,i,r,l){return t.baseState=r,Hd(t,Qe,typeof l=="function"?l:Gi)}function _0(t,i,r,l,d){if(du(t))throw Error(a(485));if(t=i.action,t!==null){var m={payload:d,action:t,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(v){m.listeners.push(v)}};$.T!==null?r(!0):m.isTransition=!1,l(m),r=i.pending,r===null?(m.next=i.pending=m,Vg(i,m)):(m.next=r.next,i.pending=r.next=m)}}function Vg(t,i){var r=i.action,l=i.payload,d=t.state;if(i.isTransition){var m=$.T,v={};$.T=v;try{var S=r(d,l),x=$.S;x!==null&&x(v,S),Ug(t,i,S)}catch(B){Gd(t,i,B)}finally{m!==null&&v.types!==null&&(m.types=v.types),$.T=m}}else try{m=r(d,l),Ug(t,i,m)}catch(B){Gd(t,i,B)}}function Ug(t,i,r){r!==null&&typeof r=="object"&&typeof r.then=="function"?r.then(function(l){zg(t,i,l)},function(l){return Gd(t,i,l)}):zg(t,i,r)}function zg(t,i,r){i.status="fulfilled",i.value=r,Bg(i),t.state=r,i=t.pending,i!==null&&(r=i.next,r===i?t.pending=null:(r=r.next,i.next=r,Vg(t,r)))}function Gd(t,i,r){var l=t.pending;if(t.pending=null,l!==null){l=l.next;do i.status="rejected",i.reason=r,Bg(i),i=i.next;while(i!==l)}t.action=null}function Bg(t){t=t.listeners;for(var i=0;i<t.length;i++)(0,t[i])()}function Hg(t,i){return i}function qg(t,i){if(Oe){var r=Je.formState;if(r!==null){e:{var l=Se;if(Oe){if(et){t:{for(var d=et,m=kn;d.nodeType!==8;){if(!m){d=null;break t}if(d=Vn(d.nextSibling),d===null){d=null;break t}}m=d.data,d=m==="F!"||m==="F"?d:null}if(d){et=Vn(d.nextSibling),l=d.data==="F!";break e}}Ds(l)}l=!1}l&&(i=r[0])}}return r=rn(),r.memoizedState=r.baseState=i,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Hg,lastRenderedState:i},r.queue=l,r=l_.bind(null,Se,l),l.dispatch=r,l=Fd(!1),m=Xd.bind(null,Se,!1,l.queue),l=rn(),d={state:i,dispatch:null,action:t,pending:null},l.queue=d,r=_0.bind(null,Se,d,m,r),d.dispatch=r,l.memoizedState=t,[i,r,!1]}function Fg(t){var i=vt();return Gg(i,Qe,t)}function Gg(t,i,r){if(i=Hd(t,i,Hg)[0],t=cu(Gi)[0],typeof i=="object"&&i!==null&&typeof i.then=="function")try{var l=sl(i)}catch(v){throw v===Cr?Zc:v}else l=i;i=vt();var d=i.queue,m=d.dispatch;return r!==i.memoizedState&&(Se.flags|=2048,Pr(9,{destroy:void 0},y0.bind(null,d,r),null)),[l,m,t]}function y0(t,i){t.action=i}function Yg(t){var i=vt(),r=Qe;if(r!==null)return Gg(i,r,t);vt(),i=i.memoizedState,r=vt();var l=r.queue.dispatch;return r.memoizedState=t,[i,l,!1]}function Pr(t,i,r,l){return t={tag:t,create:r,deps:l,inst:i,next:null},i=Se.updateQueue,i===null&&(i=ou(),Se.updateQueue=i),r=i.lastEffect,r===null?i.lastEffect=t.next=t:(l=r.next,r.next=t,t.next=l,i.lastEffect=t),t}function Kg(){return vt().memoizedState}function uu(t,i,r,l){var d=rn();Se.flags|=t,d.memoizedState=Pr(1|i,{destroy:void 0},r,l===void 0?null:l)}function hu(t,i,r,l){var d=vt();l=l===void 0?null:l;var m=d.memoizedState.inst;Qe!==null&&l!==null&&kd(l,Qe.memoizedState.deps)?d.memoizedState=Pr(i,m,r,l):(Se.flags|=t,d.memoizedState=Pr(1|i,m,r,l))}function Qg(t,i){uu(8390656,8,t,i)}function Yd(t,i){hu(2048,8,t,i)}function v0(t){Se.flags|=4;var i=Se.updateQueue;if(i===null)i=ou(),Se.updateQueue=i,i.events=[t];else{var r=i.events;r===null?i.events=[t]:r.push(t)}}function $g(t){var i=vt().memoizedState;return v0({ref:i,nextImpl:t}),function(){if((ze&2)!==0)throw Error(a(440));return i.impl.apply(void 0,arguments)}}function Wg(t,i){return hu(4,2,t,i)}function Xg(t,i){return hu(4,4,t,i)}function Jg(t,i){if(typeof i=="function"){t=t();var r=i(t);return function(){typeof r=="function"?r():i(null)}}if(i!=null)return t=t(),i.current=t,function(){i.current=null}}function Zg(t,i,r){r=r!=null?r.concat([t]):null,hu(4,4,Jg.bind(null,i,t),r)}function Kd(){}function e_(t,i){var r=vt();i=i===void 0?null:i;var l=r.memoizedState;return i!==null&&kd(i,l[1])?l[0]:(r.memoizedState=[t,i],t)}function t_(t,i){var r=vt();i=i===void 0?null:i;var l=r.memoizedState;if(i!==null&&kd(i,l[1]))return l[0];if(l=t(),La){Rn(!0);try{t()}finally{Rn(!1)}}return r.memoizedState=[l,i],l}function Qd(t,i,r){return r===void 0||(Fi&1073741824)!==0&&(Ce&261930)===0?t.memoizedState=i:(t.memoizedState=r,t=ny(),Se.lanes|=t,zs|=t,r)}function n_(t,i,r,l){return En(r,i)?r:jr.current!==null?(t=Qd(t,r,l),En(t,i)||(Rt=!0),t):(Fi&42)===0||(Fi&1073741824)!==0&&(Ce&261930)===0?(Rt=!0,t.memoizedState=r):(t=ny(),Se.lanes|=t,zs|=t,i)}function i_(t,i,r,l,d){var m=se.p;se.p=m!==0&&8>m?m:8;var v=$.T,S={};$.T=S,Xd(t,!1,i,r);try{var x=d(),B=$.S;if(B!==null&&B(S,x),x!==null&&typeof x=="object"&&typeof x.then=="function"){var Q=m0(x,l);al(t,i,Q,Nn(t))}else al(t,i,l,Nn(t))}catch(X){al(t,i,{then:function(){},status:"rejected",reason:X},Nn())}finally{se.p=m,v!==null&&S.types!==null&&(v.types=S.types),$.T=v}}function E0(){}function $d(t,i,r,l){if(t.tag!==5)throw Error(a(476));var d=s_(t).queue;i_(t,d,i,ge,r===null?E0:function(){return a_(t),r(l)})}function s_(t){var i=t.memoizedState;if(i!==null)return i;i={memoizedState:ge,baseState:ge,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Gi,lastRenderedState:ge},next:null};var r={};return i.next={memoizedState:r,baseState:r,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Gi,lastRenderedState:r},next:null},t.memoizedState=i,t=t.alternate,t!==null&&(t.memoizedState=i),i}function a_(t){var i=s_(t);i.next===null&&(i=t.alternate.memoizedState),al(t,i.next.queue,{},Nn())}function Wd(){return Ft(bl)}function r_(){return vt().memoizedState}function o_(){return vt().memoizedState}function T0(t){for(var i=t.return;i!==null;){switch(i.tag){case 24:case 3:var r=Nn();t=Ms(r);var l=Ps(i,t,r);l!==null&&(mn(l,i,r),el(l,i,r)),i={cache:wd()},t.payload=i;return}i=i.return}}function b0(t,i,r){var l=Nn();r={lane:l,revertLane:0,gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},du(t)?c_(i,r):(r=md(t,i,r,l),r!==null&&(mn(r,t,l),u_(r,i,l)))}function l_(t,i,r){var l=Nn();al(t,i,r,l)}function al(t,i,r,l){var d={lane:l,revertLane:0,gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null};if(du(t))c_(i,d);else{var m=t.alternate;if(t.lanes===0&&(m===null||m.lanes===0)&&(m=i.lastRenderedReducer,m!==null))try{var v=i.lastRenderedState,S=m(v,r);if(d.hasEagerState=!0,d.eagerState=S,En(S,v))return Yc(t,i,d,0),Je===null&&Gc(),!1}catch{}if(r=md(t,i,d,l),r!==null)return mn(r,t,l),u_(r,i,l),!0}return!1}function Xd(t,i,r,l){if(l={lane:2,revertLane:Cf(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},du(t)){if(i)throw Error(a(479))}else i=md(t,r,l,2),i!==null&&mn(i,t,2)}function du(t){var i=t.alternate;return t===Se||i!==null&&i===Se}function c_(t,i){Or=au=!0;var r=t.pending;r===null?i.next=i:(i.next=r.next,r.next=i),t.pending=i}function u_(t,i,r){if((r&4194048)!==0){var l=i.lanes;l&=t.pendingLanes,r|=l,i.lanes=r,Ro(t,r)}}var rl={readContext:Ft,use:lu,useCallback:dt,useContext:dt,useEffect:dt,useImperativeHandle:dt,useLayoutEffect:dt,useInsertionEffect:dt,useMemo:dt,useReducer:dt,useRef:dt,useState:dt,useDebugValue:dt,useDeferredValue:dt,useTransition:dt,useSyncExternalStore:dt,useId:dt,useHostTransitionStatus:dt,useFormState:dt,useActionState:dt,useOptimistic:dt,useMemoCache:dt,useCacheRefresh:dt};rl.useEffectEvent=dt;var h_={readContext:Ft,use:lu,useCallback:function(t,i){return rn().memoizedState=[t,i===void 0?null:i],t},useContext:Ft,useEffect:Qg,useImperativeHandle:function(t,i,r){r=r!=null?r.concat([t]):null,uu(4194308,4,Jg.bind(null,i,t),r)},useLayoutEffect:function(t,i){return uu(4194308,4,t,i)},useInsertionEffect:function(t,i){uu(4,2,t,i)},useMemo:function(t,i){var r=rn();i=i===void 0?null:i;var l=t();if(La){Rn(!0);try{t()}finally{Rn(!1)}}return r.memoizedState=[l,i],l},useReducer:function(t,i,r){var l=rn();if(r!==void 0){var d=r(i);if(La){Rn(!0);try{r(i)}finally{Rn(!1)}}}else d=i;return l.memoizedState=l.baseState=d,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:d},l.queue=t,t=t.dispatch=b0.bind(null,Se,t),[l.memoizedState,t]},useRef:function(t){var i=rn();return t={current:t},i.memoizedState=t},useState:function(t){t=Fd(t);var i=t.queue,r=l_.bind(null,Se,i);return i.dispatch=r,[t.memoizedState,r]},useDebugValue:Kd,useDeferredValue:function(t,i){var r=rn();return Qd(r,t,i)},useTransition:function(){var t=Fd(!1);return t=i_.bind(null,Se,t.queue,!0,!1),rn().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,i,r){var l=Se,d=rn();if(Oe){if(r===void 0)throw Error(a(407));r=r()}else{if(r=i(),Je===null)throw Error(a(349));(Ce&127)!==0||jg(l,i,r)}d.memoizedState=r;var m={value:r,getSnapshot:i};return d.queue=m,Qg(Mg.bind(null,l,m,t),[t]),l.flags|=2048,Pr(9,{destroy:void 0},Og.bind(null,l,m,r,i),null),r},useId:function(){var t=rn(),i=Je.identifierPrefix;if(Oe){var r=Ai,l=Si;r=(l&~(1<<32-gt(l)-1)).toString(32)+r,i="_"+i+"R_"+r,r=ru++,0<r&&(i+="H"+r.toString(32)),i+="_"}else r=p0++,i="_"+i+"r_"+r.toString(32)+"_";return t.memoizedState=i},useHostTransitionStatus:Wd,useFormState:qg,useActionState:qg,useOptimistic:function(t){var i=rn();i.memoizedState=i.baseState=t;var r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return i.queue=r,i=Xd.bind(null,Se,!0,r),r.dispatch=i,[t,i]},useMemoCache:Bd,useCacheRefresh:function(){return rn().memoizedState=T0.bind(null,Se)},useEffectEvent:function(t){var i=rn(),r={impl:t};return i.memoizedState=r,function(){if((ze&2)!==0)throw Error(a(440));return r.impl.apply(void 0,arguments)}}},Jd={readContext:Ft,use:lu,useCallback:e_,useContext:Ft,useEffect:Yd,useImperativeHandle:Zg,useInsertionEffect:Wg,useLayoutEffect:Xg,useMemo:t_,useReducer:cu,useRef:Kg,useState:function(){return cu(Gi)},useDebugValue:Kd,useDeferredValue:function(t,i){var r=vt();return n_(r,Qe.memoizedState,t,i)},useTransition:function(){var t=cu(Gi)[0],i=vt().memoizedState;return[typeof t=="boolean"?t:sl(t),i]},useSyncExternalStore:Dg,useId:r_,useHostTransitionStatus:Wd,useFormState:Fg,useActionState:Fg,useOptimistic:function(t,i){var r=vt();return Lg(r,Qe,t,i)},useMemoCache:Bd,useCacheRefresh:o_};Jd.useEffectEvent=$g;var d_={readContext:Ft,use:lu,useCallback:e_,useContext:Ft,useEffect:Yd,useImperativeHandle:Zg,useInsertionEffect:Wg,useLayoutEffect:Xg,useMemo:t_,useReducer:qd,useRef:Kg,useState:function(){return qd(Gi)},useDebugValue:Kd,useDeferredValue:function(t,i){var r=vt();return Qe===null?Qd(r,t,i):n_(r,Qe.memoizedState,t,i)},useTransition:function(){var t=qd(Gi)[0],i=vt().memoizedState;return[typeof t=="boolean"?t:sl(t),i]},useSyncExternalStore:Dg,useId:r_,useHostTransitionStatus:Wd,useFormState:Yg,useActionState:Yg,useOptimistic:function(t,i){var r=vt();return Qe!==null?Lg(r,Qe,t,i):(r.baseState=t,[t,r.queue.dispatch])},useMemoCache:Bd,useCacheRefresh:o_};d_.useEffectEvent=$g;function Zd(t,i,r,l){i=t.memoizedState,r=r(l,i),r=r==null?i:b({},i,r),t.memoizedState=r,t.lanes===0&&(t.updateQueue.baseState=r)}var ef={enqueueSetState:function(t,i,r){t=t._reactInternals;var l=Nn(),d=Ms(l);d.payload=i,r!=null&&(d.callback=r),i=Ps(t,d,l),i!==null&&(mn(i,t,l),el(i,t,l))},enqueueReplaceState:function(t,i,r){t=t._reactInternals;var l=Nn(),d=Ms(l);d.tag=1,d.payload=i,r!=null&&(d.callback=r),i=Ps(t,d,l),i!==null&&(mn(i,t,l),el(i,t,l))},enqueueForceUpdate:function(t,i){t=t._reactInternals;var r=Nn(),l=Ms(r);l.tag=2,i!=null&&(l.callback=i),i=Ps(t,l,r),i!==null&&(mn(i,t,r),el(i,t,r))}};function f_(t,i,r,l,d,m,v){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(l,m,v):i.prototype&&i.prototype.isPureReactComponent?!Yo(r,l)||!Yo(d,m):!0}function m_(t,i,r,l){t=i.state,typeof i.componentWillReceiveProps=="function"&&i.componentWillReceiveProps(r,l),typeof i.UNSAFE_componentWillReceiveProps=="function"&&i.UNSAFE_componentWillReceiveProps(r,l),i.state!==t&&ef.enqueueReplaceState(i,i.state,null)}function Va(t,i){var r=i;if("ref"in i){r={};for(var l in i)l!=="ref"&&(r[l]=i[l])}if(t=t.defaultProps){r===i&&(r=b({},r));for(var d in t)r[d]===void 0&&(r[d]=t[d])}return r}function p_(t){Fc(t)}function g_(t){console.error(t)}function __(t){Fc(t)}function fu(t,i){try{var r=t.onUncaughtError;r(i.value,{componentStack:i.stack})}catch(l){setTimeout(function(){throw l})}}function y_(t,i,r){try{var l=t.onCaughtError;l(r.value,{componentStack:r.stack,errorBoundary:i.tag===1?i.stateNode:null})}catch(d){setTimeout(function(){throw d})}}function tf(t,i,r){return r=Ms(r),r.tag=3,r.payload={element:null},r.callback=function(){fu(t,i)},r}function v_(t){return t=Ms(t),t.tag=3,t}function E_(t,i,r,l){var d=r.type.getDerivedStateFromError;if(typeof d=="function"){var m=l.value;t.payload=function(){return d(m)},t.callback=function(){y_(i,r,l)}}var v=r.stateNode;v!==null&&typeof v.componentDidCatch=="function"&&(t.callback=function(){y_(i,r,l),typeof d!="function"&&(Bs===null?Bs=new Set([this]):Bs.add(this));var S=l.stack;this.componentDidCatch(l.value,{componentStack:S!==null?S:""})})}function S0(t,i,r,l,d){if(r.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(i=r.alternate,i!==null&&Rr(i,r,d,!0),r=bn.current,r!==null){switch(r.tag){case 31:case 13:return Ln===null?wu():r.alternate===null&&ft===0&&(ft=3),r.flags&=-257,r.flags|=65536,r.lanes=d,l===eu?r.flags|=16384:(i=r.updateQueue,i===null?r.updateQueue=new Set([l]):i.add(l),Rf(t,l,d)),!1;case 22:return r.flags|=65536,l===eu?r.flags|=16384:(i=r.updateQueue,i===null?(i={transitions:null,markerInstances:null,retryQueue:new Set([l])},r.updateQueue=i):(r=i.retryQueue,r===null?i.retryQueue=new Set([l]):r.add(l)),Rf(t,l,d)),!1}throw Error(a(435,r.tag))}return Rf(t,l,d),wu(),!1}if(Oe)return i=bn.current,i!==null?((i.flags&65536)===0&&(i.flags|=256),i.flags|=65536,i.lanes=d,l!==Ed&&(t=Error(a(422),{cause:l}),$o(On(t,r)))):(l!==Ed&&(i=Error(a(423),{cause:l}),$o(On(i,r))),t=t.current.alternate,t.flags|=65536,d&=-d,t.lanes|=d,l=On(l,r),d=tf(t.stateNode,l,d),Dd(t,d),ft!==4&&(ft=2)),!1;var m=Error(a(520),{cause:l});if(m=On(m,r),ml===null?ml=[m]:ml.push(m),ft!==4&&(ft=2),i===null)return!0;l=On(l,r),r=i;do{switch(r.tag){case 3:return r.flags|=65536,t=d&-d,r.lanes|=t,t=tf(r.stateNode,l,t),Dd(r,t),!1;case 1:if(i=r.type,m=r.stateNode,(r.flags&128)===0&&(typeof i.getDerivedStateFromError=="function"||m!==null&&typeof m.componentDidCatch=="function"&&(Bs===null||!Bs.has(m))))return r.flags|=65536,d&=-d,r.lanes|=d,d=v_(d),E_(d,t,r,l),Dd(r,d),!1}r=r.return}while(r!==null);return!1}var nf=Error(a(461)),Rt=!1;function Gt(t,i,r,l){i.child=t===null?Ag(i,null,r,l):ka(i,t.child,r,l)}function T_(t,i,r,l,d){r=r.render;var m=i.ref;if("ref"in l){var v={};for(var S in l)S!=="ref"&&(v[S]=l[S])}else v=l;return ja(i),l=Ld(t,i,r,v,m,d),S=Vd(),t!==null&&!Rt?(Ud(t,i,d),Yi(t,i,d)):(Oe&&S&&yd(i),i.flags|=1,Gt(t,i,l,d),i.child)}function b_(t,i,r,l,d){if(t===null){var m=r.type;return typeof m=="function"&&!pd(m)&&m.defaultProps===void 0&&r.compare===null?(i.tag=15,i.type=m,S_(t,i,m,l,d)):(t=Qc(r.type,null,l,i,i.mode,d),t.ref=i.ref,t.return=i,i.child=t)}if(m=t.child,!hf(t,d)){var v=m.memoizedProps;if(r=r.compare,r=r!==null?r:Yo,r(v,l)&&t.ref===i.ref)return Yi(t,i,d)}return i.flags|=1,t=zi(m,l),t.ref=i.ref,t.return=i,i.child=t}function S_(t,i,r,l,d){if(t!==null){var m=t.memoizedProps;if(Yo(m,l)&&t.ref===i.ref)if(Rt=!1,i.pendingProps=l=m,hf(t,d))(t.flags&131072)!==0&&(Rt=!0);else return i.lanes=t.lanes,Yi(t,i,d)}return sf(t,i,r,l,d)}function A_(t,i,r,l){var d=l.children,m=t!==null?t.memoizedState:null;if(t===null&&i.stateNode===null&&(i.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.mode==="hidden"){if((i.flags&128)!==0){if(m=m!==null?m.baseLanes|r:r,t!==null){for(l=i.child=t.child,d=0;l!==null;)d=d|l.lanes|l.childLanes,l=l.sibling;l=d&~m}else l=0,i.child=null;return w_(t,i,m,r,l)}if((r&536870912)!==0)i.memoizedState={baseLanes:0,cachePool:null},t!==null&&Jc(i,m!==null?m.cachePool:null),m!==null?Rg(i,m):Od(),xg(i);else return l=i.lanes=536870912,w_(t,i,m!==null?m.baseLanes|r:r,r,l)}else m!==null?(Jc(i,m.cachePool),Rg(i,m),Ls(),i.memoizedState=null):(t!==null&&Jc(i,null),Od(),Ls());return Gt(t,i,d,r),i.child}function ol(t,i){return t!==null&&t.tag===22||i.stateNode!==null||(i.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),i.sibling}function w_(t,i,r,l,d){var m=Rd();return m=m===null?null:{parent:wt._currentValue,pool:m},i.memoizedState={baseLanes:r,cachePool:m},t!==null&&Jc(i,null),Od(),xg(i),t!==null&&Rr(t,i,l,!0),i.childLanes=d,null}function mu(t,i){return i=gu({mode:i.mode,children:i.children},t.mode),i.ref=t.ref,t.child=i,i.return=t,i}function N_(t,i,r){return ka(i,t.child,null,r),t=mu(i,i.pendingProps),t.flags|=2,Sn(i),i.memoizedState=null,t}function A0(t,i,r){var l=i.pendingProps,d=(i.flags&128)!==0;if(i.flags&=-129,t===null){if(Oe){if(l.mode==="hidden")return t=mu(i,l),i.lanes=536870912,ol(null,t);if(Pd(i),(t=et)?(t=Vy(t,kn),t=t!==null&&t.data==="&"?t:null,t!==null&&(i.memoizedState={dehydrated:t,treeContext:Is!==null?{id:Si,overflow:Ai}:null,retryLane:536870912,hydrationErrors:null},r=cg(t),r.return=i,i.child=r,qt=i,et=null)):t=null,t===null)throw Ds(i);return i.lanes=536870912,null}return mu(i,l)}var m=t.memoizedState;if(m!==null){var v=m.dehydrated;if(Pd(i),d)if(i.flags&256)i.flags&=-257,i=N_(t,i,r);else if(i.memoizedState!==null)i.child=t.child,i.flags|=128,i=null;else throw Error(a(558));else if(Rt||Rr(t,i,r,!1),d=(r&t.childLanes)!==0,Rt||d){if(l=Je,l!==null&&(v=xo(l,r),v!==0&&v!==m.retryLane))throw m.retryLane=v,xa(t,v),mn(l,t,v),nf;wu(),i=N_(t,i,r)}else t=m.treeContext,et=Vn(v.nextSibling),qt=i,Oe=!0,Cs=null,kn=!1,t!==null&&dg(i,t),i=mu(i,l),i.flags|=4096;return i}return t=zi(t.child,{mode:l.mode,children:l.children}),t.ref=i.ref,i.child=t,t.return=i,t}function pu(t,i){var r=i.ref;if(r===null)t!==null&&t.ref!==null&&(i.flags|=4194816);else{if(typeof r!="function"&&typeof r!="object")throw Error(a(284));(t===null||t.ref!==r)&&(i.flags|=4194816)}}function sf(t,i,r,l,d){return ja(i),r=Ld(t,i,r,l,void 0,d),l=Vd(),t!==null&&!Rt?(Ud(t,i,d),Yi(t,i,d)):(Oe&&l&&yd(i),i.flags|=1,Gt(t,i,r,d),i.child)}function R_(t,i,r,l,d,m){return ja(i),i.updateQueue=null,r=Cg(i,l,r,d),Ig(t),l=Vd(),t!==null&&!Rt?(Ud(t,i,m),Yi(t,i,m)):(Oe&&l&&yd(i),i.flags|=1,Gt(t,i,r,m),i.child)}function x_(t,i,r,l,d){if(ja(i),i.stateNode===null){var m=Sr,v=r.contextType;typeof v=="object"&&v!==null&&(m=Ft(v)),m=new r(l,m),i.memoizedState=m.state!==null&&m.state!==void 0?m.state:null,m.updater=ef,i.stateNode=m,m._reactInternals=i,m=i.stateNode,m.props=l,m.state=i.memoizedState,m.refs={},Id(i),v=r.contextType,m.context=typeof v=="object"&&v!==null?Ft(v):Sr,m.state=i.memoizedState,v=r.getDerivedStateFromProps,typeof v=="function"&&(Zd(i,r,v,l),m.state=i.memoizedState),typeof r.getDerivedStateFromProps=="function"||typeof m.getSnapshotBeforeUpdate=="function"||typeof m.UNSAFE_componentWillMount!="function"&&typeof m.componentWillMount!="function"||(v=m.state,typeof m.componentWillMount=="function"&&m.componentWillMount(),typeof m.UNSAFE_componentWillMount=="function"&&m.UNSAFE_componentWillMount(),v!==m.state&&ef.enqueueReplaceState(m,m.state,null),nl(i,l,m,d),tl(),m.state=i.memoizedState),typeof m.componentDidMount=="function"&&(i.flags|=4194308),l=!0}else if(t===null){m=i.stateNode;var S=i.memoizedProps,x=Va(r,S);m.props=x;var B=m.context,Q=r.contextType;v=Sr,typeof Q=="object"&&Q!==null&&(v=Ft(Q));var X=r.getDerivedStateFromProps;Q=typeof X=="function"||typeof m.getSnapshotBeforeUpdate=="function",S=i.pendingProps!==S,Q||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(S||B!==v)&&m_(i,m,l,v),Os=!1;var H=i.memoizedState;m.state=H,nl(i,l,m,d),tl(),B=i.memoizedState,S||H!==B||Os?(typeof X=="function"&&(Zd(i,r,X,l),B=i.memoizedState),(x=Os||f_(i,r,x,l,H,B,v))?(Q||typeof m.UNSAFE_componentWillMount!="function"&&typeof m.componentWillMount!="function"||(typeof m.componentWillMount=="function"&&m.componentWillMount(),typeof m.UNSAFE_componentWillMount=="function"&&m.UNSAFE_componentWillMount()),typeof m.componentDidMount=="function"&&(i.flags|=4194308)):(typeof m.componentDidMount=="function"&&(i.flags|=4194308),i.memoizedProps=l,i.memoizedState=B),m.props=l,m.state=B,m.context=v,l=x):(typeof m.componentDidMount=="function"&&(i.flags|=4194308),l=!1)}else{m=i.stateNode,Cd(t,i),v=i.memoizedProps,Q=Va(r,v),m.props=Q,X=i.pendingProps,H=m.context,B=r.contextType,x=Sr,typeof B=="object"&&B!==null&&(x=Ft(B)),S=r.getDerivedStateFromProps,(B=typeof S=="function"||typeof m.getSnapshotBeforeUpdate=="function")||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(v!==X||H!==x)&&m_(i,m,l,x),Os=!1,H=i.memoizedState,m.state=H,nl(i,l,m,d),tl();var F=i.memoizedState;v!==X||H!==F||Os||t!==null&&t.dependencies!==null&&Wc(t.dependencies)?(typeof S=="function"&&(Zd(i,r,S,l),F=i.memoizedState),(Q=Os||f_(i,r,Q,l,H,F,x)||t!==null&&t.dependencies!==null&&Wc(t.dependencies))?(B||typeof m.UNSAFE_componentWillUpdate!="function"&&typeof m.componentWillUpdate!="function"||(typeof m.componentWillUpdate=="function"&&m.componentWillUpdate(l,F,x),typeof m.UNSAFE_componentWillUpdate=="function"&&m.UNSAFE_componentWillUpdate(l,F,x)),typeof m.componentDidUpdate=="function"&&(i.flags|=4),typeof m.getSnapshotBeforeUpdate=="function"&&(i.flags|=1024)):(typeof m.componentDidUpdate!="function"||v===t.memoizedProps&&H===t.memoizedState||(i.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||v===t.memoizedProps&&H===t.memoizedState||(i.flags|=1024),i.memoizedProps=l,i.memoizedState=F),m.props=l,m.state=F,m.context=x,l=Q):(typeof m.componentDidUpdate!="function"||v===t.memoizedProps&&H===t.memoizedState||(i.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||v===t.memoizedProps&&H===t.memoizedState||(i.flags|=1024),l=!1)}return m=l,pu(t,i),l=(i.flags&128)!==0,m||l?(m=i.stateNode,r=l&&typeof r.getDerivedStateFromError!="function"?null:m.render(),i.flags|=1,t!==null&&l?(i.child=ka(i,t.child,null,d),i.child=ka(i,null,r,d)):Gt(t,i,r,d),i.memoizedState=m.state,t=i.child):t=Yi(t,i,d),t}function I_(t,i,r,l){return Ca(),i.flags|=256,Gt(t,i,r,l),i.child}var af={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function rf(t){return{baseLanes:t,cachePool:yg()}}function of(t,i,r){return t=t!==null?t.childLanes&~r:0,i&&(t|=wn),t}function C_(t,i,r){var l=i.pendingProps,d=!1,m=(i.flags&128)!==0,v;if((v=m)||(v=t!==null&&t.memoizedState===null?!1:(yt.current&2)!==0),v&&(d=!0,i.flags&=-129),v=(i.flags&32)!==0,i.flags&=-33,t===null){if(Oe){if(d?ks(i):Ls(),(t=et)?(t=Vy(t,kn),t=t!==null&&t.data!=="&"?t:null,t!==null&&(i.memoizedState={dehydrated:t,treeContext:Is!==null?{id:Si,overflow:Ai}:null,retryLane:536870912,hydrationErrors:null},r=cg(t),r.return=i,i.child=r,qt=i,et=null)):t=null,t===null)throw Ds(i);return qf(t)?i.lanes=32:i.lanes=536870912,null}var S=l.children;return l=l.fallback,d?(Ls(),d=i.mode,S=gu({mode:"hidden",children:S},d),l=Ia(l,d,r,null),S.return=i,l.return=i,S.sibling=l,i.child=S,l=i.child,l.memoizedState=rf(r),l.childLanes=of(t,v,r),i.memoizedState=af,ol(null,l)):(ks(i),lf(i,S))}var x=t.memoizedState;if(x!==null&&(S=x.dehydrated,S!==null)){if(m)i.flags&256?(ks(i),i.flags&=-257,i=cf(t,i,r)):i.memoizedState!==null?(Ls(),i.child=t.child,i.flags|=128,i=null):(Ls(),S=l.fallback,d=i.mode,l=gu({mode:"visible",children:l.children},d),S=Ia(S,d,r,null),S.flags|=2,l.return=i,S.return=i,l.sibling=S,i.child=l,ka(i,t.child,null,r),l=i.child,l.memoizedState=rf(r),l.childLanes=of(t,v,r),i.memoizedState=af,i=ol(null,l));else if(ks(i),qf(S)){if(v=S.nextSibling&&S.nextSibling.dataset,v)var B=v.dgst;v=B,l=Error(a(419)),l.stack="",l.digest=v,$o({value:l,source:null,stack:null}),i=cf(t,i,r)}else if(Rt||Rr(t,i,r,!1),v=(r&t.childLanes)!==0,Rt||v){if(v=Je,v!==null&&(l=xo(v,r),l!==0&&l!==x.retryLane))throw x.retryLane=l,xa(t,l),mn(v,t,l),nf;Hf(S)||wu(),i=cf(t,i,r)}else Hf(S)?(i.flags|=192,i.child=t.child,i=null):(t=x.treeContext,et=Vn(S.nextSibling),qt=i,Oe=!0,Cs=null,kn=!1,t!==null&&dg(i,t),i=lf(i,l.children),i.flags|=4096);return i}return d?(Ls(),S=l.fallback,d=i.mode,x=t.child,B=x.sibling,l=zi(x,{mode:"hidden",children:l.children}),l.subtreeFlags=x.subtreeFlags&65011712,B!==null?S=zi(B,S):(S=Ia(S,d,r,null),S.flags|=2),S.return=i,l.return=i,l.sibling=S,i.child=l,ol(null,l),l=i.child,S=t.child.memoizedState,S===null?S=rf(r):(d=S.cachePool,d!==null?(x=wt._currentValue,d=d.parent!==x?{parent:x,pool:x}:d):d=yg(),S={baseLanes:S.baseLanes|r,cachePool:d}),l.memoizedState=S,l.childLanes=of(t,v,r),i.memoizedState=af,ol(t.child,l)):(ks(i),r=t.child,t=r.sibling,r=zi(r,{mode:"visible",children:l.children}),r.return=i,r.sibling=null,t!==null&&(v=i.deletions,v===null?(i.deletions=[t],i.flags|=16):v.push(t)),i.child=r,i.memoizedState=null,r)}function lf(t,i){return i=gu({mode:"visible",children:i},t.mode),i.return=t,t.child=i}function gu(t,i){return t=Tn(22,t,null,i),t.lanes=0,t}function cf(t,i,r){return ka(i,t.child,null,r),t=lf(i,i.pendingProps.children),t.flags|=2,i.memoizedState=null,t}function D_(t,i,r){t.lanes|=i;var l=t.alternate;l!==null&&(l.lanes|=i),Sd(t.return,i,r)}function uf(t,i,r,l,d,m){var v=t.memoizedState;v===null?t.memoizedState={isBackwards:i,rendering:null,renderingStartTime:0,last:l,tail:r,tailMode:d,treeForkCount:m}:(v.isBackwards=i,v.rendering=null,v.renderingStartTime=0,v.last=l,v.tail=r,v.tailMode=d,v.treeForkCount=m)}function j_(t,i,r){var l=i.pendingProps,d=l.revealOrder,m=l.tail;l=l.children;var v=yt.current,S=(v&2)!==0;if(S?(v=v&1|2,i.flags|=128):v&=1,ae(yt,v),Gt(t,i,l,r),l=Oe?Qo:0,!S&&t!==null&&(t.flags&128)!==0)e:for(t=i.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&D_(t,r,i);else if(t.tag===19)D_(t,r,i);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===i)break e;for(;t.sibling===null;){if(t.return===null||t.return===i)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}switch(d){case"forwards":for(r=i.child,d=null;r!==null;)t=r.alternate,t!==null&&su(t)===null&&(d=r),r=r.sibling;r=d,r===null?(d=i.child,i.child=null):(d=r.sibling,r.sibling=null),uf(i,!1,d,r,m,l);break;case"backwards":case"unstable_legacy-backwards":for(r=null,d=i.child,i.child=null;d!==null;){if(t=d.alternate,t!==null&&su(t)===null){i.child=d;break}t=d.sibling,d.sibling=r,r=d,d=t}uf(i,!0,r,null,m,l);break;case"together":uf(i,!1,null,null,void 0,l);break;default:i.memoizedState=null}return i.child}function Yi(t,i,r){if(t!==null&&(i.dependencies=t.dependencies),zs|=i.lanes,(r&i.childLanes)===0)if(t!==null){if(Rr(t,i,r,!1),(r&i.childLanes)===0)return null}else return null;if(t!==null&&i.child!==t.child)throw Error(a(153));if(i.child!==null){for(t=i.child,r=zi(t,t.pendingProps),i.child=r,r.return=i;t.sibling!==null;)t=t.sibling,r=r.sibling=zi(t,t.pendingProps),r.return=i;r.sibling=null}return i.child}function hf(t,i){return(t.lanes&i)!==0?!0:(t=t.dependencies,!!(t!==null&&Wc(t)))}function w0(t,i,r){switch(i.tag){case 3:jt(i,i.stateNode.containerInfo),js(i,wt,t.memoizedState.cache),Ca();break;case 27:case 5:ua(i);break;case 4:jt(i,i.stateNode.containerInfo);break;case 10:js(i,i.type,i.memoizedProps.value);break;case 31:if(i.memoizedState!==null)return i.flags|=128,Pd(i),null;break;case 13:var l=i.memoizedState;if(l!==null)return l.dehydrated!==null?(ks(i),i.flags|=128,null):(r&i.child.childLanes)!==0?C_(t,i,r):(ks(i),t=Yi(t,i,r),t!==null?t.sibling:null);ks(i);break;case 19:var d=(t.flags&128)!==0;if(l=(r&i.childLanes)!==0,l||(Rr(t,i,r,!1),l=(r&i.childLanes)!==0),d){if(l)return j_(t,i,r);i.flags|=128}if(d=i.memoizedState,d!==null&&(d.rendering=null,d.tail=null,d.lastEffect=null),ae(yt,yt.current),l)break;return null;case 22:return i.lanes=0,A_(t,i,r,i.pendingProps);case 24:js(i,wt,t.memoizedState.cache)}return Yi(t,i,r)}function O_(t,i,r){if(t!==null)if(t.memoizedProps!==i.pendingProps)Rt=!0;else{if(!hf(t,r)&&(i.flags&128)===0)return Rt=!1,w0(t,i,r);Rt=(t.flags&131072)!==0}else Rt=!1,Oe&&(i.flags&1048576)!==0&&hg(i,Qo,i.index);switch(i.lanes=0,i.tag){case 16:e:{var l=i.pendingProps;if(t=Ma(i.elementType),i.type=t,typeof t=="function")pd(t)?(l=Va(t,l),i.tag=1,i=x_(null,i,t,l,r)):(i.tag=0,i=sf(null,i,t,l,r));else{if(t!=null){var d=t.$$typeof;if(d===de){i.tag=11,i=T_(null,i,t,l,r);break e}else if(d===C){i.tag=14,i=b_(null,i,t,l,r);break e}}throw i=Xe(t)||t,Error(a(306,i,""))}}return i;case 0:return sf(t,i,i.type,i.pendingProps,r);case 1:return l=i.type,d=Va(l,i.pendingProps),x_(t,i,l,d,r);case 3:e:{if(jt(i,i.stateNode.containerInfo),t===null)throw Error(a(387));l=i.pendingProps;var m=i.memoizedState;d=m.element,Cd(t,i),nl(i,l,null,r);var v=i.memoizedState;if(l=v.cache,js(i,wt,l),l!==m.cache&&Ad(i,[wt],r,!0),tl(),l=v.element,m.isDehydrated)if(m={element:l,isDehydrated:!1,cache:v.cache},i.updateQueue.baseState=m,i.memoizedState=m,i.flags&256){i=I_(t,i,l,r);break e}else if(l!==d){d=On(Error(a(424)),i),$o(d),i=I_(t,i,l,r);break e}else for(t=i.stateNode.containerInfo,t.nodeType===9?t=t.body:t=t.nodeName==="HTML"?t.ownerDocument.body:t,et=Vn(t.firstChild),qt=i,Oe=!0,Cs=null,kn=!0,r=Ag(i,null,l,r),i.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Ca(),l===d){i=Yi(t,i,r);break e}Gt(t,i,l,r)}i=i.child}return i;case 26:return pu(t,i),t===null?(r=Fy(i.type,null,i.pendingProps,null))?i.memoizedState=r:Oe||(r=i.type,t=i.pendingProps,l=ju(Ae.current).createElement(r),l[bt]=i,l[Pt]=t,Yt(l,r,t),St(l),i.stateNode=l):i.memoizedState=Fy(i.type,t.memoizedProps,i.pendingProps,t.memoizedState),null;case 27:return ua(i),t===null&&Oe&&(l=i.stateNode=By(i.type,i.pendingProps,Ae.current),qt=i,kn=!0,d=et,Gs(i.type)?(Ff=d,et=Vn(l.firstChild)):et=d),Gt(t,i,i.pendingProps.children,r),pu(t,i),t===null&&(i.flags|=4194304),i.child;case 5:return t===null&&Oe&&((d=l=et)&&(l=tA(l,i.type,i.pendingProps,kn),l!==null?(i.stateNode=l,qt=i,et=Vn(l.firstChild),kn=!1,d=!0):d=!1),d||Ds(i)),ua(i),d=i.type,m=i.pendingProps,v=t!==null?t.memoizedProps:null,l=m.children,Uf(d,m)?l=null:v!==null&&Uf(d,v)&&(i.flags|=32),i.memoizedState!==null&&(d=Ld(t,i,g0,null,null,r),bl._currentValue=d),pu(t,i),Gt(t,i,l,r),i.child;case 6:return t===null&&Oe&&((t=r=et)&&(r=nA(r,i.pendingProps,kn),r!==null?(i.stateNode=r,qt=i,et=null,t=!0):t=!1),t||Ds(i)),null;case 13:return C_(t,i,r);case 4:return jt(i,i.stateNode.containerInfo),l=i.pendingProps,t===null?i.child=ka(i,null,l,r):Gt(t,i,l,r),i.child;case 11:return T_(t,i,i.type,i.pendingProps,r);case 7:return Gt(t,i,i.pendingProps,r),i.child;case 8:return Gt(t,i,i.pendingProps.children,r),i.child;case 12:return Gt(t,i,i.pendingProps.children,r),i.child;case 10:return l=i.pendingProps,js(i,i.type,l.value),Gt(t,i,l.children,r),i.child;case 9:return d=i.type._context,l=i.pendingProps.children,ja(i),d=Ft(d),l=l(d),i.flags|=1,Gt(t,i,l,r),i.child;case 14:return b_(t,i,i.type,i.pendingProps,r);case 15:return S_(t,i,i.type,i.pendingProps,r);case 19:return j_(t,i,r);case 31:return A0(t,i,r);case 22:return A_(t,i,r,i.pendingProps);case 24:return ja(i),l=Ft(wt),t===null?(d=Rd(),d===null&&(d=Je,m=wd(),d.pooledCache=m,m.refCount++,m!==null&&(d.pooledCacheLanes|=r),d=m),i.memoizedState={parent:l,cache:d},Id(i),js(i,wt,d)):((t.lanes&r)!==0&&(Cd(t,i),nl(i,null,null,r),tl()),d=t.memoizedState,m=i.memoizedState,d.parent!==l?(d={parent:l,cache:l},i.memoizedState=d,i.lanes===0&&(i.memoizedState=i.updateQueue.baseState=d),js(i,wt,l)):(l=m.cache,js(i,wt,l),l!==d.cache&&Ad(i,[wt],r,!0))),Gt(t,i,i.pendingProps.children,r),i.child;case 29:throw i.pendingProps}throw Error(a(156,i.tag))}function Ki(t){t.flags|=4}function df(t,i,r,l,d){if((i=(t.mode&32)!==0)&&(i=!1),i){if(t.flags|=16777216,(d&335544128)===d)if(t.stateNode.complete)t.flags|=8192;else if(ry())t.flags|=8192;else throw Pa=eu,xd}else t.flags&=-16777217}function M_(t,i){if(i.type!=="stylesheet"||(i.state.loading&4)!==0)t.flags&=-16777217;else if(t.flags|=16777216,!$y(i))if(ry())t.flags|=8192;else throw Pa=eu,xd}function _u(t,i){i!==null&&(t.flags|=4),t.flags&16384&&(i=t.tag!==22?Sc():536870912,t.lanes|=i,Ur|=i)}function ll(t,i){if(!Oe)switch(t.tailMode){case"hidden":i=t.tail;for(var r=null;i!==null;)i.alternate!==null&&(r=i),i=i.sibling;r===null?t.tail=null:r.sibling=null;break;case"collapsed":r=t.tail;for(var l=null;r!==null;)r.alternate!==null&&(l=r),r=r.sibling;l===null?i||t.tail===null?t.tail=null:t.tail.sibling=null:l.sibling=null}}function tt(t){var i=t.alternate!==null&&t.alternate.child===t.child,r=0,l=0;if(i)for(var d=t.child;d!==null;)r|=d.lanes|d.childLanes,l|=d.subtreeFlags&65011712,l|=d.flags&65011712,d.return=t,d=d.sibling;else for(d=t.child;d!==null;)r|=d.lanes|d.childLanes,l|=d.subtreeFlags,l|=d.flags,d.return=t,d=d.sibling;return t.subtreeFlags|=l,t.childLanes=r,i}function N0(t,i,r){var l=i.pendingProps;switch(vd(i),i.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return tt(i),null;case 1:return tt(i),null;case 3:return r=i.stateNode,l=null,t!==null&&(l=t.memoizedState.cache),i.memoizedState.cache!==l&&(i.flags|=2048),qi(wt),st(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(t===null||t.child===null)&&(Nr(i)?Ki(i):t===null||t.memoizedState.isDehydrated&&(i.flags&256)===0||(i.flags|=1024,Td())),tt(i),null;case 26:var d=i.type,m=i.memoizedState;return t===null?(Ki(i),m!==null?(tt(i),M_(i,m)):(tt(i),df(i,d,null,l,r))):m?m!==t.memoizedState?(Ki(i),tt(i),M_(i,m)):(tt(i),i.flags&=-16777217):(t=t.memoizedProps,t!==l&&Ki(i),tt(i),df(i,d,t,l,r)),null;case 27:if(sr(i),r=Ae.current,d=i.type,t!==null&&i.stateNode!=null)t.memoizedProps!==l&&Ki(i);else{if(!l){if(i.stateNode===null)throw Error(a(166));return tt(i),null}t=le.current,Nr(i)?fg(i):(t=By(d,l,r),i.stateNode=t,Ki(i))}return tt(i),null;case 5:if(sr(i),d=i.type,t!==null&&i.stateNode!=null)t.memoizedProps!==l&&Ki(i);else{if(!l){if(i.stateNode===null)throw Error(a(166));return tt(i),null}if(m=le.current,Nr(i))fg(i);else{var v=ju(Ae.current);switch(m){case 1:m=v.createElementNS("http://www.w3.org/2000/svg",d);break;case 2:m=v.createElementNS("http://www.w3.org/1998/Math/MathML",d);break;default:switch(d){case"svg":m=v.createElementNS("http://www.w3.org/2000/svg",d);break;case"math":m=v.createElementNS("http://www.w3.org/1998/Math/MathML",d);break;case"script":m=v.createElement("div"),m.innerHTML="<script><\/script>",m=m.removeChild(m.firstChild);break;case"select":m=typeof l.is=="string"?v.createElement("select",{is:l.is}):v.createElement("select"),l.multiple?m.multiple=!0:l.size&&(m.size=l.size);break;default:m=typeof l.is=="string"?v.createElement(d,{is:l.is}):v.createElement(d)}}m[bt]=i,m[Pt]=l;e:for(v=i.child;v!==null;){if(v.tag===5||v.tag===6)m.appendChild(v.stateNode);else if(v.tag!==4&&v.tag!==27&&v.child!==null){v.child.return=v,v=v.child;continue}if(v===i)break e;for(;v.sibling===null;){if(v.return===null||v.return===i)break e;v=v.return}v.sibling.return=v.return,v=v.sibling}i.stateNode=m;e:switch(Yt(m,d,l),d){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break e;case"img":l=!0;break e;default:l=!1}l&&Ki(i)}}return tt(i),df(i,i.type,t===null?null:t.memoizedProps,i.pendingProps,r),null;case 6:if(t&&i.stateNode!=null)t.memoizedProps!==l&&Ki(i);else{if(typeof l!="string"&&i.stateNode===null)throw Error(a(166));if(t=Ae.current,Nr(i)){if(t=i.stateNode,r=i.memoizedProps,l=null,d=qt,d!==null)switch(d.tag){case 27:case 5:l=d.memoizedProps}t[bt]=i,t=!!(t.nodeValue===r||l!==null&&l.suppressHydrationWarning===!0||Cy(t.nodeValue,r)),t||Ds(i,!0)}else t=ju(t).createTextNode(l),t[bt]=i,i.stateNode=t}return tt(i),null;case 31:if(r=i.memoizedState,t===null||t.memoizedState!==null){if(l=Nr(i),r!==null){if(t===null){if(!l)throw Error(a(318));if(t=i.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(a(557));t[bt]=i}else Ca(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;tt(i),t=!1}else r=Td(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=r),t=!0;if(!t)return i.flags&256?(Sn(i),i):(Sn(i),null);if((i.flags&128)!==0)throw Error(a(558))}return tt(i),null;case 13:if(l=i.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(d=Nr(i),l!==null&&l.dehydrated!==null){if(t===null){if(!d)throw Error(a(318));if(d=i.memoizedState,d=d!==null?d.dehydrated:null,!d)throw Error(a(317));d[bt]=i}else Ca(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;tt(i),d=!1}else d=Td(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=d),d=!0;if(!d)return i.flags&256?(Sn(i),i):(Sn(i),null)}return Sn(i),(i.flags&128)!==0?(i.lanes=r,i):(r=l!==null,t=t!==null&&t.memoizedState!==null,r&&(l=i.child,d=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(d=l.alternate.memoizedState.cachePool.pool),m=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(m=l.memoizedState.cachePool.pool),m!==d&&(l.flags|=2048)),r!==t&&r&&(i.child.flags|=8192),_u(i,i.updateQueue),tt(i),null);case 4:return st(),t===null&&Mf(i.stateNode.containerInfo),tt(i),null;case 10:return qi(i.type),tt(i),null;case 19:if(J(yt),l=i.memoizedState,l===null)return tt(i),null;if(d=(i.flags&128)!==0,m=l.rendering,m===null)if(d)ll(l,!1);else{if(ft!==0||t!==null&&(t.flags&128)!==0)for(t=i.child;t!==null;){if(m=su(t),m!==null){for(i.flags|=128,ll(l,!1),t=m.updateQueue,i.updateQueue=t,_u(i,t),i.subtreeFlags=0,t=r,r=i.child;r!==null;)lg(r,t),r=r.sibling;return ae(yt,yt.current&1|2),Oe&&Bi(i,l.treeForkCount),i.child}t=t.sibling}l.tail!==null&&sn()>bu&&(i.flags|=128,d=!0,ll(l,!1),i.lanes=4194304)}else{if(!d)if(t=su(m),t!==null){if(i.flags|=128,d=!0,t=t.updateQueue,i.updateQueue=t,_u(i,t),ll(l,!0),l.tail===null&&l.tailMode==="hidden"&&!m.alternate&&!Oe)return tt(i),null}else 2*sn()-l.renderingStartTime>bu&&r!==536870912&&(i.flags|=128,d=!0,ll(l,!1),i.lanes=4194304);l.isBackwards?(m.sibling=i.child,i.child=m):(t=l.last,t!==null?t.sibling=m:i.child=m,l.last=m)}return l.tail!==null?(t=l.tail,l.rendering=t,l.tail=t.sibling,l.renderingStartTime=sn(),t.sibling=null,r=yt.current,ae(yt,d?r&1|2:r&1),Oe&&Bi(i,l.treeForkCount),t):(tt(i),null);case 22:case 23:return Sn(i),Md(),l=i.memoizedState!==null,t!==null?t.memoizedState!==null!==l&&(i.flags|=8192):l&&(i.flags|=8192),l?(r&536870912)!==0&&(i.flags&128)===0&&(tt(i),i.subtreeFlags&6&&(i.flags|=8192)):tt(i),r=i.updateQueue,r!==null&&_u(i,r.retryQueue),r=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),l=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(l=i.memoizedState.cachePool.pool),l!==r&&(i.flags|=2048),t!==null&&J(Oa),null;case 24:return r=null,t!==null&&(r=t.memoizedState.cache),i.memoizedState.cache!==r&&(i.flags|=2048),qi(wt),tt(i),null;case 25:return null;case 30:return null}throw Error(a(156,i.tag))}function R0(t,i){switch(vd(i),i.tag){case 1:return t=i.flags,t&65536?(i.flags=t&-65537|128,i):null;case 3:return qi(wt),st(),t=i.flags,(t&65536)!==0&&(t&128)===0?(i.flags=t&-65537|128,i):null;case 26:case 27:case 5:return sr(i),null;case 31:if(i.memoizedState!==null){if(Sn(i),i.alternate===null)throw Error(a(340));Ca()}return t=i.flags,t&65536?(i.flags=t&-65537|128,i):null;case 13:if(Sn(i),t=i.memoizedState,t!==null&&t.dehydrated!==null){if(i.alternate===null)throw Error(a(340));Ca()}return t=i.flags,t&65536?(i.flags=t&-65537|128,i):null;case 19:return J(yt),null;case 4:return st(),null;case 10:return qi(i.type),null;case 22:case 23:return Sn(i),Md(),t!==null&&J(Oa),t=i.flags,t&65536?(i.flags=t&-65537|128,i):null;case 24:return qi(wt),null;case 25:return null;default:return null}}function P_(t,i){switch(vd(i),i.tag){case 3:qi(wt),st();break;case 26:case 27:case 5:sr(i);break;case 4:st();break;case 31:i.memoizedState!==null&&Sn(i);break;case 13:Sn(i);break;case 19:J(yt);break;case 10:qi(i.type);break;case 22:case 23:Sn(i),Md(),t!==null&&J(Oa);break;case 24:qi(wt)}}function cl(t,i){try{var r=i.updateQueue,l=r!==null?r.lastEffect:null;if(l!==null){var d=l.next;r=d;do{if((r.tag&t)===t){l=void 0;var m=r.create,v=r.inst;l=m(),v.destroy=l}r=r.next}while(r!==d)}}catch(S){Ge(i,i.return,S)}}function Vs(t,i,r){try{var l=i.updateQueue,d=l!==null?l.lastEffect:null;if(d!==null){var m=d.next;l=m;do{if((l.tag&t)===t){var v=l.inst,S=v.destroy;if(S!==void 0){v.destroy=void 0,d=i;var x=r,B=S;try{B()}catch(Q){Ge(d,x,Q)}}}l=l.next}while(l!==m)}}catch(Q){Ge(i,i.return,Q)}}function k_(t){var i=t.updateQueue;if(i!==null){var r=t.stateNode;try{Ng(i,r)}catch(l){Ge(t,t.return,l)}}}function L_(t,i,r){r.props=Va(t.type,t.memoizedProps),r.state=t.memoizedState;try{r.componentWillUnmount()}catch(l){Ge(t,i,l)}}function ul(t,i){try{var r=t.ref;if(r!==null){switch(t.tag){case 26:case 27:case 5:var l=t.stateNode;break;case 30:l=t.stateNode;break;default:l=t.stateNode}typeof r=="function"?t.refCleanup=r(l):r.current=l}}catch(d){Ge(t,i,d)}}function wi(t,i){var r=t.ref,l=t.refCleanup;if(r!==null)if(typeof l=="function")try{l()}catch(d){Ge(t,i,d)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof r=="function")try{r(null)}catch(d){Ge(t,i,d)}else r.current=null}function V_(t){var i=t.type,r=t.memoizedProps,l=t.stateNode;try{e:switch(i){case"button":case"input":case"select":case"textarea":r.autoFocus&&l.focus();break e;case"img":r.src?l.src=r.src:r.srcSet&&(l.srcset=r.srcSet)}}catch(d){Ge(t,t.return,d)}}function ff(t,i,r){try{var l=t.stateNode;$0(l,t.type,r,i),l[Pt]=i}catch(d){Ge(t,t.return,d)}}function U_(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&Gs(t.type)||t.tag===4}function mf(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||U_(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.tag===27&&Gs(t.type)||t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function pf(t,i,r){var l=t.tag;if(l===5||l===6)t=t.stateNode,i?(r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r).insertBefore(t,i):(i=r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r,i.appendChild(t),r=r._reactRootContainer,r!=null||i.onclick!==null||(i.onclick=Yn));else if(l!==4&&(l===27&&Gs(t.type)&&(r=t.stateNode,i=null),t=t.child,t!==null))for(pf(t,i,r),t=t.sibling;t!==null;)pf(t,i,r),t=t.sibling}function yu(t,i,r){var l=t.tag;if(l===5||l===6)t=t.stateNode,i?r.insertBefore(t,i):r.appendChild(t);else if(l!==4&&(l===27&&Gs(t.type)&&(r=t.stateNode),t=t.child,t!==null))for(yu(t,i,r),t=t.sibling;t!==null;)yu(t,i,r),t=t.sibling}function z_(t){var i=t.stateNode,r=t.memoizedProps;try{for(var l=t.type,d=i.attributes;d.length;)i.removeAttributeNode(d[0]);Yt(i,l,r),i[bt]=t,i[Pt]=r}catch(m){Ge(t,t.return,m)}}var Qi=!1,xt=!1,gf=!1,B_=typeof WeakSet=="function"?WeakSet:Set,Lt=null;function x0(t,i){if(t=t.containerInfo,Lf=Uu,t=Zp(t),ld(t)){if("selectionStart"in t)var r={start:t.selectionStart,end:t.selectionEnd};else e:{r=(r=t.ownerDocument)&&r.defaultView||window;var l=r.getSelection&&r.getSelection();if(l&&l.rangeCount!==0){r=l.anchorNode;var d=l.anchorOffset,m=l.focusNode;l=l.focusOffset;try{r.nodeType,m.nodeType}catch{r=null;break e}var v=0,S=-1,x=-1,B=0,Q=0,X=t,H=null;t:for(;;){for(var F;X!==r||d!==0&&X.nodeType!==3||(S=v+d),X!==m||l!==0&&X.nodeType!==3||(x=v+l),X.nodeType===3&&(v+=X.nodeValue.length),(F=X.firstChild)!==null;)H=X,X=F;for(;;){if(X===t)break t;if(H===r&&++B===d&&(S=v),H===m&&++Q===l&&(x=v),(F=X.nextSibling)!==null)break;X=H,H=X.parentNode}X=F}r=S===-1||x===-1?null:{start:S,end:x}}else r=null}r=r||{start:0,end:0}}else r=null;for(Vf={focusedElem:t,selectionRange:r},Uu=!1,Lt=i;Lt!==null;)if(i=Lt,t=i.child,(i.subtreeFlags&1028)!==0&&t!==null)t.return=i,Lt=t;else for(;Lt!==null;){switch(i=Lt,m=i.alternate,t=i.flags,i.tag){case 0:if((t&4)!==0&&(t=i.updateQueue,t=t!==null?t.events:null,t!==null))for(r=0;r<t.length;r++)d=t[r],d.ref.impl=d.nextImpl;break;case 11:case 15:break;case 1:if((t&1024)!==0&&m!==null){t=void 0,r=i,d=m.memoizedProps,m=m.memoizedState,l=r.stateNode;try{var ce=Va(r.type,d);t=l.getSnapshotBeforeUpdate(ce,m),l.__reactInternalSnapshotBeforeUpdate=t}catch(ye){Ge(r,r.return,ye)}}break;case 3:if((t&1024)!==0){if(t=i.stateNode.containerInfo,r=t.nodeType,r===9)Bf(t);else if(r===1)switch(t.nodeName){case"HEAD":case"HTML":case"BODY":Bf(t);break;default:t.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((t&1024)!==0)throw Error(a(163))}if(t=i.sibling,t!==null){t.return=i.return,Lt=t;break}Lt=i.return}}function H_(t,i,r){var l=r.flags;switch(r.tag){case 0:case 11:case 15:Wi(t,r),l&4&&cl(5,r);break;case 1:if(Wi(t,r),l&4)if(t=r.stateNode,i===null)try{t.componentDidMount()}catch(v){Ge(r,r.return,v)}else{var d=Va(r.type,i.memoizedProps);i=i.memoizedState;try{t.componentDidUpdate(d,i,t.__reactInternalSnapshotBeforeUpdate)}catch(v){Ge(r,r.return,v)}}l&64&&k_(r),l&512&&ul(r,r.return);break;case 3:if(Wi(t,r),l&64&&(t=r.updateQueue,t!==null)){if(i=null,r.child!==null)switch(r.child.tag){case 27:case 5:i=r.child.stateNode;break;case 1:i=r.child.stateNode}try{Ng(t,i)}catch(v){Ge(r,r.return,v)}}break;case 27:i===null&&l&4&&z_(r);case 26:case 5:Wi(t,r),i===null&&l&4&&V_(r),l&512&&ul(r,r.return);break;case 12:Wi(t,r);break;case 31:Wi(t,r),l&4&&G_(t,r);break;case 13:Wi(t,r),l&4&&Y_(t,r),l&64&&(t=r.memoizedState,t!==null&&(t=t.dehydrated,t!==null&&(r=L0.bind(null,r),iA(t,r))));break;case 22:if(l=r.memoizedState!==null||Qi,!l){i=i!==null&&i.memoizedState!==null||xt,d=Qi;var m=xt;Qi=l,(xt=i)&&!m?Xi(t,r,(r.subtreeFlags&8772)!==0):Wi(t,r),Qi=d,xt=m}break;case 30:break;default:Wi(t,r)}}function q_(t){var i=t.alternate;i!==null&&(t.alternate=null,q_(i)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(i=t.stateNode,i!==null&&cr(i)),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}var rt=null,un=!1;function $i(t,i,r){for(r=r.child;r!==null;)F_(t,i,r),r=r.sibling}function F_(t,i,r){if(Bt&&typeof Bt.onCommitFiberUnmount=="function")try{Bt.onCommitFiberUnmount(Hn,r)}catch{}switch(r.tag){case 26:xt||wi(r,i),$i(t,i,r),r.memoizedState?r.memoizedState.count--:r.stateNode&&(r=r.stateNode,r.parentNode.removeChild(r));break;case 27:xt||wi(r,i);var l=rt,d=un;Gs(r.type)&&(rt=r.stateNode,un=!1),$i(t,i,r),vl(r.stateNode),rt=l,un=d;break;case 5:xt||wi(r,i);case 6:if(l=rt,d=un,rt=null,$i(t,i,r),rt=l,un=d,rt!==null)if(un)try{(rt.nodeType===9?rt.body:rt.nodeName==="HTML"?rt.ownerDocument.body:rt).removeChild(r.stateNode)}catch(m){Ge(r,i,m)}else try{rt.removeChild(r.stateNode)}catch(m){Ge(r,i,m)}break;case 18:rt!==null&&(un?(t=rt,ky(t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,r.stateNode),Kr(t)):ky(rt,r.stateNode));break;case 4:l=rt,d=un,rt=r.stateNode.containerInfo,un=!0,$i(t,i,r),rt=l,un=d;break;case 0:case 11:case 14:case 15:Vs(2,r,i),xt||Vs(4,r,i),$i(t,i,r);break;case 1:xt||(wi(r,i),l=r.stateNode,typeof l.componentWillUnmount=="function"&&L_(r,i,l)),$i(t,i,r);break;case 21:$i(t,i,r);break;case 22:xt=(l=xt)||r.memoizedState!==null,$i(t,i,r),xt=l;break;default:$i(t,i,r)}}function G_(t,i){if(i.memoizedState===null&&(t=i.alternate,t!==null&&(t=t.memoizedState,t!==null))){t=t.dehydrated;try{Kr(t)}catch(r){Ge(i,i.return,r)}}}function Y_(t,i){if(i.memoizedState===null&&(t=i.alternate,t!==null&&(t=t.memoizedState,t!==null&&(t=t.dehydrated,t!==null))))try{Kr(t)}catch(r){Ge(i,i.return,r)}}function I0(t){switch(t.tag){case 31:case 13:case 19:var i=t.stateNode;return i===null&&(i=t.stateNode=new B_),i;case 22:return t=t.stateNode,i=t._retryCache,i===null&&(i=t._retryCache=new B_),i;default:throw Error(a(435,t.tag))}}function vu(t,i){var r=I0(t);i.forEach(function(l){if(!r.has(l)){r.add(l);var d=V0.bind(null,t,l);l.then(d,d)}})}function hn(t,i){var r=i.deletions;if(r!==null)for(var l=0;l<r.length;l++){var d=r[l],m=t,v=i,S=v;e:for(;S!==null;){switch(S.tag){case 27:if(Gs(S.type)){rt=S.stateNode,un=!1;break e}break;case 5:rt=S.stateNode,un=!1;break e;case 3:case 4:rt=S.stateNode.containerInfo,un=!0;break e}S=S.return}if(rt===null)throw Error(a(160));F_(m,v,d),rt=null,un=!1,m=d.alternate,m!==null&&(m.return=null),d.return=null}if(i.subtreeFlags&13886)for(i=i.child;i!==null;)K_(i,t),i=i.sibling}var Jn=null;function K_(t,i){var r=t.alternate,l=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:hn(i,t),dn(t),l&4&&(Vs(3,t,t.return),cl(3,t),Vs(5,t,t.return));break;case 1:hn(i,t),dn(t),l&512&&(xt||r===null||wi(r,r.return)),l&64&&Qi&&(t=t.updateQueue,t!==null&&(l=t.callbacks,l!==null&&(r=t.shared.hiddenCallbacks,t.shared.hiddenCallbacks=r===null?l:r.concat(l))));break;case 26:var d=Jn;if(hn(i,t),dn(t),l&512&&(xt||r===null||wi(r,r.return)),l&4){var m=r!==null?r.memoizedState:null;if(l=t.memoizedState,r===null)if(l===null)if(t.stateNode===null){e:{l=t.type,r=t.memoizedProps,d=d.ownerDocument||d;t:switch(l){case"title":m=d.getElementsByTagName("title")[0],(!m||m[hi]||m[bt]||m.namespaceURI==="http://www.w3.org/2000/svg"||m.hasAttribute("itemprop"))&&(m=d.createElement(l),d.head.insertBefore(m,d.querySelector("head > title"))),Yt(m,l,r),m[bt]=t,St(m),l=m;break e;case"link":var v=Ky("link","href",d).get(l+(r.href||""));if(v){for(var S=0;S<v.length;S++)if(m=v[S],m.getAttribute("href")===(r.href==null||r.href===""?null:r.href)&&m.getAttribute("rel")===(r.rel==null?null:r.rel)&&m.getAttribute("title")===(r.title==null?null:r.title)&&m.getAttribute("crossorigin")===(r.crossOrigin==null?null:r.crossOrigin)){v.splice(S,1);break t}}m=d.createElement(l),Yt(m,l,r),d.head.appendChild(m);break;case"meta":if(v=Ky("meta","content",d).get(l+(r.content||""))){for(S=0;S<v.length;S++)if(m=v[S],m.getAttribute("content")===(r.content==null?null:""+r.content)&&m.getAttribute("name")===(r.name==null?null:r.name)&&m.getAttribute("property")===(r.property==null?null:r.property)&&m.getAttribute("http-equiv")===(r.httpEquiv==null?null:r.httpEquiv)&&m.getAttribute("charset")===(r.charSet==null?null:r.charSet)){v.splice(S,1);break t}}m=d.createElement(l),Yt(m,l,r),d.head.appendChild(m);break;default:throw Error(a(468,l))}m[bt]=t,St(m),l=m}t.stateNode=l}else Qy(d,t.type,t.stateNode);else t.stateNode=Yy(d,l,t.memoizedProps);else m!==l?(m===null?r.stateNode!==null&&(r=r.stateNode,r.parentNode.removeChild(r)):m.count--,l===null?Qy(d,t.type,t.stateNode):Yy(d,l,t.memoizedProps)):l===null&&t.stateNode!==null&&ff(t,t.memoizedProps,r.memoizedProps)}break;case 27:hn(i,t),dn(t),l&512&&(xt||r===null||wi(r,r.return)),r!==null&&l&4&&ff(t,t.memoizedProps,r.memoizedProps);break;case 5:if(hn(i,t),dn(t),l&512&&(xt||r===null||wi(r,r.return)),t.flags&32){d=t.stateNode;try{cn(d,"")}catch(ce){Ge(t,t.return,ce)}}l&4&&t.stateNode!=null&&(d=t.memoizedProps,ff(t,d,r!==null?r.memoizedProps:d)),l&1024&&(gf=!0);break;case 6:if(hn(i,t),dn(t),l&4){if(t.stateNode===null)throw Error(a(162));l=t.memoizedProps,r=t.stateNode;try{r.nodeValue=l}catch(ce){Ge(t,t.return,ce)}}break;case 3:if(Pu=null,d=Jn,Jn=Ou(i.containerInfo),hn(i,t),Jn=d,dn(t),l&4&&r!==null&&r.memoizedState.isDehydrated)try{Kr(i.containerInfo)}catch(ce){Ge(t,t.return,ce)}gf&&(gf=!1,Q_(t));break;case 4:l=Jn,Jn=Ou(t.stateNode.containerInfo),hn(i,t),dn(t),Jn=l;break;case 12:hn(i,t),dn(t);break;case 31:hn(i,t),dn(t),l&4&&(l=t.updateQueue,l!==null&&(t.updateQueue=null,vu(t,l)));break;case 13:hn(i,t),dn(t),t.child.flags&8192&&t.memoizedState!==null!=(r!==null&&r.memoizedState!==null)&&(Tu=sn()),l&4&&(l=t.updateQueue,l!==null&&(t.updateQueue=null,vu(t,l)));break;case 22:d=t.memoizedState!==null;var x=r!==null&&r.memoizedState!==null,B=Qi,Q=xt;if(Qi=B||d,xt=Q||x,hn(i,t),xt=Q,Qi=B,dn(t),l&8192)e:for(i=t.stateNode,i._visibility=d?i._visibility&-2:i._visibility|1,d&&(r===null||x||Qi||xt||Ua(t)),r=null,i=t;;){if(i.tag===5||i.tag===26){if(r===null){x=r=i;try{if(m=x.stateNode,d)v=m.style,typeof v.setProperty=="function"?v.setProperty("display","none","important"):v.display="none";else{S=x.stateNode;var X=x.memoizedProps.style,H=X!=null&&X.hasOwnProperty("display")?X.display:null;S.style.display=H==null||typeof H=="boolean"?"":(""+H).trim()}}catch(ce){Ge(x,x.return,ce)}}}else if(i.tag===6){if(r===null){x=i;try{x.stateNode.nodeValue=d?"":x.memoizedProps}catch(ce){Ge(x,x.return,ce)}}}else if(i.tag===18){if(r===null){x=i;try{var F=x.stateNode;d?Ly(F,!0):Ly(x.stateNode,!1)}catch(ce){Ge(x,x.return,ce)}}}else if((i.tag!==22&&i.tag!==23||i.memoizedState===null||i===t)&&i.child!==null){i.child.return=i,i=i.child;continue}if(i===t)break e;for(;i.sibling===null;){if(i.return===null||i.return===t)break e;r===i&&(r=null),i=i.return}r===i&&(r=null),i.sibling.return=i.return,i=i.sibling}l&4&&(l=t.updateQueue,l!==null&&(r=l.retryQueue,r!==null&&(l.retryQueue=null,vu(t,r))));break;case 19:hn(i,t),dn(t),l&4&&(l=t.updateQueue,l!==null&&(t.updateQueue=null,vu(t,l)));break;case 30:break;case 21:break;default:hn(i,t),dn(t)}}function dn(t){var i=t.flags;if(i&2){try{for(var r,l=t.return;l!==null;){if(U_(l)){r=l;break}l=l.return}if(r==null)throw Error(a(160));switch(r.tag){case 27:var d=r.stateNode,m=mf(t);yu(t,m,d);break;case 5:var v=r.stateNode;r.flags&32&&(cn(v,""),r.flags&=-33);var S=mf(t);yu(t,S,v);break;case 3:case 4:var x=r.stateNode.containerInfo,B=mf(t);pf(t,B,x);break;default:throw Error(a(161))}}catch(Q){Ge(t,t.return,Q)}t.flags&=-3}i&4096&&(t.flags&=-4097)}function Q_(t){if(t.subtreeFlags&1024)for(t=t.child;t!==null;){var i=t;Q_(i),i.tag===5&&i.flags&1024&&i.stateNode.reset(),t=t.sibling}}function Wi(t,i){if(i.subtreeFlags&8772)for(i=i.child;i!==null;)H_(t,i.alternate,i),i=i.sibling}function Ua(t){for(t=t.child;t!==null;){var i=t;switch(i.tag){case 0:case 11:case 14:case 15:Vs(4,i,i.return),Ua(i);break;case 1:wi(i,i.return);var r=i.stateNode;typeof r.componentWillUnmount=="function"&&L_(i,i.return,r),Ua(i);break;case 27:vl(i.stateNode);case 26:case 5:wi(i,i.return),Ua(i);break;case 22:i.memoizedState===null&&Ua(i);break;case 30:Ua(i);break;default:Ua(i)}t=t.sibling}}function Xi(t,i,r){for(r=r&&(i.subtreeFlags&8772)!==0,i=i.child;i!==null;){var l=i.alternate,d=t,m=i,v=m.flags;switch(m.tag){case 0:case 11:case 15:Xi(d,m,r),cl(4,m);break;case 1:if(Xi(d,m,r),l=m,d=l.stateNode,typeof d.componentDidMount=="function")try{d.componentDidMount()}catch(B){Ge(l,l.return,B)}if(l=m,d=l.updateQueue,d!==null){var S=l.stateNode;try{var x=d.shared.hiddenCallbacks;if(x!==null)for(d.shared.hiddenCallbacks=null,d=0;d<x.length;d++)wg(x[d],S)}catch(B){Ge(l,l.return,B)}}r&&v&64&&k_(m),ul(m,m.return);break;case 27:z_(m);case 26:case 5:Xi(d,m,r),r&&l===null&&v&4&&V_(m),ul(m,m.return);break;case 12:Xi(d,m,r);break;case 31:Xi(d,m,r),r&&v&4&&G_(d,m);break;case 13:Xi(d,m,r),r&&v&4&&Y_(d,m);break;case 22:m.memoizedState===null&&Xi(d,m,r),ul(m,m.return);break;case 30:break;default:Xi(d,m,r)}i=i.sibling}}function _f(t,i){var r=null;t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),t=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(t=i.memoizedState.cachePool.pool),t!==r&&(t!=null&&t.refCount++,r!=null&&Wo(r))}function yf(t,i){t=null,i.alternate!==null&&(t=i.alternate.memoizedState.cache),i=i.memoizedState.cache,i!==t&&(i.refCount++,t!=null&&Wo(t))}function Zn(t,i,r,l){if(i.subtreeFlags&10256)for(i=i.child;i!==null;)$_(t,i,r,l),i=i.sibling}function $_(t,i,r,l){var d=i.flags;switch(i.tag){case 0:case 11:case 15:Zn(t,i,r,l),d&2048&&cl(9,i);break;case 1:Zn(t,i,r,l);break;case 3:Zn(t,i,r,l),d&2048&&(t=null,i.alternate!==null&&(t=i.alternate.memoizedState.cache),i=i.memoizedState.cache,i!==t&&(i.refCount++,t!=null&&Wo(t)));break;case 12:if(d&2048){Zn(t,i,r,l),t=i.stateNode;try{var m=i.memoizedProps,v=m.id,S=m.onPostCommit;typeof S=="function"&&S(v,i.alternate===null?"mount":"update",t.passiveEffectDuration,-0)}catch(x){Ge(i,i.return,x)}}else Zn(t,i,r,l);break;case 31:Zn(t,i,r,l);break;case 13:Zn(t,i,r,l);break;case 23:break;case 22:m=i.stateNode,v=i.alternate,i.memoizedState!==null?m._visibility&2?Zn(t,i,r,l):hl(t,i):m._visibility&2?Zn(t,i,r,l):(m._visibility|=2,kr(t,i,r,l,(i.subtreeFlags&10256)!==0||!1)),d&2048&&_f(v,i);break;case 24:Zn(t,i,r,l),d&2048&&yf(i.alternate,i);break;default:Zn(t,i,r,l)}}function kr(t,i,r,l,d){for(d=d&&((i.subtreeFlags&10256)!==0||!1),i=i.child;i!==null;){var m=t,v=i,S=r,x=l,B=v.flags;switch(v.tag){case 0:case 11:case 15:kr(m,v,S,x,d),cl(8,v);break;case 23:break;case 22:var Q=v.stateNode;v.memoizedState!==null?Q._visibility&2?kr(m,v,S,x,d):hl(m,v):(Q._visibility|=2,kr(m,v,S,x,d)),d&&B&2048&&_f(v.alternate,v);break;case 24:kr(m,v,S,x,d),d&&B&2048&&yf(v.alternate,v);break;default:kr(m,v,S,x,d)}i=i.sibling}}function hl(t,i){if(i.subtreeFlags&10256)for(i=i.child;i!==null;){var r=t,l=i,d=l.flags;switch(l.tag){case 22:hl(r,l),d&2048&&_f(l.alternate,l);break;case 24:hl(r,l),d&2048&&yf(l.alternate,l);break;default:hl(r,l)}i=i.sibling}}var dl=8192;function Lr(t,i,r){if(t.subtreeFlags&dl)for(t=t.child;t!==null;)W_(t,i,r),t=t.sibling}function W_(t,i,r){switch(t.tag){case 26:Lr(t,i,r),t.flags&dl&&t.memoizedState!==null&&pA(r,Jn,t.memoizedState,t.memoizedProps);break;case 5:Lr(t,i,r);break;case 3:case 4:var l=Jn;Jn=Ou(t.stateNode.containerInfo),Lr(t,i,r),Jn=l;break;case 22:t.memoizedState===null&&(l=t.alternate,l!==null&&l.memoizedState!==null?(l=dl,dl=16777216,Lr(t,i,r),dl=l):Lr(t,i,r));break;default:Lr(t,i,r)}}function X_(t){var i=t.alternate;if(i!==null&&(t=i.child,t!==null)){i.child=null;do i=t.sibling,t.sibling=null,t=i;while(t!==null)}}function fl(t){var i=t.deletions;if((t.flags&16)!==0){if(i!==null)for(var r=0;r<i.length;r++){var l=i[r];Lt=l,Z_(l,t)}X_(t)}if(t.subtreeFlags&10256)for(t=t.child;t!==null;)J_(t),t=t.sibling}function J_(t){switch(t.tag){case 0:case 11:case 15:fl(t),t.flags&2048&&Vs(9,t,t.return);break;case 3:fl(t);break;case 12:fl(t);break;case 22:var i=t.stateNode;t.memoizedState!==null&&i._visibility&2&&(t.return===null||t.return.tag!==13)?(i._visibility&=-3,Eu(t)):fl(t);break;default:fl(t)}}function Eu(t){var i=t.deletions;if((t.flags&16)!==0){if(i!==null)for(var r=0;r<i.length;r++){var l=i[r];Lt=l,Z_(l,t)}X_(t)}for(t=t.child;t!==null;){switch(i=t,i.tag){case 0:case 11:case 15:Vs(8,i,i.return),Eu(i);break;case 22:r=i.stateNode,r._visibility&2&&(r._visibility&=-3,Eu(i));break;default:Eu(i)}t=t.sibling}}function Z_(t,i){for(;Lt!==null;){var r=Lt;switch(r.tag){case 0:case 11:case 15:Vs(8,r,i);break;case 23:case 22:if(r.memoizedState!==null&&r.memoizedState.cachePool!==null){var l=r.memoizedState.cachePool.pool;l!=null&&l.refCount++}break;case 24:Wo(r.memoizedState.cache)}if(l=r.child,l!==null)l.return=r,Lt=l;else e:for(r=t;Lt!==null;){l=Lt;var d=l.sibling,m=l.return;if(q_(l),l===r){Lt=null;break e}if(d!==null){d.return=m,Lt=d;break e}Lt=m}}}var C0={getCacheForType:function(t){var i=Ft(wt),r=i.data.get(t);return r===void 0&&(r=t(),i.data.set(t,r)),r},cacheSignal:function(){return Ft(wt).controller.signal}},D0=typeof WeakMap=="function"?WeakMap:Map,ze=0,Je=null,xe=null,Ce=0,Fe=0,An=null,Us=!1,Vr=!1,vf=!1,Ji=0,ft=0,zs=0,za=0,Ef=0,wn=0,Ur=0,ml=null,fn=null,Tf=!1,Tu=0,ey=0,bu=1/0,Su=null,Bs=null,Mt=0,Hs=null,zr=null,Zi=0,bf=0,Sf=null,ty=null,pl=0,Af=null;function Nn(){return(ze&2)!==0&&Ce!==0?Ce&-Ce:$.T!==null?Cf():Ac()}function ny(){if(wn===0)if((Ce&536870912)===0||Oe){var t=fa;fa<<=1,(fa&3932160)===0&&(fa=262144),wn=t}else wn=536870912;return t=bn.current,t!==null&&(t.flags|=32),wn}function mn(t,i,r){(t===Je&&(Fe===2||Fe===9)||t.cancelPendingCommit!==null)&&(Br(t,0),qs(t,Ce,wn,!1)),ma(t,r),((ze&2)===0||t!==Je)&&(t===Je&&((ze&2)===0&&(za|=r),ft===4&&qs(t,Ce,wn,!1)),Ni(t))}function iy(t,i,r){if((ze&6)!==0)throw Error(a(327));var l=!r&&(i&127)===0&&(i&t.expiredLanes)===0||qn(t,i),d=l?M0(t,i):Nf(t,i,!0),m=l;do{if(d===0){Vr&&!l&&qs(t,i,0,!1);break}else{if(r=t.current.alternate,m&&!j0(r)){d=Nf(t,i,!1),m=!1;continue}if(d===2){if(m=i,t.errorRecoveryDisabledLanes&m)var v=0;else v=t.pendingLanes&-536870913,v=v!==0?v:v&536870912?536870912:0;if(v!==0){i=v;e:{var S=t;d=ml;var x=S.current.memoizedState.isDehydrated;if(x&&(Br(S,v).flags|=256),v=Nf(S,v,!1),v!==2){if(vf&&!x){S.errorRecoveryDisabledLanes|=m,za|=m,d=4;break e}m=fn,fn=d,m!==null&&(fn===null?fn=m:fn.push.apply(fn,m))}d=v}if(m=!1,d!==2)continue}}if(d===1){Br(t,0),qs(t,i,0,!0);break}e:{switch(l=t,m=d,m){case 0:case 1:throw Error(a(345));case 4:if((i&4194048)!==i)break;case 6:qs(l,i,wn,!Us);break e;case 2:fn=null;break;case 3:case 5:break;default:throw Error(a(329))}if((i&62914560)===i&&(d=Tu+300-sn(),10<d)){if(qs(l,i,wn,!Us),li(l,0,!0)!==0)break e;Zi=i,l.timeoutHandle=My(sy.bind(null,l,r,fn,Su,Tf,i,wn,za,Ur,Us,m,"Throttled",-0,0),d);break e}sy(l,r,fn,Su,Tf,i,wn,za,Ur,Us,m,null,-0,0)}}break}while(!0);Ni(t)}function sy(t,i,r,l,d,m,v,S,x,B,Q,X,H,F){if(t.timeoutHandle=-1,X=i.subtreeFlags,X&8192||(X&16785408)===16785408){X={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Yn},W_(i,m,X);var ce=(m&62914560)===m?Tu-sn():(m&4194048)===m?ey-sn():0;if(ce=gA(X,ce),ce!==null){Zi=m,t.cancelPendingCommit=ce(dy.bind(null,t,i,m,r,l,d,v,S,x,Q,X,null,H,F)),qs(t,m,v,!B);return}}dy(t,i,m,r,l,d,v,S,x)}function j0(t){for(var i=t;;){var r=i.tag;if((r===0||r===11||r===15)&&i.flags&16384&&(r=i.updateQueue,r!==null&&(r=r.stores,r!==null)))for(var l=0;l<r.length;l++){var d=r[l],m=d.getSnapshot;d=d.value;try{if(!En(m(),d))return!1}catch{return!1}}if(r=i.child,i.subtreeFlags&16384&&r!==null)r.return=i,i=r;else{if(i===t)break;for(;i.sibling===null;){if(i.return===null||i.return===t)return!0;i=i.return}i.sibling.return=i.return,i=i.sibling}}return!0}function qs(t,i,r,l){i&=~Ef,i&=~za,t.suspendedLanes|=i,t.pingedLanes&=~i,l&&(t.warmLanes|=i),l=t.expirationTimes;for(var d=i;0<d;){var m=31-gt(d),v=1<<m;l[m]=-1,d&=~v}r!==0&&pa(t,r,i)}function Au(){return(ze&6)===0?(gl(0),!1):!0}function wf(){if(xe!==null){if(Fe===0)var t=xe.return;else t=xe,Hi=Da=null,zd(t),Dr=null,Jo=0,t=xe;for(;t!==null;)P_(t.alternate,t),t=t.return;xe=null}}function Br(t,i){var r=t.timeoutHandle;r!==-1&&(t.timeoutHandle=-1,J0(r)),r=t.cancelPendingCommit,r!==null&&(t.cancelPendingCommit=null,r()),Zi=0,wf(),Je=t,xe=r=zi(t.current,null),Ce=i,Fe=0,An=null,Us=!1,Vr=qn(t,i),vf=!1,Ur=wn=Ef=za=zs=ft=0,fn=ml=null,Tf=!1,(i&8)!==0&&(i|=i&32);var l=t.entangledLanes;if(l!==0)for(t=t.entanglements,l&=i;0<l;){var d=31-gt(l),m=1<<d;i|=t[d],l&=~m}return Ji=i,Gc(),r}function ay(t,i){Se=null,$.H=rl,i===Cr||i===Zc?(i=Tg(),Fe=3):i===xd?(i=Tg(),Fe=4):Fe=i===nf?8:i!==null&&typeof i=="object"&&typeof i.then=="function"?6:1,An=i,xe===null&&(ft=1,fu(t,On(i,t.current)))}function ry(){var t=bn.current;return t===null?!0:(Ce&4194048)===Ce?Ln===null:(Ce&62914560)===Ce||(Ce&536870912)!==0?t===Ln:!1}function oy(){var t=$.H;return $.H=rl,t===null?rl:t}function ly(){var t=$.A;return $.A=C0,t}function wu(){ft=4,Us||(Ce&4194048)!==Ce&&bn.current!==null||(Vr=!0),(zs&134217727)===0&&(za&134217727)===0||Je===null||qs(Je,Ce,wn,!1)}function Nf(t,i,r){var l=ze;ze|=2;var d=oy(),m=ly();(Je!==t||Ce!==i)&&(Su=null,Br(t,i)),i=!1;var v=ft;e:do try{if(Fe!==0&&xe!==null){var S=xe,x=An;switch(Fe){case 8:wf(),v=6;break e;case 3:case 2:case 9:case 6:bn.current===null&&(i=!0);var B=Fe;if(Fe=0,An=null,Hr(t,S,x,B),r&&Vr){v=0;break e}break;default:B=Fe,Fe=0,An=null,Hr(t,S,x,B)}}O0(),v=ft;break}catch(Q){ay(t,Q)}while(!0);return i&&t.shellSuspendCounter++,Hi=Da=null,ze=l,$.H=d,$.A=m,xe===null&&(Je=null,Ce=0,Gc()),v}function O0(){for(;xe!==null;)cy(xe)}function M0(t,i){var r=ze;ze|=2;var l=oy(),d=ly();Je!==t||Ce!==i?(Su=null,bu=sn()+500,Br(t,i)):Vr=qn(t,i);e:do try{if(Fe!==0&&xe!==null){i=xe;var m=An;t:switch(Fe){case 1:Fe=0,An=null,Hr(t,i,m,1);break;case 2:case 9:if(vg(m)){Fe=0,An=null,uy(i);break}i=function(){Fe!==2&&Fe!==9||Je!==t||(Fe=7),Ni(t)},m.then(i,i);break e;case 3:Fe=7;break e;case 4:Fe=5;break e;case 7:vg(m)?(Fe=0,An=null,uy(i)):(Fe=0,An=null,Hr(t,i,m,7));break;case 5:var v=null;switch(xe.tag){case 26:v=xe.memoizedState;case 5:case 27:var S=xe;if(v?$y(v):S.stateNode.complete){Fe=0,An=null;var x=S.sibling;if(x!==null)xe=x;else{var B=S.return;B!==null?(xe=B,Nu(B)):xe=null}break t}}Fe=0,An=null,Hr(t,i,m,5);break;case 6:Fe=0,An=null,Hr(t,i,m,6);break;case 8:wf(),ft=6;break e;default:throw Error(a(462))}}P0();break}catch(Q){ay(t,Q)}while(!0);return Hi=Da=null,$.H=l,$.A=d,ze=r,xe!==null?0:(Je=null,Ce=0,Gc(),ft)}function P0(){for(;xe!==null&&!td();)cy(xe)}function cy(t){var i=O_(t.alternate,t,Ji);t.memoizedProps=t.pendingProps,i===null?Nu(t):xe=i}function uy(t){var i=t,r=i.alternate;switch(i.tag){case 15:case 0:i=R_(r,i,i.pendingProps,i.type,void 0,Ce);break;case 11:i=R_(r,i,i.pendingProps,i.type.render,i.ref,Ce);break;case 5:zd(i);default:P_(r,i),i=xe=lg(i,Ji),i=O_(r,i,Ji)}t.memoizedProps=t.pendingProps,i===null?Nu(t):xe=i}function Hr(t,i,r,l){Hi=Da=null,zd(i),Dr=null,Jo=0;var d=i.return;try{if(S0(t,d,i,r,Ce)){ft=1,fu(t,On(r,t.current)),xe=null;return}}catch(m){if(d!==null)throw xe=d,m;ft=1,fu(t,On(r,t.current)),xe=null;return}i.flags&32768?(Oe||l===1?t=!0:Vr||(Ce&536870912)!==0?t=!1:(Us=t=!0,(l===2||l===9||l===3||l===6)&&(l=bn.current,l!==null&&l.tag===13&&(l.flags|=16384))),hy(i,t)):Nu(i)}function Nu(t){var i=t;do{if((i.flags&32768)!==0){hy(i,Us);return}t=i.return;var r=N0(i.alternate,i,Ji);if(r!==null){xe=r;return}if(i=i.sibling,i!==null){xe=i;return}xe=i=t}while(i!==null);ft===0&&(ft=5)}function hy(t,i){do{var r=R0(t.alternate,t);if(r!==null){r.flags&=32767,xe=r;return}if(r=t.return,r!==null&&(r.flags|=32768,r.subtreeFlags=0,r.deletions=null),!i&&(t=t.sibling,t!==null)){xe=t;return}xe=t=r}while(t!==null);ft=6,xe=null}function dy(t,i,r,l,d,m,v,S,x){t.cancelPendingCommit=null;do Ru();while(Mt!==0);if((ze&6)!==0)throw Error(a(327));if(i!==null){if(i===t.current)throw Error(a(177));if(m=i.lanes|i.childLanes,m|=fd,sd(t,r,m,v,S,x),t===Je&&(xe=Je=null,Ce=0),zr=i,Hs=t,Zi=r,bf=m,Sf=d,ty=l,(i.subtreeFlags&10256)!==0||(i.flags&10256)!==0?(t.callbackNode=null,t.callbackPriority=0,U0(vs,function(){return _y(),null})):(t.callbackNode=null,t.callbackPriority=0),l=(i.flags&13878)!==0,(i.subtreeFlags&13878)!==0||l){l=$.T,$.T=null,d=se.p,se.p=2,v=ze,ze|=4;try{x0(t,i,r)}finally{ze=v,se.p=d,$.T=l}}Mt=1,fy(),my(),py()}}function fy(){if(Mt===1){Mt=0;var t=Hs,i=zr,r=(i.flags&13878)!==0;if((i.subtreeFlags&13878)!==0||r){r=$.T,$.T=null;var l=se.p;se.p=2;var d=ze;ze|=4;try{K_(i,t);var m=Vf,v=Zp(t.containerInfo),S=m.focusedElem,x=m.selectionRange;if(v!==S&&S&&S.ownerDocument&&Jp(S.ownerDocument.documentElement,S)){if(x!==null&&ld(S)){var B=x.start,Q=x.end;if(Q===void 0&&(Q=B),"selectionStart"in S)S.selectionStart=B,S.selectionEnd=Math.min(Q,S.value.length);else{var X=S.ownerDocument||document,H=X&&X.defaultView||window;if(H.getSelection){var F=H.getSelection(),ce=S.textContent.length,ye=Math.min(x.start,ce),We=x.end===void 0?ye:Math.min(x.end,ce);!F.extend&&ye>We&&(v=We,We=ye,ye=v);var k=Xp(S,ye),D=Xp(S,We);if(k&&D&&(F.rangeCount!==1||F.anchorNode!==k.node||F.anchorOffset!==k.offset||F.focusNode!==D.node||F.focusOffset!==D.offset)){var z=X.createRange();z.setStart(k.node,k.offset),F.removeAllRanges(),ye>We?(F.addRange(z),F.extend(D.node,D.offset)):(z.setEnd(D.node,D.offset),F.addRange(z))}}}}for(X=[],F=S;F=F.parentNode;)F.nodeType===1&&X.push({element:F,left:F.scrollLeft,top:F.scrollTop});for(typeof S.focus=="function"&&S.focus(),S=0;S<X.length;S++){var W=X[S];W.element.scrollLeft=W.left,W.element.scrollTop=W.top}}Uu=!!Lf,Vf=Lf=null}finally{ze=d,se.p=l,$.T=r}}t.current=i,Mt=2}}function my(){if(Mt===2){Mt=0;var t=Hs,i=zr,r=(i.flags&8772)!==0;if((i.subtreeFlags&8772)!==0||r){r=$.T,$.T=null;var l=se.p;se.p=2;var d=ze;ze|=4;try{H_(t,i.alternate,i)}finally{ze=d,se.p=l,$.T=r}}Mt=3}}function py(){if(Mt===4||Mt===3){Mt=0,_c();var t=Hs,i=zr,r=Zi,l=ty;(i.subtreeFlags&10256)!==0||(i.flags&10256)!==0?Mt=5:(Mt=0,zr=Hs=null,gy(t,t.pendingLanes));var d=t.pendingLanes;if(d===0&&(Bs=null),ki(r),i=i.stateNode,Bt&&typeof Bt.onCommitFiberRoot=="function")try{Bt.onCommitFiberRoot(Hn,i,void 0,(i.current.flags&128)===128)}catch{}if(l!==null){i=$.T,d=se.p,se.p=2,$.T=null;try{for(var m=t.onRecoverableError,v=0;v<l.length;v++){var S=l[v];m(S.value,{componentStack:S.stack})}}finally{$.T=i,se.p=d}}(Zi&3)!==0&&Ru(),Ni(t),d=t.pendingLanes,(r&261930)!==0&&(d&42)!==0?t===Af?pl++:(pl=0,Af=t):pl=0,gl(0)}}function gy(t,i){(t.pooledCacheLanes&=i)===0&&(i=t.pooledCache,i!=null&&(t.pooledCache=null,Wo(i)))}function Ru(){return fy(),my(),py(),_y()}function _y(){if(Mt!==5)return!1;var t=Hs,i=bf;bf=0;var r=ki(Zi),l=$.T,d=se.p;try{se.p=32>r?32:r,$.T=null,r=Sf,Sf=null;var m=Hs,v=Zi;if(Mt=0,zr=Hs=null,Zi=0,(ze&6)!==0)throw Error(a(331));var S=ze;if(ze|=4,J_(m.current),$_(m,m.current,v,r),ze=S,gl(0,!1),Bt&&typeof Bt.onPostCommitFiberRoot=="function")try{Bt.onPostCommitFiberRoot(Hn,m)}catch{}return!0}finally{se.p=d,$.T=l,gy(t,i)}}function yy(t,i,r){i=On(r,i),i=tf(t.stateNode,i,2),t=Ps(t,i,2),t!==null&&(ma(t,2),Ni(t))}function Ge(t,i,r){if(t.tag===3)yy(t,t,r);else for(;i!==null;){if(i.tag===3){yy(i,t,r);break}else if(i.tag===1){var l=i.stateNode;if(typeof i.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(Bs===null||!Bs.has(l))){t=On(r,t),r=v_(2),l=Ps(i,r,2),l!==null&&(E_(r,l,i,t),ma(l,2),Ni(l));break}}i=i.return}}function Rf(t,i,r){var l=t.pingCache;if(l===null){l=t.pingCache=new D0;var d=new Set;l.set(i,d)}else d=l.get(i),d===void 0&&(d=new Set,l.set(i,d));d.has(r)||(vf=!0,d.add(r),t=k0.bind(null,t,i,r),i.then(t,t))}function k0(t,i,r){var l=t.pingCache;l!==null&&l.delete(i),t.pingedLanes|=t.suspendedLanes&r,t.warmLanes&=~r,Je===t&&(Ce&r)===r&&(ft===4||ft===3&&(Ce&62914560)===Ce&&300>sn()-Tu?(ze&2)===0&&Br(t,0):Ef|=r,Ur===Ce&&(Ur=0)),Ni(t)}function vy(t,i){i===0&&(i=Sc()),t=xa(t,i),t!==null&&(ma(t,i),Ni(t))}function L0(t){var i=t.memoizedState,r=0;i!==null&&(r=i.retryLane),vy(t,r)}function V0(t,i){var r=0;switch(t.tag){case 31:case 13:var l=t.stateNode,d=t.memoizedState;d!==null&&(r=d.retryLane);break;case 19:l=t.stateNode;break;case 22:l=t.stateNode._retryCache;break;default:throw Error(a(314))}l!==null&&l.delete(i),vy(t,r)}function U0(t,i){return Ot(t,i)}var xu=null,qr=null,xf=!1,Iu=!1,If=!1,Fs=0;function Ni(t){t!==qr&&t.next===null&&(qr===null?xu=qr=t:qr=qr.next=t),Iu=!0,xf||(xf=!0,B0())}function gl(t,i){if(!If&&Iu){If=!0;do for(var r=!1,l=xu;l!==null;){if(t!==0){var d=l.pendingLanes;if(d===0)var m=0;else{var v=l.suspendedLanes,S=l.pingedLanes;m=(1<<31-gt(42|t)+1)-1,m&=d&~(v&~S),m=m&201326741?m&201326741|1:m?m|2:0}m!==0&&(r=!0,Sy(l,m))}else m=Ce,m=li(l,l===Je?m:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(m&3)===0||qn(l,m)||(r=!0,Sy(l,m));l=l.next}while(r);If=!1}}function z0(){Ey()}function Ey(){Iu=xf=!1;var t=0;Fs!==0&&X0()&&(t=Fs);for(var i=sn(),r=null,l=xu;l!==null;){var d=l.next,m=Ty(l,i);m===0?(l.next=null,r===null?xu=d:r.next=d,d===null&&(qr=r)):(r=l,(t!==0||(m&3)!==0)&&(Iu=!0)),l=d}Mt!==0&&Mt!==5||gl(t),Fs!==0&&(Fs=0)}function Ty(t,i){for(var r=t.suspendedLanes,l=t.pingedLanes,d=t.expirationTimes,m=t.pendingLanes&-62914561;0<m;){var v=31-gt(m),S=1<<v,x=d[v];x===-1?((S&r)===0||(S&l)!==0)&&(d[v]=id(S,i)):x<=i&&(t.expiredLanes|=S),m&=~S}if(i=Je,r=Ce,r=li(t,t===i?r:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),l=t.callbackNode,r===0||t===i&&(Fe===2||Fe===9)||t.cancelPendingCommit!==null)return l!==null&&l!==null&&ys(l),t.callbackNode=null,t.callbackPriority=0;if((r&3)===0||qn(t,r)){if(i=r&-r,i===t.callbackPriority)return i;switch(l!==null&&ys(l),ki(r)){case 2:case 8:r=No;break;case 32:r=vs;break;case 268435456:r=yc;break;default:r=vs}return l=by.bind(null,t),r=Ot(r,l),t.callbackPriority=i,t.callbackNode=r,i}return l!==null&&l!==null&&ys(l),t.callbackPriority=2,t.callbackNode=null,2}function by(t,i){if(Mt!==0&&Mt!==5)return t.callbackNode=null,t.callbackPriority=0,null;var r=t.callbackNode;if(Ru()&&t.callbackNode!==r)return null;var l=Ce;return l=li(t,t===Je?l:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),l===0?null:(iy(t,l,i),Ty(t,sn()),t.callbackNode!=null&&t.callbackNode===r?by.bind(null,t):null)}function Sy(t,i){if(Ru())return null;iy(t,i,!0)}function B0(){Z0(function(){(ze&6)!==0?Ot(wo,z0):Ey()})}function Cf(){if(Fs===0){var t=xr;t===0&&(t=ri,ri<<=1,(ri&261888)===0&&(ri=256)),Fs=t}return Fs}function Ay(t){return t==null||typeof t=="symbol"||typeof t=="boolean"?null:typeof t=="function"?t:fr(""+t)}function wy(t,i){var r=i.ownerDocument.createElement("input");return r.name=i.name,r.value=i.value,t.id&&r.setAttribute("form",t.id),i.parentNode.insertBefore(r,i),t=new FormData(t),r.parentNode.removeChild(r),t}function H0(t,i,r,l,d){if(i==="submit"&&r&&r.stateNode===d){var m=Ay((d[Pt]||null).action),v=l.submitter;v&&(i=(i=v[Pt]||null)?Ay(i.formAction):v.getAttribute("formAction"),i!==null&&(m=i,v=null));var S=new vi("action","action",null,l,d);t.push({event:S,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(Fs!==0){var x=v?wy(d,v):new FormData(d);$d(r,{pending:!0,data:x,method:d.method,action:m},null,x)}}else typeof m=="function"&&(S.preventDefault(),x=v?wy(d,v):new FormData(d),$d(r,{pending:!0,data:x,method:d.method,action:m},m,x))},currentTarget:d}]})}}for(var Df=0;Df<dd.length;Df++){var jf=dd[Df],q0=jf.toLowerCase(),F0=jf[0].toUpperCase()+jf.slice(1);Xn(q0,"on"+F0)}Xn(ng,"onAnimationEnd"),Xn(ig,"onAnimationIteration"),Xn(sg,"onAnimationStart"),Xn("dblclick","onDoubleClick"),Xn("focusin","onFocus"),Xn("focusout","onBlur"),Xn(r0,"onTransitionRun"),Xn(o0,"onTransitionStart"),Xn(l0,"onTransitionCancel"),Xn(ag,"onTransitionEnd"),pi("onMouseEnter",["mouseout","mouseover"]),pi("onMouseLeave",["mouseout","mouseover"]),pi("onPointerEnter",["pointerout","pointerover"]),pi("onPointerLeave",["pointerout","pointerover"]),mi("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),mi("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),mi("onBeforeInput",["compositionend","keypress","textInput","paste"]),mi("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),mi("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),mi("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var _l="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(" "),G0=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(_l));function Ny(t,i){i=(i&4)!==0;for(var r=0;r<t.length;r++){var l=t[r],d=l.event;l=l.listeners;e:{var m=void 0;if(i)for(var v=l.length-1;0<=v;v--){var S=l[v],x=S.instance,B=S.currentTarget;if(S=S.listener,x!==m&&d.isPropagationStopped())break e;m=S,d.currentTarget=B;try{m(d)}catch(Q){Fc(Q)}d.currentTarget=null,m=x}else for(v=0;v<l.length;v++){if(S=l[v],x=S.instance,B=S.currentTarget,S=S.listener,x!==m&&d.isPropagationStopped())break e;m=S,d.currentTarget=B;try{m(d)}catch(Q){Fc(Q)}d.currentTarget=null,m=x}}}}function Ie(t,i){var r=i[lr];r===void 0&&(r=i[lr]=new Set);var l=t+"__bubble";r.has(l)||(Ry(i,t,2,!1),r.add(l))}function Of(t,i,r){var l=0;i&&(l|=4),Ry(r,t,l,i)}var Cu="_reactListening"+Math.random().toString(36).slice(2);function Mf(t){if(!t[Cu]){t[Cu]=!0,Io.forEach(function(r){r!=="selectionchange"&&(G0.has(r)||Of(r,!1,t),Of(r,!0,t))});var i=t.nodeType===9?t:t.ownerDocument;i===null||i[Cu]||(i[Cu]=!0,Of("selectionchange",!1,i))}}function Ry(t,i,r,l){switch(nv(i)){case 2:var d=vA;break;case 8:d=EA;break;default:d=$f}r=d.bind(null,i,r,t),d=void 0,!Ea||i!=="touchstart"&&i!=="touchmove"&&i!=="wheel"||(d=!0),l?d!==void 0?t.addEventListener(i,r,{capture:!0,passive:d}):t.addEventListener(i,r,!0):d!==void 0?t.addEventListener(i,r,{passive:d}):t.addEventListener(i,r,!1)}function Pf(t,i,r,l,d){var m=l;if((i&1)===0&&(i&2)===0&&l!==null)e:for(;;){if(l===null)return;var v=l.tag;if(v===3||v===4){var S=l.stateNode.containerInfo;if(S===d)break;if(v===4)for(v=l.return;v!==null;){var x=v.tag;if((x===3||x===4)&&v.stateNode.containerInfo===d)return;v=v.return}for(;S!==null;){if(v=di(S),v===null)return;if(x=v.tag,x===5||x===6||x===26||x===27){l=m=v;continue e}S=S.parentNode}}l=l.return}ws(function(){var B=m,Q=In(r),X=[];e:{var H=rg.get(t);if(H!==void 0){var F=vi,ce=t;switch(t){case"keypress":if(ba(r)===0)break e;case"keydown":case"keyup":F=Bc;break;case"focusin":ce="focus",F=Aa;break;case"focusout":ce="blur",F=Aa;break;case"beforeblur":case"afterblur":F=Aa;break;case"click":if(r.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":F=Ho;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":F=jc;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":F=_;break;case ng:case ig:case sg:F=Mc;break;case ag:F=A;break;case"scroll":case"scrollend":F=Bo;break;case"wheel":F=q;break;case"copy":case"cut":case"paste":F=Pc;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":F=Ui;break;case"toggle":case"beforetoggle":F=be}var ye=(i&4)!==0,We=!ye&&(t==="scroll"||t==="scrollend"),k=ye?H!==null?H+"Capture":null:H;ye=[];for(var D=B,z;D!==null;){var W=D;if(z=W.stateNode,W=W.tag,W!==5&&W!==26&&W!==27||z===null||k===null||(W=Kn(D,k),W!=null&&ye.push(yl(D,W,z))),We)break;D=D.return}0<ye.length&&(H=new F(H,ce,null,r,Q),X.push({event:H,listeners:ye}))}}if((i&7)===0){e:{if(H=t==="mouseover"||t==="pointerover",F=t==="mouseout"||t==="pointerout",H&&r!==Vo&&(ce=r.relatedTarget||r.fromElement)&&(di(ce)||ce[ui]))break e;if((F||H)&&(H=Q.window===Q?Q:(H=Q.ownerDocument)?H.defaultView||H.parentWindow:window,F?(ce=r.relatedTarget||r.toElement,F=B,ce=ce?di(ce):null,ce!==null&&(We=c(ce),ye=ce.tag,ce!==We||ye!==5&&ye!==27&&ye!==6)&&(ce=null)):(F=null,ce=B),F!==ce)){if(ye=Ho,W="onMouseLeave",k="onMouseEnter",D="mouse",(t==="pointerout"||t==="pointerover")&&(ye=Ui,W="onPointerLeave",k="onPointerEnter",D="pointer"),We=F==null?H:yn(F),z=ce==null?H:yn(ce),H=new ye(W,D+"leave",F,r,Q),H.target=We,H.relatedTarget=z,W=null,di(Q)===B&&(ye=new ye(k,D+"enter",ce,r,Q),ye.target=z,ye.relatedTarget=We,W=ye),We=W,F&&ce)t:{for(ye=Y0,k=F,D=ce,z=0,W=k;W;W=ye(W))z++;W=0;for(var me=D;me;me=ye(me))W++;for(;0<z-W;)k=ye(k),z--;for(;0<W-z;)D=ye(D),W--;for(;z--;){if(k===D||D!==null&&k===D.alternate){ye=k;break t}k=ye(k),D=ye(D)}ye=null}else ye=null;F!==null&&xy(X,H,F,ye,!1),ce!==null&&We!==null&&xy(X,We,ce,ye,!0)}}e:{if(H=B?yn(B):window,F=H.nodeName&&H.nodeName.toLowerCase(),F==="select"||F==="input"&&H.type==="file")var Le=Gp;else if(qp(H))if(Yp)Le=i0;else{Le=t0;var ue=e0}else F=H.nodeName,!F||F.toLowerCase()!=="input"||H.type!=="checkbox"&&H.type!=="radio"?B&&dr(B.elementType)&&(Le=Gp):Le=n0;if(Le&&(Le=Le(t,B))){Fp(X,Le,r,Q);break e}ue&&ue(t,H,B),t==="focusout"&&B&&H.type==="number"&&B.memoizedProps.value!=null&&Po(H,"number",H.value)}switch(ue=B?yn(B):window,t){case"focusin":(qp(ue)||ue.contentEditable==="true")&&(Er=ue,cd=B,Ko=null);break;case"focusout":Ko=cd=Er=null;break;case"mousedown":ud=!0;break;case"contextmenu":case"mouseup":case"dragend":ud=!1,eg(X,r,Q);break;case"selectionchange":if(a0)break;case"keydown":case"keyup":eg(X,r,Q)}var we;if(Ue)e:{switch(t){case"compositionstart":var De="onCompositionStart";break e;case"compositionend":De="onCompositionEnd";break e;case"compositionupdate":De="onCompositionUpdate";break e}De=void 0}else vr?wa(t,r)&&(De="onCompositionEnd"):t==="keydown"&&r.keyCode===229&&(De="onCompositionStart");De&&(bi&&r.locale!=="ko"&&(vr||De!=="onCompositionStart"?De==="onCompositionEnd"&&vr&&(we=zo()):(yi=Q,Uo="value"in yi?yi.value:yi.textContent,vr=!0)),ue=Du(B,De),0<ue.length&&(De=new Ti(De,t,null,r,Q),X.push({event:De,listeners:ue}),we?De.data=we:(we=yr(r),we!==null&&(De.data=we)))),(we=Dn?WS(t,r):XS(t,r))&&(De=Du(B,"onBeforeInput"),0<De.length&&(ue=new Ti("onBeforeInput","beforeinput",null,r,Q),X.push({event:ue,listeners:De}),ue.data=we)),H0(X,t,B,r,Q)}Ny(X,i)})}function yl(t,i,r){return{instance:t,listener:i,currentTarget:r}}function Du(t,i){for(var r=i+"Capture",l=[];t!==null;){var d=t,m=d.stateNode;if(d=d.tag,d!==5&&d!==26&&d!==27||m===null||(d=Kn(t,r),d!=null&&l.unshift(yl(t,d,m)),d=Kn(t,i),d!=null&&l.push(yl(t,d,m))),t.tag===3)return l;t=t.return}return[]}function Y0(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5&&t.tag!==27);return t||null}function xy(t,i,r,l,d){for(var m=i._reactName,v=[];r!==null&&r!==l;){var S=r,x=S.alternate,B=S.stateNode;if(S=S.tag,x!==null&&x===l)break;S!==5&&S!==26&&S!==27||B===null||(x=B,d?(B=Kn(r,m),B!=null&&v.unshift(yl(r,B,x))):d||(B=Kn(r,m),B!=null&&v.push(yl(r,B,x)))),r=r.return}v.length!==0&&t.push({event:i,listeners:v})}var K0=/\r\n?/g,Q0=/\u0000|\uFFFD/g;function Iy(t){return(typeof t=="string"?t:""+t).replace(K0,` `).replace(Q0,"")}function Cy(t,i){return i=Iy(i),Iy(t)===i}function $e(t,i,r,l,d,m){switch(r){case"children":typeof l=="string"?i==="body"||i==="textarea"&&l===""||cn(t,l):(typeof l=="number"||typeof l=="bigint")&&i!=="body"&&cn(t,""+l);break;case"className":vn(t,"class",l);break;case"tabIndex":vn(t,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":vn(t,r,l);break;case"style":Lo(t,l,m);break;case"data":if(i!=="object"){vn(t,"data",l);break}case"src":case"href":if(l===""&&(i!=="a"||r!=="href")){t.removeAttribute(r);break}if(l==null||typeof l=="function"||typeof l=="symbol"||typeof l=="boolean"){t.removeAttribute(r);break}l=fr(""+l),t.setAttribute(r,l);break;case"action":case"formAction":if(typeof l=="function"){t.setAttribute(r,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof m=="function"&&(r==="formAction"?(i!=="input"&&$e(t,i,"name",d.name,d,null),$e(t,i,"formEncType",d.formEncType,d,null),$e(t,i,"formMethod",d.formMethod,d,null),$e(t,i,"formTarget",d.formTarget,d,null)):($e(t,i,"encType",d.encType,d,null),$e(t,i,"method",d.method,d,null),$e(t,i,"target",d.target,d,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){t.removeAttribute(r);break}l=fr(""+l),t.setAttribute(r,l);break;case"onClick":l!=null&&(t.onclick=Yn);break;case"onScroll":l!=null&&Ie("scroll",t);break;case"onScrollEnd":l!=null&&Ie("scrollend",t);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(a(61));if(r=l.__html,r!=null){if(d.children!=null)throw Error(a(60));t.innerHTML=r}}break;case"multiple":t.multiple=l&&typeof l!="function"&&typeof l!="symbol";break;case"muted":t.muted=l&&typeof l!="function"&&typeof l!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(l==null||typeof l=="function"||typeof l=="boolean"||typeof l=="symbol"){t.removeAttribute("xlink:href");break}r=fr(""+l),t.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",r);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":l!=null&&typeof l!="function"&&typeof l!="symbol"?t.setAttribute(r,""+l):t.removeAttribute(r);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":l&&typeof l!="function"&&typeof l!="symbol"?t.setAttribute(r,""):t.removeAttribute(r);break;case"capture":case"download":l===!0?t.setAttribute(r,""):l!==!1&&l!=null&&typeof l!="function"&&typeof l!="symbol"?t.setAttribute(r,l):t.removeAttribute(r);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!="function"&&typeof l!="symbol"&&!isNaN(l)&&1<=l?t.setAttribute(r,l):t.removeAttribute(r);break;case"rowSpan":case"start":l==null||typeof l=="function"||typeof l=="symbol"||isNaN(l)?t.removeAttribute(r):t.setAttribute(r,l);break;case"popover":Ie("beforetoggle",t),Ie("toggle",t),ur(t,"popover",l);break;case"xlinkActuate":At(t,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":At(t,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":At(t,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":At(t,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":At(t,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":At(t,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":At(t,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":At(t,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":At(t,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":ur(t,"is",l);break;case"innerText":case"textContent":break;default:(!(2<r.length)||r[0]!=="o"&&r[0]!=="O"||r[1]!=="n"&&r[1]!=="N")&&(r=Dc.get(r)||r,ur(t,r,l))}}function kf(t,i,r,l,d,m){switch(r){case"style":Lo(t,l,m);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(a(61));if(r=l.__html,r!=null){if(d.children!=null)throw Error(a(60));t.innerHTML=r}}break;case"children":typeof l=="string"?cn(t,l):(typeof l=="number"||typeof l=="bigint")&&cn(t,""+l);break;case"onScroll":l!=null&&Ie("scroll",t);break;case"onScrollEnd":l!=null&&Ie("scrollend",t);break;case"onClick":l!=null&&(t.onclick=Yn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Co.hasOwnProperty(r))e:{if(r[0]==="o"&&r[1]==="n"&&(d=r.endsWith("Capture"),i=r.slice(2,d?r.length-7:void 0),m=t[Pt]||null,m=m!=null?m[r]:null,typeof m=="function"&&t.removeEventListener(i,m,d),typeof l=="function")){typeof m!="function"&&m!==null&&(r in t?t[r]=null:t.hasAttribute(r)&&t.removeAttribute(r)),t.addEventListener(i,l,d);break e}r in t?t[r]=l:l===!0?t.setAttribute(r,""):ur(t,r,l)}}}function Yt(t,i,r){switch(i){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ie("error",t),Ie("load",t);var l=!1,d=!1,m;for(m in r)if(r.hasOwnProperty(m)){var v=r[m];if(v!=null)switch(m){case"src":l=!0;break;case"srcSet":d=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(a(137,i));default:$e(t,i,m,v,r,null)}}d&&$e(t,i,"srcSet",r.srcSet,r,null),l&&$e(t,i,"src",r.src,r,null);return;case"input":Ie("invalid",t);var S=m=v=d=null,x=null,B=null;for(l in r)if(r.hasOwnProperty(l)){var Q=r[l];if(Q!=null)switch(l){case"name":d=Q;break;case"type":v=Q;break;case"checked":x=Q;break;case"defaultChecked":B=Q;break;case"value":m=Q;break;case"defaultValue":S=Q;break;case"children":case"dangerouslySetInnerHTML":if(Q!=null)throw Error(a(137,i));break;default:$e(t,i,l,Q,r,null)}}xc(t,m,S,x,B,v,d,!1);return;case"select":Ie("invalid",t),l=v=m=null;for(d in r)if(r.hasOwnProperty(d)&&(S=r[d],S!=null))switch(d){case"value":m=S;break;case"defaultValue":v=S;break;case"multiple":l=S;default:$e(t,i,d,S,r,null)}i=m,r=v,t.multiple=!!l,i!=null?Ts(t,!!l,i,!1):r!=null&&Ts(t,!!l,r,!0);return;case"textarea":Ie("invalid",t),m=d=l=null;for(v in r)if(r.hasOwnProperty(v)&&(S=r[v],S!=null))switch(v){case"value":l=S;break;case"defaultValue":d=S;break;case"children":m=S;break;case"dangerouslySetInnerHTML":if(S!=null)throw Error(a(91));break;default:$e(t,i,v,S,r,null)}bs(t,l,d,m);return;case"option":for(x in r)r.hasOwnProperty(x)&&(l=r[x],l!=null)&&(x==="selected"?t.selected=l&&typeof l!="function"&&typeof l!="symbol":$e(t,i,x,l,r,null));return;case"dialog":Ie("beforetoggle",t),Ie("toggle",t),Ie("cancel",t),Ie("close",t);break;case"iframe":case"object":Ie("load",t);break;case"video":case"audio":for(l=0;l<_l.length;l++)Ie(_l[l],t);break;case"image":Ie("error",t),Ie("load",t);break;case"details":Ie("toggle",t);break;case"embed":case"source":case"link":Ie("error",t),Ie("load",t);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(B in r)if(r.hasOwnProperty(B)&&(l=r[B],l!=null))switch(B){case"children":case"dangerouslySetInnerHTML":throw Error(a(137,i));default:$e(t,i,B,l,r,null)}return;default:if(dr(i)){for(Q in r)r.hasOwnProperty(Q)&&(l=r[Q],l!==void 0&&kf(t,i,Q,l,r,void 0));return}}for(S in r)r.hasOwnProperty(S)&&(l=r[S],l!=null&&$e(t,i,S,l,r,null))}function $0(t,i,r,l){switch(i){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var d=null,m=null,v=null,S=null,x=null,B=null,Q=null;for(F in r){var X=r[F];if(r.hasOwnProperty(F)&&X!=null)switch(F){case"checked":break;case"value":break;case"defaultValue":x=X;default:l.hasOwnProperty(F)||$e(t,i,F,null,l,X)}}for(var H in l){var F=l[H];if(X=r[H],l.hasOwnProperty(H)&&(F!=null||X!=null))switch(H){case"type":m=F;break;case"name":d=F;break;case"checked":B=F;break;case"defaultChecked":Q=F;break;case"value":v=F;break;case"defaultValue":S=F;break;case"children":case"dangerouslySetInnerHTML":if(F!=null)throw Error(a(137,i));break;default:F!==X&&$e(t,i,H,F,l,X)}}hr(t,v,S,x,B,Q,m,d);return;case"select":F=v=S=H=null;for(m in r)if(x=r[m],r.hasOwnProperty(m)&&x!=null)switch(m){case"value":break;case"multiple":F=x;default:l.hasOwnProperty(m)||$e(t,i,m,null,l,x)}for(d in l)if(m=l[d],x=r[d],l.hasOwnProperty(d)&&(m!=null||x!=null))switch(d){case"value":H=m;break;case"defaultValue":S=m;break;case"multiple":v=m;default:m!==x&&$e(t,i,d,m,l,x)}i=S,r=v,l=F,H!=null?Ts(t,!!r,H,!1):!!l!=!!r&&(i!=null?Ts(t,!!r,i,!0):Ts(t,!!r,r?[]:"",!1));return;case"textarea":F=H=null;for(S in r)if(d=r[S],r.hasOwnProperty(S)&&d!=null&&!l.hasOwnProperty(S))switch(S){case"value":break;case"children":break;default:$e(t,i,S,null,l,d)}for(v in l)if(d=l[v],m=r[v],l.hasOwnProperty(v)&&(d!=null||m!=null))switch(v){case"value":H=d;break;case"defaultValue":F=d;break;case"children":break;case"dangerouslySetInnerHTML":if(d!=null)throw Error(a(91));break;default:d!==m&&$e(t,i,v,d,l,m)}Ic(t,H,F);return;case"option":for(var ce in r)H=r[ce],r.hasOwnProperty(ce)&&H!=null&&!l.hasOwnProperty(ce)&&(ce==="selected"?t.selected=!1:$e(t,i,ce,null,l,H));for(x in l)H=l[x],F=r[x],l.hasOwnProperty(x)&&H!==F&&(H!=null||F!=null)&&(x==="selected"?t.selected=H&&typeof H!="function"&&typeof H!="symbol":$e(t,i,x,H,l,F));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var ye in r)H=r[ye],r.hasOwnProperty(ye)&&H!=null&&!l.hasOwnProperty(ye)&&$e(t,i,ye,null,l,H);for(B in l)if(H=l[B],F=r[B],l.hasOwnProperty(B)&&H!==F&&(H!=null||F!=null))switch(B){case"children":case"dangerouslySetInnerHTML":if(H!=null)throw Error(a(137,i));break;default:$e(t,i,B,H,l,F)}return;default:if(dr(i)){for(var We in r)H=r[We],r.hasOwnProperty(We)&&H!==void 0&&!l.hasOwnProperty(We)&&kf(t,i,We,void 0,l,H);for(Q in l)H=l[Q],F=r[Q],!l.hasOwnProperty(Q)||H===F||H===void 0&&F===void 0||kf(t,i,Q,H,l,F);return}}for(var k in r)H=r[k],r.hasOwnProperty(k)&&H!=null&&!l.hasOwnProperty(k)&&$e(t,i,k,null,l,H);for(X in l)H=l[X],F=r[X],!l.hasOwnProperty(X)||H===F||H==null&&F==null||$e(t,i,X,H,l,F)}function Dy(t){switch(t){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function W0(){if(typeof performance.getEntriesByType=="function"){for(var t=0,i=0,r=performance.getEntriesByType("resource"),l=0;l<r.length;l++){var d=r[l],m=d.transferSize,v=d.initiatorType,S=d.duration;if(m&&S&&Dy(v)){for(v=0,S=d.responseEnd,l+=1;l<r.length;l++){var x=r[l],B=x.startTime;if(B>S)break;var Q=x.transferSize,X=x.initiatorType;Q&&Dy(X)&&(x=x.responseEnd,v+=Q*(x<S?1:(S-B)/(x-B)))}if(--l,i+=8*(m+v)/(d.duration/1e3),t++,10<t)break}}if(0<t)return i/t/1e6}return navigator.connection&&(t=navigator.connection.downlink,typeof t=="number")?t:5}var Lf=null,Vf=null;function ju(t){return t.nodeType===9?t:t.ownerDocument}function jy(t){switch(t){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Oy(t,i){if(t===0)switch(i){case"svg":return 1;case"math":return 2;default:return 0}return t===1&&i==="foreignObject"?0:t}function Uf(t,i){return t==="textarea"||t==="noscript"||typeof i.children=="string"||typeof i.children=="number"||typeof i.children=="bigint"||typeof i.dangerouslySetInnerHTML=="object"&&i.dangerouslySetInnerHTML!==null&&i.dangerouslySetInnerHTML.__html!=null}var zf=null;function X0(){var t=window.event;return t&&t.type==="popstate"?t===zf?!1:(zf=t,!0):(zf=null,!1)}var My=typeof setTimeout=="function"?setTimeout:void 0,J0=typeof clearTimeout=="function"?clearTimeout:void 0,Py=typeof Promise=="function"?Promise:void 0,Z0=typeof queueMicrotask=="function"?queueMicrotask:typeof Py<"u"?function(t){return Py.resolve(null).then(t).catch(eA)}:My;function eA(t){setTimeout(function(){throw t})}function Gs(t){return t==="head"}function ky(t,i){var r=i,l=0;do{var d=r.nextSibling;if(t.removeChild(r),d&&d.nodeType===8)if(r=d.data,r==="/$"||r==="/&"){if(l===0){t.removeChild(d),Kr(i);return}l--}else if(r==="$"||r==="$?"||r==="$~"||r==="$!"||r==="&")l++;else if(r==="html")vl(t.ownerDocument.documentElement);else if(r==="head"){r=t.ownerDocument.head,vl(r);for(var m=r.firstChild;m;){var v=m.nextSibling,S=m.nodeName;m[hi]||S==="SCRIPT"||S==="STYLE"||S==="LINK"&&m.rel.toLowerCase()==="stylesheet"||r.removeChild(m),m=v}}else r==="body"&&vl(t.ownerDocument.body);r=d}while(r);Kr(i)}function Ly(t,i){var r=t;t=0;do{var l=r.nextSibling;if(r.nodeType===1?i?(r._stashedDisplay=r.style.display,r.style.display="none"):(r.style.display=r._stashedDisplay||"",r.getAttribute("style")===""&&r.removeAttribute("style")):r.nodeType===3&&(i?(r._stashedText=r.nodeValue,r.nodeValue=""):r.nodeValue=r._stashedText||""),l&&l.nodeType===8)if(r=l.data,r==="/$"){if(t===0)break;t--}else r!=="$"&&r!=="$?"&&r!=="$~"&&r!=="$!"||t++;r=l}while(r)}function Bf(t){var i=t.firstChild;for(i&&i.nodeType===10&&(i=i.nextSibling);i;){var r=i;switch(i=i.nextSibling,r.nodeName){case"HTML":case"HEAD":case"BODY":Bf(r),cr(r);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(r.rel.toLowerCase()==="stylesheet")continue}t.removeChild(r)}}function tA(t,i,r,l){for(;t.nodeType===1;){var d=r;if(t.nodeName.toLowerCase()!==i.toLowerCase()){if(!l&&(t.nodeName!=="INPUT"||t.type!=="hidden"))break}else if(l){if(!t[hi])switch(i){case"meta":if(!t.hasAttribute("itemprop"))break;return t;case"link":if(m=t.getAttribute("rel"),m==="stylesheet"&&t.hasAttribute("data-precedence"))break;if(m!==d.rel||t.getAttribute("href")!==(d.href==null||d.href===""?null:d.href)||t.getAttribute("crossorigin")!==(d.crossOrigin==null?null:d.crossOrigin)||t.getAttribute("title")!==(d.title==null?null:d.title))break;return t;case"style":if(t.hasAttribute("data-precedence"))break;return t;case"script":if(m=t.getAttribute("src"),(m!==(d.src==null?null:d.src)||t.getAttribute("type")!==(d.type==null?null:d.type)||t.getAttribute("crossorigin")!==(d.crossOrigin==null?null:d.crossOrigin))&&m&&t.hasAttribute("async")&&!t.hasAttribute("itemprop"))break;return t;default:return t}}else if(i==="input"&&t.type==="hidden"){var m=d.name==null?null:""+d.name;if(d.type==="hidden"&&t.getAttribute("name")===m)return t}else return t;if(t=Vn(t.nextSibling),t===null)break}return null}function nA(t,i,r){if(i==="")return null;for(;t.nodeType!==3;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!r||(t=Vn(t.nextSibling),t===null))return null;return t}function Vy(t,i){for(;t.nodeType!==8;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!i||(t=Vn(t.nextSibling),t===null))return null;return t}function Hf(t){return t.data==="$?"||t.data==="$~"}function qf(t){return t.data==="$!"||t.data==="$?"&&t.ownerDocument.readyState!=="loading"}function iA(t,i){var r=t.ownerDocument;if(t.data==="$~")t._reactRetry=i;else if(t.data!=="$?"||r.readyState!=="loading")i();else{var l=function(){i(),r.removeEventListener("DOMContentLoaded",l)};r.addEventListener("DOMContentLoaded",l),t._reactRetry=l}}function Vn(t){for(;t!=null;t=t.nextSibling){var i=t.nodeType;if(i===1||i===3)break;if(i===8){if(i=t.data,i==="$"||i==="$!"||i==="$?"||i==="$~"||i==="&"||i==="F!"||i==="F")break;if(i==="/$"||i==="/&")return null}}return t}var Ff=null;function Uy(t){t=t.nextSibling;for(var i=0;t;){if(t.nodeType===8){var r=t.data;if(r==="/$"||r==="/&"){if(i===0)return Vn(t.nextSibling);i--}else r!=="$"&&r!=="$!"&&r!=="$?"&&r!=="$~"&&r!=="&"||i++}t=t.nextSibling}return null}function zy(t){t=t.previousSibling;for(var i=0;t;){if(t.nodeType===8){var r=t.data;if(r==="$"||r==="$!"||r==="$?"||r==="$~"||r==="&"){if(i===0)return t;i--}else r!=="/$"&&r!=="/&"||i++}t=t.previousSibling}return null}function By(t,i,r){switch(i=ju(r),t){case"html":if(t=i.documentElement,!t)throw Error(a(452));return t;case"head":if(t=i.head,!t)throw Error(a(453));return t;case"body":if(t=i.body,!t)throw Error(a(454));return t;default:throw Error(a(451))}}function vl(t){for(var i=t.attributes;i.length;)t.removeAttributeNode(i[0]);cr(t)}var Un=new Map,Hy=new Set;function Ou(t){return typeof t.getRootNode=="function"?t.getRootNode():t.nodeType===9?t:t.ownerDocument}var es=se.d;se.d={f:sA,r:aA,D:rA,C:oA,L:lA,m:cA,X:hA,S:uA,M:dA};function sA(){var t=es.f(),i=Au();return t||i}function aA(t){var i=xn(t);i!==null&&i.tag===5&&i.type==="form"?a_(i):es.r(t)}var Fr=typeof document>"u"?null:document;function qy(t,i,r){var l=Fr;if(l&&typeof i=="string"&&i){var d=ln(i);d='link[rel="'+t+'"][href="'+d+'"]',typeof r=="string"&&(d+='[crossorigin="'+r+'"]'),Hy.has(d)||(Hy.add(d),t={rel:t,crossOrigin:r,href:i},l.querySelector(d)===null&&(i=l.createElement("link"),Yt(i,"link",t),St(i),l.head.appendChild(i)))}}function rA(t){es.D(t),qy("dns-prefetch",t,null)}function oA(t,i){es.C(t,i),qy("preconnect",t,i)}function lA(t,i,r){es.L(t,i,r);var l=Fr;if(l&&t&&i){var d='link[rel="preload"][as="'+ln(i)+'"]';i==="image"&&r&&r.imageSrcSet?(d+='[imagesrcset="'+ln(r.imageSrcSet)+'"]',typeof r.imageSizes=="string"&&(d+='[imagesizes="'+ln(r.imageSizes)+'"]')):d+='[href="'+ln(t)+'"]';var m=d;switch(i){case"style":m=Gr(t);break;case"script":m=Yr(t)}Un.has(m)||(t=b({rel:"preload",href:i==="image"&&r&&r.imageSrcSet?void 0:t,as:i},r),Un.set(m,t),l.querySelector(d)!==null||i==="style"&&l.querySelector(El(m))||i==="script"&&l.querySelector(Tl(m))||(i=l.createElement("link"),Yt(i,"link",t),St(i),l.head.appendChild(i)))}}function cA(t,i){es.m(t,i);var r=Fr;if(r&&t){var l=i&&typeof i.as=="string"?i.as:"script",d='link[rel="modulepreload"][as="'+ln(l)+'"][href="'+ln(t)+'"]',m=d;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":m=Yr(t)}if(!Un.has(m)&&(t=b({rel:"modulepreload",href:t},i),Un.set(m,t),r.querySelector(d)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(r.querySelector(Tl(m)))return}l=r.createElement("link"),Yt(l,"link",t),St(l),r.head.appendChild(l)}}}function uA(t,i,r){es.S(t,i,r);var l=Fr;if(l&&t){var d=fi(l).hoistableStyles,m=Gr(t);i=i||"default";var v=d.get(m);if(!v){var S={loading:0,preload:null};if(v=l.querySelector(El(m)))S.loading=5;else{t=b({rel:"stylesheet",href:t,"data-precedence":i},r),(r=Un.get(m))&&Gf(t,r);var x=v=l.createElement("link");St(x),Yt(x,"link",t),x._p=new Promise(function(B,Q){x.onload=B,x.onerror=Q}),x.addEventListener("load",function(){S.loading|=1}),x.addEventListener("error",function(){S.loading|=2}),S.loading|=4,Mu(v,i,l)}v={type:"stylesheet",instance:v,count:1,state:S},d.set(m,v)}}}function hA(t,i){es.X(t,i);var r=Fr;if(r&&t){var l=fi(r).hoistableScripts,d=Yr(t),m=l.get(d);m||(m=r.querySelector(Tl(d)),m||(t=b({src:t,async:!0},i),(i=Un.get(d))&&Yf(t,i),m=r.createElement("script"),St(m),Yt(m,"link",t),r.head.appendChild(m)),m={type:"script",instance:m,count:1,state:null},l.set(d,m))}}function dA(t,i){es.M(t,i);var r=Fr;if(r&&t){var l=fi(r).hoistableScripts,d=Yr(t),m=l.get(d);m||(m=r.querySelector(Tl(d)),m||(t=b({src:t,async:!0,type:"module"},i),(i=Un.get(d))&&Yf(t,i),m=r.createElement("script"),St(m),Yt(m,"link",t),r.head.appendChild(m)),m={type:"script",instance:m,count:1,state:null},l.set(d,m))}}function Fy(t,i,r,l){var d=(d=Ae.current)?Ou(d):null;if(!d)throw Error(a(446));switch(t){case"meta":case"title":return null;case"style":return typeof r.precedence=="string"&&typeof r.href=="string"?(i=Gr(r.href),r=fi(d).hoistableStyles,l=r.get(i),l||(l={type:"style",instance:null,count:0,state:null},r.set(i,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(r.rel==="stylesheet"&&typeof r.href=="string"&&typeof r.precedence=="string"){t=Gr(r.href);var m=fi(d).hoistableStyles,v=m.get(t);if(v||(d=d.ownerDocument||d,v={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},m.set(t,v),(m=d.querySelector(El(t)))&&!m._p&&(v.instance=m,v.state.loading=5),Un.has(t)||(r={rel:"preload",as:"style",href:r.href,crossOrigin:r.crossOrigin,integrity:r.integrity,media:r.media,hrefLang:r.hrefLang,referrerPolicy:r.referrerPolicy},Un.set(t,r),m||fA(d,t,r,v.state))),i&&l===null)throw Error(a(528,""));return v}if(i&&l!==null)throw Error(a(529,""));return null;case"script":return i=r.async,r=r.src,typeof r=="string"&&i&&typeof i!="function"&&typeof i!="symbol"?(i=Yr(r),r=fi(d).hoistableScripts,l=r.get(i),l||(l={type:"script",instance:null,count:0,state:null},r.set(i,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(a(444,t))}}function Gr(t){return'href="'+ln(t)+'"'}function El(t){return'link[rel="stylesheet"]['+t+"]"}function Gy(t){return b({},t,{"data-precedence":t.precedence,precedence:null})}function fA(t,i,r,l){t.querySelector('link[rel="preload"][as="style"]['+i+"]")?l.loading=1:(i=t.createElement("link"),l.preload=i,i.addEventListener("load",function(){return l.loading|=1}),i.addEventListener("error",function(){return l.loading|=2}),Yt(i,"link",r),St(i),t.head.appendChild(i))}function Yr(t){return'[src="'+ln(t)+'"]'}function Tl(t){return"script[async]"+t}function Yy(t,i,r){if(i.count++,i.instance===null)switch(i.type){case"style":var l=t.querySelector('style[data-href~="'+ln(r.href)+'"]');if(l)return i.instance=l,St(l),l;var d=b({},r,{"data-href":r.href,"data-precedence":r.precedence,href:null,precedence:null});return l=(t.ownerDocument||t).createElement("style"),St(l),Yt(l,"style",d),Mu(l,r.precedence,t),i.instance=l;case"stylesheet":d=Gr(r.href);var m=t.querySelector(El(d));if(m)return i.state.loading|=4,i.instance=m,St(m),m;l=Gy(r),(d=Un.get(d))&&Gf(l,d),m=(t.ownerDocument||t).createElement("link"),St(m);var v=m;return v._p=new Promise(function(S,x){v.onload=S,v.onerror=x}),Yt(m,"link",l),i.state.loading|=4,Mu(m,r.precedence,t),i.instance=m;case"script":return m=Yr(r.src),(d=t.querySelector(Tl(m)))?(i.instance=d,St(d),d):(l=r,(d=Un.get(m))&&(l=b({},r),Yf(l,d)),t=t.ownerDocument||t,d=t.createElement("script"),St(d),Yt(d,"link",l),t.head.appendChild(d),i.instance=d);case"void":return null;default:throw Error(a(443,i.type))}else i.type==="stylesheet"&&(i.state.loading&4)===0&&(l=i.instance,i.state.loading|=4,Mu(l,r.precedence,t));return i.instance}function Mu(t,i,r){for(var l=r.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),d=l.length?l[l.length-1]:null,m=d,v=0;v<l.length;v++){var S=l[v];if(S.dataset.precedence===i)m=S;else if(m!==d)break}m?m.parentNode.insertBefore(t,m.nextSibling):(i=r.nodeType===9?r.head:r,i.insertBefore(t,i.firstChild))}function Gf(t,i){t.crossOrigin==null&&(t.crossOrigin=i.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=i.referrerPolicy),t.title==null&&(t.title=i.title)}function Yf(t,i){t.crossOrigin==null&&(t.crossOrigin=i.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=i.referrerPolicy),t.integrity==null&&(t.integrity=i.integrity)}var Pu=null;function Ky(t,i,r){if(Pu===null){var l=new Map,d=Pu=new Map;d.set(r,l)}else d=Pu,l=d.get(r),l||(l=new Map,d.set(r,l));if(l.has(t))return l;for(l.set(t,null),r=r.getElementsByTagName(t),d=0;d<r.length;d++){var m=r[d];if(!(m[hi]||m[bt]||t==="link"&&m.getAttribute("rel")==="stylesheet")&&m.namespaceURI!=="http://www.w3.org/2000/svg"){var v=m.getAttribute(i)||"";v=t+v;var S=l.get(v);S?S.push(m):l.set(v,[m])}}return l}function Qy(t,i,r){t=t.ownerDocument||t,t.head.insertBefore(r,i==="title"?t.querySelector("head > title"):null)}function mA(t,i,r){if(r===1||i.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof i.precedence!="string"||typeof i.href!="string"||i.href==="")break;return!0;case"link":if(typeof i.rel!="string"||typeof i.href!="string"||i.href===""||i.onLoad||i.onError)break;return i.rel==="stylesheet"?(t=i.disabled,typeof i.precedence=="string"&&t==null):!0;case"script":if(i.async&&typeof i.async!="function"&&typeof i.async!="symbol"&&!i.onLoad&&!i.onError&&i.src&&typeof i.src=="string")return!0}return!1}function $y(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}function pA(t,i,r,l){if(r.type==="stylesheet"&&(typeof l.media!="string"||matchMedia(l.media).matches!==!1)&&(r.state.loading&4)===0){if(r.instance===null){var d=Gr(l.href),m=i.querySelector(El(d));if(m){i=m._p,i!==null&&typeof i=="object"&&typeof i.then=="function"&&(t.count++,t=ku.bind(t),i.then(t,t)),r.state.loading|=4,r.instance=m,St(m);return}m=i.ownerDocument||i,l=Gy(l),(d=Un.get(d))&&Gf(l,d),m=m.createElement("link"),St(m);var v=m;v._p=new Promise(function(S,x){v.onload=S,v.onerror=x}),Yt(m,"link",l),r.instance=m}t.stylesheets===null&&(t.stylesheets=new Map),t.stylesheets.set(r,i),(i=r.state.preload)&&(r.state.loading&3)===0&&(t.count++,r=ku.bind(t),i.addEventListener("load",r),i.addEventListener("error",r))}}var Kf=0;function gA(t,i){return t.stylesheets&&t.count===0&&Vu(t,t.stylesheets),0<t.count||0<t.imgCount?function(r){var l=setTimeout(function(){if(t.stylesheets&&Vu(t,t.stylesheets),t.unsuspend){var m=t.unsuspend;t.unsuspend=null,m()}},6e4+i);0<t.imgBytes&&Kf===0&&(Kf=62500*W0());var d=setTimeout(function(){if(t.waitingForImages=!1,t.count===0&&(t.stylesheets&&Vu(t,t.stylesheets),t.unsuspend)){var m=t.unsuspend;t.unsuspend=null,m()}},(t.imgBytes>Kf?50:800)+i);return t.unsuspend=r,function(){t.unsuspend=null,clearTimeout(l),clearTimeout(d)}}:null}function ku(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Vu(this,this.stylesheets);else if(this.unsuspend){var t=this.unsuspend;this.unsuspend=null,t()}}}var Lu=null;function Vu(t,i){t.stylesheets=null,t.unsuspend!==null&&(t.count++,Lu=new Map,i.forEach(_A,t),Lu=null,ku.call(t))}function _A(t,i){if(!(i.state.loading&4)){var r=Lu.get(t);if(r)var l=r.get(null);else{r=new Map,Lu.set(t,r);for(var d=t.querySelectorAll("link[data-precedence],style[data-precedence]"),m=0;m<d.length;m++){var v=d[m];(v.nodeName==="LINK"||v.getAttribute("media")!=="not all")&&(r.set(v.dataset.precedence,v),l=v)}l&&r.set(null,l)}d=i.instance,v=d.getAttribute("data-precedence"),m=r.get(v)||l,m===l&&r.set(null,d),r.set(v,d),this.count++,l=ku.bind(this),d.addEventListener("load",l),d.addEventListener("error",l),m?m.parentNode.insertBefore(d,m.nextSibling):(t=t.nodeType===9?t.head:t,t.insertBefore(d,t.firstChild)),i.state.loading|=4}}var bl={$$typeof:oe,Provider:null,Consumer:null,_currentValue:ge,_currentValue2:ge,_threadCount:0};function yA(t,i,r,l,d,m,v,S,x){this.tag=1,this.containerInfo=t,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=ci(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ci(0),this.hiddenUpdates=ci(null),this.identifierPrefix=l,this.onUncaughtError=d,this.onCaughtError=m,this.onRecoverableError=v,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=x,this.incompleteTransitions=new Map}function Wy(t,i,r,l,d,m,v,S,x,B,Q,X){return t=new yA(t,i,r,v,x,B,Q,X,S),i=1,m===!0&&(i|=24),m=Tn(3,null,null,i),t.current=m,m.stateNode=t,i=wd(),i.refCount++,t.pooledCache=i,i.refCount++,m.memoizedState={element:l,isDehydrated:r,cache:i},Id(m),t}function Xy(t){return t?(t=Sr,t):Sr}function Jy(t,i,r,l,d,m){d=Xy(d),l.context===null?l.context=d:l.pendingContext=d,l=Ms(i),l.payload={element:r},m=m===void 0?null:m,m!==null&&(l.callback=m),r=Ps(t,l,i),r!==null&&(mn(r,t,i),el(r,t,i))}function Zy(t,i){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var r=t.retryLane;t.retryLane=r!==0&&r<i?r:i}}function Qf(t,i){Zy(t,i),(t=t.alternate)&&Zy(t,i)}function ev(t){if(t.tag===13||t.tag===31){var i=xa(t,67108864);i!==null&&mn(i,t,67108864),Qf(t,67108864)}}function tv(t){if(t.tag===13||t.tag===31){var i=Nn();i=ga(i);var r=xa(t,i);r!==null&&mn(r,t,i),Qf(t,i)}}var Uu=!0;function vA(t,i,r,l){var d=$.T;$.T=null;var m=se.p;try{se.p=2,$f(t,i,r,l)}finally{se.p=m,$.T=d}}function EA(t,i,r,l){var d=$.T;$.T=null;var m=se.p;try{se.p=8,$f(t,i,r,l)}finally{se.p=m,$.T=d}}function $f(t,i,r,l){if(Uu){var d=Wf(l);if(d===null)Pf(t,i,l,zu,r),iv(t,l);else if(bA(d,t,i,r,l))l.stopPropagation();else if(iv(t,l),i&4&&-1<TA.indexOf(t)){for(;d!==null;){var m=xn(d);if(m!==null)switch(m.tag){case 3:if(m=m.stateNode,m.current.memoizedState.isDehydrated){var v=oi(m.pendingLanes);if(v!==0){var S=m;for(S.pendingLanes|=2,S.entangledLanes|=2;v;){var x=1<<31-gt(v);S.entanglements[1]|=x,v&=~x}Ni(m),(ze&6)===0&&(bu=sn()+500,gl(0))}}break;case 31:case 13:S=xa(m,2),S!==null&&mn(S,m,2),Au(),Qf(m,2)}if(m=Wf(l),m===null&&Pf(t,i,l,zu,r),m===d)break;d=m}d!==null&&l.stopPropagation()}else Pf(t,i,l,null,r)}}function Wf(t){return t=In(t),Xf(t)}var zu=null;function Xf(t){if(zu=null,t=di(t),t!==null){var i=c(t);if(i===null)t=null;else{var r=i.tag;if(r===13){if(t=f(i),t!==null)return t;t=null}else if(r===31){if(t=p(i),t!==null)return t;t=null}else if(r===3){if(i.stateNode.current.memoizedState.isDehydrated)return i.tag===3?i.stateNode.containerInfo:null;t=null}else i!==t&&(t=null)}}return zu=t,null}function nv(t){switch(t){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(da()){case wo:return 2;case No:return 8;case vs:case nd:return 32;case yc:return 268435456;default:return 32}default:return 32}}var Jf=!1,Ys=null,Ks=null,Qs=null,Sl=new Map,Al=new Map,$s=[],TA="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function iv(t,i){switch(t){case"focusin":case"focusout":Ys=null;break;case"dragenter":case"dragleave":Ks=null;break;case"mouseover":case"mouseout":Qs=null;break;case"pointerover":case"pointerout":Sl.delete(i.pointerId);break;case"gotpointercapture":case"lostpointercapture":Al.delete(i.pointerId)}}function wl(t,i,r,l,d,m){return t===null||t.nativeEvent!==m?(t={blockedOn:i,domEventName:r,eventSystemFlags:l,nativeEvent:m,targetContainers:[d]},i!==null&&(i=xn(i),i!==null&&ev(i)),t):(t.eventSystemFlags|=l,i=t.targetContainers,d!==null&&i.indexOf(d)===-1&&i.push(d),t)}function bA(t,i,r,l,d){switch(i){case"focusin":return Ys=wl(Ys,t,i,r,l,d),!0;case"dragenter":return Ks=wl(Ks,t,i,r,l,d),!0;case"mouseover":return Qs=wl(Qs,t,i,r,l,d),!0;case"pointerover":var m=d.pointerId;return Sl.set(m,wl(Sl.get(m)||null,t,i,r,l,d)),!0;case"gotpointercapture":return m=d.pointerId,Al.set(m,wl(Al.get(m)||null,t,i,r,l,d)),!0}return!1}function sv(t){var i=di(t.target);if(i!==null){var r=c(i);if(r!==null){if(i=r.tag,i===13){if(i=f(r),i!==null){t.blockedOn=i,Fn(t.priority,function(){tv(r)});return}}else if(i===31){if(i=p(r),i!==null){t.blockedOn=i,Fn(t.priority,function(){tv(r)});return}}else if(i===3&&r.stateNode.current.memoizedState.isDehydrated){t.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}t.blockedOn=null}function Bu(t){if(t.blockedOn!==null)return!1;for(var i=t.targetContainers;0<i.length;){var r=Wf(t.nativeEvent);if(r===null){r=t.nativeEvent;var l=new r.constructor(r.type,r);Vo=l,r.target.dispatchEvent(l),Vo=null}else return i=xn(r),i!==null&&ev(i),t.blockedOn=r,!1;i.shift()}return!0}function av(t,i,r){Bu(t)&&r.delete(i)}function SA(){Jf=!1,Ys!==null&&Bu(Ys)&&(Ys=null),Ks!==null&&Bu(Ks)&&(Ks=null),Qs!==null&&Bu(Qs)&&(Qs=null),Sl.forEach(av),Al.forEach(av)}function Hu(t,i){t.blockedOn===i&&(t.blockedOn=null,Jf||(Jf=!0,s.unstable_scheduleCallback(s.unstable_NormalPriority,SA)))}var qu=null;function rv(t){qu!==t&&(qu=t,s.unstable_scheduleCallback(s.unstable_NormalPriority,function(){qu===t&&(qu=null);for(var i=0;i<t.length;i+=3){var r=t[i],l=t[i+1],d=t[i+2];if(typeof l!="function"){if(Xf(l||r)===null)continue;break}var m=xn(r);m!==null&&(t.splice(i,3),i-=3,$d(m,{pending:!0,data:d,method:r.method,action:l},l,d))}}))}function Kr(t){function i(x){return Hu(x,t)}Ys!==null&&Hu(Ys,t),Ks!==null&&Hu(Ks,t),Qs!==null&&Hu(Qs,t),Sl.forEach(i),Al.forEach(i);for(var r=0;r<$s.length;r++){var l=$s[r];l.blockedOn===t&&(l.blockedOn=null)}for(;0<$s.length&&(r=$s[0],r.blockedOn===null);)sv(r),r.blockedOn===null&&$s.shift();if(r=(t.ownerDocument||t).$$reactFormReplay,r!=null)for(l=0;l<r.length;l+=3){var d=r[l],m=r[l+1],v=d[Pt]||null;if(typeof m=="function")v||rv(r);else if(v){var S=null;if(m&&m.hasAttribute("formAction")){if(d=m,v=m[Pt]||null)S=v.formAction;else if(Xf(d)!==null)continue}else S=v.action;typeof S=="function"?r[l+1]=S:(r.splice(l,3),l-=3),rv(r)}}}function ov(){function t(m){m.canIntercept&&m.info==="react-transition"&&m.intercept({handler:function(){return new Promise(function(v){return d=v})},focusReset:"manual",scroll:"manual"})}function i(){d!==null&&(d(),d=null),l||setTimeout(r,20)}function r(){if(!l&&!navigation.transition){var m=navigation.currentEntry;m&&m.url!=null&&navigation.navigate(m.url,{state:m.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var l=!1,d=null;return navigation.addEventListener("navigate",t),navigation.addEventListener("navigatesuccess",i),navigation.addEventListener("navigateerror",i),setTimeout(r,100),function(){l=!0,navigation.removeEventListener("navigate",t),navigation.removeEventListener("navigatesuccess",i),navigation.removeEventListener("navigateerror",i),d!==null&&(d(),d=null)}}}function Zf(t){this._internalRoot=t}Fu.prototype.render=Zf.prototype.render=function(t){var i=this._internalRoot;if(i===null)throw Error(a(409));var r=i.current,l=Nn();Jy(r,l,t,i,null,null)},Fu.prototype.unmount=Zf.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var i=t.containerInfo;Jy(t.current,2,null,t,null,null),Au(),i[ui]=null}};function Fu(t){this._internalRoot=t}Fu.prototype.unstable_scheduleHydration=function(t){if(t){var i=Ac();t={blockedOn:null,target:t,priority:i};for(var r=0;r<$s.length&&i!==0&&i<$s[r].priority;r++);$s.splice(r,0,t),r===0&&sv(t)}};var lv=e.version;if(lv!=="19.2.4")throw Error(a(527,lv,"19.2.4"));se.findDOMNode=function(t){var i=t._reactInternals;if(i===void 0)throw typeof t.render=="function"?Error(a(188)):(t=Object.keys(t).join(","),Error(a(268,t)));return t=y(i),t=t!==null?T(t):null,t=t===null?null:t.stateNode,t};var AA={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:$,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Gu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Gu.isDisabled&&Gu.supportsFiber)try{Hn=Gu.inject(AA),Bt=Gu}catch{}}return Rl.createRoot=function(t,i){if(!o(t))throw Error(a(299));var r=!1,l="",d=p_,m=g_,v=__;return i!=null&&(i.unstable_strictMode===!0&&(r=!0),i.identifierPrefix!==void 0&&(l=i.identifierPrefix),i.onUncaughtError!==void 0&&(d=i.onUncaughtError),i.onCaughtError!==void 0&&(m=i.onCaughtError),i.onRecoverableError!==void 0&&(v=i.onRecoverableError)),i=Wy(t,1,!1,null,null,r,l,null,d,m,v,ov),t[ui]=i.current,Mf(t),new Zf(i)},Rl.hydrateRoot=function(t,i,r){if(!o(t))throw Error(a(299));var l=!1,d="",m=p_,v=g_,S=__,x=null;return r!=null&&(r.unstable_strictMode===!0&&(l=!0),r.identifierPrefix!==void 0&&(d=r.identifierPrefix),r.onUncaughtError!==void 0&&(m=r.onUncaughtError),r.onCaughtError!==void 0&&(v=r.onCaughtError),r.onRecoverableError!==void 0&&(S=r.onRecoverableError),r.formState!==void 0&&(x=r.formState)),i=Wy(t,1,!0,i,r??null,l,d,x,m,v,S,ov),i.context=Xy(null),r=i.current,l=Nn(),l=ga(l),d=Ms(l),d.callback=null,Ps(r,d,l),r=l,i.current.lanes=r,ma(i,r),Ni(i),t[ui]=i.current,Mf(t),new Fu(i)},Rl.version="19.2.4",Rl}var yv;function MA(){if(yv)return nm.exports;yv=1;function s(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(s)}catch(e){console.error(e)}}return s(),nm.exports=OA(),nm.exports}var PA=MA();var vv="popstate";function Ev(s){return typeof s=="object"&&s!=null&&"pathname"in s&&"search"in s&&"hash"in s&&"state"in s&&"key"in s}function kA(s={}){function e(a,o){let c=o.state?.masked,{pathname:f,search:p,hash:g}=c||a.location;return wm("",{pathname:f,search:p,hash:g},o.state&&o.state.usr||null,o.state&&o.state.key||"default",c?{pathname:a.location.pathname,search:a.location.search,hash:a.location.hash}:void 0)}function n(a,o){return typeof o=="string"?o:Yl(o)}return VA(e,n,null,s)}function ht(s,e){if(s===!1||s===null||typeof s>"u")throw new Error(e)}function ji(s,e){if(!s){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function LA(){return Math.random().toString(36).substring(2,10)}function Tv(s,e){return{usr:s.state,key:s.key,idx:e,masked:s.unstable_mask?{pathname:s.pathname,search:s.search,hash:s.hash}:void 0}}function wm(s,e,n=null,a,o){return{pathname:typeof s=="string"?s:s.pathname,search:"",hash:"",...typeof e=="string"?uo(e):e,state:n,key:e&&e.key||a||LA(),unstable_mask:o}}function Yl({pathname:s="/",search:e="",hash:n=""}){return e&&e!=="?"&&(s+=e.charAt(0)==="?"?e:"?"+e),n&&n!=="#"&&(s+=n.charAt(0)==="#"?n:"#"+n),s}function uo(s){let e={};if(s){let n=s.indexOf("#");n>=0&&(e.hash=s.substring(n),s=s.substring(0,n));let a=s.indexOf("?");a>=0&&(e.search=s.substring(a),s=s.substring(0,a)),s&&(e.pathname=s)}return e}function VA(s,e,n,a={}){let{window:o=document.defaultView,v5Compat:c=!1}=a,f=o.history,p="POP",g=null,y=T();y==null&&(y=0,f.replaceState({...f.state,idx:y},""));function T(){return(f.state||{idx:null}).idx}function b(){p="POP";let Y=T(),ne=Y==null?null:Y-y;y=Y,g&&g({action:p,location:K.location,delta:ne})}function N(Y,ne){p="PUSH";let re=Ev(Y)?Y:wm(K.location,Y,ne);y=T()+1;let oe=Tv(re,y),de=K.createHref(re.unstable_mask||re);try{f.pushState(oe,"",de)}catch(fe){if(fe instanceof DOMException&&fe.name==="DataCloneError")throw fe;o.location.assign(de)}c&&g&&g({action:p,location:K.location,delta:1})}function P(Y,ne){p="REPLACE";let re=Ev(Y)?Y:wm(K.location,Y,ne);y=T();let oe=Tv(re,y),de=K.createHref(re.unstable_mask||re);f.replaceState(oe,"",de),c&&g&&g({action:p,location:K.location,delta:0})}function G(Y){return UA(Y)}let K={get action(){return p},get location(){return s(o,f)},listen(Y){if(g)throw new Error("A history only accepts one active listener");return o.addEventListener(vv,b),g=Y,()=>{o.removeEventListener(vv,b),g=null}},createHref(Y){return e(o,Y)},createURL:G,encodeLocation(Y){let ne=G(Y);return{pathname:ne.pathname,search:ne.search,hash:ne.hash}},push:N,replace:P,go(Y){return f.go(Y)}};return K}function UA(s,e=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),ht(n,"No window.location.(origin|href) available to create URL");let a=typeof s=="string"?s:Yl(s);return a=a.replace(/ $/,"%20"),!e&&a.startsWith("//")&&(a=n+a),new URL(a,n)}function WE(s,e,n="/"){return zA(s,e,n,!1)}function zA(s,e,n,a){let o=typeof e=="string"?uo(e):e,c=us(o.pathname||"/",n);if(c==null)return null;let f=XE(s);BA(f);let p=null;for(let g=0;p==null&&g<f.length;++g){let y=JA(c);p=WA(f[g],y,a)}return p}function XE(s,e=[],n=[],a="",o=!1){let c=(f,p,g=o,y)=>{let T={relativePath:y===void 0?f.path||"":y,caseSensitive:f.caseSensitive===!0,childrenIndex:p,route:f};if(T.relativePath.startsWith("/")){if(!T.relativePath.startsWith(a)&&g)return;ht(T.relativePath.startsWith(a),`Absolute route path "${T.relativePath}" nested under path "${a}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),T.relativePath=T.relativePath.slice(a.length)}let b=Ci([a,T.relativePath]),N=n.concat(T);f.children&&f.children.length>0&&(ht(f.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${b}".`),XE(f.children,e,N,b,g)),!(f.path==null&&!f.index)&&e.push({path:b,score:QA(b,f.index),routesMeta:N})};return s.forEach((f,p)=>{if(f.path===""||!f.path?.includes("?"))c(f,p);else for(let g of JE(f.path))c(f,p,!0,g)}),e}function JE(s){let e=s.split("/");if(e.length===0)return[];let[n,...a]=e,o=n.endsWith("?"),c=n.replace(/\?$/,"");if(a.length===0)return o?[c,""]:[c];let f=JE(a.join("/")),p=[];return p.push(...f.map(g=>g===""?c:[c,g].join("/"))),o&&p.push(...f),p.map(g=>s.startsWith("/")&&g===""?"/":g)}function BA(s){s.sort((e,n)=>e.score!==n.score?n.score-e.score:$A(e.routesMeta.map(a=>a.childrenIndex),n.routesMeta.map(a=>a.childrenIndex)))}var HA=/^:[\w-]+$/,qA=3,FA=2,GA=1,YA=10,KA=-2,bv=s=>s==="*";function QA(s,e){let n=s.split("/"),a=n.length;return n.some(bv)&&(a+=KA),e&&(a+=FA),n.filter(o=>!bv(o)).reduce((o,c)=>o+(HA.test(c)?qA:c===""?GA:YA),a)}function $A(s,e){return s.length===e.length&&s.slice(0,-1).every((a,o)=>a===e[o])?s[s.length-1]-e[e.length-1]:0}function WA(s,e,n=!1){let{routesMeta:a}=s,o={},c="/",f=[];for(let p=0;p<a.length;++p){let g=a[p],y=p===a.length-1,T=c==="/"?e:e.slice(c.length)||"/",b=dh({path:g.relativePath,caseSensitive:g.caseSensitive,end:y},T),N=g.route;if(!b&&y&&n&&!a[a.length-1].route.index&&(b=dh({path:g.relativePath,caseSensitive:g.caseSensitive,end:!1},T)),!b)return null;Object.assign(o,b.params),f.push({params:o,pathname:Ci([c,b.pathname]),pathnameBase:nw(Ci([c,b.pathnameBase])),route:N}),b.pathnameBase!=="/"&&(c=Ci([c,b.pathnameBase]))}return f}function dh(s,e){typeof s=="string"&&(s={path:s,caseSensitive:!1,end:!0});let[n,a]=XA(s.path,s.caseSensitive,s.end),o=e.match(n);if(!o)return null;let c=o[0],f=c.replace(/(.)\/+$/,"$1"),p=o.slice(1);return{params:a.reduce((y,{paramName:T,isOptional:b},N)=>{if(T==="*"){let G=p[N]||"";f=c.slice(0,c.length-G.length).replace(/(.)\/+$/,"$1")}const P=p[N];return b&&!P?y[T]=void 0:y[T]=(P||"").replace(/%2F/g,"/"),y},{}),pathname:c,pathnameBase:f,pattern:s}}function XA(s,e=!1,n=!0){ji(s==="*"||!s.endsWith("*")||s.endsWith("/*"),`Route path "${s}" will be treated as if it were "${s.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${s.replace(/\*$/,"/*")}".`);let a=[],o="^"+s.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(f,p,g,y,T)=>{if(a.push({paramName:p,isOptional:g!=null}),g){let b=T.charAt(y+f.length);return b&&b!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return s.endsWith("*")?(a.push({paramName:"*"}),o+=s==="*"||s==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":s!==""&&s!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,e?void 0:"i"),a]}function JA(s){try{return s.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return ji(!1,`The URL path "${s}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${e}).`),s}}function us(s,e){if(e==="/")return s;if(!s.toLowerCase().startsWith(e.toLowerCase()))return null;let n=e.endsWith("/")?e.length-1:e.length,a=s.charAt(n);return a&&a!=="/"?null:s.slice(n)||"/"}var ZA=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function ew(s,e="/"){let{pathname:n,search:a="",hash:o=""}=typeof s=="string"?uo(s):s,c;return n?(n=n.replace(/\/\/+/g,"/"),n.startsWith("/")?c=Sv(n.substring(1),"/"):c=Sv(n,e)):c=e,{pathname:c,search:iw(a),hash:sw(o)}}function Sv(s,e){let n=e.replace(/\/+$/,"").split("/");return s.split("/").forEach(o=>{o===".."?n.length>1&&n.pop():o!=="."&&n.push(o)}),n.length>1?n.join("/"):"/"}function rm(s,e,n,a){return`Cannot include a '${s}' character in a manually specified \`to.${e}\` field [${JSON.stringify(a)}]. 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 tw(s){return s.filter((e,n)=>n===0||e.route.path&&e.route.path.length>0)}function ZE(s){let e=tw(s);return e.map((n,a)=>a===e.length-1?n.pathname:n.pathnameBase)}function Qm(s,e,n,a=!1){let o;typeof s=="string"?o=uo(s):(o={...s},ht(!o.pathname||!o.pathname.includes("?"),rm("?","pathname","search",o)),ht(!o.pathname||!o.pathname.includes("#"),rm("#","pathname","hash",o)),ht(!o.search||!o.search.includes("#"),rm("#","search","hash",o)));let c=s===""||o.pathname==="",f=c?"/":o.pathname,p;if(f==null)p=n;else{let b=e.length-1;if(!a&&f.startsWith("..")){let N=f.split("/");for(;N[0]==="..";)N.shift(),b-=1;o.pathname=N.join("/")}p=b>=0?e[b]:"/"}let g=ew(o,p),y=f&&f!=="/"&&f.endsWith("/"),T=(c||f===".")&&n.endsWith("/");return!g.pathname.endsWith("/")&&(y||T)&&(g.pathname+="/"),g}var Ci=s=>s.join("/").replace(/\/\/+/g,"/"),nw=s=>s.replace(/\/+$/,"").replace(/^\/*/,"/"),iw=s=>!s||s==="?"?"":s.startsWith("?")?s:"?"+s,sw=s=>!s||s==="#"?"":s.startsWith("#")?s:"#"+s,aw=class{constructor(s,e,n,a=!1){this.status=s,this.statusText=e||"",this.internal=a,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function rw(s){return s!=null&&typeof s.status=="number"&&typeof s.statusText=="string"&&typeof s.internal=="boolean"&&"data"in s}function ow(s){return s.map(e=>e.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var eT=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function tT(s,e){let n=s;if(typeof n!="string"||!ZA.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let a=n,o=!1;if(eT)try{let c=new URL(window.location.href),f=n.startsWith("//")?new URL(c.protocol+n):new URL(n),p=us(f.pathname,e);f.origin===c.origin&&p!=null?n=p+f.search+f.hash:o=!0}catch{ji(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:a,isExternal:o,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var nT=["POST","PUT","PATCH","DELETE"];new Set(nT);var lw=["GET",...nT];new Set(lw);var ho=V.createContext(null);ho.displayName="DataRouter";var Oh=V.createContext(null);Oh.displayName="DataRouterState";var cw=V.createContext(!1),iT=V.createContext({isTransitioning:!1});iT.displayName="ViewTransition";var uw=V.createContext(new Map);uw.displayName="Fetchers";var hw=V.createContext(null);hw.displayName="Await";var Bn=V.createContext(null);Bn.displayName="Navigation";var ic=V.createContext(null);ic.displayName="Location";var ms=V.createContext({outlet:null,matches:[],isDataRoute:!1});ms.displayName="Route";var $m=V.createContext(null);$m.displayName="RouteError";var sT="REACT_ROUTER_ERROR",dw="REDIRECT",fw="ROUTE_ERROR_RESPONSE";function mw(s){if(s.startsWith(`${sT}:${dw}:{`))try{let e=JSON.parse(s.slice(28));if(typeof e=="object"&&e&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.location=="string"&&typeof e.reloadDocument=="boolean"&&typeof e.replace=="boolean")return e}catch{}}function pw(s){if(s.startsWith(`${sT}:${fw}:{`))try{let e=JSON.parse(s.slice(40));if(typeof e=="object"&&e&&typeof e.status=="number"&&typeof e.statusText=="string")return new aw(e.status,e.statusText,e.data)}catch{}}function gw(s,{relative:e}={}){ht(sc(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:a}=V.useContext(Bn),{hash:o,pathname:c,search:f}=ac(s,{relative:e}),p=c;return n!=="/"&&(p=c==="/"?n:Ci([n,c])),a.createHref({pathname:p,search:f,hash:o})}function sc(){return V.useContext(ic)!=null}function la(){return ht(sc(),"useLocation() may be used only in the context of a <Router> component."),V.useContext(ic).location}var aT="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function rT(s){V.useContext(Bn).static||V.useLayoutEffect(s)}function _w(){let{isDataRoute:s}=V.useContext(ms);return s?Cw():yw()}function yw(){ht(sc(),"useNavigate() may be used only in the context of a <Router> component.");let s=V.useContext(ho),{basename:e,navigator:n}=V.useContext(Bn),{matches:a}=V.useContext(ms),{pathname:o}=la(),c=JSON.stringify(ZE(a)),f=V.useRef(!1);return rT(()=>{f.current=!0}),V.useCallback((g,y={})=>{if(ji(f.current,aT),!f.current)return;if(typeof g=="number"){n.go(g);return}let T=Qm(g,JSON.parse(c),o,y.relative==="path");s==null&&e!=="/"&&(T.pathname=T.pathname==="/"?e:Ci([e,T.pathname])),(y.replace?n.replace:n.push)(T,y.state,y)},[e,n,c,o,s])}V.createContext(null);function ac(s,{relative:e}={}){let{matches:n}=V.useContext(ms),{pathname:a}=la(),o=JSON.stringify(ZE(n));return V.useMemo(()=>Qm(s,JSON.parse(o),a,e==="path"),[s,o,a,e])}function vw(s,e){return oT(s,e)}function oT(s,e,n){ht(sc(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:a}=V.useContext(Bn),{matches:o}=V.useContext(ms),c=o[o.length-1],f=c?c.params:{},p=c?c.pathname:"/",g=c?c.pathnameBase:"/",y=c&&c.route;{let Y=y&&y.path||"";cT(p,!y||Y.endsWith("*")||Y.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${p}" (under <Route path="${Y}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render. Please change the parent <Route path="${Y}"> to <Route path="${Y==="/"?"*":`${Y}/*`}">.`)}let T=la(),b;if(e){let Y=typeof e=="string"?uo(e):e;ht(g==="/"||Y.pathname?.startsWith(g),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${g}" but pathname "${Y.pathname}" was given in the \`location\` prop.`),b=Y}else b=T;let N=b.pathname||"/",P=N;if(g!=="/"){let Y=g.replace(/^\//,"").split("/");P="/"+N.replace(/^\//,"").split("/").slice(Y.length).join("/")}let G=WE(s,{pathname:P});ji(y||G!=null,`No routes matched location "${b.pathname}${b.search}${b.hash}" `),ji(G==null||G[G.length-1].route.element!==void 0||G[G.length-1].route.Component!==void 0||G[G.length-1].route.lazy!==void 0,`Matched leaf route at location "${b.pathname}${b.search}${b.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let K=Aw(G&&G.map(Y=>Object.assign({},Y,{params:Object.assign({},f,Y.params),pathname:Ci([g,a.encodeLocation?a.encodeLocation(Y.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:Y.pathname]),pathnameBase:Y.pathnameBase==="/"?g:Ci([g,a.encodeLocation?a.encodeLocation(Y.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:Y.pathnameBase])})),o,n);return e&&K?V.createElement(ic.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",unstable_mask:void 0,...b},navigationType:"POP"}},K):K}function Ew(){let s=Iw(),e=rw(s)?`${s.status} ${s.statusText}`:s instanceof Error?s.message:JSON.stringify(s),n=s instanceof Error?s.stack:null,a="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:a},c={padding:"2px 4px",backgroundColor:a},f=null;return console.error("Error handled by React Router default ErrorBoundary:",s),f=V.createElement(V.Fragment,null,V.createElement("p",null,"πΏ Hey developer π"),V.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",V.createElement("code",{style:c},"ErrorBoundary")," or"," ",V.createElement("code",{style:c},"errorElement")," prop on your route.")),V.createElement(V.Fragment,null,V.createElement("h2",null,"Unexpected Application Error!"),V.createElement("h3",{style:{fontStyle:"italic"}},e),n?V.createElement("pre",{style:o},n):null,f)}var Tw=V.createElement(Ew,null),lT=class extends V.Component{constructor(s){super(s),this.state={location:s.location,revalidation:s.revalidation,error:s.error}}static getDerivedStateFromError(s){return{error:s}}static getDerivedStateFromProps(s,e){return e.location!==s.location||e.revalidation!=="idle"&&s.revalidation==="idle"?{error:s.error,location:s.location,revalidation:s.revalidation}:{error:s.error!==void 0?s.error:e.error,location:e.location,revalidation:s.revalidation||e.revalidation}}componentDidCatch(s,e){this.props.onError?this.props.onError(s,e):console.error("React Router caught the following error during render",s)}render(){let s=this.state.error;if(this.context&&typeof s=="object"&&s&&"digest"in s&&typeof s.digest=="string"){const n=pw(s.digest);n&&(s=n)}let e=s!==void 0?V.createElement(ms.Provider,{value:this.props.routeContext},V.createElement($m.Provider,{value:s,children:this.props.component})):this.props.children;return this.context?V.createElement(bw,{error:s},e):e}};lT.contextType=cw;var om=new WeakMap;function bw({children:s,error:e}){let{basename:n}=V.useContext(Bn);if(typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){let a=mw(e.digest);if(a){let o=om.get(e);if(o)throw o;let c=tT(a.location,n);if(eT&&!om.get(e))if(c.isExternal||a.reloadDocument)window.location.href=c.absoluteURL||c.to;else{const f=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(c.to,{replace:a.replace}));throw om.set(e,f),f}return V.createElement("meta",{httpEquiv:"refresh",content:`0;url=${c.absoluteURL||c.to}`})}}return s}function Sw({routeContext:s,match:e,children:n}){let a=V.useContext(ho);return a&&a.static&&a.staticContext&&(e.route.errorElement||e.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=e.route.id),V.createElement(ms.Provider,{value:s},n)}function Aw(s,e=[],n){let a=n?.state;if(s==null){if(!a)return null;if(a.errors)s=a.matches;else if(e.length===0&&!a.initialized&&a.matches.length>0)s=a.matches;else return null}let o=s,c=a?.errors;if(c!=null){let T=o.findIndex(b=>b.route.id&&c?.[b.route.id]!==void 0);ht(T>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(c).join(",")}`),o=o.slice(0,Math.min(o.length,T+1))}let f=!1,p=-1;if(n&&a){f=a.renderFallback;for(let T=0;T<o.length;T++){let b=o[T];if((b.route.HydrateFallback||b.route.hydrateFallbackElement)&&(p=T),b.route.id){let{loaderData:N,errors:P}=a,G=b.route.loader&&!N.hasOwnProperty(b.route.id)&&(!P||P[b.route.id]===void 0);if(b.route.lazy||G){n.isStatic&&(f=!0),p>=0?o=o.slice(0,p+1):o=[o[0]];break}}}}let g=n?.onError,y=a&&g?(T,b)=>{g(T,{location:a.location,params:a.matches?.[0]?.params??{},unstable_pattern:ow(a.matches),errorInfo:b})}:void 0;return o.reduceRight((T,b,N)=>{let P,G=!1,K=null,Y=null;a&&(P=c&&b.route.id?c[b.route.id]:void 0,K=b.route.errorElement||Tw,f&&(p<0&&N===0?(cT("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),G=!0,Y=null):p===N&&(G=!0,Y=b.route.hydrateFallbackElement||null)));let ne=e.concat(o.slice(0,N+1)),re=()=>{let oe;return P?oe=K:G?oe=Y:b.route.Component?oe=V.createElement(b.route.Component,null):b.route.element?oe=b.route.element:oe=T,V.createElement(Sw,{match:b,routeContext:{outlet:T,matches:ne,isDataRoute:a!=null},children:oe})};return a&&(b.route.ErrorBoundary||b.route.errorElement||N===0)?V.createElement(lT,{location:a.location,revalidation:a.revalidation,component:K,error:P,children:re(),routeContext:{outlet:null,matches:ne,isDataRoute:!0},onError:y}):re()},null)}function Wm(s){return`${s} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function ww(s){let e=V.useContext(ho);return ht(e,Wm(s)),e}function Nw(s){let e=V.useContext(Oh);return ht(e,Wm(s)),e}function Rw(s){let e=V.useContext(ms);return ht(e,Wm(s)),e}function Xm(s){let e=Rw(s),n=e.matches[e.matches.length-1];return ht(n.route.id,`${s} can only be used on routes that contain a unique "id"`),n.route.id}function xw(){return Xm("useRouteId")}function Iw(){let s=V.useContext($m),e=Nw("useRouteError"),n=Xm("useRouteError");return s!==void 0?s:e.errors?.[n]}function Cw(){let{router:s}=ww("useNavigate"),e=Xm("useNavigate"),n=V.useRef(!1);return rT(()=>{n.current=!0}),V.useCallback(async(o,c={})=>{ji(n.current,aT),n.current&&(typeof o=="number"?await s.navigate(o):await s.navigate(o,{fromRouteId:e,...c}))},[s,e])}var Av={};function cT(s,e,n){!e&&!Av[s]&&(Av[s]=!0,ji(!1,n))}V.memo(Dw);function Dw({routes:s,future:e,state:n,isStatic:a,onError:o}){return oT(s,void 0,{state:n,isStatic:a,onError:o})}function Ba(s){ht(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function jw({basename:s="/",children:e=null,location:n,navigationType:a="POP",navigator:o,static:c=!1,unstable_useTransitions:f}){ht(!sc(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let p=s.replace(/^\/*/,"/"),g=V.useMemo(()=>({basename:p,navigator:o,static:c,unstable_useTransitions:f,future:{}}),[p,o,c,f]);typeof n=="string"&&(n=uo(n));let{pathname:y="/",search:T="",hash:b="",state:N=null,key:P="default",unstable_mask:G}=n,K=V.useMemo(()=>{let Y=us(y,p);return Y==null?null:{location:{pathname:Y,search:T,hash:b,state:N,key:P,unstable_mask:G},navigationType:a}},[p,y,T,b,N,P,a,G]);return ji(K!=null,`<Router basename="${p}"> is not able to match the URL "${y}${T}${b}" because it does not start with the basename, so the <Router> won't render anything.`),K==null?null:V.createElement(Bn.Provider,{value:g},V.createElement(ic.Provider,{children:e,value:K}))}function Ow({children:s,location:e}){return vw(Nm(s),e)}function Nm(s,e=[]){let n=[];return V.Children.forEach(s,(a,o)=>{if(!V.isValidElement(a))return;let c=[...e,o];if(a.type===V.Fragment){n.push.apply(n,Nm(a.props.children,c));return}ht(a.type===Ba,`[${typeof a.type=="string"?a.type:a.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),ht(!a.props.index||!a.props.children,"An index route cannot have child routes.");let f={id:a.props.id||c.join("-"),caseSensitive:a.props.caseSensitive,element:a.props.element,Component:a.props.Component,index:a.props.index,path:a.props.path,middleware:a.props.middleware,loader:a.props.loader,action:a.props.action,hydrateFallbackElement:a.props.hydrateFallbackElement,HydrateFallback:a.props.HydrateFallback,errorElement:a.props.errorElement,ErrorBoundary:a.props.ErrorBoundary,hasErrorBoundary:a.props.hasErrorBoundary===!0||a.props.ErrorBoundary!=null||a.props.errorElement!=null,shouldRevalidate:a.props.shouldRevalidate,handle:a.props.handle,lazy:a.props.lazy};a.props.children&&(f.children=Nm(a.props.children,c)),n.push(f)}),n}var th="get",nh="application/x-www-form-urlencoded";function Mh(s){return typeof HTMLElement<"u"&&s instanceof HTMLElement}function Mw(s){return Mh(s)&&s.tagName.toLowerCase()==="button"}function Pw(s){return Mh(s)&&s.tagName.toLowerCase()==="form"}function kw(s){return Mh(s)&&s.tagName.toLowerCase()==="input"}function Lw(s){return!!(s.metaKey||s.altKey||s.ctrlKey||s.shiftKey)}function Vw(s,e){return s.button===0&&(!e||e==="_self")&&!Lw(s)}var Yu=null;function Uw(){if(Yu===null)try{new FormData(document.createElement("form"),0),Yu=!1}catch{Yu=!0}return Yu}var zw=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function lm(s){return s!=null&&!zw.has(s)?(ji(!1,`"${s}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${nh}"`),null):s}function Bw(s,e){let n,a,o,c,f;if(Pw(s)){let p=s.getAttribute("action");a=p?us(p,e):null,n=s.getAttribute("method")||th,o=lm(s.getAttribute("enctype"))||nh,c=new FormData(s)}else if(Mw(s)||kw(s)&&(s.type==="submit"||s.type==="image")){let p=s.form;if(p==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let g=s.getAttribute("formaction")||p.getAttribute("action");if(a=g?us(g,e):null,n=s.getAttribute("formmethod")||p.getAttribute("method")||th,o=lm(s.getAttribute("formenctype"))||lm(p.getAttribute("enctype"))||nh,c=new FormData(p,s),!Uw()){let{name:y,type:T,value:b}=s;if(T==="image"){let N=y?`${y}.`:"";c.append(`${N}x`,"0"),c.append(`${N}y`,"0")}else y&&c.append(y,b)}}else{if(Mh(s))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=th,a=null,o=nh,f=s}return c&&o==="text/plain"&&(f=c,c=void 0),{action:a,method:n.toLowerCase(),encType:o,formData:c,body:f}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Jm(s,e){if(s===!1||s===null||typeof s>"u")throw new Error(e)}function Hw(s,e,n,a){let o=typeof s=="string"?new URL(s,typeof window>"u"?"server://singlefetch/":window.location.origin):s;return n?o.pathname.endsWith("/")?o.pathname=`${o.pathname}_.${a}`:o.pathname=`${o.pathname}.${a}`:o.pathname==="/"?o.pathname=`_root.${a}`:e&&us(o.pathname,e)==="/"?o.pathname=`${e.replace(/\/$/,"")}/_root.${a}`:o.pathname=`${o.pathname.replace(/\/$/,"")}.${a}`,o}async function qw(s,e){if(s.id in e)return e[s.id];try{let n=await import(s.module);return e[s.id]=n,n}catch(n){return console.error(`Error loading route module \`${s.module}\`, reloading page...`),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Fw(s){return s==null?!1:s.href==null?s.rel==="preload"&&typeof s.imageSrcSet=="string"&&typeof s.imageSizes=="string":typeof s.rel=="string"&&typeof s.href=="string"}async function Gw(s,e,n){let a=await Promise.all(s.map(async o=>{let c=e.routes[o.route.id];if(c){let f=await qw(c,n);return f.links?f.links():[]}return[]}));return $w(a.flat(1).filter(Fw).filter(o=>o.rel==="stylesheet"||o.rel==="preload").map(o=>o.rel==="stylesheet"?{...o,rel:"prefetch",as:"style"}:{...o,rel:"prefetch"}))}function wv(s,e,n,a,o,c){let f=(g,y)=>n[y]?g.route.id!==n[y].route.id:!0,p=(g,y)=>n[y].pathname!==g.pathname||n[y].route.path?.endsWith("*")&&n[y].params["*"]!==g.params["*"];return c==="assets"?e.filter((g,y)=>f(g,y)||p(g,y)):c==="data"?e.filter((g,y)=>{let T=a.routes[g.route.id];if(!T||!T.hasLoader)return!1;if(f(g,y)||p(g,y))return!0;if(g.route.shouldRevalidate){let b=g.route.shouldRevalidate({currentUrl:new URL(o.pathname+o.search+o.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(s,window.origin),nextParams:g.params,defaultShouldRevalidate:!0});if(typeof b=="boolean")return b}return!0}):[]}function Yw(s,e,{includeHydrateFallback:n}={}){return Kw(s.map(a=>{let o=e.routes[a.route.id];if(!o)return[];let c=[o.module];return o.clientActionModule&&(c=c.concat(o.clientActionModule)),o.clientLoaderModule&&(c=c.concat(o.clientLoaderModule)),n&&o.hydrateFallbackModule&&(c=c.concat(o.hydrateFallbackModule)),o.imports&&(c=c.concat(o.imports)),c}).flat(1))}function Kw(s){return[...new Set(s)]}function Qw(s){let e={},n=Object.keys(s).sort();for(let a of n)e[a]=s[a];return e}function $w(s,e){let n=new Set;return new Set(e),s.reduce((a,o)=>{let c=JSON.stringify(Qw(o));return n.has(c)||(n.add(c),a.push({key:c,link:o})),a},[])}function uT(){let s=V.useContext(ho);return Jm(s,"You must render this element inside a <DataRouterContext.Provider> element"),s}function Ww(){let s=V.useContext(Oh);return Jm(s,"You must render this element inside a <DataRouterStateContext.Provider> element"),s}var Zm=V.createContext(void 0);Zm.displayName="FrameworkContext";function hT(){let s=V.useContext(Zm);return Jm(s,"You must render this element inside a <HydratedRouter> element"),s}function Xw(s,e){let n=V.useContext(Zm),[a,o]=V.useState(!1),[c,f]=V.useState(!1),{onFocus:p,onBlur:g,onMouseEnter:y,onMouseLeave:T,onTouchStart:b}=e,N=V.useRef(null);V.useEffect(()=>{if(s==="render"&&f(!0),s==="viewport"){let K=ne=>{ne.forEach(re=>{f(re.isIntersecting)})},Y=new IntersectionObserver(K,{threshold:.5});return N.current&&Y.observe(N.current),()=>{Y.disconnect()}}},[s]),V.useEffect(()=>{if(a){let K=setTimeout(()=>{f(!0)},100);return()=>{clearTimeout(K)}}},[a]);let P=()=>{o(!0)},G=()=>{o(!1),f(!1)};return n?s!=="intent"?[c,N,{}]:[c,N,{onFocus:xl(p,P),onBlur:xl(g,G),onMouseEnter:xl(y,P),onMouseLeave:xl(T,G),onTouchStart:xl(b,P)}]:[!1,N,{}]}function xl(s,e){return n=>{s&&s(n),n.defaultPrevented||e(n)}}function Jw({page:s,...e}){let{router:n}=uT(),a=V.useMemo(()=>WE(n.routes,s,n.basename),[n.routes,s,n.basename]);return a?V.createElement(eN,{page:s,matches:a,...e}):null}function Zw(s){let{manifest:e,routeModules:n}=hT(),[a,o]=V.useState([]);return V.useEffect(()=>{let c=!1;return Gw(s,e,n).then(f=>{c||o(f)}),()=>{c=!0}},[s,e,n]),a}function eN({page:s,matches:e,...n}){let a=la(),{future:o,manifest:c,routeModules:f}=hT(),{basename:p}=uT(),{loaderData:g,matches:y}=Ww(),T=V.useMemo(()=>wv(s,e,y,c,a,"data"),[s,e,y,c,a]),b=V.useMemo(()=>wv(s,e,y,c,a,"assets"),[s,e,y,c,a]),N=V.useMemo(()=>{if(s===a.pathname+a.search+a.hash)return[];let K=new Set,Y=!1;if(e.forEach(re=>{let oe=c.routes[re.route.id];!oe||!oe.hasLoader||(!T.some(de=>de.route.id===re.route.id)&&re.route.id in g&&f[re.route.id]?.shouldRevalidate||oe.hasClientLoader?Y=!0:K.add(re.route.id))}),K.size===0)return[];let ne=Hw(s,p,o.unstable_trailingSlashAwareDataRequests,"data");return Y&&K.size>0&&ne.searchParams.set("_routes",e.filter(re=>K.has(re.route.id)).map(re=>re.route.id).join(",")),[ne.pathname+ne.search]},[p,o.unstable_trailingSlashAwareDataRequests,g,a,c,T,e,s,f]),P=V.useMemo(()=>Yw(b,c),[b,c]),G=Zw(b);return V.createElement(V.Fragment,null,N.map(K=>V.createElement("link",{key:K,rel:"prefetch",as:"fetch",href:K,...n})),P.map(K=>V.createElement("link",{key:K,rel:"modulepreload",href:K,...n})),G.map(({key:K,link:Y})=>V.createElement("link",{key:K,nonce:n.nonce,...Y,crossOrigin:Y.crossOrigin??n.crossOrigin})))}function tN(...s){return e=>{s.forEach(n=>{typeof n=="function"?n(e):n!=null&&(n.current=e)})}}var nN=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{nN&&(window.__reactRouterVersion="7.13.1")}catch{}function iN({basename:s,children:e,unstable_useTransitions:n,window:a}){let o=V.useRef();o.current==null&&(o.current=kA({window:a,v5Compat:!0}));let c=o.current,[f,p]=V.useState({action:c.action,location:c.location}),g=V.useCallback(y=>{n===!1?p(y):V.startTransition(()=>p(y))},[n]);return V.useLayoutEffect(()=>c.listen(g),[c,g]),V.createElement(jw,{basename:s,children:e,location:f.location,navigationType:f.action,navigator:c,unstable_useTransitions:n})}var dT=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,xi=V.forwardRef(function({onClick:e,discover:n="render",prefetch:a="none",relative:o,reloadDocument:c,replace:f,unstable_mask:p,state:g,target:y,to:T,preventScrollReset:b,viewTransition:N,unstable_defaultShouldRevalidate:P,...G},K){let{basename:Y,navigator:ne,unstable_useTransitions:re}=V.useContext(Bn),oe=typeof T=="string"&&dT.test(T),de=tT(T,Y);T=de.to;let fe=gw(T,{relative:o}),_e=la(),C=null;if(p){let Ye=Qm(p,[],_e.unstable_mask?_e.unstable_mask.pathname:"/",!0);Y!=="/"&&(Ye.pathname=Ye.pathname==="/"?Y:Ci([Y,Ye.pathname])),C=ne.createHref(Ye)}let[w,I,M]=Xw(a,G),j=oN(T,{replace:f,unstable_mask:p,state:g,target:y,preventScrollReset:b,relative:o,viewTransition:N,unstable_defaultShouldRevalidate:P,unstable_useTransitions:re});function L(Ye){e&&e(Ye),Ye.defaultPrevented||j(Ye)}let R=!(de.isExternal||c),Xe=V.createElement("a",{...G,...M,href:(R?C:void 0)||de.absoluteURL||fe,onClick:R?L:e,ref:tN(K,I),target:y,"data-discover":!oe&&n==="render"?"true":void 0});return w&&!oe?V.createElement(V.Fragment,null,Xe,V.createElement(Jw,{page:fe})):Xe});xi.displayName="Link";var sN=V.forwardRef(function({"aria-current":e="page",caseSensitive:n=!1,className:a="",end:o=!1,style:c,to:f,viewTransition:p,children:g,...y},T){let b=ac(f,{relative:y.relative}),N=la(),P=V.useContext(Oh),{navigator:G,basename:K}=V.useContext(Bn),Y=P!=null&&dN(b)&&p===!0,ne=G.encodeLocation?G.encodeLocation(b).pathname:b.pathname,re=N.pathname,oe=P&&P.navigation&&P.navigation.location?P.navigation.location.pathname:null;n||(re=re.toLowerCase(),oe=oe?oe.toLowerCase():null,ne=ne.toLowerCase()),oe&&K&&(oe=us(oe,K)||oe);const de=ne!=="/"&&ne.endsWith("/")?ne.length-1:ne.length;let fe=re===ne||!o&&re.startsWith(ne)&&re.charAt(de)==="/",_e=oe!=null&&(oe===ne||!o&&oe.startsWith(ne)&&oe.charAt(ne.length)==="/"),C={isActive:fe,isPending:_e,isTransitioning:Y},w=fe?e:void 0,I;typeof a=="function"?I=a(C):I=[a,fe?"active":null,_e?"pending":null,Y?"transitioning":null].filter(Boolean).join(" ");let M=typeof c=="function"?c(C):c;return V.createElement(xi,{...y,"aria-current":w,className:I,ref:T,style:M,to:f,viewTransition:p},typeof g=="function"?g(C):g)});sN.displayName="NavLink";var aN=V.forwardRef(({discover:s="render",fetcherKey:e,navigate:n,reloadDocument:a,replace:o,state:c,method:f=th,action:p,onSubmit:g,relative:y,preventScrollReset:T,viewTransition:b,unstable_defaultShouldRevalidate:N,...P},G)=>{let{unstable_useTransitions:K}=V.useContext(Bn),Y=uN(),ne=hN(p,{relative:y}),re=f.toLowerCase()==="get"?"get":"post",oe=typeof p=="string"&&dT.test(p),de=fe=>{if(g&&g(fe),fe.defaultPrevented)return;fe.preventDefault();let _e=fe.nativeEvent.submitter,C=_e?.getAttribute("formmethod")||f,w=()=>Y(_e||fe.currentTarget,{fetcherKey:e,method:C,navigate:n,replace:o,state:c,relative:y,preventScrollReset:T,viewTransition:b,unstable_defaultShouldRevalidate:N});K&&n!==!1?V.startTransition(()=>w()):w()};return V.createElement("form",{ref:G,method:re,action:ne,onSubmit:a?g:de,...P,"data-discover":!oe&&s==="render"?"true":void 0})});aN.displayName="Form";function rN(s){return`${s} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function fT(s){let e=V.useContext(ho);return ht(e,rN(s)),e}function oN(s,{target:e,replace:n,unstable_mask:a,state:o,preventScrollReset:c,relative:f,viewTransition:p,unstable_defaultShouldRevalidate:g,unstable_useTransitions:y}={}){let T=_w(),b=la(),N=ac(s,{relative:f});return V.useCallback(P=>{if(Vw(P,e)){P.preventDefault();let G=n!==void 0?n:Yl(b)===Yl(N),K=()=>T(s,{replace:G,unstable_mask:a,state:o,preventScrollReset:c,relative:f,viewTransition:p,unstable_defaultShouldRevalidate:g});y?V.startTransition(()=>K()):K()}},[b,T,N,n,a,o,e,s,c,f,p,g,y])}var lN=0,cN=()=>`__${String(++lN)}__`;function uN(){let{router:s}=fT("useSubmit"),{basename:e}=V.useContext(Bn),n=xw(),a=s.fetch,o=s.navigate;return V.useCallback(async(c,f={})=>{let{action:p,method:g,encType:y,formData:T,body:b}=Bw(c,e);if(f.navigate===!1){let N=f.fetcherKey||cN();await a(N,n,f.action||p,{unstable_defaultShouldRevalidate:f.unstable_defaultShouldRevalidate,preventScrollReset:f.preventScrollReset,formData:T,body:b,formMethod:f.method||g,formEncType:f.encType||y,flushSync:f.flushSync})}else await o(f.action||p,{unstable_defaultShouldRevalidate:f.unstable_defaultShouldRevalidate,preventScrollReset:f.preventScrollReset,formData:T,body:b,formMethod:f.method||g,formEncType:f.encType||y,replace:f.replace,state:f.state,fromRouteId:n,flushSync:f.flushSync,viewTransition:f.viewTransition})},[a,o,e,n])}function hN(s,{relative:e}={}){let{basename:n}=V.useContext(Bn),a=V.useContext(ms);ht(a,"useFormAction must be used inside a RouteContext");let[o]=a.matches.slice(-1),c={...ac(s||".",{relative:e})},f=la();if(s==null){c.search=f.search;let p=new URLSearchParams(c.search),g=p.getAll("index");if(g.some(T=>T==="")){p.delete("index"),g.filter(b=>b).forEach(b=>p.append("index",b));let T=p.toString();c.search=T?`?${T}`:""}}return(!s||s===".")&&o.route.index&&(c.search=c.search?c.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(c.pathname=c.pathname==="/"?n:Ci([n,c.pathname])),Yl(c)}function dN(s,{relative:e}={}){let n=V.useContext(iT);ht(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:a}=fT("useViewTransitionState"),o=ac(s,{relative:e});if(!n.isTransitioning)return!1;let c=us(n.currentLocation.pathname,a)||n.currentLocation.pathname,f=us(n.nextLocation.pathname,a)||n.nextLocation.pathname;return dh(o.pathname,f)!=null||dh(o.pathname,c)!=null}const fN="modulepreload",mN=function(s){return"/"+s},Nv={},pN=function(e,n,a){let o=Promise.resolve();if(n&&n.length>0){let y=function(T){return Promise.all(T.map(b=>Promise.resolve(b).then(N=>({status:"fulfilled",value:N}),N=>({status:"rejected",reason:N}))))};var f=y;document.getElementsByTagName("link");const p=document.querySelector("meta[property=csp-nonce]"),g=p?.nonce||p?.getAttribute("nonce");o=y(n.map(T=>{if(T=mN(T),T in Nv)return;Nv[T]=!0;const b=T.endsWith(".css"),N=b?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${T}"]${N}`))return;const P=document.createElement("link");if(P.rel=b?"stylesheet":fN,b||(P.as="script"),P.crossOrigin="",P.href=T,g&&P.setAttribute("nonce",g),document.head.appendChild(P),b)return new Promise((G,K)=>{P.addEventListener("load",G),P.addEventListener("error",()=>K(new Error(`Unable to preload CSS for ${T}`)))})}))}function c(p){const g=new Event("vite:preloadError",{cancelable:!0});if(g.payload=p,window.dispatchEvent(g),!g.defaultPrevented)throw p}return o.then(p=>{for(const g of p||[])g.status==="rejected"&&c(g.reason);return e().catch(c)})},gN=()=>{};var Rv={};const mT=function(s){const e=[];let n=0;for(let a=0;a<s.length;a++){let o=s.charCodeAt(a);o<128?e[n++]=o:o<2048?(e[n++]=o>>6|192,e[n++]=o&63|128):(o&64512)===55296&&a+1<s.length&&(s.charCodeAt(a+1)&64512)===56320?(o=65536+((o&1023)<<10)+(s.charCodeAt(++a)&1023),e[n++]=o>>18|240,e[n++]=o>>12&63|128,e[n++]=o>>6&63|128,e[n++]=o&63|128):(e[n++]=o>>12|224,e[n++]=o>>6&63|128,e[n++]=o&63|128)}return e},_N=function(s){const e=[];let n=0,a=0;for(;n<s.length;){const o=s[n++];if(o<128)e[a++]=String.fromCharCode(o);else if(o>191&&o<224){const c=s[n++];e[a++]=String.fromCharCode((o&31)<<6|c&63)}else if(o>239&&o<365){const c=s[n++],f=s[n++],p=s[n++],g=((o&7)<<18|(c&63)<<12|(f&63)<<6|p&63)-65536;e[a++]=String.fromCharCode(55296+(g>>10)),e[a++]=String.fromCharCode(56320+(g&1023))}else{const c=s[n++],f=s[n++];e[a++]=String.fromCharCode((o&15)<<12|(c&63)<<6|f&63)}}return e.join("")},pT={byteToCharMap_:null,charToByteMap_:null,byteToCharMapWebSafe_:null,charToByteMapWebSafe_:null,ENCODED_VALS_BASE:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",get ENCODED_VALS(){return this.ENCODED_VALS_BASE+"+/="},get ENCODED_VALS_WEBSAFE(){return this.ENCODED_VALS_BASE+"-_."},HAS_NATIVE_SUPPORT:typeof atob=="function",encodeByteArray(s,e){if(!Array.isArray(s))throw Error("encodeByteArray takes an array as a parameter");this.init_();const n=e?this.byteToCharMapWebSafe_:this.byteToCharMap_,a=[];for(let o=0;o<s.length;o+=3){const c=s[o],f=o+1<s.length,p=f?s[o+1]:0,g=o+2<s.length,y=g?s[o+2]:0,T=c>>2,b=(c&3)<<4|p>>4;let N=(p&15)<<2|y>>6,P=y&63;g||(P=64,f||(N=64)),a.push(n[T],n[b],n[N],n[P])}return a.join("")},encodeString(s,e){return this.HAS_NATIVE_SUPPORT&&!e?btoa(s):this.encodeByteArray(mT(s),e)},decodeString(s,e){return this.HAS_NATIVE_SUPPORT&&!e?atob(s):_N(this.decodeStringToByteArray(s,e))},decodeStringToByteArray(s,e){this.init_();const n=e?this.charToByteMapWebSafe_:this.charToByteMap_,a=[];for(let o=0;o<s.length;){const c=n[s.charAt(o++)],p=o<s.length?n[s.charAt(o)]:0;++o;const y=o<s.length?n[s.charAt(o)]:64;++o;const b=o<s.length?n[s.charAt(o)]:64;if(++o,c==null||p==null||y==null||b==null)throw new yN;const N=c<<2|p>>4;if(a.push(N),y!==64){const P=p<<4&240|y>>2;if(a.push(P),b!==64){const G=y<<6&192|b;a.push(G)}}}return a},init_(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(let s=0;s<this.ENCODED_VALS.length;s++)this.byteToCharMap_[s]=this.ENCODED_VALS.charAt(s),this.charToByteMap_[this.byteToCharMap_[s]]=s,this.byteToCharMapWebSafe_[s]=this.ENCODED_VALS_WEBSAFE.charAt(s),this.charToByteMapWebSafe_[this.byteToCharMapWebSafe_[s]]=s,s>=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(s)]=s,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(s)]=s)}}};class yN extends Error{constructor(){super(...arguments),this.name="DecodeBase64StringError"}}const vN=function(s){const e=mT(s);return pT.encodeByteArray(e,!0)},fh=function(s){return vN(s).replace(/\./g,"")},gT=function(s){try{return pT.decodeString(s,!0)}catch(e){console.error("base64Decode failed: ",e)}return null};function EN(){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.")}const TN=()=>EN().__FIREBASE_DEFAULTS__,bN=()=>{if(typeof process>"u"||typeof Rv>"u")return;const s=Rv.__FIREBASE_DEFAULTS__;if(s)return JSON.parse(s)},SN=()=>{if(typeof document>"u")return;let s;try{s=document.cookie.match(/__FIREBASE_DEFAULTS__=([^;]+)/)}catch{return}const e=s&&gT(s[1]);return e&&JSON.parse(e)},Ph=()=>{try{return gN()||TN()||bN()||SN()}catch(s){console.info(`Unable to get __FIREBASE_DEFAULTS__ due to: ${s}`);return}},_T=s=>Ph()?.emulatorHosts?.[s],AN=s=>{const e=_T(s);if(!e)return;const n=e.lastIndexOf(":");if(n<=0||n+1===e.length)throw new Error(`Invalid host ${e} with no separate hostname and port!`);const a=parseInt(e.substring(n+1),10);return e[0]==="["?[e.substring(1,n-1),a]:[e.substring(0,n),a]},yT=()=>Ph()?.config,vT=s=>Ph()?.[`_${s}`];class wN{constructor(){this.reject=()=>{},this.resolve=()=>{},this.promise=new Promise((e,n)=>{this.resolve=e,this.reject=n})}wrapCallback(e){return(n,a)=>{n?this.reject(n):this.resolve(a),typeof e=="function"&&(this.promise.catch(()=>{}),e.length===1?e(n):e(n,a))}}}function fo(s){try{return(s.startsWith("http://")||s.startsWith("https://")?new URL(s).hostname:s).endsWith(".cloudworkstations.dev")}catch{return!1}}async function ET(s){return(await fetch(s,{credentials:"include"})).ok}function NN(s,e){if(s.uid)throw new Error('The "uid" field is no longer supported by mockUserToken. Please use "sub" instead for Firebase Auth User ID.');const n={alg:"none",type:"JWT"},a=e||"demo-project",o=s.iat||0,c=s.sub||s.user_id;if(!c)throw new Error("mockUserToken must contain 'sub' or 'user_id' field!");const f={iss:`https://securetoken.google.com/${a}`,aud:a,iat:o,exp:o+3600,auth_time:o,sub:c,user_id:c,firebase:{sign_in_provider:"custom",identities:{}},...s};return[fh(JSON.stringify(n)),fh(JSON.stringify(f)),""].join(".")}const kl={};function RN(){const s={prod:[],emulator:[]};for(const e of Object.keys(kl))kl[e]?s.emulator.push(e):s.prod.push(e);return s}function xN(s){let e=document.getElementById(s),n=!1;return e||(e=document.createElement("div"),e.setAttribute("id",s),n=!0),{created:n,element:e}}let xv=!1;function TT(s,e){if(typeof window>"u"||typeof document>"u"||!fo(window.location.host)||kl[s]===e||kl[s]||xv)return;kl[s]=e;function n(N){return`__firebase__banner__${N}`}const a="__firebase__banner",c=RN().prod.length>0;function f(){const N=document.getElementById(a);N&&N.remove()}function p(N){N.style.display="flex",N.style.background="#7faaf0",N.style.position="fixed",N.style.bottom="5px",N.style.left="5px",N.style.padding=".5em",N.style.borderRadius="5px",N.style.alignItems="center"}function g(N,P){N.setAttribute("width","24"),N.setAttribute("id",P),N.setAttribute("height","24"),N.setAttribute("viewBox","0 0 24 24"),N.setAttribute("fill","none"),N.style.marginLeft="-6px"}function y(){const N=document.createElement("span");return N.style.cursor="pointer",N.style.marginLeft="16px",N.style.fontSize="24px",N.innerHTML=" ×",N.onclick=()=>{xv=!0,f()},N}function T(N,P){N.setAttribute("id",P),N.innerText="Learn more",N.href="https://firebase.google.com/docs/studio/preview-apps#preview-backend",N.setAttribute("target","__blank"),N.style.paddingLeft="5px",N.style.textDecoration="underline"}function b(){const N=xN(a),P=n("text"),G=document.getElementById(P)||document.createElement("span"),K=n("learnmore"),Y=document.getElementById(K)||document.createElement("a"),ne=n("preprendIcon"),re=document.getElementById(ne)||document.createElementNS("http://www.w3.org/2000/svg","svg");if(N.created){const oe=N.element;p(oe),T(Y,K);const de=y();g(re,ne),oe.append(re,G,Y,de),document.body.appendChild(oe)}c?(G.innerText="Preview backend disconnected.",re.innerHTML=`<g clip-path="url(#clip0_6013_33858)"> <path d="M4.8 17.6L12 5.6L19.2 17.6H4.8ZM6.91667 16.4H17.0833L12 7.93333L6.91667 16.4ZM12 15.6C12.1667 15.6 12.3056 15.5444 12.4167 15.4333C12.5389 15.3111 12.6 15.1667 12.6 15C12.6 14.8333 12.5389 14.6944 12.4167 14.5833C12.3056 14.4611 12.1667 14.4 12 14.4C11.8333 14.4 11.6889 14.4611 11.5667 14.5833C11.4556 14.6944 11.4 14.8333 11.4 15C11.4 15.1667 11.4556 15.3111 11.5667 15.4333C11.6889 15.5444 11.8333 15.6 12 15.6ZM11.4 13.6H12.6V10.4H11.4V13.6Z" fill="#212121"/> </g> <defs> <clipPath id="clip0_6013_33858"> <rect width="24" height="24" fill="white"/> </clipPath> </defs>`):(re.innerHTML=`<g clip-path="url(#clip0_6083_34804)"> <path d="M11.4 15.2H12.6V11.2H11.4V15.2ZM12 10C12.1667 10 12.3056 9.94444 12.4167 9.83333C12.5389 9.71111 12.6 9.56667 12.6 9.4C12.6 9.23333 12.5389 9.09444 12.4167 8.98333C12.3056 8.86111 12.1667 8.8 12 8.8C11.8333 8.8 11.6889 8.86111 11.5667 8.98333C11.4556 9.09444 11.4 9.23333 11.4 9.4C11.4 9.56667 11.4556 9.71111 11.5667 9.83333C11.6889 9.94444 11.8333 10 12 10ZM12 18.4C11.1222 18.4 10.2944 18.2333 9.51667 17.9C8.73889 17.5667 8.05556 17.1111 7.46667 16.5333C6.88889 15.9444 6.43333 15.2611 6.1 14.4833C5.76667 13.7056 5.6 12.8778 5.6 12C5.6 11.1111 5.76667 10.2833 6.1 9.51667C6.43333 8.73889 6.88889 8.06111 7.46667 7.48333C8.05556 6.89444 8.73889 6.43333 9.51667 6.1C10.2944 5.76667 11.1222 5.6 12 5.6C12.8889 5.6 13.7167 5.76667 14.4833 6.1C15.2611 6.43333 15.9389 6.89444 16.5167 7.48333C17.1056 8.06111 17.5667 8.73889 17.9 9.51667C18.2333 10.2833 18.4 11.1111 18.4 12C18.4 12.8778 18.2333 13.7056 17.9 14.4833C17.5667 15.2611 17.1056 15.9444 16.5167 16.5333C15.9389 17.1111 15.2611 17.5667 14.4833 17.9C13.7167 18.2333 12.8889 18.4 12 18.4ZM12 17.2C13.4444 17.2 14.6722 16.6944 15.6833 15.6833C16.6944 14.6722 17.2 13.4444 17.2 12C17.2 10.5556 16.6944 9.32778 15.6833 8.31667C14.6722 7.30555 13.4444 6.8 12 6.8C10.5556 6.8 9.32778 7.30555 8.31667 8.31667C7.30556 9.32778 6.8 10.5556 6.8 12C6.8 13.4444 7.30556 14.6722 8.31667 15.6833C9.32778 16.6944 10.5556 17.2 12 17.2Z" fill="#212121"/> </g> <defs> <clipPath id="clip0_6083_34804"> <rect width="24" height="24" fill="white"/> </clipPath> </defs>`,G.innerText="Preview backend running in this workspace."),G.setAttribute("id",P)}document.readyState==="loading"?window.addEventListener("DOMContentLoaded",b):b()}function nn(){return typeof navigator<"u"&&typeof navigator.userAgent=="string"?navigator.userAgent:""}function IN(){return typeof window<"u"&&!!(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(nn())}function CN(){const s=Ph()?.forceEnvironment;if(s==="node")return!0;if(s==="browser")return!1;try{return Object.prototype.toString.call(global.process)==="[object process]"}catch{return!1}}function DN(){return typeof navigator<"u"&&navigator.userAgent==="Cloudflare-Workers"}function jN(){const s=typeof chrome=="object"?chrome.runtime:typeof browser=="object"?browser.runtime:void 0;return typeof s=="object"&&s.id!==void 0}function ON(){return typeof navigator=="object"&&navigator.product==="ReactNative"}function MN(){const s=nn();return s.indexOf("MSIE ")>=0||s.indexOf("Trident/")>=0}function PN(){return!CN()&&!!navigator.userAgent&&navigator.userAgent.includes("Safari")&&!navigator.userAgent.includes("Chrome")}function kN(){try{return typeof indexedDB=="object"}catch{return!1}}function LN(){return new Promise((s,e)=>{try{let n=!0;const a="validate-browser-context-for-indexeddb-analytics-module",o=self.indexedDB.open(a);o.onsuccess=()=>{o.result.close(),n||self.indexedDB.deleteDatabase(a),s(!0)},o.onupgradeneeded=()=>{n=!1},o.onerror=()=>{e(o.error?.message||"")}}catch(n){e(n)}})}const VN="FirebaseError";class ps extends Error{constructor(e,n,a){super(n),this.code=e,this.customData=a,this.name=VN,Object.setPrototypeOf(this,ps.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,rc.prototype.create)}}class rc{constructor(e,n,a){this.service=e,this.serviceName=n,this.errors=a}create(e,...n){const a=n[0]||{},o=`${this.service}/${e}`,c=this.errors[e],f=c?UN(c,a):"Error",p=`${this.serviceName}: ${f} (${o}).`;return new ps(o,p,a)}}function UN(s,e){return s.replace(zN,(n,a)=>{const o=e[a];return o!=null?String(o):`<${a}?>`})}const zN=/\{\$([^}]+)}/g;function BN(s){for(const e in s)if(Object.prototype.hasOwnProperty.call(s,e))return!1;return!0}function Qa(s,e){if(s===e)return!0;const n=Object.keys(s),a=Object.keys(e);for(const o of n){if(!a.includes(o))return!1;const c=s[o],f=e[o];if(Iv(c)&&Iv(f)){if(!Qa(c,f))return!1}else if(c!==f)return!1}for(const o of a)if(!n.includes(o))return!1;return!0}function Iv(s){return s!==null&&typeof s=="object"}function mo(s){const e=[];for(const[n,a]of Object.entries(s))Array.isArray(a)?a.forEach(o=>{e.push(encodeURIComponent(n)+"="+encodeURIComponent(o))}):e.push(encodeURIComponent(n)+"="+encodeURIComponent(a));return e.length?"&"+e.join("&"):""}function jl(s){const e={};return s.replace(/^\?/,"").split("&").forEach(a=>{if(a){const[o,c]=a.split("=");e[decodeURIComponent(o)]=decodeURIComponent(c)}}),e}function Ol(s){const e=s.indexOf("?");if(!e)return"";const n=s.indexOf("#",e);return s.substring(e,n>0?n:void 0)}function HN(s,e){const n=new qN(s,e);return n.subscribe.bind(n)}class qN{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(a=>{this.error(a)})}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,a){let o;if(e===void 0&&n===void 0&&a===void 0)throw new Error("Missing Observer.");FN(e,["next","error","complete"])?o=e:o={next:e,error:n,complete:a},o.next===void 0&&(o.next=cm),o.error===void 0&&(o.error=cm),o.complete===void 0&&(o.complete=cm);const c=this.unsubscribeOne.bind(this,this.observers.length);return this.finalized&&this.task.then(()=>{try{this.finalError?o.error(this.finalError):o.complete()}catch{}}),this.observers.push(o),c}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(a){typeof console<"u"&&console.error&&console.error(a)}})}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 FN(s,e){if(typeof s!="object"||s===null)return!1;for(const n of e)if(n in s&&typeof s[n]=="function")return!0;return!1}function cm(){}function Ee(s){return s&&s._delegate?s._delegate:s}class $a{constructor(e,n,a){this.name=e,this.instanceFactory=n,this.type=a,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}}const Ha="[DEFAULT]";class GN{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 a=new wN;if(this.instancesDeferred.set(n,a),this.isInitialized(n)||this.shouldAutoInitialize())try{const o=this.getOrInitializeService({instanceIdentifier:n});o&&a.resolve(o)}catch{}}return this.instancesDeferred.get(n).promise}getImmediate(e){const n=this.normalizeInstanceIdentifier(e?.identifier),a=e?.optional??!1;if(this.isInitialized(n)||this.shouldAutoInitialize())try{return this.getOrInitializeService({instanceIdentifier:n})}catch(o){if(a)return null;throw o}else{if(a)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(KN(e))try{this.getOrInitializeService({instanceIdentifier:Ha})}catch{}for(const[n,a]of this.instancesDeferred.entries()){const o=this.normalizeInstanceIdentifier(n);try{const c=this.getOrInitializeService({instanceIdentifier:o});a.resolve(c)}catch{}}}}clearInstance(e=Ha){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=Ha){return this.instances.has(e)}getOptions(e=Ha){return this.instancesOptions.get(e)||{}}initialize(e={}){const{options:n={}}=e,a=this.normalizeInstanceIdentifier(e.instanceIdentifier);if(this.isInitialized(a))throw Error(`${this.name}(${a}) has already been initialized`);if(!this.isComponentSet())throw Error(`Component ${this.name} has not been registered yet`);const o=this.getOrInitializeService({instanceIdentifier:a,options:n});for(const[c,f]of this.instancesDeferred.entries()){const p=this.normalizeInstanceIdentifier(c);a===p&&f.resolve(o)}return o}onInit(e,n){const a=this.normalizeInstanceIdentifier(n),o=this.onInitCallbacks.get(a)??new Set;o.add(e),this.onInitCallbacks.set(a,o);const c=this.instances.get(a);return c&&e(c,a),()=>{o.delete(e)}}invokeOnInitCallbacks(e,n){const a=this.onInitCallbacks.get(n);if(a)for(const o of a)try{o(e,n)}catch{}}getOrInitializeService({instanceIdentifier:e,options:n={}}){let a=this.instances.get(e);if(!a&&this.component&&(a=this.component.instanceFactory(this.container,{instanceIdentifier:YN(e),options:n}),this.instances.set(e,a),this.instancesOptions.set(e,n),this.invokeOnInitCallbacks(a,e),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,e,a)}catch{}return a||null}normalizeInstanceIdentifier(e=Ha){return this.component?this.component.multipleInstances?e:Ha:e}shouldAutoInitialize(){return!!this.component&&this.component.instantiationMode!=="EXPLICIT"}}function YN(s){return s===Ha?void 0:s}function KN(s){return s.instantiationMode==="EAGER"}class QN{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 GN(e,this);return this.providers.set(e,n),n}getProviders(){return Array.from(this.providers.values())}}var je;(function(s){s[s.DEBUG=0]="DEBUG",s[s.VERBOSE=1]="VERBOSE",s[s.INFO=2]="INFO",s[s.WARN=3]="WARN",s[s.ERROR=4]="ERROR",s[s.SILENT=5]="SILENT"})(je||(je={}));const $N={debug:je.DEBUG,verbose:je.VERBOSE,info:je.INFO,warn:je.WARN,error:je.ERROR,silent:je.SILENT},WN=je.INFO,XN={[je.DEBUG]:"log",[je.VERBOSE]:"log",[je.INFO]:"info",[je.WARN]:"warn",[je.ERROR]:"error"},JN=(s,e,...n)=>{if(e<s.logLevel)return;const a=new Date().toISOString(),o=XN[e];if(o)console[o](`[${a}] ${s.name}:`,...n);else throw new Error(`Attempted to log a message with an invalid logType (value: ${e})`)};class ep{constructor(e){this.name=e,this._logLevel=WN,this._logHandler=JN,this._userLogHandler=null}get logLevel(){return this._logLevel}set logLevel(e){if(!(e in je))throw new TypeError(`Invalid value "${e}" assigned to \`logLevel\``);this._logLevel=e}setLogLevel(e){this._logLevel=typeof e=="string"?$N[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,je.DEBUG,...e),this._logHandler(this,je.DEBUG,...e)}log(...e){this._userLogHandler&&this._userLogHandler(this,je.VERBOSE,...e),this._logHandler(this,je.VERBOSE,...e)}info(...e){this._userLogHandler&&this._userLogHandler(this,je.INFO,...e),this._logHandler(this,je.INFO,...e)}warn(...e){this._userLogHandler&&this._userLogHandler(this,je.WARN,...e),this._logHandler(this,je.WARN,...e)}error(...e){this._userLogHandler&&this._userLogHandler(this,je.ERROR,...e),this._logHandler(this,je.ERROR,...e)}}const ZN=(s,e)=>e.some(n=>s instanceof n);let Cv,Dv;function eR(){return Cv||(Cv=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function tR(){return Dv||(Dv=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const bT=new WeakMap,Rm=new WeakMap,ST=new WeakMap,um=new WeakMap,tp=new WeakMap;function nR(s){const e=new Promise((n,a)=>{const o=()=>{s.removeEventListener("success",c),s.removeEventListener("error",f)},c=()=>{n(Js(s.result)),o()},f=()=>{a(s.error),o()};s.addEventListener("success",c),s.addEventListener("error",f)});return e.then(n=>{n instanceof IDBCursor&&bT.set(n,s)}).catch(()=>{}),tp.set(e,s),e}function iR(s){if(Rm.has(s))return;const e=new Promise((n,a)=>{const o=()=>{s.removeEventListener("complete",c),s.removeEventListener("error",f),s.removeEventListener("abort",f)},c=()=>{n(),o()},f=()=>{a(s.error||new DOMException("AbortError","AbortError")),o()};s.addEventListener("complete",c),s.addEventListener("error",f),s.addEventListener("abort",f)});Rm.set(s,e)}let xm={get(s,e,n){if(s instanceof IDBTransaction){if(e==="done")return Rm.get(s);if(e==="objectStoreNames")return s.objectStoreNames||ST.get(s);if(e==="store")return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return Js(s[e])},set(s,e,n){return s[e]=n,!0},has(s,e){return s instanceof IDBTransaction&&(e==="done"||e==="store")?!0:e in s}};function sR(s){xm=s(xm)}function aR(s){return s===IDBDatabase.prototype.transaction&&!("objectStoreNames"in IDBTransaction.prototype)?function(e,...n){const a=s.call(hm(this),e,...n);return ST.set(a,e.sort?e.sort():[e]),Js(a)}:tR().includes(s)?function(...e){return s.apply(hm(this),e),Js(bT.get(this))}:function(...e){return Js(s.apply(hm(this),e))}}function rR(s){return typeof s=="function"?aR(s):(s instanceof IDBTransaction&&iR(s),ZN(s,eR())?new Proxy(s,xm):s)}function Js(s){if(s instanceof IDBRequest)return nR(s);if(um.has(s))return um.get(s);const e=rR(s);return e!==s&&(um.set(s,e),tp.set(e,s)),e}const hm=s=>tp.get(s);function oR(s,e,{blocked:n,upgrade:a,blocking:o,terminated:c}={}){const f=indexedDB.open(s,e),p=Js(f);return a&&f.addEventListener("upgradeneeded",g=>{a(Js(f.result),g.oldVersion,g.newVersion,Js(f.transaction),g)}),n&&f.addEventListener("blocked",g=>n(g.oldVersion,g.newVersion,g)),p.then(g=>{c&&g.addEventListener("close",()=>c()),o&&g.addEventListener("versionchange",y=>o(y.oldVersion,y.newVersion,y))}).catch(()=>{}),p}const lR=["get","getKey","getAll","getAllKeys","count"],cR=["put","add","delete","clear"],dm=new Map;function jv(s,e){if(!(s instanceof IDBDatabase&&!(e in s)&&typeof e=="string"))return;if(dm.get(e))return dm.get(e);const n=e.replace(/FromIndex$/,""),a=e!==n,o=cR.includes(n);if(!(n in(a?IDBIndex:IDBObjectStore).prototype)||!(o||lR.includes(n)))return;const c=async function(f,...p){const g=this.transaction(f,o?"readwrite":"readonly");let y=g.store;return a&&(y=y.index(p.shift())),(await Promise.all([y[n](...p),o&&g.done]))[0]};return dm.set(e,c),c}sR(s=>({...s,get:(e,n,a)=>jv(e,n)||s.get(e,n,a),has:(e,n)=>!!jv(e,n)||s.has(e,n)}));class uR{constructor(e){this.container=e}getPlatformInfoString(){return this.container.getProviders().map(n=>{if(hR(n)){const a=n.getImmediate();return`${a.library}/${a.version}`}else return null}).filter(n=>n).join(" ")}}function hR(s){return s.getComponent()?.type==="VERSION"}const Im="@firebase/app",Ov="0.14.9";const hs=new ep("@firebase/app"),dR="@firebase/app-compat",fR="@firebase/analytics-compat",mR="@firebase/analytics",pR="@firebase/app-check-compat",gR="@firebase/app-check",_R="@firebase/auth",yR="@firebase/auth-compat",vR="@firebase/database",ER="@firebase/data-connect",TR="@firebase/database-compat",bR="@firebase/functions",SR="@firebase/functions-compat",AR="@firebase/installations",wR="@firebase/installations-compat",NR="@firebase/messaging",RR="@firebase/messaging-compat",xR="@firebase/performance",IR="@firebase/performance-compat",CR="@firebase/remote-config",DR="@firebase/remote-config-compat",jR="@firebase/storage",OR="@firebase/storage-compat",MR="@firebase/firestore",PR="@firebase/ai",kR="@firebase/firestore-compat",LR="firebase",VR="12.10.0";const Cm="[DEFAULT]",UR={[Im]:"fire-core",[dR]:"fire-core-compat",[mR]:"fire-analytics",[fR]:"fire-analytics-compat",[gR]:"fire-app-check",[pR]:"fire-app-check-compat",[_R]:"fire-auth",[yR]:"fire-auth-compat",[vR]:"fire-rtdb",[ER]:"fire-data-connect",[TR]:"fire-rtdb-compat",[bR]:"fire-fn",[SR]:"fire-fn-compat",[AR]:"fire-iid",[wR]:"fire-iid-compat",[NR]:"fire-fcm",[RR]:"fire-fcm-compat",[xR]:"fire-perf",[IR]:"fire-perf-compat",[CR]:"fire-rc",[DR]:"fire-rc-compat",[jR]:"fire-gcs",[OR]:"fire-gcs-compat",[MR]:"fire-fst",[kR]:"fire-fst-compat",[PR]:"fire-vertex","fire-js":"fire-js",[LR]:"fire-js-all"};const mh=new Map,zR=new Map,Dm=new Map;function Mv(s,e){try{s.container.addComponent(e)}catch(n){hs.debug(`Component ${e.name} failed to register with FirebaseApp ${s.name}`,n)}}function no(s){const e=s.name;if(Dm.has(e))return hs.debug(`There were multiple attempts to register component ${e}.`),!1;Dm.set(e,s);for(const n of mh.values())Mv(n,s);for(const n of zR.values())Mv(n,s);return!0}function np(s,e){const n=s.container.getProvider("heartbeat").getImmediate({optional:!0});return n&&n.triggerHeartbeat(),s.container.getProvider(e)}function ut(s){return s==null?!1:s.settings!==void 0}const BR={"no-app":"No Firebase App '{$appName}' has been created - call initializeApp() first","bad-app-name":"Illegal App name: '{$appName}'","duplicate-app":"Firebase App named '{$appName}' already exists with different options or config","app-deleted":"Firebase App named '{$appName}' already deleted","server-app-deleted":"Firebase Server App has been deleted","no-options":"Need to provide options, when not being deployed to hosting via source.","invalid-app-argument":"firebase.{$appName}() takes either no argument or a Firebase App instance.","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}.","finalization-registry-not-supported":"FirebaseServerApp deleteOnDeref field defined but the JS runtime does not support FinalizationRegistry.","invalid-server-app-environment":"FirebaseServerApp is not for use in browser environments."},Zs=new rc("app","Firebase",BR);class HR{constructor(e,n,a){this._isDeleted=!1,this._options={...e},this._config={...n},this._name=n.name,this._automaticDataCollectionEnabled=n.automaticDataCollectionEnabled,this._container=a,this.container.addComponent(new $a("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 Zs.create("app-deleted",{appName:this._name})}}const po=VR;function AT(s,e={}){let n=s;typeof e!="object"&&(e={name:e});const a={name:Cm,automaticDataCollectionEnabled:!0,...e},o=a.name;if(typeof o!="string"||!o)throw Zs.create("bad-app-name",{appName:String(o)});if(n||(n=yT()),!n)throw Zs.create("no-options");const c=mh.get(o);if(c){if(Qa(n,c.options)&&Qa(a,c.config))return c;throw Zs.create("duplicate-app",{appName:o})}const f=new QN(o);for(const g of Dm.values())f.addComponent(g);const p=new HR(n,a,f);return mh.set(o,p),p}function wT(s=Cm){const e=mh.get(s);if(!e&&s===Cm&&yT())return AT();if(!e)throw Zs.create("no-app",{appName:s});return e}function ea(s,e,n){let a=UR[s]??s;n&&(a+=`-${n}`);const o=a.match(/\s|\//),c=e.match(/\s|\//);if(o||c){const f=[`Unable to register library "${a}" with version "${e}":`];o&&f.push(`library name "${a}" contains illegal characters (whitespace or "/")`),o&&c&&f.push("and"),c&&f.push(`version name "${e}" contains illegal characters (whitespace or "/")`),hs.warn(f.join(" "));return}no(new $a(`${a}-version`,()=>({library:a,version:e}),"VERSION"))}const qR="firebase-heartbeat-database",FR=1,Kl="firebase-heartbeat-store";let fm=null;function NT(){return fm||(fm=oR(qR,FR,{upgrade:(s,e)=>{switch(e){case 0:try{s.createObjectStore(Kl)}catch(n){console.warn(n)}}}}).catch(s=>{throw Zs.create("idb-open",{originalErrorMessage:s.message})})),fm}async function GR(s){try{const n=(await NT()).transaction(Kl),a=await n.objectStore(Kl).get(RT(s));return await n.done,a}catch(e){if(e instanceof ps)hs.warn(e.message);else{const n=Zs.create("idb-get",{originalErrorMessage:e?.message});hs.warn(n.message)}}}async function Pv(s,e){try{const a=(await NT()).transaction(Kl,"readwrite");await a.objectStore(Kl).put(e,RT(s)),await a.done}catch(n){if(n instanceof ps)hs.warn(n.message);else{const a=Zs.create("idb-set",{originalErrorMessage:n?.message});hs.warn(a.message)}}}function RT(s){return`${s.name}!${s.options.appId}`}const YR=1024,KR=30;class QR{constructor(e){this.container=e,this._heartbeatsCache=null;const n=this.container.getProvider("app").getImmediate();this._storage=new WR(n),this._heartbeatsCachePromise=this._storage.read().then(a=>(this._heartbeatsCache=a,a))}async triggerHeartbeat(){try{const n=this.container.getProvider("platform-logger").getImmediate().getPlatformInfoString(),a=kv();if(this._heartbeatsCache?.heartbeats==null&&(this._heartbeatsCache=await this._heartbeatsCachePromise,this._heartbeatsCache?.heartbeats==null)||this._heartbeatsCache.lastSentHeartbeatDate===a||this._heartbeatsCache.heartbeats.some(o=>o.date===a))return;if(this._heartbeatsCache.heartbeats.push({date:a,agent:n}),this._heartbeatsCache.heartbeats.length>KR){const o=XR(this._heartbeatsCache.heartbeats);this._heartbeatsCache.heartbeats.splice(o,1)}return this._storage.overwrite(this._heartbeatsCache)}catch(e){hs.warn(e)}}async getHeartbeatsHeader(){try{if(this._heartbeatsCache===null&&await this._heartbeatsCachePromise,this._heartbeatsCache?.heartbeats==null||this._heartbeatsCache.heartbeats.length===0)return"";const e=kv(),{heartbeatsToSend:n,unsentEntries:a}=$R(this._heartbeatsCache.heartbeats),o=fh(JSON.stringify({version:2,heartbeats:n}));return this._heartbeatsCache.lastSentHeartbeatDate=e,a.length>0?(this._heartbeatsCache.heartbeats=a,await this._storage.overwrite(this._heartbeatsCache)):(this._heartbeatsCache.heartbeats=[],this._storage.overwrite(this._heartbeatsCache)),o}catch(e){return hs.warn(e),""}}}function kv(){return new Date().toISOString().substring(0,10)}function $R(s,e=YR){const n=[];let a=s.slice();for(const o of s){const c=n.find(f=>f.agent===o.agent);if(c){if(c.dates.push(o.date),Lv(n)>e){c.dates.pop();break}}else if(n.push({agent:o.agent,dates:[o.date]}),Lv(n)>e){n.pop();break}a=a.slice(1)}return{heartbeatsToSend:n,unsentEntries:a}}class WR{constructor(e){this.app=e,this._canUseIndexedDBPromise=this.runIndexedDBEnvironmentCheck()}async runIndexedDBEnvironmentCheck(){return kN()?LN().then(()=>!0).catch(()=>!1):!1}async read(){if(await this._canUseIndexedDBPromise){const n=await GR(this.app);return n?.heartbeats?n:{heartbeats:[]}}else return{heartbeats:[]}}async overwrite(e){if(await this._canUseIndexedDBPromise){const a=await this.read();return Pv(this.app,{lastSentHeartbeatDate:e.lastSentHeartbeatDate??a.lastSentHeartbeatDate,heartbeats:e.heartbeats})}else return}async add(e){if(await this._canUseIndexedDBPromise){const a=await this.read();return Pv(this.app,{lastSentHeartbeatDate:e.lastSentHeartbeatDate??a.lastSentHeartbeatDate,heartbeats:[...a.heartbeats,...e.heartbeats]})}else return}}function Lv(s){return fh(JSON.stringify({version:2,heartbeats:s})).length}function XR(s){if(s.length===0)return-1;let e=0,n=s[0].date;for(let a=1;a<s.length;a++)s[a].date<n&&(n=s[a].date,e=a);return e}function JR(s){no(new $a("platform-logger",e=>new uR(e),"PRIVATE")),no(new $a("heartbeat",e=>new QR(e),"PRIVATE")),ea(Im,Ov,s),ea(Im,Ov,"esm2020"),ea("fire-js","")}JR("");var ZR="firebase",ex="12.10.0";ea(ZR,ex,"app");const tx={PHONE:"phone",TOTP:"totp"},nx={FACEBOOK:"facebook.com",GITHUB:"github.com",GOOGLE:"google.com",PASSWORD:"password",PHONE:"phone",TWITTER:"twitter.com"},ix={EMAIL_LINK:"emailLink",EMAIL_PASSWORD:"password",FACEBOOK:"facebook.com",GITHUB:"github.com",GOOGLE:"google.com",PHONE:"phone",TWITTER:"twitter.com"},sx={LINK:"link",REAUTHENTICATE:"reauthenticate",SIGN_IN:"signIn"},ax={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"};function rx(){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 always 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 registered 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.","invalid-hosting-link-domain":"The provided Hosting link domain is not configured in Firebase Hosting or is not owned by the current project. This cannot be a default Hosting domain (`web.app` or `firebaseapp.com`)."}}function xT(){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 ox=rx,IT=xT,CT=new rc("auth","Firebase",xT()),lx={ADMIN_ONLY_OPERATION:"auth/admin-restricted-operation",ARGUMENT_ERROR:"auth/argument-error",APP_NOT_AUTHORIZED:"auth/app-not-authorized",APP_NOT_INSTALLED:"auth/app-not-installed",CAPTCHA_CHECK_FAILED:"auth/captcha-check-failed",CODE_EXPIRED:"auth/code-expired",CORDOVA_NOT_READY:"auth/cordova-not-ready",CORS_UNSUPPORTED:"auth/cors-unsupported",CREDENTIAL_ALREADY_IN_USE:"auth/credential-already-in-use",CREDENTIAL_MISMATCH:"auth/custom-token-mismatch",CREDENTIAL_TOO_OLD_LOGIN_AGAIN:"auth/requires-recent-login",DEPENDENT_SDK_INIT_BEFORE_AUTH:"auth/dependent-sdk-initialized-before-auth",DYNAMIC_LINK_NOT_ACTIVATED:"auth/dynamic-link-not-activated",EMAIL_CHANGE_NEEDS_VERIFICATION:"auth/email-change-needs-verification",EMAIL_EXISTS:"auth/email-already-in-use",EMULATOR_CONFIG_FAILED:"auth/emulator-config-failed",EXPIRED_OOB_CODE:"auth/expired-action-code",EXPIRED_POPUP_REQUEST:"auth/cancelled-popup-request",INTERNAL_ERROR:"auth/internal-error",INVALID_API_KEY:"auth/invalid-api-key",INVALID_APP_CREDENTIAL:"auth/invalid-app-credential",INVALID_APP_ID:"auth/invalid-app-id",INVALID_AUTH:"auth/invalid-user-token",INVALID_AUTH_EVENT:"auth/invalid-auth-event",INVALID_CERT_HASH:"auth/invalid-cert-hash",INVALID_CODE:"auth/invalid-verification-code",INVALID_CONTINUE_URI:"auth/invalid-continue-uri",INVALID_CORDOVA_CONFIGURATION:"auth/invalid-cordova-configuration",INVALID_CUSTOM_TOKEN:"auth/invalid-custom-token",INVALID_DYNAMIC_LINK_DOMAIN:"auth/invalid-dynamic-link-domain",INVALID_EMAIL:"auth/invalid-email",INVALID_EMULATOR_SCHEME:"auth/invalid-emulator-scheme",INVALID_IDP_RESPONSE:"auth/invalid-credential",INVALID_LOGIN_CREDENTIALS:"auth/invalid-credential",INVALID_MESSAGE_PAYLOAD:"auth/invalid-message-payload",INVALID_MFA_SESSION:"auth/invalid-multi-factor-session",INVALID_OAUTH_CLIENT_ID:"auth/invalid-oauth-client-id",INVALID_OAUTH_PROVIDER:"auth/invalid-oauth-provider",INVALID_OOB_CODE:"auth/invalid-action-code",INVALID_ORIGIN:"auth/unauthorized-domain",INVALID_PASSWORD:"auth/wrong-password",INVALID_PERSISTENCE:"auth/invalid-persistence-type",INVALID_PHONE_NUMBER:"auth/invalid-phone-number",INVALID_PROVIDER_ID:"auth/invalid-provider-id",INVALID_RECIPIENT_EMAIL:"auth/invalid-recipient-email",INVALID_SENDER:"auth/invalid-sender",INVALID_SESSION_INFO:"auth/invalid-verification-id",INVALID_TENANT_ID:"auth/invalid-tenant-id",MFA_INFO_NOT_FOUND:"auth/multi-factor-info-not-found",MFA_REQUIRED:"auth/multi-factor-auth-required",MISSING_ANDROID_PACKAGE_NAME:"auth/missing-android-pkg-name",MISSING_APP_CREDENTIAL:"auth/missing-app-credential",MISSING_AUTH_DOMAIN:"auth/auth-domain-config-required",MISSING_CODE:"auth/missing-verification-code",MISSING_CONTINUE_URI:"auth/missing-continue-uri",MISSING_IFRAME_START:"auth/missing-iframe-start",MISSING_IOS_BUNDLE_ID:"auth/missing-ios-bundle-id",MISSING_OR_INVALID_NONCE:"auth/missing-or-invalid-nonce",MISSING_MFA_INFO:"auth/missing-multi-factor-info",MISSING_MFA_SESSION:"auth/missing-multi-factor-session",MISSING_PHONE_NUMBER:"auth/missing-phone-number",MISSING_PASSWORD:"auth/missing-password",MISSING_SESSION_INFO:"auth/missing-verification-id",MODULE_DESTROYED:"auth/app-deleted",NEED_CONFIRMATION:"auth/account-exists-with-different-credential",NETWORK_REQUEST_FAILED:"auth/network-request-failed",NULL_USER:"auth/null-user",NO_AUTH_EVENT:"auth/no-auth-event",NO_SUCH_PROVIDER:"auth/no-such-provider",OPERATION_NOT_ALLOWED:"auth/operation-not-allowed",OPERATION_NOT_SUPPORTED:"auth/operation-not-supported-in-this-environment",POPUP_BLOCKED:"auth/popup-blocked",POPUP_CLOSED_BY_USER:"auth/popup-closed-by-user",PROVIDER_ALREADY_LINKED:"auth/provider-already-linked",QUOTA_EXCEEDED:"auth/quota-exceeded",REDIRECT_CANCELLED_BY_USER:"auth/redirect-cancelled-by-user",REDIRECT_OPERATION_PENDING:"auth/redirect-operation-pending",REJECTED_CREDENTIAL:"auth/rejected-credential",SECOND_FACTOR_ALREADY_ENROLLED:"auth/second-factor-already-in-use",SECOND_FACTOR_LIMIT_EXCEEDED:"auth/maximum-second-factor-count-exceeded",TENANT_ID_MISMATCH:"auth/tenant-id-mismatch",TIMEOUT:"auth/timeout",TOKEN_EXPIRED:"auth/user-token-expired",TOO_MANY_ATTEMPTS_TRY_LATER:"auth/too-many-requests",UNAUTHORIZED_DOMAIN:"auth/unauthorized-continue-uri",UNSUPPORTED_FIRST_FACTOR:"auth/unsupported-first-factor",UNSUPPORTED_PERSISTENCE:"auth/unsupported-persistence-type",UNSUPPORTED_TENANT_OPERATION:"auth/unsupported-tenant-operation",UNVERIFIED_EMAIL:"auth/unverified-email",USER_CANCELLED:"auth/user-cancelled",USER_DELETED:"auth/user-not-found",USER_DISABLED:"auth/user-disabled",USER_MISMATCH:"auth/user-mismatch",USER_SIGNED_OUT:"auth/user-signed-out",WEAK_PASSWORD:"auth/weak-password",WEB_STORAGE_UNSUPPORTED:"auth/web-storage-unsupported",ALREADY_INITIALIZED:"auth/already-initialized",RECAPTCHA_NOT_ENABLED:"auth/recaptcha-not-enabled",MISSING_RECAPTCHA_TOKEN:"auth/missing-recaptcha-token",INVALID_RECAPTCHA_TOKEN:"auth/invalid-recaptcha-token",INVALID_RECAPTCHA_ACTION:"auth/invalid-recaptcha-action",MISSING_CLIENT_TYPE:"auth/missing-client-type",MISSING_RECAPTCHA_VERSION:"auth/missing-recaptcha-version",INVALID_RECAPTCHA_VERSION:"auth/invalid-recaptcha-version",INVALID_REQ_TYPE:"auth/invalid-req-type",INVALID_HOSTING_LINK_DOMAIN:"auth/invalid-hosting-link-domain"};const ph=new ep("@firebase/auth");function cx(s,...e){ph.logLevel<=je.WARN&&ph.warn(`Auth (${po}): ${s}`,...e)}function ih(s,...e){ph.logLevel<=je.ERROR&&ph.error(`Auth (${po}): ${s}`,...e)}function gn(s,...e){throw sp(s,...e)}function on(s,...e){return sp(s,...e)}function ip(s,e,n){const a={...IT(),[e]:n};return new rc("auth","Firebase",a).create(e,{appName:s.name})}function zt(s){return ip(s,"operation-not-supported-in-this-environment","Operations that alter the current user are not supported in conjunction with FirebaseServerApp")}function go(s,e,n){const a=n;if(!(e instanceof a))throw a.name!==e.constructor.name&&gn(s,"argument-error"),ip(s,"argument-error",`Type of ${e.constructor.name} does not match expected instance.Did you pass a reference from a different Auth SDK?`)}function sp(s,...e){if(typeof s!="string"){const n=e[0],a=[...e.slice(1)];return a[0]&&(a[0].appName=s.name),s._errorFactory.create(n,...a)}return CT.create(s,...e)}function te(s,e,...n){if(!s)throw sp(e,...n)}function Ii(s){const e="INTERNAL ASSERTION FAILED: "+s;throw ih(e),new Error(e)}function ds(s,e){s||Ii(e)}function Ql(){return typeof self<"u"&&self.location?.href||""}function ap(){return Vv()==="http:"||Vv()==="https:"}function Vv(){return typeof self<"u"&&self.location?.protocol||null}function ux(){return typeof navigator<"u"&&navigator&&"onLine"in navigator&&typeof navigator.onLine=="boolean"&&(ap()||jN()||"connection"in navigator)?navigator.onLine:!0}function hx(){if(typeof navigator>"u")return null;const s=navigator;return s.languages&&s.languages[0]||s.language||null}class oc{constructor(e,n){this.shortDelay=e,this.longDelay=n,ds(n>e,"Short delay should be less than long delay!"),this.isMobile=IN()||ON()}get(){return ux()?this.isMobile?this.longDelay:this.shortDelay:Math.min(5e3,this.shortDelay)}}function rp(s,e){ds(s.emulator,"Emulator should always be set here");const{url:n}=s.emulator;return e?`${n}${e.startsWith("/")?e.slice(1):e}`:n}class DT{static initialize(e,n,a){this.fetchImpl=e,n&&(this.headersImpl=n),a&&(this.responseImpl=a)}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;Ii("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;Ii("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;Ii("Could not find Response implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}}const dx={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"};const fx=["/v1/accounts:signInWithCustomToken","/v1/accounts:signInWithEmailLink","/v1/accounts:signInWithIdp","/v1/accounts:signInWithPassword","/v1/accounts:signInWithPhoneNumber","/v1/token"],mx=new oc(3e4,6e4);function nt(s,e){return s.tenantId&&!e.tenantId?{...e,tenantId:s.tenantId}:e}async function it(s,e,n,a,o={}){return jT(s,o,async()=>{let c={},f={};a&&(e==="GET"?f=a:c={body:JSON.stringify(a)});const p=mo({key:s.config.apiKey,...f}).slice(1),g=await s._getAdditionalHeaders();g["Content-Type"]="application/json",s.languageCode&&(g["X-Firebase-Locale"]=s.languageCode);const y={method:e,headers:g,...c};return DN()||(y.referrerPolicy="no-referrer"),s.emulatorConfig&&fo(s.emulatorConfig.host)&&(y.credentials="include"),DT.fetch()(await OT(s,s.config.apiHost,n,p),y)})}async function jT(s,e,n){s._canInitEmulator=!1;const a={...dx,...e};try{const o=new gx(s),c=await Promise.race([n(),o.promise]);o.clearNetworkTimeout();const f=await c.json();if("needConfirmation"in f)throw Ml(s,"account-exists-with-different-credential",f);if(c.ok&&!("errorMessage"in f))return f;{const p=c.ok?f.errorMessage:f.error.message,[g,y]=p.split(" : ");if(g==="FEDERATED_USER_ID_ALREADY_LINKED")throw Ml(s,"credential-already-in-use",f);if(g==="EMAIL_EXISTS")throw Ml(s,"email-already-in-use",f);if(g==="USER_DISABLED")throw Ml(s,"user-disabled",f);const T=a[g]||g.toLowerCase().replace(/[_\s]+/g,"-");if(y)throw ip(s,T,y);gn(s,T)}}catch(o){if(o instanceof ps)throw o;gn(s,"network-request-failed",{message:String(o)})}}async function gs(s,e,n,a,o={}){const c=await it(s,e,n,a,o);return"mfaPendingCredential"in c&&gn(s,"multi-factor-auth-required",{_serverResponse:c}),c}async function OT(s,e,n,a){const o=`${e}${n}?${a}`,c=s,f=c.config.emulator?rp(s.config,o):`${s.config.apiScheme}://${o}`;return fx.includes(n)&&(await c._persistenceManagerAvailable,c._getPersistenceType()==="COOKIE")?c._getPersistence()._getFinalTarget(f).toString():f}function px(s){switch(s){case"ENFORCE":return"ENFORCE";case"AUDIT":return"AUDIT";case"OFF":return"OFF";default:return"ENFORCEMENT_STATE_UNSPECIFIED"}}class gx{clearNetworkTimeout(){clearTimeout(this.timer)}constructor(e){this.auth=e,this.timer=null,this.promise=new Promise((n,a)=>{this.timer=setTimeout(()=>a(on(this.auth,"network-request-failed")),mx.get())})}}function Ml(s,e,n){const a={appName:s.name};n.email&&(a.email=n.email),n.phoneNumber&&(a.phoneNumber=n.phoneNumber);const o=on(s,e,a);return o.customData._tokenResponse=n,o}function Uv(s){return s!==void 0&&s.getResponse!==void 0}function zv(s){return s!==void 0&&s.enterprise!==void 0}class MT{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 px(n.enforcementState);return null}isProviderEnabled(e){return this.getProviderEnforcementState(e)==="ENFORCE"||this.getProviderEnforcementState(e)==="AUDIT"}isAnyProviderEnabled(){return this.isProviderEnabled("EMAIL_PASSWORD_PROVIDER")||this.isProviderEnabled("PHONE_PROVIDER")}}async function _x(s){return(await it(s,"GET","/v1/recaptchaParams")).recaptchaSiteKey||""}async function PT(s,e){return it(s,"GET","/v2/recaptchaConfig",nt(s,e))}async function yx(s,e){return it(s,"POST","/v1/accounts:delete",e)}async function vx(s,e){return it(s,"POST","/v1/accounts:update",e)}async function gh(s,e){return it(s,"POST","/v1/accounts:lookup",e)}function Ll(s){if(s)try{const e=new Date(Number(s));if(!isNaN(e.getTime()))return e.toUTCString()}catch{}}function Ex(s,e=!1){return Ee(s).getIdToken(e)}async function kT(s,e=!1){const n=Ee(s),a=await n.getIdToken(e),o=kh(a);te(o&&o.exp&&o.auth_time&&o.iat,n.auth,"internal-error");const c=typeof o.firebase=="object"?o.firebase:void 0,f=c?.sign_in_provider;return{claims:o,token:a,authTime:Ll(mm(o.auth_time)),issuedAtTime:Ll(mm(o.iat)),expirationTime:Ll(mm(o.exp)),signInProvider:f||null,signInSecondFactor:c?.sign_in_second_factor||null}}function mm(s){return Number(s)*1e3}function kh(s){const[e,n,a]=s.split(".");if(e===void 0||n===void 0||a===void 0)return ih("JWT malformed, contained fewer than 3 sections"),null;try{const o=gT(n);return o?JSON.parse(o):(ih("Failed to decode base64 JWT payload"),null)}catch(o){return ih("Caught error parsing JWT payload as JSON",o?.toString()),null}}function Bv(s){const e=kh(s);return te(e,"internal-error"),te(typeof e.exp<"u","internal-error"),te(typeof e.iat<"u","internal-error"),Number(e.exp)-Number(e.iat)}async function fs(s,e,n=!1){if(n)return e;try{return await e}catch(a){throw a instanceof ps&&Tx(a)&&s.auth.currentUser===s&&await s.auth.signOut(),a}}function Tx({code:s}){return s==="auth/user-disabled"||s==="auth/user-token-expired"}class bx{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){if(e){const n=this.errorBackoff;return this.errorBackoff=Math.min(this.errorBackoff*2,96e4),n}else{this.errorBackoff=3e4;const a=(this.user.stsTokenManager.expirationTime??0)-Date.now()-3e5;return Math.max(0,a)}}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()}}class jm{constructor(e,n){this.createdAt=e,this.lastLoginAt=n,this._initializeTime()}_initializeTime(){this.lastSignInTime=Ll(this.lastLoginAt),this.creationTime=Ll(this.createdAt)}_copy(e){this.createdAt=e.createdAt,this.lastLoginAt=e.lastLoginAt,this._initializeTime()}toJSON(){return{createdAt:this.createdAt,lastLoginAt:this.lastLoginAt}}}async function $l(s){const e=s.auth,n=await s.getIdToken(),a=await fs(s,gh(e,{idToken:n}));te(a?.users.length,e,"internal-error");const o=a.users[0];s._notifyReloadListener(o);const c=o.providerUserInfo?.length?VT(o.providerUserInfo):[],f=Sx(s.providerData,c),p=s.isAnonymous,g=!(s.email&&o.passwordHash)&&!f?.length,y=p?g:!1,T={uid:o.localId,displayName:o.displayName||null,photoURL:o.photoUrl||null,email:o.email||null,emailVerified:o.emailVerified||!1,phoneNumber:o.phoneNumber||null,tenantId:o.tenantId||null,providerData:f,metadata:new jm(o.createdAt,o.lastLoginAt),isAnonymous:y};Object.assign(s,T)}async function LT(s){const e=Ee(s);await $l(e),await e.auth._persistUserIfCurrent(e),e.auth._notifyListenersIfCurrent(e)}function Sx(s,e){return[...s.filter(a=>!e.some(o=>o.providerId===a.providerId)),...e]}function VT(s){return s.map(({providerId:e,...n})=>({providerId:e,uid:n.rawId||"",displayName:n.displayName||null,email:n.email||null,phoneNumber:n.phoneNumber||null,photoURL:n.photoUrl||null}))}async function Ax(s,e){const n=await jT(s,{},async()=>{const a=mo({grant_type:"refresh_token",refresh_token:e}).slice(1),{tokenApiHost:o,apiKey:c}=s.config,f=await OT(s,o,"/v1/token",`key=${c}`),p=await s._getAdditionalHeaders();p["Content-Type"]="application/x-www-form-urlencoded";const g={method:"POST",headers:p,body:a};return s.emulatorConfig&&fo(s.emulatorConfig.host)&&(g.credentials="include"),DT.fetch()(f,g)});return{accessToken:n.access_token,expiresIn:n.expires_in,refreshToken:n.refresh_token}}async function wx(s,e){return it(s,"POST","/v2/accounts:revokeToken",nt(s,e))}class Wr{constructor(){this.refreshToken=null,this.accessToken=null,this.expirationTime=null}get isExpired(){return!this.expirationTime||Date.now()>this.expirationTime-3e4}updateFromServerResponse(e){te(e.idToken,"internal-error"),te(typeof e.idToken<"u","internal-error"),te(typeof e.refreshToken<"u","internal-error");const n="expiresIn"in e&&typeof e.expiresIn<"u"?Number(e.expiresIn):Bv(e.idToken);this.updateTokensAndExpiration(e.idToken,e.refreshToken,n)}updateFromIdToken(e){te(e.length!==0,"internal-error");const n=Bv(e);this.updateTokensAndExpiration(e,null,n)}async getToken(e,n=!1){return!n&&this.accessToken&&!this.isExpired?this.accessToken:(te(this.refreshToken,e,"user-token-expired"),this.refreshToken?(await this.refresh(e,this.refreshToken),this.accessToken):null)}clearRefreshToken(){this.refreshToken=null}async refresh(e,n){const{accessToken:a,refreshToken:o,expiresIn:c}=await Ax(e,n);this.updateTokensAndExpiration(a,o,Number(c))}updateTokensAndExpiration(e,n,a){this.refreshToken=n||null,this.accessToken=e||null,this.expirationTime=Date.now()+a*1e3}static fromJSON(e,n){const{refreshToken:a,accessToken:o,expirationTime:c}=n,f=new Wr;return a&&(te(typeof a=="string","internal-error",{appName:e}),f.refreshToken=a),o&&(te(typeof o=="string","internal-error",{appName:e}),f.accessToken=o),c&&(te(typeof c=="number","internal-error",{appName:e}),f.expirationTime=c),f}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 Wr,this.toJSON())}_performRefresh(){return Ii("not implemented")}}function Xs(s,e){te(typeof s=="string"||typeof s>"u","internal-error",{appName:e})}class ii{constructor({uid:e,auth:n,stsTokenManager:a,...o}){this.providerId="firebase",this.proactiveRefresh=new bx(this),this.reloadUserInfo=null,this.reloadListener=null,this.uid=e,this.auth=n,this.stsTokenManager=a,this.accessToken=a.accessToken,this.displayName=o.displayName||null,this.email=o.email||null,this.emailVerified=o.emailVerified||!1,this.phoneNumber=o.phoneNumber||null,this.photoURL=o.photoURL||null,this.isAnonymous=o.isAnonymous||!1,this.tenantId=o.tenantId||null,this.providerData=o.providerData?[...o.providerData]:[],this.metadata=new jm(o.createdAt||void 0,o.lastLoginAt||void 0)}async getIdToken(e){const n=await fs(this,this.stsTokenManager.getToken(this.auth,e));return te(n,this.auth,"internal-error"),this.accessToken!==n&&(this.accessToken=n,await this.auth._persistUserIfCurrent(this),this.auth._notifyListenersIfCurrent(this)),n}getIdTokenResult(e){return kT(this,e)}reload(){return LT(this)}_assign(e){this!==e&&(te(this.uid===e.uid,this.auth,"internal-error"),this.displayName=e.displayName,this.photoURL=e.photoURL,this.email=e.email,this.emailVerified=e.emailVerified,this.phoneNumber=e.phoneNumber,this.isAnonymous=e.isAnonymous,this.tenantId=e.tenantId,this.providerData=e.providerData.map(n=>({...n})),this.metadata._copy(e.metadata),this.stsTokenManager._assign(e.stsTokenManager))}_clone(e){const n=new ii({...this,auth:e,stsTokenManager:this.stsTokenManager._clone()});return n.metadata._copy(this.metadata),n}_onReload(e){te(!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 a=!1;e.idToken&&e.idToken!==this.stsTokenManager.accessToken&&(this.stsTokenManager.updateFromServerResponse(e),a=!0),n&&await $l(this),await this.auth._persistUserIfCurrent(this),a&&this.auth._notifyListenersIfCurrent(this)}async delete(){if(ut(this.auth.app))return Promise.reject(zt(this.auth));const e=await this.getIdToken();return await fs(this,yx(this.auth,{idToken:e})),this.stsTokenManager.clearRefreshToken(),this.auth.signOut()}toJSON(){return{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=>({...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){const a=n.displayName??void 0,o=n.email??void 0,c=n.phoneNumber??void 0,f=n.photoURL??void 0,p=n.tenantId??void 0,g=n._redirectEventId??void 0,y=n.createdAt??void 0,T=n.lastLoginAt??void 0,{uid:b,emailVerified:N,isAnonymous:P,providerData:G,stsTokenManager:K}=n;te(b&&K,e,"internal-error");const Y=Wr.fromJSON(this.name,K);te(typeof b=="string",e,"internal-error"),Xs(a,e.name),Xs(o,e.name),te(typeof N=="boolean",e,"internal-error"),te(typeof P=="boolean",e,"internal-error"),Xs(c,e.name),Xs(f,e.name),Xs(p,e.name),Xs(g,e.name),Xs(y,e.name),Xs(T,e.name);const ne=new ii({uid:b,auth:e,email:o,emailVerified:N,displayName:a,isAnonymous:P,photoURL:f,phoneNumber:c,tenantId:p,stsTokenManager:Y,createdAt:y,lastLoginAt:T});return G&&Array.isArray(G)&&(ne.providerData=G.map(re=>({...re}))),g&&(ne._redirectEventId=g),ne}static async _fromIdTokenResponse(e,n,a=!1){const o=new Wr;o.updateFromServerResponse(n);const c=new ii({uid:n.localId,auth:e,stsTokenManager:o,isAnonymous:a});return await $l(c),c}static async _fromGetAccountInfoResponse(e,n,a){const o=n.users[0];te(o.localId!==void 0,"internal-error");const c=o.providerUserInfo!==void 0?VT(o.providerUserInfo):[],f=!(o.email&&o.passwordHash)&&!c?.length,p=new Wr;p.updateFromIdToken(a);const g=new ii({uid:o.localId,auth:e,stsTokenManager:p,isAnonymous:f}),y={uid:o.localId,displayName:o.displayName||null,photoURL:o.photoUrl||null,email:o.email||null,emailVerified:o.emailVerified||!1,phoneNumber:o.phoneNumber||null,tenantId:o.tenantId||null,providerData:c,metadata:new jm(o.createdAt,o.lastLoginAt),isAnonymous:!(o.email&&o.passwordHash)&&!c?.length};return Object.assign(g,y),g}}const Hv=new Map;function as(s){ds(s instanceof Function,"Expected a class definition");let e=Hv.get(s);return e?(ds(e instanceof s,"Instance stored in cache mismatched with class"),e):(e=new s,Hv.set(s,e),e)}class UT{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){}}UT.type="NONE";const Om=UT;function sh(s,e,n){return`firebase:${s}:${e}:${n}`}class Xr{constructor(e,n,a){this.persistence=e,this.auth=n,this.userKey=a;const{config:o,name:c}=this.auth;this.fullUserKey=sh(this.userKey,o.apiKey,c),this.fullPersistenceKey=sh("persistence",o.apiKey,c),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);if(!e)return null;if(typeof e=="string"){const n=await gh(this.auth,{idToken:e}).catch(()=>{});return n?ii._fromGetAccountInfoResponse(this.auth,n,e):null}return ii._fromJSON(this.auth,e)}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,a="authUser"){if(!n.length)return new Xr(as(Om),e,a);const o=(await Promise.all(n.map(async y=>{if(await y._isAvailable())return y}))).filter(y=>y);let c=o[0]||as(Om);const f=sh(a,e.config.apiKey,e.name);let p=null;for(const y of n)try{const T=await y._get(f);if(T){let b;if(typeof T=="string"){const N=await gh(e,{idToken:T}).catch(()=>{});if(!N)break;b=await ii._fromGetAccountInfoResponse(e,N,T)}else b=ii._fromJSON(e,T);y!==c&&(p=b),c=y;break}}catch{}const g=o.filter(y=>y._shouldAllowMigration);return!c._shouldAllowMigration||!g.length?new Xr(c,e,a):(c=g[0],p&&await c._set(f,p.toJSON()),await Promise.all(n.map(async y=>{if(y!==c)try{await y._remove(f)}catch{}})),new Xr(c,e,a))}}function qv(s){const e=s.toLowerCase();if(e.includes("opera/")||e.includes("opr/")||e.includes("opios/"))return"Opera";if(qT(e))return"IEMobile";if(e.includes("msie")||e.includes("trident/"))return"IE";if(e.includes("edge/"))return"Edge";if(zT(e))return"Firefox";if(e.includes("silk/"))return"Silk";if(GT(e))return"Blackberry";if(YT(e))return"Webos";if(BT(e))return"Safari";if((e.includes("chrome/")||HT(e))&&!e.includes("edge/"))return"Chrome";if(FT(e))return"Android";{const n=/([a-zA-Z\d\.]+)\/[a-zA-Z\d\.]*$/,a=s.match(n);if(a?.length===2)return a[1]}return"Other"}function zT(s=nn()){return/firefox\//i.test(s)}function BT(s=nn()){const e=s.toLowerCase();return e.includes("safari/")&&!e.includes("chrome/")&&!e.includes("crios/")&&!e.includes("android")}function HT(s=nn()){return/crios\//i.test(s)}function qT(s=nn()){return/iemobile/i.test(s)}function FT(s=nn()){return/android/i.test(s)}function GT(s=nn()){return/blackberry/i.test(s)}function YT(s=nn()){return/webos/i.test(s)}function op(s=nn()){return/iphone|ipad|ipod/i.test(s)||/macintosh/i.test(s)&&/mobile/i.test(s)}function Nx(s=nn()){return op(s)&&!!window.navigator?.standalone}function Rx(){return MN()&&document.documentMode===10}function KT(s=nn()){return op(s)||FT(s)||YT(s)||GT(s)||/windows phone/i.test(s)||qT(s)}function QT(s,e=[]){let n;switch(s){case"Browser":n=qv(nn());break;case"Worker":n=`${qv(nn())}-${s}`;break;default:n=s}const a=e.length?e.join(","):"FirebaseCore-web";return`${n}/JsCore/${po}/${a}`}class xx{constructor(e){this.auth=e,this.queue=[]}pushCallback(e,n){const a=c=>new Promise((f,p)=>{try{const g=e(c);f(g)}catch(g){p(g)}});a.onAbort=n,this.queue.push(a);const o=this.queue.length-1;return()=>{this.queue[o]=()=>Promise.resolve()}}async runMiddleware(e){if(this.auth.currentUser===e)return;const n=[];try{for(const a of this.queue)await a(e),a.onAbort&&n.push(a.onAbort)}catch(a){n.reverse();for(const o of n)try{o()}catch{}throw this.auth._errorFactory.create("login-blocked",{originalMessage:a?.message})}}}async function Ix(s,e={}){return it(s,"GET","/v2/passwordPolicy",nt(s,e))}const Cx=6;class Dx{constructor(e){const n=e.customStrengthOptions;this.customStrengthOptions={},this.customStrengthOptions.minPasswordLength=n.minPasswordLength??Cx,n.maxPasswordLength&&(this.customStrengthOptions.maxPasswordLength=n.maxPasswordLength),n.containsLowercaseCharacter!==void 0&&(this.customStrengthOptions.containsLowercaseLetter=n.containsLowercaseCharacter),n.containsUppercaseCharacter!==void 0&&(this.customStrengthOptions.containsUppercaseLetter=n.containsUppercaseCharacter),n.containsNumericCharacter!==void 0&&(this.customStrengthOptions.containsNumericCharacter=n.containsNumericCharacter),n.containsNonAlphanumericCharacter!==void 0&&(this.customStrengthOptions.containsNonAlphanumericCharacter=n.containsNonAlphanumericCharacter),this.enforcementState=e.enforcementState,this.enforcementState==="ENFORCEMENT_STATE_UNSPECIFIED"&&(this.enforcementState="OFF"),this.allowedNonAlphanumericCharacters=e.allowedNonAlphanumericCharacters?.join("")??"",this.forceUpgradeOnSignin=e.forceUpgradeOnSignin??!1,this.schemaVersion=e.schemaVersion}validatePassword(e){const n={isValid:!0,passwordPolicy:this};return this.validatePasswordLengthOptions(e,n),this.validatePasswordCharacterOptions(e,n),n.isValid&&(n.isValid=n.meetsMinPasswordLength??!0),n.isValid&&(n.isValid=n.meetsMaxPasswordLength??!0),n.isValid&&(n.isValid=n.containsLowercaseLetter??!0),n.isValid&&(n.isValid=n.containsUppercaseLetter??!0),n.isValid&&(n.isValid=n.containsNumericCharacter??!0),n.isValid&&(n.isValid=n.containsNonAlphanumericCharacter??!0),n}validatePasswordLengthOptions(e,n){const a=this.customStrengthOptions.minPasswordLength,o=this.customStrengthOptions.maxPasswordLength;a&&(n.meetsMinPasswordLength=e.length>=a),o&&(n.meetsMaxPasswordLength=e.length<=o)}validatePasswordCharacterOptions(e,n){this.updatePasswordCharacterOptionsStatuses(n,!1,!1,!1,!1);let a;for(let o=0;o<e.length;o++)a=e.charAt(o),this.updatePasswordCharacterOptionsStatuses(n,a>="a"&&a<="z",a>="A"&&a<="Z",a>="0"&&a<="9",this.allowedNonAlphanumericCharacters.includes(a))}updatePasswordCharacterOptionsStatuses(e,n,a,o,c){this.customStrengthOptions.containsLowercaseLetter&&(e.containsLowercaseLetter||(e.containsLowercaseLetter=n)),this.customStrengthOptions.containsUppercaseLetter&&(e.containsUppercaseLetter||(e.containsUppercaseLetter=a)),this.customStrengthOptions.containsNumericCharacter&&(e.containsNumericCharacter||(e.containsNumericCharacter=o)),this.customStrengthOptions.containsNonAlphanumericCharacter&&(e.containsNonAlphanumericCharacter||(e.containsNonAlphanumericCharacter=c))}}class jx{constructor(e,n,a,o){this.app=e,this.heartbeatServiceProvider=n,this.appCheckServiceProvider=a,this.config=o,this.currentUser=null,this.emulatorConfig=null,this.operations=Promise.resolve(),this.authStateSubscription=new Fv(this),this.idTokenSubscription=new Fv(this),this.beforeStateQueue=new xx(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=CT,this._agentRecaptchaConfig=null,this._tenantRecaptchaConfigs={},this._projectPasswordPolicy=null,this._tenantPasswordPolicies={},this._resolvePersistenceManagerAvailable=void 0,this.lastNotifiedUid=void 0,this.languageCode=null,this.tenantId=null,this.settings={appVerificationDisabledForTesting:!1},this.frameworks=[],this.name=e.name,this.clientVersion=o.sdkClientVersion,this._persistenceManagerAvailable=new Promise(c=>this._resolvePersistenceManagerAvailable=c)}_initializeWithPersistence(e,n){return n&&(this._popupRedirectResolver=as(n)),this._initializationPromise=this.queue(async()=>{if(!this._deleted&&(this.persistenceManager=await Xr.create(this,e),this._resolvePersistenceManagerAvailable?.(),!this._deleted)){if(this._popupRedirectResolver?._shouldInitProactively)try{await this._popupRedirectResolver._initialize(this)}catch{}await this.initializeCurrentUser(n),this.lastNotifiedUid=this.currentUser?.uid||null,!this._deleted&&(this._isInitialized=!0)}}),this._initializationPromise}async _onStorageEvent(){if(this._deleted)return;const e=await this.assertedPersistence.getCurrentUser();if(!(!this.currentUser&&!e)){if(this.currentUser&&e&&this.currentUser.uid===e.uid){this._currentUser._assign(e),await this.currentUser.getIdToken();return}await this._updateCurrentUser(e,!0)}}async initializeCurrentUserFromIdToken(e){try{const n=await gh(this,{idToken:e}),a=await ii._fromGetAccountInfoResponse(this,n,e);await this.directlySetCurrentUser(a)}catch(n){console.warn("FirebaseServerApp could not login user with provided authIdToken: ",n),await this.directlySetCurrentUser(null)}}async initializeCurrentUser(e){if(ut(this.app)){const c=this.app.settings.authIdToken;return c?new Promise(f=>{setTimeout(()=>this.initializeCurrentUserFromIdToken(c).then(f,f))}):this.directlySetCurrentUser(null)}const n=await this.assertedPersistence.getCurrentUser();let a=n,o=!1;if(e&&this.config.authDomain){await this.getOrInitRedirectPersistenceManager();const c=this.redirectUser?._redirectEventId,f=a?._redirectEventId,p=await this.tryRedirectSignIn(e);(!c||c===f)&&p?.user&&(a=p.user,o=!0)}if(!a)return this.directlySetCurrentUser(null);if(!a._redirectEventId){if(o)try{await this.beforeStateQueue.runMiddleware(a)}catch(c){a=n,this._popupRedirectResolver._overrideRedirectResult(this,()=>Promise.reject(c))}return a?this.reloadAndSetCurrentUserOrClear(a):this.directlySetCurrentUser(null)}return te(this._popupRedirectResolver,this,"argument-error"),await this.getOrInitRedirectPersistenceManager(),this.redirectUser&&this.redirectUser._redirectEventId===a._redirectEventId?this.directlySetCurrentUser(a):this.reloadAndSetCurrentUserOrClear(a)}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 $l(e)}catch(n){if(n?.code!=="auth/network-request-failed")return this.directlySetCurrentUser(null)}return this.directlySetCurrentUser(e)}useDeviceLanguage(){this.languageCode=hx()}async _delete(){this._deleted=!0}async updateCurrentUser(e){if(ut(this.app))return Promise.reject(zt(this));const n=e?Ee(e):null;return n&&te(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&&te(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 ut(this.app)?Promise.reject(zt(this)):(await this.beforeStateQueue.runMiddleware(null),(this.redirectPersistenceManager||this._popupRedirectResolver)&&await this._setRedirectUser(null),this._updateCurrentUser(null,!0))}setPersistence(e){return ut(this.app)?Promise.reject(zt(this)):this.queue(async()=>{await this.assertedPersistence.setPersistence(as(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 Ix(this),n=new Dx(e);this.tenantId===null?this._projectPasswordPolicy=n:this._tenantPasswordPolicies[this.tenantId]=n}_getPersistenceType(){return this.assertedPersistence.persistence.type}_getPersistence(){return this.assertedPersistence.persistence}_updateErrorMap(e){this._errorFactory=new rc("auth","Firebase",e())}onAuthStateChanged(e,n,a){return this.registerStateListener(this.authStateSubscription,e,n,a)}beforeAuthStateChanged(e,n){return this.beforeStateQueue.pushCallback(e,n)}onIdTokenChanged(e,n,a){return this.registerStateListener(this.idTokenSubscription,e,n,a)}authStateReady(){return new Promise((e,n)=>{if(this.currentUser)e();else{const a=this.onAuthStateChanged(()=>{a(),e()},n)}})}async revokeAccessToken(e){if(this.currentUser){const n=await this.currentUser.getIdToken(),a={providerId:"apple.com",tokenType:"ACCESS_TOKEN",token:e,idToken:n};this.tenantId!=null&&(a.tenantId=this.tenantId),await wx(this,a)}}toJSON(){return{apiKey:this.config.apiKey,authDomain:this.config.authDomain,appName:this.name,currentUser:this._currentUser?.toJSON()}}async _setRedirectUser(e,n){const a=await this.getOrInitRedirectPersistenceManager(n);return e===null?a.removeCurrentUser():a.setCurrentUser(e)}async getOrInitRedirectPersistenceManager(e){if(!this.redirectPersistenceManager){const n=e&&as(e)||this._popupRedirectResolver;te(n,this,"argument-error"),this.redirectPersistenceManager=await Xr.create(this,[as(n._redirectPersistence)],"redirectUser"),this.redirectUser=await this.redirectPersistenceManager.getCurrentUser()}return this.redirectPersistenceManager}async _redirectUserForId(e){return this._isInitialized&&await this.queue(async()=>{}),this._currentUser?._redirectEventId===e?this._currentUser:this.redirectUser?._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(){if(!this._isInitialized)return;this.idTokenSubscription.next(this.currentUser);const e=this.currentUser?.uid??null;this.lastNotifiedUid!==e&&(this.lastNotifiedUid=e,this.authStateSubscription.next(this.currentUser))}registerStateListener(e,n,a,o){if(this._deleted)return()=>{};const c=typeof n=="function"?n:n.next.bind(n);let f=!1;const p=this._isInitialized?Promise.resolve():this._initializationPromise;if(te(p,this,"internal-error"),p.then(()=>{f||c(this.currentUser)}),typeof n=="function"){const g=e.addObserver(n,a,o);return()=>{f=!0,g()}}else{const g=e.addObserver(n);return()=>{f=!0,g()}}}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 te(this.persistenceManager,this,"internal-error"),this.persistenceManager}_logFramework(e){!e||this.frameworks.includes(e)||(this.frameworks.push(e),this.frameworks.sort(),this.clientVersion=QT(this.config.clientPlatform,this._getFrameworks()))}_getFrameworks(){return this.frameworks}async _getAdditionalHeaders(){const e={"X-Client-Version":this.clientVersion};this.app.options.appId&&(e["X-Firebase-gmpid"]=this.app.options.appId);const n=await this.heartbeatServiceProvider.getImmediate({optional:!0})?.getHeartbeatsHeader();n&&(e["X-Firebase-Client"]=n);const a=await this._getAppCheckToken();return a&&(e["X-Firebase-AppCheck"]=a),e}async _getAppCheckToken(){if(ut(this.app)&&this.app.settings.appCheckToken)return this.app.settings.appCheckToken;const e=await this.appCheckServiceProvider.getImmediate({optional:!0})?.getToken();return e?.error&&cx(`Error while retrieving App Check token: ${e.error}`),e?.token}}function pt(s){return Ee(s)}class Fv{constructor(e){this.auth=e,this.observer=null,this.addObserver=HN(n=>this.observer=n)}get next(){return te(this.observer,this.auth,"internal-error"),this.observer.next.bind(this.observer)}}let lc={async loadJS(){throw new Error("Unable to load external scripts")},recaptchaV2Script:"",recaptchaEnterpriseScript:"",gapiScript:""};function Ox(s){lc=s}function lp(s){return lc.loadJS(s)}function Mx(){return lc.recaptchaV2Script}function Px(){return lc.recaptchaEnterpriseScript}function kx(){return lc.gapiScript}function $T(s){return`__${s}${Math.floor(Math.random()*1e6)}`}const Lx=500,Vx=6e4,Ku=1e12;class Ux{constructor(e){this.auth=e,this.counter=Ku,this._widgets=new Map}render(e,n){const a=this.counter;return this._widgets.set(a,new Hx(e,this.auth.name,n||{})),this.counter++,a}reset(e){const n=e||Ku;this._widgets.get(n)?.delete(),this._widgets.delete(n)}getResponse(e){const n=e||Ku;return this._widgets.get(n)?.getResponse()||""}async execute(e){const n=e||Ku;return this._widgets.get(n)?.execute(),""}}class zx{constructor(){this.enterprise=new Bx}ready(e){e()}execute(e,n){return Promise.resolve("token")}render(e,n){return""}}class Bx{ready(e){e()}execute(e,n){return Promise.resolve("token")}render(e,n){return""}}class Hx{constructor(e,n,a){this.params=a,this.timerId=null,this.deleted=!1,this.responseToken=null,this.clickHandler=()=>{this.execute()};const o=typeof e=="string"?document.getElementById(e):e;te(o,"argument-error",{appName:n}),this.container=o,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=qx(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()},Vx)},Lx))}checkIfDeleted(){if(this.deleted)throw new Error("reCAPTCHA mock was already deleted!")}}function qx(s){const e=[],n="1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";for(let a=0;a<s;a++)e.push(n.charAt(Math.floor(Math.random()*n.length)));return e.join("")}const Fx="recaptcha-enterprise",Vl="NO_RECAPTCHA";class WT{constructor(e){this.type=Fx,this.auth=pt(e)}async verify(e="verify",n=!1){async function a(c){if(!n){if(c.tenantId==null&&c._agentRecaptchaConfig!=null)return c._agentRecaptchaConfig.siteKey;if(c.tenantId!=null&&c._tenantRecaptchaConfigs[c.tenantId]!==void 0)return c._tenantRecaptchaConfigs[c.tenantId].siteKey}return new Promise(async(f,p)=>{PT(c,{clientType:"CLIENT_TYPE_WEB",version:"RECAPTCHA_ENTERPRISE"}).then(g=>{if(g.recaptchaKey===void 0)p(new Error("recaptcha Enterprise site key undefined"));else{const y=new MT(g);return c.tenantId==null?c._agentRecaptchaConfig=y:c._tenantRecaptchaConfigs[c.tenantId]=y,f(y.siteKey)}}).catch(g=>{p(g)})})}function o(c,f,p){const g=window.grecaptcha;zv(g)?g.enterprise.ready(()=>{g.enterprise.execute(c,{action:e}).then(y=>{f(y)}).catch(()=>{f(Vl)})}):p(Error("No reCAPTCHA enterprise script loaded."))}return this.auth.settings.appVerificationDisabledForTesting?new zx().execute("siteKey",{action:"verify"}):new Promise((c,f)=>{a(this.auth).then(p=>{if(!n&&zv(window.grecaptcha))o(p,c,f);else{if(typeof window>"u"){f(new Error("RecaptchaVerifier is only supported in browser"));return}let g=Px();g.length!==0&&(g+=p),lp(g).then(()=>{o(p,c,f)}).catch(y=>{f(y)})}}).catch(p=>{f(p)})})}}async function Il(s,e,n,a=!1,o=!1){const c=new WT(s);let f;if(o)f=Vl;else try{f=await c.verify(n)}catch{f=await c.verify(n,!0)}const p={...e};if(n==="mfaSmsEnrollment"||n==="mfaSmsSignIn"){if("phoneEnrollmentInfo"in p){const g=p.phoneEnrollmentInfo.phoneNumber,y=p.phoneEnrollmentInfo.recaptchaToken;Object.assign(p,{phoneEnrollmentInfo:{phoneNumber:g,recaptchaToken:y,captchaResponse:f,clientType:"CLIENT_TYPE_WEB",recaptchaVersion:"RECAPTCHA_ENTERPRISE"}})}else if("phoneSignInInfo"in p){const g=p.phoneSignInInfo.recaptchaToken;Object.assign(p,{phoneSignInInfo:{recaptchaToken:g,captchaResponse:f,clientType:"CLIENT_TYPE_WEB",recaptchaVersion:"RECAPTCHA_ENTERPRISE"}})}return p}return a?Object.assign(p,{captchaResp:f}):Object.assign(p,{captchaResponse:f}),Object.assign(p,{clientType:"CLIENT_TYPE_WEB"}),Object.assign(p,{recaptchaVersion:"RECAPTCHA_ENTERPRISE"}),p}async function ta(s,e,n,a,o){if(o==="EMAIL_PASSWORD_PROVIDER")if(s._getRecaptchaConfig()?.isProviderEnabled("EMAIL_PASSWORD_PROVIDER")){const c=await Il(s,e,n,n==="getOobCode");return a(s,c)}else return a(s,e).catch(async c=>{if(c.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 f=await Il(s,e,n,n==="getOobCode");return a(s,f)}else return Promise.reject(c)});else if(o==="PHONE_PROVIDER")if(s._getRecaptchaConfig()?.isProviderEnabled("PHONE_PROVIDER")){const c=await Il(s,e,n);return a(s,c).catch(async f=>{if(s._getRecaptchaConfig()?.getProviderEnforcementState("PHONE_PROVIDER")==="AUDIT"&&(f.code==="auth/missing-recaptcha-token"||f.code==="auth/invalid-app-credential")){console.log(`Failed to verify with reCAPTCHA Enterprise. Automatically triggering the reCAPTCHA v2 flow to complete the ${n} flow.`);const p=await Il(s,e,n,!1,!0);return a(s,p)}return Promise.reject(f)})}else{const c=await Il(s,e,n,!1,!0);return a(s,c)}else return Promise.reject(o+" provider is not supported.")}async function XT(s){const e=pt(s),n=await PT(e,{clientType:"CLIENT_TYPE_WEB",version:"RECAPTCHA_ENTERPRISE"}),a=new MT(n);e.tenantId==null?e._agentRecaptchaConfig=a:e._tenantRecaptchaConfigs[e.tenantId]=a,a.isAnyProviderEnabled()&&new WT(e).verify()}function JT(s,e){const n=np(s,"auth");if(n.isInitialized()){const o=n.getImmediate(),c=n.getOptions();if(Qa(c,e??{}))return o;gn(o,"already-initialized")}return n.initialize({options:e})}function Gx(s,e){const n=e?.persistence||[],a=(Array.isArray(n)?n:[n]).map(as);e?.errorMap&&s._updateErrorMap(e.errorMap),s._initializeWithPersistence(a,e?.popupRedirectResolver)}function ZT(s,e,n){const a=pt(s);te(/^https?:\/\//.test(e),a,"invalid-emulator-scheme");const o=!!n?.disableWarnings,c=eb(e),{host:f,port:p}=Yx(e),g=p===null?"":`:${p}`,y={url:`${c}//${f}${g}/`},T=Object.freeze({host:f,port:p,protocol:c.replace(":",""),options:Object.freeze({disableWarnings:o})});if(!a._canInitEmulator){te(a.config.emulator&&a.emulatorConfig,a,"emulator-config-failed"),te(Qa(y,a.config.emulator)&&Qa(T,a.emulatorConfig),a,"emulator-config-failed");return}a.config.emulator=y,a.emulatorConfig=T,a.settings.appVerificationDisabledForTesting=!0,fo(f)?(ET(`${c}//${f}${g}`),TT("Auth",!0)):o||Kx()}function eb(s){const e=s.indexOf(":");return e<0?"":s.substr(0,e+1)}function Yx(s){const e=eb(s),n=/(\/\/)?([^?#/]+)/.exec(s.substr(e.length));if(!n)return{host:"",port:null};const a=n[2].split("@").pop()||"",o=/^(\[[^\]]+\])(:|$)/.exec(a);if(o){const c=o[1];return{host:c,port:Gv(a.substr(c.length+1))}}else{const[c,f]=a.split(":");return{host:c,port:Gv(f)}}}function Gv(s){if(!s)return null;const e=Number(s);return isNaN(e)?null:e}function Kx(){function s(){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",s):s())}class _o{constructor(e,n){this.providerId=e,this.signInMethod=n}toJSON(){return Ii("not implemented")}_getIdTokenResponse(e){return Ii("not implemented")}_linkToIdToken(e,n){return Ii("not implemented")}_getReauthenticationResolver(e){return Ii("not implemented")}}async function tb(s,e){return it(s,"POST","/v1/accounts:resetPassword",nt(s,e))}async function Qx(s,e){return it(s,"POST","/v1/accounts:update",e)}async function $x(s,e){return it(s,"POST","/v1/accounts:signUp",e)}async function Wx(s,e){return it(s,"POST","/v1/accounts:update",nt(s,e))}async function Xx(s,e){return gs(s,"POST","/v1/accounts:signInWithPassword",nt(s,e))}async function Lh(s,e){return it(s,"POST","/v1/accounts:sendOobCode",nt(s,e))}async function Jx(s,e){return Lh(s,e)}async function Zx(s,e){return Lh(s,e)}async function e1(s,e){return Lh(s,e)}async function t1(s,e){return Lh(s,e)}async function n1(s,e){return gs(s,"POST","/v1/accounts:signInWithEmailLink",nt(s,e))}async function i1(s,e){return gs(s,"POST","/v1/accounts:signInWithEmailLink",nt(s,e))}class io extends _o{constructor(e,n,a,o=null){super("password",a),this._email=e,this._password=n,this._tenantId=o}static _fromEmailAndPassword(e,n){return new io(e,n,"password")}static _fromEmailAndCode(e,n,a=null){return new io(e,n,"emailLink",a)}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 ta(e,n,"signInWithPassword",Xx,"EMAIL_PASSWORD_PROVIDER");case"emailLink":return n1(e,{email:this._email,oobCode:this._password});default:gn(e,"internal-error")}}async _linkToIdToken(e,n){switch(this.signInMethod){case"password":const a={idToken:n,returnSecureToken:!0,email:this._email,password:this._password,clientType:"CLIENT_TYPE_WEB"};return ta(e,a,"signUpPassword",$x,"EMAIL_PASSWORD_PROVIDER");case"emailLink":return i1(e,{idToken:n,email:this._email,oobCode:this._password});default:gn(e,"internal-error")}}_getReauthenticationResolver(e){return this._getIdTokenResponse(e)}}async function os(s,e){return gs(s,"POST","/v1/accounts:signInWithIdp",nt(s,e))}const s1="http://localhost";class Oi extends _o{constructor(){super(...arguments),this.pendingToken=null}static _fromParams(e){const n=new Oi(e.providerId,e.signInMethod);return e.idToken||e.accessToken?(e.idToken&&(n.idToken=e.idToken),e.accessToken&&(n.accessToken=e.accessToken),e.nonce&&!e.pendingToken&&(n.nonce=e.nonce),e.pendingToken&&(n.pendingToken=e.pendingToken)):e.oauthToken&&e.oauthTokenSecret?(n.accessToken=e.oauthToken,n.secret=e.oauthTokenSecret):gn("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:a,signInMethod:o,...c}=n;if(!a||!o)return null;const f=new Oi(a,o);return f.idToken=c.idToken||void 0,f.accessToken=c.accessToken||void 0,f.secret=c.secret,f.nonce=c.nonce,f.pendingToken=c.pendingToken||null,f}_getIdTokenResponse(e){const n=this.buildRequest();return os(e,n)}_linkToIdToken(e,n){const a=this.buildRequest();return a.idToken=n,os(e,a)}_getReauthenticationResolver(e){const n=this.buildRequest();return n.autoCreate=!1,os(e,n)}buildRequest(){const e={requestUri:s1,returnSecureToken:!0};if(this.pendingToken)e.pendingToken=this.pendingToken;else{const n={};this.idToken&&(n.id_token=this.idToken),this.accessToken&&(n.access_token=this.accessToken),this.secret&&(n.oauth_token_secret=this.secret),n.providerId=this.providerId,this.nonce&&!this.pendingToken&&(n.nonce=this.nonce),e.postBody=mo(n)}return e}}async function Yv(s,e){return it(s,"POST","/v1/accounts:sendVerificationCode",nt(s,e))}async function a1(s,e){return gs(s,"POST","/v1/accounts:signInWithPhoneNumber",nt(s,e))}async function r1(s,e){const n=await gs(s,"POST","/v1/accounts:signInWithPhoneNumber",nt(s,e));if(n.temporaryProof)throw Ml(s,"account-exists-with-different-credential",n);return n}const o1={USER_NOT_FOUND:"user-not-found"};async function l1(s,e){const n={...e,operation:"REAUTH"};return gs(s,"POST","/v1/accounts:signInWithPhoneNumber",nt(s,n),o1)}class na extends _o{constructor(e){super("phone","phone"),this.params=e}static _fromVerification(e,n){return new na({verificationId:e,verificationCode:n})}static _fromTokenResponse(e,n){return new na({phoneNumber:e,temporaryProof:n})}_getIdTokenResponse(e){return a1(e,this._makeVerificationRequest())}_linkToIdToken(e,n){return r1(e,{idToken:n,...this._makeVerificationRequest()})}_getReauthenticationResolver(e){return l1(e,this._makeVerificationRequest())}_makeVerificationRequest(){const{temporaryProof:e,phoneNumber:n,verificationId:a,verificationCode:o}=this.params;return e&&n?{temporaryProof:e,phoneNumber:n}:{sessionInfo:a,code:o}}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:a,phoneNumber:o,temporaryProof:c}=e;return!a&&!n&&!o&&!c?null:new na({verificationId:n,verificationCode:a,phoneNumber:o,temporaryProof:c})}}function c1(s){switch(s){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 u1(s){const e=jl(Ol(s)).link,n=e?jl(Ol(e)).deep_link_id:null,a=jl(Ol(s)).deep_link_id;return(a?jl(Ol(a)).link:null)||a||n||e||s}class yo{constructor(e){const n=jl(Ol(e)),a=n.apiKey??null,o=n.oobCode??null,c=c1(n.mode??null);te(a&&o&&c,"argument-error"),this.apiKey=a,this.operation=c,this.code=o,this.continueUrl=n.continueUrl??null,this.languageCode=n.lang??null,this.tenantId=n.tenantId??null}static parseLink(e){const n=u1(e);try{return new yo(n)}catch{return null}}}function h1(s){return yo.parseLink(s)}class ca{constructor(){this.providerId=ca.PROVIDER_ID}static credential(e,n){return io._fromEmailAndPassword(e,n)}static credentialWithLink(e,n){const a=yo.parseLink(n);return te(a,"argument-error"),io._fromEmailAndCode(e,a.code,a.tenantId)}}ca.PROVIDER_ID="password";ca.EMAIL_PASSWORD_SIGN_IN_METHOD="password";ca.EMAIL_LINK_SIGN_IN_METHOD="emailLink";class _s{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}}class vo extends _s{constructor(){super(...arguments),this.scopes=[]}addScope(e){return this.scopes.includes(e)||this.scopes.push(e),this}getScopes(){return[...this.scopes]}}class Ul extends vo{static credentialFromJSON(e){const n=typeof e=="string"?JSON.parse(e):e;return te("providerId"in n&&"signInMethod"in n,"argument-error"),Oi._fromParams(n)}credential(e){return this._credential({...e,nonce:e.rawNonce})}_credential(e){return te(e.idToken||e.accessToken,"argument-error"),Oi._fromParams({...e,providerId:this.providerId,signInMethod:this.providerId})}static credentialFromResult(e){return Ul.oauthCredentialFromTaggedObject(e)}static credentialFromError(e){return Ul.oauthCredentialFromTaggedObject(e.customData||{})}static oauthCredentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;const{oauthIdToken:n,oauthAccessToken:a,oauthTokenSecret:o,pendingToken:c,nonce:f,providerId:p}=e;if(!a&&!o&&!n&&!c||!p)return null;try{return new Ul(p)._credential({idToken:n,accessToken:a,nonce:f,pendingToken:c})}catch{return null}}}class ts extends vo{constructor(){super("facebook.com")}static credential(e){return Oi._fromParams({providerId:ts.PROVIDER_ID,signInMethod:ts.FACEBOOK_SIGN_IN_METHOD,accessToken:e})}static credentialFromResult(e){return ts.credentialFromTaggedObject(e)}static credentialFromError(e){return ts.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e||!("oauthAccessToken"in e)||!e.oauthAccessToken)return null;try{return ts.credential(e.oauthAccessToken)}catch{return null}}}ts.FACEBOOK_SIGN_IN_METHOD="facebook.com";ts.PROVIDER_ID="facebook.com";class ns extends vo{constructor(){super("google.com"),this.addScope("profile")}static credential(e,n){return Oi._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:a}=e;if(!n&&!a)return null;try{return ns.credential(n,a)}catch{return null}}}ns.GOOGLE_SIGN_IN_METHOD="google.com";ns.PROVIDER_ID="google.com";class is extends vo{constructor(){super("github.com")}static credential(e){return Oi._fromParams({providerId:is.PROVIDER_ID,signInMethod:is.GITHUB_SIGN_IN_METHOD,accessToken:e})}static credentialFromResult(e){return is.credentialFromTaggedObject(e)}static credentialFromError(e){return is.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e||!("oauthAccessToken"in e)||!e.oauthAccessToken)return null;try{return is.credential(e.oauthAccessToken)}catch{return null}}}is.GITHUB_SIGN_IN_METHOD="github.com";is.PROVIDER_ID="github.com";const d1="http://localhost";class Wl extends _o{constructor(e,n){super(e,e),this.pendingToken=n}_getIdTokenResponse(e){const n=this.buildRequest();return os(e,n)}_linkToIdToken(e,n){const a=this.buildRequest();return a.idToken=n,os(e,a)}_getReauthenticationResolver(e){const n=this.buildRequest();return n.autoCreate=!1,os(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:a,signInMethod:o,pendingToken:c}=n;return!a||!o||!c||a!==o?null:new Wl(a,c)}static _create(e,n){return new Wl(e,n)}buildRequest(){return{requestUri:d1,returnSecureToken:!0,pendingToken:this.pendingToken}}}const f1="saml.";class _h extends _s{constructor(e){te(e.startsWith(f1),"argument-error"),super(e)}static credentialFromResult(e){return _h.samlCredentialFromTaggedObject(e)}static credentialFromError(e){return _h.samlCredentialFromTaggedObject(e.customData||{})}static credentialFromJSON(e){const n=Wl.fromJSON(e);return te(n,"argument-error"),n}static samlCredentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;const{pendingToken:n,providerId:a}=e;if(!n||!a)return null;try{return Wl._create(a,n)}catch{return null}}}class ss extends vo{constructor(){super("twitter.com")}static credential(e,n){return Oi._fromParams({providerId:ss.PROVIDER_ID,signInMethod:ss.TWITTER_SIGN_IN_METHOD,oauthToken:e,oauthTokenSecret:n})}static credentialFromResult(e){return ss.credentialFromTaggedObject(e)}static credentialFromError(e){return ss.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;const{oauthAccessToken:n,oauthTokenSecret:a}=e;if(!n||!a)return null;try{return ss.credential(n,a)}catch{return null}}}ss.TWITTER_SIGN_IN_METHOD="twitter.com";ss.PROVIDER_ID="twitter.com";async function nb(s,e){return gs(s,"POST","/v1/accounts:signUp",nt(s,e))}class zn{constructor(e){this.user=e.user,this.providerId=e.providerId,this._tokenResponse=e._tokenResponse,this.operationType=e.operationType}static async _fromIdTokenResponse(e,n,a,o=!1){const c=await ii._fromIdTokenResponse(e,a,o),f=Kv(a);return new zn({user:c,providerId:f,_tokenResponse:a,operationType:n})}static async _forOperation(e,n,a){await e._updateTokensIfNecessary(a,!0);const o=Kv(a);return new zn({user:e,providerId:o,_tokenResponse:a,operationType:n})}}function Kv(s){return s.providerId?s.providerId:"phoneNumber"in s?"phone":null}async function m1(s){if(ut(s.app))return Promise.reject(zt(s));const e=pt(s);if(await e._initializationPromise,e.currentUser?.isAnonymous)return new zn({user:e.currentUser,providerId:null,operationType:"signIn"});const n=await nb(e,{returnSecureToken:!0}),a=await zn._fromIdTokenResponse(e,"signIn",n,!0);return await e._updateCurrentUser(a.user),a}class yh extends ps{constructor(e,n,a,o){super(n.code,n.message),this.operationType=a,this.user=o,Object.setPrototypeOf(this,yh.prototype),this.customData={appName:e.name,tenantId:e.tenantId??void 0,_serverResponse:n.customData._serverResponse,operationType:a}}static _fromErrorAndOperation(e,n,a,o){return new yh(e,n,a,o)}}function ib(s,e,n,a){return(e==="reauthenticate"?n._getReauthenticationResolver(s):n._getIdTokenResponse(s)).catch(c=>{throw c.code==="auth/multi-factor-auth-required"?yh._fromErrorAndOperation(s,c,e,a):c})}function sb(s){return new Set(s.map(({providerId:e})=>e).filter(e=>!!e))}async function p1(s,e){const n=Ee(s);await Vh(!0,n,e);const{providerUserInfo:a}=await vx(n.auth,{idToken:await n.getIdToken(),deleteProvider:[e]}),o=sb(a||[]);return n.providerData=n.providerData.filter(c=>o.has(c.providerId)),o.has("phone")||(n.phoneNumber=null),await n.auth._persistUserIfCurrent(n),n}async function cp(s,e,n=!1){const a=await fs(s,e._linkToIdToken(s.auth,await s.getIdToken()),n);return zn._forOperation(s,"link",a)}async function Vh(s,e,n){await $l(e);const a=sb(e.providerData),o=s===!1?"provider-already-linked":"no-such-provider";te(a.has(n)===s,e.auth,o)}async function ab(s,e,n=!1){const{auth:a}=s;if(ut(a.app))return Promise.reject(zt(a));const o="reauthenticate";try{const c=await fs(s,ib(a,o,e,s),n);te(c.idToken,a,"internal-error");const f=kh(c.idToken);te(f,a,"internal-error");const{sub:p}=f;return te(s.uid===p,a,"user-mismatch"),zn._forOperation(s,o,c)}catch(c){throw c?.code==="auth/user-not-found"&&gn(a,"user-mismatch"),c}}async function rb(s,e,n=!1){if(ut(s.app))return Promise.reject(zt(s));const a="signIn",o=await ib(s,a,e),c=await zn._fromIdTokenResponse(s,a,o);return n||await s._updateCurrentUser(c.user),c}async function Uh(s,e){return rb(pt(s),e)}async function ob(s,e){const n=Ee(s);return await Vh(!1,n,e.providerId),cp(n,e)}async function lb(s,e){return ab(Ee(s),e)}async function g1(s,e){return gs(s,"POST","/v1/accounts:signInWithCustomToken",nt(s,e))}async function _1(s,e){if(ut(s.app))return Promise.reject(zt(s));const n=pt(s),a=await g1(n,{token:e,returnSecureToken:!0}),o=await zn._fromIdTokenResponse(n,"signIn",a);return await n._updateCurrentUser(o.user),o}class cc{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?up._fromServerResponse(e,n):"totpInfo"in n?hp._fromServerResponse(e,n):gn(e,"internal-error")}}class up extends cc{constructor(e){super("phone",e),this.phoneNumber=e.phoneInfo}static _fromServerResponse(e,n){return new up(n)}}class hp extends cc{constructor(e){super("totp",e)}static _fromServerResponse(e,n){return new hp(n)}}function zh(s,e,n){te(n.url?.length>0,s,"invalid-continue-uri"),te(typeof n.dynamicLinkDomain>"u"||n.dynamicLinkDomain.length>0,s,"invalid-dynamic-link-domain"),te(typeof n.linkDomain>"u"||n.linkDomain.length>0,s,"invalid-hosting-link-domain"),e.continueUrl=n.url,e.dynamicLinkDomain=n.dynamicLinkDomain,e.linkDomain=n.linkDomain,e.canHandleCodeInApp=n.handleCodeInApp,n.iOS&&(te(n.iOS.bundleId.length>0,s,"missing-ios-bundle-id"),e.iOSBundleId=n.iOS.bundleId),n.android&&(te(n.android.packageName.length>0,s,"missing-android-pkg-name"),e.androidInstallApp=n.android.installApp,e.androidMinimumVersionCode=n.android.minimumVersion,e.androidPackageName=n.android.packageName)}async function dp(s){const e=pt(s);e._getPasswordPolicyInternal()&&await e._updatePasswordPolicy()}async function cb(s,e,n){const a=pt(s),o={requestType:"PASSWORD_RESET",email:e,clientType:"CLIENT_TYPE_WEB"};n&&zh(a,o,n),await ta(a,o,"getOobCode",Zx,"EMAIL_PASSWORD_PROVIDER")}async function y1(s,e,n){await tb(Ee(s),{oobCode:e,newPassword:n}).catch(async a=>{throw a.code==="auth/password-does-not-meet-requirements"&&dp(s),a})}async function v1(s,e){await Wx(Ee(s),{oobCode:e})}async function ub(s,e){const n=Ee(s),a=await tb(n,{oobCode:e}),o=a.requestType;switch(te(o,n,"internal-error"),o){case"EMAIL_SIGNIN":break;case"VERIFY_AND_CHANGE_EMAIL":te(a.newEmail,n,"internal-error");break;case"REVERT_SECOND_FACTOR_ADDITION":te(a.mfaInfo,n,"internal-error");default:te(a.email,n,"internal-error")}let c=null;return a.mfaInfo&&(c=cc._fromServerResponse(pt(n),a.mfaInfo)),{data:{email:(a.requestType==="VERIFY_AND_CHANGE_EMAIL"?a.newEmail:a.email)||null,previousEmail:(a.requestType==="VERIFY_AND_CHANGE_EMAIL"?a.email:a.newEmail)||null,multiFactorInfo:c},operation:o}}async function E1(s,e){const{data:n}=await ub(Ee(s),e);return n.email}async function hb(s,e,n){if(ut(s.app))return Promise.reject(zt(s));const a=pt(s),f=await ta(a,{returnSecureToken:!0,email:e,password:n,clientType:"CLIENT_TYPE_WEB"},"signUpPassword",nb,"EMAIL_PASSWORD_PROVIDER").catch(g=>{throw g.code==="auth/password-does-not-meet-requirements"&&dp(s),g}),p=await zn._fromIdTokenResponse(a,"signIn",f);return await a._updateCurrentUser(p.user),p}function db(s,e,n){return ut(s.app)?Promise.reject(zt(s)):Uh(Ee(s),ca.credential(e,n)).catch(async a=>{throw a.code==="auth/password-does-not-meet-requirements"&&dp(s),a})}async function T1(s,e,n){const a=pt(s),o={requestType:"EMAIL_SIGNIN",email:e,clientType:"CLIENT_TYPE_WEB"};function c(f,p){te(p.handleCodeInApp,a,"argument-error"),p&&zh(a,f,p)}c(o,n),await ta(a,o,"getOobCode",e1,"EMAIL_PASSWORD_PROVIDER")}function b1(s,e){return yo.parseLink(e)?.operation==="EMAIL_SIGNIN"}async function S1(s,e,n){if(ut(s.app))return Promise.reject(zt(s));const a=Ee(s),o=ca.credentialWithLink(e,n||Ql());return te(o._tenantId===(a.tenantId||null),a,"tenant-id-mismatch"),Uh(a,o)}async function A1(s,e){return it(s,"POST","/v1/accounts:createAuthUri",nt(s,e))}async function w1(s,e){const n=ap()?Ql():"http://localhost",a={identifier:e,continueUri:n},{signinMethods:o}=await A1(Ee(s),a);return o||[]}async function N1(s,e){const n=Ee(s),o={requestType:"VERIFY_EMAIL",idToken:await s.getIdToken()};e&&zh(n.auth,o,e);const{email:c}=await Jx(n.auth,o);c!==s.email&&await s.reload()}async function R1(s,e,n){const a=Ee(s),c={requestType:"VERIFY_AND_CHANGE_EMAIL",idToken:await s.getIdToken(),newEmail:e};n&&zh(a.auth,c,n);const{email:f}=await t1(a.auth,c);f!==s.email&&await s.reload()}async function x1(s,e){return it(s,"POST","/v1/accounts:update",e)}async function fb(s,{displayName:e,photoURL:n}){if(e===void 0&&n===void 0)return;const a=Ee(s),c={idToken:await a.getIdToken(),displayName:e,photoUrl:n,returnSecureToken:!0},f=await fs(a,x1(a.auth,c));a.displayName=f.displayName||null,a.photoURL=f.photoUrl||null;const p=a.providerData.find(({providerId:g})=>g==="password");p&&(p.displayName=a.displayName,p.photoURL=a.photoURL),await a._updateTokensIfNecessary(f)}function I1(s,e){const n=Ee(s);return ut(n.auth.app)?Promise.reject(zt(n.auth)):mb(n,e,null)}function C1(s,e){return mb(Ee(s),null,e)}async function mb(s,e,n){const{auth:a}=s,c={idToken:await s.getIdToken(),returnSecureToken:!0};e&&(c.email=e),n&&(c.password=n);const f=await fs(s,Qx(a,c));await s._updateTokensIfNecessary(f,!0)}function D1(s){if(!s)return null;const{providerId:e}=s,n=s.rawUserInfo?JSON.parse(s.rawUserInfo):{},a=s.isNewUser||s.kind==="identitytoolkit#SignupNewUserResponse";if(!e&&s?.idToken){const o=kh(s.idToken)?.firebase?.sign_in_provider;if(o){const c=o!=="anonymous"&&o!=="custom"?o:null;return new Jr(a,c)}}if(!e)return null;switch(e){case"facebook.com":return new j1(a,n);case"github.com":return new O1(a,n);case"google.com":return new M1(a,n);case"twitter.com":return new P1(a,n,s.screenName||null);case"custom":case"anonymous":return new Jr(a,null);default:return new Jr(a,e,n)}}class Jr{constructor(e,n,a={}){this.isNewUser=e,this.providerId=n,this.profile=a}}class pb extends Jr{constructor(e,n,a,o){super(e,n,a),this.username=o}}class j1 extends Jr{constructor(e,n){super(e,"facebook.com",n)}}class O1 extends pb{constructor(e,n){super(e,"github.com",n,typeof n?.login=="string"?n?.login:null)}}class M1 extends Jr{constructor(e,n){super(e,"google.com",n)}}class P1 extends pb{constructor(e,n,a){super(e,"twitter.com",n,a)}}function k1(s){const{user:e,_tokenResponse:n}=s;return e.isAnonymous&&!n?{providerId:null,isNewUser:!1,profile:null}:D1(n)}function gb(s,e){return Ee(s).setPersistence(e)}function L1(s){return XT(s)}async function V1(s,e){return pt(s).validatePassword(e)}function _b(s,e,n,a){return Ee(s).onIdTokenChanged(e,n,a)}function yb(s,e,n){return Ee(s).beforeAuthStateChanged(e,n)}function vb(s,e,n,a){return Ee(s).onAuthStateChanged(e,n,a)}function U1(s){Ee(s).useDeviceLanguage()}function z1(s,e){return Ee(s).updateCurrentUser(e)}function B1(s){return Ee(s).signOut()}function H1(s,e){return pt(s).revokeAccessToken(e)}async function q1(s){return Ee(s).delete()}class qa{constructor(e,n,a){this.type=e,this.credential=n,this.user=a}static _fromIdtoken(e,n){return new qa("enroll",e,n)}static _fromMfaPendingCredential(e){return new qa("signin",e)}toJSON(){return{multiFactorSession:{[this.type==="enroll"?"idToken":"pendingCredential"]:this.credential}}}static fromJSON(e){if(e?.multiFactorSession){if(e.multiFactorSession?.pendingCredential)return qa._fromMfaPendingCredential(e.multiFactorSession.pendingCredential);if(e.multiFactorSession?.idToken)return qa._fromIdtoken(e.multiFactorSession.idToken)}return null}}class fp{constructor(e,n,a){this.session=e,this.hints=n,this.signInResolver=a}static _fromError(e,n){const a=pt(e),o=n.customData._serverResponse,c=(o.mfaInfo||[]).map(p=>cc._fromServerResponse(a,p));te(o.mfaPendingCredential,a,"internal-error");const f=qa._fromMfaPendingCredential(o.mfaPendingCredential);return new fp(f,c,async p=>{const g=await p._process(a,f);delete o.mfaInfo,delete o.mfaPendingCredential;const y={...o,idToken:g.idToken,refreshToken:g.refreshToken};switch(n.operationType){case"signIn":const T=await zn._fromIdTokenResponse(a,n.operationType,y);return await a._updateCurrentUser(T.user),T;case"reauthenticate":return te(n.user,a,"internal-error"),zn._forOperation(n.user,n.operationType,y);default:gn(a,"internal-error")}})}async resolveSignIn(e){const n=e;return this.signInResolver(n)}}function F1(s,e){const n=Ee(s),a=e;return te(e.customData.operationType,n,"argument-error"),te(a.customData._serverResponse?.mfaPendingCredential,n,"argument-error"),fp._fromError(n,a)}function Qv(s,e){return it(s,"POST","/v2/accounts/mfaEnrollment:start",nt(s,e))}function G1(s,e){return it(s,"POST","/v2/accounts/mfaEnrollment:finalize",nt(s,e))}function Y1(s,e){return it(s,"POST","/v2/accounts/mfaEnrollment:start",nt(s,e))}function K1(s,e){return it(s,"POST","/v2/accounts/mfaEnrollment:finalize",nt(s,e))}function Q1(s,e){return it(s,"POST","/v2/accounts/mfaEnrollment:withdraw",nt(s,e))}class mp{constructor(e){this.user=e,this.enrolledFactors=[],e._onReload(n=>{n.mfaInfo&&(this.enrolledFactors=n.mfaInfo.map(a=>cc._fromServerResponse(e.auth,a)))})}static _fromUser(e){return new mp(e)}async getSession(){return qa._fromIdtoken(await this.user.getIdToken(),this.user)}async enroll(e,n){const a=e,o=await this.getSession(),c=await fs(this.user,a._process(this.user.auth,o,n));return await this.user._updateTokensIfNecessary(c),this.user.reload()}async unenroll(e){const n=typeof e=="string"?e:e.uid,a=await this.user.getIdToken();try{const o=await fs(this.user,Q1(this.user.auth,{idToken:a,mfaEnrollmentId:n}));this.enrolledFactors=this.enrolledFactors.filter(({uid:c})=>c!==n),await this.user._updateTokensIfNecessary(o),await this.user.reload()}catch(o){throw o}}}const pm=new WeakMap;function $1(s){const e=Ee(s);return pm.has(e)||pm.set(e,mp._fromUser(e)),pm.get(e)}const vh="__sak";class Eb{constructor(e,n){this.storageRetriever=e,this.type=n}_isAvailable(){try{return this.storage?(this.storage.setItem(vh,"1"),this.storage.removeItem(vh),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()}}const W1=1e3,X1=10;class Tb extends Eb{constructor(){super(()=>window.localStorage,"LOCAL"),this.boundEventHandler=(e,n)=>this.onStorageEvent(e,n),this.listeners={},this.localCache={},this.pollTimer=null,this.fallbackToPolling=KT(),this._shouldAllowMigration=!0}forAllChangedKeys(e){for(const n of Object.keys(this.listeners)){const a=this.storage.getItem(n),o=this.localCache[n];a!==o&&e(n,o,a)}}onStorageEvent(e,n=!1){if(!e.key){this.forAllChangedKeys((f,p,g)=>{this.notifyListeners(f,g)});return}const a=e.key;n?this.detachListener():this.stopPolling();const o=()=>{const f=this.storage.getItem(a);!n&&this.localCache[a]===f||this.notifyListeners(a,f)},c=this.storage.getItem(a);Rx()&&c!==e.newValue&&e.newValue!==e.oldValue?setTimeout(o,X1):o()}notifyListeners(e,n){this.localCache[e]=n;const a=this.listeners[e];if(a)for(const o of Array.from(a))o(n&&JSON.parse(n))}startPolling(){this.stopPolling(),this.pollTimer=setInterval(()=>{this.forAllChangedKeys((e,n,a)=>{this.onStorageEvent(new StorageEvent("storage",{key:e,oldValue:n,newValue:a}),!0)})},W1)}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]),Object.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]}}Tb.type="LOCAL";const bb=Tb;const J1=1e3;function gm(s){const e=s.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&"),n=RegExp(`${e}=([^;]+)`);return document.cookie.match(n)?.[1]??null}function _m(s){return`${window.location.protocol==="http:"?"__dev_":"__HOST-"}FIREBASE_${s.split(":")[3]}`}class Sb{constructor(){this.type="COOKIE",this.listenerUnsubscribes=new Map}_getFinalTarget(e){if(typeof window===void 0)return e;const n=new URL(`${window.location.origin}/__cookies__`);return n.searchParams.set("finalTarget",e),n}async _isAvailable(){return typeof isSecureContext=="boolean"&&!isSecureContext||typeof navigator>"u"||typeof document>"u"?!1:navigator.cookieEnabled??!0}async _set(e,n){}async _get(e){if(!this._isAvailable())return null;const n=_m(e);return window.cookieStore?(await window.cookieStore.get(n))?.value:gm(n)}async _remove(e){if(!this._isAvailable()||!await this._get(e))return;const a=_m(e);document.cookie=`${a}=;Max-Age=34560000;Partitioned;Secure;SameSite=Strict;Path=/;Priority=High`,await fetch("/__cookies__",{method:"DELETE"}).catch(()=>{})}_addListener(e,n){if(!this._isAvailable())return;const a=_m(e);if(window.cookieStore){const p=(y=>{const T=y.changed.find(N=>N.name===a);T&&n(T.value),y.deleted.find(N=>N.name===a)&&n(null)}),g=()=>window.cookieStore.removeEventListener("change",p);return this.listenerUnsubscribes.set(n,g),window.cookieStore.addEventListener("change",p)}let o=gm(a);const c=setInterval(()=>{const p=gm(a);p!==o&&(n(p),o=p)},J1),f=()=>clearInterval(c);this.listenerUnsubscribes.set(n,f)}_removeListener(e,n){const a=this.listenerUnsubscribes.get(n);a&&(a(),this.listenerUnsubscribes.delete(n))}}Sb.type="COOKIE";const Z1=Sb;class Ab extends Eb{constructor(){super(()=>window.sessionStorage,"SESSION")}_addListener(e,n){}_removeListener(e,n){}}Ab.type="SESSION";const Bh=Ab;function eI(s){return Promise.all(s.map(async e=>{try{return{fulfilled:!0,value:await e}}catch(n){return{fulfilled:!1,reason:n}}}))}class Hh{constructor(e){this.eventTarget=e,this.handlersMap={},this.boundEventHandler=this.handleEvent.bind(this)}static _getInstance(e){const n=this.receivers.find(o=>o.isListeningto(e));if(n)return n;const a=new Hh(e);return this.receivers.push(a),a}isListeningto(e){return this.eventTarget===e}async handleEvent(e){const n=e,{eventId:a,eventType:o,data:c}=n.data,f=this.handlersMap[o];if(!f?.size)return;n.ports[0].postMessage({status:"ack",eventId:a,eventType:o});const p=Array.from(f).map(async y=>y(n.origin,c)),g=await eI(p);n.ports[0].postMessage({status:"done",eventId:a,eventType:o,response:g})}_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)}}Hh.receivers=[];function qh(s="",e=10){let n="";for(let a=0;a<e;a++)n+=Math.floor(Math.random()*10);return s+n}class tI{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,a=50){const o=typeof MessageChannel<"u"?new MessageChannel:null;if(!o)throw new Error("connection_unavailable");let c,f;return new Promise((p,g)=>{const y=qh("",20);o.port1.start();const T=setTimeout(()=>{g(new Error("unsupported_event"))},a);f={messageChannel:o,onMessage(b){const N=b;if(N.data.eventId===y)switch(N.data.status){case"ack":clearTimeout(T),c=setTimeout(()=>{g(new Error("timeout"))},3e3);break;case"done":clearTimeout(c),p(N.data.response);break;default:clearTimeout(T),clearTimeout(c),g(new Error("invalid_response"));break}}},this.handlers.add(f),o.port1.addEventListener("message",f.onMessage),this.target.postMessage({eventType:e,eventId:y,data:n},[o.port2])}).finally(()=>{f&&this.removeMessageHandler(f)})}}function Ct(){return window}function nI(s){Ct().location.href=s}function pp(){return typeof Ct().WorkerGlobalScope<"u"&&typeof Ct().importScripts=="function"}async function iI(){if(!navigator?.serviceWorker)return null;try{return(await navigator.serviceWorker.ready).active}catch{return null}}function sI(){return navigator?.serviceWorker?.controller||null}function aI(){return pp()?self:null}const wb="firebaseLocalStorageDb",rI=1,Eh="firebaseLocalStorage",Nb="fbase_key";class uc{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 Fh(s,e){return s.transaction([Eh],e?"readwrite":"readonly").objectStore(Eh)}function oI(){const s=indexedDB.deleteDatabase(wb);return new uc(s).toPromise()}function Mm(){const s=indexedDB.open(wb,rI);return new Promise((e,n)=>{s.addEventListener("error",()=>{n(s.error)}),s.addEventListener("upgradeneeded",()=>{const a=s.result;try{a.createObjectStore(Eh,{keyPath:Nb})}catch(o){n(o)}}),s.addEventListener("success",async()=>{const a=s.result;a.objectStoreNames.contains(Eh)?e(a):(a.close(),await oI(),e(await Mm()))})})}async function $v(s,e,n){const a=Fh(s,!0).put({[Nb]:e,value:n});return new uc(a).toPromise()}async function lI(s,e){const n=Fh(s,!1).get(e),a=await new uc(n).toPromise();return a===void 0?null:a.value}function Wv(s,e){const n=Fh(s,!0).delete(e);return new uc(n).toPromise()}const cI=800,uI=3;class Rb{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 Mm(),this.db)}async _withRetries(e){let n=0;for(;;)try{const a=await this._openDb();return await e(a)}catch(a){if(n++>uI)throw a;this.db&&(this.db.close(),this.db=void 0)}}async initializeServiceWorkerMessaging(){return pp()?this.initializeReceiver():this.initializeSender()}async initializeReceiver(){this.receiver=Hh._getInstance(aI()),this.receiver._subscribe("keyChanged",async(e,n)=>({keyProcessed:(await this._poll()).includes(n.key)})),this.receiver._subscribe("ping",async(e,n)=>["keyChanged"])}async initializeSender(){if(this.activeServiceWorker=await iI(),!this.activeServiceWorker)return;this.sender=new tI(this.activeServiceWorker);const e=await this.sender._send("ping",{},800);e&&e[0]?.fulfilled&&e[0]?.value.includes("keyChanged")&&(this.serviceWorkerReceiverAvailable=!0)}async notifyServiceWorker(e){if(!(!this.sender||!this.activeServiceWorker||sI()!==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 Mm();return await $v(e,vh,"1"),await Wv(e,vh),!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(a=>$v(a,e,n)),this.localCache[e]=n,this.notifyServiceWorker(e)))}async _get(e){const n=await this._withRetries(a=>lI(a,e));return this.localCache[e]=n,n}async _remove(e){return this._withPendingWrite(async()=>(await this._withRetries(n=>Wv(n,e)),delete this.localCache[e],this.notifyServiceWorker(e)))}async _poll(){const e=await this._withRetries(o=>{const c=Fh(o,!1).getAll();return new uc(c).toPromise()});if(!e)return[];if(this.pendingWrites!==0)return[];const n=[],a=new Set;if(e.length!==0)for(const{fbase_key:o,value:c}of e)a.add(o),JSON.stringify(this.localCache[o])!==JSON.stringify(c)&&(this.notifyListeners(o,c),n.push(o));for(const o of Object.keys(this.localCache))this.localCache[o]&&!a.has(o)&&(this.notifyListeners(o,null),n.push(o));return n}notifyListeners(e,n){this.localCache[e]=n;const a=this.listeners[e];if(a)for(const o of Array.from(a))o(n)}startPolling(){this.stopPolling(),this.pollTimer=setInterval(async()=>this._poll(),cI)}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]),Object.keys(this.listeners).length===0&&this.stopPolling()}}Rb.type="LOCAL";const xb=Rb;function Xv(s,e){return it(s,"POST","/v2/accounts/mfaSignIn:start",nt(s,e))}function hI(s,e){return it(s,"POST","/v2/accounts/mfaSignIn:finalize",nt(s,e))}function dI(s,e){return it(s,"POST","/v2/accounts/mfaSignIn:finalize",nt(s,e))}const ym=$T("rcb"),fI=new oc(3e4,6e4);class mI{constructor(){this.hostLanguage="",this.counter=0,this.librarySeparatelyLoaded=!!Ct().grecaptcha?.render}load(e,n=""){return te(pI(n),e,"argument-error"),this.shouldResolveImmediately(n)&&Uv(Ct().grecaptcha)?Promise.resolve(Ct().grecaptcha):new Promise((a,o)=>{const c=Ct().setTimeout(()=>{o(on(e,"network-request-failed"))},fI.get());Ct()[ym]=()=>{Ct().clearTimeout(c),delete Ct()[ym];const p=Ct().grecaptcha;if(!p||!Uv(p)){o(on(e,"internal-error"));return}const g=p.render;p.render=(y,T)=>{const b=g(y,T);return this.counter++,b},this.hostLanguage=n,a(p)};const f=`${Mx()}?${mo({onload:ym,render:"explicit",hl:n})}`;lp(f).catch(()=>{clearTimeout(c),o(on(e,"internal-error"))})})}clearedOneInstance(){this.counter--}shouldResolveImmediately(e){return!!Ct().grecaptcha?.render&&(e===this.hostLanguage||this.counter>0||this.librarySeparatelyLoaded)}}function pI(s){return s.length<=6&&/^\s*[a-zA-Z0-9\-]*\s*$/.test(s)}class gI{async load(e){return new Ux(e)}clearedOneInstance(){}}const zl="recaptcha",_I={theme:"light",type:"image"};class yI{constructor(e,n,a={..._I}){this.parameters=a,this.type=zl,this.destroyed=!1,this.widgetId=null,this.tokenChangeListeners=new Set,this.renderPromise=null,this.recaptcha=null,this.auth=pt(e),this.isInvisible=this.parameters.size==="invisible",te(typeof document<"u",this.auth,"operation-not-supported-in-this-environment");const o=typeof n=="string"?document.getElementById(n):n;te(o,this.auth,"argument-error"),this.container=o,this.parameters.callback=this.makeTokenCallback(this.parameters.callback),this._recaptchaLoader=this.auth.settings.appVerificationDisabledForTesting?new gI:new mI,this.validateStartingState()}async verify(){this.assertNotDestroyed();const e=await this.render(),n=this.getAssertedRecaptcha(),a=n.getResponse(e);return a||new Promise(o=>{const c=f=>{f&&(this.tokenChangeListeners.delete(c),o(f))};this.tokenChangeListeners.add(c),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(){te(!this.parameters.sitekey,this.auth,"argument-error"),te(this.isInvisible||!this.container.hasChildNodes(),this.auth,"argument-error"),te(typeof document<"u",this.auth,"operation-not-supported-in-this-environment")}makeTokenCallback(e){return n=>{if(this.tokenChangeListeners.forEach(a=>a(n)),typeof e=="function")e(n);else if(typeof e=="string"){const a=Ct()[e];typeof a=="function"&&a(n)}}}assertNotDestroyed(){te(!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}async init(){te(ap()&&!pp(),this.auth,"internal-error"),await vI(),this.recaptcha=await this._recaptchaLoader.load(this.auth,this.auth.languageCode||void 0);const e=await _x(this.auth);te(e,this.auth,"internal-error"),this.parameters.sitekey=e}getAssertedRecaptcha(){return te(this.recaptcha,this.auth,"internal-error"),this.recaptcha}}function vI(){let s=null;return new Promise(e=>{if(document.readyState==="complete"){e();return}s=()=>e(),window.addEventListener("load",s)}).catch(e=>{throw s&&window.removeEventListener("load",s),e})}class gp{constructor(e,n){this.verificationId=e,this.onConfirmation=n}confirm(e){const n=na._fromVerification(this.verificationId,e);return this.onConfirmation(n)}}async function EI(s,e,n){if(ut(s.app))return Promise.reject(zt(s));const a=pt(s),o=await Gh(a,e,Ee(n));return new gp(o,c=>Uh(a,c))}async function TI(s,e,n){const a=Ee(s);await Vh(!1,a,"phone");const o=await Gh(a.auth,e,Ee(n));return new gp(o,c=>ob(a,c))}async function bI(s,e,n){const a=Ee(s);if(ut(a.auth.app))return Promise.reject(zt(a.auth));const o=await Gh(a.auth,e,Ee(n));return new gp(o,c=>lb(a,c))}async function Gh(s,e,n){if(!s._getRecaptchaConfig())try{await XT(s)}catch{console.log("Failed to initialize reCAPTCHA Enterprise config. Triggering the reCAPTCHA v2 verification.")}try{let a;if(typeof e=="string"?a={phoneNumber:e}:a=e,"session"in a){const o=a.session;if("phoneNumber"in a){te(o.type==="enroll",s,"internal-error");const c={idToken:o.credential,phoneEnrollmentInfo:{phoneNumber:a.phoneNumber,clientType:"CLIENT_TYPE_WEB"}};return(await ta(s,c,"mfaSmsEnrollment",async(y,T)=>{if(T.phoneEnrollmentInfo.captchaResponse===Vl){te(n?.type===zl,y,"argument-error");const b=await vm(y,T,n);return Qv(y,b)}return Qv(y,T)},"PHONE_PROVIDER").catch(y=>Promise.reject(y))).phoneSessionInfo.sessionInfo}else{te(o.type==="signin",s,"internal-error");const c=a.multiFactorHint?.uid||a.multiFactorUid;te(c,s,"missing-multi-factor-info");const f={mfaPendingCredential:o.credential,mfaEnrollmentId:c,phoneSignInInfo:{clientType:"CLIENT_TYPE_WEB"}};return(await ta(s,f,"mfaSmsSignIn",async(T,b)=>{if(b.phoneSignInInfo.captchaResponse===Vl){te(n?.type===zl,T,"argument-error");const N=await vm(T,b,n);return Xv(T,N)}return Xv(T,b)},"PHONE_PROVIDER").catch(T=>Promise.reject(T))).phoneResponseInfo.sessionInfo}}else{const o={phoneNumber:a.phoneNumber,clientType:"CLIENT_TYPE_WEB"};return(await ta(s,o,"sendVerificationCode",async(g,y)=>{if(y.captchaResponse===Vl){te(n?.type===zl,g,"argument-error");const T=await vm(g,y,n);return Yv(g,T)}return Yv(g,y)},"PHONE_PROVIDER").catch(g=>Promise.reject(g))).sessionInfo}}finally{n?._reset()}}async function SI(s,e){const n=Ee(s);if(ut(n.auth.app))return Promise.reject(zt(n.auth));await cp(n,e)}async function vm(s,e,n){te(n.type===zl,s,"argument-error");const a=await n.verify();te(typeof a=="string",s,"argument-error");const o={...e};if("phoneEnrollmentInfo"in o){const c=o.phoneEnrollmentInfo.phoneNumber,f=o.phoneEnrollmentInfo.captchaResponse,p=o.phoneEnrollmentInfo.clientType,g=o.phoneEnrollmentInfo.recaptchaVersion;return Object.assign(o,{phoneEnrollmentInfo:{phoneNumber:c,recaptchaToken:a,captchaResponse:f,clientType:p,recaptchaVersion:g}}),o}else if("phoneSignInInfo"in o){const c=o.phoneSignInInfo.captchaResponse,f=o.phoneSignInInfo.clientType,p=o.phoneSignInInfo.recaptchaVersion;return Object.assign(o,{phoneSignInInfo:{recaptchaToken:a,captchaResponse:c,clientType:f,recaptchaVersion:p}}),o}else return Object.assign(o,{recaptchaToken:a}),o}class Ga{constructor(e){this.providerId=Ga.PROVIDER_ID,this.auth=pt(e)}verifyPhoneNumber(e,n){return Gh(this.auth,e,Ee(n))}static credential(e,n){return na._fromVerification(e,n)}static credentialFromResult(e){const n=e;return Ga.credentialFromTaggedObject(n)}static credentialFromError(e){return Ga.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;const{phoneNumber:n,temporaryProof:a}=e;return n&&a?na._fromTokenResponse(n,a):null}}Ga.PROVIDER_ID="phone";Ga.PHONE_SIGN_IN_METHOD="phone";function er(s,e){return e?as(e):(te(s._popupRedirectResolver,s,"argument-error"),s._popupRedirectResolver)}class _p extends _o{constructor(e){super("custom","custom"),this.params=e}_getIdTokenResponse(e){return os(e,this._buildIdpRequest())}_linkToIdToken(e,n){return os(e,this._buildIdpRequest(n))}_getReauthenticationResolver(e){return os(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 AI(s){return rb(s.auth,new _p(s),s.bypassAuthState)}function wI(s){const{auth:e,user:n}=s;return te(n,e,"internal-error"),ab(n,new _p(s),s.bypassAuthState)}async function NI(s){const{auth:e,user:n}=s;return te(n,e,"internal-error"),cp(n,new _p(s),s.bypassAuthState)}class Ib{constructor(e,n,a,o,c=!1){this.auth=e,this.resolver=a,this.user=o,this.bypassAuthState=c,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(a){this.reject(a)}})}async onAuthEvent(e){const{urlResponse:n,sessionId:a,postBody:o,tenantId:c,error:f,type:p}=e;if(f){this.reject(f);return}const g={auth:this.auth,requestUri:n,sessionId:a,tenantId:c||void 0,postBody:o||void 0,user:this.user,bypassAuthState:this.bypassAuthState};try{this.resolve(await this.getIdpTask(p)(g))}catch(y){this.reject(y)}}onError(e){this.reject(e)}getIdpTask(e){switch(e){case"signInViaPopup":case"signInViaRedirect":return AI;case"linkViaPopup":case"linkViaRedirect":return NI;case"reauthViaPopup":case"reauthViaRedirect":return wI;default:gn(this.auth,"internal-error")}}resolve(e){ds(this.pendingPromise,"Pending promise was never set"),this.pendingPromise.resolve(e),this.unregisterAndCleanUp()}reject(e){ds(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()}}const RI=new oc(2e3,1e4);async function xI(s,e,n){if(ut(s.app))return Promise.reject(on(s,"operation-not-supported-in-this-environment"));const a=pt(s);go(s,e,_s);const o=er(a,n);return new rs(a,"signInViaPopup",e,o).executeNotNull()}async function II(s,e,n){const a=Ee(s);if(ut(a.auth.app))return Promise.reject(on(a.auth,"operation-not-supported-in-this-environment"));go(a.auth,e,_s);const o=er(a.auth,n);return new rs(a.auth,"reauthViaPopup",e,o,a).executeNotNull()}async function CI(s,e,n){const a=Ee(s);go(a.auth,e,_s);const o=er(a.auth,n);return new rs(a.auth,"linkViaPopup",e,o,a).executeNotNull()}class rs extends Ib{constructor(e,n,a,o,c){super(e,n,o,c),this.provider=a,this.authWindow=null,this.pollId=null,rs.currentPopupAction&&rs.currentPopupAction.cancel(),rs.currentPopupAction=this}async executeNotNull(){const e=await this.execute();return te(e,this.auth,"internal-error"),e}async onExecution(){ds(this.filter.length===1,"Popup operations only handle one event");const e=qh();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(on(this.auth,"web-storage-unsupported"))}),this.pollUserCancellation()}get eventId(){return this.authWindow?.associatedEvent||null}cancel(){this.reject(on(this.auth,"cancelled-popup-request"))}cleanUp(){this.authWindow&&this.authWindow.close(),this.pollId&&window.clearTimeout(this.pollId),this.authWindow=null,this.pollId=null,rs.currentPopupAction=null}pollUserCancellation(){const e=()=>{if(this.authWindow?.window?.closed){this.pollId=window.setTimeout(()=>{this.pollId=null,this.reject(on(this.auth,"popup-closed-by-user"))},8e3);return}this.pollId=window.setTimeout(e,RI.get())};e()}}rs.currentPopupAction=null;const DI="pendingRedirect",ah=new Map;class jI extends Ib{constructor(e,n,a=!1){super(e,["signInViaRedirect","linkViaRedirect","reauthViaRedirect","unknown"],n,void 0,a),this.eventId=null}async execute(){let e=ah.get(this.auth._key());if(!e){try{const a=await OI(this.resolver,this.auth)?await super.execute():null;e=()=>Promise.resolve(a)}catch(n){e=()=>Promise.reject(n)}ah.set(this.auth._key(),e)}return this.bypassAuthState||ah.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 OI(s,e){const n=Db(e),a=Cb(s);if(!await a._isAvailable())return!1;const o=await a._get(n)==="true";return await a._remove(n),o}async function yp(s,e){return Cb(s)._set(Db(e),"true")}function MI(s,e){ah.set(s._key(),e)}function Cb(s){return as(s._redirectPersistence)}function Db(s){return sh(DI,s.config.apiKey,s.name)}function PI(s,e,n){return kI(s,e,n)}async function kI(s,e,n){if(ut(s.app))return Promise.reject(zt(s));const a=pt(s);go(s,e,_s),await a._initializationPromise;const o=er(a,n);return await yp(o,a),o._openRedirect(a,e,"signInViaRedirect")}function LI(s,e,n){return VI(s,e,n)}async function VI(s,e,n){const a=Ee(s);if(go(a.auth,e,_s),ut(a.auth.app))return Promise.reject(zt(a.auth));await a.auth._initializationPromise;const o=er(a.auth,n);await yp(o,a.auth);const c=await Ob(a);return o._openRedirect(a.auth,e,"reauthViaRedirect",c)}function UI(s,e,n){return zI(s,e,n)}async function zI(s,e,n){const a=Ee(s);go(a.auth,e,_s),await a.auth._initializationPromise;const o=er(a.auth,n);await Vh(!1,a,e.providerId),await yp(o,a.auth);const c=await Ob(a);return o._openRedirect(a.auth,e,"linkViaRedirect",c)}async function BI(s,e){return await pt(s)._initializationPromise,jb(s,e,!1)}async function jb(s,e,n=!1){if(ut(s.app))return Promise.reject(zt(s));const a=pt(s),o=er(a,e),f=await new jI(a,o,n).execute();return f&&!n&&(delete f.user._redirectEventId,await a._persistUserIfCurrent(f.user),await a._setRedirectUser(null,e)),f}async function Ob(s){const e=qh(`${s.uid}:::`);return s._redirectEventId=e,await s.auth._setRedirectUser(s),await s.auth._persistUserIfCurrent(s),e}const HI=600*1e3;class qI{constructor(e){this.auth=e,this.cachedEventUids=new Set,this.consumers=new Set,this.queuedRedirectEvent=null,this.hasHandledPotentialRedirect=!1,this.lastProcessedEventTime=Date.now()}registerConsumer(e){this.consumers.add(e),this.queuedRedirectEvent&&this.isEventForConsumer(this.queuedRedirectEvent,e)&&(this.sendToConsumer(this.queuedRedirectEvent,e),this.saveEventToCache(this.queuedRedirectEvent),this.queuedRedirectEvent=null)}unregisterConsumer(e){this.consumers.delete(e)}onEvent(e){if(this.hasEventBeenHandled(e))return!1;let n=!1;return this.consumers.forEach(a=>{this.isEventForConsumer(e,a)&&(n=!0,this.sendToConsumer(e,a),this.saveEventToCache(e))}),this.hasHandledPotentialRedirect||!FI(e)||(this.hasHandledPotentialRedirect=!0,n||(this.queuedRedirectEvent=e,n=!0)),n}sendToConsumer(e,n){if(e.error&&!Mb(e)){const a=e.error.code?.split("auth/")[1]||"internal-error";n.onError(on(this.auth,a))}else n.onAuthEvent(e)}isEventForConsumer(e,n){const a=n.eventId===null||!!e.eventId&&e.eventId===n.eventId;return n.filter.includes(e.type)&&a}hasEventBeenHandled(e){return Date.now()-this.lastProcessedEventTime>=HI&&this.cachedEventUids.clear(),this.cachedEventUids.has(Jv(e))}saveEventToCache(e){this.cachedEventUids.add(Jv(e)),this.lastProcessedEventTime=Date.now()}}function Jv(s){return[s.type,s.eventId,s.sessionId,s.tenantId].filter(e=>e).join("-")}function Mb({type:s,error:e}){return s==="unknown"&&e?.code==="auth/no-auth-event"}function FI(s){switch(s.type){case"signInViaRedirect":case"linkViaRedirect":case"reauthViaRedirect":return!0;case"unknown":return Mb(s);default:return!1}}async function GI(s,e={}){return it(s,"GET","/v1/projects",e)}const YI=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,KI=/^https?/;async function QI(s){if(s.config.emulator)return;const{authorizedDomains:e}=await GI(s);for(const n of e)try{if($I(n))return}catch{}gn(s,"unauthorized-domain")}function $I(s){const e=Ql(),{protocol:n,hostname:a}=new URL(e);if(s.startsWith("chrome-extension://")){const f=new URL(s);return f.hostname===""&&a===""?n==="chrome-extension:"&&s.replace("chrome-extension://","")===e.replace("chrome-extension://",""):n==="chrome-extension:"&&f.hostname===a}if(!KI.test(n))return!1;if(YI.test(s))return a===s;const o=s.replace(/\./g,"\\.");return new RegExp("^(.+\\."+o+"|"+o+")$","i").test(a)}const WI=new oc(3e4,6e4);function Zv(){const s=Ct().___jsl;if(s?.H){for(const e of Object.keys(s.H))if(s.H[e].r=s.H[e].r||[],s.H[e].L=s.H[e].L||[],s.H[e].r=[...s.H[e].L],s.CP)for(let n=0;n<s.CP.length;n++)s.CP[n]=null}}function XI(s){return new Promise((e,n)=>{function a(){Zv(),gapi.load("gapi.iframes",{callback:()=>{e(gapi.iframes.getContext())},ontimeout:()=>{Zv(),n(on(s,"network-request-failed"))},timeout:WI.get()})}if(Ct().gapi?.iframes?.Iframe)e(gapi.iframes.getContext());else if(Ct().gapi?.load)a();else{const o=$T("iframefcb");return Ct()[o]=()=>{gapi.load?a():n(on(s,"network-request-failed"))},lp(`${kx()}?onload=${o}`).catch(c=>n(c))}}).catch(e=>{throw rh=null,e})}let rh=null;function JI(s){return rh=rh||XI(s),rh}const ZI=new oc(5e3,15e3),eC="__/auth/iframe",tC="emulator/auth/iframe",nC={style:{position:"absolute",top:"-100px",width:"1px",height:"1px"},"aria-hidden":"true",tabindex:"-1"},iC=new Map([["identitytoolkit.googleapis.com","p"],["staging-identitytoolkit.sandbox.googleapis.com","s"],["test-identitytoolkit.sandbox.googleapis.com","t"]]);function sC(s){const e=s.config;te(e.authDomain,s,"auth-domain-config-required");const n=e.emulator?rp(e,tC):`https://${s.config.authDomain}/${eC}`,a={apiKey:e.apiKey,appName:s.name,v:po},o=iC.get(s.config.apiHost);o&&(a.eid=o);const c=s._getFrameworks();return c.length&&(a.fw=c.join(",")),`${n}?${mo(a).slice(1)}`}async function aC(s){const e=await JI(s),n=Ct().gapi;return te(n,s,"internal-error"),e.open({where:document.body,url:sC(s),messageHandlersFilter:n.iframes.CROSS_ORIGIN_IFRAMES_FILTER,attributes:nC,dontclear:!0},a=>new Promise(async(o,c)=>{await a.restyle({setHideOnLeave:!1});const f=on(s,"network-request-failed"),p=Ct().setTimeout(()=>{c(f)},ZI.get());function g(){Ct().clearTimeout(p),o(a)}a.ping(g).then(g,()=>{c(f)})}))}const rC={location:"yes",resizable:"yes",statusbar:"yes",toolbar:"no"},oC=500,lC=600,cC="_blank",uC="http://localhost";class eE{constructor(e){this.window=e,this.associatedEvent=null}close(){if(this.window)try{this.window.close()}catch{}}}function hC(s,e,n,a=oC,o=lC){const c=Math.max((window.screen.availHeight-o)/2,0).toString(),f=Math.max((window.screen.availWidth-a)/2,0).toString();let p="";const g={...rC,width:a.toString(),height:o.toString(),top:c,left:f},y=nn().toLowerCase();n&&(p=HT(y)?cC:n),zT(y)&&(e=e||uC,g.scrollbars="yes");const T=Object.entries(g).reduce((N,[P,G])=>`${N}${P}=${G},`,"");if(Nx(y)&&p!=="_self")return dC(e||"",p),new eE(null);const b=window.open(e||"",p,T);te(b,s,"popup-blocked");try{b.focus()}catch{}return new eE(b)}function dC(s,e){const n=document.createElement("a");n.href=s,n.target=e;const a=document.createEvent("MouseEvent");a.initMouseEvent("click",!0,!0,window,1,0,0,0,0,!1,!1,!1,!1,1,null),n.dispatchEvent(a)}const fC="__/auth/handler",mC="emulator/auth/handler",pC=encodeURIComponent("fac");async function tE(s,e,n,a,o,c){te(s.config.authDomain,s,"auth-domain-config-required"),te(s.config.apiKey,s,"invalid-api-key");const f={apiKey:s.config.apiKey,appName:s.name,authType:n,redirectUrl:a,v:po,eventId:o};if(e instanceof _s){e.setDefaultLanguage(s.languageCode),f.providerId=e.providerId||"",BN(e.getCustomParameters())||(f.customParameters=JSON.stringify(e.getCustomParameters()));for(const[T,b]of Object.entries({}))f[T]=b}if(e instanceof vo){const T=e.getScopes().filter(b=>b!=="");T.length>0&&(f.scopes=T.join(","))}s.tenantId&&(f.tid=s.tenantId);const p=f;for(const T of Object.keys(p))p[T]===void 0&&delete p[T];const g=await s._getAppCheckToken(),y=g?`#${pC}=${encodeURIComponent(g)}`:"";return`${gC(s)}?${mo(p).slice(1)}${y}`}function gC({config:s}){return s.emulator?rp(s,mC):`https://${s.authDomain}/${fC}`}const Em="webStorageSupport";class _C{constructor(){this.eventManagers={},this.iframes={},this.originValidationPromises={},this._redirectPersistence=Bh,this._completeRedirectFn=jb,this._overrideRedirectResult=MI}async _openPopup(e,n,a,o){ds(this.eventManagers[e._key()]?.manager,"_initialize() not called before _openPopup()");const c=await tE(e,n,a,Ql(),o);return hC(e,c,qh())}async _openRedirect(e,n,a,o){await this._originValidation(e);const c=await tE(e,n,a,Ql(),o);return nI(c),new Promise(()=>{})}_initialize(e){const n=e._key();if(this.eventManagers[n]){const{manager:o,promise:c}=this.eventManagers[n];return o?Promise.resolve(o):(ds(c,"If manager is not set, promise should be"),c)}const a=this.initAndGetManager(e);return this.eventManagers[n]={promise:a},a.catch(()=>{delete this.eventManagers[n]}),a}async initAndGetManager(e){const n=await aC(e),a=new qI(e);return n.register("authEvent",o=>(te(o?.authEvent,e,"invalid-auth-event"),{status:a.onEvent(o.authEvent)?"ACK":"ERROR"}),gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER),this.eventManagers[e._key()]={manager:a},this.iframes[e._key()]=n,a}_isIframeWebStorageSupported(e,n){this.iframes[e._key()].send(Em,{type:Em},o=>{const c=o?.[0]?.[Em];c!==void 0&&n(!!c),gn(e,"internal-error")},gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER)}_originValidation(e){const n=e._key();return this.originValidationPromises[n]||(this.originValidationPromises[n]=QI(e)),this.originValidationPromises[n]}get _shouldInitProactively(){return KT()||BT()||op()}}const Pb=_C;class kb{constructor(e){this.factorId=e}_process(e,n,a){switch(n.type){case"enroll":return this._finalizeEnroll(e,n.credential,a);case"signin":return this._finalizeSignIn(e,n.credential);default:return Ii("unexpected MultiFactorSessionType")}}}class vp extends kb{constructor(e){super("phone"),this.credential=e}static _fromCredential(e){return new vp(e)}_finalizeEnroll(e,n,a){return G1(e,{idToken:n,displayName:a,phoneVerificationInfo:this.credential._makeVerificationRequest()})}_finalizeSignIn(e,n){return hI(e,{mfaPendingCredential:n,phoneVerificationInfo:this.credential._makeVerificationRequest()})}}class Lb{constructor(){}static assertion(e){return vp._fromCredential(e)}}Lb.FACTOR_ID="phone";class Vb{static assertionForEnrollment(e,n){return Xl._fromSecret(e,n)}static assertionForSignIn(e,n){return Xl._fromEnrollmentId(e,n)}static async generateSecret(e){const n=e;te(typeof n.user?.auth<"u","internal-error");const a=await Y1(n.user.auth,{idToken:n.credential,totpEnrollmentInfo:{}});return Yh._fromStartTotpMfaEnrollmentResponse(a,n.user.auth)}}Vb.FACTOR_ID="totp";class Xl extends kb{constructor(e,n,a){super("totp"),this.otp=e,this.enrollmentId=n,this.secret=a}static _fromSecret(e,n){return new Xl(n,void 0,e)}static _fromEnrollmentId(e,n){return new Xl(n,e)}async _finalizeEnroll(e,n,a){return te(typeof this.secret<"u",e,"argument-error"),K1(e,{idToken:n,displayName:a,totpVerificationInfo:this.secret._makeTotpVerificationInfo(this.otp)})}async _finalizeSignIn(e,n){te(this.enrollmentId!==void 0&&this.otp!==void 0,e,"argument-error");const a={verificationCode:this.otp};return dI(e,{mfaPendingCredential:n,mfaEnrollmentId:this.enrollmentId,totpVerificationInfo:a})}}class Yh{constructor(e,n,a,o,c,f,p){this.sessionInfo=f,this.auth=p,this.secretKey=e,this.hashingAlgorithm=n,this.codeLength=a,this.codeIntervalSeconds=o,this.enrollmentCompletionDeadline=c}static _fromStartTotpMfaEnrollmentResponse(e,n){return new Yh(e.totpSessionInfo.sharedSecretKey,e.totpSessionInfo.hashingAlgorithm,e.totpSessionInfo.verificationCodeLength,e.totpSessionInfo.periodSec,new Date(e.totpSessionInfo.finalizeEnrollmentTime).toUTCString(),e.totpSessionInfo.sessionInfo,n)}_makeTotpVerificationInfo(e){return{sessionInfo:this.sessionInfo,verificationCode:e}}generateQrCodeUrl(e,n){let a=!1;return(Qu(e)||Qu(n))&&(a=!0),a&&(Qu(e)&&(e=this.auth.currentUser?.email||"unknownuser"),Qu(n)&&(n=this.auth.name)),`otpauth://totp/${n}:${e}?secret=${this.secretKey}&issuer=${n}&algorithm=${this.hashingAlgorithm}&digits=${this.codeLength}`}}function Qu(s){return typeof s>"u"||s?.length===0}var nE="@firebase/auth",iE="1.12.1";class yC{constructor(e){this.auth=e,this.internalListeners=new Map}getUid(){return this.assertAuthConfigured(),this.auth.currentUser?.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(a=>{e(a?.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(){te(this.auth._initializationPromise,"dependent-sdk-initialized-before-auth")}updateProactiveRefresh(){this.internalListeners.size>0?this.auth._startProactiveRefresh():this.auth._stopProactiveRefresh()}}function vC(s){switch(s){case"Node":return"node";case"ReactNative":return"rn";case"Worker":return"webworker";case"Cordova":return"cordova";case"WebExtension":return"web-extension";default:return}}function EC(s){no(new $a("auth",(e,{options:n})=>{const a=e.getProvider("app").getImmediate(),o=e.getProvider("heartbeat"),c=e.getProvider("app-check-internal"),{apiKey:f,authDomain:p}=a.options;te(f&&!f.includes(":"),"invalid-api-key",{appName:a.name});const g={apiKey:f,authDomain:p,clientPlatform:s,apiHost:"identitytoolkit.googleapis.com",tokenApiHost:"securetoken.googleapis.com",apiScheme:"https",sdkClientVersion:QT(s)},y=new jx(a,o,c,g);return Gx(y,n),y},"PUBLIC").setInstantiationMode("EXPLICIT").setInstanceCreatedCallback((e,n,a)=>{e.getProvider("auth-internal").initialize()})),no(new $a("auth-internal",e=>{const n=pt(e.getProvider("auth").getImmediate());return(a=>new yC(a))(n)},"PRIVATE").setInstantiationMode("EXPLICIT")),ea(nE,iE,vC(s)),ea(nE,iE,"esm2020")}const TC=300,bC=vT("authIdTokenMaxAge")||TC;let sE=null;const SC=s=>async e=>{const n=e&&await e.getIdTokenResult(),a=n&&(new Date().getTime()-Date.parse(n.issuedAtTime))/1e3;if(a&&a>bC)return;const o=n?.token;sE!==o&&(sE=o,await fetch(s,{method:o?"POST":"DELETE",headers:o?{Authorization:`Bearer ${o}`}:{}}))};function Ub(s=wT()){const e=np(s,"auth");if(e.isInitialized())return e.getImmediate();const n=JT(s,{popupRedirectResolver:Pb,persistence:[xb,bb,Bh]}),a=vT("authTokenSyncURL");if(a&&typeof isSecureContext=="boolean"&&isSecureContext){const c=new URL(a,location.origin);if(location.origin===c.origin){const f=SC(c.toString());yb(n,f,()=>f(n.currentUser)),_b(n,p=>f(p))}}const o=_T("auth");return o&&ZT(n,`http://${o}`),n}function AC(){return document.getElementsByTagName("head")?.[0]??document}Ox({loadJS(s){return new Promise((e,n)=>{const a=document.createElement("script");a.setAttribute("src",s),a.onload=e,a.onerror=o=>{const c=on("internal-error");c.customData=o,n(c)},a.type="text/javascript",a.charset="UTF-8",AC().appendChild(a)})},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="});EC("Browser");const wC=Object.freeze(Object.defineProperty({__proto__:null,ActionCodeOperation:ax,ActionCodeURL:yo,AuthCredential:_o,AuthErrorCodes:lx,EmailAuthCredential:io,EmailAuthProvider:ca,FacebookAuthProvider:ts,FactorId:tx,GithubAuthProvider:is,GoogleAuthProvider:ns,OAuthCredential:Oi,OAuthProvider:Ul,OperationType:sx,PhoneAuthCredential:na,PhoneAuthProvider:Ga,PhoneMultiFactorGenerator:Lb,ProviderId:nx,RecaptchaVerifier:yI,SAMLAuthProvider:_h,SignInMethod:ix,TotpMultiFactorGenerator:Vb,TotpSecret:Yh,TwitterAuthProvider:ss,applyActionCode:v1,beforeAuthStateChanged:yb,browserCookiePersistence:Z1,browserLocalPersistence:bb,browserPopupRedirectResolver:Pb,browserSessionPersistence:Bh,checkActionCode:ub,confirmPasswordReset:y1,connectAuthEmulator:ZT,createUserWithEmailAndPassword:hb,debugErrorMap:ox,deleteUser:q1,fetchSignInMethodsForEmail:w1,getAdditionalUserInfo:k1,getAuth:Ub,getIdToken:Ex,getIdTokenResult:kT,getMultiFactorResolver:F1,getRedirectResult:BI,inMemoryPersistence:Om,indexedDBLocalPersistence:xb,initializeAuth:JT,initializeRecaptchaConfig:L1,isSignInWithEmailLink:b1,linkWithCredential:ob,linkWithPhoneNumber:TI,linkWithPopup:CI,linkWithRedirect:UI,multiFactor:$1,onAuthStateChanged:vb,onIdTokenChanged:_b,parseActionCodeURL:h1,prodErrorMap:IT,reauthenticateWithCredential:lb,reauthenticateWithPhoneNumber:bI,reauthenticateWithPopup:II,reauthenticateWithRedirect:LI,reload:LT,revokeAccessToken:H1,sendEmailVerification:N1,sendPasswordResetEmail:cb,sendSignInLinkToEmail:T1,setPersistence:gb,signInAnonymously:m1,signInWithCredential:Uh,signInWithCustomToken:_1,signInWithEmailAndPassword:db,signInWithEmailLink:S1,signInWithPhoneNumber:EI,signInWithPopup:xI,signInWithRedirect:PI,signOut:B1,unlink:p1,updateCurrentUser:z1,updateEmail:I1,updatePassword:C1,updatePhoneNumber:SI,updateProfile:fb,useDeviceLanguage:U1,validatePassword:V1,verifyBeforeUpdateEmail:R1,verifyPasswordResetCode:E1},Symbol.toStringTag,{value:"Module"}));var aE=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};var Ep;(function(){var s;function e(C,w){function I(){}I.prototype=w.prototype,C.F=w.prototype,C.prototype=new I,C.prototype.constructor=C,C.D=function(M,j,L){for(var R=Array(arguments.length-2),Xe=2;Xe<arguments.length;Xe++)R[Xe-2]=arguments[Xe];return w.prototype[j].apply(M,R)}}function n(){this.blockSize=-1}function a(){this.blockSize=-1,this.blockSize=64,this.g=Array(4),this.C=Array(this.blockSize),this.o=this.h=0,this.u()}e(a,n),a.prototype.u=function(){this.g[0]=1732584193,this.g[1]=4023233417,this.g[2]=2562383102,this.g[3]=271733878,this.o=this.h=0};function o(C,w,I){I||(I=0);const M=Array(16);if(typeof w=="string")for(var j=0;j<16;++j)M[j]=w.charCodeAt(I++)|w.charCodeAt(I++)<<8|w.charCodeAt(I++)<<16|w.charCodeAt(I++)<<24;else for(j=0;j<16;++j)M[j]=w[I++]|w[I++]<<8|w[I++]<<16|w[I++]<<24;w=C.g[0],I=C.g[1],j=C.g[2];let L=C.g[3],R;R=w+(L^I&(j^L))+M[0]+3614090360&4294967295,w=I+(R<<7&4294967295|R>>>25),R=L+(j^w&(I^j))+M[1]+3905402710&4294967295,L=w+(R<<12&4294967295|R>>>20),R=j+(I^L&(w^I))+M[2]+606105819&4294967295,j=L+(R<<17&4294967295|R>>>15),R=I+(w^j&(L^w))+M[3]+3250441966&4294967295,I=j+(R<<22&4294967295|R>>>10),R=w+(L^I&(j^L))+M[4]+4118548399&4294967295,w=I+(R<<7&4294967295|R>>>25),R=L+(j^w&(I^j))+M[5]+1200080426&4294967295,L=w+(R<<12&4294967295|R>>>20),R=j+(I^L&(w^I))+M[6]+2821735955&4294967295,j=L+(R<<17&4294967295|R>>>15),R=I+(w^j&(L^w))+M[7]+4249261313&4294967295,I=j+(R<<22&4294967295|R>>>10),R=w+(L^I&(j^L))+M[8]+1770035416&4294967295,w=I+(R<<7&4294967295|R>>>25),R=L+(j^w&(I^j))+M[9]+2336552879&4294967295,L=w+(R<<12&4294967295|R>>>20),R=j+(I^L&(w^I))+M[10]+4294925233&4294967295,j=L+(R<<17&4294967295|R>>>15),R=I+(w^j&(L^w))+M[11]+2304563134&4294967295,I=j+(R<<22&4294967295|R>>>10),R=w+(L^I&(j^L))+M[12]+1804603682&4294967295,w=I+(R<<7&4294967295|R>>>25),R=L+(j^w&(I^j))+M[13]+4254626195&4294967295,L=w+(R<<12&4294967295|R>>>20),R=j+(I^L&(w^I))+M[14]+2792965006&4294967295,j=L+(R<<17&4294967295|R>>>15),R=I+(w^j&(L^w))+M[15]+1236535329&4294967295,I=j+(R<<22&4294967295|R>>>10),R=w+(j^L&(I^j))+M[1]+4129170786&4294967295,w=I+(R<<5&4294967295|R>>>27),R=L+(I^j&(w^I))+M[6]+3225465664&4294967295,L=w+(R<<9&4294967295|R>>>23),R=j+(w^I&(L^w))+M[11]+643717713&4294967295,j=L+(R<<14&4294967295|R>>>18),R=I+(L^w&(j^L))+M[0]+3921069994&4294967295,I=j+(R<<20&4294967295|R>>>12),R=w+(j^L&(I^j))+M[5]+3593408605&4294967295,w=I+(R<<5&4294967295|R>>>27),R=L+(I^j&(w^I))+M[10]+38016083&4294967295,L=w+(R<<9&4294967295|R>>>23),R=j+(w^I&(L^w))+M[15]+3634488961&4294967295,j=L+(R<<14&4294967295|R>>>18),R=I+(L^w&(j^L))+M[4]+3889429448&4294967295,I=j+(R<<20&4294967295|R>>>12),R=w+(j^L&(I^j))+M[9]+568446438&4294967295,w=I+(R<<5&4294967295|R>>>27),R=L+(I^j&(w^I))+M[14]+3275163606&4294967295,L=w+(R<<9&4294967295|R>>>23),R=j+(w^I&(L^w))+M[3]+4107603335&4294967295,j=L+(R<<14&4294967295|R>>>18),R=I+(L^w&(j^L))+M[8]+1163531501&4294967295,I=j+(R<<20&4294967295|R>>>12),R=w+(j^L&(I^j))+M[13]+2850285829&4294967295,w=I+(R<<5&4294967295|R>>>27),R=L+(I^j&(w^I))+M[2]+4243563512&4294967295,L=w+(R<<9&4294967295|R>>>23),R=j+(w^I&(L^w))+M[7]+1735328473&4294967295,j=L+(R<<14&4294967295|R>>>18),R=I+(L^w&(j^L))+M[12]+2368359562&4294967295,I=j+(R<<20&4294967295|R>>>12),R=w+(I^j^L)+M[5]+4294588738&4294967295,w=I+(R<<4&4294967295|R>>>28),R=L+(w^I^j)+M[8]+2272392833&4294967295,L=w+(R<<11&4294967295|R>>>21),R=j+(L^w^I)+M[11]+1839030562&4294967295,j=L+(R<<16&4294967295|R>>>16),R=I+(j^L^w)+M[14]+4259657740&4294967295,I=j+(R<<23&4294967295|R>>>9),R=w+(I^j^L)+M[1]+2763975236&4294967295,w=I+(R<<4&4294967295|R>>>28),R=L+(w^I^j)+M[4]+1272893353&4294967295,L=w+(R<<11&4294967295|R>>>21),R=j+(L^w^I)+M[7]+4139469664&4294967295,j=L+(R<<16&4294967295|R>>>16),R=I+(j^L^w)+M[10]+3200236656&4294967295,I=j+(R<<23&4294967295|R>>>9),R=w+(I^j^L)+M[13]+681279174&4294967295,w=I+(R<<4&4294967295|R>>>28),R=L+(w^I^j)+M[0]+3936430074&4294967295,L=w+(R<<11&4294967295|R>>>21),R=j+(L^w^I)+M[3]+3572445317&4294967295,j=L+(R<<16&4294967295|R>>>16),R=I+(j^L^w)+M[6]+76029189&4294967295,I=j+(R<<23&4294967295|R>>>9),R=w+(I^j^L)+M[9]+3654602809&4294967295,w=I+(R<<4&4294967295|R>>>28),R=L+(w^I^j)+M[12]+3873151461&4294967295,L=w+(R<<11&4294967295|R>>>21),R=j+(L^w^I)+M[15]+530742520&4294967295,j=L+(R<<16&4294967295|R>>>16),R=I+(j^L^w)+M[2]+3299628645&4294967295,I=j+(R<<23&4294967295|R>>>9),R=w+(j^(I|~L))+M[0]+4096336452&4294967295,w=I+(R<<6&4294967295|R>>>26),R=L+(I^(w|~j))+M[7]+1126891415&4294967295,L=w+(R<<10&4294967295|R>>>22),R=j+(w^(L|~I))+M[14]+2878612391&4294967295,j=L+(R<<15&4294967295|R>>>17),R=I+(L^(j|~w))+M[5]+4237533241&4294967295,I=j+(R<<21&4294967295|R>>>11),R=w+(j^(I|~L))+M[12]+1700485571&4294967295,w=I+(R<<6&4294967295|R>>>26),R=L+(I^(w|~j))+M[3]+2399980690&4294967295,L=w+(R<<10&4294967295|R>>>22),R=j+(w^(L|~I))+M[10]+4293915773&4294967295,j=L+(R<<15&4294967295|R>>>17),R=I+(L^(j|~w))+M[1]+2240044497&4294967295,I=j+(R<<21&4294967295|R>>>11),R=w+(j^(I|~L))+M[8]+1873313359&4294967295,w=I+(R<<6&4294967295|R>>>26),R=L+(I^(w|~j))+M[15]+4264355552&4294967295,L=w+(R<<10&4294967295|R>>>22),R=j+(w^(L|~I))+M[6]+2734768916&4294967295,j=L+(R<<15&4294967295|R>>>17),R=I+(L^(j|~w))+M[13]+1309151649&4294967295,I=j+(R<<21&4294967295|R>>>11),R=w+(j^(I|~L))+M[4]+4149444226&4294967295,w=I+(R<<6&4294967295|R>>>26),R=L+(I^(w|~j))+M[11]+3174756917&4294967295,L=w+(R<<10&4294967295|R>>>22),R=j+(w^(L|~I))+M[2]+718787259&4294967295,j=L+(R<<15&4294967295|R>>>17),R=I+(L^(j|~w))+M[9]+3951481745&4294967295,C.g[0]=C.g[0]+w&4294967295,C.g[1]=C.g[1]+(j+(R<<21&4294967295|R>>>11))&4294967295,C.g[2]=C.g[2]+j&4294967295,C.g[3]=C.g[3]+L&4294967295}a.prototype.v=function(C,w){w===void 0&&(w=C.length);const I=w-this.blockSize,M=this.C;let j=this.h,L=0;for(;L<w;){if(j==0)for(;L<=I;)o(this,C,L),L+=this.blockSize;if(typeof C=="string"){for(;L<w;)if(M[j++]=C.charCodeAt(L++),j==this.blockSize){o(this,M),j=0;break}}else for(;L<w;)if(M[j++]=C[L++],j==this.blockSize){o(this,M),j=0;break}}this.h=j,this.o+=w},a.prototype.A=function(){var C=Array((this.h<56?this.blockSize:this.blockSize*2)-this.h);C[0]=128;for(var w=1;w<C.length-8;++w)C[w]=0;w=this.o*8;for(var I=C.length-8;I<C.length;++I)C[I]=w&255,w/=256;for(this.v(C),C=Array(16),w=0,I=0;I<4;++I)for(let M=0;M<32;M+=8)C[w++]=this.g[I]>>>M&255;return C};function c(C,w){var I=p;return Object.prototype.hasOwnProperty.call(I,C)?I[C]:I[C]=w(C)}function f(C,w){this.h=w;const I=[];let M=!0;for(let j=C.length-1;j>=0;j--){const L=C[j]|0;M&&L==w||(I[j]=L,M=!1)}this.g=I}var p={};function g(C){return-128<=C&&C<128?c(C,function(w){return new f([w|0],w<0?-1:0)}):new f([C|0],C<0?-1:0)}function y(C){if(isNaN(C)||!isFinite(C))return b;if(C<0)return Y(y(-C));const w=[];let I=1;for(let M=0;C>=I;M++)w[M]=C/I|0,I*=4294967296;return new f(w,0)}function T(C,w){if(C.length==0)throw Error("number format error: empty string");if(w=w||10,w<2||36<w)throw Error("radix out of range: "+w);if(C.charAt(0)=="-")return Y(T(C.substring(1),w));if(C.indexOf("-")>=0)throw Error('number format error: interior "-" character');const I=y(Math.pow(w,8));let M=b;for(let L=0;L<C.length;L+=8){var j=Math.min(8,C.length-L);const R=parseInt(C.substring(L,L+j),w);j<8?(j=y(Math.pow(w,j)),M=M.j(j).add(y(R))):(M=M.j(I),M=M.add(y(R)))}return M}var b=g(0),N=g(1),P=g(16777216);s=f.prototype,s.m=function(){if(K(this))return-Y(this).m();let C=0,w=1;for(let I=0;I<this.g.length;I++){const M=this.i(I);C+=(M>=0?M:4294967296+M)*w,w*=4294967296}return C},s.toString=function(C){if(C=C||10,C<2||36<C)throw Error("radix out of range: "+C);if(G(this))return"0";if(K(this))return"-"+Y(this).toString(C);const w=y(Math.pow(C,6));var I=this;let M="";for(;;){const j=de(I,w).g;I=ne(I,j.j(w));let L=((I.g.length>0?I.g[0]:I.h)>>>0).toString(C);if(I=j,G(I))return L+M;for(;L.length<6;)L="0"+L;M=L+M}},s.i=function(C){return C<0?0:C<this.g.length?this.g[C]:this.h};function G(C){if(C.h!=0)return!1;for(let w=0;w<C.g.length;w++)if(C.g[w]!=0)return!1;return!0}function K(C){return C.h==-1}s.l=function(C){return C=ne(this,C),K(C)?-1:G(C)?0:1};function Y(C){const w=C.g.length,I=[];for(let M=0;M<w;M++)I[M]=~C.g[M];return new f(I,~C.h).add(N)}s.abs=function(){return K(this)?Y(this):this},s.add=function(C){const w=Math.max(this.g.length,C.g.length),I=[];let M=0;for(let j=0;j<=w;j++){let L=M+(this.i(j)&65535)+(C.i(j)&65535),R=(L>>>16)+(this.i(j)>>>16)+(C.i(j)>>>16);M=R>>>16,L&=65535,R&=65535,I[j]=R<<16|L}return new f(I,I[I.length-1]&-2147483648?-1:0)};function ne(C,w){return C.add(Y(w))}s.j=function(C){if(G(this)||G(C))return b;if(K(this))return K(C)?Y(this).j(Y(C)):Y(Y(this).j(C));if(K(C))return Y(this.j(Y(C)));if(this.l(P)<0&&C.l(P)<0)return y(this.m()*C.m());const w=this.g.length+C.g.length,I=[];for(var M=0;M<2*w;M++)I[M]=0;for(M=0;M<this.g.length;M++)for(let j=0;j<C.g.length;j++){const L=this.i(M)>>>16,R=this.i(M)&65535,Xe=C.i(j)>>>16,Ye=C.i(j)&65535;I[2*M+2*j]+=R*Ye,re(I,2*M+2*j),I[2*M+2*j+1]+=L*Ye,re(I,2*M+2*j+1),I[2*M+2*j+1]+=R*Xe,re(I,2*M+2*j+1),I[2*M+2*j+2]+=L*Xe,re(I,2*M+2*j+2)}for(C=0;C<w;C++)I[C]=I[2*C+1]<<16|I[2*C];for(C=w;C<2*w;C++)I[C]=0;return new f(I,0)};function re(C,w){for(;(C[w]&65535)!=C[w];)C[w+1]+=C[w]>>>16,C[w]&=65535,w++}function oe(C,w){this.g=C,this.h=w}function de(C,w){if(G(w))throw Error("division by zero");if(G(C))return new oe(b,b);if(K(C))return w=de(Y(C),w),new oe(Y(w.g),Y(w.h));if(K(w))return w=de(C,Y(w)),new oe(Y(w.g),w.h);if(C.g.length>30){if(K(C)||K(w))throw Error("slowDivide_ only works with positive integers.");for(var I=N,M=w;M.l(C)<=0;)I=fe(I),M=fe(M);var j=_e(I,1),L=_e(M,1);for(M=_e(M,2),I=_e(I,2);!G(M);){var R=L.add(M);R.l(C)<=0&&(j=j.add(I),L=R),M=_e(M,1),I=_e(I,1)}return w=ne(C,j.j(w)),new oe(j,w)}for(j=b;C.l(w)>=0;){for(I=Math.max(1,Math.floor(C.m()/w.m())),M=Math.ceil(Math.log(I)/Math.LN2),M=M<=48?1:Math.pow(2,M-48),L=y(I),R=L.j(w);K(R)||R.l(C)>0;)I-=M,L=y(I),R=L.j(w);G(L)&&(L=N),j=j.add(L),C=ne(C,R)}return new oe(j,C)}s.B=function(C){return de(this,C).h},s.and=function(C){const w=Math.max(this.g.length,C.g.length),I=[];for(let M=0;M<w;M++)I[M]=this.i(M)&C.i(M);return new f(I,this.h&C.h)},s.or=function(C){const w=Math.max(this.g.length,C.g.length),I=[];for(let M=0;M<w;M++)I[M]=this.i(M)|C.i(M);return new f(I,this.h|C.h)},s.xor=function(C){const w=Math.max(this.g.length,C.g.length),I=[];for(let M=0;M<w;M++)I[M]=this.i(M)^C.i(M);return new f(I,this.h^C.h)};function fe(C){const w=C.g.length+1,I=[];for(let M=0;M<w;M++)I[M]=C.i(M)<<1|C.i(M-1)>>>31;return new f(I,C.h)}function _e(C,w){const I=w>>5;w%=32;const M=C.g.length-I,j=[];for(let L=0;L<M;L++)j[L]=w>0?C.i(L+I)>>>w|C.i(L+I+1)<<32-w:C.i(L+I);return new f(j,C.h)}a.prototype.digest=a.prototype.A,a.prototype.reset=a.prototype.u,a.prototype.update=a.prototype.v,f.prototype.add=f.prototype.add,f.prototype.multiply=f.prototype.j,f.prototype.modulo=f.prototype.B,f.prototype.compare=f.prototype.l,f.prototype.toNumber=f.prototype.m,f.prototype.toString=f.prototype.toString,f.prototype.getBits=f.prototype.i,f.fromNumber=y,f.fromString=T,Ep=f}).apply(typeof aE<"u"?aE:typeof self<"u"?self:typeof window<"u"?window:{});var $u=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};var zb,Pl,Bb,oh,Pm,Hb,qb,Fb;(function(){var s,e=Object.defineProperty;function n(u){u=[typeof globalThis=="object"&&globalThis,u,typeof window=="object"&&window,typeof self=="object"&&self,typeof $u=="object"&&$u];for(var _=0;_<u.length;++_){var E=u[_];if(E&&E.Math==Math)return E}throw Error("Cannot find global object")}var a=n(this);function o(u,_){if(_)e:{var E=a;u=u.split(".");for(var A=0;A<u.length-1;A++){var U=u[A];if(!(U in E))break e;E=E[U]}u=u[u.length-1],A=E[u],_=_(A),_!=A&&_!=null&&e(E,u,{configurable:!0,writable:!0,value:_})}}o("Symbol.dispose",function(u){return u||Symbol("Symbol.dispose")}),o("Array.prototype.values",function(u){return u||function(){return this[Symbol.iterator]()}}),o("Object.entries",function(u){return u||function(_){var E=[],A;for(A in _)Object.prototype.hasOwnProperty.call(_,A)&&E.push([A,_[A]]);return E}});var c=c||{},f=this||self;function p(u){var _=typeof u;return _=="object"&&u!=null||_=="function"}function g(u,_,E){return u.call.apply(u.bind,arguments)}function y(u,_,E){return y=g,y.apply(null,arguments)}function T(u,_){var E=Array.prototype.slice.call(arguments,1);return function(){var A=E.slice();return A.push.apply(A,arguments),u.apply(this,A)}}function b(u,_){function E(){}E.prototype=_.prototype,u.Z=_.prototype,u.prototype=new E,u.prototype.constructor=u,u.Ob=function(A,U,q){for(var ie=Array(arguments.length-2),be=2;be<arguments.length;be++)ie[be-2]=arguments[be];return _.prototype[U].apply(A,ie)}}var N=typeof AsyncContext<"u"&&typeof AsyncContext.Snapshot=="function"?u=>u&&AsyncContext.Snapshot.wrap(u):u=>u;function P(u){const _=u.length;if(_>0){const E=Array(_);for(let A=0;A<_;A++)E[A]=u[A];return E}return[]}function G(u,_){for(let A=1;A<arguments.length;A++){const U=arguments[A];var E=typeof U;if(E=E!="object"?E:U?Array.isArray(U)?"array":E:"null",E=="array"||E=="object"&&typeof U.length=="number"){E=u.length||0;const q=U.length||0;u.length=E+q;for(let ie=0;ie<q;ie++)u[E+ie]=U[ie]}else u.push(U)}}class K{constructor(_,E){this.i=_,this.j=E,this.h=0,this.g=null}get(){let _;return this.h>0?(this.h--,_=this.g,this.g=_.next,_.next=null):_=this.i(),_}}function Y(u){f.setTimeout(()=>{throw u},0)}function ne(){var u=C;let _=null;return u.g&&(_=u.g,u.g=u.g.next,u.g||(u.h=null),_.next=null),_}class re{constructor(){this.h=this.g=null}add(_,E){const A=oe.get();A.set(_,E),this.h?this.h.next=A:this.g=A,this.h=A}}var oe=new K(()=>new de,u=>u.reset());class de{constructor(){this.next=this.g=this.h=null}set(_,E){this.h=_,this.g=E,this.next=null}reset(){this.next=this.g=this.h=null}}let fe,_e=!1,C=new re,w=()=>{const u=Promise.resolve(void 0);fe=()=>{u.then(I)}};function I(){for(var u;u=ne();){try{u.h.call(u.g)}catch(E){Y(E)}var _=oe;_.j(u),_.h<100&&(_.h++,u.next=_.g,_.g=u)}_e=!1}function M(){this.u=this.u,this.C=this.C}M.prototype.u=!1,M.prototype.dispose=function(){this.u||(this.u=!0,this.N())},M.prototype[Symbol.dispose]=function(){this.dispose()},M.prototype.N=function(){if(this.C)for(;this.C.length;)this.C.shift()()};function j(u,_){this.type=u,this.g=this.target=_,this.defaultPrevented=!1}j.prototype.h=function(){this.defaultPrevented=!0};var L=(function(){if(!f.addEventListener||!Object.defineProperty)return!1;var u=!1,_=Object.defineProperty({},"passive",{get:function(){u=!0}});try{const E=()=>{};f.addEventListener("test",E,_),f.removeEventListener("test",E,_)}catch{}return u})();function R(u){return/^[\s\xa0]*$/.test(u)}function Xe(u,_){j.call(this,u?u.type:""),this.relatedTarget=this.g=this.target=null,this.button=this.screenY=this.screenX=this.clientY=this.clientX=0,this.key="",this.metaKey=this.shiftKey=this.altKey=this.ctrlKey=!1,this.state=null,this.pointerId=0,this.pointerType="",this.i=null,u&&this.init(u,_)}b(Xe,j),Xe.prototype.init=function(u,_){const E=this.type=u.type,A=u.changedTouches&&u.changedTouches.length?u.changedTouches[0]:null;this.target=u.target||u.srcElement,this.g=_,_=u.relatedTarget,_||(E=="mouseover"?_=u.fromElement:E=="mouseout"&&(_=u.toElement)),this.relatedTarget=_,A?(this.clientX=A.clientX!==void 0?A.clientX:A.pageX,this.clientY=A.clientY!==void 0?A.clientY:A.pageY,this.screenX=A.screenX||0,this.screenY=A.screenY||0):(this.clientX=u.clientX!==void 0?u.clientX:u.pageX,this.clientY=u.clientY!==void 0?u.clientY:u.pageY,this.screenX=u.screenX||0,this.screenY=u.screenY||0),this.button=u.button,this.key=u.key||"",this.ctrlKey=u.ctrlKey,this.altKey=u.altKey,this.shiftKey=u.shiftKey,this.metaKey=u.metaKey,this.pointerId=u.pointerId||0,this.pointerType=u.pointerType,this.state=u.state,this.i=u,u.defaultPrevented&&Xe.Z.h.call(this)},Xe.prototype.h=function(){Xe.Z.h.call(this);const u=this.i;u.preventDefault?u.preventDefault():u.returnValue=!1};var Ye="closure_listenable_"+(Math.random()*1e6|0),$=0;function se(u,_,E,A,U){this.listener=u,this.proxy=null,this.src=_,this.type=E,this.capture=!!A,this.ha=U,this.key=++$,this.da=this.fa=!1}function ge(u){u.da=!0,u.listener=null,u.proxy=null,u.src=null,u.ha=null}function ke(u,_,E){for(const A in u)_.call(E,u[A],A,u)}function He(u,_){for(const E in u)_.call(void 0,u[E],E,u)}function O(u){const _={};for(const E in u)_[E]=u[E];return _}const J="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");function ae(u,_){let E,A;for(let U=1;U<arguments.length;U++){A=arguments[U];for(E in A)u[E]=A[E];for(let q=0;q<J.length;q++)E=J[q],Object.prototype.hasOwnProperty.call(A,E)&&(u[E]=A[E])}}function le(u){this.src=u,this.g={},this.h=0}le.prototype.add=function(u,_,E,A,U){const q=u.toString();u=this.g[q],u||(u=this.g[q]=[],this.h++);const ie=Ae(u,_,A,U);return ie>-1?(_=u[ie],E||(_.fa=!1)):(_=new se(_,this.src,q,!!A,U),_.fa=E,u.push(_)),_};function ve(u,_){const E=_.type;if(E in u.g){var A=u.g[E],U=Array.prototype.indexOf.call(A,_,void 0),q;(q=U>=0)&&Array.prototype.splice.call(A,U,1),q&&(ge(_),u.g[E].length==0&&(delete u.g[E],u.h--))}}function Ae(u,_,E,A){for(let U=0;U<u.length;++U){const q=u[U];if(!q.da&&q.listener==_&&q.capture==!!E&&q.ha==A)return U}return-1}var Me="closure_lm_"+(Math.random()*1e6|0),jt={};function st(u,_,E,A,U){if(Array.isArray(_)){for(let q=0;q<_.length;q++)st(u,_[q],E,A,U);return null}return E=Ao(E),u&&u[Ye]?u.J(_,E,p(A)?!!A.capture:!1,U):ua(u,_,E,!1,A,U)}function ua(u,_,E,A,U,q){if(!_)throw Error("Invalid event type");const ie=p(U)?!!U.capture:!!U;let be=ha(u);if(be||(u[Me]=be=new le(u)),E=be.add(_,E,A,ie,q),E.proxy)return E;if(A=sr(),E.proxy=A,A.src=u,A.listener=E,u.addEventListener)L||(U=ie),U===void 0&&(U=!1),u.addEventListener(_.toString(),A,U);else if(u.attachEvent)u.attachEvent(ai(_.toString()),A);else if(u.addListener&&u.removeListener)u.addListener(A);else throw Error("addEventListener and attachEvent are unavailable.");return E}function sr(){function u(E){return _.call(u.src,u.listener,E)}const _=bo;return u}function ar(u,_,E,A,U){if(Array.isArray(_))for(var q=0;q<_.length;q++)ar(u,_[q],E,A,U);else A=p(A)?!!A.capture:!!A,E=Ao(E),u&&u[Ye]?(u=u.i,q=String(_).toString(),q in u.g&&(_=u.g[q],E=Ae(_,E,A,U),E>-1&&(ge(_[E]),Array.prototype.splice.call(_,E,1),_.length==0&&(delete u.g[q],u.h--)))):u&&(u=ha(u))&&(_=u.g[_.toString()],u=-1,_&&(u=Ae(_,E,A,U)),(E=u>-1?_[u]:null)&&rr(E))}function rr(u){if(typeof u!="number"&&u&&!u.da){var _=u.src;if(_&&_[Ye])ve(_.i,u);else{var E=u.type,A=u.proxy;_.removeEventListener?_.removeEventListener(E,A,u.capture):_.detachEvent?_.detachEvent(ai(E),A):_.addListener&&_.removeListener&&_.removeListener(A),(E=ha(_))?(ve(E,u),E.h==0&&(E.src=null,_[Me]=null)):ge(u)}}}function ai(u){return u in jt?jt[u]:jt[u]="on"+u}function bo(u,_){if(u.da)u=!0;else{_=new Xe(_,this);const E=u.listener,A=u.ha||u.src;u.fa&&rr(u),u=E.call(A,_)}return u}function ha(u){return u=u[Me],u instanceof le?u:null}var So="__closure_events_fn_"+(Math.random()*1e9>>>0);function Ao(u){return typeof u=="function"?u:(u[So]||(u[So]=function(_){return u.handleEvent(_)}),u[So])}function Et(){M.call(this),this.i=new le(this),this.M=this,this.G=null}b(Et,M),Et.prototype[Ye]=!0,Et.prototype.removeEventListener=function(u,_,E,A){ar(this,u,_,E,A)};function Ot(u,_){var E,A=u.G;if(A)for(E=[];A;A=A.G)E.push(A);if(u=u.M,A=_.type||_,typeof _=="string")_=new j(_,u);else if(_ instanceof j)_.target=_.target||u;else{var U=_;_=new j(A,u),ae(_,U)}U=!0;let q,ie;if(E)for(ie=E.length-1;ie>=0;ie--)q=_.g=E[ie],U=ys(q,A,!0,_)&&U;if(q=_.g=u,U=ys(q,A,!0,_)&&U,U=ys(q,A,!1,_)&&U,E)for(ie=0;ie<E.length;ie++)q=_.g=E[ie],U=ys(q,A,!1,_)&&U}Et.prototype.N=function(){if(Et.Z.N.call(this),this.i){var u=this.i;for(const _ in u.g){const E=u.g[_];for(let A=0;A<E.length;A++)ge(E[A]);delete u.g[_],u.h--}}this.G=null},Et.prototype.J=function(u,_,E,A){return this.i.add(String(u),_,!1,E,A)},Et.prototype.K=function(u,_,E,A){return this.i.add(String(u),_,!0,E,A)};function ys(u,_,E,A){if(_=u.i.g[String(_)],!_)return!0;_=_.concat();let U=!0;for(let q=0;q<_.length;++q){const ie=_[q];if(ie&&!ie.da&&ie.capture==E){const be=ie.listener,_t=ie.ha||ie.src;ie.fa&&ve(u.i,ie),U=be.call(_t,A)!==!1&&U}}return U&&!A.defaultPrevented}function td(u,_){if(typeof u!="function")if(u&&typeof u.handleEvent=="function")u=y(u.handleEvent,u);else throw Error("Invalid listener argument");return Number(_)>2147483647?-1:f.setTimeout(u,_||0)}function _c(u){u.g=td(()=>{u.g=null,u.i&&(u.i=!1,_c(u))},u.l);const _=u.h;u.h=null,u.m.apply(null,_)}class sn extends M{constructor(_,E){super(),this.m=_,this.l=E,this.h=null,this.i=!1,this.g=null}j(_){this.h=arguments,this.g?this.i=!0:_c(this)}N(){super.N(),this.g&&(f.clearTimeout(this.g),this.g=null,this.i=!1,this.h=null)}}function da(u){M.call(this),this.h=u,this.g={}}b(da,M);var wo=[];function No(u){ke(u.g,function(_,E){this.g.hasOwnProperty(E)&&rr(_)},u),u.g={}}da.prototype.N=function(){da.Z.N.call(this),No(this)},da.prototype.handleEvent=function(){throw Error("EventHandler.handleEvent not implemented")};var vs=f.JSON.stringify,nd=f.JSON.parse,yc=class{stringify(u){return f.JSON.stringify(u,void 0)}parse(u){return f.JSON.parse(u,void 0)}};function vc(){}function Ec(){}var Hn={OPEN:"a",hb:"b",ERROR:"c",tb:"d"};function Bt(){j.call(this,"d")}b(Bt,j);function Rn(){j.call(this,"c")}b(Rn,j);var gt={},Tc=null;function or(){return Tc=Tc||new Et}gt.Ia="serverreachability";function bc(u){j.call(this,gt.Ia,u)}b(bc,j);function ri(u){const _=or();Ot(_,new bc(_))}gt.STAT_EVENT="statevent";function fa(u,_){j.call(this,gt.STAT_EVENT,u),this.stat=_}b(fa,j);function Tt(u){const _=or();Ot(_,new fa(_,u))}gt.Ja="timingevent";function oi(u,_){j.call(this,gt.Ja,u),this.size=_}b(oi,j);function li(u,_){if(typeof u!="function")throw Error("Fn must not be null and must be a function");return f.setTimeout(function(){u()},_)}function qn(){this.g=!0}qn.prototype.ua=function(){this.g=!1};function id(u,_,E,A,U,q){u.info(function(){if(u.g)if(q){var ie="",be=q.split("&");for(let Ue=0;Ue<be.length;Ue++){var _t=be[Ue].split("=");if(_t.length>1){const at=_t[0];_t=_t[1];const Dn=at.split("_");ie=Dn.length>=2&&Dn[1]=="type"?ie+(at+"="+_t+"&"):ie+(at+"=redacted&")}}}else ie=null;else ie=q;return"XMLHTTP REQ ("+A+") [attempt "+U+"]: "+_+` `+E+` `+ie})}function Sc(u,_,E,A,U,q,ie){u.info(function(){return"XMLHTTP RESP ("+A+") [ attempt "+U+"]: "+_+` `+E+` `+q+" "+ie})}function ci(u,_,E,A){u.info(function(){return"XMLHTTP TEXT ("+_+"): "+sd(u,E)+(A?" "+A:"")})}function ma(u,_){u.info(function(){return"TIMEOUT: "+_})}qn.prototype.info=function(){};function sd(u,_){if(!u.g)return _;if(!_)return null;try{const q=JSON.parse(_);if(q){for(u=0;u<q.length;u++)if(Array.isArray(q[u])){var E=q[u];if(!(E.length<2)){var A=E[1];if(Array.isArray(A)&&!(A.length<1)){var U=A[0];if(U!="noop"&&U!="stop"&&U!="close")for(let ie=1;ie<A.length;ie++)A[ie]=""}}}}return vs(q)}catch{return _}}var pa={NO_ERROR:0,cb:1,qb:2,pb:3,kb:4,ob:5,rb:6,Ga:7,TIMEOUT:8,ub:9},Ro={ib:"complete",Fb:"success",ERROR:"error",Ga:"abort",xb:"ready",yb:"readystatechange",TIMEOUT:"timeout",sb:"incrementaldata",wb:"progress",lb:"downloadprogress",Nb:"uploadprogress"},xo;function ga(){}b(ga,vc),ga.prototype.g=function(){return new XMLHttpRequest},xo=new ga;function ki(u){return encodeURIComponent(String(u))}function Ac(u){var _=1;u=u.split(":");const E=[];for(;_>0&&u.length;)E.push(u.shift()),_--;return u.length&&E.push(u.join(":")),E}function Fn(u,_,E,A){this.j=u,this.i=_,this.l=E,this.S=A||1,this.V=new da(this),this.H=45e3,this.J=null,this.o=!1,this.u=this.B=this.A=this.M=this.F=this.T=this.D=null,this.G=[],this.g=null,this.C=0,this.m=this.v=null,this.X=-1,this.K=!1,this.P=0,this.O=null,this.W=this.L=this.U=this.R=!1,this.h=new Gn}function Gn(){this.i=null,this.g="",this.h=!1}var bt={},Pt={};function ui(u,_,E){u.M=1,u.A=_a(At(_)),u.u=E,u.R=!0,lr(u,null)}function lr(u,_){u.F=Date.now(),hi(u),u.B=At(u.A);var E=u.B,A=u.S;Array.isArray(A)||(A=[String(A)]),dr(E.i,"t",A),u.C=0,E=u.j.L,u.h=new Gn,u.g=Uc(u.j,E?_:null,!u.u),u.P>0&&(u.O=new sn(y(u.Y,u,u.g),u.P)),_=u.V,E=u.g,A=u.ba;var U="readystatechange";Array.isArray(U)||(U&&(wo[0]=U.toString()),U=wo);for(let q=0;q<U.length;q++){const ie=st(E,U[q],A||_.handleEvent,!1,_.h||_);if(!ie)break;_.g[ie.key]=ie}_=u.J?O(u.J):{},u.u?(u.v||(u.v="POST"),_["Content-Type"]="application/x-www-form-urlencoded",u.g.ea(u.B,u.v,u.u,_)):(u.v="GET",u.g.ea(u.B,u.v,null,_)),ri(),id(u.i,u.v,u.B,u.l,u.S,u.u)}Fn.prototype.ba=function(u){u=u.target;const _=this.O;_&&Qn(u)==3?_.j():this.Y(u)},Fn.prototype.Y=function(u){try{if(u==this.g)e:{const be=Qn(this.g),_t=this.g.ya(),Ue=this.g.ca();if(!(be<3)&&(be!=3||this.g&&(this.h.h||this.g.la()||Ht(this.g)))){this.K||be!=4||_t==7||(_t==8||Ue<=0?ri(3):ri(2)),di(this);var _=this.g.ca();this.X=_;var E=ad(this);if(this.o=_==200,Sc(this.i,this.v,this.B,this.l,this.S,be,_),this.o){if(this.U&&!this.L){t:{if(this.g){var A,U=this.g;if((A=U.g?U.g.getResponseHeader("X-HTTP-Initial-Response"):null)&&!R(A)){var q=A;break t}}q=null}if(u=q)ci(this.i,this.l,u,"Initial handshake response via X-HTTP-Initial-Response"),this.L=!0,fi(this,u);else{this.o=!1,this.m=3,Tt(12),yn(this),xn(this);break e}}if(this.R){u=!0;let at;for(;!this.K&&this.C<E.length;)if(at=Nc(this,E),at==Pt){be==4&&(this.m=4,Tt(14),u=!1),ci(this.i,this.l,null,"[Incomplete Response]");break}else if(at==bt){this.m=4,Tt(15),ci(this.i,this.l,E,"[Invalid Chunk]"),u=!1;break}else ci(this.i,this.l,at,null),fi(this,at);if(wc(this)&&this.C!=0&&(this.h.g=this.h.g.slice(this.C),this.C=0),be!=4||E.length!=0||this.h.h||(this.m=1,Tt(16),u=!1),this.o=this.o&&u,!u)ci(this.i,this.l,E,"[Invalid Chunked Response]"),yn(this),xn(this);else if(E.length>0&&!this.W){this.W=!0;var ie=this.j;ie.g==this&&ie.aa&&!ie.P&&(ie.j.info("Great, no buffering proxy detected. Bytes received: "+E.length),qo(ie),ie.P=!0,Tt(11))}}else ci(this.i,this.l,E,null),fi(this,E);be==4&&yn(this),this.o&&!this.K&&(be==4?Pc(this.j,this):(this.o=!1,hi(this)))}else Vi(this.g),_==400&&E.indexOf("Unknown SID")>0?(this.m=3,Tt(12)):(this.m=0,Tt(13)),yn(this),xn(this)}}}catch{}};function ad(u){if(!wc(u))return u.g.la();const _=Ht(u.g);if(_==="")return"";let E="";const A=_.length,U=Qn(u.g)==4;if(!u.h.i){if(typeof TextDecoder>"u")return yn(u),xn(u),"";u.h.i=new f.TextDecoder}for(let q=0;q<A;q++)u.h.h=!0,E+=u.h.i.decode(_[q],{stream:!(U&&q==A-1)});return _.length=0,u.h.g+=E,u.C=0,u.h.g}function wc(u){return u.g?u.v=="GET"&&u.M!=2&&u.j.Aa:!1}function Nc(u,_){var E=u.C,A=_.indexOf(` `,E);return A==-1?Pt:(E=Number(_.substring(E,A)),isNaN(E)?bt:(A+=1,A+E>_.length?Pt:(_=_.slice(A,A+E),u.C=A+E,_)))}Fn.prototype.cancel=function(){this.K=!0,yn(this)};function hi(u){u.T=Date.now()+u.H,cr(u,u.H)}function cr(u,_){if(u.D!=null)throw Error("WatchDog timer not null");u.D=li(y(u.aa,u),_)}function di(u){u.D&&(f.clearTimeout(u.D),u.D=null)}Fn.prototype.aa=function(){this.D=null;const u=Date.now();u-this.T>=0?(ma(this.i,this.B),this.M!=2&&(ri(),Tt(17)),yn(this),this.m=2,xn(this)):cr(this,this.T-u)};function xn(u){u.j.I==0||u.K||Pc(u.j,u)}function yn(u){di(u);var _=u.O;_&&typeof _.dispose=="function"&&_.dispose(),u.O=null,No(u.V),u.g&&(_=u.g,u.g=null,_.abort(),_.dispose())}function fi(u,_){try{var E=u.j;if(E.I!=0&&(E.g==u||pi(E.h,u))){if(!u.L&&pi(E.h,u)&&E.I==3){try{var A=E.Ba.g.parse(_)}catch{A=null}if(Array.isArray(A)&&A.length==3){var U=A;if(U[0]==0){e:if(!E.v){if(E.g)if(E.g.F+3e3<u.F)_r(E),Rs(E);else break e;Aa(E),Tt(18)}}else E.xa=U[1],0<E.xa-E.K&&U[2]<37500&&E.F&&E.A==0&&!E.C&&(E.C=li(y(E.Va,E),6e3));mi(E.h)<=1&&E.ta&&(E.ta=void 0)}else Ti(E,11)}else if((u.L||E.g==u)&&_r(E),!R(_))for(U=E.Ba.g.parse(_),_=0;_<U.length;_++){let Ue=U[_];const at=Ue[0];if(!(at<=E.K))if(E.K=at,Ue=Ue[1],E.I==2)if(Ue[0]=="c"){E.M=Ue[1],E.ba=Ue[2];const Dn=Ue[3];Dn!=null&&(E.ka=Dn,E.j.info("VER="+E.ka));const bi=Ue[4];bi!=null&&(E.za=bi,E.j.info("SVER="+E.za));const $n=Ue[5];$n!=null&&typeof $n=="number"&&$n>0&&(A=1.5*$n,E.O=A,E.j.info("backChannelRequestTimeoutMs_="+A)),A=E;const Wn=u.g;if(Wn){const wa=Wn.g?Wn.g.getResponseHeader("X-Client-Wire-Protocol"):null;if(wa){var q=A.h;q.g||wa.indexOf("spdy")==-1&&wa.indexOf("quic")==-1&&wa.indexOf("h2")==-1||(q.j=q.l,q.g=new Set,q.h&&(Do(q,q.h),q.h=null))}if(A.G){const yr=Wn.g?Wn.g.getResponseHeader("X-HTTP-Session-Id"):null;yr&&(A.wa=yr,qe(A.J,A.G,yr))}}E.I=3,E.l&&E.l.ra(),E.aa&&(E.T=Date.now()-u.F,E.j.info("Handshake RTT: "+E.T+"ms")),A=E;var ie=u;if(A.na=Vc(A,A.L?A.ba:null,A.W),ie.L){jo(A.h,ie);var be=ie,_t=A.O;_t&&(be.H=_t),be.D&&(di(be),hi(be)),A.g=ie}else Oc(A);E.i.length>0&&Ei(E)}else Ue[0]!="stop"&&Ue[0]!="close"||Ti(E,7);else E.I==3&&(Ue[0]=="stop"||Ue[0]=="close"?Ue[0]=="stop"?Ti(E,7):Bo(E):Ue[0]!="noop"&&E.l&&E.l.qa(Ue),E.A=0)}}ri(4)}catch{}}var St=class{constructor(u,_){this.g=u,this.map=_}};function Io(u){this.l=u||10,f.PerformanceNavigationTiming?(u=f.performance.getEntriesByType("navigation"),u=u.length>0&&(u[0].nextHopProtocol=="hq"||u[0].nextHopProtocol=="h2")):u=!!(f.chrome&&f.chrome.loadTimes&&f.chrome.loadTimes()&&f.chrome.loadTimes().wasFetchedViaSpdy),this.j=u?this.l:1,this.g=null,this.j>1&&(this.g=new Set),this.h=null,this.i=[]}function Co(u){return u.h?!0:u.g?u.g.size>=u.j:!1}function mi(u){return u.h?1:u.g?u.g.size:0}function pi(u,_){return u.h?u.h==_:u.g?u.g.has(_):!1}function Do(u,_){u.g?u.g.add(_):u.h=_}function jo(u,_){u.h&&u.h==_?u.h=null:u.g&&u.g.has(_)&&u.g.delete(_)}Io.prototype.cancel=function(){if(this.i=Oo(this),this.h)this.h.cancel(),this.h=null;else if(this.g&&this.g.size!==0){for(const u of this.g.values())u.cancel();this.g.clear()}};function Oo(u){if(u.h!=null)return u.i.concat(u.h.G);if(u.g!=null&&u.g.size!==0){let _=u.i;for(const E of u.g.values())_=_.concat(E.G);return _}return P(u.i)}var Rc=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^\\\\/?#]*)@)?([^\\\\/?#]*?)(?::([0-9]+))?(?=[\\\\/?#]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#([\\s\\S]*))?$");function ur(u,_){if(u){u=u.split("&");for(let E=0;E<u.length;E++){const A=u[E].indexOf("=");let U,q=null;A>=0?(U=u[E].substring(0,A),q=u[E].substring(A+1)):U=u[E],_(U,q?decodeURIComponent(q.replace(/\+/g," ")):"")}}}function vn(u){this.g=this.o=this.j="",this.u=null,this.m=this.h="",this.l=!1;let _;u instanceof vn?(this.l=u.l,kt(this,u.j),this.o=u.o,this.g=u.g,Es(this,u.u),this.h=u.h,Mo(this,Dc(u.i)),this.m=u.m):u&&(_=String(u).match(Rc))?(this.l=!1,kt(this,_[1]||"",!0),this.o=gi(_[2]||""),this.g=gi(_[3]||"",!0),Es(this,_[4]),this.h=gi(_[5]||"",!0),Mo(this,_[6]||"",!0),this.m=gi(_[7]||"")):(this.l=!1,this.i=new bs(null,this.l))}vn.prototype.toString=function(){const u=[];var _=this.j;_&&u.push(ya(_,hr,!0),":");var E=this.g;return(E||_=="file")&&(u.push("//"),(_=this.o)&&u.push(ya(_,hr,!0),"@"),u.push(ki(E).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),E=this.u,E!=null&&u.push(":",String(E))),(E=this.h)&&(this.g&&E.charAt(0)!="/"&&u.push("/"),u.push(ya(E,E.charAt(0)=="/"?Po:xc,!0))),(E=this.i.toString())&&u.push("?",E),(E=this.m)&&u.push("#",ya(E,Ic)),u.join("")},vn.prototype.resolve=function(u){const _=At(this);let E=!!u.j;E?kt(_,u.j):E=!!u.o,E?_.o=u.o:E=!!u.g,E?_.g=u.g:E=u.u!=null;var A=u.h;if(E)Es(_,u.u);else if(E=!!u.h){if(A.charAt(0)!="/")if(this.g&&!this.h)A="/"+A;else{var U=_.h.lastIndexOf("/");U!=-1&&(A=_.h.slice(0,U+1)+A)}if(U=A,U==".."||U==".")A="";else if(U.indexOf("./")!=-1||U.indexOf("/.")!=-1){A=U.lastIndexOf("/",0)==0,U=U.split("/");const q=[];for(let ie=0;ie<U.length;){const be=U[ie++];be=="."?A&&ie==U.length&&q.push(""):be==".."?((q.length>1||q.length==1&&q[0]!="")&&q.pop(),A&&ie==U.length&&q.push("")):(q.push(be),A=!0)}A=q.join("/")}else A=U}return E?_.h=A:E=u.i.toString()!=="",E?Mo(_,Dc(u.i)):E=!!u.m,E&&(_.m=u.m),_};function At(u){return new vn(u)}function kt(u,_,E){u.j=E?gi(_,!0):_,u.j&&(u.j=u.j.replace(/:$/,""))}function Es(u,_){if(_){if(_=Number(_),isNaN(_)||_<0)throw Error("Bad port number "+_);u.u=_}else u.u=null}function Mo(u,_,E){_ instanceof bs?(u.i=_,fr(u.i,u.l)):(E||(_=ya(_,Ts)),u.i=new bs(_,u.l))}function qe(u,_,E){u.i.set(_,E)}function _a(u){return qe(u,"zx",Math.floor(Math.random()*2147483648).toString(36)+Math.abs(Math.floor(Math.random()*2147483648)^Date.now()).toString(36)),u}function gi(u,_){return u?_?decodeURI(u.replace(/%25/g,"%2525")):decodeURIComponent(u):""}function ya(u,_,E){return typeof u=="string"?(u=encodeURI(u).replace(_,ln),E&&(u=u.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),u):null}function ln(u){return u=u.charCodeAt(0),"%"+(u>>4&15).toString(16)+(u&15).toString(16)}var hr=/[#\/\?@]/g,xc=/[#\?:]/g,Po=/[#\?]/g,Ts=/[#\?@]/g,Ic=/#/g;function bs(u,_){this.h=this.g=null,this.i=u||null,this.j=!!_}function cn(u){u.g||(u.g=new Map,u.h=0,u.i&&ur(u.i,function(_,E){u.add(decodeURIComponent(_.replace(/\+/g," ")),E)}))}s=bs.prototype,s.add=function(u,_){cn(this),this.i=null,u=Ss(this,u);let E=this.g.get(u);return E||this.g.set(u,E=[]),E.push(_),this.h+=1,this};function Cc(u,_){cn(u),_=Ss(u,_),u.g.has(_)&&(u.i=null,u.h-=u.g.get(_).length,u.g.delete(_))}function ko(u,_){return cn(u),_=Ss(u,_),u.g.has(_)}s.forEach=function(u,_){cn(this),this.g.forEach(function(E,A){E.forEach(function(U){u.call(_,U,A,this)},this)},this)};function Lo(u,_){cn(u);let E=[];if(typeof _=="string")ko(u,_)&&(E=E.concat(u.g.get(Ss(u,_))));else for(u=Array.from(u.g.values()),_=0;_<u.length;_++)E=E.concat(u[_]);return E}s.set=function(u,_){return cn(this),this.i=null,u=Ss(this,u),ko(this,u)&&(this.h-=this.g.get(u).length),this.g.set(u,[_]),this.h+=1,this},s.get=function(u,_){return u?(u=Lo(this,u),u.length>0?String(u[0]):_):_};function dr(u,_,E){Cc(u,_),E.length>0&&(u.i=null,u.g.set(Ss(u,_),P(E)),u.h+=E.length)}s.toString=function(){if(this.i)return this.i;if(!this.g)return"";const u=[],_=Array.from(this.g.keys());for(let A=0;A<_.length;A++){var E=_[A];const U=ki(E);E=Lo(this,E);for(let q=0;q<E.length;q++){let ie=U;E[q]!==""&&(ie+="="+ki(E[q])),u.push(ie)}}return this.i=u.join("&")};function Dc(u){const _=new bs;return _.i=u.i,u.g&&(_.g=new Map(u.g),_.h=u.h),_}function Ss(u,_){return _=String(_),u.j&&(_=_.toLowerCase()),_}function fr(u,_){_&&!u.j&&(cn(u),u.i=null,u.g.forEach(function(E,A){const U=A.toLowerCase();A!=U&&(Cc(this,A),dr(this,U,E))},u)),u.j=_}function Yn(u,_){const E=new qn;if(f.Image){const A=new Image;A.onload=T(In,E,"TestLoadImage: loaded",!0,_,A),A.onerror=T(In,E,"TestLoadImage: error",!1,_,A),A.onabort=T(In,E,"TestLoadImage: abort",!1,_,A),A.ontimeout=T(In,E,"TestLoadImage: timeout",!1,_,A),f.setTimeout(function(){A.ontimeout&&A.ontimeout()},1e4),A.src=u}else _(!1)}function Vo(u,_){const E=new qn,A=new AbortController,U=setTimeout(()=>{A.abort(),In(E,"TestPingServer: timeout",!1,_)},1e4);fetch(u,{signal:A.signal}).then(q=>{clearTimeout(U),q.ok?In(E,"TestPingServer: ok",!0,_):In(E,"TestPingServer: server error",!1,_)}).catch(()=>{clearTimeout(U),In(E,"TestPingServer: error",!1,_)})}function In(u,_,E,A,U){try{U&&(U.onload=null,U.onerror=null,U.onabort=null,U.ontimeout=null),A(E)}catch{}}function As(){this.g=new yc}function _i(u){this.i=u.Sb||null,this.h=u.ab||!1}b(_i,vc),_i.prototype.g=function(){return new va(this.i,this.h)};function va(u,_){Et.call(this),this.H=u,this.o=_,this.m=void 0,this.status=this.readyState=0,this.responseType=this.responseText=this.response=this.statusText="",this.onreadystatechange=null,this.A=new Headers,this.h=null,this.F="GET",this.D="",this.g=!1,this.B=this.j=this.l=null,this.v=new AbortController}b(va,Et),s=va.prototype,s.open=function(u,_){if(this.readyState!=0)throw this.abort(),Error("Error reopening a connection");this.F=u,this.D=_,this.readyState=1,Kn(this)},s.send=function(u){if(this.readyState!=1)throw this.abort(),Error("need to call open() first. ");if(this.v.signal.aborted)throw this.abort(),Error("Request was aborted.");this.g=!0;const _={headers:this.A,method:this.F,credentials:this.m,cache:void 0,signal:this.v.signal};u&&(_.body=u),(this.H||f).fetch(new Request(this.D,_)).then(this.Pa.bind(this),this.ga.bind(this))},s.abort=function(){this.response=this.responseText="",this.A=new Headers,this.status=0,this.v.abort(),this.j&&this.j.cancel("Request was aborted.").catch(()=>{}),this.readyState>=1&&this.g&&this.readyState!=4&&(this.g=!1,ws(this)),this.readyState=0},s.Pa=function(u){if(this.g&&(this.l=u,this.h||(this.status=this.l.status,this.statusText=this.l.statusText,this.h=u.headers,this.readyState=2,Kn(this)),this.g&&(this.readyState=3,Kn(this),this.g)))if(this.responseType==="arraybuffer")u.arrayBuffer().then(this.Na.bind(this),this.ga.bind(this));else if(typeof f.ReadableStream<"u"&&"body"in u){if(this.j=u.body.getReader(),this.o){if(this.responseType)throw Error('responseType must be empty for "streamBinaryChunks" mode responses.');this.response=[]}else this.response=this.responseText="",this.B=new TextDecoder;mr(this)}else u.text().then(this.Oa.bind(this),this.ga.bind(this))};function mr(u){u.j.read().then(u.Ma.bind(u)).catch(u.ga.bind(u))}s.Ma=function(u){if(this.g){if(this.o&&u.value)this.response.push(u.value);else if(!this.o){var _=u.value?u.value:new Uint8Array(0);(_=this.B.decode(_,{stream:!u.done}))&&(this.response=this.responseText+=_)}u.done?ws(this):Kn(this),this.readyState==3&&mr(this)}},s.Oa=function(u){this.g&&(this.response=this.responseText=u,ws(this))},s.Na=function(u){this.g&&(this.response=u,ws(this))},s.ga=function(){this.g&&ws(this)};function ws(u){u.readyState=4,u.l=null,u.j=null,u.B=null,Kn(u)}s.setRequestHeader=function(u,_){this.A.append(u,_)},s.getResponseHeader=function(u){return this.h&&this.h.get(u.toLowerCase())||""},s.getAllResponseHeaders=function(){if(!this.h)return"";const u=[],_=this.h.entries();for(var E=_.next();!E.done;)E=E.value,u.push(E[0]+": "+E[1]),E=_.next();return u.join(`\r `)};function Kn(u){u.onreadystatechange&&u.onreadystatechange.call(u)}Object.defineProperty(va.prototype,"withCredentials",{get:function(){return this.m==="include"},set:function(u){this.m=u?"include":"same-origin"}});function Cn(u){let _="";return ke(u,function(E,A){_+=A,_+=":",_+=E,_+=`\r `}),_}function Ea(u,_,E){e:{for(A in E){var A=!1;break e}A=!0}A||(E=Cn(E),typeof u=="string"?E!=null&&ki(E):qe(u,_,E))}function Ke(u){Et.call(this),this.headers=new Map,this.L=u||null,this.h=!1,this.g=null,this.D="",this.o=0,this.l="",this.j=this.B=this.v=this.A=!1,this.m=null,this.F="",this.H=!1}b(Ke,Et);var yi=/^https?$/i,Uo=["POST","PUT"];s=Ke.prototype,s.Fa=function(u){this.H=u},s.ea=function(u,_,E,A){if(this.g)throw Error("[goog.net.XhrIo] Object is active with another request="+this.D+"; newUri="+u);_=_?_.toUpperCase():"GET",this.D=u,this.l="",this.o=0,this.A=!1,this.h=!0,this.g=this.L?this.L.g():xo.g(),this.g.onreadystatechange=N(y(this.Ca,this));try{this.B=!0,this.g.open(_,String(u),!0),this.B=!1}catch(q){Ta(this,q);return}if(u=E||"",E=new Map(this.headers),A)if(Object.getPrototypeOf(A)===Object.prototype)for(var U in A)E.set(U,A[U]);else if(typeof A.keys=="function"&&typeof A.get=="function")for(const q of A.keys())E.set(q,A.get(q));else throw Error("Unknown input type for opt_headers: "+String(A));A=Array.from(E.keys()).find(q=>q.toLowerCase()=="content-type"),U=f.FormData&&u instanceof f.FormData,!(Array.prototype.indexOf.call(Uo,_,void 0)>=0)||A||U||E.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8");for(const[q,ie]of E)this.g.setRequestHeader(q,ie);this.F&&(this.g.responseType=this.F),"withCredentials"in this.g&&this.g.withCredentials!==this.H&&(this.g.withCredentials=this.H);try{this.m&&(clearTimeout(this.m),this.m=null),this.v=!0,this.g.send(u),this.v=!1}catch(q){Ta(this,q)}};function Ta(u,_){u.h=!1,u.g&&(u.j=!0,u.g.abort(),u.j=!1),u.l=_,u.o=5,zo(u),Li(u)}function zo(u){u.A||(u.A=!0,Ot(u,"complete"),Ot(u,"error"))}s.abort=function(u){this.g&&this.h&&(this.h=!1,this.j=!0,this.g.abort(),this.j=!1,this.o=u||7,Ot(this,"complete"),Ot(this,"abort"),Li(this))},s.N=function(){this.g&&(this.h&&(this.h=!1,this.j=!0,this.g.abort(),this.j=!1),Li(this,!0)),Ke.Z.N.call(this)},s.Ca=function(){this.u||(this.B||this.v||this.j?ba(this):this.Xa())},s.Xa=function(){ba(this)};function ba(u){if(u.h&&typeof c<"u"){if(u.v&&Qn(u)==4)setTimeout(u.Ca.bind(u),0);else if(Ot(u,"readystatechange"),Qn(u)==4){u.h=!1;try{const q=u.ca();e:switch(q){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:var _=!0;break e;default:_=!1}var E;if(!(E=_)){var A;if(A=q===0){let ie=String(u.D).match(Rc)[1]||null;!ie&&f.self&&f.self.location&&(ie=f.self.location.protocol.slice(0,-1)),A=!yi.test(ie?ie.toLowerCase():"")}E=A}if(E)Ot(u,"complete"),Ot(u,"success");else{u.o=6;try{var U=Qn(u)>2?u.g.statusText:""}catch{U=""}u.l=U+" ["+u.ca()+"]",zo(u)}}finally{Li(u)}}}}function Li(u,_){if(u.g){u.m&&(clearTimeout(u.m),u.m=null);const E=u.g;u.g=null,_||Ot(u,"ready");try{E.onreadystatechange=null}catch{}}}s.isActive=function(){return!!this.g};function Qn(u){return u.g?u.g.readyState:0}s.ca=function(){try{return Qn(this)>2?this.g.status:-1}catch{return-1}},s.la=function(){try{return this.g?this.g.responseText:""}catch{return""}},s.La=function(u){if(this.g){var _=this.g.responseText;return u&&_.indexOf(u)==0&&(_=_.substring(u.length)),nd(_)}};function Ht(u){try{if(!u.g)return null;if("response"in u.g)return u.g.response;switch(u.F){case"":case"text":return u.g.responseText;case"arraybuffer":if("mozResponseArrayBuffer"in u.g)return u.g.mozResponseArrayBuffer}return null}catch{return null}}function Vi(u){const _={};u=(u.g&&Qn(u)>=2&&u.g.getAllResponseHeaders()||"").split(`\r `);for(let A=0;A<u.length;A++){if(R(u[A]))continue;var E=Ac(u[A]);const U=E[0];if(E=E[1],typeof E!="string")continue;E=E.trim();const q=_[U]||[];_[U]=q,q.push(E)}He(_,function(A){return A.join(", ")})}s.ya=function(){return this.o},s.Ha=function(){return typeof this.l=="string"?this.l:String(this.l)};function vi(u,_,E){return E&&E.internalChannelParams&&E.internalChannelParams[u]||_}function Ns(u){this.za=0,this.i=[],this.j=new qn,this.ba=this.na=this.J=this.W=this.g=this.wa=this.G=this.H=this.u=this.U=this.o=null,this.Ya=this.V=0,this.Sa=vi("failFast",!1,u),this.F=this.C=this.v=this.m=this.l=null,this.X=!0,this.xa=this.K=-1,this.Y=this.A=this.D=0,this.Qa=vi("baseRetryDelayMs",5e3,u),this.Za=vi("retryDelaySeedMs",1e4,u),this.Ta=vi("forwardChannelMaxRetries",2,u),this.va=vi("forwardChannelRequestTimeoutMs",2e4,u),this.ma=u&&u.xmlHttpFactory||void 0,this.Ua=u&&u.Rb||void 0,this.Aa=u&&u.useFetchStreams||!1,this.O=void 0,this.L=u&&u.supportsCrossDomainXhr||!1,this.M="",this.h=new Io(u&&u.concurrentRequestLimit),this.Ba=new As,this.S=u&&u.fastHandshake||!1,this.R=u&&u.encodeInitMessageHeaders||!1,this.S&&this.R&&(this.R=!1),this.Ra=u&&u.Pb||!1,u&&u.ua&&this.j.ua(),u&&u.forceLongPolling&&(this.X=!1),this.aa=!this.S&&this.X&&u&&u.detectBufferingProxy||!1,this.ia=void 0,u&&u.longPollingTimeout&&u.longPollingTimeout>0&&(this.ia=u.longPollingTimeout),this.ta=void 0,this.T=0,this.P=!1,this.ja=this.B=null}s=Ns.prototype,s.ka=8,s.I=1,s.connect=function(u,_,E,A){Tt(0),this.W=u,this.H=_||{},E&&A!==void 0&&(this.H.OSID=E,this.H.OAID=A),this.F=this.X,this.J=Vc(this,null,this.W),Ei(this)};function Bo(u){if(pr(u),u.I==3){var _=u.V++,E=At(u.J);if(qe(E,"SID",u.M),qe(E,"RID",_),qe(E,"TYPE","terminate"),Sa(u,E),_=new Fn(u,u.j,_),_.M=2,_.A=_a(At(E)),E=!1,f.navigator&&f.navigator.sendBeacon)try{E=f.navigator.sendBeacon(_.A.toString(),"")}catch{}!E&&f.Image&&(new Image().src=_.A,E=!0),E||(_.g=Uc(_.j,null),_.g.ea(_.A)),_.F=Date.now(),hi(_)}Lc(u)}function Rs(u){u.g&&(qo(u),u.g.cancel(),u.g=null)}function pr(u){Rs(u),u.v&&(f.clearTimeout(u.v),u.v=null),_r(u),u.h.cancel(),u.m&&(typeof u.m=="number"&&f.clearTimeout(u.m),u.m=null)}function Ei(u){if(!Co(u.h)&&!u.m){u.m=!0;var _=u.Ea;fe||w(),_e||(fe(),_e=!0),C.add(_,u),u.D=0}}function gr(u,_){return mi(u.h)>=u.h.j-(u.m?1:0)?!1:u.m?(u.i=_.G.concat(u.i),!0):u.I==1||u.I==2||u.D>=(u.Sa?0:u.Ta)?!1:(u.m=li(y(u.Ea,u,_),kc(u,u.D)),u.D++,!0)}s.Ea=function(u){if(this.m)if(this.m=null,this.I==1){if(!u){this.V=Math.floor(Math.random()*1e5),u=this.V++;const U=new Fn(this,this.j,u);let q=this.o;if(this.U&&(q?(q=O(q),ae(q,this.U)):q=this.U),this.u!==null||this.R||(U.J=q,q=null),this.S)e:{for(var _=0,E=0;E<this.i.length;E++){t:{var A=this.i[E];if("__data__"in A.map&&(A=A.map.__data__,typeof A=="string")){A=A.length;break t}A=void 0}if(A===void 0)break;if(_+=A,_>4096){_=E;break e}if(_===4096||E===this.i.length-1){_=E+1;break e}}_=1e3}else _=1e3;_=jc(this,U,_),E=At(this.J),qe(E,"RID",u),qe(E,"CVER",22),this.G&&qe(E,"X-HTTP-Session-Id",this.G),Sa(this,E),q&&(this.R?_="headers="+ki(Cn(q))+"&"+_:this.u&&Ea(E,this.u,q)),Do(this.h,U),this.Ra&&qe(E,"TYPE","init"),this.S?(qe(E,"$req",_),qe(E,"SID","null"),U.U=!0,ui(U,E,null)):ui(U,E,_),this.I=2}}else this.I==3&&(u?Ho(this,u):this.i.length==0||Co(this.h)||Ho(this))};function Ho(u,_){var E;_?E=_.l:E=u.V++;const A=At(u.J);qe(A,"SID",u.M),qe(A,"RID",E),qe(A,"AID",u.K),Sa(u,A),u.u&&u.o&&Ea(A,u.u,u.o),E=new Fn(u,u.j,E,u.D+1),u.u===null&&(E.J=u.o),_&&(u.i=_.G.concat(u.i)),_=jc(u,E,1e3),E.H=Math.round(u.va*.5)+Math.round(u.va*.5*Math.random()),Do(u.h,E),ui(E,A,_)}function Sa(u,_){u.H&&ke(u.H,function(E,A){qe(_,A,E)}),u.l&&ke({},function(E,A){qe(_,A,E)})}function jc(u,_,E){E=Math.min(u.i.length,E);const A=u.l?y(u.l.Ka,u.l,u):null;e:{var U=u.i;let be=-1;for(;;){const _t=["count="+E];be==-1?E>0?(be=U[0].g,_t.push("ofs="+be)):be=0:_t.push("ofs="+be);let Ue=!0;for(let at=0;at<E;at++){var q=U[at].g;const Dn=U[at].map;if(q-=be,q<0)be=Math.max(0,U[at].g-100),Ue=!1;else try{q="req"+q+"_"||"";try{var ie=Dn instanceof Map?Dn:Object.entries(Dn);for(const[bi,$n]of ie){let Wn=$n;p($n)&&(Wn=vs($n)),_t.push(q+bi+"="+encodeURIComponent(Wn))}}catch(bi){throw _t.push(q+"type="+encodeURIComponent("_badmap")),bi}}catch{A&&A(Dn)}}if(Ue){ie=_t.join("&");break e}}ie=void 0}return u=u.i.splice(0,E),_.G=u,ie}function Oc(u){if(!u.g&&!u.v){u.Y=1;var _=u.Da;fe||w(),_e||(fe(),_e=!0),C.add(_,u),u.A=0}}function Aa(u){return u.g||u.v||u.A>=3?!1:(u.Y++,u.v=li(y(u.Da,u),kc(u,u.A)),u.A++,!0)}s.Da=function(){if(this.v=null,Mc(this),this.aa&&!(this.P||this.g==null||this.T<=0)){var u=4*this.T;this.j.info("BP detection timer enabled: "+u),this.B=li(y(this.Wa,this),u)}},s.Wa=function(){this.B&&(this.B=null,this.j.info("BP detection timeout reached."),this.j.info("Buffering proxy detected and switch to long-polling!"),this.F=!1,this.P=!0,Tt(10),Rs(this),Mc(this))};function qo(u){u.B!=null&&(f.clearTimeout(u.B),u.B=null)}function Mc(u){u.g=new Fn(u,u.j,"rpc",u.Y),u.u===null&&(u.g.J=u.o),u.g.P=0;var _=At(u.na);qe(_,"RID","rpc"),qe(_,"SID",u.M),qe(_,"AID",u.K),qe(_,"CI",u.F?"0":"1"),!u.F&&u.ia&&qe(_,"TO",u.ia),qe(_,"TYPE","xmlhttp"),Sa(u,_),u.u&&u.o&&Ea(_,u.u,u.o),u.O&&(u.g.H=u.O);var E=u.g;u=u.ba,E.M=1,E.A=_a(At(_)),E.u=null,E.R=!0,lr(E,u)}s.Va=function(){this.C!=null&&(this.C=null,Rs(this),Aa(this),Tt(19))};function _r(u){u.C!=null&&(f.clearTimeout(u.C),u.C=null)}function Pc(u,_){var E=null;if(u.g==_){_r(u),qo(u),u.g=null;var A=2}else if(pi(u.h,_))E=_.G,jo(u.h,_),A=1;else return;if(u.I!=0){if(_.o)if(A==1){E=_.u?_.u.length:0,_=Date.now()-_.F;var U=u.D;A=or(),Ot(A,new oi(A,E)),Ei(u)}else Oc(u);else if(U=_.m,U==3||U==0&&_.X>0||!(A==1&&gr(u,_)||A==2&&Aa(u)))switch(E&&E.length>0&&(_=u.h,_.i=_.i.concat(E)),U){case 1:Ti(u,5);break;case 4:Ti(u,10);break;case 3:Ti(u,6);break;default:Ti(u,2)}}}function kc(u,_){let E=u.Qa+Math.floor(Math.random()*u.Za);return u.isActive()||(E*=2),E*_}function Ti(u,_){if(u.j.info("Error code "+_),_==2){var E=y(u.bb,u),A=u.Ua;const U=!A;A=new vn(A||"//www.google.com/images/cleardot.gif"),f.location&&f.location.protocol=="http"||kt(A,"https"),_a(A),U?Yn(A.toString(),E):Vo(A.toString(),E)}else Tt(2);u.I=0,u.l&&u.l.pa(_),Lc(u),pr(u)}s.bb=function(u){u?(this.j.info("Successfully pinged google.com"),Tt(2)):(this.j.info("Failed to ping google.com"),Tt(1))};function Lc(u){if(u.I=0,u.ja=[],u.l){const _=Oo(u.h);(_.length!=0||u.i.length!=0)&&(G(u.ja,_),G(u.ja,u.i),u.h.i.length=0,P(u.i),u.i.length=0),u.l.oa()}}function Vc(u,_,E){var A=E instanceof vn?At(E):new vn(E);if(A.g!="")_&&(A.g=_+"."+A.g),Es(A,A.u);else{var U=f.location;A=U.protocol,_=_?_+"."+U.hostname:U.hostname,U=+U.port;const q=new vn(null);A&&kt(q,A),_&&(q.g=_),U&&Es(q,U),E&&(q.h=E),A=q}return E=u.G,_=u.wa,E&&_&&qe(A,E,_),qe(A,"VER",u.ka),Sa(u,A),A}function Uc(u,_,E){if(_&&!u.L)throw Error("Can't create secondary domain capable XhrIo object.");return _=u.Aa&&!u.ma?new Ke(new _i({ab:E})):new Ke(u.ma),_.Fa(u.L),_}s.isActive=function(){return!!this.l&&this.l.isActive(this)};function zc(){}s=zc.prototype,s.ra=function(){},s.qa=function(){},s.pa=function(){},s.oa=function(){},s.isActive=function(){return!0},s.Ka=function(){};function xs(){}xs.prototype.g=function(u,_){return new an(u,_)};function an(u,_){Et.call(this),this.g=new Ns(_),this.l=u,this.h=_&&_.messageUrlParams||null,u=_&&_.messageHeaders||null,_&&_.clientProtocolHeaderRequired&&(u?u["X-Client-Protocol"]="webchannel":u={"X-Client-Protocol":"webchannel"}),this.g.o=u,u=_&&_.initMessageHeaders||null,_&&_.messageContentType&&(u?u["X-WebChannel-Content-Type"]=_.messageContentType:u={"X-WebChannel-Content-Type":_.messageContentType}),_&&_.sa&&(u?u["X-WebChannel-Client-Profile"]=_.sa:u={"X-WebChannel-Client-Profile":_.sa}),this.g.U=u,(u=_&&_.Qb)&&!R(u)&&(this.g.u=u),this.A=_&&_.supportsCrossDomainXhr||!1,this.v=_&&_.sendRawJson||!1,(_=_&&_.httpSessionIdParam)&&!R(_)&&(this.g.G=_,u=this.h,u!==null&&_ in u&&(u=this.h,_ in u&&delete u[_])),this.j=new Ui(this)}b(an,Et),an.prototype.m=function(){this.g.l=this.j,this.A&&(this.g.L=!0),this.g.connect(this.l,this.h||void 0)},an.prototype.close=function(){Bo(this.g)},an.prototype.o=function(u){var _=this.g;if(typeof u=="string"){var E={};E.__data__=u,u=E}else this.v&&(E={},E.__data__=vs(u),u=E);_.i.push(new St(_.Ya++,u)),_.I==3&&Ei(_)},an.prototype.N=function(){this.g.l=null,delete this.j,Bo(this.g),delete this.g,an.Z.N.call(this)};function Bc(u){Bt.call(this),u.__headers__&&(this.headers=u.__headers__,this.statusCode=u.__status__,delete u.__headers__,delete u.__status__);var _=u.__sm__;if(_){e:{for(const E in _){u=E;break e}u=void 0}(this.i=u)&&(u=this.i,_=_!==null&&u in _?_[u]:void 0),this.data=_}else this.data=u}b(Bc,Bt);function Hc(){Rn.call(this),this.status=1}b(Hc,Rn);function Ui(u){this.g=u}b(Ui,zc),Ui.prototype.ra=function(){Ot(this.g,"a")},Ui.prototype.qa=function(u){Ot(this.g,new Bc(u))},Ui.prototype.pa=function(u){Ot(this.g,new Hc)},Ui.prototype.oa=function(){Ot(this.g,"b")},xs.prototype.createWebChannel=xs.prototype.g,an.prototype.send=an.prototype.o,an.prototype.open=an.prototype.m,an.prototype.close=an.prototype.close,Fb=function(){return new xs},qb=function(){return or()},Hb=gt,Pm={jb:0,mb:1,nb:2,Hb:3,Mb:4,Jb:5,Kb:6,Ib:7,Gb:8,Lb:9,PROXY:10,NOPROXY:11,Eb:12,Ab:13,Bb:14,zb:15,Cb:16,Db:17,fb:18,eb:19,gb:20},pa.NO_ERROR=0,pa.TIMEOUT=8,pa.HTTP_ERROR=6,oh=pa,Ro.COMPLETE="complete",Bb=Ro,Ec.EventType=Hn,Hn.OPEN="a",Hn.CLOSE="b",Hn.ERROR="c",Hn.MESSAGE="d",Et.prototype.listen=Et.prototype.J,Pl=Ec,Ke.prototype.listenOnce=Ke.prototype.K,Ke.prototype.getLastError=Ke.prototype.Ha,Ke.prototype.getLastErrorCode=Ke.prototype.ya,Ke.prototype.getStatus=Ke.prototype.ca,Ke.prototype.getResponseJson=Ke.prototype.La,Ke.prototype.getResponseText=Ke.prototype.la,Ke.prototype.send=Ke.prototype.ea,Ke.prototype.setWithCredentials=Ke.prototype.Fa,zb=Ke}).apply(typeof $u<"u"?$u:typeof self<"u"?self:typeof window<"u"?window:{});class Zt{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}}Zt.UNAUTHENTICATED=new Zt(null),Zt.GOOGLE_CREDENTIALS=new Zt("google-credentials-uid"),Zt.FIRST_PARTY=new Zt("first-party-uid"),Zt.MOCK_USER=new Zt("mock-user");let Eo="12.10.0";function NC(s){Eo=s}const Wa=new ep("@firebase/firestore");function Qr(){return Wa.logLevel}function he(s,...e){if(Wa.logLevel<=je.DEBUG){const n=e.map(Tp);Wa.debug(`Firestore (${Eo}): ${s}`,...n)}}function Xa(s,...e){if(Wa.logLevel<=je.ERROR){const n=e.map(Tp);Wa.error(`Firestore (${Eo}): ${s}`,...n)}}function Jl(s,...e){if(Wa.logLevel<=je.WARN){const n=e.map(Tp);Wa.warn(`Firestore (${Eo}): ${s}`,...n)}}function Tp(s){if(typeof s=="string")return s;try{return(function(n){return JSON.stringify(n)})(s)}catch{return s}}function Re(s,e,n){let a="Unexpected state";typeof e=="string"?a=e:n=e,Gb(s,a,n)}function Gb(s,e,n){let a=`FIRESTORE (${Eo}) INTERNAL ASSERTION FAILED: ${e} (ID: ${s.toString(16)})`;if(n!==void 0)try{a+=" CONTEXT: "+JSON.stringify(n)}catch{a+=" CONTEXT: "+n}throw Xa(a),new Error(a)}function mt(s,e,n,a){let o="Unexpected state";typeof n=="string"?o=n:a=n,s||Gb(e,o,a)}function Ze(s,e){return s}const ee={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 pe extends ps{constructor(e,n){super(e,n),this.code=e,this.message=n,this.toString=()=>`${this.name}: [code=${this.code}]: ${this.message}`}}class Ya{constructor(){this.promise=new Promise(((e,n)=>{this.resolve=e,this.reject=n}))}}class Yb{constructor(e,n){this.user=n,this.type="OAuth",this.headers=new Map,this.headers.set("Authorization",`Bearer ${e}`)}}class RC{getToken(){return Promise.resolve(null)}invalidateToken(){}start(e,n){e.enqueueRetryable((()=>n(Zt.UNAUTHENTICATED)))}shutdown(){}}class xC{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 IC{constructor(e){this.t=e,this.currentUser=Zt.UNAUTHENTICATED,this.i=0,this.forceRefresh=!1,this.auth=null}start(e,n){mt(this.o===void 0,42304);let a=this.i;const o=g=>this.i!==a?(a=this.i,n(g)):Promise.resolve();let c=new Ya;this.o=()=>{this.i++,this.currentUser=this.u(),c.resolve(),c=new Ya,e.enqueueRetryable((()=>o(this.currentUser)))};const f=()=>{const g=c;e.enqueueRetryable((async()=>{await g.promise,await o(this.currentUser)}))},p=g=>{he("FirebaseAuthCredentialsProvider","Auth detected"),this.auth=g,this.o&&(this.auth.addAuthTokenListener(this.o),f())};this.t.onInit((g=>p(g))),setTimeout((()=>{if(!this.auth){const g=this.t.getImmediate({optional:!0});g?p(g):(he("FirebaseAuthCredentialsProvider","Auth not yet detected"),c.resolve(),c=new Ya)}}),0),f()}getToken(){const e=this.i,n=this.forceRefresh;return this.forceRefresh=!1,this.auth?this.auth.getToken(n).then((a=>this.i!==e?(he("FirebaseAuthCredentialsProvider","getToken aborted due to token change."),this.getToken()):a?(mt(typeof a.accessToken=="string",31837,{l:a}),new Yb(a.accessToken,this.currentUser)):null)):Promise.resolve(null)}invalidateToken(){this.forceRefresh=!0}shutdown(){this.auth&&this.o&&this.auth.removeAuthTokenListener(this.o),this.o=void 0}u(){const e=this.auth&&this.auth.getUid();return mt(e===null||typeof e=="string",2055,{h:e}),new Zt(e)}}class CC{constructor(e,n,a){this.P=e,this.T=n,this.I=a,this.type="FirstParty",this.user=Zt.FIRST_PARTY,this.R=new Map}A(){return this.I?this.I():null}get headers(){this.R.set("X-Goog-AuthUser",this.P);const e=this.A();return e&&this.R.set("Authorization",e),this.T&&this.R.set("X-Goog-Iam-Authorization-Token",this.T),this.R}}class DC{constructor(e,n,a){this.P=e,this.T=n,this.I=a}getToken(){return Promise.resolve(new CC(this.P,this.T,this.I))}start(e,n){e.enqueueRetryable((()=>n(Zt.FIRST_PARTY)))}shutdown(){}invalidateToken(){}}class rE{constructor(e){this.value=e,this.type="AppCheck",this.headers=new Map,e&&e.length>0&&this.headers.set("x-firebase-appcheck",this.value)}}class jC{constructor(e,n){this.V=n,this.forceRefresh=!1,this.appCheck=null,this.m=null,this.p=null,ut(e)&&e.settings.appCheckToken&&(this.p=e.settings.appCheckToken)}start(e,n){mt(this.o===void 0,3512);const a=c=>{c.error!=null&&he("FirebaseAppCheckTokenProvider",`Error getting App Check token; using placeholder token instead. Error: ${c.error.message}`);const f=c.token!==this.m;return this.m=c.token,he("FirebaseAppCheckTokenProvider",`Received ${f?"new":"existing"} token.`),f?n(c.token):Promise.resolve()};this.o=c=>{e.enqueueRetryable((()=>a(c)))};const o=c=>{he("FirebaseAppCheckTokenProvider","AppCheck detected"),this.appCheck=c,this.o&&this.appCheck.addTokenListener(this.o)};this.V.onInit((c=>o(c))),setTimeout((()=>{if(!this.appCheck){const c=this.V.getImmediate({optional:!0});c?o(c):he("FirebaseAppCheckTokenProvider","AppCheck not yet detected")}}),0)}getToken(){if(this.p)return Promise.resolve(new rE(this.p));const e=this.forceRefresh;return this.forceRefresh=!1,this.appCheck?this.appCheck.getToken(e).then((n=>n?(mt(typeof n.token=="string",44558,{tokenResult:n}),this.m=n.token,new rE(n.token)):null)):Promise.resolve(null)}invalidateToken(){this.forceRefresh=!0}shutdown(){this.appCheck&&this.o&&this.appCheck.removeTokenListener(this.o),this.o=void 0}}function OC(s){const e=typeof self<"u"&&(self.crypto||self.msCrypto),n=new Uint8Array(s);if(e&&typeof e.getRandomValues=="function")e.getRandomValues(n);else for(let a=0;a<s;a++)n[a]=Math.floor(256*Math.random());return n}class bp{static newId(){const e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",n=62*Math.floor(4.129032258064516);let a="";for(;a.length<20;){const o=OC(40);for(let c=0;c<o.length;++c)a.length<20&&o[c]<n&&(a+=e.charAt(o[c]%62))}return a}}function Be(s,e){return s<e?-1:s>e?1:0}function km(s,e){const n=Math.min(s.length,e.length);for(let a=0;a<n;a++){const o=s.charAt(a),c=e.charAt(a);if(o!==c)return Tm(o)===Tm(c)?Be(o,c):Tm(o)?1:-1}return Be(s.length,e.length)}const MC=55296,PC=57343;function Tm(s){const e=s.charCodeAt(0);return e>=MC&&e<=PC}function so(s,e,n){return s.length===e.length&&s.every(((a,o)=>n(a,e[o])))}const oE="__name__";class Ri{constructor(e,n,a){n===void 0?n=0:n>e.length&&Re(637,{offset:n,range:e.length}),a===void 0?a=e.length-n:a>e.length-n&&Re(1746,{length:a,range:e.length-n}),this.segments=e,this.offset=n,this.len=a}get length(){return this.len}isEqual(e){return Ri.comparator(this,e)===0}child(e){const n=this.segments.slice(this.offset,this.limit());return e instanceof Ri?e.forEach((a=>{n.push(a)})):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,a=this.limit();n<a;n++)e(this.segments[n])}toArray(){return this.segments.slice(this.offset,this.limit())}static comparator(e,n){const a=Math.min(e.length,n.length);for(let o=0;o<a;o++){const c=Ri.compareSegments(e.get(o),n.get(o));if(c!==0)return c}return Be(e.length,n.length)}static compareSegments(e,n){const a=Ri.isNumericId(e),o=Ri.isNumericId(n);return a&&!o?-1:!a&&o?1:a&&o?Ri.extractNumericId(e).compare(Ri.extractNumericId(n)):km(e,n)}static isNumericId(e){return e.startsWith("__id")&&e.endsWith("__")}static extractNumericId(e){return Ep.fromString(e.substring(4,e.length-2))}}class ct extends Ri{construct(e,n,a){return new ct(e,n,a)}canonicalString(){return this.toArray().join("/")}toString(){return this.canonicalString()}toUriEncodedString(){return this.toArray().map(encodeURIComponent).join("/")}static fromString(...e){const n=[];for(const a of e){if(a.indexOf("//")>=0)throw new pe(ee.INVALID_ARGUMENT,`Invalid segment (${a}). Paths must not contain // in them.`);n.push(...a.split("/").filter((o=>o.length>0)))}return new ct(n)}static emptyPath(){return new ct([])}}const kC=/^[_a-zA-Z][_a-zA-Z0-9]*$/;class $t extends Ri{construct(e,n,a){return new $t(e,n,a)}static isValidIdentifier(e){return kC.test(e)}canonicalString(){return this.toArray().map((e=>(e=e.replace(/\\/g,"\\\\").replace(/`/g,"\\`"),$t.isValidIdentifier(e)||(e="`"+e+"`"),e))).join(".")}toString(){return this.canonicalString()}isKeyField(){return this.length===1&&this.get(0)===oE}static keyField(){return new $t([oE])}static fromServerFormat(e){const n=[];let a="",o=0;const c=()=>{if(a.length===0)throw new pe(ee.INVALID_ARGUMENT,`Invalid field path (${e}). Paths must not be empty, begin with '.', end with '.', or contain '..'`);n.push(a),a=""};let f=!1;for(;o<e.length;){const p=e[o];if(p==="\\"){if(o+1===e.length)throw new pe(ee.INVALID_ARGUMENT,"Path has trailing escape character: "+e);const g=e[o+1];if(g!=="\\"&&g!=="."&&g!=="`")throw new pe(ee.INVALID_ARGUMENT,"Path has invalid escape sequence: "+e);a+=g,o+=2}else p==="`"?(f=!f,o++):p!=="."||f?(a+=p,o++):(c(),o++)}if(c(),f)throw new pe(ee.INVALID_ARGUMENT,"Unterminated ` in path: "+e);return new $t(n)}static emptyPath(){return new $t([])}}class Ne{constructor(e){this.path=e}static fromPath(e){return new Ne(ct.fromString(e))}static fromName(e){return new Ne(ct.fromString(e).popFirst(5))}static empty(){return new Ne(ct.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&&ct.comparator(this.path,e.path)===0}toString(){return this.path.toString()}static comparator(e,n){return ct.comparator(e.path,n.path)}static isDocumentKey(e){return e.length%2==0}static fromSegments(e){return new Ne(new ct(e.slice()))}}function Kb(s,e,n){if(!n)throw new pe(ee.INVALID_ARGUMENT,`Function ${s}() cannot be called with an empty ${e}.`)}function LC(s,e,n,a){if(e===!0&&a===!0)throw new pe(ee.INVALID_ARGUMENT,`${s} and ${n} cannot be used together.`)}function lE(s){if(!Ne.isDocumentKey(s))throw new pe(ee.INVALID_ARGUMENT,`Invalid document reference. Document references must have an even number of segments, but ${s} has ${s.length}.`)}function cE(s){if(Ne.isDocumentKey(s))throw new pe(ee.INVALID_ARGUMENT,`Invalid collection reference. Collection references must have an odd number of segments, but ${s} has ${s.length}.`)}function Qb(s){return typeof s=="object"&&s!==null&&(Object.getPrototypeOf(s)===Object.prototype||Object.getPrototypeOf(s)===null)}function Sp(s){if(s===void 0)return"undefined";if(s===null)return"null";if(typeof s=="string")return s.length>20&&(s=`${s.substring(0,20)}...`),JSON.stringify(s);if(typeof s=="number"||typeof s=="boolean")return""+s;if(typeof s=="object"){if(s instanceof Array)return"an array";{const e=(function(a){return a.constructor?a.constructor.name:null})(s);return e?`a custom ${e} object`:"an object"}}return typeof s=="function"?"a function":Re(12329,{type:typeof s})}function $b(s,e){if("_delegate"in s&&(s=s._delegate),!(s instanceof e)){if(e.name===s.constructor.name)throw new pe(ee.INVALID_ARGUMENT,"Type does not match the expected instance. Did you pass a reference from a different Firestore SDK?");{const n=Sp(s);throw new pe(ee.INVALID_ARGUMENT,`Expected type '${e.name}', but it was: ${n}`)}}return s}function Dt(s,e){const n={typeString:s};return e&&(n.value=e),n}function hc(s,e){if(!Qb(s))throw new pe(ee.INVALID_ARGUMENT,"JSON must be an object");let n;for(const a in e)if(e[a]){const o=e[a].typeString,c="value"in e[a]?{value:e[a].value}:void 0;if(!(a in s)){n=`JSON missing required field: '${a}'`;break}const f=s[a];if(o&&typeof f!==o){n=`JSON field '${a}' must be a ${o}.`;break}if(c!==void 0&&f!==c.value){n=`Expected '${a}' field to equal '${c.value}'`;break}}if(n)throw new pe(ee.INVALID_ARGUMENT,n);return!0}const uE=-62135596800,hE=1e6;class lt{static now(){return lt.fromMillis(Date.now())}static fromDate(e){return lt.fromMillis(e.getTime())}static fromMillis(e){const n=Math.floor(e/1e3),a=Math.floor((e-1e3*n)*hE);return new lt(n,a)}constructor(e,n){if(this.seconds=e,this.nanoseconds=n,n<0)throw new pe(ee.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+n);if(n>=1e9)throw new pe(ee.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+n);if(e<uE)throw new pe(ee.INVALID_ARGUMENT,"Timestamp seconds out of range: "+e);if(e>=253402300800)throw new pe(ee.INVALID_ARGUMENT,"Timestamp seconds out of range: "+e)}toDate(){return new Date(this.toMillis())}toMillis(){return 1e3*this.seconds+this.nanoseconds/hE}_compareTo(e){return this.seconds===e.seconds?Be(this.nanoseconds,e.nanoseconds):Be(this.seconds,e.seconds)}isEqual(e){return e.seconds===this.seconds&&e.nanoseconds===this.nanoseconds}toString(){return"Timestamp(seconds="+this.seconds+", nanoseconds="+this.nanoseconds+")"}toJSON(){return{type:lt._jsonSchemaVersion,seconds:this.seconds,nanoseconds:this.nanoseconds}}static fromJSON(e){if(hc(e,lt._jsonSchema))return new lt(e.seconds,e.nanoseconds)}valueOf(){const e=this.seconds-uE;return String(e).padStart(12,"0")+"."+String(this.nanoseconds).padStart(9,"0")}}lt._jsonSchemaVersion="firestore/timestamp/1.0",lt._jsonSchema={type:Dt("string",lt._jsonSchemaVersion),seconds:Dt("number"),nanoseconds:Dt("number")};class ot{static fromTimestamp(e){return new ot(e)}static min(){return new ot(new lt(0,0))}static max(){return new ot(new lt(253402300799,999999999))}constructor(e){this.timestamp=e}compareTo(e){return this.timestamp._compareTo(e.timestamp)}isEqual(e){return this.timestamp.isEqual(e.timestamp)}toMicroseconds(){return 1e6*this.timestamp.seconds+this.timestamp.nanoseconds/1e3}toString(){return"SnapshotVersion("+this.timestamp.toString()+")"}toTimestamp(){return this.timestamp}}const Zl=-1;function VC(s,e){const n=s.toTimestamp().seconds,a=s.toTimestamp().nanoseconds+1,o=ot.fromTimestamp(a===1e9?new lt(n+1,0):new lt(n,a));return new sa(o,Ne.empty(),e)}function UC(s){return new sa(s.readTime,s.key,Zl)}class sa{constructor(e,n,a){this.readTime=e,this.documentKey=n,this.largestBatchId=a}static min(){return new sa(ot.min(),Ne.empty(),Zl)}static max(){return new sa(ot.max(),Ne.empty(),Zl)}}function zC(s,e){let n=s.readTime.compareTo(e.readTime);return n!==0?n:(n=Ne.comparator(s.documentKey,e.documentKey),n!==0?n:Be(s.largestBatchId,e.largestBatchId))}const BC="The current tab is not in the required state to perform this operation. It might be necessary to refresh the browser tab.";class HC{constructor(){this.onCommittedListeners=[]}addOnCommittedListener(e){this.onCommittedListeners.push(e)}raiseOnCommittedEvent(){this.onCommittedListeners.forEach((e=>e()))}}async function Ap(s){if(s.code!==ee.FAILED_PRECONDITION||s.message!==BC)throw s;he("LocalStore","Unexpectedly lost primary lease")}class Z{constructor(e){this.nextCallback=null,this.catchCallback=null,this.result=void 0,this.error=void 0,this.isDone=!1,this.callbackAttached=!1,e((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&&Re(59440),this.callbackAttached=!0,this.isDone?this.error?this.wrapFailure(n,this.error):this.wrapSuccess(e,this.result):new Z(((a,o)=>{this.nextCallback=c=>{this.wrapSuccess(e,c).next(a,o)},this.catchCallback=c=>{this.wrapFailure(n,c).next(a,o)}}))}toPromise(){return new Promise(((e,n)=>{this.next(e,n)}))}wrapUserFunction(e){try{const n=e();return n instanceof Z?n:Z.resolve(n)}catch(n){return Z.reject(n)}}wrapSuccess(e,n){return e?this.wrapUserFunction((()=>e(n))):Z.resolve(n)}wrapFailure(e,n){return e?this.wrapUserFunction((()=>e(n))):Z.reject(n)}static resolve(e){return new Z(((n,a)=>{n(e)}))}static reject(e){return new Z(((n,a)=>{a(e)}))}static waitFor(e){return new Z(((n,a)=>{let o=0,c=0,f=!1;e.forEach((p=>{++o,p.next((()=>{++c,f&&c===o&&n()}),(g=>a(g)))})),f=!0,c===o&&n()}))}static or(e){let n=Z.resolve(!1);for(const a of e)n=n.next((o=>o?Z.resolve(o):a()));return n}static forEach(e,n){const a=[];return e.forEach(((o,c)=>{a.push(n.call(this,o,c))})),this.waitFor(a)}static mapArray(e,n){return new Z(((a,o)=>{const c=e.length,f=new Array(c);let p=0;for(let g=0;g<c;g++){const y=g;n(e[y]).next((T=>{f[y]=T,++p,p===c&&a(f)}),(T=>o(T)))}}))}static doWhile(e,n){return new Z(((a,o)=>{const c=()=>{e()===!0?n().next((()=>{c()}),o):a()};c()}))}}function qC(s){const e=s.match(/Android ([\d.]+)/i),n=e?e[1].split(".").slice(0,2).join("."):"-1";return Number(n)}function dc(s){return s.name==="IndexedDbTransactionError"}class wp{constructor(e,n){this.previousValue=e,n&&(n.sequenceNumberHandler=a=>this.ae(a),this.ue=a=>n.writeSequenceNumber(a))}ae(e){return this.previousValue=Math.max(e,this.previousValue),this.previousValue}next(){const e=++this.previousValue;return this.ue&&this.ue(e),e}}wp.ce=-1;const Np=-1;function Rp(s){return s==null}function Th(s){return s===0&&1/s==-1/0}function FC(s){return typeof s=="number"&&Number.isInteger(s)&&!Th(s)&&s<=Number.MAX_SAFE_INTEGER&&s>=Number.MIN_SAFE_INTEGER}const Wb="";function GC(s){let e="";for(let n=0;n<s.length;n++)e.length>0&&(e=dE(e)),e=YC(s.get(n),e);return dE(e)}function YC(s,e){let n=e;const a=s.length;for(let o=0;o<a;o++){const c=s.charAt(o);switch(c){case"\0":n+="";break;case Wb:n+="";break;default:n+=c}}return n}function dE(s){return s+Wb+""}function fE(s){let e=0;for(const n in s)Object.prototype.hasOwnProperty.call(s,n)&&e++;return e}function To(s,e){for(const n in s)Object.prototype.hasOwnProperty.call(s,n)&&e(n,s[n])}function Xb(s){for(const e in s)if(Object.prototype.hasOwnProperty.call(s,e))return!1;return!0}class _n{constructor(e,n){this.comparator=e,this.root=n||Kt.EMPTY}insert(e,n){return new _n(this.comparator,this.root.insert(e,n,this.comparator).copy(null,null,Kt.BLACK,null,null))}remove(e){return new _n(this.comparator,this.root.remove(e,this.comparator).copy(null,null,Kt.BLACK,null,null))}get(e){let n=this.root;for(;!n.isEmpty();){const a=this.comparator(e,n.key);if(a===0)return n.value;a<0?n=n.left:a>0&&(n=n.right)}return null}indexOf(e){let n=0,a=this.root;for(;!a.isEmpty();){const o=this.comparator(e,a.key);if(o===0)return n+a.left.size;o<0?a=a.left:(n+=a.left.size+1,a=a.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,a)=>(e(n,a),!1)))}toString(){const e=[];return this.inorderTraversal(((n,a)=>(e.push(`${n}:${a}`),!1))),`{${e.join(", ")}}`}reverseTraversal(e){return this.root.reverseTraversal(e)}getIterator(){return new Wu(this.root,null,this.comparator,!1)}getIteratorFrom(e){return new Wu(this.root,e,this.comparator,!1)}getReverseIterator(){return new Wu(this.root,null,this.comparator,!0)}getReverseIteratorFrom(e){return new Wu(this.root,e,this.comparator,!0)}}class Wu{constructor(e,n,a,o){this.isReverse=o,this.nodeStack=[];let c=1;for(;!e.isEmpty();)if(c=n?a(e.key,n):1,n&&o&&(c*=-1),c<0)e=this.isReverse?e.left:e.right;else{if(c===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 Kt{constructor(e,n,a,o,c){this.key=e,this.value=n,this.color=a??Kt.RED,this.left=o??Kt.EMPTY,this.right=c??Kt.EMPTY,this.size=this.left.size+1+this.right.size}copy(e,n,a,o,c){return new Kt(e??this.key,n??this.value,a??this.color,o??this.left,c??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,a){let o=this;const c=a(e,o.key);return o=c<0?o.copy(null,null,null,o.left.insert(e,n,a),null):c===0?o.copy(null,n,null,null,null):o.copy(null,null,null,null,o.right.insert(e,n,a)),o.fixUp()}removeMin(){if(this.left.isEmpty())return Kt.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 a,o=this;if(n(e,o.key)<0)o.left.isEmpty()||o.left.isRed()||o.left.left.isRed()||(o=o.moveRedLeft()),o=o.copy(null,null,null,o.left.remove(e,n),null);else{if(o.left.isRed()&&(o=o.rotateRight()),o.right.isEmpty()||o.right.isRed()||o.right.left.isRed()||(o=o.moveRedRight()),n(e,o.key)===0){if(o.right.isEmpty())return Kt.EMPTY;a=o.right.min(),o=o.copy(a.key,a.value,null,null,o.right.removeMin())}o=o.copy(null,null,null,null,o.right.remove(e,n))}return o.fixUp()}isRed(){return this.color}fixUp(){let e=this;return e.right.isRed()&&!e.left.isRed()&&(e=e.rotateLeft()),e.left.isRed()&&e.left.left.isRed()&&(e=e.rotateRight()),e.left.isRed()&&e.right.isRed()&&(e=e.colorFlip()),e}moveRedLeft(){let e=this.colorFlip();return e.right.left.isRed()&&(e=e.copy(null,null,null,null,e.right.rotateRight()),e=e.rotateLeft(),e=e.colorFlip()),e}moveRedRight(){let e=this.colorFlip();return e.left.left.isRed()&&(e=e.rotateRight(),e=e.colorFlip()),e}rotateLeft(){const e=this.copy(null,null,Kt.RED,null,this.right.left);return this.right.copy(null,null,this.color,e,null)}rotateRight(){const e=this.copy(null,null,Kt.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())throw Re(43730,{key:this.key,value:this.value});if(this.right.isRed())throw Re(14113,{key:this.key,value:this.value});const e=this.left.check();if(e!==this.right.check())throw Re(27949);return e+(this.isRed()?0:1)}}Kt.EMPTY=null,Kt.RED=!0,Kt.BLACK=!1;Kt.EMPTY=new class{constructor(){this.size=0}get key(){throw Re(57766)}get value(){throw Re(16141)}get color(){throw Re(16727)}get left(){throw Re(29726)}get right(){throw Re(36894)}copy(e,n,a,o,c){return this}insert(e,n,a){return new Kt(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}};class Wt{constructor(e){this.comparator=e,this.data=new _n(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,a)=>(e(n),!1)))}forEachInRange(e,n){const a=this.data.getIteratorFrom(e[0]);for(;a.hasNext();){const o=a.getNext();if(this.comparator(o.key,e[1])>=0)return;n(o.key)}}forEachWhile(e,n){let a;for(a=n!==void 0?this.data.getIteratorFrom(n):this.data.getIterator();a.hasNext();)if(!e(a.getNext().key))return}firstAfterOrEqual(e){const n=this.data.getIteratorFrom(e);return n.hasNext()?n.getNext().key:null}getIterator(){return new mE(this.data.getIterator())}getIteratorFrom(e){return new mE(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((a=>{n=n.add(a)})),n}isEqual(e){if(!(e instanceof Wt)||this.size!==e.size)return!1;const n=this.data.getIterator(),a=e.data.getIterator();for(;n.hasNext();){const o=n.getNext().key,c=a.getNext().key;if(this.comparator(o,c)!==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 Wt(this.comparator);return n.data=e,n}}class mE{constructor(e){this.iter=e}getNext(){return this.iter.getNext().key}hasNext(){return this.iter.hasNext()}}class si{constructor(e){this.fields=e,e.sort($t.comparator)}static empty(){return new si([])}unionWith(e){let n=new Wt($t.comparator);for(const a of this.fields)n=n.add(a);for(const a of e)n=n.add(a);return new si(n.toArray())}covers(e){for(const n of this.fields)if(n.isPrefixOf(e))return!0;return!1}isEqual(e){return so(this.fields,e.fields,((n,a)=>n.isEqual(a)))}}class KC extends Error{constructor(){super(...arguments),this.name="Base64DecodeError"}}class Mi{constructor(e){this.binaryString=e}static fromBase64String(e){const n=(function(o){try{return atob(o)}catch(c){throw typeof DOMException<"u"&&c instanceof DOMException?new KC("Invalid base64 string: "+c):c}})(e);return new Mi(n)}static fromUint8Array(e){const n=(function(o){let c="";for(let f=0;f<o.length;++f)c+=String.fromCharCode(o[f]);return c})(e);return new Mi(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 a=new Uint8Array(n.length);for(let o=0;o<n.length;o++)a[o]=n.charCodeAt(o);return a})(this.binaryString)}approximateByteSize(){return 2*this.binaryString.length}compareTo(e){return Be(this.binaryString,e.binaryString)}isEqual(e){return this.binaryString===e.binaryString}}Mi.EMPTY_BYTE_STRING=new Mi("");const QC=new RegExp(/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(?:\.(\d+))?Z$/);function Ja(s){if(mt(!!s,39018),typeof s=="string"){let e=0;const n=QC.exec(s);if(mt(!!n,46558,{timestamp:s}),n[1]){let o=n[1];o=(o+"000000000").substr(0,9),e=Number(o)}const a=new Date(s);return{seconds:Math.floor(a.getTime()/1e3),nanos:e}}return{seconds:Qt(s.seconds),nanos:Qt(s.nanos)}}function Qt(s){return typeof s=="number"?s:typeof s=="string"?Number(s):0}function ao(s){return typeof s=="string"?Mi.fromBase64String(s):Mi.fromUint8Array(s)}const Jb="server_timestamp",Zb="__type__",eS="__previous_value__",tS="__local_write_time__";function xp(s){return(s?.mapValue?.fields||{})[Zb]?.stringValue===Jb}function Ip(s){const e=s.mapValue.fields[eS];return xp(e)?Ip(e):e}function bh(s){const e=Ja(s.mapValue.fields[tS].timestampValue);return new lt(e.seconds,e.nanos)}class $C{constructor(e,n,a,o,c,f,p,g,y,T,b){this.databaseId=e,this.appId=n,this.persistenceKey=a,this.host=o,this.ssl=c,this.forceLongPolling=f,this.autoDetectLongPolling=p,this.longPollingOptions=g,this.useFetchStreams=y,this.isUsingEmulator=T,this.apiKey=b}}const Sh="(default)";class Ah{constructor(e,n){this.projectId=e,this.database=n||Sh}static empty(){return new Ah("","")}get isDefaultDatabase(){return this.database===Sh}isEqual(e){return e instanceof Ah&&e.projectId===this.projectId&&e.database===this.database}}function WC(s,e){if(!Object.prototype.hasOwnProperty.apply(s.options,["projectId"]))throw new pe(ee.INVALID_ARGUMENT,'"projectId" not provided in firebase.initializeApp.');return new Ah(s.options.projectId,e)}const nS="__type__",XC="__max__",Xu={mapValue:{}},iS="__vector__",Lm="value";function Za(s){return"nullValue"in s?0:"booleanValue"in s?1:"integerValue"in s||"doubleValue"in s?2:"timestampValue"in s?3:"stringValue"in s?5:"bytesValue"in s?6:"referenceValue"in s?7:"geoPointValue"in s?8:"arrayValue"in s?9:"mapValue"in s?xp(s)?4:ZC(s)?9007199254740991:JC(s)?10:11:Re(28295,{value:s})}function Pi(s,e){if(s===e)return!0;const n=Za(s);if(n!==Za(e))return!1;switch(n){case 0:case 9007199254740991:return!0;case 1:return s.booleanValue===e.booleanValue;case 4:return bh(s).isEqual(bh(e));case 3:return(function(o,c){if(typeof o.timestampValue=="string"&&typeof c.timestampValue=="string"&&o.timestampValue.length===c.timestampValue.length)return o.timestampValue===c.timestampValue;const f=Ja(o.timestampValue),p=Ja(c.timestampValue);return f.seconds===p.seconds&&f.nanos===p.nanos})(s,e);case 5:return s.stringValue===e.stringValue;case 6:return(function(o,c){return ao(o.bytesValue).isEqual(ao(c.bytesValue))})(s,e);case 7:return s.referenceValue===e.referenceValue;case 8:return(function(o,c){return Qt(o.geoPointValue.latitude)===Qt(c.geoPointValue.latitude)&&Qt(o.geoPointValue.longitude)===Qt(c.geoPointValue.longitude)})(s,e);case 2:return(function(o,c){if("integerValue"in o&&"integerValue"in c)return Qt(o.integerValue)===Qt(c.integerValue);if("doubleValue"in o&&"doubleValue"in c){const f=Qt(o.doubleValue),p=Qt(c.doubleValue);return f===p?Th(f)===Th(p):isNaN(f)&&isNaN(p)}return!1})(s,e);case 9:return so(s.arrayValue.values||[],e.arrayValue.values||[],Pi);case 10:case 11:return(function(o,c){const f=o.mapValue.fields||{},p=c.mapValue.fields||{};if(fE(f)!==fE(p))return!1;for(const g in f)if(f.hasOwnProperty(g)&&(p[g]===void 0||!Pi(f[g],p[g])))return!1;return!0})(s,e);default:return Re(52216,{left:s})}}function ec(s,e){return(s.values||[]).find((n=>Pi(n,e)))!==void 0}function ro(s,e){if(s===e)return 0;const n=Za(s),a=Za(e);if(n!==a)return Be(n,a);switch(n){case 0:case 9007199254740991:return 0;case 1:return Be(s.booleanValue,e.booleanValue);case 2:return(function(c,f){const p=Qt(c.integerValue||c.doubleValue),g=Qt(f.integerValue||f.doubleValue);return p<g?-1:p>g?1:p===g?0:isNaN(p)?isNaN(g)?0:-1:1})(s,e);case 3:return pE(s.timestampValue,e.timestampValue);case 4:return pE(bh(s),bh(e));case 5:return km(s.stringValue,e.stringValue);case 6:return(function(c,f){const p=ao(c),g=ao(f);return p.compareTo(g)})(s.bytesValue,e.bytesValue);case 7:return(function(c,f){const p=c.split("/"),g=f.split("/");for(let y=0;y<p.length&&y<g.length;y++){const T=Be(p[y],g[y]);if(T!==0)return T}return Be(p.length,g.length)})(s.referenceValue,e.referenceValue);case 8:return(function(c,f){const p=Be(Qt(c.latitude),Qt(f.latitude));return p!==0?p:Be(Qt(c.longitude),Qt(f.longitude))})(s.geoPointValue,e.geoPointValue);case 9:return gE(s.arrayValue,e.arrayValue);case 10:return(function(c,f){const p=c.fields||{},g=f.fields||{},y=p[Lm]?.arrayValue,T=g[Lm]?.arrayValue,b=Be(y?.values?.length||0,T?.values?.length||0);return b!==0?b:gE(y,T)})(s.mapValue,e.mapValue);case 11:return(function(c,f){if(c===Xu.mapValue&&f===Xu.mapValue)return 0;if(c===Xu.mapValue)return 1;if(f===Xu.mapValue)return-1;const p=c.fields||{},g=Object.keys(p),y=f.fields||{},T=Object.keys(y);g.sort(),T.sort();for(let b=0;b<g.length&&b<T.length;++b){const N=km(g[b],T[b]);if(N!==0)return N;const P=ro(p[g[b]],y[T[b]]);if(P!==0)return P}return Be(g.length,T.length)})(s.mapValue,e.mapValue);default:throw Re(23264,{he:n})}}function pE(s,e){if(typeof s=="string"&&typeof e=="string"&&s.length===e.length)return Be(s,e);const n=Ja(s),a=Ja(e),o=Be(n.seconds,a.seconds);return o!==0?o:Be(n.nanos,a.nanos)}function gE(s,e){const n=s.values||[],a=e.values||[];for(let o=0;o<n.length&&o<a.length;++o){const c=ro(n[o],a[o]);if(c)return c}return Be(n.length,a.length)}function oo(s){return Vm(s)}function Vm(s){return"nullValue"in s?"null":"booleanValue"in s?""+s.booleanValue:"integerValue"in s?""+s.integerValue:"doubleValue"in s?""+s.doubleValue:"timestampValue"in s?(function(n){const a=Ja(n);return`time(${a.seconds},${a.nanos})`})(s.timestampValue):"stringValue"in s?s.stringValue:"bytesValue"in s?(function(n){return ao(n).toBase64()})(s.bytesValue):"referenceValue"in s?(function(n){return Ne.fromName(n).toString()})(s.referenceValue):"geoPointValue"in s?(function(n){return`geo(${n.latitude},${n.longitude})`})(s.geoPointValue):"arrayValue"in s?(function(n){let a="[",o=!0;for(const c of n.values||[])o?o=!1:a+=",",a+=Vm(c);return a+"]"})(s.arrayValue):"mapValue"in s?(function(n){const a=Object.keys(n.fields||{}).sort();let o="{",c=!0;for(const f of a)c?c=!1:o+=",",o+=`${f}:${Vm(n.fields[f])}`;return o+"}"})(s.mapValue):Re(61005,{value:s})}function lh(s){switch(Za(s)){case 0:case 1:return 4;case 2:return 8;case 3:case 8:return 16;case 4:const e=Ip(s);return e?16+lh(e):16;case 5:return 2*s.stringValue.length;case 6:return ao(s.bytesValue).approximateByteSize();case 7:return s.referenceValue.length;case 9:return(function(a){return(a.values||[]).reduce(((o,c)=>o+lh(c)),0)})(s.arrayValue);case 10:case 11:return(function(a){let o=0;return To(a.fields,((c,f)=>{o+=c.length+lh(f)})),o})(s.mapValue);default:throw Re(13486,{value:s})}}function Um(s){return!!s&&"integerValue"in s}function Cp(s){return!!s&&"arrayValue"in s}function ch(s){return!!s&&"mapValue"in s}function JC(s){return(s?.mapValue?.fields||{})[nS]?.stringValue===iS}function Bl(s){if(s.geoPointValue)return{geoPointValue:{...s.geoPointValue}};if(s.timestampValue&&typeof s.timestampValue=="object")return{timestampValue:{...s.timestampValue}};if(s.mapValue){const e={mapValue:{fields:{}}};return To(s.mapValue.fields,((n,a)=>e.mapValue.fields[n]=Bl(a))),e}if(s.arrayValue){const e={arrayValue:{values:[]}};for(let n=0;n<(s.arrayValue.values||[]).length;++n)e.arrayValue.values[n]=Bl(s.arrayValue.values[n]);return e}return{...s}}function ZC(s){return(((s.mapValue||{}).fields||{}).__type__||{}).stringValue===XC}class ti{constructor(e){this.value=e}static empty(){return new ti({mapValue:{}})}field(e){if(e.isEmpty())return this.value;{let n=this.value;for(let a=0;a<e.length-1;++a)if(n=(n.mapValue.fields||{})[e.get(a)],!ch(n))return null;return n=(n.mapValue.fields||{})[e.lastSegment()],n||null}}set(e,n){this.getFieldsMap(e.popLast())[e.lastSegment()]=Bl(n)}setAll(e){let n=$t.emptyPath(),a={},o=[];e.forEach(((f,p)=>{if(!n.isImmediateParentOf(p)){const g=this.getFieldsMap(n);this.applyChanges(g,a,o),a={},o=[],n=p.popLast()}f?a[p.lastSegment()]=Bl(f):o.push(p.lastSegment())}));const c=this.getFieldsMap(n);this.applyChanges(c,a,o)}delete(e){const n=this.field(e.popLast());ch(n)&&n.mapValue.fields&&delete n.mapValue.fields[e.lastSegment()]}isEqual(e){return Pi(this.value,e.value)}getFieldsMap(e){let n=this.value;n.mapValue.fields||(n.mapValue={fields:{}});for(let a=0;a<e.length;++a){let o=n.mapValue.fields[e.get(a)];ch(o)&&o.mapValue.fields||(o={mapValue:{fields:{}}},n.mapValue.fields[e.get(a)]=o),n=o}return n.mapValue.fields}applyChanges(e,n,a){To(n,((o,c)=>e[o]=c));for(const o of a)delete e[o]}clone(){return new ti(Bl(this.value))}}function sS(s){const e=[];return To(s.fields,((n,a)=>{const o=new $t([n]);if(ch(a)){const c=sS(a.mapValue).fields;if(c.length===0)e.push(o);else for(const f of c)e.push(o.child(f))}else e.push(o)})),new si(e)}class ei{constructor(e,n,a,o,c,f,p){this.key=e,this.documentType=n,this.version=a,this.readTime=o,this.createTime=c,this.data=f,this.documentState=p}static newInvalidDocument(e){return new ei(e,0,ot.min(),ot.min(),ot.min(),ti.empty(),0)}static newFoundDocument(e,n,a,o){return new ei(e,1,n,ot.min(),a,o,0)}static newNoDocument(e,n){return new ei(e,2,n,ot.min(),ot.min(),ti.empty(),0)}static newUnknownDocument(e,n){return new ei(e,3,n,ot.min(),ot.min(),ti.empty(),2)}convertToFoundDocument(e,n){return!this.createTime.isEqual(ot.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=ti.empty(),this.documentState=0,this}convertToUnknownDocument(e){return this.version=e,this.documentType=3,this.data=ti.empty(),this.documentState=2,this}setHasCommittedMutations(){return this.documentState=2,this}setHasLocalMutations(){return this.documentState=1,this.version=ot.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 ei&&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 ei(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}})`}}class wh{constructor(e,n){this.position=e,this.inclusive=n}}function _E(s,e,n){let a=0;for(let o=0;o<s.position.length;o++){const c=e[o],f=s.position[o];if(c.field.isKeyField()?a=Ne.comparator(Ne.fromName(f.referenceValue),n.key):a=ro(f,n.data.field(c.field)),c.dir==="desc"&&(a*=-1),a!==0)break}return a}function yE(s,e){if(s===null)return e===null;if(e===null||s.inclusive!==e.inclusive||s.position.length!==e.position.length)return!1;for(let n=0;n<s.position.length;n++)if(!Pi(s.position[n],e.position[n]))return!1;return!0}class Nh{constructor(e,n="asc"){this.field=e,this.dir=n}}function e2(s,e){return s.dir===e.dir&&s.field.isEqual(e.field)}class aS{}class Ut extends aS{constructor(e,n,a){super(),this.field=e,this.op=n,this.value=a}static create(e,n,a){return e.isKeyField()?n==="in"||n==="not-in"?this.createKeyFieldInFilter(e,n,a):new n2(e,n,a):n==="array-contains"?new a2(e,a):n==="in"?new r2(e,a):n==="not-in"?new o2(e,a):n==="array-contains-any"?new l2(e,a):new Ut(e,n,a)}static createKeyFieldInFilter(e,n,a){return n==="in"?new i2(e,a):new s2(e,a)}matches(e){const n=e.data.field(this.field);return this.op==="!="?n!==null&&n.nullValue===void 0&&this.matchesComparison(ro(n,this.value)):n!==null&&Za(this.value)===Za(n)&&this.matchesComparison(ro(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 Re(47266,{operator:this.op})}}isInequality(){return["<","<=",">",">=","!=","not-in"].indexOf(this.op)>=0}getFlattenedFilters(){return[this]}getFilters(){return[this]}}class aa extends aS{constructor(e,n){super(),this.filters=e,this.op=n,this.Pe=null}static create(e,n){return new aa(e,n)}matches(e){return rS(this)?this.filters.find((n=>!n.matches(e)))===void 0:this.filters.find((n=>n.matches(e)))!==void 0}getFlattenedFilters(){return this.Pe!==null||(this.Pe=this.filters.reduce(((e,n)=>e.concat(n.getFlattenedFilters())),[])),this.Pe}getFilters(){return Object.assign([],this.filters)}}function rS(s){return s.op==="and"}function oS(s){return t2(s)&&rS(s)}function t2(s){for(const e of s.filters)if(e instanceof aa)return!1;return!0}function zm(s){if(s instanceof Ut)return s.field.canonicalString()+s.op.toString()+oo(s.value);if(oS(s))return s.filters.map((e=>zm(e))).join(",");{const e=s.filters.map((n=>zm(n))).join(",");return`${s.op}(${e})`}}function lS(s,e){return s instanceof Ut?(function(a,o){return o instanceof Ut&&a.op===o.op&&a.field.isEqual(o.field)&&Pi(a.value,o.value)})(s,e):s instanceof aa?(function(a,o){return o instanceof aa&&a.op===o.op&&a.filters.length===o.filters.length?a.filters.reduce(((c,f,p)=>c&&lS(f,o.filters[p])),!0):!1})(s,e):void Re(19439)}function cS(s){return s instanceof Ut?(function(n){return`${n.field.canonicalString()} ${n.op} ${oo(n.value)}`})(s):s instanceof aa?(function(n){return n.op.toString()+" {"+n.getFilters().map(cS).join(" ,")+"}"})(s):"Filter"}class n2 extends Ut{constructor(e,n,a){super(e,n,a),this.key=Ne.fromName(a.referenceValue)}matches(e){const n=Ne.comparator(e.key,this.key);return this.matchesComparison(n)}}class i2 extends Ut{constructor(e,n){super(e,"in",n),this.keys=uS("in",n)}matches(e){return this.keys.some((n=>n.isEqual(e.key)))}}class s2 extends Ut{constructor(e,n){super(e,"not-in",n),this.keys=uS("not-in",n)}matches(e){return!this.keys.some((n=>n.isEqual(e.key)))}}function uS(s,e){return(e.arrayValue?.values||[]).map((n=>Ne.fromName(n.referenceValue)))}class a2 extends Ut{constructor(e,n){super(e,"array-contains",n)}matches(e){const n=e.data.field(this.field);return Cp(n)&&ec(n.arrayValue,this.value)}}class r2 extends Ut{constructor(e,n){super(e,"in",n)}matches(e){const n=e.data.field(this.field);return n!==null&&ec(this.value.arrayValue,n)}}class o2 extends Ut{constructor(e,n){super(e,"not-in",n)}matches(e){if(ec(this.value.arrayValue,{nullValue:"NULL_VALUE"}))return!1;const n=e.data.field(this.field);return n!==null&&n.nullValue===void 0&&!ec(this.value.arrayValue,n)}}class l2 extends Ut{constructor(e,n){super(e,"array-contains-any",n)}matches(e){const n=e.data.field(this.field);return!(!Cp(n)||!n.arrayValue.values)&&n.arrayValue.values.some((a=>ec(this.value.arrayValue,a)))}}class c2{constructor(e,n=null,a=[],o=[],c=null,f=null,p=null){this.path=e,this.collectionGroup=n,this.orderBy=a,this.filters=o,this.limit=c,this.startAt=f,this.endAt=p,this.Te=null}}function vE(s,e=null,n=[],a=[],o=null,c=null,f=null){return new c2(s,e,n,a,o,c,f)}function Dp(s){const e=Ze(s);if(e.Te===null){let n=e.path.canonicalString();e.collectionGroup!==null&&(n+="|cg:"+e.collectionGroup),n+="|f:",n+=e.filters.map((a=>zm(a))).join(","),n+="|ob:",n+=e.orderBy.map((a=>(function(c){return c.field.canonicalString()+c.dir})(a))).join(","),Rp(e.limit)||(n+="|l:",n+=e.limit),e.startAt&&(n+="|lb:",n+=e.startAt.inclusive?"b:":"a:",n+=e.startAt.position.map((a=>oo(a))).join(",")),e.endAt&&(n+="|ub:",n+=e.endAt.inclusive?"a:":"b:",n+=e.endAt.position.map((a=>oo(a))).join(",")),e.Te=n}return e.Te}function jp(s,e){if(s.limit!==e.limit||s.orderBy.length!==e.orderBy.length)return!1;for(let n=0;n<s.orderBy.length;n++)if(!e2(s.orderBy[n],e.orderBy[n]))return!1;if(s.filters.length!==e.filters.length)return!1;for(let n=0;n<s.filters.length;n++)if(!lS(s.filters[n],e.filters[n]))return!1;return s.collectionGroup===e.collectionGroup&&!!s.path.isEqual(e.path)&&!!yE(s.startAt,e.startAt)&&yE(s.endAt,e.endAt)}class Kh{constructor(e,n=null,a=[],o=[],c=null,f="F",p=null,g=null){this.path=e,this.collectionGroup=n,this.explicitOrderBy=a,this.filters=o,this.limit=c,this.limitType=f,this.startAt=p,this.endAt=g,this.Ie=null,this.Ee=null,this.Re=null,this.startAt,this.endAt}}function u2(s,e,n,a,o,c,f,p){return new Kh(s,e,n,a,o,c,f,p)}function h2(s){return new Kh(s)}function EE(s){return s.filters.length===0&&s.limit===null&&s.startAt==null&&s.endAt==null&&(s.explicitOrderBy.length===0||s.explicitOrderBy.length===1&&s.explicitOrderBy[0].field.isKeyField())}function d2(s){return Ne.isDocumentKey(s.path)&&s.collectionGroup===null&&s.filters.length===0}function f2(s){return s.collectionGroup!==null}function Hl(s){const e=Ze(s);if(e.Ie===null){e.Ie=[];const n=new Set;for(const c of e.explicitOrderBy)e.Ie.push(c),n.add(c.field.canonicalString());const a=e.explicitOrderBy.length>0?e.explicitOrderBy[e.explicitOrderBy.length-1].dir:"asc";(function(f){let p=new Wt($t.comparator);return f.filters.forEach((g=>{g.getFlattenedFilters().forEach((y=>{y.isInequality()&&(p=p.add(y.field))}))})),p})(e).forEach((c=>{n.has(c.canonicalString())||c.isKeyField()||e.Ie.push(new Nh(c,a))})),n.has($t.keyField().canonicalString())||e.Ie.push(new Nh($t.keyField(),a))}return e.Ie}function Ka(s){const e=Ze(s);return e.Ee||(e.Ee=m2(e,Hl(s))),e.Ee}function m2(s,e){if(s.limitType==="F")return vE(s.path,s.collectionGroup,e,s.filters,s.limit,s.startAt,s.endAt);{e=e.map((o=>{const c=o.dir==="desc"?"asc":"desc";return new Nh(o.field,c)}));const n=s.endAt?new wh(s.endAt.position,s.endAt.inclusive):null,a=s.startAt?new wh(s.startAt.position,s.startAt.inclusive):null;return vE(s.path,s.collectionGroup,e,s.filters,s.limit,n,a)}}function Bm(s,e,n){return new Kh(s.path,s.collectionGroup,s.explicitOrderBy.slice(),s.filters.slice(),e,n,s.startAt,s.endAt)}function hS(s,e){return jp(Ka(s),Ka(e))&&s.limitType===e.limitType}function dS(s){return`${Dp(Ka(s))}|lt:${s.limitType}`}function Cl(s){return`Query(target=${(function(n){let a=n.path.canonicalString();return n.collectionGroup!==null&&(a+=" collectionGroup="+n.collectionGroup),n.filters.length>0&&(a+=`, filters: [${n.filters.map((o=>cS(o))).join(", ")}]`),Rp(n.limit)||(a+=", limit: "+n.limit),n.orderBy.length>0&&(a+=`, orderBy: [${n.orderBy.map((o=>(function(f){return`${f.field.canonicalString()} (${f.dir})`})(o))).join(", ")}]`),n.startAt&&(a+=", startAt: ",a+=n.startAt.inclusive?"b:":"a:",a+=n.startAt.position.map((o=>oo(o))).join(",")),n.endAt&&(a+=", endAt: ",a+=n.endAt.inclusive?"a:":"b:",a+=n.endAt.position.map((o=>oo(o))).join(",")),`Target(${a})`})(Ka(s))}; limitType=${s.limitType})`}function Op(s,e){return e.isFoundDocument()&&(function(a,o){const c=o.key.path;return a.collectionGroup!==null?o.key.hasCollectionId(a.collectionGroup)&&a.path.isPrefixOf(c):Ne.isDocumentKey(a.path)?a.path.isEqual(c):a.path.isImmediateParentOf(c)})(s,e)&&(function(a,o){for(const c of Hl(a))if(!c.field.isKeyField()&&o.data.field(c.field)===null)return!1;return!0})(s,e)&&(function(a,o){for(const c of a.filters)if(!c.matches(o))return!1;return!0})(s,e)&&(function(a,o){return!(a.startAt&&!(function(f,p,g){const y=_E(f,p,g);return f.inclusive?y<=0:y<0})(a.startAt,Hl(a),o)||a.endAt&&!(function(f,p,g){const y=_E(f,p,g);return f.inclusive?y>=0:y>0})(a.endAt,Hl(a),o))})(s,e)}function p2(s){return(e,n)=>{let a=!1;for(const o of Hl(s)){const c=g2(o,e,n);if(c!==0)return c;a=a||o.field.isKeyField()}return 0}}function g2(s,e,n){const a=s.field.isKeyField()?Ne.comparator(e.key,n.key):(function(c,f,p){const g=f.data.field(c),y=p.data.field(c);return g!==null&&y!==null?ro(g,y):Re(42886)})(s.field,e,n);switch(s.dir){case"asc":return a;case"desc":return-1*a;default:return Re(19790,{direction:s.dir})}}class tr{constructor(e,n){this.mapKeyFn=e,this.equalsFn=n,this.inner={},this.innerSize=0}get(e){const n=this.mapKeyFn(e),a=this.inner[n];if(a!==void 0){for(const[o,c]of a)if(this.equalsFn(o,e))return c}}has(e){return this.get(e)!==void 0}set(e,n){const a=this.mapKeyFn(e),o=this.inner[a];if(o===void 0)return this.inner[a]=[[e,n]],void this.innerSize++;for(let c=0;c<o.length;c++)if(this.equalsFn(o[c][0],e))return void(o[c]=[e,n]);o.push([e,n]),this.innerSize++}delete(e){const n=this.mapKeyFn(e),a=this.inner[n];if(a===void 0)return!1;for(let o=0;o<a.length;o++)if(this.equalsFn(a[o][0],e))return a.length===1?delete this.inner[n]:a.splice(o,1),this.innerSize--,!0;return!1}forEach(e){To(this.inner,((n,a)=>{for(const[o,c]of a)e(o,c)}))}isEmpty(){return Xb(this.inner)}size(){return this.innerSize}}const _2=new _n(Ne.comparator);function Rh(){return _2}const fS=new _n(Ne.comparator);function Ju(...s){let e=fS;for(const n of s)e=e.insert(n.key,n);return e}function mS(s){let e=fS;return s.forEach(((n,a)=>e=e.insert(n,a.overlayedDocument))),e}function Fa(){return ql()}function pS(){return ql()}function ql(){return new tr((s=>s.toString()),((s,e)=>s.isEqual(e)))}const y2=new _n(Ne.comparator),v2=new Wt(Ne.comparator);function en(...s){let e=v2;for(const n of s)e=e.add(n);return e}const E2=new Wt(Be);function T2(){return E2}function Mp(s,e){if(s.useProto3Json){if(isNaN(e))return{doubleValue:"NaN"};if(e===1/0)return{doubleValue:"Infinity"};if(e===-1/0)return{doubleValue:"-Infinity"}}return{doubleValue:Th(e)?"-0":e}}function gS(s){return{integerValue:""+s}}function b2(s,e){return FC(e)?gS(e):Mp(s,e)}class Qh{constructor(){this._=void 0}}function S2(s,e,n){return s instanceof xh?(function(o,c){const f={fields:{[Zb]:{stringValue:Jb},[tS]:{timestampValue:{seconds:o.seconds,nanos:o.nanoseconds}}}};return c&&xp(c)&&(c=Ip(c)),c&&(f.fields[eS]=c),{mapValue:f}})(n,e):s instanceof tc?yS(s,e):s instanceof nc?vS(s,e):(function(o,c){const f=_S(o,c),p=TE(f)+TE(o.Ae);return Um(f)&&Um(o.Ae)?gS(p):Mp(o.serializer,p)})(s,e)}function A2(s,e,n){return s instanceof tc?yS(s,e):s instanceof nc?vS(s,e):n}function _S(s,e){return s instanceof Ih?(function(a){return Um(a)||(function(c){return!!c&&"doubleValue"in c})(a)})(e)?e:{integerValue:0}:null}class xh extends Qh{}class tc extends Qh{constructor(e){super(),this.elements=e}}function yS(s,e){const n=ES(e);for(const a of s.elements)n.some((o=>Pi(o,a)))||n.push(a);return{arrayValue:{values:n}}}class nc extends Qh{constructor(e){super(),this.elements=e}}function vS(s,e){let n=ES(e);for(const a of s.elements)n=n.filter((o=>!Pi(o,a)));return{arrayValue:{values:n}}}class Ih extends Qh{constructor(e,n){super(),this.serializer=e,this.Ae=n}}function TE(s){return Qt(s.integerValue||s.doubleValue)}function ES(s){return Cp(s)&&s.arrayValue.values?s.arrayValue.values.slice():[]}function w2(s,e){return s.field.isEqual(e.field)&&(function(a,o){return a instanceof tc&&o instanceof tc||a instanceof nc&&o instanceof nc?so(a.elements,o.elements,Pi):a instanceof Ih&&o instanceof Ih?Pi(a.Ae,o.Ae):a instanceof xh&&o instanceof xh})(s.transform,e.transform)}class N2{constructor(e,n){this.version=e,this.transformResults=n}}class ls{constructor(e,n){this.updateTime=e,this.exists=n}static none(){return new ls}static exists(e){return new ls(void 0,e)}static updateTime(e){return new ls(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 uh(s,e){return s.updateTime!==void 0?e.isFoundDocument()&&e.version.isEqual(s.updateTime):s.exists===void 0||s.exists===e.isFoundDocument()}class $h{}function TS(s,e){if(!s.hasLocalMutations||e&&e.fields.length===0)return null;if(e===null)return s.isNoDocument()?new SS(s.key,ls.none()):new fc(s.key,s.data,ls.none());{const n=s.data,a=ti.empty();let o=new Wt($t.comparator);for(let c of e.fields)if(!o.has(c)){let f=n.field(c);f===null&&c.length>1&&(c=c.popLast(),f=n.field(c)),f===null?a.delete(c):a.set(c,f),o=o.add(c)}return new nr(s.key,a,new si(o.toArray()),ls.none())}}function R2(s,e,n){s instanceof fc?(function(o,c,f){const p=o.value.clone(),g=SE(o.fieldTransforms,c,f.transformResults);p.setAll(g),c.convertToFoundDocument(f.version,p).setHasCommittedMutations()})(s,e,n):s instanceof nr?(function(o,c,f){if(!uh(o.precondition,c))return void c.convertToUnknownDocument(f.version);const p=SE(o.fieldTransforms,c,f.transformResults),g=c.data;g.setAll(bS(o)),g.setAll(p),c.convertToFoundDocument(f.version,g).setHasCommittedMutations()})(s,e,n):(function(o,c,f){c.convertToNoDocument(f.version).setHasCommittedMutations()})(0,e,n)}function Fl(s,e,n,a){return s instanceof fc?(function(c,f,p,g){if(!uh(c.precondition,f))return p;const y=c.value.clone(),T=AE(c.fieldTransforms,g,f);return y.setAll(T),f.convertToFoundDocument(f.version,y).setHasLocalMutations(),null})(s,e,n,a):s instanceof nr?(function(c,f,p,g){if(!uh(c.precondition,f))return p;const y=AE(c.fieldTransforms,g,f),T=f.data;return T.setAll(bS(c)),T.setAll(y),f.convertToFoundDocument(f.version,T).setHasLocalMutations(),p===null?null:p.unionWith(c.fieldMask.fields).unionWith(c.fieldTransforms.map((b=>b.field)))})(s,e,n,a):(function(c,f,p){return uh(c.precondition,f)?(f.convertToNoDocument(f.version).setHasLocalMutations(),null):p})(s,e,n)}function x2(s,e){let n=null;for(const a of s.fieldTransforms){const o=e.data.field(a.field),c=_S(a.transform,o||null);c!=null&&(n===null&&(n=ti.empty()),n.set(a.field,c))}return n||null}function bE(s,e){return s.type===e.type&&!!s.key.isEqual(e.key)&&!!s.precondition.isEqual(e.precondition)&&!!(function(a,o){return a===void 0&&o===void 0||!(!a||!o)&&so(a,o,((c,f)=>w2(c,f)))})(s.fieldTransforms,e.fieldTransforms)&&(s.type===0?s.value.isEqual(e.value):s.type!==1||s.data.isEqual(e.data)&&s.fieldMask.isEqual(e.fieldMask))}class fc extends $h{constructor(e,n,a,o=[]){super(),this.key=e,this.value=n,this.precondition=a,this.fieldTransforms=o,this.type=0}getFieldMask(){return null}}class nr extends $h{constructor(e,n,a,o,c=[]){super(),this.key=e,this.data=n,this.fieldMask=a,this.precondition=o,this.fieldTransforms=c,this.type=1}getFieldMask(){return this.fieldMask}}function bS(s){const e=new Map;return s.fieldMask.fields.forEach((n=>{if(!n.isEmpty()){const a=s.data.field(n);e.set(n,a)}})),e}function SE(s,e,n){const a=new Map;mt(s.length===n.length,32656,{Ve:n.length,de:s.length});for(let o=0;o<n.length;o++){const c=s[o],f=c.transform,p=e.data.field(c.field);a.set(c.field,A2(f,p,n[o]))}return a}function AE(s,e,n){const a=new Map;for(const o of s){const c=o.transform,f=n.data.field(o.field);a.set(o.field,S2(c,f,e))}return a}class SS extends $h{constructor(e,n){super(),this.key=e,this.precondition=n,this.type=2,this.fieldTransforms=[]}getFieldMask(){return null}}class I2 extends $h{constructor(e,n){super(),this.key=e,this.precondition=n,this.type=3,this.fieldTransforms=[]}getFieldMask(){return null}}class C2{constructor(e,n,a,o){this.batchId=e,this.localWriteTime=n,this.baseMutations=a,this.mutations=o}applyToRemoteDocument(e,n){const a=n.mutationResults;for(let o=0;o<this.mutations.length;o++){const c=this.mutations[o];c.key.isEqual(e.key)&&R2(c,e,a[o])}}applyToLocalView(e,n){for(const a of this.baseMutations)a.key.isEqual(e.key)&&(n=Fl(a,e,n,this.localWriteTime));for(const a of this.mutations)a.key.isEqual(e.key)&&(n=Fl(a,e,n,this.localWriteTime));return n}applyToLocalDocumentSet(e,n){const a=pS();return this.mutations.forEach((o=>{const c=e.get(o.key),f=c.overlayedDocument;let p=this.applyToLocalView(f,c.mutatedFields);p=n.has(o.key)?null:p;const g=TS(f,p);g!==null&&a.set(o.key,g),f.isValidDocument()||f.convertToNoDocument(ot.min())})),a}keys(){return this.mutations.reduce(((e,n)=>e.add(n.key)),en())}isEqual(e){return this.batchId===e.batchId&&so(this.mutations,e.mutations,((n,a)=>bE(n,a)))&&so(this.baseMutations,e.baseMutations,((n,a)=>bE(n,a)))}}class Pp{constructor(e,n,a,o){this.batch=e,this.commitVersion=n,this.mutationResults=a,this.docVersions=o}static from(e,n,a){mt(e.mutations.length===a.length,58842,{me:e.mutations.length,fe:a.length});let o=(function(){return y2})();const c=e.mutations;for(let f=0;f<c.length;f++)o=o.insert(c[f].key,a[f].version);return new Pp(e,n,a,o)}}class D2{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{ largestBatchId: ${this.largestBatchId}, mutation: ${this.mutation.toString()} }`}}var It,Pe;function j2(s){switch(s){case ee.OK:return Re(64938);case ee.CANCELLED:case ee.UNKNOWN:case ee.DEADLINE_EXCEEDED:case ee.RESOURCE_EXHAUSTED:case ee.INTERNAL:case ee.UNAVAILABLE:case ee.UNAUTHENTICATED:return!1;case ee.INVALID_ARGUMENT:case ee.NOT_FOUND:case ee.ALREADY_EXISTS:case ee.PERMISSION_DENIED:case ee.FAILED_PRECONDITION:case ee.ABORTED:case ee.OUT_OF_RANGE:case ee.UNIMPLEMENTED:case ee.DATA_LOSS:return!0;default:return Re(15467,{code:s})}}function O2(s){if(s===void 0)return Xa("GRPC error has no .code"),ee.UNKNOWN;switch(s){case It.OK:return ee.OK;case It.CANCELLED:return ee.CANCELLED;case It.UNKNOWN:return ee.UNKNOWN;case It.DEADLINE_EXCEEDED:return ee.DEADLINE_EXCEEDED;case It.RESOURCE_EXHAUSTED:return ee.RESOURCE_EXHAUSTED;case It.INTERNAL:return ee.INTERNAL;case It.UNAVAILABLE:return ee.UNAVAILABLE;case It.UNAUTHENTICATED:return ee.UNAUTHENTICATED;case It.INVALID_ARGUMENT:return ee.INVALID_ARGUMENT;case It.NOT_FOUND:return ee.NOT_FOUND;case It.ALREADY_EXISTS:return ee.ALREADY_EXISTS;case It.PERMISSION_DENIED:return ee.PERMISSION_DENIED;case It.FAILED_PRECONDITION:return ee.FAILED_PRECONDITION;case It.ABORTED:return ee.ABORTED;case It.OUT_OF_RANGE:return ee.OUT_OF_RANGE;case It.UNIMPLEMENTED:return ee.UNIMPLEMENTED;case It.DATA_LOSS:return ee.DATA_LOSS;default:return Re(39323,{code:s})}}(Pe=It||(It={}))[Pe.OK=0]="OK",Pe[Pe.CANCELLED=1]="CANCELLED",Pe[Pe.UNKNOWN=2]="UNKNOWN",Pe[Pe.INVALID_ARGUMENT=3]="INVALID_ARGUMENT",Pe[Pe.DEADLINE_EXCEEDED=4]="DEADLINE_EXCEEDED",Pe[Pe.NOT_FOUND=5]="NOT_FOUND",Pe[Pe.ALREADY_EXISTS=6]="ALREADY_EXISTS",Pe[Pe.PERMISSION_DENIED=7]="PERMISSION_DENIED",Pe[Pe.UNAUTHENTICATED=16]="UNAUTHENTICATED",Pe[Pe.RESOURCE_EXHAUSTED=8]="RESOURCE_EXHAUSTED",Pe[Pe.FAILED_PRECONDITION=9]="FAILED_PRECONDITION",Pe[Pe.ABORTED=10]="ABORTED",Pe[Pe.OUT_OF_RANGE=11]="OUT_OF_RANGE",Pe[Pe.UNIMPLEMENTED=12]="UNIMPLEMENTED",Pe[Pe.INTERNAL=13]="INTERNAL",Pe[Pe.UNAVAILABLE=14]="UNAVAILABLE",Pe[Pe.DATA_LOSS=15]="DATA_LOSS";new Ep([4294967295,4294967295],0);class M2{constructor(e,n){this.databaseId=e,this.useProto3Json=n}}function Hm(s,e){return s.useProto3Json?`${new Date(1e3*e.seconds).toISOString().replace(/\.\d*/,"").replace("Z","")}.${("000000000"+e.nanoseconds).slice(-9)}Z`:{seconds:""+e.seconds,nanos:e.nanoseconds}}function P2(s,e){return s.useProto3Json?e.toBase64():e.toUint8Array()}function k2(s,e){return Hm(s,e.toTimestamp())}function Zr(s){return mt(!!s,49232),ot.fromTimestamp((function(n){const a=Ja(n);return new lt(a.seconds,a.nanos)})(s))}function AS(s,e){return qm(s,e).canonicalString()}function qm(s,e){const n=(function(o){return new ct(["projects",o.projectId,"databases",o.database])})(s).child("documents");return e===void 0?n:n.child(e)}function L2(s){const e=ct.fromString(s);return mt(G2(e),10190,{key:e.toString()}),e}function Fm(s,e){return AS(s.databaseId,e.path)}function V2(s){const e=L2(s);return e.length===4?ct.emptyPath():z2(e)}function U2(s){return new ct(["projects",s.databaseId.projectId,"databases",s.databaseId.database]).canonicalString()}function z2(s){return mt(s.length>4&&s.get(4)==="documents",29091,{key:s.toString()}),s.popFirst(5)}function wE(s,e,n){return{name:Fm(s,e),fields:n.value.mapValue.fields}}function B2(s,e){let n;if(e instanceof fc)n={update:wE(s,e.key,e.value)};else if(e instanceof SS)n={delete:Fm(s,e.key)};else if(e instanceof nr)n={update:wE(s,e.key,e.data),updateMask:F2(e.fieldMask)};else{if(!(e instanceof I2))return Re(16599,{dt:e.type});n={verify:Fm(s,e.key)}}return e.fieldTransforms.length>0&&(n.updateTransforms=e.fieldTransforms.map((a=>(function(c,f){const p=f.transform;if(p instanceof xh)return{fieldPath:f.field.canonicalString(),setToServerValue:"REQUEST_TIME"};if(p instanceof tc)return{fieldPath:f.field.canonicalString(),appendMissingElements:{values:p.elements}};if(p instanceof nc)return{fieldPath:f.field.canonicalString(),removeAllFromArray:{values:p.elements}};if(p instanceof Ih)return{fieldPath:f.field.canonicalString(),increment:p.Ae};throw Re(20930,{transform:f.transform})})(0,a)))),e.precondition.isNone||(n.currentDocument=(function(o,c){return c.updateTime!==void 0?{updateTime:k2(o,c.updateTime)}:c.exists!==void 0?{exists:c.exists}:Re(27497)})(s,e.precondition)),n}function H2(s,e){return s&&s.length>0?(mt(e!==void 0,14353),s.map((n=>(function(o,c){let f=o.updateTime?Zr(o.updateTime):Zr(c);return f.isEqual(ot.min())&&(f=Zr(c)),new N2(f,o.transformResults||[])})(n,e)))):[]}function q2(s){let e=V2(s.parent);const n=s.structuredQuery,a=n.from?n.from.length:0;let o=null;if(a>0){mt(a===1,65062);const T=n.from[0];T.allDescendants?o=T.collectionId:e=e.child(T.collectionId)}let c=[];n.where&&(c=(function(b){const N=wS(b);return N instanceof aa&&oS(N)?N.getFilters():[N]})(n.where));let f=[];n.orderBy&&(f=(function(b){return b.map((N=>(function(G){return new Nh($r(G.field),(function(Y){switch(Y){case"ASCENDING":return"asc";case"DESCENDING":return"desc";default:return}})(G.direction))})(N)))})(n.orderBy));let p=null;n.limit&&(p=(function(b){let N;return N=typeof b=="object"?b.value:b,Rp(N)?null:N})(n.limit));let g=null;n.startAt&&(g=(function(b){const N=!!b.before,P=b.values||[];return new wh(P,N)})(n.startAt));let y=null;return n.endAt&&(y=(function(b){const N=!b.before,P=b.values||[];return new wh(P,N)})(n.endAt)),u2(e,o,f,c,p,"F",g,y)}function wS(s){return s.unaryFilter!==void 0?(function(n){switch(n.unaryFilter.op){case"IS_NAN":const a=$r(n.unaryFilter.field);return Ut.create(a,"==",{doubleValue:NaN});case"IS_NULL":const o=$r(n.unaryFilter.field);return Ut.create(o,"==",{nullValue:"NULL_VALUE"});case"IS_NOT_NAN":const c=$r(n.unaryFilter.field);return Ut.create(c,"!=",{doubleValue:NaN});case"IS_NOT_NULL":const f=$r(n.unaryFilter.field);return Ut.create(f,"!=",{nullValue:"NULL_VALUE"});case"OPERATOR_UNSPECIFIED":return Re(61313);default:return Re(60726)}})(s):s.fieldFilter!==void 0?(function(n){return Ut.create($r(n.fieldFilter.field),(function(o){switch(o){case"EQUAL":return"==";case"NOT_EQUAL":return"!=";case"GREATER_THAN":return">";case"GREATER_THAN_OR_EQUAL":return">=";case"LESS_THAN":return"<";case"LESS_THAN_OR_EQUAL":return"<=";case"ARRAY_CONTAINS":return"array-contains";case"IN":return"in";case"NOT_IN":return"not-in";case"ARRAY_CONTAINS_ANY":return"array-contains-any";case"OPERATOR_UNSPECIFIED":return Re(58110);default:return Re(50506)}})(n.fieldFilter.op),n.fieldFilter.value)})(s):s.compositeFilter!==void 0?(function(n){return aa.create(n.compositeFilter.filters.map((a=>wS(a))),(function(o){switch(o){case"AND":return"and";case"OR":return"or";default:return Re(1026)}})(n.compositeFilter.op))})(s):Re(30097,{filter:s})}function $r(s){return $t.fromServerFormat(s.fieldPath)}function F2(s){const e=[];return s.fields.forEach((n=>e.push(n.canonicalString()))),{fieldPaths:e}}function G2(s){return s.length>=4&&s.get(0)==="projects"&&s.get(2)==="databases"}function NS(s){return!!s&&typeof s._toProto=="function"&&s._protoValueType==="ProtoValue"}class Y2{constructor(e){this.yt=e}}function K2(s){const e=q2({parent:s.parent,structuredQuery:s.structuredQuery});return s.limitType==="LAST"?Bm(e,e.limit,"L"):e}class Q2{constructor(){this.Sn=new $2}addToCollectionParentIndex(e,n){return this.Sn.add(n),Z.resolve()}getCollectionParents(e,n){return Z.resolve(this.Sn.getEntries(n))}addFieldIndex(e,n){return Z.resolve()}deleteFieldIndex(e,n){return Z.resolve()}deleteAllFieldIndexes(e){return Z.resolve()}createTargetIndexes(e,n){return Z.resolve()}getDocumentsMatchingTarget(e,n){return Z.resolve(null)}getIndexType(e,n){return Z.resolve(0)}getFieldIndexes(e,n){return Z.resolve([])}getNextCollectionGroupToUpdate(e){return Z.resolve(null)}getMinOffset(e,n){return Z.resolve(sa.min())}getMinOffsetFromCollectionGroup(e,n){return Z.resolve(sa.min())}updateCollectionGroup(e,n,a){return Z.resolve()}updateIndexEntries(e,n){return Z.resolve()}}class $2{constructor(){this.index={}}add(e){const n=e.lastSegment(),a=e.popLast(),o=this.index[n]||new Wt(ct.comparator),c=!o.has(a);return this.index[n]=o.add(a),c}has(e){const n=e.lastSegment(),a=e.popLast(),o=this.index[n];return o&&o.has(a)}getEntries(e){return(this.index[e]||new Wt(ct.comparator)).toArray()}}const NE={didRun:!1,sequenceNumbersCollected:0,targetsRemoved:0,documentsRemoved:0},RS=41943040;class pn{static withCacheSize(e){return new pn(e,pn.DEFAULT_COLLECTION_PERCENTILE,pn.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT)}constructor(e,n,a){this.cacheSizeCollectionThreshold=e,this.percentileToCollect=n,this.maximumSequenceNumbersToCollect=a}}pn.DEFAULT_COLLECTION_PERCENTILE=10,pn.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT=1e3,pn.DEFAULT=new pn(RS,pn.DEFAULT_COLLECTION_PERCENTILE,pn.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT),pn.DISABLED=new pn(-1,0,0);class lo{constructor(e){this.sr=e}next(){return this.sr+=2,this.sr}static _r(){return new lo(0)}static ar(){return new lo(-1)}}const RE="LruGarbageCollector",W2=1048576;function xE([s,e],[n,a]){const o=Be(s,n);return o===0?Be(e,a):o}class X2{constructor(e){this.Pr=e,this.buffer=new Wt(xE),this.Tr=0}Ir(){return++this.Tr}Er(e){const n=[e,this.Ir()];if(this.buffer.size<this.Pr)this.buffer=this.buffer.add(n);else{const a=this.buffer.last();xE(n,a)<0&&(this.buffer=this.buffer.delete(a).add(n))}}get maxValue(){return this.buffer.last()[0]}}class J2{constructor(e,n,a){this.garbageCollector=e,this.asyncQueue=n,this.localStore=a,this.Rr=null}start(){this.garbageCollector.params.cacheSizeCollectionThreshold!==-1&&this.Ar(6e4)}stop(){this.Rr&&(this.Rr.cancel(),this.Rr=null)}get started(){return this.Rr!==null}Ar(e){he(RE,`Garbage collection scheduled in ${e}ms`),this.Rr=this.asyncQueue.enqueueAfterDelay("lru_garbage_collection",e,(async()=>{this.Rr=null;try{await this.localStore.collectGarbage(this.garbageCollector)}catch(n){dc(n)?he(RE,"Ignoring IndexedDB error during garbage collection: ",n):await Ap(n)}await this.Ar(3e5)}))}}class Z2{constructor(e,n){this.Vr=e,this.params=n}calculateTargetCount(e,n){return this.Vr.dr(e).next((a=>Math.floor(n/100*a)))}nthSequenceNumber(e,n){if(n===0)return Z.resolve(wp.ce);const a=new X2(n);return this.Vr.forEachTarget(e,(o=>a.Er(o.sequenceNumber))).next((()=>this.Vr.mr(e,(o=>a.Er(o))))).next((()=>a.maxValue))}removeTargets(e,n,a){return this.Vr.removeTargets(e,n,a)}removeOrphanedDocuments(e,n){return this.Vr.removeOrphanedDocuments(e,n)}collect(e,n){return this.params.cacheSizeCollectionThreshold===-1?(he("LruGarbageCollector","Garbage collection skipped; disabled"),Z.resolve(NE)):this.getCacheSize(e).next((a=>a<this.params.cacheSizeCollectionThreshold?(he("LruGarbageCollector",`Garbage collection skipped; Cache size ${a} is lower than threshold ${this.params.cacheSizeCollectionThreshold}`),NE):this.gr(e,n)))}getCacheSize(e){return this.Vr.getCacheSize(e)}gr(e,n){let a,o,c,f,p,g,y;const T=Date.now();return this.calculateTargetCount(e,this.params.percentileToCollect).next((b=>(b>this.params.maximumSequenceNumbersToCollect?(he("LruGarbageCollector",`Capping sequence numbers to collect down to the maximum of ${this.params.maximumSequenceNumbersToCollect} from ${b}`),o=this.params.maximumSequenceNumbersToCollect):o=b,f=Date.now(),this.nthSequenceNumber(e,o)))).next((b=>(a=b,p=Date.now(),this.removeTargets(e,a,n)))).next((b=>(c=b,g=Date.now(),this.removeOrphanedDocuments(e,a)))).next((b=>(y=Date.now(),Qr()<=je.DEBUG&&he("LruGarbageCollector",`LRU Garbage Collection Counted targets in ${f-T}ms Determined least recently used ${o} in `+(p-f)+`ms Removed ${c} targets in `+(g-p)+`ms Removed ${b} documents in `+(y-g)+`ms Total Duration: ${y-T}ms`),Z.resolve({didRun:!0,sequenceNumbersCollected:o,targetsRemoved:c,documentsRemoved:b}))))}}function eD(s,e){return new Z2(s,e)}class tD{constructor(){this.changes=new tr((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,ei.newInvalidDocument(e).setReadTime(n))}getEntry(e,n){this.assertNotApplied();const a=this.changes.get(n);return a!==void 0?Z.resolve(a):this.getFromCache(e,n)}getEntries(e,n){return this.getAllFromCache(e,n)}apply(e){return this.assertNotApplied(),this.changesApplied=!0,this.applyChanges(e)}assertNotApplied(){}}class nD{constructor(e,n){this.overlayedDocument=e,this.mutatedFields=n}}class iD{constructor(e,n,a,o){this.remoteDocumentCache=e,this.mutationQueue=n,this.documentOverlayCache=a,this.indexManager=o}getDocument(e,n){let a=null;return this.documentOverlayCache.getOverlay(e,n).next((o=>(a=o,this.remoteDocumentCache.getEntry(e,n)))).next((o=>(a!==null&&Fl(a.mutation,o,si.empty(),lt.now()),o)))}getDocuments(e,n){return this.remoteDocumentCache.getEntries(e,n).next((a=>this.getLocalViewOfDocuments(e,a,en()).next((()=>a))))}getLocalViewOfDocuments(e,n,a=en()){const o=Fa();return this.populateOverlays(e,o,n).next((()=>this.computeViews(e,n,o,a).next((c=>{let f=Ju();return c.forEach(((p,g)=>{f=f.insert(p,g.overlayedDocument)})),f}))))}getOverlayedDocuments(e,n){const a=Fa();return this.populateOverlays(e,a,n).next((()=>this.computeViews(e,n,a,en())))}populateOverlays(e,n,a){const o=[];return a.forEach((c=>{n.has(c)||o.push(c)})),this.documentOverlayCache.getOverlays(e,o).next((c=>{c.forEach(((f,p)=>{n.set(f,p)}))}))}computeViews(e,n,a,o){let c=Rh();const f=ql(),p=(function(){return ql()})();return n.forEach(((g,y)=>{const T=a.get(y.key);o.has(y.key)&&(T===void 0||T.mutation instanceof nr)?c=c.insert(y.key,y):T!==void 0?(f.set(y.key,T.mutation.getFieldMask()),Fl(T.mutation,y,T.mutation.getFieldMask(),lt.now())):f.set(y.key,si.empty())})),this.recalculateAndSaveOverlays(e,c).next((g=>(g.forEach(((y,T)=>f.set(y,T))),n.forEach(((y,T)=>p.set(y,new nD(T,f.get(y)??null)))),p)))}recalculateAndSaveOverlays(e,n){const a=ql();let o=new _n(((f,p)=>f-p)),c=en();return this.mutationQueue.getAllMutationBatchesAffectingDocumentKeys(e,n).next((f=>{for(const p of f)p.keys().forEach((g=>{const y=n.get(g);if(y===null)return;let T=a.get(g)||si.empty();T=p.applyToLocalView(y,T),a.set(g,T);const b=(o.get(p.batchId)||en()).add(g);o=o.insert(p.batchId,b)}))})).next((()=>{const f=[],p=o.getReverseIterator();for(;p.hasNext();){const g=p.getNext(),y=g.key,T=g.value,b=pS();T.forEach((N=>{if(!c.has(N)){const P=TS(n.get(N),a.get(N));P!==null&&b.set(N,P),c=c.add(N)}})),f.push(this.documentOverlayCache.saveOverlays(e,y,b))}return Z.waitFor(f)})).next((()=>a))}recalculateAndSaveOverlaysForDocumentKeys(e,n){return this.remoteDocumentCache.getEntries(e,n).next((a=>this.recalculateAndSaveOverlays(e,a)))}getDocumentsMatchingQuery(e,n,a,o){return d2(n)?this.getDocumentsMatchingDocumentQuery(e,n.path):f2(n)?this.getDocumentsMatchingCollectionGroupQuery(e,n,a,o):this.getDocumentsMatchingCollectionQuery(e,n,a,o)}getNextDocuments(e,n,a,o){return this.remoteDocumentCache.getAllFromCollectionGroup(e,n,a,o).next((c=>{const f=o-c.size>0?this.documentOverlayCache.getOverlaysForCollectionGroup(e,n,a.largestBatchId,o-c.size):Z.resolve(Fa());let p=Zl,g=c;return f.next((y=>Z.forEach(y,((T,b)=>(p<b.largestBatchId&&(p=b.largestBatchId),c.get(T)?Z.resolve():this.remoteDocumentCache.getEntry(e,T).next((N=>{g=g.insert(T,N)}))))).next((()=>this.populateOverlays(e,y,c))).next((()=>this.computeViews(e,g,y,en()))).next((T=>({batchId:p,changes:mS(T)})))))}))}getDocumentsMatchingDocumentQuery(e,n){return this.getDocument(e,new Ne(n)).next((a=>{let o=Ju();return a.isFoundDocument()&&(o=o.insert(a.key,a)),o}))}getDocumentsMatchingCollectionGroupQuery(e,n,a,o){const c=n.collectionGroup;let f=Ju();return this.indexManager.getCollectionParents(e,c).next((p=>Z.forEach(p,(g=>{const y=(function(b,N){return new Kh(N,null,b.explicitOrderBy.slice(),b.filters.slice(),b.limit,b.limitType,b.startAt,b.endAt)})(n,g.child(c));return this.getDocumentsMatchingCollectionQuery(e,y,a,o).next((T=>{T.forEach(((b,N)=>{f=f.insert(b,N)}))}))})).next((()=>f))))}getDocumentsMatchingCollectionQuery(e,n,a,o){let c;return this.documentOverlayCache.getOverlaysForCollection(e,n.path,a.largestBatchId).next((f=>(c=f,this.remoteDocumentCache.getDocumentsMatchingQuery(e,n,a,c,o)))).next((f=>{c.forEach(((g,y)=>{const T=y.getKey();f.get(T)===null&&(f=f.insert(T,ei.newInvalidDocument(T)))}));let p=Ju();return f.forEach(((g,y)=>{const T=c.get(g);T!==void 0&&Fl(T.mutation,y,si.empty(),lt.now()),Op(n,y)&&(p=p.insert(g,y))})),p}))}}class sD{constructor(e){this.serializer=e,this.Nr=new Map,this.Br=new Map}getBundleMetadata(e,n){return Z.resolve(this.Nr.get(n))}saveBundleMetadata(e,n){return this.Nr.set(n.id,(function(o){return{id:o.id,version:o.version,createTime:Zr(o.createTime)}})(n)),Z.resolve()}getNamedQuery(e,n){return Z.resolve(this.Br.get(n))}saveNamedQuery(e,n){return this.Br.set(n.name,(function(o){return{name:o.name,query:K2(o.bundledQuery),readTime:Zr(o.readTime)}})(n)),Z.resolve()}}class aD{constructor(){this.overlays=new _n(Ne.comparator),this.Lr=new Map}getOverlay(e,n){return Z.resolve(this.overlays.get(n))}getOverlays(e,n){const a=Fa();return Z.forEach(n,(o=>this.getOverlay(e,o).next((c=>{c!==null&&a.set(o,c)})))).next((()=>a))}saveOverlays(e,n,a){return a.forEach(((o,c)=>{this.bt(e,n,c)})),Z.resolve()}removeOverlaysForBatchId(e,n,a){const o=this.Lr.get(a);return o!==void 0&&(o.forEach((c=>this.overlays=this.overlays.remove(c))),this.Lr.delete(a)),Z.resolve()}getOverlaysForCollection(e,n,a){const o=Fa(),c=n.length+1,f=new Ne(n.child("")),p=this.overlays.getIteratorFrom(f);for(;p.hasNext();){const g=p.getNext().value,y=g.getKey();if(!n.isPrefixOf(y.path))break;y.path.length===c&&g.largestBatchId>a&&o.set(g.getKey(),g)}return Z.resolve(o)}getOverlaysForCollectionGroup(e,n,a,o){let c=new _n(((y,T)=>y-T));const f=this.overlays.getIterator();for(;f.hasNext();){const y=f.getNext().value;if(y.getKey().getCollectionGroup()===n&&y.largestBatchId>a){let T=c.get(y.largestBatchId);T===null&&(T=Fa(),c=c.insert(y.largestBatchId,T)),T.set(y.getKey(),y)}}const p=Fa(),g=c.getIterator();for(;g.hasNext()&&(g.getNext().value.forEach(((y,T)=>p.set(y,T))),!(p.size()>=o)););return Z.resolve(p)}bt(e,n,a){const o=this.overlays.get(a.key);if(o!==null){const f=this.Lr.get(o.largestBatchId).delete(a.key);this.Lr.set(o.largestBatchId,f)}this.overlays=this.overlays.insert(a.key,new D2(n,a));let c=this.Lr.get(n);c===void 0&&(c=en(),this.Lr.set(n,c)),this.Lr.set(n,c.add(a.key))}}class rD{constructor(){this.sessionToken=Mi.EMPTY_BYTE_STRING}getSessionToken(e){return Z.resolve(this.sessionToken)}setSessionToken(e,n){return this.sessionToken=n,Z.resolve()}}class kp{constructor(){this.kr=new Wt(Vt.Kr),this.qr=new Wt(Vt.Ur)}isEmpty(){return this.kr.isEmpty()}addReference(e,n){const a=new Vt(e,n);this.kr=this.kr.add(a),this.qr=this.qr.add(a)}$r(e,n){e.forEach((a=>this.addReference(a,n)))}removeReference(e,n){this.Wr(new Vt(e,n))}Qr(e,n){e.forEach((a=>this.removeReference(a,n)))}Gr(e){const n=new Ne(new ct([])),a=new Vt(n,e),o=new Vt(n,e+1),c=[];return this.qr.forEachInRange([a,o],(f=>{this.Wr(f),c.push(f.key)})),c}zr(){this.kr.forEach((e=>this.Wr(e)))}Wr(e){this.kr=this.kr.delete(e),this.qr=this.qr.delete(e)}jr(e){const n=new Ne(new ct([])),a=new Vt(n,e),o=new Vt(n,e+1);let c=en();return this.qr.forEachInRange([a,o],(f=>{c=c.add(f.key)})),c}containsKey(e){const n=new Vt(e,0),a=this.kr.firstAfterOrEqual(n);return a!==null&&e.isEqual(a.key)}}class Vt{constructor(e,n){this.key=e,this.Hr=n}static Kr(e,n){return Ne.comparator(e.key,n.key)||Be(e.Hr,n.Hr)}static Ur(e,n){return Be(e.Hr,n.Hr)||Ne.comparator(e.key,n.key)}}class oD{constructor(e,n){this.indexManager=e,this.referenceDelegate=n,this.mutationQueue=[],this.Yn=1,this.Jr=new Wt(Vt.Kr)}checkEmpty(e){return Z.resolve(this.mutationQueue.length===0)}addMutationBatch(e,n,a,o){const c=this.Yn;this.Yn++,this.mutationQueue.length>0&&this.mutationQueue[this.mutationQueue.length-1];const f=new C2(c,n,a,o);this.mutationQueue.push(f);for(const p of o)this.Jr=this.Jr.add(new Vt(p.key,c)),this.indexManager.addToCollectionParentIndex(e,p.key.path.popLast());return Z.resolve(f)}lookupMutationBatch(e,n){return Z.resolve(this.Zr(n))}getNextMutationBatchAfterBatchId(e,n){const a=n+1,o=this.Xr(a),c=o<0?0:o;return Z.resolve(this.mutationQueue.length>c?this.mutationQueue[c]:null)}getHighestUnacknowledgedBatchId(){return Z.resolve(this.mutationQueue.length===0?Np:this.Yn-1)}getAllMutationBatches(e){return Z.resolve(this.mutationQueue.slice())}getAllMutationBatchesAffectingDocumentKey(e,n){const a=new Vt(n,0),o=new Vt(n,Number.POSITIVE_INFINITY),c=[];return this.Jr.forEachInRange([a,o],(f=>{const p=this.Zr(f.Hr);c.push(p)})),Z.resolve(c)}getAllMutationBatchesAffectingDocumentKeys(e,n){let a=new Wt(Be);return n.forEach((o=>{const c=new Vt(o,0),f=new Vt(o,Number.POSITIVE_INFINITY);this.Jr.forEachInRange([c,f],(p=>{a=a.add(p.Hr)}))})),Z.resolve(this.Yr(a))}getAllMutationBatchesAffectingQuery(e,n){const a=n.path,o=a.length+1;let c=a;Ne.isDocumentKey(c)||(c=c.child(""));const f=new Vt(new Ne(c),0);let p=new Wt(Be);return this.Jr.forEachWhile((g=>{const y=g.key.path;return!!a.isPrefixOf(y)&&(y.length===o&&(p=p.add(g.Hr)),!0)}),f),Z.resolve(this.Yr(p))}Yr(e){const n=[];return e.forEach((a=>{const o=this.Zr(a);o!==null&&n.push(o)})),n}removeMutationBatch(e,n){mt(this.ei(n.batchId,"removed")===0,55003),this.mutationQueue.shift();let a=this.Jr;return Z.forEach(n.mutations,(o=>{const c=new Vt(o.key,n.batchId);return a=a.delete(c),this.referenceDelegate.markPotentiallyOrphaned(e,o.key)})).next((()=>{this.Jr=a}))}nr(e){}containsKey(e,n){const a=new Vt(n,0),o=this.Jr.firstAfterOrEqual(a);return Z.resolve(n.isEqual(o&&o.key))}performConsistencyCheck(e){return this.mutationQueue.length,Z.resolve()}ei(e,n){return this.Xr(e)}Xr(e){return this.mutationQueue.length===0?0:e-this.mutationQueue[0].batchId}Zr(e){const n=this.Xr(e);return n<0||n>=this.mutationQueue.length?null:this.mutationQueue[n]}}class lD{constructor(e){this.ti=e,this.docs=(function(){return new _n(Ne.comparator)})(),this.size=0}setIndexManager(e){this.indexManager=e}addEntry(e,n){const a=n.key,o=this.docs.get(a),c=o?o.size:0,f=this.ti(n);return this.docs=this.docs.insert(a,{document:n.mutableCopy(),size:f}),this.size+=f-c,this.indexManager.addToCollectionParentIndex(e,a.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 a=this.docs.get(n);return Z.resolve(a?a.document.mutableCopy():ei.newInvalidDocument(n))}getEntries(e,n){let a=Rh();return n.forEach((o=>{const c=this.docs.get(o);a=a.insert(o,c?c.document.mutableCopy():ei.newInvalidDocument(o))})),Z.resolve(a)}getDocumentsMatchingQuery(e,n,a,o){let c=Rh();const f=n.path,p=new Ne(f.child("__id-9223372036854775808__")),g=this.docs.getIteratorFrom(p);for(;g.hasNext();){const{key:y,value:{document:T}}=g.getNext();if(!f.isPrefixOf(y.path))break;y.path.length>f.length+1||zC(UC(T),a)<=0||(o.has(T.key)||Op(n,T))&&(c=c.insert(T.key,T.mutableCopy()))}return Z.resolve(c)}getAllFromCollectionGroup(e,n,a,o){Re(9500)}ni(e,n){return Z.forEach(this.docs,(a=>n(a)))}newChangeBuffer(e){return new cD(this)}getSize(e){return Z.resolve(this.size)}}class cD extends tD{constructor(e){super(),this.Mr=e}applyChanges(e){const n=[];return this.changes.forEach(((a,o)=>{o.isValidDocument()?n.push(this.Mr.addEntry(e,o)):this.Mr.removeEntry(a)})),Z.waitFor(n)}getFromCache(e,n){return this.Mr.getEntry(e,n)}getAllFromCache(e,n){return this.Mr.getEntries(e,n)}}class uD{constructor(e){this.persistence=e,this.ri=new tr((n=>Dp(n)),jp),this.lastRemoteSnapshotVersion=ot.min(),this.highestTargetId=0,this.ii=0,this.si=new kp,this.targetCount=0,this.oi=lo._r()}forEachTarget(e,n){return this.ri.forEach(((a,o)=>n(o))),Z.resolve()}getLastRemoteSnapshotVersion(e){return Z.resolve(this.lastRemoteSnapshotVersion)}getHighestSequenceNumber(e){return Z.resolve(this.ii)}allocateTargetId(e){return this.highestTargetId=this.oi.next(),Z.resolve(this.highestTargetId)}setTargetsMetadata(e,n,a){return a&&(this.lastRemoteSnapshotVersion=a),n>this.ii&&(this.ii=n),Z.resolve()}lr(e){this.ri.set(e.target,e);const n=e.targetId;n>this.highestTargetId&&(this.oi=new lo(n),this.highestTargetId=n),e.sequenceNumber>this.ii&&(this.ii=e.sequenceNumber)}addTargetData(e,n){return this.lr(n),this.targetCount+=1,Z.resolve()}updateTargetData(e,n){return this.lr(n),Z.resolve()}removeTargetData(e,n){return this.ri.delete(n.target),this.si.Gr(n.targetId),this.targetCount-=1,Z.resolve()}removeTargets(e,n,a){let o=0;const c=[];return this.ri.forEach(((f,p)=>{p.sequenceNumber<=n&&a.get(p.targetId)===null&&(this.ri.delete(f),c.push(this.removeMatchingKeysForTargetId(e,p.targetId)),o++)})),Z.waitFor(c).next((()=>o))}getTargetCount(e){return Z.resolve(this.targetCount)}getTargetData(e,n){const a=this.ri.get(n)||null;return Z.resolve(a)}addMatchingKeys(e,n,a){return this.si.$r(n,a),Z.resolve()}removeMatchingKeys(e,n,a){this.si.Qr(n,a);const o=this.persistence.referenceDelegate,c=[];return o&&n.forEach((f=>{c.push(o.markPotentiallyOrphaned(e,f))})),Z.waitFor(c)}removeMatchingKeysForTargetId(e,n){return this.si.Gr(n),Z.resolve()}getMatchingKeysForTargetId(e,n){const a=this.si.jr(n);return Z.resolve(a)}containsKey(e,n){return Z.resolve(this.si.containsKey(n))}}class xS{constructor(e,n){this._i={},this.overlays={},this.ai=new wp(0),this.ui=!1,this.ui=!0,this.ci=new rD,this.referenceDelegate=e(this),this.li=new uD(this),this.indexManager=new Q2,this.remoteDocumentCache=(function(o){return new lD(o)})((a=>this.referenceDelegate.hi(a))),this.serializer=new Y2(n),this.Pi=new sD(this.serializer)}start(){return Promise.resolve()}shutdown(){return this.ui=!1,Promise.resolve()}get started(){return this.ui}setDatabaseDeletedListener(){}setNetworkEnabled(){}getIndexManager(e){return this.indexManager}getDocumentOverlayCache(e){let n=this.overlays[e.toKey()];return n||(n=new aD,this.overlays[e.toKey()]=n),n}getMutationQueue(e,n){let a=this._i[e.toKey()];return a||(a=new oD(n,this.referenceDelegate),this._i[e.toKey()]=a),a}getGlobalsCache(){return this.ci}getTargetCache(){return this.li}getRemoteDocumentCache(){return this.remoteDocumentCache}getBundleCache(){return this.Pi}runTransaction(e,n,a){he("MemoryPersistence","Starting transaction:",e);const o=new hD(this.ai.next());return this.referenceDelegate.Ti(),a(o).next((c=>this.referenceDelegate.Ii(o).next((()=>c)))).toPromise().then((c=>(o.raiseOnCommittedEvent(),c)))}Ei(e,n){return Z.or(Object.values(this._i).map((a=>()=>a.containsKey(e,n))))}}class hD extends HC{constructor(e){super(),this.currentSequenceNumber=e}}class Lp{constructor(e){this.persistence=e,this.Ri=new kp,this.Ai=null}static Vi(e){return new Lp(e)}get di(){if(this.Ai)return this.Ai;throw Re(60996)}addReference(e,n,a){return this.Ri.addReference(a,n),this.di.delete(a.toString()),Z.resolve()}removeReference(e,n,a){return this.Ri.removeReference(a,n),this.di.add(a.toString()),Z.resolve()}markPotentiallyOrphaned(e,n){return this.di.add(n.toString()),Z.resolve()}removeTarget(e,n){this.Ri.Gr(n.targetId).forEach((o=>this.di.add(o.toString())));const a=this.persistence.getTargetCache();return a.getMatchingKeysForTargetId(e,n.targetId).next((o=>{o.forEach((c=>this.di.add(c.toString())))})).next((()=>a.removeTargetData(e,n)))}Ti(){this.Ai=new Set}Ii(e){const n=this.persistence.getRemoteDocumentCache().newChangeBuffer();return Z.forEach(this.di,(a=>{const o=Ne.fromPath(a);return this.mi(e,o).next((c=>{c||n.removeEntry(o,ot.min())}))})).next((()=>(this.Ai=null,n.apply(e))))}updateLimboDocument(e,n){return this.mi(e,n).next((a=>{a?this.di.delete(n.toString()):this.di.add(n.toString())}))}hi(e){return 0}mi(e,n){return Z.or([()=>Z.resolve(this.Ri.containsKey(n)),()=>this.persistence.getTargetCache().containsKey(e,n),()=>this.persistence.Ei(e,n)])}}class Ch{constructor(e,n){this.persistence=e,this.fi=new tr((a=>GC(a.path)),((a,o)=>a.isEqual(o))),this.garbageCollector=eD(this,n)}static Vi(e,n){return new Ch(e,n)}Ti(){}Ii(e){return Z.resolve()}forEachTarget(e,n){return this.persistence.getTargetCache().forEachTarget(e,n)}dr(e){const n=this.pr(e);return this.persistence.getTargetCache().getTargetCount(e).next((a=>n.next((o=>a+o))))}pr(e){let n=0;return this.mr(e,(a=>{n++})).next((()=>n))}mr(e,n){return Z.forEach(this.fi,((a,o)=>this.wr(e,a,o).next((c=>c?Z.resolve():n(o)))))}removeTargets(e,n,a){return this.persistence.getTargetCache().removeTargets(e,n,a)}removeOrphanedDocuments(e,n){let a=0;const o=this.persistence.getRemoteDocumentCache(),c=o.newChangeBuffer();return o.ni(e,(f=>this.wr(e,f,n).next((p=>{p||(a++,c.removeEntry(f,ot.min()))})))).next((()=>c.apply(e))).next((()=>a))}markPotentiallyOrphaned(e,n){return this.fi.set(n,e.currentSequenceNumber),Z.resolve()}removeTarget(e,n){const a=n.withSequenceNumber(e.currentSequenceNumber);return this.persistence.getTargetCache().updateTargetData(e,a)}addReference(e,n,a){return this.fi.set(a,e.currentSequenceNumber),Z.resolve()}removeReference(e,n,a){return this.fi.set(a,e.currentSequenceNumber),Z.resolve()}updateLimboDocument(e,n){return this.fi.set(n,e.currentSequenceNumber),Z.resolve()}hi(e){let n=e.key.toString().length;return e.isFoundDocument()&&(n+=lh(e.data.value)),n}wr(e,n,a){return Z.or([()=>this.persistence.Ei(e,n),()=>this.persistence.getTargetCache().containsKey(e,n),()=>{const o=this.fi.get(n);return Z.resolve(o!==void 0&&o>a)}])}getCacheSize(e){return this.persistence.getRemoteDocumentCache().getSize(e)}}class Vp{constructor(e,n,a,o){this.targetId=e,this.fromCache=n,this.Ts=a,this.Is=o}static Es(e,n){let a=en(),o=en();for(const c of n.docChanges)switch(c.type){case 0:a=a.add(c.doc.key);break;case 1:o=o.add(c.doc.key)}return new Vp(e,n.fromCache,a,o)}}class dD{constructor(){this._documentReadCount=0}get documentReadCount(){return this._documentReadCount}incrementDocumentReadCount(e){this._documentReadCount+=e}}class fD{constructor(){this.Rs=!1,this.As=!1,this.Vs=100,this.ds=(function(){return PN()?8:qC(nn())>0?6:4})()}initialize(e,n){this.fs=e,this.indexManager=n,this.Rs=!0}getDocumentsMatchingQuery(e,n,a,o){const c={result:null};return this.gs(e,n).next((f=>{c.result=f})).next((()=>{if(!c.result)return this.ps(e,n,o,a).next((f=>{c.result=f}))})).next((()=>{if(c.result)return;const f=new dD;return this.ys(e,n,f).next((p=>{if(c.result=p,this.As)return this.ws(e,n,f,p.size)}))})).next((()=>c.result))}ws(e,n,a,o){return a.documentReadCount<this.Vs?(Qr()<=je.DEBUG&&he("QueryEngine","SDK will not create cache indexes for query:",Cl(n),"since it only creates cache indexes for collection contains","more than or equal to",this.Vs,"documents"),Z.resolve()):(Qr()<=je.DEBUG&&he("QueryEngine","Query:",Cl(n),"scans",a.documentReadCount,"local documents and returns",o,"documents as results."),a.documentReadCount>this.ds*o?(Qr()<=je.DEBUG&&he("QueryEngine","The SDK decides to create cache indexes for query:",Cl(n),"as using cache indexes may help improve performance."),this.indexManager.createTargetIndexes(e,Ka(n))):Z.resolve())}gs(e,n){if(EE(n))return Z.resolve(null);let a=Ka(n);return this.indexManager.getIndexType(e,a).next((o=>o===0?null:(n.limit!==null&&o===1&&(n=Bm(n,null,"F"),a=Ka(n)),this.indexManager.getDocumentsMatchingTarget(e,a).next((c=>{const f=en(...c);return this.fs.getDocuments(e,f).next((p=>this.indexManager.getMinOffset(e,a).next((g=>{const y=this.bs(n,p);return this.Ss(n,y,f,g.readTime)?this.gs(e,Bm(n,null,"F")):this.Ds(e,y,n,g)}))))})))))}ps(e,n,a,o){return EE(n)||o.isEqual(ot.min())?Z.resolve(null):this.fs.getDocuments(e,a).next((c=>{const f=this.bs(n,c);return this.Ss(n,f,a,o)?Z.resolve(null):(Qr()<=je.DEBUG&&he("QueryEngine","Re-using previous result from %s to execute query: %s",o.toString(),Cl(n)),this.Ds(e,f,n,VC(o,Zl)).next((p=>p)))}))}bs(e,n){let a=new Wt(p2(e));return n.forEach(((o,c)=>{Op(e,c)&&(a=a.add(c))})),a}Ss(e,n,a,o){if(e.limit===null)return!1;if(a.size!==n.size)return!0;const c=e.limitType==="F"?n.last():n.first();return!!c&&(c.hasPendingWrites||c.version.compareTo(o)>0)}ys(e,n,a){return Qr()<=je.DEBUG&&he("QueryEngine","Using full collection scan to execute query:",Cl(n)),this.fs.getDocumentsMatchingQuery(e,n,sa.min(),a)}Ds(e,n,a,o){return this.fs.getDocumentsMatchingQuery(e,a,o).next((c=>(n.forEach((f=>{c=c.insert(f.key,f)})),c)))}}const mD="LocalStore";class pD{constructor(e,n,a,o){this.persistence=e,this.Cs=n,this.serializer=o,this.vs=new _n(Be),this.Fs=new tr((c=>Dp(c)),jp),this.Ms=new Map,this.xs=e.getRemoteDocumentCache(),this.li=e.getTargetCache(),this.Pi=e.getBundleCache(),this.Os(a)}Os(e){this.documentOverlayCache=this.persistence.getDocumentOverlayCache(e),this.indexManager=this.persistence.getIndexManager(e),this.mutationQueue=this.persistence.getMutationQueue(e,this.indexManager),this.localDocuments=new iD(this.xs,this.mutationQueue,this.documentOverlayCache,this.indexManager),this.xs.setIndexManager(this.indexManager),this.Cs.initialize(this.localDocuments,this.indexManager)}collectGarbage(e){return this.persistence.runTransaction("Collect garbage","readwrite-primary",(n=>e.collect(n,this.vs)))}}function gD(s,e,n,a){return new pD(s,e,n,a)}async function IS(s,e){const n=Ze(s);return await n.persistence.runTransaction("Handle user change","readonly",(a=>{let o;return n.mutationQueue.getAllMutationBatches(a).next((c=>(o=c,n.Os(e),n.mutationQueue.getAllMutationBatches(a)))).next((c=>{const f=[],p=[];let g=en();for(const y of o){f.push(y.batchId);for(const T of y.mutations)g=g.add(T.key)}for(const y of c){p.push(y.batchId);for(const T of y.mutations)g=g.add(T.key)}return n.localDocuments.getDocuments(a,g).next((y=>({Ns:y,removedBatchIds:f,addedBatchIds:p})))}))}))}function _D(s,e){const n=Ze(s);return n.persistence.runTransaction("Acknowledge batch","readwrite-primary",(a=>{const o=e.batch.keys(),c=n.xs.newChangeBuffer({trackRemovals:!0});return(function(p,g,y,T){const b=y.batch,N=b.keys();let P=Z.resolve();return N.forEach((G=>{P=P.next((()=>T.getEntry(g,G))).next((K=>{const Y=y.docVersions.get(G);mt(Y!==null,48541),K.version.compareTo(Y)<0&&(b.applyToRemoteDocument(K,y),K.isValidDocument()&&(K.setReadTime(y.commitVersion),T.addEntry(K)))}))})),P.next((()=>p.mutationQueue.removeMutationBatch(g,b)))})(n,a,e,c).next((()=>c.apply(a))).next((()=>n.mutationQueue.performConsistencyCheck(a))).next((()=>n.documentOverlayCache.removeOverlaysForBatchId(a,o,e.batch.batchId))).next((()=>n.localDocuments.recalculateAndSaveOverlaysForDocumentKeys(a,(function(p){let g=en();for(let y=0;y<p.mutationResults.length;++y)p.mutationResults[y].transformResults.length>0&&(g=g.add(p.batch.mutations[y].key));return g})(e)))).next((()=>n.localDocuments.getDocuments(a,o)))}))}function yD(s){const e=Ze(s);return e.persistence.runTransaction("Get last remote snapshot version","readonly",(n=>e.li.getLastRemoteSnapshotVersion(n)))}function vD(s,e){const n=Ze(s);return n.persistence.runTransaction("Get next mutation batch","readonly",(a=>(e===void 0&&(e=Np),n.mutationQueue.getNextMutationBatchAfterBatchId(a,e))))}class IE{constructor(){this.activeTargetIds=T2()}Qs(e){this.activeTargetIds=this.activeTargetIds.add(e)}Gs(e){this.activeTargetIds=this.activeTargetIds.delete(e)}Ws(){const e={activeTargetIds:this.activeTargetIds.toArray(),updateTimeMs:Date.now()};return JSON.stringify(e)}}class ED{constructor(){this.vo=new IE,this.Fo={},this.onlineStateHandler=null,this.sequenceNumberHandler=null}addPendingMutation(e){}updateMutationState(e,n,a){}addLocalQueryTarget(e,n=!0){return n&&this.vo.Qs(e),this.Fo[e]||"not-current"}updateQueryState(e,n,a){this.Fo[e]=n}removeLocalQueryTarget(e){this.vo.Gs(e)}isLocalQueryTarget(e){return this.vo.activeTargetIds.has(e)}clearQueryState(e){delete this.Fo[e]}getAllActiveQueryTargets(){return this.vo.activeTargetIds}isActiveQueryTarget(e){return this.vo.activeTargetIds.has(e)}start(){return this.vo=new IE,Promise.resolve()}handleUserChange(e,n,a){}setOnlineState(e){}shutdown(){}writeSequenceNumber(e){}notifyBundleLoaded(e){}}class TD{Mo(e){}shutdown(){}}const CE="ConnectivityMonitor";class DE{constructor(){this.xo=()=>this.Oo(),this.No=()=>this.Bo(),this.Lo=[],this.ko()}Mo(e){this.Lo.push(e)}shutdown(){window.removeEventListener("online",this.xo),window.removeEventListener("offline",this.No)}ko(){window.addEventListener("online",this.xo),window.addEventListener("offline",this.No)}Oo(){he(CE,"Network connectivity changed: AVAILABLE");for(const e of this.Lo)e(0)}Bo(){he(CE,"Network connectivity changed: UNAVAILABLE");for(const e of this.Lo)e(1)}static v(){return typeof window<"u"&&window.addEventListener!==void 0&&window.removeEventListener!==void 0}}let Zu=null;function Gm(){return Zu===null?Zu=(function(){return 268435456+Math.round(2147483648*Math.random())})():Zu++,"0x"+Zu.toString(16)}const bm="RestConnection",bD={BatchGetDocuments:"batchGet",Commit:"commit",RunQuery:"runQuery",RunAggregationQuery:"runAggregationQuery",ExecutePipeline:"executePipeline"};class SD{get Ko(){return!1}constructor(e){this.databaseInfo=e,this.databaseId=e.databaseId;const n=e.ssl?"https":"http",a=encodeURIComponent(this.databaseId.projectId),o=encodeURIComponent(this.databaseId.database);this.qo=n+"://"+e.host,this.Uo=`projects/${a}/databases/${o}`,this.$o=this.databaseId.database===Sh?`project_id=${a}`:`project_id=${a}&database_id=${o}`}Wo(e,n,a,o,c){const f=Gm(),p=this.Qo(e,n.toUriEncodedString());he(bm,`Sending RPC '${e}' ${f}:`,p,a);const g={"google-cloud-resource-prefix":this.Uo,"x-goog-request-params":this.$o};this.Go(g,o,c);const{host:y}=new URL(p),T=fo(y);return this.zo(e,p,g,a,T).then((b=>(he(bm,`Received RPC '${e}' ${f}: `,b),b)),(b=>{throw Jl(bm,`RPC '${e}' ${f} failed with error: `,b,"url: ",p,"request:",a),b}))}jo(e,n,a,o,c,f){return this.Wo(e,n,a,o,c)}Go(e,n,a){e["X-Goog-Api-Client"]=(function(){return"gl-js/ fire/"+Eo})(),e["Content-Type"]="text/plain",this.databaseInfo.appId&&(e["X-Firebase-GMPID"]=this.databaseInfo.appId),n&&n.headers.forEach(((o,c)=>e[c]=o)),a&&a.headers.forEach(((o,c)=>e[c]=o))}Qo(e,n){const a=bD[e];let o=`${this.qo}/v1/${n}:${a}`;return this.databaseInfo.apiKey&&(o=`${o}?key=${encodeURIComponent(this.databaseInfo.apiKey)}`),o}terminate(){}}class AD{constructor(e){this.Ho=e.Ho,this.Jo=e.Jo}Zo(e){this.Xo=e}Yo(e){this.e_=e}t_(e){this.n_=e}onMessage(e){this.r_=e}close(){this.Jo()}send(e){this.Ho(e)}i_(){this.Xo()}s_(){this.e_()}o_(e){this.n_(e)}__(e){this.r_(e)}}const Jt="WebChannelConnection",Dl=(s,e,n)=>{s.listen(e,(a=>{try{n(a)}catch(o){setTimeout((()=>{throw o}),0)}}))};class eo extends SD{constructor(e){super(e),this.a_=[],this.forceLongPolling=e.forceLongPolling,this.autoDetectLongPolling=e.autoDetectLongPolling,this.useFetchStreams=e.useFetchStreams,this.longPollingOptions=e.longPollingOptions}static u_(){if(!eo.c_){const e=qb();Dl(e,Hb.STAT_EVENT,(n=>{n.stat===Pm.PROXY?he(Jt,"STAT_EVENT: detected buffering proxy"):n.stat===Pm.NOPROXY&&he(Jt,"STAT_EVENT: detected no buffering proxy")})),eo.c_=!0}}zo(e,n,a,o,c){const f=Gm();return new Promise(((p,g)=>{const y=new zb;y.setWithCredentials(!0),y.listenOnce(Bb.COMPLETE,(()=>{try{switch(y.getLastErrorCode()){case oh.NO_ERROR:const b=y.getResponseJson();he(Jt,`XHR for RPC '${e}' ${f} received:`,JSON.stringify(b)),p(b);break;case oh.TIMEOUT:he(Jt,`RPC '${e}' ${f} timed out`),g(new pe(ee.DEADLINE_EXCEEDED,"Request time out"));break;case oh.HTTP_ERROR:const N=y.getStatus();if(he(Jt,`RPC '${e}' ${f} failed with status:`,N,"response text:",y.getResponseText()),N>0){let P=y.getResponseJson();Array.isArray(P)&&(P=P[0]);const G=P?.error;if(G&&G.status&&G.message){const K=(function(ne){const re=ne.toLowerCase().replace(/_/g,"-");return Object.values(ee).indexOf(re)>=0?re:ee.UNKNOWN})(G.status);g(new pe(K,G.message))}else g(new pe(ee.UNKNOWN,"Server responded with status "+y.getStatus()))}else g(new pe(ee.UNAVAILABLE,"Connection failed."));break;default:Re(9055,{l_:e,streamId:f,h_:y.getLastErrorCode(),P_:y.getLastError()})}}finally{he(Jt,`RPC '${e}' ${f} completed.`)}}));const T=JSON.stringify(o);he(Jt,`RPC '${e}' ${f} sending request:`,o),y.send(n,"POST",T,a,15)}))}T_(e,n,a){const o=Gm(),c=[this.qo,"/","google.firestore.v1.Firestore","/",e,"/channel"],f=this.createWebChannelTransport(),p={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},g=this.longPollingOptions.timeoutSeconds;g!==void 0&&(p.longPollingTimeout=Math.round(1e3*g)),this.useFetchStreams&&(p.useFetchStreams=!0),this.Go(p.initMessageHeaders,n,a),p.encodeInitMessageHeaders=!0;const y=c.join("");he(Jt,`Creating RPC '${e}' stream ${o}: ${y}`,p);const T=f.createWebChannel(y,p);this.I_(T);let b=!1,N=!1;const P=new AD({Ho:G=>{N?he(Jt,`Not sending because RPC '${e}' stream ${o} is closed:`,G):(b||(he(Jt,`Opening RPC '${e}' stream ${o} transport.`),T.open(),b=!0),he(Jt,`RPC '${e}' stream ${o} sending:`,G),T.send(G))},Jo:()=>T.close()});return Dl(T,Pl.EventType.OPEN,(()=>{N||(he(Jt,`RPC '${e}' stream ${o} transport opened.`),P.i_())})),Dl(T,Pl.EventType.CLOSE,(()=>{N||(N=!0,he(Jt,`RPC '${e}' stream ${o} transport closed`),P.o_(),this.E_(T))})),Dl(T,Pl.EventType.ERROR,(G=>{N||(N=!0,Jl(Jt,`RPC '${e}' stream ${o} transport errored. Name:`,G.name,"Message:",G.message),P.o_(new pe(ee.UNAVAILABLE,"The operation could not be completed")))})),Dl(T,Pl.EventType.MESSAGE,(G=>{if(!N){const K=G.data[0];mt(!!K,16349);const Y=K,ne=Y?.error||Y[0]?.error;if(ne){he(Jt,`RPC '${e}' stream ${o} received error:`,ne);const re=ne.status;let oe=(function(_e){const C=It[_e];if(C!==void 0)return O2(C)})(re),de=ne.message;re==="NOT_FOUND"&&de.includes("database")&&de.includes("does not exist")&&de.includes(this.databaseId.database)&&Jl(`Database '${this.databaseId.database}' not found. Please check your project configuration.`),oe===void 0&&(oe=ee.INTERNAL,de="Unknown error status: "+re+" with message "+ne.message),N=!0,P.o_(new pe(oe,de)),T.close()}else he(Jt,`RPC '${e}' stream ${o} received:`,K),P.__(K)}})),eo.u_(),setTimeout((()=>{P.s_()}),0),P}terminate(){this.a_.forEach((e=>e.close())),this.a_=[]}I_(e){this.a_.push(e)}E_(e){this.a_=this.a_.filter((n=>n===e))}Go(e,n,a){super.Go(e,n,a),this.databaseInfo.apiKey&&(e["x-goog-api-key"]=this.databaseInfo.apiKey)}createWebChannelTransport(){return Fb()}}function wD(s){return new eo(s)}function Sm(){return typeof document<"u"?document:null}function Wh(s){return new M2(s,!0)}eo.c_=!1;class CS{constructor(e,n,a=1e3,o=1.5,c=6e4){this.Ci=e,this.timerId=n,this.R_=a,this.A_=o,this.V_=c,this.d_=0,this.m_=null,this.f_=Date.now(),this.reset()}reset(){this.d_=0}g_(){this.d_=this.V_}p_(e){this.cancel();const n=Math.floor(this.d_+this.y_()),a=Math.max(0,Date.now()-this.f_),o=Math.max(0,n-a);o>0&&he("ExponentialBackoff",`Backing off for ${o} ms (base delay: ${this.d_} ms, delay with jitter: ${n} ms, last attempt: ${a} ms ago)`),this.m_=this.Ci.enqueueAfterDelay(this.timerId,o,(()=>(this.f_=Date.now(),e()))),this.d_*=this.A_,this.d_<this.R_&&(this.d_=this.R_),this.d_>this.V_&&(this.d_=this.V_)}w_(){this.m_!==null&&(this.m_.skipDelay(),this.m_=null)}cancel(){this.m_!==null&&(this.m_.cancel(),this.m_=null)}y_(){return(Math.random()-.5)*this.d_}}const jE="PersistentStream";class ND{constructor(e,n,a,o,c,f,p,g){this.Ci=e,this.b_=a,this.S_=o,this.connection=c,this.authCredentialsProvider=f,this.appCheckCredentialsProvider=p,this.listener=g,this.state=0,this.D_=0,this.C_=null,this.v_=null,this.stream=null,this.F_=0,this.M_=new CS(e,n)}x_(){return this.state===1||this.state===5||this.O_()}O_(){return this.state===2||this.state===3}start(){this.F_=0,this.state!==4?this.auth():this.N_()}async stop(){this.x_()&&await this.close(0)}B_(){this.state=0,this.M_.reset()}L_(){this.O_()&&this.C_===null&&(this.C_=this.Ci.enqueueAfterDelay(this.b_,6e4,(()=>this.k_())))}K_(e){this.q_(),this.stream.send(e)}async k_(){if(this.O_())return this.close(0)}q_(){this.C_&&(this.C_.cancel(),this.C_=null)}U_(){this.v_&&(this.v_.cancel(),this.v_=null)}async close(e,n){this.q_(),this.U_(),this.M_.cancel(),this.D_++,e!==4?this.M_.reset():n&&n.code===ee.RESOURCE_EXHAUSTED?(Xa(n.toString()),Xa("Using maximum backoff delay to prevent overloading the backend."),this.M_.g_()):n&&n.code===ee.UNAUTHENTICATED&&this.state!==3&&(this.authCredentialsProvider.invalidateToken(),this.appCheckCredentialsProvider.invalidateToken()),this.stream!==null&&(this.W_(),this.stream.close(),this.stream=null),this.state=e,await this.listener.t_(n)}W_(){}auth(){this.state=1;const e=this.Q_(this.D_),n=this.D_;Promise.all([this.authCredentialsProvider.getToken(),this.appCheckCredentialsProvider.getToken()]).then((([a,o])=>{this.D_===n&&this.G_(a,o)}),(a=>{e((()=>{const o=new pe(ee.UNKNOWN,"Fetching auth token failed: "+a.message);return this.z_(o)}))}))}G_(e,n){const a=this.Q_(this.D_);this.stream=this.j_(e,n),this.stream.Zo((()=>{a((()=>this.listener.Zo()))})),this.stream.Yo((()=>{a((()=>(this.state=2,this.v_=this.Ci.enqueueAfterDelay(this.S_,1e4,(()=>(this.O_()&&(this.state=3),Promise.resolve()))),this.listener.Yo())))})),this.stream.t_((o=>{a((()=>this.z_(o)))})),this.stream.onMessage((o=>{a((()=>++this.F_==1?this.H_(o):this.onNext(o)))}))}N_(){this.state=5,this.M_.p_((async()=>{this.state=0,this.start()}))}z_(e){return he(jE,`close with error: ${e}`),this.stream=null,this.close(4,e)}Q_(e){return n=>{this.Ci.enqueueAndForget((()=>this.D_===e?n():(he(jE,"stream callback skipped by getCloseGuardedDispatcher."),Promise.resolve())))}}}class RD extends ND{constructor(e,n,a,o,c,f){super(e,"write_stream_connection_backoff","write_stream_idle","health_check_timeout",n,a,o,f),this.serializer=c}get Y_(){return this.F_>0}start(){this.lastStreamToken=void 0,super.start()}W_(){this.Y_&&this.ea([])}j_(e,n){return this.connection.T_("Write",e,n)}H_(e){return mt(!!e.streamToken,31322),this.lastStreamToken=e.streamToken,mt(!e.writeResults||e.writeResults.length===0,55816),this.listener.ta()}onNext(e){mt(!!e.streamToken,12678),this.lastStreamToken=e.streamToken,this.M_.reset();const n=H2(e.writeResults,e.commitTime),a=Zr(e.commitTime);return this.listener.na(a,n)}ra(){const e={};e.database=U2(this.serializer),this.K_(e)}ea(e){const n={streamToken:this.lastStreamToken,writes:e.map((a=>B2(this.serializer,a)))};this.K_(n)}}class xD{}class ID extends xD{constructor(e,n,a,o){super(),this.authCredentials=e,this.appCheckCredentials=n,this.connection=a,this.serializer=o,this.ia=!1}sa(){if(this.ia)throw new pe(ee.FAILED_PRECONDITION,"The client has already been terminated.")}Wo(e,n,a,o){return this.sa(),Promise.all([this.authCredentials.getToken(),this.appCheckCredentials.getToken()]).then((([c,f])=>this.connection.Wo(e,qm(n,a),o,c,f))).catch((c=>{throw c.name==="FirebaseError"?(c.code===ee.UNAUTHENTICATED&&(this.authCredentials.invalidateToken(),this.appCheckCredentials.invalidateToken()),c):new pe(ee.UNKNOWN,c.toString())}))}jo(e,n,a,o,c){return this.sa(),Promise.all([this.authCredentials.getToken(),this.appCheckCredentials.getToken()]).then((([f,p])=>this.connection.jo(e,qm(n,a),o,f,p,c))).catch((f=>{throw f.name==="FirebaseError"?(f.code===ee.UNAUTHENTICATED&&(this.authCredentials.invalidateToken(),this.appCheckCredentials.invalidateToken()),f):new pe(ee.UNKNOWN,f.toString())}))}terminate(){this.ia=!0,this.connection.terminate()}}function CD(s,e,n,a){return new ID(s,e,n,a)}class DD{constructor(e,n){this.asyncQueue=e,this.onlineStateHandler=n,this.state="Unknown",this.oa=0,this._a=null,this.aa=!0}ua(){this.oa===0&&(this.ca("Unknown"),this._a=this.asyncQueue.enqueueAfterDelay("online_state_timeout",1e4,(()=>(this._a=null,this.la("Backend didn't respond within 10 seconds."),this.ca("Offline"),Promise.resolve()))))}ha(e){this.state==="Online"?this.ca("Unknown"):(this.oa++,this.oa>=1&&(this.Pa(),this.la(`Connection failed 1 times. Most recent error: ${e.toString()}`),this.ca("Offline")))}set(e){this.Pa(),this.oa=0,e==="Online"&&(this.aa=!1),this.ca(e)}ca(e){e!==this.state&&(this.state=e,this.onlineStateHandler(e))}la(e){const n=`Could not reach Cloud Firestore backend. ${e} This typically indicates that your device does not have a healthy Internet connection at the moment. The client will operate in offline mode until it is able to successfully connect to the backend.`;this.aa?(Xa(n),this.aa=!1):he("OnlineStateTracker",n)}Pa(){this._a!==null&&(this._a.cancel(),this._a=null)}}const mc="RemoteStore";class jD{constructor(e,n,a,o,c){this.localStore=e,this.datastore=n,this.asyncQueue=a,this.remoteSyncer={},this.Ta=[],this.Ia=new Map,this.Ea=new Set,this.Ra=[],this.Aa=c,this.Aa.Mo((f=>{a.enqueueAndForget((async()=>{gc(this)&&(he(mc,"Restarting streams for network reachability change."),await(async function(g){const y=Ze(g);y.Ea.add(4),await pc(y),y.Va.set("Unknown"),y.Ea.delete(4),await Xh(y)})(this))}))})),this.Va=new DD(a,o)}}async function Xh(s){if(gc(s))for(const e of s.Ra)await e(!0)}async function pc(s){for(const e of s.Ra)await e(!1)}function gc(s){return Ze(s).Ea.size===0}async function DS(s,e,n){if(!dc(e))throw e;s.Ea.add(1),await pc(s),s.Va.set("Offline"),n||(n=()=>yD(s.localStore)),s.asyncQueue.enqueueRetryable((async()=>{he(mc,"Retrying IndexedDB access"),await n(),s.Ea.delete(1),await Xh(s)}))}function jS(s,e){return e().catch((n=>DS(s,n,e)))}async function Jh(s){const e=Ze(s),n=ra(e);let a=e.Ta.length>0?e.Ta[e.Ta.length-1].batchId:Np;for(;OD(e);)try{const o=await vD(e.localStore,a);if(o===null){e.Ta.length===0&&n.L_();break}a=o.batchId,MD(e,o)}catch(o){await DS(e,o)}OS(e)&&MS(e)}function OD(s){return gc(s)&&s.Ta.length<10}function MD(s,e){s.Ta.push(e);const n=ra(s);n.O_()&&n.Y_&&n.ea(e.mutations)}function OS(s){return gc(s)&&!ra(s).x_()&&s.Ta.length>0}function MS(s){ra(s).start()}async function PD(s){ra(s).ra()}async function kD(s){const e=ra(s);for(const n of s.Ta)e.ea(n.mutations)}async function LD(s,e,n){const a=s.Ta.shift(),o=Pp.from(a,e,n);await jS(s,(()=>s.remoteSyncer.applySuccessfulWrite(o))),await Jh(s)}async function VD(s,e){e&&ra(s).Y_&&await(async function(a,o){if((function(f){return j2(f)&&f!==ee.ABORTED})(o.code)){const c=a.Ta.shift();ra(a).B_(),await jS(a,(()=>a.remoteSyncer.rejectFailedWrite(c.batchId,o))),await Jh(a)}})(s,e),OS(s)&&MS(s)}async function OE(s,e){const n=Ze(s);n.asyncQueue.verifyOperationInProgress(),he(mc,"RemoteStore received new credentials");const a=gc(n);n.Ea.add(3),await pc(n),a&&n.Va.set("Unknown"),await n.remoteSyncer.handleCredentialChange(e),n.Ea.delete(3),await Xh(n)}async function UD(s,e){const n=Ze(s);e?(n.Ea.delete(2),await Xh(n)):e||(n.Ea.add(2),await pc(n),n.Va.set("Unknown"))}function ra(s){return s.fa||(s.fa=(function(n,a,o){const c=Ze(n);return c.sa(),new RD(a,c.connection,c.authCredentials,c.appCheckCredentials,c.serializer,o)})(s.datastore,s.asyncQueue,{Zo:()=>Promise.resolve(),Yo:PD.bind(null,s),t_:VD.bind(null,s),ta:kD.bind(null,s),na:LD.bind(null,s)}),s.Ra.push((async e=>{e?(s.fa.B_(),await Jh(s)):(await s.fa.stop(),s.Ta.length>0&&(he(mc,`Stopping write stream with ${s.Ta.length} pending writes`),s.Ta=[]))}))),s.fa}class Up{constructor(e,n,a,o,c){this.asyncQueue=e,this.timerId=n,this.targetTimeMs=a,this.op=o,this.removalCallback=c,this.deferred=new Ya,this.then=this.deferred.promise.then.bind(this.deferred.promise),this.deferred.promise.catch((f=>{}))}get promise(){return this.deferred.promise}static createAndSchedule(e,n,a,o,c){const f=Date.now()+a,p=new Up(e,n,f,o,c);return p.start(a),p}start(e){this.timerHandle=setTimeout((()=>this.handleDelayElapsed()),e)}skipDelay(){return this.handleDelayElapsed()}cancel(e){this.timerHandle!==null&&(this.clearTimeout(),this.deferred.reject(new pe(ee.CANCELLED,"Operation cancelled"+(e?": "+e:""))))}handleDelayElapsed(){this.asyncQueue.enqueueAndForget((()=>this.timerHandle!==null?(this.clearTimeout(),this.op().then((e=>this.deferred.resolve(e)))):Promise.resolve()))}clearTimeout(){this.timerHandle!==null&&(this.removalCallback(this),clearTimeout(this.timerHandle),this.timerHandle=null)}}function PS(s,e){if(Xa("AsyncQueue",`${e}: ${s}`),dc(s))return new pe(ee.UNAVAILABLE,`${e}: ${s}`);throw s}class zD{constructor(){this.queries=ME(),this.onlineState="Unknown",this.Ca=new Set}terminate(){(function(n,a){const o=Ze(n),c=o.queries;o.queries=ME(),c.forEach(((f,p)=>{for(const g of p.ba)g.onError(a)}))})(this,new pe(ee.ABORTED,"Firestore shutting down"))}}function ME(){return new tr((s=>dS(s)),hS)}function BD(s){s.Ca.forEach((e=>{e.next()}))}var PE,kE;(kE=PE||(PE={})).Ma="default",kE.Cache="cache";const HD="SyncEngine";class qD{constructor(e,n,a,o,c,f){this.localStore=e,this.remoteStore=n,this.eventManager=a,this.sharedClientState=o,this.currentUser=c,this.maxConcurrentLimboResolutions=f,this.Pu={},this.Tu=new tr((p=>dS(p)),hS),this.Iu=new Map,this.Eu=new Set,this.Ru=new _n(Ne.comparator),this.Au=new Map,this.Vu=new kp,this.du={},this.mu=new Map,this.fu=lo.ar(),this.onlineState="Unknown",this.gu=void 0}get isPrimaryClient(){return this.gu===!0}}async function FD(s,e,n){const a=QD(s);try{const o=await(function(f,p){const g=Ze(f),y=lt.now(),T=p.reduce(((P,G)=>P.add(G.key)),en());let b,N;return g.persistence.runTransaction("Locally write mutations","readwrite",(P=>{let G=Rh(),K=en();return g.xs.getEntries(P,T).next((Y=>{G=Y,G.forEach(((ne,re)=>{re.isValidDocument()||(K=K.add(ne))}))})).next((()=>g.localDocuments.getOverlayedDocuments(P,G))).next((Y=>{b=Y;const ne=[];for(const re of p){const oe=x2(re,b.get(re.key).overlayedDocument);oe!=null&&ne.push(new nr(re.key,oe,sS(oe.value.mapValue),ls.exists(!0)))}return g.mutationQueue.addMutationBatch(P,y,ne,p)})).next((Y=>{N=Y;const ne=Y.applyToLocalDocumentSet(b,K);return g.documentOverlayCache.saveOverlays(P,Y.batchId,ne)}))})).then((()=>({batchId:N.batchId,changes:mS(b)})))})(a.localStore,e);a.sharedClientState.addPendingMutation(o.batchId),(function(f,p,g){let y=f.du[f.currentUser.toKey()];y||(y=new _n(Be)),y=y.insert(p,g),f.du[f.currentUser.toKey()]=y})(a,o.batchId,n),await Zh(a,o.changes),await Jh(a.remoteStore)}catch(o){const c=PS(o,"Failed to persist write");n.reject(c)}}function LE(s,e,n){const a=Ze(s);if(a.isPrimaryClient&&n===0||!a.isPrimaryClient&&n===1){const o=[];a.Tu.forEach(((c,f)=>{const p=f.view.va(e);p.snapshot&&o.push(p.snapshot)})),(function(f,p){const g=Ze(f);g.onlineState=p;let y=!1;g.queries.forEach(((T,b)=>{for(const N of b.ba)N.va(p)&&(y=!0)})),y&&BD(g)})(a.eventManager,e),o.length&&a.Pu.J_(o),a.onlineState=e,a.isPrimaryClient&&a.sharedClientState.setOnlineState(e)}}async function GD(s,e){const n=Ze(s),a=e.batch.batchId;try{const o=await _D(n.localStore,e);LS(n,a,null),kS(n,a),n.sharedClientState.updateMutationState(a,"acknowledged"),await Zh(n,o)}catch(o){await Ap(o)}}async function YD(s,e,n){const a=Ze(s);try{const o=await(function(f,p){const g=Ze(f);return g.persistence.runTransaction("Reject batch","readwrite-primary",(y=>{let T;return g.mutationQueue.lookupMutationBatch(y,p).next((b=>(mt(b!==null,37113),T=b.keys(),g.mutationQueue.removeMutationBatch(y,b)))).next((()=>g.mutationQueue.performConsistencyCheck(y))).next((()=>g.documentOverlayCache.removeOverlaysForBatchId(y,T,p))).next((()=>g.localDocuments.recalculateAndSaveOverlaysForDocumentKeys(y,T))).next((()=>g.localDocuments.getDocuments(y,T)))}))})(a.localStore,e);LS(a,e,n),kS(a,e),a.sharedClientState.updateMutationState(e,"rejected",n),await Zh(a,o)}catch(o){await Ap(o)}}function kS(s,e){(s.mu.get(e)||[]).forEach((n=>{n.resolve()})),s.mu.delete(e)}function LS(s,e,n){const a=Ze(s);let o=a.du[a.currentUser.toKey()];if(o){const c=o.get(e);c&&(n?c.reject(n):c.resolve(),o=o.remove(e)),a.du[a.currentUser.toKey()]=o}}async function Zh(s,e,n){const a=Ze(s),o=[],c=[],f=[];a.Tu.isEmpty()||(a.Tu.forEach(((p,g)=>{f.push(a.pu(g,e,n).then((y=>{if((y||n)&&a.isPrimaryClient){const T=y?!y.fromCache:n?.targetChanges.get(g.targetId)?.current;a.sharedClientState.updateQueryState(g.targetId,T?"current":"not-current")}if(y){o.push(y);const T=Vp.Es(g.targetId,y);c.push(T)}})))})),await Promise.all(f),a.Pu.J_(o),await(async function(g,y){const T=Ze(g);try{await T.persistence.runTransaction("notifyLocalViewChanges","readwrite",(b=>Z.forEach(y,(N=>Z.forEach(N.Ts,(P=>T.persistence.referenceDelegate.addReference(b,N.targetId,P))).next((()=>Z.forEach(N.Is,(P=>T.persistence.referenceDelegate.removeReference(b,N.targetId,P)))))))))}catch(b){if(!dc(b))throw b;he(mD,"Failed to update sequence numbers: "+b)}for(const b of y){const N=b.targetId;if(!b.fromCache){const P=T.vs.get(N),G=P.snapshotVersion,K=P.withLastLimboFreeSnapshotVersion(G);T.vs=T.vs.insert(N,K)}}})(a.localStore,c))}async function KD(s,e){const n=Ze(s);if(!n.currentUser.isEqual(e)){he(HD,"User change. New user:",e.toKey());const a=await IS(n.localStore,e);n.currentUser=e,(function(c,f){c.mu.forEach((p=>{p.forEach((g=>{g.reject(new pe(ee.CANCELLED,f))}))})),c.mu.clear()})(n,"'waitForPendingWrites' promise is rejected due to a user change."),n.sharedClientState.handleUserChange(e,a.removedBatchIds,a.addedBatchIds),await Zh(n,a.Ns)}}function QD(s){const e=Ze(s);return e.remoteStore.remoteSyncer.applySuccessfulWrite=GD.bind(null,e),e.remoteStore.remoteSyncer.rejectFailedWrite=YD.bind(null,e),e}class Dh{constructor(){this.kind="memory",this.synchronizeTabs=!1}async initialize(e){this.serializer=Wh(e.databaseInfo.databaseId),this.sharedClientState=this.Du(e),this.persistence=this.Cu(e),await this.persistence.start(),this.localStore=this.vu(e),this.gcScheduler=this.Fu(e,this.localStore),this.indexBackfillerScheduler=this.Mu(e,this.localStore)}Fu(e,n){return null}Mu(e,n){return null}vu(e){return gD(this.persistence,new fD,e.initialUser,this.serializer)}Cu(e){return new xS(Lp.Vi,this.serializer)}Du(e){return new ED}async terminate(){this.gcScheduler?.stop(),this.indexBackfillerScheduler?.stop(),this.sharedClientState.shutdown(),await this.persistence.shutdown()}}Dh.provider={build:()=>new Dh};class $D extends Dh{constructor(e){super(),this.cacheSizeBytes=e}Fu(e,n){mt(this.persistence.referenceDelegate instanceof Ch,46915);const a=this.persistence.referenceDelegate.garbageCollector;return new J2(a,e.asyncQueue,n)}Cu(e){const n=this.cacheSizeBytes!==void 0?pn.withCacheSize(this.cacheSizeBytes):pn.DEFAULT;return new xS((a=>Ch.Vi(a,n)),this.serializer)}}class Ym{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=a=>LE(this.syncEngine,a,1),this.remoteStore.remoteSyncer.handleCredentialChange=KD.bind(null,this.syncEngine),await UD(this.remoteStore,this.syncEngine.isPrimaryClient))}createEventManager(e){return(function(){return new zD})()}createDatastore(e){const n=Wh(e.databaseInfo.databaseId),a=wD(e.databaseInfo);return CD(e.authCredentials,e.appCheckCredentials,a,n)}createRemoteStore(e){return(function(a,o,c,f,p){return new jD(a,o,c,f,p)})(this.localStore,this.datastore,e.asyncQueue,(n=>LE(this.syncEngine,n,0)),(function(){return DE.v()?new DE:new TD})())}createSyncEngine(e,n){return(function(o,c,f,p,g,y,T){const b=new qD(o,c,f,p,g,y);return T&&(b.gu=!0),b})(this.localStore,this.remoteStore,this.eventManager,this.sharedClientState,e.initialUser,e.maxConcurrentLimboResolutions,n)}async terminate(){await(async function(n){const a=Ze(n);he(mc,"RemoteStore shutting down."),a.Ea.add(5),await pc(a),a.Aa.shutdown(),a.Va.set("Unknown")})(this.remoteStore),this.datastore?.terminate(),this.eventManager?.terminate()}}Ym.provider={build:()=>new Ym};const oa="FirestoreClient";class WD{constructor(e,n,a,o,c){this.authCredentials=e,this.appCheckCredentials=n,this.asyncQueue=a,this._databaseInfo=o,this.user=Zt.UNAUTHENTICATED,this.clientId=bp.newId(),this.authCredentialListener=()=>Promise.resolve(),this.appCheckCredentialListener=()=>Promise.resolve(),this._uninitializedComponentsProvider=c,this.authCredentials.start(a,(async f=>{he(oa,"Received user=",f.uid),await this.authCredentialListener(f),this.user=f})),this.appCheckCredentials.start(a,(f=>(he(oa,"Received new app check token=",f),this.appCheckCredentialListener(f,this.user))))}get configuration(){return{asyncQueue:this.asyncQueue,databaseInfo:this._databaseInfo,clientId:this.clientId,authCredentials:this.authCredentials,appCheckCredentials:this.appCheckCredentials,initialUser:this.user,maxConcurrentLimboResolutions:100}}setCredentialChangeListener(e){this.authCredentialListener=e}setAppCheckTokenChangeListener(e){this.appCheckCredentialListener=e}terminate(){this.asyncQueue.enterRestrictedMode();const e=new Ya;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 a=PS(n,"Failed to shutdown persistence");e.reject(a)}})),e.promise}}async function Am(s,e){s.asyncQueue.verifyOperationInProgress(),he(oa,"Initializing OfflineComponentProvider");const n=s.configuration;await e.initialize(n);let a=n.initialUser;s.setCredentialChangeListener((async o=>{a.isEqual(o)||(await IS(e.localStore,o),a=o)})),e.persistence.setDatabaseDeletedListener((()=>s.terminate())),s._offlineComponents=e}async function VE(s,e){s.asyncQueue.verifyOperationInProgress();const n=await XD(s);he(oa,"Initializing OnlineComponentProvider"),await e.initialize(n,s.configuration),s.setCredentialChangeListener((a=>OE(e.remoteStore,a))),s.setAppCheckTokenChangeListener(((a,o)=>OE(e.remoteStore,o))),s._onlineComponents=e}async function XD(s){if(!s._offlineComponents)if(s._uninitializedComponentsProvider){he(oa,"Using user provided OfflineComponentProvider");try{await Am(s,s._uninitializedComponentsProvider._offline)}catch(e){const n=e;if(!(function(o){return o.name==="FirebaseError"?o.code===ee.FAILED_PRECONDITION||o.code===ee.UNIMPLEMENTED:!(typeof DOMException<"u"&&o instanceof DOMException)||o.code===22||o.code===20||o.code===11})(n))throw n;Jl("Error using user provided cache. Falling back to memory cache: "+n),await Am(s,new Dh)}}else he(oa,"Using default OfflineComponentProvider"),await Am(s,new $D(void 0));return s._offlineComponents}async function JD(s){return s._onlineComponents||(s._uninitializedComponentsProvider?(he(oa,"Using user provided OnlineComponentProvider"),await VE(s,s._uninitializedComponentsProvider._online)):(he(oa,"Using default OnlineComponentProvider"),await VE(s,new Ym))),s._onlineComponents}function ZD(s){return JD(s).then((e=>e.syncEngine))}function ej(s,e){const n=new Ya;return s.asyncQueue.enqueueAndForget((async()=>FD(await ZD(s),e,n))),n.promise}function VS(s){const e={};return s.timeoutSeconds!==void 0&&(e.timeoutSeconds=s.timeoutSeconds),e}const tj="ComponentProvider",UE=new Map;function nj(s,e,n,a,o){return new $C(s,e,n,o.host,o.ssl,o.experimentalForceLongPolling,o.experimentalAutoDetectLongPolling,VS(o.experimentalLongPollingOptions),o.useFetchStreams,o.isUsingEmulator,a)}const US="firestore.googleapis.com",zE=!0;class BE{constructor(e){if(e.host===void 0){if(e.ssl!==void 0)throw new pe(ee.INVALID_ARGUMENT,"Can't provide ssl option if host option is not set");this.host=US,this.ssl=zE}else this.host=e.host,this.ssl=e.ssl??zE;if(this.isUsingEmulator=e.emulatorOptions!==void 0,this.credentials=e.credentials,this.ignoreUndefinedProperties=!!e.ignoreUndefinedProperties,this.localCache=e.localCache,e.cacheSizeBytes===void 0)this.cacheSizeBytes=RS;else{if(e.cacheSizeBytes!==-1&&e.cacheSizeBytes<W2)throw new pe(ee.INVALID_ARGUMENT,"cacheSizeBytes must be at least 1048576");this.cacheSizeBytes=e.cacheSizeBytes}LC("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=VS(e.experimentalLongPollingOptions??{}),(function(a){if(a.timeoutSeconds!==void 0){if(isNaN(a.timeoutSeconds))throw new pe(ee.INVALID_ARGUMENT,`invalid long polling timeout: ${a.timeoutSeconds} (must not be NaN)`);if(a.timeoutSeconds<5)throw new pe(ee.INVALID_ARGUMENT,`invalid long polling timeout: ${a.timeoutSeconds} (minimum allowed value is 5)`);if(a.timeoutSeconds>30)throw new pe(ee.INVALID_ARGUMENT,`invalid long polling timeout: ${a.timeoutSeconds} (maximum allowed value is 30)`)}})(this.experimentalLongPollingOptions),this.useFetchStreams=!!e.useFetchStreams}isEqual(e){return this.host===e.host&&this.ssl===e.ssl&&this.credentials===e.credentials&&this.cacheSizeBytes===e.cacheSizeBytes&&this.experimentalForceLongPolling===e.experimentalForceLongPolling&&this.experimentalAutoDetectLongPolling===e.experimentalAutoDetectLongPolling&&(function(a,o){return a.timeoutSeconds===o.timeoutSeconds})(this.experimentalLongPollingOptions,e.experimentalLongPollingOptions)&&this.ignoreUndefinedProperties===e.ignoreUndefinedProperties&&this.useFetchStreams===e.useFetchStreams}}class ed{constructor(e,n,a,o){this._authCredentials=e,this._appCheckCredentials=n,this._databaseId=a,this._app=o,this.type="firestore-lite",this._persistenceKey="(lite)",this._settings=new BE({}),this._settingsFrozen=!1,this._emulatorOptions={},this._terminateTask="notTerminated"}get app(){if(!this._app)throw new pe(ee.FAILED_PRECONDITION,"Firestore was not initialized using the Firebase SDK. 'app' is not available");return this._app}get _initialized(){return this._settingsFrozen}get _terminated(){return this._terminateTask!=="notTerminated"}_setSettings(e){if(this._settingsFrozen)throw new pe(ee.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 BE(e),this._emulatorOptions=e.emulatorOptions||{},e.credentials!==void 0&&(this._authCredentials=(function(a){if(!a)return new RC;switch(a.type){case"firstParty":return new DC(a.sessionIndex||"0",a.iamToken||null,a.authTokenFactory||null);case"provider":return a.client;default:throw new pe(ee.INVALID_ARGUMENT,"makeAuthCredentialsProvider failed due to invalid credential type")}})(e.credentials))}_getSettings(){return this._settings}_getEmulatorOptions(){return this._emulatorOptions}_freezeSettings(){return this._settingsFrozen=!0,this._settings}_delete(){return this._terminateTask==="notTerminated"&&(this._terminateTask=this._terminate()),this._terminateTask}async _restart(){this._terminateTask==="notTerminated"?await this._terminate():this._terminateTask="notTerminated"}toJSON(){return{app:this._app,databaseId:this._databaseId,settings:this._settings}}_terminate(){return(function(n){const a=UE.get(n);a&&(he(tj,"Removing Datastore"),UE.delete(n),a.terminate())})(this),Promise.resolve()}}function ij(s,e,n,a={}){s=$b(s,ed);const o=fo(e),c=s._getSettings(),f={...c,emulatorOptions:s._getEmulatorOptions()},p=`${e}:${n}`;o&&(ET(`https://${p}`),TT("Firestore",!0)),c.host!==US&&c.host!==p&&Jl("Host has been set in both settings() and connectFirestoreEmulator(), emulator host will be used.");const g={...c,host:p,ssl:o,emulatorOptions:a};if(!Qa(g,f)&&(s._setSettings(g),a.mockUserToken)){let y,T;if(typeof a.mockUserToken=="string")y=a.mockUserToken,T=Zt.MOCK_USER;else{y=NN(a.mockUserToken,s._app?.options.projectId);const b=a.mockUserToken.sub||a.mockUserToken.user_id;if(!b)throw new pe(ee.INVALID_ARGUMENT,"mockUserToken must contain 'sub' or 'user_id' field!");T=new Zt(b)}s._authCredentials=new xC(new Yb(y,T))}}class zp{constructor(e,n,a){this.converter=n,this._query=a,this.type="query",this.firestore=e}withConverter(e){return new zp(this.firestore,e,this._query)}}class tn{constructor(e,n,a){this.converter=n,this._key=a,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 ia(this.firestore,this.converter,this._key.path.popLast())}withConverter(e){return new tn(this.firestore,e,this._key)}toJSON(){return{type:tn._jsonSchemaVersion,referencePath:this._key.toString()}}static fromJSON(e,n,a){if(hc(n,tn._jsonSchema))return new tn(e,a||null,new Ne(ct.fromString(n.referencePath)))}}tn._jsonSchemaVersion="firestore/documentReference/1.0",tn._jsonSchema={type:Dt("string",tn._jsonSchemaVersion),referencePath:Dt("string")};class ia extends zp{constructor(e,n,a){super(e,n,h2(a)),this._path=a,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 Ne(e))}withConverter(e){return new ia(this.firestore,e,this._path)}}function sj(s,e,...n){if(s=Ee(s),Kb("collection","path",e),s instanceof ed){const a=ct.fromString(e,...n);return cE(a),new ia(s,null,a)}{if(!(s instanceof tn||s instanceof ia))throw new pe(ee.INVALID_ARGUMENT,"Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");const a=s._path.child(ct.fromString(e,...n));return cE(a),new ia(s.firestore,null,a)}}function aj(s,e,...n){if(s=Ee(s),arguments.length===1&&(e=bp.newId()),Kb("doc","path",e),s instanceof ed){const a=ct.fromString(e,...n);return lE(a),new tn(s,null,new Ne(a))}{if(!(s instanceof tn||s instanceof ia))throw new pe(ee.INVALID_ARGUMENT,"Expected first argument to doc() to be a CollectionReference, a DocumentReference or FirebaseFirestore");const a=s._path.child(ct.fromString(e,...n));return lE(a),new tn(s.firestore,s instanceof ia?s.converter:null,new Ne(a))}}const HE="AsyncQueue";class qE{constructor(e=Promise.resolve()){this.Yu=[],this.ec=!1,this.tc=[],this.nc=null,this.rc=!1,this.sc=!1,this.oc=[],this.M_=new CS(this,"async_queue_retry"),this._c=()=>{const a=Sm();a&&he(HE,"Visibility state changed to "+a.visibilityState),this.M_.w_()},this.ac=e;const n=Sm();n&&typeof n.addEventListener=="function"&&n.addEventListener("visibilitychange",this._c)}get isShuttingDown(){return this.ec}enqueueAndForget(e){this.enqueue(e)}enqueueAndForgetEvenWhileRestricted(e){this.uc(),this.cc(e)}enterRestrictedMode(e){if(!this.ec){this.ec=!0,this.sc=e||!1;const n=Sm();n&&typeof n.removeEventListener=="function"&&n.removeEventListener("visibilitychange",this._c)}}enqueue(e){if(this.uc(),this.ec)return new Promise((()=>{}));const n=new Ya;return this.cc((()=>this.ec&&this.sc?Promise.resolve():(e().then(n.resolve,n.reject),n.promise))).then((()=>n.promise))}enqueueRetryable(e){this.enqueueAndForget((()=>(this.Yu.push(e),this.lc())))}async lc(){if(this.Yu.length!==0){try{await this.Yu[0](),this.Yu.shift(),this.M_.reset()}catch(e){if(!dc(e))throw e;he(HE,"Operation failed with retryable error: "+e)}this.Yu.length>0&&this.M_.p_((()=>this.lc()))}}cc(e){const n=this.ac.then((()=>(this.rc=!0,e().catch((a=>{throw this.nc=a,this.rc=!1,Xa("INTERNAL UNHANDLED ERROR: ",FE(a)),a})).then((a=>(this.rc=!1,a))))));return this.ac=n,n}enqueueAfterDelay(e,n,a){this.uc(),this.oc.indexOf(e)>-1&&(n=0);const o=Up.createAndSchedule(this,e,n,a,(c=>this.hc(c)));return this.tc.push(o),o}uc(){this.nc&&Re(47125,{Pc:FE(this.nc)})}verifyOperationInProgress(){}async Tc(){let e;do e=this.ac,await e;while(e!==this.ac)}Ic(e){for(const n of this.tc)if(n.timerId===e)return!0;return!1}Ec(e){return this.Tc().then((()=>{this.tc.sort(((n,a)=>n.targetTimeMs-a.targetTimeMs));for(const n of this.tc)if(n.skipDelay(),e!=="all"&&n.timerId===e)break;return this.Tc()}))}Rc(e){this.oc.push(e)}hc(e){const n=this.tc.indexOf(e);this.tc.splice(n,1)}}function FE(s){let e=s.message||"";return s.stack&&(e=s.stack.includes(s.message)?s.stack:s.message+` `+s.stack),e}class zS extends ed{constructor(e,n,a,o){super(e,n,a,o),this.type="firestore",this._queue=new qE,this._persistenceKey=o?.name||"[DEFAULT]"}async _terminate(){if(this._firestoreClient){const e=this._firestoreClient.terminate();this._queue=new qE(e),this._firestoreClient=void 0,await e}}}function rj(s,e){const n=typeof s=="object"?s:wT(),a=typeof s=="string"?s:Sh,o=np(n,"firestore").getImmediate({identifier:a});if(!o._initialized){const c=AN("firestore");c&&ij(o,...c)}return o}function oj(s){if(s._terminated)throw new pe(ee.FAILED_PRECONDITION,"The client has already been terminated.");return s._firestoreClient||lj(s),s._firestoreClient}function lj(s){const e=s._freezeSettings(),n=nj(s._databaseId,s._app?.options.appId||"",s._persistenceKey,s._app?.options.apiKey,e);s._componentsProvider||e.localCache?._offlineComponentProvider&&e.localCache?._onlineComponentProvider&&(s._componentsProvider={_offline:e.localCache._offlineComponentProvider,_online:e.localCache._onlineComponentProvider}),s._firestoreClient=new WD(s._authCredentials,s._appCheckCredentials,s._queue,n,s._componentsProvider&&(function(o){const c=o?._online.build();return{_offline:o?._offline.build(c),_online:c}})(s._componentsProvider))}class ni{constructor(e){this._byteString=e}static fromBase64String(e){try{return new ni(Mi.fromBase64String(e))}catch(n){throw new pe(ee.INVALID_ARGUMENT,"Failed to construct data from Base64 string: "+n)}}static fromUint8Array(e){return new ni(Mi.fromUint8Array(e))}toBase64(){return this._byteString.toBase64()}toUint8Array(){return this._byteString.toUint8Array()}toString(){return"Bytes(base64: "+this.toBase64()+")"}isEqual(e){return this._byteString.isEqual(e._byteString)}toJSON(){return{type:ni._jsonSchemaVersion,bytes:this.toBase64()}}static fromJSON(e){if(hc(e,ni._jsonSchema))return ni.fromBase64String(e.bytes)}}ni._jsonSchemaVersion="firestore/bytes/1.0",ni._jsonSchema={type:Dt("string",ni._jsonSchemaVersion),bytes:Dt("string")};class BS{constructor(...e){for(let n=0;n<e.length;++n)if(e[n].length===0)throw new pe(ee.INVALID_ARGUMENT,"Invalid field name at argument $(i + 1). Field names must not be empty.");this._internalPath=new $t(e)}isEqual(e){return this._internalPath.isEqual(e._internalPath)}}class HS{constructor(e){this._methodName=e}}class cs{constructor(e,n){if(!isFinite(e)||e<-90||e>90)throw new pe(ee.INVALID_ARGUMENT,"Latitude must be a number between -90 and 90, but was: "+e);if(!isFinite(n)||n<-180||n>180)throw new pe(ee.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}_compareTo(e){return Be(this._lat,e._lat)||Be(this._long,e._long)}toJSON(){return{latitude:this._lat,longitude:this._long,type:cs._jsonSchemaVersion}}static fromJSON(e){if(hc(e,cs._jsonSchema))return new cs(e.latitude,e.longitude)}}cs._jsonSchemaVersion="firestore/geoPoint/1.0",cs._jsonSchema={type:Dt("string",cs._jsonSchemaVersion),latitude:Dt("number"),longitude:Dt("number")};class Di{constructor(e){this._values=(e||[]).map((n=>n))}toArray(){return this._values.map((e=>e))}isEqual(e){return(function(a,o){if(a.length!==o.length)return!1;for(let c=0;c<a.length;++c)if(a[c]!==o[c])return!1;return!0})(this._values,e._values)}toJSON(){return{type:Di._jsonSchemaVersion,vectorValues:this._values}}static fromJSON(e){if(hc(e,Di._jsonSchema)){if(Array.isArray(e.vectorValues)&&e.vectorValues.every((n=>typeof n=="number")))return new Di(e.vectorValues);throw new pe(ee.INVALID_ARGUMENT,"Expected 'vectorValues' field to be a number array")}}}Di._jsonSchemaVersion="firestore/vectorValue/1.0",Di._jsonSchema={type:Dt("string",Di._jsonSchemaVersion),vectorValues:Dt("object")};const cj=/^__.*__$/;class uj{constructor(e,n,a){this.data=e,this.fieldMask=n,this.fieldTransforms=a}toMutation(e,n){return this.fieldMask!==null?new nr(e,this.data,this.fieldMask,n,this.fieldTransforms):new fc(e,this.data,n,this.fieldTransforms)}}function qS(s){switch(s){case 0:case 2:case 1:return!0;case 3:case 4:return!1;default:throw Re(40011,{dataSource:s})}}class Bp{constructor(e,n,a,o,c,f){this.settings=e,this.databaseId=n,this.serializer=a,this.ignoreUndefinedProperties=o,c===void 0&&this.validatePath(),this.fieldTransforms=c||[],this.fieldMask=f||[]}get path(){return this.settings.path}get dataSource(){return this.settings.dataSource}contextWith(e){return new Bp({...this.settings,...e},this.databaseId,this.serializer,this.ignoreUndefinedProperties,this.fieldTransforms,this.fieldMask)}childContextForField(e){const n=this.path?.child(e),a=this.contextWith({path:n,arrayElement:!1});return a.validatePathSegment(e),a}childContextForFieldPath(e){const n=this.path?.child(e),a=this.contextWith({path:n,arrayElement:!1});return a.validatePath(),a}childContextForArray(e){return this.contextWith({path:void 0,arrayElement:!0})}createError(e){return jh(e,this.settings.methodName,this.settings.hasConverter||!1,this.path,this.settings.targetDoc)}contains(e){return this.fieldMask.find((n=>e.isPrefixOf(n)))!==void 0||this.fieldTransforms.find((n=>e.isPrefixOf(n.field)))!==void 0}validatePath(){if(this.path)for(let e=0;e<this.path.length;e++)this.validatePathSegment(this.path.get(e))}validatePathSegment(e){if(e.length===0)throw this.createError("Document fields must not be empty");if(qS(this.dataSource)&&cj.test(e))throw this.createError('Document fields cannot begin and end with "__"')}}class hj{constructor(e,n,a){this.databaseId=e,this.ignoreUndefinedProperties=n,this.serializer=a||Wh(e)}createContext(e,n,a,o=!1){return new Bp({dataSource:e,methodName:n,targetDoc:a,path:$t.emptyPath(),arrayElement:!1,hasConverter:o},this.databaseId,this.serializer,this.ignoreUndefinedProperties)}}function dj(s){const e=s._freezeSettings(),n=Wh(s._databaseId);return new hj(s._databaseId,!!e.ignoreUndefinedProperties,n)}function fj(s,e,n,a,o,c={}){const f=s.createContext(c.merge||c.mergeFields?2:0,e,n,o);KS("Data must be an object, but it was:",f,a);const p=GS(a,f);let g,y;if(c.merge)g=new si(f.fieldMask),y=f.fieldTransforms;else if(c.mergeFields){const T=[];for(const b of c.mergeFields){const N=Hp(e,b,n);if(!f.contains(N))throw new pe(ee.INVALID_ARGUMENT,`Field '${N}' is specified in your field mask but missing from your input data.`);gj(T,N)||T.push(N)}g=new si(T),y=f.fieldTransforms.filter((b=>g.covers(b.field)))}else g=null,y=f.fieldTransforms;return new uj(new ti(p),g,y)}function FS(s,e){if(YS(s=Ee(s)))return KS("Unsupported field value:",e,s),GS(s,e);if(s instanceof HS)return(function(a,o){if(!qS(o.dataSource))throw o.createError(`${a._methodName}() can only be used with update() and set()`);if(!o.path)throw o.createError(`${a._methodName}() is not currently supported inside arrays`);const c=a._toFieldTransform(o);c&&o.fieldTransforms.push(c)})(s,e),null;if(s===void 0&&e.ignoreUndefinedProperties)return null;if(e.path&&e.fieldMask.push(e.path),s instanceof Array){if(e.settings.arrayElement&&e.dataSource!==4)throw e.createError("Nested arrays are not supported");return(function(a,o){const c=[];let f=0;for(const p of a){let g=FS(p,o.childContextForArray(f));g==null&&(g={nullValue:"NULL_VALUE"}),c.push(g),f++}return{arrayValue:{values:c}}})(s,e)}return(function(a,o){if((a=Ee(a))===null)return{nullValue:"NULL_VALUE"};if(typeof a=="number")return b2(o.serializer,a);if(typeof a=="boolean")return{booleanValue:a};if(typeof a=="string")return{stringValue:a};if(a instanceof Date){const c=lt.fromDate(a);return{timestampValue:Hm(o.serializer,c)}}if(a instanceof lt){const c=new lt(a.seconds,1e3*Math.floor(a.nanoseconds/1e3));return{timestampValue:Hm(o.serializer,c)}}if(a instanceof cs)return{geoPointValue:{latitude:a.latitude,longitude:a.longitude}};if(a instanceof ni)return{bytesValue:P2(o.serializer,a._byteString)};if(a instanceof tn){const c=o.databaseId,f=a.firestore._databaseId;if(!f.isEqual(c))throw o.createError(`Document reference is for database ${f.projectId}/${f.database} but should be for database ${c.projectId}/${c.database}`);return{referenceValue:AS(a.firestore._databaseId||o.databaseId,a._key.path)}}if(a instanceof Di)return(function(f,p){const g=f instanceof Di?f.toArray():f;return{mapValue:{fields:{[nS]:{stringValue:iS},[Lm]:{arrayValue:{values:g.map((T=>{if(typeof T!="number")throw p.createError("VectorValues must only contain numeric values.");return Mp(p.serializer,T)}))}}}}}})(a,o);if(NS(a))return a._toProto(o.serializer);throw o.createError(`Unsupported field value: ${Sp(a)}`)})(s,e)}function GS(s,e){const n={};return Xb(s)?e.path&&e.path.length>0&&e.fieldMask.push(e.path):To(s,((a,o)=>{const c=FS(o,e.childContextForField(a));c!=null&&(n[a]=c)})),{mapValue:{fields:n}}}function YS(s){return!(typeof s!="object"||s===null||s instanceof Array||s instanceof Date||s instanceof lt||s instanceof cs||s instanceof ni||s instanceof tn||s instanceof HS||s instanceof Di||NS(s))}function KS(s,e,n){if(!YS(n)||!Qb(n)){const a=Sp(n);throw a==="an object"?e.createError(s+" a custom object"):e.createError(s+" "+a)}}function Hp(s,e,n){if((e=Ee(e))instanceof BS)return e._internalPath;if(typeof e=="string")return pj(s,e);throw jh("Field path arguments must be of type string or ",s,!1,void 0,n)}const mj=new RegExp("[~\\*/\\[\\]]");function pj(s,e,n){if(e.search(mj)>=0)throw jh(`Invalid field path (${e}). Paths must not contain '~', '*', '/', '[', or ']'`,s,!1,void 0,n);try{return new BS(...e.split("."))._internalPath}catch{throw jh(`Invalid field path (${e}). Paths must not be empty, begin with '.', end with '.', or contain '..'`,s,!1,void 0,n)}}function jh(s,e,n,a,o){const c=a&&!a.isEmpty(),f=o!==void 0;let p=`Function ${e}() called with invalid data`;n&&(p+=" (via `toFirestore()`)"),p+=". ";let g="";return(c||f)&&(g+=" (found",c&&(g+=` in field ${a}`),f&&(g+=` in document ${o}`),g+=")"),new pe(ee.INVALID_ARGUMENT,p+s+g)}function gj(s,e){return s.some((n=>n.isEqual(e)))}const GE="@firebase/firestore",YE="4.12.0";class QS{constructor(e,n,a,o,c){this._firestore=e,this._userDataWriter=n,this._key=a,this._document=o,this._converter=c}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 _j(this._firestore,this._userDataWriter,this._key,this._document,null);return this._converter.fromFirestore(e)}return this._userDataWriter.convertValue(this._document.data.value)}}_fieldsProto(){return this._document?.data.clone().value.mapValue.fields??void 0}get(e){if(this._document){const n=this._document.data.field(Hp("DocumentSnapshot.get",e));if(n!==null)return this._userDataWriter.convertValue(n)}}}class _j extends QS{data(){return super.data()}}function yj(s,e,n){let a;return a=s?s.toFirestore(e):e,a}class eh{constructor(e,n){this.hasPendingWrites=e,this.fromCache=n}isEqual(e){return this.hasPendingWrites===e.hasPendingWrites&&this.fromCache===e.fromCache}}class to extends QS{constructor(e,n,a,o,c,f){super(e,n,a,o,f),this._firestore=e,this._firestoreImpl=e,this.metadata=c}exists(){return super.exists()}data(e={}){if(this._document){if(this._converter){const n=new hh(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 a=this._document.data.field(Hp("DocumentSnapshot.get",e));if(a!==null)return this._userDataWriter.convertValue(a,n.serverTimestamps)}}toJSON(){if(this.metadata.hasPendingWrites)throw new pe(ee.FAILED_PRECONDITION,"DocumentSnapshot.toJSON() attempted to serialize a document with pending writes. Await waitForPendingWrites() before invoking toJSON().");const e=this._document,n={};return n.type=to._jsonSchemaVersion,n.bundle="",n.bundleSource="DocumentSnapshot",n.bundleName=this._key.toString(),!e||!e.isValidDocument()||!e.isFoundDocument()?n:(this._userDataWriter.convertObjectMap(e.data.value.mapValue.fields,"previous"),n.bundle=(this._firestore,this.ref.path,"NOT SUPPORTED"),n)}}to._jsonSchemaVersion="firestore/documentSnapshot/1.0",to._jsonSchema={type:Dt("string",to._jsonSchemaVersion),bundleSource:Dt("string","DocumentSnapshot"),bundleName:Dt("string"),bundle:Dt("string")};class hh extends to{data(e={}){return super.data(e)}}class Gl{constructor(e,n,a,o){this._firestore=e,this._userDataWriter=n,this._snapshot=o,this.metadata=new eh(o.hasPendingWrites,o.fromCache),this.query=a}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((a=>{e.call(n,new hh(this._firestore,this._userDataWriter,a.key,a,new eh(this._snapshot.mutatedKeys.has(a.key),this._snapshot.fromCache),this.query.converter))}))}docChanges(e={}){const n=!!e.includeMetadataChanges;if(n&&this._snapshot.excludesMetadataChanges)throw new pe(ee.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(o,c){if(o._snapshot.oldDocs.isEmpty()){let f=0;return o._snapshot.docChanges.map((p=>{const g=new hh(o._firestore,o._userDataWriter,p.doc.key,p.doc,new eh(o._snapshot.mutatedKeys.has(p.doc.key),o._snapshot.fromCache),o.query.converter);return p.doc,{type:"added",doc:g,oldIndex:-1,newIndex:f++}}))}{let f=o._snapshot.oldDocs;return o._snapshot.docChanges.filter((p=>c||p.type!==3)).map((p=>{const g=new hh(o._firestore,o._userDataWriter,p.doc.key,p.doc,new eh(o._snapshot.mutatedKeys.has(p.doc.key),o._snapshot.fromCache),o.query.converter);let y=-1,T=-1;return p.type!==0&&(y=f.indexOf(p.doc.key),f=f.delete(p.doc.key)),p.type!==1&&(f=f.add(p.doc),T=f.indexOf(p.doc.key)),{type:vj(p.type),doc:g,oldIndex:y,newIndex:T}}))}})(this,n),this._cachedChangesIncludeMetadataChanges=n),this._cachedChanges}toJSON(){if(this.metadata.hasPendingWrites)throw new pe(ee.FAILED_PRECONDITION,"QuerySnapshot.toJSON() attempted to serialize a document with pending writes. Await waitForPendingWrites() before invoking toJSON().");const e={};e.type=Gl._jsonSchemaVersion,e.bundleSource="QuerySnapshot",e.bundleName=bp.newId(),this._firestore._databaseId.database,this._firestore._databaseId.projectId;const n=[],a=[],o=[];return this.docs.forEach((c=>{c._document!==null&&(n.push(c._document),a.push(this._userDataWriter.convertObjectMap(c._document.data.value.mapValue.fields,"previous")),o.push(c.ref.path))})),e.bundle=(this._firestore,this.query._query,e.bundleName,"NOT SUPPORTED"),e}}function vj(s){switch(s){case 0:return"added";case 2:case 3:return"modified";case 1:return"removed";default:return Re(61501,{type:s})}}Gl._jsonSchemaVersion="firestore/querySnapshot/1.0",Gl._jsonSchema={type:Dt("string",Gl._jsonSchemaVersion),bundleSource:Dt("string","QuerySnapshot"),bundleName:Dt("string"),bundle:Dt("string")};function Ej(s,e){const n=$b(s.firestore,zS),a=aj(s),o=yj(s.converter,e),c=dj(s.firestore);return Tj(n,[fj(c,"addDoc",a._key,o,s.converter!==null,{}).toMutation(a._key,ls.exists(!1))]).then((()=>a))}function Tj(s,e){const n=oj(s);return ej(n,e)}(function(e,n=!0){NC(po),no(new $a("firestore",((a,{instanceIdentifier:o,options:c})=>{const f=a.getProvider("app").getImmediate(),p=new zS(new IC(a.getProvider("auth-internal")),new jC(f,a.getProvider("app-check-internal")),WC(f,o),f);return c={useFetchStreams:n,...c},p._setSettings(c),p}),"PUBLIC").setMultipleInstances(!0)),ea(GE,YE,e),ea(GE,YE,"esm2020")})();const bj={apiKey:"AIzaSyDQ5gtACCuXVm-KzejT0XXpwZeamfEvEss",authDomain:"beparagon.firebaseapp.com",projectId:"beparagon",storageBucket:"beparagon.firebasestorage.app",messagingSenderId:"793249968689",appId:"1:793249968689:web:f57968cfe1f952c291db10"},$S=AT(bj),co=Ub($S);gb(co,Bh).catch(s=>{console.error("Error setting auth persistence:",s)});const Sj=rj($S),Aj=async s=>{try{return await cb(co,s),{success:!0}}catch(e){return console.error("Password reset error:",e.message),{success:!1,error:e.message}}};function KE({isOpen:s,onClose:e,onBackToLogin:n}){const[a,o]=V.useState(""),[c,f]=V.useState(!1),[p,g]=V.useState(!1),[y,T]=V.useState("");if(!s)return null;const b=K=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(K),N=async K=>{if(K.preventDefault(),T(""),!a.trim()){T("Please enter your email address");return}if(!b(a)){T("Please enter a valid email address");return}f(!0);try{const Y=await Aj(a);if(Y.success)g(!0);else{const ne=Y.error;ne.includes("user-not-found")?T("No account found with this email address"):ne.includes("invalid-email")?T("Invalid email address format"):ne.includes("too-many-requests")?T("Too many attempts. Please try again later"):T("Failed to send reset email. Please try again")}}catch{T("An unexpected error occurred. Please try again")}finally{f(!1)}},P=()=>{o(""),T(""),g(!1),f(!1),e()},G=()=>{o(""),T(""),g(!1),f(!1),n()};return h.jsx("div",{className:"modal-overlay",onClick:P,children:h.jsxs("div",{className:"modal forgot-password-modal",onClick:K=>K.stopPropagation(),children:[h.jsx("button",{className:"modal__close",onClick:P,children:"Γ"}),h.jsx("div",{className:"forgot-password-modal__content",children:p?h.jsxs("div",{className:"forgot-password-modal__success",children:[h.jsx("div",{className:"forgot-password-modal__success-icon",children:"β"}),h.jsx("h2",{className:"forgot-password-modal__title",children:"Reset Link Sent!"}),h.jsxs("p",{className:"forgot-password-modal__message",children:["We've sent a password reset link to ",h.jsx("strong",{children:a})]}),h.jsx("p",{className:"forgot-password-modal__help",children:"Please check your email and follow the instructions to reset your password."}),h.jsx("button",{className:"btn btn-accent forgot-password-modal__btn",onClick:G,children:"Back to Sign In"})]}):h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:"forgot-password-modal__header",children:[h.jsx("div",{className:"forgot-password-modal__icon",children:"π"}),h.jsx("h2",{className:"forgot-password-modal__title",children:"Forgot Password?"}),h.jsx("p",{className:"forgot-password-modal__subtitle",children:"No worries, we'll send you reset instructions"})]}),h.jsxs("form",{className:"forgot-password-modal__form",onSubmit:N,children:[h.jsxs("div",{className:"login-form__field",children:[h.jsx("label",{className:"login-form__label",children:"Email Address"}),h.jsx("input",{className:"login-form__input",type:"email",placeholder:"Enter your registered email",value:a,onChange:K=>{o(K.target.value),T("")},disabled:c,required:!0})]}),y&&h.jsx("div",{className:"forgot-password-modal__error",children:y}),h.jsx("button",{type:"submit",className:"btn btn-accent forgot-password-modal__btn",disabled:c||!a.trim(),children:c?"Sending...":"Send Reset Link"})]}),h.jsx("div",{className:"forgot-password-modal__footer",children:h.jsx("button",{className:"forgot-password-modal__back-link",onClick:G,disabled:c,children:"β Back to Sign In"})})]})})]})})}function ir({isOpen:s,onClose:e,title:n,children:a}){return s?h.jsx("div",{className:"modal-overlay",onClick:e,children:h.jsxs("div",{className:"modal",onClick:o=>o.stopPropagation(),children:[h.jsxs("div",{className:"modal__header",children:[h.jsx("h3",{className:"modal__title",children:n}),h.jsx("button",{className:"modal__close",onClick:e,children:"Γ"})]}),h.jsx("div",{className:"modal__content",children:a})]})}):null}function wj({isOpen:s,onClose:e,onSubmit:n}){const[a,o]=V.useState({name:"",email:"",phone:"",property:"",status:"Hot",value:""}),c=f=>{f.preventDefault(),n(a),o({name:"",email:"",phone:"",property:"",status:"Hot",value:""}),e()};return h.jsx(ir,{isOpen:s,onClose:e,title:"Add New Lead",children:h.jsxs("form",{onSubmit:c,className:"lead-form",children:[h.jsxs("div",{className:"lead-form__field",children:[h.jsx("label",{children:"Full Name *"}),h.jsx("input",{className:"lead-form__input",value:a.name,onChange:f=>o({...a,name:f.target.value}),required:!0})]}),h.jsxs("div",{className:"lead-form__field",children:[h.jsx("label",{children:"Email *"}),h.jsx("input",{className:"lead-form__input",type:"email",value:a.email,onChange:f=>o({...a,email:f.target.value}),required:!0})]}),h.jsxs("div",{className:"lead-form__field",children:[h.jsx("label",{children:"Phone"}),h.jsx("input",{className:"lead-form__input",value:a.phone,onChange:f=>o({...a,phone:f.target.value})})]}),h.jsxs("div",{className:"lead-form__field",children:[h.jsx("label",{children:"Property Interest"}),h.jsx("input",{className:"lead-form__input",value:a.property,onChange:f=>o({...a,property:f.target.value}),placeholder:"Property name"})]}),h.jsxs("div",{className:"lead-form__row",children:[h.jsxs("div",{className:"lead-form__field",children:[h.jsx("label",{children:"Status"}),h.jsxs("select",{className:"lead-form__input",value:a.status,onChange:f=>o({...a,status:f.target.value}),children:[h.jsx("option",{children:"Hot"}),h.jsx("option",{children:"Warm"}),h.jsx("option",{children:"Cold"})]})]}),h.jsxs("div",{className:"lead-form__field",children:[h.jsx("label",{children:"Value"}),h.jsx("input",{className:"lead-form__input",value:a.value,onChange:f=>o({...a,value:f.target.value}),placeholder:"$"})]})]}),h.jsx("button",{type:"submit",className:"btn btn-accent lead-form__submit",children:"Add Lead"})]})})}function Nj({isOpen:s,onClose:e,leads:n,properties:a,deals:o}){const[c,f]=V.useState(""),p=[...n.map(g=>({type:"Lead",name:g.name,detail:g.property,status:g.status})),...a.map(g=>({type:"Property",name:g.title,detail:g.price,status:g.status})),...o.map(g=>({type:"Deal",name:g.client,detail:g.property,status:g.stage}))].filter(g=>g.name.toLowerCase().includes(c.toLowerCase())||g.detail.toLowerCase().includes(c.toLowerCase()));return h.jsxs(ir,{isOpen:s,onClose:e,title:"Search",children:[h.jsx("input",{className:"search-input",placeholder:"Search leads, properties, deals...",value:c,onChange:g=>f(g.target.value),autoFocus:!0}),h.jsx("div",{className:"search-results",children:p.length===0?h.jsx("p",{className:"search-empty",children:"No results found"}):p.map((g,y)=>h.jsxs("div",{className:"search-result",children:[h.jsx("span",{className:"search-result__type",children:g.type}),h.jsx("span",{className:"search-result__name",children:g.name}),h.jsx("span",{className:"search-result__detail",children:g.detail})]},y))})]})}function Rj({isOpen:s,onClose:e,notifications:n}){return h.jsx(ir,{isOpen:s,onClose:e,title:"Notifications",children:h.jsx("div",{className:"notifications-list",children:n.length===0?h.jsx("p",{children:"No notifications"}):n.map((a,o)=>h.jsxs("div",{className:"notification-item",children:[h.jsx("span",{className:"notification-item__icon",children:a.icon}),h.jsxs("div",{className:"notification-item__content",children:[h.jsx("span",{className:"notification-item__text",children:a.text}),h.jsx("span",{className:"notification-item__time",children:a.time})]})]},o))})})}function xj({onLoginClick:s,user:e,onLogout:n}){const[a,o]=V.useState(!1),c=[{label:"Home",href:"#home"},{label:"Features",href:"#features"},{label:"Services",href:"#services"},{label:"Contact",href:"#contact"}];return h.jsx("header",{className:`header${a?" header--scrolled":""}`,children:h.jsxs("div",{className:"container header__inner",children:[h.jsxs("a",{href:"#home",className:"header__logo",children:[h.jsx("span",{className:"header__logo-icon",children:"π’"}),h.jsxs("span",{className:"header__logo-text",children:["BEPARAGON ",h.jsx("span",{className:"header__logo-llc",children:"LLC"})]})]}),h.jsx("nav",{className:"header__nav",children:h.jsx("ul",{className:"header__nav-list",children:c.map(f=>h.jsx("li",{children:h.jsx("a",{href:f.href,className:"header__nav-link",children:f.label})},f.href))})}),h.jsx("div",{className:"header__actions",children:e?h.jsxs("div",{className:"header__user-menu",children:[h.jsx("div",{className:"header__user-avatar",children:e.name?.charAt(0)?.toUpperCase()||"U"}),h.jsx("span",{className:"header__user-name",children:e.name})]}):h.jsx(h.Fragment,{children:h.jsx("button",{className:"header__login-btn",onClick:s,children:"Log In"})})})]})})}function Ij({onSignUpClick:s}){return h.jsx("section",{id:"home",className:"hero",children:h.jsx("div",{className:"container hero__inner",children:h.jsxs("div",{className:"hero__content",children:[h.jsxs("div",{className:"hero__badge",children:[h.jsx("span",{className:"hero__badge-dot"}),"Trusted by 10,000+ Real Estate Professionals"]}),h.jsxs("h1",{className:"hero__title",children:["Streamline Your ",h.jsx("span",{className:"hero__title-accent",children:"Real Estate"})," Business Like Never Before"]}),h.jsx("p",{className:"hero__subtitle",children:"BEPARAGON CRM is the all-in-one platform built for real estate professionals. Manage leads, track properties, automate follow-ups, and close deals faster."}),h.jsxs("div",{className:"hero__actions",children:[h.jsx("button",{className:"btn btn-accent btn-lg",onClick:s,children:"π Start Free Trial"}),h.jsx("a",{href:"#features",className:"btn btn-outline-white btn-lg",children:"βΆ Explore Features"})]})]})})})}function Cj(){const s=[{icon:"π―",title:"Lead Management",desc:"Capture leads from multiple sources and track every interaction.",tag:"Core"},{icon:"π ",title:"Property Listings",desc:"Manage all your property listings in one place.",tag:"Core"},{icon:"π",title:"Deal Pipeline",desc:"Visualize every deal stage in a customizable pipeline.",tag:"Popular"},{icon:"π",title:"Automated Follow-ups",desc:"Set up smart drip campaigns that nurture leads.",tag:"Automation"},{icon:"π",title:"Analytics Dashboard",desc:"Real-time insights into your business performance.",tag:"Insights"},{icon:"π₯",title:"Team Collaboration",desc:"Keep your entire team aligned and productive.",tag:"Teamwork"}];return h.jsx("section",{id:"features",className:"section bg-alt",children:h.jsxs("div",{className:"container",children:[h.jsxs("div",{className:"section-header",children:[h.jsx("span",{className:"section-label",children:"Platform Features"}),h.jsx("h2",{className:"section-title",children:"Everything You Need to Win More Deals"})]}),h.jsx("div",{className:"features__grid",children:s.map((e,n)=>h.jsxs("div",{className:"feature-card",children:[h.jsxs("div",{className:"feature-card__top",children:[h.jsx("div",{className:"feature-card__icon",children:e.icon}),h.jsx("span",{className:"feature-card__tag",children:e.tag})]}),h.jsx("h3",{className:"feature-card__title",children:e.title}),h.jsx("p",{className:"feature-card__desc",children:e.desc})]},n))})]})})}function Dj(){const s=[{icon:"π€",title:"CRM & Contact Management",desc:"Build a 360Β° view of every client and prospect."},{icon:"π£",title:"Marketing Automation",desc:"Reach the right clients with behavior-driven marketing."},{icon:"π",title:"Transaction Management",desc:"Manage every detail of a real estate transaction."},{icon:"π",title:"Reporting & Analytics",desc:"Real-time view of your business performance."}];return h.jsx("section",{id:"services",className:"section bg-white",children:h.jsxs("div",{className:"container",children:[h.jsxs("div",{className:"section-header",children:[h.jsx("span",{className:"section-label",children:"Our Services"}),h.jsx("h2",{className:"section-title",children:"A Complete Solution for Your Business"})]}),h.jsx("div",{className:"services__list",children:s.map((e,n)=>h.jsxs("div",{className:"service-item",children:[h.jsx("div",{className:"service-item__icon-wrap",children:h.jsx("span",{className:"service-item__icon",children:e.icon})}),h.jsxs("div",{className:"service-item__content",children:[h.jsx("h3",{className:"service-item__title",children:e.title}),h.jsx("p",{className:"service-item__desc",children:e.desc})]})]},n))})]})})}function jj(){const s=[{value:"10,000+",label:"Active Users",icon:"π€"},{value:"500K+",label:"Properties Managed",icon:"π "},{value:"$12B+",label:"Total Deal Value",icon:"π°"},{value:"98%",label:"Client Satisfaction",icon:"β"}];return h.jsx("section",{className:"statistics",children:h.jsxs("div",{className:"container",children:[h.jsxs("div",{className:"statistics__header",children:[h.jsx("span",{className:"section-label",children:"By the Numbers"}),h.jsx("h2",{className:"statistics__title",children:"Powering Real Estate Businesses"})]}),h.jsx("div",{className:"statistics__grid",children:s.map((e,n)=>h.jsxs("div",{className:"stat-card",children:[h.jsx("div",{className:"stat-card__icon",children:e.icon}),h.jsx("div",{className:"stat-card__value",children:e.value}),h.jsx("div",{className:"stat-card__label",children:e.label})]},n))})]})})}function Oj(){const[s,e]=V.useState({name:"",email:"",phone:"",subject:"general",message:""}),[n,a]=V.useState(!1),[o,c]=V.useState(!1),[f,p]=V.useState(""),g=async T=>{T.preventDefault(),c(!0),p(""),await new Promise(b=>setTimeout(b,1500)),c(!1),a(!0)},y=[{value:"general",label:"General Inquiry"},{value:"support",label:"Technical Support"},{value:"sales",label:"Sales Question"},{value:"partnership",label:"Partnership"},{value:"feedback",label:"Feedback"}];return h.jsx("section",{id:"contact",className:"cta-section",children:h.jsxs("div",{className:"container cta-section__inner",children:[h.jsxs("div",{className:"cta-section__pitch",children:[h.jsx("span",{className:"section-label",children:"Get In Touch"}),h.jsx("h2",{className:"cta-section__title",children:"We'd Love to Hear From You!"}),h.jsx("p",{className:"cta-section__desc",children:"Have questions about our CRM? Our team is here to help you succeed."}),h.jsxs("div",{className:"cta-section__contact-info",children:[h.jsxs("div",{className:"cta-section__contact-card",children:[h.jsx("div",{className:"cta-section__contact-icon-wrap",children:h.jsx("span",{className:"cta-section__contact-icon",children:"π§"})}),h.jsxs("div",{className:"cta-section__contact-details",children:[h.jsx("h4",{children:"Email Us"}),h.jsx("a",{href:"mailto:support@beparagon.to",children:"support@beparagon.to"})]})]}),h.jsxs("div",{className:"cta-section__contact-card",children:[h.jsx("div",{className:"cta-section__contact-icon-wrap",children:h.jsx("span",{className:"cta-section__contact-icon",children:"π"})}),h.jsxs("div",{className:"cta-section__contact-details",children:[h.jsx("h4",{children:"Call Us"}),h.jsx("a",{href:"tel:+14054627472",children:"(405) 462-7472"})]})]}),h.jsxs("div",{className:"cta-section__contact-card",children:[h.jsx("div",{className:"cta-section__contact-icon-wrap",children:h.jsx("span",{className:"cta-section__contact-icon",children:"π"})}),h.jsxs("div",{className:"cta-section__contact-details",children:[h.jsx("h4",{children:"Visit Us"}),h.jsx("p",{children:"123 Business Park, Oklahoma City, OK 73102"})]})]})]}),h.jsxs("div",{className:"cta-section__social",children:[h.jsx("h4",{children:"Follow Us"}),h.jsxs("div",{className:"cta-section__social-links",children:[h.jsx("a",{href:"https://facebook.com",target:"_blank",rel:"noopener noreferrer",className:"cta-section__social-link","aria-label":"Facebook",children:h.jsx("svg",{viewBox:"0 0 24 24",width:"20",height:"20",fill:"currentColor",children:h.jsx("path",{d:"M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z"})})}),h.jsx("a",{href:"https://twitter.com",target:"_blank",rel:"noopener noreferrer",className:"cta-section__social-link","aria-label":"Twitter",children:h.jsx("svg",{viewBox:"0 0 24 24",width:"20",height:"20",fill:"currentColor",children:h.jsx("path",{d:"M23 3a10.9 10.9 0 0 1-3.14 1.53 4.48 4.48 0 0 0-7.86 3v1A10.66 10.66 0 0 1 3 4s-4 9 5 13a11.64 11.64 0 0 1-7 2c9 5 20 0 20-11.5a4.5 4.5 0 0 0-.08-.83A7.72 7.72 0 0 0 23 3z"})})}),h.jsx("a",{href:"https://linkedin.com",target:"_blank",rel:"noopener noreferrer",className:"cta-section__social-link","aria-label":"LinkedIn",children:h.jsxs("svg",{viewBox:"0 0 24 24",width:"20",height:"20",fill:"currentColor",children:[h.jsx("path",{d:"M16 8a6 6 0 0 1 6 6v7h-4v-7a2 2 0 0 0-2-2 2 2 0 0 0-2 2v7h-4v-7a6 6 0 0 1 6-6z"}),h.jsx("rect",{x:"2",y:"9",width:"4",height:"12"}),h.jsx("circle",{cx:"4",cy:"4",r:"2"})]})}),h.jsx("a",{href:"https://instagram.com",target:"_blank",rel:"noopener noreferrer",className:"cta-section__social-link","aria-label":"Instagram",children:h.jsxs("svg",{viewBox:"0 0 24 24",width:"20",height:"20",fill:"currentColor",children:[h.jsx("rect",{x:"2",y:"2",width:"20",height:"20",rx:"5",ry:"5"}),h.jsx("path",{d:"M16 11.37A4 4 0 1 1 12.63 8 4 4 0 0 1 16 11.37z",fill:"none",stroke:"currentColor",strokeWidth:"2"}),h.jsx("line",{x1:"17.5",y1:"6.5",x2:"17.51",y2:"6.5",stroke:"currentColor",strokeWidth:"2"})]})})]})]})]}),h.jsx("div",{className:"cta-section__form-wrap",children:n?h.jsxs("div",{className:"cta-section__success",children:[h.jsx("div",{className:"cta-section__success-icon",children:"β"}),h.jsx("h3",{children:"Message Sent!"}),h.jsx("p",{children:"Thank you for reaching out. Our team will get back to you within 24 hours."}),h.jsx("button",{className:"btn btn-outline",onClick:()=>{a(!1),e({name:"",email:"",phone:"",subject:"general",message:""})},children:"Send Another Message"})]}):h.jsxs("form",{className:"cta-form",onSubmit:g,children:[h.jsx("h3",{className:"cta-form__title",children:"Send Us a Message"}),h.jsx("p",{className:"cta-form__subtitle",children:"Fill out the form below and we'll respond ASAP"}),f&&h.jsx("div",{className:"cta-form__error",children:f}),h.jsxs("div",{className:"cta-form__row",children:[h.jsxs("div",{className:"cta-form__field",children:[h.jsx("label",{className:"cta-form__label",children:"Full Name *"}),h.jsx("input",{className:"cta-form__input",placeholder:"John Doe",value:s.name,onChange:T=>e({...s,name:T.target.value}),required:!0})]}),h.jsxs("div",{className:"cta-form__field",children:[h.jsx("label",{className:"cta-form__label",children:"Phone Number"}),h.jsx("input",{className:"cta-form__input",placeholder:"(555) 123-4567",type:"tel",value:s.phone,onChange:T=>e({...s,phone:T.target.value})})]})]}),h.jsxs("div",{className:"cta-form__field",children:[h.jsx("label",{className:"cta-form__label",children:"Email Address *"}),h.jsx("input",{className:"cta-form__input",placeholder:"john@company.com",type:"email",value:s.email,onChange:T=>e({...s,email:T.target.value}),required:!0})]}),h.jsxs("div",{className:"cta-form__field",children:[h.jsx("label",{className:"cta-form__label",children:"Subject"}),h.jsx("select",{className:"cta-form__input cta-form__select",value:s.subject,onChange:T=>e({...s,subject:T.target.value}),children:y.map(T=>h.jsx("option",{value:T.value,children:T.label},T.value))})]}),h.jsxs("div",{className:"cta-form__field",children:[h.jsx("label",{className:"cta-form__label",children:"Message *"}),h.jsx("textarea",{className:"cta-form__input cta-form__textarea",placeholder:"Tell us how we can help you...",rows:4,value:s.message,onChange:T=>e({...s,message:T.target.value}),required:!0})]}),h.jsx("button",{type:"submit",className:"btn btn-accent btn-lg cta-form__submit",disabled:o,children:o?h.jsxs(h.Fragment,{children:[h.jsx("span",{className:"cta-form__spinner"})," Sending..."]}):"π Send Message"})]})})]})})}function Mj({onHelpCenterClick:s}){return h.jsxs("footer",{className:"footer",children:[h.jsxs("div",{className:"container footer__top-inner",children:[h.jsxs("div",{className:"footer__brand",children:[h.jsxs("a",{href:"#home",className:"footer__logo",children:[h.jsx("span",{className:"footer__logo-icon",children:"π’"}),h.jsxs("span",{className:"footer__logo-text",children:["BEPARAGON ",h.jsx("span",{className:"footer__logo-llc",children:"LLC"})]})]}),h.jsx("p",{className:"footer__brand-desc",children:"The leading Real Estate CRM platform trusted by 10,000+ agents nationwide."})]}),h.jsxs("div",{className:"footer__links-col",children:[h.jsx("h4",{className:"footer__col-title",children:"Product"}),h.jsx("a",{href:"#features",className:"footer__link",children:"Features"}),h.jsx("a",{href:"#services",className:"footer__link",children:"Pricing"})]}),h.jsxs("div",{className:"footer__links-col",children:[h.jsx("h4",{className:"footer__col-title",children:"Company"}),h.jsx("a",{href:"#",className:"footer__link",children:"Careers"})]}),h.jsxs("div",{className:"footer__links-col",children:[h.jsx("h4",{className:"footer__col-title",children:"Support"}),h.jsx(xi,{to:"/about-us",className:"footer__link",children:"About us"}),h.jsx(xi,{to:"/privacy-policy",className:"footer__link",children:"Privacy Policy"}),h.jsx("a",{href:"#contact",className:"footer__link",children:"Contact us"}),h.jsx(xi,{to:"/terms-conditions",className:"footer__link",children:"Terms & Conditions"}),h.jsx(xi,{to:"/refund-policy",className:"footer__link",children:"Refund Policy"})]})]}),h.jsx("div",{className:"footer__bottom",children:h.jsx("div",{className:"container footer__bottom-inner",children:h.jsx("p",{className:"footer__copyright",children:"Β© 2026 BEPARAGON LLC. All rights reserved."})})})]})}function QE({onLogin:s,onRegister:e,onForgotPassword:n,onBackToHome:a}){const[o,c]=V.useState({email:"",password:""}),[f,p]=V.useState({email:"",password:""}),[g,y]=V.useState(!1),[T,b]=V.useState(""),[N,P]=V.useState(!1),G=de=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(de),K=de=>/^(?=.*[0-9]).{8,}$/.test(de),Y=de=>{const fe=de.target.value;c({...o,email:fe}),b(""),fe&&!G(fe)?p({...f,email:"Please enter a valid email address"}):p({...f,email:""})},ne=de=>{const fe=de.target.value;c({...o,password:fe}),b(""),fe&&!K(fe)?p({...f,password:"Password must be at least 8 characters with 1 number"}):p({...f,password:""})},re=G(o.email)&&K(o.password),oe=async de=>{de.preventDefault(),y(!0),b("");try{const _e=(await db(co,o.email,o.password)).user;s({name:_e.displayName||_e.email.split("@")[0],email:_e.email,uid:_e.uid})}catch(fe){console.error("Login error:",fe.message),fe.code==="auth/invalid-email"?b("Invalid email address"):fe.code==="auth/user-not-found"?b("No account found with this email"):fe.code==="auth/wrong-password"?b("Incorrect password"):fe.code==="auth/invalid-credential"?b("Invalid email or password"):fe.code==="auth/too-many-requests"?b("Too many attempts. Please try again later"):b("Login failed. Please try again")}finally{y(!1)}};return h.jsxs("div",{className:"login-page",children:[h.jsxs("div",{className:"login-page__left",children:[h.jsxs("div",{className:"login-page__brand",children:[h.jsx("span",{className:"login-page__brand-icon",children:"π’"}),h.jsxs("span",{className:"login-page__brand-name",children:["BEPARAGON ",h.jsx("span",{children:"LLC"})]})]}),h.jsx("h2",{className:"login-page__left-title",children:"Welcome back to your Real Estate Command Center"}),h.jsxs("div",{className:"login-page__features",children:[h.jsxs("div",{className:"login-page__feature",children:[h.jsx("span",{className:"login-page__feature-icon",children:"π―"}),"Manage leads efficiently"]}),h.jsxs("div",{className:"login-page__feature",children:[h.jsx("span",{className:"login-page__feature-icon",children:"π"}),"Track deals in pipeline"]}),h.jsxs("div",{className:"login-page__feature",children:[h.jsx("span",{className:"login-page__feature-icon",children:"π "}),"Showcase property listings"]})]})]}),h.jsxs("div",{className:"login-page__right",children:[h.jsx("button",{className:"login-page__back-home",onClick:a,children:"β Back to Home"}),h.jsxs("form",{className:"login-form",onSubmit:oe,children:[h.jsx("h1",{className:"login-page__form-title",children:"Sign in"}),h.jsx("p",{className:"login-page__form-subtitle",children:"Enter your credentials to access your dashboard"}),h.jsxs("div",{className:"login-form__field",children:[h.jsx("label",{className:"login-form__label",children:"Email Address"}),h.jsx("input",{className:"login-form__input",placeholder:"you@company.com",type:"email",value:o.email,onChange:Y,required:!0}),f.email&&h.jsx("span",{className:"login-form__error",children:f.email})]}),h.jsxs("div",{className:"login-form__field",children:[h.jsx("label",{className:"login-form__label",children:"Password"}),h.jsxs("div",{className:"login-form__password-wrapper",children:[h.jsx("input",{className:"login-form__input",placeholder:"Min 8 characters with 1 number",type:N?"text":"password",value:o.password,onChange:ne,required:!0}),h.jsx("button",{type:"button",className:"login-form__password-toggle",onClick:()=>P(!N),children:N?"ποΈ":"ποΈβπ¨οΈ"})]}),f.password&&h.jsx("span",{className:"login-form__error",children:f.password})]}),T&&h.jsx("div",{className:"login-form__error",children:T}),h.jsx("button",{type:"submit",className:"btn btn-accent login-form__submit",disabled:!re||g,children:g?"Signing in...":"β Sign In to Dashboard"}),h.jsxs("p",{className:"login-form__footer",children:[h.jsx("span",{className:"login-form__forgot",children:h.jsx("a",{href:"#",onClick:de=>{de.preventDefault(),n()},children:"Forgot Password?"})}),h.jsx("br",{}),"Don't have an account? ",h.jsx("a",{href:"#",onClick:de=>{de.preventDefault(),e()},children:"Create Account"})]})]})]})]})}function Pj({onRegister:s,onBackToLogin:e}){const[n,a]=V.useState({name:"",email:"",password:"",confirmPassword:""}),[o,c]=V.useState(!1),[f,p]=V.useState(""),[g,y]=V.useState(!1),[T,b]=V.useState(!1),N=async P=>{if(P.preventDefault(),p(""),n.password!==n.confirmPassword){p("Passwords do not match");return}if(n.password.length<6){p("Password must be at least 6 characters");return}c(!0);try{const K=(await hb(co,n.email,n.password)).user;await fb(K,{displayName:n.name}),await Ej(sj(Sj,"users"),{uid:K.uid,name:n.name,email:n.email,createdAt:new Date}),s({name:n.name,email:n.email,uid:K.uid})}catch(G){console.error("Registration error:",G.message),G.code==="auth/email-already-in-use"?p("An account with this email already exists"):G.code==="auth/invalid-email"?p("Invalid email address"):G.code==="auth/weak-password"?p("Password is too weak"):p("Registration failed. Please try again")}finally{c(!1)}};return h.jsx("div",{className:"register-page",children:h.jsxs("div",{className:"register-page__card",children:[h.jsxs("div",{className:"register-page__header",children:[h.jsxs("div",{className:"register-page__logo",children:[h.jsx("span",{className:"register-page__logo-icon",children:"π’"}),h.jsxs("span",{className:"register-page__logo-text",children:["BEPARAGON ",h.jsx("span",{className:"register-page__logo-llc",children:"LLC"})]})]}),h.jsx("h1",{className:"register-page__title",children:"Create your account"}),h.jsx("p",{className:"register-page__subtitle",children:"Start your 14-day free trial"})]}),h.jsxs("form",{className:"register-page__form",onSubmit:N,children:[h.jsxs("div",{className:"register-page__field",children:[h.jsx("label",{className:"register-page__label",children:"Full Name"}),h.jsx("input",{className:"register-page__input",type:"text",placeholder:"John Smith",value:n.name,onChange:P=>a({...n,name:P.target.value}),required:!0})]}),h.jsxs("div",{className:"register-page__field",children:[h.jsx("label",{className:"register-page__label",children:"Email"}),h.jsx("input",{className:"register-page__input",type:"email",placeholder:"you@company.com",value:n.email,onChange:P=>a({...n,email:P.target.value}),required:!0})]}),h.jsxs("div",{className:"register-page__field",children:[h.jsx("label",{className:"register-page__label",children:"Password"}),h.jsxs("div",{className:"register-page__password-wrapper",children:[h.jsx("input",{className:"register-page__input",type:g?"text":"password",placeholder:"Create a strong password",value:n.password,onChange:P=>a({...n,password:P.target.value}),required:!0}),h.jsx("button",{type:"button",className:"register-page__password-toggle",onClick:()=>y(!g),children:g?"ποΈ":"ποΈβπ¨οΈ"})]})]}),h.jsxs("div",{className:"register-page__field",children:[h.jsx("label",{className:"register-page__label",children:"Confirm Password"}),h.jsxs("div",{className:"register-page__password-wrapper",children:[h.jsx("input",{className:"register-page__input",type:T?"text":"password",placeholder:"Confirm your password",value:n.confirmPassword,onChange:P=>a({...n,confirmPassword:P.target.value}),required:!0}),h.jsx("button",{type:"button",className:"register-page__password-toggle",onClick:()=>b(!T),children:T?"ποΈ":"ποΈβπ¨οΈ"})]})]}),f&&h.jsx("div",{className:"register-page__error",children:f}),h.jsx("button",{type:"submit",className:"register-page__btn",disabled:o,children:o?"Creating account...":"Create Account"})]}),h.jsxs("div",{className:"register-page__footer-text",children:["Already have an account?",h.jsx("a",{href:"#",onClick:P=>{P.preventDefault(),e()},children:"Sign in"})]})]})})}function kj({tasks:s,setTasks:e,setActiveSection:n}){const[a,o]=V.useState(!1),[c,f]=V.useState({title:"",time:"",priority:"medium"}),p=T=>{T.preventDefault(),e([...s,{...c,completed:!1}]),f({title:"",time:"",priority:"medium"}),o(!1)},g=T=>{const b=[...s];b[T].completed=!b[T].completed,e(b)},y=T=>{e(s.filter((b,N)=>N!==T))};return h.jsxs("div",{className:"dashboard__body",children:[h.jsxs("div",{className:"dashboard__welcome",children:[h.jsxs("div",{className:"dashboard__welcome-content",children:[h.jsx("h2",{children:"Tasks"}),h.jsx("p",{children:"Manage your upcoming tasks and activities."})]}),h.jsx("div",{className:"dashboard__welcome-actions",children:h.jsx("button",{className:"btn btn-accent",onClick:()=>o(!0),children:"+ New Task"})})]}),h.jsx("div",{className:"dashboard__card",children:h.jsx("div",{className:"tasks-list",children:s.length===0?h.jsx("p",{style:{padding:"2rem",textAlign:"center",color:"var(--color-text-secondary)"},children:'No tasks yet. Click "+ New Task" to add one.'}):s.map((T,b)=>h.jsxs("div",{className:`task-item ${T.completed?"task-item--completed":""}`,children:[h.jsx("input",{type:"checkbox",checked:T.completed,onChange:()=>g(b)}),h.jsxs("div",{className:"task-item__content",children:[h.jsx("span",{className:"task-item__title",children:T.title}),h.jsx("span",{className:"task-item__time",children:T.time})]}),h.jsx("span",{className:`task-item__priority task-item__priority--${T.priority}`,children:T.priority}),h.jsx("button",{className:"task-item__delete",onClick:()=>y(b),children:"Γ"})]},b))})}),a&&h.jsx(ir,{isOpen:a,onClose:()=>o(!1),title:"Add New Task",children:h.jsxs("form",{onSubmit:p,children:[h.jsxs("div",{className:"lead-form__field",children:[h.jsx("label",{children:"Task Title *"}),h.jsx("input",{className:"lead-form__input",value:c.title,onChange:T=>f({...c,title:T.target.value}),required:!0})]}),h.jsxs("div",{className:"lead-form__field",children:[h.jsx("label",{children:"Due Date/Time *"}),h.jsx("input",{className:"lead-form__input",value:c.time,onChange:T=>f({...c,time:T.target.value}),placeholder:"e.g., Today, 2:00 PM",required:!0})]}),h.jsxs("div",{className:"lead-form__field",children:[h.jsx("label",{children:"Priority"}),h.jsxs("select",{className:"lead-form__input",value:c.priority,onChange:T=>f({...c,priority:T.target.value}),children:[h.jsx("option",{children:"high"}),h.jsx("option",{children:"medium"}),h.jsx("option",{children:"low"})]})]}),h.jsx("button",{type:"submit",className:"btn btn-accent",children:"Add Task"})]})})]})}function Lj({leads:s,setLeads:e,setActiveSection:n}){const[a,o]=V.useState("all"),[c,f]=V.useState(!1),[p,g]=V.useState({name:"",email:"",phone:"",property:"",status:"Hot",value:""}),y=P=>{P.preventDefault(),e([{...p,time:"Just now"},...s]),g({name:"",email:"",phone:"",property:"",status:"Hot",value:""}),f(!1)},T=P=>{e(s.filter((G,K)=>K!==P))},b=a==="all"?s:s.filter(P=>P.status.toLowerCase()===a),N=P=>{switch(P){case"Hot":return"status-hot";case"Warm":return"status-warm";case"Cold":return"status-cold";default:return""}};return h.jsxs("div",{className:"dashboard__body",children:[h.jsxs("div",{className:"dashboard__welcome",children:[h.jsxs("div",{className:"dashboard__welcome-content",children:[h.jsx("h2",{children:"Leads"}),h.jsx("p",{children:"Manage and track all your leads in one place."})]}),h.jsx("div",{className:"dashboard__welcome-actions",children:h.jsx("button",{className:"btn btn-accent",onClick:()=>f(!0),children:"+ New Lead"})})]}),h.jsxs("div",{className:"dashboard__card",children:[h.jsxs("div",{className:"filter-bar",children:[h.jsx("button",{className:`filter-btn ${a==="all"?"filter-btn--active":""}`,onClick:()=>o("all"),children:"All"}),h.jsx("button",{className:`filter-btn ${a==="hot"?"filter-btn--active":""}`,onClick:()=>o("hot"),children:"Hot"}),h.jsx("button",{className:`filter-btn ${a==="warm"?"filter-btn--active":""}`,onClick:()=>o("warm"),children:"Warm"}),h.jsx("button",{className:`filter-btn ${a==="cold"?"filter-btn--active":""}`,onClick:()=>o("cold"),children:"Cold"})]}),h.jsxs("div",{className:"leads-table",children:[h.jsxs("div",{className:"leads-table__header",children:[h.jsx("span",{children:"Lead"}),h.jsx("span",{children:"Property"}),h.jsx("span",{children:"Status"}),h.jsx("span",{children:"Value"}),h.jsx("span",{children:"Actions"})]}),b.length===0?h.jsx("p",{style:{padding:"2rem",textAlign:"center",color:"var(--color-text-secondary)"},children:"No leads found."}):b.map((P,G)=>h.jsxs("div",{className:"leads-table__row",children:[h.jsxs("div",{className:"leads-table__lead",children:[h.jsx("div",{className:"leads-table__avatar",children:P.name.split(" ").map(K=>K[0]).join("")}),h.jsxs("div",{className:"leads-table__info",children:[h.jsx("span",{className:"leads-table__name",children:P.name}),h.jsx("span",{className:"leads-table__time",children:P.time})]})]}),h.jsx("span",{children:P.property}),h.jsx("span",{className:`leads-table__status ${N(P.status)}`,children:P.status}),h.jsx("span",{children:P.value}),h.jsx("button",{className:"leads-table__delete",onClick:()=>T(G),children:"Delete"})]},G))]})]}),c&&h.jsx(ir,{isOpen:c,onClose:()=>f(!1),title:"Add New Lead",children:h.jsxs("form",{onSubmit:y,children:[h.jsxs("div",{className:"lead-form__field",children:[h.jsx("label",{children:"Full Name *"}),h.jsx("input",{className:"lead-form__input",value:p.name,onChange:P=>g({...p,name:P.target.value}),required:!0})]}),h.jsxs("div",{className:"lead-form__field",children:[h.jsx("label",{children:"Email *"}),h.jsx("input",{className:"lead-form__input",type:"email",value:p.email,onChange:P=>g({...p,email:P.target.value}),required:!0})]}),h.jsxs("div",{className:"lead-form__field",children:[h.jsx("label",{children:"Phone"}),h.jsx("input",{className:"lead-form__input",value:p.phone,onChange:P=>g({...p,phone:P.target.value})})]}),h.jsxs("div",{className:"lead-form__field",children:[h.jsx("label",{children:"Property Interest"}),h.jsx("input",{className:"lead-form__input",value:p.property,onChange:P=>g({...p,property:P.target.value})})]}),h.jsxs("div",{className:"lead-form__row",children:[h.jsxs("div",{className:"lead-form__field",children:[h.jsx("label",{children:"Status"}),h.jsxs("select",{className:"lead-form__input",value:p.status,onChange:P=>g({...p,status:P.target.value}),children:[h.jsx("option",{children:"Hot"}),h.jsx("option",{children:"Warm"}),h.jsx("option",{children:"Cold"})]})]}),h.jsxs("div",{className:"lead-form__field",children:[h.jsx("label",{children:"Value"}),h.jsx("input",{className:"lead-form__input",value:p.value,onChange:P=>g({...p,value:P.target.value}),placeholder:"$"})]})]}),h.jsx("button",{type:"submit",className:"btn btn-accent",children:"Add Lead"})]})})]})}function Vj({properties:s,setProperties:e}){const[n,a]=V.useState(!1),[o,c]=V.useState({title:"",address:"",price:"",bedrooms:"",bathrooms:"",sqft:"",status:"Active",image:""}),f=g=>{g.preventDefault(),e([{...o,added:"Just now"},...s]),c({title:"",address:"",price:"",bedrooms:"",bathrooms:"",sqft:"",status:"Active",image:""}),a(!1)},p=g=>{e(s.filter((y,T)=>T!==g))};return h.jsxs("div",{className:"dashboard__body",children:[h.jsxs("div",{className:"dashboard__welcome",children:[h.jsxs("div",{className:"dashboard__welcome-content",children:[h.jsx("h2",{children:"Properties"}),h.jsx("p",{children:"Manage your property listings."})]}),h.jsx("div",{className:"dashboard__welcome-actions",children:h.jsx("button",{className:"btn btn-accent",onClick:()=>a(!0),children:"+ New Property"})})]}),h.jsx("div",{className:"properties-grid",children:s.length===0?h.jsx("p",{style:{padding:"2rem",textAlign:"center",color:"var(--color-text-secondary)"},children:"No properties yet."}):s.map((g,y)=>h.jsxs("div",{className:"property-card",children:[h.jsx("div",{className:"property-card__image",children:"π "}),h.jsxs("div",{className:"property-card__content",children:[h.jsx("h3",{className:"property-card__title",children:g.title}),h.jsx("p",{className:"property-card__address",children:g.address}),h.jsxs("div",{className:"property-card__details",children:[h.jsxs("span",{children:["π ",g.bedrooms," bd"]}),h.jsxs("span",{children:["πΏ ",g.bathrooms," ba"]}),h.jsxs("span",{children:["π ",g.sqft," sqft"]})]}),h.jsxs("div",{className:"property-card__footer",children:[h.jsx("span",{className:"property-card__price",children:g.price}),h.jsx("span",{className:`property-card__status property-card__status--${g.status.toLowerCase()}`,children:g.status})]}),h.jsx("button",{className:"property-card__delete",onClick:()=>p(y),children:"Delete"})]})]},y))}),n&&h.jsx(ir,{isOpen:n,onClose:()=>a(!1),title:"Add New Property",children:h.jsxs("form",{onSubmit:f,children:[h.jsxs("div",{className:"lead-form__field",children:[h.jsx("label",{children:"Property Title *"}),h.jsx("input",{className:"lead-form__input",value:o.title,onChange:g=>c({...o,title:g.target.value}),required:!0})]}),h.jsxs("div",{className:"lead-form__field",children:[h.jsx("label",{children:"Address *"}),h.jsx("input",{className:"lead-form__input",value:o.address,onChange:g=>c({...o,address:g.target.value}),required:!0})]}),h.jsxs("div",{className:"lead-form__field",children:[h.jsx("label",{children:"Price *"}),h.jsx("input",{className:"lead-form__input",value:o.price,onChange:g=>c({...o,price:g.target.value}),placeholder:"$",required:!0})]}),h.jsxs("div",{className:"lead-form__row",children:[h.jsxs("div",{className:"lead-form__field",children:[h.jsx("label",{children:"Bedrooms"}),h.jsx("input",{className:"lead-form__input",value:o.bedrooms,onChange:g=>c({...o,bedrooms:g.target.value})})]}),h.jsxs("div",{className:"lead-form__field",children:[h.jsx("label",{children:"Bathrooms"}),h.jsx("input",{className:"lead-form__input",value:o.bathrooms,onChange:g=>c({...o,bathrooms:g.target.value})})]})]}),h.jsxs("div",{className:"lead-form__field",children:[h.jsx("label",{children:"Sq Ft"}),h.jsx("input",{className:"lead-form__input",value:o.sqft,onChange:g=>c({...o,sqft:g.target.value})})]}),h.jsxs("div",{className:"lead-form__field",children:[h.jsx("label",{children:"Status"}),h.jsxs("select",{className:"lead-form__input",value:o.status,onChange:g=>c({...o,status:g.target.value}),children:[h.jsx("option",{children:"Active"}),h.jsx("option",{children:"Pending"}),h.jsx("option",{children:"Sold"})]})]}),h.jsx("button",{type:"submit",className:"btn btn-accent",children:"Add Property"})]})})]})}function Uj({deals:s,setDeals:e}){const[n,a]=V.useState(!1),[o,c]=V.useState({client:"",property:"",value:"",stage:"New Leads",probability:"10%"}),f=b=>{b.preventDefault(),e([{...o,lastUpdated:"Just now"},...s]),c({client:"",property:"",value:"",stage:"New Leads",probability:"10%"}),a(!1)},p=(b,N)=>{const P=[...s];P[b].stage=N,P[b].probability={"New Leads":"10%","Showing Scheduled":"30%","Offer Submitted":"60%","Under Contract":"80%","Closed Won":"100%"}[N],e(P)},g=b=>{e(s.filter((N,P)=>P!==b))},y=["New Leads","Showing Scheduled","Offer Submitted","Under Contract","Closed Won"],T={"New Leads":"#6366F1","Showing Scheduled":"#8B5CF6","Offer Submitted":"#F59E0B","Under Contract":"#10B981","Closed Won":"#059669"};return h.jsxs("div",{className:"dashboard__body",children:[h.jsxs("div",{className:"dashboard__welcome",children:[h.jsxs("div",{className:"dashboard__welcome-content",children:[h.jsx("h2",{children:"Deals"}),h.jsx("p",{children:"Track your deals through the pipeline."})]}),h.jsx("div",{className:"dashboard__welcome-actions",children:h.jsx("button",{className:"btn btn-accent",onClick:()=>a(!0),children:"+ New Deal"})})]}),h.jsx("div",{className:"deals-pipeline",children:y.map(b=>h.jsxs("div",{className:"deals-pipeline__column",children:[h.jsx("h3",{className:"deals-pipeline__title",style:{borderColor:T[b]},children:b}),h.jsx("div",{className:"deals-pipeline__cards",children:s.filter(N=>N.stage===b).map((N,P)=>h.jsxs("div",{className:"deal-card",children:[h.jsxs("div",{className:"deal-card__header",children:[h.jsx("span",{className:"deal-card__client",children:N.client}),h.jsx("button",{className:"deal-card__delete",onClick:()=>g(s.indexOf(N)),children:"Γ"})]}),h.jsx("span",{className:"deal-card__property",children:N.property}),h.jsx("span",{className:"deal-card__value",children:N.value}),h.jsxs("div",{className:"deal-card__stage-actions",children:[h.jsx("select",{value:N.stage,onChange:G=>p(s.indexOf(N),G.target.value),className:"deal-card__stage-select",children:y.map(G=>h.jsx("option",{value:G,children:G},G))}),h.jsx("span",{className:"deal-card__probability",children:N.probability})]})]},P))})]},b))}),n&&h.jsx(ir,{isOpen:n,onClose:()=>a(!1),title:"Add New Deal",children:h.jsxs("form",{onSubmit:f,children:[h.jsxs("div",{className:"lead-form__field",children:[h.jsx("label",{children:"Client Name *"}),h.jsx("input",{className:"lead-form__input",value:o.client,onChange:b=>c({...o,client:b.target.value}),required:!0})]}),h.jsxs("div",{className:"lead-form__field",children:[h.jsx("label",{children:"Property *"}),h.jsx("input",{className:"lead-form__input",value:o.property,onChange:b=>c({...o,property:b.target.value}),required:!0})]}),h.jsxs("div",{className:"lead-form__field",children:[h.jsx("label",{children:"Deal Value *"}),h.jsx("input",{className:"lead-form__input",value:o.value,onChange:b=>c({...o,value:b.target.value}),placeholder:"$",required:!0})]}),h.jsxs("div",{className:"lead-form__field",children:[h.jsx("label",{children:"Stage"}),h.jsx("select",{className:"lead-form__input",value:o.stage,onChange:b=>c({...o,stage:b.target.value}),children:y.map(b=>h.jsx("option",{value:b,children:b},b))})]}),h.jsx("button",{type:"submit",className:"btn btn-accent",children:"Add Deal"})]})})]})}function zj(){const[s,e]=V.useState("month"),n=[{label:"Total Leads",value:"1,284",change:"+12%",positive:!0},{label:"Properties Listed",value:"348",change:"+8%",positive:!0},{label:"Revenue Pipeline",value:"$4.2M",change:"+24%",positive:!0},{label:"Deals Closed",value:"27",change:"+15%",positive:!0}],a=[{day:"Mon",value:65},{day:"Tue",value:45},{day:"Wed",value:80},{day:"Thu",value:55},{day:"Fri",value:90},{day:"Sat",value:70},{day:"Sun",value:85}];return h.jsxs("div",{className:"dashboard__body",children:[h.jsxs("div",{className:"dashboard__welcome",children:[h.jsxs("div",{className:"dashboard__welcome-content",children:[h.jsx("h2",{children:"Analytics"}),h.jsx("p",{children:"View your business performance metrics."})]}),h.jsx("div",{className:"dashboard__welcome-actions",children:h.jsxs("select",{className:"period-select",value:s,onChange:o=>e(o.target.value),children:[h.jsx("option",{value:"week",children:"This Week"}),h.jsx("option",{value:"month",children:"This Month"}),h.jsx("option",{value:"quarter",children:"This Quarter"}),h.jsx("option",{value:"year",children:"This Year"})]})})]}),h.jsx("div",{className:"dashboard__stats-grid",children:n.map((o,c)=>h.jsxs("div",{className:"dashboard__stat-card",children:[h.jsx("div",{className:"dashboard__stat-card-header",children:h.jsx("span",{className:"dashboard__stat-card-trend positive",children:o.change})}),h.jsx("div",{className:"dashboard__stat-card-value",children:o.value}),h.jsx("div",{className:"dashboard__stat-card-label",children:o.label})]},c))}),h.jsxs("div",{className:"dashboard__grid",children:[h.jsxs("div",{className:"dashboard__card",style:{gridColumn:"1 / -1"},children:[h.jsx("h3",{className:"dashboard__card-title",children:"Performance Overview"}),h.jsx("div",{className:"analytics-chart",children:h.jsx("div",{className:"analytics-chart__bars",children:a.map((o,c)=>h.jsxs("div",{className:"analytics-chart__bar-wrap",children:[h.jsx("div",{className:"analytics-chart__bar",style:{height:`${o.value}%`}}),h.jsx("span",{className:"analytics-chart__label",children:o.day})]},c))})})]}),h.jsxs("div",{className:"dashboard__card",children:[h.jsx("h3",{className:"dashboard__card-title",children:"Top Performing"}),h.jsxs("div",{className:"analytics-list",children:[h.jsxs("div",{className:"analytics-list__item",children:[h.jsx("span",{children:"Hot Leads Converted"}),h.jsx("span",{className:"analytics-list__value",children:"34%"})]}),h.jsxs("div",{className:"analytics-list__item",children:[h.jsx("span",{children:"Average Deal Size"}),h.jsx("span",{className:"analytics-list__value",children:"$12.5K"})]}),h.jsxs("div",{className:"analytics-list__item",children:[h.jsx("span",{children:"Close Rate"}),h.jsx("span",{className:"analytics-list__value",children:"89%"})]})]})]}),h.jsxs("div",{className:"dashboard__card",children:[h.jsx("h3",{className:"dashboard__card-title",children:"Conversion Funnel"}),h.jsxs("div",{className:"funnel",children:[h.jsxs("div",{className:"funnel__stage",children:[h.jsx("span",{children:"Leads"}),h.jsx("span",{children:"1,284"})]}),h.jsxs("div",{className:"funnel__stage",children:[h.jsx("span",{children:"Showings"}),h.jsx("span",{children:"856"})]}),h.jsxs("div",{className:"funnel__stage",children:[h.jsx("span",{children:"Offers"}),h.jsx("span",{children:"342"})]}),h.jsxs("div",{className:"funnel__stage",children:[h.jsx("span",{children:"Closed"}),h.jsx("span",{children:"27"})]})]})]})]})]})}function $E({user:s,setActiveSection:e,onNewLead:n}){const a=[{name:"Sarah Johnson",property:"Sunset Villa #204",status:"Hot",value:"$850,000",time:"2 min ago"},{name:"Michael Chen",property:"Ocean View Condo #108",status:"Warm",value:"$520,000",time:"15 min ago"},{name:"Emily Rodriguez",property:"Downtown Loft #305",status:"Hot",value:"$675,000",time:"1 hour ago"},{name:"David Kim",property:"Garden Estate #412",status:"Cold",value:"$1,200,000",time:"3 hours ago"},{name:"Lisa Thompson",property:"Marina Bay #220",status:"Warm",value:"$890,000",time:"5 hours ago"}],o=[{title:"Follow-up call with Sarah Johnson",time:"Today, 2:00 PM",priority:"high"},{title:"Property viewing - Ocean View Condo",time:"Today, 4:30 PM",priority:"medium"},{title:"Prepare contract for Michael Chen",time:"Tomorrow, 10:00 AM",priority:"high"},{title:"Team meeting - Weekly pipeline review",time:"Wed, 9:00 AM",priority:"low"}],c=[{stage:"New Leads",count:45,value:"$2.1M",color:"#6366F1"},{stage:"Showing Scheduled",count:28,value:"$1.8M",color:"#8B5CF6"},{stage:"Offer Submitted",count:15,value:"$980K",color:"#F59E0B"},{stage:"Under Contract",count:8,value:"$620K",color:"#10B981"},{stage:"Closed Won",count:12,value:"$890K",color:"#059669"}],f=p=>{switch(p){case"Hot":return"status-hot";case"Warm":return"status-warm";case"Cold":return"status-cold";default:return""}};return h.jsxs("div",{className:"dashboard__body",children:[h.jsxs("div",{className:"dashboard__welcome",children:[h.jsxs("div",{className:"dashboard__welcome-content",children:[h.jsxs("h2",{children:["Good morning, ",s?.name,"! π"]}),h.jsx("p",{children:"Here's what's happening with your business today. You have 5 new leads and 3 upcoming viewings."})]}),h.jsxs("div",{className:"dashboard__welcome-actions",children:[h.jsx("button",{className:"btn btn-accent",onClick:n,children:"+ New Lead"}),h.jsx("button",{className:"btn btn-outline-white",onClick:()=>e("analytics"),children:"View Reports"})]})]}),h.jsxs("div",{className:"dashboard__stats-grid",children:[h.jsxs("div",{className:"dashboard__stat-card",children:[h.jsxs("div",{className:"dashboard__stat-card-header",children:[h.jsx("span",{className:"dashboard__stat-card-icon",children:"π―"}),h.jsx("span",{className:"dashboard__stat-card-trend positive",children:"β 12%"})]}),h.jsx("div",{className:"dashboard__stat-card-value",children:"1,284"}),h.jsx("div",{className:"dashboard__stat-card-label",children:"Active Leads"}),h.jsx("div",{className:"dashboard__stat-card-bar",children:h.jsx("div",{className:"dashboard__stat-card-bar-fill",style:{width:"78%"}})})]}),h.jsxs("div",{className:"dashboard__stat-card",children:[h.jsxs("div",{className:"dashboard__stat-card-header",children:[h.jsx("span",{className:"dashboard__stat-card-icon",children:"π "}),h.jsx("span",{className:"dashboard__stat-card-trend positive",children:"β 8%"})]}),h.jsx("div",{className:"dashboard__stat-card-value",children:"348"}),h.jsx("div",{className:"dashboard__stat-card-label",children:"Properties Listed"}),h.jsx("div",{className:"dashboard__stat-card-bar",children:h.jsx("div",{className:"dashboard__stat-card-bar-fill",style:{width:"65%"}})})]}),h.jsxs("div",{className:"dashboard__stat-card",children:[h.jsxs("div",{className:"dashboard__stat-card-header",children:[h.jsx("span",{className:"dashboard__stat-card-icon",children:"π°"}),h.jsx("span",{className:"dashboard__stat-card-trend positive",children:"β 24%"})]}),h.jsx("div",{className:"dashboard__stat-card-value",children:"$4.2M"}),h.jsx("div",{className:"dashboard__stat-card-label",children:"Revenue Pipeline"}),h.jsx("div",{className:"dashboard__stat-card-bar",children:h.jsx("div",{className:"dashboard__stat-card-bar-fill",style:{width:"92%"}})})]}),h.jsxs("div",{className:"dashboard__stat-card",children:[h.jsxs("div",{className:"dashboard__stat-card-header",children:[h.jsx("span",{className:"dashboard__stat-card-icon",children:"β "}),h.jsx("span",{className:"dashboard__stat-card-trend positive",children:"β 15%"})]}),h.jsx("div",{className:"dashboard__stat-card-value",children:"27"}),h.jsx("div",{className:"dashboard__stat-card-label",children:"Deals Closed (MTD)"}),h.jsx("div",{className:"dashboard__stat-card-bar",children:h.jsx("div",{className:"dashboard__stat-card-bar-fill",style:{width:"85%"}})})]})]}),h.jsxs("div",{className:"dashboard__grid",children:[h.jsxs("div",{className:"dashboard__card dashboard__card--leads",children:[h.jsxs("div",{className:"dashboard__card-header",children:[h.jsx("h3",{className:"dashboard__card-title",children:"Recent Leads"}),h.jsx("button",{className:"dashboard__card-action",onClick:()=>e("leads"),children:"View All β"})]}),h.jsxs("div",{className:"dashboard__leads-table",children:[h.jsxs("div",{className:"dashboard__leads-header",children:[h.jsx("span",{children:"Lead"}),h.jsx("span",{children:"Property"}),h.jsx("span",{children:"Status"}),h.jsx("span",{children:"Value"})]}),a.map((p,g)=>h.jsxs("div",{className:"dashboard__leads-row",children:[h.jsxs("div",{className:"dashboard__leads-lead",children:[h.jsx("div",{className:"dashboard__leads-avatar",children:p.name.split(" ").map(y=>y[0]).join("")}),h.jsxs("div",{className:"dashboard__leads-info",children:[h.jsx("span",{className:"dashboard__leads-name",children:p.name}),h.jsx("span",{className:"dashboard__leads-time",children:p.time})]})]}),h.jsx("span",{className:"dashboard__leads-property",children:p.property}),h.jsx("span",{className:`dashboard__leads-status ${f(p.status)}`,children:p.status}),h.jsx("span",{className:"dashboard__leads-value",children:p.value})]},g))]})]}),h.jsxs("div",{className:"dashboard__card dashboard__card--tasks",children:[h.jsxs("div",{className:"dashboard__card-header",children:[h.jsx("h3",{className:"dashboard__card-title",children:"Upcoming Tasks"}),h.jsx("button",{className:"dashboard__card-action",onClick:()=>e("tasks"),children:"View All β"})]}),h.jsx("div",{className:"dashboard__tasks-list",children:o.map((p,g)=>h.jsxs("div",{className:"dashboard__task-item",children:[h.jsx("div",{className:`dashboard__task-priority dashboard__task-priority--${p.priority}`}),h.jsxs("div",{className:"dashboard__task-content",children:[h.jsx("span",{className:"dashboard__task-title",children:p.title}),h.jsx("span",{className:"dashboard__task-time",children:p.time})]})]},g))})]}),h.jsxs("div",{className:"dashboard__card dashboard__card--pipeline",children:[h.jsxs("div",{className:"dashboard__card-header",children:[h.jsx("h3",{className:"dashboard__card-title",children:"Deal Pipeline"}),h.jsx("button",{className:"dashboard__card-action",onClick:()=>e("deals"),children:"View All β"})]}),h.jsx("div",{className:"dashboard__pipeline",children:c.map((p,g)=>h.jsxs("div",{className:"dashboard__pipeline-stage",children:[h.jsxs("div",{className:"dashboard__pipeline-header",children:[h.jsx("span",{className:"dashboard__pipeline-dot",style:{backgroundColor:p.color}}),h.jsx("span",{className:"dashboard__pipeline-stage-name",children:p.stage})]}),h.jsx("div",{className:"dashboard__pipeline-count",children:p.count}),h.jsx("div",{className:"dashboard__pipeline-value",children:p.value}),h.jsx("div",{className:"dashboard__pipeline-bar",children:h.jsx("div",{className:"dashboard__pipeline-bar-fill",style:{width:`${p.count/50*100}%`,backgroundColor:p.color}})})]},g))})]}),h.jsxs("div",{className:"dashboard__card dashboard__card--performance",children:[h.jsxs("div",{className:"dashboard__card-header",children:[h.jsx("h3",{className:"dashboard__card-title",children:"Performance Overview"}),h.jsxs("select",{className:"dashboard__card-select",onChange:p=>console.log("Period:",p.target.value),children:[h.jsx("option",{children:"This Month"}),h.jsx("option",{children:"Last Month"}),h.jsx("option",{children:"This Quarter"})]})]}),h.jsxs("div",{className:"dashboard__chart",children:[h.jsx("div",{className:"dashboard__chart-bars",children:[65,45,80,55,90,70,85].map((p,g)=>h.jsxs("div",{className:"dashboard__chart-bar-wrap",children:[h.jsx("div",{className:"dashboard__chart-bar",style:{height:`${p}%`}}),h.jsx("span",{className:"dashboard__chart-label",children:["Mon","Tue","Wed","Thu","Fri","Sat","Sun"][g]})]},g))}),h.jsxs("div",{className:"dashboard__chart-summary",children:[h.jsxs("div",{className:"dashboard__chart-stat",children:[h.jsx("span",{className:"dashboard__chart-stat-value",children:"89%"}),h.jsx("span",{className:"dashboard__chart-stat-label",children:"Conversion Rate"})]}),h.jsxs("div",{className:"dashboard__chart-stat",children:[h.jsx("span",{className:"dashboard__chart-stat-value",children:"$12.5K"}),h.jsx("span",{className:"dashboard__chart-stat-label",children:"Avg. Deal Size"})]})]})]})]})]})]})}function Bj({user:s,onLogout:e}){const[n,a]=V.useState("overview"),[o,c]=V.useState(!1),[f,p]=V.useState(!1),[g,y]=V.useState(!1),[T,b]=V.useState([{name:"Sarah Johnson",email:"sarah@email.com",phone:"555-0101",property:"Sunset Villa #204",status:"Hot",value:"$850,000",time:"2 min ago"},{name:"Michael Chen",email:"michael@email.com",phone:"555-0102",property:"Ocean View Condo #108",status:"Warm",value:"$520,000",time:"15 min ago"},{name:"Emily Rodriguez",email:"emily@email.com",phone:"555-0103",property:"Downtown Loft #305",status:"Hot",value:"$675,000",time:"1 hour ago"},{name:"David Kim",email:"david@email.com",phone:"555-0104",property:"Garden Estate #412",status:"Cold",value:"$1,200,000",time:"3 hours ago"},{name:"Lisa Thompson",email:"lisa@email.com",phone:"555-0105",property:"Marina Bay #220",status:"Warm",value:"$890,000",time:"5 hours ago"}]),[N,P]=V.useState([{title:"Follow-up call with Sarah Johnson",time:"Today, 2:00 PM",priority:"high",completed:!1},{title:"Property viewing - Ocean View Condo",time:"Today, 4:30 PM",priority:"medium",completed:!1},{title:"Prepare contract for Michael Chen",time:"Tomorrow, 10:00 AM",priority:"high",completed:!1},{title:"Team meeting - Weekly pipeline review",time:"Wed, 9:00 AM",priority:"low",completed:!1}]),[G,K]=V.useState([{title:"Sunset Villa #204",address:"123 Sunset Blvd, Los Angeles",price:"$850,000",bedrooms:"3",bathrooms:"2",sqft:"1,800",status:"Active"},{title:"Ocean View Condo #108",address:"456 Ocean Drive, Miami",price:"$520,000",bedrooms:"2",bathrooms:"2",sqft:"1,200",status:"Active"},{title:"Downtown Loft #305",address:"789 Main St, New York",price:"$675,000",bedrooms:"1",bathrooms:"1",sqft:"950",status:"Pending"}]),[Y,ne]=V.useState([{client:"Sarah Johnson",property:"Sunset Villa",value:"$850,000",stage:"Showing Scheduled",probability:"30%",lastUpdated:"2 hours ago"},{client:"Michael Chen",property:"Ocean View Condo",value:"$520,000",stage:"Offer Submitted",probability:"60%",lastUpdated:"1 day ago"},{client:"Emily Rodriguez",property:"Downtown Loft",value:"$675,000",stage:"New Leads",probability:"10%",lastUpdated:"3 hours ago"}]),[re,oe]=V.useState([{icon:"π―",text:"New lead: Sarah Johnson",time:"2 min ago"},{icon:"π",text:"Deal moved to Under Contract",time:"1 hour ago"},{icon:"π",text:"Task reminder: Follow-up call",time:"30 min ago"}]),de=_e=>{b([{..._e,time:"Just now"},...T])},fe=()=>{switch(n){case"overview":return h.jsx($E,{user:s,setActiveSection:a,onNewLead:()=>c(!0)});case"leads":return h.jsx(Lj,{leads:T,setLeads:b,setActiveSection:a});case"properties":return h.jsx(Vj,{properties:G,setProperties:K});case"deals":return h.jsx(Uj,{deals:Y,setDeals:ne});case"analytics":return h.jsx(zj,{});case"tasks":return h.jsx(kj,{tasks:N,setTasks:P,setActiveSection:a});default:return h.jsx($E,{user:s,setActiveSection:a,onNewLead:()=>c(!0)})}};return h.jsxs("div",{className:"dashboard",children:[h.jsxs("aside",{className:"dashboard__sidebar",children:[h.jsxs("div",{className:"dashboard__sidebar-header",children:[h.jsx("span",{className:"dashboard__sidebar-logo-icon",children:"π’"}),h.jsxs("span",{className:"dashboard__sidebar-logo-text",children:["BEPARAGON ",h.jsx("span",{children:"LLC"})]})]}),h.jsx("nav",{className:"dashboard__sidebar-nav",children:[{name:"Overview",icon:"π"},{name:"Leads",icon:"π―"},{name:"Properties",icon:"π "},{name:"Deals",icon:"π"},{name:"Tasks",icon:"β "},{name:"Analytics",icon:"π"}].map(_e=>h.jsxs("button",{className:`dashboard__sidebar-link${n===_e.name.toLowerCase()?" dashboard__sidebar-link--active":""}`,onClick:()=>a(_e.name.toLowerCase()),children:[h.jsx("span",{className:"dashboard__sidebar-icon",children:_e.icon}),_e.name]},_e.name))}),h.jsx("div",{className:"dashboard__sidebar-footer",children:h.jsxs("button",{className:"dashboard__sidebar-link",onClick:e,children:[h.jsx("span",{className:"dashboard__sidebar-icon",children:"πͺ"}),"Sign Out"]})})]}),h.jsxs("div",{className:"dashboard__main",children:[h.jsxs("header",{className:"dashboard__topbar",children:[h.jsxs("div",{className:"dashboard__topbar-left",children:[h.jsx("h1",{className:"dashboard__topbar-title",children:n.charAt(0).toUpperCase()+n.slice(1)}),h.jsx("span",{className:"dashboard__topbar-subtitle",children:new Date().toLocaleDateString("en-US",{weekday:"long",year:"numeric",month:"long",day:"numeric"})})]}),h.jsxs("div",{className:"dashboard__topbar-actions",children:[h.jsx("button",{className:"dashboard__topbar-btn",onClick:()=>p(!0),children:"π"}),h.jsxs("button",{className:"dashboard__topbar-btn",onClick:()=>y(!0),children:["π",h.jsx("span",{className:"dashboard__topbar-badge",children:re.length})]}),h.jsxs("div",{className:"dashboard__topbar-user",children:[h.jsx("div",{className:"dashboard__topbar-avatar",children:s?.name?.charAt(0)?.toUpperCase()||"U"}),h.jsxs("div",{className:"dashboard__topbar-user-info",children:[h.jsx("span",{className:"dashboard__topbar-user-name",children:s?.name}),h.jsx("span",{className:"dashboard__topbar-user-role",children:"Admin"})]})]})]})]}),fe()]}),h.jsx(wj,{isOpen:o,onClose:()=>c(!1),onSubmit:de}),h.jsx(Nj,{isOpen:f,onClose:()=>p(!1),leads:T,properties:G,deals:Y}),h.jsx(Rj,{isOpen:g,onClose:()=>y(!1),notifications:re})]})}function Hj(){return h.jsxs("div",{className:"privacy-policy",children:[h.jsx("nav",{className:"privacy-policy__nav",children:h.jsx(xi,{to:"/",className:"privacy-policy__back",children:"β Back to Home"})}),h.jsxs("div",{className:"privacy-policy__content",children:[h.jsx("h1",{className:"privacy-policy__title",children:"Privacy Policy"}),h.jsx("p",{className:"privacy-policy__subtitle",children:"Your privacy is important to us. Learn how we protect your data."}),h.jsxs("div",{className:"privacy-policy__cards",children:[h.jsxs("div",{className:"privacy-policy__card",children:[h.jsx("div",{className:"privacy-policy__card-icon",children:"π"}),h.jsx("h3",{children:"Data Security"}),h.jsx("p",{children:"We use industry-standard encryption to protect your personal information."})]}),h.jsxs("div",{className:"privacy-policy__card",children:[h.jsx("div",{className:"privacy-policy__card-icon",children:"π"}),h.jsx("h3",{children:"Data Collection"}),h.jsx("p",{children:"We collect only necessary information to provide our services to you."})]}),h.jsxs("div",{className:"privacy-policy__card",children:[h.jsx("div",{className:"privacy-policy__card-icon",children:"π―"}),h.jsx("h3",{children:"Your Rights"}),h.jsx("p",{children:"You have full control over your personal data and privacy settings."})]}),h.jsxs("div",{className:"privacy-policy__card",children:[h.jsx("div",{className:"privacy-policy__card-icon",children:"β‘"}),h.jsx("h3",{children:"Quick Updates"}),h.jsx("p",{children:"We keep you informed about changes to our privacy practices."})]})]}),h.jsxs("section",{className:"privacy-policy__section",children:[h.jsx("h2",{children:"π Introduction"}),h.jsx("p",{children:"At our company, we take your privacy seriously. This Privacy Policy explains how we collect, use, disclose, and safeguard your information when you visit our website or use our services."})]}),h.jsxs("section",{className:"privacy-policy__section",children:[h.jsx("h2",{children:"π Information We Collect"}),h.jsx("p",{children:"We may collect personal information that you voluntarily provide to us when you:"}),h.jsxs("ul",{className:"privacy-policy__list",children:[h.jsx("li",{children:"Register on the Website"}),h.jsx("li",{children:"Express an interest in obtaining information about us or our products and services"}),h.jsx("li",{children:"Participate in activities on the Website"}),h.jsx("li",{children:"Contact us"}),h.jsx("li",{children:"Subscribe to our newsletter"}),h.jsx("li",{children:"Request a demo or trial"})]})]}),h.jsxs("section",{className:"privacy-policy__section",children:[h.jsx("h2",{children:"π‘ How We Use Your Information"}),h.jsx("p",{children:"We use personal information collected via our Website for a variety of business purposes described below. We process your personal information for these purposes in reliance on our legitimate business interests."}),h.jsxs("ul",{className:"privacy-policy__list",children:[h.jsx("li",{children:"To facilitate account creation and logon process"}),h.jsx("li",{children:"To send administrative information to you"}),h.jsx("li",{children:"To fulfill and manage your orders"}),h.jsx("li",{children:"To request feedback"}),h.jsx("li",{children:"To protect our Services"}),h.jsx("li",{children:"To deliver targeted advertising"}),h.jsx("li",{children:"To improve our website and services"})]})]}),h.jsxs("section",{className:"privacy-policy__section",children:[h.jsx("h2",{children:"π Data Sharing & Transfers"}),h.jsx("p",{children:"We only share information with the following third parties:"}),h.jsxs("ul",{className:"privacy-policy__list",children:[h.jsxs("li",{children:[h.jsx("strong",{children:"Data Analytics Services:"})," Google Analytics, Mixpanel"]}),h.jsxs("li",{children:[h.jsx("strong",{children:"Customer Support:"})," Zendesk, Intercom"]}),h.jsxs("li",{children:[h.jsx("strong",{children:"Payment Processing:"})," Stripe, PayPal"]}),h.jsxs("li",{children:[h.jsx("strong",{children:"Marketing Platforms:"})," Mailchimp, HubSpot"]}),h.jsxs("li",{children:[h.jsx("strong",{children:"Cloud Storage:"})," AWS, Google Cloud"]})]})]}),h.jsxs("section",{className:"privacy-policy__section",children:[h.jsx("h2",{children:"π‘οΈ Your Privacy Rights"}),h.jsx("p",{children:"You have the following rights regarding your personal data:"}),h.jsxs("ul",{className:"privacy-policy__list",children:[h.jsxs("li",{children:[h.jsx("strong",{children:"Right to Access:"})," Request access to your personal data"]}),h.jsxs("li",{children:[h.jsx("strong",{children:"Right to Correction:"})," Request correction or deletion of your personal data"]}),h.jsxs("li",{children:[h.jsx("strong",{children:"Right to Object:"})," Object to processing of your personal data"]}),h.jsxs("li",{children:[h.jsx("strong",{children:"Right to Restriction:"})," Request restriction of processing your personal data"]}),h.jsxs("li",{children:[h.jsx("strong",{children:"Right to Transfer:"})," Request transfer of your personal data"]}),h.jsxs("li",{children:[h.jsx("strong",{children:"Right to Withdraw:"})," Withdraw your consent at any time"]})]})]}),h.jsxs("section",{className:"privacy-policy__section",children:[h.jsx("h2",{children:"πͺ Cookies & Tracking Technologies"}),h.jsx("p",{children:"We use cookies and similar tracking technologies to track the activity on our Website and hold certain information. You can instruct your browser to refuse all cookies or to indicate when a cookie is being sent."}),h.jsxs("ul",{className:"privacy-policy__list",children:[h.jsx("li",{children:"Essential cookies for site functionality"}),h.jsx("li",{children:"Analytics cookies to understand site usage"}),h.jsx("li",{children:"Marketing cookies for targeted advertising"}),h.jsx("li",{children:"Preference cookies to remember your settings"})]})]}),h.jsxs("section",{className:"privacy-policy__section",children:[h.jsx("h2",{children:"π± Data Security"}),h.jsx("p",{children:"We have implemented appropriate technical and organizational security measures designed to protect the security of any personal information we process. Your data is encrypted both in transit and at rest using industry-standard protocols."})]}),h.jsxs("section",{className:"privacy-policy__section",children:[h.jsx("h2",{children:"π International Data Transfers"}),h.jsx("p",{children:"Your information, including personal data, may be transferred to β and maintained on β computers located outside of your state, province, country or other governmental jurisdiction where the data protection laws may differ from those from your jurisdiction."})]}),h.jsxs("section",{className:"privacy-policy__section",children:[h.jsx("h2",{children:"πΆ Children's Privacy"}),h.jsx("p",{children:"Our Service does not address anyone under the age of 13. We do not knowingly collect personally identifiable information from anyone under the age of 13. If you become aware that a child under 13 has provided us with personal information, please contact us immediately."})]}),h.jsxs("section",{className:"privacy-policy__section",children:[h.jsx("h2",{children:"π Data Retention"}),h.jsx("p",{children:"We will retain your personal information only for as long as is necessary for the purposes set out in this Privacy Policy. We will retain and use your information to the extent necessary to comply with our legal obligations, resolve disputes, and enforce our policies."}),h.jsxs("ul",{className:"privacy-policy__list",children:[h.jsx("li",{children:"Account data: Retained while your account is active"}),h.jsx("li",{children:"Transaction data: Retained for 7 years for tax purposes"}),h.jsx("li",{children:"Marketing data: Retuned until you unsubscribe"}),h.jsx("li",{children:"Log files: Retained for 12 months"})]})]}),h.jsxs("section",{className:"privacy-policy__section",children:[h.jsx("h2",{children:"βοΈ GDPR Privacy Rights"}),h.jsx("p",{children:"If you are a resident of the European Economic Area (EEA), you have certain data protection rights:"}),h.jsxs("ul",{className:"privacy-policy__list",children:[h.jsxs("li",{children:[h.jsx("strong",{children:"Right to Access:"})," You have the right to request copies of your personal data"]}),h.jsxs("li",{children:[h.jsx("strong",{children:"Right to Rectification:"})," You can request that we correct any information you believe is inaccurate"]}),h.jsxs("li",{children:[h.jsx("strong",{children:"Right to Erasure:"})," You can request that we erase your personal data under certain conditions"]}),h.jsxs("li",{children:[h.jsx("strong",{children:"Right to Restrict Processing:"})," You can request that we restrict the processing of your data"]}),h.jsxs("li",{children:[h.jsx("strong",{children:"Right to Data Portability:"})," You can request that we transfer your data to another organization"]}),h.jsxs("li",{children:[h.jsx("strong",{children:"Right to Object:"})," You can object to our processing of your personal data"]})]})]}),h.jsxs("section",{className:"privacy-policy__section",children:[h.jsx("h2",{children:"πΊπΈ CCPA Privacy Rights"}),h.jsx("p",{children:"If you are a resident of California, you have the following rights under the California Consumer Privacy Act (CCPA):"}),h.jsxs("ul",{className:"privacy-policy__list",children:[h.jsxs("li",{children:[h.jsx("strong",{children:"Right to Know:"})," You can request what personal information we collect and how we use it"]}),h.jsxs("li",{children:[h.jsx("strong",{children:"Right to Delete:"})," You can request deletion of your personal information"]}),h.jsxs("li",{children:[h.jsx("strong",{children:"Right to Opt-Out:"})," You can opt-out of the sale of your personal information"]}),h.jsxs("li",{children:[h.jsx("strong",{children:"Right to Non-Discrimination:"})," We will not discriminate against you for exercising your rights"]})]})]}),h.jsxs("section",{className:"privacy-policy__section",children:[h.jsx("h2",{children:"π’ Third-Party Advertising"}),h.jsx("p",{children:"We may use third-party advertising companies to serve ads when you visit our website. These companies may use information about your visits to this and other websites in order to provide advertisements about goods and services of interest to you."}),h.jsxs("ul",{className:"privacy-policy__list",children:[h.jsx("li",{children:"Google AdSense"}),h.jsx("li",{children:"Facebook Pixel"}),h.jsx("li",{children:"LinkedIn Insight Tag"}),h.jsx("li",{children:"Twitter Pixel"})]})]}),h.jsxs("section",{className:"privacy-policy__section",children:[h.jsx("h2",{children:"π Communication Preferences"}),h.jsx("p",{children:"We may use your personal information to contact you with newsletters, marketing or promotional materials, and other information that may be of interest to you. You can opt-out of receiving any of these communications at any time by clicking the unsubscribe link in our emails."}),h.jsxs("ul",{className:"privacy-policy__list",children:[h.jsx("li",{children:"Product updates and new features"}),h.jsx("li",{children:"Company news and announcements"}),h.jsx("li",{children:"Educational content and guides"}),h.jsx("li",{children:"Special offers and promotions"})]})]}),h.jsxs("section",{className:"privacy-policy__section",children:[h.jsx("h2",{children:"π’ Business Transfers"}),h.jsx("p",{children:"If we are involved in a merger, acquisition, or sale of all or a portion of our assets, your personal information may be transferred as part of that transaction. We will notify you before your personal information becomes subject to a different privacy policy."})]}),h.jsxs("section",{className:"privacy-policy__section",children:[h.jsx("h2",{children:"π Analytics Services"}),h.jsx("p",{children:"We use third-party analytics tools to understand how our website is used:"}),h.jsxs("ul",{className:"privacy-policy__list",children:[h.jsxs("li",{children:[h.jsx("strong",{children:"Google Analytics:"})," Tracks website traffic and user behavior"]}),h.jsxs("li",{children:[h.jsx("strong",{children:"Hotjar:"})," Records user sessions for UX improvement"]}),h.jsxs("li",{children:[h.jsx("strong",{children:"Mixpanel:"})," Analyzes user engagement and feature usage"]}),h.jsxs("li",{children:[h.jsx("strong",{children:"Segment:"})," Customer data platform for unified analytics"]})]})]}),h.jsxs("section",{className:"privacy-policy__section",children:[h.jsx("h2",{children:"π Changes to This Policy"}),h.jsx("p",{children:'We may update our Privacy Policy from time to time. We will notify you of any changes by posting the new Privacy Policy on this page and updating the "last updated" date at the bottom. You are advised to review this Privacy Policy periodically for any changes.'})]}),h.jsxs("section",{className:"privacy-policy__section",children:[h.jsx("h2",{children:"π§ Contact Us"}),h.jsx("p",{children:"If you have questions or comments about this policy, please contact us:"}),h.jsxs("div",{className:"privacy-policy__contact-card",children:[h.jsxs("p",{children:[h.jsx("strong",{children:"π§ Email:"}),"support@beparagon.com"]}),h.jsxs("p",{children:[h.jsx("strong",{children:"π Phone:"})," (405) 462-7472"]}),h.jsxs("p",{children:[h.jsx("strong",{children:"π Address:"})," 1001 S. MAIN STREET STE 500 KALISPELL, MT 59901"]}),h.jsxs("p",{children:[h.jsx("strong",{children:"π Website:"})," www.beparagon.com"]})]})]}),h.jsxs("p",{className:"privacy-policy__last-updated",children:["Last updated: ",new Date().toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"})]})]})]})}function qj(){const[s,e]=V.useState(null),n=o=>{e(s===o?null:o)},a=[{title:"π Acceptance of Terms",content:"By accessing and using this website, you accept and agree to be bound by the terms and provision of this agreement. If you do not agree to abide by these terms, please do not use our service."},{title:"π Use License",content:"Permission is granted to temporarily use this website for personal, non-commercial transitory viewing only. This is the grant of a license, not a transfer of title. Under this license you may not: modify or copy the materials, use the materials for any commercial purpose."},{title:"β οΈ Disclaimer",content:"The materials on this website are provided 'as is'. We make no warranties, expressed or implied, and hereby disclaim and negate all other warranties, including without limitation, implied warranties of merchantability, fitness for a particular purpose, or non-infringement of intellectual property."},{title:"π« Limitations",content:"In no event shall we or our suppliers be liable for any damages (including, without limitation, damages for loss of data or profit, or due to business interruption) arising out of the use or inability to use the materials on our website."},{title:"π Accuracy of Materials",content:"The materials appearing on our website could include technical, typographical, or photographic errors. We do not warrant that any of the materials on its website are accurate, complete, or current."},{title:"π Links",content:"We have not reviewed all of the sites linked to its website and are not responsible for the contents of any such linked site. The inclusion of any link does not imply endorsement by us of the site."},{title:"π³ Payments & Billing",content:"All paid subscriptions are billed in advance. By subscribing, you authorize us to charge your payment method. Prices are subject to change with 30 days notice. Refunds are available within 14 days of purchase."},{title:"π Account Responsibilities",content:"You are responsible for maintaining the confidentiality of your account and password. You agree to accept responsibility for all activities that occur under your account."},{title:"π User Generated Content",content:"Our service allows you to post, link, store, share and otherwise make available certain information. You are responsible for the content you post and its legality."},{title:"βοΈ Governing Law",content:"These terms and conditions are governed by and construed in accordance with the laws of the State of Montana and you irrevocably submit to the exclusive jurisdiction of the courts in that State."},{title:"π Changes to Terms",content:"We reserve the right, at our sole discretion, to modify or replace these Terms at any time. By continuing to access or use our service, you agree to be bound by the revised terms."}];return h.jsxs("div",{className:"terms-conditions",children:[h.jsx("nav",{className:"terms-conditions__nav",children:h.jsx(xi,{to:"/",className:"terms-conditions__back",children:"β Back to Home"})}),h.jsxs("div",{className:"terms-conditions__content",children:[h.jsx("h1",{className:"terms-conditions__title",children:"Terms & Conditions"}),h.jsx("p",{className:"terms-conditions__subtitle",children:"Please read our terms and conditions carefully before using our service."}),h.jsxs("div",{className:"terms-conditions__cards",children:[h.jsxs("div",{className:"terms-conditions__card",children:[h.jsx("div",{className:"terms-conditions__card-icon",children:"π"}),h.jsx("h3",{children:"Last Updated"}),h.jsx("p",{children:new Date().toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"})})]}),h.jsxs("div",{className:"terms-conditions__card",children:[h.jsx("div",{className:"terms-conditions__card-icon",children:"π§"}),h.jsx("h3",{children:"Questions?"}),h.jsx("p",{children:"Contact us anytime"})]}),h.jsxs("div",{className:"terms-conditions__card",children:[h.jsx("div",{className:"terms-conditions__card-icon",children:"β "}),h.jsx("h3",{children:"Agreement"}),h.jsx("p",{children:"By using, you agree"})]})]}),h.jsx("div",{className:"terms-conditions__accordion",children:a.map((o,c)=>h.jsxs("div",{className:`terms-conditions__accordion-item ${s===c?"active":""}`,children:[h.jsxs("button",{className:"terms-conditions__accordion-header",onClick:()=>n(c),children:[h.jsx("span",{children:o.title}),h.jsx("span",{className:"terms-conditions__accordion-icon",children:s===c?"β":"+"})]}),s===c&&h.jsx("div",{className:"terms-conditions__accordion-content",children:h.jsx("p",{children:o.content})})]},c))}),h.jsxs("section",{className:"terms-conditions__section",children:[h.jsx("h2",{children:"Acceptance of Terms"}),h.jsx("p",{children:"By accessing and using this website, you accept and agree to be bound by the terms and provision of this agreement."})]}),h.jsxs("section",{className:"terms-conditions__section",children:[h.jsx("h2",{children:"Use License"}),h.jsx("p",{children:"Permission is granted to temporarily use this website for personal, non-commercial transitory viewing only."})]}),h.jsxs("section",{className:"terms-conditions__section",children:[h.jsx("h2",{children:"Disclaimer"}),h.jsx("p",{children:'The materials on this website are provided "as is". We make no warranties, expressed or implied, and hereby disclaim and negate all other warranties, including without limitation, implied warranties or conditions of merchantability, fitness for a particular purpose, or non-infringement of intellectual property.'})]}),h.jsxs("section",{className:"terms-conditions__section",children:[h.jsx("h2",{children:"Limitations"}),h.jsx("p",{children:"In no event shall we or our suppliers be liable for any damages (including, without limitation, damages for loss of data or profit, or due to business interruption) arising out of the use or inability to use the materials on our website."})]}),h.jsxs("section",{className:"terms-conditions__section",children:[h.jsx("h2",{children:"Accuracy of Materials"}),h.jsx("p",{children:"The materials appearing on our website could include technical, typographical, or photographic errors. We do not warrant that any of the materials on its website are accurate, complete, or current."})]}),h.jsxs("section",{className:"terms-conditions__section",children:[h.jsx("h2",{children:"Links"}),h.jsx("p",{children:"We have not reviewed all of the sites linked to its website and are not responsible for the contents of any such linked site. The inclusion of any link does not imply endorsement by us of the site."})]}),h.jsxs("section",{className:"terms-conditions__section",children:[h.jsx("h2",{children:"Governing Law"}),h.jsx("p",{children:"These terms and conditions are governed by and construed in accordance with the laws of your jurisdiction and you irrevocably submit to the exclusive jurisdiction of the courts in that State or location."})]}),h.jsxs("section",{className:"terms-conditions__section",children:[h.jsx("h2",{children:"π§ Contact Us"}),h.jsx("p",{children:"If you have any questions about these Terms & Conditions, please contact us:"}),h.jsxs("div",{className:"terms-conditions__contact-card",children:[h.jsxs("p",{children:[h.jsx("strong",{children:"π§ Email:"})," support@beparagon.to"]}),h.jsxs("p",{children:[h.jsx("strong",{children:"π Phone:"})," (405) 462-7472"]}),h.jsxs("p",{children:[h.jsx("strong",{children:"π Address:"})," 1001 S. MAIN STREET STE 500 KALISPELL, MT 59901"]}),h.jsxs("p",{children:[h.jsx("strong",{children:"π Website:"})," www.beparagon.com"]})]})]}),h.jsxs("p",{className:"terms-conditions__last-updated",children:["Last updated: ",new Date().toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"})]})]})]})}function Fj(){const[s,e]=V.useState(null),n=o=>{e(s===o?null:o)},a=[{title:"π° Refund Eligibility",content:"Customers may request a full refund within 30 days of purchase if they are not satisfied with our service. After 30 days, refunds are considered on a case-by-case basis depending on the circumstances."},{title:"π Refund Process",content:"To request a refund, please contact our support team at support@beparagon.to with your order details. We will process your request within 5-7 business days."},{title:"π³ Refund Method",content:"Refunds will be credited to the original payment method used during the purchase. Please allow 5-10 business days for the refund to appear in your account."},{title:"π« Non-Refundable Items",content:"Customized services, add-on features, and promotional discounts are non-refundable. Annual subscription plans may be refunded pro-rated based on remaining months."},{title:"π Contact for Refunds",content:"For refund inquiries, please reach out to our support team who will assist you through the process and answer any questions you may have."}];return h.jsxs("div",{className:"refund-policy",children:[h.jsx("nav",{className:"refund-policy__nav",children:h.jsx(xi,{to:"/",className:"refund-policy__back",children:"β Back to Home"})}),h.jsxs("div",{className:"refund-policy__content",children:[h.jsx("h1",{className:"refund-policy__title",children:"Refund Policy"}),h.jsx("p",{className:"refund-policy__subtitle",children:"Our commitment to customer satisfaction and transparent refund processes."}),h.jsxs("div",{className:"refund-policy__cards",children:[h.jsxs("div",{className:"refund-policy__card",children:[h.jsx("div",{className:"refund-policy__card-icon",children:"π΅"}),h.jsx("h3",{children:"30-Day Window"}),h.jsx("p",{children:"Full refund within 30 days"})]}),h.jsxs("div",{className:"refund-policy__card",children:[h.jsx("div",{className:"refund-policy__card-icon",children:"β‘"}),h.jsx("h3",{children:"Fast Processing"}),h.jsx("p",{children:"5-7 business days"})]}),h.jsxs("div",{className:"refund-policy__card",children:[h.jsx("div",{className:"refund-policy__card-icon",children:"π"}),h.jsx("h3",{children:"Secure Refunds"}),h.jsx("p",{children:"Original payment method"})]})]}),h.jsx("div",{className:"refund-policy__accordion",children:a.map((o,c)=>h.jsxs("div",{className:`refund-policy__accordion-item ${s===c?"active":""}`,children:[h.jsxs("button",{className:"refund-policy__accordion-header",onClick:()=>n(c),children:[h.jsx("span",{children:o.title}),h.jsx("span",{className:"refund-policy__accordion-icon",children:s===c?"β":"+"})]}),s===c&&h.jsx("div",{className:"refund-policy__accordion-content",children:h.jsx("p",{children:o.content})})]},c))}),h.jsxs("section",{className:"refund-policy__section",children:[h.jsx("h2",{children:"π Eligibility Requirements"}),h.jsx("p",{children:"To be eligible for a refund, you must meet the following criteria:"}),h.jsxs("ul",{className:"refund-policy__list",children:[h.jsx("li",{children:"Request made within 30 days of original purchase"}),h.jsx("li",{children:"Account in good standing with no violations of terms of service"}),h.jsx("li",{children:"No excessive usage of the service during the refund period"}),h.jsx("li",{children:"Proof of purchase (order confirmation email)"})]})]}),h.jsxs("section",{className:"refund-policy__section",children:[h.jsx("h2",{children:"π³ Refund Timeline"}),h.jsx("p",{children:"Once your refund request is approved, please note the following timeline:"}),h.jsxs("ul",{className:"refund-policy__list",children:[h.jsxs("li",{children:[h.jsx("strong",{children:"Processing Time:"})," 5-7 business days to process your request"]}),h.jsxs("li",{children:[h.jsx("strong",{children:"Credit Card:"})," 5-10 business days to reflect in your account"]}),h.jsxs("li",{children:[h.jsx("strong",{children:"PayPal:"})," 3-5 business days"]}),h.jsxs("li",{children:[h.jsx("strong",{children:"Bank Transfer:"})," 7-14 business days"]})]})]}),h.jsxs("section",{className:"refund-policy__section",children:[h.jsx("h2",{children:"π Partial Refunds"}),h.jsx("p",{children:"For annual subscriptions canceled after 30 days, we offer pro-rated refunds based on the remaining months of your subscription. The refund amount is calculated as:"}),h.jsxs("ul",{className:"refund-policy__list",children:[h.jsx("li",{children:"Total annual fee minus monthly rate for months used"}),h.jsx("li",{children:"Minus any applicable processing fees"}),h.jsx("li",{children:"Minus any promotional discounts received"})]})]}),h.jsxs("section",{className:"refund-policy__section",children:[h.jsx("h2",{children:"β Refund Denials"}),h.jsx("p",{children:"Refund requests may be denied in the following circumstances:"}),h.jsxs("ul",{className:"refund-policy__list",children:[h.jsx("li",{children:"Request made after 30 days from purchase date"}),h.jsx("li",{children:"Violation of terms of service or abuse of the platform"}),h.jsx("li",{children:"Previously received a refund for the same service"}),h.jsx("li",{children:"Custom or customized services have been delivered"})]})]}),h.jsxs("section",{className:"refund-policy__section",children:[h.jsx("h2",{children:"π§ Contact Us"}),h.jsx("p",{children:"If you have any questions about our refund policy, please contact us:"}),h.jsxs("div",{className:"refund-policy__contact-card",children:[h.jsxs("p",{children:[h.jsx("strong",{children:"π§ Email:"})," support@beparagon.com"]}),h.jsxs("p",{children:[h.jsx("strong",{children:"π Phone:"})," 1-800-BEPARAGON"]}),h.jsxs("p",{children:[h.jsx("strong",{children:"π¬ Live Chat:"})," Available 24/7 on our website"]})]})]}),h.jsxs("p",{className:"refund-policy__last-updated",children:["Last updated: ",new Date().toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"})]})]})]})}function Gj(){const[s,e]=V.useState({clients:0,properties:0,deals:0,years:0}),[n,a]=V.useState(!1);V.useEffect(()=>{if(n)return;const p=setTimeout(()=>{e({clients:5e3,properties:15e3,deals:25e3,years:10}),a(!0)},500);return()=>clearTimeout(p)},[n]);const o=[{name:"John Smith",role:"CEO & Founder",icon:"π¨βπΌ"},{name:"Sarah Johnson",role:"Chief Technology Officer",icon:"π©βπ»"},{name:"Michael Brown",role:"Head of Sales",icon:"π¨βπΌ"},{name:"Emily Davis",role:"Customer Success Lead",icon:"π©βπΌ"}],c=[{icon:"π ",title:"Property Management",desc:"Manage unlimited property listings with ease"},{icon:"π₯",title:"Lead Tracking",desc:"Track and convert leads efficiently"},{icon:"π",title:"Analytics",desc:"Real-time insights into your business"},{icon:"π€",title:"Automation",desc:"Automate repetitive tasks and workflows"},{icon:"π±",title:"Mobile App",desc:"Access your data from anywhere"},{icon:"π",title:"Secure & Compliant",desc:"Bank-level security and GDPR compliant"}],f=[{year:"2014",title:"Founded",desc:"BEPARAGON was founded with a vision to revolutionize real estate CRM"},{year:"2016",title:"First 1000 Clients",desc:"Reached our first major milestone of 1000 active users"},{year:"2018",title:"Mobile App Launch",desc:"Launched our mobile app for iOS and Android"},{year:"2020",title:"50K Users",desc:"Reached 50,000 active users milestone"},{year:"2023",title:"Industry Leader",desc:"Recognized as leading CRM in real estate industry"},{year:"2024",title:"Global Expansion",desc:"Expanded operations to serve clients worldwide"}];return h.jsxs("div",{className:"about-us",children:[h.jsx("nav",{className:"about-us__nav",children:h.jsx(xi,{to:"/",className:"about-us__back",children:"β Back to Home"})}),h.jsxs("div",{className:"about-us__content",children:[h.jsx("h1",{className:"about-us__title",children:"About BEPARAGON"}),h.jsx("p",{className:"about-us__subtitle",children:"Empowering Real Estate Professionals Since 2014"}),h.jsxs("div",{className:"about-us__stats",children:[h.jsxs("div",{className:"about-us__stat",children:[h.jsxs("span",{className:"about-us__stat-number",children:[s.clients.toLocaleString(),"+"]}),h.jsx("span",{className:"about-us__stat-label",children:"Happy Clients"})]}),h.jsxs("div",{className:"about-us__stat",children:[h.jsxs("span",{className:"about-us__stat-number",children:[s.properties.toLocaleString(),"+"]}),h.jsx("span",{className:"about-us__stat-label",children:"Properties Managed"})]}),h.jsxs("div",{className:"about-us__stat",children:[h.jsxs("span",{className:"about-us__stat-number",children:[s.deals.toLocaleString(),"+"]}),h.jsx("span",{className:"about-us__stat-label",children:"Deals Closed"})]}),h.jsxs("div",{className:"about-us__stat",children:[h.jsxs("span",{className:"about-us__stat-number",children:[s.years,"+"]}),h.jsx("span",{className:"about-us__stat-label",children:"Years Experience"})]})]}),h.jsxs("section",{className:"about-us__section",children:[h.jsx("h2",{children:"π What We Offer"}),h.jsx("div",{className:"about-us__features-grid",children:c.map((p,g)=>h.jsxs("div",{className:"about-us__feature-card",style:{animationDelay:`${g*.1}s`},children:[h.jsx("div",{className:"about-us__feature-icon",children:p.icon}),h.jsx("h3",{children:p.title}),h.jsx("p",{children:p.desc})]},g))})]}),h.jsxs("section",{className:"about-us__section",children:[h.jsx("h2",{children:"Who We Are"}),h.jsx("p",{children:"BEPARAGON LLC is a leading real estate technology company dedicated to revolutionizing how real estate professionals manage their businesses. We provide an all-in-one CRM platform that helps agents, brokers, and teams streamline their operations and close deals faster."})]}),h.jsxs("section",{className:"about-us__section",children:[h.jsx("h2",{children:"Our Mission"}),h.jsx("p",{children:"Our mission is to empower real estate professionals with cutting-edge technology that simplifies lead management, improves client relationships, and drives business growth. We believe that the right tools can transform how real estate businesses operate."})]}),h.jsxs("section",{className:"about-us__section",children:[h.jsx("h2",{children:"What We Offer"}),h.jsxs("ul",{children:[h.jsx("li",{children:"Advanced Lead Management System"}),h.jsx("li",{children:"Property Tracking & Inventory Management"}),h.jsx("li",{children:"Automated Marketing Tools"}),h.jsx("li",{children:"Client Relationship Management"}),h.jsx("li",{children:"Analytics & Reporting Dashboard"}),h.jsx("li",{children:"Team Collaboration Features"})]})]}),h.jsxs("section",{className:"about-us__section",children:[h.jsx("h2",{children:"Why Choose BEPARAGON?"}),h.jsxs("ul",{children:[h.jsx("li",{children:"User-friendly interface designed for real estate professionals"}),h.jsx("li",{children:"Comprehensive solution eliminating the need for multiple tools"}),h.jsx("li",{children:"Real-time data synchronization across all devices"}),h.jsx("li",{children:"Excellent customer support and training"}),h.jsx("li",{children:"Affordable pricing plans for businesses of all sizes"})]})]}),h.jsxs("section",{className:"about-us__section",children:[h.jsx("h2",{children:"π₯ Our Team"}),h.jsx("div",{className:"about-us__team-grid",children:o.map((p,g)=>h.jsxs("div",{className:"about-us__team-card",children:[h.jsx("div",{className:"about-us__team-avatar",children:p.icon}),h.jsx("h3",{children:p.name}),h.jsx("p",{children:p.role})]},g))})]}),h.jsxs("section",{className:"about-us__section",children:[h.jsx("h2",{children:"π Our Journey"}),h.jsx("div",{className:"about-us__timeline",children:f.map((p,g)=>h.jsxs("div",{className:"about-us__timeline-item",children:[h.jsx("div",{className:"about-us__timeline-year",children:p.year}),h.jsxs("div",{className:"about-us__timeline-content",children:[h.jsx("h3",{children:p.title}),h.jsx("p",{children:p.desc})]})]},g))})]}),h.jsxs("section",{className:"about-us__section",children:[h.jsx("h2",{children:"Contact Us"}),h.jsx("p",{children:"We'd love to hear from you! Get in touch with us:"}),h.jsxs("p",{className:"about-us__contact",children:[h.jsx("strong",{children:"Email:"})," support@beparagon.to",h.jsx("br",{}),h.jsx("strong",{children:"Phone:"})," (405) 462-7472",h.jsx("br",{}),h.jsx("strong",{children:"Address:"})," 1001 S. MAIN STREET STE 500 KALISPELL, MT 59901"]})]}),h.jsxs("p",{className:"about-us__last-updated",children:["Last updated: ",new Date().toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"})]})]})]})}function Yj(){const[s,e]=V.useState("home"),[n,a]=V.useState(null),[o,c]=V.useState(!1),[f,p]=V.useState(!0);V.useEffect(()=>{const y=vb(co,T=>{a(T?{name:T.displayName||T.email.split("@")[0],email:T.email,uid:T.uid}:null),p(!1)});return()=>y()},[]);const g=async()=>{try{const{signOut:y}=await pN(async()=>{const{signOut:T}=await Promise.resolve().then(()=>wC);return{signOut:T}},[]);await y(co),a(null),e("home")}catch(y){console.error("Logout error:",y)}};return f?h.jsx("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",height:"100vh"},children:h.jsx("div",{children:"Loading..."})}):s==="login"?h.jsxs(h.Fragment,{children:[h.jsx(QE,{onLogin:y=>{a(y),e("dashboard")},onRegister:()=>e("register"),onForgotPassword:()=>c(!0),onBackToHome:()=>e("home")}),h.jsx(KE,{isOpen:o,onClose:()=>c(!1),onBackToLogin:()=>{c(!1)}})]}):s==="register"?h.jsx(Pj,{onRegister:y=>{a(y),e("dashboard")},onBackToLogin:()=>e("login")}):s==="dashboard"&&n?h.jsx(Bj,{user:n,onLogout:g}):h.jsxs(Ow,{children:[h.jsx(Ba,{path:"/login",element:h.jsxs("div",{className:"login-page-wrapper",children:[h.jsx(QE,{onLogin:y=>{a(y),e("dashboard")},onRegister:()=>e("register"),onForgotPassword:()=>c(!0),onBackToHome:()=>e("home")}),h.jsx(KE,{isOpen:o,onClose:()=>c(!1),onBackToLogin:()=>{c(!1)}})]})}),h.jsx(Ba,{path:"/",element:h.jsxs("div",{className:"app",children:[h.jsx(xj,{onLoginClick:()=>e("login"),user:n,onLogout:g}),h.jsxs("main",{children:[h.jsx(Ij,{onSignUpClick:()=>e("login")}),h.jsx(Cj,{}),h.jsx(Dj,{}),h.jsx(jj,{}),h.jsx(Oj,{})]}),h.jsx(Mj,{})]})}),h.jsx(Ba,{path:"/privacy-policy",element:h.jsx(Hj,{})}),h.jsx(Ba,{path:"/terms-conditions",element:h.jsx(qj,{})}),h.jsx(Ba,{path:"/refund-policy",element:h.jsx(Fj,{})}),h.jsx(Ba,{path:"/about-us",element:h.jsx(Gj,{})})]})}PA.createRoot(document.getElementById("root")).render(h.jsx(V.StrictMode,{children:h.jsx(iN,{children:h.jsx(Yj,{})})}));
geri dΓΆn