PageSourceSearch

https://yuanky123.github.io/assets/index-Cw-_whgc.js

js yuanky123.github.io collected 2026-10-03 10:13:30 UTC 675,398 bytes, 2,903 lines download raw bytes

vendor: 5,323 bytes, lines 1-9
1(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();function KI(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var g1={exports:{}},ic={},y1={exports:{}},ae={};/**
2 * @license React
3 * react.production.min.js
4 *
5 * Copyright (c) Facebook, Inc. and its affiliates.
6 *
7 * This source code is licensed under the MIT license found in the
8 * LICENSE file in the root directory of this source tree.
9 */var Pa=Symbol.for("react.element"),GI=Symbol.for("react.portal"),qI=Symbol.for("react.fragment"),QI=Symbol.for("react.strict_mode"),YI=Symbol.for("react.profiler"),XI=Symbol.for("react.provider"),ZI=Symbol.for("react.context"),JI=Symbol.for("react.forward_ref"),ex=Symbol.for("react.suspense"),tx=Symbol.for("react.memo"),nx=Symbol.for("react.lazy"),dy=Symbol.iterator;function rx(t){return t===null||typeof t!="object"?null:(t=dy&&t[dy]||t["@@iterator"],typeof t=="function"?t:null)}var v1={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_1=Object.assign,w1={};function Ls(t,e,n){this.props=t,this.context=e,this.refs=w1,this.updater=n||v1}Ls.prototype.isReactComponent={};Ls.prototype.setState=function(t,e){if(typeof t!="object"&&typeof t!="function"&&t!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,t,e,"setState")};Ls.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function E1(){}E1.prototype=Ls.prototype;function Yd(t,e,n){this.props=t,this.context=e,this.refs=w1,this.updater=n||v1}var Xd=Yd.prototype=new E1;Xd.constructor=Yd;_1(Xd,Ls.prototype);Xd.isPureReactComponent=!0;var py=Array.isArray,T1=Object.prototype.hasOwnProperty,Zd={current:null},S1={key:!0,ref:!0,__self:!0,__source:!0};function A1(t,e,n){var r,i={},s=null,o=null;if(e!=null)for(r in e.ref!==void 0&&(o=e.ref),e.key!==void 0&&(s=""+e.key),e)T1.call(e,r)&&!S1.hasOwnProperty(r)&&(i[r]=e[r]);var l=arguments.length-2;if(l===1)i.children=n;else if(1<l){for(var u=Array(l),c=0;c<l;c++)u[c]=arguments[c+2];i.children=u}if(t&&t.defaultProps)for(r in l=t.defaultProps,l)i[r]===void 0&&(i[r]=l[r]);return{$$typeof:Pa,type:t,key:s,ref:o,props:i,_owner:Zd.current}}function ix(t,e){return{$$typeof:Pa,type:t.type,key:e,ref:t.ref,props:t.props,_owner:t._owner}}function Jd(t){return typeof t=="object"&&t!==null&&t.$$typeof===Pa}function sx(t){var e={"=":"=0",":":"=2"};return"$"+t.replace(/[=:]/g,function(n){return e[n]})}var my=/\/+/g;function ch(t,e){return typeof t=="object"&&t!==null&&t.key!=null?sx(""+t.key):e.toString(36)}function Ml(t,e,n,r,i){var s=typeof t;(s==="undefined"||s==="boolean")&&(t=null);var o=!1;if(t===null)o=!0;else switch(s){case"string":case"number":o=!0;break;case"object":switch(t.$$typeof){case Pa:case GI:o=!0}}if(o)return o=t,i=i(o),t=r===""?"."+ch(o,0):r,py(i)?(n="",t!=null&&(n=t.replace(my,"$&/")+"/"),Ml(i,e,n,"",function(c){return c})):i!=null&&(Jd(i)&&(i=ix(i,n+(!i.key||o&&o.key===i.key?"":(""+i.key).replace(my,"$&/")+"/")+t)),e.push(i)),1;if(o=0,r=r===""?".":r+":",py(t))for(var l=0;l<t.length;l++){s=t[l];var u=r+ch(s,l);o+=Ml(s,e,n,u,i)}else if(u=rx(t),typeof u=="function")for(t=u.call(t),l=0;!(s=t.next()).done;)s=s.value,u=r+ch(s,l++),o+=Ml(s,e,n,u,i);else if(s==="object")throw e=String(t),Error("Objects are not valid as a React child (found: "+(e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)+"). If you meant to render a collection of children, use an array instead.");return o}function il(t,e,n){if(t==null)return t;var r=[],i=0;return Ml(t,r,"","",function(s){return e.call(n,s,i++)}),r}function ox(t){if(t._status===-1){var e=t._result;e=e(),e.then(function(n){(t._status===0||t._status===-1)&&(t._status=1,t._result=n)},function(n){(t._status===0||t._status===-1)&&(t._status=2,t._result=n)}),t._status===-1&&(t._status=0,t._result=e)}if(t._status===1)return t._result.default;throw t._result}var Pt={current:null},Ll={transition:null},ax={ReactCurrentDispatcher:Pt,ReactCurrentBatchConfig:Ll,ReactCurrentOwner:Zd};function I1(){throw Error("act(...) is not supported in production builds of React.")}ae.Children={map:il,forEach:function(t,e,n){il(t,function(){e.apply(this,arguments)},n)},count:function(t){var e=0;return il(t,function(){e++}),e},toArray:function(t){return il(t,function(e){return e})||[]},only:function(t){if(!Jd(t))throw Error("React.Children.only expected to receive a single React element child.");return t}};ae.Component=Ls;ae.Fragment=qI;ae.Profiler=YI;ae.PureComponent=Yd;ae.StrictMode=QI;ae.Suspense=ex;
vendor: 5,056 bytes, lines 9-25
9ae.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ax;ae.act=I1;ae.cloneElement=function(t,e,n){if(t==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+t+".");var r=_1({},t.props),i=t.key,s=t.ref,o=t._owner;if(e!=null){if(e.ref!==void 0&&(s=e.ref,o=Zd.current),e.key!==void 0&&(i=""+e.key),t.type&&t.type.defaultProps)var l=t.type.defaultProps;for(u in e)T1.call(e,u)&&!S1.hasOwnProperty(u)&&(r[u]=e[u]===void 0&&l!==void 0?l[u]:e[u])}var u=arguments.length-2;if(u===1)r.children=n;else if(1<u){l=Array(u);for(var c=0;c<u;c++)l[c]=arguments[c+2];r.children=l}return{$$typeof:Pa,type:t.type,key:i,ref:s,props:r,_owner:o}};ae.createContext=function(t){return t={$$typeof:ZI,_currentValue:t,_currentValue2:t,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},t.Provider={$$typeof:XI,_context:t},t.Consumer=t};ae.createElement=A1;ae.createFactory=function(t){var e=A1.bind(null,t);return e.type=t,e};ae.createRef=function(){return{current:null}};ae.forwardRef=function(t){return{$$typeof:JI,render:t}};ae.isValidElement=Jd;ae.lazy=function(t){return{$$typeof:nx,_payload:{_status:-1,_result:t},_init:ox}};ae.memo=function(t,e){return{$$typeof:tx,type:t,compare:e===void 0?null:e}};ae.startTransition=function(t){var e=Ll.transition;Ll.transition={};try{t()}finally{Ll.transition=e}};ae.unstable_act=I1;ae.useCallback=function(t,e){return Pt.current.useCallback(t,e)};ae.useContext=function(t){return Pt.current.useContext(t)};ae.useDebugValue=function(){};ae.useDeferredValue=function(t){return Pt.current.useDeferredValue(t)};ae.useEffect=function(t,e){return Pt.current.useEffect(t,e)};ae.useId=function(){return Pt.current.useId()};ae.useImperativeHandle=function(t,e,n){return Pt.current.useImperativeHandle(t,e,n)};ae.useInsertionEffect=function(t,e){return Pt.current.useInsertionEffect(t,e)};ae.useLayoutEffect=function(t,e){return Pt.current.useLayoutEffect(t,e)};ae.useMemo=function(t,e){return Pt.current.useMemo(t,e)};ae.useReducer=function(t,e,n){return Pt.current.useReducer(t,e,n)};ae.useRef=function(t){return Pt.current.useRef(t)};ae.useState=function(t){return Pt.current.useState(t)};ae.useSyncExternalStore=function(t,e,n){return Pt.current.useSyncExternalStore(t,e,n)};ae.useTransition=function(){return Pt.current.useTransition()};ae.version="18.3.1";y1.exports=ae;var j=y1.exports;const Ht=KI(j);/**
10 * @license React
11 * react-jsx-runtime.production.min.js
12 *
13 * Copyright (c) Facebook, Inc. and its affiliates.
14 *
15 * This source code is licensed under the MIT license found in the
16 * LICENSE file in the root directory of this source tree.
17 */var lx=j,ux=Symbol.for("react.element"),cx=Symbol.for("react.fragment"),hx=Object.prototype.hasOwnProperty,fx=lx.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,dx={key:!0,ref:!0,__self:!0,__source:!0};function x1(t,e,n){var r,i={},s=null,o=null;n!==void 0&&(s=""+n),e.key!==void 0&&(s=""+e.key),e.ref!==void 0&&(o=e.ref);for(r in e)hx.call(e,r)&&!dx.hasOwnProperty(r)&&(i[r]=e[r]);if(t&&t.defaultProps)for(r in e=t.defaultProps,e)i[r]===void 0&&(i[r]=e[r]);return{$$typeof:ux,type:t,key:s,ref:o,props:i,_owner:fx.current}}ic.Fragment=cx;ic.jsx=x1;ic.jsxs=x1;g1.exports=ic;var N=g1.exports,ff={},C1={exports:{}},Qt={},P1={exports:{}},R1={};/**
18 * @license React
19 * scheduler.production.min.js
20 *
21 * Copyright (c) Facebook, Inc. and its affiliates.
22 *
23 * This source code is licensed under the MIT license found in the
24 * LICENSE file in the root directory of this source tree.
25 */(function(t){function e(U,G){var X=U.length;U.push(G);e:for(;0<X;){var pe=X-1>>>1,oe=U[pe];if(0<i(oe,G))U[pe]=G,U[X]=oe,X=pe;else break e}}function n(U){return U.length===0?null:U[0]}function r(U){if(U.length===0)return null;var G=U[0],X=U.pop();if(X!==G){U[0]=X;e:for(var pe=0,oe=U.length,we=oe>>>1;pe<we;){var St=2*(pe+1)-1,ct=U[St],Je=St+1,et=U[Je];if(0>i(ct,X))Je<oe&&0>i(et,ct)?(U[pe]=et,U[Je]=X,pe=Je):(U[pe]=ct,U[St]=X,pe=St);else if(Je<oe&&0>i(et,X))U[pe]=et,U[Je]=X,pe=Je;else break e}}return G}function i(U,G){var X=U.sortIndex-G.sortIndex;return X!==0?X:U.id-G.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;t.unstable_now=function(){return s.now()}}else{var o=Date,l=o.now();t.unstable_now=function(){return o.now()-l}}var u=[],c=[],f=1,d=null,p=3,y=!1,S=!1,x=!1,R=typeof setTimeout=="function"?setTimeout:null,w=typeof clearTimeout=="function"?clearTimeout:null,v=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function T(U){for(var G=n(c);G!==null;){if(G.callback===null)r(c);else if(G.startTime<=U)r(c),G.sortIndex=G.expirationTime,e(u,G);else break;G=n(c)}}function k(U){if(x=!1,T(U),!S)if(n(u)!==null)S=!0,un(b);else{var G=n(c);G!==null&&de(k,G.startTime-U)}}function b(U,G){S=!1,x&&(x=!1,w(g),g=-1),y=!0;var X=p;try{for(T(G),d=n(u);d!==null&&(!(d.expirationTime>G)||U&&!P());){var pe=d.callback;
vendor: 9,189 bytes, lines 25-34
25if(typeof pe=="function"){d.callback=null,p=d.priorityLevel;var oe=pe(d.expirationTime<=G);G=t.unstable_now(),typeof oe=="function"?d.callback=oe:d===n(u)&&r(u),T(G)}else r(u);d=n(u)}if(d!==null)var we=!0;else{var St=n(c);St!==null&&de(k,St.startTime-G),we=!1}return we}finally{d=null,p=X,y=!1}}var M=!1,E=null,g=-1,A=5,I=-1;function P(){return!(t.unstable_now()-I<A)}function V(){if(E!==null){var U=t.unstable_now();I=U;var G=!0;try{G=E(!0,U)}finally{G?C():(M=!1,E=null)}}else M=!1}var C;if(typeof v=="function")C=function(){v(V)};else if(typeof MessageChannel<"u"){var He=new MessageChannel,Ft=He.port2;He.port1.onmessage=V,C=function(){Ft.postMessage(null)}}else C=function(){R(V,0)};function un(U){E=U,M||(M=!0,C())}function de(U,G){g=R(function(){U(t.unstable_now())},G)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(U){U.callback=null},t.unstable_continueExecution=function(){S||y||(S=!0,un(b))},t.unstable_forceFrameRate=function(U){0>U||125<U?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):A=0<U?Math.floor(1e3/U):5},t.unstable_getCurrentPriorityLevel=function(){return p},t.unstable_getFirstCallbackNode=function(){return n(u)},t.unstable_next=function(U){switch(p){case 1:case 2:case 3:var G=3;break;default:G=p}var X=p;p=G;try{return U()}finally{p=X}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(U,G){switch(U){case 1:case 2:case 3:case 4:case 5:break;default:U=3}var X=p;p=U;try{return G()}finally{p=X}},t.unstable_scheduleCallback=function(U,G,X){var pe=t.unstable_now();switch(typeof X=="object"&&X!==null?(X=X.delay,X=typeof X=="number"&&0<X?pe+X:pe):X=pe,U){case 1:var oe=-1;break;case 2:oe=250;break;case 5:oe=1073741823;break;case 4:oe=1e4;break;default:oe=5e3}return oe=X+oe,U={id:f++,callback:G,priorityLevel:U,startTime:X,expirationTime:oe,sortIndex:-1},X>pe?(U.sortIndex=X,e(c,U),n(u)===null&&U===n(c)&&(x?(w(g),g=-1):x=!0,de(k,X-pe))):(U.sortIndex=oe,e(u,U),S||y||(S=!0,un(b))),U},t.unstable_shouldYield=P,t.unstable_wrapCallback=function(U){var G=p;return function(){var X=p;p=G;try{return U.apply(this,arguments)}finally{p=X}}}})(R1);P1.exports=R1;var px=P1.exports;/**
26 * @license React
27 * react-dom.production.min.js
28 *
29 * Copyright (c) Facebook, Inc. and its affiliates.
30 *
31 * This source code is licensed under the MIT license found in the
32 * LICENSE file in the root directory of this source tree.
33 */var mx=j,Gt=px;function B(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,n=1;n<arguments.length;n++)e+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+t+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var k1=new Set,qo={};function Ti(t,e){ds(t,e),ds(t+"Capture",e)}function ds(t,e){for(qo[t]=e,t=0;t<e.length;t++)k1.add(e[t])}var qn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),df=Object.prototype.hasOwnProperty,gx=/^[: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]*$/,gy={},yy={};function yx(t){return df.call(yy,t)?!0:df.call(gy,t)?!1:gx.test(t)?yy[t]=!0:(gy[t]=!0,!1)}function vx(t,e,n,r){if(n!==null&&n.type===0)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function _x(t,e,n,r){if(e===null||typeof e>"u"||vx(t,e,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!e;case 4:return e===!1;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}function Rt(t,e,n,r,i,s,o){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=t,this.type=e,this.sanitizeURL=s,this.removeEmptyString=o}var lt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){lt[t]=new Rt(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];lt[e]=new Rt(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){lt[t]=new Rt(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){lt[t]=new Rt(t,2,!1,t,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(t){lt[t]=new Rt(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){lt[t]=new Rt(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){lt[t]=new Rt(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){lt[t]=new Rt(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){lt[t]=new Rt(t,5,!1,t.toLowerCase(),null,!1,!1)});var ep=/[\-:]([a-z])/g;function tp(t){return t[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(t){var e=t.replace(ep,tp);lt[e]=new Rt(e,1,!1,t,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var e=t.replace(ep,tp);lt[e]=new Rt(e,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(t){var e=t.replace(ep,tp);lt[e]=new Rt(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){lt[t]=new Rt(t,1,!1,t.toLowerCase(),null,!1,!1)});lt.xlinkHref=new Rt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){lt[t]=new Rt(t,1,!1,t.toLowerCase(),null,!0,!0)});function np(t,e,n,r){var i=lt.hasOwnProperty(e)?lt[e]:null;(i!==null?i.type!==0:r||!(2<e.length)||e[0]!=="o"&&e[0]!=="O"||e[1]!=="n"&&e[1]!=="N")&&(_x(e,n,i,r)&&(n=null),r||i===null?yx(e)&&(n===null?t.removeAttribute(e):t.setAttribute(e,""+n)):i.mustUseProperty?t[i.propertyName]=n===null?i.type===3?!1:"":n:(e=i.attributeName,r=i.attributeNamespace,n===null?t.removeAttribute(e):(i=i.type,n=i===3||i===4&&n===!0?"":""+n,r?t.setAttributeNS(r,e,n):t.setAttribute(e,n))))}var nr=mx.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,sl=Symbol.for("react.element"),Bi=Symbol.for("react.portal"),zi=Symbol.for("react.fragment"),rp=Symbol.for("react.strict_mode"),pf=Symbol.for("react.profiler"),V1=Symbol.for("react.provider"),D1=Symbol.for("react.context"),ip=Symbol.for("react.forward_ref"),mf=Symbol.for("react.suspense"),gf=Symbol.for("react.suspense_list"),sp=Symbol.for("react.memo"),hr=Symbol.for("react.lazy"),b1=Symbol.for("react.offscreen"),vy=Symbol.iterator;function lo(t){return t===null||typeof t!="object"?null:(t=vy&&t[vy]||t["@@iterator"],typeof t=="function"?t:null)}var De=Object.assign,hh;function vo(t){if(hh===void 0)try{throw Error()}catch(n){var e=n.stack.trim().match(/\n( *(at )?)/);hh=e&&e[1]||""}return`
34`+hh+t}var fh=!1;function dh(t,e){if(!t||fh)return"";fh=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(e)if(e=function(){throw Error()},Object.defineProperty(e.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(e,[])}catch(c){var r=c}Reflect.construct(t,[],e)}else{try{e.call()}catch(c){r=c}t.call(e.prototype)}else{try{throw Error()}catch(c){r=c}t()}}
vendor: 14,678 bytes, lines 34-37
34catch(c){if(c&&r&&typeof c.stack=="string"){for(var i=c.stack.split(`
35`),s=r.stack.split(`
36`),o=i.length-1,l=s.length-1;1<=o&&0<=l&&i[o]!==s[l];)l--;for(;1<=o&&0<=l;o--,l--)if(i[o]!==s[l]){if(o!==1||l!==1)do if(o--,l--,0>l||i[o]!==s[l]){var u=`
37`+i[o].replace(" at new "," at ");return t.displayName&&u.includes("<anonymous>")&&(u=u.replace("<anonymous>",t.displayName)),u}while(1<=o&&0<=l);break}}}finally{fh=!1,Error.prepareStackTrace=n}return(t=t?t.displayName||t.name:"")?vo(t):""}function wx(t){switch(t.tag){case 5:return vo(t.type);case 16:return vo("Lazy");case 13:return vo("Suspense");case 19:return vo("SuspenseList");case 0:case 2:case 15:return t=dh(t.type,!1),t;case 11:return t=dh(t.type.render,!1),t;case 1:return t=dh(t.type,!0),t;default:return""}}function yf(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case zi:return"Fragment";case Bi:return"Portal";case pf:return"Profiler";case rp:return"StrictMode";case mf:return"Suspense";case gf:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case D1:return(t.displayName||"Context")+".Consumer";case V1:return(t._context.displayName||"Context")+".Provider";case ip:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case sp:return e=t.displayName||null,e!==null?e:yf(t.type)||"Memo";case hr:e=t._payload,t=t._init;try{return yf(t(e))}catch{}}return null}function Ex(t){var e=t.type;switch(t.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=e.render,t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return yf(e);case 8:return e===rp?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e}return null}function Dr(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function N1(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function Tx(t){var e=N1(t)?"checked":"value",n=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),r=""+t[e];if(!t.hasOwnProperty(e)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,s=n.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return i.call(this)},set:function(o){r=""+o,s.call(this,o)}}),Object.defineProperty(t,e,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function ol(t){t._valueTracker||(t._valueTracker=Tx(t))}function M1(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var n=e.getValue(),r="";return t&&(r=N1(t)?t.checked?"true":"false":t.value),t=r,t!==n?(e.setValue(t),!0):!1}function lu(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function vf(t,e){var n=e.checked;return De({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??t._wrapperState.initialChecked})}function _y(t,e){var n=e.defaultValue==null?"":e.defaultValue,r=e.checked!=null?e.checked:e.defaultChecked;n=Dr(e.value!=null?e.value:n),t._wrapperState={initialChecked:r,initialValue:n,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function L1(t,e){e=e.checked,e!=null&&np(t,"checked",e,!1)}function _f(t,e){L1(t,e);var n=Dr(e.value),r=e.type;if(n!=null)r==="number"?(n===0&&t.value===""||t.value!=n)&&(t.value=""+n):t.value!==""+n&&(t.value=""+n);else if(r==="submit"||r==="reset"){t.removeAttribute("value");return}e.hasOwnProperty("value")?wf(t,e.type,n):e.hasOwnProperty("defaultValue")&&wf(t,e.type,Dr(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function wy(t,e,n){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var r=e.type;if(!(r!=="submit"&&r!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+t._wrapperState.initialValue,n||e===t.value||(t.value=e),t.defaultValue=e}n=t.name,n!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,n!==""&&(t.name=n)}function wf(t,e,n){(e!=="number"||lu(t.ownerDocument)!==t)&&(n==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+n&&(t.defaultValue=""+n))}var _o=Array.isArray;function is(t,e,n,r){if(t=t.options,e){e={};for(var i=0;i<n.length;i++)e["$"+n[i]]=!0;for(n=0;n<t.length;n++)i=e.hasOwnProperty("$"+t[n].value),t[n].selected!==i&&(t[n].selected=i),i&&r&&(t[n].defaultSelected=!0)}else{for(n=""+Dr(n),e=null,i=0;i<t.length;i++){if(t[i].value===n){t[i].selected=!0,r&&(t[i].defaultSelected=!0);return}e!==null||t[i].disabled||(e=t[i])}e!==null&&(e.selected=!0)}}function Ef(t,e){if(e.dangerouslySetInnerHTML!=null)throw Error(B(91));return De({},e,{value:void 0,defaultValue:void 0,children:""+t._wrapperState.initialValue})}function Ey(t,e){var n=e.value;if(n==null){if(n=e.children,e=e.defaultValue,n!=null){if(e!=null)throw Error(B(92));if(_o(n)){if(1<n.length)throw Error(B(93));n=n[0]}e=n}e==null&&(e=""),n=e}t._wrapperState={initialValue:Dr(n)}}function O1(t,e){var n=Dr(e.value),r=Dr(e.defaultValue);n!=null&&(n=""+n,n!==t.value&&(t.value=n),e.defaultValue==null&&t.defaultValue!==n&&(t.defaultValue=n)),r!=null&&(t.defaultValue=""+r)}function Ty(t){var e=t.textContent;e===t._wrapperState.initialValue&&e!==""&&e!==null&&(t.value=e)}function F1(t){switch(t){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Tf(t,e){return t==null||t==="http://www.w3.org/1999/xhtml"?F1(e):t==="http://www.w3.org/2000/svg"&&e==="foreignObject"?"http://www.w3.org/1999/xhtml":t}var al,j1=function(t){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(e,n,r,i){MSApp.execUnsafeLocalFunction(function(){return t(e,n,r,i)})}:t}(function(t,e){if(t.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in t)t.innerHTML=e;else{for(al=al||document.createElement("div"),al.innerHTML="<svg>"+e.valueOf().toString()+"</svg>",e=al.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function Qo(t,e){if(e){var n=t.firstChild;if(n&&n===t.lastChild&&n.nodeType===3){n.nodeValue=e;return}}t.textContent=e}var Ro={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Sx=["Webkit","ms","Moz","O"];Object.keys(Ro).forEach(function(t){Sx.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),Ro[e]=Ro[t]})});function B1(t,e,n){return e==null||typeof e=="boolean"||e===""?"":n||typeof e!="number"||e===0||Ro.hasOwnProperty(t)&&Ro[t]?(""+e).trim():e+"px"}function z1(t,e){t=t.style;for(var n in e)if(e.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=B1(n,e[n],r);n==="float"&&(n="cssFloat"),r?t.setProperty(n,i):t[n]=i}}var Ax=De({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Sf(t,e){if(e){if(Ax[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(B(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(B(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(B(61))}if(e.style!=null&&typeof e.style!="object")throw Error(B(62))}}function Af(t,e){if(t.indexOf("-")===-1)return typeof e.is=="string";switch(t){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var If=null;function op(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var xf=null,ss=null,os=null;function Sy(t){if(t=Va(t)){if(typeof xf!="function")throw Error(B(280));var e=t.stateNode;e&&(e=uc(e),xf(t.stateNode,t.type,e))}}function U1(t){ss?os?os.push(t):os=[t]:ss=t}function $1(){if(ss){var t=ss,e=os;if(os=ss=null,Sy(t),e)for(t=0;t<e.length;t++)Sy(e[t])}}function H1(t,e){return t(e)}function W1(){}var ph=!1;function K1(t,e,n){if(ph)return t(e,n);ph=!0;try{return H1(t,e,n)}finally{ph=!1,(ss!==null||os!==null)&&(W1(),$1())}}function Yo(t,e){var n=t.stateNode;if(n===null)return null;var r=uc(n);if(r===null)return null;n=r[e];e:switch(e){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(t=t.type,r=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!r;break e;default:t=!1}if(t)return null;if(n&&typeof n!="function")throw Error(B(231,e,typeof n));return n}var Cf=!1;if(qn)try{var uo={};Object.defineProperty(uo,"passive",{get:function(){Cf=!0}}),window.addEventListener("test",uo,uo),window.removeEventListener("test",uo,uo)}catch{Cf=!1}function Ix(t,e,n,r,i,s,o,l,u){var c=Array.prototype.slice.call(arguments,3);try{e.apply(n,c)}catch(f){this.onError(f)}}var ko=!1,uu=null,cu=!1,Pf=null,xx={onError:function(t){ko=!0,uu=t}};function Cx(t,e,n,r,i,s,o,l,u){ko=!1,uu=null,Ix.apply(xx,arguments)}function Px(t,e,n,r,i,s,o,l,u){if(Cx.apply(this,arguments),ko){if(ko){var c=uu;ko=!1,uu=null}else throw Error(B(198));cu||(cu=!0,Pf=c)}}function Si(t){var e=t,n=t;if(t.alternate)for(;e.return;)e=e.return;else{t=e;do e=t,e.flags&4098&&(n=e.return),t=e.return;while(t)}return e.tag===3?n:null}function G1(t){if(t.tag===13){var e=t.memoizedState;if(e===null&&(t=t.alternate,t!==null&&(e=t.memoizedState)),e!==null)return e.dehydrated}return null}function Ay(t){if(Si(t)!==t)throw Error(B(188))}function Rx(t){var e=t.alternate;if(!e){if(e=Si(t),e===null)throw Error(B(188));return e!==t?null:t}for(var n=t,r=e;;){var i=n.return;if(i===null)break;var s=i.alternate;if(s===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===s.child){for(s=i.child;s;){if(s===n)return Ay(i),t;if(s===r)return Ay(i),e;s=s.sibling}throw Error(B(188))}if(n.return!==r.return)n=i,r=s;else{for(var o=!1,l=i.child;l;){if(l===n){o=!0,n=i,r=s;break}if(l===r){o=!0,r=i,n=s;break}l=l.sibling}if(!o){for(l=s.child;l;){if(l===n){o=!0,n=s,r=i;break}if(l===r){o=!0,r=s,n=i;break}l=l.sibling}if(!o)throw Error(B(189))}}if(n.alternate!==r)throw Error(B(190))}if(n.tag!==3)throw Error(B(188));return n.stateNode.current===n?t:e}function q1(t){return t=Rx(t),t!==null?Q1(t):null}function Q1(t){if(t.tag===5||t.tag===6)return t;for(t=t.child;t!==null;){var e=Q1(t);if(e!==null)return e;t=t.sibling}return null}var Y1=Gt.unstable_scheduleCallback,Iy=Gt.unstable_cancelCallback,kx=Gt.unstable_shouldYield,Vx=Gt.unstable_requestPaint,je=Gt.unstable_now,Dx=Gt.unstable_getCurrentPriorityLevel,ap=Gt.unstable_ImmediatePriority,X1=Gt.unstable_UserBlockingPriority,hu=Gt.unstable_NormalPriority,bx=Gt.unstable_LowPriority,Z1=Gt.unstable_IdlePriority,sc=null,Rn=null;function Nx(t){if(Rn&&typeof Rn.onCommitFiberRoot=="function")try{Rn.onCommitFiberRoot(sc,t,void 0,(t.current.flags&128)===128)}catch{}}var vn=Math.clz32?Math.clz32:Ox,Mx=Math.log,Lx=Math.LN2;function Ox(t){return t>>>=0,t===0?32:31-(Mx(t)/Lx|0)|0}var ll=64,ul=4194304;function wo(t){switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return t&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function fu(t,e){var n=t.pendingLanes;if(n===0)return 0;var r=0,i=t.suspendedLanes,s=t.pingedLanes,o=n&268435455;if(o!==0){var l=o&~i;l!==0?r=wo(l):(s&=o,s!==0&&(r=wo(s)))}else o=n&~i,o!==0?r=wo(o):s!==0&&(r=wo(s));if(r===0)return 0;if(e!==0&&e!==r&&!(e&i)&&(i=r&-r,s=e&-e,i>=s||i===16&&(s&4194240)!==0))return e;if(r&4&&(r|=n&16),e=t.entangledLanes,e!==0)for(t=t.entanglements,e&=r;0<e;)n=31-vn(e),i=1<<n,r|=t[n],e&=~i;return r}function Fx(t,e){switch(t){case 1:case 2:case 4:return e+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function jx(t,e){for(var n=t.suspendedLanes,r=t.pingedLanes,i=t.expirationTimes,s=t.pendingLanes;0<s;){var o=31-vn(s),l=1<<o,u=i[o];u===-1?(!(l&n)||l&r)&&(i[o]=Fx(l,e)):u<=e&&(t.expiredLanes|=l),s&=~l}}function Rf(t){return t=t.pendingLanes&-1073741825,t!==0?t:t&1073741824?1073741824:0}function J1(){var t=ll;return ll<<=1,!(ll&4194240)&&(ll=64),t}function mh(t){for(var e=[],n=0;31>n;n++)e.push(t);return e}function Ra(t,e,n){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-vn(e),t[e]=n}function Bx(t,e){var n=t.pendingLanes&~e;t.pendingLanes=e,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=e,t.mutableReadLanes&=e,t.entangledLanes&=e,e=t.entanglements;var r=t.eventTimes;for(t=t.expirationTimes;0<n;){var i=31-vn(n),s=1<<i;e[i]=0,r[i]=-1,t[i]=-1,n&=~s}}function lp(t,e){var n=t.entangledLanes|=e;for(t=t.entanglements;n;){var r=31-vn(n),i=1<<r;i&e|t[r]&e&&(t[r]|=e),n&=~i}}var ve=0;function ew(t){return t&=-t,1<t?4<t?t&268435455?16:536870912:4:1}
vendor: 2,442 bytes, line 37
37var tw,up,nw,rw,iw,kf=!1,cl=[],vr=null,_r=null,wr=null,Xo=new Map,Zo=new Map,dr=[],zx="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function xy(t,e){switch(t){case"focusin":case"focusout":vr=null;break;case"dragenter":case"dragleave":_r=null;break;case"mouseover":case"mouseout":wr=null;break;case"pointerover":case"pointerout":Xo.delete(e.pointerId);break;case"gotpointercapture":case"lostpointercapture":Zo.delete(e.pointerId)}}function co(t,e,n,r,i,s){return t===null||t.nativeEvent!==s?(t={blockedOn:e,domEventName:n,eventSystemFlags:r,nativeEvent:s,targetContainers:[i]},e!==null&&(e=Va(e),e!==null&&up(e)),t):(t.eventSystemFlags|=r,e=t.targetContainers,i!==null&&e.indexOf(i)===-1&&e.push(i),t)}function Ux(t,e,n,r,i){switch(e){case"focusin":return vr=co(vr,t,e,n,r,i),!0;case"dragenter":return _r=co(_r,t,e,n,r,i),!0;case"mouseover":return wr=co(wr,t,e,n,r,i),!0;case"pointerover":var s=i.pointerId;return Xo.set(s,co(Xo.get(s)||null,t,e,n,r,i)),!0;case"gotpointercapture":return s=i.pointerId,Zo.set(s,co(Zo.get(s)||null,t,e,n,r,i)),!0}return!1}function sw(t){var e=ri(t.target);if(e!==null){var n=Si(e);if(n!==null){if(e=n.tag,e===13){if(e=G1(n),e!==null){t.blockedOn=e,iw(t.priority,function(){nw(n)});return}}else if(e===3&&n.stateNode.current.memoizedState.isDehydrated){t.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}t.blockedOn=null}function Ol(t){if(t.blockedOn!==null)return!1;for(var e=t.targetContainers;0<e.length;){var n=Vf(t.domEventName,t.eventSystemFlags,e[0],t.nativeEvent);if(n===null){n=t.nativeEvent;var r=new n.constructor(n.type,n);If=r,n.target.dispatchEvent(r),If=null}else return e=Va(n),e!==null&&up(e),t.blockedOn=n,!1;e.shift()}return!0}function Cy(t,e,n){Ol(t)&&n.delete(e)}function $x(){kf=!1,vr!==null&&Ol(vr)&&(vr=null),_r!==null&&Ol(_r)&&(_r=null),wr!==null&&Ol(wr)&&(wr=null),Xo.forEach(Cy),Zo.forEach(Cy)}function ho(t,e){t.blockedOn===e&&(t.blockedOn=null,kf||(kf=!0,Gt.unstable_scheduleCallback(Gt.unstable_NormalPriority,$x)))}function Jo(t){function e(i){return ho(i,t)}if(0<cl.length){ho(cl[0],t);for(var n=1;n<cl.length;n++){var r=cl[n];r.blockedOn===t&&(r.blockedOn=null)}}for(vr!==null&&ho(vr,t),_r!==null&&ho(_r,t),wr!==null&&ho(wr,t),Xo.forEach(e),Zo.forEac
vendor: 8,908 bytes, line 37
37h(e),n=0;n<dr.length;n++)r=dr[n],r.blockedOn===t&&(r.blockedOn=null);for(;0<dr.length&&(n=dr[0],n.blockedOn===null);)sw(n),n.blockedOn===null&&dr.shift()}var as=nr.ReactCurrentBatchConfig,du=!0;function Hx(t,e,n,r){var i=ve,s=as.transition;as.transition=null;try{ve=1,cp(t,e,n,r)}finally{ve=i,as.transition=s}}function Wx(t,e,n,r){var i=ve,s=as.transition;as.transition=null;try{ve=4,cp(t,e,n,r)}finally{ve=i,as.transition=s}}function cp(t,e,n,r){if(du){var i=Vf(t,e,n,r);if(i===null)Ih(t,e,r,pu,n),xy(t,r);else if(Ux(i,t,e,n,r))r.stopPropagation();else if(xy(t,r),e&4&&-1<zx.indexOf(t)){for(;i!==null;){var s=Va(i);if(s!==null&&tw(s),s=Vf(t,e,n,r),s===null&&Ih(t,e,r,pu,n),s===i)break;i=s}i!==null&&r.stopPropagation()}else Ih(t,e,r,null,n)}}var pu=null;function Vf(t,e,n,r){if(pu=null,t=op(r),t=ri(t),t!==null)if(e=Si(t),e===null)t=null;else if(n=e.tag,n===13){if(t=G1(e),t!==null)return t;t=null}else if(n===3){if(e.stateNode.current.memoizedState.isDehydrated)return e.tag===3?e.stateNode.containerInfo:null;t=null}else e!==t&&(t=null);return pu=t,null}function ow(t){switch(t){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Dx()){case ap:return 1;case X1:return 4;case hu:case bx:return 16;case Z1:return 536870912;default:return 16}default:return 16}}var mr=null,hp=null,Fl=null;function aw(){if(Fl)return Fl;var t,e=hp,n=e.length,r,i="value"in mr?mr.value:mr.textContent,s=i.length;for(t=0;t<n&&e[t]===i[t];t++);var o=n-t;for(r=1;r<=o&&e[n-r]===i[s-r];r++);return Fl=i.slice(t,1<r?1-r:void 0)}function jl(t){var e=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&e===13&&(t=13)):t=e,t===10&&(t=13),32<=t||t===13?t:0}function hl(){return!0}function Py(){return!1}function Yt(t){function e(n,r,i,s,o){this._reactName=n,this._targetInst=i,this.type=r,this.nativeEvent=s,this.target=o,this.currentTarget=null;for(var l in t)t.hasOwnProperty(l)&&(n=t[l],this[l]=n?n(s):s[l]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.returnValue===!1)?hl:Py,this.isPropagationStopped=Py,this}return De(e.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=hl)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=hl)},persist:function(){},isPersistent:hl}),e}var Os={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},fp=Yt(Os),ka=De({},Os,{view:0,detail:0}),Kx=Yt(ka),gh,yh,fo,oc=De({},ka,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:dp,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!==fo&&(fo&&t.type==="mousemove"?(gh=t.screenX-fo.screenX,yh=t.screenY-fo.screenY):yh=gh=0,fo=t),gh)},movementY:function(t){return"movementY"in t?t.movementY:yh}}),Ry=Yt(oc),Gx=De({},oc,{dataTransfer:0}),qx=Yt(Gx),Qx=De({},ka,{relatedTarget:0}),vh=Yt(Qx),Yx=De({},Os,{animationName:0,elapsedTime:0,pseudoElement:0}),Xx=Yt(Yx),Zx=De({},Os,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),Jx=Yt(Zx),eC=De({},Os,{data:0}),ky=Yt(eC),tC={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},nC={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"},rC={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function iC(t){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(t):(t=rC[t])?!!e[t]:!1}function dp(){return iC}var sC=De({},ka,{key:function(t){if(t.key){var e=tC[t.key]||t.key;if(e!=="Unidentified")return e}return t.type==="keypress"?(t=jl(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?nC[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:dp,charCode:function(t){return t.type==="keypress"?jl(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?jl(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),oC=Yt(sC),aC=De({},oc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Vy=Yt(aC),lC=De({},ka,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:dp}),uC=Yt(lC),cC=De({},Os,{propertyName:0,elapsedTime:0,pseudoElement:0}),hC=Yt(cC),fC=De({},oc,{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}),dC=Yt(fC),pC=[9,13,27,32],pp=qn&&"CompositionEvent"in window,Vo=null;qn&&"documentMode"in document&&(Vo=document.documentMode);var mC=qn&&"TextEvent"in window&&!Vo,lw=qn&&(!pp||Vo&&8<Vo&&11>=Vo),Dy=" ",by=!1;function uw(t,e){switch(t){case"keyup":return pC.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function cw(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Ui=!1;function gC(t,e){switch(t){case"compositionend":return cw(e);case"keypress":return e.which!==32?null:(by=!0,Dy);case"textInput":return t=e.data,t===Dy&&by?null:t;default:return null}}function yC(t,e){if(Ui)return t==="compositionend"||!pp&&uw(t,e)?(t=aw(),Fl=hp=mr=null,Ui=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1<e.char.length)return e.char;if(e.which)return String.fromCharCode(e.which)}return null;case"compositionend":return lw&&e.locale!=="ko"?null:e.data;default:return null}}var vC={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 Ny(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e==="input"?!!vC[t.type]:e==="textarea"}function hw(t,e,n,r){U1(r),e=mu(e,"onChange"),0<e.length&&(n=new fp("onChange","change",null,n,r),t.push({event:n,listeners:e}))}var Do=null,ea=null;function _C(t){Tw(t,0)}function ac(t){var e=Wi(t);if(M1(e))return t}function wC(t,e){if(t==="change")return e}var fw=!1;if(qn){var _h;if(qn){var wh="oninput"in document;if(!wh){var My=document.createElement("div");My.setAttribute("oninput","return;"),wh=typeof My.oninput=="function"}_h=wh}else _h=!1;fw=_h&&(!document.documentMode||9<document.documentMode)}function Ly(){Do&&(Do.detachEvent("onpropertychange",dw),ea=Do=null)}function dw(t){if(t.propertyName==="value"&&ac(ea)){var e=[];hw(e,ea,t,op(t)),K1(_C,e)}}function EC(t,e,n){t==="focusin"?(Ly(),Do=e,ea=n,Do.attachEvent("onpropertychange",dw)):t==="focusout"&&Ly()}function TC(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return ac(ea)}function SC(t,e){if(t==="click")return ac(e)}function AC(t,e){if(t==="input"||t==="change")return ac(e)}function IC(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var En=typeof Object.is=="function"?Object.is:IC;function ta(t,e){if(En(t,e))return!0;
vendor: 4,808 bytes, line 37
37if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;var n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!df.call(e,i)||!En(t[i],e[i]))return!1}return!0}function Oy(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function Fy(t,e){var n=Oy(t);t=0;for(var r;n;){if(n.nodeType===3){if(r=t+n.textContent.length,t<=e&&r>=e)return{node:n,offset:e-t};t=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Oy(n)}}function pw(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?pw(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function mw(){for(var t=window,e=lu();e instanceof t.HTMLIFrameElement;){try{var n=typeof e.contentWindow.location.href=="string"}catch{n=!1}if(n)t=e.contentWindow;else break;e=lu(t.document)}return e}function mp(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}function xC(t){var e=mw(),n=t.focusedElem,r=t.selectionRange;if(e!==n&&n&&n.ownerDocument&&pw(n.ownerDocument.documentElement,n)){if(r!==null&&mp(n)){if(e=r.start,t=r.end,t===void 0&&(t=e),"selectionStart"in n)n.selectionStart=e,n.selectionEnd=Math.min(t,n.value.length);else if(t=(e=n.ownerDocument||document)&&e.defaultView||window,t.getSelection){t=t.getSelection();var i=n.textContent.length,s=Math.min(r.start,i);r=r.end===void 0?s:Math.min(r.end,i),!t.extend&&s>r&&(i=r,r=s,s=i),i=Fy(n,s);var o=Fy(n,r);i&&o&&(t.rangeCount!==1||t.anchorNode!==i.node||t.anchorOffset!==i.offset||t.focusNode!==o.node||t.focusOffset!==o.offset)&&(e=e.createRange(),e.setStart(i.node,i.offset),t.removeAllRanges(),s>r?(t.addRange(e),t.extend(o.node,o.offset)):(e.setEnd(o.node,o.offset),t.addRange(e)))}}for(e=[],t=n;t=t.parentNode;)t.nodeType===1&&e.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<e.length;n++)t=e[n],t.element.scrollLeft=t.left,t.element.scrollTop=t.top}}var CC=qn&&"documentMode"in document&&11>=document.documentMode,$i=null,Df=null,bo=null,bf=!1;function jy(t,e,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;bf||$i==null||$i!==lu(r)||(r=$i,"selectionStart"in r&&mp(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),bo&&ta(bo,r)||(bo=r,r=mu(Df,"onSelect"),0<r.length&&(e=new fp("onSelect","select",null,e,n),t.push({event:e,listeners:r}),e.target=$i)))}function fl(t,e){var n={};return n[t.toLowerCase()]=e.toLowerCase(),n["Webkit"+t]="webkit"+e,n["Moz"+t]="moz"+e,n}var Hi={animationend:fl("Animation","AnimationEnd"),animationiteration:fl("Animation","AnimationIteration"),animationstart:fl("Animation","AnimationStart"),transitionend:fl("Transition","TransitionEnd")},Eh={},gw={};qn&&(gw=document.createElement("div").style,"AnimationEvent"in window||(delete Hi.animationend.animation,delete Hi.animationiteration.animation,delete Hi.animationstart.animation),"TransitionEvent"in window||delete Hi.transitionend.transition);function lc(t){if(Eh[t])return Eh[t];if(!Hi[t])return t;var e=Hi[t],n;for(n in e)if(e.hasOwnProperty(n)&&n in gw)return Eh[t]=e[n];return t}var yw=lc("animationend"),vw=lc("animationiteration"),_w=lc("animationstart"),ww=lc("transitionend"),Ew=new Map,By="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Ur(t,e){Ew.set(t,e),Ti(e,[t])}for(var Th=0;Th<By.length;Th++){var Sh=By[Th],PC=Sh.toLowerCase(),RC=Sh[0].toUpperCase()+Sh.slice(1);Ur(PC,"on"+RC)}Ur(yw,"onAnimationEnd");Ur(vw,"onAnimationIteration");Ur(_w,"onAnimationStart");Ur("dblclick","onDoubleClick");Ur("focusin","onFocus");Ur("focusout","onBlur");Ur(ww,"onTransitionEnd");ds("onMouseEnter",["mouseout","mouseover"]);ds("onMouseLeave",["mouseout","mouseover"]);ds("onPointerEnter",["pointerout","pointerover"]);ds("onPointerLeave",["pointerout","pointerover"]);Ti("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));
vendor: 4,383 bytes, line 37
37Ti("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Ti("onBeforeInput",["compositionend","keypress","textInput","paste"]);Ti("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Ti("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Ti("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Eo="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(" "),kC=new Set("cancel close invalid load scroll toggle".split(" ").concat(Eo));function zy(t,e,n){var r=t.type||"unknown-event";t.currentTarget=n,Px(r,e,void 0,t),t.currentTarget=null}function Tw(t,e){e=(e&4)!==0;for(var n=0;n<t.length;n++){var r=t[n],i=r.event;r=r.listeners;e:{var s=void 0;if(e)for(var o=r.length-1;0<=o;o--){var l=r[o],u=l.instance,c=l.currentTarget;if(l=l.listener,u!==s&&i.isPropagationStopped())break e;zy(i,l,c),s=u}else for(o=0;o<r.length;o++){if(l=r[o],u=l.instance,c=l.currentTarget,l=l.listener,u!==s&&i.isPropagationStopped())break e;zy(i,l,c),s=u}}}if(cu)throw t=Pf,cu=!1,Pf=null,t}function Se(t,e){var n=e[Ff];n===void 0&&(n=e[Ff]=new Set);var r=t+"__bubble";n.has(r)||(Sw(e,t,2,!1),n.add(r))}function Ah(t,e,n){var r=0;e&&(r|=4),Sw(n,t,r,e)}var dl="_reactListening"+Math.random().toString(36).slice(2);function na(t){if(!t[dl]){t[dl]=!0,k1.forEach(function(n){n!=="selectionchange"&&(kC.has(n)||Ah(n,!1,t),Ah(n,!0,t))});var e=t.nodeType===9?t:t.ownerDocument;e===null||e[dl]||(e[dl]=!0,Ah("selectionchange",!1,e))}}function Sw(t,e,n,r){switch(ow(e)){case 1:var i=Hx;break;case 4:i=Wx;break;default:i=cp}n=i.bind(null,e,n,t),i=void 0,!Cf||e!=="touchstart"&&e!=="touchmove"&&e!=="wheel"||(i=!0),r?i!==void 0?t.addEventListener(e,n,{capture:!0,passive:i}):t.addEventListener(e,n,!0):i!==void 0?t.addEventListener(e,n,{passive:i}):t.addEventListener(e,n,!1)}function Ih(t,e,n,r,i){var s=r;if(!(e&1)&&!(e&2)&&r!==null)e:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var l=r.stateNode.containerInfo;if(l===i||l.nodeType===8&&l.parentNode===i)break;if(o===4)for(o=r.return;o!==null;){var u=o.tag;if((u===3||u===4)&&(u=o.stateNode.containerInfo,u===i||u.nodeType===8&&u.parentNode===i))return;o=o.return}for(;l!==null;){if(o=ri(l),o===null)return;if(u=o.tag,u===5||u===6){r=s=o;continue e}l=l.parentNode}}r=r.return}K1(function(){var c=s,f=op(n),d=[];e:{var p=Ew.get(t);if(p!==void 0){var y=fp,S=t;switch(t){case"keypress":if(jl(n)===0)break e;case"keydown":case"keyup":y=oC;break;case"focusin":S="focus",y=vh;break;case"focusout":S="blur",y=vh;break;case"beforeblur":case"afterblur":y=vh;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":y=Ry;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":y=qx;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":y=uC;break;case yw:case vw:case _w:y=Xx;break;case ww:y=hC;break;case"scroll":y=Kx;break;case"wheel":y=dC;break;case"copy":case"cut":case"paste":y=Jx;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":y=Vy}var x=(e&4)!==0,R=!x&&t==="scroll",w=x?p!==null?p+"Capture":null:p;x=[];for(var v=c,T;v!==null;){T=v;var k=T.stateNode;if(T.tag===5&&k!==null&&(T=k,w!==null&&(k=Yo(v,w),k!=null&&x.push(ra(v,k,T)))),R)break;v=v.return}0<x.length&&(p=new y(p,S,null,n,f),d.push({event:p,listeners:x}))}}if(!(e&7)){e:{if(p=t==="mouseover"||t==="pointerover",y=t==="mouseout"||t==="pointerout",p&&n!==If&&(S=n.relatedTarget||n.fromElement)&&(ri(S)||S[Qn]))break e;if((y||p)&&(p=f.window===f?f:(p=f.ownerDocument)?p.defaultView||p.parentWindow:window,y?(S=n.relatedTarget||n.toElement,y=c,S=S?ri(S):null,S!==null&&(R=Si(S),S!==R||S.tag!==5&&S.tag!==6)&&(S=null)):(y=null,S=c),y!==S)){if(x=Ry,k="onMouseLeave",w="onMouseEnter",v="mouse",(t==="pointerout"||t==="pointerover")&&(x=Vy,k="onPointerLeave",w="onPointerEnter",v="pointer"),R=y==null?p:Wi(y),T=S==null?p:Wi(S),p=new x(k,v+"leave",
vendor: 7,969 bytes, lines 37-38
37y,n,f),p.target=R,p.relatedTarget=T,k=null,ri(f)===c&&(x=new x(w,v+"enter",S,n,f),x.target=T,x.relatedTarget=R,k=x),R=k,y&&S)t:{for(x=y,w=S,v=0,T=x;T;T=bi(T))v++;for(T=0,k=w;k;k=bi(k))T++;for(;0<v-T;)x=bi(x),v--;for(;0<T-v;)w=bi(w),T--;for(;v--;){if(x===w||w!==null&&x===w.alternate)break t;x=bi(x),w=bi(w)}x=null}else x=null;y!==null&&Uy(d,p,y,x,!1),S!==null&&R!==null&&Uy(d,R,S,x,!0)}}e:{if(p=c?Wi(c):window,y=p.nodeName&&p.nodeName.toLowerCase(),y==="select"||y==="input"&&p.type==="file")var b=wC;else if(Ny(p))if(fw)b=AC;else{b=TC;var M=EC}else(y=p.nodeName)&&y.toLowerCase()==="input"&&(p.type==="checkbox"||p.type==="radio")&&(b=SC);if(b&&(b=b(t,c))){hw(d,b,n,f);break e}M&&M(t,p,c),t==="focusout"&&(M=p._wrapperState)&&M.controlled&&p.type==="number"&&wf(p,"number",p.value)}switch(M=c?Wi(c):window,t){case"focusin":(Ny(M)||M.contentEditable==="true")&&($i=M,Df=c,bo=null);break;case"focusout":bo=Df=$i=null;break;case"mousedown":bf=!0;break;case"contextmenu":case"mouseup":case"dragend":bf=!1,jy(d,n,f);break;case"selectionchange":if(CC)break;case"keydown":case"keyup":jy(d,n,f)}var E;if(pp)e:{switch(t){case"compositionstart":var g="onCompositionStart";break e;case"compositionend":g="onCompositionEnd";break e;case"compositionupdate":g="onCompositionUpdate";break e}g=void 0}else Ui?uw(t,n)&&(g="onCompositionEnd"):t==="keydown"&&n.keyCode===229&&(g="onCompositionStart");g&&(lw&&n.locale!=="ko"&&(Ui||g!=="onCompositionStart"?g==="onCompositionEnd"&&Ui&&(E=aw()):(mr=f,hp="value"in mr?mr.value:mr.textContent,Ui=!0)),M=mu(c,g),0<M.length&&(g=new ky(g,t,null,n,f),d.push({event:g,listeners:M}),E?g.data=E:(E=cw(n),E!==null&&(g.data=E)))),(E=mC?gC(t,n):yC(t,n))&&(c=mu(c,"onBeforeInput"),0<c.length&&(f=new ky("onBeforeInput","beforeinput",null,n,f),d.push({event:f,listeners:c}),f.data=E))}Tw(d,e)})}function ra(t,e,n){return{instance:t,listener:e,currentTarget:n}}function mu(t,e){for(var n=e+"Capture",r=[];t!==null;){var i=t,s=i.stateNode;i.tag===5&&s!==null&&(i=s,s=Yo(t,n),s!=null&&r.unshift(ra(t,s,i)),s=Yo(t,e),s!=null&&r.push(ra(t,s,i))),t=t.return}return r}function bi(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5);return t||null}function Uy(t,e,n,r,i){for(var s=e._reactName,o=[];n!==null&&n!==r;){var l=n,u=l.alternate,c=l.stateNode;if(u!==null&&u===r)break;l.tag===5&&c!==null&&(l=c,i?(u=Yo(n,s),u!=null&&o.unshift(ra(n,u,l))):i||(u=Yo(n,s),u!=null&&o.push(ra(n,u,l)))),n=n.return}o.length!==0&&t.push({event:e,listeners:o})}var VC=/\r\n?/g,DC=/\u0000|\uFFFD/g;function $y(t){return(typeof t=="string"?t:""+t).replace(VC,`
38`).replace(DC,"")}function pl(t,e,n){if(e=$y(e),$y(t)!==e&&n)throw Error(B(425))}function gu(){}var Nf=null,Mf=null;function Lf(t,e){return t==="textarea"||t==="noscript"||typeof e.children=="string"||typeof e.children=="number"||typeof e.dangerouslySetInnerHTML=="object"&&e.dangerouslySetInnerHTML!==null&&e.dangerouslySetInnerHTML.__html!=null}var Of=typeof setTimeout=="function"?setTimeout:void 0,bC=typeof clearTimeout=="function"?clearTimeout:void 0,Hy=typeof Promise=="function"?Promise:void 0,NC=typeof queueMicrotask=="function"?queueMicrotask:typeof Hy<"u"?function(t){return Hy.resolve(null).then(t).catch(MC)}:Of;function MC(t){setTimeout(function(){throw t})}function xh(t,e){var n=e,r=0;do{var i=n.nextSibling;if(t.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"){if(r===0){t.removeChild(i),Jo(e);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);Jo(e)}function Er(t){for(;t!=null;t=t.nextSibling){var e=t.nodeType;if(e===1||e===3)break;if(e===8){if(e=t.data,e==="$"||e==="$!"||e==="$?")break;if(e==="/$")return null}}return t}function Wy(t){t=t.previousSibling;for(var e=0;t;){if(t.nodeType===8){var n=t.data;if(n==="$"||n==="$!"||n==="$?"){if(e===0)return t;e--}else n==="/$"&&e++}t=t.previousSibling}return null}var Fs=Math.random().toString(36).slice(2),Pn="__reactFiber$"+Fs,ia="__reactProps$"+Fs,Qn="__reactContainer$"+Fs,Ff="__reactEvents$"+Fs,LC="__reactListeners$"+Fs,OC="__reactHandles$"+Fs;function ri(t){var e=t[Pn];if(e)return e;for(var n=t.parentNode;n;){if(e=n[Qn]||n[Pn]){if(n=e.alternate,e.child!==null||n!==null&&n.child!==null)for(t=Wy(t);t!==null;){if(n=t[Pn])return n;t=Wy(t)}return e}t=n,n=t.parentNode}return null}function Va(t){return t=t[Pn]||t[Qn],!t||t.tag!==5&&t.tag!==6&&t.tag!==13&&t.tag!==3?null:t}function Wi(t){if(t.tag===5||t.tag===6)return t.stateNode;throw Error(B(33))}function uc(t){return t[ia]||null}var jf=[],Ki=-1;function $r(t){return{current:t}}function xe(t){0>Ki||(t.current=jf[Ki],jf[Ki]=null,Ki--)}function Ee(t,e){Ki++,jf[Ki]=t.current,t.current=e}var br={},Tt=$r(br),Mt=$r(!1),mi=br;function ps(t,e){var n=t.type.contextTypes;if(!n)return br;var r=t.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===e)return r.__reactInternalMemoizedMaskedChildContext;var i={},s;for(s in n)i[s]=e[s];return r&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=i),i}function Lt(t){return t=t.childContextTypes,t!=null}function yu(){xe(Mt),xe(Tt)}function Ky(t,e,n){if(Tt.current!==br)throw Error(B(168));Ee(Tt,e),Ee(Mt,n)}function Aw(t,e,n){var r=t.stateNode;if(e=e.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in e))throw Error(B(108,Ex(t)||"Unknown",i));return De({},n,r)}function vu(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||br,mi=Tt.current,Ee(Tt,t),Ee(Mt,Mt.current),!0}function Gy(t,e,n){var r=t.stateNode;if(!r)throw Error(B(169));n?(t=Aw(t,e,mi),r.__reactInternalMemoizedMergedChildContext=t,xe(Mt),xe(Tt),Ee(Tt,t)):xe(Mt),Ee(Mt,n)}var zn=null,cc=!1,Ch=!1;function Iw(t){zn===null?zn=[t]:zn.push(t)}function FC(t){cc=!0,Iw(t)}function Hr(){if(!Ch&&zn!==null){Ch=!0;var t=0,e=ve;try{var n=zn;for(ve=1;t<n.length;t++){var r=n[t];do r=r(!0);while(r!==null)}zn=null,cc=!1}catch(i){throw zn!==null&&(zn=zn.slice(t+1)),Y1(ap,Hr),i}finally{ve=e,Ch=!1}}return null}var Gi=[],qi=0,_u=null,wu=0,Jt=[],en=0,gi=null,Un=1,$n="";function Zr(t,e){Gi[qi++]=wu,Gi[qi++]=_u,_u=t,wu=e}function xw(t,e,n){Jt[en++]=Un,Jt[en++]=$n,Jt[en++]=gi,gi=t;var r=Un;t=$n;var i=32-vn(r)-1;r&=~(1<<i),n+=1;var s=32-vn(e)+i;if(30<s){var o=i-i%5;s=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Un=1<<32-vn(e)+i|n<<i|r,$n=s+t}else Un=1<<s|n<<i|r,$n=t}function gp(t){t.return!==null&&(Zr(t,1),xw(t,1,0))}function yp(t){for(;t===_u;)_u=Gi[--qi],Gi[qi]=null,wu=Gi[--qi],Gi[qi]=null;for(;t===gi;)gi=Jt[--en],Jt[en]=null,$n=Jt[--en],Jt[en]=null,Un=Jt[--en],Jt[en]=null}var Wt=null,$t=null,Pe=!1,gn=null;function Cw(t,e){var n=nn(5,null,null,0);n.elementType="DELETED",n.stateNode=e,n.return=t,e=t.deletions,e===null?(t.deletions=[n],t.flags|=16):e.push(n)}function qy(t,e){switch(t.tag){case 5:var n=t.type;return e=e.nodeType!==1||n.toLowerCase()!==e.nodeName.toLowerCase()?null:e,e!==null?(t.stateNode=e,Wt=t,$t=Er(e.firstChild),!0):!1;case 6:return e=t.pendingProps===""||e.nodeType!==3?null:e,e!==null?(t.stateNode=e,Wt=t,$t=null,!0):!1;case 13:return e=e.nodeType!==8?null:e,e!==null?(n=gi!==null?{id:Un,overflow:$n}:null,t.memoizedState={dehydrated:e,treeContext:n,retryLane:1073741824},n=nn(18,null,null,0),n.stateNode=e,n.return=t,t.child=n,Wt=t,$t=null,!0):!1;default:return!1}}function Bf(t){return(t.mode&1)!==0&&(t.flags&128)===0}function zf(t){if(Pe){var e=$t;if(e){var n=e;if(!qy(t,e)){if(Bf(t))throw Error(B(418));e=Er(n.nextSibling);var r=Wt;e&&qy(t,e)?Cw(r,n):(t.flags=t.flags&-4097|2,Pe=!1,Wt=t)}}else{if(Bf(t))throw Error(B(418));t.flags=t.flags&-4097|2,Pe=!1,Wt=t}}}function Qy(t){for(t=t.return;t!==null&&t.tag!==5&&t.tag!==3&&t.tag!==13;)t=t.return;Wt=t}function ml(t){if(t!==Wt)return!1;if(!Pe)return Qy(t),Pe=!0,!1;var e;if((e=t.tag!==3)&&!(e=t.tag!==5)&&(e=t.type,e=e!=="head"&&e!=="body"&&!Lf(t.type,t.memoizedProps)),e&&(e=$t)){if(Bf(t))throw Pw(),Error(B(418));for(;e;)Cw(t,e),e=Er(e.nextSibling)}if(Qy(t),t.tag===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(B(317)
vendor: 23,249 bytes, lines 38-40
38);e:{for(t=t.nextSibling,e=0;t;){if(t.nodeType===8){var n=t.data;if(n==="/$"){if(e===0){$t=Er(t.nextSibling);break e}e--}else n!=="$"&&n!=="$!"&&n!=="$?"||e++}t=t.nextSibling}$t=null}}else $t=Wt?Er(t.stateNode.nextSibling):null;return!0}function Pw(){for(var t=$t;t;)t=Er(t.nextSibling)}function ms(){$t=Wt=null,Pe=!1}function vp(t){gn===null?gn=[t]:gn.push(t)}var jC=nr.ReactCurrentBatchConfig;function po(t,e,n){if(t=n.ref,t!==null&&typeof t!="function"&&typeof t!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(B(309));var r=n.stateNode}if(!r)throw Error(B(147,t));var i=r,s=""+t;return e!==null&&e.ref!==null&&typeof e.ref=="function"&&e.ref._stringRef===s?e.ref:(e=function(o){var l=i.refs;o===null?delete l[s]:l[s]=o},e._stringRef=s,e)}if(typeof t!="string")throw Error(B(284));if(!n._owner)throw Error(B(290,t))}return t}function gl(t,e){throw t=Object.prototype.toString.call(e),Error(B(31,t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t))}function Yy(t){var e=t._init;return e(t._payload)}function Rw(t){function e(w,v){if(t){var T=w.deletions;T===null?(w.deletions=[v],w.flags|=16):T.push(v)}}function n(w,v){if(!t)return null;for(;v!==null;)e(w,v),v=v.sibling;return null}function r(w,v){for(w=new Map;v!==null;)v.key!==null?w.set(v.key,v):w.set(v.index,v),v=v.sibling;return w}function i(w,v){return w=Ir(w,v),w.index=0,w.sibling=null,w}function s(w,v,T){return w.index=T,t?(T=w.alternate,T!==null?(T=T.index,T<v?(w.flags|=2,v):T):(w.flags|=2,v)):(w.flags|=1048576,v)}function o(w){return t&&w.alternate===null&&(w.flags|=2),w}function l(w,v,T,k){return v===null||v.tag!==6?(v=Nh(T,w.mode,k),v.return=w,v):(v=i(v,T),v.return=w,v)}function u(w,v,T,k){var b=T.type;return b===zi?f(w,v,T.props.children,k,T.key):v!==null&&(v.elementType===b||typeof b=="object"&&b!==null&&b.$$typeof===hr&&Yy(b)===v.type)?(k=i(v,T.props),k.ref=po(w,v,T),k.return=w,k):(k=Kl(T.type,T.key,T.props,null,w.mode,k),k.ref=po(w,v,T),k.return=w,k)}function c(w,v,T,k){return v===null||v.tag!==4||v.stateNode.containerInfo!==T.containerInfo||v.stateNode.implementation!==T.implementation?(v=Mh(T,w.mode,k),v.return=w,v):(v=i(v,T.children||[]),v.return=w,v)}function f(w,v,T,k,b){return v===null||v.tag!==7?(v=hi(T,w.mode,k,b),v.return=w,v):(v=i(v,T),v.return=w,v)}function d(w,v,T){if(typeof v=="string"&&v!==""||typeof v=="number")return v=Nh(""+v,w.mode,T),v.return=w,v;if(typeof v=="object"&&v!==null){switch(v.$$typeof){case sl:return T=Kl(v.type,v.key,v.props,null,w.mode,T),T.ref=po(w,null,v),T.return=w,T;case Bi:return v=Mh(v,w.mode,T),v.return=w,v;case hr:var k=v._init;return d(w,k(v._payload),T)}if(_o(v)||lo(v))return v=hi(v,w.mode,T,null),v.return=w,v;gl(w,v)}return null}function p(w,v,T,k){var b=v!==null?v.key:null;if(typeof T=="string"&&T!==""||typeof T=="number")return b!==null?null:l(w,v,""+T,k);if(typeof T=="object"&&T!==null){switch(T.$$typeof){case sl:return T.key===b?u(w,v,T,k):null;case Bi:return T.key===b?c(w,v,T,k):null;case hr:return b=T._init,p(w,v,b(T._payload),k)}if(_o(T)||lo(T))return b!==null?null:f(w,v,T,k,null);gl(w,T)}return null}function y(w,v,T,k,b){if(typeof k=="string"&&k!==""||typeof k=="number")return w=w.get(T)||null,l(v,w,""+k,b);if(typeof k=="object"&&k!==null){switch(k.$$typeof){case sl:return w=w.get(k.key===null?T:k.key)||null,u(v,w,k,b);case Bi:return w=w.get(k.key===null?T:k.key)||null,c(v,w,k,b);case hr:var M=k._init;return y(w,v,T,M(k._payload),b)}if(_o(k)||lo(k))return w=w.get(T)||null,f(v,w,k,b,null);gl(v,k)}return null}function S(w,v,T,k){for(var b=null,M=null,E=v,g=v=0,A=null;E!==null&&g<T.length;g++){E.index>g?(A=E,E=null):A=E.sibling;var I=p(w,E,T[g],k);if(I===null){E===null&&(E=A);break}t&&E&&I.alternate===null&&e(w,E),v=s(I,v,g),M===null?b=I:M.sibling=I,M=I,E=A}if(g===T.length)return n(w,E),Pe&&Zr(w,g),b;if(E===null){for(;g<T.length;g++)E=d(w,T[g],k),E!==null&&(v=s(E,v,g),M===null?b=E:M.sibling=E,M=E);return Pe&&Zr(w,g),b}for(E=r(w,E);g<T.length;g++)A=y(E,w,g,T[g],k),A!==null&&(t&&A.alternate!==null&&E.delete(A.key===null?g:A.key),v=s(A,v,g),M===null?b=A:M.sibling=A,M=A);return t&&E.forEach(function(P){return e(w,P)}),Pe&&Zr(w,g),b}function x(w,v,T,k){var b=lo(T);if(typeof b!="function")throw Error(B(150));if(T=b.call(T),T==null)throw Error(B(151));for(var M=b=null,E=v,g=v=0,A=null,I=T.next();E!==null&&!I.done;g++,I=T.next()){E.index>g?(A=E,E=null):A=E.sibling;var P=p(w,E,I.value,k);if(P===null){E===null&&(E=A);break}t&&E&&P.alternate===null&&e(w,E),v=s(P,v,g),M===null?b=P:M.sibling=P,M=P,E=A}if(I.done)return n(w,E),Pe&&Zr(w,g),b;if(E===null){for(;!I.done;g++,I=T.next())I=d(w,I.value,k),I!==null&&(v=s(I,v,g),M===null?b=I:M.sibling=I,M=I);return Pe&&Zr(w,g),b}for(E=r(w,E);!I.done;g++,I=T.next())I=y(E,w,g,I.value,k),I!==null&&(t&&I.alternate!==null&&E.delete(I.key===null?g:I.key),v=s(I,v,g),M===null?b=I:M.sibling=I,M=I);return t&&E.forEach(function(V){return e(w,V)}),Pe&&Zr(w,g),b}function R(w,v,T,k){if(typeof T=="object"&&T!==null&&T.type===zi&&T.key===null&&(T=T.props.children),typeof T=="object"&&T!==null){switch(T.$$typeof){case sl:e:{for(var b=T.key,M=v;M!==null;){if(M.key===b){if(b=T.type,b===zi){if(M.tag===7){n(w,M.sibling),v=i(M,T.props.children),v.return=w,w=v;break e}}else if(M.elementType===b||typeof b=="object"&&b!==null&&b.$$typeof===hr&&Yy(b)===M.type){n(w,M.sibling),v=i(M,T.props),v.ref=po(w,M,T),v.return=w,w=v;break e}n(w,M);break}else e(w,M);M=M.sibling}T.type===zi?(v=hi(T.props.children,w.mode,k,T.key),v.return=w,w=v):(k=Kl(T.type,T.key,T.props,null,w.mode,k),k.ref=po(w,v,T),k.return=w,w=k)}return o(w);case Bi:e:{for(M=T.key;v!==null;){if(v.key===M)if(v.tag===4&&v.stateNode.containerInfo===T.containerInfo&&v.stateNode.implementation===T.implementation){n(w,v.sibling),v=i(v,T.children||[]),v.return=w,w=v;break e}else{n(w,v);break}else e(w,v);v=v.sibling}v=Mh(T,w.mode,k),v.return=w,w=v}return o(w);case hr:return M=T._init,R(w,v,M(T._payload),k)}if(_o(T))return S(w,v,T,k);if(lo(T))return x(w,v,T,k);gl(w,T)}return typeof T=="string"&&T!==""||typeof T=="number"?(T=""+T,v!==null&&v.tag===6?(n(w,v.sibling),v=i(v,T),v.return=w,w=v):(n(w,v),v=Nh(T,w.mode,k),v.return=w,w=v),o(w)):n(w,v)}return R}var gs=Rw(!0),kw=Rw(!1),Eu=$r(null),Tu=null,Qi=null,_p=null;function wp(){_p=Qi=Tu=null}function Ep(t){var e=Eu.current;xe(Eu),t._currentValue=e}function Uf(t,e,n){for(;t!==null;){var r=t.alternate;if((t.childLanes&e)!==e?(t.childLanes|=e,r!==null&&(r.childLanes|=e)):r!==null&&(r.childLanes&e)!==e&&(r.childLanes|=e),t===n)break;t=t.return}}function ls(t,e){Tu=t,_p=Qi=null,t=t.dependencies,t!==null&&t.firstContext!==null&&(t.lanes&e&&(bt=!0),t.firstContext=null)}function on(t){var e=t._currentValue;if(_p!==t)if(t={context:t,memoizedValue:e,next:null},Qi===null){if(Tu===null)throw Error(B(308));Qi=t,Tu.dependencies={lanes:0,firstContext:t}}else Qi=Qi.next=t;return e}var ii=null;function Tp(t){ii===null?ii=[t]:ii.push(t)}function Vw(t,e,n,r){var i=e.interleaved;return i===null?(n.next=n,Tp(e)):(n.next=i.next,i.next=n),e.interleaved=n,Yn(t,r)}function Yn(t,e){t.lanes|=e;var n=t.alternate;for(n!==null&&(n.lanes|=e),n=t,t=t.return;t!==null;)t.childLanes|=e,n=t.alternate,n!==null&&(n.childLanes|=e),n=t,t=t.return;return n.tag===3?n.stateNode:null}var fr=!1;function Sp(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Dw(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,effects:t.effects})}function Hn(t,e){return{eventTime:t,lane:e,tag:0,payload:null,callback:null,next:null}}function Tr(t,e,n){var r=t.updateQueue;if(r===null)return null;if(r=r.shared,he&2){var i=r.pending;return i===null?e.next=e:(e.next=i.next,i.next=e),r.pending=e,Yn(t,n)}return i=r.interleaved,i===null?(e.next=e,Tp(r)):(e.next=i.next,i.next=e),r.interleaved=e,Yn(t,n)}function Bl(t,e,n){if(e=e.updateQueue,e!==null&&(e=e.shared,(n&4194240)!==0)){var r=e.lanes;r&=t.pendingLanes,n|=r,e.lanes=n,lp(t,n)}}function Xy(t,e){var n=t.updateQueue,r=t.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,s=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};s===null?i=s=o:s=s.next=o,n=n.next}while(n!==null);s===null?i=s=e:s=s.next=e}else i=s=e;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:s,shared:r.shared,effects:r.effects},t.updateQueue=n;return}t=n.lastBaseUpdate,t===null?n.firstBaseUpdate=e:t.next=e,n.lastBaseUpdate=e}function Su(t,e,n,r){var i=t.updateQueue;fr=!1;var s=i.firstBaseUpdate,o=i.lastBaseUpdate,l=i.shared.pending;if(l!==null){i.shared.pending=null;var u=l,c=u.next;u.next=null,o===null?s=c:o.next=c,o=u;var f=t.alternate;f!==null&&(f=f.updateQueue,l=f.lastBaseUpdate,l!==o&&(l===null?f.firstBaseUpdate=c:l.next=c,f.lastBaseUpdate=u))}if(s!==null){var d=i.baseState;o=0,f=c=u=null,l=s;do{var p=l.lane,y=l.eventTime;if((r&p)===p){f!==null&&(f=f.next={eventTime:y,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var S=t,x=l;switch(p=e,y=n,x.tag){case 1:if(S=x.payload,typeof S=="function"){d=S.call(y,d,p);break e}d=S;break e;case 3:S.flags=S.flags&-65537|128;case 0:if(S=x.payload,p=typeof S=="function"?S.call(y,d,p):S,p==null)break e;d=De({},d,p);break e;case 2:fr=!0}}l.callback!==null&&l.lane!==0&&(t.flags|=64,p=i.effects,p===null?i.effects=[l]:p.push(l))}else y={eventTime:y,lane:p,tag:l.tag,payload:l.payload,callback:l.callback,next:null},f===null?(c=f=y,u=d):f=f.next=y,o|=p;if(l=l.next,l===null){if(l=i.shared.pending,l===null)break;p=l,l=p.next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}while(!0);if(f===null&&(u=d),i.baseState=u,i.firstBaseUpdate=c,i.lastBaseUpdate=f,e=i.shared.interleaved,e!==null){i=e;do o|=i.lane,i=i.next;while(i!==e)}else s===null&&(i.shared.lanes=0);vi|=o,t.lanes=o,t.memoizedState=d}}function Zy(t,e,n){if(t=e.effects,e.effects=null,t!==null)for(e=0;e<t.length;e++){var r=t[e],i=r.callback;if(i!==null){if(r.callback=null,r=n,typeof i!="function")throw Error(B(191,i));i.call(r)}}}var Da={},kn=$r(Da),sa=$r(Da),oa=$r(Da);function si(t){if(t===Da)throw Error(B(174));return t}function Ap(t,e){switch(Ee(oa,e),Ee(sa,t),Ee(kn,Da),t=e.nodeType,t){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:Tf(null,"");break;default:t=t===8?e.parentNode:e,e=t.namespaceURI||null,t=t.tagName,e=Tf(e,t)}xe(kn),Ee(kn,e)}function ys(){xe(kn),xe(sa),xe(oa)}function bw(t){si(oa.current);var e=si(kn.current),n=Tf(e,t.type);e!==n&&(Ee(sa,t),Ee(kn,n))}function Ip(t){sa.current===t&&(xe(kn),xe(sa))}var Re=$r(0);function Au(t){for(var e=t;e!==null;){if(e.tag===13){var n=e.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return e}else if(e.tag===19&&e.memoizedProps.revealOrder!==void 0){if(e.flags&128)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var Ph=[];function xp(){for(var t=0;t<Ph.length;t++)Ph[t]._workInProgressVersionPrimary=null;Ph.length=0}var zl=nr.ReactCurrentDispatcher,Rh=nr.ReactCurrentBatchConfig,yi=0,Ve=null,We=null,Ye=null,Iu=!1,No=!1,aa=0,BC=0;function pt(){throw Error(B(321))}function Cp(t,e){if(e===null)return!1;for(var n=0;n<e.length&&n<t.length;n++)if(!En(t[n],e[n]))return!1;return!0}function Pp(t,e,n,r,i,s){if(yi=s,Ve=e,e.memoizedState=null,e.updateQueue=null,e.lanes=0,zl.current=t===null||t.memoizedState===null?HC:WC,t=n(r,i),No){s=0;do{if(No=!1,aa=0,25<=s)throw Error(B(301));s+=1,Ye=We=null,e.updateQueue=null,zl.current=KC,t=n(r,i)}while(No)}if(zl.current=xu,e=We!==null&&We.next!==null,yi=0,Ye=We=Ve=null,Iu=!1,e)throw Error(B(300));return t}function Rp(){var t=aa!==0;return aa=0,t}function In(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ye===null?Ve.memoizedState=Ye=t:Ye=Ye.next=t,Ye}function an(){if(We===null){var t=Ve.alternate;t=t!==null?t.memoizedState:null}else t=We.next;var e=Ye===null?Ve.memoizedState:Ye.next;if(e!==null)Ye=e,We=t;else{if(t===null)throw Error(B(310));We=t,t={memoizedState:We.memoizedState,baseState:We.baseState,baseQueue:We.baseQueue,queue:We.queue,next:null},Ye===null?Ve.memoizedState=Ye=t:Ye=Ye.next=t}return Ye}function la(t,e){return typeof e=="function"?e(t):e}function kh(t){var e=an(),n=e.queue;if(n===null)throw Error(B(311));n.lastRenderedReducer=t;var r=We,i=r.baseQueue,s=n.pending;if(s!==null){if(i!==null){var o=i.next;i.next=s.next,s.next=o}r.baseQueue=i=s,n.pending=null}if(i!==null){s=i.next,r=r.baseState;var l=o=null,u=null,c=s;do{var f=c.lane;if((yi&f)===f)u!==null&&(u=u.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),r=c.hasEagerState?c.eagerState:t(r,c.action);else{var d={lane:f,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};u===null?(l=u=d,o=r):u=u.next=d,Ve.lanes|=f,vi|=f}c=c.next}while(c!==null&&c!==s);u===null?o=r:u.next=l,En(r,e.memoizedState)||(bt=!0),e.memoizedState=r,e.baseState=o,e.baseQueue=u,n.lastRenderedState=r}if(t=n.interleaved,t!==null){i=t;do s=i.lane,Ve.lanes|=s,vi|=s,i=i.next;while(i!==t)}else i===null&&(n.lanes=0);return[e.memoizedState,n.dispatch]}function Vh(t){var e=an(),n=e.queue;if(n===null)throw Error(B(311));n.lastRenderedReducer=t;var r=n.dispatch,i=n.pending,s=e.memoizedState;if(i!==null){n.pending=null;var o=i=i.next;do s=t(s,o.action),o=o.next;while(o!==i);En(s,e.memoizedState)||(bt=!0),e.memoizedState=s,e.baseQueue===null&&(e.baseState=s),n.lastRenderedState=s}return[s,r]}function Nw(){}function Mw(t,e){var n=Ve,r=an(),i=e(),s=!En(r.memoizedState,i);if(s&&(r.memoizedState=i,bt=!0),r=r.queue,kp(Fw.bind(null,n,r,t),[t]),r.getSnapshot!==e||s||Ye!==null&&Ye.memoizedState.tag&1){if(n.flags|=2048,ua(9,Ow.bind(null,n,r,i,e),void 0,null),Ze===null)throw Error(B(349));yi&30||Lw(n,e,i)}return i}function Lw(t,e,n){t.flags|=16384,t={getSnapshot:e,value:n},e=Ve.updateQueue,e===null?(e={lastEffect:null,stores:null},Ve.updateQueue=e,e.stores=[t]):(n=e.stores,n===null?e.stores=[t]:n.push(t))}function Ow(t,e,n,r){e.value=n,e.getSnapshot=r,jw(e)&&Bw(t)}function Fw(t,e,n){return n(function(){jw(e)&&Bw(t)})}function jw(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!En(t,n)}catch{return!0}}function Bw(t){var e=Yn(t,1);e!==null&&_n(e,t,1,-1)}function Jy(t){var e=In();return typeof t=="function"&&(t=t()),e.memoizedState=e.baseState=t,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:la,lastRenderedState:t},e.queue=t,t=t.dispatch=$C.bind(null,Ve,t),[e.memoizedState,t]}function ua(t,e,n,r){return t={tag:t,create:e,destroy:n,deps:r,next:null},e=Ve.updateQueue,e===null?(e={lastEffect:null,stores:null},Ve.updateQueue=e,e.lastEffect=t.next=t):(n=e.lastEffect,n===null?e.lastEffect=t.next=t:(r=n.next,n.next=t,t.next=r,e.lastEffect=t)),t}function zw(){return an().memoizedState}function Ul(t,e,n,r){var i=In();Ve.flags|=t,i.memoizedState=ua(1|e,n,void 0,r===void 0?null:r)}function hc(t,e,n,r){var i=an();r=r===void 0?null:r;var s=void 0;if(We!==null){var o=We.memoizedState;if(s=o.destroy,r!==null&&Cp(r,o.deps)){i.memoizedState=ua(e,n,s,r);return}}Ve.flags|=t,i.memoizedState=ua(1|e,n,s,r)}function ev(t,e){return Ul(8390656,8,t,e)}function kp(t,e){return hc(2048,8,t,e)}function Uw(t,e){return hc(4,2,t,e)}function $w(t,e){return hc(4,4,t,e)}function Hw(t,e){if(typeof e=="function")return t=t(),e(t),function(){e(null)};if(e!=null)return t=t(),e.current=t,function(){e.current=null}}function Ww(t,e,n){return n=n!=null?n.concat([t]):null,hc(4,4,Hw.bind(null,e,t),n)}function Vp(){}function Kw(t,e){var n=an();e=e===void 0?null:e;var r=n.memoizedState;return r!==null&&e!==null&&Cp(e,r[1])?r[0]:(n.memoizedState=[t,e],t)}function Gw(t,e){var n=an();e=e===void 0?null:e;var r=n.memoizedState;return r!==null&&e!==null&&Cp(e,r[1])?r[0]:(t=t(),n.memoizedState=[t,e],t)}function qw(t,e,n){return yi&21?(En(n,e)||(n=J1(),Ve.lanes|=n,vi|=n,t.baseState=!0),e):(t.baseState&&(t.baseState=!1,bt=!0),t.memoizedState=n)}function zC(t,e){var n=ve;ve=n!==0&&4>n?n:4,t(!0);var r=Rh.transition;Rh.transition={};try{t(!1),e()}finally{ve=n,Rh.transition=r}}function Qw(){return an().memoizedState}function UC(t,e,n){var r=Ar(t);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Yw(t))Xw(e,n);else if(n=Vw(t,e,n,r),n!==null){var i=Ct();_n(n,t,r,i),Zw(n,e,r)}}function $C(t,e,n){var r=Ar(t),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Yw(t))Xw(e,i);else{var s=t.alternate;if(t.lanes===0&&(s===null||s.lanes===0)&&(s=e.lastRenderedReducer,s!==null))try{var o=e.lastRenderedState,l=s(o,n);if(i.hasEagerState=!0,i.eagerState=l,En(l,o)){var u=e.interleaved;u===null?(i.next=i,Tp(e)):(i.next=u.next,u.next=i),e.interleaved=i;return}}catch{}finally{}n=Vw(t,e,i,r),n!==null&&(i=Ct(),_n(n,t,r,i),Zw(n,e,r))}}function Yw(t){var e=t.alternate;return t===Ve||e!==null&&e===Ve}function Xw(t,e){No=Iu=!0;var n=t.pending;n===null?e.next=e:(e.next=n.next,n.next=e),t.pending=e}function Zw(t,e,n){if(n&4194240){var r=e.lanes;r&=t.pendingLanes,n|=r,e.lanes=n,lp(t,n)}}var xu={readContext:on,useCallback:pt,useContext:pt,useEffect:pt,useImperativeHandle:pt,useInsertionEffect:pt,useLayoutEffect:pt,useMemo:pt,useReducer:pt,useRef:pt,useState:pt,useDebugValue:pt,useDeferredValue:pt,useTransition:pt,useMutableSource:pt,useSyncExternalStore:pt,useId:pt,unstable_isNewReconciler:!1},HC={readContext:on,useCallback:function(t,e){return In().memoizedState=[t,e===void 0?null:e],t},useContext:on,useEffect:ev,useImperativeHandle:function(t,e,n){return n=n!=null?n.concat([t]):null,Ul(4194308,4,Hw.bind(null,e,t),n)},useLayoutEffect:function(t,e){return Ul(4194308,4,t,e)},useInsertionEffect:function(t,e){return Ul(4,2,t,e)},useMemo:function(t,e){var n=In();return e=e===void 0?null:e,t=t(),n.memoizedState=[t,e],t},useReducer:function(t,e,n){var r=In();return e=n!==void 0?n(e):e,r.memoizedState=r.baseState=e,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},r.queue=t,t=t.dispatch=UC.bind(null,Ve,t),[r.memoizedState,t]},useRef:function(t){var e=In();return t={current:t},e.memoizedState=t},useState:Jy,useDebugValue:Vp,useDeferredValue:function(t){return In().memoizedState=t},useTransition:function(){var t=Jy(!1),e=t[0];return t=zC.bind(null,t[1]),In().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,n){var r=Ve,i=In();if(Pe){if(n===void 0)throw Error(B(407));n=n()}else{if(n=e(),Ze===null)throw Error(B(349));yi&30||Lw(r,e,n)}i.memoizedState=n;var s={value:n,getSnapshot:e};return i.queue=s,ev(Fw.bind(null,r,s,t),[t]),r.flags|=2048,ua(9,Ow.bind(null,r,s,n,e),void 0,null),n},useId:function(){var t=In(),e=Ze.identifierPrefix;if(Pe){var n=$n,r=Un;n=(r&~(1<<32-vn(r)-1)).toString(32)+n,e=":"+e+"R"+n,n=aa++,0<n&&(e+="H"+n.toString(32)),e+=":"}else n=BC++,e=":"+e+"r"+n.toString(32)+":";return t.memoizedState=e},unstable_isNewReconciler:!1},WC={readContext:on,useCallback:Kw,useContext:on,useEffect:kp,useImperativeHandle:Ww,useInsertionEffect:Uw,useLayoutEffect:$w,useMemo:Gw,useReducer:kh,useRef:zw,useState:function(){return kh(la)},useDebugValue:Vp,useDeferredValue:function(t){var e=an();return qw(e,We.memoizedState,t)},useTransition:function(){var t=kh(la)[0],e=an().memoizedState;return[t,e]},useMutableSource:Nw,useSyncExternalStore:Mw,useId:Qw,unstable_isNewReconciler:!1},KC={readContext:on,useCallback:Kw,useContext:on,useEffect:kp,useImperativeHandle:Ww,useInsertionEffect:Uw,useLayoutEffect:$w,useMemo:Gw,useReducer:Vh,useRef:zw,useState:function(){return Vh(la)},useDebugValue:Vp,useDeferredValue:function(t){var e=an();return We===null?e.memoizedState=t:qw(e,We.memoizedState,t)},useTransition:function(){var t=Vh(la)[0],e=an().memoizedState;return[t,e]},useMutableSource:Nw,useSyncExternalStore:Mw,useId:Qw,unstable_isNewReconciler:!1};function pn(t,e){if(t&&t.defaultProps){e=De({},e),t=t.defaultProps;for(var n in t)e[n]===void 0&&(e[n]=t[n]);return e}return e}function $f(t,e,n,r){e=t.memoizedState,n=n(r,e),n=n==null?e:De({},e,n),t.memoizedState=n,t.lanes===0&&(t.updateQueue.baseState=n)}var fc={isMounted:function(t){return(t=t._reactInternals)?Si(t)===t:!1},enqueueSetState:function(t,e,n){t=t._reactInternals;var r=Ct(),i=Ar(t),s=Hn(r,i);s.payload=e,n!=null&&(s.callback=n),e=Tr(t,s,i),e!==null&&(_n(e,t,i,r),Bl(e,t,i))},enqueueReplaceState:function(t,e,n){t=t._reactInternals;var r=Ct(),i=Ar(t),s=Hn(r,i);s.tag=1,s.payload=e,n!=null&&(s.callback=n),e=Tr(t,s,i),e!==null&&(_n(e,t,i,r),Bl(e,t,i))},enqueueForceUpdate:function(t,e){t=t._reactInternals;var n=Ct(),r=Ar(t),i=Hn(n,r);i.tag=2,e!=null&&(i.callback=e),e=Tr(t,i,r),e!==null&&(_n(e,t,r,n),Bl(e,t,r))}};function tv(t,e,n,r,i,s,o){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(r,s,o):e.prototype&&e.prototype.isPureReactComponent?!ta(n,r)||!ta(i,s):!0}function Jw(t,e,n){var r=!1,i=br,s=e.contextType;return typeof s=="object"&&s!==null?s=on(s):(i=Lt(e)?mi:Tt.current,r=e.contextTypes,s=(r=r!=null)?ps(t,i):br),e=new e(n,s),t.memoizedState=e.state!==null&&e.state!==void 0?e.state:null,e.updater=fc,t.stateNode=e,e._reactInternals=t,r&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=i,t.__reactInternalMemoizedMaskedChildContext=s),e}function nv(t,e,n,r){t=e.state,typeof e.componentWillReceiveProps=="function"&&e.componentWillReceiveProps(n,r),typeof e.UNSAFE_componentWillReceiveProps=="function"&&e.UNSAFE_componentWillReceiveProps(n,r),e.state!==t&&fc.enqueueReplaceState(e,e.state,null)}function Hf(t,e,n,r){var i=t.stateNode;i.props=n,i.state=t.memoizedState,i.refs={},Sp(t);var s=e.contextType;typeof s=="object"&&s!==null?i.context=on(s):(s=Lt(e)?mi:Tt.current,i.context=ps(t,s)),i.state=t.memoizedState,s=e.getDerivedStateFromProps,typeof s=="function"&&($f(t,e,s,n),i.state=t.memoizedState),typeof e.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(e=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),e!==i.state&&fc.enqueueReplaceState(i,i.state,null),Su(t,n,i,r),i.state=t.memoizedState),typeof i.componentDidMount=="function"&&(t.flags|=4194308)}function vs(t,e){try{var n="",r=e;do n+=wx(r),r=r.return;while(r);var i=n}catch(s){i=`
39Error generating stack: `+s.message+`
40`+s.stack}return{value:t,source:e,stack:i,digest:null}}function Dh(t,e,n){return{value:t,source:null,stack:n??null,digest:e??null}}function Wf(t,e){try{console.error(e.value)}catch(n){setTimeout(function(){throw n})}}var GC=typeof WeakMap=="function"?WeakMap:Map;function eE(t,e,n){n=Hn(-1,n),n.tag=3,n.payload={element:null};var r=e.value;return n.callback=function(){Pu||(Pu=!0,td=r),Wf(t,e)},n}function tE(t,e,n){n=Hn(-1,n),n.tag=3;var r=t.type.getDerivedStateFromError;if(typeof r=="function"){var i=e.value;n.payload=function(){return r(i)},n.callback=function(){Wf(t,e)}}var s=t.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(n.callback=function(){Wf(t,e),t
vendor: 10,399 bytes, line 40
40ypeof r!="function"&&(Sr===null?Sr=new Set([this]):Sr.add(this));var o=e.stack;this.componentDidCatch(e.value,{componentStack:o!==null?o:""})}),n}function rv(t,e,n){var r=t.pingCache;if(r===null){r=t.pingCache=new GC;var i=new Set;r.set(e,i)}else i=r.get(e),i===void 0&&(i=new Set,r.set(e,i));i.has(n)||(i.add(n),t=aP.bind(null,t,e,n),e.then(t,t))}function iv(t){do{var e;if((e=t.tag===13)&&(e=t.memoizedState,e=e!==null?e.dehydrated!==null:!0),e)return t;t=t.return}while(t!==null);return null}function sv(t,e,n,r,i){return t.mode&1?(t.flags|=65536,t.lanes=i,t):(t===e?t.flags|=65536:(t.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(e=Hn(-1,1),e.tag=2,Tr(n,e,1))),n.lanes|=1),t)}var qC=nr.ReactCurrentOwner,bt=!1;function xt(t,e,n,r){e.child=t===null?kw(e,null,n,r):gs(e,t.child,n,r)}function ov(t,e,n,r,i){n=n.render;var s=e.ref;return ls(e,i),r=Pp(t,e,n,r,s,i),n=Rp(),t!==null&&!bt?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~i,Xn(t,e,i)):(Pe&&n&&gp(e),e.flags|=1,xt(t,e,r,i),e.child)}function av(t,e,n,r,i){if(t===null){var s=n.type;return typeof s=="function"&&!jp(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(e.tag=15,e.type=s,nE(t,e,s,r,i)):(t=Kl(n.type,null,r,e,e.mode,i),t.ref=e.ref,t.return=e,e.child=t)}if(s=t.child,!(t.lanes&i)){var o=s.memoizedProps;if(n=n.compare,n=n!==null?n:ta,n(o,r)&&t.ref===e.ref)return Xn(t,e,i)}return e.flags|=1,t=Ir(s,r),t.ref=e.ref,t.return=e,e.child=t}function nE(t,e,n,r,i){if(t!==null){var s=t.memoizedProps;if(ta(s,r)&&t.ref===e.ref)if(bt=!1,e.pendingProps=r=s,(t.lanes&i)!==0)t.flags&131072&&(bt=!0);else return e.lanes=t.lanes,Xn(t,e,i)}return Kf(t,e,n,r,i)}function rE(t,e,n){var r=e.pendingProps,i=r.children,s=t!==null?t.memoizedState:null;if(r.mode==="hidden")if(!(e.mode&1))e.memoizedState={baseLanes:0,cachePool:null,transitions:null},Ee(Xi,Ut),Ut|=n;else{if(!(n&1073741824))return t=s!==null?s.baseLanes|n:n,e.lanes=e.childLanes=1073741824,e.memoizedState={baseLanes:t,cachePool:null,transitions:null},e.updateQueue=null,Ee(Xi,Ut),Ut|=t,null;e.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=s!==null?s.baseLanes:n,Ee(Xi,Ut),Ut|=r}else s!==null?(r=s.baseLanes|n,e.memoizedState=null):r=n,Ee(Xi,Ut),Ut|=r;return xt(t,e,i,n),e.child}function iE(t,e){var n=e.ref;(t===null&&n!==null||t!==null&&t.ref!==n)&&(e.flags|=512,e.flags|=2097152)}function Kf(t,e,n,r,i){var s=Lt(n)?mi:Tt.current;return s=ps(e,s),ls(e,i),n=Pp(t,e,n,r,s,i),r=Rp(),t!==null&&!bt?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~i,Xn(t,e,i)):(Pe&&r&&gp(e),e.flags|=1,xt(t,e,n,i),e.child)}function lv(t,e,n,r,i){if(Lt(n)){var s=!0;vu(e)}else s=!1;if(ls(e,i),e.stateNode===null)$l(t,e),Jw(e,n,r),Hf(e,n,r,i),r=!0;else if(t===null){var o=e.stateNode,l=e.memoizedProps;o.props=l;var u=o.context,c=n.contextType;typeof c=="object"&&c!==null?c=on(c):(c=Lt(n)?mi:Tt.current,c=ps(e,c));var f=n.getDerivedStateFromProps,d=typeof f=="function"||typeof o.getSnapshotBeforeUpdate=="function";d||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(l!==r||u!==c)&&nv(e,o,r,c),fr=!1;var p=e.memoizedState;o.state=p,Su(e,r,o,i),u=e.memoizedState,l!==r||p!==u||Mt.current||fr?(typeof f=="function"&&($f(e,n,f,r),u=e.memoizedState),(l=fr||tv(e,n,l,r,p,u,c))?(d||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(e.flags|=4194308)):(typeof o.componentDidMount=="function"&&(e.flags|=4194308),e.memoizedProps=r,e.memoizedState=u),o.props=r,o.state=u,o.context=c,r=l):(typeof o.componentDidMount=="function"&&(e.flags|=4194308),r=!1)}else{o=e.stateNode,Dw(t,e),l=e.memoizedProps,c=e.type===e.elementType?l:pn(e.type,l),o.props=c,d=e.pendingProps,p=o.context,u=n.contextType,typeof u=="object"&&u!==null?u=on(u):(u=Lt(n)?mi:Tt.current,u=ps(e,u));var y=n.getDerivedStateFromProps;(f=typeof y=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(l!==d||p!==u)&&nv(e,o,r,u),fr=!1,p=e.memoizedState,o.state=p,Su(e,r,o,i);var S=e.memoizedState;l!==d||p!==S||Mt.current||fr?(typeof y=="function"&&($f(e,n,y,r),S=e.memoizedState),(c=fr||tv(e,n,c,r,p,S,u)||!1)?(f||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(r,S,u),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(r,S,u)),typeof o.componentDidUpdate=="function"&&(e.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(e.flags|=1024)):(typeof o.componentDidUpdate!="function"||l===t.memoizedProps&&p===t.memoizedState||(e.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||l===t.memoizedProps&&p===t.memoizedState||(e.flags|=1024),e.memoizedProps=r,e.memoizedState=S),o.props=r,o.state=S,o.context=u,r=c):(typeof o.componentDidUpdate!="function"||l===t.memoizedProps&&p===t.memoizedState||(e.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||l===t.memoizedProps&&p===t.memoizedState||(e.flags|=1024),r=!1)}return Gf(t,e,n,r,s,i)}function Gf(t,e,n,r,i,s){iE(t,e);var o=(e.flags&128)!==0;if(!r&&!o)return i&&Gy(e,n,!1),Xn(t,e,s);r=e.stateNode,qC.current=e;var l=o&&typeof n.getDerivedStateFromError!="function"?null:r.render();return e.flags|=1,t!==null&&o?(e.child=gs(e,t.child,null,s),e.child=gs(e,null,l,s)):xt(t,e,l,s),e.memoizedState=r.state,i&&Gy(e,n,!0),e.child}function sE(t){var e=t.stateNode;e.pendingContext?Ky(t,e.pendingContext,e.pendingContext!==e.context):e.context&&Ky(t,e.context,!1),Ap(t,e.containerInfo)}function uv(t,e,n,r,i){return ms(),vp(i),e.flags|=256,xt(t,e,n,r),e.child}var qf={dehydrated:null,treeContext:null,retryLane:0};function Qf(t){return{baseLanes:t,cachePool:null,transitions:null}}function oE(t,e,n){var r=e.pendingProps,i=Re.current,s=!1,o=(e.flags&128)!==0,l;if((l=o)||(l=t!==null&&t.memoizedState===null?!1:(i&2)!==0),l?(s=!0,e.flags&=-129):(t===null||t.memoizedState!==null)&&(i|=1),Ee(Re,i&1),t===null)return zf(e),t=e.memoizedState,t!==null&&(t=t.dehydrated,t!==null)?(e.mode&1?t.data==="$!"?e.lanes=8:e.lanes=1073741824:e.lanes=1,null):(o=r.children,t=r.fallback,s?(r=e.mode,s=e.child,o={mode:"hidden",children:o},!(r&1)&&s!==null?(s.childLanes=0,s.pendingProps=o):s=mc(o,r,0,null),t=hi(t,r,n,null),s.return=e,t.return=e,s.sibling=t,e.child=s,e.child.memoizedState=Qf(n),e.memoizedState=qf,t):Dp(e,o));if(i=t.memoizedState,i!==null&&(l=i.dehydrated,l!==null))return QC(t,e,o,r,l,i,n);if(s){s=r.fallback,o=e.mode,i=t.child,l=i.sibling;var u={mode:"hidden",children:r.children};return!(o&1)&&e.child!==i?(r=e.child,r.childLanes=0,r.pendingProps=u,e.deletions=null):(r=Ir(i,u),r.subtreeFlags=i.subtreeFlags&14680064),l!==null?s=Ir(l,s):(s=hi(s,o,n,null),s.flags|=2),s.return=e,r.return=e,r.sibling=s,e.child=r,r=s,s=e.child,o=t.child.memoizedState,o=o===null?Qf(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},s.memoizedState=o,s.childLanes=t.childLanes&~n,e.memoizedState=qf,r}return s=t.child,t=s.sibling,r=Ir(s,{mode:"visible",children:r.children}),!(e.mode&1)&&(r.lanes=n),r.return=e,r.sibling=null,t!==null&&(n=e.deletions,n===null?(e.deletions=[t],e.flags|=16):n.push(t)),e.child=r,e.memoizedState=null,r}function Dp(t,e){return e=mc({mode:"visible",children:e},t.mode,0,null),e.return=t,t.child=e}function yl(t,e,n,r){return r!==null&&vp(r),gs(e,t.child,null,n),t=Dp(e,e.pendingProps.children),t.flags|=2,e.memoizedState=null,t}function QC(t,e,n,r,i,s,o){if(n)return e.flags&256?(e.flags&=-257,r=Dh(Error(B(422))),yl(t,e,o,r)):e.memoizedState!==null?(e.child=t.child,e.flags|=128,null):(s=r.fallback,i=e.mode,r=mc({mode:"visible",children:r.children},i,0,null),s=hi(s,i,o,null),s.flags|=2,r.return=e,s.return=e,r.sibling=s,e.child=r,e.mode&1&&gs(e,t.child,null,o),e.child.memoizedState=Qf(o),e.memoizedState=qf,s);if(!(e.mode&1))return yl(t,e,o,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var l=r.dgst;return r=l,s=Error(B(419)),r=Dh(s,r,void 0),yl(t,e,o,r)}if(l=(o&t.childLanes)!==0,bt||l){if(r=Ze,r!==null){switch(o&-o){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|o)?0:i,i!==0&&i!==s.retryLane&&(s.retryLane=i,Yn(t,i),_n(r,t,i,-1))}return Fp(),r=Dh(Error(B(421))),yl(t,e,o,r)}return i.data==="$?"?(e.flags|=128,e.child=t.child,e=lP.bind(null,t),i._reactRetry=e,null):(t=s.treeContext,$t=Er(i.nextSibling),Wt=e,Pe=!0,gn=null,t!==null&&(Jt[en++]=Un,Jt[en++]=$n,Jt[en++]=gi,Un=t.id,$n=t.overflow,gi=e),e=Dp(e,r.children),e.flags|=4096,e)}function cv(t,e,n){t.lanes|=e;var r=t.alternate;r!==null&&(r.lanes|=e),Uf(t.return,e,n)}function bh(t,e,n,r,i){var s=t.memoizedState;s===null?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(s.isBackwards=e,s.rendering=null,s.renderingStartTime=0,s.last=r,s.tail=n,s.tailMode=i)}function aE(t,e,n){var r=e.pendingProps,i=r.revealOrder,s=r.tail;if(xt(t,e,r.children,n),r=Re.current,r&2)r=r&1|2,e.flags|=128;else{if(t!==null&&t.flags&128)e:for(t=e.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&cv(t,n,e);else if(t.tag===19)cv(t,n,e);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}r&=1}if(Ee(Re,r),!(e.mode&1))e.memoizedState=null;else switch(i){case"forwards":for(n=e.child,i=null;n!==null;)t=n.alternate,t!==null&&Au(t)===null&&(i=n),n=n.sibling;n=i,n===null?(i=e.child,e.child=null):(i=n.sibling,n.sibling=null),bh(e,!1,i,n,s);break;case"backwards":for(n=null,i=e.child,e.child=null;i!==null;){if(t=i.alternate,t!==null&&Au(t)===null){e.child=i;break}t=i.sibling,i.sibling=n,n=i,i=t}bh(e,!0,n,null,s);break;case"together":bh(e,!1,null,null,void 0);break;default:e.memoizedState=null}return e.child}function $l(t,e){!(e.mode&1)&&t!==null&&(t.alternate=null,e.alternate=null,e.flags|=2)}
vendor: 5,608 bytes, line 40
40function Xn(t,e,n){if(t!==null&&(e.dependencies=t.dependencies),vi|=e.lanes,!(n&e.childLanes))return null;if(t!==null&&e.child!==t.child)throw Error(B(153));if(e.child!==null){for(t=e.child,n=Ir(t,t.pendingProps),e.child=n,n.return=e;t.sibling!==null;)t=t.sibling,n=n.sibling=Ir(t,t.pendingProps),n.return=e;n.sibling=null}return e.child}function YC(t,e,n){switch(e.tag){case 3:sE(e),ms();break;case 5:bw(e);break;case 1:Lt(e.type)&&vu(e);break;case 4:Ap(e,e.stateNode.containerInfo);break;case 10:var r=e.type._context,i=e.memoizedProps.value;Ee(Eu,r._currentValue),r._currentValue=i;break;case 13:if(r=e.memoizedState,r!==null)return r.dehydrated!==null?(Ee(Re,Re.current&1),e.flags|=128,null):n&e.child.childLanes?oE(t,e,n):(Ee(Re,Re.current&1),t=Xn(t,e,n),t!==null?t.sibling:null);Ee(Re,Re.current&1);break;case 19:if(r=(n&e.childLanes)!==0,t.flags&128){if(r)return aE(t,e,n);e.flags|=128}if(i=e.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Ee(Re,Re.current),r)break;return null;case 22:case 23:return e.lanes=0,rE(t,e,n)}return Xn(t,e,n)}var lE,Yf,uE,cE;lE=function(t,e){for(var n=e.child;n!==null;){if(n.tag===5||n.tag===6)t.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};Yf=function(){};uE=function(t,e,n,r){var i=t.memoizedProps;if(i!==r){t=e.stateNode,si(kn.current);var s=null;switch(n){case"input":i=vf(t,i),r=vf(t,r),s=[];break;case"select":i=De({},i,{value:void 0}),r=De({},r,{value:void 0}),s=[];break;case"textarea":i=Ef(t,i),r=Ef(t,r),s=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(t.onclick=gu)}Sf(n,r);var o;n=null;for(c in i)if(!r.hasOwnProperty(c)&&i.hasOwnProperty(c)&&i[c]!=null)if(c==="style"){var l=i[c];for(o in l)l.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(qo.hasOwnProperty(c)?s||(s=[]):(s=s||[]).push(c,null));for(c in r){var u=r[c];if(l=i!=null?i[c]:void 0,r.hasOwnProperty(c)&&u!==l&&(u!=null||l!=null))if(c==="style")if(l){for(o in l)!l.hasOwnProperty(o)||u&&u.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in u)u.hasOwnProperty(o)&&l[o]!==u[o]&&(n||(n={}),n[o]=u[o])}else n||(s||(s=[]),s.push(c,n)),n=u;else c==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,l=l?l.__html:void 0,u!=null&&l!==u&&(s=s||[]).push(c,u)):c==="children"?typeof u!="string"&&typeof u!="number"||(s=s||[]).push(c,""+u):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(qo.hasOwnProperty(c)?(u!=null&&c==="onScroll"&&Se("scroll",t),s||l===u||(s=[])):(s=s||[]).push(c,u))}n&&(s=s||[]).push("style",n);var c=s;(e.updateQueue=c)&&(e.flags|=4)}};cE=function(t,e,n,r){n!==r&&(e.flags|=4)};function mo(t,e){if(!Pe)switch(t.tailMode){case"hidden":e=t.tail;for(var n=null;e!==null;)e.alternate!==null&&(n=e),e=e.sibling;n===null?t.tail=null:n.sibling=null;break;case"collapsed":n=t.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?e||t.tail===null?t.tail=null:t.tail.sibling=null:r.sibling=null}}function mt(t){var e=t.alternate!==null&&t.alternate.child===t.child,n=0,r=0;if(e)for(var i=t.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=t,i=i.sibling;else for(i=t.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=t,i=i.sibling;return t.subtreeFlags|=r,t.childLanes=n,e}function XC(t,e,n){var r=e.pendingProps;switch(yp(e),e.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return mt(e),null;case 1:return Lt(e.type)&&yu(),mt(e),null;case 3:return r=e.stateNode,ys(),xe(Mt),xe(Tt),xp(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(t===null||t.child===null)&&(ml(e)?e.flags|=4:t===null||t.memoizedState.isDehydrated&&!(e.flags&256)||(e.flags|=1024,gn!==null&&(id(gn),gn=null))),Yf(t,e),mt(e),null;case 5:Ip(e);var i=si(oa.current);if(n=e.type,t!==null&&e.stateNode!=null)uE(t,e,n,r,i),t.ref!==e.ref&&(e.flags|=512,e.flags|=2097152);else{if(!r){if(e.stateNode===null)throw Error(B(166));return mt(e),null}if(t=si(kn.current),ml(e)){r=e.stateNode,n=e.type;var s=e.memoizedProps;switch(r[Pn]=e,r[ia]=s,t=(e.mode&1)!==0,n){case"dialog":Se("cancel",r),Se("close",r);break;case"iframe":case"object":case"embed":Se("load",r);break;case"video":case"audio":for(i=0;i<Eo.length;i++)Se(Eo[i],r);break;case"source":Se("error",r);break;case"img":case"image":case"link":Se("error",r),Se("load",r);break;case"details":Se("toggle",r);break;case"input":_y(r,s),Se("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!s.multiple},Se("invalid",r);break;case"textarea":Ey(r,s),Se("invalid",r)}Sf(n,s),i=null;for(var o in s)if(s.hasOwnProperty(o)){var l=s[o];o==="children"?typeof l=="string"?r.textContent!==l&&(s.suppressHydrationWarning!==!0&&pl(r.textContent,l,t),i=["children",l]):typeof l=="number"&&r.textContent!==""+l&&(s.suppressHydrationWarning!==!0&&pl(r.textContent,l,t),i=["children",""+l]):qo.hasOwnProperty(o)&&l!=null&&o==="onScroll"&&Se("scroll",r)}switch(n){case"input":ol(r),wy(r,s,!0);break;case"textarea":ol(r),Ty(r);break;case"select":case"option":break;default:typeof s.onClick=="function"&&(r.onclick=gu)}r=i,e.updateQueue=r,r!==null&&(e.flags|=4)}else{o=i.nodeType===9?i:i.ownerDocument,t==="http://www.w3.org/1999/xhtml"&&(t=F1(n)),t==="http://www.w3.org/1999/xhtml"?n==="script"?(t=o.createElement("div"),t.innerHTML="<script><\/script>
40",t=t.removeChild(t.firstChild)):typeof r.is=="string"?t=o.createElement(n,{is:r.is}):(t=o.createElement(n),n==="select"&&(o=t,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):t=o.createElementNS(t,n),t[Pn]=e,t[ia]=r,lE(t,e,!1,!1),e.stateNode=t;e:{switch(o=Af(n,r),n){case"dialog":Se("cancel",t),Se("close",t),i=r;break;case"iframe":case"object":case"embed":Se("load",t),i=r;break;case"video":case"audio":for(i=0;i<Eo.length;i++)Se(Eo[i],t);i=r;break;case"source":Se("error",t),i=r;break;case"img":case"image":case"link":Se("error",t),Se("load",t),i=r;break;case"details":Se("toggle",t),i=r;break;case"input":_y(t,r),i=vf(t,r),Se("invalid",t);break;case"option":i=r;break;case"select":t._wrapperState={wasMultiple:!!r.multiple},i=De({},r,{value:void 0}),Se("invalid",t);break;case"textarea":Ey(t,r),i=Ef(t,r),Se("invalid",t);break;default:i=r}Sf(n,i),l=i;for(s in l)if(l.hasOwnProperty(s)){var u=l[s];s==="style"?z1(t,u):s==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,u!=null&&j1(t,u)):s==="children"?typeof u=="string"?(n!=="textarea"||u!=="")&&Qo(t,u):typeof u=="number"&&Qo(t,""+u):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&(qo.hasOwnProperty(s)?u!=null&&s==="onScroll"&&Se("scroll",t):u!=null&&np(t,s,u,o))}switch(n){case"input":ol(t),wy(t,r,!1);break;case"textarea":ol(t),Ty(t);break;case"option":r.value!=null&&t.setAttribute("value",""+Dr(r.value));break;case"select":t.multiple=!!r.multiple,s=r.value,s!=null?is(t,!!r.multiple,s,!1):r.defaultValue!=null&&is(t,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(t.onclick=gu)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(e.flags|=4)}e.ref!==null&&(e.flags|=512,e.flags|=2097152)}return mt(e),null;case 6:if(t&&e.stateNode!=null)cE(t,e,t.memoizedProps,r);else{if(typeof r!="string"&&e.stateNode===null)throw Error(B(166));if(n=si(oa.current),si(kn.current),ml(e)){if(r=e.stateNode,n=e.memoizedProps,r[Pn]=e,(s=r.nodeValue!==n)&&(t=Wt,t!==null))switch(t.tag){case 3:pl(r.nodeValue,n,(t.mode&1)!==0);break;case 5:t.memoizedProps.suppressHydrationWarning!==!0&&pl(r.nodeValue,n,(t.mode&1)!==0)}s&&(e.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Pn]=e,e.stateNode=r}return mt(e),null;case 13:if(xe(Re),r=e.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(Pe&&$t!==null&&e.mode&1&&!(e.flags&128))Pw(),ms(),e.flags|=98560,s=!1;else if(s=ml(e),r!==null&&r.dehydrated!==null){if(t===null){if(!s)throw Error(B(318));if(s=e.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(B(317)
vendor: 27,915 bytes, line 40
40);s[Pn]=e}else ms(),!(e.flags&128)&&(e.memoizedState=null),e.flags|=4;mt(e),s=!1}else gn!==null&&(id(gn),gn=null),s=!0;if(!s)return e.flags&65536?e:null}return e.flags&128?(e.lanes=n,e):(r=r!==null,r!==(t!==null&&t.memoizedState!==null)&&r&&(e.child.flags|=8192,e.mode&1&&(t===null||Re.current&1?Ke===0&&(Ke=3):Fp())),e.updateQueue!==null&&(e.flags|=4),mt(e),null);case 4:return ys(),Yf(t,e),t===null&&na(e.stateNode.containerInfo),mt(e),null;case 10:return Ep(e.type._context),mt(e),null;case 17:return Lt(e.type)&&yu(),mt(e),null;case 19:if(xe(Re),s=e.memoizedState,s===null)return mt(e),null;if(r=(e.flags&128)!==0,o=s.rendering,o===null)if(r)mo(s,!1);else{if(Ke!==0||t!==null&&t.flags&128)for(t=e.child;t!==null;){if(o=Au(t),o!==null){for(e.flags|=128,mo(s,!1),r=o.updateQueue,r!==null&&(e.updateQueue=r,e.flags|=4),e.subtreeFlags=0,r=n,n=e.child;n!==null;)s=n,t=r,s.flags&=14680066,o=s.alternate,o===null?(s.childLanes=0,s.lanes=t,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=o.childLanes,s.lanes=o.lanes,s.child=o.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=o.memoizedProps,s.memoizedState=o.memoizedState,s.updateQueue=o.updateQueue,s.type=o.type,t=o.dependencies,s.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),n=n.sibling;return Ee(Re,Re.current&1|2),e.child}t=t.sibling}s.tail!==null&&je()>_s&&(e.flags|=128,r=!0,mo(s,!1),e.lanes=4194304)}else{if(!r)if(t=Au(o),t!==null){if(e.flags|=128,r=!0,n=t.updateQueue,n!==null&&(e.updateQueue=n,e.flags|=4),mo(s,!0),s.tail===null&&s.tailMode==="hidden"&&!o.alternate&&!Pe)return mt(e),null}else 2*je()-s.renderingStartTime>_s&&n!==1073741824&&(e.flags|=128,r=!0,mo(s,!1),e.lanes=4194304);s.isBackwards?(o.sibling=e.child,e.child=o):(n=s.last,n!==null?n.sibling=o:e.child=o,s.last=o)}return s.tail!==null?(e=s.tail,s.rendering=e,s.tail=e.sibling,s.renderingStartTime=je(),e.sibling=null,n=Re.current,Ee(Re,r?n&1|2:n&1),e):(mt(e),null);case 22:case 23:return Op(),r=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==r&&(e.flags|=8192),r&&e.mode&1?Ut&1073741824&&(mt(e),e.subtreeFlags&6&&(e.flags|=8192)):mt(e),null;case 24:return null;case 25:return null}throw Error(B(156,e.tag))}function ZC(t,e){switch(yp(e),e.tag){case 1:return Lt(e.type)&&yu(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return ys(),xe(Mt),xe(Tt),xp(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return Ip(e),null;case 13:if(xe(Re),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(B(340));ms()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return xe(Re),null;case 4:return ys(),null;case 10:return Ep(e.type._context),null;case 22:case 23:return Op(),null;case 24:return null;default:return null}}var vl=!1,_t=!1,JC=typeof WeakSet=="function"?WeakSet:Set,W=null;function Yi(t,e){var n=t.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Le(t,e,r)}else n.current=null}function Xf(t,e,n){try{n()}catch(r){Le(t,e,r)}}var hv=!1;function eP(t,e){if(Nf=du,t=mw(),mp(t)){if("selectionStart"in t)var n={start:t.selectionStart,end:t.selectionEnd};else e:{n=(n=t.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,s=r.focusNode;r=r.focusOffset;try{n.nodeType,s.nodeType}catch{n=null;break e}var o=0,l=-1,u=-1,c=0,f=0,d=t,p=null;t:for(;;){for(var y;d!==n||i!==0&&d.nodeType!==3||(l=o+i),d!==s||r!==0&&d.nodeType!==3||(u=o+r),d.nodeType===3&&(o+=d.nodeValue.length),(y=d.firstChild)!==null;)p=d,d=y;for(;;){if(d===t)break t;if(p===n&&++c===i&&(l=o),p===s&&++f===r&&(u=o),(y=d.nextSibling)!==null)break;d=p,p=d.parentNode}d=y}n=l===-1||u===-1?null:{start:l,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(Mf={focusedElem:t,selectionRange:n},du=!1,W=e;W!==null;)if(e=W,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,W=t;else for(;W!==null;){e=W;try{var S=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(S!==null){var x=S.memoizedProps,R=S.memoizedState,w=e.stateNode,v=w.getSnapshotBeforeUpdate(e.elementType===e.type?x:pn(e.type,x),R);w.__reactInternalSnapshotBeforeUpdate=v}break;case 3:var T=e.stateNode.containerInfo;T.nodeType===1?T.textContent="":T.nodeType===9&&T.documentElement&&T.removeChild(T.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(B(163))}}catch(k){Le(e,e.return,k)}if(t=e.sibling,t!==null){t.return=e.return,W=t;break}W=e.return}return S=hv,hv=!1,S}function Mo(t,e,n){var r=e.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&t)===t){var s=i.destroy;i.destroy=void 0,s!==void 0&&Xf(e,n,s)}i=i.next}while(i!==r)}}function dc(t,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var n=e=e.next;do{if((n.tag&t)===t){var r=n.create;n.destroy=r()}n=n.next}while(n!==e)}}function Zf(t){var e=t.ref;if(e!==null){var n=t.stateNode;switch(t.tag){case 5:t=n;break;default:t=n}typeof e=="function"?e(t):e.current=t}}function hE(t){var e=t.alternate;e!==null&&(t.alternate=null,hE(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[Pn],delete e[ia],delete e[Ff],delete e[LC],delete e[OC])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function fE(t){return t.tag===5||t.tag===3||t.tag===4}function fv(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||fE(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function Jf(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.nodeType===8?n.parentNode.insertBefore(t,e):n.insertBefore(t,e):(n.nodeType===8?(e=n.parentNode,e.insertBefore(t,n)):(e=n,e.appendChild(t)),n=n._reactRootContainer,n!=null||e.onclick!==null||(e.onclick=gu));else if(r!==4&&(t=t.child,t!==null))for(Jf(t,e,n),t=t.sibling;t!==null;)Jf(t,e,n),t=t.sibling}function ed(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.insertBefore(t,e):n.appendChild(t);else if(r!==4&&(t=t.child,t!==null))for(ed(t,e,n),t=t.sibling;t!==null;)ed(t,e,n),t=t.sibling}var rt=null,mn=!1;function ar(t,e,n){for(n=n.child;n!==null;)dE(t,e,n),n=n.sibling}function dE(t,e,n){if(Rn&&typeof Rn.onCommitFiberUnmount=="function")try{Rn.onCommitFiberUnmount(sc,n)}catch{}switch(n.tag){case 5:_t||Yi(n,e);case 6:var r=rt,i=mn;rt=null,ar(t,e,n),rt=r,mn=i,rt!==null&&(mn?(t=rt,n=n.stateNode,t.nodeType===8?t.parentNode.removeChild(n):t.removeChild(n)):rt.removeChild(n.stateNode));break;case 18:rt!==null&&(mn?(t=rt,n=n.stateNode,t.nodeType===8?xh(t.parentNode,n):t.nodeType===1&&xh(t,n),Jo(t)):xh(rt,n.stateNode));break;case 4:r=rt,i=mn,rt=n.stateNode.containerInfo,mn=!0,ar(t,e,n),rt=r,mn=i;break;case 0:case 11:case 14:case 15:if(!_t&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var s=i,o=s.destroy;s=s.tag,o!==void 0&&(s&2||s&4)&&Xf(n,e,o),i=i.next}while(i!==r)}ar(t,e,n);break;case 1:if(!_t&&(Yi(n,e),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){Le(n,e,l)}ar(t,e,n);break;case 21:ar(t,e,n);break;case 22:n.mode&1?(_t=(r=_t)||n.memoizedState!==null,ar(t,e,n),_t=r):ar(t,e,n);break;default:ar(t,e,n)}}function dv(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var n=t.stateNode;n===null&&(n=t.stateNode=new JC),e.forEach(function(r){var i=uP.bind(null,t,r);n.has(r)||(n.add(r),r.then(i,i))})}}function fn(t,e){var n=e.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];try{var s=t,o=e,l=o;e:for(;l!==null;){switch(l.tag){case 5:rt=l.stateNode,mn=!1;break e;case 3:rt=l.stateNode.containerInfo,mn=!0;break e;case 4:rt=l.stateNode.containerInfo,mn=!0;break e}l=l.return}if(rt===null)throw Error(B(160));dE(s,o,i),rt=null,mn=!1;var u=i.alternate;u!==null&&(u.return=null),i.return=null}catch(c){Le(i,e,c)}}if(e.subtreeFlags&12854)for(e=e.child;e!==null;)pE(e,t),e=e.sibling}function pE(t,e){var n=t.alternate,r=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:if(fn(e,t),An(t),r&4){try{Mo(3,t,t.return),dc(3,t)}catch(x){Le(t,t.return,x)}try{Mo(5,t,t.return)}catch(x){Le(t,t.return,x)}}break;case 1:fn(e,t),An(t),r&512&&n!==null&&Yi(n,n.return);break;case 5:if(fn(e,t),An(t),r&512&&n!==null&&Yi(n,n.return),t.flags&32){var i=t.stateNode;try{Qo(i,"")}catch(x){Le(t,t.return,x)}}if(r&4&&(i=t.stateNode,i!=null)){var s=t.memoizedProps,o=n!==null?n.memoizedProps:s,l=t.type,u=t.updateQueue;if(t.updateQueue=null,u!==null)try{l==="input"&&s.type==="radio"&&s.name!=null&&L1(i,s),Af(l,o);var c=Af(l,s);for(o=0;o<u.length;o+=2){var f=u[o],d=u[o+1];f==="style"?z1(i,d):f==="dangerouslySetInnerHTML"?j1(i,d):f==="children"?Qo(i,d):np(i,f,d,c)}switch(l){case"input":_f(i,s);break;case"textarea":O1(i,s);break;case"select":var p=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!s.multiple;var y=s.value;y!=null?is(i,!!s.multiple,y,!1):p!==!!s.multiple&&(s.defaultValue!=null?is(i,!!s.multiple,s.defaultValue,!0):is(i,!!s.multiple,s.multiple?[]:"",!1))}i[ia]=s}catch(x){Le(t,t.return,x)}}break;case 6:if(fn(e,t),An(t),r&4){if(t.stateNode===null)throw Error(B(162));i=t.stateNode,s=t.memoizedProps;try{i.nodeValue=s}catch(x){Le(t,t.return,x)}}break;case 3:if(fn(e,t),An(t),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Jo(e.containerInfo)}catch(x){Le(t,t.return,x)}break;case 4:fn(e,t),An(t);break;case 13:fn(e,t),An(t),i=t.child,i.flags&8192&&(s=i.memoizedState!==null,i.stateNode.isHidden=s,!s||i.alternate!==null&&i.alternate.memoizedState!==null||(Mp=je())),r&4&&dv(t);break;case 22:if(f=n!==null&&n.memoizedState!==null,t.mode&1?(_t=(c=_t)||f,fn(e,t),_t=c):fn(e,t),An(t),r&8192){if(c=t.memoizedState!==null,(t.stateNode.isHidden=c)&&!f&&t.mode&1)for(W=t,f=t.child;f!==null;){for(d=W=f;W!==null;){switch(p=W,y=p.child,p.tag){case 0:case 11:case 14:case 15:Mo(4,p,p.return);break;case 1:Yi(p,p.return);var S=p.stateNode;if(typeof S.componentWillUnmount=="function"){r=p,n=p.return;try{e=r,S.props=e.memoizedProps,S.state=e.memoizedState,S.componentWillUnmount()}catch(x){Le(r,n,x)}}break;case 5:Yi(p,p.return);break;case 22:if(p.memoizedState!==null){mv(d);continue}}y!==null?(y.return=p,W=y):mv(d)}f=f.sibling}e:for(f=null,d=t;;){if(d.tag===5){if(f===null){f=d;try{i=d.stateNode,c?(s=i.style,typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none"):(l=d.stateNode,u=d.memoizedProps.style,o=u!=null&&u.hasOwnProperty("display")?u.display:null,l.style.display=B1("display",o))}catch(x){Le(t,t.return,x)}}}else if(d.tag===6){if(f===null)try{d.stateNode.nodeValue=c?"":d.memoizedProps}catch(x){Le(t,t.return,x)}}else if((d.tag!==22&&d.tag!==23||d.memoizedState===null||d===t)&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===t)break e;for(;d.sibling===null;){if(d.return===null||d.return===t)break e;f===d&&(f=null),d=d.return}f===d&&(f=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:fn(e,t),An(t),r&4&&dv(t);break;case 21:break;default:fn(e,t),An(t)}}function An(t){var e=t.flags;if(e&2){try{e:{for(var n=t.return;n!==null;){if(fE(n)){var r=n;break e}n=n.return}throw Error(B(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(Qo(i,""),r.flags&=-33);var s=fv(t);ed(t,s,i);break;case 3:case 4:var o=r.stateNode.containerInfo,l=fv(t);Jf(t,l,o);break;default:throw Error(B(161))}}catch(u){Le(t,t.return,u)}t.flags&=-3}e&4096&&(t.flags&=-4097)}function tP(t,e,n){W=t,mE(t)}function mE(t,e,n){for(var r=(t.mode&1)!==0;W!==null;){var i=W,s=i.child;if(i.tag===22&&r){var o=i.memoizedState!==null||vl;if(!o){var l=i.alternate,u=l!==null&&l.memoizedState!==null||_t;l=vl;var c=_t;if(vl=o,(_t=u)&&!c)for(W=i;W!==null;)o=W,u=o.child,o.tag===22&&o.memoizedState!==null?gv(i):u!==null?(u.return=o,W=u):gv(i);for(;s!==null;)W=s,mE(s),s=s.sibling;W=i,vl=l,_t=c}pv(t)}else i.subtreeFlags&8772&&s!==null?(s.return=i,W=s):pv(t)}}function pv(t){for(;W!==null;){var e=W;if(e.flags&8772){var n=e.alternate;try{if(e.flags&8772)switch(e.tag){case 0:case 11:case 15:_t||dc(5,e);break;case 1:var r=e.stateNode;if(e.flags&4&&!_t)if(n===null)r.componentDidMount();else{var i=e.elementType===e.type?n.memoizedProps:pn(e.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var s=e.updateQueue;s!==null&&Zy(e,s,r);break;case 3:var o=e.updateQueue;if(o!==null){if(n=null,e.child!==null)switch(e.child.tag){case 5:n=e.child.stateNode;break;case 1:n=e.child.stateNode}Zy(e,o,n)}break;case 5:var l=e.stateNode;if(n===null&&e.flags&4){n=l;var u=e.memoizedProps;switch(e.type){case"button":case"input":case"select":case"textarea":u.autoFocus&&n.focus();break;case"img":u.src&&(n.src=u.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(e.memoizedState===null){var c=e.alternate;if(c!==null){var f=c.memoizedState;if(f!==null){var d=f.dehydrated;d!==null&&Jo(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(B(163))}_t||e.flags&512&&Zf(e)}catch(p){Le(e,e.return,p)}}if(e===t){W=null;break}if(n=e.sibling,n!==null){n.return=e.return,W=n;break}W=e.return}}function mv(t){for(;W!==null;){var e=W;if(e===t){W=null;break}var n=e.sibling;if(n!==null){n.return=e.return,W=n;break}W=e.return}}function gv(t){for(;W!==null;){var e=W;try{switch(e.tag){case 0:case 11:case 15:var n=e.return;try{dc(4,e)}catch(u){Le(e,n,u)}break;case 1:var r=e.stateNode;if(typeof r.componentDidMount=="function"){var i=e.return;try{r.componentDidMount()}catch(u){Le(e,i,u)}}var s=e.return;try{Zf(e)}catch(u){Le(e,s,u)}break;case 5:var o=e.return;try{Zf(e)}catch(u){Le(e,o,u)}}}catch(u){Le(e,e.return,u)}if(e===t){W=null;break}var l=e.sibling;if(l!==null){l.return=e.return,W=l;break}W=e.return}}var nP=Math.ceil,Cu=nr.ReactCurrentDispatcher,bp=nr.ReactCurrentOwner,rn=nr.ReactCurrentBatchConfig,he=0,Ze=null,Ue=null,at=0,Ut=0,Xi=$r(0),Ke=0,ca=null,vi=0,pc=0,Np=0,Lo=null,Dt=null,Mp=0,_s=1/0,jn=null,Pu=!1,td=null,Sr=null,_l=!1,gr=null,Ru=0,Oo=0,nd=null,Hl=-1,Wl=0;function Ct(){return he&6?je():Hl!==-1?Hl:Hl=je()}function Ar(t){return t.mode&1?he&2&&at!==0?at&-at:jC.transition!==null?(Wl===0&&(Wl=J1()),Wl):(t=ve,t!==0||(t=window.event,t=t===void 0?16:ow(t.type)),t):1}function _n(t,e,n,r){if(50<Oo)throw Oo=0,nd=null,Error(B(185));Ra(t,n,r),(!(he&2)||t!==Ze)&&(t===Ze&&(!(he&2)&&(pc|=n),Ke===4&&pr(t,at)),Ot(t,r),n===1&&he===0&&!(e.mode&1)&&(_s=je()+500,cc&&Hr()))}function Ot(t,e){var n=t.callbackNode;jx(t,e);var r=fu(t,t===Ze?at:0);if(r===0)n!==null&&Iy(n),t.callbackNode=null,t.callbackPriority=0;else if(e=r&-r,t.callbackPriority!==e){if(n!=null&&Iy(n),e===1)t.tag===0?FC(yv.bind(null,t)):Iw(yv.bind(null,t)),NC(function(){!(he&6)&&Hr()}),n=null;else{switch(ew(r)){case 1:n=ap;break;case 4:n=X1;break;case 16:n=hu;break;case 536870912:n=Z1;break;default:n=hu}n=SE(n,gE.bind(null,t))}t.callbackPriority=e,t.callbackNode=n}}function gE(t,e){if(Hl=-1,Wl=0,he&6)throw Error(B(327));var n=t.callbackNode;if(us()&&t.callbackNode!==n)return null;var r=fu(t,t===Ze?at:0);if(r===0)return null;if(r&30||r&t.expiredLanes||e)e=ku(t,r);else{e=r;var i=he;he|=2;var s=vE();(Ze!==t||at!==e)&&(jn=null,_s=je()+500,ci(t,e));do try{sP();break}catch(l){yE(t,l)}while(!0);wp(),Cu.current=s,he=i,Ue!==null?e=0:(Ze=null,at=0,e=Ke)}if(e!==0){if(e===2&&(i=Rf(t),i!==0&&(r=i,e=rd(t,i))),e===1)throw n=ca,ci(t,0),pr(t,r),Ot(t,je()),n;if(e===6)pr(t,r);else{if(i=t.current.alternate,!(r&30)&&!rP(i)&&(e=ku(t,r),e===2&&(s=Rf(t),s!==0&&(r=s,e=rd(t,s))),e===1))throw n=ca,ci(t,0),pr(t,r),Ot(t,je()),n;switch(t.finishedWork=i,t.finishedLanes=r,e){case 0:case 1:throw Error(B(345));case 2:Jr(t,Dt,jn);break;case 3:if(pr(t,r),(r&130023424)===r&&(e=Mp+500-je(),10<e)){if(fu(t,0)!==0)break;if(i=t.suspendedLanes,(i&r)!==r){Ct(),t.pingedLanes|=t.suspendedLanes&i;break}t.timeoutHandle=Of(Jr.bind(null,t,Dt,jn),e);break}Jr(t,Dt,jn);break;case 4:if(pr(t,r),(r&4194240)===r)break;for(e=t.eventTimes,i=-1;0<r;){var o=31-vn(r);s=1<<o,o=e[o],o>i&&(i=o),r&=~s}if(r=i,r=je()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*nP(r/1960))-r,10<r){t.timeoutHandle=Of(Jr.bind(null,t,Dt,jn),r);break}Jr(t,Dt,jn);break;case 5:Jr(t,Dt,jn);break;default:throw Error(B(329))}}}return Ot(t,je()),t.callbackNode===n?gE.bind(null,t):null}function rd(t,e){var n=Lo;return t.current.memoizedState.isDehydrated&&(ci(t,e).flags|=256),t=ku(t,e),t!==2&&(e=Dt,Dt=n,e!==null&&id(e)),t}function id(t){Dt===null?Dt=t:Dt.push.apply(Dt,t)}function rP(t){for(var e=t;;){if(e.flags&16384){var n=e.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var i=n[r],s=i.getSnapshot;i=i.value;try{if(!En(s(),i))return!1}catch{return!1}}}if(n=e.child,e.subtreeFlags&16384&&n!==null)n.return=e,e=n;else{if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return!0;e=e.return}e.sibling.return=e.return,e=e.sibling}}return!0}function pr(t,e){for(e&=~Np,e&=~pc,t.suspendedLanes|=e,t.pingedLanes&=~e,t=t.expirationTimes;0<e;){var n=31-vn(e),r=1<<n;t[n]=-1,e&=~r}}function yv(t){if(he&6)throw Error(B(327));us();var e=fu(t,0);if(!(e&1))return Ot(t,je()),null;var n=ku(t,e);if(t.tag!==0&&n===2){var r=Rf(t);r!==0&&(e=r,n=rd(t,r))}if(n===1)throw n=ca,ci(t,0),pr(t,e),Ot(t,je()),n;if(n===6)throw Error(B(345));return t.finishedWork=t.current.alternate,t.finishedLanes=e,Jr(t,Dt,jn),Ot(t,je()),null}function Lp(t,e){var n=he;he|=1;try{return t(e)}finally{he=n,he===0&&(_s=je()+500,cc&&Hr())}}function _i(t){gr!==null&&gr.tag===0&&!(he&6)&&us();var e=he;he|=1;var n=rn.transition,r=ve;try{if(rn.transition=null,ve=1,t)return t()}finally{ve=r,rn.transition=n,he=e,!(he&6)&&Hr()}}function Op(){Ut=Xi.current,xe(Xi)}function ci(t,e){t.finishedWork=null,t.finishedLanes=0;var n=t.timeoutHandle;if(n!==-1&&(t.timeoutHandle=-1,bC(n)),Ue!==null)for(n=Ue.return;n!==null;){var r=n;switch(yp(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&yu();break;case 3:ys(),xe(Mt),xe(Tt),xp();break;case 5:Ip(r);break;case 4:ys();break;case 13:xe(Re);break;case 19:xe(Re);break;case 10:Ep(r.type._context);break;case 22:case 23:Op()}n=n.return}if(Ze=t,Ue=t=Ir(t.current,null),at=Ut=e,Ke=0,ca=null,Np=pc=vi=0,Dt=Lo=null,ii!==null){for(e=0;e<ii.length;e++)if(n=ii[e],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,s=n.pending;if(s!==null){var o=s.next;s.next=i,r.next=o}n.pending=r}ii=null}return t}function yE(t,e){do{var n=Ue;try{if(wp(),zl.current=xu,Iu){for(var r=Ve.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}Iu=!1}if(yi=0,Ye=We=Ve=null,No=!1,aa=0,bp.current=null,n===null||n.return===null){Ke=1,ca=e,Ue=null;break}e:{var s=t,o=n.return,l=n,u=e;if(e=at,l.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){var c=u,f=l,d=f.tag;if(!(f.mode&1)&&(d===0||d===11||d===15)){var p=f.alternate;p?(f.updateQueue=p.updateQueue,f.memoizedState=p.memoizedState,f.lanes=p.lanes):(f.updateQueue=null,f.memoizedState=null)}var y=iv(o);if(y!==null){y.flags&=-257,sv(y,o,l,s,e),y.mode&1&&rv(s,c,e),e=y,u=c;var S=e.updateQueue;if(S===null){var x=new Set;x.add(u),e.updateQueue=x}else S.add(u);break e}else{if(!(e&1)){rv(s,c,e),Fp();break e}u=Error(B(426))}}else if(Pe&&l.mode&1){var R=iv(o);if(R!==null){!(R.flags&65536)&&(R.flags|=256),sv(R,o,l,s,e),vp(vs(u,l));break e}}s=u=vs(u,l),Ke!==4&&(Ke=2),Lo===null?Lo=[s]:Lo.push(s),s=o;do{switch(s.tag){case 3:s.flags|=65536,e&=-e,s.lanes|=e;var w=eE(s,u,e);Xy(s,w);break e;case 1:l=u;var v=s.type,T=s.stateNode;if(!(s.flags&128)&&(typeof v.getDerivedStateFromError=="function"||T!==null&&typeof T.componentDidCatch=="function"&&(Sr===null||!Sr.has(T)))){s.flags|=65536,e&=-e,s.lanes|=e;var k=tE(s,l,e);Xy(s,k);break e}}s=s.return}while(s!==null)}wE(n)}catch(b){e=b,Ue===n&&n!==null&&(Ue=n=n.return);continue}break}while(!0)}function vE(){var t=Cu.current;return Cu.current=xu,t===null?xu:t}function Fp(){(Ke===0||Ke===3||Ke===2)&&(Ke=4),Ze===null||!(vi&268435455)&&!(pc&268435455)||pr(Ze,at)}function ku(t,e){var n=he;he|=2;var r=vE();(Ze!==t||at!==e)&&(jn=null,ci(t,e));do try{iP();break}catch(i){yE(t,i)}while(!0);if(wp(),he=n,Cu.current=r,Ue!==null)throw Error(B(261));return Ze=null,at=0,Ke}function iP(){for(;Ue!==null;)_E(Ue)}function sP(){for(;Ue!==null&&!kx();)_E(Ue)}function _E(t){var e=TE(t.alternate,t,Ut);t.memoizedProps=t.pendingProps,e===null?wE(t):Ue=e,bp.current=null}function wE(t){var e=t;do{var n=e.alternate;if(t=e.return,e.flags&32768){if(n=ZC(n,e),n!==null){n.flags&=32767,Ue=n;return}if(t!==null)t.flags|=32768,t.subtreeFlags=0,t.deletions=null;else{Ke=6,Ue=null;return}}else if(n=XC(n,e,Ut),n!==null){Ue=n;return}if(e=e.sibling,e!==null){Ue=e;return}Ue=e=t}while(e!==null);Ke===0&&(Ke=5)}function Jr(t,e,n){var r=ve,i=rn.transition;try{rn.transition=null,ve=1,oP(t,e,n,r)}finally{rn.transition=i,ve=r}return null}function oP(t,e,n,r){do us();while(gr!==null);if(he&6)throw Error(B(327));n=t.finishedWork;var i=t.finishedLanes;if(n===null)return null;if(t.finishedWork=null,t.finishedLanes=0,n===t.current)throw Error(B(177));t.callbackNode=null,t.callbackPriority=0;var s=n.lanes|n.childLanes;if(Bx(t,s),t===Ze&&(Ue=Ze=null,at=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||_l||(_l=!0,SE(hu,function(){return us(),null})),s=(n.flags&15990)!==0,n.subtreeFlags&15990||s){s=rn.transition,rn.transition=null;var o=ve;ve=1;var l=he;he|=4,bp.current=null,eP(t,n),pE(n,t),xC(Mf),du=!!Nf,Mf=Nf=null,t.current=n,tP(n),Vx(),he=l,ve=o,rn.transition=s}else t.current=n;if(_l&&(_l=!1,gr=t,Ru=i),s=t.pendingLanes,s===0&&(Sr=null),Nx(n.stateNode),Ot(t,je()),e!==null)for(r=t.onRecoverableError,n=0;n<e.length;n++)i=e[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(Pu)throw Pu=!1,t=td,td=null,t;return Ru&1&&t.tag!==0&&us(),s=t.pendingLanes,s&1?t===nd?Oo++:(Oo=0,nd=t):Oo=0,Hr(),null}function us(){if(gr!==null){var t=ew(Ru),e=rn.transition,n=ve;try{if(rn.transition=null,ve=16>t?16:t,gr===null)var r=!1;else{if(t=gr,gr=null,Ru=0,he&6)throw Error(B(331));var i=he;for(he|=4,W=t.current;W!==null;){var s=W,o=s.child;if(W.flags&16){var l=s.deletions;if(l!==null){for(var u=0;u<l.length;u++){var c=l[u];for(W=c;W!==null;){var f=W;switch(f.tag){case 0:case 11:case 15:Mo(8,f,s)}var d=f.child;if(d!==null)d.return=f,W=d;else for(;W!==null;){f=W;var p=f.sibling,y=f.return;if(hE(f),f===c){W=null;break}if(p!==null){p.return=y,W=p;break}W=y}}}var S=s.alternate;if(S!==null){var x=S.child;if(x!==null){S.child=null;do{var R=x.sibling;x.sibling=null,x=R}while(x!==null)}}W=s}}if(s.subtreeFlags&2064&&o!==null)o.return=s,W=o;else e:for(;W!==null;){if(s=W,s.flags&2048)switch(s.tag){case 0:case 11:case 15:Mo(9,s,s.return)}var w=s.sibling;if(w!==null){w.return=s.return,W=w;break e}W=s.return}}var v=t.current;for(W=v;W!==null;){o=W;var T=o.child;if(o.subtreeFlags&2064&&T!==null)T.return=o,W=T;else e:for(o=v;W!==null;){if(l=W,l.flags&2048)try{switch(l.tag){case 0:case 11:case 15:dc(9,l)}}catch(b){Le(l,l.return,b)}if(l===o){W=null;break e}var k=l.sibling;if(k!==null){k.return=l.return,W=k;break e}W=l.return}}if(he=i,Hr(),Rn&&typeof Rn.onPostCommitFiberRoot=="function")try{Rn.onPostCommitFiberRoot(sc,t)}catch{}r=!0}return r}finally{ve=n,rn.transition=e}}return!1}function vv(t,e,n){e=vs(n,e),e=eE(t,e,1),t=Tr(t,e,1),e=Ct(),t!==null&&(Ra(t,1,e),Ot(t,e))}function Le(t,e,n){if(t.tag===3)vv(t,t,n);else for(;e!==null;){if(e.tag===3){vv(e,t,n);break}else if(e.tag===1){var r=e.stateNode;if(typeof e.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Sr===null||!Sr.has(r))){t=vs(n,t),t=tE(e,t,1),e=Tr(e,t,1),t=Ct(),e!==null&&(Ra(e,1,t),Ot(e,t));break}}e=e.return}}function aP(t,e,n){var r=t.pingCache;r!==null&&r.delete(e),e=Ct(),t.pingedLanes|=t.suspendedLanes&n,Ze===t&&(at&n)===n&&(Ke===4||Ke===3&&(at&130023424)===at&&500>je()-Mp?ci(t,0):Np|=n),Ot(t,e)}function EE(t,e){e===0&&(t.mode&1?(e=ul,ul<<=1,!(ul&130023424)&&(ul=4194304)):e=1);var n=Ct();t=Yn(t,e),t!==null&&(Ra(t,e,n),Ot(t,n))}function lP(t){var e=t.memoizedState,n=0;e!==null&&(n=e.retryLane),EE(t,n)}function uP(t,e){var n=0;switch(t.tag){case 13:var r=t.stateNode,i=t.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=t.stateNode;break;default:throw Error(B(314))}r!==null&&r.delete(e),EE(t,n)}var TE;TE=function(t,e,n){if(t!==null)if(t.memoizedProps!==e.pendingProps||Mt.current)bt=!0;else{if(!(t.lanes&n)&&!(e.flags&128))return bt=!1,YC(t,e,n);bt=!!(t.flags&131072)}else bt=!1,Pe&&e.flags&1048576&&xw(e,wu,e.index);switch(e.lanes=0,e.tag){case 2:var r=e.type;$l(t,e),t=e.pendingProps;var i=ps(e,Tt.current);ls(e,n),i=Pp(null,e,r,t,i,n);var s=Rp();return e.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,Lt(r)?(s=!0,vu(e)):s=!1,e.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Sp(e),i.updater=fc,e.stateNode=i,i._reactInternals=e,Hf(e,r,t,n),e=Gf(null,e,r,!0,s,n)):(e.tag=0,Pe&&s&&gp(e),xt(null,e,i,n),e=e.child),e;case 16:r=e.elementType;e:{switch($l(t,e),t=e.pendingProps,i=r._init,r=i(r._payload),e.type=r,i=e.tag=hP(r),t=pn(r,t),i){case 0:e=Kf(null,e,r,t,n);break e;case 1:e=lv(null,e,r,t,n);break e;case 11:e=ov(null,e,r,t,n);break e;case 14:e=av(null,e,r,pn(r.type,t),n);break e}throw Error(B(306,r,""))}return e;case 0:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:pn(r,i),Kf(t,e,r,i,n);case 1:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:pn(r,i),lv(t,e,r,i,n);case 3:e:{if(sE(e),t===null)throw Error(B(387));r=e.pendingProps,s=e.memoizedState,i=s.element,Dw(t,e),Su(e,r,null,n);var o=e.memoizedState;if(r=o.element,s.isDehydrated)if(s={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},e.updateQueue.baseState=s,e.memoizedState=s,e.flags&256){i=vs(Error(B(423)),e),e=uv(t,e,r,n,i);break e}else if(r!==i){i=vs(Error(B(424)),e),e=uv(t,e,r,n,i);break e}else for($t=Er(e.stateNode.containerInfo.firstChild),Wt=e,Pe=!0,gn=null,n=kw(e,null,r,n),e.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(ms(),r===i){e=Xn(t,e,n);break e}xt(t,e,r,n)}e=e.child}return e;case 5:return bw(e),t===null&&zf(e),r=e.type,i=e.pendingProps,s=t!==null?t.memoizedProps:null,o=i.children,Lf(r,i)?o=null:s!==null&&Lf(r,s)&&(e.flags|=32),iE(t,e),xt(t,e,o,n),e.child;case 6:return t===null&&zf(e),null;case 13:return oE(t,e,n);case 4:return Ap(e,e.stateNode.containerInfo),r=e.pendingProps,t===null?e.child=gs(e,null,r,n):xt(t,e,r,n),e.child;case 11:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:pn(r,i),ov(t,e,r,i,n);case 7:return xt(t,e,e.pendingProps,n),e.child;case 8:return xt(t,e,e.pendingProps.children,n),e.child;case 12:return xt(t,e,e.pendingProps.children,n),e.child;case 10:e:{if(r=e.type._context,i=e.pendingProps,s=e.memoizedProps,o=i.value,Ee(Eu,r._currentValue),r._currentValue=o,s!==null)if(En(s.value,o)){if(s.children===i.children&&!Mt.current){e=Xn(t,e,n);break e}}else for(s=e.child,s!==null&&(s.return=e);s!==null;){var l=s.dependencies;if(l!==null){o=s.child;for(var u=l.firstContext;u!==null;){if(u.context===r){if(s.tag===1){u=Hn(-1,n&-n),u.tag=2;var c=s.updateQueue;if(c!==null){c=c.shared;var f=c.pending;f===null?u.next=u:(u.next=f.next,f.next=u),c.pending=u}}s.lanes|=n,u=s.alternate,u!==null&&(u.lanes|=n),Uf(s.return,n,e),l.lanes|=n;break}u=u.next}}else if(s.tag===10)o=s.type===e.type?null:s.child;else if(s.tag===18){if(o=s.return,o===null)throw Error(B(341));o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),Uf(o,n,e),o=s.sibling}else o=s.child;if(o!==null)o.return=s;else for(o=s;o!==null;){if(o===e){o=null;break}if(s=o.sibling,s!==null){s.return=o.return,o=s;break}o=o.return}s=o}xt(t,e,i.children,n),e=e.child}return e;case 9:return i=e.type,r=e.pendingProps.children,ls(e,n),i=on(i),r=r(i),e.flags|=1,xt(t,e,r,n),e.child;case 14:return r=e.type,i=pn(r,e.pendingProps),i=pn(r.type,i),av(t,e,r,i,n);
vendor: 4,252 bytes, line 40
40case 15:return nE(t,e,e.type,e.pendingProps,n);case 17:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:pn(r,i),$l(t,e),e.tag=1,Lt(r)?(t=!0,vu(e)):t=!1,ls(e,n),Jw(e,r,i),Hf(e,r,i,n),Gf(null,e,r,!0,t,n);case 19:return aE(t,e,n);case 22:return rE(t,e,n)}throw Error(B(156,e.tag))};function SE(t,e){return Y1(t,e)}function cP(t,e,n,r){this.tag=t,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function nn(t,e,n,r){return new cP(t,e,n,r)}function jp(t){return t=t.prototype,!(!t||!t.isReactComponent)}function hP(t){if(typeof t=="function")return jp(t)?1:0;if(t!=null){if(t=t.$$typeof,t===ip)return 11;if(t===sp)return 14}return 2}function Ir(t,e){var n=t.alternate;return n===null?(n=nn(t.tag,e,t.key,t.mode),n.elementType=t.elementType,n.type=t.type,n.stateNode=t.stateNode,n.alternate=t,t.alternate=n):(n.pendingProps=e,n.type=t.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=t.flags&14680064,n.childLanes=t.childLanes,n.lanes=t.lanes,n.child=t.child,n.memoizedProps=t.memoizedProps,n.memoizedState=t.memoizedState,n.updateQueue=t.updateQueue,e=t.dependencies,n.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},n.sibling=t.sibling,n.index=t.index,n.ref=t.ref,n}function Kl(t,e,n,r,i,s){var o=2;if(r=t,typeof t=="function")jp(t)&&(o=1);else if(typeof t=="string")o=5;else e:switch(t){case zi:return hi(n.children,i,s,e);case rp:o=8,i|=8;break;case pf:return t=nn(12,n,e,i|2),t.elementType=pf,t.lanes=s,t;case mf:return t=nn(13,n,e,i),t.elementType=mf,t.lanes=s,t;case gf:return t=nn(19,n,e,i),t.elementType=gf,t.lanes=s,t;case b1:return mc(n,i,s,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case V1:o=10;break e;case D1:o=9;break e;case ip:o=11;break e;case sp:o=14;break e;case hr:o=16,r=null;break e}throw Error(B(130,t==null?t:typeof t,""))}return e=nn(o,n,e,i),e.elementType=t,e.type=r,e.lanes=s,e}function hi(t,e,n,r){return t=nn(7,t,r,e),t.lanes=n,t}function mc(t,e,n,r){return t=nn(22,t,r,e),t.elementType=b1,t.lanes=n,t.stateNode={isHidden:!1},t}function Nh(t,e,n){return t=nn(6,t,null,e),t.lanes=n,t}function Mh(t,e,n){return e=nn(4,t.children!==null?t.children:[],t.key,e),e.lanes=n,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function fP(t,e,n,r,i){this.tag=e,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=mh(0),this.expirationTimes=mh(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=mh(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Bp(t,e,n,r,i,s,o,l,u){return t=new fP(t,e,n,l,u),e===1?(e=1,s===!0&&(e|=8)):e=0,s=nn(3,null,null,e),t.current=s,s.stateNode=t,s.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Sp(s),t}function dP(t,e,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Bi,key:r==null?null:""+r,children:t,containerInfo:e,implementation:n}}function AE(t){if(!t)return br;t=t._reactInternals;e:{if(Si(t)!==t||t.tag!==1)throw Error(B(170));var e=t;do{switch(e.tag){case 3:e=e.stateNode.context;break e;case 1:if(Lt(e.type)){e=e.stateNode.__reactInternalMemoizedMergedChildContext;break e}}e=e.return}while(e!==null);throw Error(B(171))}if(t.tag===1){var n=t.type;if(Lt(n))return Aw(t,n,e)}return e}function IE(t,e,n,r,i,s,o,l,u){return t=Bp(n,r,!0,t,i,s,o,l,u),t.context=AE(null),n=t.current,r=Ct(),i=Ar(n),s=Hn(r,i),s.callback=e??null,Tr(n,s,i),t.current.lanes=i,Ra(t,i,r),Ot(t,r),t}function gc(t,e,n,r){var i=e.current,s=Ct(),o=Ar(i);return n=AE(n),e.context===null?e.context=n:e.pendingContext=n,e=Hn(s,o),e.payload={element:t},r=r===void 0?null:r,r!==null&&(e.callback=r),t=Tr(i,e,o),t!==null&&(_n(t,i,o,s),Bl(t,
vendor: 7,271 bytes, line 40
40i,o)),o}function Vu(t){if(t=t.current,!t.child)return null;switch(t.child.tag){case 5:return t.child.stateNode;default:return t.child.stateNode}}function _v(t,e){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var n=t.retryLane;t.retryLane=n!==0&&n<e?n:e}}function zp(t,e){_v(t,e),(t=t.alternate)&&_v(t,e)}function pP(){return null}var xE=typeof reportError=="function"?reportError:function(t){console.error(t)};function Up(t){this._internalRoot=t}yc.prototype.render=Up.prototype.render=function(t){var e=this._internalRoot;if(e===null)throw Error(B(409));gc(t,e,null,null)};yc.prototype.unmount=Up.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var e=t.containerInfo;_i(function(){gc(null,t,null,null)}),e[Qn]=null}};function yc(t){this._internalRoot=t}yc.prototype.unstable_scheduleHydration=function(t){if(t){var e=rw();t={blockedOn:null,target:t,priority:e};for(var n=0;n<dr.length&&e!==0&&e<dr[n].priority;n++);dr.splice(n,0,t),n===0&&sw(t)}};function $p(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function vc(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11&&(t.nodeType!==8||t.nodeValue!==" react-mount-point-unstable "))}function wv(){}function mP(t,e,n,r,i){if(i){if(typeof r=="function"){var s=r;r=function(){var c=Vu(o);s.call(c)}}var o=IE(e,r,t,0,null,!1,!1,"",wv);return t._reactRootContainer=o,t[Qn]=o.current,na(t.nodeType===8?t.parentNode:t),_i(),o}for(;i=t.lastChild;)t.removeChild(i);if(typeof r=="function"){var l=r;r=function(){var c=Vu(u);l.call(c)}}var u=Bp(t,0,!1,null,null,!1,!1,"",wv);return t._reactRootContainer=u,t[Qn]=u.current,na(t.nodeType===8?t.parentNode:t),_i(function(){gc(e,u,n,r)}),u}function _c(t,e,n,r,i){var s=n._reactRootContainer;if(s){var o=s;if(typeof i=="function"){var l=i;i=function(){var u=Vu(o);l.call(u)}}gc(e,o,t,i)}else o=mP(n,e,t,i,r);return Vu(o)}tw=function(t){switch(t.tag){case 3:var e=t.stateNode;if(e.current.memoizedState.isDehydrated){var n=wo(e.pendingLanes);n!==0&&(lp(e,n|1),Ot(e,je()),!(he&6)&&(_s=je()+500,Hr()))}break;case 13:_i(function(){var r=Yn(t,1);if(r!==null){var i=Ct();_n(r,t,1,i)}}),zp(t,1)}};up=function(t){if(t.tag===13){var e=Yn(t,134217728);if(e!==null){var n=Ct();_n(e,t,134217728,n)}zp(t,134217728)}};nw=function(t){if(t.tag===13){var e=Ar(t),n=Yn(t,e);if(n!==null){var r=Ct();_n(n,t,e,r)}zp(t,e)}};rw=function(){return ve};iw=function(t,e){var n=ve;try{return ve=t,e()}finally{ve=n}};xf=function(t,e,n){switch(e){case"input":if(_f(t,n),e=n.name,n.type==="radio"&&e!=null){for(n=t;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+e)+'][type="radio"]'),e=0;e<n.length;e++){var r=n[e];if(r!==t&&r.form===t.form){var i=uc(r);if(!i)throw Error(B(90));M1(r),_f(r,i)}}}break;case"textarea":O1(t,n);break;case"select":e=n.value,e!=null&&is(t,!!n.multiple,e,!1)}};H1=Lp;W1=_i;var gP={usingClientEntryPoint:!1,Events:[Va,Wi,uc,U1,$1,Lp]},go={findFiberByHostInstance:ri,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},yP={bundleType:go.bundleType,version:go.version,rendererPackageName:go.rendererPackageName,rendererConfig:go.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:nr.ReactCurrentDispatcher,findHostInstanceByFiber:function(t){return t=q1(t),t===null?null:t.stateNode},findFiberByHostInstance:go.findFiberByHostInstance||pP,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var wl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!wl.isDisabled&&wl.supportsFiber)try{sc=wl.inject(yP),Rn=wl}catch{}}Qt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=gP;Qt.createPortal=function(t,e){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!$p(e))throw Error(B(200));return dP(t,e,null,n)};Qt.createRoot=function(t,e){if(!$p(t))throw Error(B(299));var n=!1,r="",i=xE;return e!=null&&(e.unstable_strictMode===!0&&(n=!0),e.identifierPrefix!==void 0&&(r=e.identifierPrefix),e.onRecoverableError!==void 0&&(i=e.onRecoverableError)),e=Bp(t,1,!1,null,null,n,!1,r,i),t[Qn]=e.current,na(t.nodeType===8?t.parentNode:t),new Up(e)};Qt.findDOMNode=function(t){if(t==null)return null;if(t.nodeType===1)return t;var e=t._reactInternals;if(e===void 0)throw typeof t.render=="function"?Error(B(188)):(t=Object.keys(t).join(","),Error(B(268,t)));return t=q1(e),t=t===null?null:t.stateNode,t};Qt.flushSync=function(t){return _i(t)};Qt.hydrate=function(t,e,n){if(!vc(e))throw Error(B(200));return _c(null,t,e,!0,n)};Qt.hydrateRoot=function(t,e,n){if(!$p(t))throw Error(B(405));var r=n!=null&&n.hydratedSources||null,i=!1,s="",o=xE;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),e=IE(e,null,t,1,n??null,i,!1,s,o),t[Qn]=e.current,na(t),r)for(t=0;t<r.length;t++)n=r[t],i=n._getVersion,i=i(n._source),e.mutableSourceEagerHydrationData==null?e.mutableSourceEagerHydrationData=[n,i]:e.mutableSourceEagerHydrationData.push(n,i);return new yc(e)};Qt.render=function(t,e,n){if(!vc(e))throw Error(B(200));return _c(null,t,e,!1,n)};Qt.unmountComponentAtNode=function(t){if(!vc(t))throw Error(B(40));return t._reactRootContainer?(_i(function(){_c(null,null,t,!1,function(){t._reactRootContainer=null,t[Qn]=null})}),!0):!1};Qt.unstable_batchedUpdates=Lp;Qt.unstable_renderSubtreeIntoContainer=function(t,e,n,r){if(!vc(n))throw Error(B(200));if(t==null||t._reactInternals===void 0)throw Error(B(38));return _c(t,e,n,!1,r)};Qt.version="18.3.1-next-f1338f8080-20240426";function CE(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(CE)}catch(t){console.error(t)}}CE(),C1.exports=Qt;var vP=C1.exports,Ev=vP;ff.createRoot=Ev.createRoot,ff.hydrateRoot=Ev.hydrateRoot;var PE={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},Tv=Ht.createContext&&Ht.createContext(PE),xr=function(){return xr=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},xr.apply(this,arguments)},_P=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function RE(t){return t&&t.map(function(e,n){return Ht.createElement(e.tag,xr({key:n},e.attr),RE(e.child))})}function wc(t){return function(e){return Ht.createElement(wP,xr({attr:xr({},t.attr)},e),RE(t.child))}}function wP(t){var e=function(n){var r=t.attr,i=t.size,s=t.title,o=_P(t,["attr","size","title"]),l=i||n.size||"1em",u;return n.className&&(u=n.className),t.className&&(u=(u?u+" ":"")+t.className),Ht.createElement("svg",xr({stroke:"currentColor",fill:"
40currentColor",strokeWidth:"0"},n.attr,r,o,{className:u,style:xr(xr({color:t.color||n.color},n.style),t.style),height:l,width:l,xmlns:"http://www.w3.org/2000/svg"}),s&&Ht.createElement("title",null,s),t.children)};return Tv!==void 0?Ht.createElement(Tv.Consumer,null,function(n){return e(n)}):e(PE)}function EP(t){return wc({attr:{viewBox:"0 0 496 512"},child:[{tag:"path",attr:{d:"M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"}}]})(t)}function TP(t){return wc({attr:{viewBox:"0 0 488 512"},child:[{tag:"path",attr:{d:"M488 261.8C488 403.3 391.1 504 248 504 110.8 504 0 393.2 0 256S110.8 8 248 8c66.8 0 123 24.5 166.3 64.9l-67.5 64.9C258.5 52.6 94.3 116.6 94.3 256c0 86.5 69.1 156.6 153.7 156.6 98.2 0 135-70.4 140.8-106.9H248v-85.3h236.1c2.3 12.7 3.9 24.9 3.9 41.4z"}}]})(t)}function SP(t){return wc({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M502.3 190.8c3.9-3.1 9.7-.2 9.7 4.7V400c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V195.6c0-5 5.7-7.8 9.7-4.7 22.4 17.4 52.1 39.5 154.1 113.6 21.1 15.4 56.7 47.8 92.2 47.6 35.7.3 72-32.8 92.3-47.6 102-74.1 131.6-96.3 154-113.7zM256 320c23.2.4 56.6-29.2 73.4-41.4 132.7-96.3 142.8-104.7 173.4-128.7 5.8-4.5 9.2-11.5 9.2-18.9v-19c0-26.5-21.5-48-48-48H48C21.5 64 0 85.5 0 112v19c0 7.4 3.4 14.3 9.2 18.9 30.6 23.9 40.7 32.4 173.4 128.7 16.8 12.2 50.2 41.8 73.4 41.4z"}}]})(t)}function AP(t){return wc({attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M622.34 153.2L343.4 67.5c-15.2-4.67-31.6-4.67-46.79 0L17.66 153.2c-23.54 7.23-23.54 38.36 0 45.59l48.63 14.94c-10.67 13.19-17.23 29.28-17.88 46.9C38.78 266.15 32 276.11 32 288c0 10.78 5.68 19.85 13.86 25.65L20.33 428.53C18.11 438.52 25.71 448 35.94 448h56.11c10.24 0 17.84-9.48 15.62-19.47L82.14 313.65C90.32 307.85 96 298.78 96 288c0-11.57-6.47-21.25-15.66-26.87.76-15.02 8.44-28.3 20.69-36.72L296.6 284.5c9.06 2.78 26.44 6.25 46.79 0l278.95-85.7c23.55-7.24 23.55-38.36 0-45.6zM352.79 315.09c-28.53 8.76-52.84 3.92-65.59 0l-145.02-44.55L128 384c0 35.35 85.96 64 192 64s192-28.65 192-64l-14.18-113.47-145.03 44.56z"}}]})(t)}var Nt=function(){return Nt=Object.assign||function(e){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e},Nt.apply(this,arguments)};function ha(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,s;r<i;r++)(s||!(r in e))&&(s||(s=Array.prototype.slice.call(e,0,r)),s[r]=e[r]);return t.concat(s||Array.prototype.slice.call(e))}var Ae="-ms-",Fo="-moz-",ge="-webkit-",kE="comm",Ec="rule",Hp="decl",IP="@import",VE="@keyframes",xP="@layer",DE=Math.abs,Wp=String.fromCharCode,sd=Object.assign;function CP(t,e){return Xe(t,0)^45?(((e<<2^Xe(t,0))<<2^Xe(t,1))<<2^Xe(t,2))<<2^Xe(t,3):0}function bE(t){return t.trim()}function Bn(t,e){return(t=e.exec(t))?t[0]:t}function ie(t,e,n){return t.replace(e,n)}function Gl(t,e,n){return t.indexOf(e,n)}function Xe(t,e){return t.charCodeAt(e)|0}function ws(t,e,n){return t.slice(e,n)}function Cn(t){return t.length}function NE(t){return t.length}function To(t,e){return e.push(t),t}function PP(t,e){return t.map(e).join("")}function Sv(t,e){return t.filter(function(n){return!Bn(n,e)})}var Tc=1,Es=1,ME=0,ln=0,ze=0,js="";function Sc(t,e,n,r,i,s,o,l){return{value:t,root:e,parent:n,type:r,props:i,children:s,line:Tc,column:Es,length:o,return:"",siblings:l}}function ur(t,e){return sd(Sc("",null,null,"",null,null,0,t.siblings),t,{length:-t.length},e)}function Ni(t){for(;t.root;)t=ur(t.root,{children:[t]});To(t,t.siblings)}function RP(){return ze}function kP(){return ze=ln>0?Xe(js,--ln):0,Es--,ze===10&&(Es=1,Tc--),ze}function wn(){return ze=ln<ME?Xe(js,ln++):0,Es++,ze===10&&(Es=1,Tc++),ze}function fi(){return Xe(js,ln)}function ql(){return ln}function Ac(t,e){return ws(js,t,e)}function od(t){switch(t){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function VP(t){return Tc=Es=1,ME=Cn(js=t),ln=0,[]}function DP(t){return js="",t}function Lh(t){return bE(Ac(ln-1,ad(t===91?t+2:t===40?t+1:t)))}function bP(t){for(;(ze=fi())&&ze<33;)wn();return od(t)>2||od(ze)>3?"":" "}function NP(t,e){for(;--e&&wn()&&!(ze<48||ze>102||ze>57&&ze<65||ze>70&&ze<97););return Ac(t,ql()+(e<6&&fi()==32&&wn()==32))}function ad(t){for(;wn();)switch(ze){case t:return ln;case 34:case 39:t!==34&&t!==39&&ad(ze);break;case 40:t===41&&ad(t);break;case 92:wn();break}return ln}function MP(t,e){for(;wn()&&t+ze!==57;)if(t+ze===84&&fi()===47)break;return"/*"+Ac(e,ln-1)+"*"+Wp(t===47?t:wn())}function LP(t){for(;!od(fi());)wn();return Ac(t,ln)}function OP(t){return DP(Ql("",null,null,null,[""],t=VP(t),0,[0],t))}function Ql(t,e,n,r,i,s,o,l,u){for(var c=0,f=0,d=o,p=0,y=0,S=0,x=1,R=1,w=1,v=0,T="",k=i,b=s,M=r,E=T;R;)switch(S=v,v=wn()){case 40:if(S!=108&&Xe(E,d-1)==58){Gl(E+=ie(Lh(v),"&","&\f"),"&\f",DE(c?l[c-1]:0))!=-1&&(w=-1);break}case 34:case 39:case 91:E+=Lh(v);break;case 9:case 10:case 13:case 32:E+=bP(S);break;
vendor: 9,173 bytes, lines 40-41
40case 92:E+=NP(ql()-1,7);continue;case 47:switch(fi()){case 42:case 47:To(FP(MP(wn(),ql()),e,n,u),u);break;default:E+="/"}break;case 123*x:l[c++]=Cn(E)*w;case 125*x:case 59:case 0:switch(v){case 0:case 125:R=0;case 59+f:w==-1&&(E=ie(E,/\f/g,"")),y>0&&Cn(E)-d&&To(y>32?Iv(E+";",r,n,d-1,u):Iv(ie(E," ","")+";",r,n,d-2,u),u);break;case 59:E+=";";default:if(To(M=Av(E,e,n,c,f,i,l,T,k=[],b=[],d,s),s),v===123)if(f===0)Ql(E,e,M,M,k,s,d,l,b);else switch(p===99&&Xe(E,3)===110?100:p){case 100:case 108:case 109:case 115:Ql(t,M,M,r&&To(Av(t,M,M,0,0,i,l,T,i,k=[],d,b),b),i,b,d,l,r?k:b);break;default:Ql(E,M,M,M,[""],b,0,l,b)}}c=f=y=0,x=w=1,T=E="",d=o;break;case 58:d=1+Cn(E),y=S;default:if(x<1){if(v==123)--x;else if(v==125&&x++==0&&kP()==125)continue}switch(E+=Wp(v),v*x){case 38:w=f>0?1:(E+="\f",-1);break;case 44:l[c++]=(Cn(E)-1)*w,w=1;break;case 64:fi()===45&&(E+=Lh(wn())),p=fi(),f=d=Cn(T=E+=LP(ql())),v++;break;case 45:S===45&&Cn(E)==2&&(x=0)}}return s}function Av(t,e,n,r,i,s,o,l,u,c,f,d){for(var p=i-1,y=i===0?s:[""],S=NE(y),x=0,R=0,w=0;x<r;++x)for(var v=0,T=ws(t,p+1,p=DE(R=o[x])),k=t;v<S;++v)(k=bE(R>0?y[v]+" "+T:ie(T,/&\f/g,y[v])))&&(u[w++]=k);return Sc(t,e,n,i===0?Ec:l,u,c,f,d)}function FP(t,e,n,r){return Sc(t,e,n,kE,Wp(RP()),ws(t,2,-2),0,r)}function Iv(t,e,n,r,i){return Sc(t,e,n,Hp,ws(t,0,r),ws(t,r+1,-1),r,i)}function LE(t,e,n){switch(CP(t,e)){case 5103:return ge+"print-"+t+t;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return ge+t+t;case 4789:return Fo+t+t;case 5349:case 4246:case 4810:case 6968:case 2756:return ge+t+Fo+t+Ae+t+t;case 5936:switch(Xe(t,e+11)){case 114:return ge+t+Ae+ie(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return ge+t+Ae+ie(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return ge+t+Ae+ie(t,/[svh]\w+-[tblr]{2}/,"lr")+t}case 6828:case 4268:case 2903:return ge+t+Ae+t+t;case 6165:return ge+t+Ae+"flex-"+t+t;case 5187:return ge+t+ie(t,/(\w+).+(:[^]+)/,ge+"box-$1$2"+Ae+"flex-$1$2")+t;case 5443:return ge+t+Ae+"flex-item-"+ie(t,/flex-|-self/g,"")+(Bn(t,/flex-|baseline/)?"":Ae+"grid-row-"+ie(t,/flex-|-self/g,""))+t;case 4675:return ge+t+Ae+"flex-line-pack"+ie(t,/align-content|flex-|-self/g,"")+t;case 5548:return ge+t+Ae+ie(t,"shrink","negative")+t;case 5292:return ge+t+Ae+ie(t,"basis","preferred-size")+t;case 6060:return ge+"box-"+ie(t,"-grow","")+ge+t+Ae+ie(t,"grow","positive")+t;case 4554:return ge+ie(t,/([^-])(transform)/g,"$1"+ge+"$2")+t;case 6187:return ie(ie(ie(t,/(zoom-|grab)/,ge+"$1"),/(image-set)/,ge+"$1"),t,"")+t;case 5495:case 3959:return ie(t,/(image-set\([^]*)/,ge+"$1$`$1");case 4968:return ie(ie(t,/(.+:)(flex-)?(.*)/,ge+"box-pack:$3"+Ae+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+ge+t+t;case 4200:if(!Bn(t,/flex-|baseline/))return Ae+"grid-column-align"+ws(t,e)+t;break;case 2592:case 3360:return Ae+ie(t,"template-","")+t;case 4384:case 3616:return n&&n.some(function(r,i){return e=i,Bn(r.props,/grid-\w+-end/)})?~Gl(t+(n=n[e].value),"span",0)?t:Ae+ie(t,"-start","")+t+Ae+"grid-row-span:"+(~Gl(n,"span",0)?Bn(n,/\d+/):+Bn(n,/\d+/)-+Bn(t,/\d+/))+";":Ae+ie(t,"-start","")+t;case 4896:case 4128:return n&&n.some(function(r){return Bn(r.props,/grid-\w+-start/)})?t:Ae+ie(ie(t,"-end","-span"),"span ","")+t;case 4095:case 3583:case 4068:case 2532:return ie(t,/(.+)-inline(.+)/,ge+"$1$2")+t;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Cn(t)-1-e>6)switch(Xe(t,e+1)){case 109:if(Xe(t,e+4)!==45)break;case 102:return ie(t,/(.+:)(.+)-([^]+)/,"$1"+ge+"$2-$3$1"+Fo+(Xe(t,e+3)==108?"$3":"$2-$3"))+t;case 115:return~Gl(t,"stretch",0)?LE(ie(t,"stretch","fill-available"),e,n)+t:t}break;case 5152:case 5920:return ie(t,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,function(r,i,s,o,l,u,c){return Ae+i+":"+s+c+(o?Ae+i+"-span:"+(l?u:+u-+s)+c:"")+t});case 4949:if(Xe(t,e+6)===121)return ie(t,":",":"+ge)+t;break;case 6444:switch(Xe(t,Xe(t,14)===45?18:11)){case 120:return ie(t,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+ge+(Xe(t,14)===45?"inline-":"")+"box$3$1"+ge+"$2$3$1"+Ae+"$2box$3")+t;case 100:return ie(t,":",":"+Ae)+t}break;case 5719:case 2647:case 2135:case 3927:case 2391:return ie(t,"scroll-","scroll-snap-")+t}return t}function Du(t,e){for(var n="",r=0;r<t.length;r++)n+=e(t[r],r,t,e)||"";return n}function jP(t,e,n,r){switch(t.type){case xP:if(t.children.length)break;case IP:case Hp:return t.return=t.return||t.value;case kE:return"";case VE:return t.return=t.value+"{"+Du(t.children,r)+"}";case Ec:if(!Cn(t.value=t.props.join(",")))return""}return Cn(n=Du(t.children,r))?t.return=t.value+"{"+n+"}":""}function BP(t){var e=NE(t);return function(n,r,i,s){for(var o="",l=0;l<e;l++)o+=t[l](n,r,i,s)||"";return o}}function zP(t){return function(e){e.root||(e=e.return)&&t(e)}}function UP(t,e,n,r){if(t.length>-1&&!t.return)switch(t.type){case Hp:t.return=LE(t.value,t.length,n);return;case VE:return Du([ur(t,{value:ie(t.value,"@","@"+ge)})],r);case Ec:if(t.length)return PP(n=t.props,function(i){switch(Bn(i,r=/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":Ni(ur(t,{props:[ie(i,/:(read-\w+)/,":"+Fo+"$1")]})),Ni(ur(t,{props:[i]})),sd(t,{props:Sv(n,r)});break;case"::placeholder":Ni(ur(t,{props:[ie(i,/:(plac\w+)/,":"+ge+"input-$1")]})),Ni(ur(t,{props:[ie(i,/:(plac\w+)/,":"+Fo+"$1")]})),Ni(ur(t,{props:[ie(i,/:(plac\w+)/,Ae+"input-$1")]})),Ni(ur(t,{props:[i]})),sd(t,{props:Sv(n,r)});break}return""})}}var $P={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},zt={},Ts=typeof process<"u"&&zt!==void 0&&(zt.REACT_APP_SC_ATTR||zt.SC_ATTR)||"data-styled",OE="active",FE="data-styled-version",Ic="6.1.19",Kp=`/*!sc*/
41`,bu=typeof window<"u"&&typeof document<"u",HP=!!(typeof SC_DISABLE_SPEEDY=="boolean"?SC_DISABLE_SPEEDY:typeof process<"u"&&zt!==void 0&&zt.REACT_APP_SC_DISABLE_SPEEDY!==void 0&&zt.REACT_APP_SC_DISABLE_SPEEDY!==""?zt.REACT_APP_SC_DISABLE_SPEEDY!=="false"&&zt.REACT_APP_SC_DISABLE_SPEEDY:typeof process<"u"&&zt!==void 0&&zt.SC_DISABLE_SPEEDY!==void 0&&zt.SC_DISABLE_SPEEDY!==""&&zt.SC_DISABLE_SPEEDY!=="false"&&zt.SC_DISABLE_SPEEDY),xc=Object.freeze([]),Ss=Object.freeze({});function WP(t,e,n){return n===void 0&&(n=Ss),t.theme!==n.theme&&t.theme||e||n.theme}var jE=new Set(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","track","u","ul","use","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]),KP=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,GP=/(^-|-$)/g;function xv(t){return t.replace(KP,"-").replace(GP,"")}var qP=/(a)(d)/gi,El=52,Cv=function(t){return String.fromCharCode(t+(t>25?39:97))};function ld(t){var e,n="";for(e=Math.abs(t);e>El;e=e/El|0)n=Cv(e%El)+n;return(Cv(e%El)+n).replace(qP,"$1-$2")}var Oh,BE=5381,Zi=function(t,e){for(var n=e.length;n;)t=33*t^e.charCodeAt(--n);return t},zE=function(t){return Zi(BE,t)};function UE(t){return ld(zE(t)>>>0)}function QP(t){return t.displayName||t.name||"Component"}function Fh(t){return typeof t=="string"&&!0}var $E=typeof Symbol=="function"&&Symbol.for,HE=$E?Symbol.for("react.memo"):60115,YP=$E?Symbol.for("react.forward_ref"):60112,XP={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},ZP={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},WE={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},JP=((Oh={})[YP]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Oh[HE]=WE,Oh);function Pv(t){return("type"in(e=t)&&e.type.$$typeof)===HE?WE:"$$typeof"in t?JP[t.$$typeof]:XP;var e}
vendor: 15,168 bytes, lines 41-92
41var e2=Object.defineProperty,t2=Object.getOwnPropertyNames,Rv=Object.getOwnPropertySymbols,n2=Object.getOwnPropertyDescriptor,r2=Object.getPrototypeOf,kv=Object.prototype;function KE(t,e,n){if(typeof e!="string"){if(kv){var r=r2(e);r&&r!==kv&&KE(t,r,n)}var i=t2(e);Rv&&(i=i.concat(Rv(e)));for(var s=Pv(t),o=Pv(e),l=0;l<i.length;++l){var u=i[l];if(!(u in ZP||n&&n[u]||o&&u in o||s&&u in s)){var c=n2(e,u);try{e2(t,u,c)}catch{}}}}return t}function As(t){return typeof t=="function"}function Gp(t){return typeof t=="object"&&"styledComponentId"in t}function oi(t,e){return t&&e?"".concat(t," ").concat(e):t||e||""}function ud(t,e){if(t.length===0)return"";for(var n=t[0],r=1;r<t.length;r++)n+=t[r];return n}function fa(t){return t!==null&&typeof t=="object"&&t.constructor.name===Object.name&&!("props"in t&&t.$$typeof)}function cd(t,e,n){if(n===void 0&&(n=!1),!n&&!fa(t)&&!Array.isArray(t))return e;if(Array.isArray(e))for(var r=0;r<e.length;r++)t[r]=cd(t[r],e[r]);else if(fa(e))for(var r in e)t[r]=cd(t[r],e[r]);return t}function qp(t,e){Object.defineProperty(t,"toString",{value:e})}function ba(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return new Error("An error occurred. See https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#".concat(t," for more information.").concat(e.length>0?" Args: ".concat(e.join(", ")):""))}var i2=function(){function t(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}return t.prototype.indexOfGroup=function(e){for(var n=0,r=0;r<e;r++)n+=this.groupSizes[r];return n},t.prototype.insertRules=function(e,n){if(e>=this.groupSizes.length){for(var r=this.groupSizes,i=r.length,s=i;e>=s;)if((s<<=1)<0)throw ba(16,"".concat(e));this.groupSizes=new Uint32Array(s),this.groupSizes.set(r),this.length=s;for(var o=i;o<s;o++)this.groupSizes[o]=0}for(var l=this.indexOfGroup(e+1),u=(o=0,n.length);o<u;o++)this.tag.insertRule(l,n[o])&&(this.groupSizes[e]++,l++)},t.prototype.clearGroup=function(e){if(e<this.length){var n=this.groupSizes[e],r=this.indexOfGroup(e),i=r+n;this.groupSizes[e]=0;for(var s=r;s<i;s++)this.tag.deleteRule(r)}},t.prototype.getGroup=function(e){var n="";if(e>=this.length||this.groupSizes[e]===0)return n;for(var r=this.groupSizes[e],i=this.indexOfGroup(e),s=i+r,o=i;o<s;o++)n+="".concat(this.tag.getRule(o)).concat(Kp);return n},t}(),Yl=new Map,Nu=new Map,Xl=1,Tl=function(t){if(Yl.has(t))return Yl.get(t);for(;Nu.has(Xl);)Xl++;var e=Xl++;return Yl.set(t,e),Nu.set(e,t),e},s2=function(t,e){Xl=e+1,Yl.set(t,e),Nu.set(e,t)},o2="style[".concat(Ts,"][").concat(FE,'="').concat(Ic,'"]'),a2=new RegExp("^".concat(Ts,'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')),l2=function(t,e,n){for(var r,i=n.split(","),s=0,o=i.length;s<o;s++)(r=i[s])&&t.registerName(e,r)},u2=function(t,e){for(var n,r=((n=e.textContent)!==null&&n!==void 0?n:"").split(Kp),i=[],s=0,o=r.length;s<o;s++){var l=r[s].trim();if(l){var u=l.match(a2);if(u){var c=0|parseInt(u[1],10),f=u[2];c!==0&&(s2(f,c),l2(t,f,u[3]),t.getTag().insertRules(c,i)),i.length=0}else i.push(l)}}},Vv=function(t){for(var e=document.querySelectorAll(o2),n=0,r=e.length;n<r;n++){var i=e[n];i&&i.getAttribute(Ts)!==OE&&(u2(t,i),i.parentNode&&i.parentNode.removeChild(i))}};function c2(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:null}var GE=function(t){var e=document.head,n=t||e,r=document.createElement("style"),i=function(l){var u=Array.from(l.querySelectorAll("style[".concat(Ts,"]")));return u[u.length-1]}(n),s=i!==void 0?i.nextSibling:null;r.setAttribute(Ts,OE),r.setAttribute(FE,Ic);var o=c2();return o&&r.setAttribute("nonce",o),n.insertBefore(r,s),r},h2=function(){function t(e){this.element=GE(e),this.element.appendChild(document.createTextNode("")),this.sheet=function(n){if(n.sheet)return n.sheet;for(var r=document.styleSheets,i=0,s=r.length;i<s;i++){var o=r[i];if(o.ownerNode===n)return o}throw ba(17)}(this.element),this.length=0}return t.prototype.insertRule=function(e,n){try{return this.sheet.insertRule(n,e),this.length++,!0}catch{return!1}},t.prototype.deleteRule=function(e){this.sheet.deleteRule(e),this.length--},t.prototype.getRule=function(e){var n=this.sheet.cssRules[e];return n&&n.cssText?n.cssText:""},t}(),f2=function(){function t(e){this.element=GE(e),this.nodes=this.element.childNodes,this.length=0}return t.prototype.insertRule=function(e,n){if(e<=this.length&&e>=0){var r=document.createTextNode(n);return this.element.insertBefore(r,this.nodes[e]||null),this.length++,!0}return!1},t.prototype.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--},t.prototype.getRule=function(e){return e<this.length?this.nodes[e].textContent:""},t}(),d2=function(){function t(e){this.rules=[],this.length=0}return t.prototype.insertRule=function(e,n){return e<=this.length&&(this.rules.splice(e,0,n),this.length++,!0)},t.prototype.deleteRule=function(e){this.rules.splice(e,1),this.length--},t.prototype.getRule=function(e){return e<this.length?this.rules[e]:""},t}(),Dv=bu,p2={isServer:!bu,useCSSOMInjection:!HP},qE=function(){function t(e,n,r){e===void 0&&(e=Ss),n===void 0&&(n={});var i=this;this.options=Nt(Nt({},p2),e),this.gs=n,this.names=new Map(r),this.server=!!e.isServer,!this.server&&bu&&Dv&&(Dv=!1,Vv(this)),qp(this,function(){return function(s){for(var o=s.getTag(),l=o.length,u="",c=function(d){var p=function(w){return Nu.get(w)}(d);if(p===void 0)return"continue";var y=s.names.get(p),S=o.getGroup(d);if(y===void 0||!y.size||S.length===0)return"continue";var x="".concat(Ts,".g").concat(d,'[id="').concat(p,'"]'),R="";y!==void 0&&y.forEach(function(w){w.length>0&&(R+="".concat(w,","))}),u+="".concat(S).concat(x,'{content:"').concat(R,'"}').concat(Kp)},f=0;f<l;f++)c(f);return u}(i)})}return t.registerId=function(e){return Tl(e)},t.prototype.rehydrate=function(){!this.server&&bu&&Vv(this)},t.prototype.reconstructWithOptions=function(e,n){return n===void 0&&(n=!0),new t(Nt(Nt({},this.options),e),this.gs,n&&this.names||void 0)},t.prototype.allocateGSInstance=function(e){return this.gs[e]=(this.gs[e]||0)+1},t.prototype.getTag=function(){return this.tag||(this.tag=(e=function(n){var r=n.useCSSOMInjection,i=n.target;return n.isServer?new d2(i):r?new h2(i):new f2(i)}(this.options),new i2(e)));var e},t.prototype.hasNameForId=function(e,n){return this.names.has(e)&&this.names.get(e).has(n)},t.prototype.registerName=function(e,n){if(Tl(e),this.names.has(e))this.names.get(e).add(n);else{var r=new Set;r.add(n),this.names.set(e,r)}},t.prototype.insertRules=function(e,n,r){this.registerName(e,n),this.getTag().insertRules(Tl(e),r)},t.prototype.clearNames=function(e){this.names.has(e)&&this.names.get(e).clear()},t.prototype.clearRules=function(e){this.getTag().clearGroup(Tl(e)),this.clearNames(e)},t.prototype.clearTag=function(){this.tag=void 0},t}(),m2=/&/g,g2=/^\s*\/\/.*$/gm;function QE(t,e){return t.map(function(n){return n.type==="rule"&&(n.value="".concat(e," ").concat(n.value),n.value=n.value.replaceAll(",",",".concat(e," ")),n.props=n.props.map(function(r){return"".concat(e," ").concat(r)})),Array.isArray(n.children)&&n.type!=="@keyframes"&&(n.children=QE(n.children,e)),n})}function y2(t){var e,n,r,i=Ss,s=i.options,o=s===void 0?Ss:s,l=i.plugins,u=l===void 0?xc:l,c=function(p,y,S){return S.startsWith(n)&&S.endsWith(n)&&S.replaceAll(n,"").length>0?".".concat(e):p},f=u.slice();f.push(function(p){p.type===Ec&&p.value.includes("&")&&(p.props[0]=p.props[0].replace(m2,n).replace(r,c))}),o.prefix&&f.push(UP),f.push(jP);var d=function(p,y,S,x){y===void 0&&(y=""),S===void 0&&(S=""),x===void 0&&(x="&"),e=x,n=y,r=new RegExp("\\".concat(n,"\\b"),"g");var R=p.replace(g2,""),w=OP(S||y?"".concat(S," ").concat(y," { ").concat(R," }"):R);o.namespace&&(w=QE(w,o.namespace));var v=[];return Du(w,BP(f.concat(zP(function(T){return v.push(T)})))),v};return d.hash=u.length?u.reduce(function(p,y){return y.name||ba(15),Zi(p,y.name)},BE).toString():"",d}var v2=new qE,hd=y2(),YE=Ht.createContext({shouldForwardProp:void 0,styleSheet:v2,stylis:hd});YE.Consumer;Ht.createContext(void 0);function bv(){return j.useContext(YE)}var XE=function(){function t(e,n){var r=this;this.inject=function(i,s){s===void 0&&(s=hd);var o=r.name+s.hash;i.hasNameForId(r.id,o)||i.insertRules(r.id,o,s(r.rules,o,"@keyframes"))},this.name=e,this.id="sc-keyframes-".concat(e),this.rules=n,qp(this,function(){throw ba(12,String(r.name))})}return t.prototype.getName=function(e){return e===void 0&&(e=hd),this.name+e.hash},t}(),_2=function(t){return t>="A"&&t<="Z"};function Nv(t){for(var e="",n=0;n<t.length;n++){var r=t[n];if(n===1&&r==="-"&&t[0]==="-")return t;_2(r)?e+="-"+r.toLowerCase():e+=r}return e.startsWith("ms-")?"-"+e:e}var ZE=function(t){return t==null||t===!1||t===""},JE=function(t){var e,n,r=[];for(var i in t){var s=t[i];t.hasOwnProperty(i)&&!ZE(s)&&(Array.isArray(s)&&s.isCss||As(s)?r.push("".concat(Nv(i),":"),s,";"):fa(s)?r.push.apply(r,ha(ha(["".concat(i," {")],JE(s),!1),["}"],!1)):r.push("".concat(Nv(i),": ").concat((e=i,(n=s)==null||typeof n=="boolean"||n===""?"":typeof n!="number"||n===0||e in $P||e.startsWith("--")?String(n).trim():"".concat(n,"px")),";")))}return r};function di(t,e,n,r){if(ZE(t))return[];if(Gp(t))return[".".concat(t.styledComponentId)];if(As(t)){if(!As(s=t)||s.prototype&&s.prototype.isReactComponent||!e)return[t];var i=t(e);return di(i,e,n,r)}var s;return t instanceof XE?n?(t.inject(n,r),[t.getName(r)]):[t]:fa(t)?JE(t):Array.isArray(t)?Array.prototype.concat.apply(xc,t.map(function(o){return di(o,e,n,r)})):[t.toString()]}function w2(t){for(var e=0;e<t.length;e+=1){var n=t[e];if(As(n)&&!Gp(n))return!1}return!0}var E2=zE(Ic),T2=function(){function t(e,n,r){this.rules=e,this.staticRulesId="",this.isStatic=(r===void 0||r.isStatic)&&w2(e),this.componentId=n,this.baseHash=Zi(E2,n),this.baseStyle=r,qE.registerId(n)}return t.prototype.generateAndInjectStyles=function(e,n,r){var i=this.baseStyle?this.baseStyle.generateAndInjectStyles(e,n,r):"";if(this.isStatic&&!r.hash)if(this.staticRulesId&&n.hasNameForId(this.componentId,this.staticRulesId))i=oi(i,this.staticRulesId);else{var s=ud(di(this.rules,e,n,r)),o=ld(Zi(this.baseHash,s)>>>0);if(!n.hasNameForId(this.componentId,o)){var l=r(s,".".concat(o),void 0,this.componentId);n.insertRules(this.componentId,o,l)}i=oi(i,o),this.staticRulesId=o}else{for(var u=Zi(this.baseHash,r.hash),c="",f=0;f<this.rules.length;f++){var d=this.rules[f];if(typeof d=="string")c+=d;else if(d){var p=ud(di(d,e,n,r));u=Zi(u,p+f),c+=p}}if(c){var y=ld(u>>>0);n.hasNameForId(this.componentId,y)||n.insertRules(this.componentId,y,r(c,".".concat(y),void 0,this.componentId)),i=oi(i,y)}}return i},t}(),eT=Ht.createContext(void 0);eT.Consumer;var jh={};function S2(t,e,n){var r=Gp(t),i=t,s=!Fh(t),o=e.attrs,l=o===void 0?xc:o,u=e.componentId,c=u===void 0?function(k,b){var M=typeof k!="string"?"sc":xv(k);jh[M]=(jh[M]||0)+1;var E="".concat(M,"-").concat(UE(Ic+M+jh[M]));return b?"".concat(b,"-").concat(E):E}(e.displayName,e.parentComponentId):u,f=e.displayName,d=f===void 0?function(k){return Fh(k)?"styled.".concat(k):"Styled(".concat(QP(k),")")}(t):f,p=e.displayName&&e.componentId?"".concat(xv(e.displayName),"-").concat(e.componentId):e.componentId||c,y=r&&i.attrs?i.attrs.concat(l).filter(Boolean):l,S=e.shouldForwardProp;if(r&&i.shouldForwardProp){var x=i.shouldForwardProp;if(e.shouldForwardProp){var R=e.shouldForwardProp;S=function(k,b){return x(k,b)&&R(k,b)}}else S=x}var w=new T2(n,p,r?i.componentStyle:void 0);function v(k,b){return function(M,E,g){var A=M.attrs,I=M.componentStyle,P=M.defaultProps,V=M.foldedComponentIds,C=M.styledComponentId,He=M.target,Ft=Ht.useContext(eT),un=bv(),de=M.shouldForwardProp||un.shouldForwardProp,U=WP(E,Ft,P)||Ss,G=function(ct,Je,et){for(var Ln,cn=Nt(Nt({},Je),{className:void 0,theme:et}),Sn=0;Sn<ct.length;Sn+=1){var jt=As(Ln=ct[Sn])?Ln(cn):Ln;for(var kt in jt)cn[kt]=kt==="className"?oi(cn[kt],jt[kt]):kt==="style"?Nt(Nt({},cn[kt]),jt[kt]):jt[kt]}return Je.className&&(cn.className=oi(cn.className,Je.className)),cn}(A,E,U),X=G.as||He,pe={};for(var oe in G)G[oe]===void 0||oe[0]==="$"||oe==="as"||oe==="theme"&&G.theme===U||(oe==="forwardedAs"?pe.as=G.forwardedAs:de&&!de(oe,X)||(pe[oe]=G[oe]));var we=function(ct,Je){var et=bv(),Ln=ct.generateAndInjectStyles(Je,et.styleSheet,et.stylis);return Ln}(I,G),St=oi(V,C);return we&&(St+=" "+we),G.className&&(St+=" "+G.className),pe[Fh(X)&&!jE.has(X)?"class":"className"]=St,g&&(pe.ref=g),j.createElement(X,pe)}(T,k,b)}v.displayName=d;var T=Ht.forwardRef(v);return T.attrs=y,T.componentStyle=w,T.displayName=d,T.shouldForwardProp=S,T.foldedComponentIds=r?oi(i.foldedComponentIds,i.styledComponentId):"",T.styledComponentId=p,T.target=r?i.target:t,Object.defineProperty(T,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(k){this._foldedDefaultProps=r?function(b){for(var M=[],E=1;E<arguments.length;E++)M[E-1]=arguments[E];for(var g=0,A=M;g<A.length;g++)cd(b,A[g],!0);return b}({},i.defaultProps,k):k}}),qp(T,function(){return".".concat(T.styledComponentId)}),s&&KE(T,t,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0}),T}function Mv(t,e){for(var n=[t[0]],r=0,i=e.length;r<i;r+=1)n.push(e[r],t[r+1]);return n}var Lv=function(t){return Object.assign(t,{isCss:!0})};function tT(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(As(t)||fa(t))return Lv(di(Mv(xc,ha([t],e,!0))));var r=t;return e.length===0&&r.length===1&&typeof r[0]=="string"?di(r):Lv(di(Mv(r,e)))}function fd(t,e,n){if(n===void 0&&(n=Ss),!e)throw ba(1,e);var r=function(i){for(var s=[],o=1;o<arguments.length;o++)s[o-1]=arguments[o];return t(e,n,tT.apply(void 0,ha([i],s,!1)))};return r.attrs=function(i){return fd(t,e,Nt(Nt({},n),{attrs:Array.prototype.concat(n.attrs,i).filter(Boolean)}))},r.withConfig=function(i){return fd(t,e,Nt(Nt({},n),i))},r}var nT=function(t){return fd(S2,t)},Y=nT;jE.forEach(function(t){Y[t]=nT(t)});function A2(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];var r=ud(tT.apply(void 0,ha([t],e,!1))),i=UE(r);return new XE(i,r)}const I2={github:N.jsx(EP,{}),scholar:N.jsx(AP,{}),email:N.jsx(SP,{})},x2=Y.aside`
42  width: var(--sidebar-width);
43  min-height: calc(100vh - 76px);
44  display: flex;
45  flex-direction: column;
46  align-items: center;
47  padding: 32px 0 0 0;
48  margin-left: 0;
49  background: none;
50  border: none;
51`,C2=Y.img`
52  width: 240px;
53  height: 240px;
54  /* border-radius: 50%; */
55  object-fit: cover;
56  margin-bottom: 10px;
57  border: 0px solid var(--primary);
58`,P2=Y.h2`
59  margin: 0 0 8px 0;
60  font-size: 1.7rem;
61  font-weight: 700;
62`,R2=Y.div`
63  color: var(--primary);
64  font-size: 1.1rem;
65  margin-bottom: 8px;
66`,k2=Y.div`
67  color: #222;
68  font-size: 1rem;
69  margin-bottom: 0px;
70  text-align: center;
71`,V2=Y.div`
72  margin: 18px 0 0 0;
73  padding: 0 0 12px 0;
74  display: flex;
75  gap: 18px;
76`,D2=Y.div`
77  width: 90%;
78  margin-top: 0px;
79`,b2=Y.div`
80  color: var(--primary);
81  font-weight: 700;
82  margin-bottom: 8px;
83  font-size: 1.4rem;
84`,N2=Y.ul`
85  list-style: none;
86  padding: 0;
87  margin: 0;
88  max-height: 400px;
89  overflow-y: auto;
90  scrollbar-width: thin;
91  scrollbar-color: #3674B5 #e0e7ef; /* Firefox */
92  &::-webkit-scrollbar {
93    width: 8px;
94    background: #e0e7ef;
95  }
96  &::-webkit-scrollbar-thumb {
97    background: #3674B5;
98    border-radius: 4px;
99  }
100  &::-webkit-scrollbar-thumb:hover {
101    background: #3674B5;
102  }
103`,M2=Y.li`
104  font-size: 0.98rem;
105  color: var(--text);
106  margin-bottom: 6px;
107  border-left: 3px solid var(--primary);
108  padding-left: 8px;
109  line-height: 1.7;
110`,L2=Y.span`
111  color: #000;
112  font-size: 0.92rem;
113  margin-right: 6px;
114  font-weight: bold;
115`;function O2(t){if(!t)return null;let e=t.replace(/\*\*([^*]+)\*\*/g,"<b>$1</b>");return e=e.replace(/\[([^\]]+)\]\(([^\)]+)\)/g,'<a href="$2" target="_blank" rel="noopener noreferrer" style="color:#2563eb;text-decoration:underline;">$1</a>'),e}function F2({config:t}){return N.jsxs(x2,{children:[N.jsx(C2,{src:t.avatar,alt:"avatar"}),N.jsx(P2,{children:t.name}),N.jsx(R2,{children:t.title}),N.jsx(k2,{children:"The Hong Kong University of Science and Technology"}),N.jsx(V2,{children:t.social.map(e=>N.jsx("a",{href:e.type==="email"?`mailto:${t.email}`:e.url,target:"_blank",rel:"noopener noreferrer",style:{color:"var(--text)",fontSize:22},children:I2[e.type]||N.jsx(TP,{})},e.type))}),N.jsxs(D2,{children:[N.jsx(b2,{children:"News"}),N.jsx(N2,{children:t.news.map((e,n)=>N.jsxs(M2,{children:[N.jsx(L2,{children:e.date}),N.jsx("span",{dangerouslySetInnerHTML:{__html:O2(e.content)}})]},n))})]})]})}const ai={name:"Kangyu YUAN",name_cn:"袁康宇",title:"Ph.D. Candidate",avatar:"/materials/avatar.jpg",bio:`I am currently a Ph.D. candidate at the Hong Kong University of Science and Technology (HKUST), supervised by [Prof. Xiaojuan Ma](https://cse.hkust.edu.hk/~mxj/) since 2024. 
116  Before that, I studied and got the degree of B.E. in department of [Artificial Intelligence](https://sai.sysu.edu.cn/) at Sun Yat-sen University from 2020 to 2024, where I received research training from [Prof. Zhenhui Peng](https://zhenhuipeng.com/). 
117  My current research interests include **Social Computing** and **Mental Health**. I am committed to sustainable and friendly digital environment building through:`,bioList:["(1) Analyzing user interaction patterns & evolvement in digital environment ==(Factors Identification)==","(2) Exploring the potential interventions strategies in a user-center perspective ==(Design Exploration)==.","(3) Introducing social-technical systems to mitigate online harmful behaviors ==(System Application)==."],bioAfterList:"I am currently looking for collaborators on online community sustainability and friendliness. If you are interested in my research topics, please feel free to contact me.",location:"Hong Kong, China",email:"[email protected]",social:[{type:"github",url:"https://github.com/Yuanky123"},{type:"scholar",url:"https://scholar.google.com.hk/citations?user=1EJefeAAAAAJ&hl=it"},{type:"email",url:"[email protected]"},{type:"orcid",url:"https://orcid.org/0009-0001-8460-9651"}],topNav:[{label:"Publications",url:"#"},{label:"Life",url:"#"}],education:[{department:"Department of Computer Science and Engineering",school:"The Hong Kong University of Science and Technology",degree:"Ph.D. Candidate",time:"2024 - Present"},{department:"Department of Artificial Intelligence",school:"Sun Yat-sen University",degree:"Bachelor of Engineering (B.E.)",time:"2020 - 2024"}],experience:[{company:"@[HCI Initiative](https://hci.cse.ust.hk/people.html), HKUST, mentored by [Chengbo Zheng ](https://www.cbzheng.link/) in [Prof. Xiaojuan Ma](https://cse.hkust.edu.hk/~mxj/)'s lab",title:"Research intern",time:"2023.06 - 2023.09"},{company:"@HaiA Lab, SYSU, supervised by [Prof. Zhenhui Peng](https://zhenhuipeng.com/)",title:"Research training",time:"2022.11 - 2024.06"}],research:["Research Interest 1","Research Interest 2","Research Interest 3"],news:[{date:"Apr. 2026",content:"Attend the CHI 2026 in Barcelona, Spain. Glad to present our work!"},{date:"Mar. 2026",content:"Pass the PhD Qualification Exam. Thanks to all!"},{date:"Mar. 2026",content:"One **@CHI 2026** first author LBW work accepted. Thanks to all collaborators!"},{date:"Mar. 2026",content:"One **@CHI 2026** first author paper and Two **@CHI 2026** co-author papers accepted. Congrats and thanks to all!"},{date:"Mar. 2026",content:"One **@Group** co-author paper accepted. Congrats and thanks to all!"},{date:"Jun. 2025",content:"One **@CSCW 2025** co-author paper accepted. Congrats and thanks to all!"},{date:"Apr. 2025",content:"Attend the CHI 2025 in Yokohama, Japan. Glad to present our poster!"},{date:"Mar. 2025",content:"One **@CSCW 2025** co-author paper accepted. Congrats and Thanks to all!"}
117,{date:"Feb. 2025",content:"One **@CHI 2025** LBW work accepted. Thanks to all collaborators!"},{date:"Sep. 2024",content:"Join HKUST as a Ph.D. student supervised by Prof. Xiaojuan Ma! Looking forward to the new journey!"},{date:"Jun. 2024",content:"Graduate from SYSU with a B.E. in Artificial Intelligence. Thanks to all people I met and worked with!"},{date:"Feb. 2024",content:"One **@CHI 2024** co-author LBW work accepted. Thanks to all!"},{date:"Jan. 2024",content:"One **@CHI 2024** co-author paper accepted. Congrats and Thanks to all!"},{date:"Jun. 2023",content:"One **@UIST 2023** co-first author paper accepted. Thanks to all my collaborators!"}],papers:[{title:`[CHI 2026] "Exploring Aggressors' In-Match Cognitive and Emotional Formation and Toxic Behavior Trajectories in MOBA Games`,authors:"==Kangyu YUAN==, Hanfang Lyu, Runhua Zhang, Hansika Murugu, Xiaojuan Ma",venue:"CHI",year:"2026",link:"/materials/Papers/chi26-10.pdf"},{title:'[CHI EA 2026] "AI Clone Companions and “Dream Girl” Fans: How Idol-Based Agents Reshape Parasocial Relationships Across Real and Virtual Domains',authors:"==Kangyu YUAN==, Tak Kwan Wang, Jiachen Du, Yuanhao Zhang, Ziqi Pan, Xiaojuan Ma",venue:"CHI EA",year:"2026",link:"/materials/Papers/chiea26-293.pdf"},{title:'[CHI EA 2025] "I Love the Internet Again": Exploring the Interaction Inception of "TikTok Refugees" Flocking into RedNote',authors:"==Kangyu YUAN==, Li Zhang, Hanfang Lyu, Ziqi Pan, Yuanhao Zhang, Junze Li, Bingcan Guo, Jiaxiong Hu, Qingyu Guo, Xiaojuan Ma",venue:"CHI EA",year:"2025",link:"https://dl.acm.org/doi/full/10.1145/3706599.3719738"},{title:"[CHI EA 2024] Exploring the Evolvement of Artwork Descriptions in Online Creative Community under the Surge of Generative AI: A Case Study of DeviantArt",authors:"Qingyu Guo, ==Kangyu YUAN==, Changyang He, Zhenhui Peng, Xiaojuan Ma",venue:"CHI EA",year:"2024",link:"https://dl.acm.org/doi/full/10.1145/3613905.3650851"},{title:"[CHI 2024] Charting the Future of AI in Project-Based Learning: A Co-Design Exploration with Students",authors:"Chengbo Zheng, ==Kangyu YUAN==, Bingcan Guo, Reza Hadi Mogavi, Zhenhui Peng, Shuai Ma, Xiaojuan Ma",venue:"CHI",year:"2024",link:"https://dl.acm.org/doi/full/10.1145/3613904.3642807"},{title:"[UIST 2023] CriTrainer: An Adaptive Training Tool for Critical Paper Reading",authors:"==Kangyu YUAN==, **Hehai Lin**, **Shilei Cao**, Zhenhui Peng, Qingyu Guo, Xiaojuan Ma",venue:"UIST",year:"2023, co-first author",link:"https://dl.acm.org/doi/abs/10.1145/3586183.3606816"}],projects:[{name:"Project Name",desc:"Project Description",link:"#"}]},j2=Y.header`
118  width: 100%;
119  height: 76px;
120  background: var(--primary);
121  display: flex;
122  align-items: flex-end;
123  justify-content: center;
124  position: fixed;
125  top: 0;
126  left: 0;
127  z-index: 100;
128  border-bottom: 1.5px solid var(--primary-light);
129`,B2=Y.div`
130  width: 100%;
131  max-width: 1200px;
132  display: flex;
133  align-items: flex-end;
134  justify-content: space-between;
135  padding: 32px 48px 0 48px;
136  box-sizing: border-box;
137`,z2=Y.div`
138  display: flex;
139  flex-direction: column;
140  align-items: center;
141`,U2=Y.h1`
142  font-size: 2.1rem;
143  font-weight: 600;
144  margin: 0;
145  color: #fff;
146`,$2=Y.span`
147  font-size: 1.1rem;
148  color: #fff;
149  margin-top: 2px;
150`,H2=Y.nav`
151  display: flex;
152  gap: 36px;
153  align-items: center;
154`,W2=Y.button`
155  background: none;
156  border: none;
157  color: ${({active:t})=>t?"#fff":"#c7e3fa"};
158  font-size: 1.25rem;
159  font-weight: 500;
160  text-decoration: none;
161  cursor: pointer;
162  transition: color var(--transition);
163  outline: none;
164  &:hover {
165    color: #fff;
166    text-decoration: underline;
167  }
168`;function K2({theme:t,setTheme:e,current:n,activeSection:r,onChange:i}){const s=[{label:"Home",key:"home"},...ai.topNav.map((l,u)=>({...l,key:l.label.toLowerCase()}))],o=l=>{i(l)};return N.jsx(j2,{children:N.jsxs(B2,{children:[N.jsxs(z2,{children:[N.jsx(U2,{children:ai.name}),ai.name_cn&&N.jsx($2,{children:ai.name_cn})]}),N.jsx(H2,{children:s.map(l=>{const u=n==="home"?l.key==="publications"?r==="publications":r==="home"&&l.key==="home":n===l.key;return N.jsx(W2,{active:u,onClick:()=>o(l.key),children:l.label},l.key)})})]})})}const G2=Y.h3`
169  margin-top: 32px;
170  color: #3674B5;
171  font-size: 1.25rem;
172`,Bh=Y.h3`
173  margin-top: 20px;
174  color: var(--primary);
175  font-size: 1.25rem;
176  margin-bottom: 12px;
177`,Ov=Y.ul`
178  margin: 8px 0 0 0;
179  padding-left: 20px;
180`,q2=Y.div`
181  display: flex;
182  flex-direction: column;
183  gap: 20px;
184  margin-top: 12px;
185`,Q2=Y.div`
186  background: var(--card-bg);
187  border-radius: 5px;
188  box-shadow: 0 10px 12px rgba(54,116,181,0.10);
189  border: 0px solid var(--border);
190  display: flex;
191  flex-direction: row;
192  gap: 22px;
193  padding: 15px 24px 15px 18px;
194  align-items: flex-start;
195  min-height: 120px;
196`,Y2=Y.img`
197  width: 140px;
198  height: 105px;
199  object-fit: cover;
200  border-radius: 8px;
201  background: #eee;
202  flex-shrink: 0;
203`,X2=Y.div`
204  flex: 1;
205  min-width: 0;
206  display: flex;
207  flex-direction: column;
208  justify-content: center;
209`,Z2=Y.a`
210  font-size: 1.08rem;
211  font-weight: bold;
212  color: var(--title);
213  text-decoration: none;
214  &:hover { text-decoration: underline; }
215  display: block;
216`,J2=Y.div`
217  color: #444;
218  font-size: 0.98rem;
219  margin: 4px 0 2px 0;
220`,eR=Y.div`
221  color: #888;
222  font-size: 0.95rem;
223`,tR=Y.div`
224  color: #333;
225  font-size: 0.97rem;
226  margin-top: 4px;
227`;function zh(t){if(!t)return null;let e=t.replace(/\[([^\]]+)\]\(([^\)]+)\)/g,'<a href="$2" target="_blank" rel="noopener noreferrer" style="color:#3674B5;text-decoration:underline;">$1</a>');return e=e.replace(/\*\*([^*]+)\*\*/g,"<b>$1</b>"),e=e.replace(/==([^=]+)==/g,'<span style="color:#3674B5;font-weight:bold;">$1</span>'),e}function nR(t){if(!t)return null;let e=t.replace(/\[([^\]]+)\]\(([^\)]+)\)/g,'<a href="$2" target="_blank" rel="noopener noreferrer" style="color:#3674B5;text-decoration:underline;">$1</a>');return e=e.replace(/\*\*([^*]+)\*\*/g,"<b>$1</b>"),e}function Sl(t){if(!t)return null;let e=t.replace(/\*\*([^*]+)\*\*/g,"<b>$1</b>");return e=e.replace(/==([^=]+)==/g,'<span style="color:#3674B5;font-weight:bold;">$1</span>'),e=e.replace(/\[([^\]]+)\]\(([^\)]+)\)/g,'<a href="$2" target="_blank" rel="noopener noreferrer" style="color:#3674B5;text-decoration:underline;">$1</a>'),e}function rT({config:t,pubRef:e}){return N.jsxs("div",{style:{background:"none",boxShadow:"none",border:"none",padding:"0 24px"},children:[N.jsx(G2,{style:{marginTop:10,marginBottom:12},children:"About Me"}),N.jsx("div",{style:{fontSize:"1.1rem",marginBottom:12},dangerouslySetInnerHTML:{__html:zh(t.bio)}}),t.bioList&&t.bioList.length>0&&N.jsx("ul",{style:{margin:"12px 0 12px 24px"},children:t.bioList.map((n,r)=>N.jsx("li",{style:{marginBottom:4},dangerouslySetInnerHTML:{__html:zh(n)}},r))}),t.bioAfterList&&N.jsx("div",{style:{fontSize:"1.1rem",margin:"12px 0 24px 0"},dangerouslySetInnerHTML:{__html:zh(t.bioAfterList)}}),N.jsx(Bh,{children:"Experience"}),N.jsx(Ov,{children:t.experience.map((n,r)=>N.jsx("li",{dangerouslySetInnerHTML:{__html:nR(`${n.company}, ${n.title} (${n.time})`)}},r))}),N.jsx(Bh,{children:"Education"}),N.jsx(Ov,{children:t.education.map((n,r)=>N.jsxs("li",{children:[n.school,", ",n.degree," (",n.time,")"]},r))}),N.jsx(Bh,{ref:e,id:"publications",children:"Publications"}),N.jsx(q2,{children:t.papers.map((n,r,i)=>{let s=n.img||`/materials/publications/${i.length-r}.jpg`;const o=l=>{l.target.src.endsWith(".png")||(l.target.src=`/materials/publications/${i.length-r}.png`)};return N.jsxs(Q2,{children:[N.jsx(Y2,{src:s,alt:"pub",onError:o}),N.jsxs(X2,{children:[N.jsx(Z2,{href:n.link,target:"_blank",rel:"noopener noreferrer",dangerouslySetInnerHTML:{__html:Sl(n.title)}}),N.jsx(J2,{dangerouslySetInnerHTML:{__html:Sl(n.authors)}}),N.jsx(eR,{dangerouslySetInnerHTML:{__html:Sl(n.venue+(n.year?`, ${n.year}`:""))}}),n.desc&&N.jsx(tR,{dangerouslySetInnerHTML:{__html:Sl(n.desc)}})]})]},r)})})]})}Y.div`
228  background: var(--card-bg);
229  border-radius: 12px;
230  box-shadow: 0 2px 8px rgba(37,99,235,0.05);
231  padding: 24px 20px;
232  margin-bottom: 20px;
233  border: 1px solid var(--border);
234  transition: box-shadow var(--transition), background var(--transition);
235`;Y.a`
236  color: var(--primary);
237  font-size: 1.1rem;
238  font-weight: 700;
239  text-decoration: none;
240  &:hover { text-decoration: underline; }
241`;Y.div`
242  color: var(--text);
243  font-size: 1rem;
244  margin: 6px 0;
245`;Y.div`
246  color: #888;
247  font-size: 0.95rem;
248`;Y.div`
249  background: var(--card-bg);
250  border-radius: 12px;
251  box-shadow: 0 2px 8px rgba(37,99,235,0.05);
252  padding: 24px 20px;
253  margin-bottom: 20px;
254  border: 1px solid var(--border);
255  transition: box-shadow var(--transition), background var(--transition);
256`;Y.a`
257  color: var(--primary);
258  font-size: 1.1rem;
259  font-weight: 700;
260  text-decoration: none;
261  &:hover { text-decoration: underline; }
262`;Y.div`
263  color: var(--text);
264  font-size: 1rem;
265  margin: 6px 0;
266`;const rR=()=>{};var Fv={};/**
267 * @license
268 * Copyright 2017 Google LLC
269 *
270 * Licensed under the Apache License, Version 2.0 (the "License");
271 * you may not use this file except in compliance with the License.
272 * You may obtain a copy of the License at
273 *
274 *   http://www.apache.org/licenses/LICENSE-2.0
275 *
276 * Unless required by applicable law or agreed to in writing, software
277 * distributed under the License is distributed on an "AS IS" BASIS,
278 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
279 * See the License for the specific language governing permissions and
280 * limitations under the License.
281 */const iT=function(t){const e=[];let n=0;for(let r=0;r<t.length;r++){let i=t.charCodeAt(r);i<128?e[n++]=i:i<2048?(e[n++]=i>>6|192,e[n++]=i&63|128):(i&64512)===55296&&r+1<t.length&&(t.charCodeAt(r+1)&64512)===56320?(i=65536+((i&1023)<<10)+(t.charCodeAt(++r)&1023),e[n++]=i>>18|240,e[n++]=i>>12&63|128,e[n++]=i>>6&63|128,e[n++]=i&63|128):(e[n++]=i>>12|224,e[n++]=i>>6&63|128,e[n++]=i&63|128)}return e},iR=function(t){const e=[];let n=0,r=0;for(;n<t.length;){const i=t[n++];if(i<128)e[r++]=String.fromCharCode(i);else if(i>191&&i<224){const s=t[n++];e[r++]=String.fromCharCode((i&31)<<6|s&63)}else if(i>239&&i<365){const s=t[n++],o=t[n++],l=t[n++],u=((i&7)<<18|(s&63)<<12|(o&63)<<6|l&63)-65536;e[r++]=String.fromCharCode(55296+(u>>10)),e[r++]=String.fromCharCode(56320+(u&1023))}else{const s=t[n++],o=t[n++];e[r++]=String.fromCharCode((i&15)<<12|(s&63)<<6|o&63)}}return e.join("")},sT={byteToCharMap_:null,charToByteMap_:null,byteToCharMapWebSafe_:null,charToByteMapWebSafe_:null,ENCODED_VALS_BASE:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",get ENCODED_VALS(){return this.ENCODED_VALS_BASE+"+/="},get ENCODED_VALS_WEBSAFE(){return this.ENCODED_VALS_BASE+"-_."},HAS_NATIVE_SUPPORT:typeof atob=="function",encodeByteArray(t,e){if(!Array.isArray(t))throw Error("encodeByteArray takes an array as a parameter");this.init_();const n=e?this.byteToCharMapWebSafe_:this.byteToCharMap_,r=[];for(let i=0;i<t.length;i+=3){const s=t[i],o=i+1<t.length,l=o?t[i+1]:0,u=i+2<t.length,c=u?t[i+2]:0,f=s>>2,d=(s&3)<<4|l>>4;let p=(l&15)<<2|c>>6,y=c&63;u||(y=64,o||(p=64)),r.push(n[f],n[d],n[p],n[y])}return r.join("")},encodeString(t,e){return this.HAS_NATIVE_SUPPORT&&!e?btoa(t):this.encodeByteArray(iT(t),e)},decodeString(t,e){return this.HAS_NATIVE_SUPPORT&&!e?atob(t):iR(this.decodeStringToByteArray(t,e))},decodeStringToByteArray(t,e){this.init_();const n=e?this.charToByteMapWebSafe_:this.charToByteMap_,r=[];for(let i=0;i<t.length;){const s=n[t.charAt(i++)],l=i<t.length?n[t.charAt(i)]:0;++i;const c=i<t.length?n[t.charAt(i)]:64;++i;const d=i<t.length?n[t.charAt(i)]:64;if(++i,s==null||l==null||c==null||d==null)throw new sR;const p=s<<2|l>>4;if(r.push(p),c!==64){const y=l<<4&240|c>>2;if(r.push(y),d!==64){const S=c<<6&192|d;r.push(S)}}}return r},init_(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(let t=0;t<this.ENCODED_VALS.length;t++)this.byteToCharMap_[t]=this.ENCODED_VALS.charAt(t),this.charToByteMap_[this.byteToCharMap_[t]]=t,this.byteToCharMapWebSafe_[t]=this.ENCODED_VALS_WEBSAFE.charAt(t),this.charToByteMapWebSafe_[this.byteToCharMapWebSafe_[t]]=t,t>=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(t)]=t,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(t)]=t)}}};class sR extends Error{constructor(){super(...arguments),this.name="DecodeBase64StringError"}}const oR=function(t){const e=iT(t);return sT.encodeByteArray(e,!0)},Mu=function(t){return oR(t).replace(/\./g,"")},aR=function(t){try{return sT.decodeString(t,!0)}catch(e){console.error("base64Decode failed: ",e)}return null};/**
282 * @license
283 * Copyright 2022 Google LLC
284 *
285 * Licensed under the Apache License, Version 2.0 (the "License");
286 * you may not use this file except in compliance with the License.
287 * You may obtain a copy of the License at
288 *
289 *   http://www.apache.org/licenses/LICENSE-2.0
290 *
291 * Unless required by applicable law or agreed to in writing, software
292 * distributed under the License is distributed on an "AS IS" BASIS,
293 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
294 * See the License for the specific language governing permissions and
295 * limitations under the License.
296 */function lR(){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.")}/**
297 * @license
298 * Copyright 2022 Google LLC
299 *
300 * Licensed under the Apache License, Version 2.0 (the "License");
301 * you may not use this file except in compliance with the License.
302 * You may obtain a copy of the License at
303 *
304 *   http://www.apache.org/licenses/LICENSE-2.0
305 *
306 * Unless required by applicable law or agreed to in writing, software
307 * distributed under the License is distributed on an "AS IS" BASIS,
308 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
309 * See the License for the specific language governing permissions and
310 * limitations under the License.
311 */const uR=()=>lR().__FIREBASE_DEFAULTS__,cR=()=>{if(typeof process>"u"||typeof Fv>"u")return;const t=Fv.__FIREBASE_DEFAULTS__;if(t)return JSON.parse(t)},hR=()=>{if(typeof document>"u")return;let t;try{t=document.cookie.match(/__FIREBASE_DEFAULTS__=([^;]+)/)}catch{return}const e=t&&aR(t[1]);return e&&JSON.parse(e)},Qp=()=>{try{return rR()||uR()||cR()||hR()}catch(t){console.info(`Unable to get __FIREBASE_DEFAULTS__ due to: ${t}`);return}},fR=t=>{var e,n;return(n=(e=Qp())===null||e===void 0?void 0:e.emulatorHosts)===null||n===void 0?void 0:n[t]},dR=t=>{const e=fR(t);if(!e)return;const n=e.lastIndexOf(":");if(n<=0||n+1===e.length)throw new Error(`Invalid host ${e} with no separate hostname and port!`);const r=parseInt(e.substring(n+1),10);return e[0]==="["?[e.substring(1,n-1),r]:[e.substring(0,n),r]},oT=()=>{var t;return(t=Qp())===null||t===void 0?void 0:t.config};/**
312 * @license
313 * Copyright 2017 Google LLC
314 *
315 * Licensed under the Apache License, Version 2.0 (the "License");
316 * you may not use this file except in compliance with the License.
317 * You may obtain a copy of the License at
318 *
319 *   http://www.apache.org/licenses/LICENSE-2.0
320 *
321 * Unless required by applicable law or agreed to in writing, software
322 * distributed under the License is distributed on an "AS IS" BASIS,
323 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
324 * See the License for the specific language governing permissions and
325 * limitations under the License.
326 */class pR{constructor(){this.reject=()=>{},this.resolve=()=>{},this.promise=new Promise((e,n)=>{this.resolve=e,this.reject=n})}wrapCallback(e){return(n,r)=>{n?this.reject(n):this.resolve(r),typeof e=="function"&&(this.promise.catch(()=>{}),e.length===1?e(n):e(n,r))}}}/**
327 * @license
328 * Copyright 2025 Google LLC
329 *
330 * Licensed under the Apache License, Version 2.0 (the "License");
331 * you may not use this file except in compliance with the License.
332 * You may obtain a copy of the License at
333 *
334 *   http://www.apache.org/licenses/LICENSE-2.0
335 *
336 * Unless required by applicable law or agreed to in writing, software
337 * distributed under the License is distributed on an "AS IS" BASIS,
338 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
339 * See the License for the specific language governing permissions and
340 * limitations under the License.
341 */function Yp(t){return t.endsWith(".cloudworkstations.dev")}async function mR(t){return(await fetch(t,{credentials:"include"})).ok}/**
342 * @license
343 * Copyright 2021 Google LLC
344 *
345 * Licensed under the Apache License, Version 2.0 (the "License");
346 * you may not use this file except in compliance with the License.
347 * You may obtain a copy of the License at
348 *
349 *   http://www.apache.org/licenses/LICENSE-2.0
350 *
351 * Unless required by applicable law or agreed to in writing, software
352 * distributed under the License is distributed on an "AS IS" BASIS,
353 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
354 * See the License for the specific language governing permissions and
355 * limitations under the License.
356 */function gR(t,e){if(t.uid)throw new Error('The "uid" field is no longer supported by mockUserToken. Please use "sub" instead for Firebase Auth User ID.');const n={alg:"none",type:"JWT"},r=e||"demo-project",i=t.iat||0,s=t.sub||t.user_id;if(!s)throw new Error("mockUserToken must contain 'sub' or 'user_id' field!");const o=Object.assign({iss:`https://securetoken.google.com/${r}`,aud:r,iat:i,exp:i+3600,auth_time:i,sub:s,user_id:s,firebase:{sign_in_provider:"custom",identities:{}}},t);return[Mu(JSON.stringify(n)),Mu(JSON.stringify(o)),""].join(".")}const jo={};function yR(){const t={prod:[],emulator:[]};for(const e of Object.keys(jo))jo[e]?t.emulator.push(e):t.prod.push(e);return t}function vR(t){let e=document.getElementById(t),n=!1;return e||(e=document.createElement("div"),e.setAttribute("id",t),n=!0),{created:n,element:e}}let jv=!1;function _R(t,e){if(typeof window>"u"||typeof document>"u"||!Yp(window.location.host)||jo[t]===e||jo[t]||jv)return;jo[t]=e;function n(p){return`__firebase__banner__${p}`}const r="__firebase__banner",s=yR().prod.length>0;function o(){const p=document.getElementById(r);p&&p.remove()}function l(p){p.style.display="flex",p.style.background="#7faaf0",p.style.position="fixed",p.style.bottom="5px",p.style.left="5px",p.style.padding=".5em",p.style.borderRadius="5px",p.style.alignItems="center"}function u(p,y){p.setAttribute("width","24"),p.setAttribute("id",y),p.setAttribute("height","24"),p.setAttribute("viewBox","0 0 24 24"),p.setAttribute("fill","none"),p.style.marginLeft="-6px"}function c(){const p=document.createElement("span");
vendor: 4,774 bytes, lines 356-389
356return p.style.cursor="pointer",p.style.marginLeft="16px",p.style.fontSize="24px",p.innerHTML=" &times;",p.onclick=()=>{jv=!0,o()},p}function f(p,y){p.setAttribute("id",y),p.innerText="Learn more",p.href="https://firebase.google.com/docs/studio/preview-apps#preview-backend",p.setAttribute("target","__blank"),p.style.paddingLeft="5px",p.style.textDecoration="underline"}function d(){const p=vR(r),y=n("text"),S=document.getElementById(y)||document.createElement("span"),x=n("learnmore"),R=document.getElementById(x)||document.createElement("a"),w=n("preprendIcon"),v=document.getElementById(w)||document.createElementNS("http://www.w3.org/2000/svg","svg");if(p.created){const T=p.element;l(T),f(R,x);const k=c();u(v,w),T.append(v,S,R,k),document.body.appendChild(T)}s?(S.innerText="Preview backend disconnected.",v.innerHTML=`<g clip-path="url(#clip0_6013_33858)">
357<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"/>
358</g>
359<defs>
360<clipPath id="clip0_6013_33858">
361<rect width="24" height="24" fill="white"/>
362</clipPath>
363</defs>`):(v.innerHTML=`<g clip-path="url(#clip0_6083_34804)">
364<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"/>
365</g>
366<defs>
367<clipPath id="clip0_6083_34804">
368<rect width="24" height="24" fill="white"/>
369</clipPath>
370</defs>`,S.innerText="Preview backend running in this workspace."),S.setAttribute("id",y)}document.readyState==="loading"?window.addEventListener("DOMContentLoaded",d):d()}/**
371 * @license
372 * Copyright 2017 Google LLC
373 *
374 * Licensed under the Apache License, Version 2.0 (the "License");
375 * you may not use this file except in compliance with the License.
376 * You may obtain a copy of the License at
377 *
378 *   http://www.apache.org/licenses/LICENSE-2.0
379 *
380 * Unless required by applicable law or agreed to in writing, software
381 * distributed under the License is distributed on an "AS IS" BASIS,
382 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
383 * See the License for the specific language governing permissions and
384 * limitations under the License.
385 */function wR(){return typeof navigator<"u"&&typeof navigator.userAgent=="string"?navigator.userAgent:""}function ER(){var t;const e=(t=Qp())===null||t===void 0?void 0:t.forceEnvironment;if(e==="node")return!0;if(e==="browser")return!1;try{return Object.prototype.toString.call(global.process)==="[object process]"}catch{return!1}}function TR(){return!ER()&&!!navigator.userAgent&&navigator.userAgent.includes("Safari")&&!navigator.userAgent.includes("Chrome")}function SR(){try{return typeof indexedDB=="object"}catch{return!1}}function AR(){return new Promise((t,e)=>{try{let n=!0;const r="validate-browser-context-for-indexeddb-analytics-module",i=self.indexedDB.open(r);i.onsuccess=()=>{i.result.close(),n||self.indexedDB.deleteDatabase(r),t(!0)},i.onupgradeneeded=()=>{n=!1},i.onerror=()=>{var s;e(((s=i.error)===null||s===void 0?void 0:s.message)||"")}}catch(n){e(n)}})}/**
386 * @license
387 * Copyright 2017 Google LLC
388 *
389 * Licensed under the Apache License, Version 2.0 (the "License");
390 * you may not use this file except in compliance with the License.
391 * You may obtain a copy of the License at
392 *
393 *   http://www.apache.org/licenses/LICENSE-2.0
394 *
395 * Unless required by applicable law or agreed to in writing, software
396 * distributed under the License is distributed on an "AS IS" BASIS,
397 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
398 * See the License for the specific language governing permissions and
399 * limitations under the License.
400 */const IR="FirebaseError";class Bs extends Error{constructor(e,n,r){super(n),this.code=e,this.customData=r,this.name=IR,Object.setPrototypeOf(this,Bs.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,aT.prototype.create)}}class aT{constructor(e,n,r){this.service=e,this.serviceName=n,this.errors=r}create(e,...n){const r=n[0]||{},i=`${this.service}/${e}`,s=this.errors[e],o=s?xR(s,r):"Error",l=`${this.serviceName}: ${o} (${i}).`;return new Bs(i,l,r)}}function xR(t,e){return t.replace(CR,(n,r)=>{const i=e[r];return i!=null?String(i):`<${r}?>`})}const CR=/\{\$([^}]+)}/g;function Lu(t,e){if(t===e)return!0;const n=Object.keys(t),r=Object.keys(e);for(const i of n){if(!r.includes(i))return!1;const s=t[i],o=e[i];if(Bv(s)&&Bv(o)){if(!Lu(s,o))return!1}else if(s!==o)return!1}for(const i of r)if(!n.includes(i))return!1;return!0}function Bv(t){return t!==null&&typeof t=="object"}/**
401 * @license
402 * Copyright 2021 Google LLC
403 *
404 * Licensed under the Apache License, Version 2.0 (the "License");
405 * you may not use this file except in compliance with the License.
406 * You may obtain a copy of the License at
407 *
408 *   http://www.apache.org/licenses/LICENSE-2.0
409 *
410 * Unless required by applicable law or agreed to in writing, software
411 * distributed under the License is distributed on an "AS IS" BASIS,
412 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
413 * See the License for the specific language governing permissions and
414 * limitations under the License.
415 */function Is(t){return t&&t._delegate?t._delegate:t}class da{constructor(e,n,r){this.name=e,this.instanceFactory=n,this.type=r,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY",this.onInstanceCreated=null}setInstantiationMode(e){return this.instantiationMode=e,this}setMultipleInstances(e){return this.multipleInstances=e,this}setServiceProps(e){return this.serviceProps=e,this}setInstanceCreatedCallback(e){return this.onInstanceCreated=e,this}}/**
416 * @license
417 * Copyright 2019 Google LLC
418 *
419 * Licensed under the Apache License, Version 2.0 (the "License");
420 * you may not use this file except in compliance with the License.
421 * You may obtain a copy of the License at
422 *
423 *   http://www.apache.org/licenses/LICENSE-2.0
424 *
425 * Unless required by applicable law or agreed to in writing, software
426 * distributed under the License is distributed on an "AS IS" BASIS,
427 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
428 * See the License for the specific language governing permissions and
429 * limitations under the License.
430 */const ei="[DEFAULT]";/**
431 * @license
432 * Copyright 2019 Google LLC
433 *
434 * Licensed under the Apache License, Version 2.0 (the "License");
435 * you may not use this file except in compliance with the License.
436 * You may obtain a copy of the License at
437 *
438 *   http://www.apache.org/licenses/LICENSE-2.0
439 *
440 * Unless required by applicable law or agreed to in writing, software
441 * distributed under the License is distributed on an "AS IS" BASIS,
442 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
443 * See the License for the specific language governing permissions and
444 * limitations under the License.
445 */class PR{constructor(e,n){this.name=e,this.container=n,this.component=null,this.instances=new Map,this.instancesDeferred=new Map,this.instancesOptions=new Map,this.onInitCallbacks=new Map}get(e){const n=this.normalizeInstanceIdentifier(e);if(!this.instancesDeferred.has(n)){const r=new pR;if(this.instancesDeferred.set(n,r),this.isInitialized(n)||this.shouldAutoInitialize())try{const i=this.getOrInitializeService({instanceIdentifier:n});i&&r.resolve(i)}catch{}}return this.instancesDeferred.get(n).promise}getImmediate(e){var n;const r=this.normalizeInstanceIdentifier(e==null?void 0:e.identifier),i=(n=e==null?void 0:e.optional)!==null&&n!==void 0?n:!1;if(this.isInitialized(r)||this.shouldAutoInitialize())try{return this.getOrInitializeService({instanceIdentifier:r})}catch(s){if(i)return null;throw s}else{if(i)return null;throw Error(`Service ${this.name} is not available`)}}getComponent(){return this.component}setComponent(e){if(e.name!==this.name)throw Error(`Mismatching Component ${e.name} for Provider ${this.name}.`);if(this.component)throw Error(`Component for ${this.name} has already been provided`);if(this.component=e,!!this.shouldAutoInitialize()){if(kR(e))try{this.getOrInitializeService({instanceIdentifier:ei})}catch{}for(const[n,r]of this.instancesDeferred.entries()){const i=this.normalizeInstanceIdentifier(n);try{const s=this.getOrInitializeService({instanceIdentifier:i});r.resolve(s)}catch{}}}}clearInstance(e=ei){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=ei){return this.instances.has(e)}getOptions(e=ei){return this.instancesOptions.get(e)||{}}initialize(e={}){const{options:n={}}=e,r=this.normalizeInstanceIdentifier(e.instanceIdentifier);if(this.isInitialized(r))throw Error(`${this.name}(${r}) has already been initialized`);if(!this.isComponentSet())throw Error(`Component ${this.name} has not been registered yet`);const i=this.getOrInitializeService({instanceIdentifier:r,options:n});for(const[s,o]of this.instancesDeferred.entries()){const l=this.normalizeInstanceIdentifier(s);r===l&&o.resolve(i)}return i}onInit(e,n){var r;const i=this.normalizeInstanceIdentifier(n),s=(r=this.onInitCallbacks.get(i))!==null&&r!==void 0?r:new Set;s.add(e),this.onInitCallbacks.set(i,s);const o=this.instances.get(i);return o&&e(o,i),()=>{s.delete(e)}}invokeOnInitCallbacks(e,n){const r=this.onInitCallbacks.get(n);if(r)for(const i of r)try{i(e,n)}catch{}}getOrInitializeService({instanceIdentifier:e,options:n={}}){let r=this.instances.get(e);if(!r&&this.component&&(r=this.component.instanceFactory(this.container,{instanceIdentifier:RR(e),options:n}),this.instances.set(e,r),this.instancesOptions.set(e,n),this.invokeOnInitCallbacks(r,e),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,e,r)}catch{}return r||null}normalizeInstanceIdentifier(e=ei){return this.component?this.component.multipleInstances?e:ei:e}shouldAutoInitialize(){return!!this.component&&this.component.instantiationMode!=="EXPLICIT"}}function RR(t){return t===ei?void 0:t}function kR(t){return t.instantiationMode==="EAGER"}/**
446 * @license
447 * Copyright 2019 Google LLC
448 *
449 * Licensed under the Apache License, Version 2.0 (the "License");
450 * you may not use this file except in compliance with the License.
451 * You may obtain a copy of the License at
452 *
453 *   http://www.apache.org/licenses/LICENSE-2.0
454 *
455 * Unless required by applicable law or agreed to in writing, software
456 * distributed under the License is distributed on an "AS IS" BASIS,
457 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
458 * See the License for the specific language governing permissions and
459 * limitations under the License.
460 */class VR{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 PR(e,this);return this.providers.set(e,n),n}getProviders(){return Array.from(this.providers.values())}}/**
461 * @license
462 * Copyright 2017 Google LLC
463 *
464 * Licensed under the Apache License, Version 2.0 (the "License");
465 * you may not use this file except in compliance with the License.
466 * You may obtain a copy of the License at
467 *
468 *   http://www.apache.org/licenses/LICENSE-2.0
469 *
470 * Unless required by applicable law or agreed to in writing, software
471 * distributed under the License is distributed on an "AS IS" BASIS,
472 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
473 * See the License for the specific language governing permissions and
474 * limitations under the License.
475 */var ce;(function(t){t[t.DEBUG=0]="DEBUG",t[t.VERBOSE=1]="VERBOSE",t[t.INFO=2]="INFO",t[t.WARN=3]="WARN",t[t.ERROR=4]="ERROR",t[t.SILENT=5]="SILENT"})(ce||(ce={}));const DR={debug:ce.DEBUG,verbose:ce.VERBOSE,info:ce.INFO,warn:ce.WARN,error:ce.ERROR,silent:ce.SILENT},bR=ce.INFO,NR={[ce.DEBUG]:"log",[ce.VERBOSE]:"log",[ce.INFO]:"info",[ce.WARN]:"warn",[ce.ERROR]:"error"},MR=(t,e,...n)=>{if(e<t.logLevel)return;const r=new Date().toISOString(),i=NR[e];if(i)console[i](`[${r}]  ${t.name}:`,...n);else throw new Error(`Attempted to log a message with an invalid logType (value: ${e})`)};class lT{constructor(e){this.name=e,this._logLevel=bR,this._logHandler=MR,this._userLogHandler=null}get logLevel(){return this._logLevel}set logLevel(e){if(!(e in ce))throw new TypeError(`Invalid value "${e}" assigned to \`logLevel\``);this._logLevel=e}setLogLevel(e){this._logLevel=typeof e=="string"?DR[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,ce.DEBUG,...e),this._logHandler(this,ce.DEBUG,...e)}log(...e){this._userLogHandler&&this._userLogHandler(this,ce.VERBOSE,...e),this._logHandler(this,ce.VERBOSE,...e)}info(...e){this._userLogHandler&&this._userLogHandler(this,ce.INFO,...e),this._logHandler(this,ce.INFO,...e)}warn(...e){this._userLogHandler&&this._userLogHandler(this,ce.WARN,...e),this._logHandler(this,ce.WARN,...e)}error(...e){this._userLogHandler&&this._userLogHandler(this,ce.ERROR,...e),this._logHandler(this,ce.ERROR,...e)}}const LR=(t,e)=>e.some(n=>t instanceof n);let zv,Uv;function OR(){return zv||(zv=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function FR(){return Uv||(Uv=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const uT=new WeakMap,dd=new WeakMap,cT=new WeakMap,Uh=new WeakMap,Xp=new WeakMap;function jR(t){const e=new Promise((n,r)=>{const i=()=>{t.removeEventListener("success",s),t.removeEventListener("error",o)},s=()=>{n(Cr(t.result)),i()},o=()=>{r(t.error),i()};t.addEventListener("success",s),t.addEventListener("error",o)});return e.then(n=>{n instanceof IDBCursor&&uT.set(n,t)}).catch(()=>{}),Xp.set(e,t),e}function BR(t){if(dd.has(t))return;const e=new Promise((n,r)=>{const i=()=>{t.removeEventListener("complete",s),t.removeEventListener("error",o),t.removeEventListener("abort",o)},s=()=>{n(),i()},o=()=>{r(t.error||new DOMException("AbortError","AbortError")),i()};t.addEventListener("complete",s),t.addEventListener("error",o),t.addEventListener("abort",o)});dd.set(t,e)}let pd={get(t,e,n){if(t instanceof IDBTransaction){if(e==="done")return dd.get(t);if(e==="objectStoreNames")return t.objectStoreNames||cT.get(t);if(e==="store")return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return Cr(t[e])},set(t,e,n){return t[e]=n,!0},has(t,e){return t instanceof IDBTransaction&&(e==="done"||e==="store")?!0:e in t}};function zR(t){pd=t(pd)}function UR(t){return t===IDBDatabase.prototype.transaction&&!("objectStoreNames"in IDBTransaction.prototype)?function(e,...n){const r=t.call($h(this),e,...n);return cT.set(r,e.sort?e.sort():[e]),Cr(r)}:FR().includes(t)?function(...e){return t.apply($h(this),e),Cr(uT.get(this))}:function(...e){return Cr(t.apply($h(this),e))}}function $R(t){return typeof t=="function"?UR(t):(t instanceof IDBTransaction&&BR(t),LR(t,OR())?new Proxy(t,pd):t)}function Cr(t){if(t instanceof IDBRequest)return jR(t);if(Uh.has(t))return Uh.get(t);const e=$R(t);return e!==t&&(Uh.set(t,e),Xp.set(e,t)),e}const $h=t=>Xp.get(t);function HR(t,e,{blocked:n,upgrade:r,blocking:i,terminated:s}={}){const o=indexedDB.open(t,e),l=Cr(o);return r&&o.addEventListener("upgradeneeded",u=>{r(Cr(o.result),u.oldVersion,u.newVersion,Cr(o.transaction),u)}),n&&o.addEventListener("blocked",u=>n(u.oldVersion,u.newVersion,u)),l.then(u=>{s&&u.addEventListener("close",()=>s()),i&&u.addEventListener("versionchange",c=>i(c.oldVersion,c.newVersion,c))}).catch(()=>{}),l}const WR=["get","getKey","getAll","getAllKeys","count"],KR=["put","add","delete","clear"],Hh=new Map;function $v(t,e){if(!(t instanceof IDBDatabase&&!(e in t)&&typeof e=="string"))return;if(Hh.get(e))return Hh.get(e);const n=e.replace(/FromIndex$/,""),r=e!==n,i=KR.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!(i||WR.includes(n)))return;const s=async function(o,...l){const u=this.transaction(o,i?"readwrite":"readonly");let c=u.store;
475return r&&(c=c.index(l.shift())),(await Promise.all([c[n](...l),i&&u.done]))[0]};return Hh.set(e,s),s}zR(t=>({...t,get:(e,n,r)=>$v(e,n)||t.get(e,n,r),has:(e,n)=>!!$v(e,n)||t.has(e,n)}));/**
476 * @license
477 * Copyright 2019 Google LLC
478 *
479 * Licensed under the Apache License, Version 2.0 (the "License");
480 * you may not use this file except in compliance with the License.
481 * You may obtain a copy of the License at
482 *
483 *   http://www.apache.org/licenses/LICENSE-2.0
484 *
485 * Unless required by applicable law or agreed to in writing, software
486 * distributed under the License is distributed on an "AS IS" BASIS,
487 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
488 * See the License for the specific language governing permissions and
489 * limitations under the License.
490 */class GR{constructor(e){this.container=e}getPlatformInfoString(){return this.container.getProviders().map(n=>{if(qR(n)){const r=n.getImmediate();return`${r.library}/${r.version}`}else return null}).filter(n=>n).join(" ")}}function qR(t){const e=t.getComponent();return(e==null?void 0:e.type)==="VERSION"}const md="@firebase/app",Hv="0.13.1";/**
491 * @license
492 * Copyright 2019 Google LLC
493 *
494 * Licensed under the Apache License, Version 2.0 (the "License");
495 * you may not use this file except in compliance with the License.
496 * You may obtain a copy of the License at
497 *
498 *   http://www.apache.org/licenses/LICENSE-2.0
499 *
500 * Unless required by applicable law or agreed to in writing, software
501 * distributed under the License is distributed on an "AS IS" BASIS,
502 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
503 * See the License for the specific language governing permissions and
504 * limitations under the License.
505 */const Zn=new lT("@firebase/app"),QR="@firebase/app-compat",YR="@firebase/analytics-compat",XR="@firebase/analytics",ZR="@firebase/app-check-compat",JR="@firebase/app-check",ek="@firebase/auth",tk="@firebase/auth-compat",nk="@firebase/database",rk="@firebase/data-connect",ik="@firebase/database-compat",sk="@firebase/functions",ok="@firebase/functions-compat",ak="@firebase/installations",lk="@firebase/installations-compat",uk="@firebase/messaging",ck="@firebase/messaging-compat",hk="@firebase/performance",fk="@firebase/performance-compat",dk="@firebase/remote-config",pk="@firebase/remote-config-compat",mk="@firebase/storage",gk="@firebase/storage-compat",yk="@firebase/firestore",vk="@firebase/ai",_k="@firebase/firestore-compat",wk="firebase",Ek="11.9.0";/**
506 * @license
507 * Copyright 2019 Google LLC
508 *
509 * Licensed under the Apache License, Version 2.0 (the "License");
510 * you may not use this file except in compliance with the License.
511 * You may obtain a copy of the License at
512 *
513 *   http://www.apache.org/licenses/LICENSE-2.0
514 *
515 * Unless required by applicable law or agreed to in writing, software
516 * distributed under the License is distributed on an "AS IS" BASIS,
517 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
518 * See the License for the specific language governing permissions and
519 * limitations under the License.
520 */const gd="[DEFAULT]",Tk={[md]:"fire-core",[QR]:"fire-core-compat",[XR]:"fire-analytics",[YR]:"fire-analytics-compat",[JR]:"fire-app-check",[ZR]:"fire-app-check-compat",[ek]:"fire-auth",[tk]:"fire-auth-compat",[nk]:"fire-rtdb",[rk]:"fire-data-connect",[ik]:"fire-rtdb-compat",[sk]:"fire-fn",[ok]:"fire-fn-compat",[ak]:"fire-iid",[lk]:"fire-iid-compat",[uk]:"fire-fcm",[ck]:"fire-fcm-compat",[hk]:"fire-perf",[fk]:"fire-perf-compat",[dk]:"fire-rc",[pk]:"fire-rc-compat",[mk]:"fire-gcs",[gk]:"fire-gcs-compat",[yk]:"fire-fst",[_k]:"fire-fst-compat",[vk]:"fire-vertex","fire-js":"fire-js",[wk]:"fire-js-all"};/**
521 * @license
522 * Copyright 2019 Google LLC
523 *
524 * Licensed under the Apache License, Version 2.0 (the "License");
525 * you may not use this file except in compliance with the License.
526 * You may obtain a copy of the License at
527 *
528 *   http://www.apache.org/licenses/LICENSE-2.0
529 *
530 * Unless required by applicable law or agreed to in writing, software
531 * distributed under the License is distributed on an "AS IS" BASIS,
532 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
533 * See the License for the specific language governing permissions and
534 * limitations under the License.
535 */const Ou=new Map,Sk=new Map,yd=new Map;function Wv(t,e){try{t.container.addComponent(e)}catch(n){Zn.debug(`Component ${e.name} failed to register with FirebaseApp ${t.name}`,n)}}function Fu(t){const e=t.name;if(yd.has(e))return Zn.debug(`There were multiple attempts to register component ${e}.`),!1;yd.set(e,t);for(const n of Ou.values())Wv(n,t);for(const n of Sk.values())Wv(n,t);return!0}function Ak(t,e){const n=t.container.getProvider("heartbeat").getImmediate({optional:!0});return n&&n.triggerHeartbeat(),t.container.getProvider(e)}function Ik(t){return t==null?!1:t.settings!==void 0}/**
536 * @license
537 * Copyright 2019 Google LLC
538 *
539 * Licensed under the Apache License, Version 2.0 (the "License");
540 * you may not use this file except in compliance with the License.
541 * You may obtain a copy of the License at
542 *
543 *   http://www.apache.org/licenses/LICENSE-2.0
544 *
545 * Unless required by applicable law or agreed to in writing, software
546 * distributed under the License is distributed on an "AS IS" BASIS,
547 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
548 * See the License for the specific language governing permissions and
549 * limitations under the License.
550 */const xk={"no-app":"No Firebase App '{$appName}' has been created - call initializeApp() first","bad-app-name":"Illegal App name: '{$appName}'","duplicate-app":"Firebase App named '{$appName}' already exists with different options or config","app-deleted":"Firebase App named '{$appName}' already deleted","server-app-deleted":"Firebase Server App has been deleted","no-options":"Need to provide options, when not being deployed to hosting via source.","invalid-app-argument":"firebase.{$appName}() takes either no argument or a Firebase App instance.","invali
550d-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."},Pr=new aT("app","Firebase",xk);/**
551 * @license
552 * Copyright 2019 Google LLC
553 *
554 * Licensed under the Apache License, Version 2.0 (the "License");
555 * you may not use this file except in compliance with the License.
556 * You may obtain a copy of the License at
557 *
558 *   http://www.apache.org/licenses/LICENSE-2.0
559 *
560 * Unless required by applicable law or agreed to in writing, software
561 * distributed under the License is distributed on an "AS IS" BASIS,
562 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
563 * See the License for the specific language governing permissions and
564 * limitations under the License.
565 */class Ck{constructor(e,n,r){this._isDeleted=!1,this._options=Object.assign({},e),this._config=Object.assign({},n),this._name=n.name,this._automaticDataCollectionEnabled=n.automaticDataCollectionEnabled,this._container=r,this.container.addComponent(new da("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 Pr.create("app-deleted",{appName:this._name})}}/**
566 * @license
567 * Copyright 2019 Google LLC
568 *
569 * Licensed under the Apache License, Version 2.0 (the "License");
570 * you may not use this file except in compliance with the License.
571 * You may obtain a copy of the License at
572 *
573 *   http://www.apache.org/licenses/LICENSE-2.0
574 *
575 * Unless required by applicable law or agreed to in writing, software
576 * distributed under the License is distributed on an "AS IS" BASIS,
577 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
578 * See the License for the specific language governing permissions and
579 * limitations under the License.
580 */const Pk=Ek;function hT(t,e={}){let n=t;typeof e!="object"&&(e={name:e});const r=Object.assign({name:gd,automaticDataCollectionEnabled:!0},e),i=r.name;if(typeof i!="string"||!i)throw Pr.create("bad-app-name",{appName:String(i)});if(n||(n=oT()),!n)throw Pr.create("no-options");const s=Ou.get(i);if(s){if(Lu(n,s.options)&&Lu(r,s.config))return s;throw Pr.create("duplicate-app",{appName:i})}const o=new VR(i);for(const u of yd.values())o.addComponent(u);const l=new Ck(n,r,o);return Ou.set(i,l),l}function Rk(t=gd){const e=Ou.get(t);if(!e&&t===gd&&oT())return hT();if(!e)throw Pr.create("no-app",{appName:t});return e}function cs(t,e,n){var r;let i=(r=Tk[t])!==null&&r!==void 0?r:t;n&&(i+=`-${n}`);const s=i.match(/\s|\//),o=e.match(/\s|\//);if(s||o){const l=[`Unable to register library "${i}" with version "${e}":`];s&&l.push(`library name "${i}" contains illegal characters (whitespace or "/")`),s&&o&&l.push("and"),o&&l.push(`version name "${e}" contains illegal characters (whitespace or "/")`),Zn.warn(l.join(" "));return}Fu(new da(`${i}-version`,()=>({library:i,version:e}),"VERSION"))}/**
581 * @license
582 * Copyright 2021 Google LLC
583 *
584 * Licensed under the Apache License, Version 2.0 (the "License");
585 * you may not use this file except in compliance with the License.
586 * You may obtain a copy of the License at
587 *
588 *   http://www.apache.org/licenses/LICENSE-2.0
589 *
590 * Unless required by applicable law or agreed to in writing, softw
590are
591 * distributed under the License is distributed on an "AS IS" BASIS,
592 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
593 * See the License for the specific language governing permissions and
594 * limitations under the License.
595 */const kk="firebase-heartbeat-database",Vk=1,pa="firebase-heartbeat-store";let Wh=null;function fT(){return Wh||(Wh=HR(kk,Vk,{upgrade:(t,e)=>{switch(e){case 0:try{t.createObjectStore(pa)}catch(n){console.warn(n)}}}}).catch(t=>{throw Pr.create("idb-open",{originalErrorMessage:t.message})})),Wh}async function Dk(t){try{const n=(await fT()).transaction(pa),r=await n.objectStore(pa).get(dT(t));return await n.done,r}catch(e){if(e instanceof Bs)Zn.warn(e.message);else{const n=Pr.create("idb-get",{originalErrorMessage:e==null?void 0:e.message});Zn.warn(n.message)}}}async function Kv(t,e){try{const r=(await fT()).transaction(pa,"readwrite");await r.objectStore(pa).put(e,dT(t)),await r.done}catch(n){if(n instanceof Bs)Zn.warn(n.message);else{const r=Pr.create("idb-set",{originalErrorMessage:n==null?void 0:n.message});Zn.warn(r.message)}}}function dT(t){return`${t.name}!${t.options.appId}`}/**
596 * @license
597 * Copyright 2021 Google LLC
598 *
599 * Licensed under the Apache License, Version 2.0 (the "License");
600 * you may not use this file except in compliance with the License.
601 * You may obtain a copy of the License at
602 *
603 *   http://www.apache.org/licenses/LICENSE-2.0
604 *
605 * Unless required by applicable law or agreed to in writing, software
606 * distributed under the License is distributed on an "AS IS" BASIS,
607 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
608 * See the License for the specific language governing permissions and
609 * limitations under the License.
610 */const bk=1024,Nk=30;class Mk{constructor(e){this.container=e,this._heartbeatsCache=null;const n=this.container.getProvider("app").getImmediate();this._storage=new Ok(n),this._heartbeatsCachePromise=this._storage.read().then(r=>(this._heartbeatsCache=r,r))}async triggerHeartbeat(){var e,n;try{const i=this.container.getProvider("platform-logger").getImmediate().getPlatformInfoString(),s=Gv();if(((e=this._heartbeatsCache)===null||e===void 0?void 0:e.heartbeats)==null&&(this._heartbeatsCache=await this._heartbeatsCachePromise,((n=this._heartbeatsCache)===null||n===void 0?void 0:n.heartbeats)==null)||this._heartbeatsCache.lastSentHeartbeatDate===s||this._heartbeatsCache.heartbeats.some(o=>o.date===s))return;if(this._heartbeatsCache.heartbeats.push({date:s,agent:i}),this._heartbeatsCache.heartbeats.length>Nk){const o=Fk(this._heartbeatsCache.heartbeats);this._heartbeatsCache.heartbeats.splice(o,1)}return this._storage.overwrite(this._heartbeatsCache)}catch(r){Zn.warn(r)}}async getHeartbeatsHeader(){var e;try{if(this._heartbeatsCache===null&&await this._heartbeatsCachePromise,((e=this._heartbeatsCache)===null||e===void 0?void 0:e.heartbeats)==null||this._heartbeatsCache.heartbeats.length===0)return"";const n=Gv(),{heartbeatsToSend:r,unsentEntries:i}=Lk(this._heartbeatsCache.heartbeats),s=Mu(JSON.stringify({version:2,heartbeats:r}));return this._heartbeatsCache.lastSentHeartbeatDate=n,i.length>0?(this._heartbeatsCache.heartbeats=i,await this._storage.overwrite(this._heartbeatsCache)):(this._heartbeatsCache.heartbeats=[],this._storage.overwrite(this._heartbeatsCache)),s}catch(n){return Zn.warn(n),""}}}function Gv(){return new Date().toISOString().substring(0,10)}function Lk(t,e=bk){const n=[];let r=t.slice();for(const i of t){const s=n.find(o=>o.agent===i.agent);if(s){if(s.dates.push(i.date),qv(n)>e){s.dates.pop();break}}else if(n.push({agent:i.agent,dates:[i.date]}),qv(n)>e){n.pop();break}r=r.slice(1)}return{heartbeatsToSend:n,unsentEntries:r}}class Ok{constructor(e){this.app=e,this._canUseIndexedDBPromise=this.runIndexedDBEnvironmentCheck()}async runIndexedDBEnvironmentCheck(){return SR()?AR().then(()=>!0).catch(()=>!1):!1}async read(){if(await this._canUseIndexedDBPromise){const n=await Dk(this.app);return n!=null&&n.heartbeats?n:{heartbeats:[]}}else return{heartbeats:[]}}async overwrite(e){var n;if(await this._canUseIndexedDBPromise){const i=await this.read();return Kv(this.app,{lastSentHeartbeatDate:(n=e.lastSentHeartbeatDate)!==null&&n!==void 0?n:i.lastSentHeartbeatDate,heartbeats:e.heartbeats})}else return}async add(e){var n;if(await this._canUseIndexedDBPromise){const i=await this.read();return Kv(this.app,{lastSentHeartbeatDate:(n=e.lastSentHeartbeatDate)!==null&&n!==void 0?n:i.lastSentHeartbeatDate,heartbeats:[...i.heartbeats,...e.heartbeats]})}else return}}function qv(t){return Mu(JSON.stringify({version:2,heartbeats:t})).length}function Fk(t){if(t.length===0)return-1;let e=0,n=t[0].date;for(let r=1;r<t.length;r++)t[r].date<n&&(n=t[r].date,e=r);return e}/**
611 * @license
612 * Copyright 2019 Google LLC
613 *
614 * Licensed under the Apache License, Version 2.0 (the "License");
615 * you may not use this file except in compliance with the License.
616 * You may obtain a copy of the License at
617 *
618 *   http://www.apache.org/licenses/LICENSE-2.0
619 *
620 * Unless required by applicable law or agreed to in writing, software
621 * distributed under the License is distributed on an "AS IS" BASIS,
622 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
623 * See the License for the specific language governing permissions and
624 * limitations under the License.
625 */function jk(t){Fu(new da("platform-logger",e=>new GR(e),"PRIVATE")),Fu(new da("heartbeat",e=>new Mk(e),"PRIVATE")),cs(md,Hv,t),cs(md,Hv,"esm2017"),cs("fire-js","")}jk("");var Bk="firebase",zk="11.9.1";/**
626 * @license
627 * Copyright 2020 Google LLC
628 *
629 * Licensed under the Apache License, Version 2.0 (the "License");
630 * you may not use this file except in compliance with the License.
631 * You may obtain a copy of the License at
632 *
633 *   http://www.apache.org/licenses/LICENSE-2.0
634 *
635 * Unless required by applicable law or agreed to in writing, software
636 * distributed under the License is distributed on an "AS IS" BASIS,
637 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
638 * See the License for the specific language governing permissions and
639 * limitations under the License.
640 */cs(Bk,zk,"app");var Qv=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};/** @license
641Copyright The Closure Library Authors.
642SPDX-License-Identifier: Apache-2.0
643*/var Rr,pT;(function(){var t;/** @license
644
645 Copyright The Closure Library Authors.
646 SPDX-License-Identifier: Apache-2.0
647*/function e(E,g){function A(){}A.prototype=g.prototype,E.D=g.prototype,E.prototype=new A,E.prototype.constructor=E,E.C=function(I,P,V){for(var C=Array(arguments.length-2),He=2;He<arguments.length;He++)C[He-2]=arguments[He];return g.prototype[P].apply(I,C)}}function n(){this.blockSize=-1}function r(){this.blockSize=-1,this.blockSize=64,this.g=Array(4),this.B=Array(this.blockSize),this.o=this.h=0,this.s()}e(r,n),r.prototype.s=function(){this.g[0]=1732584193,this.g[1]=4023233417,this.g[2]=2562383102,this.g[3]=271733878,this.o=this.h=0};function i(E,g,A){A||(A=0);var I=Array(16);if(typeof g=="string")for(var P=0;16>P;++P)I[P]=g.charCodeAt(A++)|g.charCodeAt(A++)<<8|g.charCodeAt(A++)<<16|g.charCodeAt(A++)<<24;else for(P=0;16>P;++P)I[P]=g[A++]|g[A++]<<8|g[A++]<<16|g[A++]<<24;g=E.g[0],A=E.g[1],P=E.g[2];var V=E.g[3],C=g+(V^A&(P^V))+I[0]+3614090360&4294967295;g=A+(C<<7&4294967295|C>>>25),C=V+(P^g&(A^P))+I[1]+3905402710&4294967295,V=g+(C<<12&4294967295|C>>>20),C=P+(A^V&(g^A))+I[2]+606105819&4294967295,P=V+(C<<17&4294967295|C>>>15),C=A+(g^P&(V^g))+I[3]+3250441966&4294967295,A=P+(C<<22&4294967295|C>>>10),C=g+(V^A&(P^V))+I[4]+4118548399&4294967295,g=A+(C<<7&4294967295|C>>>25),C=V+(P^g&(A^P))+I[5]+1200080426&4294967295,V=g+(C<<12&4294967295|C>>>20),C=P+(A^V&(g^A))+I[6]+2821735955&4294967295,P=V+(C<<17&4294967295|C>>>15),C=A+(g^P&(V^g))+I[7]+4249261313&4294967295,A=P+(C<<22&4294967295|C>>>10),C=g+(V^A&(P^V))+I[8]+1770035416&4294967295,g=A+(C<<7&4294967295|C>>>25),C=V+(P^g&(A^P))+I[9]+2336552879&4294967295,V=g+(C<<12&4294967295|C>>>20),C=P+(A^V&(g^A))+I[10]+4294925233&4294967295,P=V+(C<<17&4294967295|C>>>15),C=A+(g^P&(V^g))+I[11]+2304563134&4294967295,A=P+(C<<22&4294967295|C>>>10),C=g+(V^A&(P^V))+I[12]+1804603682&4294967295,g=A+(C<<7&4294967295|C>>>25),C=V+(P^g&(A^P))+I[13]+4254626195&4294967295,V=g+(C<<12&4294967295|C>>>20),C=P+(A^V&(g^A))+I[14]+2792965006&4294967295,P=V+(C<<17&4294967295|C>>>15),C=A+(g^P&(V^g))+I[15]+1236535329&4294967295,A=P+(C<<22&4294967295|C>>>10),C=g+(P^V&(A^P))+I[1]+4129170786&4294967295,g=A+(C<<5&4294967295|C>>>27),C=V+(A^P&(g^A))+I[6]+3225465664&4294967295,V=g+(C<<9&4294967295|C>>>23),C=P+(g^A&(V^g))+I[11]+643717713&4294967295,P=V+(C<<14&4294967295|C>>>18),C=A+(V^g&(P^V))+I[0]+3921069994&4294967295,A=P+(C<<20&4294967295|C>>>12),C=g+(P^V&(A^P))+I[5]+3593408605&4294967295,g=A+(C<<5&4294967295|C>>>27),C=V+(A^P&(g^A))+I[10]+38016083&4294967295,V=g+(C<<9&4294967295|C>>>23),C=P+(g^A&(V^g))+I[15]+3634488961&4294967295,P=V+(C<<14&4294967295|C>>>18),C=A+(V^g&(P^V))+I[4]+3889429448&4294967295,A=P+(C<<20&4294967295|C>>>12),C=g+(P^V&(A^P))+I[9]+568446438&4294967295,g=A+(C<<5&4294967295|C>>>27),C=V+(A^P&(g^A))+I[14]+3275163606&4294967295,V=g+(C<<9&4294967295|C>>>23),C=P+(g^A&(V^g))+I[3]+4107603335&4294967295,P=V+(C<<14&4294967295|C>>>18),C=A+(V^g&(P^V))+I[8]+1163531501&4294967295,A=P+(C<<20&4294967295|C>>>12),C=g+(P^V&(A^P))+I[13]+2850285829&4294967295,g=A+(C<<5&4294967295|C>>>27),C=V+(A^P&(g^A))+I[2]+4243563512&4294967295,V=g+(C<<9&4294967295|C>>>23),C=P+(g^A&(V^g))+I[7]+1735328473&4294967295,P=V+(C<<14&4294967295|C>>>18),C=A+(V^g&(P^V))+I[12]+2368359562&4294967295,A=P+(C<<20&4294967295|C>>>12),C=g+(A^P^V)+I[5]+4294588738&4294967295,g=A+(C<<4&4294967295|C>>>28),C=V+(g^A^P)+I[8]+2272392833&4294967295,V=g+(C<<11&4294967295|C>>>21),C=P+(V^g^A)+I[11]+1839030562&4294967295,P=V+(C<<16&4294967295|C>>>16),C=A+(P^V^g)+I[14]+4259657740&4294967295,A=P+(C<<23&4294967295|C>>>9),C=g+(A^P^V)+I[1]+2763975236&4294967295,g=A+(C<<4&4294967295|C>>>28),C=V+(g^A^P)+I[4]+1272893353&4294967295,V=g+(C<<11&4294967295|C>>>21),C=P+(V^g^A)+I[7]+4139469664&4294967295,P=V+(C<<16&4294967295|C>>>16),C=A+(P^V^g)+I[10]+3200236656&4294967295,A=P+(C<<23&4294967295|C>>>9),C=g+(A^P^V)+I[13]+681279174&4294967295,g=A+(C<<4&4294967295|C>>>28),C=V+(g^A^P)+I[0]+3936430074&4294967295,V=g+(C<<11&4294967295|C>>>21),C=P+(V^g^A)+I[3]+3572445317&4294967295,P=V+(C<<16&4294967295|C>>>16),C=A+(P^V^g)+I[6]+76029189&4294967295,A=P+(C<<23&4294967295|C>>>9),C=g+(A^P^V)+I[9]+3654602809&4294967295,g=A+(C<<4&4294967295|C>>>28),C=V+(g^A^P)+I[12]+3873151461&4294967295,V=g+(C<<11&4294967295|C>>>21),C=P+(V^g^A)+I[15]+530742520&4294967295,P=V+(C<<16&4294967295|C>>>16),C=A+(P^V^g)+I[2]+3299628645&4294967295,A=P+(C<<23&4294967295|C>>>9),C=g+(P^(A|~V))+I[0]+4096336452&4294967295,g=A+(C<<6&4294967295|C>>>26),C=V+(A^(g|~P))+I[7]+1126891415&4294967295,V=g+(C<<10&4294967295|C>>>22),C=P+(g^(V|~A))+I[14]+2878612391&4294967295,P=V+(C<<15&4294967295|C>>>17),C=A+(V^(P|~g))+I[5]+4237533241&4294967295,A=P+(C<<21&4294967295|C>>>11),C=g+(P^(A|~V))+I[12]+1700485571&4294967295,g=A+(C<<6&4294967295|C>>>26),C=V+(A^(g|~P))+I[3]+2399980690&4294967295,V=g+(C<<10&4294967295|C>>>22),C=P+(g^(V|~A))+I[10]+4293915773&4294967295,P=V+(C<<15&4294967295|C>>>17),C=A+(V^(P|~g))+I[1]+2240044497&4294967295,A=P+(C<<21&4294967295|C>>>11),C=g+(P^(A|~V))+I[8]+1873313359&4294967295,g=A+(C<<6&4294967295|C>>>26),C=V+(A^(g|~P))+I[15]+4264355552&4294967295,V=g+(C<<10&4294967295|C>>>22),C=P+(g^(V|~A))+I[6]+2734768916&4294967295,P=V+(C<<15&4294967295|C>>>17),C=A+(V^(P|~g))+I[13]+1309151649&4294967295,A=P+(C<<21&4294967295|C>>>11),C=g+(P^(A|~V))+I[4]+4149444226&4294967295,g=A+(C<<6&4294967295|C>>>26),C=V+(A^(g|~P))+I[11]+3174756917&4294967295,V=g+(C<<10&4294967295|C>>>22),C=P+(g^(V|~A))+I[2]+718787259&4294967295,P=V+(C<<15&4294967295|C>>>17),C=A+(V^(P|~g))+I[9]+3951481745&4294967295,E.g[0]=E.g[0]+g&4294967295,E.g[1]=E.g[1]+(P+(C<<21&4294967295|C>>>11))&4294967295,E.g[2]=E.g[2]+P&4294967295,E.g[3]=E.g[3]+V&4294967295}r.prototype.u=function(E,g){g===void 0&&(g=E.length);for(var A=g-this.blockSize,I=this.B,P=this.h,V=0;V<g;){if(P==0)for(;V<=A;)i(this,E,V),V+=this.blockSize;if(typeof E=="string"){for(;V<g;)if(I[P++]=E.charCodeAt(V++),P==this.blockSize){i(this,I),P=0;break}}else for(;V<g;)if(I[P++]=E[V++],P==this.blockSize){i(this,I),P=0;break}}this.h=P,this.o+=g},r.prototype.v=function(){var E=Array((56>this.h?this.blockSize:2*this.blockSize)-this.h);E[0]=128;for(var g=1;g<E.length-8;++g)E[g]=0;var A=8*this.o;for(g=E.length-8;g<E.length;++g)E[g]=A&255,A/=256;for(this.u(E),E=Array(16),g=A=0;4>g;++g)for(var I=0;32>I;I+=8)E[A++]=this.g[g]>>>
vendor: 46,106 bytes, lines 647-666
647I&255;return E};function s(E,g){var A=l;return Object.prototype.hasOwnProperty.call(A,E)?A[E]:A[E]=g(E)}function o(E,g){this.h=g;for(var A=[],I=!0,P=E.length-1;0<=P;P--){var V=E[P]|0;I&&V==g||(A[P]=V,I=!1)}this.g=A}var l={};function u(E){return-128<=E&&128>E?s(E,function(g){return new o([g|0],0>g?-1:0)}):new o([E|0],0>E?-1:0)}function c(E){if(isNaN(E)||!isFinite(E))return d;if(0>E)return R(c(-E));for(var g=[],A=1,I=0;E>=A;I++)g[I]=E/A|0,A*=4294967296;return new o(g,0)}function f(E,g){if(E.length==0)throw Error("number format error: empty string");if(g=g||10,2>g||36<g)throw Error("radix out of range: "+g);if(E.charAt(0)=="-")return R(f(E.substring(1),g));if(0<=E.indexOf("-"))throw Error('number format error: interior "-" character');for(var A=c(Math.pow(g,8)),I=d,P=0;P<E.length;P+=8){var V=Math.min(8,E.length-P),C=parseInt(E.substring(P,P+V),g);8>V?(V=c(Math.pow(g,V)),I=I.j(V).add(c(C))):(I=I.j(A),I=I.add(c(C)))}return I}var d=u(0),p=u(1),y=u(16777216);t=o.prototype,t.m=function(){if(x(this))return-R(this).m();for(var E=0,g=1,A=0;A<this.g.length;A++){var I=this.i(A);E+=(0<=I?I:4294967296+I)*g,g*=4294967296}return E},t.toString=function(E){if(E=E||10,2>E||36<E)throw Error("radix out of range: "+E);if(S(this))return"0";if(x(this))return"-"+R(this).toString(E);for(var g=c(Math.pow(E,6)),A=this,I="";;){var P=k(A,g).g;A=w(A,P.j(g));var V=((0<A.g.length?A.g[0]:A.h)>>>0).toString(E);if(A=P,S(A))return V+I;for(;6>V.length;)V="0"+V;I=V+I}},t.i=function(E){return 0>E?0:E<this.g.length?this.g[E]:this.h};function S(E){if(E.h!=0)return!1;for(var g=0;g<E.g.length;g++)if(E.g[g]!=0)return!1;return!0}function x(E){return E.h==-1}t.l=function(E){return E=w(this,E),x(E)?-1:S(E)?0:1};function R(E){for(var g=E.g.length,A=[],I=0;I<g;I++)A[I]=~E.g[I];return new o(A,~E.h).add(p)}t.abs=function(){return x(this)?R(this):this},t.add=function(E){for(var g=Math.max(this.g.length,E.g.length),A=[],I=0,P=0;P<=g;P++){var V=I+(this.i(P)&65535)+(E.i(P)&65535),C=(V>>>16)+(this.i(P)>>>16)+(E.i(P)>>>16);I=C>>>16,V&=65535,C&=65535,A[P]=C<<16|V}return new o(A,A[A.length-1]&-2147483648?-1:0)};function w(E,g){return E.add(R(g))}t.j=function(E){if(S(this)||S(E))return d;if(x(this))return x(E)?R(this).j(R(E)):R(R(this).j(E));if(x(E))return R(this.j(R(E)));if(0>this.l(y)&&0>E.l(y))return c(this.m()*E.m());for(var g=this.g.length+E.g.length,A=[],I=0;I<2*g;I++)A[I]=0;for(I=0;I<this.g.length;I++)for(var P=0;P<E.g.length;P++){var V=this.i(I)>>>16,C=this.i(I)&65535,He=E.i(P)>>>16,Ft=E.i(P)&65535;A[2*I+2*P]+=C*Ft,v(A,2*I+2*P),A[2*I+2*P+1]+=V*Ft,v(A,2*I+2*P+1),A[2*I+2*P+1]+=C*He,v(A,2*I+2*P+1),A[2*I+2*P+2]+=V*He,v(A,2*I+2*P+2)}for(I=0;I<g;I++)A[I]=A[2*I+1]<<16|A[2*I];for(I=g;I<2*g;I++)A[I]=0;return new o(A,0)};function v(E,g){for(;(E[g]&65535)!=E[g];)E[g+1]+=E[g]>>>16,E[g]&=65535,g++}function T(E,g){this.g=E,this.h=g}function k(E,g){if(S(g))throw Error("division by zero");if(S(E))return new T(d,d);if(x(E))return g=k(R(E),g),new T(R(g.g),R(g.h));if(x(g))return g=k(E,R(g)),new T(R(g.g),g.h);if(30<E.g.length){if(x(E)||x(g))throw Error("slowDivide_ only works with positive integers.");for(var A=p,I=g;0>=I.l(E);)A=b(A),I=b(I);var P=M(A,1),V=M(I,1);for(I=M(I,2),A=M(A,2);!S(I);){var C=V.add(I);0>=C.l(E)&&(P=P.add(A),V=C),I=M(I,1),A=M(A,1)}return g=w(E,P.j(g)),new T(P,g)}for(P=d;0<=E.l(g);){for(A=Math.max(1,Math.floor(E.m()/g.m())),I=Math.ceil(Math.log(A)/Math.LN2),I=48>=I?1:Math.pow(2,I-48),V=c(A),C=V.j(g);x(C)||0<C.l(E);)A-=I,V=c(A),C=V.j(g);S(V)&&(V=p),P=P.add(V),E=w(E,C)}return new T(P,E)}t.A=function(E){return k(this,E).h},t.and=function(E){for(var g=Math.max(this.g.length,E.g.length),A=[],I=0;I<g;I++)A[I]=this.i(I)&E.i(I);return new o(A,this.h&E.h)},t.or=function(E){for(var g=Math.max(this.g.length,E.g.length),A=[],I=0;I<g;I++)A[I]=this.i(I)|E.i(I);return new o(A,this.h|E.h)},t.xor=function(E){for(var g=Math.max(this.g.length,E.g.length),A=[],I=0;I<g;I++)A[I]=this.i(I)^E.i(I);return new o(A,this.h^E.h)};function b(E){for(var g=E.g.length+1,A=[],I=0;I<g;I++)A[I]=E.i(I)<<1|E.i(I-1)>>>31;return new o(A,E.h)}function M(E,g){var A=g>>5;g%=32;for(var I=E.g.length-A,P=[],V=0;V<I;V++)P[V]=0<g?E.i(V+A)>>>g|E.i(V+A+1)<<32-g:E.i(V+A);return new o(P,E.h)}r.prototype.digest=r.prototype.v,r.prototype.reset=r.prototype.s,r.prototype.update=r.prototype.u,pT=r,o.prototype.add=o.prototype.add,o.prototype.multiply=o.prototype.j,o.prototype.modulo=o.prototype.A,o.prototype.compare=o.prototype.l,o.prototype.toNumber=o.prototype.m,o.prototype.toString=o.prototype.toString,o.prototype.getBits=o.prototype.i,o.fromNumber=c,o.fromString=f,Rr=o}).apply(typeof Qv<"u"?Qv:typeof self<"u"?self:typeof window<"u"?window:{});var Al=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};/** @license
648Copyright The Closure Library Authors.
649SPDX-License-Identifier: Apache-2.0
650*/var mT,So,gT,Zl,vd,yT,vT,_T;(function(){var t,e=typeof Object.defineProperties=="function"?Object.defineProperty:function(a,h,m){return a==Array.prototype||a==Object.prototype||(a[h]=m.value),a};function n(a){a=[typeof globalThis=="object"&&globalThis,a,typeof window=="object"&&window,typeof self=="object"&&self,typeof Al=="object"&&Al];for(var h=0;h<a.length;++h){var m=a[h];if(m&&m.Math==Math)return m}throw Error("Cannot find global object")}var r=n(this);function i(a,h){if(h)e:{var m=r;a=a.split(".");for(var _=0;_<a.length-1;_++){var D=a[_];if(!(D in m))break e;m=m[D]}a=a[a.length-1],_=m[a],h=h(_),h!=_&&h!=null&&e(m,a,{configurable:!0,writable:!0,value:h})}}function s(a,h){a instanceof String&&(a+="");var m=0,_=!1,D={next:function(){if(!_&&m<a.length){var L=m++;return{value:h(L,a[L]),done:!1}}return _=!0,{done:!0,value:void 0}}};return D[Symbol.iterator]=function(){return D},D}i("Array.prototype.values",function(a){return a||function(){return s(this,function(h,m){return m})}});/** @license
651
652 Copyright The Closure Library Authors.
653 SPDX-License-Identifier: Apache-2.0
654*/var o=o||{},l=this||self;function u(a){var h=typeof a;return h=h!="object"?h:a?Array.isArray(a)?"array":h:"null",h=="array"||h=="object"&&typeof a.length=="number"}function c(a){var h=typeof a;return h=="object"&&a!=null||h=="function"}function f(a,h,m){return a.call.apply(a.bind,arguments)}function d(a,h,m){if(!a)throw Error();if(2<arguments.length){var _=Array.prototype.slice.call(arguments,2);return function(){var D=Array.prototype.slice.call(arguments);return Array.prototype.unshift.apply(D,_),a.apply(h,D)}}return function(){return a.apply(h,arguments)}}function p(a,h,m){return p=Function.prototype.bind&&Function.prototype.bind.toString().indexOf("native code")!=-1?f:d,p.apply(null,arguments)}function y(a,h){var m=Array.prototype.slice.call(arguments,1);return function(){var _=m.slice();return _.push.apply(_,arguments),a.apply(this,_)}}function S(a,h){function m(){}m.prototype=h.prototype,a.aa=h.prototype,a.prototype=new m,a.prototype.constructor=a,a.Qb=function(_,D,L){for(var $=Array(arguments.length-2),_e=2;_e<arguments.length;_e++)$[_e-2]=arguments[_e];return h.prototype[D].apply(_,$)}}function x(a){const h=a.length;if(0<h){const m=Array(h);for(let _=0;_<h;_++)m[_]=a[_];return m}return[]}function R(a,h){for(let m=1;m<arguments.length;m++){const _=arguments[m];if(u(_)){const D=a.length||0,L=_.length||0;a.length=D+L;for(let $=0;$<L;$++)a[D+$]=_[$]}else a.push(_)}}class w{constructor(h,m){this.i=h,this.j=m,this.h=0,this.g=null}get(){let h;return 0<this.h?(this.h--,h=this.g,this.g=h.next,h.next=null):h=this.i(),h}}function v(a){return/^[\s\xa0]*$/.test(a)}function T(){var a=l.navigator;return a&&(a=a.userAgent)?a:""}function k(a){return k[" "](a),a}k[" "]=function(){};var b=T().indexOf("Gecko")!=-1&&!(T().toLowerCase().indexOf("webkit")!=-1&&T().indexOf("Edge")==-1)&&!(T().indexOf("Trident")!=-1||T().indexOf("MSIE")!=-1)&&T().indexOf("Edge")==-1;function M(a,h,m){for(const _ in a)h.call(m,a[_],_,a)}function E(a,h){for(const m in a)h.call(void 0,a[m],m,a)}function g(a){const h={};for(const m in a)h[m]=a[m];return h}const A="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");function I(a,h){let m,_;for(let D=1;D<arguments.length;D++){_=arguments[D];for(m in _)a[m]=_[m];for(let L=0;L<A.length;L++)m=A[L],Object.prototype.hasOwnProperty.call(_,m)&&(a[m]=_[m])}}function P(a){var h=1;a=a.split(":");const m=[];for(;0<h&&a.length;)m.push(a.shift()),h--;return a.length&&m.push(a.join(":")),m}function V(a){l.setTimeout(()=>{throw a},0)}function C(){var a=G;let h=null;return a.g&&(h=a.g,a.g=a.g.next,a.g||(a.h=null),h.next=null),h}class He{constructor(){this.h=this.g=null}add(h,m){const _=Ft.get();_.set(h,m),this.h?this.h.next=_:this.g=_,this.h=_}}var Ft=new w(()=>new un,a=>a.reset());class un{constructor(){this.next=this.g=this.h=null}set(h,m){this.h=h,this.g=m,this.next=null}reset(){this.next=this.g=this.h=null}}let de,U=!1,G=new He,X=()=>{const a=l.Promise.resolve(void 0);de=()=>{a.then(pe)}};var pe=()=>{for(var a;a=C();){try{a.h.call(a.g)}catch(m){V(m)}var h=Ft;h.j(a),100>h.h&&(h.h++,a.next=h.g,h.g=a)}U=!1};function oe(){this.s=this.s,this.C=this.C}oe.prototype.s=!1,oe.prototype.ma=function(){this.s||(this.s=!0,this.N())},oe.prototype.N=function(){if(this.C)for(;this.C.length;)this.C.shift()()};function we(a,h){this.type=a,this.g=this.target=h,this.defaultPrevented=!1}we.prototype.h=function(){this.defaultPrevented=!0};var St=function(){if(!l.addEventListener||!Object.defineProperty)return!1;var a=!1,h=Object.defineProperty({},"passive",{get:function(){a=!0}});try{const m=()=>{};l.addEventListener("test",m,h),l.removeEventListener("test",m,h)}catch{}return a}();function ct(a,h){if(we.call(this,a?a.type:""),this.relatedTarget=this.g=this.target=null,this.button=this.screenY=this.screenX=this.clientY=this.clientX=0,this.key="",this.metaKey=this.shiftKey=this.altKey=this.ctrlKey=!1,this.state=null,this.pointerId=0,this.pointerType="",this.i=null,a){var m=this.type=a.type,_=a.changedTouches&&a.changedTouches.length?a.changedTouches[0]:null;if(this.target=a.target||a.srcElement,this.g=h,h=a.relatedTarget){if(b){e:{try{k(h.nodeName);var D=!0;break e}catch{}D=!1}D||(h=null)}}else m=="mouseover"?h=a.fromElement:m=="mouseout"&&(h=a.toElement);this.relatedTarget=h,_?(this.clientX=_.clientX!==void 0?_.clientX:_.pageX,this.clientY=_.clientY!==void 0?_.clientY:_.pageY,this.screenX=_.screenX||0,this.screenY=_.screenY||0):(this.clientX=a.clientX!==void 0?a.clientX:a.pageX,this.clientY=a.clientY!==void 0?a.clientY:a.pageY,this.screenX=a.screenX||0,this.screenY=a.screenY||0),this.button=a.button,this.key=a.key||"",this.ctrlKey=a.ctrlKey,this.altKey=a.altKey,this.shiftKey=a.shiftKey,this.metaKey=a.metaKey,this.pointerId=a.pointerId||0,this.pointerType=typeof a.pointerType=="string"?a.pointerType:Je[a.pointerType]||"",this.state=a.state,this.i=a,a.defaultPrevented&&ct.aa.h.call(this)}}S(ct,we);var Je={2:"touch",3:"pen",4:"mouse"};ct.prototype.h=function(){ct.aa.h.call(this);var a=this.i;a.preventDefault?a.preventDefault():a.returnValue=!1};var et="closure_listenable_"+(1e6*Math.random()|0),Ln=0;function cn(a,h,m,_,D){this.listener=a,this.proxy=null,this.src=h,this.type=m,this.capture=!!_,this.ha=D,this.key=++Ln,this.da=this.fa=!1}function Sn(a){a.da=!0,a.listener=null,a.proxy=null,a.src=null,a.ha=null}function jt(a){this.src=a,this.g={},this.h=0}jt.prototype.add=function(a,h,m,_,D){var L=a.toString();a=this.g[L],a||(a=this.g[L]=[],this.h++);var $=z(a,h,_,D);return-1<$?(h=a[$],m||(h.fa=!1)):(h=new cn(h,this.src,L,!!_,D),h.fa=m,a.push(h)),h};function kt(a,h){var m=h.type;if(m in a.g){var _=a.g[m],D=Array.prototype.indexOf.call(_,h,void 0),L;(L=0<=D)&&Array.prototype.splice.call(_,D,1),L&&(Sn(h),a.g[m].length==0&&(delete a.g[m],a.h--))}}function z(a,h,m,_){for(var D=0;D<a.length;++D){var L=a[D];if(!L.da&&L.listener==h&&L.capture==!!m&&L.ha==_)return D}return-1}var q="closure_lm_"+(1e6*Math.random()|0),ee={};function ne(a,h,m,_,D){if(Array.isArray(h)){for(var L=0;L<h.length;L++)ne(a,h[L],m,_,D);return null}return m=yg(m),a&&a[et]?a.K(h,m,c(_)?!!_.capture:!1,D):me(a,h,m,!1,_,D)}function me(a,h,m,_,D,L){if(!h)throw Error("Invalid event type");var $=c(D)?!!D.capture:!!D,_e=Kc(a);if(_e||(a[q]=_e=new jt(a)),m=_e.add(h,m,_,$,L),m.proxy)return m;if(_=tt(),m.proxy=_,_.src=a,_.listener=m,a.addEventListener)St||(D=$),D===void 0&&(D=!1),a.addEventListener(h.toString(),_,D);else if(a.attachEvent)a.attachEvent(gg(h.toString()),_);else if(a.addListener&&a.removeListener)a.addListener(_);else throw Error("addEventListener and attachEvent are unavailable.");return m}function tt(){function a(m){return h.call(a.src,a.listener,m)}const h=_I;return a}function rr(a,h,m,_,D){if(Array.isArray(h))for(var L=0;L<h.length;L++)rr(a,h[L],m,_,D);else _=c(_)?!!_.capture:!!_,m=yg(m),a&&a[et]?(a=a.i,h=String(h).toString(),h in a.g&&(L=a.g[h],m=z(L,m,_,D),-1<m&&(Sn(L[m]),Array.prototype.splice.call(L,m,1),L.length==0&&(delete a.g[h],a.h--)))):a&&(a=Kc(a))&&(h=a.g[h.toString()],a=-1,h&&(a=z(h,m,_,D)),(m=-1<a?h[a]:null)&&qs(m))}function qs(a){if(typeof a!="number"&&a&&!a.da){var h=a.src;if(h&&h[et])kt(h.i,a);else{var m=a.type,_=a.proxy;h.removeEventListener?h.removeEventListener(m,_,a.capture):h.detachEvent?h.detachEvent(gg(m),_):h.addListener&&h.removeListener&&h.removeListener(_),(m=Kc(h))?(kt(m,a),m.h==0&&(m.src=null,h[q]=null)):Sn(a)}}}function gg(a){return a in ee?ee[a]:ee[a]="on"+a}function _I(a,h){if(a.da)a=!0;else{h=new ct(h,this);var m=a.listener,_=a.ha||a.src;a.fa&&qs(a),a=m.call(_,h)}return a}function Kc(a){return a=a[q],a instanceof jt?a:null}var Gc="__closure_events_fn_"+(1e9*Math.random()>>>0);function yg(a){return typeof a=="function"?a:(a[Gc]||(a[Gc]=function(h){return a.handleEvent(h)}),a[Gc])}function ht(){oe.call(this),this.i=new jt(this),this.M=this,this.F=null}S(ht,oe),ht.prototype[et]=!0,ht.prototype.removeEventListener=function(a,h,m,_){rr(this,a,h,m,_)};function At(a,h){var m,_=a.F;if(_)for(m=[];_;_=_.F)m.push(_);if(a=a.M,_=h.type||h,typeof h=="string")h=new we(h,a);else if(h instanceof we)h.target=h.target||a;else{var D=h;h=new we(_,a),I(h,D)}if(D=!0,m)for(var L=m.length-1;0<=L;L--){var $=h.g=m[L];D=Ua($,_,!0,h)&&D}if($=h.g=a,D=Ua($,_,!0,h)&&D,D=Ua($,_,!1,h)&&D,m)for(L=0;L<m.length;L++)$=h.g=m[L],D=Ua($,_,!1,h)&&D}ht.prototype.N=function(){if(ht.aa.N.call(this),this.i){var a=this.i,h;for(h in a.g){for(var m=a.g[h],_=0;_<m.length;_++)Sn(m[_]);delete a.g[h],a.h--}}this.F=null},ht.prototype.K=function(a,h,m,_){return this.i.add(String(a),h,!1,m,_)},ht.prototype.L=function(a,h,m,_){return this.i.add(String(a),h,!0,m,_)};function Ua(a,h,m,_){if(h=a.i.g[String(h)],!h)return!0;h=h.concat();for(var D=!0,L=0;L<h.length;++L){var $=h[L];if($&&!$.da&&$.capture==m){var _e=$.listener,nt=$.ha||$.src;$.fa&&kt(a.i,$),D=_e.call(nt,_)!==!1&&D}}return D&&!_.defaultPrevented}function vg(a,h,m){if(typeof a=="function")m&&(a=p(a,m));else if(a&&typeof a.handleEvent=="function")a=p(a.handleEvent,a);else throw Error("Invalid listener argument");return 2147483647<Number(h)?-1:l.setTimeout(a,h||0)}function _g(a){a.g=vg(()=>{a.g=null,a.i&&(a.i=!1,_g(a))},a.l);const h=a.h;a.h=null,a.m.apply(null,h)}class wI extends oe{constructor(h,m){super(),this.m=h,this.l=m,this.h=null,this.i=!1,this.g=null}j(h){this.h=arguments,this.g?this.i=!0:_g(this)}N(){super.N(),this.g&&(l.clearTimeout(this.g),this.g=null,this.i=!1,this.h=null)}}function Qs(a){oe.call(this),this.h=a,this.g={}}S(Qs,oe);var wg=[];function Eg(a){M(a.g,function(h,m){this.g.hasOwnProperty(m)&&qs(h)},a),a.g={}}Qs.prototype.N=function(){Qs.aa.N.call(this),Eg(this)},Qs.prototype.handleEvent=function(){throw Error("EventHandler.handleEvent not implemented")};var qc=l.JSON.stringify,EI=l.JSON.parse,TI=class{stringify(a){return l.JSON.stringify(a,void 0)}parse(a){return l.JSON.parse(a,void 0)}};function Qc(){}Qc.prototype.h=null;function Tg(a){return a.h||(a.h=a.i())}function Sg(){}var Ys={OPEN:"a",kb:"b",Ja:"c",wb:"d"};function Yc(){we.call(this,"d")}S(Yc,we);function Xc(){we.call(this,"c")}S(Xc,we);var Gr={},Ag=null;function $a(){return Ag=Ag||new ht}Gr.La="serverreachability";function Ig(a){we.call(this,Gr.La,a)}S(Ig,we);function Xs(a){const h=$a();At(h,new Ig(h))}Gr.STAT_EVENT="statevent";function xg(a,h){we.call(this,Gr.STAT_EVENT,a),this.stat=h}S(xg,we);function It(a){const h=$a();At(h,new xg(h,a))}Gr.Ma="timingevent";function Cg(a,h){we.call(this,Gr.Ma,a),this.size=h}S(Cg,we);function Zs(a,h){if(typeof a!="function")throw Error("Fn must not be null and must be a function");return l.setTimeout(function(){a()},h)}function Js(){this.g=!0}Js.prototype.xa=function(){this.g=!1};function SI(a,h,m,_,D,L){a.info(function(){if(a.g)if(L)for(var $="",_e=L.split("&"),nt=0;nt<_e.length;nt++){var fe=_e[nt].split("=");if(1<fe.length){var ft=fe[0];fe=fe[1];var dt=ft.split("_");$=2<=dt.length&&dt[1]=="type"?$+(ft+"="+fe+"&"):$+(ft+"=redacted&")}}else $=null;else $=L;return"XMLHTTP REQ ("+_+") [attempt "+D+"]: "+h+`
655`+m+`
656`+$})}function AI(a,h,m,_,D,L,$){a.info(function(){return"XMLHTTP RESP ("+_+") [ attempt "+D+"]: "+h+`
657`+m+`
658`+L+" "+$})}function Ri(a,h,m,_){a.info(function(){return"XMLHTTP TEXT ("+h+"): "+xI(a,m)+(_?" "+_:"")})}function II(a,h){a.info(function(){return"TIMEOUT: "+h})}Js.prototype.info=function(){};function xI(a,h){if(!a.g)return h;if(!h)return null;try{var m=JSON.parse(h);if(m){for(a=0;a<m.length;a++)if(Array.isArray(m[a])){var _=m[a];if(!(2>_.length)){var D=_[1];if(Array.isArray(D)&&!(1>D.length)){var L=D[0];if(L!="noop"&&L!="stop"&&L!="close")for(var $=1;$<D.length;$++)D[$]=""}}}}return qc(m)}catch{return h}}var Ha={NO_ERROR:0,gb:1,tb:2,sb:3,nb:4,rb:5,ub:6,Ia:7,TIMEOUT:8,xb:9},Pg={lb:"complete",Hb:"success",Ja:"error",Ia:"abort",zb:"ready",Ab:"readystatechange",TIMEOUT:"timeout",vb:"incrementaldata",yb:"progress",ob:"downloadprogress",Pb:"uploadprogress"},Zc;function Wa(){}S(Wa,Qc),Wa.prototype.g=function(){return new XMLHttpRequest},Wa.prototype.i=function(){return{}},Zc=new Wa;function ir(a,h,m,_){this.j=a,this.i=h,this.l=m,this.R=_||1,this.U=new Qs(this),this.I=45e3,this.H=null,this.o=!1,this.m=this.A=this.v=this.L=this.F=this.S=this.B=null,this.D=[],this.g=null,this.C=0,this.s=this.u=null,this.X=-1,this.J=!1,this.O=0,this.M=null,this.W=this.K=this.T=this.P=!1,this.h=new Rg}function Rg(){this.i=null,this.g="",this.h=!1}var kg={},Jc={};function eh(a,h,m){a.L=1,a.v=Qa(On(h)),a.m=m,a.P=!0,Vg(a,null)}function Vg(a,h){a.F=Date.now(),Ka(a),a.A=On(a.v);var m=a.A,_=a.R;Array.isArray(_)||(_=[String(_)]),Wg(m.i,"t",_),a.C=0,m=a.j.J,a.h=new Rg,a.g=uy(a.j,m?h:null,!a.m),0<a.O&&(a.M=new wI(p(a.Y,a,a.g),a.O)),h=a.U,m=a.g,_=a.ca;var D="readystatechange";Array.isArray(D)||(D&&(wg[0]=D.toString()),D=wg);for(var L=0;L<D.length;L++){var $=ne(m,D[L],_||h.handleEvent,!1,h.h||h);if(!$)break;h.g[$.key]=$}h=a.H?g(a.H):{},a.m?(a.u||(a.u="POST"),h["Content-Type"]="application/x-www-form-urlencoded",a.g.ea(a.A,a.u,a.m,h)):(a.u="GET",a.g.ea(a.A,a.u,null,h)),Xs(),SI(a.i,a.u,a.A,a.l,a.R,a.m)}ir.prototype.ca=function(a){a=a.target;const h=this.M;h&&Fn(a)==3?h.j():this.Y(a)},ir.prototype.Y=function(a){try{if(a==this.g)e:{const dt=Fn(this.g);var h=this.g.Ba();const Di=this.g.Z();if(!(3>dt)&&(dt!=3||this.g&&(this.h.h||this.g.oa()||Zg(this.g)))){this.J||dt!=4||h==7||(h==8||0>=Di?Xs(3):Xs(2)),th(this);var m=this.g.Z();this.X=m;t:if(Dg(this)){var _=Zg(this.g);a="";var D=_.length,L=Fn(this.g)==4;if(!this.h.i){if(typeof TextDecoder>"u"){qr(this),eo(this);var $="";break t}this.h.i=new l.TextDecoder}for(h=0;h<D;h++)this.h.h=!0,a+=this.h.i.decode(_[h],{stream:!(L&&h==D-1)});_.length=0,this.h.g+=a,this.C=0,$=this.h.g}else $=this.g.oa();if(this.o=m==200,AI(this.i,this.u,this.A,this.l,this.R,dt,m),this.o){if(this.T&&!this.K){t:{if(this.g){var _e,nt=this.g;if((_e=nt.g?nt.g.getResponseHeader("X-HTTP-Initial-Response"):null)&&!v(_e)){var fe=_e;break t}}fe=null}if(m=fe)Ri(this.i,this.l,m,"Initial handshake response via X-HTTP-Initial-Response"),this.K=!0,nh(this,m);else{this.o=!1,this.s=3,It(12),qr(this),eo(this);break e}}if(this.P){m=!0;let hn;for(;!this.J&&this.C<$.length;)if(hn=CI(this,$),hn==Jc){dt==4&&(this.s=4,It(14),m=!1),Ri(this.i,this.l,null,"[Incomplete Response]");break}else if(hn==kg){this.s=4,It(15),Ri(this.i,this.l,$,"[Invalid Chunk]"),m=!1;break}else Ri(this.i,this.l,hn,null),nh(this,hn);if(Dg(this)&&this.C!=0&&(this.h.g=this.h.g.slice(this.C),this.C=0),dt!=4||$.length!=0||this.h.h||(this.s=1,It(16),m=!1),this.o=this.o&&m,!m)Ri(this.i,this.l,$,"[Invalid Chunked Response]"),qr(this),eo(this);else if(0<$.length&&!this.W){this.W=!0;var ft=this.j;ft.g==this&&ft.ba&&!ft.M&&(ft.j.info("Great, no buffering proxy detected. Bytes received: "+$.length),lh(ft),ft.M=!0,It(11))}}else Ri(this.i,this.l,$,null),nh(this,$);dt==4&&qr(this),this.o&&!this.J&&(dt==4?sy(this.j,this):(this.o=!1,Ka(this)))}else HI(this.g),m==400&&0<$.indexOf("Unknown SID")?(this.s=3,It(12)):(this.s=0,It(13)),qr(this),eo(this)}}}catch{}finally{}};function Dg(a){return a.g?a.u=="GET"&&a.L!=2&&a.j.Ca:!1}function CI(a,h){var m=a.C,_=h.indexOf(`
659`,m);return _==-1?Jc:(m=Number(h.substring(m,_)),isNaN(m)?kg:(_+=1,_+m>h.length?Jc:(h=h.slice(_,_+m),a.C=_+m,h)))}ir.prototype.cancel=function(){this.J=!0,qr(this)};function Ka(a){a.S=Date.now()+a.I,bg(a,a.I)}function bg(a,h){if(a.B!=null)throw Error("WatchDog timer not null");a.B=Zs(p(a.ba,a),h)}function th(a){a.B&&(l.clearTimeout(a.B),a.B=null)}ir.prototype.ba=function(){this.B=null;const a=Date.now();0<=a-this.S?(II(this.i,this.A),this.L!=2&&(Xs(),It(17)),qr(this),this.s=2,eo(this)):bg(this,this.S-a)};function eo(a){a.j.G==0||a.J||sy(a.j,a)}function qr(a){th(a);var h=a.M;h&&typeof h.ma=="function"&&h.ma(),a.M=null,Eg(a.U),a.g&&(h=a.g,a.g=null,h.abort(),h.ma())}function nh(a,h){try{var m=a.j;if(m.G!=0&&(m.g==a||rh(m.h,a))){if(!a.K&&rh(m.h,a)&&m.G==3){try{var _=m.Da.g.parse(h)}catch{_=null}if(Array.isArray(_)&&_.length==3){var D=_;if(D[0]==0){e:if(!m.u){if(m.g)if(m.g.F+3e3<a.F)tl(m),Ja(m);else break e;ah(m),It(18)}}else m.za=D[1],0<m.za-m.T&&37500>D[2]&&m.F&&m.v==0&&!m.C&&(m.C=Zs(p(m.Za,m),6e3));if(1>=Lg(m.h)&&m.ca){try{m.ca()}catch{}m.ca=void 0}}else Yr(m,11)}else if((a.K||m.g==a)&&tl(m),!v(h))for(D=m.Da.g.parse(h),h=0;h<D.length;h++){let fe=D[h];if(m.T=fe[0],fe=fe[1],m.G==2)if(fe[0]=="c"){m.K=fe[1],m.ia=fe[2];const ft=fe[3];ft!=null&&(m.la=ft,m.j.info("VER="+m.la));const dt=fe[4];dt!=null&&(m.Aa=dt,m.j.info("SVER="+m.Aa));const Di=fe[5];Di!=null&&typeof Di=="number"&&0<Di&&(_=1.5*Di,m.L=_,m.j.info("backChannelRequestTimeoutMs_="+_)),_=m;const hn=a.g;if(hn){const rl=hn.g?hn.g.getResponseHeader("X-Client-Wire-Protocol"):null;if(rl){var L=_.h;L.g||rl.indexOf("spdy")==-1&&rl.indexOf("quic")==-1&&rl.indexOf("h2")==-1||(L.j=L.l,L.g=new Set,L.h&&(ih(L,L.h),L.h=null))}if(_.D){const uh=hn.g?hn.g.getResponseHeader("X-HTTP-Session-Id"):null;uh&&(_.ya=uh,Te(_.I,_.D,uh))}}m.G=3,m.l&&m.l.ua(),m.ba&&(m.R=Date.now()-a.F,m.j.info("Handshake RTT: "+m.R+"ms")),_=m;var $=a;if(_.qa=ly(_,_.J?_.ia:null,_.W),$.K){Og(_.h,$);var _e=$,nt=_.L;nt&&(_e.I=nt),_e.B&&(th(_e),Ka(_e)),_.g=$}else ry(_);0<m.i.length&&el(m)}else fe[0]!="stop"&&fe[0]!="close"||Yr(m,7);else m.G==3&&(fe[0]=="stop"||fe[0]=="close"?fe[0]=="stop"?Yr(m,7):oh(m):fe[0]!="noop"&&m.l&&m.l.ta(fe),m.v=0)}}Xs(4)}catch{}}var PI=class{constructor(a,h){this.g=a,this.map=h}};function Ng(a){this.l=a||10,l.PerformanceNavigationTiming?(a=l.performance.getEntriesByType("navigation"),a=0<a.length&&(a[0].nextHopProtocol=="hq"||a[0].nextHopProtocol=="h2")):a=!!(l.chrome&&l.chrome.loadTimes&&l.chrome.loadTimes()&&l.chrome.loadTimes().wasFetchedViaSpdy),this.j=a?this.l:1,this.g=null,1<this.j&&(this.g=new Set),this.h=null,this.i=[]}function Mg(a){return a.h?!0:a.g?a.g.size>=a.j:!1}function Lg(a){return a.h?1:a.g?a.g.size:0}function rh(a,h){return a.h?a.h==h:a.g?a.g.has(h):!1}function ih(a,h){a.g?a.g.add(h):a.h=h}function Og(a,h){a.h&&a.h==h?a.h=null:a.g&&a.g.has(h)&&a.g.delete(h)}Ng.prototype.cancel=function(){if(this.i=Fg(this),this.h)this.h.cancel(),this.h=null;else if(this.g&&this.g.size!==0){for(const a of this.g.values())a.cancel();this.g.clear()}};function Fg(a){if(a.h!=null)return a.i.concat(a.h.D);if(a.g!=null&&a.g.size!==0){let h=a.i;for(const m of a.g.values())h=h.concat(m.D);return h}return x(a.i)}function RI(a){if(a.V&&typeof a.V=="function")return a.V();if(typeof Map<"u"&&a instanceof Map||typeof Set<"u"&&a instanceof Set)return Array.from(a.values());if(typeof a=="string")return a.split("");if(u(a)){for(var h=[],m=a.length,_=0;_<m;_++)h.push(a[_]);return h}h=[],m=0;for(_ in a)h[m++]=a[_];return h}function kI(a){if(a.na&&typeof a.na=="function")return a.na();if(!a.V||typeof a.V!="function"){if(typeof Map<"u"&&a instanceof Map)return Array.from(a.keys());if(!(typeof Set<"u"&&a instanceof Set)){if(u(a)||typeof a=="string"){var h=[];a=a.length;for(var m=0;m<a;m++)h.push(m);return h}h=[],m=0;for(const _ in a)h[m++]=_;return h}}}function jg(a,h){if(a.forEach&&typeof a.forEach=="function")a.forEach(h,void 0);else if(u(a)||typeof a=="string")Array.prototype.forEach.call(a,h,void 0);else for(var m=kI(a),_=RI(a),D=_.length,L=0;L<D;L++)h.call(void 0,_[L],m&&m[L],a)}var Bg=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^\\\\/?#]*)@)?([^\\\\/?#]*?)(?::([0-9]+))?(?=[\\\\/?#]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#([\\s\\S]*))?$");function VI(a,h){if(a){a=a.split("&");for(var m=0;m<a.length;m++){var _=a[m].indexOf("="),D=null;if(0<=_){var L=a[m].substring(0,_);D=a[m].substring(_+1)}else L=a[m];h(L,D?decodeURIComponent(D.replace(/\+/g," ")):"")}}}function Qr(a){if(this.g=this.o=this.j="",this.s=null,this.m=this.l="",this.h=!1,a instanceof Qr){this.h=a.h,Ga(this,a.j),this.o=a.o,this.g=a.g,qa(this,a.s),this.l=a.l;var h=a.i,m=new ro;m.i=h.i,h.g&&(m.g=new Map(h.g),m.h=h.h),zg(this,m),this.m=a.m}else a&&(h=String(a).match(Bg))?(this.h=!1,Ga(this,h[1]||"",!0),this.o=to(h[2]||""),this.g=to(h[3]||"",!0),qa(this,h[4]),this.l=to(h[5]||"",!0),zg(this,h[6]||"",!0),this.m=to(h[7]||"")):(this.h=!1,this.i=new ro(null,this.h))}Qr.prototype.toString=function(){var a=[],h=this.j;h&&a.push(no(h,Ug,!0),":");var m=this.g;return(m||h=="file")&&(a.push("//"),(h=this.o)&&a.push(no(h,Ug,!0),"@"),a.push(encodeURIComponent(String(m)).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),m=this.s,m!=null&&a.push(":",String(m))),(m=this.l)&&(this.g&&m.charAt(0)!="/"&&a.push("/"),a.push(no(m,m.charAt(0)=="/"?NI:bI,!0))),(m=this.i.toString())&&a.push("?",m),(m=this.m)&&a.push("#",no(m,LI)),a.join("")};function On(a){return new Qr(a)}function Ga(a,h,m){a.j=m?to(h,!0):h,a.j&&(a.j=a.j.replace(/:$/,""))}function qa(a,h){if(h){if(h=Number(h),isNaN(h)||0>h)throw Error("Bad port number "+h);a.s=h}else a.s=null}function zg(a,h,m){h instanceof ro?(a.i=h,OI(a.i,a.h)):(m||(h=no(h,MI)),a.i=new ro(h,a.h))}function Te(a,h,m){a.i.set(h,m)}function Qa(a){return Te(a,"zx",Math.floor(2147483648*Math.random()).toString(36)+Math.abs(Math.floor(2147483648*Math.random())^Date.now()).toString(36)),a}function to(a,h){return a?h?decodeURI(a.replace(/%25/g,"%2525")):decodeURIComponent(a):""}function no(a,h,m){return typeof a=="string"?(a=encodeURI(a).replace(h,DI),m&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null}function DI(a){return a=a.charCodeAt(0),"%"+(a>>4&15).toString(16)+(a&15).toString(16)}var Ug=/[#\/\?@]/g,bI=/[#\?:]/g,NI=/[#\?]/g,MI=/[#\?@]/g,LI=/#/g;function ro(a,h){this.h=this.g=null,this.i=a||null,this.j=!!h}function sr(a){a.g||(a.g=new Map,a.h=0,a.i&&VI(a.i,function(h,m){a.add(decodeURIComponent(h.replace(/\+/g," ")),m)}))}t=ro.prototype,t.add=function(a,h){sr(this),this.i=null,a=ki(this,a);var m=this.g.get(a);return m||this.g.set(a,m=[]),m.push(h),this.h+=1,this};function $g(a,h){sr(a),h=ki(a,h),a.g.has(h)&&(a.i=null,a.h-=a.g.get(h).length,a.g.delete(h))}function Hg(a,h){return sr(a),h=ki(a,h),a.g.has(h)}t.forEach=function(a,h){sr(this),this.g.forEach(function(m,_){m.forEach(function(D){a.call(h,D,_,this)},this)},this)},t.na=function(){sr(this);const a=Array.from(this.g.values()),h=Array.from(this.g.keys()),m=[];for(let _=0;_<h.length;_++){const D=a[_];for(let L=0;L<D.length;L++)m.push(h[_])}return m},t.V=function(a){sr(this);let h=[];if(typeof a=="string")Hg(this,a)&&(h=h.concat(this.g.get(ki(this,a))));else{a=Array.from(this.g.values());for(let m=0;m<a.length;m++)h=h.concat(a[m])}return h},t.set=function(a,h){return sr(this),this.i=null,a=ki(this,a),Hg(this,a)&&(this.h-=this.g.get(a).length),this.g.set(a,[h]),this.h+=1,this},t.get=function(a,h){return a?(a=this.V(a),0<a.length?String(a[0]):h):h};function Wg(a,h,m){$g(a,h),0<m.length&&(a.i=null,a.g.set(ki(a,h),x(m)),a.h+=m.length)}t.toString=function(){if(this.i)return this.i;if(!this.g)return"";const a=[],h=Array.from(this.g.keys());for(var m=0;m<h.length;m++){var _=h[m];const L=encodeURIComponent(String(_)),$=this.V(_);for(_=0;_<$.length;_++){var D=L;$[_]!==""&&(D+="="+encodeURIComponent(String($[_]))),a.push(D)}}return this.i=a.join("&")};function ki(a,h){return h=String(h),a.j&&(h=h.toLowerCase()),h}function OI(a,h){h&&!a.j&&(sr(a),a.i=null,a.g.forEach(function(m,_){var D=_.toLowerCase();_!=D&&($g(this,_),Wg(this,D,m))},a)),a.j=h}function FI(a,h){const m=new Js;if(l.Image){const _=new Image;_.onload=y(or,m,"TestLoadImage: loaded",!0,h,_),_.onerror=y(or,m,"TestLoadImage: error",!1,h,_),_.onabort=y(or,m,"TestLoadImage: abort",!1,h,_),_.ontimeout=y(or,m,"TestLoadImage: timeout",!1,h,_),l.setTimeout(function(){_.ontimeout&&_.ontimeout()},1e4),_.src=a}else h(!1)}function jI(a,h){const m=new Js,_=new AbortController,D=setTimeout(()=>{_.abort(),or(m,"TestPingServer: timeout",!1,h)},1e4);fetch(a,{signal:_.signal}).then(L=>{clearTimeout(D),L.ok?or(m,"TestPingServer: ok",!0,h):or(m,"TestPingServer: server error",!1,h)}).catch(()=>{clearTimeout(D),or(m,"TestPingServer: error",!1,h)})}function or(a,h,m,_,D){try{D&&(D.onload=null,D.onerror=null,D.onabort=null,D.ontimeout=null),_(m)}catch{}}function BI(){this.g=new TI}function zI(a,h,m){const _=m||"";try{jg(a,function(D,L){let $=D;c(D)&&($=qc(D)),h.push(_+L+"="+encodeURIComponent($))})}catch(D){throw h.push(_+"type="+encodeURIComponent("_badmap")),D}}function Ya(a){this.l=a.Ub||null,this.j=a.eb||!1}S(Ya,Qc),Ya.prototype.g=function(){return new Xa(this.l,this.j)},Ya.prototype.i=function(a){return function(){return a}}({});function Xa(a,h){ht.call(this),this.D=a,this.o=h,this.m=void 0,this.status=this.readyState=0,this.responseType=this.responseText=this.response=this.statusText="",this.onreadystatechange=null,this.u=new Headers,this.h=null,this.B="GET",this.A="",this.g=!1,this.v=this.j=this.l=null}S(Xa,ht),t=Xa.prototype,t.open=function(a,h){if(this.readyState!=0)throw this.abort(),Error("Error reopening a connection");this.B=a,this.A=h,this.readyState=1,so(this)},t.send=function(a){if(this.readyState!=1)throw this.abort(),Error("need to call open() first. ");this.g=!0;const h={headers:this.u,method:this.B,credentials:this.m,cache:void 0};a&&(h.body=a),(this.D||l).fetch(new Request(this.A,h)).then(this.Sa.bind(this),this.ga.bind(this))},t.abort=function(){this.response=this.responseText="",this.u=new Headers,this.status=0,this.j&&this.j.cancel("Request was aborted.").catch(()=>{}),1<=this.readyState&&this.g&&this.readyState!=4&&(this.g=!1,io(this)),this.readyState=0},t.Sa=function(a){if(this.g&&(this.l=a,this.h||(this.status=this.l.status,this.statusText=this.l.statusText,this.h=a.headers,this.readyState=2,so(this)),this.g&&(this.readyState=3,so(this),this.g)))if(this.responseType==="arraybuffer")a.arrayBuffer().then(this.Qa.bind(this),this.ga.bind(this));else if(typeof l.ReadableStream<"u"&&"body"in a){if(this.j=a.body.getReader(),this.o){if(this.responseType)throw Error('responseType must be empty for "streamBinaryChunks" mode responses.');this.response=[]}else this.response=this.responseText="",this.v=new TextDecoder;Kg(this)}else a.text().then(this.Ra.bind(this),this.ga.bind(this))};function Kg(a){a.j.read().then(a.Pa.bind(a)).catch(a.ga.bind(a))}t.Pa=function(a){if(this.g){if(this.o&&a.value)this.response.push(a.value);else if(!this.o){var h=a.value?a.value:new Uint8Array(0);(h=this.v.decode(h,{stream:!a.done}))&&(this.response=this.responseText+=h)}a.done?io(this):so(this),this.readyState==3&&Kg(this)}},t.Ra=function(a){this.g&&(this.response=this.responseText=a,io(this))},t.Qa=function(a){this.g&&(this.response=a,io(this))},t.ga=function(){this.g&&io(this)};function io(a){a.readyState=4,a.l=null,a.j=null,a.v=null,so(a)}t.setRequestHeader=function(a,h){this.u.append(a,h)},t.getResponseHeader=function(a){return this.h&&this.h.get(a.toLowerCase())||""},t.getAllResponseHeaders=function(){if(!this.h)return"";const a=[],h=this.h.entries();for(var m=h.next();!m.done;)m=m.value,a.push(m[0]+": "+m[1]),m=h.next();return a.join(`\r
660`)};function so(a){a.onreadystatechange&&a.onreadystatechange.call(a)}Object.defineProperty(Xa.prototype,"withCredentials",{get:function(){return this.m==="include"},set:function(a){this.m=a?"include":"same-origin"}});function Gg(a){let h="";return M(a,function(m,_){h+=_,h+=":",h+=m,h+=`\r
661`}),h}function sh(a,h,m){e:{for(_ in m){var _=!1;break e}_=!0}_||(m=Gg(m),typeof a=="string"?m!=null&&encodeURIComponent(String(m)):Te(a,h,m))}function Ne(a){ht.call(this),this.headers=new Map,this.o=a||null,this.h=!1,this.v=this.g=null,this.D="",this.m=0,this.l="",this.j=this.B=this.u=this.A=!1,this.I=null,this.H="",this.J=!1}S(Ne,ht);var UI=/^https?$/i,$I=["POST","PUT"];t=Ne.prototype,t.Ha=function(a){this.J=a},t.ea=function(a,h,m,_){if(this.g)throw Error("[goog.net.XhrIo] Object is active with another request="+this.D+"; newUri="+a);h=h?h.toUpperCase():"GET",this.D=a,this.l="",this.m=0,this.A=!1,this.h=!0,this.g=this.o?this.o.g():Zc.g(),this.v=this.o?Tg(this.o):Tg(Zc),this.g.onreadystatechange=p(this.Ea,this);try{this.B=!0,this.g.open(h,String(a),!0),this.B=!1}catch(L){qg(this,L);return}if(a=m||"",m=new Map(this.headers),_)if(Object.getPrototypeOf(_)===Object.prototype)for(var D in _)m.set(D,_[D]);else if(typeof _.keys=="function"&&typeof _.get=="function")for(const L of _.keys())m.set(L,_.get(L));else throw Error("Unknown input type for opt_headers: "+String(_));_=Array.from(m.keys()).find(L=>L.toLowerCase()=="content-type"),D=l.FormData&&a instanceof l.FormData,!(0<=Array.prototype.indexOf.call($I,h,void 0))||_||D||m.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8");for(const[L,$]of m)this.g.setRequestHeader(L,$);this.H&&(this.g.responseType=this.H),"withCredentials"in this.g&&this.g.withCredentials!==this.J&&(this.g.withCredentials=this.J);try{Xg(this),this.u=!0,this.g.send(a),this.u=!1}catch(L){qg(this,L)}};function qg(a,h){a.h=!1,a.g&&(a.j=!0,a.g.abort(),a.j=!1),a.l=h,a.m=5,Qg(a),Za(a)}function Qg(a){a.A||(a.A=!0,At(a,"complete"),At(a,"error"))}t.abort=function(a){this.g&&this.h&&(this.h=!1,this.j=!0,this.g.abort(),this.j=!1,this.m=a||7,At(this,"complete"),At(this,"abort"),Za(this))},t.N=function(){this.g&&(this.h&&(this.h=!1,this.j=!0,this.g.abort(),this.j=!1),Za(this,!0)),Ne.aa.N.call(this)},t.Ea=function(){this.s||(this.B||this.u||this.j?Yg(this):this.bb())},t.bb=function(){Yg(this)};function Yg(a){if(a.h&&typeof o<"u"&&(!a.v[1]||Fn(a)!=4||a.Z()!=2)){if(a.u&&Fn(a)==4)vg(a.Ea,0,a);else if(At(a,"readystatechange"),Fn(a)==4){a.h=!1;try{const $=a.Z();e:switch($){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:var h=!0;break e;default:h=!1}var m;if(!(m=h)){var _;if(_=$===0){var D=String(a.D).match(Bg)[1]||null;!D&&l.self&&l.self.location&&(D=l.self.location.protocol.slice(0,-1)),_=!UI.test(D?D.toLowerCase():"")}m=_}if(m)At(a,"complete"),At(a,"success");else{a.m=6;try{var L=2<Fn(a)?a.g.statusText:""}catch{L=""}a.l=L+" ["+a.Z()+"]",Qg(a)}}finally{Za(a)}}}}function Za(a,h){if(a.g){Xg(a);const m=a.g,_=a.v[0]?()=>{}:null;a.g=null,a.v=null,h||At(a,"ready");try{m.onreadystatechange=_}catch{}}}function Xg(a){a.I&&(l.clearTimeout(a.I),a.I=null)}t.isActive=function(){return!!this.g};function Fn(a){return a.g?a.g.readyState:0}t.Z=function(){try{return 2<Fn(this)?this.g.status:-1}catch{return-1}},t.oa=function(){try{return this.g?this.g.responseText:""}catch{return""}},t.Oa=function(a){if(this.g){var h=this.g.responseText;return a&&h.indexOf(a)==0&&(h=h.substring(a.length)),EI(h)}};function Zg(a){try{if(!a.g)return null;if("response"in a.g)return a.g.response;switch(a.H){case"":case"text":return a.g.responseText;case"arraybuffer":if("mozResponseArrayBuffer"in a.g)return a.g.mozResponseArrayBuffer}return null}catch{return null}}function HI(a){const h={};a=(a.g&&2<=Fn(a)&&a.g.getAllResponseHeaders()||"").split(`\r
662`);for(let _=0;_<a.length;_++){if(v(a[_]))continue;var m=P(a[_]);const D=m[0];if(m=m[1],typeof m!="string")continue;m=m.trim();const L=h[D]||[];h[D]=L,L.push(m)}E(h,function(_){return _.join(", ")})}t.Ba=function(){return this.m},t.Ka=function(){return typeof this.l=="string"?this.l:String(this.l)};function oo(a,h,m){return m&&m.internalChannelParams&&m.internalChannelParams[a]||h}function Jg(a){this.Aa=0,this.i=[],this.j=new Js,this.ia=this.qa=this.I=this.W=this.g=this.ya=this.D=this.H=this.m=this.S=this.o=null,this.Ya=this.U=0,this.Va=oo("failFast",!1,a),this.F=this.C=this.u=this.s=this.l=null,this.X=!0,this.za=this.T=-1,this.Y=this.v=this.B=0,this.Ta=oo("baseRetryDelayMs",5e3,a),this.cb=oo("retryDelaySeedMs",1e4,a),this.Wa=oo("forwardChannelMaxRetries",2,a),this.wa=oo("forwardChannelRequestTimeoutMs",2e4,a),this.pa=a&&a.xmlHttpFactory||void 0,this.Xa=a&&a.Tb||void 0,this.Ca=a&&a.useFetchStreams||!1,this.L=void 0,this.J=a&&a.supportsCrossDomainXhr||!1,this.K="",this.h=new Ng(a&&a.concurrentRequestLimit),this.Da=new BI,this.P=a&&a.fastHandshake||!1,this.O=a&&a.encodeInitMessageHeaders||!1,this.P&&this.O&&(this.O=!1),this.Ua=a&&a.Rb||!1,a&&a.xa&&this.j.xa(),a&&a.forceLongPolling&&(this.X=!1),this.ba=!this.P&&this.X&&a&&a.detectBufferingProxy||!1,this.ja=void 0,a&&a.longPollingTimeout&&0<a.longPollingTimeout&&(this.ja=a.longPollingTimeout),this.ca=void 0,this.R=0,this.M=!1,this.ka=this.A=null}t=Jg.prototype,t.la=8,t.G=1,t.connect=function(a,h,m,_){It(0),this.W=a,this.H=h||{},m&&_!==void 0&&(this.H.OSID=m,this.H.OAID=_),this.F=this.X,this.I=ly(this,null,this.W),el(this)};function oh(a){if(ey(a),a.G==3){var h=a.U++,m=On(a.I);if(Te(m,"SID",a.K),Te(m,"RID",h),Te(m,"TYPE","terminate"),ao(a,m),h=new ir(a,a.j,h),h.L=2,h.v=Qa(On(m)),m=!1,l.navigator&&l.navigator.sendBeacon)try{m=l.navigator.sendBeacon(h.v.toString(),"")}catch{}!m&&l.Image&&(new Image().src=h.v,m=!0),m||(h.g=uy(h.j,null),h.g.ea(h.v)),h.F=Date.now(),Ka(h)}ay(a)}function Ja(a){a.g&&(lh(a),a.g.cancel(),a.g=null)}function ey(a){Ja(a),a.u&&(l.clearTimeout(a.u),a.u=null),tl(a),a.h.cancel(),a.s&&(typeof a.s=="number"&&l.clearTimeout(a.s),a.s=null)}function el(a){if(!Mg(a.h)&&!a.s){a.s=!0;var h=a.Ga;de||X(),U||(de(),U=!0),G.add(h,a),a.B=0}}function WI(a,h){return Lg(a.h)>=a.h.j-(a.s?1:0)?!1:a.s?(a.i=h.D.concat(a.i),!0):a.G==1||a.G==2||a.B>=(a.Va?0:a.Wa)?!1:(a.s=Zs(p(a.Ga,a,h),oy(a,a.B)),a.B++,!0)}t.Ga=function(a){if(this.s)if(this.s=null,this.G==1){if(!a){this.U=Math.floor(1e5*Math.random()),a=this.U++;const D=new ir(this,this.j,a);let L=this.o;if(this.S&&(L?(L=g(L),I(L,this.S)):L=this.S),this.m!==null||this.O||(D.H=L,L=null),this.P)e:{for(var h=0,m=0;m<this.i.length;m++){t:{var _=this.i[m];if("__data__"in _.map&&(_=_.map.__data__,typeof _=="string")){_=_.length;break t}_=void 0}if(_===void 0)break;if(h+=_,4096<h){h=m;break e}if(h===4096||m===this.i.length-1){h=m+1;break e}}h=1e3}else h=1e3;h=ny(this,D,h),m=On(this.I),Te(m,"RID",a),Te(m,"CVER",22),this.D&&Te(m,"X-HTTP-Session-Id",this.D),ao(this,m),L&&(this.O?h="headers="+encodeURIComponent(String(Gg(L)))+"&"+h:this.m&&sh(m,this.m,L)),ih(this.h,D),this.Ua&&Te(m,"TYPE","init"),this.P?(Te(m,"$req",h),Te(m,"SID","null"),D.T=!0,eh(D,m,null)):eh(D,m,h),this.G=2}}else this.G==3&&(a?ty(this,a):this.i.length==0||Mg(this.h)||ty(this))};function ty(a,h){var m;h?m=h.l:m=a.U++;const _=On(a.I);Te(_,"SID",a.K),Te(_,"RID",m),Te(_,"AID",a.T),ao(a,_),a.m&&a.o&&sh(_,a.m,a.o),m=new ir(a,a.j,m,a.B+1),a.m===null&&(m.H=a.o),h&&(a.i=h.D.concat(a.i)),h=ny(a,m,1e3),m.I=Math.round(.5*a.wa)+Math.round(.5*a.wa*Math.random()),ih(a.h,m),eh(m,_,h)}function ao(a,h){a.H&&M(a.H,function(m,_){Te(h,_,m)}),a.l&&jg({},function(m,_){Te(h,_,m)})}function ny(a,h,m){m=Math.min(a.i.length,m);var _=a.l?p(a.l.Na,a.l,a):null;e:{var D=a.i;let L=-1;for(;;){const $=["count="+m];L==-1?0<m?(L=D[0].g,$.push("ofs="+L)):L=0:$.push("ofs="+L);let _e=!0;for(let nt=0;nt<m;nt++){let fe=D[nt].g;const ft=D[nt].map;if(fe-=L,0>fe)L=Math.max(0,D[nt].g-100),_e=!1;else try{zI(ft,$,"req"+fe+"_")}catch{_&&_(ft)}}if(_e){_=$.join("&");break e}}}return a=a.i.splice(0,m),h.D=a,_}function ry(a){if(!a.g&&!a.u){a.Y=1;var h=a.Fa;de||X(),U||(de(),U=!0),G.add(h,a),a.v=0}}function ah(a){return a.g||a.u||3<=a.v?!1:(a.Y++,a.u=Zs(p(a.Fa,a),oy(a,a.v)),a.v++,!0)}t.Fa=function(){if(this.u=null,iy(this),this.ba&&!(this.M||this.g==null||0>=this.R)){var a=2*this.R;this.j.info("BP detection timer enabled: "+a),this.A=Zs(p(this.ab,this),a)}},t.ab=function(){this.A&&(this.A=null,this.j.info("BP detection timeout reached."),this.j.info("Buffering proxy detected and switch to long-polling!"),this.F=!1,this.M=!0,It(10),Ja(this),iy(this))};function lh(a){a.A!=null&&(l.clearTimeout(a.A),a.A=null)}function iy(a){a.g=new ir(a,a.j,"rpc",a.Y),a.m===null&&(a.g.H=a.o),a.g.O=0;var h=On(a.qa);Te(h,"RID","rpc"),Te(h,"SID",a.K),Te(h,"AID",a.T),Te(h,"CI",a.F?"0":"1"),!a.F&&a.ja&&Te(h,"TO",a.ja),Te(h,"TYPE","xmlhttp"),ao(a,h),a.m&&a.o&&sh(h,a.m,a.o),a.L&&(a.g.I=a.L);var m=a.g;a=a.ia,m.L=1,m.v=Qa(On(h)),m.m=null,m.P=!0,Vg(m,a)}t.Za=function(){this.C!=null&&(this.C=null,Ja(this),ah(this),It(19))};function tl(a){a.C!=null&&(l.clearTimeout(a.C),a.C=null)}function sy(a,h){var m=null;if(a.g==h){tl(a),lh(a),a.g=null;var _=2}else if(rh(a.h,h))m=h.D,Og(a.h,h),_=1;else return;if(a.G!=0){if(h.o)if(_==1){m=h.m?h.m.length:0,h=Date.now()-h.F;var D=a.B;_=$a(),At(_,new Cg(_,m)),el(a)}else ry(a);else if(D=h.s,D==3||D==0&&0<h.X||!(_==1&&WI(a,h)||_==2&&ah(a)))switch(m&&0<m.length&&(h=a.h,h.i=h.i.concat(m)),D){case 1:Yr(a,5);break;case 4:Yr(a,10);break;case 3:Yr(a,6);break;default:Yr(a,2)}}}function oy(a,h){let m=a.Ta+Math.floor(Math.random()*a.cb);return a.isActive()||(m*=2),m*h}function Yr(a,h){if(a.j.info("Error code "+h),h==2){var m=p(a.fb,a),_=a.Xa;const D=!_;_=new Qr(_||"//www.google.com/images/cleardot.gif"),l.location&&l.location.protocol=="http"||Ga(_,"https"),Qa(_),D?FI(_.toString(),m):jI(_.toString(),m)}else It(2);a.G=0,a.l&&a.l.sa(h),ay(a),ey(a)}t.fb=function(a){a?(this.j.info("Successfully pinged google.com"),It(2)):(this.j.info("Failed to ping google.com"),It(1))};function ay(a){if(a.G=0,a.ka=[],a.l){const h=Fg(a.h);(h.length!=0||a.i.length!=0)&&(R(a.ka,h),R(a.ka,a.i),a.h.i.length=0,x(a.i),a.i.length=0),a.l.ra()}}function ly(a,h,m){var _=m instanceof Qr?On(m):new Qr(m);if(_.g!="")h&&(_.g=h+"."+_.g),qa(_,_.s);else{var D=l.location;_=D.protocol,h=h?h+"."+D.hostname:D.hostname,D=+D.port;var L=new Qr(null);_&&Ga(L,_),h&&(L.g=h),D&&qa(L,D),m&&(L.l=m),_=L}return m=a.D,h=a.ya,m&&h&&Te(_,m,h),Te(_,"VER",a.la),ao(a,_),_}function uy(a,h,m){if(h&&!a.J)throw Error("Can't create secondary domain capable XhrIo object.");return h=a.Ca&&!a.pa?new Ne(new Ya({eb:m})):new Ne(a.pa),h.Ha(a.J),h}t.isActive=function(){return!!this.l&&this.l.isActive(this)};function cy(){}t=cy.prototype,t.ua=function(){},t.ta=function(){},t.sa=function(){},t.ra=function(){},t.isActive=function(){return!0},t.Na=function(){};function nl(){}nl.prototype.g=function(a,h){return new Bt(a,h)};function Bt(a,h){ht.call(this),this.g=new Jg(h),this.l=a,this.h=h&&h.messageUrlParams||null,a=h&&h.messageHeaders||null,h&&h.clientProtocolHeaderRequired&&(a?a["X-Client-Protocol"]="webchannel":a={"X-Client-Protocol":"webchannel"}),this.g.o=a,a=h&&h.initMessageHeaders||null,h&&h.messageContentType&&(a?a["X-WebChannel-Content-Type"]=h.messageContentType:a={"X-WebChannel-Content-Type":h.messageContentType}),h&&h.va&&(a?a["X-WebChannel-Client-Profile"]=h.va:a={"X-WebChannel-Client-Profile":h.va}),this.g.S=a,(a=h&&h.Sb)&&!v(a)&&(this.g.m=a),this.v=h&&h.supportsCrossDomainXhr||!1,this.u=h&&h.sendRawJson||!1,(h=h&&h.httpSessionIdParam)&&!v(h)&&(this.g.D=h,a=this.h,a!==null&&h in a&&(a=this.h,h in a&&delete a[h])),this.j=new Vi(this)}S(Bt,ht),Bt.prototype.m=function(){this.g.l=this.j,this.v&&(this.g.J=!0),this.g.connect(this.l,this.h||void 0)},Bt.prototype.close=function(){oh(this.g)},Bt.prototype.o=function(a){var h=this.g;if(typeof a=="string"){var m={};m.__data__=a,a=m}else this.u&&(m={},m.__data__=qc(a),a=m);h.i.push(new PI(h.Ya++,a)),h.G==3&&el(h)},Bt.prototype.N=function(){this.g.l=null,delete this.j,oh(this.g),delete this.g,Bt.aa.N.call(this)};function hy(a){Yc.call(this),a.__headers__&&(this.headers=a.__headers__,this.statusCode=a.__status__,delete a.__headers__,delete a.__status__);var h=a.__sm__;if(h){e:{for(const m in h){a=m;break e}a=void 0}(this.i=a)&&(a=this.i,h=h!==null&&a in h?h[a]:void 0),this.data=h}else this.data=a}S(hy,Yc);function fy(){Xc.call(this),this.status=1}S(fy,Xc);function Vi(a){this.g=a}S(Vi,cy),Vi.prototype.ua=function(){At(this.g,"a")},Vi.prototype.ta=function(a){At(this.g,new hy(a))},Vi.prototype.sa=function(a){At(this.g,new fy)},Vi.prototype.ra=function(){At(this.g,"b")},nl.prototype.createWebChannel=nl.prototype.g,Bt.prototype.send=Bt.prototype.o,Bt.prototype.open=Bt.prototype.m,Bt.prototype.close=Bt.prototype.close,_T=function(){return new nl},vT=function(){return $a()},yT=Gr,vd={mb:0,pb:1,qb:2,Jb:3,Ob:4,Lb:5,Mb:6,Kb:7,Ib:8,Nb:9,PROXY:10,NOPROXY:11,Gb:12,Cb:13,Db:14,Bb:15,Eb:16,Fb:17,ib:18,hb:19,jb:20},Ha.NO_ERROR=0,Ha.TIMEOUT=8,Ha.HTTP_ERROR=6,Zl=Ha,Pg.COMPLETE="complete",gT=Pg,Sg.EventType=Ys,Ys.OPEN="a",Ys.CLOSE="b",Ys.ERROR="c",Ys.MESSAGE="d",ht.prototype.listen=ht.prototype.K,So=Sg,Ne.prototype.listenOnce=Ne.prototype.L,Ne.prototype.getLastError=Ne.prototype.Ka,Ne.prototype.getLastErrorCode=Ne.prototype.Ba,Ne.prototype.getStatus=Ne.prototype.Z,Ne.prototype.getResponseJson=Ne.prototype.Oa,Ne.prototype.getResponseText=Ne.prototype.oa,Ne.prototype.send=Ne.prototype.ea,Ne.prototype.setWithCredentials=Ne.prototype.Ha,mT=Ne}).apply(typeof Al<"u"?Al:typeof self<"u"?self:typeof window<"u"?window:{});const Yv="@firebase/firestore",Xv="4.7.17";/**
663 * @license
664 * Copyright 2017 Google LLC
665 *
666 * Licensed under the Apache License, Version 2.0 (the "License");
667 * you may not use this file except in compliance with the License.
668 * You may obtain a copy of the License at
669 *
670 *   http://www.apache.org/licenses/LICENSE-2.0
671 *
672 * Unless required by applicable law or agreed to in writing, software
673 * distributed under the License is distributed on an "AS IS" BASIS,
674 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
675 * See the License for the specific language governing permissions and
676 * limitations under the License.
677 */class vt{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}}vt.UNAUTHENTICATED=new vt(null),vt.GOOGLE_CREDENTIALS=new vt("google-credentials-uid"),vt.FIRST_PARTY=new vt("first-party-uid"),vt.MOCK_USER=new vt("mock-user");/**
678 * @license
679 * Copyright 2017 Google LLC
680 *
681 * Licensed under the Apache License, Version 2.0 (the "License");
682 * you may not use this file except in compliance with the License.
683 * You may obtain a copy of the License at
684 *
685 *   http://www.apache.org/licenses/LICENSE-2.0
686 *
687 * Unless required by applicable law or agreed to in writing, software
688 * distributed under the License is distributed on an "AS IS" BASIS,
689 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
690 * See the License for the specific language governing permissions and
691 * limitations under the License.
692 */let zs="11.9.0";/**
693 * @license
694 * Copyright 2017 Google LLC
695 *
696 * Licensed under the Apache License, Version 2.0 (the "License");
697 * you may not use this file except in compliance with the License.
698 * You may obtain a copy of the License at
699 *
700 *   http://www.apache.org/licenses/LICENSE-2.0
701 *
702 * Unless required by applicable law or agreed to in writing, software
703 * distributed under the License is distributed on an "AS IS" BASIS,
704 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
705 * See the License for the specific language governing permissions and
706 * limitations under the License.
707 */const wi=new lT("@firebase/firestore");function Li(){return wi.logLevel}function H(t,...e){if(wi.logLevel<=ce.DEBUG){const n=e.map(Zp);wi.debug(`Firestore (${zs}): ${t}`,...n)}}function Jn(t,...e){if(wi.logLevel<=ce.ERROR){const n=e.map(Zp);wi.error(`Firestore (${zs}): ${t}`,...n)}}function xs(t,...e){if(wi.logLevel<=ce.WARN){const n=e.map(Zp);wi.warn(`Firestore (${zs}): ${t}`,...n)}}function Zp(t){if(typeof t=="string")return t;try{/**
708* @license
709* Copyright 2020 Google LLC
710*
711* Licensed under the Apache License, Version 2.0 (the "License");
712* you may not use this file except in compliance with the License.
713* You may obtain a copy of the License at
714*
715*   http://www.apache.org/licenses/LICENSE-2.0
716*
717* Unless required by applicable law or agreed to in writing, software
718* distributed under the License is distributed on an "AS IS" BASIS,
719* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
720* See the License for the specific language governing permissions and
721* limitations under the License.
722*/return function(n){return JSON.stringify(n)}(t)}catch{return t}}/**
723 * @license
724 * Copyright 2017 Google LLC
725 *
726 * Licensed under the Apache License, Version 2.0 (the "License");
727 * you may not use this file except in compliance with the License.
728 * You may obtain a copy of the License at
729 *
730 *   http://www.apache.org/licenses/LICENSE-2.0
731 *
732 * Unless required by applicable law or agreed to in writing, software
733 * distributed under the License is distributed on an "AS IS" BASIS,
734 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
735 * See the License for the specific language governing permissions and
736 * limitations under the License.
737 */function J(t,e,n){let r="Unexpected state";typeof e=="string"?r=e:n=e,wT(t,r,n)}function wT(t,e,n){let r=`FIRESTORE (${zs}) INTERNAL ASSERTION FAILED: ${e} (ID: ${t.toString(16)})`;if(n!==void 0)try{r+=" CONTEXT: "+JSON.stringify(n)}catch{r+=" CONTEXT: "+n}throw Jn(r),new Error(r)}function ye(t,e,n,r){let i="Unexpected state";typeof n=="string"?i=n:r=n,t||wT(e,i,r)}function re(t,e){return t}/**
738 * @license
739 * Copyright 2017 Google LLC
740 *
741 * Licensed under the Apache License, Version 2.0 (the "License");
742 * you may not use this file except in compliance with the License.
743 * You may obtain a copy of the License at
744 *
745 *   http://www.apache.org/licenses/LICENSE-2.0
746 *
747 * Unless required by applicable law or agreed to in writing, software
748 * distributed under the License is distributed on an "AS IS" BASIS,
749 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
750 * See the License for the specific language governing permissions and
751 * limitations under the License.
752 */const F={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 K extends Bs{constructor(e,n){super(e,n),this.code=e,this.message=n,this.toString=()=>`${this.name}: [code=${this.code}]: ${this.message}`}}/**
753 * @license
754 * Copyright 2017 Google LLC
755 *
756 * Licensed under the Apache License, Version 2.0 (the "License");
757 * you may not use this file except in compliance with the License.
758 * You may obtain a copy of the License at
759 *
760 *   http://www.apache.org/licenses/LICENSE-2.0
761 *
762 * Unless required by applicable law or agreed to in writing, software
763 * distributed under the License is distributed on an "AS IS" BASIS,
764 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
765 * See the License for the specific language governing permissions and
766 * limitations under the License.
767 */class kr{constructor(){this.promise=new Promise((e,n)=>{this.resolve=e,this.reject=n})}}/**
768 * @license
769 * Copyright 2017 Google LLC
770 *
771 * Licensed under the Apache License, Version 2.0 (the "License");
772 * you may not use this file except in compliance with the License.
773 * You may obtain a copy of the License at
774 *
775 *   http://www.apache.org/licenses/LICENSE-2.0
776 *
777 * Unless required by applicable law or agreed to in writing, software
778 * distributed under the License is distributed on an "AS IS" BASIS,
779 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
780 * See the License for the specific language governing permissions and
781 * limitations under the License.
782 */class ET{constructor(e,n){this.user=n,this.type="OAuth",this.headers=new Map,this.headers.set("Authorization",`Bearer ${e}`)}}class Uk{getToken(){return Promise.resolve(null)}invalidateToken(){}start(e,n){e.enqueueRetryable(()=>n(vt.UNAUTHENTICATED))}shutdown(){}}class $k{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 Hk{constructor(e){this.t=e,this.currentUser=vt.UNAUTHENTICATED,this.i=0,this.forceRefresh=!1,this.auth=null}start(e,n){ye(this.o===void 0,42304);let r=this.i;const i=u=>this.i!==r?(r=this.i,n(u)):Promise.resolve();let s=new kr;this.o=()=>{this.i++,this.currentUser=this.u(),s.resolve(),s=new kr,e.enqueueRetryable(()=>i(this.currentUser))};const o=()=>{const u=s;e.enqueueRetryable(async()=>{await u.promise,await i(this.currentUser)})},l=u=>{H("FirebaseAuthCredentialsProvider","Auth detected"),this.auth=u,this.o&&(this.auth.addAuthTokenListener(this.o),o())};this.t.onInit(u=>l(u)),setTimeout(()=>{if(!this.auth){const u=this.t.getImmediate({optional:!0});u?l(u):(H("FirebaseAuthCredentialsProvider","Auth not yet detected"),s.resolve(),s=new kr)}},0),o()}getToken(){const e=this.i,n=this.forceRefresh;return this.forceRefresh=!1,this.auth?this.auth.getToken(n).then(r=>this.i!==e?(H("FirebaseAuthCredentialsProvider","getToken aborted due to token change."),this.getToken()):r?(ye(typeof r.accessToken=="string",31837,{l:r}),new ET(r.accessToken,this.currentUser)):null):Promise.resolve(null)}invalidateToken(){this.forceRefresh=!0}shutdown(){this.auth&&this.o&&this.auth.removeAuthTokenListener(this.o),this.o=void 0}u(){const e=this.auth&&this.auth.getUid();return ye(e===null||typeof e=="string",2055,{h:e}),new vt(e)}}class Wk{constructor(e,n,r){this.P=e,this.T=n,this.I=r,this.type="FirstParty",this.user=vt.FIRST_PARTY,this.A=new Map}R(){return this.I?this.I():null}get headers(){this.A.set("X-Goog-AuthUser",this.P);const e=this.R();return e&&this.A.set("Authorization",e),this.T&&this.A.set("X-Goog-Iam-Authorization-Token",this.T),this.A}}class Kk{constructor(e,n,r){this.P=e,this.T=n,this.I=r}getToken(){return Promise.resolve(new Wk(this.P,this.T,this.I))}start(e,n){e.enqueueRetryable(()=>n(vt.FIRST_PARTY))}shutdown(){}invalidateToken(){}}class Zv{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 Gk{constructor(e,n){this.V=n,this.forceRefresh=!1,this.appCheck=null,this.m=null,this.p=null,Ik(e)&&e.settings.appCheckToken&&(this.p=e.settings.appCheckToken)}start(e,n){ye(this.o===void 0,3512);const r=s=>{s.error!=null&&H("FirebaseAppCheckTokenProvider",`Error getting App Check token; using placeholder token instead. Error: ${s.error.message}`);const o=s.token!==this.m;return this.m=s.token,H("FirebaseAppCheckTokenProvider",`Received ${o?"new":"existing"} token.`),o?n(s.token):Promise.resolve()};this.o=s=>{e.enqueueRetryable(()=>r(s))};const i=s=>{H("FirebaseAppCheckTokenProvider","AppCheck detected"),this.appCheck=s,this.o&&this.appCheck.addTokenListener(this.o)};this.V.onInit(s=>i(s)),setTimeout(()=>{if(!this.appCheck){const s=this.V.getImmediate({optional:!0});s?i(s):H("FirebaseAppCheckTokenProvider","AppCheck not yet detected")}},0)}getToken(){if(this.p)return Promise.resolve(new Zv(this.p));const e=this.forceRefresh;return this.forceRefresh=!1,this.appCheck?this.appCheck.getToken(e).then(n=>n?(ye(typeof n.token=="string",44558,{tokenResult:n}),this.m=n.token,new Zv(n.token)):null):Promise.resolve(null)}invalidateToken(){this.forceRefresh=!0}shutdown(){this.appCheck&&this.o&&this.appCheck.removeTokenListener(this.o),this.o=void 0}}/**
783 * @license
784 * Copyright 2020 Google LLC
785 *
786 * Licensed under the Apache License, Version 2.0 (the "License");
787 * you may not use this file except in compliance with the License.
788 * You may obtain a copy of the License at
789 *
790 *   http://www.apache.org/licenses/LICENSE-2.0
791 *
792 * Unless required by applicable law or agreed to in writing, software
793 * distributed under the License is distributed on an "AS IS" BASIS,
794 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
795 * See the License for the specific language governing permissions and
796 * limitations under the License.
797 */function qk(t){const e=typeof self<"u"&&(self.crypto||self.msCrypto),n=new Uint8Array(t);if(e&&typeof e.getRandomValues=="function")e.getRandomValues(n);else for(let r=0;r<t;r++)n[r]=Math.floor(256*Math.random());return n}/**
798 * @license
799 * Copyright 2023 Google LLC
800 *
801 * Licensed under the Apache License, Version 2.0 (the "License");
802 * you may not use this file except in compliance with the License.
803 * You may obtain a copy of the License at
804 *
805 *   http://www.apache.org/licenses/LICENSE-2.0
806 *
807 * Unless required by applicable law or agreed to in writing, software
808 * distributed under the License is distributed on an "AS IS" BASIS,
809 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
810 * See the License for the specific language governing permissions and
811 * limitations under the License.
812 */function TT(){return new TextEncoder}/**
813 * @license
814 * Copyright 2017 Google LLC
815 *
816 * Licensed under the Apache License, Version 2.0 (the "License");
817 * you may not use this file except in compliance with the License.
818 * You may obtain a copy of the License at
819 *
820 *   http://www.apache.org/licenses/LICENSE-2.0
821 *
822 * Unless required by applicable law or agreed to in writing, software
823 * distributed under the License is distributed on an "AS IS" BASIS,
824 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
825 * See the License for the specific language governing permissions and
826 * limitations under the License.
827 */class ST{static newId(){const e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",n=62*Math.floor(4.129032258064516);let r="";for(;r.length<20;){const i=qk(40);for(let s=0;s<i.length;++s)r.length<20&&i[s]<n&&(r+=e.charAt(i[s]%62))}return r}}function se(t,e){return t<e?-1:t>e?1:0}function _d(t,e){let n=0;for(;n<t.length&&n<e.length;){const r=t.codePointAt(n),i=e.codePointAt(n);if(r!==i){if(r<128&&i<128)return se(r,i);{const s=TT(),o=Qk(s.encode(Jv(t,n)),s.encode(Jv(e,n)));return o!==0?o:se(r,i)}}n+=r>65535?2:1}return se(t.length,e.length)}function Jv(t,e){return t.codePointAt(e)>65535?t.substring(e,e+2):t.substring(e,e+1)}function Qk(t,e){for(let n=0;n<t.length&&n<e.length;++n)if(t[n]!==e[n])return se(t[n],e[n]);return se(t.length,e.length)}function Cs(t,e,n){return t.length===e.length&&t.every((r,i)=>n(r,e[i]))}/**
828 * @license
829 * Copyright 2017 Google LLC
830 *
831 * Licensed under the Apache License, Version 2.0 (the "License");
832 * you may not use this file except in compliance with the License.
833 * You may obtain a copy of the License at
834 *
835 *   http://www.apache.org/licenses/LICENSE-2.0
836 *
837 * Unless required by applicable law or agreed to in writing, software
838 * distributed under the License is distributed on an "AS IS" BASIS,
839 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
840 * See the License for the specific language governing permissions and
841 * limitations under the License.
842 */const e0=-62135596800,t0=1e6;class Ge{static now(){return Ge.fromMillis(Date.now())}static fromDate(e){return Ge.fromMillis(e.getTime())}static fromMillis(e){const n=Math.floor(e/1e3),r=Math.floor((e-1e3*n)*t0);return new Ge(n,r)}constructor(e,n){if(this.seconds=e,this.nanoseconds=n,n<0)throw new K(F.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+n);if(n>=1e9)throw new K(F.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+n);if(e<e0)throw new K(F.INVALID_ARGUMENT,"Timestamp seconds out of range: "+e);if(e>=253402300800)throw new K(F.INVALID_ARGUMENT,"Timestamp seconds out of range: "+e)}toDate(){return new Date(this.toMillis())}toMillis(){return 1e3*this.seconds+this.nanoseconds/t0}_compareTo(e){return this.seconds===e.seconds?se(this.nanoseconds,e.nanoseconds):se(this.seconds,e.seconds)}isEqual(e){return e.seconds===this.seconds&&e.nanoseconds===this.nanoseconds}toString(){return"Timestamp(seconds="+this.seconds+", nanoseconds="+this.nanoseconds+")"}toJSON(){return{seconds:this.seconds,nanoseconds:this.nanoseconds}}valueOf(){const e=this.seconds-e0;return String(e).padStart(12,"0")+"."+String(this.nanoseconds).padStart(9,"0")}
vendor: 8,496 bytes, lines 842-921
842}/**
843 * @license
844 * Copyright 2017 Google LLC
845 *
846 * Licensed under the Apache License, Version 2.0 (the "License");
847 * you may not use this file except in compliance with the License.
848 * You may obtain a copy of the License at
849 *
850 *   http://www.apache.org/licenses/LICENSE-2.0
851 *
852 * Unless required by applicable law or agreed to in writing, software
853 * distributed under the License is distributed on an "AS IS" BASIS,
854 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
855 * See the License for the specific language governing permissions and
856 * limitations under the License.
857 */class te{static fromTimestamp(e){return new te(e)}static min(){return new te(new Ge(0,0))}static max(){return new te(new Ge(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}}/**
858 * @license
859 * Copyright 2017 Google LLC
860 *
861 * Licensed under the Apache License, Version 2.0 (the "License");
862 * you may not use this file except in compliance with the License.
863 * You may obtain a copy of the License at
864 *
865 *   http://www.apache.org/licenses/LICENSE-2.0
866 *
867 * Unless required by applicable law or agreed to in writing, software
868 * distributed under the License is distributed on an "AS IS" BASIS,
869 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
870 * See the License for the specific language governing permissions and
871 * limitations under the License.
872 */const n0="__name__";class xn{constructor(e,n,r){n===void 0?n=0:n>e.length&&J(637,{offset:n,range:e.length}),r===void 0?r=e.length-n:r>e.length-n&&J(1746,{length:r,range:e.length-n}),this.segments=e,this.offset=n,this.len=r}get length(){return this.len}isEqual(e){return xn.comparator(this,e)===0}child(e){const n=this.segments.slice(this.offset,this.limit());return e instanceof xn?e.forEach(r=>{n.push(r)}):n.push(e),this.construct(n)}limit(){return this.offset+this.length}popFirst(e){return e=e===void 0?1:e,this.construct(this.segments,this.offset+e,this.length-e)}popLast(){return this.construct(this.segments,this.offset,this.length-1)}firstSegment(){return this.segments[this.offset]}lastSegment(){return this.get(this.length-1)}get(e){return this.segments[this.offset+e]}isEmpty(){return this.length===0}isPrefixOf(e){if(e.length<this.length)return!1;for(let n=0;n<this.length;n++)if(this.get(n)!==e.get(n))return!1;return!0}isImmediateParentOf(e){if(this.length+1!==e.length)return!1;for(let n=0;n<this.length;n++)if(this.get(n)!==e.get(n))return!1;return!0}forEach(e){for(let n=this.offset,r=this.limit();n<r;n++)e(this.segments[n])}toArray(){return this.segments.slice(this.offset,this.limit())}static comparator(e,n){const r=Math.min(e.length,n.length);for(let i=0;i<r;i++){const s=xn.compareSegments(e.get(i),n.get(i));if(s!==0)return s}return se(e.length,n.length)}static compareSegments(e,n){const r=xn.isNumericId(e),i=xn.isNumericId(n);return r&&!i?-1:!r&&i?1:r&&i?xn.extractNumericId(e).compare(xn.extractNumericId(n)):_d(e,n)}static isNumericId(e){return e.startsWith("__id")&&e.endsWith("__")}static extractNumericId(e){return Rr.fromString(e.substring(4,e.length-2))}}class Ie extends xn{construct(e,n,r){return new Ie(e,n,r)}canonicalString(){return this.toArray().join("/")}toString(){return this.canonicalString()}toUriEncodedString(){return this.toArray().map(encodeURIComponent).join("/")}static fromString(...e){const n=[];for(const r of e){if(r.indexOf("//")>=0)throw new K(F.INVALID_ARGUMENT,`Invalid segment (${r}). Paths must not contain // in them.`);n.push(...r.split("/").filter(i=>i.length>0))}return new Ie(n)}static emptyPath(){return new Ie([])}}const Yk=/^[_a-zA-Z][_a-zA-Z0-9]*$/;class ot extends xn{construct(e,n,r){return new ot(e,n,r)}static isValidIdentifier(e){return Yk.test(e)}canonicalString(){return this.toArray().map(e=>(e=e.replace(/\\/g,"\\\\").replace(/`/g,"\\`"),ot.isValidIdentifier(e)||(e="`"+e+"`"),e)).join(".")}toString(){return this.canonicalString()}isKeyField(){return this.length===1&&this.get(0)===n0}static keyField(){return new ot([n0])}static fromServerFormat(e){const n=[];let r="",i=0;const s=()=>{if(r.length===0)throw new K(F.INVALID_ARGUMENT,`Invalid field path (${e}). Paths must not be empty, begin with '.', end with '.', or contain '..'`);n.push(r),r=""};let o=!1;for(;i<e.length;){const l=e[i];if(l==="\\"){if(i+1===e.length)throw new K(F.INVALID_ARGUMENT,"Path has trailing escape character: "+e);const u=e[i+1];if(u!=="\\"&&u!=="."&&u!=="`")throw new K(F.INVALID_ARGUMENT,"Path has invalid escape sequence: "+e);r+=u,i+=2}else l==="`"?(o=!o,i++):l!=="."||o?(r+=l,i++):(s(),i++)}if(s(),o)throw new K(F.INVALID_ARGUMENT,"Unterminated ` in path: "+e);return new ot(n)}static emptyPath(){return new ot([])}}/**
873 * @license
874 * Copyright 2017 Google LLC
875 *
876 * Licensed under the Apache License, Version 2.0 (the "License");
877 * you may not use this file except in compliance with the License.
878 * You may obtain a copy of the License at
879 *
880 *   http://www.apache.org/licenses/LICENSE-2.0
881 *
882 * Unless required by applicable law or agreed to in writing, software
883 * distributed under the License is distributed on an "AS IS" BASIS,
884 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
885 * See the License for the specific language governing permissions and
886 * limitations under the License.
887 */class Q{constructor(e){this.path=e}static fromPath(e){return new Q(Ie.fromString(e))}static fromName(e){return new Q(Ie.fromString(e).popFirst(5))}static empty(){return new Q(Ie.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&&Ie.comparator(this.path,e.path)===0}toString(){return this.path.toString()}static comparator(e,n){return Ie.comparator(e.path,n.path)}static isDocumentKey(e){return e.length%2==0}static fromSegments(e){return new Q(new Ie(e.slice()))}}/**
888 * @license
889 * Copyright 2021 Google LLC
890 *
891 * Licensed under the Apache License, Version 2.0 (the "License");
892 * you may not use this file except in compliance with the License.
893 * You may obtain a copy of the License at
894 *
895 *   http://www.apache.org/licenses/LICENSE-2.0
896 *
897 * Unless required by applicable law or agreed to in writing, software
898 * distributed under the License is distributed on an "AS IS" BASIS,
899 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
900 * See the License for the specific language governing permissions and
901 * limitations under the License.
902 */const ma=-1;function Xk(t,e){const n=t.toTimestamp().seconds,r=t.toTimestamp().nanoseconds+1,i=te.fromTimestamp(r===1e9?new Ge(n+1,0):new Ge(n,r));return new Nr(i,Q.empty(),e)}function Zk(t){return new Nr(t.readTime,t.key,ma)}class Nr{constructor(e,n,r){this.readTime=e,this.documentKey=n,this.largestBatchId=r}static min(){return new Nr(te.min(),Q.empty(),ma)}static max(){return new Nr(te.max(),Q.empty(),ma)}}function Jk(t,e){let n=t.readTime.compareTo(e.readTime);return n!==0?n:(n=Q.comparator(t.documentKey,e.documentKey),n!==0?n:se(t.largestBatchId,e.largestBatchId))}/**
903 * @license
904 * Copyright 2020 Google LLC
905 *
906 * Licensed under the Apache License, Version 2.0 (the "License");
907 * you may not use this file except in compliance with the License.
908 * You may obtain a copy of the License at
909 *
910 *   http://www.apache.org/licenses/LICENSE-2.0
911 *
912 * Unless required by applicable law or agreed to in writing, software
913 * distributed under the License is distributed on an "AS IS" BASIS,
914 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
915 * See the License for the specific language governing permissions and
916 * limitations under the License.
917 */const eV="The current tab is not in the required state to perform this operation. It might be necessary to refresh the browser tab.";class tV{constructor(){this.onCommittedListeners=[]}addOnCommittedListener(e){this.onCommittedListeners.push(e)}raiseOnCommittedEvent(){this.onCommittedListeners.forEach(e=>e())}}/**
918 * @license
919 * Copyright 2017 Google LLC
920 *
921 * Licensed under the Apache License, Version 2.0 (the "License");
922 * you may not use this file except in compliance with the License.
923 * You may obtain a copy of the License at
924 *
925 *   http://www.apache.org/licenses/LICENSE-2.0
926 *
927 * Unless required by applicable law or agreed to in writing, software
928 * distributed under the License is distributed on an "AS IS" BASIS,
929 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
930 * See the License for the specific language governing permissions and
931 * limitations under the License.
932 */async function Us(t){if(t.code!==F.FAILED_PRECONDITION||t.message!==eV)throw t;H("LocalStore","Unexpectedly lost primary lease")}/**
933 * @license
934 * Copyright 2017 Google LLC
935 *
936 * Licensed under the Apache License, Version 2.0 (the "License");
937 * you may not use this file except in compliance with the License.
938 * You may obtain a copy of the License at
939 *
940 *   http://www.apache.org/licenses/LICENSE-2.0
941 *
942 * Unless required by applicable law or agreed to in writing, software
943 * distributed under the License is distributed on an "AS IS" BASIS,
944 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
945 * See the License for the specific language governing permissions and
946 * limitations under the License.
947 */class O{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&&J(59440),this.callbackAttached=!0,this.isDone?this.error?this.wrapFailure(n,this.error):this.wrapSuccess(e,this.result):new O((r,i)=>{this.nextCallback=s=>{this.wrapSuccess(e,s).next(r,i)},this.catchCallback=s=>{this.wrapFailure(n,s).next(r,i)}})}toPromise(){return new Promise((e,n)=>{this.next(e,n)})}wrapUserFunction(e){try{const n=e();return n instanceof O?n:O.resolve(n)}catch(n){return O.reject(n)}}wrapSuccess(e,n){return e?this.wrapUserFunction(()=>e(n)):O.resolve(n)}wrapFailure(e,n){return e?this.wrapUserFunction(()=>e(n)):O.reject(n)}static resolve(e){return new O((n,r)=>{n(e)})}static reject(e){return new O((n,r)=>{r(e)})}static waitFor(e){return new O((n,r)=>{let i=0,s=0,o=!1;e.forEach(l=>{++i,l.next(()=>{++s,o&&s===i&&n()},u=>r(u))}),o=!0,s===i&&n()})}static or(e){let n=O.resolve(!1);for(const r of e)n=n.next(i=>i?O.resolve(i):r());return n}static forEach(e,n){const r=[];return e.forEach((i,s)=>{r.push(n.call(this,i,s))}),this.waitFor(r)}static mapArray(e,n){return new O((r,i)=>{const s=e.length,o=new Array(s);let l=0;for(let u=0;u<s;u++){const c=u;n(e[c]).next(f=>{o[c]=f,++l,l===s&&r(o)},f=>i(f))}})}static doWhile(e,n){return new O((r,i)=>{const s=()=>{e()===!0?n().next(()=>{s()},i):r()};s()})}}function nV(t){const e=t.match(/Android ([\d.]+)/i),n=e?e[1].split(".").slice(0,2).join("."):"-1";return Number(n)}function $s(t){return t.name==="IndexedDbTransactionError"}/**
948 * @license
949 * Copyright 2018 Google LLC
950 *
951 * Licensed under the Apache License, Version 2.0 (the "License");
952 * you may not use this file except in compliance with the License.
953 * You may obtain a copy of the License at
954 *
955 *   http://www.apache.org/licenses/LICENSE-2.0
956 *
957 * Unless required by applicable law or agreed to in writing, software
958 * distributed under the License is distributed on an "AS IS" BASIS,
959 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
960 * See the License for the specific language governing permissions and
961 * limitations under the License.
962 */class Cc{constructor(e,n){this.previousValue=e,n&&(n.sequenceNumberHandler=r=>this.ue(r),this.ce=r=>n.writeSequenceNumber(r))}ue(e){return this.previousValue=Math.max(e,this.previousValue),this.previousValue}next(){const e=++this.previousValue;return this.ce&&this.ce(e),e}}Cc.le=-1;/**
963 * @license
964 * Copyright 2017 Google LLC
965 *
966 * Licensed under the Apache License, Version 2.0 (the "License");
967 * you may not use this file except in compliance with the License.
968 * You may obtain a copy of the License at
969 *
970 *   http://www.apache.org/licenses/LICENSE-2.0
971 *
972 * Unless required by applicable law or agreed to in writing, softw
vendor: 7,578 bytes, lines 972-1022
972are
973 * distributed under the License is distributed on an "AS IS" BASIS,
974 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
975 * See the License for the specific language governing permissions and
976 * limitations under the License.
977 */const Jp=-1;function Pc(t){return t==null}function ju(t){return t===0&&1/t==-1/0}function rV(t){return typeof t=="number"&&Number.isInteger(t)&&!ju(t)&&t<=Number.MAX_SAFE_INTEGER&&t>=Number.MIN_SAFE_INTEGER}/**
978 * @license
979 * Copyright 2017 Google LLC
980 *
981 * Licensed under the Apache License, Version 2.0 (the "License");
982 * you may not use this file except in compliance with the License.
983 * You may obtain a copy of the License at
984 *
985 *   http://www.apache.org/licenses/LICENSE-2.0
986 *
987 * Unless required by applicable law or agreed to in writing, software
988 * distributed under the License is distributed on an "AS IS" BASIS,
989 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
990 * See the License for the specific language governing permissions and
991 * limitations under the License.
992 */const AT="�";function iV(t){let e="";for(let n=0;n<t.length;n++)e.length>0&&(e=r0(e)),e=sV(t.get(n),e);return r0(e)}function sV(t,e){let n=e;const r=t.length;for(let i=0;i<r;i++){const s=t.charAt(i);switch(s){case"\0":n+="��";break;case AT:n+="��";break;default:n+=s}}return n}function r0(t){return t+AT+"�"}/**
993 * @license
994 * Copyright 2017 Google LLC
995 *
996 * Licensed under the Apache License, Version 2.0 (the "License");
997 * you may not use this file except in compliance with the License.
998 * You may obtain a copy of the License at
999 *
1000 *   http://www.apache.org/licenses/LICENSE-2.0
1001 *
1002 * Unless required by applicable law or agreed to in writing, software
1003 * distributed under the License is distributed on an "AS IS" BASIS,
1004 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1005 * See the License for the specific language governing permissions and
1006 * limitations under the License.
1007 */function i0(t){let e=0;for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&e++;return e}function Ai(t,e){for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&e(n,t[n])}function IT(t){for(const e in t)if(Object.prototype.hasOwnProperty.call(t,e))return!1;return!0}/**
1008 * @license
1009 * Copyright 2017 Google LLC
1010 *
1011 * Licensed under the Apache License, Version 2.0 (the "License");
1012 * you may not use this file except in compliance with the License.
1013 * You may obtain a copy of the License at
1014 *
1015 *   http://www.apache.org/licenses/LICENSE-2.0
1016 *
1017 * Unless required by applicable law or agreed to in writing, software
1018 * distributed under the License is distributed on an "AS IS" BASIS,
1019 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1020 * See the License for the specific language governing permissions and
1021 * limitations under the License.
1022 */class be{constructor(e,n){this.comparator=e,this.root=n||st.EMPTY}insert(e,n){return new be(this.comparator,this.root.insert(e,n,this.comparator).copy(null,null,st.BLACK,null,null))}remove(e){return new be(this.comparator,this.root.remove(e,this.comparator).copy(null,null,st.BLACK,null,null))}get(e){let n=this.root;for(;!n.isEmpty();){const r=this.comparator(e,n.key);if(r===0)return n.value;r<0?n=n.left:r>0&&(n=n.right)}return null}indexOf(e){let n=0,r=this.root;for(;!r.isEmpty();){const i=this.comparator(e,r.key);if(i===0)return n+r.left.size;i<0?r=r.left:(n+=r.left.size+1,r=r.right)}return-1}isEmpty(){return this.root.isEmpty()}get size(){return this.root.size}minKey(){return this.root.minKey()}maxKey(){return this.root.maxKey()}inorderTraversal(e){return this.root.inorderTraversal(e)}forEach(e){this.inorderTraversal((n,r)=>(e(n,r),!1))}toString(){const e=[];return this.inorderTraversal((n,r)=>(e.push(`${n}:${r}`),!1)),`{${e.join(", ")}}`}reverseTraversal(e){return this.root.reverseTraversal(e)}getIterator(){return new Il(this.root,null,this.comparator,!1)}getIteratorFrom(e){return new Il(this.root,e,this.comparator,!1)}getReverseIterator(){return new Il(this.root,null,this.comparator,!0)}getReverseIteratorFrom(e){return new Il(this.root,e,this.comparator,!0)}}class Il{constructor(e,n,r,i){this.isReverse=i,this.nodeStack=[];let s=1;for(;!e.isEmpty();)if(s=n?r(e.key,n):1,n&&i&&(s*=-1),s<0)e=this.isReverse?e.left:e.right;else{if(s===0){this.nodeStack.push(e);break}this.nodeStack.push(e),e=this.isReverse?e.right:e.left}}getNext(){let e=this.nodeStack.pop();const n={key:e.key,value:e.value};if(this.isReverse)for(e=e.left;!e.isEmpty();)this.nodeStack.push(e),e=e.right;else for(e=e.right;!e.isEmpty();)this.nodeStack.push(e),e=e.left;return n}hasNext(){return this.nodeStack.length>0}peek(){if(this.nodeStack.length===0)return null;const e=this.nodeStack[this.nodeStack.length-1];return{key:e.key,value:e.value}}}class st{constructor(e,n,r,i,s){this.key=e,this.value=n,this.color=r??st.RED,this.left=i??st.EMPTY,this.right=s??st.EMPTY,this.size=this.left.size+1+this.right.size}copy(e,n,r,i,s){return new st(e??this.key,n??this.value,r??this.color,i??this.left,s??this.right)}isEmpty(){return!1}inorderTraversal(e){return this.left.inorderTraversal(e)||e(this.key,this.value)||this.right.inorderTraversal(e)}reverseTraversal(e){return this.right.reverseTraversal(e)||e(this.key,this.value)||this.left.reverseTraversal(e)}min(){return this.left.isEmpty()?this:this.left.min()}minKey(){return this.min().key}maxKey(){return this.right.isEmpty()?this.key:this.right.maxKey()}insert(e,n,r){let i=this;const s=r(e,i.key);return i=s<0?i.copy(null,null,null,i.left.insert(e,n,r),null):s===0?i.copy(null,n,null,null,null):i.copy(null,null,null,null,i.right.insert(e,n,r)),i.fixUp()}removeMin(){if(this.left.isEmpty())return st.EMPTY;let e=this;return e.left.isRed()||e.left.left.isRed()||(e=e.moveRedLeft()),e=e.copy(null,null,null,e.left.removeMin(),null),e.fixUp()}remove(e,n){let r,i=this;if(n(e,i.key)<0)i.left.isEmpty()||i.left.isRed()||i.left.left.isRed()||(i=i.moveRedLeft()),i=i.copy(null,null,null,i.left.remove(e,n),null);else{if(i.left.isRed()&&(i=i.rotateRight()),i.right.isEmpty()||i.right.isRed()||i.right.left.isRed()||(i=i.moveRedRight()),n(e,i.key)===0){if(i.right.isEmpty())return st.EMPTY;r=i.right.min(),i=i.copy(r.key,r.value,null,null,i.right.removeMin())}i=i.copy(null,null,null,null,i.right.remove(e,n))}return i.fixUp()}isRed(){return this.color}fixUp(){let e=this;return e.right.isRed()&&!e.left.isRed()&&(e=e.rotateLeft()),e.left.isRed()&&e.left.left.isRed()&&(e=e.rotateRight()),e.left.isRed()&&e.right.isRed()&&(e=e.colorFlip()),e}moveRedLeft(){let e=this.colorFlip();return e.right.left.isRed()&&(e=e.copy(null,null,null,null,e.right.rotateRight()),e=e.rotateLeft(),e=e.colorFlip()),e}moveRedRight(){let e=this.colorFlip();return e.left.left.isRed()&&(e=e.rotateRight(),e=e.colorFlip()),e}rotateLeft(){const e=this.copy(null,null,st.RED,null,this.right.left);return this.right.copy(null,null,this.color,e,null)}rotateRight(){const e=this.copy(null,null,st.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 J(43730,{key:this.key,value:this.value});if(this.right.isRed())throw J(14113,{key:this.key,value:this.value});const e=this.left.check();if(e!==this.right.check())throw J(27949);return e+(this.isRed()?0:1)}}st.EMPTY=null,st.RED=!0,st.BLACK=!1;
1022st.EMPTY=new class{constructor(){this.size=0}get key(){throw J(57766)}get value(){throw J(16141)}get color(){throw J(16727)}get left(){throw J(29726)}get right(){throw J(36894)}copy(e,n,r,i,s){return this}insert(e,n,r){return new st(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}};/**
1023 * @license
1024 * Copyright 2017 Google LLC
1025 *
1026 * Licensed under the Apache License, Version 2.0 (the "License");
1027 * you may not use this file except in compliance with the License.
1028 * You may obtain a copy of the License at
1029 *
1030 *   http://www.apache.org/licenses/LICENSE-2.0
1031 *
1032 * Unless required by applicable law or agreed to in writing, software
1033 * distributed under the License is distributed on an "AS IS" BASIS,
1034 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1035 * See the License for the specific language governing permissions and
1036 * limitations under the License.
1037 */class qe{constructor(e){this.comparator=e,this.data=new be(this.comparator)}has(e){return this.data.get(e)!==null}first(){return this.data.minKey()}last(){return this.data.maxKey()}get size(){return this.data.size}indexOf(e){return this.data.indexOf(e)}forEach(e){this.data.inorderTraversal((n,r)=>(e(n),!1))}forEachInRange(e,n){const r=this.data.getIteratorFrom(e[0]);for(;r.hasNext();){const i=r.getNext();if(this.comparator(i.key,e[1])>=0)return;n(i.key)}}forEachWhile(e,n){let r;for(r=n!==void 0?this.data.getIteratorFrom(n):this.data.getIterator();r.hasNext();)if(!e(r.getNext().key))return}firstAfterOrEqual(e){const n=this.data.getIteratorFrom(e);return n.hasNext()?n.getNext().key:null}getIterator(){return new s0(this.data.getIterator())}getIteratorFrom(e){return new s0(this.data.getIteratorFrom(e))}add(e){return this.copy(this.data.remove(e).insert(e,!0))}delete(e){return this.has(e)?this.copy(this.data.remove(e)):this}isEmpty(){return this.data.isEmpty()}unionWith(e){let n=this;return n.size<e.size&&(n=e,e=this),e.forEach(r=>{n=n.add(r)}),n}isEqual(e){if(!(e instanceof qe)||this.size!==e.size)return!1;const n=this.data.getIterator(),r=e.data.getIterator();for(;n.hasNext();){const i=n.getNext().key,s=r.getNext().key;if(this.comparator(i,s)!==0)return!1}return!0}toArray(){const e=[];return this.forEach(n=>{e.push(n)}),e}toString(){const e=[];return this.forEach(n=>e.push(n)),"SortedSet("+e.toString()+")"}copy(e){const n=new qe(this.comparator);return n.data=e,n}}class s0{constructor(e){this.iter=e}getNext(){return this.iter.getNext().key}hasNext(){return this.iter.hasNext()}}/**
1038 * @license
1039 * Copyright 2020 Google LLC
1040 *
1041 * Licensed under the Apache License, Version 2.0 (the "License");
1042 * you may not use this file except in compliance with the License.
1043 * You may obtain a copy of the License at
1044 *
1045 *   http://www.apache.org/licenses/LICENSE-2.0
1046 *
1047 * Unless required by applicable law or agreed to in writing, software
1048 * distributed under the License is distributed on an "AS IS" BASIS,
1049 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1050 * See the License for the specific language governing permissions and
1051 * limitations under the License.
1052 */class yn{constructor(e){this.fields=e,e.sort(ot.comparator)}static empty(){return new yn([])}unionWith(e){let n=new qe(ot.comparator);for(const r of this.fields)n=n.add(r);for(const r of e)n=n.add(r);return new yn(n.toArray())}covers(e){for(const n of this.fields)if(n.isPrefixOf(e))return!0;return!1}isEqual(e){return Cs(this.fields,e.fields,(n,r)=>n.isEqual(r))}}/**
1053 * @license
1054 * Copyright 2023 Google LLC
1055 *
1056 * Licensed under the Apache License, Version 2.0 (the "License");
1057 * you may not use this file except in compliance with the License.
1058 * You may obtain a copy of the License at
1059 *
1060 *   http://www.apache.org/licenses/LICENSE-2.0
1061 *
1062 * Unless required by applicable law or agreed to in writing, software
1063 * distributed under the License is distributed on an "AS IS" BASIS,
1064 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1065 * See the License for the specific language governing permissions and
1066 * limitations under the License.
1067 */class xT extends Error{constructor(){super(...arguments),this.name="Base64DecodeError"}}/**
1068 * @license
1069 * Copyright 2020 Google LLC
1070 *
1071 * Licensed under the Apache License, Version 2.0 (the "License");
1072 * you may not use this file except in compliance with the License.
1073 * You may obtain a copy of the License at
1074 *
1075 *   http://www.apache.org/licenses/LICENSE-2.0
1076 *
1077 * Unless required by applicable law or agreed to in writing, software
1078 * distributed under the License is distributed on an "AS IS" BASIS,
1079 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1080 * See the License for the specific language governing permissions and
1081 * limitations under the License.
1082 */class ut{constructor(e){this.binaryString=e}static fromBase64String(e){const n=function(i){try{return atob(i)}catch(s){throw typeof DOMException<"u"&&s instanceof DOMException?new xT("Invalid base64 string: "+s):s}}(e);return new ut(n)}static fromUint8Array(e){const n=function(i){let s="";for(let o=0;o<i.length;++o)s+=String.fromCharCode(i[o]);return s}(e);return new ut(n)}[Symbol.iterator](){let e=0;return{next:()=>e<this.binaryString.length?{value:this.binaryString.charCodeAt(e++),done:!1}:{value:void 0,done:!0}}}toBase64(){return function(n){return btoa(n)}(this.binaryString)}toUint8Array(){return function(n){const r=new Uint8Array(n.length);for(let i=0;i<n.length;i++)r[i]=n.charCodeAt(i);return r}(this.binaryString)}approximateByteSize(){return 2*this.binaryString.length}compareTo(e){return se(this.binaryString,e.binaryString)}isEqual(e){return this.binaryString===e.binaryString}}ut.EMPTY_BYTE_STRING=new ut("");const oV=new RegExp(/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(?:\.(\d+))?Z$/);function Mr(t){if(ye(!!t,39018),typeof t=="string"){let e=0;const n=oV.exec(t);if(ye(!!n,46558,{timestamp:t}),n[1]){let i=n[1];i=(i+"000000000").substr(0,9),e=Number(i)}const r=new Date(t);return{seconds:Math.floor(r.getTime()/1e3),nanos:e}}return{seconds:Fe(t.seconds),nanos:Fe(t.nanos)}}function Fe(t){return typeof t=="number"?t:typeof t=="string"?Number(t):0}function Lr(t){return typeof t=="string"?ut.fromBase64String(t):ut.fromUint8Array(t)}/**
1083 * @license
1084 * Copyright 2020 Google LLC
1085 *
1086 * Licensed under the Apache License, Version 2.0 (the "License");
1087 * you may not use this file except in compliance with the License.
1088 * You may obtain a copy of the License at
1089 *
1090 *   http://www.apache.org/licenses/LICENSE-2.0
1091 *
1092 * Unless required by applicable law or agreed to in writing, software
1093 * distributed under the License is distributed on an "AS IS" BASIS,
1094 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1095 * See the License for the specific language governing permissions and
1096 * limitations under the License.
1097 */const CT="server_timestamp",PT="__type__",RT="__previous_value__",kT="__local_write_time__";function em(t){var e,n;return((n=(((e=t==null?void 0:t.mapValue)===null||e===void 0?void 0:e.fields)||{})[PT])===null||n===void 0?void 0:n.stringValue)===CT}function Rc(t){const e=t.mapValue.fields[RT];return em(e)?Rc(e):e}function ga(t){const e=Mr(t.mapValue.fields[kT].timestampValue);return new Ge(e.seconds,e.nanos)}/**
1098 * @license
1099 * Copyright 2017 Google LLC
1100 *
1101 * Licensed under the Apache License, Version 2.0 (the "License");
1102 * you may not use this file except in compliance with the License.
1103 * You may obtain a copy of the License at
1104 *
1105 *   http://www.apache.org/licenses/LICENSE-2.0
1106 *
1107 * Unless required by applicable law or agreed to in writing, software
1108 * distributed under the License is distributed on an "AS IS" BASIS,
1109 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1110 * See the License for the specific language governing permissions and
1111 * limitations under the License.
1112 */class aV{constructor(e,n,r,i,s,o,l,u,c,f){this.databaseId=e,this.appId=n,this.persistenceKey=r,this.host=i,this.ssl=s,this.forceLongPolling=o,this.autoDetectLongPolling=l,this.longPollingOptions=u,this.useFetchStreams=c,this.isUsingEmulator=f}}const Bu="(default)";class ya{constructor(e,n){this.projectId=e,this.database=n||Bu}static empty(){return new ya("","")}get isDefaultDatabase(){return this.database===Bu}isEqual(e){return e instanceof ya&&e.projectId===this.projectId&&e.database===this.database}}/**
1113 * @license
1114 * Copyright 2020 Google LLC
1115 *
1116 * Licensed under the Apache License, Version 2.0 (the "License");
1117 * you may not use this file except in compliance with the License.
1118 * You may obtain a copy of the License at
1119 *
1120 *   http://www.apache.org/licenses/LICENSE-2.0
1121 *
1122 * Unless required by applicable law or agreed to in writing, software
1123 * distributed under the License is distributed on an "AS IS" BASIS,
1124 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1125 * See the License for the specific language governing permissions and
1126 * limitations under the License.
1127 */const VT="__type__",lV="__max__",xl={mapValue:{}},DT="__vector__",zu="value";function Or(t){return"nullValue"in t?0:"booleanValue"in t?1:"integerValue"in t||"doubleValue"in t?2:"timestampValue"in t?3:"stringValue"in t?5:"bytesValue"in t?6:"referenceValue"in t?7:"geoPointValue"in t?8:"arrayValue"in t?9:"mapValue"in t?em(t)?4:cV(t)?9007199254740991:uV(t)?10:11:J(28295,{value:t})}function Mn(t,e){if(t===e)return!0;const n=Or(t);if(n!==Or(e))return!1;switch(n){case 0:case 9007199254740991:return!0;case 1:return t.booleanValue===e.booleanValue;case 4:return ga(t).isEqual(ga(e));case 3:return function(i,s){if(typeof i.timestampValue=="string"&&typeof s.timestampValue=="string"&&i.timestampValue.length===s.timestampValue.length)return i.timestampValue===s.timestampValue;const o=Mr(i.timestampValue),l=Mr(s.timestampValue);return o.seconds===l.seconds&&o.nanos===l.nanos}(t,e);case 5:return t.stringValue===e.stringValue;case 6:return function(i,s){return Lr(i.bytesValue).isEqual(Lr(s.bytesValue))}(t,e);case 7:return t.referenceValue===e.referenceValue;case 8:return function(i,s){return Fe(i.geoPointValue.latitude)===Fe(s.geoPointValue.latitude)&&Fe(i.geoPointValue.longitude)===Fe(s.geoPointValue.longitude)}(t,e);case 2:return function(i,s){if("integerValue"in i&&"integerValue"in s)return Fe(i.integerValue)===Fe(s.integerValue);if("doubleValue"in i&&"doubleValue"in s){const o=Fe(i.doubleValue),l=Fe(s.doubleValue);return o===l?ju(o)===ju(l):isNaN(o)&&isNaN(l)}return!1}(t,e);case 9:return Cs(t.arrayValue.values||[],e.arrayValue.values||[],Mn);case 10:case 11:return function(i,s){const o=i.mapValue.fields||{},l=s.mapValue.fields||{};if(i0(o)!==i0(l))return!1;for(const u in o)if(o.hasOwnProperty(u)&&(l[u]===void 0||!Mn(o[u],l[u])))return!1;return!0}(t,e);default:return J(52216,{left:t})}}function va(t,e){return(t.values||[]).find(n=>Mn(n,e))!==void 0}function Ps(t,e){if(t===e)return 0;const n=Or(t),r=Or(e);if(n!==r)return se(n,r);switch(n){case 0:case 9007199254740991:return 0;case 1:return se(t.booleanValue,e.booleanValue);case 2:return function(s,o){const l=Fe(s.integerValue||s.doubleValue),u=Fe(o.integerValue||o.doubleValue);return l<u?-1:l>u?1:l===u?0:isNaN(l)?isNaN(u)?0:-1:1}(t,e);case 3:return o0(t.timestampValue,e.timestampValue);case 4:return o0(ga(t),ga(e));case 5:return _d(t.stringValue,e.stringValue);case 6:return function(s,o){const l=Lr(s),u=Lr(o);return l.compareTo(u)}(t.bytesValue,e.bytesValue);case 7:return function(s,o){const l=s.split("/"),u=o.split("/");for(let c=0;c<l.length&&c<u.length;c++){const f=se(l[c],u[c]);if(f!==0)return f}return se(l.length,u.length)}(t.referenceValue,e.referenceValue);case 8:return function(s,o){const l=se(Fe(s.latitude),Fe(o.latitude));return l!==0?l:se(Fe(s.longitude),Fe(o.longitude))}(t.geoPointValue,e.geoPointValue);case 9:return a0(t.arrayValue,e.arrayValue);case 10:return function(s,o){var l,u,c,f;const d=s.fields||{},p=o.fields||{},y=(l=d[zu])===null||l===void 0?void 0:l.arrayValue,S=(u=p[zu])===null||u===void 0?void 0:u.arrayValue,x=se(((c=y==null?void 0:y.values)===null||c===void 0?void 0:c.length)||0,((f=S==null?void 0:S.values)===null||f===void 0?void 0:f.length)||0);return x!==0?x:a0(y,S)}(t.mapValue,e.mapValue);case 11:return function(s,o){if(s===xl.mapValue&&o===xl.mapValue)return 0;if(s===xl.mapValue)return 1;if(o===xl.mapValue)return-1;const l=s.fields||{},u=Object.keys(l),c=o.fields||{},f=Object.keys(c);u.sort(),f.sort();for(let d=0;d<u.length&&d<f.length;++d){const p=_d(u[d],f[d]);if(p!==0)return p;const y=Ps(l[u[d]],c[f[d]]);if(y!==0)return y}return se(u.length,f.length)}(t.mapValue,e.mapValue);default:throw J(23264,{Pe:n})}}function o0(t,e){if(typeof t=="string"&&typeof e=="string"&&t.length===e.length)return se(t,e);const n=Mr(t),r=Mr(e),i=se(n.seconds,r.seconds);return i!==0?i:se(n.nanos,r.nanos)}function a0(t,e){const n=t.values||[],r=e.values||[];for(let i=0;i<n.length&&i<r.length;++i){const s=Ps(n[i],r[i]);if(s)return s}return se(n.length,r.length)}function Rs(t){return wd(t)}function wd(t){return"nullValue"in t?"null":"booleanValue"in t?""+t.booleanValue:"integerValue"in t?""+t.integerValue:"doubleValue"in t?""+t.doubleValue:"timestampValue"in t?function(n){const r=Mr(n);return`time(${r.seconds},${r.nanos})`}(t.timestampValue):"stringValue"in t?t.stringValue:"bytesValue"in t?function(n){return Lr(n).toBase64()}(t.bytesValue):"referenceValue"in t?function(n){return Q.fromName(n).toString()}(t.referenceValue):"geoPointValue"in t?function(n){return`geo(${n.latitude},${n.longitude})`}(t.geoPointValue):"arrayValue"in t?function(n){let r="[",i=!0;for(const s of n.values||[])i?i=!1:r+=",",r+=wd(s);return r+"]"}(t.arrayValue):"mapValue"in t?function(n){const r=Object.keys(n.fields||{}).sort();let i="{",s=!0;for(const o of r)s?s=!1:i+=",",i+=`${o}:${wd(n.fields[o])}`;return i+"}"}(t.mapValue):J(61005,{value:t})}function Jl(t){switch(Or(t)){case 0:case 1:return 4;case 2:return 8;case 3:case 8:return 16;case 4:const e=Rc(t);return e?16+Jl(e):16;case 5:return 2*t.stringValue.length;case 6:return Lr(t.bytesValue).approximateByteSize();case 7:return t.referenceValue.length;case 9:return function(r){return(r.values||[]).reduce((i,s)=>i+Jl(s),0)}(t.arrayValue);case 10:case 11:return function(r){let i=0;return Ai(r.fields,(s,o)=>
vendor: 7,213 bytes, lines 1127-1182
1127{i+=s.length+Jl(o)}),i}(t.mapValue);default:throw J(13486,{value:t})}}function l0(t,e){return{referenceValue:`projects/${t.projectId}/databases/${t.database}/documents/${e.path.canonicalString()}`}}function Ed(t){return!!t&&"integerValue"in t}function tm(t){return!!t&&"arrayValue"in t}function u0(t){return!!t&&"nullValue"in t}function c0(t){return!!t&&"doubleValue"in t&&isNaN(Number(t.doubleValue))}function eu(t){return!!t&&"mapValue"in t}function uV(t){var e,n;return((n=(((e=t==null?void 0:t.mapValue)===null||e===void 0?void 0:e.fields)||{})[VT])===null||n===void 0?void 0:n.stringValue)===DT}function Bo(t){if(t.geoPointValue)return{geoPointValue:Object.assign({},t.geoPointValue)};if(t.timestampValue&&typeof t.timestampValue=="object")return{timestampValue:Object.assign({},t.timestampValue)};if(t.mapValue){const e={mapValue:{fields:{}}};return Ai(t.mapValue.fields,(n,r)=>e.mapValue.fields[n]=Bo(r)),e}if(t.arrayValue){const e={arrayValue:{values:[]}};for(let n=0;n<(t.arrayValue.values||[]).length;++n)e.arrayValue.values[n]=Bo(t.arrayValue.values[n]);return e}return Object.assign({},t)}function cV(t){return(((t.mapValue||{}).fields||{}).__type__||{}).stringValue===lV}/**
1128 * @license
1129 * Copyright 2017 Google LLC
1130 *
1131 * Licensed under the Apache License, Version 2.0 (the "License");
1132 * you may not use this file except in compliance with the License.
1133 * You may obtain a copy of the License at
1134 *
1135 *   http://www.apache.org/licenses/LICENSE-2.0
1136 *
1137 * Unless required by applicable law or agreed to in writing, software
1138 * distributed under the License is distributed on an "AS IS" BASIS,
1139 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1140 * See the License for the specific language governing permissions and
1141 * limitations under the License.
1142 */class tn{constructor(e){this.value=e}static empty(){return new tn({mapValue:{}})}field(e){if(e.isEmpty())return this.value;{let n=this.value;for(let r=0;r<e.length-1;++r)if(n=(n.mapValue.fields||{})[e.get(r)],!eu(n))return null;return n=(n.mapValue.fields||{})[e.lastSegment()],n||null}}set(e,n){this.getFieldsMap(e.popLast())[e.lastSegment()]=Bo(n)}setAll(e){let n=ot.emptyPath(),r={},i=[];e.forEach((o,l)=>{if(!n.isImmediateParentOf(l)){const u=this.getFieldsMap(n);this.applyChanges(u,r,i),r={},i=[],n=l.popLast()}o?r[l.lastSegment()]=Bo(o):i.push(l.lastSegment())});const s=this.getFieldsMap(n);this.applyChanges(s,r,i)}delete(e){const n=this.field(e.popLast());eu(n)&&n.mapValue.fields&&delete n.mapValue.fields[e.lastSegment()]}isEqual(e){return Mn(this.value,e.value)}getFieldsMap(e){let n=this.value;n.mapValue.fields||(n.mapValue={fields:{}});for(let r=0;r<e.length;++r){let i=n.mapValue.fields[e.get(r)];eu(i)&&i.mapValue.fields||(i={mapValue:{fields:{}}},n.mapValue.fields[e.get(r)]=i),n=i}return n.mapValue.fields}applyChanges(e,n,r){Ai(n,(i,s)=>e[i]=s);for(const i of r)delete e[i]}clone(){return new tn(Bo(this.value))}}function bT(t){const e=[];return Ai(t.fields,(n,r)=>{const i=new ot([n]);if(eu(r)){const s=bT(r.mapValue).fields;if(s.length===0)e.push(i);else for(const o of s)e.push(i.child(o))}else e.push(i)}),new yn(e)}/**
1143 * @license
1144 * Copyright 2017 Google LLC
1145 *
1146 * Licensed under the Apache License, Version 2.0 (the "License");
1147 * you may not use this file except in compliance with the License.
1148 * You may obtain a copy of the License at
1149 *
1150 *   http://www.apache.org/licenses/LICENSE-2.0
1151 *
1152 * Unless required by applicable law or agreed to in writing, software
1153 * distributed under the License is distributed on an "AS IS" BASIS,
1154 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1155 * See the License for the specific language governing permissions and
1156 * limitations under the License.
1157 */class wt{constructor(e,n,r,i,s,o,l){this.key=e,this.documentType=n,this.version=r,this.readTime=i,this.createTime=s,this.data=o,this.documentState=l}static newInvalidDocument(e){return new wt(e,0,te.min(),te.min(),te.min(),tn.empty(),0)}static newFoundDocument(e,n,r,i){return new wt(e,1,n,te.min(),r,i,0)}static newNoDocument(e,n){return new wt(e,2,n,te.min(),te.min(),tn.empty(),0)}static newUnknownDocument(e,n){return new wt(e,3,n,te.min(),te.min(),tn.empty(),2)}convertToFoundDocument(e,n){return!this.createTime.isEqual(te.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=tn.empty(),this.documentState=0,this}convertToUnknownDocument(e){return this.version=e,this.documentType=3,this.data=tn.empty(),this.documentState=2,this}setHasCommittedMutations(){return this.documentState=2,this}setHasLocalMutations(){return this.documentState=1,this.version=te.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 wt&&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 wt(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}})`}}/**
1158 * @license
1159 * Copyright 2022 Google LLC
1160 *
1161 * Licensed under the Apache License, Version 2.0 (the "License");
1162 * you may not use this file except in compliance with the License.
1163 * You may obtain a copy of the License at
1164 *
1165 *   http://www.apache.org/licenses/LICENSE-2.0
1166 *
1167 * Unless required by applicable law or agreed to in writing, software
1168 * distributed under the License is distributed on an "AS IS" BASIS,
1169 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1170 * See the License for the specific language governing permissions and
1171 * limitations under the License.
1172 */class Uu{constructor(e,n){this.position=e,this.inclusive=n}}function h0(t,e,n){let r=0;for(let i=0;i<t.position.length;i++){const s=e[i],o=t.position[i];if(s.field.isKeyField()?r=Q.comparator(Q.fromName(o.referenceValue),n.key):r=Ps(o,n.data.field(s.field)),s.dir==="desc"&&(r*=-1),r!==0)break}return r}function f0(t,e){if(t===null)return e===null;if(e===null||t.inclusive!==e.inclusive||t.position.length!==e.position.length)return!1;for(let n=0;n<t.position.length;n++)if(!Mn(t.position[n],e.position[n]))return!1;return!0}/**
1173 * @license
1174 * Copyright 2022 Google LLC
1175 *
1176 * Licensed under the Apache License, Version 2.0 (the "License");
1177 * you may not use this file except in compliance with the License.
1178 * You may obtain a copy of the License at
1179 *
1180 *   http://www.apache.org/licenses/LICENSE-2.0
1181 *
1182 * Unless required by applicable law or agreed to in writing, softw
1182are
1183 * distributed under the License is distributed on an "AS IS" BASIS,
1184 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1185 * See the License for the specific language governing permissions and
1186 * limitations under the License.
1187 */class _a{constructor(e,n="asc"){this.field=e,this.dir=n}}function hV(t,e){return t.dir===e.dir&&t.field.isEqual(e.field)}/**
1188 * @license
1189 * Copyright 2022 Google LLC
1190 *
1191 * Licensed under the Apache License, Version 2.0 (the "License");
1192 * you may not use this file except in compliance with the License.
1193 * You may obtain a copy of the License at
1194 *
1195 *   http://www.apache.org/licenses/LICENSE-2.0
1196 *
1197 * Unless required by applicable law or agreed to in writing, software
1198 * distributed under the License is distributed on an "AS IS" BASIS,
1199 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1200 * See the License for the specific language governing permissions and
1201 * limitations under the License.
1202 */class NT{}class $e extends NT{constructor(e,n,r){super(),this.field=e,this.op=n,this.value=r}static create(e,n,r){return e.isKeyField()?n==="in"||n==="not-in"?this.createKeyFieldInFilter(e,n,r):new dV(e,n,r):n==="array-contains"?new gV(e,r):n==="in"?new yV(e,r):n==="not-in"?new vV(e,r):n==="array-contains-any"?new _V(e,r):new $e(e,n,r)}static createKeyFieldInFilter(e,n,r){return n==="in"?new pV(e,r):new mV(e,r)}matches(e){const n=e.data.field(this.field);return this.op==="!="?n!==null&&n.nullValue===void 0&&this.matchesComparison(Ps(n,this.value)):n!==null&&Or(this.value)===Or(n)&&this.matchesComparison(Ps(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 J(47266,{operator:this.op})}}isInequality(){return["<","<=",">",">=","!=","not-in"].indexOf(this.op)>=0}getFlattenedFilters(){return[this]}getFilters(){return[this]}}class Tn extends NT{constructor(e,n){super(),this.filters=e,this.op=n,this.Te=null}static create(e,n){return new Tn(e,n)}matches(e){return MT(this)?this.filters.find(n=>!n.matches(e))===void 0:this.filters.find(n=>n.matches(e))!==void 0}getFlattenedFilters(){return this.Te!==null||(this.Te=this.filters.reduce((e,n)=>e.concat(n.getFlattenedFilters()),[])),this.Te}getFilters(){return Object.assign([],this.filters)}}function MT(t){return t.op==="and"}function LT(t){return fV(t)&&MT(t)}function fV(t){for(const e of t.filters)if(e instanceof Tn)return!1;return!0}function Td(t){if(t instanceof $e)return t.field.canonicalString()+t.op.toString()+Rs(t.value);if(LT(t))return t.filters.map(e=>Td(e)).join(",");{const e=t.filters.map(n=>Td(n)).join(",");return`${t.op}(${e})`}}function OT(t,e){return t instanceof $e?function(r,i){return i instanceof $e&&r.op===i.op&&r.field.isEqual(i.field)&&Mn(r.value,i.value)}(t,e):t instanceof Tn?function(r,i){return i instanceof Tn&&r.op===i.op&&r.filters.length===i.filters.length?r.filters.reduce((s,o,l)=>s&&OT(o,i.filters[l]),!0):!1}(t,e):void J(19439)}function FT(t){return t instanceof $e?function(n){return`${n.field.canonicalString()} ${n.op} ${Rs(n.value)}`}(t):t instanceof Tn?function(n){return n.op.toString()+" {"+n.getFilters().map(FT).join(" ,")+"}"}(t):"Filter"}class dV extends $e{constructor(e,n,r){super(e,n,r),this.key=Q.fromName(r.referenceValue)}matches(e){const n=Q.comparator(e.key,this.key);return this.matchesComparison(n)}}class pV extends $e{constructor(e,n){super(e,"in",n),this.keys=jT("in",n)}matches(e){return this.keys.some(n=>n.isEqual(e.key))}}class mV extends $e{constructor(e,n){super(e,"not-in",n),this.keys=jT("not-in",n)}matches(e){return!this.keys.some(n=>n.isEqual(e.key))}}function jT(t,e){var n;return(((n=e.arrayValue)===null||n===void 0?void 0:n.values)||[]).map(r=>Q.fromName(r.referenceValue))}class gV extends $e{constructor(e,n){super(e,"array-contains",n)}matches(e){const n=e.data.field(this.field);return tm(n)&&va(n.arrayValue,this.value)}}class yV extends $e{constructor(e,n){super(e,"in",n)}matches(e){const n=e.data.field(this.field);return n!==null&&va(this.value.arrayValue,n)}}class vV extends $e{constructor(e,n){super(e,"not-in",n)}matches(e){if(va(this.value.arrayValue,{nullValue:"NULL_VALUE"}))return!1;const n=e.data.field(this.field);return n!==null&&n.nullValue===void 0&&!va(this.value.arrayValue,n)}}class _V extends $e{constructor(e,n){super(e,"array-contains-any",n)}matches(e){const n=e.data.field(this.field);return!(!tm(n)||!n.arrayValue.values)&&n.arrayValue.values.some(r=>va(this.value.arrayValue,r))}}/**
1203 * @license
1204 * Copyright 2019 Google LLC
1205 *
1206 * Licensed under the Apache License, Version 2.0 (the "License");
1207 * you may not use this file except in compliance with the License.
1208 * You may obtain a copy of the License at
1209 *
1210 *   http://www.apache.org/licenses/LICENSE-2.0
1211 *
1212 * Unless required by applicable law or agreed to in writing, software
1213 * distributed under the License is distributed on an "AS IS" BASIS,
1214 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1215 * See the License for the specific language governing permissions and
1216 * limitations under the License.
1217 */class wV{constructor(e,n=null,r=[],i=[],s=null,o=null,l=null){this.path=e,this.collectionGroup=n,this.orderBy=r,this.filters=i,this.limit=s,this.startAt=o,this.endAt=l,this.Ie=null}}function d0(t,e=null,n=[],r=[],i=null,s=null,o=null){return new wV(t,e,n,r,i,s,o)}function nm(t){const e=re(t);if(e.Ie===null){let n=e.path.canonicalString();e.collectionGroup!==null&&(n+="|cg:"+e.collectionGroup),n+="|f:",n+=e.filters.map(r=>Td(r)).join(","),n+="|ob:",n+=e.orderBy.map(r=>function(s){return s.field.canonicalString()+s.dir}(r)).join(","),Pc(e.limit)||(n+="|l:",n+=e.limit),e.startAt&&(n+="|lb:",n+=e.startAt.inclusive?"b:":"a:",n+=e.startAt.position.map(r=>Rs(r)).join(",")),e.endAt&&(n+="|ub:",n+=e.endAt.inclusive?"a:":"b:",n+=e.endAt.position.map(r=>Rs(r)).join(",")),e.Ie=n}return e.Ie}function rm(t,e){if(t.limit!==e.limit||t.orderBy.length!==e.orderBy.length)return!1;for(let n=0;n<t.orderBy.length;n++)if(!hV(t.orderBy[n],e.orderBy[n]))return!1;if(t.filters.length!==e.filters.length)return!1;for(let n=0;n<t.filters.length;n++)if(!OT(t.filters[n],e.filters[n]))return!1;return t.collectionGroup===e.collectionGroup&&!!t.path.isEqual(e.path)&&!!f0(t.startAt,e.startAt)&&f0(t.endAt,e.endAt)}function Sd(t){return Q.isDocumentKey(t.path)&&t.collectionGroup===null&&t.filters.length===0}/**
1218 * @license
1219 * Copyright 2017 Google LLC
1220 *
1221 * Licensed under the Apache License, Version 2.0 (the "License");
1222 * you may not use this file except in compliance with the License.
1223 * You may obtain a copy of the License at
1224 *
1225 *   http://www.apache.org/licenses/LICENSE-2.0
1226 *
1227 * Unless required by applicable law or agreed to in writing, software
1228 * distributed under the License is distributed on an "AS IS" BASIS,
1229 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1230 * See the License for the specific language governing permissions and
1231 * limitations under the License.
1232 */class Hs{constructor(e,n=null,r=[],i=[],s=null,o="F",l=null,u=null){this.path=e,this.collectionGroup=n,this.explicitOrderBy=r,this.filters=i,this.limit=s,this.limitType=o,this.startAt=l,this.endAt=u,this.Ee=null,this.de=null,this.Ae=null,this.startAt,this.endAt}}function EV(t,e,n,r,i,s,o,l){return new Hs(t,e,n,r,i,s,o,l)}function BT(t){return new Hs(t)}function p0(t){return t.filters.length===0&&t.limit===null&&t.startAt==null&&t.endAt==null&&(t.explicitOrderBy.length===0||t.explicitOrderBy.length===1&&t.explicitOrderBy[0].field.isKeyField())}function zT(t){return t.collectionGroup!==null}function zo(t){const e=re(t);if(e.Ee===null){e.Ee=[];const n=new Set;for(const s of e.explicitOrderBy)e.Ee.push(s),n.add(s.field.canonicalString());const r=e.explicitOrderBy.length>0?e.explicitOrderBy[e.explicitOrderBy.length-1].dir:"asc";(function(o){let l=new qe(ot.comparator);return o.filters.forEach(u=>{u.getFlattenedFilters().forEach(c=>{c.isInequality()&&(l=l.add(c.field))})}),l})(e).forEach(s=>{n.has(s.canonicalString())||s.isKeyField()||e.Ee.push(new _a(s,r))}),n.has(ot.keyField().canonicalString())||e.Ee.push(new _a(ot.keyField(),r))}return e.Ee}function Vn(t){const e=re(t);return e.de||(e.de=TV(e,zo(t))),e.de}function TV(t,e){if(t.limitType==="F")return d0(t.path,t.collectionGroup,e,t.filters,t.limit,t.startAt,t.endAt);{e=e.map(i=>{const s=i.dir==="desc"?"asc":"desc";return new _a(i.field,s)});const n=t.endAt?new Uu(t.endAt.position,t.endAt.inclusive):null,r=t.startAt?new Uu(t.startAt.position,t.startAt.inclusive):null;return d0(t.path,t.collectionGroup,e,t.filters,t.limit,n,r)}}function Ad(t,e){const n=t.filters.concat([e]);return new Hs(t.path,t.collectionGroup,t.explicitOrderBy.slice(),n,t.limit,t.limitType,t.startAt,t.endAt)}function $u(t,e,n){return new Hs(t.path,t.collectionGroup,t.explicitOrderBy.slice(),t.filters.slice(),e,n,t.startAt,t.endAt)}function kc(t,e){return rm(Vn(t),Vn(e))&&t.limitType===e.limitType}function UT(t){return`${nm(Vn(t))}|lt:${t.limitType}`}function Oi(t){return`Query(target=${function(n){let r=n.path.canonicalString();return n.collectionGroup!==null&&(r+=" collectionGroup="+n.collectionGroup),n.filters.length>0&&(r+=`, filters: [${n.filters.map(i=>FT(i)).join(", ")}]`),Pc(n.limit)||(r+=", limit: "+n.limit),n.orderBy.length>0&&(r+=`, orderBy: [${n.orderBy.map(i=>function(o){return`${o.field.canonicalString()} (${o.dir})`}(i)).join(", ")}]`),n.startAt&&(r+=", startAt: ",r+=n.startAt.inclusive?"b:":"a:",r+=n.startAt.position.map(i=>Rs(i)).join(",")),n.endAt&&(r+=", endAt: ",r+=n.endAt.inclusive?"a:":"b:",r+=n.endAt.position.map(i=>Rs(i)).join(",")),`Target(${r})`}(Vn(t))}; limitType=${t.limitType})`}function Vc(t,e){return e.isFoundDocument()&&function(r,i){const s=i.key.path;return r.collectionGroup!==null?i.key.hasCollectionId(r.collectionGroup)&&r.path.isPrefixOf(s):Q.isDocumentKey(r.path)?r.path.isEqual(s):r.path.isImmediateParentOf(s)}(t,e)&&function(r,i){for(const s of zo(r))if(!s.field.isKeyField()&&i.data.field(s.field)===null)return!1;return!0}(t,e)&&function(r,i){for(const s of r.filters)if(!s.matches(i))return!1;return!0}(t,e)&&function(r,i){return!(r.startAt&&!function(o,l,u){const c=h0(o,l,u);return o.inclusive?c<=0:c<0}(r.startAt,zo(r),i)||r.endAt&&!function(o,l,u){const c=h0(o,l,u);return o.inclusive?c>=0:c>0}(r.endAt,zo(r),i))}(t,e)}function SV(t){return t.collectionGroup||(t.path.length%2==1?t.path.lastSegment():t.path.get(t.path.length-2))}function $T(t){return(e,n)=>{let r=!1;for(const i of zo(t)){const s=AV(i,e,n);if(s!==0)return s;r=r||i.field.isKeyField()}return 0}}function AV(t,e,n){const r=t.field.isKeyField()?Q.comparator(e.key,n.key):function(s,o,l){const u=o.data.field(s),c=l.data.field(s);return u!==null&&c!==null?Ps(u,c):J(42886)}
1232(t.field,e,n);switch(t.dir){case"asc":return r;case"desc":return-1*r;default:return J(19790,{direction:t.dir})}}/**
1233 * @license
1234 * Copyright 2017 Google LLC
1235 *
1236 * Licensed under the Apache License, Version 2.0 (the "License");
1237 * you may not use this file except in compliance with the License.
1238 * You may obtain a copy of the License at
1239 *
1240 *   http://www.apache.org/licenses/LICENSE-2.0
1241 *
1242 * Unless required by applicable law or agreed to in writing, software
1243 * distributed under the License is distributed on an "AS IS" BASIS,
1244 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1245 * See the License for the specific language governing permissions and
1246 * limitations under the License.
1247 */class Ii{constructor(e,n){this.mapKeyFn=e,this.equalsFn=n,this.inner={},this.innerSize=0}get(e){const n=this.mapKeyFn(e),r=this.inner[n];if(r!==void 0){for(const[i,s]of r)if(this.equalsFn(i,e))return s}}has(e){return this.get(e)!==void 0}set(e,n){const r=this.mapKeyFn(e),i=this.inner[r];if(i===void 0)return this.inner[r]=[[e,n]],void this.innerSize++;for(let s=0;s<i.length;s++)if(this.equalsFn(i[s][0],e))return void(i[s]=[e,n]);i.push([e,n]),this.innerSize++}delete(e){const n=this.mapKeyFn(e),r=this.inner[n];if(r===void 0)return!1;for(let i=0;i<r.length;i++)if(this.equalsFn(r[i][0],e))return r.length===1?delete this.inner[n]:r.splice(i,1),this.innerSize--,!0;return!1}forEach(e){Ai(this.inner,(n,r)=>{for(const[i,s]of r)e(i,s)})}isEmpty(){return IT(this.inner)}size(){return this.innerSize}}/**
1248 * @license
1249 * Copyright 2017 Google LLC
1250 *
1251 * Licensed under the Apache License, Version 2.0 (the "License");
1252 * you may not use this file except in compliance with the License.
1253 * You may obtain a copy of the License at
1254 *
1255 *   http://www.apache.org/licenses/LICENSE-2.0
1256 *
1257 * Unless required by applicable law or agreed to in writing, software
1258 * distributed under the License is distributed on an "AS IS" BASIS,
1259 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1260 * See the License for the specific language governing permissions and
1261 * limitations under the License.
1262 */const IV=new be(Q.comparator);function er(){return IV}const HT=new be(Q.comparator);function Ao(...t){let e=HT;for(const n of t)e=e.insert(n.key,n);return e}function WT(t){let e=HT;return t.forEach((n,r)=>e=e.insert(n,r.overlayedDocument)),e}function li(){return Uo()}function KT(){return Uo()}function Uo(){return new Ii(t=>t.toString(),(t,e)=>t.isEqual(e))}const xV=new be(Q.comparator),CV=new qe(Q.comparator);function le(...t){let e=CV;for(const n of t)e=e.add(n);return e}const PV=new qe(se);function RV(){return PV}/**
1263 * @license
1264 * Copyright 2020 Google LLC
1265 *
1266 * Licensed under the Apache License, Version 2.0 (the "License");
1267 * you may not use this file except in compliance with the License.
1268 * You may obtain a copy of the License at
1269 *
1270 *   http://www.apache.org/licenses/LICENSE-2.0
1271 *
1272 * Unless required by applicable law or agreed to in writing, software
1273 * distributed under the License is distributed on an "AS IS" BASIS,
1274 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1275 * See the License for the specific language governing permissions and
1276 * limitations under the License.
1277 */function im(t,e){if(t.useProto3Json){if(isNaN(e))return{doubleValue:"NaN"};if(e===1/0)return{doubleValue:"Infinity"};if(e===-1/0)return{doubleValue:"-Infinity"}}return{doubleValue:ju(e)?"-0":e}}function GT(t){return{integerValue:""+t}}function kV(t,e){return rV(e)?GT(e):im(t,e)}/**
1278 * @license
1279 * Copyright 2018 Google LLC
1280 *
1281 * Licensed under the Apache License, Version 2.0 (the "License");
1282 * you may not use this file except in compliance with the License.
1283 * You may obtain a copy of the License at
1284 *
1285 *   http://www.apache.org/licenses/LICENSE-2.0
1286 *
1287 * Unless required by applicable law or agreed to in writing, software
1288 * distributed under the License is distributed on an "AS IS" BASIS,
1289 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1290 * See the License for the specific language governing permissions and
1291 * limitations under the License.
1292 */class Dc{constructor(){this._=void 0}}function VV(t,e,n){return t instanceof wa?function(i,s){const o={fields:{[PT]:{stringValue:CT},[kT]:{timestampValue:{seconds:i.seconds,nanos:i.nanoseconds}}}};return s&&em(s)&&(s=Rc(s)),s&&(o.fields[RT]=s),{mapValue:o}}(n,e):t instanceof Ea?QT(t,e):t instanceof Ta?YT(t,e):function(i,s){const o=qT(i,s),l=m0(o)+m0(i.Re);return Ed(o)&&Ed(i.Re)?GT(l):im(i.serializer,l)}(t,e)}function DV(t,e,n){return t instanceof Ea?QT(t,e):t instanceof Ta?YT(t,e):n}function qT(t,e){return t instanceof Hu?function(r){return Ed(r)||function(s){return!!s&&"doubleValue"in s}(r)}(e)?e:{integerValue:0}:null}class wa extends Dc{}class Ea extends Dc{constructor(e){super(),this.elements=e}}function QT(t,e){const n=XT(e);for(const r of t.elements)n.some(i=>Mn(i,r))||n.push(r);return{arrayValue:{values:n}}}class Ta extends Dc{constructor(e){super(),this.elements=e}}function YT(t,e){let n=XT(e);for(const r of t.elements)n=n.filter(i=>!Mn(i,r));return{arrayValue:{values:n}}}
1292class Hu extends Dc{constructor(e,n){super(),this.serializer=e,this.Re=n}}function m0(t){return Fe(t.integerValue||t.doubleValue)}function XT(t){return tm(t)&&t.arrayValue.values?t.arrayValue.values.slice():[]}/**
1293 * @license
1294 * Copyright 2017 Google LLC
1295 *
1296 * Licensed under the Apache License, Version 2.0 (the "License");
1297 * you may not use this file except in compliance with the License.
1298 * You may obtain a copy of the License at
1299 *
1300 *   http://www.apache.org/licenses/LICENSE-2.0
1301 *
1302 * Unless required by applicable law or agreed to in writing, software
1303 * distributed under the License is distributed on an "AS IS" BASIS,
1304 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1305 * See the License for the specific language governing permissions and
1306 * limitations under the License.
1307 */class bV{constructor(e,n){this.field=e,this.transform=n}}function NV(t,e){return t.field.isEqual(e.field)&&function(r,i){return r instanceof Ea&&i instanceof Ea||r instanceof Ta&&i instanceof Ta?Cs(r.elements,i.elements,Mn):r instanceof Hu&&i instanceof Hu?Mn(r.Re,i.Re):r instanceof wa&&i instanceof wa}(t.transform,e.transform)}class MV{constructor(e,n){this.version=e,this.transformResults=n}}class Wn{constructor(e,n){this.updateTime=e,this.exists=n}static none(){return new Wn}static exists(e){return new Wn(void 0,e)}static updateTime(e){return new Wn(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 tu(t,e){return t.updateTime!==void 0?e.isFoundDocument()&&e.version.isEqual(t.updateTime):t.exists===void 0||t.exists===e.isFoundDocument()}class bc{}function ZT(t,e){if(!t.hasLocalMutations||e&&e.fields.length===0)return null;if(e===null)return t.isNoDocument()?new eS(t.key,Wn.none()):new Na(t.key,t.data,Wn.none());{const n=t.data,r=tn.empty();let i=new qe(ot.comparator);for(let s of e.fields)if(!i.has(s)){let o=n.field(s);o===null&&s.length>1&&(s=s.popLast(),o=n.field(s)),o===null?r.delete(s):r.set(s,o),i=i.add(s)}return new xi(t.key,r,new yn(i.toArray()),Wn.none())}}function LV(t,e,n){t instanceof Na?function(i,s,o){const l=i.value.clone(),u=y0(i.fieldTransforms,s,o.transformResults);l.setAll(u),s.convertToFoundDocument(o.version,l).setHasCommittedMutations()}(t,e,n):t instanceof xi?function(i,s,o){if(!tu(i.precondition,s))return void s.convertToUnknownDocument(o.version);const l=y0(i.fieldTransforms,s,o.transformResults),u=s.data;u.setAll(JT(i)),u.setAll(l),s.convertToFoundDocument(o.version,u).setHasCommittedMutations()}(t,e,n):function(i,s,o){s.convertToNoDocument(o.version).setHasCommittedMutations()}(0,e,n)}function $o(t,e,n,r){return t instanceof Na?function(s,o,l,u){if(!tu(s.precondition,o))return l;const c=s.value.clone(),f=v0(s.fieldTransforms,u,o);return c.setAll(f),o.convertToFoundDocument(o.version,c).setHasLocalMutations(),null}(t,e,n,r):t instanceof xi?function(s,o,l,u){if(!tu(s.precondition,o))return l;const c=v0(s.fieldTransforms,u,o),f=o.data;return f.setAll(JT(s)),f.setAll(c),o.convertToFoundDocument(o.version,f).setHasLocalMutations(),l===null?null:l.unionWith(s.fieldMask.fields).unionWith(s.fieldTransforms.map(d=>d.field))}(t,e,n,r):function(s,o,l){return tu(s.precondition,o)?(o.convertToNoDocument(o.version).setHasLocalMutations(),null):l}(t,e,n)}function OV(t,e){let n=null;for(const r of t.fieldTransforms){const i=e.data.field(r.field),s=qT(r.transform,i||null);s!=null&&(n===null&&(n=tn.empty()),n.set(r.field,s))}return n||null}function g0(t,e){return t.type===e.type&&!!t.key.isEqual(e.key)&&!!t.precondition.isEqual(e.precondition)&&!!function(r,i){return r===void 0&&i===void 0||!(!r||!i)&&Cs(r,i,(s,o)=>NV(s,o))}(t.fieldTransforms,e.fieldTransforms)&&(t.type===0?t.value.isEqual(e.value):t.type!==1||t.data.isEqual(e.data)&&t.fieldMask.isEqual(e.fieldMask))}class Na extends bc{constructor(e,n,r,i=[]){super(),this.key=e,this.value=n,this.precondition=r,this.fieldTransforms=i,this.type=0}getFieldMask(){return null}}class xi extends bc{constructor(e,n,r,i,s=[]){super(),this.key=e,this.data=n,this.fieldMask=r,this.prec
1307ondition=i,this.fieldTransforms=s,this.type=1}getFieldMask(){return this.fieldMask}}function JT(t){const e=new Map;return t.fieldMask.fields.forEach(n=>{if(!n.isEmpty()){const r=t.data.field(n);e.set(n,r)}}),e}function y0(t,e,n){const r=new Map;ye(t.length===n.length,32656,{Ve:n.length,me:t.length});for(let i=0;i<n.length;i++){const s=t[i],o=s.transform,l=e.data.field(s.field);r.set(s.field,DV(o,l,n[i]))}return r}function v0(t,e,n){const r=new Map;for(const i of t){const s=i.transform,o=n.data.field(i.field);r.set(i.field,VV(s,o,e))}return r}class eS extends bc{constructor(e,n){super(),this.key=e,this.precondition=n,this.type=2,this.fieldTransforms=[]}getFieldMask(){return null}}class FV extends bc{constructor(e,n){super(),this.key=e,this.precondition=n,this.type=3,this.fieldTransforms=[]}getFieldMask(){return null}}/**
1308 * @license
1309 * Copyright 2017 Google LLC
1310 *
1311 * Licensed under the Apache License, Version 2.0 (the "License");
1312 * you may not use this file except in compliance with the License.
1313 * You may obtain a copy of the License at
1314 *
1315 *   http://www.apache.org/licenses/LICENSE-2.0
1316 *
1317 * Unless required by applicable law or agreed to in writing, software
1318 * distributed under the License is distributed on an "AS IS" BASIS,
1319 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1320 * See the License for the specific language governing permissions and
1321 * limitations under the License.
1322 */class jV{constructor(e,n,r,i){this.batchId=e,this.localWriteTime=n,this.baseMutations=r,this.mutations=i}applyToRemoteDocument(e,n){const r=n.mutationResults;for(let i=0;i<this.mutations.length;i++){const s=this.mutations[i];s.key.isEqual(e.key)&&LV(s,e,r[i])}}applyToLocalView(e,n){for(const r of this.baseMutations)r.key.isEqual(e.key)&&(n=$o(r,e,n,this.localWriteTime));for(const r of this.mutations)r.key.isEqual(e.key)&&(n=$o(r,e,n,this.localWriteTime));return n}applyToLocalDocumentSet(e,n){const r=KT();return this.mutations.forEach(i=>{const s=e.get(i.key),o=s.overlayedDocument;let l=this.applyToLocalView(o,s.mutatedFields);l=n.has(i.key)?null:l;const u=ZT(o,l);u!==null&&r.set(i.key,u),o.isValidDocument()||o.convertToNoDocument(te.min())}),r}keys(){return this.mutations.reduce((e,n)=>e.add(n.key),le())}isEqual(e){return this.batchId===e.batchId&&Cs(this.mutations,e.mutations,(n,r)=>g0(n,r))&&Cs(this.baseMutations,e.baseMutations,(n,r)=>g0(n,r))}}class sm{constructor(e,n,r,i){this.batch=e,this.commitVersion=n,this.mutationResults=r,this.docVersions=i}static from(e,n,r){ye(e.mutations.length===r.length,58842,{fe:e.mutations.length,ge:r.length});let i=function(){return xV}();const s=e.mutations;for(let o=0;o<s.length;o++)i=i.insert(s[o].key,r[o].version);return new sm(e,n,r,i)}}/**
1323 * @license
1324 * Copyright 2022 Google LLC
1325 *
1326 * Licensed under the Apache License, Version 2.0 (the "License");
1327 * you may not use this file except in compliance with the License.
1328 * You may obtain a copy of the License at
1329 *
1330 *   http://www.apache.org/licenses/LICENSE-2.0
1331 *
1332 * Unless required by applicable law or agreed to in writing, software
1333 * distributed under the License is distributed on an "AS IS" BASIS,
1334 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1335 * See the License for the specific language governing permissions and
1336 * limitations under the License.
1337 */let BV=class{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{
1338      largestBatchId: ${this.largestBatchId},
1339      mutation: ${this.mutation.toString()}
1340    }`}};/**
1341 * @license
1342 * Copyright 2017 Google LLC
1343 *
1344 * Licensed under the Apache License, Version 2.0 (the "License");
1345 * you may not use this file except in compliance with the License.
1346 * You may obtain a copy of the License at
1347 *
1348 *   http://www.apache.org/licenses/LICENSE-2.0
1349 *
1350 * Unless required by applicable law or agreed to in writing, software
1351 * distributed under the License is distributed on an "AS IS" BASIS,
1352 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1353 * See the License for the specific language governing permissions and
1354 * limitations under the License.
1355 */class zV{constructor(e,n){this.count=e,this.unchangedNames=n}}/**
1356 * @license
1357 * Copyright 2017 Google LLC
1358 *
1359 * Licensed under the Apache License, Version 2.0 (the "License");
1360 * you may not use this file except in compliance with the License.
1361 * You may obtain a copy of the License at
1362 *
1363 *   http://www.apache.org/licenses/LICENSE-2.0
1364 *
1365 * Unless required by applicable law or agreed to in writing, software
1366 * distributed under the License is distributed on an "AS IS" BASIS,
1367 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1368 * See the License for the specific language governing permissions and
1369 * limitations under the License.
1370 */var Be,ue;function UV(t){switch(t){case F.OK:return J(64938);case F.CANCELLED:case F.UNKNOWN:case F.DEADLINE_EXCEEDED:case F.RESOURCE_EXHAUSTED:case F.INTERNAL:case F.UNAVAILABLE:case F.UNAUTHENTICATED:return!1;case F.INVALID_ARGUMENT:case F.NOT_FOUND:case F.ALREADY_EXISTS:case F.PERMISSION_DENIED:case F.FAILED_PRECONDITION:case F.ABORTED:case F.OUT_OF_RANGE:case F.UNIMPLEMENTED:case F.DATA_LOSS:return!0;default:return J(15467,{code:t})}}function tS(t){if(t===void 0)return Jn("GRPC error has no .code"),F.UNKNOWN;switch(t){case Be.OK:return F.OK;case Be.CANCELLED:return F.CANCELLED;case Be.UNKNOWN:return F.UNKNOWN;case Be.DEADLINE_EXCEEDED:return F.DEADLINE_EXCEEDED;case Be.RESOURCE_EXHAUSTED:return F.RESOURCE_EXHAUSTED;case Be.INTERNAL:return F.INTERNAL;case Be.UNAVAILABLE:return F.UNAVAILABLE;case Be.UNAUTHENTICATED:return F.UNAUTHENTICATED;case Be.INVALID_ARGUMENT:return F.INVALID_ARGUMENT;case Be.NOT_FOUND:return F.NOT_FOUND;case Be.ALREADY_EXISTS:return F.ALREADY_EXISTS;case Be.PERMISSION_DENIED:return F.PERMISSION_DENIED;case Be.FAILED_PRECONDITION:return F.FAILED_PRECONDITION;case Be.ABORTED:return F.ABORTED;case Be.OUT_OF_RANGE:return F.OUT_OF_RANGE;case Be.UNIMPLEMENTED:return F.UNIMPLEMENTED;case Be.DATA_LOSS:return F.DATA_LOSS;default:return J(39323,{code:t})}}(ue=Be||(Be={}))[ue.OK=0]="OK",ue[ue.CANCELLED=1]="CANCELLED",ue[ue.UNKNOWN=2]="UNKNOWN",ue[ue.INVALID_ARGUMENT=3]="INVALID_ARGUMENT",ue[ue.DEADLINE_EXCEEDED=4]="DEADLINE_EXCEEDED",ue[ue.NOT_FOUND=5]="NOT_FOUND",ue[ue.ALREADY_EXISTS=6]="ALREADY_EXISTS",ue[ue.PERMISSION_DENIED=7]="PERMISSION_DENIED",ue[ue.UNAUTHENTICATED=16]="UNAUTHENTICATED",ue[ue.RESOURCE_EXHAUSTED=8]="RESOURCE_EXHAUSTED",ue[ue.FAILED_PRECONDITION=9]="FAILED_PRECONDITION",ue[ue.ABORTED=10]="ABORTED",ue[ue.OUT_OF_RANGE=11]="OUT_OF_RANGE",ue[ue.UNIMPLEMENTED=12]="UNIMPLEMENTED",ue[ue.INTERNAL=13]="INTERNAL",ue[ue.UNAVAILABLE=14]="UNAVAILABLE",ue[ue.DATA_LOSS=15]="DATA_LOSS";/**
1371 * @license
1372 * Copyright 2022 Google LLC
1373 *
1374 * Licensed under the Apache License, Version 2.0 (the "License");
1375 * you may not use this file except in compliance with the License.
1376 * You may obtain a copy of the License at
1377 *
1378 *   http://www.apache.org/licenses/LICENSE-2.0
1379 *
1380 * Unless required by applicable law or agreed to in writing, software
1381 * distributed under the License is distributed on an "AS IS" BASIS,
1382 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1383 * See the License for the specific language governing permissions and
1384 * limitations under the License.
1385 */const $V=new Rr([4294967295,4294967295],0);function _0(t){const e=TT().encode(t),n=new pT;return n.update(e),new Uint8Array(n.digest())}function w0(t){const e=new DataView(t.buffer),n=e.getUint32(0,!0),r=e.getUint32(4,!0),i=e.getUint32(8,!0),s=e.getUint32(12,!0);return[new Rr([n,r],0),new Rr([i,s],0)]}class om{constructor(e,n,r){if(this.bitmap=e,this.padding=n,this.hashCount=r,n<0||n>=8)throw new Io(`Invalid padding: ${n}`);if(r<0)throw new Io(`Invalid hash count: ${r}`);if(e.length>0&&this.hashCount===0)throw new Io(`Invalid hash count: ${r}`);if(e.length===0&&n!==0)throw new Io(`Invalid padding when bitmap length is 0: ${n}`);this.pe=8*e.length-n,this.ye=Rr.fromNumber(this.pe)}we(e,n,r){let i=e.add(n.multiply(Rr.fromNumber(r)));return i.compare($V)===1&&(i=new Rr([i.getBits(0),i.getBits(1)],0)),i.modulo(this.ye).toNumber()}be(e){return!!(this.bitmap[Math.floor(e/8)]&1<<e%8)}mightContain(e){if(this.pe===0)return!1;const n=_0(e),[r,i]=w0(n);for(let s=0;s<this.hashCount;s++){const o=this.we(r,i,s);if(!this.be(o))return!1}return!0}static create(e,n,r){const i=e%8==0?0:8-e%8,s=new Uint8Array(Math.ceil(e/8)),o=new om(s,i,n);return r.forEach(l=>o.insert(l)),o}insert(e){if(this.pe===0)return;const n=_0(e),[r,i]=w0(n);for(let s=0;s<this.hashCount;s++){const o=this.we(r,i,s);this.Se(o)}}Se(e){const n=Math.floor(e/8),r=e%8;this.bitmap[n]|=1<<r}}
vendor: 9,404 bytes, lines 1385-1415
1385class Io extends Error{constructor(){super(...arguments),this.name="BloomFilterError"}}/**
1386 * @license
1387 * Copyright 2017 Google LLC
1388 *
1389 * Licensed under the Apache License, Version 2.0 (the "License");
1390 * you may not use this file except in compliance with the License.
1391 * You may obtain a copy of the License at
1392 *
1393 *   http://www.apache.org/licenses/LICENSE-2.0
1394 *
1395 * Unless required by applicable law or agreed to in writing, software
1396 * distributed under the License is distributed on an "AS IS" BASIS,
1397 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1398 * See the License for the specific language governing permissions and
1399 * limitations under the License.
1400 */class Nc{constructor(e,n,r,i,s){this.snapshotVersion=e,this.targetChanges=n,this.targetMismatches=r,this.documentUpdates=i,this.resolvedLimboDocuments=s}static createSynthesizedRemoteEventForCurrentChange(e,n,r){const i=new Map;return i.set(e,Ma.createSynthesizedTargetChangeForCurrentChange(e,n,r)),new Nc(te.min(),i,new be(se),er(),le())}}class Ma{constructor(e,n,r,i,s){this.resumeToken=e,this.current=n,this.addedDocuments=r,this.modifiedDocuments=i,this.removedDocuments=s}static createSynthesizedTargetChangeForCurrentChange(e,n,r){return new Ma(r,n,le(),le(),le())}}/**
1401 * @license
1402 * Copyright 2017 Google LLC
1403 *
1404 * Licensed under the Apache License, Version 2.0 (the "License");
1405 * you may not use this file except in compliance with the License.
1406 * You may obtain a copy of the License at
1407 *
1408 *   http://www.apache.org/licenses/LICENSE-2.0
1409 *
1410 * Unless required by applicable law or agreed to in writing, software
1411 * distributed under the License is distributed on an "AS IS" BASIS,
1412 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1413 * See the License for the specific language governing permissions and
1414 * limitations under the License.
1415 */class nu{constructor(e,n,r,i){this.De=e,this.removedTargetIds=n,this.key=r,this.ve=i}}class nS{constructor(e,n){this.targetId=e,this.Ce=n}}class rS{constructor(e,n,r=ut.EMPTY_BYTE_STRING,i=null){this.state=e,this.targetIds=n,this.resumeToken=r,this.cause=i}}class E0{constructor(){this.Fe=0,this.Me=T0(),this.xe=ut.EMPTY_BYTE_STRING,this.Oe=!1,this.Ne=!0}get current(){return this.Oe}get resumeToken(){return this.xe}get Be(){return this.Fe!==0}get Le(){return this.Ne}ke(e){e.approximateByteSize()>0&&(this.Ne=!0,this.xe=e)}qe(){let e=le(),n=le(),r=le();return this.Me.forEach((i,s)=>{switch(s){case 0:e=e.add(i);break;case 2:n=n.add(i);break;case 1:r=r.add(i);break;default:J(38017,{changeType:s})}}),new Ma(this.xe,this.Oe,e,n,r)}Qe(){this.Ne=!1,this.Me=T0()}$e(e,n){this.Ne=!0,this.Me=this.Me.insert(e,n)}Ue(e){this.Ne=!0,this.Me=this.Me.remove(e)}Ke(){this.Fe+=1}We(){this.Fe-=1,ye(this.Fe>=0,3241,{Fe:this.Fe})}Ge(){this.Ne=!0,this.Oe=!0}}class HV{constructor(e){this.ze=e,this.je=new Map,this.He=er(),this.Je=Cl(),this.Ye=Cl(),this.Ze=new be(se)}Xe(e){for(const n of e.De)e.ve&&e.ve.isFoundDocument()?this.et(n,e.ve):this.tt(n,e.key,e.ve);for(const n of e.removedTargetIds)this.tt(n,e.key,e.ve)}nt(e){this.forEachTarget(e,n=>{const r=this.rt(n);switch(e.state){case 0:this.it(n)&&r.ke(e.resumeToken);break;case 1:r.We(),r.Be||r.Qe(),r.ke(e.resumeToken);break;case 2:r.We(),r.Be||this.removeTarget(n);break;case 3:this.it(n)&&(r.Ge(),r.ke(e.resumeToken));break;case 4:this.it(n)&&(this.st(n),r.ke(e.resumeToken));break;default:J(56790,{state:e.state})}})}forEachTarget(e,n){e.targetIds.length>0?e.targetIds.forEach(n):this.je.forEach((r,i)=>{this.it(i)&&n(i)})}ot(e){const n=e.targetId,r=e.Ce.count,i=this._t(n);if(i){const s=i.target;if(Sd(s))if(r===0){const o=new Q(s.path);this.tt(n,o,wt.newNoDocument(o,te.min()))}else ye(r===1,20013,{expectedCount:r});else{const o=this.ut(n);if(o!==r){const l=this.ct(e),u=l?this.lt(l,e,o):1;if(u!==0){this.st(n);const c=u===2?"TargetPurposeExistenceFilterMismatchBloom":"TargetPurposeExistenceFilterMismatch";this.Ze=this.Ze.insert(n,c)}}}}}ct(e){const n=e.Ce.unchangedNames;if(!n||!n.bits)return null;const{bits:{bitmap:r="",padding:i=0},hashCount:s=0}=n;let o,l;try{o=Lr(r).toUint8Array()}catch(u){if(u instanceof xT)return xs("Decoding the base64 bloom filter in existence filter failed ("+u.message+"); ignoring the bloom filter and falling back to full re-query."),null;throw u}try{l=new om(o,i,s)}catch(u){return xs(u instanceof Io?"BloomFilter error: ":"Applying bloom filter failed: ",u),null}return l.pe===0?null:l}lt(e,n,r){return n.Ce.count===r-this.Tt(e,n.targetId)?0:2}Tt(e,n){const r=this.ze.getRemoteKeysForTarget(n);let i=0;return r.forEach(s=>{const o=this.ze.Pt(),l=`projects/${o.projectId}/databases/${o.database}/documents/${s.path.canonicalString()}`;e.mightContain(l)||(this.tt(n,s,null),i++)}),i}It(e){const n=new Map;this.je.forEach((s,o)=>{const l=this._t(o);if(l){if(s.current&&Sd(l.target)){const u=new Q(l.target.path);this.Et(u).has(o)||this.dt(o,u)||this.tt(o,u,wt.newNoDocument(u,e))}s.Le&&(n.set(o,s.qe()),s.Qe())}});let r=le();this.Ye.forEach((s,o)=>{let l=!0;o.forEachWhile(u=>{const c=this._t(u);return!c||c.purpose==="TargetPurposeLimboResolution"||(l=!1,!1)}),l&&(r=r.add(s))}),this.He.forEach((s,o)=>o.setReadTime(e));const i=new Nc(e,n,this.Ze,this.He,r);return this.He=er(),this.Je=Cl(),this.Ye=Cl(),this.Ze=new be(se),i}et(e,n){if(!this.it(e))return;const r=this.dt(e,n.key)?2:0;this.rt(e).$e(n.key,r),this.He=this.He.insert(n.key,n),this.Je=this.Je.insert(n.key,this.Et(n.key).add(e)),this.Ye=this.Ye.insert(n.key,this.At(n.key).add(e))}tt(e,n,r){if(!this.it(e))return;const i=this.rt(e);this.dt(e,n)?i.$e(n,1):i.Ue(n),this.Ye=this.Ye.insert(n,this.At(n).delete(e)),this.Ye=this.Ye.insert(n,this.At(n).add(e)),r&&(this.He=this.He.insert(n,r))}removeTarget(e){this.je.delete(e)}ut(e){const n=this.rt(e).qe();return this.ze.getRemoteKeysForTarget(e).size+n.addedDocuments.size-n.removedDocuments.size}Ke(e){this.rt(e).Ke()}rt(e){let n=this.je.get(e);return n||(n=new E0,this.je.set(e,n)),n}At(e){let n=this.Ye.get(e);return n||(n=new qe(se),this.Ye=this.Ye.insert(e,n)),n}Et(e){let n=this.Je.get(e);return n||(n=new qe(se),this.Je=this.Je.insert(e,n)),n}it(e){const n=this._t(e)!==null;return n||H("WatchChangeAggregator","Detected inactive target",e),n}_t(e){const n=this.je.get(e);return n&&n.Be?null:this.ze.Rt(e)}st(e){this.je.set(e,new E0),this.ze.getRemoteKeysForTarget(e).forEach(n=>{this.tt(e,n,null)})}dt(e,n){return this.ze.getRemoteKeysForTarget(e).has(n)}}function Cl(){return new be(Q.comparator)}function T0(){return new be(Q.comparator)}const WV={asc:"ASCENDING",desc:"DESCENDING"},KV={"<":"LESS_THAN","<=":"LESS_THAN_OR_EQUAL",">":"GREATER_THAN",">=":"GREATER_THAN_OR_EQUAL","==":"EQUAL","!=":"NOT_EQUAL","array-contains":"ARRAY_CONTAINS",in:"IN","not-in":"NOT_IN","array-contains-any":"ARRAY_CONTAINS_ANY"},GV={and:"AND",or:"OR"};class qV{constructor(e,n){this.databaseId=e,this.useProto3Json=n}}function Id(t,e){return t.useProto3Json||Pc(e)?e:{value:e}}function Wu(t,e){return t.useProto3Json?`${new Date(1e3*e.seconds).toISOString().replace(/\.\d*/,"").replace("Z","")}.${("000000000"+e.nanoseconds).slice(-9)}Z`:{seconds:""+e.seconds,nanos:e.nanoseconds}}function iS(t,e){return t.useProto3Json?e.toBase64():e.toUint8Array()}function QV(t,e){return Wu(t,e.toTimestamp())}function Dn(t){return ye(!!t,49232),te.fromTimestamp(function(n){const r=Mr(n);return new Ge(r.seconds,r.nanos)}(t))}function am(t,e){return xd(t,e).canonicalString()}function xd(t,e){const n=function(i){return new Ie(["projects",i.projectId,"databases",i.database])}(t).child("documents");return e===void 0?n:n.child(e)}function sS(t){const e=Ie.fromString(t);return ye(cS(e),10190,{key:e.toString()}),e}function Cd(t,e){return am(t.databaseId,e.path)}function Kh(t,e){const n=sS(e);if(n.get(1)!==t.databaseId.projectId)throw new K(F.INVALID_ARGUMENT,"Tried to deserialize key from different project: "+n.get(1)+" vs "+t.databaseId.projectId);if(n.get(3)!==t.databaseId.database)throw new K(F.INVALID_ARGUMENT,"Tried to deserialize key from different database: "+n.get(3)+" vs "+t.databaseId.database);return new Q(aS(n))}function oS(t,e){return am(t.databaseId,e)}function YV(t){const e=sS(t);return e.length===4?Ie.emptyPath():aS(e)}function Pd(t){return new Ie(["projects",t.databaseId.projectId,"databases",t.databaseId.database]).canonicalString()}function aS(t){return ye(t.length>4&&t.get(4)==="documents",29091,{key:t.toString()}),t.popFirst(5)}function S0(t,e,n){return{name:Cd(t,e),fields:n.value.mapValue.fields}}function XV(t,e){let n;if("targetChange"in e){e.targetChange;const r=function(c){return c==="NO_CHANGE"?0:c==="ADD"?1:c==="REMOVE"?2:c==="CURRENT"?3:c==="RESET"?4:J(39313,{state:c})}(e.targetChange.targetChangeType||"NO_CHANGE"),i=e.targetChange.targetIds||[],s=function(c,f){return c.useProto3Json?(ye(f===void 0||typeof f=="string",58123),ut.fromBase64String(f||"")):(ye(f===void 0||f instanceof Buffer||f instanceof Uint8Array,16193),ut.fromUint8Array(f||new Uint8Array))}(t,e.targetChange.resumeToken),o=e.targetChange.cause,l=o&&function(c){const f=c.code===void 0?F.UNKNOWN:tS(c.code);return new K(f,c.message||"")}(o);n=new rS(r,i,s,l||null)}else if("documentChange"in e){e.documentChange;const r=e.documentChange;r.document,r.document.name,r.document.updateTime;const i=Kh(t,r.document.name),s=Dn(r.document.updateTime),o=r.document.createTime?Dn(r.document.createTime):te.min(),l=new tn({mapValue:{fields:r.document.fields}}
1415),u=wt.newFoundDocument(i,s,o,l),c=r.targetIds||[],f=r.removedTargetIds||[];n=new nu(c,f,u.key,u)}else if("documentDelete"in e){e.documentDelete;const r=e.documentDelete;r.document;const i=Kh(t,r.document),s=r.readTime?Dn(r.readTime):te.min(),o=wt.newNoDocument(i,s),l=r.removedTargetIds||[];n=new nu([],l,o.key,o)}else if("documentRemove"in e){e.documentRemove;const r=e.documentRemove;r.document;const i=Kh(t,r.document),s=r.removedTargetIds||[];n=new nu([],s,i,null)}else{if(!("filter"in e))return J(11601,{Vt:e});{e.filter;const r=e.filter;r.targetId;const{count:i=0,unchangedNames:s}=r,o=new zV(i,s),l=r.targetId;n=new nS(l,o)}}return n}function ZV(t,e){let n;if(e instanceof Na)n={update:S0(t,e.key,e.value)};else if(e instanceof eS)n={delete:Cd(t,e.key)};else if(e instanceof xi)n={update:S0(t,e.key,e.data),updateMask:aD(e.fieldMask)};else{if(!(e instanceof FV))return J(16599,{ft:e.type});n={verify:Cd(t,e.key)}}return e.fieldTransforms.length>0&&(n.updateTransforms=e.fieldTransforms.map(r=>function(s,o){const l=o.transform;if(l instanceof wa)return{fieldPath:o.field.canonicalString(),setToServerValue:"REQUEST_TIME"};if(l instanceof Ea)return{fieldPath:o.field.canonicalString(),appendMissingElements:{values:l.elements}};if(l instanceof Ta)return{fieldPath:o.field.canonicalString(),removeAllFromArray:{values:l.elements}};if(l instanceof Hu)return{fieldPath:o.field.canonicalString(),increment:l.Re};throw J(20930,{transform:o.transform})}(0,r))),e.precondition.isNone||(n.currentDocument=function(i,s){return s.updateTime!==void 0?{updateTime:QV(i,s.updateTime)}:s.exists!==void 0?{exists:s.exists}:J(27497)}(t,e.precondition)),n}function JV(t,e){return t&&t.length>0?(ye(e!==void 0,14353),t.map(n=>function(i,s){let o=i.updateTime?Dn(i.updateTime):Dn(s);return o.isEqual(te.min())&&(o=Dn(s)),new MV(o,i.transformResults||[])}(n,e))):[]}function eD(t,e){return{documents:[oS(t,e.path)]}}function tD(t,e){const n={structuredQuery:{}},r=e.path;let i;e.collectionGroup!==null?(i=r,n.structuredQuery.from=[{collectionId:e.collectionGroup,allDescendants:!0}]):(i=r.popLast(),n.structuredQuery.from=[{collectionId:r.lastSegment()}]),n.parent=oS(t,i);const s=function(c){if(c.length!==0)return uS(Tn.create(c,"and"))}(e.filters);s&&(n.structuredQuery.where=s);const o=function(c){if(c.length!==0)return c.map(f=>function(p){return{field:Fi(p.field),direction:iD(p.dir)}}(f))}(e.orderBy);o&&(n.structuredQuery.orderBy=o);const l=Id(t,e.limit);return l!==null&&(n.structuredQuery.limit=l),e.startAt&&(n.structuredQuery.startAt=function(c){return{before:c.inclusive,values:c.position}}(e.startAt)),e.endAt&&(n.structuredQuery.endAt=function(c){return{before:!c.inclusive,values:c.position}}(e.endAt)),{gt:n,parent:i}}function nD(t){let e=YV(t.parent);const n=t.structuredQuery,r=n.from?n.from.length:0;let i=null;if(r>0){ye(r===1,65062);const f=n.from[0];f.allDescendants?i=f.collectionId:e=e.child(f.collectionId)}let s=[];n.where&&(s=function(d){const p=lS(d);return p instanceof Tn&&LT(p)?p.getFilters():[p]}(n.where));let o=[];n.orderBy&&(o=function(d){return d.map(p=>function(S){return new _a(ji(S.field),function(R){switch(R){case"ASCENDING":return"asc";case"DESCENDING":return"desc";default:return}}(S.direction))}(p))}(n.orderBy));let l=null;n.limit&&(l=function(d){let p;return p=typeof d=="object"?d.value:d,Pc(p)?null:p}(n.limit));let u=null;n.startAt&&(u=function(d){const p=!!d.before,y=d.values||[];return new Uu(y,p)}(n.startAt));let c=null;return n.endAt&&(c=function(d){const p=!d.before,y=d.values||[];return new Uu(y,p)}(n.endAt)),EV(e,i,o,s,l,"F",u,c)}function rD(t,e){const n=function(i){switch(i){case"TargetPurposeListen":return null;case"TargetPurposeExistenceFilterMismatch":return"existence-filter-mismatch";case"TargetPurposeExistenceFilterMismatchBloom":return"existence-filter-mismatch-bloom";case"TargetPurposeLimboResolution":return"limbo-document";default:return J(28987,{purpose:i})}}(e.purpose);return n==null?null:{"goog-listen-tags":n}}function lS(t){return t.unaryFilter!==void 0?function(n){switch(n.unaryFilter.op){case"IS_NAN":const r=ji(n.unaryFilter.field);return $e.create(r,"==",{doubleValue:NaN});case"IS_NULL":const i=ji(n.unaryFilter.field);return $e.create(i,"==",{nullValue:"NULL_VALUE"});
1415case"IS_NOT_NAN":const s=ji(n.unaryFilter.field);return $e.create(s,"!=",{doubleValue:NaN});case"IS_NOT_NULL":const o=ji(n.unaryFilter.field);return $e.create(o,"!=",{nullValue:"NULL_VALUE"});case"OPERATOR_UNSPECIFIED":return J(61313);default:return J(60726)}}(t):t.fieldFilter!==void 0?function(n){return $e.create(ji(n.fieldFilter.field),function(i){switch(i){case"EQUAL":return"==";case"NOT_EQUAL":return"!=";case"GREATER_THAN":return">";case"GREATER_THAN_OR_EQUAL":return">=";case"LESS_THAN":return"<";case"LESS_THAN_OR_EQUAL":return"<=";case"ARRAY_CONTAINS":return"array-contains";case"IN":return"in";case"NOT_IN":return"not-in";case"ARRAY_CONTAINS_ANY":return"array-contains-any";case"OPERATOR_UNSPECIFIED":return J(58110);default:return J(50506)}}(n.fieldFilter.op),n.fieldFilter.value)}(t):t.compositeFilter!==void 0?function(n){return Tn.create(n.compositeFilter.filters.map(r=>lS(r)),function(i){switch(i){case"AND":return"and";case"OR":return"or";default:return J(1026)}}(n.compositeFilter.op))}(t):J(30097,{filter:t})}function iD(t){return WV[t]}function sD(t){return KV[t]}function oD(t){return GV[t]}function Fi(t){return{fieldPath:t.canonicalString()}}function ji(t){return ot.fromServerFormat(t.fieldPath)}function uS(t){return t instanceof $e?function(n){if(n.op==="=="){if(c0(n.value))return{unaryFilter:{field:Fi(n.field),op:"IS_NAN"}};if(u0(n.value))return{unaryFilter:{field:Fi(n.field),op:"IS_NULL"}}}else if(n.op==="!="){if(c0(n.value))return{unaryFilter:{field:Fi(n.field),op:"IS_NOT_NAN"}};if(u0(n.value))return{unaryFilter:{field:Fi(n.field),op:"IS_NOT_NULL"}}}return{fieldFilter:{field:Fi(n.field),op:sD(n.op),value:n.value}}}(t):t instanceof Tn?function(n){const r=n.getFilters().map(i=>uS(i));return r.length===1?r[0]:{compositeFilter:{op:oD(n.op),filters:r}}}(t):J(54877,{filter:t})}function aD(t){const e=[];return t.fields.forEach(n=>e.push(n.canonicalString())),{fieldPaths:e}}function cS(t){return t.length>=4&&t.get(0)==="projects"&&t.get(2)==="databases"}/**
1416 * @license
1417 * Copyright 2017 Google LLC
1418 *
1419 * Licensed under the Apache License, Version 2.0 (the "License");
1420 * you may not use this file except in compliance with the License.
1421 * You may obtain a copy of the License at
1422 *
1423 *   http://www.apache.org/licenses/LICENSE-2.0
1424 *
1425 * Unless required by applicable law or agreed to in writing, software
1426 * distributed under the License is distributed on an "AS IS" BASIS,
1427 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1428 * See the License for the specific language governing permissions and
1429 * limitations under the License.
1430 */class yr{constructor(e,n,r,i,s=te.min(),o=te.min(),l=ut.EMPTY_BYTE_STRING,u=null){this.target=e,this.targetId=n,this.purpose=r,this.sequenceNumber=i,this.snapshotVersion=s,this.lastLimboFreeSnapshotVersion=o,this.resumeToken=l,this.expectedCount=u}withSequenceNumber(e){return new yr(this.target,this.targetId,this.purpose,e,this.snapshotVersion,this.lastLimboFreeSnapshotVersion,this.resumeToken,this.expectedCount)}withResumeToken(e,n){return new yr(this.target,this.targetId,this.purpose,this.sequenceNumber,n,this.lastLimboFreeSnapshotVersion,e,null)}withExpectedCount(e){return new yr(this.target,this.targetId,this.purpose,this.sequenceNumber,this.snapshotVersion,this.lastLimboFreeSnapshotVersion,this.resumeToken,e)}withLastLimboFreeSnapshotVersion(e){return new yr(this.target,this.targetId,this.purpose,this.sequenceNumber,this.snapshotVersion,e,this.resumeToken,this.expectedCount)}}/**
1431 * @license
1432 * Copyright 2017 Google LLC
1433 *
1434 * Licensed under the Apache License, Version 2.0 (the "License");
1435 * you may not use this file except in compliance with the License.
1436 * You may obtain a copy of the License at
1437 *
1438 *   http://www.apache.org/licenses/LICENSE-2.0
1439 *
1440 * Unless required by applicable law or agreed to in writing, software
1441 * distributed under the License is distributed on an "AS IS" BASIS,
1442 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1443 * See the License for the specific language governing permissions and
1444 * limitations under the License.
1445 */class lD{constructor(e){this.wt=e}}function uD(t){const e=nD({parent:t.parent,structuredQuery:t.structuredQuery});return t.limitType==="LAST"?$u(e,e.limit,"L"):e}/**
1446 * @license
1447 * Copyright 2019 Google LLC
1448 *
1449 * Licensed under the Apache License, Version 2.0 (the "License");
1450 * you may not use this file except in compliance with the License.
1451 * You may obtain a copy of the License at
1452 *
1453 *   http://www.apache.org/licenses/LICENSE-2.0
1454 *
1455 * Unless required by applicable law or agreed to in writing, software
1456 * distributed under the License is distributed on an "AS IS" BASIS,
1457 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1458 * See the License for the specific language governing permissions and
1459 * limitations under the License.
1460 */class cD{constructor(){this.Cn=new hD}addToCollectionParentIndex(e,n){return this.Cn.add(n),O.resolve()}getCollectionParents(e,n){return O.resolve(this.Cn.getEntries(n))}addFieldIndex(e,n){return O.resolve()}deleteFieldIndex(e,n){return O.resolve()}deleteAllFieldIndexes(e){return O.resolve()}createTargetIndexes(e,n){return O.resolve()}getDocumentsMatchingTarget(e,n){return O.resolve(null)}getIndexType(e,n){return O.resolve(0)}getFieldIndexes(e,n){return O.resolve([])}getNextCollectionGroupToUpdate(e){return O.resolve(null)}getMinOffset(e,n){return O.resolve(Nr.min())}getMinOffsetFromCollectionGroup(e,n){return O.resolve(Nr.min())}updateCollectionGroup(e,n,r){return O.resolve()}updateIndexEntries(e,n){return O.resolve()}}class hD{constructor(){this.index={}}add(e){const n=e.lastSegment(),r=e.popLast(),i=this.index[n]||new qe(Ie.comparator),s=!i.has(r);return this.index[n]=i.add(r),s}has(e){const n=e.lastSegment(),r=e.popLast(),i=this.index[n];return i&&i.has(r)}getEntries(e){return(this.index[e]||new qe(Ie.comparator)).toArray()}}/**
1461 * @license
1462 * Copyright 2018 Google LLC
1463 *
1464 * Licensed under the Apache License, Version 2.0 (the "License");
1465 * you may not use this file except in compliance with the License.
1466 * You may obtain a copy of the License at
1467 *
1468 *   http://www.apache.org/licenses/LICENSE-2.0
1469 *
1470 * Unless required by applicable law or agreed to in writing, software
1471 * distributed under the License is distributed on an "AS IS" BASIS,
1472 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1473 * See the License for the specific language governing permissions and
1474 * limitations under the License.
1475 */const A0={didRun:!1,sequenceNumbersCollected:0,targetsRemoved:0,documentsRemoved:0},hS=41943040;class Vt{static withCacheSize(e){return new Vt(e,Vt.DEFAULT_COLLECTION_PERCENTILE,Vt.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT)}constructor(e,n,r){this.cacheSizeCollectionThreshold=e,this.percentileToCollect=n,this.maximumSequenceNumbersToCollect=r}}/**
1476 * @license
1477 * Copyright 2017 Google LLC
1478 *
1479 * Licensed under the Apache License, Version 2.0 (the "License");
1480 * you may not use this file except in compliance with the License.
1481 * You may obtain a copy of the License at
1482 *
1483 *   http://www.apache.org/licenses/LICENSE-2.0
1484 *
1485 * Unless required by applicable law or agreed to in writing, software
1486 * distributed under the License is distributed on an "AS IS" BASIS,
1487 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1488 * See the License for the specific language governing permissions and
1489 * limitations under the License.
1490 */Vt.DEFAULT_COLLECTION_PERCENTILE=10,Vt.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT=1e3,Vt.DEFAULT=new Vt(hS,Vt.DEFAULT_COLLECTION_PERCENTILE,Vt.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT),Vt.DISABLED=new Vt(-1,0,0);/**
1491 * @license
1492 * Copyright 2017 Google LLC
1493 *
1494 * Licensed under the Apache License, Version 2.0 (the "License");
1495 * you may not use this file except in compliance with the License.
1496 * You may obtain a copy of the License at
1497 *
1498 *   http://www.apache.org/licenses/LICENSE-2.0
1499 *
1500 * Unless required by applicable law or agreed to in writing, software
1501 * distributed under the License is distributed on an "AS IS" BASIS,
1502 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1503 * See the License for the specific language governing permissions and
1504 * limitations under the License.
1505 */class ks{constructor(e){this.ur=e}next(){return this.ur+=2,this.ur}static cr(){return new ks(0)}static lr(){return new ks(-1)}}/**
1506 * @license
1507 * Copyright 2020 Google LLC
1508 *
1509 * Licensed under the Apache License, Version 2.0 (the "License");
1510 * you may not use this file except in compliance with the License.
1511 * You may obtain a copy of the License at
1512 *
1513 *   http://www.apache.org/licenses/LICENSE-2.0
1514 *
1515 * Unless required by applicable law or agreed to in writing, software
1516 * distributed under the License is distributed on an "AS IS" BASIS,
1517 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1518 * See the License for the specific language governing permissions and
1519 * limitations under the License.
1520 */const I0="LruGarbageCollector",fD=1048576;function x0([t,e],[n,r]){const i=se(t,n);return i===0?se(e,r):i}class dD{constructor(e){this.Er=e,this.buffer=new qe(x0),this.dr=0}Ar(){return++this.dr}Rr(e){const n=[e,this.Ar()];if(this.buffer.size<this.Er)this.buffer=this.buffer.add(n);else{const r=this.buffer.last();x0(n,r)<0&&(this.buffer=this.buffer.delete(r).add(n))}}get maxValue(){return this.buffer.last()[0]}}class pD{constructor(e,n,r){this.garbageCollector=e,this.asyncQueue=n,this.localStore=r,this.Vr=null}start(){this.garbageCollector.params.cacheSizeCollectionThreshold!==-1&&this.mr(6e4)}stop(){this.Vr&&(this.Vr.cancel(),this.Vr=null)}get started(){return this.Vr!==null}mr(e){H(I0,`Garbage collection scheduled in ${e}ms`),this.Vr=this.asyncQueue.enqueueAfterDelay("lru_garbage_collection",e,async()=>{this.Vr=null;try{await this.localStore.collectGarbage(this.garbageCollector)}catch(n){$s(n)?H(I0,"Ignoring IndexedDB error during garbage collection: ",n):await Us(n)}await this.mr(3e5)})}}class mD{constructor(e,n){this.gr=e,this.params=n}calculateTargetCount(e,n){return this.gr.pr(e).next(r=>Math.floor(n/100*r))}nthSequenceNumber(e,n){if(n===0)return O.resolve(Cc.le);const r=new dD(n);return this.gr.forEachTarget(e,i=>r.Rr(i.sequenceNumber)).next(()=>this.gr.yr(e,i=>r.Rr(i))).next(()=>r.maxValue)}removeTargets(e,n,r){return this.gr.removeTargets(e,n,r)}removeOrphanedDocuments(e,n){return this.gr.removeOrphanedDocuments(e,n)}collect(e,n){return this.params.cacheSizeCollectionThreshold===-1?(H("LruGarbageCollector","Garbage collection skipped; disabled"),O.resolve(A0)):this.getCacheSize(e).next(r=>r<this.params.cacheSizeCollectionThreshold?(H("LruGarbageCollector",`Garbage collection skipped; Cache size ${r} is lower than threshold ${this.params.cacheSizeCollectionThreshold}`),A0):this.wr(e,n))}getCacheSize(e){return this.gr.getCacheSize(e)}wr(e,n){let r,i,s,o,l,u,c;const f=Date.now();return this.calculateTargetCount(e,this.params.percentileToCollect).next(d=>(d>this.params.maximumSequenceNumbersToCollect?(H("LruGarbageCollector",`Capping sequence numbers to collect down to the maximum of ${this.params.maximumSequenceNumbersToCollect} from ${d}`),i=this.params.maximumSequenceNumbersToCollect):i=d,o=Date.now(),this.nthSequenceNumber(e,i))).next(d=>(r=d,l=Date.now(),this.removeTargets(e,r,n))).next(d=>(s=d,u=Date.now(),this.removeOrphanedDocuments(e,r))).next(d=>(c=Date.now(),Li()<=ce.DEBUG&&H("LruGarbageCollector",`LRU Garbage Collection
1521	Counted targets in ${o-f}ms
1522	Determined least recently used ${i} in `+(l-o)+`ms
1523	Removed ${s} targets in `+(u-l)+`ms
1524	Removed ${d} documents in `+(c-u)+`ms
1525Total Duration: ${c-f}ms`),O.resolve({didRun:!0,sequenceNumbersCollected:i,targetsRemoved:s,documentsRemoved:d})))}}function gD(t,e){return new mD(t,e)}/**
1526 * @license
1527 * Copyright 2017 Google LLC
1528 *
1529 * Licensed under the Apache License, Version 2.0 (the "License");
1530 * you may not use this file except in compliance with the License.
1531 * You may obtain a copy of the License at
1532 *
1533 *   http://www.apache.org/licenses/LICENSE-2.0
1534 *
1535 * Unless required by applicable law or agreed to in writing, software
1536 * distributed under the License is distributed on an "AS IS" BASIS,
1537 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1538 * See the License for the specific language governing permissions and
1539 * limitations under the License.
1540 */class yD{constructor(){this.changes=new Ii(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,wt.newInvalidDocument(e).setReadTime(n))}getEntry(e,n){this.assertNotApplied();const r=this.changes.get(n);return r!==void 0?O.resolve(r):this.getFromCache(e,n)}getEntries(e,n){return this.getAllFromCache(e,n)}apply(e){return this.assertNotApplied(),this.changesApplied=!0,this.applyChanges(e)}
vendor: 3,221 bytes, lines 1540-1585
1540assertNotApplied(){}}/**
1541 * @license
1542 * Copyright 2017 Google LLC
1543 *
1544 * Licensed under the Apache License, Version 2.0 (the "License");
1545 * you may not use this file except in compliance with the License.
1546 * You may obtain a copy of the License at
1547 *
1548 *   http://www.apache.org/licenses/LICENSE-2.0
1549 *
1550 * Unless required by applicable law or agreed to in writing, software
1551 * distributed under the License is distributed on an "AS IS" BASIS,
1552 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1553 * See the License for the specific language governing permissions and
1554 * limitations under the License.
1555 *//**
1556 * @license
1557 * Copyright 2022 Google LLC
1558 *
1559 * Licensed under the Apache License, Version 2.0 (the "License");
1560 * you may not use this file except in compliance with the License.
1561 * You may obtain a copy of the License at
1562 *
1563 *   http://www.apache.org/licenses/LICENSE-2.0
1564 *
1565 * Unless required by applicable law or agreed to in writing, software
1566 * distributed under the License is distributed on an "AS IS" BASIS,
1567 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1568 * See the License for the specific language governing permissions and
1569 * limitations under the License.
1570 */class vD{constructor(e,n){this.overlayedDocument=e,this.mutatedFields=n}}/**
1571 * @license
1572 * Copyright 2017 Google LLC
1573 *
1574 * Licensed under the Apache License, Version 2.0 (the "License");
1575 * you may not use this file except in compliance with the License.
1576 * You may obtain a copy of the License at
1577 *
1578 *   http://www.apache.org/licenses/LICENSE-2.0
1579 *
1580 * Unless required by applicable law or agreed to in writing, software
1581 * distributed under the License is distributed on an "AS IS" BASIS,
1582 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1583 * See the License for the specific language governing permissions and
1584 * limitations under the License.
1585 */class _D{constructor(e,n,r,i){this.remoteDocumentCache=e,this.mutationQueue=n,this.documentOverlayCache=r,this.indexManager=i}getDocument(e,n){let r=null;return this.documentOverlayCache.getOverlay(e,n).next(i=>(r=i,this.remoteDocumentCache.getEntry(e,n))).next(i=>(r!==null&&$o(r.mutation,i,yn.empty(),Ge.now()),i))}getDocuments(e,n){return this.remoteDocumentCache.getEntries(e,n).next(r=>this.getLocalViewOfDocuments(e,r,le()).next(()=>r))}getLocalViewOfDocuments(e,n,r=le()){const i=li();return this.populateOverlays(e,i,n).next(()=>this.computeViews(e,n,i,r).next(s=>{let o=Ao();return s.forEach((l,u)=>{o=o.insert(l,u.overlayedDocument)}),o}))}getOverlayedDocuments(e,n){const r=li();return this.populateOverlays(e,r,n).next(()=>this.computeViews(e,n,r,le()))}populateOverlays(e,n,r){const i=[];return r.forEach(s=>{n.has(s)||i.push(s)}),this.documentOverlayCache.getOverlays(e,i).next(s=>{s.forEach((o,l)=>{n.set(o,l)})})}computeViews(e,n,r,i){let s=er();const o=Uo(),l=function(){return Uo()}();return n.forEach((u,c)=>{const f=r.get(c.key);i.has(c.key)&&(f===void 0||f.mutation instanceof xi)?s=s.insert(c.key,c):f!==void 0?(o.set(c.key,f.mutation.getFieldMask()),$o(f.mutation,c,f.mutation.getFieldMask(),Ge.now())):o.set(c.key,yn.empty())}),this.recalculateAndSaveOverlays(e,s).next(u=>(u.forEach((c,f)=>
1585o.set(c,f)),n.forEach((c,f)=>{var d;return l.set(c,new vD(f,(d=o.get(c))!==null&&d!==void 0?d:null))}),l))}recalculateAndSaveOverlays(e,n){const r=Uo();let i=new be((o,l)=>o-l),s=le();return this.mutationQueue.getAllMutationBatchesAffectingDocumentKeys(e,n).next(o=>{for(const l of o)l.keys().forEach(u=>{const c=n.get(u);if(c===null)return;let f=r.get(u)||yn.empty();f=l.applyToLocalView(c,f),r.set(u,f);const d=(i.get(l.batchId)||le()).add(u);i=i.insert(l.batchId,d)})}).next(()=>{const o=[],l=i.getReverseIterator();for(;l.hasNext();){const u=l.getNext(),c=u.key,f=u.value,d=KT();f.forEach(p=>{if(!s.has(p)){const y=ZT(n.get(p),r.get(p));y!==null&&d.set(p,y),s=s.add(p)}}),o.push(this.documentOverlayCache.saveOverlays(e,c,d))}return O.waitFor(o)}).next(()=>r)}recalculateAndSaveOverlaysForDocumentKeys(e,n){return this.remoteDocumentCache.getEntries(e,n).next(r=>this.recalculateAndSaveOverlays(e,r))}getDocumentsMatchingQuery(e,n,r,i){return function(o){return Q.isDocumentKey(o.path)&&o.collectionGroup===null&&o.filters.length===0}(n)?this.getDocumentsMatchingDocumentQuery(e,n.path):zT(n)?this.getDocumentsMatchingCollectionGroupQuery(e,n,r,i):this.getDocumentsMatchingCollectionQuery(e,n,r,i)}getNextDocuments(e,n,r,i){return this.remoteDocumentCache.getAllFromCollectionGroup(e,n,r,i).next(s=>{const o=i-s.size>0?this.documentOverlayCache.getOverlaysForCollectionGroup(e,n,r.largestBatchId,i-s.size):O.resolve(li());let l=ma,u=s;return o.next(c=>O.forEach(c,(f,d)=>(l<d.largestBatchId&&(l=d.largestBatchId),s.get(f)?O.resolve():this.remoteDocumentCache.getEntry(e,f).next(p=>{u=u.insert(f,p)}))).next(()=>this.populateOverlays(e,c,s)).next(()=>this.computeViews(e,u,c,le())).next(f=>({batchId:l,changes:WT(f)})))})}getDocumentsMatchingDocumentQuery(e,n){return this.getDocument(e,new Q(n)).next(r=>{let i=Ao();return r.isFoundDocument()&&(i=i.insert(r.key,r)),i})}getDocumentsMatchingCollectionGroupQuery(e,n,r,i){const s=n.collectionGroup;let o=Ao();return this.indexManager.getCollectionParents(e,s).next(l=>O.forEach(l,u=>{const c=function(d,p){return new Hs(p,null,d.explicitOrderBy.slice(),d.filters.slice(),d.limit,d.limitType,d.startAt,d.endAt)}(n,u.child(s));return this.getDocumentsMatchingCollectionQuery(e,c,r,i).next(f=>{f.forEach((d,p)=>{o=o.insert(d,p)})})}).next(()=>o))}getDocumentsMatchingCollectionQuery(e,n,r,i){let s;return this.documentOverlayCache.getOverlaysForCollection(e,n.path,r.largestBatchId).next(o=>(s=o,this.remoteDocumentCache.getDocumentsMatchingQuery(e,n,r,s,i))).next(o=>{s.forEach((u,c)=>{const f=c.getKey();o.get(f)===null&&(o=o.insert(f,wt.newInvalidDocument(f)))});let l=Ao();return o.forEach((u,c)=>{const f=s.get(u);f!==void 0&&$o(f.mutation,c,yn.empty(),Ge.now()),Vc(n,c)&&(l=l.insert(u,c))}),l})}}/**
1586 * @license
1587 * Copyright 2020 Google LLC
1588 *
1589 * Licensed under the Apache License, Version 2.0 (the "License");
1590 * you may not use this file except in compliance with the License.
1591 * You may obtain a copy of the License at
1592 *
1593 *   http://www.apache.org/licenses/LICENSE-2.0
1594 *
1595 * Unless required by applicable law or agreed to in writing, software
1596 * distributed under the License is distributed on an "AS IS" BASIS,
1597 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1598 * See the License for the specific language governing permissions and
1599 * limitations under the License.
1600 */class wD{constructor(e){this.serializer=e,this.kr=new Map,this.qr=new Map}getBundleMetadata(e,n){return O.resolve(this.kr.get(n))}saveBundleMetadata(e,n){return this.kr.set(n.id,function(i){return{id:i.id,version:i.version,createTime:Dn(i.createTime)}}(n)),O.resolve()}getNamedQuery(e,n){return O.resolve(this.qr.get(n))}saveNamedQuery(e,n){return this.qr.set(n.name,function(i){return{name:i.name,query:uD(i.bundledQuery),readTime:Dn(i.readTime)}}(n)),O.resolve()}}/**
1601 * @license
1602 * Copyright 2022 Google LLC
1603 *
1604 * Licensed under the Apache License, Version 2.0 (the "License");
1605 * you may not use this file except in compliance with the License.
1606 * You may obtain a copy of the License at
1607 *
1608 *   http://www.apache.org/licenses/LICENSE-2.0
1609 *
1610 * Unless required by applicable law or agreed to in writing, softw
1610are
1611 * distributed under the License is distributed on an "AS IS" BASIS,
1612 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1613 * See the License for the specific language governing permissions and
1614 * limitations under the License.
1615 */class ED{constructor(){this.overlays=new be(Q.comparator),this.Qr=new Map}getOverlay(e,n){return O.resolve(this.overlays.get(n))}getOverlays(e,n){const r=li();return O.forEach(n,i=>this.getOverlay(e,i).next(s=>{s!==null&&r.set(i,s)})).next(()=>r)}saveOverlays(e,n,r){return r.forEach((i,s)=>{this.St(e,n,s)}),O.resolve()}removeOverlaysForBatchId(e,n,r){const i=this.Qr.get(r);return i!==void 0&&(i.forEach(s=>this.overlays=this.overlays.remove(s)),this.Qr.delete(r)),O.resolve()}getOverlaysForCollection(e,n,r){const i=li(),s=n.length+1,o=new Q(n.child("")),l=this.overlays.getIteratorFrom(o);for(;l.hasNext();){const u=l.getNext().value,c=u.getKey();if(!n.isPrefixOf(c.path))break;c.path.length===s&&u.largestBatchId>r&&i.set(u.getKey(),u)}return O.resolve(i)}getOverlaysForCollectionGroup(e,n,r,i){let s=new be((c,f)=>c-f);const o=this.overlays.getIterator();for(;o.hasNext();){const c=o.getNext().value;if(c.getKey().getCollectionGroup()===n&&c.largestBatchId>r){let f=s.get(c.largestBatchId);f===null&&(f=li(),s=s.insert(c.largestBatchId,f)),f.set(c.getKey(),c)}}const l=li(),u=s.getIterator();for(;u.hasNext()&&(u.getNext().value.forEach((c,f)=>l.set(c,f)),!(l.size()>=i)););return O.resolve(l)}St(e,n,r){const i=this.overlays.get(r.key);if(i!==null){const o=this.Qr.get(i.largestBatchId).delete(r.key);this.Qr.set(i.largestBatchId,o)}this.overlays=this.overlays.insert(r.key,new BV(n,r));let s=this.Qr.get(n);s===void 0&&(s=le(),this.Qr.set(n,s)),this.Qr.set(n,s.add(r.key))}}/**
1616 * @license
1617 * Copyright 2024 Google LLC
1618 *
1619 * Licensed under the Apache License, Version 2.0 (the "License");
1620 * you may not use this file except in compliance with the License.
1621 * You may obtain a copy of the License at
1622 *
1623 *   http://www.apache.org/licenses/LICENSE-2.0
1624 *
1625 * Unless required by applicable law or agreed to in writing, software
1626 * distributed under the License is distributed on an "AS IS" BASIS,
1627 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1628 * See the License for the specific language governing permissions and
1629 * limitations under the License.
1630 */class TD{constructor(){this.sessionToken=ut.EMPTY_BYTE_STRING}getSessionToken(e){return O.resolve(this.sessionToken)}setSessionToken(e,n){return this.sessionToken=n,O.resolve()}}/**
1631 * @license
1632 * Copyright 2017 Google LLC
1633 *
1634 * Licensed under the Apache License, Version 2.0 (the "License");
1635 * you may not use this file except in compliance with the License.
1636 * You may obtain a copy of the License at
1637 *
1638 *   http://www.apache.org/licenses/LICENSE-2.0
1639 *
1640 * Unless required by applicable law or agreed to in writing, software
1641 * distributed under the License is distributed on an "AS IS" BASIS,
1642 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1643 * See the License for the specific language governing permissions and
1644 * limitations under the License.
1645 */class lm{constructor(){this.$r=new qe(Qe.Ur),this.Kr=new qe(Qe.Wr)}isEmpty(){return this.$r.isEmpty()}addReference(e,n){const r=new Qe(e,n);this.$r=this.$r.add(r),this.Kr=this.Kr.add(r)}Gr(e,n){e.forEach(r=>this.addReference(r,n))}removeReference(e,n){this.zr(new Qe(e,n))}jr(e,n){e.forEach(r=>this.removeReference(r,n))}Hr(e){const n=new Q(new Ie([])),r=new Qe(n,e),i=new Qe(n,e+1),s=[];return this.Kr.forEachInRange([r,i],o=>{this.zr(o),s.push(o.key)}),s}Jr(){this.$r.forEach(e=>this.zr(e))}zr(e){this.$r=this.$r.delete(e),this.Kr=this.Kr.delete(e)}Yr(e){const n=new Q(new Ie([])),r=new Qe(n,e),i=new Qe(n,e+1);let s=le();return this.Kr.forEachInRange([r,i],o=>{s=s.add(o.key)}),s}containsKey(e){const n=new Qe(e,0),r=this.$r.firstAfterOrEqual(n);return r!==null&&e.isEqual(r.key)}}class Qe{constructor(e,n){this.key=e,this.Zr=n}static Ur(e,n){return Q.comparator(e.key,n.key)||se(e.Zr,n.Zr)}static Wr(e,n){return se(e.Zr,n.Zr)||Q.comparator(e.key,n.key)}}/**
1646 * @license
1647 * Copyright 2017 Google LLC
1648 *
1649 * Licensed under the Apache License, Version 2.0 (the "License");
1650 * you may not use this file except in compliance with the License.
1651 * You may obtain a copy of the License at
1652 *
1653 *   http://www.apache.org/licenses/LICENSE-2.0
1654 *
1655 * Unless required by applicable law or agreed to in writing, software
1656 * distributed under the License is distributed on an "AS IS" BASIS,
1657 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1658 * See the License for the specific language governing permissions and
1659 * limitations under the License.
1660 */class SD{constructor(e,n){this.indexManager=e,this.referenceDelegate=n,this.mutationQueue=[],this.nr=1,this.Xr=new qe(Qe.Ur)}checkEmpty(e){return O.resolve(this.mutationQueue.length===0)}addMutationBatch(e,n,r,i){const s=this.nr;this.nr++,this.mutationQueue.length>0&&this.mutationQueue[this.mutationQueue.length-1];const o=new jV(s,n,r,i);this.mutationQueue.push(o);for(const l of i)this.Xr=this.Xr.add(new Qe(l.key,s)),this.indexManager.addToCollectionParentIndex(e,l.key.path.popLast());return O.resolve(o)}lookupMutationBatch(e,n){return O.resolve(this.ei(n))}getNextMutationBatchAfterBatchId(e,n){const r=n+1,i=this.ti(r),s=i<0?0:i;return O.resolve(this.mutationQueue.length>s?this.mutationQueue[s]:null)}getHighestUnacknowledgedBatchId(){return O.resolve(this.mutationQueue.length===0?Jp:this.nr-1)}getAllMutationBatches(e){return O.resolve(this.mutationQueue.slice())}getAllMutationBatchesAffectingDocumentKey(e,n){const r=new Qe(n,0),i=new Qe(n,Number.POSITIVE_INFINITY),s=[];return this.Xr.forEachInRange([r,i],o=>{const l=this.ei(o.Zr);s.push(l)}),O.resolve(s)}getAllMutationBatchesAffectingDocumentKeys(e,n){let r=new qe(se);return n.forEach(i=>{const s=new Qe(i,0),o=new Qe(i,Number.POSITIVE_INFINITY);this.Xr.forEachInRange([s,o],l=>{r=r.add(l.Zr)})}),O.resolve(this.ni(r))}getAllMutationBatchesAffectingQuery(e,n){const r=n.path,i=r.length+1;let s=r;Q.isDocumentKey(s)||(s=s.child(""));const o=new Qe(new Q(s),0);let l=new qe(se);return this.Xr.forEachWhile(u=>{const c=u.key.path;return!!r.isPrefixOf(c)&&(c.length===i&&(l=l.add(u.Zr)),!0)},o),O.resolve(this.ni(l))}ni(e){const n=[];return e.forEach(r=>{const i=this.ei(r);i!==null&&n.push(i)}),n}removeMutationBatch(e,n){ye(this.ri(n.batchId,"removed")===0,55003),this.mutationQueue.shift();let r=this.Xr;return O.forEach(n.mutations,i=>{const s=new Qe(i.key,n.batchId);return r=r.delete(s),this.referenceDelegate.markPotentiallyOrphaned(e,i.key)}).next(()=>{this.Xr=r})}sr(e){}containsKey(e,n){const r=new Qe(n,0),i=this.Xr.firstAfterOrEqual(r);return O.resolve(n.isEqual(i&&i.key))}performConsistencyCheck(e){return this.mutationQueue.length,O.resolve()}ri(e,n){return this.ti(e)}ti(e){return this.mutationQueue.length===0?0:e-this.mutationQueue[0].batchId}ei(e){const n=this.ti(e);return n<0||n>=this.mutationQueue.length?null:this.mutationQueue[n]}}/**
1661 * @license
1662 * Copyright 2017 Google LLC
1663 *
1664 * Licensed under the Apache License, Version 2.0 (the "License");
1665 * you may not use this file except in compliance with the License.
1666 * You may obtain a copy of the License at
1667 *
1668 *   http://www.apache.org/licenses/LICENSE-2.0
1669 *
1670 * Unless required by applicable law or agreed to in writing, software
1671 * distributed under the License is distributed on an "AS IS" BASIS,
1672 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1673 * See the License for the specific language governing permissions and
1674 * limitations under the License.
1675 */class AD{constructor(e){this.ii=e,this.docs=function(){return new be(Q.comparator)}(),this.size=0}setIndexManager(e){this.indexManager=e}addEntry(e,n){const r=n.key,i=this.docs.get(r),s=i?i.size:0,o=this.ii(n);return this.docs=this.docs.insert(r,{document:n.mutableCopy(),size:o}),this.size+=o-s,this.indexManager.addToCollectionParentIndex(e,r.path.popLast())}removeEntry(e){const n=this.docs.get(e);n&&(this.docs=this.docs.remove(e),this.size-=n.size)}getEntry(e,n){const r=this.docs.get(n);return O.resolve(r?r.document.mutableCopy():wt.newInvalidDocument(n))}getEntries(e,n){let r=er();return n.forEach(i=>{const s=this.docs.get(i);r=r.insert(i,s?s.document.mutableCopy():wt.newInvalidDocument(i))}),O.resolve(r)}getDocumentsMatchingQuery(e,n,r,i){let s=er();const o=n.path,l=new Q(o.child("__id-9223372036854775808__")),u=this.docs.getIteratorFrom(l);for(;u.hasNext();){const{key:c,value:{document:f}}=u.getNext();if(!o.isPrefixOf(c.path))break;c.path.length>
vendor: 9,412 bytes, lines 1675-1739
1675o.length+1||Jk(Zk(f),r)<=0||(i.has(f.key)||Vc(n,f))&&(s=s.insert(f.key,f.mutableCopy()))}return O.resolve(s)}getAllFromCollectionGroup(e,n,r,i){J(9500)}si(e,n){return O.forEach(this.docs,r=>n(r))}newChangeBuffer(e){return new ID(this)}getSize(e){return O.resolve(this.size)}}class ID extends yD{constructor(e){super(),this.Br=e}applyChanges(e){const n=[];return this.changes.forEach((r,i)=>{i.isValidDocument()?n.push(this.Br.addEntry(e,i)):this.Br.removeEntry(r)}),O.waitFor(n)}getFromCache(e,n){return this.Br.getEntry(e,n)}getAllFromCache(e,n){return this.Br.getEntries(e,n)}}/**
1676 * @license
1677 * Copyright 2017 Google LLC
1678 *
1679 * Licensed under the Apache License, Version 2.0 (the "License");
1680 * you may not use this file except in compliance with the License.
1681 * You may obtain a copy of the License at
1682 *
1683 *   http://www.apache.org/licenses/LICENSE-2.0
1684 *
1685 * Unless required by applicable law or agreed to in writing, software
1686 * distributed under the License is distributed on an "AS IS" BASIS,
1687 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1688 * See the License for the specific language governing permissions and
1689 * limitations under the License.
1690 */class xD{constructor(e){this.persistence=e,this.oi=new Ii(n=>nm(n),rm),this.lastRemoteSnapshotVersion=te.min(),this.highestTargetId=0,this._i=0,this.ai=new lm,this.targetCount=0,this.ui=ks.cr()}forEachTarget(e,n){return this.oi.forEach((r,i)=>n(i)),O.resolve()}getLastRemoteSnapshotVersion(e){return O.resolve(this.lastRemoteSnapshotVersion)}getHighestSequenceNumber(e){return O.resolve(this._i)}allocateTargetId(e){return this.highestTargetId=this.ui.next(),O.resolve(this.highestTargetId)}setTargetsMetadata(e,n,r){return r&&(this.lastRemoteSnapshotVersion=r),n>this._i&&(this._i=n),O.resolve()}Tr(e){this.oi.set(e.target,e);const n=e.targetId;n>this.highestTargetId&&(this.ui=new ks(n),this.highestTargetId=n),e.sequenceNumber>this._i&&(this._i=e.sequenceNumber)}addTargetData(e,n){return this.Tr(n),this.targetCount+=1,O.resolve()}updateTargetData(e,n){return this.Tr(n),O.resolve()}removeTargetData(e,n){return this.oi.delete(n.target),this.ai.Hr(n.targetId),this.targetCount-=1,O.resolve()}removeTargets(e,n,r){let i=0;const s=[];return this.oi.forEach((o,l)=>{l.sequenceNumber<=n&&r.get(l.targetId)===null&&(this.oi.delete(o),s.push(this.removeMatchingKeysForTargetId(e,l.targetId)),i++)}),O.waitFor(s).next(()=>i)}getTargetCount(e){return O.resolve(this.targetCount)}getTargetData(e,n){const r=this.oi.get(n)||null;return O.resolve(r)}addMatchingKeys(e,n,r){return this.ai.Gr(n,r),O.resolve()}removeMatchingKeys(e,n,r){this.ai.jr(n,r);const i=this.persistence.referenceDelegate,s=[];return i&&n.forEach(o=>{s.push(i.markPotentiallyOrphaned(e,o))}),O.waitFor(s)}removeMatchingKeysForTargetId(e,n){return this.ai.Hr(n),O.resolve()}getMatchingKeysForTargetId(e,n){const r=this.ai.Yr(n);return O.resolve(r)}containsKey(e,n){return O.resolve(this.ai.containsKey(n))}}/**
1691 * @license
1692 * Copyright 2017 Google LLC
1693 *
1694 * Licensed under the Apache License, Version 2.0 (the "License");
1695 * you may not use this file except in compliance with the License.
1696 * You may obtain a copy of the License at
1697 *
1698 *   http://www.apache.org/licenses/LICENSE-2.0
1699 *
1700 * Unless required by applicable law or agreed to in writing, software
1701 * distributed under the License is distributed on an "AS IS" BASIS,
1702 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1703 * See the License for the specific language governing permissions and
1704 * limitations under the License.
1705 */class fS{constructor(e,n){this.ci={},this.overlays={},this.li=new Cc(0),this.hi=!1,this.hi=!0,this.Pi=new TD,this.referenceDelegate=e(this),this.Ti=new xD(this),this.indexManager=new cD,this.remoteDocumentCache=function(i){return new AD(i)}(r=>this.referenceDelegate.Ii(r)),this.serializer=new lD(n),this.Ei=new wD(this.serializer)}start(){return Promise.resolve()}shutdown(){return this.hi=!1,Promise.resolve()}get started(){return this.hi}setDatabaseDeletedListener(){}setNetworkEnabled(){}getIndexManager(e){return this.indexManager}getDocumentOverlayCache(e){let n=this.overlays[e.toKey()];return n||(n=new ED,this.overlays[e.toKey()]=n),n}getMutationQueue(e,n){let r=this.ci[e.toKey()];return r||(r=new SD(n,this.referenceDelegate),this.ci[e.toKey()]=r),r}getGlobalsCache(){return this.Pi}getTargetCache(){return this.Ti}getRemoteDocumentCache(){return this.remoteDocumentCache}getBundleCache(){return this.Ei}runTransaction(e,n,r){H("MemoryPersistence","Starting transaction:",e);const i=new CD(this.li.next());return this.referenceDelegate.di(),r(i).next(s=>this.referenceDelegate.Ai(i).next(()=>s)).toPromise().then(s=>(i.raiseOnCommittedEvent(),s))}Ri(e,n){return O.or(Object.values(this.ci).map(r=>()=>r.containsKey(e,n)))}}class CD extends tV{constructor(e){super(),this.currentSequenceNumber=e}}class um{constructor(e){this.persistence=e,this.Vi=new lm,this.mi=null}static fi(e){return new um(e)}get gi(){if(this.mi)return this.mi;throw J(60996)}addReference(e,n,r){return this.Vi.addReference(r,n),this.gi.delete(r.toString()),O.resolve()}removeReference(e,n,r){return this.Vi.removeReference(r,n),this.gi.add(r.toString()),O.resolve()}markPotentiallyOrphaned(e,n){return this.gi.add(n.toString()),O.resolve()}removeTarget(e,n){this.Vi.Hr(n.targetId).forEach(i=>this.gi.add(i.toString()));const r=this.persistence.getTargetCache();return r.getMatchingKeysForTargetId(e,n.targetId).next(i=>{i.forEach(s=>this.gi.add(s.toString()))}).next(()=>r.removeTargetData(e,n))}di(){this.mi=new Set}Ai(e){const n=this.persistence.getRemoteDocumentCache().newChangeBuffer();return O.forEach(this.gi,r=>{const i=Q.fromPath(r);return this.pi(e,i).next(s=>{s||n.removeEntry(i,te.min())})}).next(()=>(this.mi=null,n.apply(e)))}updateLimboDocument(e,n){return this.pi(e,n).next(r=>{r?this.gi.delete(n.toString()):this.gi.add(n.toString())})}Ii(e){return 0}pi(e,n){return O.or([()=>O.resolve(this.Vi.containsKey(n)),()=>this.persistence.getTargetCache().containsKey(e,n),()=>this.persistence.Ri(e,n)])}}class Ku{constructor(e,n){this.persistence=e,this.yi=new Ii(r=>iV(r.path),(r,i)=>r.isEqual(i)),this.garbageCollector=gD(this,n)}static fi(e,n){return new Ku(e,n)}di(){}Ai(e){return O.resolve()}forEachTarget(e,n){return this.persistence.getTargetCache().forEachTarget(e,n)}pr(e){const n=this.br(e);return this.persistence.getTargetCache().getTargetCount(e).next(r=>n.next(i=>r+i))}br(e){let n=0;return this.yr(e,r=>{n++}).next(()=>n)}yr(e,n){return O.forEach(this.yi,(r,i)=>this.Dr(e,r,i).next(s=>s?O.resolve():n(i)))}removeTargets(e,n,r){return this.persistence.getTargetCache().removeTargets(e,n,r)}removeOrphanedDocuments(e,n){let r=0;const i=this.persistence.getRemoteDocumentCache(),s=i.newChangeBuffer();return i.si(e,o=>this.Dr(e,o,n).next(l=>{l||(r++,s.removeEntry(o,te.min()))})).next(()=>s.apply(e)).next(()=>r)}markPotentiallyOrphaned(e,n){return this.yi.set(n,e.currentSequenceNumber),O.resolve()}removeTarget(e,n){const r=n.withSequenceNumber(e.currentSequenceNumber);return this.persistence.getTargetCache().updateTargetData(e,r)}addReference(e,n,r){return this.yi.set(r,e.currentSequenceNumber),O.resolve()}removeReference(e,n,r){return this.yi.set(r,e.currentSequenceNumber),O.resolve()}updateLimboDocument(e,n){return this.yi.set(n,e.currentSequenceNumber),O.resolve()}Ii(e){let n=e.key.toString().length;return e.isFoundDocument()&&(n+=Jl(e.data.value)),n}Dr(e,n,r){return O.or([()=>this.persistence.Ri(e,n),()=>this.persistence.getTargetCache().containsKey(e,n),()=>{const i=this.yi.get(n);return O.resolve(i!==void 0&&i>r)}])}getCacheSize(e){return this.persistence.getRemoteDocumentCache().getSize(e)}}/**
1706 * @license
1707 * Copyright 2017 Google LLC
1708 *
1709 * Licensed under the Apache License, Version 2.0 (the "License");
1710 * you may not use this file except in compliance with the License.
1711 * You may obtain a copy of the License at
1712 *
1713 *   http://www.apache.org/licenses/LICENSE-2.0
1714 *
1715 * Unless required by applicable law or agreed to in writing, software
1716 * distributed under the License is distributed on an "AS IS" BASIS,
1717 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1718 * See the License for the specific language governing permissions and
1719 * limitations under the License.
1720 */class cm{constructor(e,n,r,i){this.targetId=e,this.fromCache=n,this.ds=r,this.As=i}static Rs(e,n){let r=le(),i=le();for(const s of n.docChanges)switch(s.type){case 0:r=r.add(s.doc.key);break;case 1:i=i.add(s.doc.key)}return new cm(e,n.fromCache,r,i)}}/**
1721 * @license
1722 * Copyright 2023 Google LLC
1723 *
1724 * Licensed under the Apache License, Version 2.0 (the "License");
1725 * you may not use this file except in compliance with the License.
1726 * You may obtain a copy of the License at
1727 *
1728 *   http://www.apache.org/licenses/LICENSE-2.0
1729 *
1730 * Unless required by applicable law or agreed to in writing, software
1731 * distributed under the License is distributed on an "AS IS" BASIS,
1732 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1733 * See the License for the specific language governing permissions and
1734 * limitations under the License.
1735 */class PD{constructor(){this._documentReadCount=0}get documentReadCount(){return this._documentReadCount}incrementDocumentReadCount(e){this._documentReadCount+=e}}/**
1736 * @license
1737 * Copyright 2019 Google LLC
1738 *
1739 * Licensed under the Apache License, Version 2.0 (the "License");
1740 * you may not use this file except in compliance with the License.
1741 * You may obtain a copy of the License at
1742 *
1743 *   http://www.apache.org/licenses/LICENSE-2.0
1744 *
1745 * Unless required by applicable law or agreed to in writing, software
1746 * distributed under the License is distributed on an "AS IS" BASIS,
1747 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1748 * See the License for the specific language governing permissions and
1749 * limitations under the License.
1750 */class RD{constructor(){this.Vs=!1,this.fs=!1,this.gs=100,this.ps=function(){return TR()?8:nV(wR())>0?6:4}()}initialize(e,n){this.ys=e,this.indexManager=n,this.Vs=!0}getDocumentsMatchingQuery(e,n,r,i){const s={result:null};return this.ws(e,n).next(o=>{s.result=o}).next(()=>{if(!s.result)return this.bs(e,n,i,r).next(o=>{s.result=o})}).next(()=>{if(s.result)return;const o=new PD;return this.Ss(e,n,o).next(l=>{if(s.result=l,this.fs)return this.Ds(e,n,o,l.size)})}).next(()=>s.result)}Ds(e,n,r,i){return r.documentReadCount<this.gs?(Li()<=ce.DEBUG&&H("QueryEngine","SDK will not create cache indexes for query:",Oi(n),"since it only creates cache indexes for collection contains","more than or equal to",this.gs,"documents"),O.resolve()):(Li()<=ce.DEBUG&&H("QueryEngine","Query:",Oi(n),"scans",r.documentReadCount,"local documents and returns",i,"documents as results."),r.documentReadCount>this.ps*i?(Li()<=ce.DEBUG&&H("QueryEngine","The SDK decides to create cache indexes for query:",Oi(n),"as using cache indexes may help improve performance."),this.indexManager.createTargetIndexes(e,Vn(n))):O.resolve())}ws(e,n){if(p0(n))return O.resolve(null);let r=Vn(n);return this.indexManager.getIndexType(e,r).next(i=>i===0?null:(n.limit!==null&&i===1&&(n=$u(n,null,"F"),r=Vn(n)),this.indexManager.getDocumentsMatchingTarget(e,r).next(s=>{const o=le(...s);return this.ys.getDocuments(e,o).next(l=>this.indexManager.getMinOffset(e,r).next(u=>{const c=this.vs(n,l);return this.Cs(n,c,o,u.readTime)?this.ws(e,$u(n,null,"F")):this.Fs(e,c,n,u)}))})))}bs(e,n,r,i){return p0(n)||i.isEqual(te.min())?O.resolve(null):this.ys.getDocuments(e,r).next(s=>{const o=this.vs(n,s);return this.Cs(n,o,r,i)?O.resolve(null):(Li()<=ce.DEBUG&&H("QueryEngine","Re-using previous result from %s to execute query: %s",i.toString(),Oi(n)),this.Fs(e,o,n,Xk(i,ma)).next(l=>l))})}vs(e,n){let r=new qe($T(e));return n.forEach((i,s)=>{Vc(e,s)&&(r=r.add(s))}),r}Cs(e,n,r,i){if(e.limit===null)return!1;if(r.size!==n.size)return!0;const s=e.limitType==="F"?n.last():n.first();return!!s&&(s.hasPendingWrites||s.version.compareTo(i)>0)}Ss(e,n,r){return Li()<=ce.DEBUG&&H("QueryEngine","Using full collection scan to execute query:",Oi(n)),this.ys.getDocumentsMatchingQuery(e,n,Nr.min(),r)}Fs(e,n,r,i){return this.ys.getDocumentsMatchingQuery(e,r,i).next(s=>(n.forEach(o=>{s=s.insert(o.key,o)}),s))}}/**
1751 * @license
1752 * Copyright 2020 Google LLC
1753 *
1754 * Licensed under the Apache License, Version 2.0 (the "License");
1755 * you may not use this file except in compliance with the License.
1756 * You may obtain a copy of the License at
1757 *
1758 *   http://www.apache.org/licenses/LICENSE-2.0
1759 *
1760 * Unless required by applicable law or agreed to in writing, software
1761 * distributed under the License is distributed on an "AS IS" BASIS,
1762 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1763 * See the License for the specific language governing permissions and
1764 * limitations under the License.
1765 */const hm="LocalStore",kD=3e8;class VD{constructor(e,n,r,i){this.persistence=e,this.Ms=n,this.serializer=i,this.xs=new be(se),this.Os=new Ii(s=>nm(s),rm),this.Ns=new Map,this.Bs=e.getRemoteDocumentCache(),this.Ti=e.getTargetCache(),this.Ei=e.getBundleCache(),this.Ls(r)}Ls(e){this.documentOverlayCache=this.persistence.getDocumentOverlayCache(e),this.indexManager=this.persistence.getIndexManager(e),this.mutationQueue=this.persistence.getMutationQueue(e,this.indexManager),this.localDocuments=new _D(this.Bs,this.mutationQueue,this.documentOverlayCache,this.indexManager),this.Bs.setIndexManager(this.indexManager),this.Ms.initialize(this.localDocuments,this.indexManager)}collectGarbage(e){return this.persistence.runTransaction("Collect garbage","readwrite-primary",n=>e.collect(n,this.xs))}}function DD(t,e,n,r){return new VD(t,e,n,r)}async function dS(t,e){const n=re(t);return await n.persistence.runTransaction("Handle user change","readonly",r=>{let i;
1765return n.mutationQueue.getAllMutationBatches(r).next(s=>(i=s,n.Ls(e),n.mutationQueue.getAllMutationBatches(r))).next(s=>{const o=[],l=[];let u=le();for(const c of i){o.push(c.batchId);for(const f of c.mutations)u=u.add(f.key)}for(const c of s){l.push(c.batchId);for(const f of c.mutations)u=u.add(f.key)}return n.localDocuments.getDocuments(r,u).next(c=>({ks:c,removedBatchIds:o,addedBatchIds:l}))})})}function bD(t,e){const n=re(t);return n.persistence.runTransaction("Acknowledge batch","readwrite-primary",r=>{const i=e.batch.keys(),s=n.Bs.newChangeBuffer({trackRemovals:!0});return function(l,u,c,f){const d=c.batch,p=d.keys();let y=O.resolve();return p.forEach(S=>{y=y.next(()=>f.getEntry(u,S)).next(x=>{const R=c.docVersions.get(S);ye(R!==null,48541),x.version.compareTo(R)<0&&(d.applyToRemoteDocument(x,c),x.isValidDocument()&&(x.setReadTime(c.commitVersion),f.addEntry(x)))})}),y.next(()=>l.mutationQueue.removeMutationBatch(u,d))}(n,r,e,s).next(()=>s.apply(r)).next(()=>n.mutationQueue.performConsistencyCheck(r)).next(()=>n.documentOverlayCache.removeOverlaysForBatchId(r,i,e.batch.batchId)).next(()=>n.localDocuments.recalculateAndSaveOverlaysForDocumentKeys(r,function(l){let u=le();for(let c=0;c<l.mutationResults.length;++c)l.mutationResults[c].transformResults.length>0&&(u=u.add(l.batch.mutations[c].key));return u}(e))).next(()=>n.localDocuments.getDocuments(r,i))})}function pS(t){const e=re(t);return e.persistence.runTransaction("Get last remote snapshot version","readonly",n=>e.Ti.getLastRemoteSnapshotVersion(n))}function ND(t,e){const n=re(t),r=e.snapshotVersion;let i=n.xs;return n.persistence.runTransaction("Apply remote event","readwrite-primary",s=>{const o=n.Bs.newChangeBuffer({trackRemovals:!0});i=n.xs;const l=[];
vendor: 4,404 bytes, lines 1765-1769
1765e.targetChanges.forEach((f,d)=>{const p=i.get(d);if(!p)return;l.push(n.Ti.removeMatchingKeys(s,f.removedDocuments,d).next(()=>n.Ti.addMatchingKeys(s,f.addedDocuments,d)));let y=p.withSequenceNumber(s.currentSequenceNumber);e.targetMismatches.get(d)!==null?y=y.withResumeToken(ut.EMPTY_BYTE_STRING,te.min()).withLastLimboFreeSnapshotVersion(te.min()):f.resumeToken.approximateByteSize()>0&&(y=y.withResumeToken(f.resumeToken,r)),i=i.insert(d,y),function(x,R,w){return x.resumeToken.approximateByteSize()===0||R.snapshotVersion.toMicroseconds()-x.snapshotVersion.toMicroseconds()>=kD?!0:w.addedDocuments.size+w.modifiedDocuments.size+w.removedDocuments.size>0}(p,y,f)&&l.push(n.Ti.updateTargetData(s,y))});let u=er(),c=le();if(e.documentUpdates.forEach(f=>{e.resolvedLimboDocuments.has(f)&&l.push(n.persistence.referenceDelegate.updateLimboDocument(s,f))}),l.push(MD(s,o,e.documentUpdates).next(f=>{u=f.qs,c=f.Qs})),!r.isEqual(te.min())){const f=n.Ti.getLastRemoteSnapshotVersion(s).next(d=>n.Ti.setTargetsMetadata(s,s.currentSequenceNumber,r));l.push(f)}return O.waitFor(l).next(()=>o.apply(s)).next(()=>n.localDocuments.getLocalViewOfDocuments(s,u,c)).next(()=>u)}).then(s=>(n.xs=i,s))}function MD(t,e,n){let r=le(),i=le();return n.forEach(s=>r=r.add(s)),e.getEntries(t,r).next(s=>{let o=er();return n.forEach((l,u)=>{const c=s.get(l);u.isFoundDocument()!==c.isFoundDocument()&&(i=i.add(l)),u.isNoDocument()&&u.version.isEqual(te.min())?(e.removeEntry(l,u.readTime),o=o.insert(l,u)):!c.isValidDocument()||u.version.compareTo(c.version)>0||u.version.compareTo(c.version)===0&&c.hasPendingWrites?(e.addEntry(u),o=o.insert(l,u)):H(hm,"Ignoring outdated watch update for ",l,". Current version:",c.version," Watch version:",u.version)}),{qs:o,Qs:i}})}function LD(t,e){const n=re(t);return n.persistence.runTransaction("Get next mutation batch","readonly",r=>(e===void 0&&(e=Jp),n.mutationQueue.getNextMutationBatchAfterBatchId(r,e)))}function OD(t,e){const n=re(t);return n.persistence.runTransaction("Allocate target","readwrite",r=>{let i;return n.Ti.getTargetData(r,e).next(s=>s?(i=s,O.resolve(i)):n.Ti.allocateTargetId(r).next(o=>(i=new yr(e,o,"TargetPurposeListen",r.currentSequenceNumber),n.Ti.addTargetData(r,i).next(()=>i))))}).then(r=>{const i=n.xs.get(r.targetId);return(i===null||r.snapshotVersion.compareTo(i.snapshotVersion)>0)&&(n.xs=n.xs.insert(r.targetId,r),n.Os.set(e,r.targetId)),r})}async function Rd(t,e,n){const r=re(t),i=r.xs.get(e),s=n?"readwrite":"readwrite-primary";try{n||await r.persistence.runTransaction("Release target",s,o=>r.persistence.referenceDelegate.removeTarget(o,i))}catch(o){if(!$s(o))throw o;H(hm,`Failed to update sequence numbers for target ${e}: ${o}`)}r.xs=r.xs.remove(e),r.Os.delete(i.target)}function C0(t,e,n){const r=re(t);let i=te.min(),s=le();return r.persistence.runTransaction("Execute query","readwrite",o=>function(u,c,f){const d=re(u),p=d.Os.get(f);return p!==void 0?O.resolve(d.xs.get(p)):d.Ti.getTargetData(c,f)}(r,o,Vn(e)).next(l=>{if(l)return i=l.lastLimboFreeSnapshotVersion,r.Ti.getMatchingKeysForTargetId(o,l.targetId).next(u=>{s=u})}).next(()=>r.Ms.getDocumentsMatchingQuery(o,e,n?i:te.min(),n?s:le())).next(l=>(FD(r,SV(e),l),{documents:l,$s:s})))}function FD(t,e,n){let r=t.Ns.get(e)||te.min();n.forEach((i,s)=>{s.readTime.compareTo(r)>0&&(r=s.readTime)}),t.Ns.set(e,r)}class P0{constructor(){this.activeTargetIds=RV()}js(e){this.activeTargetIds=this.activeTargetIds.add(e)}Hs(e){this.activeTargetIds=this.activeTargetIds.delete(e)}zs(){const e={activeTargetIds:this.activeTargetIds.toArray(),updateTimeMs:Date.now()};return JSON.stringify(e)}}class jD{constructor(){this.xo=new P0,this.Oo={},this.onlineStateHandler=null,this.sequenceNumberHandler=null}addPendingMutation(e){}updateMutationState(e,n,r){}addLocalQueryTarget(e,n=!0){return n&&this.xo.js(e),this.Oo[e]||"not-current"}updateQueryState(e,n,r){this.Oo[e]=n}removeLocalQueryTarget(e){this.xo.Hs(e)}isLocalQueryTarget(e){return this.xo.activeTargetIds.has(e)}clearQueryState(e){delete this.Oo[e]}getAllActiveQueryTargets(){return this.xo.activeTargetIds}isActiveQueryTarget(e){return this.xo.activeTargetIds.has(e)}start(){return this.xo=new P0,Promise.resolve()}handleUserChange(e,n,r){}setOnlineState(e){}shutdown(){}writeSequenceNumber(e){}notifyBundleLoaded(e){}}/**
1766 * @license
1767 * Copyright 2019 Google LLC
1768 *
1769 * Licensed under the Apache License, Version 2.0 (the "License");
1770 * you may not use this file except in compliance with the License.
1771 * You may obtain a copy of the License at
1772 *
1773 *   http://www.apache.org/licenses/LICENSE-2.0
1774 *
1775 * Unless required by applicable law or agreed to in writing, software
1776 * distributed under the License is distributed on an "AS IS" BASIS,
1777 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1778 * See the License for the specific language governing permissions and
1779 * limitations under the License.
1780 */class BD{No(e){}shutdown(){}}/**
1781 * @license
1782 * Copyright 2019 Google LLC
1783 *
1784 * Licensed under the Apache License, Version 2.0 (the "License");
1785 * you may not use this file except in compliance with the License.
1786 * You may obtain a copy of the License at
1787 *
1788 *   http://www.apache.org/licenses/LICENSE-2.0
1789 *
1790 * Unless required by applicable law or agreed to in writing, software
1791 * distributed under the License is distributed on an "AS IS" BASIS,
1792 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1793 * See the License for the specific language governing permissions and
1794 * limitations under the License.
1795 */const R0="ConnectivityMonitor";class k0{constructor(){this.Bo=()=>this.Lo(),this.ko=()=>this.qo(),this.Qo=[],this.$o()}No(e){this.Qo.push(e)}shutdown(){window.removeEventListener("online",this.Bo),window.removeEventListener("offline",this.ko)}$o(){window.addEventListener("online",this.Bo),window.addEventListener("offline",this.ko)}Lo(){H(R0,"Network connectivity changed: AVAILABLE");for(const e of this.Qo)e(0)}qo(){H(R0,"Network connectivity changed: UNAVAILABLE");for(const e of this.Qo)e(1)}static C(){return typeof window<"u"&&window.addEventListener!==void 0&&window.removeEventListener!==void 0}}/**
1796 * @license
1797 * Copyright 2023 Google LLC
1798 *
1799 * Licensed under the Apache License, Version 2.0 (the "License");
1800 * you may not use this file except in compliance with the License.
1801 * You may obtain a copy of the License at
1802 *
1803 *   http://www.apache.org/licenses/LICENSE-2.0
1804 *
1805 * Unless required by applicable law or agreed to in writing, software
1806 * distributed under the License is distributed on an "AS IS" BASIS,
1807 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1808 * See the License for the specific language governing permissions and
1809 * limitations under the License.
1810 */let Pl=null;function kd(){return Pl===null?Pl=function(){return 268435456+Math.round(2147483648*Math.random())}():Pl++,"0x"+Pl.toString(16)}/**
1811 * @license
1812 * Copyright 2020 Google LLC
1813 *
1814 * Licensed under the Apache License, Version 2.0 (the "License");
1815 * you may not use this file except in compliance with the License.
1816 * You may obtain a copy of the License at
1817 *
1818 *   http://www.apache.org/licenses/LICENSE-2.0
1819 *
1820 * Unless required by applicable law or agreed to in writing, software
1821 * distributed under the License is distributed on an "AS IS" BASIS,
1822 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1823 * See the License for the specific language governing permissions and
1824 * limitations under the License.
1825 */const Gh="RestConnection",zD={BatchGetDocuments:"batchGet",Commit:"commit",RunQuery:"runQuery",RunAggregationQuery:"runAggregationQuery"};class UD{get Uo(){return!1}constructor(e){this.databaseInfo=e,this.databaseId=e.databaseId;const n=e.ssl?"https":"http",r=encodeURIComponent(this.databaseId.projectId),i=encodeURIComponent(this.databaseId.database);this.Ko=n+"://"+e.host,this.Wo=`projects/${r}/databases/${i}`,this.Go=this.databaseId.database===Bu?`project_id=${r}`:`project_id=${r}&database_id=${i}`}zo(e,n,r,i,s){const o=kd(),l=this.jo(e,n.toUriEncodedString());H(Gh,`Sending RPC '${e}' ${o}:`,l,r);const u={"google-cloud-resource-prefix":this.Wo,"x-goog-request-params":this.Go};this.Ho(u,i,s);const{host:c}=new URL(l),f=Yp(c);return this.Jo(e,l,u,r,f).then(d=>(H(Gh,`Received RPC '${e}' ${o}: `,d),d),d=>{throw xs(Gh,`RPC '${e}' ${o} failed with error: `,d,"url: ",l,"request:",r),d})}Yo(e,n,r,i,s,o){return this.zo(e,n,r,i,s)}Ho(e,n,r){e["X-Goog-Api-Client"]=function(){return"gl-js/ fire/"+zs}(),e["Content-Type"]="text/plain",this.databaseInfo.appId&&(e["X-Firebase-GMPID"]=this.databaseInfo.appId),n&&n.headers.forEac
1825h((i,s)=>e[s]=i),r&&r.headers.forEach((i,s)=>e[s]=i)}jo(e,n){const r=zD[e];return`${this.Ko}/v1/${n}:${r}`}terminate(){}}/**
1826 * @license
1827 * Copyright 2017 Google LLC
1828 *
1829 * Licensed under the Apache License, Version 2.0 (the "License");
1830 * you may not use this file except in compliance with the License.
1831 * You may obtain a copy of the License at
1832 *
1833 *   http://www.apache.org/licenses/LICENSE-2.0
1834 *
1835 * Unless required by applicable law or agreed to in writing, software
1836 * distributed under the License is distributed on an "AS IS" BASIS,
1837 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1838 * See the License for the specific language governing permissions and
1839 * limitations under the License.
1840 */class $D{constructor(e){this.Zo=e.Zo,this.Xo=e.Xo}e_(e){this.t_=e}n_(e){this.r_=e}i_(e){this.s_=e}onMessage(e){this.o_=e}close(){this.Xo()}send(e){this.Zo(e)}__(){this.t_()}a_(){this.r_()}u_(e){this.s_(e)}c_(e){this.o_(e)}}/**
1841 * @license
1842 * Copyright 2017 Google LLC
1843 *
1844 * Licensed under the Apache License, Version 2.0 (the "License");
1845 * you may not use this file except in compliance with the License.
1846 * You may obtain a copy of the License at
1847 *
1848 *   http://www.apache.org/licenses/LICENSE-2.0
1849 *
1850 * Unless required by applicable law or agreed to in writing, software
1851 * distributed under the License is distributed on an "AS IS" BASIS,
1852 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1853 * See the License for the specific language governing permissions and
1854 * limitations under the License.
1855 */const gt="WebChannelConnection";class HD extends UD{constructor(e){super(e),this.l_=[],this.forceLongPolling=e.forceLongPolling,this.autoDetectLongPolling=e.autoDetectLongPolling,this.useFetchStreams=e.useFetchStreams,this.longPollingOptions=e.longPollingOptions}Jo(e,n,r,i,s){const o=kd();return new Promise((l,u)=>{const c=new mT;c.setWithCredentials(!0),c.listenOnce(gT.COMPLETE,()=>{try{switch(c.getLastErrorCode()){case Zl.NO_ERROR:const d=c.getResponseJson();H(gt,`XHR for RPC '${e}' ${o} received:`,JSON.stringify(d)),l(d);break;case Zl.TIMEOUT:H(gt,`RPC '${e}' ${o} timed out`),u(new K(F.DEADLINE_EXCEEDED,"Request time out"));break;case Zl.HTTP_ERROR:const p=c.getStatus();if(H(gt,`RPC '${e}' ${o} failed with status:`,p,"response text:",c.getResponseText()),p>0){let y=c.getResponseJson();Array.isArray(y)&&(y=y[0]);const S=y==null?void 0:y.error;if(S&&S.status&&S.message){const x=function(w){const v=w.toLowerCase().replace(/_/g,"-");return Object.values(F).indexOf(v)>=0?v:F.UNKNOWN}(S.status);u(new K(x,S.message))}else u(new K(F.UNKNOWN,"Server responded with status "+c.getStatus()))}else u(new K(F.UNAVAILABLE,"Connection failed."));break;default:J(9055,{h_:e,streamId:o,P_:c.getLastErrorCode(),T_:c.getLastError()})}}finally{H(gt,`RPC '${e}' ${o} completed.`)}});const f=JSON.stringify(i);H(gt,`RPC '${e}' ${o} sending request:`,i),c.send(n,"POST",f,r,15)})}I_(e,n,r){const i=kd(),s=[this.Ko,"/","google.firestore.v1.Firestore","/",e,"/channel"],o=_T(),l=vT(),u={httpSessionIdParam:"gsessionid",initMessageHeaders:{},messageUrlParams:{database:`projects/${this.databaseId.projectId}/databases/${this.databaseId.database}`},sendRawJson:!0,supportsCrossDomainXhr:!0,internalChannelParams:{forwardChannelRequestTimeoutMs:6e5},forceLongPolling:this.forceLongPolling,detectBufferingProxy:this.autoDetectLongPolling},c=this.longPollingOptions.timeoutSeconds;c!==void 0&&(u.longPollingTimeout=Math.round(1e3*c)),this.useFetchStreams&&(u.useFetchStreams=!0),this.Ho(u.initMessageHeaders,n,r),u.encodeInitMessageHeaders=!0;const f=s.join("");H(gt,`Creating RPC '${e}' stream ${i}: ${f}`,u);const d=o.createWebChannel(f,u);this.E_(d);let p=!1,y=!1;const S=new $D({Zo:R=>{y?H(gt,`Not sending because RPC '${e}' stream ${i} is closed:`,R):(p||(H(gt,`Opening RPC '${e}' stream ${i} transport.`),d.open(),p=!0),H(gt,`RPC '${e}' stream ${i} sending:`,R),d.send(R))},Xo:()=>d.close()}),x=(R,w,v)=>{R.listen(w,T=>{try{v(T)}catch(k){setTimeout(()=>{throw k},0)}})};return x(d,So.EventType.OPEN,()=>{y||(H(gt,`RPC '${e}' stream ${i} transport opened.`),S.__())}),x(d,So.EventType.CLOSE,()=>{y||(y=!0,H(gt,`RPC '${e}' stream ${i} transport closed`),S.u_(),this.d_(d))}
1855),x(d,So.EventType.ERROR,R=>{y||(y=!0,xs(gt,`RPC '${e}' stream ${i} transport errored. Name:`,R.name,"Message:",R.message),S.u_(new K(F.UNAVAILABLE,"The operation could not be completed")))}),x(d,So.EventType.MESSAGE,R=>{var w;if(!y){const v=R.data[0];ye(!!v,16349);const T=v,k=(T==null?void 0:T.error)||((w=T[0])===null||w===void 0?void 0:w.error);if(k){H(gt,`RPC '${e}' stream ${i} received error:`,k);const b=k.status;let M=function(A){const I=Be[A];if(I!==void 0)return tS(I)}(b),E=k.message;M===void 0&&(M=F.INTERNAL,E="Unknown error status: "+b+" with message "+k.message),y=!0,S.u_(new K(M,E)),d.close()}else H(gt,`RPC '${e}' stream ${i} received:`,v),S.c_(v)}}),x(l,yT.STAT_EVENT,R=>{R.stat===vd.PROXY?H(gt,`RPC '${e}' stream ${i} detected buffering proxy`):R.stat===vd.NOPROXY&&H(gt,`RPC '${e}' stream ${i} detected no buffering proxy`)}),setTimeout(()=>{S.a_()},0),S}terminate(){this.l_.forEach(e=>e.close()),this.l_=[]}E_(e){this.l_.push(e)}d_(e){this.l_=this.l_.filter(n=>n===e)}}function qh(){return typeof document<"u"?document:null}/**
1856 * @license
1857 * Copyright 2020 Google LLC
1858 *
1859 * Licensed under the Apache License, Version 2.0 (the "License");
1860 * you may not use this file except in compliance with the License.
1861 * You may obtain a copy of the License at
1862 *
1863 *   http://www.apache.org/licenses/LICENSE-2.0
1864 *
1865 * Unless required by applicable law or agreed to in writing, software
1866 * distributed under the License is distributed on an "AS IS" BASIS,
1867 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1868 * See the License for the specific language governing permissions and
1869 * limitations under the License.
1870 */function Mc(t){return new qV(t,!0)}/**
1871 * @license
1872 * Copyright 2017 Google LLC
1873 *
1874 * Licensed under the Apache License, Version 2.0 (the "License");
1875 * you may not use this file except in compliance with the License.
1876 * You may obtain a copy of the License at
1877 *
1878 *   http://www.apache.org/licenses/LICENSE-2.0
1879 *
1880 * Unless required by applicable law or agreed to in writing, software
1881 * distributed under the License is distributed on an "AS IS" BASIS,
1882 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1883 * See the License for the specific language governing permissions and
1884 * limitations under the License.
1885 */class mS{constructor(e,n,r=1e3,i=1.5,s=6e4){this.xi=e,this.timerId=n,this.A_=r,this.R_=i,this.V_=s,this.m_=0,this.f_=null,this.g_=Date.now(),this.reset()}reset(){this.m_=0}p_(){this.m_=this.V_}y_(e){this.cancel();const n=Math.floor(this.m_+this.w_()),r=Math.max(0,Date.now()-this.g_),i=Math.max(0,n-r);i>0&&H("ExponentialBackoff",`Backing off for ${i} ms (base delay: ${this.m_} ms, delay with jitter: ${n} ms, last attempt: ${r} ms ago)`),this.f_=this.xi.enqueueAfterDelay(this.timerId,i,()=>(this.g_=Date.now(),e())),this.m_*=this.R_,this.m_<this.A_&&(this.m_=this.A_),this.m_>this.V_&&(this.m_=this.V_)}b_(){this.f_!==null&&(this.f_.skipDelay(),this.f_=null)}cancel(){this.f_!==null&&(this.f_.cancel(),this.f_=null)}w_(){return(Math.random()-.5)*this.m_}}/**
1886 * @license
1887 * Copyright 2017 Google LLC
1888 *
1889 * Licensed under the Apache License, Version 2.0 (the "License");
1890 * you may not use this file except in compliance with the License.
1891 * You may obtain a copy of the License at
1892 *
1893 *   http://www.apache.org/licenses/LICENSE-2.0
1894 *
1895 * Unless required by applicable law or agreed to in writing, software
1896 * distributed under the License is distributed on an "AS IS" BASIS,
1897 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1898 * See the License for the specific language governing permissions and
1899 * limitations under the License.
1900 */const V0="PersistentStream";class gS{constructor(e,n,r,i,s,o,l,u){this.xi=e,this.S_=r,this.D_=i,this.connection=s,this.authCredentialsProvider=o,this.appCheckCredentialsProvider=l,this.listener=u,this.state=0,this.v_=0,this.C_=null,this.F_=null,this.stream=null,this.M_=0,this.x_=new mS(e,n)}O_(){return this.state===1||this.state===5||this.N_()}N_(){return this.state===2||this.state===3}start(){this.M_=0,this.state!==4?this.auth():this.B_()}async stop(){this.O_()&&await this.close(0)}L_(){this.state=0,this.x_.reset()}k_(){this.N_()&&this.C_===null&&(this.C_=this.xi.enqueueAfterDelay(this.S_,6e4,()=>this.q_()))}Q_(e){this.U_(),this.stream.send(e)}async q_(){if(this.N_())return this.close(0)}U_(){this.C_&&(this.C_.cancel(),this.C_=null)}K_(){this.F_&&(this.F_.cancel(),this.F_=null)}async close(e,n){this.U_(),this.K_(),this.x_.cancel(),this.v_++,e!==4?this.x_.reset():n&&n.code===F.RESOURCE_EXHAUSTED?(Jn(n.toString()),Jn("Using maximum backoff delay to prevent overloading the backend."),this.x_.p_()):n&&n.code===F.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.i_(n)}W_(){}auth(){this.state=1;const e=this.G_(this.v_),n=this.v_;Promise.all([this.authCredentialsProvider.getToken(),this.appCheckCredentialsProvider.getToken()]).then(([r,i])=>{this.v_===n&&this.z_(r,i)},r=>{e(()=>{const i=new K(F.UNKNOWN,"Fetching auth token failed: "+r.message);return this.j_(i)})})}z_(e,n){const r=this.G_(this.v_);this.stream=this.H_(e,n),this.stream.e_(()=>{r(()=>this.listener.e_())}),this.stream.n_(()=>{r(()=>(this.state=2,this.F_=this.xi.enqueueAfterDelay(this.D_,1e4,()=>(this.N_()&&(this.state=3),Promise.resolve())),this.listener.n_()))}),this.stream.i_(i=>{r(()=>this.j_(i))}),this.stream.onMessage(i=>{r(()=>++this.M_==1?this.J_(i):this.onNext(i))})}B_(){this.state=5,this.x_.y_(async()=>{this.state=0,this.start()})}j_(e){return H(V0,`close with error: ${e}`),this.stream=null,this.close(4,e)}G_(e){return n=>{this.xi.enqueueAndForget(()=>this.v_===e?n():(H(V0,"stream callback skipped by getCloseGuardedDispatcher."),Promise.resolve()))}}}class WD extends gS{constructor(e,n,r,i,s,o){super(e,"listen_stream_connection_backoff","listen_stream_idle","health_check_timeout",n,r,i,o),this.serializer
vendor: 4,479 bytes, lines 1900-1920
1900=s}H_(e,n){return this.connection.I_("Listen",e,n)}J_(e){return this.onNext(e)}onNext(e){this.x_.reset();const n=XV(this.serializer,e),r=function(s){if(!("targetChange"in s))return te.min();const o=s.targetChange;return o.targetIds&&o.targetIds.length?te.min():o.readTime?Dn(o.readTime):te.min()}(e);return this.listener.Y_(n,r)}Z_(e){const n={};n.database=Pd(this.serializer),n.addTarget=function(s,o){let l;const u=o.target;if(l=Sd(u)?{documents:eD(s,u)}:{query:tD(s,u).gt},l.targetId=o.targetId,o.resumeToken.approximateByteSize()>0){l.resumeToken=iS(s,o.resumeToken);const c=Id(s,o.expectedCount);c!==null&&(l.expectedCount=c)}else if(o.snapshotVersion.compareTo(te.min())>0){l.readTime=Wu(s,o.snapshotVersion.toTimestamp());const c=Id(s,o.expectedCount);c!==null&&(l.expectedCount=c)}return l}(this.serializer,e);const r=rD(this.serializer,e);r&&(n.labels=r),this.Q_(n)}X_(e){const n={};n.database=Pd(this.serializer),n.removeTarget=e,this.Q_(n)}}class KD extends gS{constructor(e,n,r,i,s,o){super(e,"write_stream_connection_backoff","write_stream_idle","health_check_timeout",n,r,i,o),this.serializer=s}get ea(){return this.M_>0}start(){this.lastStreamToken=void 0,super.start()}W_(){this.ea&&this.ta([])}H_(e,n){return this.connection.I_("Write",e,n)}J_(e){return ye(!!e.streamToken,31322),this.lastStreamToken=e.streamToken,ye(!e.writeResults||e.writeResults.length===0,55816),this.listener.na()}onNext(e){ye(!!e.streamToken,12678),this.lastStreamToken=e.streamToken,this.x_.reset();const n=JV(e.writeResults,e.commitTime),r=Dn(e.commitTime);return this.listener.ra(r,n)}ia(){const e={};e.database=Pd(this.serializer),this.Q_(e)}ta(e){const n={streamToken:this.lastStreamToken,writes:e.map(r=>ZV(this.serializer,r))};this.Q_(n)}}/**
1901 * @license
1902 * Copyright 2017 Google LLC
1903 *
1904 * Licensed under the Apache License, Version 2.0 (the "License");
1905 * you may not use this file except in compliance with the License.
1906 * You may obtain a copy of the License at
1907 *
1908 *   http://www.apache.org/licenses/LICENSE-2.0
1909 *
1910 * Unless required by applicable law or agreed to in writing, software
1911 * distributed under the License is distributed on an "AS IS" BASIS,
1912 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1913 * See the License for the specific language governing permissions and
1914 * limitations under the License.
1915 */class GD{}class qD extends GD{constructor(e,n,r,i){super(),this.authCredentials=e,this.appCheckCredentials=n,this.connection=r,this.serializer=i,this.sa=!1}oa(){if(this.sa)throw new K(F.FAILED_PRECONDITION,"The client has already been terminated.")}zo(e,n,r,i){return this.oa(),Promise.all([this.authCredentials.getToken(),this.appCheckCredentials.getToken()]).then(([s,o])=>this.connection.zo(e,xd(n,r),i,s,o)).catch(s=>{throw s.name==="FirebaseError"?(s.code===F.UNAUTHENTICATED&&(this.authCredentials.invalidateToken(),this.appCheckCredentials.invalidateToken()),s):new K(F.UNKNOWN,s.toString())})}Yo(e,n,r,i,s){return this.oa(),Promise.all([this.authCredentials.getToken(),this.appCheckCredentials.getToken()]).then(([o,l])=>this.connection.Yo(e,xd(n,r),i,o,l,s)).catch(o=>{throw o.name==="FirebaseError"?(o.code===F.UNAUTHENTICATED&&(this.authCredentials.invalidateToken(),this.appCheckCredentials.invalidateToken()),o):new K(F.UNKNOWN,o.toString())})}terminate(){this.sa=!0,this.connection.terminate()}}class QD{constructor(e,n){this.asyncQueue=e,this.onlineStateHandler=n,this.state="Unknown",this._a=0,this.aa=null,this.ua=!0}ca(){this._a===0&&(this.la("Unknown"),this.aa=this.asyncQueue.enqueueAfterDelay("online_state_timeout",1e4,()=>(this.aa=null,this.ha("Backend didn't respond within 10 seconds."),this.la("Offline"),Promise.resolve())))}Pa(e){this.state==="Online"?this.la("Unknown"):(this._a++,this._a>=1&&(this.Ta(),this.ha(`Connection failed 1 times. Most recent error: ${e.toString()}`),this.la("Offline")))}set(e){this.Ta(),this._a=0,e==="Online"&&(this.ua=!1),this.la(e)}la(e){e!==this.state&&(this.state=e,this.onlineStateHandler(e))}ha(e){const n=`Could not reach Cloud Firestore backend. ${e}
1916This 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.ua?(Jn(n),this.ua=!1):H("OnlineStateTracker",n)}Ta(){this.aa!==null&&(this.aa.cancel(),this.aa=null)}}/**
1917 * @license
1918 * Copyright 2017 Google LLC
1919 *
1920 * Licensed under the Apache License, Version 2.0 (the "License");
1921 * you may not use this file except in compliance with the License.
1922 * You may obtain a copy of the License at
1923 *
1924 *   http://www.apache.org/licenses/LICENSE-2.0
1925 *
1926 * Unless required by applicable law or agreed to in writing, software
1927 * distributed under the License is distributed on an "AS IS" BASIS,
1928 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1929 * See the License for the specific language governing permissions and
1930 * limitations under the License.
1931 */const Ei="RemoteStore";class YD{constructor(e,n,r,i,s){this.localStore=e,this.datastore=n,this.asyncQueue=r,this.remoteSyncer={},this.Ia=[],this.Ea=new Map,this.da=new Set,this.Aa=[],this.Ra=s,this.Ra.No(o=>{r.enqueueAndForget(async()=>{Ci(this)&&(H(Ei,"Restarting streams for network reachability change."),await async function(u){const c=re(u);c.da.add(4),await La(c),c.Va.set("Unknown"),c.da.delete(4),await Lc(c)}(this))})}),this.Va=new QD(r,i)}}async function Lc(t){if(Ci(t))for(const e of t.Aa)await e(!0)}async function La(t){for(const e of t.Aa)await e(!1)}function yS(t,e){const n=re(t);n.Ea.has(e.targetId)||(n.Ea.set(e.targetId,e),mm(n)?pm(n):Ws(n).N_()&&dm(n,e))}function fm(t,e){const n=re(t),r=Ws(n);n.Ea.delete(e),r.N_()&&vS(n,e),n.Ea.size===0&&(r.N_()?r.k_():Ci(n)&&n.Va.set("Unknown"))}function dm(t,e){if(t.ma.Ke(e.targetId),e.resumeToken.approximateByteSize()>0||e.snapshotVersion.compareTo(te.min())>0){const n=t.remoteSyncer.getRemoteKeysForTarget(e.targetId).size;e=e.withExpectedCount(n)}Ws(t).Z_(e)}function vS(t,e){t.ma.Ke(e),Ws(t).X_(e)}function pm(t){t.ma=new HV({getRemoteKeysForTarget:e=>t.remoteSyncer.getRemoteKeysForTarget(e),Rt:e=>t.Ea.get(e)||null,Pt:()=>t.datastore.serializer.databaseId}),Ws(t).start(),t.Va.ca()}function mm(t){return Ci(t)&&!Ws(t).O_()&&t.Ea.size>0}function Ci(t){return re(t).da.size===0}function _S(t){t.ma=void 0}async function XD(t){t.Va.set("Online")}async function ZD(t){t.Ea.forEach((e,n)=>{dm(t,e)})}async function JD(t,e){_S(t),mm(t)?(t.Va.Pa(e),pm(t)):t.Va.set("Unknown")}async function e4(t,e,n){if(t.Va.set("Online"),e instanceof rS&&e.state===2&&e.cause)try{await async function(i,s){const o=s.cause;for(const l of s.targetIds)i.Ea.has(l)&&(await i.remoteSyncer.rejectListen(l,o),i.Ea.delete(l),i.ma.removeTarget(l))}(t,e)}catch(r){H(Ei,"Failed to remove targets %s: %s ",e.targetIds.join(","),r),await Gu(t,r)}else if(e instanceof nu?t.ma.Xe(e):e instanceof nS?t.ma.ot(e):t.ma.nt(e),!n.isEqual(te.min()))try{const r=await pS(t.localStore);n.compareTo(r)>=0&&await function(s,o){const l=s.ma.It(o);
1931return l.targetChanges.forEach((u,c)=>{if(u.resumeToken.approximateByteSize()>0){const f=s.Ea.get(c);f&&s.Ea.set(c,f.withResumeToken(u.resumeToken,o))}}),l.targetMismatches.forEach((u,c)=>{const f=s.Ea.get(u);if(!f)return;s.Ea.set(u,f.withResumeToken(ut.EMPTY_BYTE_STRING,f.snapshotVersion)),vS(s,u);const d=new yr(f.target,u,c,f.sequenceNumber);dm(s,d)}),s.remoteSyncer.applyRemoteEvent(l)}(t,n)}catch(r){H(Ei,"Failed to raise snapshot:",r),await Gu(t,r)}}async function Gu(t,e,n){if(!$s(e))throw e;t.da.add(1),await La(t),t.Va.set("Offline"),n||(n=()=>pS(t.localStore)),t.asyncQueue.enqueueRetryable(async()=>{H(Ei,"Retrying IndexedDB access"),await n(),t.da.delete(1),await Lc(t)})}function wS(t,e){return e().catch(n=>Gu(t,n,e))}async function Oc(t){const e=re(t),n=Fr(e);let r=e.Ia.length>0?e.Ia[e.Ia.length-1].batchId:Jp;for(;t4(e);)try{const i=await LD(e.localStore,r);if(i===null){e.Ia.length===0&&n.k_();break}r=i.batchId,n4(e,i)}catch(i){await Gu(e,i)}ES(e)&&TS(e)}function t4(t){return Ci(t)&&t.Ia.length<10}function n4(t,e){t.Ia.push(e);const n=Fr(t);n.N_()&&n.ea&&n.ta(e.mutations)}function ES(t){return Ci(t)&&!Fr(t).O_()&&t.Ia.length>0}function TS(t){Fr(t).start()}async function r4(t){Fr(t).ia()}async function i4(t){const e=Fr(t);for(const n of t.Ia)e.ta(n.mutations)}async function s4(t,e,n){const r=t.Ia.shift(),i=sm.from(r,e,n);await wS(t,()=>t.remoteSyncer.applySuccessfulWrite(i)),await Oc(t)}async function o4(t,e){e&&Fr(t).ea&&await async function(r,i){if(function(o){return UV(o)&&o!==F.ABORTED}(i.code)){const s=r.Ia.shift();Fr(r).L_(),await wS(r,()=>r.remoteSyncer.rejectFailedWrite(s.batchId,i)),await Oc(r)}}(t,e),ES(t)&&TS(t)}async function D0(t,e){const n=re(t);n.asyncQueue.verifyOperationInProgress(),H(Ei,"RemoteStore received new credentials");const r=Ci(n);n.da.add(3),await La(n),r&&n.Va.set("Unknown"),await n.remoteSyncer.handleCredentialChange(e),n.da.delete(3),await Lc(n)}async function a4(t,e){const n=re(t);e?(n.da.delete(2),await Lc(n)):e||(n.da.add(2),await La(n),n.Va.set("Unknown"))}function Ws(t){return t.fa||(t.fa=function(n,r,i){const s=re(n);return s.oa(),new WD(r,s.connection,s.authCredentials,s.appCheckCredentials,s.serializer,i)}(t.datastore,t.asyncQueue,{e_:XD.bind(null,t),n_:ZD.bind(null,t),i_:JD.bind(null,t),Y_:e4.bind(null,t)}),t.Aa.push(async e=>{e?(t.fa.L_(),mm(t)?pm(t):t.Va.set("Unknown")):(await t.fa.stop(),_S(t))})),t.fa}function Fr(t){return t.ga||(t.ga=function(n,r,i){const s=re(n);return s.oa(),new KD(r,s.connection,s.authCredentials,s.appCheckCredentials,s.serializer,i)}(t.datastore,t.asyncQueue,{e_:()=>Promise.resolve(),n_:r4.bind(null,t),i_:o4.bind(null,t),na:i4.bind(null,t),ra:s4.bind(null,t)}),t.Aa.push(async e=>{e?(t.ga.L_(),await Oc(t)):(await t.ga.stop(),t.Ia.length>0&&(H(Ei,`Stopping write stream with ${t.Ia.length} pending writes`),t.Ia=[]))})),t.ga}/**
1932 * @license
1933 * Copyright 2017 Google LLC
1934 *
1935 * Licensed under the Apache License, Version 2.0 (the "License");
1936 * you may not use this file except in compliance with the License.
1937 * You may obtain a copy of the License at
1938 *
1939 *   http://www.apache.org/licenses/LICENSE-2.0
1940 *
1941 * Unless required by applicable law or agreed to in writing, software
1942 * distributed under the License is distributed on an "AS IS" BASIS,
1943 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1944 * See the License for the specific language governing permissions and
1945 * limitations under the License.
1946 */class gm{constructor(e,n,r,i,s){this.asyncQueue=e,this.timerId=n,this.targetTimeMs=r,this.op=i,this.removalCallback=s,this.deferred=new kr,this.then=this.deferred.promise.then.bind(this.deferred.promise),this.deferred.promise.catch(o=>{})}get promise(){return this.deferred.promise}static createAndSchedule(e,n,r,i,s){const o=Date.now()+r,l=new gm(e,n,o,i,s);return l.start(r),l}start(e){this.timerHandle=setTimeout(()=>this.handleDelayElapsed(),e)}skipDelay(){return this.handleDelayElapsed()}cancel(e){this.timerHandle!==null&&(this.clearTimeout(),this.deferred.reject(new K(F.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 ym(t,e){if(Jn("AsyncQueue",`${e}: ${t}`),$s(t))return new K(F.UNAVAILABLE,`${e}: ${t}`);throw t}/**
1947 * @license
1948 * Copyright 2017 Google LLC
1949 *
1950 * Licensed under the Apache License, Version 2.0 (the "License");
1951 * you may not use this file except in compliance with the License.
1952 * You may obtain a copy of the License at
1953 *
1954 *   http://www.apache.org/licenses/LICENSE-2.0
1955 *
1956 * Unless required by applicable law or agreed to in writing, software
1957 * distributed under the License is distributed on an "AS IS" BASIS,
1958 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1959 * See the License for the specific language governing permissions and
1960 * limitations under the License.
1961 */class hs{static emptySet(e){return new hs(e.comparator)}constructor(e){this.comparator=e?(n,r)=>e(n,r)||Q.comparator(n.key,r.key):(n,r)=>Q.comparator(n.key,r.key),this.keyedMap=Ao(),this.sortedSet=new be(this.comparator)}has(e){return this.keyedMap.get(e)!=null}get(e){return this.keyedMap.get(e)}first(){return this.sortedSet.minKey()}last(){return this.sortedSet.maxKey()}isEmpty(){return this.sortedSet.isEmpty()}indexOf(e){const n=this.keyedMap.get(e);return n?this.sortedSet.indexOf(n):-1}get size(){return this.sortedSet.size}forEach(e){this.sortedSet.inorderTraversal((n,r)=>(e(n),!1))}add(e){const n=this.delete(e.key);return n.copy(n.keyedMap.insert(e.key,e),n.sortedSet.insert(e,null))}delete(e){const n=this.get(e);return n?this.copy(this.keyedMap.remove(e),this.sortedSet.remove(n)):this}isEqual(e){if(!(e instanceof hs)||this.size!==e.size)return!1;const n=this.sortedSet.getIterator(),r=e.sortedSet.getIterator();for(;n.hasNext();){const i=n.getNext().key,s=r.getNext().key;if(!i.isEqual(s))return!1}return!0}toString(){const e=[];return this.forEach(n=>{e.push(n.toString())}),e.length===0?"DocumentSet ()":`DocumentSet (
1962  `+e.join(`  
1963`)+`
1964)`}copy(e,n){const r=new hs;return r.comparator=this.comparator,r.keyedMap=e,r.sortedSet=n,r}}/**
1965 * @license
1966 * Copyright 2017 Google LLC
1967 *
1968 * Licensed under the Apache License, Version 2.0 (the "License");
1969 * you may not use this file except in compliance with the License.
1970 * You may obtain a copy of the License at
1971 *
1972 *   http://www.apache.org/licenses/LICENSE-2.0
1973 *
1974 * Unless required by applicable law or agreed to in writing, software
1975 * distributed under the License is distributed on an "AS IS" BASIS,
1976 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1977 * See the License for the specific language governing permissions and
1978 * limitations under the License.
1979 */class b0{constructor(){this.pa=new be(Q.comparator)}track(e){const n=e.doc.key,r=this.pa.get(n);r?e.type!==0&&r.type===3?this.pa=this.pa.insert(n,e):e.type===3&&r.type!==1?this.pa=this.pa.insert(n,{type:r.type,doc:e.doc}):e.type===2&&r.type===2?this.pa=this.pa.insert(n,{type:2,doc:e.doc}):e.type===2&&r.type===0?this.pa=this.pa.insert(n,{type:0,doc:e.doc}):e.type===1&&r.type===0?this.pa=this.pa.remove(n):e.type===1&&r.type===2?this.pa=this.pa.insert(n,{type:1,doc:r.doc}):e.type===0&&r.type===1?this.pa=this.pa.insert(n,{type:2,doc:e.doc}):J(63341,{Vt:e,ya:r}):this.pa=this.pa.insert(n,e)}wa(){const e=[];return this.pa.inorderTraversal((n,r)=>{e.push(r)}),e}}class Vs{constructor(e,n,r,i,s,o,l,u,c){this.query=e,this.docs=n,this.oldDocs=r,this.docChanges=i,this.mutatedKeys=s,this.fromCache=o,this.syncStateChanged=l,this.excludesMetadataChanges=u,this.hasCachedResults=c}static fromInitialDocuments(e,n,r,i,s){const o=[];return n.forEach(l=>{o.push({type:0,doc:l})}),new Vs(e,n,hs.emptySet(n),o,r,i,!0,!1,s)}get hasPendingWrites(){return!this.mutatedKeys.isEmpty()}isEqual(e){if(!(this.fromCache===e.fromCache&&this.hasCachedResults===e.hasCachedResults&&this.syncStateChanged===e.syncStateChanged&&this.mutatedKeys.isEqual(e.mutatedKeys)&&kc(this.query,e.query)&&this.docs.isEqual(e.docs)&&this.oldDocs.isEqual(e.oldDocs)))return!1;const n=this.docChanges,r=e.docChanges;if(n.length!==r.length)return!1;for(let i=0;i<n.length;i++)if(n[i].type!==r[i].type||!n[i].doc.isEqual(r[i].doc))return!1;return!0}}/**
1980 * @license
1981 * Copyright 2017 Google LLC
1982 *
1983 * Licensed under the Apache License, Version 2.0 (the "License");
1984 * you may not use this file except in compliance with the License.
1985 * You may obtain a copy of the License at
1986 *
1987 *   http://www.apache.org/licenses/LICENSE-2.0
1988 *
1989 * Unless required by applicable law or agreed to in writing, softw
1989are
1990 * distributed under the License is distributed on an "AS IS" BASIS,
1991 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1992 * See the License for the specific language governing permissions and
1993 * limitations under the License.
1994 */class l4{constructor(){this.ba=void 0,this.Sa=[]}Da(){return this.Sa.some(e=>e.va())}}class u4{constructor(){this.queries=N0(),this.onlineState="Unknown",this.Ca=new Set}terminate(){(function(n,r){const i=re(n),s=i.queries;i.queries=N0(),s.forEach((o,l)=>{for(const u of l.Sa)u.onError(r)})})(this,new K(F.ABORTED,"Firestore shutting down"))}}function N0(){return new Ii(t=>UT(t),kc)}async function c4(t,e){const n=re(t);let r=3;const i=e.query;let s=n.queries.get(i);s?!s.Da()&&e.va()&&(r=2):(s=new l4,r=e.va()?0:1);try{switch(r){case 0:s.ba=await n.onListen(i,!0);break;case 1:s.ba=await n.onListen(i,!1);break;case 2:await n.onFirstRemoteStoreListen(i)}}catch(o){const l=ym(o,`Initialization of query '${Oi(e.query)}' failed`);return void e.onError(l)}n.queries.set(i,s),s.Sa.push(e),e.Fa(n.onlineState),s.ba&&e.Ma(s.ba)&&vm(n)}async function h4(t,e){const n=re(t),r=e.query;let i=3;const s=n.queries.get(r);if(s){const o=s.Sa.indexOf(e);o>=0&&(s.Sa.splice(o,1),s.Sa.length===0?i=e.va()?0:1:!s.Da()&&e.va()&&(i=2))}switch(i){case 0:return n.queries.delete(r),n.onUnlisten(r,!0);case 1:return n.queries.delete(r),n.onUnlisten(r,!1);case 2:return n.onLastRemoteStoreUnlisten(r);default:return}}function f4(t,e){const n=re(t);let r=!1;for(const i of e){const s=i.query,o=n.queries.get(s);if(o){for(const l of o.Sa)l.Ma(i)&&(r=!0);o.ba=i}}r&&vm(n)}function d4(t,e,n){const r=re(t),i=r.queries.get(e);if(i)for(const s of i.Sa)s.onError(n);r.queries.delete(e)}function vm(t){t.Ca.forEach(e=>{e.next()})}var Vd,M0;(M0=Vd||(Vd={})).xa="default",M0.Cache="cache";class p4{constructor(e,n,r){this.query=e,this.Oa=n,this.Na=!1,this.Ba=null,this.onlineState="Unknown",this.options=r||{}}Ma(e){if(!this.options.includeMetadataChanges){const r=[];for(const i of e.docChanges)i.type!==3&&r.push(i);e=new Vs(e.query,e.docs,e.oldDocs,r,e.mutatedKeys,e.fromCache,e.syncStateChanged,!0,e.hasCachedResults)}let n=!1;return this.Na?this.La(e)&&(this.Oa.next(e),n=!0):this.ka(e,this.onlineState)&&(this.qa(e),n=!0),this.Ba=e,n}onError(e){this.Oa.error(e)}Fa(e){this.onlineState=e;let n=!1;return this.Ba&&!this.Na&&this.ka(this.Ba,e)&&(this.qa(this.Ba),n=!0),n}ka(e,n){if(!e.fromCache||!this.va())return!0;const r=n!=="Offline";return(!this.options.Qa||!r)&&(!e.docs.isEmpty()||e.hasCachedResults||n==="Offline")}La(e){if(e.docChanges.length>0)return!0;const n=this.Ba&&this.Ba.hasPendingWrites!==e.hasPendingWrites;return!(!e.syncStateChanged&&!n)&&this.options.includeMetadataChanges===!0}qa(e){e=Vs.fromInitialDocuments(e.query,e.docs,e.mutatedKeys,e.fromCache,e.hasCachedResults),this.Na=!0,this.Oa.next(e)}va(){return this.options.source!==Vd.Cache}}/**
1995 * @license
1996 * Copyright 2017 Google LLC
1997 *
1998 * Licensed under the Apache License, Version 2.0 (the "License");
1999 * you may not use this file except in compliance with the License.
2000 * You may obtain a copy of the License at
2001 *
2002 *   http://www.apache.org/licenses/LICENSE-2.0
2003 *
2004 * Unless required by applicable law or agreed to in writing, software
2005 * distributed under the License is distributed on an "AS IS" BASIS,
2006 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2007 * See the License for the specific language governing permissions and
2008 * limitations under the License.
2009 */class SS{constructor(e){this.key=e}}class AS{constructor(e){this.key=e}}class m4{constructor(e,n){this.query=e,this.Ha=n,this.Ja=null,this.hasCachedResults=!1,this.current=!1,this.Ya=le(),this.mutatedKeys=le(),this.Za=$T(e),this.Xa=new hs(this.Za)}get eu(){return this.Ha}tu(e,n){const r=n?n.nu:new b0,i=n?n.Xa:this.Xa;let s=n?n.mutatedKeys:this.mutatedKeys,o=i,l=!1;const u=this.query.limitType==="F"&&i.size===this.query.limit?i.last():null,c=this.query.limitType==="L"&&i.size===this.query.limit?i.first():null;if(e.inorderTraversal((f,d)=>{const p=i.get(f),y=Vc(this.query,d)?d:null,S=!!p&&this.mutatedKeys.has(p.key),x=!!y&&(y.hasLocalMutations||this.mutatedKeys.has(y.key)&&y.hasCommittedMutations);let R=!1;p&&y?p.data.isEqual(y.data)?S!==x&&(r.track({type:3,doc:y}),R=!0):this.ru(p,y)||(r.track({type:2,doc:y}),R=!0,(u&&this.Za(y,u)>0||c&&this.Za(y,c)<0)&&(l=!0)):!p&&y?(r.track({type:0,doc:y}),R=!0):p&&!y&&(r.track({type:1,doc:p}),R=!0,(u||c)&&(l=!0)),R&&(y?(o=o.add(y),s=x?s.add(f):s.delete(f)):(o=o.delete(f),s=s.delete(f)))}),this.query.limit!==null)for(;o.size>this.query.limit;){const f=this.query.limitType==="F"?o.last():o.first();o=o.delete(f.key),s=s.delete(f.key),r.track({type:1,doc:f})}return{Xa:o,nu:r,Cs:l,mutatedKeys:s}}ru(e,n){return e.hasLocalMutations&&n.hasCommittedMutations&&!n.hasLocalMutations}
2009applyChanges(e,n,r,i){const s=this.Xa;this.Xa=e.Xa,this.mutatedKeys=e.mutatedKeys;const o=e.nu.wa();o.sort((f,d)=>function(y,S){const x=R=>{switch(R){case 0:return 1;case 2:case 3:return 2;case 1:return 0;default:return J(20277,{Vt:R})}};return x(y)-x(S)}(f.type,d.type)||this.Za(f.doc,d.doc)),this.iu(r),i=i!=null&&i;const l=n&&!i?this.su():[],u=this.Ya.size===0&&this.current&&!i?1:0,c=u!==this.Ja;return this.Ja=u,o.length!==0||c?{snapshot:new Vs(this.query,e.Xa,s,o,e.mutatedKeys,u===0,c,!1,!!r&&r.resumeToken.approximateByteSize()>0),ou:l}:{ou:l}}Fa(e){return this.current&&e==="Offline"?(this.current=!1,this.applyChanges({Xa:this.Xa,nu:new b0,mutatedKeys:this.mutatedKeys,Cs:!1},!1)):{ou:[]}}_u(e){return!this.Ha.has(e)&&!!this.Xa.has(e)&&!this.Xa.get(e).hasLocalMutations}iu(e){e&&(e.addedDocuments.forEach(n=>this.Ha=this.Ha.add(n)),e.modifiedDocuments.forEach(n=>{}),e.removedDocuments.forEach(n=>this.Ha=this.Ha.delete(n)),this.current=e.current)}su(){if(!this.current)return[];const e=this.Ya;this.Ya=le(),this.Xa.forEach(r=>{this._u(r.key)&&(this.Ya=this.Ya.add(r.key))});const n=[];return e.forEach(r=>{this.Ya.has(r)||n.push(new AS(r))}),this.Ya.forEach(r=>{e.has(r)||n.push(new SS(r))}),n}au(e){this.Ha=e.$s,this.Ya=le();const n=this.tu(e.documents);return this.applyChanges(n,!0)}uu(){return Vs.fromInitialDocuments(this.query,this.Xa,this.mutatedKeys,this.Ja===0,this.hasCachedResults)}}const _m="SyncEngine";class g4{constructor(e,n,r){this.query=e,this.targetId=n,this.view=r}}class y4{constructor(e){this.key=e,this.cu=!1}}class v4{constructor(e,n,r,i,s,o){this.localStore=e,this.remoteStore=n,this.eventManager=r,this.sharedClientState=i,this.currentUser=s,this.maxConcurrentLimboResolutions=o,this.lu={},this.hu=new Ii(l=>UT(l),kc),this.Pu=new Map,this.Tu=new Set,this.Iu=new be(Q.comparator),this.Eu=new Map,this.du=new lm,this.Au={},this.Ru=new Map,this.Vu=ks.lr(),this.onlineState="Unknown",this.mu=void 0}get isPrimaryClient(){return this.mu===!0}}async function _4(t,e,n=!0){const r=kS(t);let i;const s=r.hu.get(e);return s?(r.sharedClientState.addLocalQueryTarget(s.targetId),i=s.view.uu()):i=await IS(r,e,n,!0),i}async function w4(t,e){const n=kS(t);await IS(n,e,!0,!1)}async function IS(t,e,n,r){const i=await OD(t.localStore,Vn(e)),s=i.targetId,o=t.sharedClientState.addLocalQueryTarget(s,n);let l;return r&&(l=await E4(t,e,s,o==="current",i.resumeToken)),t.isPrimaryClient&&n&&yS(t.remoteStore,i),l}async function E4(t,e,n,r,i){t.fu=(d,p,y)=>async function(x,R,w,v){let T=R.view.tu(w);T.Cs&&(T=await C0(x.localStore,R.query,!1).then(({documents:E})=>R.view.tu(E,T)));const k=v&&v.targetChanges.get(R.targetId),b=v&&v.targetMismatches.get(R.targetId)!=null,M=R.view.applyChanges(T,x.isPrimaryClient,k,b);return O0(x,R.targetId,M.ou),M.snapshot}(t,d,p,y);const s=await C0(t.localStore,e,!0),o=new m4(e,s.$s),l=o.tu(s.documents),u=Ma.createSynthesizedTargetChangeForCurrentChange(n,r&&t.onlineState!=="Offline",i),c=o.applyChanges(l,t.isPrimaryClient,u);O0(t,n,c.ou);const f=new g4(e,n,o);return t.hu.set(e,f),t.Pu.has(n)?t.Pu.get(n).push(e):t.Pu.set(n,[e]),c.snapshot}async function T4(t,e,n){const r=re(t),i=r.hu.get(e),s=r.Pu.get(i.targetId);if(s.length>1)return r.Pu.set(i.targetId,s.filter(o=>!kc(o,e))),void r.hu.delete(e);r.isPrimaryClient?(r.sharedClientState.removeLocalQueryTarget(i.targetId),r.sharedCl
2009ientState.isActiveQueryTarget(i.targetId)||await Rd(r.localStore,i.targetId,!1).then(()=>{r.sharedClientState.clearQueryState(i.targetId),n&&fm(r.remoteStore,i.targetId),Dd(r,i.targetId)}).catch(Us)):(Dd(r,i.targetId),await Rd(r.localStore,i.targetId,!0))}async function S4(t,e){const n=re(t),r=n.hu.get(e),i=n.Pu.get(r.targetId);n.isPrimaryClient&&i.length===1&&(n.sharedClientState.removeLocalQueryTarget(r.targetId),fm(n.remoteStore,r.targetId))}async function A4(t,e,n){const r=V4(t);try{const i=await function(o,l){const u=re(o),c=Ge.now(),f=l.reduce((y,S)=>y.add(S.key),le());let d,p;return u.persistence.runTransaction("Locally write mutations","readwrite",y=>{let S=er(),x=le();return u.Bs.getEntries(y,f).next(R=>{S=R,S.forEach((w,v)=>{v.isValidDocument()||(x=x.add(w))})}).next(()=>u.localDocuments.getOverlayedDocuments(y,S)).next(R=>{d=R;const w=[];for(const v of l){const T=OV(v,d.get(v.key).overlayedDocument);T!=null&&w.push(new xi(v.key,T,bT(T.value.mapValue),Wn.exists(!0)))}return u.mutationQueue.addMutationBatch(y,c,w,l)}).next(R=>{p=R;const w=R.applyToLocalDocumentSet(d,x);return u.documentOverlayCache.saveOverlays(y,R.batchId,w)})}).then(()=>({batchId:p.batchId,changes:WT(d)}))}(r.localStore,e);r.sharedClientState.addPendingMutation(i.batchId),function(o,l,u){let c=o.Au[o.currentUser.toKey()];c||(c=new be(se)),c=c.insert(l,u),o.Au[o.currentUser.toKey()]=c}(r,i.batchId,n),await Oa(r,i.changes),await Oc(r.remoteStore)}catch(i){const s=ym(i,"Failed to persist write");n.reject(s)}}async function xS(t,e){const n=re(t);try{const r=await ND(n.localStore,e);
2009e.targetChanges.forEach((i,s)=>{const o=n.Eu.get(s);o&&(ye(i.addedDocuments.size+i.modifiedDocuments.size+i.removedDocuments.size<=1,22616),i.addedDocuments.size>0?o.cu=!0:i.modifiedDocuments.size>0?ye(o.cu,14607):i.removedDocuments.size>0&&(ye(o.cu,42227),o.cu=!1))}),await Oa(n,r,e)}catch(r){await Us(r)}}function L0(t,e,n){const r=re(t);if(r.isPrimaryClient&&n===0||!r.isPrimaryClient&&n===1){const i=[];r.hu.forEach((s,o)=>{const l=o.view.Fa(e);l.snapshot&&i.push(l.snapshot)}),function(o,l){const u=re(o);u.onlineState=l;let c=!1;u.queries.forEach((f,d)=>{for(const p of d.Sa)p.Fa(l)&&(c=!0)}),c&&vm(u)}(r.eventManager,e),i.length&&r.lu.Y_(i),r.onlineState=e,r.isPrimaryClient&&r.sharedClientState.setOnlineState(e)}}async function I4(t,e,n){const r=re(t);r.sharedClientState.updateQueryState(e,"rejected",n);const i=r.Eu.get(e),s=i&&i.key;if(s){let o=new be(Q.comparator);o=o.insert(s,wt.newNoDocument(s,te.min()));const l=le().add(s),u=new Nc(te.min(),new Map,new be(se),o,l);await xS(r,u),r.Iu=r.Iu.remove(s),r.Eu.delete(e),wm(r)}else await Rd(r.localStore,e,!1).then(()=>Dd(r,e,n)).catch(Us)}async function x4(t,e){const n=re(t),r=e.batch.batchId;try{const i=await bD(n.localStore,e);PS(n,r,null),CS(n,r),n.sharedClientState.updateMutationState(r,"acknowledged"),await Oa(n,i)}catch(i){await Us(i)}}async function C4(t,e,n){const r=re(t);try{const i=await function(o,l){const u=re(o);return u.persistence.runTransaction("Reject batch","readwrite-primary",c=>{let f;return u.mutationQueue.lookupMutationBatch(c,l).next(d=>(ye(d!==null,37113),f=d.keys(),u.mutationQueue.removeMutationBatch(c,d))).next(()=>u.mutationQueue.performConsistencyCheck(c)).next(()=>u.documentOverlayCache.removeOverlaysForBatchId(c,f,l)).next(()=>u.localDocuments.recalculateAndSaveOverlaysForDocumentKeys(c,f)).next(()=>u.localDocuments.getDocuments(c,f))})}(r.localStore,e);PS(r,e,n),CS(r,e),r.sharedClientState.updateMutationState(e,"rejected",n),await Oa(r,i)}catch(i){await Us(i)}}function CS(t,e){(t.Ru.get(e)||[]).forEach(n=>{n.resolve()}),t.Ru.delete(e)}function PS(t,e,n){const r=re(t);let i=r.Au[r.currentUser.toKey()];if(i){const s=i.get(e);s&&(n?s.reject(n):s.resolve(),i=i.remove(e)),r.Au[r.currentUser.toKey()]=i}}
2009function Dd(t,e,n=null){t.sharedClientState.removeLocalQueryTarget(e);for(const r of t.Pu.get(e))t.hu.delete(r),n&&t.lu.gu(r,n);t.Pu.delete(e),t.isPrimaryClient&&t.du.Hr(e).forEach(r=>{t.du.containsKey(r)||RS(t,r)})}function RS(t,e){t.Tu.delete(e.path.canonicalString());const n=t.Iu.get(e);n!==null&&(fm(t.remoteStore,n),t.Iu=t.Iu.remove(e),t.Eu.delete(n),wm(t))}function O0(t,e,n){for(const r of n)r instanceof SS?(t.du.addReference(r.key,e),P4(t,r)):r instanceof AS?(H(_m,"Document no longer in limbo: "+r.key),t.du.removeReference(r.key,e),t.du.containsKey(r.key)||RS(t,r.key)):J(19791,{pu:r})}function P4(t,e){const n=e.key,r=n.path.canonicalString();t.Iu.get(n)||t.Tu.has(r)||(H(_m,"New document in limbo: "+n),t.Tu.add(r),wm(t))}function wm(t){for(;t.Tu.size>0&&t.Iu.size<t.maxConcurrentLimboResolutions;){const e=t.Tu.values().next().value;t.Tu.delete(e);const n=new Q(Ie.fromString(e)),r=t.Vu.next();t.Eu.set(r,new y4(n)),t.Iu=t.Iu.insert(n,r),yS(t.remoteStore,new yr(Vn(BT(n.path)),r,"TargetPurposeLimboResolution",Cc.le))}}async function Oa(t,e,n){const r=re(t),i=[],s=[],o=[];r.hu.isEmpty()||(r.hu.forEach((l,u)=>{o.push(r.fu(u,e,n).then(c=>{var f;if((c||n)&&r.isPrimaryClient){const d=c?!c.fromCache:(f=n==null?void 0:n.targetChanges.get(u.targetId))===null||f===void 0?void 0:f.current;
2009r.sharedClientState.updateQueryState(u.targetId,d?"current":"not-current")}if(c){i.push(c);const d=cm.Rs(u.targetId,c);s.push(d)}}))}),await Promise.all(o),r.lu.Y_(i),await async function(u,c){const f=re(u);try{await f.persistence.runTransaction("notifyLocalViewChanges","readwrite",d=>O.forEach(c,p=>O.forEach(p.ds,y=>f.persistence.referenceDelegate.addReference(d,p.targetId,y)).next(()=>O.forEach(p.As,y=>f.persistence.referenceDelegate.removeReference(d,p.targetId,y)))))}catch(d){if(!$s(d))throw d;H(hm,"Failed to update sequence numbers: "+d)}for(const d of c){const p=d.targetId;if(!d.fromCache){const y=f.xs.get(p),S=y.snapshotVersion,x=y.withLastLimboFreeSnapshotVersion(S);f.xs=f.xs.insert(p,x)}}}(r.localStore,s))}async function R4(t,e){const n=re(t);if(!n.currentUser.isEqual(e)){H(_m,"User change. New user:",e.toKey());const r=await dS(n.localStore,e);n.currentUser=e,function(s,o){s.Ru.forEach(l=>{l.forEach(u=>{u.reject(new K(F.CANCELLED,o))})}),s.Ru.clear()}(n,"'waitForPendingWrites' promise is rejected due to a user change."),n.sharedClientState.handleUserChange(e,r.removedBatchIds,r.addedBatchIds),await Oa(n,r.ks)}}function k4(t,e){const n=re(t),r=n.Eu.get(e);if(r&&r.cu)return le().add(r.key);{let i=le();const s=n.Pu.get(e);if(!s)return i;for(const o of s){const l=n.hu.get(o);i=i.unionWith(l.view.eu)}return i}}function kS(t){const e=re(t);return e.remoteStore.remoteSyncer.applyRemoteEvent=xS.bind(null,e),e.remoteStore.remoteSyncer.getRemoteKeysForTarget=k4.bind(null,e),e.remoteStore.remoteSyncer.rejectListen=I4.bind(null,e),e.lu.Y_=f4.bind(null,e.eventManager),e.lu.gu=d4.bind(null,e.eventManager),e}function V4(t){const e=re(t);return e.remoteStore.remoteSyncer.applySuccessfulWrite=x4.bind(null,e),e.remoteStore.remoteSyncer.rejectFailedWrite=C4.bind(null,e),e}class qu{constructor(){this.kind="memory",this.synchronizeTabs=!1}async initialize(e){this.serializer=Mc(e.databaseInfo.databaseId),this.sharedClientState=this.bu(e),this.persistence=this.Su(e),await this.persistence.start(),this.localStore=this.Du(e),this.gcScheduler=this.vu(e,this.localStore),this.indexBackfillerScheduler=this.Cu(e,this.localStore)}vu(e,n){return null}Cu(e,n){return null}Du(e){return DD(this.persistence,new RD,e.initialUser,this.serializer)}Su(e){return new fS(um.fi,this.serializer)}bu(e){return new jD}async terminate(){var e,n;(e=this.gcScheduler)===null||e===void 0||e.stop(),(n=this.indexBackfillerScheduler)===null||n===void 0||n.stop(),this.sharedClientState.shutdown(),await this.persistence.shutdown()}}qu.provider={build:()=>new qu};class D4 extends qu{constructor(e){super(),this.cacheSizeBytes=e}vu(e,n){ye(this.persistence.referenceDelegate instanceof Ku,46915);const r=this.persistence.referenceDelegate.garbageCollector;return new pD(r,e.asyncQueue,n)}Su(e){const n=this.cacheSizeBytes!==void 0?Vt.withCacheSize(this.cacheSizeBytes):Vt.DEFAULT;return new fS(r=>Ku.fi(r,n),this.serializer)}}class bd{async initialize(e,n){this.localStore||(this.localStore=e.localStore,this.sharedClientState=e.sharedClientState,this.datastore=this.createDatastore(n),this.remoteStore=this.createRemoteStore(n),this.eventManager=this.createEventManager(n),this.syncEngine=this.createSyncEngine(n,!e.synchronizeTabs),this.sharedClientState.onlineStateHandler=r=>L0(this.syncEngine,r,1),this.remoteStore.remoteSyncer.handleCredentialChange=R4.bind(null,this.syncEngine),await a4(this.remoteStore,this.syncEngine.isPrimaryClient))}createEventManager(e){return function(){return new u4}()}createDatastore(e){const n=Mc(e.databaseInfo.databaseId),r=function(s){return new HD(s)}(e.databaseInfo);return function(s,o,l,u){return new qD(s,o,l,u)}(e.authCredentials,e.appCheckCredentials,r,n)}createRemoteStore(e){return function(r,i,s,o,l){return new YD(r,i,s,o,l)}(this.localStore,this.datastore,e.asyncQueue,n=>L0(this.syncEngine,n,0),function(){return k0.C()?new k0:new BD}())}createSyncEngine(e,n){return function(i,s,o,l,u,c,f){const d=new v4(i,s,o,l,u,c);return f&&(d.mu=!0),d}(this.localStore,this.remoteStore,this.eventManager,this.sharedClientState,e.initialUser,e.maxConcurrentLimboResolutions,n)}async terminate(){var e,n;await async function(i){const s=re(i);H(Ei,"RemoteStore shutting down."),s.da.add(5),await La(s),s.Ra.shutdown(),s.Va.set("Unknown")}(this.remoteStore),(e=this.datastore)===null||e===void 0||e.terminate(),(n=this.eventManager)===null||n===void 0||n.terminate()}}bd.provider={build:()=>new bd};/**
2010 * @license
2011 * Copyright 2020 Google LLC
2012 *
2013 * Licensed under the Apache License, Version 2.0 (the "License");
2014 * you may not use this file except in compliance with the License.
2015 * You may obtain a copy of the License at
2016 *
2017 *   http://www.apache.org/licenses/LICENSE-2.0
2018 *
2019 * Unless required by applicable law or agreed to in writing, software
2020 * distributed under the License is distributed on an "AS IS" BASIS,
2021 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2022 * See the License for the specific language governing permissions and
2023 * limitations under the License.
2024 *//**
2025 * @license
2026 * Copyright 2017 Google LLC
2027 *
2028 * Licensed under the Apache License, Version 2.0 (the "License");
2029 * you may not use this file except in compliance with the License.
2030 * You may obtain a copy of the License at
2031 *
2032 *   http://www.apache.org/licenses/LICENSE-2.0
2033 *
2034 * Unless required by applicable law or agreed to in writing, software
2035 * distributed under the License is distributed on an "AS IS" BASIS,
2036 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2037 * See the License for the specific language governing permissions and
2038 * limitations under the License.
2039 */class b4{constructor(e){this.observer=e,this.muted=!1}next(e){this.muted||this.observer.next&&this.Mu(this.observer.next,e)}error(e){this.muted||(this.observer.error?this.Mu(this.observer.error,e):Jn("Uncaught Error in snapshot listener:",e.toString()))}xu(){this.muted=!0}Mu(e,n){setTimeout(()=>{this.muted||e(n)},0)}}/**
2040 * @license
2041 * Copyright 2017 Google LLC
2042 *
2043 * Licensed under the Apache License, Version 2.0 (the "License");
2044 * you may not use this file except in compliance with the License.
2045 * You may obtain a copy of the License at
2046 *
2047 *   http://www.apache.org/licenses/LICENSE-2.0
2048 *
2049 * Unless required by applicable law or agreed to in writing, software
2050 * distributed under the License is distributed on an "AS IS" BASIS,
2051 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2052 * See the License for the specific language governing permissions and
2053 * limitations under the License.
2054 */const jr="FirestoreClient";class N4{constructor(e,n,r,i,s){this.authCredentials=e,this.appCheckCredentials=n,this.asyncQueue=r,this.databaseInfo=i,this.user=vt.UNAUTHENTICATED,this.clientId=ST.newId(),this.authCredentialListener=()=>Promise.resolve(),this.appCheckCredentialListener=()=>Promise.resolve(),this._uninitializedComponentsProvider=s,this.authCredentials.start(r,async o=>{H(jr,"Received user=",o.uid),await this.authCredentialListener(o),this.user=o}),this.appCheckCredentials.start(r,o=>(H(jr,"Received new app check token=",o),this.appCheckCredentialListener(o,this.user)))}get configuration(){return{asyncQueue:this.asyncQueue,databaseInfo:this.databaseInfo,clientId:this.clientId,authCredentials:this.authCredentials,appCheckCredentials:this.appCheckCredentials,initialUser:this.user,maxConcurrentLimboResolutions:100}}setCredentialChangeListener(e){this.authCredentialListener=e}setAppCheckTokenChangeListener(e){this.appCheckCredentialListener=e}terminate(){this.asyncQueue.enterRestrictedMode();const e=new kr;return this.asyncQueue.enqueueAndForgetEvenWhileRestricted(async()=>{try{this._onlineComponents&&await this._onlineComponents.terminate(),this._offlineComponents&&await this._offlineComponents.terminate(),this.authCredentials.shutdown(),this.appCheckCredentials.shutdown(),e.resolve()}catch(n){const r=ym(n,"Failed to shutdown persistence");e.reject(r)}}),e.promise}}async function Qh(t,e){t.asyncQueue.verifyOperationInProgress(),H(jr,"Initializing OfflineComponentProvider");const n=t.configuration;await e.initialize(n);let r=n.initialUser;t.setCredentialChangeListener(async i=>{r.isEqual(i)||(await dS(e.localStore,i),r=i)}),e.persistence.setDatabaseDeletedListener(()=>t.terminate()),t._offlineComponents=e}async function F0(t,e){t.asyncQueue.verifyOperationInProgress();const n=await M4(t);H(jr,"Initializing OnlineComponentProvider"),await e.initialize(n,t.configuration),t.setCredentialChangeListener(r=>D0(e.remoteStore,r)),t.setAppCheckTokenChangeListener((r,i)=>D0(e.remoteStore,i)),t._onlineComponents=e}async function M4(t){if(!t._offlineComponents)if(t._uninitializedComponentsProvider){H(jr,"Using user provided OfflineComponentProvider");try{await Qh(t,t._uninitializedComponentsProvider._offline)}catch(e){const n=e;if(!function(i){return i.name==="FirebaseError"?i.code===F.FAILED_PRECONDITION||i.code===F.UNIMPLEMENT
2054ED:!(typeof DOMException<"u"&&i instanceof DOMException)||i.code===22||i.code===20||i.code===11}(n))throw n;xs("Error using user provided cache. Falling back to memory cache: "+n),await Qh(t,new qu)}}else H(jr,"Using default OfflineComponentProvider"),await Qh(t,new D4(void 0));return t._offlineComponents}async function VS(t){return t._onlineComponents||(t._uninitializedComponentsProvider?(H(jr,"Using user provided OnlineComponentProvider"),await F0(t,t._uninitializedComponentsProvider._online)):(H(jr,"Using default OnlineComponentProvider"),await F0(t,new bd))),t._onlineComponents}function L4(t){return VS(t).then(e=>e.syncEngine)}async function O4(t){const e=await VS(t),n=e.eventManager;return n.onListen=_4.bind(null,e.syncEngine),n.onUnlisten=T4.bind(null,e.syncEngine),n.onFirstRemoteStoreListen=w4.bind(null,e.syncEngine),n.onLastRemoteStoreUnlisten=S4.bind(null,e.syncEngine),n}function F4(t,e,n={}){const r=new kr;return t.asyncQueue.enqueueAndForget(async()=>function(s,o,l,u,c){const f=new b4({next:p=>{f.xu(),o.enqueueAndForget(()=>h4(s,d)),p.fromCache&&u.source==="server"?c.reject(new K(F.UNAVAILABLE,'Failed to get documents from server. (However, these documents may exist in the local cache. Run again without setting source to "server" to retrieve the cached documents.)')):c.resolve(p)},error:p=>c.reject(p)}),d=new p4(l,f,{includeMetadataChanges:!0,Qa:!0});return c4(s,d)}(await O4(t),t.asyncQueue,e,n,r)),r.promise}/**
2055 * @license
2056 * Copyright 2023 Google LLC
2057 *
2058 * Licensed under the Apache License, Version 2.0 (the "License");
2059 * you may not use this file except in compliance with the License.
2060 * You may obtain a copy of the License at
2061 *
2062 *   http://www.apache.org/licenses/LICENSE-2.0
2063 *
2064 * Unless required by applicable law or agreed to in writing, software
2065 * distributed under the License is distributed on an "AS IS" BASIS,
2066 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2067 * See the License for the specific language governing permissions and
2068 * limitations under the License.
2069 */function DS(t){const e={};return t.timeoutSeconds!==void 0&&(e.timeoutSeconds=t.timeoutSeconds),e}/**
2070 * @license
2071 * Copyright 2020 Google LLC
2072 *
2073 * Licensed under the Apache License, Version 2.0 (the "License");
2074 * you may not use this file except in compliance with the License.
2075 * You may obtain a copy of the License at
2076 *
2077 *   http://www.apache.org/licenses/LICENSE-2.0
2078 *
2079 * Unless required by applicable law or agreed to in writing, software
2080 * distributed under the License is distributed on an "AS IS" BASIS,
2081 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2082 * See the License for the specific language governing permissions and
2083 * limitations under the License.
2084 */const j0=new Map;/**
2085 * @license
2086 * Copyright 2017 Google LLC
2087 *
2088 * Licensed under the Apache License, Version 2.0 (the "License");
2089 * you may not use this file except in compliance with the License.
2090 * You may obtain a copy of the License at
2091 *
2092 *   http://www.apache.org/licenses/LICENSE-2.0
2093 *
2094 * Unless required by applicable law or agreed to in writing, software
2095 * distributed under the License is distributed on an "AS IS" BASIS,
2096 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2097 * See the License for the specific language governing permissions and
2098 * limitations under the License.
2099 */function bS(t,e,n){if(!n)throw new K(F.INVALID_ARGUMENT,`Function ${t}() cannot be called with an empty ${e}.`)}function j4(t,e,n,r){if(e===!0&&r===!0)throw new K(F.INVALID_ARGUMENT,`${t} and ${n} cannot be used together.`)}function B0(t){if(!Q.isDocumentKey(t))throw new K(F.INVALID_ARGUMENT,`Invalid document reference. Document references must have an even number of segments, but ${t} has ${t.length}.`)}function z0(t){if(Q.isDocumentKey(t))throw new K(F.INVALID_ARGUMENT,`Invalid collection reference. Collection references must have an odd number of segments, but ${t} has ${t.length}.`)}function Fc(t){if(t===void 0)return"undefined";if(t===null)return"null";if(typeof t=="string")return t.length>20&&(t=`${t.substring(0,20)}...`),JSON.stringify(t);if(typeof t=="number"||typeof t=="boolean")return""+t;if(typeof t=="object"){if(t instanceof Array)return"an array";{const e=function(r){return r.constructor?r.constructor.name:null}(t);return e?`a custom ${e} object`:"an object"}}return typeof t=="function"?"a function":J(12329,{type:typeof t})}function Qu(t,e){if("_delegate"in t&&(t=t._delegate),!(t instanceof e)){if(e.name===t.constructor.name)throw new K(F.INVALID_ARGUMENT,"Type does not match the expected instance. Did you pass a reference from a different Firestore SDK?");{const n=Fc(t);throw new K(F.INVALID_ARGUMENT,`Expected type '${e.name}', but it was: ${n}`)}}return t}function B4(t,e){if(e<=0)throw new K(F.INVALID_ARGUMENT,`Function ${t}() requires a positive number, but it was: ${e}.`)}/**
2100 * @license
2101 * Copyright 2020 Google LLC
2102 *
2103 * Licensed under the Apache License, Version 2.0 (the "License");
2104 * you may not use this file except in compliance with the License.
2105 * You may obtain a copy of the License at
2106 *
2107 *   http://www.apache.org/licenses/LICENSE-2.0
2108 *
2109 * Unless required by applicable law or agreed to in writing, software
2110 * distributed under the License is distributed on an "AS IS" BASIS,
2111 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2112 * See the License for the specific language governing permissions and
2113 * limitations under the License.
2114 */const NS="firestore.googleapis.com",U0=!0;class $0{constructor(e){var n,r;if(e.host===void 0){if(e.ssl!==void 0)throw new K(F.INVALID_ARGUMENT,"Can't provide ssl option if host option is not set");this.host=NS,this.ssl=U0}else this.host=e.host,this.ssl=(n=e.ssl)!==null&&n!==void 0?n:U0;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=hS;else{if(e.cacheSizeBytes!==-1&&e.cacheSizeBytes<fD)throw new K(F.INVALID_ARGUMENT,"cacheSizeBytes must be at least 1048576");this.cacheSizeBytes=e.cacheSizeBytes}j4("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=DS((r=e.experimentalLongPollingOptions)!==null&&r!==void 0?r:{}),function(s){if(s.timeoutSeconds!==void 0){if(isNaN(s.timeoutSeconds))throw new K(F.INVALID_ARGUMENT,`invalid long polling timeout: ${s.timeoutSeconds} (must not be NaN)`);if(s.timeoutSeconds<5)throw new K(F.INVALID_ARGUMENT,`invalid long polling timeout: ${s.timeoutSeconds} (minimum allowed value is 5)`);if(s.timeoutSeconds>30)throw new K(F.INVALID_ARGUMENT,`invalid long polling timeout: ${s.timeoutSeconds} (maximum allowed value is 30)`)}}(this.experimentalLongPollingOptions),this.useFetchStreams=!!e.useFetchStreams}isEqual(e){return this.host===e.host&&this.ssl===e.ssl&&this.credentials===e.credentials&&this.cacheSizeBytes===e.cacheSizeBytes&&this.experimentalForceLongPolling===e.experimentalForceLongPolling&&this.experimentalAutoDetectLongPolling===e.experimentalAutoDetectLongPolling&&function(r,i){return r.timeoutSeconds===i.timeoutSeconds}(this.experimentalLongPollingOptions,e.experimentalLongPollingOptions)&&this.ignoreUndefinedProperties===e.ignoreUndefinedProperties&&this.useFetchStreams===e.useFetchStreams}}class jc{constructor(e,n,r,i){this._authCredentials=e,this._appCheckCredentials=n,this._databaseId=r,this._app=i,this.type="firestore-lite",this._persistenceKey="(lite)",this._settings=new $0({}),this._settingsFrozen=!1,this._emulatorOptions={},this._terminateTask="notTerminated"}get app(){if(!this._app)throw new K(F.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 K(F.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 $0(e),this._emulatorOptions=e.emulatorOptions||{},e.credentials!==void 0&&(this._authCredentials=function(r){if(!r)return new Uk;switch(r.type){case"firstParty":return new Kk(r.sessionIndex||"0",r.iamToken||null,r.authTokenFactory||null);case"provider":return r.client;default:throw new K(F.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 r=j0.get(n);r&&(H("ComponentProvider","Removing Datastore"),j0.delete(n),r.terminate())}(this),Promise.resolve()}}function z4(t,e,n,r={}){var i;t=Qu(t,jc);const s=Yp(e),o=t._getSettings(),l=Object.assign(Object.assign({},o),{emulatorOptions:t._getEmulatorOptions()}),u=`${e}:${n}`;s&&(mR(`https://${u}`),_R("Firestore",!0)),o.host!==NS&&o.host!==u&&xs("Host has been set in both settings() and connectFirestoreEmulator(), emulator host will be used.");const c=Object.assign(Object.assign({},o),{host:u,ssl:s,emulatorOptions:r});if(!Lu(c,l)&&(t._setSettings(c),r.mockUserToken)){let f,d;if(typeof r.mockUserToken=="string")f=r.mockUserToken,d=vt.MOCK_USER;else{f=gR(r.mockUserToken,(i=t._app)===null||i===void 0?void 0:i.options.projectId);const p=r.mockUserToken.sub||r.mockUserToken.user_id;if(!p)throw new K(F.INVALID_ARGUMENT,"mockUserToken must contain 'sub' or 'user_id' field!");d=new vt(p)}t._authCredentials=new $k(new ET(f,d))}}/**
2115 * @license
2116 * Copyright 2020 Google LLC
2117 *
2118 * Licensed under the Apache License, Version 2.0 (the "License");
2119 * you may not use this file except in compliance with the License.
2120 * You may obtain a copy of the License at
2121 *
2122 *   http://www.apache.org/licenses/LICENSE-2.0
2123 *
2124 * Unless required by applicable law or agreed to in writing, software
2125 * distributed under the License is distributed on an "AS IS" BASIS,
2126 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2127 * See the License for the specific language governing permissions and
2128 * limitations under the License.
2129 */class Wr{constructor(e,n,r){this.converter=n,this._query=r,this.type="query",this.firestore=e}withConverter(e){return new Wr(this.firestore,e,this._query)}}class sn{constructor(e,n,r){this.converter=n,this._key=r,this.type="document",this.firestore=e}get _path(){return this._key.path}get id(){return this._key.path.lastSegment()}get path(){return this._key.path.canonicalString()}get parent(){return new Vr(this.firestore,this.converter,this._key.path.popLast())}withConverter(e){return new sn(this.firestore,e,this._key)}}class Vr extends Wr{constructor(e,n,r){super(e,n,BT(r)),this._path=r,this.type="collection"}get id(){return this._query.path.lastSegment()}get path(){return this._query.path.canonicalString()}get parent(){const e=this._path.popLast();return e.isEmpty()?null:new sn(this.firestore,null,new Q(e))}withConverter(e){return new Vr(this.firestore,e,this._path)}}function Yh(t,e,...n){if(t=Is(t),bS("collection","path",e),t instanceof jc){const r=Ie.fromString(e,...n);return z0(r),new Vr(t,null,r)}{if(!(t instanceof sn||t instanceof Vr))throw new K(F.INVALID_ARGUMENT,"Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");const r=t._path.child(Ie.fromString(e,...n));return z0(r),new Vr(t.firestore,null,r)}}function U4(t,e,...n){if(t=Is(t),arguments.length===1&&(e=ST.newId()),bS("doc","path",e),t instanceof jc){const r=Ie.fromString(e,...n);return B0(r),new sn(t,null,new Q(r))}{if(!(t instanceof sn||t instanceof Vr))throw new K(F.INVALID_ARGUMENT,"Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");const r=t._path.child(Ie.fromString(e,...n));return B0(r),new sn(t.firestore,t instanceof Vr?t.converter:null,new Q(r))}}/**
2130 * @license
2131 * Copyright 2020 Google LLC
2132 *
2133 * Licensed under the Apache License, Version 2.0 (the "License");
2134 * you may not use this file except in compliance with the License.
2135 * You may obtain a copy of the License at
2136 *
2137 *   http://www.apache.org/licenses/LICENSE-2.0
2138 *
2139 * Unless required by applicable law or agreed to in writing, software
2140 * distributed under the License is distributed on an "AS IS" BASIS,
2141 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2142 * See the License for the specific language governing permissions and
2143 * limitations under the License.
2144 */const H0="AsyncQueue";class W0{constructor(e=Promise.resolve()){this.Ju=[],this.Yu=!1,this.Zu=[],this.Xu=null,this.ec=!1,this.tc=!1,this.nc=[],this.x_=new mS(this,"async_queue_retry"),this.rc=()=>{const r=qh();r&&H(H0,"Visibility state changed to "+r.visibilityState),this.x_.b_()},this.sc=e;const n=qh();n&&typeof n.addEventListener=="function"&&n.addEventListener("visibilitychange",this.rc)}get isShuttingDown(){return this.Yu}enqueueAndForget(e){this.enqueue(e)}enqueueAndForgetEvenWhileRestricted(e){this.oc(),this._c(e)}enterRestrictedMode(e){if(!this.Yu){this.Yu=!0,this.tc=e||!1;const n=qh();n&&typeof n.removeEventListener=="function"&&n.removeEventListener("visibilitychange",this.rc)}}enqueue(e){if(this.oc(),this.Yu)return new Promise(()=>{});const n=new kr;return this._c(()=>this.Yu&&this.tc?Promise.resolve():(e().then(n.resolve,n.reject),n.promise)).then(()=>n.promise)}enqueueRetryable(e){this.enqueueAndForget(()=>(this.Ju.push(e),this.ac()))}async ac(){if(this.Ju.length!==0){try{await this.Ju[0](),this.Ju.shift(),this.x_.reset()}catch(e){if(!$s(e))throw e;H(H0,"Operation failed with retryable error: "+e)}this.Ju.length>0&&this.x_.y_(()=>this.ac())}}_c(e){const n=this.sc.then(()=>(this.ec=!0,e().catch(r=>{throw this.Xu=r,this.ec=!1,Jn("INTERNAL UNHANDLED ERROR: ",K0(r)),r}).then(r=>(this.ec=!1,r))));return this.sc=n,n}enqueueAfterDelay(e,n,r){this.oc(),this.nc.indexOf(e)>-1&&(n=0);const i=gm.createAndSchedule(this,e,n,r,s=>this.uc(s));return this.Zu.push(i),i}oc(){this.Xu&&J(47125,{cc:K0(this.Xu)})}verifyOperationInProgress(){}async lc(){let e;do e=this.sc,await e;while(e!==this.sc)}hc(e){for(const n of this.Zu)if(n.timerId===e)return!0;return!1}Pc(e){return this.lc().then(()=>{this.Zu.sort((n,r)=>n.targetTimeMs-r.targetTimeMs);for(const n of this.Zu)if(n.skipDelay(),e!=="all"&&n.timerId===e)break;return this.lc()})}Tc(e){this.nc.push(e)}uc(e){const n=this.Zu.indexOf(e);this.Zu.splice(n,1)}}function K0(t){let e=t.message||"";return t.stack&&(e=t.stack.includes(t.message)?t.stack:t.message+`
2145`+t.stack),e}class Em extends jc{constructor(e,n,r,i){super(e,n,r,i),this.type="firestore",this._queue=new W0,this._persistenceKey=(i==null?void 0:i.name)||"[DEFAULT]"}async _terminate(){if(this._firestoreClient){const e=this._firestoreClient.terminate();this._queue=new W0(e),this._firestoreClient=void 0,await e}}}function $4(t,e){const n=typeof t=="object"?t:Rk(),r=typeof t=="string"?t:Bu,i=Ak(n,"firestore").getImmediate({identifier:r});if(!i._initialized){const s=dR("firestore");s&&z4(i,...s)}return i}function MS(t){if(t._terminated)throw new K(F.FAILED_PRECONDITION,"The client has already been terminated.");return t._firestoreClient||H4(t),t._firestoreClient}function H4(t){var e,n,r;const i=t._freezeSettings(),s=function(l,u,c,f){return new aV(l,u,c,f.host,f.ssl,f.experimentalForceLongPolling,f.experimentalAutoDetectLongPolling,DS(f.experimentalLongPollingOptions),f.useFetchStreams,f.isUsingEmulator)}(t._databaseId,((e=t._app)===null||e===void 0?void 0:e.options.appId)||"",t._persistenceKey,i);t._componentsProvider||!((n=i.localCache)===null||n===void 0)&&n._offlineComponentProvider&&(!((r=i.localCache)===null||r===void 0)&&r._onlineComponentProvider)&&(t._componentsProvider={_offline:i.localCache._offlineComponentProvider,_online:i.localCache._onlineComponentProvider}),t._firestoreClient=new N4(t._authCredentials,t._appCheckCredentials,t._queue,s,t._componentsProvider&&function(l){const u=l==null?void 0:l._online.build();return{_offline:l==null?void 0:l._offline.build(u),_online:u}}(t._componentsProvider))}/**
2146 * @license
2147 * Copyright 2020 Google LLC
2148 *
2149 * Licensed under the Apache License, Version 2.0 (the "License");
2150 * you may not use this file except in compliance with the License.
2151 * You may obtain a copy of the License at
2152 *
2153 *   http://www.apache.org/licenses/LICENSE-2.0
2154 *
2155 * Unless required by applicable law or agreed to in writing, software
2156 * distributed under the License is distributed on an "AS IS" BASIS,
2157 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2158 * See the License for the specific language governing permissions and
2159 * limitations under the License.
2160 */class Ds{constructor(e){this._byteString=e}static fromBase64String(e){try{return new Ds(ut.fromBase64String(e))}catch(n){throw new K(F.INVALID_ARGUMENT,"Failed to construct data from Base64 string: "+n)}}static fromUint8Array(e){return new Ds(ut.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)}}/**
2161 * @license
2162 * Copyright 2020 Google LLC
2163 *
2164 * Licensed under the Apache License, Version 2.0 (the "License");
2165 * you may not use this file except in compliance with the License.
2166 * You may obtain a copy of the License at
2167 *
2168 *   http://www.apache.org/licenses/LICENSE-2.0
2169 *
2170 * Unless required by applicable law or agreed to in writing, software
2171 * distributed under the License is distributed on an "AS IS" BASIS,
2172 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2173 * See the License for the specific language governing permissions and
2174 * limitations under the License.
2175 */class Tm{constructor(...e){for(let n=0;n<e.length;++n)if(e[n].length===0)throw new K(F.INVALID_ARGUMENT,"Invalid field name at argument $(i + 1). Field names must not be empty.");this._internalPath=new ot(e)}isEqual(e){return this._internalPath.isEqual(e._internalPath)}}/**
2176 * @license
2177 * Copyright 2020 Google LLC
2178 *
2179 * Licensed under the Apache License, Version 2.0 (the "License");
2180 * you may not use this file except in compliance with the License.
2181 * You may obtain a copy of the License at
2182 *
2183 *   http://www.apache.org/licenses/LICENSE-2.0
2184 *
2185 * Unless required by applicable law or agreed to in writing, software
2186 * distributed under the License is distributed on an "AS IS" BASIS,
2187 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2188 * See the License for the specific language governing permissions and
2189 * limitations under the License.
2190 */class Sm{constructor(e){this._methodName=e}}/**
2191 * @license
2192 * Copyright 2017 Google LLC
2193 *
2194 * Licensed under the Apache License, Version 2.0 (the "License");
2195 * you may not use this file except in compliance with the License.
2196 * You may obtain a copy of the License at
2197 *
2198 *   http://www.apache.org/licenses/LICENSE-2.0
2199 *
2200 * Unless required by applicable law or agreed to in writing, software
2201 * distributed under the License is distributed on an "AS IS" BASIS,
2202 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2203 * See the License for the specific language governing permissions and
2204 * limitations under the License.
2205 */class Am{constructor(e,n){if(!isFinite(e)||e<-90||e>90)throw new K(F.INVALID_ARGUMENT,"Latitude must be a number between -90 and 90, but was: "+e);if(!isFinite(n)||n<-180||n>180)throw new K(F.INVALID_ARGUMENT,"Longitude must be a number between -180 and 180, but was: "+n);this._lat=e,this._long=n}get latitude(){return this._lat}get longitude(){return this._long}isEqual(e){return this._lat===e._lat&&this._long===e._long}toJSON(){return{latitude:this._lat,longitude:this._long}}_compareTo(e){return se(this._lat,e._lat)||se(this._long,e._long)}}/**
2206 * @license
2207 * Copyright 2024 Google LLC
2208 *
2209 * Licensed under the Apache License, Version 2.0 (the "License");
2210 * you may not use this file except in compliance with the License.
2211 * You may obtain a copy of the License at
2212 *
2213 *   http://www.apache.org/licenses/LICENSE-2.0
2214 *
2215 * Unless required by applicable law or agreed to in writing, software
2216 * distributed under the License is distributed on an "AS IS" BASIS,
2217 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2218 * See the License for the specific language governing permissions and
2219 * limitations under the License.
2220 */class Im{constructor(e){this._values=(e||[]).map(n=>n)}toArray(){return this._values.map(e=>e)}isEqual(e){return function(r,i){if(r.length!==i.length)return!1;for(let s=0;s<r.length;++s)if(r[s]!==i[s])return!1;return!0}(this._values,e._values)}}/**
2221 * @license
2222 * Copyright 2017 Google LLC
2223 *
2224 * Licensed under the Apache License, Version 2.0 (the "License");
2225 * you may not use this file except in compliance with the License.
2226 * You may obtain a copy of the License at
2227 *
2228 *   http://www.apache.org/licenses/LICENSE-2.0
2229 *
2230 * Unless required by applicable law or agreed to in writing, software
2231 * distributed under the License is distributed on an "AS IS" BASIS,
2232 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2233 * See the License for the specific language governing permissions and
2234 * limitations under the License.
2235 */const W4=/^__.*__$/;class K4{constructor(e,n,r){this.data=e,this.fieldMask=n,this.fieldTransforms=r}toMutation(e,n){return this.fieldMask!==null?new xi(e,this.data,this.fieldMask,n,this.fieldTransforms):new Na(e,this.data,n,this.fieldTransforms)}}function LS(t){switch(t){case 0:case 2:case 1:return!0;case 3:case 4:return!1;default:throw J(40011,{Ic:t})}}class xm{constructor(e,n,r,i,s,o){this.settings=e,this.databaseId=n,this.serializer=r,this.ignoreUndefinedProperties=i,s===void 0&&this.Ec(),this.fieldTransforms=s||[],this.fieldMask=o||[]}get path(){return this.settings.path}get Ic(){return this.settings.Ic}dc(e){return new xm(Object.assign(Object.assign({},this.settings),e),this.databaseId,this.serializer,this.ignoreUndefinedProperties,this.fieldTransforms,this.fieldMask)}Ac(e){var n;const r=(n=this.path)===null||n===void 0?void 0:n.child(e),i=this.dc({path:r,Rc:!1});return i.Vc(e),i}mc(e){var n;const r=(n=this.path)===null||n===void 0?void 0:n.child(e),i=this.dc({path:r,Rc:!1});return i.Ec(),i}fc(e){return this.dc({path:void 0,Rc:!0})}gc(e){return Yu(e,this.settings.methodName,this.settings.yc||!1,this.path,this.settings.wc)}contains(e){return this.fieldMask.find(n=>e.isPrefixOf(n))!==void 0||this.fieldTransforms.find(n=>e.isPrefixOf(n.field))!==void 0}Ec(){if(this.path)for(let e=0;e<this.path.length;e++)this.Vc(this.path.get(e))}Vc(e){if(e.length===0)throw this.gc("Document fields must not be empty");if(LS(this.Ic)&&W4.test(e))throw this.gc('Document fields cannot begin and end with "__"')}}class G4{constructor(e,n,r){this.databaseId=e,this.ignoreUndefinedProperties=n,this.serializer=r||Mc(e)}bc(e,n,r,i=!1){return new xm({Ic:e,methodName:n,wc:r,path:ot.emptyPath(),Rc:!1,yc:i},this.databaseId,this.serializer,this.ignoreUndefinedProperties)}}function OS(t){const e=t._freezeSettings(),n=Mc(t._databaseId);return new G4(t._databaseId,!!e.ignoreUndefinedProperties,n)}function q4(t,e,n,r,i,s={}){const o=t.bc(s.merge||s.mergeFields?2:0,e,n,i);BS("Data must be an object, but it was:",o,r);const l=FS(r,o);let u,c;if(s.merge)u=new yn(o.fieldMask),c=o.fieldTransforms;else if(s.mergeFields){const f=[];for(const d of s.mergeFields){const p=Y4(e,d,n);if(!o.contains(p))throw new K(F.INVALID_ARGUMENT,`Field '${p}' is specified in your field mask but missing from your input data.`);Z4(f,p)||f.push(p)}u=new yn(f),c=o.fieldTransforms.filter(d=>u.covers(d.field))}else u=null,c=o.fieldTransforms;return new K4(new tn(l),u,c)}class Cm extends Sm{_toFieldTransform(e){return new bV(e.path,new wa)}isEqual(e){return e instanceof Cm}}function Q4(t,e,n,r=!1){return Pm(n,t.bc(r?4:3,e))}function Pm(t,e){if(jS(t=Is(t)))return BS("Unsupported field value:",e,t),FS(t,e);if(t instanceof Sm)return function(r,i){if(!LS(i.Ic))throw i.gc(`${r._methodName}() can only be used with update() and set()`);if(!i.path)throw i.gc(`${r._methodName}() is not currently supported inside arrays`);const s=r._toFieldTransform(i);s&&i.fieldTransforms.push(s)}(t,e),null;if(t===void 0&&e.ignoreUndefinedProperties)return null;if(e.path&&e.fieldMask.push(e.path),t instanceof Array){if(e.settings.Rc&&e.Ic!==4)throw e.gc("Nested arrays are not supported");return function(r,i){const s=[];let o=0;for(const l of r){let u=Pm(l,i.fc(o));u==null&&(u={nullValue:"NULL_VALUE"}),s.push(u),o++}return{arrayValue:{values:s}}}(t,e)}return function(r,i){if((r=Is(r))===null)return{nullValue:"NULL_VALUE"};if(typeof r=="number")return kV(i.serializer,r);if(typeof r=="boolean")return{booleanValue:r};if(typeof r=="string")return{stringValue:r};if(r instanceof Date){const s=Ge.fromDate(r);
2235return{timestampValue:Wu(i.serializer,s)}}if(r instanceof Ge){const s=new Ge(r.seconds,1e3*Math.floor(r.nanoseconds/1e3));return{timestampValue:Wu(i.serializer,s)}}if(r instanceof Am)return{geoPointValue:{latitude:r.latitude,longitude:r.longitude}};if(r instanceof Ds)return{bytesValue:iS(i.serializer,r._byteString)};if(r instanceof sn){const s=i.databaseId,o=r.firestore._databaseId;if(!o.isEqual(s))throw i.gc(`Document reference is for database ${o.projectId}/${o.database} but should be for database ${s.projectId}/${s.database}`);return{referenceValue:am(r.firestore._databaseId||i.databaseId,r._key.path)}}if(r instanceof Im)return function(o,l){return{mapValue:{fields:{[VT]:{stringValue:DT},[zu]:{arrayValue:{values:o.toArray().map(c=>{if(typeof c!="number")throw l.gc("VectorValues must only contain numeric values.");return im(l.serializer,c)})}}}}}}(r,i);throw i.gc(`Unsupported field value: ${Fc(r)}`)}(t,e)}function FS(t,e){const n={};return IT(t)?e.path&&e.path.length>0&&e.fieldMask.push(e.path):Ai(t,(r,i)=>{const s=Pm(i,e.Ac(r));s!=null&&(n[r]=s)}),{mapValue:{fields:n}}}function jS(t){return!(typeof t!="object"||t===null||t instanceof Array||t instanceof Date||t instanceof Ge||t instanceof Am||t instanceof Ds||t instanceof sn||t instanceof Sm||t instanceof Im)}
2235function BS(t,e,n){if(!jS(n)||!function(i){return typeof i=="object"&&i!==null&&(Object.getPrototypeOf(i)===Object.prototype||Object.getPrototypeOf(i)===null)}(n)){const r=Fc(n);throw r==="an object"?e.gc(t+" a custom object"):e.gc(t+" "+r)}}function Y4(t,e,n){if((e=Is(e))instanceof Tm)return e._internalPath;if(typeof e=="string")return zS(t,e);throw Yu("Field path arguments must be of type string or ",t,!1,void 0,n)}const X4=new RegExp("[~\\*/\\[\\]]");function zS(t,e,n){if(e.search(X4)>=0)throw Yu(`Invalid field path (${e}). Paths must not contain '~', '*', '/', '[', or ']'`,t,!1,void 0,n);try{return new Tm(...e.split("."))._internalPath}catch{throw Yu(`Invalid field path (${e}). Paths must not be empty, begin with '.', end with '.', or contain '..'`,t,!1,void 0,n)}}function Yu(t,e,n,r,i){const s=r&&!r.isEmpty(),o=i!==void 0;let l=`Function ${e}() called with invalid data`;n&&(l+=" (via `toFirestore()`)"),l+=". ";let u="";return(s||o)&&(u+=" (found",s&&(u+=` in field ${r}`),o&&(u+=` in document ${i}`),u+=")"),new K(F.INVALID_ARGUMENT,l+t+u)}function Z4(t,e){return t.some(n=>n.isEqual(e))}/**
2236 * @license
2237 * Copyright 2020 Google LLC
2238 *
2239 * Licensed under the Apache License, Version 2.0 (the "License");
2240 * you may not use this file except in compliance with the License.
2241 * You may obtain a copy of the License at
2242 *
2243 *   http://www.apache.org/licenses/LICENSE-2.0
2244 *
2245 * Unless required by applicable law or agreed to in writing, software
2246 * distributed under the License is distributed on an "AS IS" BASIS,
2247 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2248 * See the License for the specific language governing permissions and
2249 * limitations under the License.
2250 */class US{constructor(e,n,r,i,s){this._firestore=e,this._userDataWriter=n,this._key=r,this._document=i,this._converter=s}get id(){return this._key.path.lastSegment()}get ref(){return new sn(this._firestore,this._converter,this._key)}exists(){return this._document!==null}data(){if(this._document){if(this._converter){const e=new J4(this._firestore,this._userDataWriter,this._key,this._document,null);return this._converter.fromFirestore(e)}return this._userDataWriter.convertValue(this._document.data.value)}}get(e){if(this._document){const n=this._document.data.field(Rm("DocumentSnapshot.get",e));if(n!==null)return this._userDataWriter.convertValue(n)}}}class J4 extends US{data(){return super.data()}}function Rm(t,e){return typeof e=="string"?zS(t,e):e instanceof Tm?e._internalPath:e._delegate._internalPath}/**
2251 * @license
2252 * Copyright 2020 Google LLC
2253 *
2254 * Licensed under the Apache License, Version 2.0 (the "License");
2255 * you may not use this file except in compliance with the License.
2256 * You may obtain a copy of the License at
2257 *
2258 *   http://www.apache.org/licenses/LICENSE-2.0
2259 *
2260 * Unless required by applicable law or agreed to in writing, software
2261 * distributed under the License is distributed on an "AS IS" BASIS,
2262 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2263 * See the License for the specific language governing permissions and
2264 * limitations under the License.
2265 */function eb(t){if(t.limitType==="L"&&t.explicitOrderBy.length===0)throw new K(F.UNIMPLEMENTED,"limitToLast() queries require specifying at least one orderBy() clause")}class km{}class Vm extends km{}function G0(t,e,...n){let r=[];e instanceof km&&r.push(e),r=r.concat(n),function(s){const o=s.filter(u=>u instanceof bm).length,l=s.filter(u=>u instanceof Dm).length;if(o>1||o>0&&l>0)throw new K(F.INVALID_ARGUMENT,"InvalidQuery. When using composite filters, you cannot use more than one filter at the top level. Consider nesting the multiple filters within an `and(...)` statement. For example: change `query(query, where(...), or(...))` to `query(query, and(where(...), or(...)))`.")}(r);for(const i of r)t=i._apply(t);return t}class Dm extends Vm{constructor(e,n,r){super(),this._field=e,this._op=n,this._value=r,this.type="where"}static _create(e,n,r){return new Dm(e,n,r)}_apply(e){const n=this._parse(e);return $S(e._query,n),new Wr(e.firestore,e.converter,Ad(e._query,n))}_parse(e){const n=OS(e.firestore);return function(s,o,l,u,c,f,d){let p;
2265if(c.isKeyField()){if(f==="array-contains"||f==="array-contains-any")throw new K(F.INVALID_ARGUMENT,`Invalid Query. You can't perform '${f}' queries on documentId().`);if(f==="in"||f==="not-in"){X0(d,f);const S=[];for(const x of d)S.push(Y0(u,s,x));p={arrayValue:{values:S}}}else p=Y0(u,s,d)}else f!=="in"&&f!=="not-in"&&f!=="array-contains-any"||X0(d,f),p=Q4(l,o,d,f==="in"||f==="not-in");return $e.create(c,f,p)}(e._query,"where",n,e.firestore._databaseId,this._field,this._op,this._value)}}class bm extends km{constructor(e,n){super(),this.type=e,this._queryConstraints=n}static _create(e,n){return new bm(e,n)}_parse(e){const n=this._queryConstraints.map(r=>r._parse(e)).filter(r=>r.getFilters().length>0);return n.length===1?n[0]:Tn.create(n,this._getOperator())}_apply(e){const n=this._parse(e);return n.getFilters().length===0?e:(function(i,s){let o=i;const l=s.getFlattenedFilters();for(const u of l)$S(o,u),o=Ad(o,u)}(e._query,n),new Wr(e.firestore,e.converter,Ad(e._query,n)))}_getQueryConstraints(){return this._queryConstraints}_getOperator(){return this.type==="and"?"and":"or"}}class Nm extends Vm{constructor(e,n){super(),this._field=e,this._direction=n,this.type="orderBy"}static _create(e,n){return new Nm(e,n)}_apply(e){const n=function(i,s,o){if(i.startAt!==null)throw new K(F.INVALID_ARGUMENT,"Invalid query. You must not call startAt() or startAfter() before calling orderBy().");if(i.endAt!==null)throw new K(F.INVALID_ARGUMENT,"Invalid query. You must not call endAt() or endBefore() before calling orderBy().");return new _a(s,o)}(e._query,this._field,this._direction);return new Wr(e.firestore,e.converter,function(i,s){const o=i.explicitOrderBy.concat([s]);return new Hs(i.path,i.collectionGroup,o,i.filters.slice(),i.limit,i.limitType,i.startAt,i.endAt)}(e._query,n))}}function q0(t,e="asc"){const n=e,r=Rm("orderBy",t);return Nm._create(r,n)}class Mm extends Vm{constructor(e,n,r){super(),this.type=e,this._limit=n,this._limitType=r}static _create(e,n,r){return new Mm(e,n,r)}_apply(e){return new Wr(e.firestore,e.converter,$u(e._query,this._limit,this._limitType))}}function Q0(t){return B4("limit",t),Mm._create("limit",t,"F")}function Y0(t,e,n){if(typeof(n=Is(n))=="string"){if(n==="")throw new K(F.INVALID_ARGUMENT,"Invalid query. When querying with documentId(), you must provide a valid document ID, but it was an empty string.");if(!zT(e)&&n.indexOf("/")!==-1)throw new K(F.INVALID_ARGUMENT,`Invalid query. When querying a collection by documentId(), you must provide a plain document ID, but '${n}' contains a '/' character.`);const r=e.path.child(Ie.fromString(n));if(!Q.isDocumentKey(r))throw new K(F.INVALID_ARGUMENT,`Invalid query. When querying a collection group by documentId(), the value provided must result in a valid document path, but '${r}' is not because it has an odd number of segments (${r.length}).`);return l0(t,new Q(r))}if(n instanceof sn)return l0(t,n._key);throw new K(F.INVALID_ARGUMENT,`Invalid query. When querying with documentId(), you must provide a valid string or a DocumentReference, but it was: ${Fc(n)}.`)}function X0(t,e){if(!Array.isArray(t)||t.length===0)throw new K(F.INVALID_ARGUMENT,`Invalid Query. A non-empty array is required for '${e.toString()}' filters.`)}function $S(t,e){const n=function(i,s){for(const o of i)for(const l of o.getFlattenedFilters())if(s.indexOf(l.op)>=0)return l.op;return null}(t.filters,function(i){switch(i){case"!=":return["!=","not-in"];case"array-contains-any":case"in":return["not-in"];case"not-in":return["array-contains-any","in","not-in","!="];default:return[]}}(e.op));if(n!==null)throw n===e.op?new K(F.INVALID_ARGUMENT,`Invalid query. You cannot use more than one '${e.op.toString()}' filter.`):new K(F.INVALID_ARGUMENT,`Invalid query. You cannot use '${e.op.toString()}' filters with '${n.toString()}' filters.`)}class tb{convertValue(e,n="none"){switch(Or(e)){case 0:return null;case 1:return e.booleanValue;case 2:return Fe(e.integerValue||e.doubleValue);case 3:return this.convertTimestamp(e.timestampValue);case 4:return this.convertServerTimestamp(e,n);case 5:return e.stringValue;case 6:return this.convertBytes(Lr(e.bytesValue));case 7:return this.convertReference(e.referenceValue);case 8:return this.convertGeoPoint(e.geoPointValue);case 9:return this.convertArray(e.arrayValue,n);case 11:return this.convertObject(e.mapValue,n);case 10:return this.convertVectorValue(e.mapValue);default:throw J(62114,{value:e})}}convertObject(e,n){return this.convertObjectMap(e.fields,n)}convertObjectMap(e,n="none"){const r={};return Ai(e,(i,s)=>{r[i]=this.convertValue(s,n)}),r}convertVectorValue(e){var n,r,i;const s=(i=(r=(n=e.fields)===null||n===void 0?void 0:n[zu].arrayValue)===null||r===void 0?void 0:r.values)===null||i===void 0?void 0:i.map(o=>Fe(o.doubleValue));return new Im(s)}convertGeoPoint(e){return new Am(Fe(e.latitude),Fe(e.longitude))}convertArray(e,n){return(e.values||[]).map(r=>this.convertValue(r,n))}convertServerTimestamp(e,n){switch(n){case"previous":const r=Rc(e);return r==null?null:this.convertValue(r,n);case"estimate":return this.convertTimestamp(ga(e));default:return null}}convertTimestamp(e){const n=Mr(e);return new Ge(n.seconds,n.nanos)}convertDocumentKey(e,n){const r=Ie.fromString(e);ye(cS(r),9688,{name:e});const i=new ya(r.get(1),r.get(3)),s=new Q(r.popFirst(5));return i.isEqual(n)||Jn(`Document ${s} contains a document reference within a different database (${i.projectId}/${i.database}) which is not supported. It will be treated as a reference in the current database (${n.projectId}/${n.database}) instead.`),s}}/**
2266 * @license
2267 * Copyright 2020 Google LLC
2268 *
2269 * Licensed under the Apache License, Version 2.0 (the "License");
2270 * you may not use this file except in compliance with the License.
2271 * You may obtain a copy of the License at
2272 *
2273 *   http://www.apache.org/licenses/LICENSE-2.0
2274 *
2275 * Unless required by applicable law or agreed to in writing, software
2276 * distributed under the License is distributed on an "AS IS" BASIS,
2277 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2278 * See the License for the specific language governing permissions and
2279 * limitations under the License.
2280 */function nb(t,e,n){let r;return r=t?t.toFirestore(e):e,r}/**
2281 * @license
2282 * Copyright 2020 Google LLC
2283 *
2284 * Licensed under the Apache License, Version 2.0 (the "License");
2285 * you may not use this file except in compliance with the License.
2286 * You may obtain a copy of the License at
2287 *
2288 *   http://www.apache.org/licenses/LICENSE-2.0
2289 *
2290 * Unless required by applicable law or agreed to in writing, software
2291 * distributed under the License is distributed on an "AS IS" BASIS,
2292 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2293 * See the License for the specific language governing permissions and
2294 * limitations under the License.
2295 */class Rl{constructor(e,n){this.hasPendingWrites=e,this.fromCache=n}isEqual(e){return this.hasPendingWrites===e.hasPendingWrites&&this.fromCache===e.fromCache}}class rb extends US{constructor(e,n,r,i,s,o){super(e,n,r,i,o),this._firestore=e,this._firestoreImpl=e,this.metadata=s}exists(){return super.exists()}data(e={}){if(this._document){if(this._converter){const n=new ru(this._firestore,this._userDataWriter,this._key,this._document,this.metadata,null);return this._converter.fromFirestore(n,e)}return this._userDataWriter.convertValue(this._document.data.value,e.serverTimestamps)}}get(e,n={}){if(this._document){const r=this._document.data.field(Rm("DocumentSnapshot.get",e));if(r!==null)return this._userDataWriter.convertValue(r,n.serverTimestamps)}}}class ru extends rb{data(e={}){return super.data(e)}}class ib{constructor(e,n,r,i){this._firestore=e,this._userDataWriter=n,this._snapshot=i,this.metadata=new Rl(i.hasPendingWrites,i.fromCache),this.query=r}get docs(){const e=[];return this.forEach(n=>e.push(n)),e}get size(){return this._snapshot.docs.size}get empty(){return this.size===0}forEach(e,n){this._snapshot.docs.forEach(r=>{e.call(n,new ru(this._firestore,this._userDataWriter,r.key,r,new Rl(this._snapshot.mutatedKeys.has(r.key),this._snapshot.fromCache),this.query.converter))})}docChanges(e={}){const n=!!e.includeMetadataChanges;if(n&&this._snapshot.excludesMetadataChanges)throw new K(F.INVALID_ARGUMENT,"To include metadata changes with your document changes, you must also pass { includeMetadataChanges:true } to onSnapshot().");return this._cachedChanges&&this._cachedChangesIncludeMetadataChanges===n||(this._cachedChanges=function(i,s){if(i._snapshot.oldDocs.isEmpty()){let o=0;return i._snapshot.docChanges.map(l=>{const u=new ru(i._firestore,i._userDataWriter,l.doc.key,l.doc,new Rl(i._snapshot.mutatedKeys.has(l.doc.key),i._snapshot.fromCache),i.query.converter);return l.doc,{type:"added",doc:u,oldIndex:-1,newIndex:o++}})}{let o=i._snapshot.oldDocs;return i._snapshot.docChanges.filter(l=>s||l.type!==3).map(l=>{const u=new ru(i._firestore,i._userDataWriter,l.doc.key,l.doc,new Rl(i._snapshot.mutatedKeys.has(l.doc.key),i._snapshot.fromCache),i.query.converter);let c=-1,f=-1;return l.type!==0&&(c=o.indexOf(l.doc.key),o=o.delete(l.doc.key)),l.type!==1&&(o=o.add(l.doc),f=o.indexOf(l.doc.key)),{type:sb(l.type),doc:u,oldIndex:c,newIndex:f}})}}(this,n),this._cachedChangesIncludeMetadataChanges=n),this._cachedChanges}}function sb(t){switch(t){case 0:return"added";case 2:case 3:return"modified";case 1:return"removed";default:return J(61501,{type:t})}}class ob extends tb{constructor(e){super(),this.firestore=e}convertBytes(e){return new Ds(e)}convertReference(e){const n=this.convertDocumentKey(e,this.firestore._databaseId);return new sn(this.firestore,null,n)}}function Z0(t){t=Qu(t,Wr);const e=Qu(t.firestore,Em),n=MS(e),r=new ob(e);return eb(t._query),F4(n,t._query).then(i=>new ib(e,r,t,i))}function ab(t,e){const n=Qu(t.firestore,Em),r=U4(t),i=nb(t.converter,e);return lb(n,[q4(OS(t.firestore),"addDoc",r._key,i,t.converter!==null,{}).toMutation(r._key,Wn.exists(!1))]).then(()=>r)}function lb(t,e){return function(r,i){const s=new kr;return r.asyncQueue.enqueueAndForget(async()=>A4(await L4(r),i,s)),s.promise}(MS(t),e)}function ub(){return new Cm("serverTimestamp")}(function(e,n=!0){(function(i){zs=i})(Pk),Fu(new da("firestore",(r,{instanceIdentifier:i,options:s})=>{const o=r.getProvider("app").getImmediate(),l=new Em(new Hk(r.getProvider("auth-internal")),new Gk(o,r.getProvider("app-check-internal")),function(c,f){if(!Object.prototype.hasOwnProperty.apply(c.options,["projectId"]))throw new K(F.INVALID_ARGUMENT,'"projectId" not provided in firebase.initializeApp.');return new ya(c.options.projectId,f)}(o,i),o);return s=Object.assign({useFetchStreams:n},s),l._setSettings(s),l},"PUBLIC").setMultipleInstances(!0)),cs(Yv,Xv,e),cs(Yv,Xv,"esm2017")})();const cb={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1,VITE_FIREBASE_API_KEY:"AIzaSyA35u4GUIaoWETnFeZzEd2uImhh_ybq6Bg",VITE_FIREBASE_APP_ID:"1:116922316723:web:94040267d73894fc9b3dc6",VITE_FIREBASE_AUTH_DOMAIN:"kangyu-website.firebaseapp.com",VITE_FIREBASE_MESSAGING_SENDER_ID:"116922316723",VITE_FIREBASE_PROJECT_ID:"kangyu-website",VITE_FIREBASE_STORAGE_BUCKET:"kangyu-website.firebasestorage.app"},iu={apiKey:"AIzaSyA35u4GUIaoWETnFeZzEd2uImhh_ybq6Bg",authDomain:"kangyu-website.firebaseapp.com",projectId:"kangyu-website",storageBucket:"kangyu-website.firebasestorage.app",messagingSenderId:"116922316723",appId:"1:116922316723:web:94040267d73894fc9b3dc6",measurementId:"G-XFYD9QX8LN"},hb=["VITE_FIREBASE_API_KEY","VITE_FIREBASE_AUTH_DOMAIN","VITE_FIREBASE_PROJECT_ID"],J0=hb.filter(t=>!cb[t]);let e_,fs;if(J0.length>
22950)console.error("❌ 缺少必要的Firebase环境变量:",J0),console.error("请检查GitHub Secrets或本地.env文件"),fs=null;else try{e_=hT(iu),fs=$4(e_),console.log("🔥 Firebase通过环境变量初始化成功")}catch(t){console.error("❌ Firebase初始化失败:",t),fs=null}console.log("🔥 ChatService Firebase配置状态:",{projectId:iu.projectId||"❌未设置",authDomain:iu.authDomain||"❌未设置",apiKey:iu.apiKey?"✅已设置":"❌未设置",dbInitialized:!!fs,hasEnvVars:{apiKey:!0,authDomain:!0,projectId:!0,storageBucket:!0,messagingSenderId:!0,appId:!0}});class fb{constructor(){this.db=null,this.isInitialized=!1,this.isOnline=!0,this.offlineMessages=[],this.initialize()}async initialize(){if(console.log("🔥 ChatService初始化开始..."),fs?(this.db=fs,console.log("✅ 使用环境变量初始化的Firebase")):(console.log("🏭 生产环境:只使用环境变量配置"),this.db=null),!this.db){console.error("❌ Firebase数据库未初始化,切换到离线模式"),console.error("请检查:"),console.error("1. GitHub Secrets是否正确设置"),console.error("2. 环境变量是否正确传递"),this.isOnline=!1,this.isInitialized=!0;return}try{await this.testConnection(),this.isInitialized=!0,this.isOnline=!0,console.log("✅ ChatService初始化成功")}catch(e){console.error("❌ ChatService初始化失败:",e),this.isOnline=!1,this.isInitialized=!0,console.log("📱 切换到离线模式")}}async testConnection(){console.log("🔍 测试Firebase连接...");try{const e=G0(Yh(this.db,"chat_messages"),q0("timestamp","desc"),Q0(1)),n=await Z0(e);return console.log("✅ Firebase连接测试成功"),!0}catch(e){throw console.error("❌ Firebase连接测试失败:",e),e.code==="permission-denied"?console.error("🔒 权限被拒绝 - 检查Firestore安全规则"):e.code==="unauthenticated"?console.error("🔑 未认证 - 检查API密钥配置"):e.code==="unavailable"?console.error("🌐 服务不可用 - 检查网络连接"):console.error("❓ 未知错误:",e.message),e}}async sendMessage(e){if(console.log("📤 发送消息:",e),this.isInitialized||(console.log("⏳ 等待初始化完成..."),await this.waitForInitialization()),!this.isOnline||!this.db)return console.log("📱 离线模式 - 保存到本地"),this.offlineMessages.push(e),{success:!0,offline:!0};try{const n={...e,timestamp:ub(),createdAt:new Date().toISOString()};console.log("💾 写入Firestore:",n);const r=await ab(Yh(this.db,"chat_messages"),n);return console.log("✅ 消息发送成功, ID:",r.id),{success:!0,id:r.id}}catch(n){if(console.error("❌ 发送消息失败:",n),n.code==="unavailable"||n.message.includes("fetch"))return console.log("🔄 切换到离线模式"),this.isOnline=!1,this.offlineMessages.push(e),{success:!0,offline:!0};throw n}}async getMessages(e=50){if(console.log("📖 获取消息列表..."),this.isInitialized||await this.waitForInitialization(),!this.isOnline||!this.db)return console.log("📱 离线模式 - 返回本地消息"),this.offlineMessages;try{const n=G0(Yh(this.db,"chat_messages"),q0("timestamp","desc"),Q0(e)),r=await Z0(n),i=[];return r.forEach(s=>{i.push({id:s.id,...s.data()})}),console.log(`✅ 获取到${i.length}条消息`),i.reverse()}catch(n){if(console.error("❌ 获取消息失败:",n),n.code==="unavailable")return this.isOnline=!1,this.offlineMessages;throw n}}async waitForInitialization(e=5e3){const n=Date.now();for(;!this.isInitialized&&Date.now()-n<e;)await new Promise(r=>setTimeout(r,100));if(!this.isInitialized)throw new Error("ChatService初始化超时")}cleanup(){console.log("🧹 清理ChatService资源...")}getStatus(){return{initialized:this.isInitialized,online:this.isOnline,offlineMessages:this.offlineMessages.length}}}const Xh=new fb,db=A2`
2296  0% {
2297    opacity: 0;
2298    transform: scale(0.95);
2299    filter: blur(5px);
2300  }
2301  100% {
2302    opacity: 1;
2303    transform: scale(1);
2304    filter: blur(0px);
2305  }
2306`,pb=Y.div`
2307  position: fixed;
2308  top: 0;
2309  left: 0;
2310  width: 100vw;
2311  height: 100vh;
2312  margin: 0;
2313  padding: 0;
2314  border: none;
2315  outline: none;
2316  display: flex;
2317  flex-direction: column;
2318  align-items: center;
2319  justify-content: center;
2320  color: white;
2321  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
2322  z-index: 1000;
2323  overflow: hidden;
2324  animation: ${db} 0.8s ease-out;
2325  
2326  /* 背景图片层 - 使用绝对定位确保完全覆盖 */
2327  &::before {
2328    content: '';
2329    position: fixed;
2330    top: 0;
2331    left: 0;
2332    width: 100vw;
2333    height: 100vh;
2334    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
2335    background-size: cover;
2336    background-position: center center;
2337    background-repeat: no-repeat;
2338    z-index: -2;
2339    transform: scale(1.1);
2340    transform-origin: center center;
2341  }
2342  
2343  /* 动态背景图片层 */
2344  &::after {
2345    content: '';
2346    position: fixed;
2347    top: 0;
2348    left: 0;
2349    width: 100vw;
2350    height: 100vh;
2351    background-image: inherit;
2352    background-size: cover;
2353    background-position: center center;
2354    background-repeat: no-repeat;
2355    z-index: -1;
2356    transform: scale(1.1);
2357    transform-origin: center center;
2358    transition: background-image 2s ease-in-out;
2359  }
2360`,mb=Y.div`
2361  position: absolute;
2362  top: 0;
2363  left: 0;
2364  width: 100%;
2365  height: 100%;
2366  background: rgba(0, 0, 0, 0.3);
2367  z-index: 1;
2368`,gb=Y.div`
2369  position: relative;
2370  z-index: 2;
2371  display: grid;
2372  grid-template-columns: 1fr 1fr;
2373  gap: 40px;
2374  width: 90%;
2375  max-width: 1200px;
2376  height: 80%;
2377`,yb=Y.div`
2378  display: flex;
2379  flex-direction: column;
2380  justify-content: center;
2381  align-items: flex-start;
2382`,vb=Y.div`
2383  display: flex;
2384  flex-direction: column;
2385  align-items: center;
2386  margin-left: 60px;
2387`,_b=Y.div`
2388  display: flex;
2389  align-items: center;
2390  margin-bottom: 40px;
2391  
2392  .dynamic-clock {
2393    width: 60px;
2394    height: 60px;
2395    border: 3px solid white;
2396    border-radius: 50%;
2397    margin-right: 15px;
2398    position: relative;
2399    background: rgba(255, 255, 255, 0.1);
2400    
2401    /* 12点刻度 */
2402    .hour-mark {
2403      position: absolute;
2404      width: 1.5px;
2405      height: 6px;
2406      background: rgba(255, 255, 255, 0.8);
2407      top: 3px;
2408      left: 50%;
2409      transform-origin: 50% 27px;
2410      transform: translateX(-50%);
2411      border-radius: 1px;
2412      
2413      &:nth-child(1) { transform: translateX(-50%) rotate(0deg); }
2414      &:nth-child(2) { transform: translateX(-50%) rotate(30deg); }
2415      &:nth-child(3) { transform: translateX(-50%) rotate(60deg); }
2416      &:nth-child(4) { transform: translateX(-50%) rotate(90deg); }
2417      &:nth-child(5) { transform: translateX(-50%) rotate(120deg); }
2418      &:nth-child(6) { transform: translateX(-50%) rotate(150deg); }
2419      &:nth-child(7) { transform: translateX(-50%) rotate(180deg); }
2420      &:nth-child(8) { transform: translateX(-50%) rotate(210deg); }
2421      &:nth-child(9) { transform: translateX(-50%) rotate(240deg); }
2422      &:nth-child(10) { transform: translateX(-50%) rotate(270deg); }
2423      &:nth-child(11) { transform: translateX(-50%) rotate(300deg); }
2424      &:nth-child(12) { transform: translateX(-50%) rotate(330deg); }
2425      
2426      /* 主要时间点(12, 3, 6, 9点)更粗更长 */
2427      &:nth-child(1), &:nth-child(4), &:nth-child(7), &:nth-child(10) {
2428        width: 2.5px;
2429        height: 10px;
2430        background: white;
2431        top: 2px;
2432      }
2433    }
2434    
2435    /* 中心点 */
2436    &::after {
2437      content: '';
2438      position: absolute;
2439      top: 50%;
2440      left: 50%;
2441      width: 4px;
2442      height: 4px;
2443      background: white;
2444      border-radius: 50%;
2445      transform: translate(-50%, -50%);
2446      z-index: 3;
2447    }
2448    
2449    .hour-hand {
2450      position: absolute;
2451      top: 50%;
2452      left: 50%;
2453      width: 2px;
2454      height: 16px;
2455      background: white;
2456      transform-origin: bottom center;
2457      transform: translate(-50%, -100%);
2458      border-radius: 1px;
2459      z-index: 2;
2460    }
2461    
2462    .minute-hand {
2463      position: absolute;
2464      top: 50%;
2465      left: 50%;
2466      width: 2px;
2467      height: 22px;
2468      background: white;
2469      transform-origin: bottom center;
2470      transform: translate(-50%, -100%);
2471      border-radius: 0.5px;
2472      z-index: 2;
2473    }
2474    
2475    .second-hand {
2476      position: absolute;
2477      top: 50%;
2478      left: 50%;
2479      width: 0.5px;
2480      height: 24px;
2481      background: #ff4444;
2482      transform-origin: bottom center;
2483      transform: translate(-50%, -100%);
2484      border-radius: 0.25px;
2485      z-index: 3;
2486      transition: transform 0.1s ease-out;
2487    }
2488  }
2489  
2490  .logo-text {
2491    font-size: 2.5rem;
2492    font-weight: 300;
2493    font-style: italic;
2494  }
2495`,wb=Y.div`
2496  background: rgba(0, 0, 0, 0.4);
2497  padding: 30px;
2498  border-radius: 10px;
2499  margin-bottom: 30px;
2500  width: 500px;
2501  
2502  .quote-text {
2503    font-size: 1.1rem;
2504    line-height: 1.6;
2505    margin-bottom: 10px;
2506  }
2507  
2508  .quote-author {
2509    font-size: 0.9rem;
2510    opacity: 0.8;
2511    text-align: right;
2512  }
2513`,Eb=Y.div`
2514  background: rgba(0, 0, 0, 0.4);
2515  padding: 30px;
2516  border-radius: 15px;
2517  text-align: center;
2518  margin-bottom: 30px;
2519  width: 400px;
2520  cursor: pointer;
2521  transition: all 0.3s ease;
2522  
2523  &:hover {
2524    background: rgba(0, 0, 0, 0.5);
2525    transform: translateY(-2px);
2526  }
2527  
2528  .date {
2529    font-size: 1rem;
2530    opacity: 0.8;
2531    margin-bottom: 10px;
2532  }
2533  
2534  .time {
2535    font-size: 3rem;
2536    font-weight: 300;
2537    margin-bottom: 15px;
2538    font-family: 'Courier New', monospace;
2539  }
2540  
2541  .weather {
2542    font-size: 1.1rem;
2543    opacity: 0.9;
2544  }
2545`,Tb=Y.div`
2546  display: grid;
2547  grid-template-columns: 1fr 1fr;
2548  gap: 15px;
2549  width: 350px;
2550`,Mi=Y.div`
2551  background: rgba(0, 0, 0, 0.4);
2552  padding: 20px;
2553  border-radius: 10px;
2554  text-align: center;
2555  cursor: pointer;
2556  transition: all 0.3s ease;
2557  
2558  &:hover {
2559    background: rgba(0, 0, 0, 0.5);
2560    transform: translateY(-2px);
2561  }
2562  
2563  .icon {
2564    font-size: 1.5rem;
2565    margin-bottom: 8px;
2566  }
2567  
2568  .label {
2569    font-size: 0.9rem;
2570  }
2571`,Sb=Y.button`
2572  position: absolute;
2573  top: 20px;
2574  left: 20px;
2575  background: rgba(0, 0, 0, 0.4);
2576  border: none;
2577  color: white;
2578  padding: 8px 16px;
2579  border-radius: 20px;
2580  cursor: pointer;
2581  font-size: 0.9rem;
2582  z-index: 3;
2583  transition: all 0.3s ease;
2584  display: flex;
2585  align-items: center;
2586  gap: 6px;
2587  
2588  &:hover {
2589    background: rgba(0, 0, 0, 0.6);
2590    transform: translateX(-2px);
2591  }
2592`,Ab=Y.div`
2593  position: absolute;
2594  top: 20px;
2595  right: 20px;
2596  background: rgba(0, 0, 0, 0.4);
2597  padding: 10px 15px;
2598  border-radius: 20px;
2599  font-size: 0.9rem;
2600  z-index: 3;
2601  
2602  .status-dot {
2603    display: inline-block;
2604    width: 8px;
2605    height: 8px;
2606    background: #4CAF50;
2607    border-radius: 50%;
2608    margin-right: 8px;
2609  }
2610`,Ib=Y.div`
2611  position: absolute;
2612  bottom: 20px;
2613  left: 50%;
2614  transform: translateX(-50%);
2615  font-size: 0.8rem;
2616  opacity: 0.7;
2617  z-index: 3;
2618`,xb=Y.div`
2619  background: rgba(0, 0, 0, 0.4);
2620  backdrop-filter: blur(10px);
2621  border-radius: 15px;
2622  padding: 12px 16px;
2623  margin-top: 0px;
2624  width: 525px;
2625  
2626  .music-footer {
2627    display: flex;
2628    align-items: center;
2629    justify-content: space-between;
2630    margin-top: 4px;
2631    
2632    .nav-btn {
2633      width: 26px;
2634      height: 26px;
2635      background: rgba(255, 255, 255, 0.2);
2636      border: none;
2637      color: white;
2638      border-radius: 50%;
2639      cursor: pointer;
2640      display: flex;
2641      align-items: center;
2642      justify-content: center;
2643      transition: all 0.3s ease;
2644      font-size: 0.7rem;
2645      flex-shrink: 0;
2646      
2647      &:hover {
2648        background: rgba(255, 255, 255, 0.3);
2649        transform: scale(1.1);
2650      }
2651    }
2652    
2653    .music-info {
2654      display: flex;
2655      align-items: center;
2656      gap: 8px;
2657      justify-content: center;
2658      min-width: 0;
2659      flex: 1;
2660      
2661      .song-title {
2662        font-size: 0.9rem;
2663        font-weight: 500;
2664        color: white;
2665        white-space: nowrap;
2666        overflow: hidden;
2667        text-overflow: ellipsis;
2668        max-width: 140px;
2669      }
2670      
2671      .separator {
2672        color: rgba(255, 255, 255, 0.5);
2673        font-size: 0.8rem;
2674        flex-shrink: 0;
2675      }
2676      
2677      .song-artist {
2678        font-size: 0.8rem;
2679        color: rgba(255, 255, 255, 0.7);
2680        white-space: nowrap;
2681        overflow: hidden;
2682        text-overflow: ellipsis;
2683        max-width: 80px;
2684      }
2685      
2686      .time-separator {
2687        color: rgba(255, 255, 255, 0.4);
2688        font-size: 0.7rem;
2689        flex-shrink: 0;
2690        margin: 0 4px;
2691      }
2692      
2693      .time-display {
2694        font-size: 0.7rem;
2695        color: rgba(255, 255, 255, 0.6);
2696        font-family: 'Courier New', monospace;
2697        flex-shrink: 0;
2698      }
2699    }
2700  }
2701  
2702  .music-controls-row {
2703    display: flex;
2704    align-items: center;
2705    gap: 12px;
2706    margin-bottom: 8px;
2707    
2708    .play-controls {
2709      display: flex;
2710      align-items: center;
2711      gap: 6px;
2712      flex-shrink: 0;
2713      
2714      .control-btn {
2715        background: rgba(255, 255, 255, 0.2);
2716        border: none;
2717        color: white;
2718        width: 26px;
2719        height: 26px;
2720        border-radius: 50%;
2721        cursor: pointer;
2722        display: flex;
2723        align-items: center;
2724        justify-content: center;
2725        transition: all 0.3s ease;
2726        font-size: 0.75rem;
2727        
2728        &:hover {
2729          background: rgba(255, 255, 255, 0.3);
2730          transform: scale(1.1);
2731        }
2732        
2733        &.play-btn {
2734          background: linear-gradient(135deg, #667eea, #764ba2);
2735          
2736          &:hover {
2737            background: linear-gradient(135deg, #5a6fd8, #6a4190);
2738          }
2739        }
2740      }
2741    }
2742    
2743    .progress-wrapper {
2744      flex: 1;
2745      min-width: 0;
2746    }
2747  }
2748  
2749  .progress-container {
2750    .progress-bar {
2751      width: 100%;
2752      height: 4px;
2753      background: rgba(255, 255, 255, 0.2);
2754      border-radius: 2px;
2755      cursor: pointer;
2756      position: relative;
2757      transition: all 0.3s ease;
2758      
2759      &:hover {
2760        height: 6px;
2761        background: rgba(255, 255, 255, 0.3);
2762      }
2763      
2764      .progress-fill {
2765        height: 100%;
2766        background: linear-gradient(90deg, #667eea, #764ba2);
2767        border-radius: 2px;
2768        transition: width 0.1s ease;
2769        position: relative;
2770        
2771        &::after {
2772          content: '';
2773          position: absolute;
2774          right: -1px;
2775          top: 50%;
2776          width: 8px;
2777          height: 8px;
2778          background: white;
2779          border-radius: 50%;
2780          transform: translateY(-50%);
2781          opacity: 0;
2782          transition: opacity 0.3s ease;
2783          box-shadow: 0 1px 3px rgba(0,0,0,0.2);
2784        }
2785      }
2786      
2787      &:hover .progress-fill::after {
2788        opacity: 1;
2789      }
2790    }
2791  }
2792`,Cb=Y.div`
2793  background: rgba(0, 0, 0, 0.4);
2794  backdrop-filter: blur(10px);
2795  border-radius: 15px;
2796  padding: 16px;
2797  margin-top: 20px;
2798  width: 525px;
2799  
2800  .message-input-container {
2801    display: flex;
2802    gap: 8px;
2803    align-items: center;
2804    
2805    .message-input {
2806      flex: 1;
2807      background: rgba(255, 255, 255, 0.1);
2808      border: 1px solid rgba(255, 255, 255, 0.2);
2809      border-radius: 20px;
2810      padding: 8px 16px;
2811      color: white;
2812      font-size: 0.9rem;
2813      outline: none;
2814      transition: all 0.3s ease;
2815      
2816      &::placeholder {
2817        color: rgba(255, 255, 255, 0.5);
2818      }
2819      
2820      &:focus {
2821        background: rgba(255, 255, 255, 0.15);
2822        border-color: rgba(255, 255, 255, 0.4);
2823      }
2824    }
2825    
2826    .send-btn {
2827      background: linear-gradient(135deg, #667eea, #764ba2);
2828      border: none;
2829      color: white;
2830      width: 36px;
2831      height: 36px;
2832      border-radius: 50%;
2833      cursor: pointer;
2834      display: flex;
2835      align-items: center;
2836      justify-content: center;
2837      transition: all 0.3s ease;
2838      font-size: 0.9rem;
2839      
2840      &:hover {
2841        background: linear-gradient(135deg, #5a6fd8, #6a4190);
2842        transform: scale(1.1);
2843      }
2844      
2845      &:disabled {
2846        opacity: 0.5;
2847        cursor: not-allowed;
2848        transform: none;
2849      }
2850    }
2851  }
2852  
2853  .message-stats {
2854    margin-top: 8px;
2855    font-size: 0.75rem;
2856    color: rgba(255, 255, 255, 0.6);
2857    text-align: center;
2858  }
2859`,Pb=Y.div`
2860  position: fixed;
2861  top: 0;
2862  left: 0;
2863  width: 100vw;
2864  height: 100vh;
2865  pointer-events: none;
2866  z-index: 1000;
2867  overflow: hidden;
2868`,Rb=Y.div`
2869  position: absolute;
2870  color: rgba(255, 255, 255, 0.8);
2871  font-size: 0.9rem;
2872  font-weight: 400;
2873  white-space: nowrap;
2874  animation: danmaku-move 30s linear infinite;
2875  background: ${t=>t.color||"rgba(0, 0, 0, 0.4)"};
2876  padding: 8px 16px;
2877  border-radius: 18px;
2878  backdrop-filter: blur(8px);
2879  border: 1px solid rgba(255, 255, 255, 0.05);
2880  top: ${t=>t.top}%;
2881  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
2882  display: flex;
2883  align-items: center;
2884  gap: 6px;
2885  opacity: 0.7;
2886  
2887  @keyframes danmaku-move {
2888    from {
2889      transform: translateX(100vw);
2890    }
2891    to {
2892      transform: translateX(-100%);
2893    }
2894  }
2895`,kl=["/Life/Background/1.png","/Life/Background/2.png","/Life/Background/3.png","/Life/Background/4.png","/Life/Background/5.png","/Life/Background/6.png","/Life/Background/7.png","/Life/Background/8.png","/Life/Background/9.png","/Life/Background/10.png","/Life/Background/11.png"],lr=[{title:"Pachelbel's Canon",artist:"Classical",file:"pachelbelx27s-canon-canon-in-d-307320.mp3"},{title:"Pure Theta Piano",artist:"Meditation",file:"pure-theta-4-7hz-with-emotional-piano-music-351393.mp3"},{title:"Relaxing Birds & Piano",artist:"Nature Sounds",file:"relaxing-birds-and-piano-music-137153.mp3"},{title:"Celestial Prayer",artist:"Meditation",file:"celestial-prayer-heavenly-meditation-peaceful-music-353893.mp3"},{title:"Forest Melody",artist:"Nature Sounds",file:"forest-melody-background-music-for-meditation-and-yoga-314446.mp3"},{title:"Path to Harmony",artist:"Peaceful",file:"path-to-harmony-313385.mp3"},{title:"Inner Peace",artist:"Meditation",file:"inner-peace-339640.mp3"}];function kb({onClose:t}){const[e,n]=j.useState(new Date),[r,i]=j.useState(0),[s,o]=j.useState({temperature:"--",condition:"Loading",windDirection:"--",windSpeed:"--",loading:!0,location:"Hong Kong"}),l=j.useRef(null),[u,c]=j.useState(!1),[f,d]=j.useState(0),[p,y]=j.useState(0),[S,x]=j.useState(0),[R,w]=j.useState(""),[v,T]=j.useState([]),[k,b]=j.useState([]),[M,E]=j.useState(0),[g,A]=j.useState([]),[I,P]=j.useState([]),V=async()=>{try{console.log("🌤️ 尝试获取真实天气数据...");const z=await fetch("https://wttr.in/Hong%20Kong?format=j1",{method:"GET",headers:{Accept:"application/json"}});if(z.ok){const q=await z.json();console.log("✅ 真实天气数据:",q);const ee=q.current_condition[0];return{temperature:ee.temp_C,condition:He(ee.weatherDesc[0].value),windDirection:ee.winddir16Point,windSpeed:ee.windspeedKmph,loading:!1,location:"Hong Kong",description:ee.weatherDesc[0].value+" (真实数据)",humidity:ee.humidity,pressure:ee.pressure,realTime:!0}}throw new Error("API响应失败")}catch(z){return console.log("❌ 真实天气API不可用:",z.message),null}},C=async()=>{try{o(qs=>({...qs,loading:!0})),console.log("🌤️ 正在获取天气数据...");const z=await V();if(z){o(z);return}console.log("🔄 使用智能估算天气数据...");const q=new Date,ee=q.getHours(),ne=q.getMonth()+1;let me,tt;ne>=12||ne<=2?(me=18+Math.sin((ee-6)*Math.PI/12)*4,tt=["Clear","Partly Cloudy"]):ne>=3&&ne<=5?(me=24+Math.sin((ee-6)*Math.PI/12)*5,tt=["Partly Cloudy","Cloudy"]):ne>=6&&ne<=8?(me=30+Math.sin((ee-6)*Math.PI/12)*4,tt=["Sunny","Partly Cloudy"]):(me=26+Math.sin((ee-6)*Math.PI/12)*4,tt=["Clear","Sunny"]);const rr={temperature:Math.round(me).toString(),condition:tt[Math.floor(Math.random()*tt.length)],windDirection:["SE","E","NE"][Math.floor(Math.random()*3)],windSpeed:(8+Math.floor(Math.random()*8)).toString(),loading:!1,location:"Hong Kong",description:"基于气候数据的智能估算",realTime:!1};o(rr),console.log("✅ 智能估算天气数据:",rr)}catch(z){console.error("❌ 获取天气数据失败:",z),o({temperature:"25",condition:"Partly Cloudy",windDirection:"SE",windSpeed:"10",loading:!1,location:"Hong Kong",description:"默认天气数据",realTime:!1})}},He=z=>{const q=z.toLowerCase();return q.includes("sunny")||q.includes("clear")?"Sunny":q.includes("partly cloudy")||q.includes("few clouds")?"Partly Cloudy":q.includes("cloud")||q.includes("overcast")?"Cloudy":q.includes("rain")||q.includes("shower")||q.includes("drizzle")?"Rain":q.includes("snow")||q.includes("blizzard")?"Snow":q.includes("fog")||q.includes("mist")||q.includes("haze")?"Fog":"Partly Cloudy"},Ft=async()=>{const z=R.trim();if(console.log("🚀 开始发送消息:",z),!z){console.log("❌ 消息为空,取消发送");return}w(""),G(z);try{console.log("📤 尝试发送到Firebase数据库...");const q={text:z,anonymous:!0,anonymousName:un()},ee=await Xh.sendMessage(q);console.log("✅ 消息发送结果:",ee);const ne=await Xh.getMessages();A(ne),E(ne.length),console.log("✅ 消息计数已更新:",ne.length)}catch(q){console.error("❌ 发送消息失败,使用离线模式:",q),E(ne=>{const me=ne+1;return console.log("📊 离线模式消息计数更新:",me),me});const ee={id:"local_"+Date.now(),text:z,anonymousName:un(),offline:!0};P(ne=>{const me=[...ne,ee].slice(-20);return console.log("📝 本地弹幕池已更新,当前数量:",me.length),me}),console.log("✅ 消息已保存到本地模式")}},un=()=>{const z=["Mysterious","Happy","Wise","Brave","Gentle","Lively","Quiet","Friendly"],q=["Traveler","Explorer","Dreamer","Thinker","Creator","Observer","Learner","Adventurer"],ee=z[Math.floor(Math.random()*z.length)],ne=q[Math.floor(Math.random()*q.length)],me=Math.floor(Math.random()*999)+1;return`${ee} ${ne} ${me}`},de=()=>{const z=["rgba(102, 126, 234, 0.9)","rgba(118, 75, 162, 0.9)","rgba(255, 107, 107, 0.9)","rgba(78, 205, 196, 0.9)","rgba(255, 195, 113, 0.9)","rgba(199, 121, 208, 0.9)"];return z[Math.floor(Math.random()*z.length)]},U=()=>{const z=["✨","🌟","💫","⭐","🎈","🎉","🎊","💝","🌸","🌺","🌻","🌷","🦋","🐝","🌈","☀️","🌙","⚡","💎","🔮"],q=["💕","💖","💗","💘","💙","💚","💛","🧡","💜","🤍","🖤","❤️","💯","✅","🎯","🏆","🎪","🎭","🎨","🎵"],ee=Math.random()<.7?z[Math.floor(Math.random()*z.length)]:"",ne=Math.random()<.7?q[Math.floor(Math.random()*q.length)]:"";return{prefixIcon:ee,suffixIcon:ne}},G=z=>{const{prefixIcon:q,suffixIcon:ee}=U(),ne=`${q} ${z} ${ee}`.trim(),me={id:Date.now()+Math.random(),text:ne,top:Math.random()*60+10,color:de()};b(tt=>[...tt,me]),setTimeout(()=>{b(tt=>tt.filter(rr=>rr.id!==me.id))},3e4)},X=z=>{z.key==="Enter"&&Ft()};j.useEffect(()=>{console.log("✅ Life组件已成功挂载");const z=setInterval(()=>{n(new Date)},1e3);C();const q=setInterval(C,10*60*1e3);return(async()=>{try{const ne=await Xh.getMessages();A(ne),E(ne.length);const me=ne.filter(tt=>(tt.text||tt.message||"").trim()).slice(0,20);P(me),console.log("✅ Firebase消息加载成功:",ne.length,"条消息,弹幕池:",me.length,"条")}catch(ne){console.error("❌ Firebase消息加载失败:",ne)}})(),()=>{console.log("Life组件卸载"),clearInterval(z),clearInterval(q)}},[]),j.useEffect(()=>{if(I.length===0)return;const q=setInterval(()=>{if(k.length<20&&I.length>0)for(let ee=0;ee<1;ee++){const ne=I[Math.floor(Math.random()*I.length)],me=ne.text||ne.message||"";me.trim()&&G(me)}},1e3);return()=>clearInterval(q)},[I,k]),j.useEffect(()=>{const z=Math.floor(Math.random()*kl.length);i(z);const q=setInterval(()=>{i(ee=>{let ne;do ne=Math.floor(Math.random()*kl.length);while(ne===ee&&kl.length>1);return ne})},6e4);return()=>clearInterval(q)},[]),j.useEffect(()=>{const z=l.current;if(!z)return;const q=()=>x(z.currentTime),ee=()=>y(z.duration),ne=()=>{const me=Math.floor(Math.random()*lr.length);d(me)};return z.addEventListener("timeupdate",q),z.addEventListener("loadedmetadata",ee),z.addEventListener("ended",ne),()=>{z.removeEventListener("timeupdate",q),z.removeEventListener("loadedmetadata",ee),z.removeEventListener("ended",ne)}},[f]),j.useEffect(()=>{const z=l.current;z&&u&&(z.load(),z.play().then(()=>{c(!0)}).catch(q=>{console.log("切换歌曲播放失败:",q),c(!1)}))},[f]),j.useEffect(()=>{const z=l.current;if(z){const q=Math.floor(Math.random()*lr.length);d(q),setTimeout(()=>{z.play().then(()=>{c(!0)}).catch(ee=>{console.log("自动播放被浏览器阻止:",ee)})},500)}},[]);const pe=()=>{const z=l.current;u?(z.pause(),c(!1)):(z.play(),c(!0))},oe=()=>{const z=Math.floor(Math.random()*lr.length);d(z)},we=()=>{const z=(f+1)%lr.length;d(z)},St=()=>{const z=f===0?lr.length-1:f-1;d(z)},ct=()=>{oe()},Je=z=>{const q=l.current,ee=z.currentTarget.getBoundingClientRect(),me=(z.clientX-ee.left)/ee.width*p;q.currentTime=me},et=z=>{if(isNaN(z))return"0:00";const q=Math.floor(z/60),ee=Math.floor(z%60);return`${q}:${ee.toString().padStart(2,"0")}`},Ln=z=>{try{return z.toLocaleTimeString("en-US",{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit"})}catch(q){return console.error("时间格式化错误:",q),"00:00:00"}},cn=()=>{const z={year:"numeric",month:"long",day:"numeric",weekday:"long"};return e.toLocaleDateString("en-US",z)},Sn=z=>({Sunny:"☀️",Clear:"🌙","Partly Cloudy":"⛅",Cloudy:"☁️",Rain:"🌧️",Snow:"❄️",Fog:"🌫️"})[z]||"🌤️",jt=z=>{const q=z.getHours()%12,ee=z.getMinutes(),ne=z.getSeconds(),me=ne*6,tt=ee*6+ne*.
28951;return{hourAngle:q*30+ee*.5,minuteAngle:tt,secondAngle:me}},kt=()=>{console.log("返回按钮被点击"),t&&typeof t=="function"&&t()};return N.jsxs(pb,{style:{backgroundImage:`url(${kl[r]})`},children:[N.jsx(mb,{}),N.jsx(Sb,{onClick:kt,children:"← Leave"}),N.jsxs(Ab,{children:[N.jsx("span",{className:"status-dot"}),"Status: Live"]}),N.jsxs(gb,{children:[N.jsxs(yb,{children:[N.jsxs(_b,{children:[N.jsxs("div",{className:"dynamic-clock",children:[Array.from({length:12},(z,q)=>N.jsx("div",{className:"hour-mark"},q)),N.jsx("div",{className:"hour-hand",style:{transform:`translate(-50%, -100%) rotate(${jt(e).hourAngle}deg)`}}),N.jsx("div",{className:"minute-hand",style:{transform:`translate(-50%, -100%) rotate(${jt(e).minuteAngle}deg)`}}),N.jsx("div",{className:"second-hand",style:{transform:`translate(-50%, -100%) rotate(${jt(e).secondAngle}deg)`}})]}),N.jsx("div",{className:"logo-text",children:"Kangyu.Space"})]}),N.jsxs(wb,{children:[N.jsx("div",{className:"quote-text",children:'"To see the world, things dangerous to come to, to see behind walls, to draw closer, to find each other, and to feel. That is the purpose of life."'}),N.jsx("div",{className:"quote-author",children:"- The Secret Life of Walter Mitty"})]}),N.jsxs(xb,{children:[N.jsx("audio",{ref:l,src:`/Life/Musics/${lr[f].file}`,preload:"metadata"}),N.jsxs("div",{className:"music-controls-row",children:[N.jsxs("div",{className:"play-controls",children:[N.jsx("button",{className:"control-btn play-btn",onClick:pe,children:u?"⏸️":"▶️"}),N.jsx("button",{className:"control-btn",onClick:ct,title:"Shuffle",children:"🔀"})]}),N.jsx("div",{className:"progress-wrapper",children:N.jsx("div",{className:"progress-container",children:N.jsx("div",{className:"progress-bar",onClick:Je,children:N.jsx("div",{className:"progress-fill",style:{width:`${p?S/p*100:0}%`}})})})})]}),N.jsxs("div",{className:"music-footer",children:[N.jsx("button",{className:"nav-btn",onClick:St,title:"Previous Song",children:"⏮️"}),N.jsxs("div",{className:"music-info",children:[N.jsx("div",{className:"song-title",children:lr[f].title}),N.jsx("div",{className:"separator",children:"-"}),N.jsx("div",{className:"song-artist",children:lr[f].artist}),N.jsx("div",{className:"time-separator",children:"•"}),N.jsxs("div",{className:"time-display",children:[et(S)," / ",et(p)]})]}),N.jsx("button",{className:"nav-btn",onClick:we,title:"Next Song",children:"⏭️"})]})]}),N.jsxs(Cb,{children:[N.jsxs("div",{className:"message-input-container",children:[N.jsx("input",{type:"text",className:"message-input",placeholder:"Leave your footprint...",value:R,onChange:z=>w(z.target.value),onKeyPress:X,maxLength:100}),N.jsx("button",{className:"send-btn",onClick:Ft,disabled:!R.trim(),title:"Send Message",children:"📤"})]}),N.jsxs("div",{className:"message-stats",children:[M," messages in database • Random danmaku stream"]})]})]}),N.jsxs(vb,{children:[N.jsxs(Eb,{title:"Weather info",children:[N.jsx("div",{className:"date",children:cn()}),N.jsx("div",{className:"time",children:Ln(e)}),N.jsx("div",{className:"weather",children:s.loading?"🔄 Loading weather data...":s.temperature==="--"?"❌ Failed to get weather data":`${Sn(s.condition)} ${s.location} ${s.condition} ${s.temperature}℃ 💨 ${s.windDirection} ${s.windSpeed}km/h`})]}),N.jsxs(Tb,{children:[N.jsxs(Mi,{children:[N.jsx("div",{className:"icon",children:"📝"}),N.jsx("div",{className:"label",children:"Research Notes"})]}),N.jsxs(Mi,{children:[N.jsx("div",{className:"icon",children:"💬"}),N.jsx("div",{className:"label",children:"Message Board"})]}),N.jsxs(Mi,{children:[N.jsx("div",{className:"icon",children:"🎵"}),N.jsx("div",{className:"label",children:"Music"})]}),N.jsxs(Mi,{children:[N.jsx("div",{className:"icon",children:"📷"}),N.jsx("div",{className:"label",children:"Photo"})]}),N.jsxs(Mi,{children:[N.jsx("div",{className:"icon",children:"🏠"}),N.jsx("div",{className:"label",children:"Homepage"})]}),N.jsxs(Mi,{children:[N.jsx("div",{className:"icon",children:"📊"}),N.jsx("div",{className:"label",children:"Data Viz"})]})]})]})]}),N.jsx(Ib,{children:"Made by Kangyu YUAN & with the help of @curs
2895or"}),N.jsx(Pb,{children:k.map(z=>N.jsx(Rb,{top:z.top,color:z.color,children:z.text},z.id))})]})}const Lm=j.createContext({});function Om(t){const e=j.useRef(null);return e.current===null&&(e.current=t()),e.current}const Bc=j.createContext(null),Fm=j.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});class Vb extends j.Component{getSnapshotBeforeUpdate(e){const n=this.props.childRef.current;if(n&&e.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function Db({children:t,isPresent:e}){const n=j.useId(),r=j.useRef(null),i=j.useRef({width:0,height:0,top:0,left:0}),{nonce:s}=j.useContext(Fm);return j.useInsertionEffect(()=>{const{width:o,height:l,top:u,left:c}=i.current;if(e||!r.current||!o||!l)return;r.current.dataset.motionPopId=n;const f=document.createElement("style");return s&&(f.nonce=s),document.head.appendChild(f),f.sheet&&f.sheet.insertRule(`
2896          [data-motion-pop-id="${n}"] {
2897            position: absolute !important;
2898            width: ${o}px !important;
2899            height: ${l}px !important;
2900            top: ${u}px !important;
2901            left: ${c}px !important;
2902          }
2903        `),()=>{document.head.removeChild(f)}},[e]),N.jsx(Vb,{isPresent:e,childRef:r,sizeRef:i,children:j.cloneElement(t,{ref:r})})}const bb=({children:t,initial:e,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:s,mode:o})=>{const l=Om(Nb),u=j.useId(),c=j.useCallback(d=>{l.set(d,!0);for(const p of l.values())if(!p)return;r&&r()},[l,r]),f=j.useMemo(()=>({id:u,initial:e,isPresent:n,custom:i,onExitComplete:c,register:d=>(l.set(d,!1),()=>l.delete(d))}),s?[Math.random(),c]:[n,c]);return j.useMemo(()=>{l.forEach((d,p)=>l.set(p,!1))},[n]),j.useEffect(()=>{!n&&!l.size&&r&&r()},[n]),o==="popLayout"&&(t=N.jsx(Db,{isPresent:n,children:t})),N.jsx(Bc.Provider,{value:f,children:t})};function Nb(){return new Map}function HS(t=!0){const e=j.useContext(Bc);if(e===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:i}=e,s=j.useId();j.useEffect(()=>{t&&i(s)},[t]);const o=j.useCallback(()=>t&&r&&r(s),[s,r,t]);return!n&&r?[!1,o]:[!0]}const Vl=t=>t.key||"";function t_(t){const e=[];return j.Children.forEach(t,n=>{j.isValidElement(n)&&e.push(n)}),e}const jm=typeof window<"u",WS=jm?j.useLayoutEffect:j.useEffect,Mb=({children:t,custom:e,initial:n=!0,onExitComplete:r,presenceAffectsLayout:i=!0,mode:s="sync",propagate:o=!1})=>{const[l,u]=HS(o),c=j.useMemo(()=>t_(t),[t]),f=o&&!l?[]:c.map(Vl),d=j.useRef(!0),p=j.useRef(c),y=Om(()=>new Map),[S,x]=j.useState(c),[R,w]=j.useState(c);WS(()=>{d.current=!1,p.current=c;for(let k=0;k<R.length;k++){const b=Vl(R[k]);f.includes(b)?y.delete(b):y.get(b)!==!0&&y.set(b,!1)}},[R,f.length,f.join("-")]);const v=[];if(c!==S){let k=[...c];for(let b=0;b<R.length;b++){const M=R[b],E=Vl(M);f.includes(E)||(k.splice(b,0,M),v.push(M))}s==="wait"&&v.length&&(k=v),w(t_(k)),x(c);return}const{forceRender:T}=j.useContext(Lm);return N.jsx(N.Fragment,{children:R.map(k=>{const b=Vl(k),M=o&&!l?!1:c===R||f.includes(b),E=()=>{if(y.has(b))y.set(b,!0);else return;let g=!0;y.forEach(A=>{A||(g=!1)}),g&&(T==null||T(),w(p.current),o&&(u==null||u()),r&&r())};return N.jsx(bb,{isPresent:M,initial:!d.current||n?void 0:!1,custom:M?void 0:e,presenceAffectsLayout:i,mode:s,onExitComplete:M?void 0:E,children:k},b)})})},Kt=t=>t;let KS=Kt;function Bm(t){let e;return()=>(e===void 0&&(e=t()),e)}const bs=(t,e,n)=>{const r=e-t;return r===0?1:(n-t)/r},Kn=t=>t*1e3,Gn=t=>t/1e3,Lb={useManualTiming:!1};function Ob(t){let e=new Set,n=new Set,r=!1,i=!1;const s=new WeakSet;let o={delta:0,timestamp:0,isProcessing:!1};function l(c){s.has(c)&&(u.schedule(c),t()),c(o)}const u={schedule:(c,f=!1,d=!1)=>{const y=d&&r?e:n;return f&&s.add(c),y.has(c)||y.add(c),c},cancel:c=>{n.delete(c),s.delete(c)},process:c=>{if(o=c,r){i=!0;return}r=!0,[e,n]=[n,e],e.forEach(l),e.clear(),r=!1,i&&(i=!1,u.process(c))}};return u}const Dl=["read","resolveKeyframes","update","preRender","render","postRender"],Fb=40;function GS(t,e){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,o=Dl.reduce((w,v)=>(w[v]=Ob(s),w),{}),{read:l,resolveKeyframes:u,update:c,preRender:f,render:d,postRender:p}=o,y=()=>{const w=performance.now();n=!1,i.delta=r?1e3/60:Math.max(Math.min(w-i.timestamp,Fb),1),i.timestamp=w,i.isProcessing=!0,l.process(i),u.process(i),c.process(i),f.process(i),d.process(i),p.process(i),i.isProcessing=!1,n&&e&&(r=!1,t(y))},S=()=>{n=!0,r=!0,i.isProcessing||t(y)};return{schedule:Dl.reduce((w,v)=>{const T=o[v];return w[v]=(k,b=!1,M=!1)=>(n||S(),T.schedule(k,b,M)),w},{}),cancel:w=>{for(let v=0;v<Dl.length;v++)o[Dl[v]].cancel(w)},state:i,steps:o}}const{schedule:Ce,cancel:Br,state:it,steps:Zh}=GS(typeof requestAnimationFrame<"u"?requestAnimationFrame:Kt,!0),qS=j.createContext({strict:!1}),n_={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},Ns={};for(const t in n_)Ns[t]={isEnabled:e=>n_[t].some(n=>!!e[n])};function jb(t){for(const e in t)Ns[e]={...Ns[e],...t[e]}}const Bb=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Xu(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||Bb.has(t)}let QS=t=>!Xu(t);function zb(t){t&&(QS=e=>e.startsWith("on")?!Xu(e):t(e))}try{zb(require("@emotion/is-prop-valid").default)}catch{}function Ub(t,e,n){const r={};for(const i in t)i==="values"&&typeof t.values=="object"||(QS(i)||n===!0&&Xu(i)||!e&&!Xu(i)||t.draggable&&i.startsWith("onDrag"))&&(r[i]=t[i]);return r}function $b(t){if(typeof Proxy>"u")return t;const e=new Map,n=(...r)=>t(...r);return new Proxy(n,{get:(r,i)=>i==="create"?t:(e.has(i)||e.set(i,t(i)),e.get(i))})}const zc=j.createContext({});function Sa(t){return typeof t=="string"||Array.isArray(t)}function Uc(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}const zm=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Um=["initial",...zm];function $c(t){return Uc(t.animate)||Um.some(e=>Sa(t[e]))}function YS(t){return!!($c(t)||t.variants)}function Hb(t,e){if($c(t)){const{initial:n,animate:r}=t;return{initial:n===!1||Sa(n)?n:void 0,animate:Sa(r)?r:void 0}}return t.inherit!==!1?e:{}}function Wb(t){const{initial:e,animate:n}=Hb(t,j.useContext(zc));return j.useMemo(()=>({initial:e,animate:n}),[r_(e),r_(n)])}function r_(t){return Array.isArray(t)?t.join(" "):t}const Kb=Symbol.for("motionComponentSymbol");function Ji(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function Gb(t,e,n){return j.useCallback(r=>{r&&t.onMount&&t.onMount(r),e&&(r?e.mount(r):e.unmount()),n&&(typeof n=="function"?n(r):Ji(n)&&(n.current=r))},[e])}const $m=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),qb="framerAppearId",XS="data-"+$m(qb),{schedule:Hm}=GS(queueMicrotask,!1),ZS=j.createContext({});function Qb(t,e,n,r,i){var s,o;const{visualElement:l}=j.useContext(zc),u=j.useContext(qS),c=j.useContext(Bc),f=j.useContext(Fm).reducedMotion,d=j.useRef(null);r=r||u.renderer,!d.current&&r&&(d.current=r(t,{visualState:e,parent:l,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:f}));const p=d.current,y=j.useContext(ZS);p&&!p.projection&&i&&(p.type==="html"||p.type==="svg")&&Yb(d.current,n,i,y);const S=j.useRef(!1);j.useInsertionEffect(()=>{p&&S.current&&p.update(n,c)});const x=n[XS],R=j.useRef(!!x&&!(!((s=window.MotionHandoffIsComplete)===null||s===void 0)&&s.call(window,x))&&((o=window.MotionHasOptimisedAnimation)===null||o===void 0?void 0:o.call(window,x)));return WS(()=>{p&&(S.current=!0,window.MotionIsMounted=!0,p.updateFeatures(),Hm.render(p.render),R.current&&p.animationState&&p.animationState.animateChanges())}),j.useEffect(()=>{p&&(!R.current&&p.animationState&&p.animationState.animateChanges(),R.current&&(queueMicrotask(()=>{var w;(w=window.MotionHandoffMarkAsComplete)===null||w===void 0||w.call(window,x)}),R.current=!1))}),p}function Yb(t,e,n,r){const{layoutId:i,layout:s,drag:o,dragConstraints:l,layoutScroll:u,layoutRoot:c}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:JS(t.parent)),t.projection.setOptions({layoutId:i,layout:s,alwaysMeasureLayout:!!o||l&&Ji(l),visualElement:t,animationType:typeof s=="string"?s:"both",initialPromotionConfig:r,layoutScroll:u,layoutRoot:c})}function JS(t){if(t)return t.options.allowProjection!==!1?t.projection:JS(t.parent)}function Xb({preloadedFeatures:t,createVisualElement:e,useRender:n,useVisualState:r,Component:i}){var s,o;t&&jb(t);function l(c,f){let d;const p={...j.useContext(Fm),...c,layoutId:Zb(c)},{isStatic:y}=p,S=Wb(c),x=r(c,y);if(!y&&jm){Jb();const R=e5(p);d=R.MeasureLayout,S.visualElement=Qb(i,x,p,e,R.ProjectionNode)}return N.jsxs(zc.Provider,{value:S,children:[d&&S.visualElement?N.jsx(d,{visualElement:S.visualElement,...p}):null,n(i,c,Gb(x,S.visualElement,f),x,y,S.visualElement)]})}l.displayName=`motion.${typeof i=="string"?i:`create(${(o=(s=i.displayName)!==null&&s!==void 0?s:i.name)!==null&&o!==void 0?o:""})`}`;const u=j.forwardRef(l);return u[Kb]=i,u}function Zb({layoutId:t}){const e=j.useContext(Lm).id;return e&&t!==void 0?e+"-"+t:t}
vendor: 38,957 bytes, line 2903
2903function Jb(t,e){j.useContext(qS).strict}function e5(t){const{drag:e,layout:n}=Ns;if(!e&&!n)return{};const r={...e,...n};return{MeasureLayout:e!=null&&e.isEnabled(t)||n!=null&&n.isEnabled(t)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}const t5=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Wm(t){return typeof t!="string"||t.includes("-")?!1:!!(t5.indexOf(t)>-1||/[A-Z]/u.test(t))}function i_(t){const e=[{},{}];return t==null||t.values.forEach((n,r)=>{e[0][r]=n.get(),e[1][r]=n.getVelocity()}),e}function Km(t,e,n,r){if(typeof e=="function"){const[i,s]=i_(r);e=e(n!==void 0?n:t.custom,i,s)}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){const[i,s]=i_(r);e=e(n!==void 0?n:t.custom,i,s)}return e}const Nd=t=>Array.isArray(t),n5=t=>!!(t&&typeof t=="object"&&t.mix&&t.toValue),r5=t=>Nd(t)?t[t.length-1]||0:t,Et=t=>!!(t&&t.getVelocity);function su(t){const e=Et(t)?t.get():t;return n5(e)?e.toValue():e}function i5({scrapeMotionValuesFromProps:t,createRenderState:e,onUpdate:n},r,i,s){const o={latestValues:s5(r,i,s,t),renderState:e()};return n&&(o.onMount=l=>n({props:r,current:l,...o}),o.onUpdate=l=>n(l)),o}const eA=t=>(e,n)=>{const r=j.useContext(zc),i=j.useContext(Bc),s=()=>i5(t,e,r,i);return n?s():Om(s)};function s5(t,e,n,r){const i={},s=r(t,{});for(const p in s)i[p]=su(s[p]);let{initial:o,animate:l}=t;const u=$c(t),c=YS(t);e&&c&&!u&&t.inherit!==!1&&(o===void 0&&(o=e.initial),l===void 0&&(l=e.animate));let f=n?n.initial===!1:!1;f=f||o===!1;const d=f?l:o;if(d&&typeof d!="boolean"&&!Uc(d)){const p=Array.isArray(d)?d:[d];for(let y=0;y<p.length;y++){const S=Km(t,p[y]);if(S){const{transitionEnd:x,transition:R,...w}=S;for(const v in w){let T=w[v];if(Array.isArray(T)){const k=f?T.length-1:0;T=T[k]}T!==null&&(i[v]=T)}for(const v in x)i[v]=x[v]}}}return i}const Ks=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Pi=new Set(Ks),tA=t=>e=>typeof e=="string"&&e.startsWith(t),nA=tA("--"),o5=tA("var(--"),Gm=t=>o5(t)?a5.test(t.split("/*")[0].trim()):!1,a5=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,rA=(t,e)=>e&&typeof t=="number"?e.transform(t):t,tr=(t,e,n)=>n>e?e:n<t?t:n,Gs={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},Aa={...Gs,transform:t=>tr(0,1,t)},bl={...Gs,default:1},Fa=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),cr=Fa("deg"),bn=Fa("%"),Z=Fa("px"),l5=Fa("vh"),u5=Fa("vw"),s_={...bn,parse:t=>bn.parse(t)/100,transform:t=>bn.transform(t*100)},c5={borderWidth:Z,borderTopWidth:Z,borderRightWidth:Z,borderBottomWidth:Z,borderLeftWidth:Z,borderRadius:Z,radius:Z,borderTopLeftRadius:Z,borderTopRightRadius:Z,borderBottomRightRadius:Z,borderBottomLeftRadius:Z,width:Z,maxWidth:Z,height:Z,maxHeight:Z,top:Z,right:Z,bottom:Z,left:Z,padding:Z,paddingTop:Z,paddingRight:Z,paddingBottom:Z,paddingLeft:Z,margin:Z,marginTop:Z,marginRight:Z,marginBottom:Z,marginLeft:Z,backgroundPositionX:Z,backgroundPositionY:Z},h5={rotate:cr,rotateX:cr,rotateY:cr,rotateZ:cr,scale:bl,scaleX:bl,scaleY:bl,scaleZ:bl,skew:cr,skewX:cr,skewY:cr,distance:Z,translateX:Z,translateY:Z,translateZ:Z,x:Z,y:Z,z:Z,perspective:Z,transformPerspective:Z,opacity:Aa,originX:s_,originY:s_,originZ:Z},o_={...Gs,transform:Math.round},qm={...c5,...h5,zIndex:o_,size:Z,fillOpacity:Aa,strokeOpacity:Aa,numOctaves:o_},f5={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},d5=Ks.length;function p5(t,e,n){let r="",i=!0;for(let s=0;s<d5;s++){const o=Ks[s],l=t[o];if(l===void 0)continue;let u=!0;if(typeof l=="number"?u=l===(o.startsWith("scale")?1:0):u=parseFloat(l)===0,!u||n){const c=rA(l,qm[o]);if(!u){i=!1;const f=f5[o]||o;r+=`${f}(${c}) `}n&&(e[o]=c)}}return r=r.trim(),n?r=n(e,i?"":r):i&&(r="none"),r}function Qm(t,e,n){const{style:r,vars:i,transformOrigin:s}=t;let o=!1,l=!1;for(const u in e){const c=e[u];if(Pi.has(u)){o=!0;continue}else if(nA(u)){i[u]=c;continue}else{const f=rA(c,qm[u]);u.startsWith("origin")?(l=!0,s[u]=f):r[u]=f}}if(e.transform||(o||n?r.transform=p5(e,t.transform,n):r.transform&&(r.transform="none")),l){const{originX:u="50%",originY:c="50%",originZ:f=0}=s;r.transformOrigin=`${u} ${c} ${f}`}}const m5={offset:"stroke-dashoffset",array:"stroke-dasharray"},g5={offset:"strokeDashoffset",array:"strokeDasharray"};function y5(t,e,n=1,r=0,i=!0){t.pathLength=1;const s=i?m5:g5;t[s.offset]=Z.transform(-r);const o=Z.transform(e),l=Z.transform(n);t[s.array]=`${o} ${l}`}function a_(t,e,n){return typeof t=="string"?t:Z.transform(e+n*t)}function v5(t,e,n){const r=a_(e,t.x,t.width),i=a_(n,t.y,t.height);return`${r} ${i}`}function Ym(t,{attrX:e,attrY:n,attrScale:r,originX:i,originY:s,pathLength:o,pathSpacing:l=1,pathOffset:u=0,...c},f,d){if(Qm(t,c,d),f){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:p,style:y,dimensions:S}=t;p.transform&&(S&&(y.transform=p.transform),delete p.transform),S&&(i!==void 0||s!==void 0||y.transform)&&(y.transformOrigin=v5(S,i!==void 0?i:.5,s!==void 0?s:.5)),e!==void 0&&(p.x=e),n!==void 0&&(p.y=n),r!==void 0&&(p.scale=r),o!==void 0&&y5(p,o,l,u,!1)}const Xm=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),iA=()=>({...Xm(),attrs:{}}),Zm=t=>typeof t=="string"&&t.toLowerCase()==="svg";function sA(t,{style:e,vars:n},r,i){Object.assign(t.style,e,i&&i.getProjectionStyles(r));for(const s in n)t.style.setProperty(s,n[s])}const oA=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function aA(t,e,n,r){sA(t,e,void 0,r);for(const i in e.attrs)t.setAttribute(oA.has(i)?i:$m(i),e.attrs[i])}const Zu={};function _5(t){Object.assign(Zu,t)}function lA(t,{layout:e,layoutId:n}){return Pi.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!Zu[t]||t==="opacity")}function Jm(t,e,n){var r;const{style:i}=t,s={};for(const o in i)(Et(i[o])||e.style&&Et(e.style[o])||lA(o,t)||((r=n==null?void 0:n.getValue(o))===null||r===void 0?void 0:r.liveStyle)!==void 0)&&(s[o]=i[o]);return s}function uA(t,e,n){const r=Jm(t,e,n);for(const i in t)if(Et(t[i])||Et(e[i])){const s=Ks.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[s]=t[i]}return r}function w5(t,e){try{e.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{e.dimensions={x:0,y:0,width:0,height:0}}}const l_=["x","y","width","height","cx","cy","r"],E5={useVisualState:eA({scrapeMotionValuesFromProps:uA,createRenderState:iA,onUpdate:({props:t,prevProps:e,current:n,renderState:r,latestValues:i})=>{if(!n)return;let s=!!t.drag;if(!s){for(const l in i)if(Pi.has(l)){s=!0;break}}if(!s)return;let o=!e;if(e)for(let l=0;l<l_.length;l++){const u=l_[l];t[u]!==e[u]&&(o=!0)}o&&Ce.read(()=>{w5(n,r),Ce.render(()=>{Ym(r,i,Zm(n.tagName),t.transformTemplate),aA(n,r)})})}})},T5={useVisualState:eA({scrapeMotionValuesFromProps:Jm,createRenderState:Xm})};function cA(t,e,n){for(const r in e)!Et(e[r])&&!lA(r,n)&&(t[r]=e[r])}function S5({transformTemplate:t},e){return j.useMemo(()=>{const n=Xm();return Qm(n,e,t),Object.assign({},n.vars,n.style)},[e])}function A5(t,e){const n=t.style||{},r={};return cA(r,n,t),Object.assign(r,S5(t,e)),r}function I5(t,e){const n={},r=A5(t,e);return t.drag&&t.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(n.tabIndex=0),n.style=r,n}function x5(t,e,n,r){const i=j.useMemo(()=>{const s=iA();return Ym(s,e,Zm(r),t.transformTemplate),{...s.attrs,style:{...s.style}}},[e]);if(t.style){const s={};cA(s,t.style,t),i.style={...s,...i.style}}return i}function C5(t=!1){return(n,r,i,{latestValues:s},o)=>{const u=(Wm(n)?x5:I5)(r,s,o,n),c=Ub(r,typeof n=="string",t),f=n!==j.Fragment?{...c,...u,ref:i}:{},{children:d}=r,p=j.useMemo(()=>Et(d)?d.get():d,[d]);return j.createElement(n,{...f,children:p})}}function P5(t,e){return function(r,{forwardMotionProps:i}={forwardMotionProps:!1}){const o={...Wm(r)?E5:T5,preloadedFeatures:t,useRender:C5(i),createVisualElement:e,Component:r};return Xb(o)}}function hA(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let r=0;r<n;r++)if(e[r]!==t[r])return!1;return!0}function Hc(t,e,n){const r=t.getProps();return Km(r,e,n!==void 0?n:r.custom,t)}const R5=Bm(()=>window.ScrollTimeline!==void 0);class k5{constructor(e){this.stop=()=>this.runAll("stop"),this.animations=e.filter(Boolean)}get finished(){return Promise.all(this.animations.map(e=>"finished"in e?e.finished:e))}getAll(e){return this.animations[0][e]}setAll(e,n){for(let r=0;r<this.animations.length;r++)this.animations[r][e]=n}attachTimeline(e,n){const r=this.animations.map(i=>{if(R5()&&i.attachTimeline)return i.attachTimeline(e);if(typeof n=="function")return n(i)});return()=>{r.forEach((i,s)=>{i&&i(),this.animations[s].stop()})}}get time(){return this.getAll("time")}set time(e){this.setAll("time",e)}get speed(){return this.getAll("speed")}set speed(e){this.setAll("speed",e)}get startTime(){return this.getAll("startTime")}get duration(){let e=0;for(let n=0;n<this.animations.length;n++)e=Math.max(e,this.animations[n].duration);return e}runAll(e){this.animations.forEach(n=>n[e]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class V5 extends k5{then(e,n){return Promise.all(this.animations).then(e).catch(n)}}function eg(t,e){return t?t[e]||t.default||t:void 0}const Md=2e4;function fA(t){let e=0;const n=50;let r=t.next(e);for(;!r.done&&e<Md;)e+=n,r=t.next(e);return e>=Md?1/0:e}function tg(t){return typeof t=="function"}function u_(t,e){t.timeline=e,t.onfinish=null}const ng=t=>Array.isArray(t)&&typeof t[0]=="number",D5={linearEasing:void 0};function b5(t,e){const n=Bm(t);return()=>{var r;return(r=D5[e])!==null&&r!==void 0?r:n()}}const Ju=b5(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),dA=(t,e,n=10)=>{let r="";const i=Math.max(Math.round(e/n),2);for(let s=0;s<i;s++)r+=t(bs(0,i-1,s))+", ";return`linear(${r.substring(0,r.length-2)})`};function pA(t){return!!(typeof t=="function"&&Ju()||!t||typeof t=="string"&&(t in Ld||Ju())||ng(t)||Array.isArray(t)&&t.every(pA))}const xo=([t,e,n,r])=>`cubic-bezier(${t}, ${e}, ${n}, ${r})`,Ld={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:xo([0,.65,.55,1]),circOut:xo([.55,0,1,.45]),backIn:xo([.31,.01,.66,-.59]),backOut:xo([.33,1.53,.69,.99])};function mA(t,e){if(t)return typeof t=="function"&&Ju()?dA(t,e):ng(t)?xo(t):Array.isArray(t)?t.map(n=>mA(n,e)||Ld.easeOut):Ld[t]}const dn={x:!1,y:!1};function gA(){return dn.x||dn.y}function N5(t,e,n){var r;if(t instanceof Element)return[t];if(typeof t=="string"){let i=document;const s=(r=void 0)!==null&&r!==void 0?r:i.querySelectorAll(t);return s?Array.from(s):[]}return Array.from(t)}function yA(t,e){const n=N5(t),r=new AbortController,i={passive:!0,...e,signal:r.signal};return[n,i,()=>r.abort()]}function c_(t){return e=>{e.pointerType==="touch"||gA()||t(e)}}function M5(t,e,n={}){const[r,i,s]=yA(t,n),o=c_(l=>{const{target:u}=l,c=e(l);if(typeof c!="function"||!u)return;const f=c_(d=>{c(d),u.removeEventListener("pointerleave",f)});u.addEventListener("pointerleave",f,i)});return r.forEach(l=>{l.addEventListener("pointerenter",o,i)}),s}const vA=(t,e)=>e?t===e?!0:vA(t,e.parentElement):!1,rg=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1,L5=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function O5(t){return L5.has(t.tagName)||t.tabIndex!==-1}const Co=new WeakSet;function h_(t){return e=>{e.key==="Enter"&&t(e)}}function Jh(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const F5=(t,e)=>{const n=t.currentTarget;if(!n)return;const r=h_(()=>{if(Co.has(n))return;Jh(n,"down");const i=h_(()=>{Jh(n,"up")}),s=()=>Jh(n,"cancel");n.addEventListener("keyup",i,e),n.addEventListener("blur",s,e)});n.addEventListener("keydown",r,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),e)};function f_(t){return rg(t)&&!gA()}function j5(t,e,n={}){const[r,i,s]=yA(t,n),o=l=>{const u=l.currentTarget;if(!f_(l)||Co.has(u))return;Co.add(u);const c=e(l),f=(y,S)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",p),!(!f_(y)||!Co.has(u))&&(Co.delete(u),typeof c=="function"&&c(y,{success:S}))},d=y=>{f(y,n.useGlobalTarget||vA(u,y.target))},p=y=>{f(y,!1)};window.addEventListener("pointerup",d,i),window.addEventListener("pointercancel",p,i)};return r.forEach(l=>{!O5(l)&&l.getAttribute("tabindex")===null&&(l.tabIndex=0),(n.useGlobalTarget?window:l).addEventListener("pointerdown",o,i),l.addEventListener("focus",c=>F5(c,i),i)}),s}function B5(t){return t==="x"||t==="y"?dn[t]?null:(dn[t]=!0,()=>{dn[t]=!1}):dn.x||dn.y?null:(dn.x=dn.y=!0,()=>{dn.x=dn.y=!1})}const _A=new Set(["width","height","top","left","right","bottom",...Ks]);let ou;function z5(){ou=void 0}const Nn={now:()=>(ou===void 0&&Nn.set(it.isProcessing||Lb.useManualTiming?it.timestamp:performance.now()),ou),set:t=>{ou=t,queueMicrotask(z5)}};function ig(t,e){t.indexOf(e)===-1&&t.push(e)}function sg(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}class og{constructor(){this.subscriptions=[]}add(e){return ig(this.subscriptions,e),()=>sg(this.subscriptions,e)}notify(e,n,r){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](e,n,r);else for(let s=0;s<i;s++){const o=this.subscriptions[s];o&&o(e,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function wA(t,e){return e?t*(1e3/e):0}const d_=30,U5=t=>!isNaN(parseFloat(t));class $5{constructor(e,n={}){this.version="11.18.2",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,i=!0)=>{const s=Nn.now();this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),i&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(e),this.owner=n.owner}setCurrent(e){this.current=e,this.updatedAt=Nn.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=U5(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,n){this.events[e]||(this.events[e]=new og);const r=this.events[e].add(n);return e==="change"?()=>{r(),Ce.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,n){this.passiveEffect=e,this.stopPassiveEffect=n}set(e,n=!0){!n||!this.passiveEffect?this.updateAndNotify(e,n):this.passiveEffect(e,this.updateAndNotify)}setWithVelocity(e,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-r}jump(e,n=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=Nn.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>d_)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,d_);return wA(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(e){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=e(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Ia(t,e){return new $5(t,e)}function H5(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,Ia(n))}function W5(t,e){const n=Hc(t,e);let{transitionEnd:r={},transition:i={},...s}=n||{};s={...s,...r};for(const o in s){const l=r5(s[o]);H5(t,o,l)}}function K5(t){return!!(Et(t)&&t.add)}function Od(t,e){const n=t.getValue("willChange");if(K5(n))return n.add(e)}function EA(t){return t.props[XS]}const TA=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,G5=1e-7,q5=12;function Q5(t,e,n,r,i){let s,o,l=0;do o=e+(n-e)/2,s=TA(o,r,i)-t,s>0?n=o:e=o;while(Math.abs(s)>G5&&++l<q5);return o}function ja(t,e,n,r){if(t===e&&n===r)return Kt;const i=s=>Q5(s,0,1,t,n);return s=>s===0||s===1?s:TA(i(s),e,r)}const SA=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,AA=t=>e=>1-t(1-e),IA=ja(.33,1.53,.69,.99),ag=AA(IA),xA=SA(ag),CA=t=>(t*=2)<1?.5*ag(t):.5*(2-Math.pow(2,-10*(t-1))),lg=t=>1-Math.sin(Math.acos(t)),PA=AA(lg),RA=SA(lg),kA=t=>/^0[^.\s]+$/u.test(t);function Y5(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||kA(t):!0}const Ho=t=>Math.round(t*1e5)/1e5,ug=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function X5(t){return t==null}const Z5=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,cg=(t,e)=>n=>!!(typeof n=="string"&&Z5.test(n)&&n.startsWith(t)||e&&!X5(n)&&Object.prototype.hasOwnProperty.call(n,e)),VA=(t,e,n)=>r=>{if(typeof r!="string")return r;const[i,s,o,l]=r.match(ug);return{[t]:parseFloat(i),[e]:parseFloat(s),[n]:parseFloat(o),alpha:l!==void 0?parseFloat(l):1}},J5=t=>tr(0,255,t),ef={...Gs,transform:t=>Math.round(J5(t))},ui={test:cg("rgb","red"),parse:VA("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:r=1})=>"rgba("+ef.transform(t)+", "+ef.transform(e)+", "+ef.transform(n)+", "+Ho(Aa.transform(r))+")"};function e3(t){let e="",n="",r="",i="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),r=t.substring(5,7),i=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),r=t.substring(3,4),i=t.substring(4,5),e+=e,n+=n,r+=r,i+=i),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const Fd={test:cg("#"),parse:e3,transform:ui.transform},es={test:cg("hsl","hue"),parse:VA("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:r=1})=>"hsla("+Math.round(t)+", "+bn.transform(Ho(e))+", "+bn.transform(Ho(n))+", "+Ho(Aa.transform(r))+")"},yt={test:t=>ui.test(t)||Fd.test(t)||es.test(t),parse:t=>ui.test(t)?ui.parse(t):es.test(t)?es.parse(t):Fd.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?ui.transform(t):es.transform(t)},t3=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function n3(t){var e,n;return isNaN(t)&&typeof t=="string"&&(((e=t.match(ug))===null||e===void 0?void 0:e.length)||0)+(((n=t.match(t3))===null||n===void 0?void 0:n.length)||0)>0}const DA="number",bA="color",r3="var",i3="var(",p_="${}",s3=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function xa(t){const e=t.toString(),n=[],r={color:[],number:[],var:[]},i=[];let s=0;const l=e.replace(s3,u=>(yt.test(u)?(r.color.push(s),i.push(bA),n.push(yt.parse(u))):u.startsWith(i3)?(r.var.push(s),i.push(r3),n.push(u)):(r.number.push(s),i.push(DA),n.push(parseFloat(u))),++s,p_)).split(p_);return{values:n,split:l,indexes:r,types:i}}function NA(t){return xa(t).values}function MA(t){const{split:e,types:n}=xa(t),r=e.length;return i=>{let s="";for(let o=0;o<r;o++)if(s+=e[o],i[o]!==void 0){const l=n[o];l===DA?s+=Ho(i[o]):l===bA?s+=yt.transform(i[o]):s+=i[o]}return s}}const o3=t=>typeof t=="number"?0:t;function a3(t){const e=NA(t);return MA(t)(e.map(o3))}const zr={test:n3,parse:NA,createTransformer:MA,getAnimatableNone:a3},l3=new Set(["brightness","contrast","saturate","opacity"]);function u3(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[r]=n.match(ug)||[];if(!r)return t;const i=n.replace(r,"");let s=l3.has(e)?1:0;return r!==n&&(s*=100),e+"("+s+i+")"}const c3=/\b([a-z-]*)\(.*?\)/gu,jd={...zr,getAnimatableNone:t=>{const e=t.match(c3);return e?e.map(u3).join(" "):t}},h3={...qm,color:yt,backgroundColor:yt,outlineColor:yt,fill:yt,stroke:yt,borderColor:yt,borderTopColor:yt,borderRightColor:yt,borderBottomColor:yt,borderLeftColor:yt,filter:jd,WebkitFilter:jd},hg=t=>h3[t];function LA(t,e){let n=hg(t);return n!==jd&&(n=zr),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const f3=new Set(["auto","none","0"]);function d3(t,e,n){let r=0,i;for(;r<t.length&&!i;){const s=t[r];typeof s=="string"&&!f3.has(s)&&xa(s).values.length&&(i=t[r]),r++}if(i&&n)for(const s of e)t[s]=LA(n,i)}const m_=t=>t===Gs||t===Z,g_=(t,e)=>parseFloat(t.split(", ")[e]),y_=(t,e)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/u);if(i)return g_(i[1],e);{const s=r.match(/^matrix\((.+)\)$/u);return s?g_(s[1],t):0}},p3=new Set(["x","y","z"]),m3=Ks.filter(t=>!p3.has(t));function g3(t){const e=[];return m3.forEach(n=>{const r=t.getValue(n);r!==void 0&&(e.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),e}const Ms={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:y_(4,13),y:y_(5,14)};Ms.translateX=Ms.x;Ms.translateY=Ms.y;const pi=new Set;let Bd=!1,zd=!1;function OA(){if(zd){const t=Array.from(pi).filter(r=>r.needsMeasurement),e=new Set(t.map(r=>r.element)),n=new Map;e.forEach(r=>{const i=g3(r);i.length&&(n.set(r,i),r.render())}),t.forEach(r=>r.measureInitialState()),e.forEach(r=>{r.render();const i=n.get(r);i&&i.forEach(([s,o])=>{var l;(l=r.getValue(s))===null||l===void 0||l.set(o)})}),t.forEach(r=>r.measureEndState()),t.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}zd=!1,Bd=!1,pi.forEach(t=>t.complete()),pi.clear()}function FA(){pi.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(zd=!0)})}function y3(){FA(),OA()}class fg{constructor(e,n,r,i,s,o=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...e],this.onComplete=n,this.name=r,this.motionValue=i,this.element=s,this.isAsync=o}scheduleResolve(){this.isScheduled=!0,this.isAsync?(pi.add(this),Bd||(Bd=!0,Ce.read(FA),Ce.resolveKeyframes(OA))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:n,element:r,motionValue:i}=this;for(let s=0;s<e.length;s++)if(e[s]===null)if(s===0){const o=i==null?void 0:i.get(),l=e[e.length-1];if(o!==void 0)e[0]=o;else if(r&&n){const u=r.readValue(n,l);u!=null&&(e[0]=u)}e[0]===void 0&&(e[0]=l),i&&o===void 0&&i.set(e[0])}else e[s]=e[s-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),pi.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,pi.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const jA=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),v3=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function _3(t){const e=v3.exec(t);if(!e)return[,];const[,n,r,i]=e;return[`--${n??r}`,i]}function BA(t,e,n=1){const[r,i]=_3(t);if(!r)return;const s=window.getComputedStyle(e).getPropertyValue(r);if(s){const o=s.trim();return jA(o)?parseFloat(o):o}return Gm(i)?BA(i,e,n+1):i}const zA=t=>e=>e.test(t),w3={test:t=>t==="auto",parse:t=>t},UA=[Gs,Z,bn,cr,u5,l5,w3],v_=t=>UA.find(zA(t));class $A extends fg{constructor(e,n,r,i,s){super(e,n,r,i,s,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let u=0;u<e.length;u++){let c=e[u];if(typeof c=="string"&&(c=c.trim(),Gm(c))){const f=BA(c,n.current);f!==void 0&&(e[u]=f),u===e.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!_A.has(r)||e.length!==2)return;const[i,s]=e,o=v_(i),l=v_(s);if(o!==l)if(m_(o)&&m_(l))for(let u=0;u<e.length;u++){const c=e[u];typeof c=="string"&&(e[u]=parseFloat(c))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:n}=this,r=[];for(let i=0;i<e.length;i++)Y5(e[i])&&r.push(i);r.length&&d3(e,r,n)}measureInitialState(){const{element:e,unresolvedKeyframes:n,name:r}=this;if(!e||!e.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Ms[r](e.measureViewportBox(),window.getComputedStyle(e.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&e.getValue(r,i).jump(i,!1)}measureEndState(){var e;const{element:n,name:r,unresolvedKeyframes:i}=this;if(!n||!n.current)return;const s=n.getValue(r);s&&s.jump(this.measuredOrigin,!1);const o=i.length-1,l=i[o];i[o]=Ms[r](n.measureViewportBox(),window.getComputedStyle(n.current)),l!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=l),!((e=this.removedTransforms)===null||e===void 0)&&e.length&&this.removedTransforms.forEach(([u,c])=>{n.getValue(u).set(c)}),this.resolveNoneKeyframes()}}const __=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(zr.test(t)||t==="0")&&!t.startsWith("url("));function E3(t){const e=t[0];if(t.length===1)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}function T3(t,e,n,r){const i=t[0];if(i===null)return!1;if(e==="display"||e==="visibility")return!0;const s=t[t.length-1],o=__(i,e),l=__(s,e);return!o||!l?!1:E3(t)||(n==="spring"||tg(n))&&r}const S3=t=>t!==null;function Wc(t,{repeat:e,repeatType:n="loop"},r){const i=t.filter(S3),s=e&&n!=="loop"&&e%2===1?0:i.length-1;return!s||r===void 0?i[s]:r}const A3=40;class HA{constructor({autoplay:e=!0,delay:n=0,type:r="keyframes",repeat:i=0,repeatDelay:s=0,repeatType:o="loop",...l}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=Nn.now(),this.options={autoplay:e,delay:n,type:r,repeat:i,repeatDelay:s,repeatType:o,...l},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>A3?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&y3(),this._resolved}onKeyframesResolved(e,n){this.resolvedAt=Nn.now(),this.hasAttemptedResolve=!0;const{name:r,type:i,velocity:s,delay:o,onComplete:l,onUpdate:u,isGenerator:c}=this.options;if(!c&&!T3(e,r,i,s))if(o)this.options.duration=0;else{u&&u(Wc(e,this.options,n)),l&&l(),this.resolveFinishedPromise();return}const f=this.initPlayback(e,n);f!==!1&&(this._resolved={keyframes:e,finalKeyframe:n,...f},this.onPostResolved())}onPostResolved(){}then(e,n){return this.currentFinishedPromise.then(e,n)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise(e=>{this.resolveFinishedPromise=e})}}const ke=(t,e,n)=>t+(e-t)*n;function tf(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function I3({hue:t,saturation:e,lightness:n,alpha:r}){t/=360,e/=100,n/=100;let i=0,s=0,o=0;if(!e)i=s=o=n;else{const l=n<.5?n*(1+e):n+e-n*e,u=2*n-l;i=tf(u,l,t+1/3),s=tf(u,l,t),o=tf(u,l,t-1/3)}return{red:Math.round(i*255),green:Math.round(s*255),blue:Math.round(o*255),alpha:r}}function ec(t,e){return n=>n>0?e:t}const nf=(t,e,n)=>{const r=t*t,i=n*(e*e-r)+r;return i<0?0:Math.sqrt(i)},x3=[Fd,ui,es],C3=t=>x3.find(e=>e.test(t));function w_(t){const e=C3(t);if(!e)return!1;let n=e.parse(t);return e===es&&(n=I3(n)),n}const E_=(t,e)=>{const n=w_(t),r=w_(e);if(!n||!r)return ec(t,e);const i={...n};return s=>(i.red=nf(n.red,r.red,s),i.green=nf(n.green,r.green,s),i.blue=nf(n.blue,r.blue,s),i.alpha=ke(n.alpha,r.alpha,s),ui.transform(i))},P3=(t,e)=>n=>e(t(n)),Ba=(...t)=>t.reduce(P3),Ud=new Set(["none","hidden"]);function R3(t,e){return Ud.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function k3(t,e){return n=>ke(t,e,n)}function dg(t){return typeof t=="number"?k3:typeof t=="string"?Gm(t)?ec:yt.test(t)?E_:b3:Array.isArray(t)?WA:typeof t=="object"?yt.test(t)?E_:V3:ec}function WA(t,e){const n=[...t],r=n.length,i=t.map((s,o)=>dg(s)(s,e[o]));return s=>{for(let o=0;o<r;o++)n[o]=i[o](s);return n}}function V3(t,e){const n={...t,...e},r={};for(const i in n)t[i]!==void 0&&e[i]!==void 0&&(r[i]=dg(t[i])(t[i],e[i]));return i=>{for(const s in r)n[s]=r[s](i);return n}}function D3(t,e){var n;const r=[],i={color:0,var:0,number:0};for(let s=0;s<e.values.length;s++){const o=e.types[s],l=t.indexes[o][i[o]],u=(n=t.values[l])!==null&&n!==void 0?n:0;r[s]=u,i[o]++}return r}const b3=(t,e)=>{const n=zr.createTransformer(e),r=xa(t),i=xa(e);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?Ud.has(t)&&!i.values.length||Ud.has(e)&&!r.values.length?R3(t,e):Ba(WA(D3(r,i),i.values),n):ec(t,e)};function KA(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?ke(t,e,n):dg(t)(t,e)}const N3=5;function GA(t,e,n){const r=Math.max(e-N3,0);return wA(n-t(r),e-r)}const Me={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},rf=.001;function M3({duration:t=Me.duration,bounce:e=Me.bounce,velocity:n=Me.velocity,mass:r=Me.mass}){let i,s,o=1-e;o=tr(Me.minDamping,Me.maxDamping,o),t=tr(Me.minDuration,Me.maxDuration,Gn(t)),o<1?(i=c=>{const f=c*o,d=f*t,p=f-n,y=$d(c,o),S=Math.exp(-d);return rf-p/y*S},s=c=>{const d=c*o*t,p=d*n+n,y=Math.pow(o,2)*Math.pow(c,2)*t,S=Math.exp(-d),x=$d(Math.pow(c,2),o);return(-i(c)+rf>0?-1:1)*((p-y)*S)/x}):(i=c=>{const f=Math.exp(-c*t),d=(c-n)*t+1;return-rf+f*d},s=c=>{const f=Math.exp(-c*t),d=(n-c)*(t*t);return f*d});const l=5/t,u=O3(i,s,l);if(t=Kn(t),isNaN(u))return{stiffness:Me.stiffness,damping:Me.damping,duration:t};{const c=Math.pow(u,2)*r;return{stiffness:c,damping:o*2*Math.sqrt(r*c),duration:t}}}const L3=12;function O3(t,e,n){let r=n;for(let i=1;i<L3;i++)r=r-t(r)/e(r);return r}function $d(t,e){return t*Math.sqrt(1-e*e)}const F3=["duration","bounce"],j3=["stiffness","damping","mass"];function T_(t,e){return e.some(n=>t[n]!==void 0)}function B3(t){let e={velocity:Me.velocity,stiffness:Me.stiffness,damping:Me.damping,mass:Me.mass,isResolvedFromDuration:!1,...t};if(!T_(t,j3)&&T_(t,F3))if(t.visualDuration){const n=t.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,s=2*tr(.05,1,1-(t.bounce||0))*Math.sqrt(i);e={...e,mass:Me.mass,stiffness:i,damping:s}}else{const n=M3(t);e={...e,...n,mass:Me.mass},e.isResolvedFromDuration=!0}return e}function qA(t=Me.visualDuration,e=Me.bounce){const n=typeof t!="object"?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:r,restDelta:i}=n;const s=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],l={done:!1,value:s},{stiffness:u,damping:c,mass:f,duration:d,velocity:p,isResolvedFromDuration:y}=B3({...n,velocity:-Gn(n.velocity||0)}),S=p||0,x=c/(2*Math.sqrt(u*f)),R=o-s,w=Gn(Math.sqrt(u/f)),v=Math.abs(R)<5;r||(r=v?Me.restSpeed.granular:Me.restSpeed.default),i||(i=v?Me.restDelta.granular:Me.restDelta.default);let T;if(x<1){const b=$d(w,x);T=M=>{const E=Math.exp(-x*w*M);return o-E*((S+x*w*R)/b*Math.sin(b*M)+R*Math.cos(b*M))}}else if(x===1)T=b=>o-Math.exp(-w*b)*(R+(S+w*R)*b);else{const b=w*Math.sqrt(x*x-1);T=M=>{const E=Math.exp(-x*w*M),g=Math.min(b*M,300);return o-E*((S+x*w*R)*Math.sinh(g)+b*R*Math.cosh(g))/b}}const k={calculatedDuration:y&&d||null,next:b=>{const M=T(b);if(y)l.done=b>=d;else{let E=0;x<1&&(E=b===0?Kn(S):GA(T,b,M));const g=Math.abs(E)<=r,A=Math.abs(o-M)<=i;l.done=g&&A}return l.value=l.done?o:M,l},toString:()=>{const b=Math.min(fA(k),Md),M=dA(E=>k.next(b*E).value,b,30);return b+"ms "+M}};return k}function S_({keyframes:t,velocity:e=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:s=500,modifyTarget:o,min:l,max:u,restDelta:c=.5,restSpeed:f}){const d=t[0],p={done:!1,value:d},y=g=>l!==void 0&&g<l||u!==void 0&&g>u,S=g=>l===void 0?u:u===void 0||Math.abs(l-g)<Math.abs(u-g)?l:u;let x=n*e;const R=d+x,w=o===void 0?R:o(R);w!==R&&(x=w-d);const v=g=>-x*Math.exp(-g/r),T=g=>w+v(g),k=g=>{const A=v(g),I=T(g);p.done=Math.abs(A)<=c,p.value=p.done?w:I};let b,M;const E=g=>{y(p.value)&&(b=g,M=qA({keyframes:[p.value,S(p.value)],velocity:GA(T,g,p.value),damping:i,stiffness:s,restDelta:c,restSpeed:f}))};return E(0),{calculatedDuration:null,next:g=>{let A=!1;return!M&&b===void 0&&(A=!0,k(g),E(g)),b!==void 0&&g>=b?M.next(g-b):(!A&&k(g),p)}}}const z3=ja(.42,0,1,1),U3=ja(0,0,.58,1),QA=ja(.42,0,.58,1),$3=t=>Array.isArray(t)&&typeof t[0]!="number",H3={linear:Kt,easeIn:z3,easeInOut:QA,easeOut:U3,circIn:lg,circInOut:RA,circOut:PA,backIn:ag,backInOut:xA,backOut:IA,anticipate:CA},A_=t=>{if(ng(t)){KS(t.length===4);const[e,n,r,i]=t;return ja(e,n,r,i)}else if(typeof t=="string")return H3[t];return t};function W3(t,e,n){const r=[],i=n||KA,s=t.length-1;for(let o=0;o<s;o++){let l=i(t[o],t[o+1]);if(e){const u=Array.isArray(e)?e[o]||Kt:e;l=Ba(u,l)}r.push(l)}return r}function K3(t,e,{clamp:n=!0,ease:r,mixer:i}={}){const s=t.length;if(KS(s===e.length),s===1)return()=>e[0];if(s===2&&e[0]===e[1])return()=>e[1];const o=t[0]===t[1];t[0]>t[s-1]&&(t=[...t].reverse(),e=[...e].reverse());const l=W3(e,r,i),u=l.length,c=f=>{if(o&&f<t[0])return e[0];let d=0;if(u>1)for(;d<t.length-2&&!(f<t[d+1]);d++);const p=bs(t[d],t[d+1],f);return l[d](p)};return n?f=>c(tr(t[0],t[s-1],f)):c}function G3(t,e){const n=t[t.length-1];for(let r=1;r<=e;r++){const i=bs(0,e,r);t.push(ke(n,1,i))}}function q3(t){const e=[0];return G3(e,t.length-1),e}function Q3(t,e){return t.map(n=>n*e)}function Y3(t,e){return t.map(()=>e||QA).splice(0,t.length-1)}function tc({duration:t=300,keyframes:e,times:n,ease:r="easeInOut"}){const i=$3(r)?r.map(A_):A_(r),s={done:!1,value:e[0]},o=Q3(n&&n.length===e.length?n:q3(e),t),l=K3(o,e,{ease:Array.isArray(i)?i:Y3(e,i)});return{calculatedDuration:t,next:u=>(s.value=l(u),s.done=u>=t,s)}}const X3=t=>{const e=({timestamp:n})=>t(n);return{start:()=>Ce.update(e,!0),stop:()=>Br(e),now:()=>it.isProcessing?it.timestamp:Nn.now()}},Z3={decay:S_,inertia:S_,tween:tc,keyframes:tc,spring:qA},J3=t=>t/100;class pg extends HA{constructor(e){super(e),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:u}=this.options;u&&u()};const{name:n,motionValue:r,element:i,keyframes:s}=this.options,o=(i==null?void 0:i.KeyframeResolver)||fg,l=(u,c)=>this.onKeyframesResolved(u,c);this.resolver=new o(s,l,n,r,i),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(e){const{type:n="keyframes",repeat:r=0,repeatDelay:i=0,repeatType:s,velocity:o=0}=this.options,l=tg(n)?n:Z3[n]||tc;let u,c;l!==tc&&typeof e[0]!="number"&&(u=Ba(J3,KA(e[0],e[1])),e=[0,100]);const f=l({...this.options,keyframes:e});s==="mirror"&&(c=l({...this.options,keyframes:[...e].reverse(),velocity:-o})),f.calculatedDuration===null&&(f.calculatedDuration=fA(f));const{calculatedDuration:d}=f,p=d+i,y=p*(r+1)-i;return{generator:f,mirroredGenerator:c,mapPercentToKeyframes:u,calculatedDuration:d,resolvedDuration:p,totalDuration:y}}onPostResolved(){const{autoplay:e=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!e?this.pause():this.state=this.pendingPlayState}tick(e,n=!1){const{resolved:r}=this;if(!r){const{keyframes:g}=this.options;return{done:!0,value:g[g.length-1]}}const{finalKeyframe:i,generator:s,mirroredGenerator:o,mapPercentToKeyframes:l,keyframes:u,calculatedDuration:c,totalDuration:f,resolvedDuration:d}=r;if(this.startTime===null)return s.next(0);const{delay:p,repeat:y,repeatType:S,repeatDelay:x,onUpdate:R}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-f/this.speed,this.startTime)),n?this.currentTime=e:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(e-this.startTime)*this.speed;const w=this.currentTime-p*(this.speed>=0?1:-1),v=this.speed>=0?w<0:w>f;this.currentTime=Math.max(w,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=f);let T=this.currentTime,k=s;if(y){const g=Math.min(this.currentTime,f)/d;let A=Math.floor(g),I=g%1;!I&&g>=1&&(I=1),I===1&&A--,A=Math.min(A,y+1),!!(A%2)&&(S==="reverse"?(I=1-I,x&&(I-=x/d)):S==="mirror"&&(k=o)),T=tr(0,1,I)*d}const b=v?{done:!1,value:u[0]}:k.next(T);l&&(b.value=l(b.value));let{done:M}=b;!v&&c!==null&&(M=this.speed>=0?this.currentTime>=f:this.currentTime<=0);const E=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&M);return E&&i!==void 0&&(b.value=Wc(u,this.options,i)),R&&R(b.value),E&&this.finish(),b}get duration(){const{resolved:e}=this;return e?Gn(e.calculatedDuration):0}get time(){return Gn(this.currentTime)}set time(e){e=Kn(e),this.currentTime=e,this.holdTime!==null||this.speed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.speed)}get speed(){return this.playbackSpeed}set speed(e){const n=this.playbackSpeed!==e;this.playbackSpeed=e,n&&(this.time=Gn(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:e=X3,onPlay:n,startTime:r}=this.options;this.driver||(this.driver=e(s=>this.tick(s))),n&&n();const i=this.driver.now();this.holdTime!==null?this.startTime=i-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=i):this.startTime=r??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var e;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(e=this.currentTime)!==null&&e!==void 0?e:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:e}=this.options;e&&e()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedProm
vendor: 4,561 bytes, line 2903
2903ise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}}const eN=new Set(["opacity","clipPath","filter","transform"]);function tN(t,e,n,{delay:r=0,duration:i=300,repeat:s=0,repeatType:o="loop",ease:l="easeInOut",times:u}={}){const c={[e]:n};u&&(c.offset=u);const f=mA(l,i);return Array.isArray(f)&&(c.easing=f),t.animate(c,{delay:r,duration:i,easing:Array.isArray(f)?"linear":f,fill:"both",iterations:s+1,direction:o==="reverse"?"alternate":"normal"})}const nN=Bm(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),nc=10,rN=2e4;function iN(t){return tg(t.type)||t.type==="spring"||!pA(t.ease)}function sN(t,e){const n=new pg({...e,keyframes:t,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:t[0]};const i=[];let s=0;for(;!r.done&&s<rN;)r=n.sample(s),i.push(r.value),s+=nc;return{times:void 0,keyframes:i,duration:s-nc,ease:"linear"}}const YA={anticipate:CA,backInOut:xA,circInOut:RA};function oN(t){return t in YA}class I_ extends HA{constructor(e){super(e);const{name:n,motionValue:r,element:i,keyframes:s}=this.options;this.resolver=new $A(s,(o,l)=>this.onKeyframesResolved(o,l),n,r,i),this.resolver.scheduleResolve()}initPlayback(e,n){let{duration:r=300,times:i,ease:s,type:o,motionValue:l,name:u,startTime:c}=this.options;if(!l.owner||!l.owner.current)return!1;if(typeof s=="string"&&Ju()&&oN(s)&&(s=YA[s]),iN(this.options)){const{onComplete:d,onUpdate:p,motionValue:y,element:S,...x}=this.options,R=sN(e,x);e=R.keyframes,e.length===1&&(e[1]=e[0]),r=R.duration,i=R.times,s=R.ease,o="keyframes"}const f=tN(l.owner.current,u,e,{...this.options,duration:r,times:i,ease:s});return f.startTime=c??this.calcStartTime(),this.pendingTimeline?(u_(f,this.pendingTimeline),this.pendingTimeline=void 0):f.onfinish=()=>{const{onComplete:d}=this.options;l.set(Wc(e,this.options,n)),d&&d(),this.cancel(),this.resolveFinishedPromise()},{animation:f,duration:r,times:i,type:o,ease:s,keyframes:e}}get duration(){const{resolved:e}=this;if(!e)return 0;const{duration:n}=e;return Gn(n)}get time(){const{resolved:e}=this;if(!e)return 0;const{animation:n}=e;return Gn(n.currentTime||0)}set time(e){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=Kn(e)}get speed(){const{resolved:e}=this;if(!e)return 1;const{animation:n}=e;return n.playbackRate}set speed(e){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.playbackRate=e}get state(){const{resolved:e}=this;if(!e)return"idle";const{animation:n}=e;return n.playState}get startTime(){const{resolved:e}=this;if(!e)return null;const{animation:n}=e;return n.startTime}attachTimeline(e){if(!this._resolved)this.pendingTimeline=e;else{const{resolved:n}=this;if(!n)return Kt;const{animation:r}=n;u_(r,e)}return Kt}play(){if(this.isStopped)return;const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:e}=this;if(!e)return;const{animation:n,keyframes:r,duration:i,type:s,ease:o,times:l}=e;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:c,onUpdate:f,onComplete:d,element:p,...y}=this.options,S=new pg({...y,keyframes:r,duration:i,type:s,ease:o,times:l,isGenerator:!0}),x=Kn(this.time);c.setWithVelocity(S.sample(x-nc).value,S.sample(x).value,nc)}const{onStop:u}=this.options;u&&u(),this.cancel()}complete(){const{resolved:e}=this;e&&e.animation.finish()}cancel(){const{resolved:e}=this;e&&e.animation.cancel()}static supports(e){const{motionValue:n,name:r,repeatDelay:i,repeatType:s,damping:o,type:l}=e;if(!n||!n.owner||!(n.owner.current instanceof HTMLElement))return!1;const{onUpdate:u,transformTemplate:c}=n.owner.getProps();return nN()&&r&&eN.has(r)&&!u&&!c&&!i&&s!=="mirror"&&o!==0&&l!=="inertia"}}const aN={type:"spring",stiffness:500,damping:25,restSpeed:10},lN=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),uN={type:"keyframes",duration:.8},cN={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},hN=(t,{keyframes:e})=>e.length>2?uN:Pi.has(t)?t.startsWith("scale")?lN(e[1]):aN:cN;function fN({when:t,delay:e,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:s,repeatType:
vendor: 48,516 bytes, line 2903
2903o,repeatDelay:l,from:u,elapsed:c,...f}){return!!Object.keys(f).length}const mg=(t,e,n,r={},i,s)=>o=>{const l=eg(r,t)||{},u=l.delay||r.delay||0;let{elapsed:c=0}=r;c=c-Kn(u);let f={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...l,delay:-c,onUpdate:p=>{e.set(p),l.onUpdate&&l.onUpdate(p)},onComplete:()=>{o(),l.onComplete&&l.onComplete()},name:t,motionValue:e,element:s?void 0:i};fN(l)||(f={...f,...hN(t,f)}),f.duration&&(f.duration=Kn(f.duration)),f.repeatDelay&&(f.repeatDelay=Kn(f.repeatDelay)),f.from!==void 0&&(f.keyframes[0]=f.from);let d=!1;if((f.type===!1||f.duration===0&&!f.repeatDelay)&&(f.duration=0,f.delay===0&&(d=!0)),d&&!s&&e.get()!==void 0){const p=Wc(f.keyframes,l);if(p!==void 0)return Ce.update(()=>{f.onUpdate(p),f.onComplete()}),new V5([])}return!s&&I_.supports(f)?new I_(f):new pg(f)};function dN({protectedKeys:t,needsAnimating:e},n){const r=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,r}function XA(t,e,{delay:n=0,transitionOverride:r,type:i}={}){var s;let{transition:o=t.getDefaultTransition(),transitionEnd:l,...u}=e;r&&(o=r);const c=[],f=i&&t.animationState&&t.animationState.getState()[i];for(const d in u){const p=t.getValue(d,(s=t.latestValues[d])!==null&&s!==void 0?s:null),y=u[d];if(y===void 0||f&&dN(f,d))continue;const S={delay:n,...eg(o||{},d)};let x=!1;if(window.MotionHandoffAnimation){const w=EA(t);if(w){const v=window.MotionHandoffAnimation(w,d,Ce);v!==null&&(S.startTime=v,x=!0)}}Od(t,d),p.start(mg(d,p,y,t.shouldReduceMotion&&_A.has(d)?{type:!1}:S,t,x));const R=p.animation;R&&c.push(R)}return l&&Promise.all(c).then(()=>{Ce.update(()=>{l&&W5(t,l)})}),c}function Hd(t,e,n={}){var r;const i=Hc(t,e,n.type==="exit"?(r=t.presenceContext)===null||r===void 0?void 0:r.custom:void 0);let{transition:s=t.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(s=n.transitionOverride);const o=i?()=>Promise.all(XA(t,i,n)):()=>Promise.resolve(),l=t.variantChildren&&t.variantChildren.size?(c=0)=>{const{delayChildren:f=0,staggerChildren:d,staggerDirection:p}=s;return pN(t,e,f+c,d,p,n)}:()=>Promise.resolve(),{when:u}=s;if(u){const[c,f]=u==="beforeChildren"?[o,l]:[l,o];return c().then(()=>f())}else return Promise.all([o(),l(n.delay)])}function pN(t,e,n=0,r=0,i=1,s){const o=[],l=(t.variantChildren.size-1)*r,u=i===1?(c=0)=>c*r:(c=0)=>l-c*r;return Array.from(t.variantChildren).sort(mN).forEach((c,f)=>{c.notify("AnimationStart",e),o.push(Hd(c,e,{...s,delay:n+u(f)}).then(()=>c.notify("AnimationComplete",e)))}),Promise.all(o)}function mN(t,e){return t.sortNodePosition(e)}function gN(t,e,n={}){t.notify("AnimationStart",e);let r;if(Array.isArray(e)){const i=e.map(s=>Hd(t,s,n));r=Promise.all(i)}else if(typeof e=="string")r=Hd(t,e,n);else{const i=typeof e=="function"?Hc(t,e,n.custom):e;r=Promise.all(XA(t,i,n))}return r.then(()=>{t.notify("AnimationComplete",e)})}const yN=Um.length;function ZA(t){if(!t)return;if(!t.isControllingVariants){const n=t.parent?ZA(t.parent)||{}:{};return t.props.initial!==void 0&&(n.initial=t.props.initial),n}const e={};for(let n=0;n<yN;n++){const r=Um[n],i=t.props[r];(Sa(i)||i===!1)&&(e[r]=i)}return e}const vN=[...zm].reverse(),_N=zm.length;function wN(t){return e=>Promise.all(e.map(({animation:n,options:r})=>gN(t,n,r)))}function EN(t){let e=wN(t),n=x_(),r=!0;const i=u=>(c,f)=>{var d;const p=Hc(t,f,u==="exit"?(d=t.presenceContext)===null||d===void 0?void 0:d.custom:void 0);if(p){const{transition:y,transitionEnd:S,...x}=p;c={...c,...x,...S}}return c};function s(u){e=u(t)}function o(u){const{props:c}=t,f=ZA(t.parent)||{},d=[],p=new Set;let y={},S=1/0;for(let R=0;R<_N;R++){const w=vN[R],v=n[w],T=c[w]!==void 0?c[w]:f[w],k=Sa(T),b=w===u?v.isActive:null;b===!1&&(S=R);let M=T===f[w]&&T!==c[w]&&k;if(M&&r&&t.manuallyAnimateOnMount&&(M=!1),v.protectedKeys={...y},!v.isActive&&b===null||!T&&!v.prevProp||Uc(T)||typeof T=="boolean")continue;const E=TN(v.prevProp,T);let g=E||w===u&&v.isActive&&!M&&k||R>S&&k,A=!1;const I=Array.isArray(T)?T:[T];let P=I.reduce(i(w),{});b===!1&&(P={});const{prevResolvedValues:V={}}=v,C={...V,...P},He=de=>{g=!0,p.has(de)&&(A=!0,p.delete(de)),v.needsAnimating[de]=!0;const U=t.getValue(de);U&&(U.liveStyle=!1)};for(const de in C){const U=P[de],G=V[de];if(y.hasOwnProperty(de))continue;let X=!1;Nd(U)&&Nd(G)?X=!hA(U,G):X=U!==G,X?U!=null?He(de):p.add(de):U!==void 0&&p.has(de)?He(de):v.protectedKeys[de]=!0}v.prevProp=T,v.prevResolvedValues=P,v.isActive&&(y={...y,...P}),r&&t.blockInitialAnimation&&(g=!1),g&&(!(M&&E)||A)&&d.push(...I.map(de=>({animation:de,options:{type:w}})))}if(p.size){const R={};p.forEach(w=>{const v=t.getBaseTarget(w),T=t.getValue(w);T&&(T.liveStyle=!0),R[w]=v??null}),d.push({animation:R})}let x=!!d.length;return r&&(c.initial===!1||c.initial===c.animate)&&!t.manuallyAnimateOnMount&&(x=!1),r=!1,x?e(d):Promise.resolve()}function l(u,c){var f;if(n[u].isActive===c)return Promise.resolve();(f=t.variantChildren)===null||f===void 0||f.forEach(p=>{var y;return(y=p.animationState)===null||y===void 0?void 0:y.setActive(u,c)}),n[u].isActive=c;const d=o(u);for(const p in n)n[p].protectedKeys={};return d}return{animateChanges:o,setActive:l,setAnimateFunction:s,getState:()=>n,reset:()=>{n=x_(),r=!0}}}function TN(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!hA(e,t):!1}function Xr(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function x_(){return{animate:Xr(!0),whileInView:Xr(),whileHover:Xr(),whileTap:Xr(),whileDrag:Xr(),whileFocus:Xr(),exit:Xr()}}class Kr{constructor(e){this.isMounted=!1,this.node=e}update(){}}class SN extends Kr{constructor(e){super(e),e.animationState||(e.animationState=EN(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();Uc(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:n}=this.node.prevProps||{};e!==n&&this.updateAnimationControlsSubscription()}unmount(){var e;this.node.animationState.reset(),(e=this.unmountControls)===null||e===void 0||e.call(this)}}let AN=0;class IN extends Kr{constructor(){super(...arguments),this.id=AN++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===r)return;const i=this.node.animationState.setActive("exit",!e);n&&!e&&i.then(()=>n(this.id))}mount(){const{register:e}=this.node.presenceContext||{};e&&(this.unmount=e(this.id))}unmount(){}}const xN={animation:{Feature:SN},exit:{Feature:IN}};function Ca(t,e,n,r={passive:!0}){return t.addEventListener(e,n,r),()=>t.removeEventListener(e,n)}function za(t){return{point:{x:t.pageX,y:t.pageY}}}const CN=t=>e=>rg(e)&&t(e,za(e));function Wo(t,e,n,r){return Ca(t,e,CN(n),r)}const C_=(t,e)=>Math.abs(t-e);function PN(t,e){const n=C_(t.x,e.x),r=C_(t.y,e.y);return Math.sqrt(n**2+r**2)}class JA{constructor(e,n,{transformPagePoint:r,contextWindow:i,dragSnapToOrigin:s=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const d=of(this.lastMoveEventInfo,this.history),p=this.startEvent!==null,y=PN(d.offset,{x:0,y:0})>=3;if(!p&&!y)return;const{point:S}=d,{timestamp:x}=it;this.history.push({...S,timestamp:x});const{onStart:R,onMove:w}=this.handlers;p||(R&&R(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),w&&w(this.lastMoveEvent,d)},this.handlePointerMove=(d,p)=>{this.lastMoveEvent=d,this.lastMoveEventInfo=sf(p,this.transformPagePoint),Ce.update(this.updatePoint,!0)},this.handlePointerUp=(d,p)=>{this.end();const{onEnd:y,onSessionEnd:S,resumeAnimation:x}=this.handlers;if(this.dragSnapToOrigin&&x&&x(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const R=of(d.type==="pointercancel"?this.lastMoveEventInfo:sf(p,this.transformPagePoint),this.history);this.startEvent&&y&&y(d,R),S&&S(d,R)},!rg(e))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=r,this.contextWindow=i||window;const o=za(e),l=sf(o,this.transformPagePoint),{point:u}=l,{timestamp:c}=it;this.history=[{...u,timestamp:c}];const{onSessionStart:f}=n;f&&f(e,of(l,this.history)),this.removeListeners=Ba(Wo(this.contextWindow,"pointermove",this.handlePointerMove),Wo(this.contextWindow,"pointerup",this.handlePointerUp),Wo(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),Br(this.updatePoint)}}function sf(t,e){return e?{point:e(t.point)}:t}function P_(t,e){return{x:t.x-e.x,y:t.y-e.y}}function of({point:t},e){return{point:t,delta:P_(t,eI(e)),offset:P_(t,RN(e)),velocity:kN(e,.1)}}function RN(t){return t[0]}function eI(t){return t[t.length-1]}function kN(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,r=null;const i=eI(t);for(;n>=0&&(r=t[n],!(i.timestamp-r.timestamp>Kn(e)));)n--;if(!r)return{x:0,y:0};const s=Gn(i.timestamp-r.timestamp);if(s===0)return{x:0,y:0};const o={x:(i.x-r.x)/s,y:(i.y-r.y)/s};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}const tI=1e-4,VN=1-tI,DN=1+tI,nI=.01,bN=0-nI,NN=0+nI;function qt(t){return t.max-t.min}function MN(t,e,n){return Math.abs(t-e)<=n}function R_(t,e,n,r=.5){t.origin=r,t.originPoint=ke(e.min,e.max,t.origin),t.scale=qt(n)/qt(e),t.translate=ke(n.min,n.max,t.origin)-t.originPoint,(t.scale>=VN&&t.scale<=DN||isNaN(t.scale))&&(t.scale=1),(t.translate>=bN&&t.translate<=NN||isNaN(t.translate))&&(t.translate=0)}function Ko(t,e,n,r){R_(t.x,e.x,n.x,r?r.originX:void 0),R_(t.y,e.y,n.y,r?r.originY:void 0)}function k_(t,e,n){t.min=n.min+e.min,t.max=t.min+qt(e)}function LN(t,e,n){k_(t.x,e.x,n.x),k_(t.y,e.y,n.y)}function V_(t,e,n){t.min=e.min-n.min,t.max=t.min+qt(e)}function Go(t,e,n){V_(t.x,e.x,n.x),V_(t.y,e.y,n.y)}function ON(t,{min:e,max:n},r){return e!==void 0&&t<e?t=r?ke(e,t,r.min):Math.max(t,e):n!==void 0&&t>n&&(t=r?ke(n,t,r.max):Math.min(t,n)),t}function D_(t,e,n){return{min:e!==void 0?t.min+e:void 0,max:n!==void 0?t.max+n-(t.max-t.min):void 0}}function FN(t,{top:e,left:n,bottom:r,right:i}){return{x:D_(t.x,n,i),y:D_(t.y,e,r)}}function b_(t,e){let n=e.min-t.min,r=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,r]=[r,n]),{min:n,max:r}}function jN(t,e){return{x:b_(t.x,e.x),y:b_(t.y,e.y)}}function BN(t,e){let n=.5;const r=qt(t),i=qt(e);return i>r?n=bs(e.min,e.max-r,t.min):r>i&&(n=bs(t.min,t.max-i,e.min)),tr(0,1,n)}function zN(t,e){const n={};return e.min!==void 0&&(n.min=e.min-t.min),e.max!==void 0&&(n.max=e.max-t.min),n}const Wd=.35;function UN(t=Wd){return t===!1?t=0:t===!0&&(t=Wd),{x:N_(t,"left","right"),y:N_(t,"top","bottom")}}function N_(t,e,n){return{min:M_(t,e),max:M_(t,n)}}function M_(t,e){return typeof t=="number"?t:t[e]||0}const L_=()=>({translate:0,scale:1,origin:0,originPoint:0}),ts=()=>({x:L_(),y:L_()}),O_=()=>({min:0,max:0}),Oe=()=>({x:O_(),y:O_()});function Zt(t){return[t("x"),t("y")]}function rI({top:t,left:e,right:n,bottom:r}){return{x:{min:e,max:n},y:{min:t,max:r}}}function $N({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function HN(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),r=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function af(t){return t===void 0||t===1}function Kd({scale:t,scaleX:e,scaleY:n}){return!af(t)||!af(e)||!af(n)}function ti(t){return Kd(t)||iI(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function iI(t){return F_(t.x)||F_(t.y)}function F_(t){return t&&t!=="0%"}function rc(t,e,n){const r=t-n,i=e*r;return n+i}function j_(t,e,n,r,i){return i!==void 0&&(t=rc(t,i,r)),rc(t,n,r)+e}function Gd(t,e=0,n=1,r,i){t.min=j_(t.min,e,n,r,i),t.max=j_(t.max,e,n,r,i)}function sI(t,{x:e,y:n}){Gd(t.x,e.translate,e.scale,e.originPoint),Gd(t.y,n.translate,n.scale,n.originPoint)}const B_=.999999999999,z_=1.0000000000001;function WN(t,e,n,r=!1){const i=n.length;if(!i)return;e.x=e.y=1;let s,o;for(let l=0;l<i;l++){s=n[l],o=s.projectionDelta;const{visualElement:u}=s.options;u&&u.props.style&&u.props.style.display==="contents"||(r&&s.options.layoutScroll&&s.scroll&&s!==s.root&&rs(t,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),o&&(e.x*=o.x.scale,e.y*=o.y.scale,sI(t,o)),r&&ti(s.latestValues)&&rs(t,s.latestValues))}e.x<z_&&e.x>B_&&(e.x=1),e.y<z_&&e.y>B_&&(e.y=1)}function ns(t,e){t.min=t.min+e,t.max=t.max+e}function U_(t,e,n,r,i=.5){const s=ke(t.min,t.max,i);Gd(t,e,n,s,r)}function rs(t,e){U_(t.x,e.x,e.scaleX,e.scale,e.originX),U_(t.y,e.y,e.scaleY,e.scale,e.originY)}function oI(t,e){return rI(HN(t.getBoundingClientRect(),e))}function KN(t,e,n){const r=oI(t,n),{scroll:i}=e;return i&&(ns(r.x,i.offset.x),ns(r.y,i.offset.y)),r}const aI=({current:t})=>t?t.ownerDocument.defaultView:null,GN=new WeakMap;class qN{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Oe(),this.visualElement=e}start(e,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const i=f=>{const{dragSnapToOrigin:d}=this.getProps();d?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(za(f).point)},s=(f,d)=>{const{drag:p,dragPropagation:y,onDragStart:S}=this.getProps();if(p&&!y&&(this.openDragLock&&this.openDragLock(),this.openDragLock=B5(p),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Zt(R=>{let w=this.getAxisMotionValue(R).get()||0;if(bn.test(w)){const{projection:v}=this.visualElement;if(v&&v.layout){const T=v.layout.layoutBox[R];T&&(w=qt(T)*(parseFloat(w)/100))}}this.originPoint[R]=w}),S&&Ce.postRender(()=>S(f,d)),Od(this.visualElement,"transform");const{animationState:x}=this.visualElement;x&&x.setActive("whileDrag",!0)},o=(f,d)=>{const{dragPropagation:p,dragDirectionLock:y,onDirectionLock:S,onDrag:x}=this.getProps();if(!p&&!this.openDragLock)return;const{offset:R}=d;if(y&&this.currentDirection===null){this.currentDirection=QN(R),this.currentDirection!==null&&S&&S(this.currentDirection);return}this.updateAxis("x",d.point,R),this.updateAxis("y",d.point,R),this.visualElement.render(),x&&x(f,d)},l=(f,d)=>this.stop(f,d),u=()=>Zt(f=>{var d;return this.getAnimationState(f)==="paused"&&((d=this.getAxisMotionValue(f).animation)===null||d===void 0?void 0:d.play())}),{dragSnapToOrigin:c}=this.getProps();this.panSession=new JA(e,{onSessionStart:i,onStart:s,onMove:o,onSessionEnd:l,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:aI(this.visualElement)})}stop(e,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:s}=this.getProps();s&&Ce.postRender(()=>s(e,n))}cancel(){this.isDragging=!1;const{projection:e,animationState:n}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(e,n,r){const{drag:i}=this.getProps();if(!r||!Nl(e,i,this.currentDirection))return;const s=this.getAxisMotionValue(e);let o=this.originPoint[e]+r[e];this.constraints&&this.constraints[e]&&(o=ON(o,this.constraints[e],this.elastic[e])),s.set(o)}resolveConstraints(){var e;const{dragConstraints:n,dragElastic:r}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(e=this.visualElement.projection)===null||e===void 0?void 0:e.layout,s=this.constraints;n&&Ji(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&i?this.constraints=FN(i.layoutBox,n):this.constraints=!1,this.elastic=UN(r),s!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&Zt(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=zN(i.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!Ji(e))return!1;const r=e.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const s=KN(r,i.root,this.visualElement.getTransformPagePoint());let o=jN(i.layout.layoutBox,s);if(n){const l=n($N(o));this.hasMutatedConstraints=!!l,l&&(o=rI(l))}return o}startAnimation(e){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:s,dragSnapToOrigin:o,onDragTransitionEnd:l}=this.getProps(),u=this.constraints||{},c=Zt(f=>{if(!Nl(f,n,this.currentDirection))return;let d=u&&u[f]||{};o&&(d={min:0,max:0});const p=i?200:1e6,y=i?40:1e7,S={type:"inertia",velocity:r?e[f]:0,bounceStiffness:p,bounceDamping:y,timeConstant:750,restDelta:1,restSpeed:10,...s,...d};return this.startAxisValueAnimation(f,S)});return Promise.all(c).then(l)}startAxisValueAnimation(e,n){const r=this.getAxisMotionValue(e);return Od(this.visualElement,e),r.start(mg(e,r,0,n,this.visualElement,!1))}stopAnimation(){Zt(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){Zt(e=>{var n;return(n=this.getAxisMotionValue(e).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(e){var n;return(n=this.getAxisMotionValue(e).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(e){const n=`_drag${e.toUpperCase()}`,r=this.visualElement.getProps(),i=r[n];return i||this.visualElement.getValue(e,(r.initial?r.initial[e]:void 0)||0)}snapToCursor(e){Zt(n=>{const{drag:r}=this.getProps();if(!Nl(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,s=this.getAxisMotionValue(n);if(i&&i.layout){const{min:o,max:l}=i.layout.layoutBox[n];s.set(e[n]-ke(o,l,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Ji(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};Zt(o=>{const l=this.getAxisMotionValue(o);if(l&&this.constraints!==!1){const u=l.get();i[o]=BN({min:u,max:u},this.constraints[o])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),Zt(o=>{if(!Nl(o,e,null))return;const l=this.getAxisMotionValue(o),{min:u,max:c}=this.constraints[o];l.set(ke(u,c,i[o]))})}addListeners(){if(!this.visualElement.current)return;GN.set(this.visualElement,this);const e=this.visualElement.current,n=Wo(e,"pointerdown",u=>{const{drag:c,dragListener:f=!0}=this.getProps();c&&f&&this.start(u)}),r=()=>{const{dragConstraints:u}=this.getProps();Ji(u)&&u.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,s=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),Ce.read(r);const o=Ca(window,"resize",()=>this.scalePositionWithinConstraints()),l=i.addEventListener("didUpdate",({delta:u,hasLayoutChanged:c})=>{this.isDragging&&c&&(Zt(f=>{const d=this.getAxisMotionValue(f);d&&(this.originPoint[f]+=u[f].translate,d.set(d.get()+u[f].translate))}),this.visualElement.render())});return()=>{o(),n(),s(),l&&l()}}getProps(){const e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:s=!1,dragElastic:o=Wd,dragMomentum:l=!0}=e;return{...e,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:s,dragElastic:o,dragMomentum:l}}}function Nl(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function QN(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class YN extends Kr{constructor(e){super(e),this.removeGroupControls=Kt,this.removeListeners=Kt,this.controls=new qN(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Kt}unmount(){this.removeGroupControls(),this.removeListeners()}}const $_=t=>(e,n)=>{t&&Ce.postRender(()=>t(e,n))};class XN extends Kr{constructor(){super(...arguments),this.removePointerDownListener=Kt}onPointerDown(e){this.session=new JA(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:aI(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:$_(e),onStart:$_(n),onMove:r,onEnd:(s,o)=>{delete this.session,i&&Ce.postRender(()=>i(s,o))}}}mount(){this.removePointerDownListener=Wo(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const au={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function H_(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const yo={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(Z.test(t))t=parseFloat(t);else return t;const n=H_(t,e.target.x),r=H_(t,e.target.y);return`${n}% ${r}%`}},ZN={correct:(t,{treeScale:e,projectionDelta:n})=>{const r=t,i=zr.parse(t);if(i.length>5)return r;const s=zr.createTransformer(t),o=typeof i[0]!="number"?1:0,l=n.x.scale*e.x,u=n.y.scale*e.y;i[0+o]/=l,i[1+o]/=u;const c=ke(l,u,.5);return typeof i[2+o]=="number"&&(i[2+o]/=c),typeof i[3+o]=="number"&&(i[3+o]/=c),s(i)}};class JN extends j.Component{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:s}=e;_5(eM),s&&(n.group&&n.group.add(s),r&&r.register&&i&&r.register(s),s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),au.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:r,drag:i,isPresent:s}=this.props,o=r.projection;return o&&(o.isPresent=s,i||e.layoutDependency!==n||n===void 0?o.willUpdate():this.safeToRemove(),e.isPresent!==s&&(s?o.promote():o.relegate()||Ce.postRender(()=>{const l=o.getStack();(!l||!l.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),Hm.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=e;i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),r&&r.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function lI(t){const[e,n]=HS(),r=j.useContext(Lm);return N.jsx(JN,{...t,layoutGroup:r,switchLayoutGroup:j.useContext(ZS),isPresent:e,safeToRemove:n})}const eM={borderRadius:{...yo,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:yo,borderTopRightRadius:yo,borderBottomLeftRadius:yo,borderBottomRightRadius:yo,boxShadow:ZN};function tM(t,e,n){const r=Et(t)?t:Ia(t);return r.start(mg("",r,e,n)),r.animation}function nM(t){return t instanceof SVGElement&&t.tagName!=="svg"}const rM=(t,e)=>t.depth-e.depth;class iM{constructor(){this.children=[],this.isDirty=!1}add(e){ig(this.children,e),this.isDirty=!0}remove(e){sg(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(rM),this.isDirty=!1,this.children.forEach(e)}}function sM(t,e){const n=Nn.now(),r=({timestamp:i})=>{const s=i-n;s>=e&&(Br(r),t(s-e))};return Ce.read(r,!0),()=>Br(r)}const uI=["TopLeft","TopRight","BottomLeft","BottomRight"],oM=uI.length,W_=t=>typeof t=="string"?parseFloat(t):t,K_=t=>typeof t=="number"||Z.test(t);function aM(t,e,n,r,i,s){i?(t.opacity=ke(0,n.opacity!==void 0?n.opacity:1,lM(r)),t.opacityExit=ke(e.opacity!==void 0?e.opacity:1,0,uM(r))):s&&(t.opacity=ke(e.opacity!==void 0?e.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let o=0;o<oM;o++){const l=`border${uI[o]}Radius`;let u=G_(e,l),c=G_(n,l);if(u===void 0&&c===void 0)continue;u||(u=0),c||(c=0),u===0||c===0||K_(u)===K_(c)?(t[l]=Math.max(ke(W_(u),W_(c),r),0),(bn.test(c)||bn.test(u))&&(t[l]+="%")):t[l]=c}(e.rotate||n.rotate)&&(t.rotate=ke(e.rotate||0,n.rotate||0,r))}function G_(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const lM=cI(0,.5,PA),uM=cI(.5,.95,Kt);function cI(t,e,n){return r=>r<t?0:r>e?1:n(bs(t,e,r))}function q_(t,e){t.min=e.min,t.max=e.max}function Xt(t,e){q_(t.x,e.x),q_(t.y,e.y)}function Q_(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function Y_(t,e,n,r,i){return t-=e,t=rc(t,1/n,r),i!==void 0&&(t=rc(t,1/i,r)),t}function cM(t,e=0,n=1,r=.5,i,s=t,o=t){if(bn.test(e)&&(e=parseFloat(e),e=ke(o.min,o.max,e/100)-o.min),typeof e!="number")return;let l=ke(s.min,s.max,r);t===s&&(l-=e),t.min=Y_(t.min,e,n,l,i),t.max=Y_(t.max,e,n,l,i)}function X_(t,e,[n,r,i],s,o){cM(t,e[n],e[r],e[i],e.scale,s,o)}const hM=["x","scaleX","originX"],fM=["y","scaleY","originY"];function Z_(t,e,n,r){X_(t.x,e,hM,n?n.x:void 0,r?r.x:void 0),X_(t.y,e,fM,n?n.y:void 0,r?r.y:void 0)}function J_(t){return t.translate===0&&t.scale===1}function hI(t){return J_(t.x)&&J_(t.y)}function e1(t,e){return t.min===e.min&&t.max===e.max}function dM(t,e){return e1(t.x,e.x)&&e1(t.y,e.y)}function t1(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function fI(t,e){return t1(t.x,e.x)&&t1(t.y,e.y)}function n1(t){return qt(t.x)/qt(t.y)}function r1(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}class pM{constructor(){this.members=[]}add(e){ig(this.members,e),e.scheduleRender()}remove(e){if(sg(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(e){const n=this.members.findIndex(i=>e===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const s=this.members[i];if(s.isPresent!==!1){r=s;break}}return r?(this.promote(r),!0):!1}promote(e,n){const r=this.lead;if(e!==r&&(this.prevLead=r,this.lead=e,e.show(),r)){r.instance&&r.scheduleRender(),e.scheduleRender(),e.resumeFrom=r,n&&(e.resumeFrom.preserveOpacity=!0),r.snapshot&&(e.snapshot=r.snapshot,e.snapshot.latestValues=r.animationValues||r.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:i}=e.options;i===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:n,resumingFrom:r}=e;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function mM(t,e,n){let r="";const i=t.x.translate/e.x,s=t.y.translate/e.y,o=(n==null?void 0:n.z)||0;if((i||s||o)&&(r=`translate3d(${i}px, ${s}px, ${o}px) `),(e.x!==1||e.y!==1)&&(r+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:c,rotate:f,rotateX:d,rotateY:p,skewX:y,skewY:S}=n;c&&(r=`perspective(${c}px) ${r}`),f&&(r+=`rotate(${f}deg) `),d&&(r+=`rotateX(${d}deg) `),p&&(r+=`rotateY(${p}deg) `),y&&(r+=`skewX(${y}deg) `),S&&(r+=`skewY(${S}deg) `)}const l=t.x.scale*e.x,u=t.y.scale*e.y;return(l!==1||u!==1)&&(r+=`scale(${l}, ${u})`),r||"none"}const ni={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},Po=typeof window<"u"&&window.MotionDebug!==void 0,lf=["","X","Y","Z"],gM={visibility:"hidden"},i1=1e3;let yM=0;function uf(t,e,n,r){const{latestValues:i}=e;i[t]&&(n[t]=i[t],e.setStaticValue(t,0),r&&(r[t]=0))}function dI(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=EA(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:s}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",Ce,!(i||s))}const{parent:r}=t;r&&!r.hasCheckedOptimisedAppear&&dI(r)}function pI({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(o={},l=e==null?void 0:e()){this.id=yM++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,Po&&(ni.totalNodes=ni.resolvedTargetDeltas=ni.recalculatedProjection=0),this.nodes.forEach(wM),this.nodes.forEach(IM),this.nodes.forEach(xM),this.nodes.forEach(EM),Po&&window.MotionDebug.record(ni)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0;for(let u=0;u<this.path.length;u++)this.path[u].shouldResetTransform=!0;this.root===this&&(this.nodes=new iM)}addEventListener(o,l){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new og),this.eventHandlers.get(o).add(l)}notifyListeners(o,...l){const u=this.eventHandlers.get(o);u&&u.notify(...l)}hasListeners(o){return this.eventHandlers.has(o)}mount(o,l=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=nM(o),this.instance=o;const{layoutId:u,layout:c,visualElement:f}=this.options;if(f&&!f.current&&f.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),l&&(c||u)&&(this.isLayoutDirty=!0),t){let d;const p=()=>this.root.updateBlockedByResize=!1;t(o,()=>{this.root.updateBlockedByResize=!0,d&&d(),d=sM(p,250),au.hasAnimatedSinceResize&&(au.hasAnimatedSinceResize=!1,this.nodes.forEach(o1))})}u&&this.root.registerSharedNode(u,this),this.options.animate!==!1&&f&&(u||c)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:p,hasRelativeTargetChanged:y,layout:S})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const x=this.options.transition||f.getDefaultTransition()||VM,{onLayoutAnimationStart:R,onLayoutAnimationComplete:w}=f.getProps(),v=!this.targetLayout||!fI(this.targetLayout,S)||y,T=!p&&y;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||T||p&&(v||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,T);const k={...eg(x,"layout"),onPlay:R,onComplete:w};(f.shouldReduceMotion||this.options.layoutRoot)&&(k.delay=0,k.type=!1),this.startAnimation(k)}else p||o1(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=S})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Br(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(CM),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&dI(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let f=0;f<this.path.length;f++){const d=this.path[f];d.shouldResetTransform=!0,d.updateScroll("snapshot"),d.options.layoutRoot&&d.willUpdate(!1)}const{layoutId:l,layout:u}=this.options;if(l===void 0&&!u)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(s1);return}this.isUpdating||this.nodes.forEach(SM),this.isUpdating=!1,this.nodes.forEach(AM),this.nodes.forEach(vM),this.nodes.forEach(_M),this.clearAllSnapshots();const l=Nn.now();it.delta=tr(0,1e3/60,l-it.timestamp),it.timestamp=l,it.isProcessing=!0,Zh.update.process(it),Zh.preRender.process(it),Zh.render.process(it),it.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Hm.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(TM),this.sharedNodes.forEach(PM)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Ce.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Ce.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let u=0;u<this.path.length;u++)this.path[u].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutCorrected=Oe(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:l}=this.options;l&&l.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let l=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(l=!1),l){const u=r(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:u,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:u}}}resetTransform(){if(!i)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,l=this.projectionDelta&&!hI(this.projectionDelta),u=this.getTransformTemplate(),c=u?u(this.latestValues,""):void 0,f=c!==this.prevTransformTemplateValue;o&&(l||ti(this.latestValues)||f)&&(i(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const l=this.measurePageBox();let u=this.removeElementScroll(l);return o&&(u=this.removeTransform(u)),DM(u),{animationId:this.root.animationId,measuredBox:l,layoutBox:u,latestValues:{},source:this.id}}measurePageBox(){var o;const{visualElement:l}=this.options;if(!l)return Oe();const u=l.measureViewportBox();if(!(((o=this.scroll)===null||o===void 0?void 0:o.wasRoot)||this.path.some(bM))){const{scroll:f}=this.root;f&&(ns(u.x,f.offset.x),ns(u.y,f.offset.y))}return u}removeElementScroll(o){var l;const u=Oe();if(Xt(u,o),!((l=this.scroll)===null||l===void 0)&&l.wasRoot)return u;for(let c=0;c<this.path.length;c++){const f=this.path[c],{scroll:d,options:p}=f;f!==this.root&&d&&p.layoutScroll&&(d.wasRoot&&Xt(u,o),ns(u.x,d.offset.x),ns(u.y,d.offset.y))}return u}applyTransform(o,l=!1){const u=Oe();Xt(u,o);for(let c=0;c<this.path.length;c++){const f=this.path[c];!l&&f.options.layoutScroll&&f.scroll&&f!==f.root&&rs(u,{x:-f.scroll.offset.x,y:-f.scroll.offset.y}),ti(f.latestValues)&&rs(u,f.latestValues)}return ti(this.latestValues)&&rs(u,this.latestValues),u}removeTransform(o){const l=Oe();Xt(l,o);for(let u=0;u<this.path.length;u++){const c=this.path[u];if(!c.instance||!ti(c.latestValues))continue;Kd(c.latestValues)&&c.updateSnapshot();const f=Oe(),d=c.measurePageBox();Xt(f,d),Z_(l,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,f)}return ti(this.latestValues)&&Z_(l,this.latestValues),l}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==it.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){var l;const u=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=u.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=u.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=u.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==u;if(!(o||c&&this.isSharedProjectionDirty||this.isProjectionDirty||!((l=this.parent)===null||l===void 0)&&l.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:d,layoutId:p}=this.options;if(!(!this.layout||!(d||p))){if(this.resolvedRelativeTargetAt=it.timestamp,!this.targetDelta&&!this.relativeTarget){const y=this.getClosestProjectingParent();y&&y.layout&&this.animationProgress!==1?(this.relativeParent=y,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Oe(),this.relativeTargetOrigin=Oe(),Go(this.relativeTargetOrigin,this.layout.layoutBox,y.layout.layoutBox),Xt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=Oe(),this.targetWithTransforms=Oe()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),LN(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Xt(this.target,this.layout.layoutBox),sI(this.target,this.targetDelta)):Xt(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const y=this.getClosestProjectingParent();y&&!!y.resumingFrom==!!this.resumingFrom&&!y.options.layoutScroll&&y.target&&this.animationProgress!==1?(this.relativeParent=y,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Oe(),this.relativeTargetOrigin=Oe(),Go(this.relativeTargetOrigin,this.target,y.target),Xt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}Po&&ni.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||Kd(this.parent.latestValues)||iI(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var o;const l=this.getLead(),u=!!this.resumingFrom||this!==l;let c=!0;if((this.isProjectionDirty||!((o=this.parent)===null||o===void 0)&&o.isProjectionDirty)&&(c=!1),u&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===it.timestamp&&(c=!1),c)return;const{layout:f,layoutId:d}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(f||d))return;Xt(this.layoutCorrected,this.layout.layoutBox);const p=this.treeScale.x,y=this.treeScale.y;WN(this.layoutCorrected,this.treeScale,this.path,u),l.layout&&!l.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(l.target=l.layout.layoutBox,l.targetWithTransforms=Oe());const{target:S}=l;if(!S){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Q_(this.prevProjectionDelta.x,this.projectionDelta.x),Q_(this.prevProjectionDelta.y,this.projectionDelta.y)),Ko(this.projectionDelta,this.layoutCorrected,S,this.latestValues),(this.treeScale.x!==p||this.treeScale.y!==y||!r1(this.projectionDelta.x,this.prevProjectionDelta.x)||!r1(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",S)),Po&&ni.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){var l;if((l=this.options.visualElement)===null||l===void 0||l.scheduleRender(),o){const u=this.getStack();u&&u.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=ts(),this.projectionDelta=ts(),this.projectionDeltaWithTransform=ts()}setAnimationOrigin(o,l=!1){const u=this.snapshot,c=u?u.latestValues:{},f={...this.latestValues},d=ts();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!l;const p=Oe(),y=u?u.source:void 0,S=this.layout?this.layout.source:void 0,x=y!==S,R=this.getStack(),w=!R||R.members.length<=1,v=!!(x&&!w&&this.options.crossfade===!0&&!this.path.some(kM));this.animationProgress=0;let T;this.mixTargetDelta=k=>{const b=k/1e3;a1(d.x,o.x,b),a1(d.y,o.y,b),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Go(p,this.layout.layoutBox,this.relativeParent.layout.layoutBox),RM(this.relativeTarget,this.relativeTargetOrigin,p,b),T&&dM(this.relativeTarget,T)&&(this.isProjectionDirty=!1),T||(T=Oe()),Xt(T,this.relativeTarget)),x&&(this.animationValues=f,aM(f,c,this.latestValues,b,v,w)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=b},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Br(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Ce.update(()=>{au.hasAnimatedSinceResize=!0,this.currentAnimation=tM(0,i1,{...o,onUpdate:l=>{this.mixTargetDelta(l),o.onUpdate&&o.onUpdate(l)},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(i1),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:l,target:u,layout:c,latestValues:f}=o;if(!(!l||!u||!c)){if(this!==o&&this.layout&&c&&mI(this.options.animationType,this.layout.layoutBox,c.layoutBox)){u=this.target||Oe();const d=qt(this.layout.layoutBox.x);u.x.min=o.target.x.min,u.x.max=u.x.min+d;const p=qt(this.layout.layoutBox.y);u.y.min=o.target.y.min,u.y.max=u.y.min+p}Xt(l,u),rs(l,f),Ko(this.projectionDeltaWithTransform,this.layoutCorrected,l,f)}}registerSharedNode(o,l){this.sharedNodes.has(o)||this.sharedNodes.set(o,new pM),this.sharedNodes.get(o).add(l);const c=l.options.initialPromotionConfig;l.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(l):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var o;const{layoutId:l}=this.options;return l?((o=this.getStack())===null||o===void 0?void 0:o.lead)||this:this}getPrevLead(){var o;const{layoutId:l}=this.options;return l?(o=this.getStack())===null||o===void 0?void 0:o.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:l,preserveFollowOpacity:u}={}){const c=this.getStack();c&&c.promote(this,u),o&&(this.projectionDelta=void 0,this.needsReset=!0),l&&this.setOptions({transition:l})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let l=!1;const{latestValues:u}=o;if((u.z||u.rotate||u.rotateX||u.rotateY||u.rotateZ||u.skewX||u.skewY)&&(l=!0),!l)return;const c={};u.z&&uf("z",o,c,this.animationValues);for(let f=0;f<lf.length;f++)uf(`rotate${lf[f]}`,o,c,this.animationValues),uf(`skew${lf[f]}`,o,c,this.animationValues);o.render();for(const f in c)o.setStaticValue(f,c[f]),this.animationValues&&(this.animationValues[f]=c[f]);o.scheduleRender()}getProjectionStyles(o){var l,u;if(!this.instance||this.isSVG)return;if(!this.isVisible)return gM;const c={visibility:""},f=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,c.opacity="",c.pointerEvents=su(o==null?void 0:o.pointerEvents)||"",c.transform=f?f(this.latestValues,""):"none",c;const d=this.getLead();if(!this.projectionDelta||!this.layout||!d.target){const x={};return this.options.layoutId&&(x.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,x.pointerEvents=su(o==null?void 0:o.pointerEvents)||""),this.hasProjected&&!ti(this.latestValues)&&(x.transform=f?f({},""):"none",this.hasProjected=!1),x}const p=d.animationValues||d.latestValues;this.applyTransformsToTarget(),c.transform=mM(this.projectionDeltaWithTransform,this.treeScale,p),f&&(c.transform=f(p,c.transform));const{x:y,y:S}=this.projectionDelta;c.transformOrigin=`${y.origin*100}% ${S.origin*100}% 0`,d.animationValues?c.opacity=d===this?(u=(l=p.opacity)!==null&&l!==void 0?l:this.latestValues.opacity)!==null&&u!==void 0?u:1:this.preserveOpacity?this.latestValues.opacity:p.opacityExit:c.opacity=d===this?p.opacity!==void 0?p.opacity:"":p.opacityExit!==void 0?p.opacityExit:0;for(const x in Zu){if(p[x]===void 0)continue;const{correct:R,applyTo:w}=Zu[x],v=c.transform==="none"?p[x]:R(p[x],d);if(w){const T=w.length;for(let k=0;k<T;k++)c[w[k]]=v}else c[x]=v}return this.options.layoutId&&(c.pointerEvents=d===this?su(o==null?void 0:o.pointerEvents)||"":"none"),c}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>{var l;return(l=o.currentAnimation)===null||l===void 0?void 0:l.stop()}),this.root.nodes.forEach(s1),this.root.sharedNodes.clear()}}}function vM(t){t.updateLayout()}function _M(t){var e;const n=((e=t.resumeFrom)===null||e===void 0?void 0:e.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&n&&t.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:i}=t.layout,{animationType:s}=t.options,o=n.source!==t.layout.source;s==="size"?Zt(d=>{const p=o?n.measuredBox[d]:n.layoutBox[d],y=qt(p);p.min=r[d].min,p.max=p.min+y}):mI(s,n.layoutBox,r)&&Zt(d=>{const p=o?n.measuredBox[d]:n.layoutBox[d],y=qt(r[d]);p.max=p.min+y,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[d].max=t.relativeTarget[d].min+y)});const l=ts();Ko(l,r,n.layoutBox);const u=ts();o?Ko(u,t.applyTransform(i,!0),n.measuredBox):Ko(u,r,n.layoutBox);const c=!hI(l);let f=!1;if(!t.resumeFrom){const d=t.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:p,layout:y}=d;if(p&&y){const S=Oe();Go(S,n.layoutBox,p.layoutBox);const x=Oe();Go(x,r,y.layoutBox),fI(S,x)||(f=!0),d.options.layoutRoot&&(t.relativeTarget=x,t.relativeTargetOrigin=S,t.relativeParent=d)}}}t.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:u,layoutDelta:l,hasLayoutChanged:c,hasRelativeTargetChanged:f})}else if(t.isLead()){const{onExitComplete:r}=t.options;r&&r()}t.options.transition=void 0}function wM(t){Po&&ni.totalNodes++,t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function EM(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function TM(t){t.clearSnapshot()}function s1(t){t.clearMeasurements()}function SM(t){t.isLayoutDirty=!1}function AM(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function o1(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function IM(t){t.resolveTargetDelta()}function xM(t){t.calcProjection()}
vendor: 6,595 bytes, line 2903
2903function CM(t){t.resetSkewAndRotation()}function PM(t){t.removeLeadSnapshot()}function a1(t,e,n){t.translate=ke(e.translate,0,n),t.scale=ke(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function l1(t,e,n,r){t.min=ke(e.min,n.min,r),t.max=ke(e.max,n.max,r)}function RM(t,e,n,r){l1(t.x,e.x,n.x,r),l1(t.y,e.y,n.y,r)}function kM(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const VM={duration:.45,ease:[.4,0,.1,1]},u1=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),c1=u1("applewebkit/")&&!u1("chrome/")?Math.round:Kt;function h1(t){t.min=c1(t.min),t.max=c1(t.max)}function DM(t){h1(t.x),h1(t.y)}function mI(t,e,n){return t==="position"||t==="preserve-aspect"&&!MN(n1(e),n1(n),.2)}function bM(t){var e;return t!==t.root&&((e=t.scroll)===null||e===void 0?void 0:e.wasRoot)}const NM=pI({attachResizeListener:(t,e)=>Ca(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),cf={current:void 0},gI=pI({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!cf.current){const t=new NM({});t.mount(window),t.setOptions({layoutScroll:!0}),cf.current=t}return cf.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),MM={pan:{Feature:XN},drag:{Feature:YN,ProjectionNode:gI,MeasureLayout:lI}};function f1(t,e,n){const{props:r}=t;t.animationState&&r.whileHover&&t.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,s=r[i];s&&Ce.postRender(()=>s(e,za(e)))}class LM extends Kr{mount(){const{current:e}=this.node;e&&(this.unmount=M5(e,n=>(f1(this.node,n,"Start"),r=>f1(this.node,r,"End"))))}unmount(){}}class OM extends Kr{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch{e=!0}!e||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Ba(Ca(this.node.current,"focus",()=>this.onFocus()),Ca(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function d1(t,e,n){const{props:r}=t;t.animationState&&r.whileTap&&t.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),s=r[i];s&&Ce.postRender(()=>s(e,za(e)))}class FM extends Kr{mount(){const{current:e}=this.node;e&&(this.unmount=j5(e,n=>(d1(this.node,n,"Start"),(r,{success:i})=>d1(this.node,r,i?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const qd=new WeakMap,hf=new WeakMap,jM=t=>{const e=qd.get(t.target);e&&e(t)},BM=t=>{t.forEach(jM)};function zM({root:t,...e}){const n=t||document;hf.has(n)||hf.set(n,{});const r=hf.get(n),i=JSON.stringify(e);return r[i]||(r[i]=new IntersectionObserver(BM,{root:t,...e})),r[i]}function UM(t,e,n){const r=zM(e);return qd.set(t,n),r.observe(t),()=>{qd.delete(t),r.unobserve(t)}}const $M={some:0,all:1};class HM extends Kr{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:n,margin:r,amount:i="some",once:s}=e,o={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:$M[i]},l=u=>{const{isIntersecting:c}=u;if(this.isInView===c||(this.isInView=c,s&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:f,onViewportLeave:d}=this.node.getProps(),p=c?f:d;p&&p(u)};return UM(this.node.current,o,l)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:n}=this.node;["amount","margin","root"].some(WM(e,n))&&this.startObserver()}unmount(){}}function WM({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const KM={inView:{Feature:HM},tap:{Feature:FM},focus:{Feature:OM},hover:{Feature:LM}},GM={layout:{ProjectionNode:gI,MeasureLayout:lI}},Qd={current:null},yI={current:!1};function qM(){if(yI.current=!0,!!jm)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Qd.current=t.matches;t.addListener(e),e()}else Qd.current=!1}const QM=[...UA,yt,zr],YM=t=>QM.find(zA(t)),p1=new WeakMap;function XM(t,e,n){for(const r in e){const i=e[r],s=n[r];if(Et(i))t.addValue(r,i);else if(Et(s))t.addValue(r,Ia(i,{owner:t}));else if(s!==i)if(t.hasValue(r)){const o=t.getValue(r);o.liveStyle===!0?o.jump(i):o.hasAnimated||o.set(i)}else{const o=t.getStaticValue(r);t.addValue(r,Ia(o!==void 0?o:i,{owner:t}))}}for(const r in n)e[r]===void 0&&t.removeValue(r);return e}const m1=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class ZM{scrapeMotionValuesFromProps(e,n,r){return{}}constructor({parent:e,props:n,presenceContext:r,reducedMotionConfig:i,blockInitialAnimation:s,visualState:o},l={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=fg,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const y=Nn.now();this.renderScheduledAt<y&&(this.renderScheduledAt=y,Ce.render(this.render,!1,!0))};const{latestValues:u,renderState:c,onUpdate:f}=o;this.onUpdate=f,this.latestValues=u,this.baseTarget={...u},this.initialValues=n.initial?{...u}:{},this.renderState=c,this.parent=e,this.props=n,this.presenceContext=r,this.depth=e?e.depth+1:0,this.reducedMotionConfig=i,this.options=l,this.blockInitialAnimation=!!s,this.isControllingVariants=$c(n),this.isVariantNode=YS(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:d,...p}=this.scrapeMotionValuesFromProps(n,{},this);for(const y in p){const S=p[y];u[y]!==void 0&&Et(S)&&S.set(u[y],!1)}}mount(e){this.current=e,p1.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEac
vendor: 6,783 bytes, line 2903
2903h((n,r)=>this.bindToMotionValue(r,n)),yI.current||qM(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Qd.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){p1.delete(this.current),this.projection&&this.projection.unmount(),Br(this.notifyUpdate),Br(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const e in this.events)this.events[e].clear();for(const e in this.features){const n=this.features[e];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(e,n){this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();const r=Pi.has(e),i=n.on("change",l=>{this.latestValues[e]=l,this.props.onUpdate&&Ce.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),s=n.on("renderRequest",this.scheduleRender);let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,e,n)),this.valueSubscriptions.set(e,()=>{i(),s(),o&&o(),n.owner&&n.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e="animation";for(e in Ns){const n=Ns[e];if(!n)continue;const{isEnabled:r,Feature:i}=n;if(!this.features[e]&&i&&r(this.props)&&(this.features[e]=new i(this)),this.features[e]){const s=this.features[e];s.isMounted?s.update():(s.mount(),s.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Oe()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,n){this.latestValues[e]=n}update(e,n){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<m1.length;r++){const i=m1[r];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const s="on"+i,o=e[s];o&&(this.propEventSubscriptions[i]=this.on(i,o))}this.prevMotionValues=XM(this,this.scrapeMotionValuesFromProps(e,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(e),()=>n.variantChildren.delete(e)}addValue(e,n){const r=this.values.get(e);n!==r&&(r&&this.removeValue(e),this.bindToMotionValue(e,n),this.values.set(e,n),this.latestValues[e]=n.get())}removeValue(e){this.values.delete(e);const n=this.valueSubscriptions.get(e);n&&(n(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,n){if(this.props.values&&this.props.values[e])return this.props.values[e];let r=this.values.get(e);return r===void 0&&n!==void 0&&(r=Ia(n===null?void 0:n,{owner:this}),this.addValue(e,r)),r}readValue(e,n){var r;let i=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:(r=this.getBaseTargetFromProps(this.props,e))!==null&&r!==void 0?r:this.readValueFromInstance(this.current,e,this.options);return i!=null&&(typeof i=="string"&&(jA(i)||kA(i))?i=parseFloat(i):!YM(i)&&zr.test(n)&&(i=LA(e,n)),this.setBaseTarget(e,Et(i)?i.get():i)),Et(i)?i.get():i}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){var n;const{initial:r}=this.props;let i;if(typeof r=="string"||typeof r=="object"){const o=Km(this.props,r,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);o&&(i=o[e])}if(r&&i!==void 0)return i;const s=this.getBaseTargetFromProps(this.props,e);return s!==void 0&&!Et(s)?s:this.initialValues[e]!==void 0&&i===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new og),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}}class vI extends ZM{constructor(){super(...arguments),this.KeyframeResolver=$A}sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){return e.style?e.style[n]:void 0}removeValueFromRenderState(e,{vars:n,style:r}){delete n[e],delete r[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;Et(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function JM(t){return window.getComputedStyle(t)}class e6 extends vI{constructor(){super(...arguments),this.type="html",this.renderInstance=sA}readValueFromInstance(e,n){if(Pi.has(n)){const r=hg(n);return r&&r.default||0}else{const r=JM(e),i=(nA(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(e,{transformPagePoint:n}){return oI(e,n)}build(e,n,r){Qm(e,n,r.transformTemplate)}scrapeMotionValuesFromProps(e,n,r){return Jm(e,n,r)}}class t6 extends vI{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Oe}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(Pi.has(n)){const r=hg(n);return r&&r.default||0}return n=oA.has(n)?n:$m(n),e.getAttribute(n)}scrapeMotionValuesFromProps(e,n,r){return uA(e,n,r)}build(e,n,r){Ym(e,n,this.isSVGTag,r.transformTemplate)}renderInstance(e,n,r,i){aA(e,n,r,i)}mount(e){this.isSVGTag=Zm(e.tagName),super.mount(e)}}const n6=(t,e)=>Wm(t)?new t6(e):new e6(e,{allowProjection:t!==j.Fragment}),r6=P5({...xN,...KM,...MM,...GM},n6),i6=$b(r6),s6=[{key:"home",label:"Home",component:N.jsx(rT,{config:ai})},{key:"publications",label:"Publications",component:N.jsx("div",{style:{padding:"32px"},children:"Publications content here."})},{key:"courses",label:"Courses",component:N.jsx("div",{style:{padding:"32px"},children:"Courses content here."})},{key:"students",label:"Students",component:N.jsx("div",{style:{padding:"32px"},children:"Students content here."})}];function o6(){var d;const[t,e]=j.useState("light"),[n,r]=j.useState("home"),i=j.useRef(null),[s,o]=j.useState(!1),[l,u]=j.useState("home");j.useEffect(()=>{document.documentElement.setAttribute("data-theme",t)},[t]),j.useEffect(()=>{if(n!=="home")return;const p=()=>{const y=i.current||document.getElementById("publications");
2903if(y){const S=y.getBoundingClientRect(),x=window.innerHeight;S.top<=x/2&&S.bottom>=0?u("publications"):u("home")}};return window.addEventListener("scroll",p),p(),()=>window.removeEventListener("scroll",p)},[n]),j.useEffect(()=>{s&&n==="home"&&setTimeout(()=>{if(i.current)i.current.scrollIntoView({behavior:"smooth",block:"start"});else{const p=document.getElementById("publications");p&&p.scrollIntoView({behavior:"smooth",block:"start"})}o(!1)},500),n!=="home"&&window.scrollTo({top:0,behavior:"smooth"})},[n,s]);const c=p=>{p==="publications"?n!=="home"?(r("home"),o(!0)):i.current&&i.current.scrollIntoView({behavior:"smooth",block:"start"}):p==="home"?n==="home"?(window.scrollTo({top:0,behavior:"smooth"}),u("home")):(r("home"),o(!1)):p==="life"?(r("life"),o(!1)):(r(p),o(!1))},f=()=>{r("home")};return N.jsx(N.Fragment,{children:n==="life"?N.jsx(kb,{onClose:f}):N.jsxs(N.Fragment,{children:[N.jsx(K2,{theme:t,setTheme:e,current:n,activeSection:l,onChange:c}),N.jsx("div",{style:{width:"100%",paddingTop:76,paddingLeft:100,paddingRight:48,boxSizing:"border-box",display:"flex",justifyContent:"center"},children:N.jsxs("div",{style:{display:"flex",width:"100%",maxWidth:1200,margin:"0 auto"},children:[N.jsx(F2,{config:ai}),N.jsx("div",{style:{flex:1,minHeight:"100vh",background:"var(--bg)",transition:"background var(--transition)"},children:N.jsx(Mb,{mode:"wait",children:N.jsx(i6.div,{initial:{opacity:0,y:30},animate:{opacity:1,y:0},exit:{opacity:0,y:-30},transition:{duration:.4},style:{padding:"32px 24px",maxWidth:900,margin:"0 auto"},children:n==="home"?N.jsx(rT,{config:ai,pubRef:i}):((d=s6.find(p=>p.key===n))==null?void 0:d.component)||null},n)})})]})})]})})}ff.createRoot(document.getElementById("root")).render(N.jsx(Ht.StrictMode,{children:N.jsx(o6,{})}));

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