vendor: 5,365 bytes, lines 1-2
1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/questionnaire-DR-OE8ma.js","assets/TopBanner-UQn7xzlX.js","assets/feuille-de-route-DCtkxTgR.js"])))=>i.map(i=>d[i]); 2function bS(t,n){for(var s=0;s<n.length;s++){const i=n[s];if(typeof i!="string"&&!Array.isArray(i)){for(const l in i)if(l!=="default"&&!(l in t)){const u=Object.getOwnPropertyDescriptor(i,l);u&&Object.defineProperty(t,l,u.get?u:{enumerable:!0,get:()=>i[l]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}function _S(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var bh={exports:{}},gi={};var ky;function SS(){if(ky)return gi;ky=1;var t=Symbol.for("react.transitional.element"),n=Symbol.for("react.fragment");function s(i,l,u){var c=null;if(u!==void 0&&(c=""+u),l.key!==void 0&&(c=""+l.key),"key"in l){u={};for(var d in l)d!=="key"&&(u[d]=l[d])}else u=l;return l=u.ref,{$$typeof:t,type:i,key:c,ref:l!==void 0?l:null,props:u}}return gi.Fragment=n,gi.jsx=s,gi.jsxs=s,gi}var jy;function wS(){return jy||(jy=1,bh.exports=SS()),bh.exports}var Y=wS(),_h={exports:{}},he={};var My;function ES(){if(My)return he;My=1;var t=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler"),u=Symbol.for("react.consumer"),c=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),y=Symbol.for("react.activity"),b=Symbol.iterator;function _(k){return k===null||typeof k!="object"?null:(k=b&&k[b]||k["@@iterator"],typeof k=="function"?k:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},A=Object.assign,R={};function O(k,$,X){this.props=k,this.context=$,this.refs=R,this.updater=X||w}O.prototype.isReactComponent={},O.prototype.setState=function(k,$){if(typeof k!="object"&&typeof k!="function"&&k!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,k,$,"setState")},O.prototype.forceUpdate=function(k){this.updater.enqueueForceUpdate(this,k,"forceUpdate")};function U(){}U.prototype=O.prototype;function j(k,$,X){this.props=k,this.context=$,this.refs=R,this.updater=X||w}var L=j.prototype=new U;L.constructor=j,A(L,O.prototype),L.isPureReactComponent=!0;var Q=Array.isArray;function V(){}var q={H:null,A:null,T:null,S:null},K=Object.prototype.hasOwnProperty;function J(k,$,X){var W=X.ref;return{$$typeof:t,type:k,key:$,ref:W!==void 0?W:null,props:X}}function le(k,$){return J(k.type,$,k.props)}function se(k){return typeof k=="object"&&k!==null&&k.$$typeof===t}function me(k){var $={"=":"=0",":":"=2"};return"$"+k.replace(/[=:]/g,function(X){return $[X]})}var Ce=/\/+/g;function Ye(k,$){return typeof k=="object"&&k!==null&&k.key!=null?me(""+k.key):$.toString(36)}function Be(k){switch(k.status){case"fulfilled":return k.value;case"rejected":throw k.reason;default:switch(typeof k.status=="string"?k.then(V,V):(k.status="pending",k.then(function($){k.status==="pending"&&(k.status="fulfilled",k.value=$)},function($){k.status==="pending"&&(k.status="rejected",k.reason=$)})),k.status){case"fulfilled":return k.value;case"rejected":throw k.reason}}throw k}function B(k,$,X,W,ae){var pe=typeof k;(pe==="undefined"||pe==="boolean")&&(k=null);var Se=!1;if(k===null)Se=!0;else switch(pe){case"bigint":case"string":case"number":Se=!0;break;case"object":switch(k.$$typeof){case t:case n:Se=!0;break;case m:return Se=k._init,B(Se(k._payload),$,X,W,ae)}}if(Se)return ae=ae(k),Se=W===""?"."+Ye(k,0):W,Q(ae)?(X="",Se!=null&&(X=Se.replace(Ce,"$&/")+"/"),B(ae,$,X,"",function(Sn){return Sn})):ae!=null&&(se(ae)&&(ae=le(ae,X+(ae.key==null||k&&k.key===ae.key?"":(""+ae.key).replace(Ce,"$&/")+"/")+Se)),$.push(ae)),1;Se=0;var Fe=W===""?".":W+":";if(Q(k))for(var Ne=0;Ne<k.length;Ne++)W=k[Ne],pe=Fe+Ye(W,Ne),Se+=B(W,$,X,pe,ae);else if(Ne=_(k),typeof Ne=="function")for(k=Ne.call(k),Ne=0;!(W=k.next()).done;)W=W.value,pe=Fe+Ye(W,Ne++),Se+=B(W,$,X,pe,ae);else if(pe==="object"){if(typeof k.then=="function")return B(Be(k),$,X,W,ae);throw $=String(k),Error("Objects are not valid as a React child (found: "+($==="[object Object]"?"object with keys {"+Object.keys(k).join(", ")+"}":$)+"). If you meant to render a collection of children, use an array instead.")}return Se}function F(k,$,X){if(k==null)return k;var W=[],ae=0;return B(k,W,"","",function(pe){return $.call(X,pe,ae++)}),W}function oe(k){if(k._status===-1){var $=k._result;$=$(),$.then(function(X){(k._status===0||k._status===-1)&&(k._status=1,k._result=X)},function(X){(k._status===0||k._status===-1)&&(k._status=2,k._result=X)}),k._status===-1&&(k._status=0,k._result=$)}if(k._status===1)return k._result.default;throw k._result}var Re=typeof reportError=="function"?reportError:function(k){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var $=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof k=="object"&&k!==null&&typeof k.message=="string"?String(k.message):String(k),error:k});if(!window.dispatchEvent($))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",k);return}console.error(k)}
vendor: 5,994 bytes, line 2
2,Oe={map:F,forEach:function(k,$,X){F(k,function(){$.apply(this,arguments)},X)},count:function(k){var $=0;return F(k,function(){$++}),$},toArray:function(k){return F(k,function($){return $})||[]},only:function(k){if(!se(k))throw Error("React.Children.only expected to receive a single React element child.");return k}};return he.Activity=y,he.Children=Oe,he.Component=O,he.Fragment=s,he.Profiler=l,he.PureComponent=j,he.StrictMode=i,he.Suspense=p,he.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=q,he.__COMPILER_RUNTIME={__proto__:null,c:function(k){return q.H.useMemoCache(k)}},he.cache=function(k){return function(){return k.apply(null,arguments)}},he.cacheSignal=function(){return null},he.cloneElement=function(k,$,X){if(k==null)throw Error("The argument must be a React element, but you passed "+k+".");var W=A({},k.props),ae=k.key;if($!=null)for(pe in $.key!==void 0&&(ae=""+$.key),$)!K.call($,pe)||pe==="key"||pe==="__self"||pe==="__source"||pe==="ref"&&$.ref===void 0||(W[pe]=$[pe]);var pe=arguments.length-2;if(pe===1)W.children=X;else if(1<pe){for(var Se=Array(pe),Fe=0;Fe<pe;Fe++)Se[Fe]=arguments[Fe+2];W.children=Se}return J(k.type,ae,W)},he.createContext=function(k){return k={$$typeof:c,_currentValue:k,_currentValue2:k,_threadCount:0,Provider:null,Consumer:null},k.Provider=k,k.Consumer={$$typeof:u,_context:k},k},he.createElement=function(k,$,X){var W,ae={},pe=null;if($!=null)for(W in $.key!==void 0&&(pe=""+$.key),$)K.call($,W)&&W!=="key"&&W!=="__self"&&W!=="__source"&&(ae[W]=$[W]);var Se=arguments.length-2;if(Se===1)ae.children=X;else if(1<Se){for(var Fe=Array(Se),Ne=0;Ne<Se;Ne++)Fe[Ne]=arguments[Ne+2];ae.children=Fe}if(k&&k.defaultProps)for(W in Se=k.defaultProps,Se)ae[W]===void 0&&(ae[W]=Se[W]);return J(k,pe,ae)},he.createRef=function(){return{current:null}},he.forwardRef=function(k){return{$$typeof:d,render:k}},he.isValidElement=se,he.lazy=function(k){return{$$typeof:m,_payload:{_status:-1,_result:k},_init:oe}},he.memo=function(k,$){return{$$typeof:g,type:k,compare:$===void 0?null:$}},he.startTransition=function(k){var $=q.T,X={};q.T=X;try{var W=k(),ae=q.S;ae!==null&&ae(X,W),typeof W=="object"&&W!==null&&typeof W.then=="function"&&W.then(V,Re)}catch(pe){Re(pe)}finally{$!==null&&X.types!==null&&($.types=X.types),q.T=$}},he.unstable_useCacheRefresh=function(){return q.H.useCacheRefresh()},he.use=function(k){return q.H.use(k)},he.useActionState=function(k,$,X){return q.H.useActionState(k,$,X)},he.useCallback=function(k,$){return q.H.useCallback(k,$)},he.useContext=function(k){return q.H.useContext(k)},he.useDebugValue=function(){},he.useDeferredValue=function(k,$){return q.H.useDeferredValue(k,$)},he.useEffect=function(k,$){return q.H.useEffect(k,$)},he.useEffectEvent=function(k){return q.H.useEffectEvent(k)},he.useId=function(){return q.H.useId()},he.useImperativeHandle=function(k,$,X){return q.H.useImperativeHandle(k,$,X)},he.useInsertionEffect=function(k,$){return q.H.useInsertionEffect(k,$)},he.useLayoutEffect=function(k,$){return q.H.useLayoutEffect(k,$)},he.useMemo=function(k,$){return q.H.useMemo(k,$)},he.useOptimistic=function(k,$){return q.H.useOptimistic(k,$)},he.useReducer=function(k,$,X){return q.H.useReducer(k,$,X)},he.useRef=function(k){return q.H.useRef(k)},he.useState=function(k){return q.H.useState(k)},he.useSyncExternalStore=function(k,$,X){return q.H.useSyncExternalStore(k,$,X)},he.useTransition=function(){return q.H.useTransition()},he.version="19.2.5",he}var Uy;function Gi(){return Uy||(Uy=1,_h.exports=ES()),_h.exports}var re=Gi();const ma=_S(re),Bx=bS({__proto__:null,default:ma},[re]);var Sh={exports:{}},yi={},wh={exports:{}},Eh={};var Ny;function TS(){return Ny||(Ny=1,(function(t){function n(B,F){var oe=B.length;B.push(F);e:for(;0<oe;){var Re=oe-1>>>1,Oe=B[Re];if(0<l(Oe,F))B[Re]=F,B[oe]=Oe,oe=Re;else break e}}function s(B){return B.length===0?null:B[0]}function i(B){if(B.length===0)return null;var F=B[0],oe=B.pop();if(oe!==F){B[0]=oe;e:for(var Re=0,Oe=B.length,k=Oe>>>1;Re<k;){var $=2*(Re+1)-1,X=B[$],W=$+1,ae=B[W];if(0>l(X,oe))W<Oe&&0>l(ae,X)?(B[Re]=ae,B[W]=oe,Re=W):(B[Re]=X,B[$]=oe,Re=$);else if(W<Oe&&0>l(ae,oe))B[Re]=ae,B[W]=oe,Re=W;else break e}}return F}function l(B,F){var oe=B.sortIndex-F.sortIndex;return oe!==0?oe:B.id-F.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var u=performance;t.unstable_now=function(){return u.now()}}else{var c=Date,d=c.now();t.unstable_now=function(){return c.now()-d}}var p=[],g=[],m=1,y=null,b=3,_=!1,w=!1,A=!1,R=!1,O=typeof setTimeout=="function"?setTimeout:null,U=typeof clearTimeout=="function"?clearTimeout:null,j=typeof setImmediate<"u"?setImmediate:null;function L(B){for(var F=s(g);F!==null;){if(F.callback===null)i(g);else if(F.startTime<=B)i(g),F.sortIndex=F.expirationTime,n(p,F);else break;F=s(g)}}function Q(B){if(A=!1,L(B),!w)if(s(p)!==null)w=!0,V||(V=!0,me());else{var F=s(g);F!==null&&Be(Q,F.startTime-B)}}var V=!1,q=-1,K=5,J=-1;function le(){return R?!0:!(t.unstable_now()-J<K)}function se(){if(R=!1,V){var B=t.unstable_now();J=B;var F=!0;try{e:{w=!1,A&&(A=!1,U(q),q=-1),_=!0;var oe=b;try{t:{for(L(B),y=s(p);y!==null&&!(y.expirationTime>B&&le());){var Re=y.callback;if(typeof Re=="function"){y.callback=null,b=y.priorityLevel;var Oe=Re(y.expirationTime<=B);if(B=t.unstable_now(),typeof Oe=="function"){y.callback=Oe,L(B),F=!0;break t}y===s(p)&&i(p),L(B)}else i(p);y=s(p)}if(y!==null)F=!0;else{var k=s(g);k!==null&&Be(Q,k.startTime-B),F=!1}}break e}finally{y=null,b=oe,_=!1}F=void 0}}finally{F?me():V=!1}}}var me;if(typeof j=="function")me=function(){j(se)};else if(typeof MessageChannel<"u"){var Ce=new MessageChannel,Ye=Ce.port2;Ce.port1.onmessage=se,me=function(){Ye.postMessage(null)}}else me=function(){O(se,0)};function Be(B,F){q=O(function(){B(t.unstable_now())},F)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(B){B.
vendor: 8,100 bytes, line 2
2callback=null},t.unstable_forceFrameRate=function(B){0>B||125<B?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):K=0<B?Math.floor(1e3/B):5},t.unstable_getCurrentPriorityLevel=function(){return b},t.unstable_next=function(B){switch(b){case 1:case 2:case 3:var F=3;break;default:F=b}var oe=b;b=F;try{return B()}finally{b=oe}},t.unstable_requestPaint=function(){R=!0},t.unstable_runWithPriority=function(B,F){switch(B){case 1:case 2:case 3:case 4:case 5:break;default:B=3}var oe=b;b=B;try{return F()}finally{b=oe}},t.unstable_scheduleCallback=function(B,F,oe){var Re=t.unstable_now();switch(typeof oe=="object"&&oe!==null?(oe=oe.delay,oe=typeof oe=="number"&&0<oe?Re+oe:Re):oe=Re,B){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=oe+Oe,B={id:m++,callback:F,priorityLevel:B,startTime:oe,expirationTime:Oe,sortIndex:-1},oe>Re?(B.sortIndex=oe,n(g,B),s(p)===null&&B===s(g)&&(A?(U(q),q=-1):A=!0,Be(Q,oe-Re))):(B.sortIndex=Oe,n(p,B),w||_||(w=!0,V||(V=!0,me()))),B},t.unstable_shouldYield=le,t.unstable_wrapCallback=function(B){var F=b;return function(){var oe=b;b=F;try{return B.apply(this,arguments)}finally{b=oe}}}})(Eh)),Eh}var Dy;function RS(){return Dy||(Dy=1,wh.exports=TS()),wh.exports}var Th={exports:{}},_t={};var Ly;function AS(){if(Ly)return _t;Ly=1;var t=Gi();function n(p){var g="https://react.dev/errors/"+p;if(1<arguments.length){g+="?args[]="+encodeURIComponent(arguments[1]);for(var m=2;m<arguments.length;m++)g+="&args[]="+encodeURIComponent(arguments[m])}return"Minified React error #"+p+"; visit "+g+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(){}var i={d:{f:s,r:function(){throw Error(n(522))},D:s,C:s,L:s,m:s,X:s,S:s,M:s},p:0,findDOMNode:null},l=Symbol.for("react.portal");function u(p,g,m){var y=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:l,key:y==null?null:""+y,children:p,containerInfo:g,implementation:m}}var c=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function d(p,g){if(p==="font")return"";if(typeof g=="string")return g==="use-credentials"?g:""}return _t.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,_t.createPortal=function(p,g){var m=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!g||g.nodeType!==1&&g.nodeType!==9&&g.nodeType!==11)throw Error(n(299));return u(p,g,null,m)},_t.flushSync=function(p){var g=c.T,m=i.p;try{if(c.T=null,i.p=2,p)return p()}finally{c.T=g,i.p=m,i.d.f()}},_t.preconnect=function(p,g){typeof p=="string"&&(g?(g=g.crossOrigin,g=typeof g=="string"?g==="use-credentials"?g:"":void 0):g=null,i.d.C(p,g))},_t.prefetchDNS=function(p){typeof p=="string"&&i.d.D(p)},_t.preinit=function(p,g){if(typeof p=="string"&&g&&typeof g.as=="string"){var m=g.as,y=d(m,g.crossOrigin),b=typeof g.integrity=="string"?g.integrity:void 0,_=typeof g.fetchPriority=="string"?g.fetchPriority:void 0;m==="style"?i.d.S(p,typeof g.precedence=="string"?g.precedence:void 0,{crossOrigin:y,integrity:b,fetchPriority:_}):m==="script"&&i.d.X(p,{crossOrigin:y,integrity:b,fetchPriority:_,nonce:typeof g.nonce=="string"?g.nonce:void 0})}},_t.preinitModule=function(p,g){if(typeof p=="string")if(typeof g=="object"&&g!==null){if(g.as==null||g.as==="script"){var m=d(g.as,g.crossOrigin);i.d.M(p,{crossOrigin:m,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0})}}else g==null&&i.d.M(p)},_t.preload=function(p,g){if(typeof p=="string"&&typeof g=="object"&&g!==null&&typeof g.as=="string"){var m=g.as,y=d(m,g.crossOrigin);i.d.L(p,m,{crossOrigin:y,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0,type:typeof g.type=="string"?g.type:void 0,fetchPriority:typeof g.fetchPriority=="string"?g.fetchPriority:void 0,referrerPolicy:typeof g.referrerPolicy=="string"?g.referrerPolicy:void 0,imageSrcSet:typeof g.imageSrcSet=="string"?g.imageSrcSet:void 0,imageSizes:typeof g.imageSizes=="string"?g.imageSizes:void 0,media:typeof g.media=="string"?g.media:void 0})}},_t.preloadModule=function(p,g){if(typeof p=="string")if(g){var m=d(g.as,g.crossOrigin);i.d.m(p,{as:typeof g.as=="string"&&g.as!=="script"?g.as:void 0,crossOrigin:m,integrity:typeof g.integrity=="string"?g.integrity:void 0})}else i.d.m(p)},_t.requestFormReset=function(p){i.d.r(p)},_t.unstable_batchedUpdates=function(p,g){return p(g)},_t.useFormState=function(p,g,m){return c.H.useFormState(p,g,m)},_t.useFormStatus=function(){return c.H.useHostTransitionStatus()},_t.version="19.2.5",_t}var zy;function pv(){if(zy)return Th.exports;zy=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(n){console.error(n)}}return t(),Th.exports=AS(),Th.exports}var Py;function OS(){if(Py)return yi;Py=1;var t=RS(),n=Gi(),s=pv();function i(e){var r="https://react.dev/errors/"+e;if(1<arguments.length){r+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)r+="&args[]="+encodeURIComponent(arguments[a])}return"Minified React error #"+e+"; visit "+r+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function l(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function u(e){var r=e,a=e;if(e.alternate)for(;r.return;)r=r.return;else{e=r;do r=e,(r.flags&4098)!==0&&(a=r.return),e=r.return;while(e)}return r.tag===3?a:null}function c(e){if(e.tag===13){var r=e.memoizedState;if(r===null&&(e=e.alternate,e!==null&&(r=e.memoizedState)),r!==null)return r.dehydrated}return null}function d(e){if(e.tag===31){var r=e.memoizedState;if(r===null&&(e=e.alternate,e!==null&&(r=e.memoizedState)),r!==null)return r.dehydrated}return null}function p(e){if(u(e)!==e)throw Error(i(188))}function g(e){var r=e.alternate;if(!r){if(r=u(e),r===null)throw Error(i(188));return r!==e?null:e}for(var a=e,o=r;;){var h=a.return;if(h===null)break;var f=h.alternate;if(f===null){if(o=h.return,o!==null){a=o;continue}break}if(h.child===f.child){for(f=h.child;f;){if(f===a)return p(h),e;if(f===o)return p(h),r;f=f.sibling}throw Error(i(188))}if(a.return!==o.return)a=h,o=f;else{for(var v=!1,S=h.child;S;){if(S===a){v=!0,a=h,o=f;break}if(S===o){v=!0,o=h,a=f;break}S=S.sibling}if(!v){for(S=f.child;S;){if(S===a){v=!0,a=f,o=h;break}if(S===o){v=!0,o=f,a=h;break}S=S.sibling}if(!v)throw Error(i(189))}}if(a.alternate!==o)throw Error(i(190))}if(a.tag!==3)throw Error(i(188));return a.stateNode.current===a?e:r}function m(e){var r=e.tag;if(r===5||r===26||r===27||r===6)return e;for(e=e.child;e!==null;){if(r=m(e),r!==null)return r;e=e.sibling}return null}var y=Object.assign,b=Symbol.for("react.element"),_=Symbol.for("react.transitional.element"),w=Symbol.for("react.portal"),A=Symbol.for("react.fragment"),R=Symbol.for("react.strict_mode"),O=Symbol.for("react.profiler"),U=Symbol.for("react.consumer"),j=Symbol.for("react.context"),L=Symbol.for("react.forward_ref"),Q=Symbol.for("react.suspense"),V=Symbol.for("react.suspense_list"),q=Symbol.for("react.memo"),K=Symbol.for("react.lazy"),J=Symbol.for("react.activity"),le=Symbol.for("react.memo_cache_sentinel"),se=Symbol.iterator;function me(e){return e===null||typeof e!="object"?null:(e=se&&e[se]||e["@@iterator"],typeof e=="function"?e:null)}var Ce=Symbol.for("react.client.reference");function Ye(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===Ce?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case A:return"Fragment";case O:return"Profiler";case R:return"StrictMode";case Q:return"Suspense";case V:return"SuspenseList";case J:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case w:return"Portal";case j:return e.displayName||"Context";case U:return(e._context.displayName||"Context")+".Consumer";case L:var r=e.render;return e=e.displayName,e||(e=r.displayName||r.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;
vendor: 12,655 bytes, lines 2-9
2case q:return r=e.displayName||null,r!==null?r:Ye(e.type)||"Memo";case K:r=e._payload,e=e._init;try{return Ye(e(r))}catch{}}return null}var Be=Array.isArray,B=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F=s.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,oe={pending:!1,data:null,method:null,action:null},Re=[],Oe=-1;function k(e){return{current:e}}function $(e){0>Oe||(e.current=Re[Oe],Re[Oe]=null,Oe--)}function X(e,r){Oe++,Re[Oe]=e.current,e.current=r}var W=k(null),ae=k(null),pe=k(null),Se=k(null);function Fe(e,r){switch(X(pe,r),X(ae,e),X(W,null),r.nodeType){case 9:case 11:e=(e=r.documentElement)&&(e=e.namespaceURI)?Wg(e):0;break;default:if(e=r.tagName,r=r.namespaceURI)r=Wg(r),e=ey(r,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}$(W),X(W,e)}function Ne(){$(W),$(ae),$(pe)}function Sn(e){e.memoizedState!==null&&X(Se,e);var r=W.current,a=ey(r,e.type);r!==a&&(X(ae,e),X(W,a))}function wn(e){ae.current===e&&($(W),$(ae)),Se.current===e&&($(Se),hi._currentValue=oe)}var Jn,_a;function cn(e){if(Jn===void 0)try{throw Error()}catch(a){var r=a.stack.trim().match(/\n( *(at )?)/);Jn=r&&r[1]||"",_a=-1<a.stack.indexOf(` 3 at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return` 4`+Jn+e+_a}var Sa=!1;function ps(e,r){if(!e||Sa)return"";Sa=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var o={DetermineComponentFrameRoot:function(){try{if(r){var G=function(){throw Error()};if(Object.defineProperty(G.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(G,[])}catch(P){var z=P}Reflect.construct(e,[],G)}else{try{G.call()}catch(P){z=P}e.call(G.prototype)}}else{try{throw Error()}catch(P){z=P}(G=e())&&typeof G.catch=="function"&&G.catch(function(){})}}catch(P){if(P&&z&&typeof P.stack=="string")return[P.stack,z.stack]}return[null,null]}};o.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var h=Object.getOwnPropertyDescriptor(o.DetermineComponentFrameRoot,"name");h&&h.configurable&&Object.defineProperty(o.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var f=o.DetermineComponentFrameRoot(),v=f[0],S=f[1];if(v&&S){var C=v.split(` 5`),D=S.split(` 6`);for(h=o=0;o<C.length&&!C[o].includes("DetermineComponentFrameRoot");)o++;for(;h<D.length&&!D[h].includes("DetermineComponentFrameRoot");)h++;if(o===C.length||h===D.length)for(o=C.length-1,h=D.length-1;1<=o&&0<=h&&C[o]!==D[h];)h--;for(;1<=o&&0<=h;o--,h--)if(C[o]!==D[h]){if(o!==1||h!==1)do if(o--,h--,0>h||C[o]!==D[h]){var H=` 7`+C[o].replace(" at new "," at ");return e.displayName&&H.includes("<anonymous>")&&(H=H.replace("<anonymous>",e.displayName)),H}while(1<=o&&0<=h);break}}}finally{Sa=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?cn(a):""}function Fi(e,r){switch(e.tag){case 26:case 27:case 5:return cn(e.type);case 16:return cn("Lazy");case 13:return e.child!==r&&r!==null?cn("Suspense Fallback"):cn("Suspense");case 19:return cn("SuspenseList");case 0:case 15:return ps(e.type,!1);case 11:return ps(e.type.render,!1);case 1:return ps(e.type,!0);case 31:return cn("Activity");default:return""}}function En(e){try{var r="",a=null;do r+=Fi(e,a),a=e,e=e.return;while(e);return r}catch(o){return` 8Error generating stack: `+o.message+` 9`+o.stack}}var Dr=Object.prototype.hasOwnProperty,tn=t.unstable_scheduleCallback,wa=t.unstable_cancelCallback,Qi=t.unstable_shouldYield,iu=t.unstable_requestPaint,bt=t.unstable_now,ze=t.unstable_getCurrentPriorityLevel,ct=t.unstable_ImmediatePriority,hn=t.unstable_UserBlockingPriority,gs=t.unstable_NormalPriority,eb=t.unstable_LowPriority,Uf=t.unstable_IdlePriority,tb=t.log,nb=t.unstable_setDisableYieldValue,Ea=null,Nt=null;function Xn(e){if(typeof tb=="function"&&nb(e),Nt&&typeof Nt.setStrictMode=="function")try{Nt.setStrictMode(Ea,e)}catch{}}var Dt=Math.clz32?Math.clz32:ab,rb=Math.log,sb=Math.LN2;function ab(e){return e>>>=0,e===0?32:31-(rb(e)/sb|0)|0}var Ji=256,Xi=262144,Zi=4194304;function Lr(e){var r=e&42;if(r!==0)return r;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Wi(e,r,a){var o=e.pendingLanes;if(o===0)return 0;var h=0,f=e.suspendedLanes,v=e.pingedLanes;e=e.warmLanes;var S=o&134217727;return S!==0?(o=S&~f,o!==0?h=Lr(o):(v&=S,v!==0?h=Lr(v):a||(a=S&~e,a!==0&&(h=Lr(a))))):(S=o&~f,S!==0?h=Lr(S):v!==0?h=Lr(v):a||(a=o&~e,a!==0&&(h=Lr(a)))),h===0?0:r!==0&&r!==h&&(r&f)===0&&(f=h&-h,a=r&-r,f>=a||f===32&&(a&4194048)!==0)?r:h}function Ta(e,r){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&r)===0}function ib(e,r){switch(e){case 1:case 2:case 4:case 8:case 64:return r+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return r+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Nf(){var e=Zi;return Zi<<=1,(Zi&62914560)===0&&(Zi=4194304),e}function ou(e){for(var r=[],a=0;31>a;a++)r.push(e);return r}function Ra(e,r){e.pendingLanes|=r,r!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function ob(e,r,a,o,h,f){var v=e.pendingLanes;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=a,e.entangledLanes&=a,e.errorRecoveryDisabledLanes&=a,e.shellSuspendCounter=0;var S=e.entanglements,C=e.expirationTimes,D=e.hiddenUpdates;for(a=v&~a;0<a;){var H=31-Dt(a),G=1<<H;S[H]=0,C[H]=-1;var z=D[H];if(z!==null)for(D[H]=null,H=0;H<z.length;H++){var P=z[H];P!==null&&(P.lane&=-536870913)}a&=~G}o!==0&&Df(e,o,0),f!==0&&h===0&&e.tag!==0&&(e.suspendedLanes|=f&~(v&~r))}function Df(e,r,a){e.pendingLanes|=r,e.suspendedLanes&=~r;var o=31-Dt(r);e.entangledLanes|=r,e.entanglements[o]=e.entanglements[o]|1073741824|a&261930}function Lf(e,r){var a=e.entangledLanes|=r;for(e=e.entanglements;a;){var o=31-Dt(a),h=1<<o;h&r|e[o]&r&&(e[o]|=r),a&=~h}}function zf(e,r){var a=r&-r;return a=(a&42)!==0?1:lu(a),(a&(e.suspendedLanes|r))!==0?0:a}function lu(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function uu(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Pf(){var e=F.p;return e!==0?e:(e=window.event,e===void 0?32:Ey(e.type))}function Bf(e,r){var a=F.p;try{return F.p=e,r()}finally{F.p=a}}var Zn=Math.random().toString(36).slice(2),ht="__reactFiber$"+Zn,Et="__reactProps$"+Zn,ys="__reactContainer$"+Zn,cu="__reactEvents$"+Zn,lb="__reactListeners$"+Zn,ub="__reactHandles$"+Zn,Hf="__reactResources$"+Zn,Aa="__reactMarker$"+Zn;function hu(e){delete e[ht],delete e[Et],delete e[cu],delete e[lb],delete e[ub]}function ms(e){var r=e[ht];if(r)return r;for(var a=e.parentNode;a;){if(r=a[ys]||a[ht]){if(a=r.alternate,r.child!==null||a!==null&&a.child!==null)for(e=oy(e);e!==null;){if(a=e[ht])return a;e=oy(e)}return r}e=a,a=e.parentNode}return null}function vs(e){if(e=e[ht]||e[ys]){var r=e.tag;if(r===5||r===6||r===13||r===31||r===26||r===27||r===3)return e}return null}function Oa(e){var r=e.tag;if(r===5||r===26||r===27||r===6)return e.stateNode;throw Error(i(33))}function bs(e){var r=e[Hf];return r||(r=e[Hf]={hoistableStyles:new Map,hoistableScripts:new Map}),r}function it(e){e[Aa]=!0}var qf=new Set,If={};function zr(e,r){_s(e,r),_s(e+"Capture",r)}function _s(e,r){for(If[e]=r,e=0;e<r.length;e++)qf.add(r[e])}var cb=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),$f={},Gf={};function hb(e){return Dr.call(Gf,e)?!0:Dr.call($f,e)?!1:cb.test(e)?Gf[e]=!0:($f[e]=!0,!1)}function eo(e,r,a){if(hb(r))if(a===null)e.removeAttribute(r);else{switch(typeof a){case"undefined":case"function":case"symbol":e.removeAttribute(r);return;case"boolean":var o=r.toLowerCase().slice(0,5);if(o!=="data-"&&o!=="aria-"){e.removeAttribute(r);return}}e.setAttribute(r,""+a)}}function to(e,r,a){if(a===null)e.removeAttribute(r);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(r);return}e.setAttribute(r,""+a)}}function Tn(e,r,a,o){if(o===null)e.removeAttribute(a);else{switch(typeof o){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(a);return}e.setAttributeNS(r,a,""+o)}}function Gt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Vf(e){var r=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(r==="checkbox"||r==="radio")}function fb(e,r,a){var o=Object.getOwnPropertyDescriptor(e.constructor.prototype,r);if(!e.hasOwnProperty(r)&&typeof o<"u"&&typeof o.get=="function"&&typeof o.set=="function"){var h=o.get,f=o.set;return Object.defineProperty(e,r,{configurable:!0,get:function(){return h.call(this)},set:function(v){a=""+v,f.call(this,v)}}),Object.defineProperty(e,r,{enumerable:o.enumerable}),{getValue:function(){return a},setValue:function(v){a=""+v},stopTracking:function(){e._valueTracker=null,delete e[r]}}}}function fu(e){if(!e._valueTracker){var r=Vf(e)?"checked":"value";e._valueTracker=fb(e,r,""+e[r])}}function Kf(e){if(!e)return!1;var r=e._valueTracker;if(!r)return!0;var a=r.getValue(),o="";return e&&(o=Vf(e)?e.checked?"true":"false":e.value),e=o,e!==a?(r.setValue(e),!0):!1}function no(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var db=/[\n"\\]/g;function Vt(e){return e.replace(db,function(r){return"\\"+r.charCodeAt(0).toString(16)+" "})}function du(e,r,a,o,h,f,v,S){e.name="",v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"?e.type=v:e.removeAttribute("type"),r!=null?v==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+Gt(r)):e.value!==""+Gt(r)&&(e.value=""+Gt(r)):v!=="submit"&&v!=="reset"||e.removeAttribute("value"),r!=null?pu(e,v,Gt(r)):a!=null?pu(e,v,Gt(a)):o!=null&&e.removeAttribute("value"),h==null&&f!=null&&(e.defaultChecked=!!f),h!=null&&(e.checked=h&&typeof h!="function"&&typeof h!="symbol"),S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"?e.name=""+Gt(S):e.removeAttribute("name")}function Yf(e,r,a,o,h,f,v,S){if(f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"&&(e.type=f),r!=null||a!=null){if(!(f!=="submit"&&f!=="reset"||r!=null)){fu(e);return}a=a!=null?""+Gt(a):"",r=r!=null?""+Gt(r):a,S||r===e.value||(e.value=r),e.defaultValue=r}o=o??h,o=typeof o!="function"&&typeof o!="symbol"&&!!o,e.checked=S?e.checked:!!o,e.defaultChecked=!!o,v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"&&(e.name=v),fu(e)}function pu(e,r,a){r==="number"&&no(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function Ss(e,r,a,o){if(e=e.options,r){r={};for(var h=0;h<a.length;h++)r["$"+a[h]]=!0;for(a=0;a<e.length;a++)h=r.hasOwnProperty("$"+e[a].value),e[a].selected!==h&&(e[a].selected=h),h&&o&&(e[a].defaultSelected=!0)}else{for(a=""+Gt(a),r=null,h=0;h<e.length;h++){if(e[h].value===a){e[h].selected=!0,o&&(e[h].defaultSelected=!0);return}r!==null||e[h].disabled||(r=e[h])}r!==null&&(r.selected=!0)}}function Ff(e,r,a){if(r!=null&&(r=""+Gt(r),r!==e.value&&(e.value=r),a==null)){e.defaultValue!==r&&(e.defaultValue=r);return}e.defaultValue=a!=null?""+Gt(a):""}function Qf(e,r,a,o){if(r==null){if(o!=null){if(a!=null)throw Error(i(92));if(Be(o)){if(1<o.length)throw Error(i(93));o=o[0]}a=o}a==null&&(a=""),r=a}a=Gt(r),e.defaultValue=a,o=e.textContent,o===a&&o!==""&&o!==null&&(e.value=o),fu(e)}function ws(e,r){if(r){var a=e.firstChild;
vendor: 4,140 bytes, line 9
9if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=r;return}}e.textContent=r}var pb=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function Jf(e,r,a){var o=r.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?o?e.setProperty(r,""):r==="float"?e.cssFloat="":e[r]="":o?e.setProperty(r,a):typeof a!="number"||a===0||pb.has(r)?r==="float"?e.cssFloat=a:e[r]=(""+a).trim():e[r]=a+"px"}function Xf(e,r,a){if(r!=null&&typeof r!="object")throw Error(i(62));if(e=e.style,a!=null){for(var o in a)!a.hasOwnProperty(o)||r!=null&&r.hasOwnProperty(o)||(o.indexOf("--")===0?e.setProperty(o,""):o==="float"?e.cssFloat="":e[o]="");for(var h in r)o=r[h],r.hasOwnProperty(h)&&a[h]!==o&&Jf(e,h,o)}else for(var f in r)r.hasOwnProperty(f)&&Jf(e,f,r[f])}function gu(e){if(e.indexOf("-")===-1)return!1;switch(e){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 gb=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode
9-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),yb=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function ro(e){return yb.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Rn(){}var yu=null;function mu(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Es=null,Ts=null;function Zf(e){var r=vs(e);if(r&&(e=r.stateNode)){var a=e[Et]||null;e:switch(e=r.stateNode,r.type){case"input":if(du(e,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),r=a.name,a.type==="radio"&&r!=null){for(a=e;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+Vt(""+r)+'"][type="radio"]'),r=0;r<a.length;r++){var o=a[r];if(o!==e&&o.form===e.form){var h=o[Et]||null;if(!h)throw Error(i(90));du(o,h.value,h.defaultValue,h.defaultValue,h.checked,h.defaultChecked,h.type,h.name)}}for(r=0;r<a.length;r++)o=a[r],o.form===e.form&&Kf(o)}break e;case"textarea":Ff(e,a.value,a.defaultValue);break e;case"select":r=a.value,r!=null&&Ss(e,!!a.multiple,r,!1)}}}var vu=!1;function Wf(e,r,a){if(vu)return e(r,a);vu=!0;try{var o=e(r);return o}finally{if(vu=!1,(Es!==null||Ts!==null)&&(Vo(),Es&&(r=Es,e=Ts,Ts=Es=null,Zf(r),e)))for(r=0;r<e.length;r++)Zf(e[r])}}function Ca(e,r){var a=e.stateNode;if(a===null)return null;var o=a[Et]||null;if(o===null)return null;a=o[r];e:switch(r){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(o=!o.disabled)||(e=e.type,o=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!o;break e;default:e=!1}if(e)return null;if(a&&typeof a!="function")throw Error(i(231,r,typeof a));return a}var An=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),bu=!1;if(An)try{var xa={};Object.defineProperty(xa,"passive",{get:function(){bu=!0}}),window.addEventListener("test",xa,xa),window.removeEventListener("test",xa,xa)}catch{bu=!1}var Wn=null,_u=null,so=null;function ed(){if(so)return so;var e,r=_u,a=r.length,o,h="value"in Wn?Wn.value:Wn.textContent,f=h.length;for(e=0;e<a&&r[e]===h[e];e++);var v=a-e;for(o=1;o<=v&&r[a-o]===h[f-o];o++);return so=h.slice(e,1<o?1-o:void 0)}function ao(e){var r=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&r===13&&(e=13)):e=r,e===10&&(e=13),32<=e||e===13?e:0}function io(){return!0}function td(){return!1}function Tt(e){function r(a,o,h,f,v){this._reactName=a,this._targetInst=h,this.type=o,this.nativeEvent=f,this.target=v,this.currentTarget=null;for(var S in e)e.hasOwnProperty(S)&&(a=e[S],this[S]=a?a(f):f[S]);return this.isDefaultPrevented=(f.defaultPrevented!=null?f.defaultPrevented:f.returnValue===!1)?io:td,this.isPropagationStopped=td,this}return y(r.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=io)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=io)},persist:function(){},isPersistent:io}),r}var Pr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},oo=Tt(Pr),ka=y({},Pr,{view:0,detail:0}),mb=Tt(ka),Su,wu,ja,lo=y({},ka,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Tu,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==ja&&(ja&&e.type==="mousemove"?(Su
vendor: 4,884 bytes, line 9
9=e.screenX-ja.screenX,wu=e.screenY-ja.screenY):wu=Su=0,ja=e),Su)},movementY:function(e){return"movementY"in e?e.movementY:wu}}),nd=Tt(lo),vb=y({},lo,{dataTransfer:0}),bb=Tt(vb),_b=y({},ka,{relatedTarget:0}),Eu=Tt(_b),Sb=y({},Pr,{animationName:0,elapsedTime:0,pseudoElement:0}),wb=Tt(Sb),Eb=y({},Pr,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Tb=Tt(Eb),Rb=y({},Pr,{data:0}),rd=Tt(Rb),Ab={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Ob={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"},Cb={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function xb(e){var r=this.nativeEvent;return r.getModifierState?r.getModifierState(e):(e=Cb[e])?!!r[e]:!1}function Tu(){return xb}var kb=y({},ka,{key:function(e){if(e.key){var r=Ab[e.key]||e.key;if(r!=="Unidentified")return r}return e.type==="keypress"?(e=ao(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Ob[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Tu,charCode:function(e){return e.type==="keypress"?ao(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?ao(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),jb=Tt(kb),Mb=y({},lo,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),sd=Tt(Mb),Ub=y({},ka,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Tu}),Nb=Tt(Ub),Db=y({},Pr,{propertyName:0,elapsedTime:0,pseudoElement:0}),Lb=Tt(Db),zb=y({},lo,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Pb=Tt(zb),Bb=y({},Pr,{newState:0,oldState:0}),Hb=Tt(Bb),qb=[9,13,27,32],Ru=An&&"CompositionEvent"in window,Ma=null;An&&"documentMode"in document&&(Ma=document.documentMode);var Ib=An&&"TextEvent"in window&&!Ma,ad=An&&(!Ru||Ma&&8<Ma&&11>=Ma),id=" ",od=!1;function ld(e,r){switch(e){case"keyup":return qb.indexOf(r.keyCode)!==-1;case"keydown":return r.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ud(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Rs=!1;function $b(e,r){switch(e){case"compositionend":return ud(r);case"keypress":return r.which!==32?null:(od=!0,id);case"textInput":return e=r.data,e===id&&od?null:e;default:return null}}function Gb(e,r){if(Rs)return e==="compositionend"||!Ru&&ld(e,r)?(e=ed(),so=_u=Wn=null,Rs=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(r.ctrlKey||r.altKey||r.metaKey)||r.ctrlKey&&r.altKey){if(r.char&&1<r.char.length)return r.char;if(r.which)return String.fromCharCode(r.which)}return null;case"compositionend":return ad&&r.locale!=="ko"?null:r.data;default:return null}}var Vb={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 cd(e){var r=e&&e.nodeName&&e.nodeName.toLowerCase();return r==="input"?!!Vb[e.type]:r==="textarea"}function hd(e,r,a,o){Es?Ts?Ts.push(o):Ts=[o]:Es=o,r=Zo(r,"onChange"),0<r.length&&(a=new oo("onChange","change",null,a,o),e.push({event:a,listeners:r}))}var Ua=null,Na=null;function Kb(e){Yg(e,0)}function uo(e){var r=Oa(e);if(Kf(r))return e}function fd(e,r){if(e==="change")return r}var dd=!1;if(An){var Au;if(An){var Ou="oninput"in document;if(!Ou){var pd=document.createElement("div");pd.setAttribute("oninput","return;"),Ou=typeof pd.oninput=="function"}Au=Ou}else Au=!1;dd=Au&&(!document.documentMode||9<document.documentMode)}function gd(){Ua&&(Ua.detachEvent("onpropertychange",yd),Na=Ua=null)}function yd(e){if(e.propertyName==="value"&&uo(Na)){var r=[];hd(r,Na,e,mu(e)),Wf(Kb,r)}}function Yb(e,r,a){e==="focusin"?(gd(),Ua=r,Na=a,Ua.attachEvent("onpropertychange",yd)):e==="focusout"&&gd()}function Fb(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return uo(Na)}function Qb(e,r){if(e==="click")return uo(r)}function Jb(e,r){if(e==="input"||e==="change")return uo(r)}function Xb(e,r){return e===r&&(e!==0||1/e===1/r)||e!==e&&r!==r}var Lt=typeof Object.is=="function"?Object.is:Xb;function Da(e,r){if(Lt(e,r))return!0;
vendor: 13,404 bytes, line 9
9if(typeof e!="object"||e===null||typeof r!="object"||r===null)return!1;var a=Object.keys(e),o=Object.keys(r);if(a.length!==o.length)return!1;for(o=0;o<a.length;o++){var h=a[o];if(!Dr.call(r,h)||!Lt(e[h],r[h]))return!1}return!0}function md(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function vd(e,r){var a=md(e);e=0;for(var o;a;){if(a.nodeType===3){if(o=e+a.textContent.length,e<=r&&o>=r)return{node:a,offset:r-e};e=o}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=md(a)}}function bd(e,r){return e&&r?e===r?!0:e&&e.nodeType===3?!1:r&&r.nodeType===3?bd(e,r.parentNode):"contains"in e?e.contains(r):e.compareDocumentPosition?!!(e.compareDocumentPosition(r)&16):!1:!1}function _d(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var r=no(e.document);r instanceof e.HTMLIFrameElement;){try{var a=typeof r.contentWindow.location.href=="string"}catch{a=!1}if(a)e=r.contentWindow;else break;r=no(e.document)}return r}function Cu(e){var r=e&&e.nodeName&&e.nodeName.toLowerCase();return r&&(r==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||r==="textarea"||e.contentEditable==="true")}var Zb=An&&"documentMode"in document&&11>=document.documentMode,As=null,xu=null,La=null,ku=!1;function Sd(e,r,a){var o=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;ku||As==null||As!==no(o)||(o=As,"selectionStart"in o&&Cu(o)?o={start:o.selectionStart,end:o.selectionEnd}:(o=(o.ownerDocument&&o.ownerDocument.defaultView||window).getSelection(),o={anchorNode:o.anchorNode,anchorOffset:o.anchorOffset,focusNode:o.focusNode,focusOffset:o.focusOffset}),La&&Da(La,o)||(La=o,o=Zo(xu,"onSelect"),0<o.length&&(r=new oo("onSelect","select",null,r,a),e.push({event:r,listeners:o}),r.target=As)))}function Br(e,r){var a={};return a[e.toLowerCase()]=r.toLowerCase(),a["Webkit"+e]="webkit"+r,a["Moz"+e]="moz"+r,a}var Os={animationend:Br("Animation","AnimationEnd"),animationiteration:Br("Animation","AnimationIteration"),animationstart:Br("Animation","AnimationStart"),transitionrun:Br("Transition","TransitionRun"),transitionstart:Br("Transition","TransitionStart"),transitioncancel:Br("Transition","TransitionCancel"),transitionend:Br("Transition","TransitionEnd")},ju={},wd={};An&&(wd=document.createElement("div").style,"AnimationEvent"in window||(delete Os.animationend.animation,delete Os.animationiteration.animation,delete Os.animationstart.animation),"TransitionEvent"in window||delete Os.transitionend.transition);function Hr(e){if(ju[e])return ju[e];if(!Os[e])return e;var r=Os[e],a;for(a in r)if(r.hasOwnProperty(a)&&a in wd)return ju[e]=r[a];return e}var Ed=Hr("animationend"),Td=Hr("animationiteration"),Rd=Hr("animationstart"),Wb=Hr("transitionrun"),e_=Hr("transitionstart"),t_=Hr("transitioncancel"),Ad=Hr("transitionend"),Od=new Map,Mu="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");Mu.push("scrollEnd");function nn(e,r){Od.set(e,r),zr(r,[e])}var co=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var r=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(r))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},Kt=[],Cs=0,Uu=0;function ho(){for(var e=Cs,r=Uu=Cs=0;r<e;){var a=Kt[r];Kt[r++]=null;var o=Kt[r];Kt[r++]=null;var h=Kt[r];Kt[r++]=null;var f=Kt[r];if(Kt[r++]=null,o!==null&&h!==null){var v=o.pending;v===null?h.next=h:(h.next=v.next,v.next=h),o.pending=h}f!==0&&Cd(a,h,f)}}function fo(e,r,a,o){Kt[Cs++]=e,Kt[Cs++]=r,Kt[Cs++]=a,Kt[Cs++]=o,Uu|=o,e.lanes|=o,e=e.alternate,e!==null&&(e.lanes|=o)}function Nu(e,r,a,o){return fo(e,r,a,o),po(e)}function qr(e,r){return fo(e,null,null,r),po(e)}function Cd(e,r,a){e.lanes|=a;var o=e.alternate;o!==null&&(o.lanes|=a);for(var h=!1,f=e.return;f!==null;)f.childLanes|=a,o=f.alternate,o!==null&&(o.childLanes|=a),f.tag===22&&(e=f.stateNode,e===null||e._visibility&1||(h=!0)),e=f,f=f.return;return e.tag===3?(f=e.stateNode,h&&r!==null&&(h=31-Dt(a),e=f.hiddenUpdates,o=e[h],o===null?e[h]=[r]:o.push(r),r.lane=a|536870912),f):null}function po(e){if(50<si)throw si=0,$c=null,Error(i(185));for(var r=e.return;r!==null;)e=r,r=e.return;return e.tag===3?e.stateNode:null}var xs={};function n_(e,r,a,o){this.tag=e,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=r,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=o,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function zt(e,r,a,o){return new n_(e,r,a,o)}function Du(e){return e=e.prototype,!(!e||!e.isReactComponent)}function On(e,r){var a=e.alternate;return a===null?(a=zt(e.tag,r,e.key,e.mode),a.elementType=e.elementType,a.type=e.type,a.stateNode=e.stateNode,a.alternate=e,e.alternate=a):(a.pendingProps=r,a.type=e.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=e.flags&65011712,a.childLanes=e.childLanes,a.lanes=e.lanes,a.child=e.child,a.memoizedProps=e.memoizedProps,a.memoizedState=e.memoizedState,a.updateQueue=e.updateQueue,r=e.dependencies,a.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext},a.sibling=e.sibling,a.index=e.index,a.ref=e.ref,a.refCleanup=e.refCleanup,a}function xd(e,r){e.flags&=65011714;var a=e.alternate;return a===null?(e.childLanes=0,e.lanes=r,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=a.childLanes,e.lanes=a.lanes,e.child=a.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=a.memoizedProps,e.memoizedState=a.memoizedState,e.updateQueue=a.updateQueue,e.type=a.type,r=a.dependencies,e.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext}),e}function go(e,r,a,o,h,f){var v=0;if(o=e,typeof e=="function")Du(e)&&(v=1);else if(typeof e=="string")v=oS(e,a,W.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case J:return e=zt(31,a,r,h),e.elementType=J,e.lanes=f,e;case A:return Ir(a.children,h,f,r);case R:v=8,h|=24;break;case O:return e=zt(12,a,r,h|2),e.elementType=O,e.lanes=f,e;case Q:return e=zt(13,a,r,h),e.elementType=Q,e.lanes=f,e;case V:return e=zt(19,a,r,h),e.elementType=V,e.lanes=f,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case j:v=10;break e;case U:v=9;break e;case L:v=11;break e;case q:v=14;break e;case K:v=16,o=null;break e}v=29,a=Error(i(130,e===null?"null":typeof e,"")),o=null}return r=zt(v,a,r,h),r.elementType=e,r.type=o,r.lanes=f,r}function Ir(e,r,a,o){return e=zt(7,e,o,r),e.lanes=a,e}function Lu(e,r,a){return e=zt(6,e,null,r),e.lanes=a,e}function kd(e){var r=zt(18,null,null,0);return r.stateNode=e,r}function zu(e,r,a){return r=zt(4,e.children!==null?e.children:[],e.key,r),r.lanes=a,r.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},r}var jd=new WeakMap;function Yt(e,r){if(typeof e=="object"&&e!==null){var a=jd.get(e);return a!==void 0?a:(r={value:e,source:r,stack:En(r)},jd.set(e,r),r)}return{value:e,source:r,stack:En(r)}}var ks=[],js=0,yo=null,za=0,Ft=[],Qt=0,er=null,fn=1,dn="";function Cn(e,r){ks[js++]=za,ks[js++]=yo,yo=e,za=r}function Md(e,r,a){Ft[Qt++]=fn,Ft[Qt++]=dn,Ft[Qt++]=er,er=e;var o=fn;e=dn;var h=32-Dt(o)-1;o&=~(1<<h),a+=1;var f=32-Dt(r)+h;if(30<f){var v=h-h%5;f=(o&(1<<v)-1).toString(32),o>>=v,h-=v,fn=1<<32-Dt(r)+h|a<<h|o,dn=f+e}else fn=1<<f|a<<h|o,dn=e}function Pu(e){e.return!==null&&(Cn(e,1),Md(e,1,0))}function Bu(e){for(;e===yo;)yo=ks[--js],ks[js]=null,za=ks[--js],ks[js]=null;for(;e===er;)er=Ft[--Qt],Ft[Qt]=null,dn=Ft[--Qt],Ft[Qt]=null,fn=Ft[--Qt],Ft[Qt]=null}function Ud(e,r){Ft[Qt++]=fn,Ft[Qt++]=dn,Ft[Qt++]=er,fn=r.id,dn=r.overflow,er=e}var ft=null,He=null,_e=!1,tr=null,Jt=!1,Hu=Error(i(519));function nr(e){var r=Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Pa(Yt(r,e)),Hu}function Nd(e){var r=e.stateNode,a=e.type,o=e.memoizedProps;switch(r[ht]=e,r[Et]=o,a){case"dialog":ye("cancel",r),ye("close",r);break;case"iframe":case"object":case"embed":ye("load",r);break;case"video":case"audio":for(a=0;a<ii.length;a++)ye(ii[a],r);break;case"source":ye("error",r);break;case"img":case"image":case"link":ye("error",r),ye("load",r);break;case"details":ye("toggle",r);break;case"input":ye("invalid",r),Yf(r,o.value,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name,!0);break;case"select":ye("invalid",r);break;case"textarea":ye("invalid",r),Qf(r,o.value,o.defaultValue,o.children)}a=o.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||r.textContent===""+a||o.suppressHydrationWarning===!0||Xg(r.textContent,a)?(o.popover!=null&&(ye("beforetoggle",r),ye("toggle",r)),o.onScroll!=null&&ye("scroll",r),o.onScrollEnd!=null&&ye("scrollend",r),o.onClick!=null&&(r.onclick=Rn),r=!0):r=!1,r||nr(e,!0)}function Dd(e){for(ft=e.return;ft;)switch(ft.tag){case 5:case 31:case 13:Jt=!1;return;case 27:case 3:Jt=!0;return;default:ft=ft.return}}function Ms(e){if(e!==ft)return!1;if(!_e)return Dd(e),_e=!0,!1;var r=e.tag,a;if((a=r!==3&&r!==27)&&((a=r===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||sh(e.type,e.memoizedProps)),a=!a),a&&He&&nr(e),Dd(e),r===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(i(317));He=iy(e)}else if(r===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(i(317));He=iy(e)}else r===27?(r=He,yr(e.type)?(e=uh,uh=null,He=e):He=r):He=ft?Zt(e.stateNode.nextSibling):null;return!0}function $r(){He=ft=null,_e=!1}function qu(){var e=tr;return e!==null&&(Ct===null?Ct=e:Ct.push.apply(Ct,e),tr=null),e}function Pa(e){tr===null?tr=[e]:tr.push(e)}var Iu=k(null),Gr=null,xn=null;function rr(e,r,a){X(Iu,r._currentValue),r._currentValue=a}function kn(e){e._currentValue=Iu.current,$(Iu)}function $u(e,r,a){for(;e!==null;){var o=e.alternate;if((e.childLanes&r)!==r?(e.childLanes|=r,o!==null&&(o.childLanes|=r)):o!==null&&(o.childLanes&r)!==r&&(o.childLanes|=r),e===a)break;e=e.return}}function Gu(e,r,a,o){var h=e.child;for(h!==null&&(h.return=e);h!==null;){var f=h.dependencies;if(f!==null){var v=h.child;f=f.firstContext;e:for(;f!==null;){var S=f;f=h;for(var C=0;C<r.length;C++)if(S.context===r[C]){f.lanes|=a,S=f.alternate,S!==null&&(S.lanes|=a),$u(f.return,a,e),o||(v=null);break e}f=S.next}}else if(h.tag===18){if(v=h.return,v===null)throw Error(i(341));v.lanes|=a,f=v.alternate,f!==null&&(f.lanes|=a),$u(v,a,e),v=null}else v=h.child;if(v!==null)v.return=h;else for(v=h;v!==null;){if(v===e){v=null;break}if(h=v.sibling,h!==null){h.return=v.return,v=h;break}v=v.return}h=v}}function Us(e,r,a,o){e=null;for(var h=r,f=!1;h!==null;){if(!f){if((h.flags&524288)!==0)f=!0;else if((h.flags&262144)!==0)break}if(h.tag===10){var v=h.alternate;if(v===null)throw Error(i(387));if(v=v.memoizedProps,v!==null){var S=h.type;Lt(h.pendingProps.value,v.value)||(e!==null?e.push(S):e=[S])}}else if(h===Se.current){if(v=h.alternate,v===null)throw Error(i(387));v.memoizedState.memoizedState!==h.memoizedState.memoizedState&&(e!==null?e.push(hi):e=[hi])}h=h.return}e!==null&&Gu(r,e,a,o),r.flags|=262144}function mo(e){for(e=e.firstContext;e!==null;){if(!Lt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Vr(e){Gr=e,xn=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function dt(e){return Ld(Gr,e)}function vo(e,r){return Gr===null&&Vr(e),Ld(e,r)}function Ld(e,r){var a=r._currentValue;if(r={context:r,memoizedValue:a,next:null},xn===null){if(e===null)throw Error(i(308));xn=r,e.dependencies={lanes:0,firstContext:r},e.flags|=524288}else xn=xn.next=r;return a}var r_=typeof AbortController<"u"?AbortController:function(){var e=[],r=this.signal={aborted:!1,addEventListener:function(a,o){e.push(o)}};this.abort=function(){r.aborted=!0,e.forEach(function(a){return a()})}},s_=t.unstable_scheduleCallback,a_=t.unstable_NormalPriority,Xe={$$typeof:j,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Vu(){return{controller:new r_,data:new Map,refCount:0}}function Ba(e){e.refCount--,e.refCount===0&&s_(a_,function(){e.controller.abort()})}var Ha=null,Ku=0,Ns=0,Ds=null;function i_(e,r){if(Ha===null){var a=Ha=[];Ku=0,Ns=Qc(),Ds={status:"pending",value:void 0,then:function(o){a.push(o)}}}return Ku++,r.then(zd,zd),r}function zd(){if(--Ku===0&&Ha!==null){Ds!==null&&(Ds.status="fulfilled");var e=Ha;Ha=null,Ns=0,Ds=null;for(var r=0;r<e.length;r++)(0,e[r])()}}function o_(e,r){var a=[],o={status:"pending",value:null,reason:null,then:function(h){a.push(h)}};return e.then(function(){o.status="fulfilled",o.value=r;
vendor: 8,170 bytes, line 9
9for(var h=0;h<a.length;h++)(0,a[h])(r)},function(h){for(o.status="rejected",o.reason=h,h=0;h<a.length;h++)(0,a[h])(void 0)}),o}var Pd=B.S;B.S=function(e,r){Sg=bt(),typeof r=="object"&&r!==null&&typeof r.then=="function"&&i_(e,r),Pd!==null&&Pd(e,r)};var Kr=k(null);function Yu(){var e=Kr.current;return e!==null?e:De.pooledCache}function bo(e,r){r===null?X(Kr,Kr.current):X(Kr,r.pool)}function Bd(){var e=Yu();return e===null?null:{parent:Xe._currentValue,pool:e}}var Ls=Error(i(460)),Fu=Error(i(474)),_o=Error(i(542)),So={then:function(){}};function Hd(e){return e=e.status,e==="fulfilled"||e==="rejected"}function qd(e,r,a){switch(a=e[a],a===void 0?e.push(r):a!==r&&(r.then(Rn,Rn),r=a),r.status){case"fulfilled":return r.value;case"rejected":throw e=r.reason,$d(e),e;default:if(typeof r.status=="string")r.then(Rn,Rn);else{if(e=De,e!==null&&100<e.shellSuspendCounter)throw Error(i(482));e=r,e.status="pending",e.then(function(o){if(r.status==="pending"){var h=r;h.status="fulfilled",h.value=o}},function(o){if(r.status==="pending"){var h=r;h.status="rejected",h.reason=o}})}switch(r.status){case"fulfilled":return r.value;case"rejected":throw e=r.reason,$d(e),e}throw Fr=r,Ls}}function Yr(e){try{var r=e._init;return r(e._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(Fr=a,Ls):a}}var Fr=null;function Id(){if(Fr===null)throw Error(i(459));var e=Fr;return Fr=null,e}function $d(e){if(e===Ls||e===_o)throw Error(i(483))}var zs=null,qa=0;function wo(e){var r=qa;return qa+=1,zs===null&&(zs=[]),qd(zs,e,r)}function Ia(e,r){r=r.props.ref,e.ref=r!==void 0?r:null}function Eo(e,r){throw r.$$typeof===b?Error(i(525)):(e=Object.prototype.toString.call(r),Error(i(31,e==="[object Object]"?"object with keys {"+Object.keys(r).join(", ")+"}":e)))}function Gd(e){function r(M,x){if(e){var N=M.deletions;N===null?(M.deletions=[x],M.flags|=16):N.push(x)}}function a(M,x){if(!e)return null;for(;x!==null;)r(M,x),x=x.sibling;return null}function o(M){for(var x=new Map;M!==null;)M.key!==null?x.set(M.key,M):x.set(M.index,M),M=M.sibling;return x}function h(M,x){return M=On(M,x),M.index=0,M.sibling=null,M}function f(M,x,N){return M.index=N,e?(N=M.alternate,N!==null?(N=N.index,N<x?(M.flags|=67108866,x):N):(M.flags|=67108866,x)):(M.flags|=1048576,x)}function v(M){return e&&M.alternate===null&&(M.flags|=67108866),M}function S(M,x,N,I){return x===null||x.tag!==6?(x=Lu(N,M.mode,I),x.return=M,x):(x=h(x,N),x.return=M,x)}function C(M,x,N,I){var ie=N.type;return ie===A?H(M,x,N.props.children,I,N.key):x!==null&&(x.elementType===ie||typeof ie=="object"&&ie!==null&&ie.$$typeof===K&&Yr(ie)===x.type)?(x=h(x,N.props),Ia(x,N),x.return=M,x):(x=go(N.type,N.key,N.props,null,M.mode,I),Ia(x,N),x.return=M,x)}function D(M,x,N,I){return x===null||x.tag!==4||x.stateNode.containerInfo!==N.containerInfo||x.stateNode.implementation!==N.implementation?(x=zu(N,M.mode,I),x.return=M,x):(x=h(x,N.children||[]),x.return=M,x)}function H(M,x,N,I,ie){return x===null||x.tag!==7?(x=Ir(N,M.mode,I,ie),x.return=M,x):(x=h(x,N),x.return=M,x)}function G(M,x,N){if(typeof x=="string"&&x!==""||typeof x=="number"||typeof x=="bigint")return x=Lu(""+x,M.mode,N),x.return=M,x;if(typeof x=="object"&&x!==null){switch(x.$$typeof){case _:return N=go(x.type,x.key,x.props,null,M.mode,N),Ia(N,x),N.return=M,N;case w:return x=zu(x,M.mode,N),x.return=M,x;case K:return x=Yr(x),G(M,x,N)}if(Be(x)||me(x))return x=Ir(x,M.mode,N,null),x.return=M,x;if(typeof x.then=="function")return G(M,wo(x),N);if(x.$$typeof===j)return G(M,vo(M,x),N);Eo(M,x)}return null}function z(M,x,N,I){var ie=x!==null?x.key:null;if(typeof N=="string"&&N!==""||typeof N=="number"||typeof N=="bigint")return ie!==null?null:S(M,x,""+N,I);if(typeof N=="object"&&N!==null){switch(N.$$typeof){case _:return N.key===ie?C(M,x,N,I):null;case w:return N.key===ie?D(M,x,N,I):null;case K:return N=Yr(N),z(M,x,N,I)}if(Be(N)||me(N))return ie!==null?null:H(M,x,N,I,null);if(typeof N.then=="function")return z(M,x,wo(N),I);if(N.$$typeof===j)return z(M,x,vo(M,N),I);Eo(M,N)}return null}function P(M,x,N,I,ie){if(typeof I=="string"&&I!==""||typeof I=="number"||typeof I=="bigint")return M=M.get(N)||null,S(x,M,""+I,ie);if(typeof I=="object"&&I!==null){switch(I.$$typeof){case _:return M=M.get(I.key===null?N:I.key)||null,C(x,M,I,ie);case w:return M=M.get(I.key===null?N:I.key)||null,D(x,M,I,ie);case K:return I=Yr(I),P(M,x,N,I,ie)}if(Be(I)||me(I))return M=M.get(N)||null,H(x,M,I,ie,null);if(typeof I.then=="function")return P(M,x,N,wo(I),ie);if(I.$$typeof===j)return P(M,x,N,vo(x,I),ie);Eo(x,I)}return null}function ee(M,x,N,I){for(var ie=null,we=null,ne=x,de=x=0,be=null;ne!==null&&de<N.length;de++){ne.index>de?(be=ne,ne=null):be=ne.sibling;var Ee=z(M,ne,N[de],I);if(Ee===null){ne===null&&(ne=be);break}e&&ne&&Ee.alternate===null&&r(M,ne),x=f(Ee,x,de),we===null?ie=Ee:we.sibling=Ee,we=Ee,ne=be}if(de===N.length)return a(M,ne),_e&&Cn(M,de),ie;if(ne===null){for(;de<N.length;de++)ne=G(M,N[de],I),ne!==null&&(x=f(ne,x,de),we===null?ie=ne:we.sibling=ne,we=ne);return _e&&Cn(M,de),ie}for(ne=o(ne);de<N.length;de++)be=P(ne,M,de,N[de],I),be!==null&&(e&&be.alternate!==null&&ne.delete(be.key===null?de:be.key),x=f(be,x,de),we===null?ie=be:we.sibling=be,we=be);return e&&ne.forEach(function(Sr){return r(M,Sr)}),_e&&Cn(M,de),ie}function ue(M,x,N,I){if(N==null)throw Error(i(151));for(var ie=null,we=null,ne=x,de=x=0,be=null,Ee=N.next();ne!==null&&!Ee.done;de++,Ee=N.next()){ne.index>de?(be=ne,ne=null):be=ne.sibling;var Sr=z(M,ne,Ee.value,I);if(Sr===null){ne===null&&(ne=be);break}e&&ne&&Sr.alternate===null&&r(M,ne),x=f(Sr,x,de),we===null?ie=Sr:we.sibling=Sr,we=Sr,ne=be}if(Ee.done)return a(M,ne),_e&&Cn(M,de),ie;if(ne===null){for(;!Ee.done;de++,Ee=N.next())Ee=G(M,Ee.value,I),Ee!==null&&(x=f(Ee,x,de),we===null?ie=Ee:we.sibling=Ee,we=Ee);return _e&&Cn(M,de),ie}for(ne=o(ne);!Ee.done;de++,Ee=N.next())Ee=P(ne,M,de,Ee.value,I),Ee!==null&&(e&&Ee.alternate!==null&&ne.delete(Ee.key===null?de:Ee.key),x=f(Ee,x,de),we===null?ie=Ee:we.sibling=Ee,we=Ee);return e&&ne.forEach(function(vS){return r(M,vS)}),_e&&Cn(M,de),ie}function Ue(M,x,N,I){if(typeof N=="object"&&N!==null&&N.type===A&&N.key===null&&(N=N.props.children),typeof N=="object"&&N!==null){switch(N.$$typeof){case _:e:{for(var ie=N.key;x!==null;){if(x.key===ie){if(ie=N.type,ie===A){if(x.tag===7){a(M,x.sibling),I=h(x,N.props.children),I.return=M,M=I;break e}}else if(x.elementType===ie||typeof ie=="object"&&ie!==null&&ie.$$typeof===K&&Yr(ie)===x.type){a(M,x.sibling),I=h(x,N.props),Ia(I,N),I.return=M,M=I;break e}a(M,x);break}else r(M,x);x=x.sibling}N.type===A?(I=Ir(N.props.children,M.mode,I,N.key),I.return=M,M=I):(I=go(N.type,N.key,N.props,null,M.mode,I),Ia(I,N),I.return=M,M=I)}return v(M);case w:e:{for(ie=N.key;x!==null;){if(x.key===ie)if(x.tag===4&&x.stateNode.containerInfo===N.containerInfo&&x.stateNode.implementation===N.implementation){a(M,x.sibling),I=h(x,N.children||[]),I.return=M,M=I;break e}else{a(M,x);break}else r(M,x);x=x.sibling}I=zu(N,M.mode,I),I.return=M,M=I}return v(M);case K:return N=Yr(N),Ue(M,x,N,I)}if(Be(N))return ee(M,x,N,I);if(me(N)){if(ie=me(N),typeof ie!="function")throw Error(i(150));return N=ie.call(N),ue(M,x,N,I)}if(typeof N.then=="function")return Ue(M,x,wo(N),I);if(N.$$typeof===j)return Ue(M,x,vo(M,N),I);Eo(M,N)}return typeof N=="string"&&N!==""||typeof N=="number"||typeof N=="bigint"?(N=""+N,x!==null&&x.tag===6?(a(M,x.sibling),I=h(x,N),I.return=M,M=I):(a(M,x),I=Lu(N,M.mode,I),I.return=M,M=I),v(M)):a(M,x)}return function(M,x,N,I){try{qa=0;var ie=Ue(M,x,N,I);return zs=null,ie}catch(ne){if(ne===Ls||ne===_o)throw ne;var we=zt(29,ne,null,M.mode);return we.lanes=I,we.return=M,we}}}var Qr=Gd(!0),Vd=Gd(!1),sr=!1;function Qu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ju(e,r){e=e.updateQueue,r.updateQueue===e&&(r.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function ar(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function ir(e,r,a){var o=e.updateQueue;if(o===null)return null;if(o=o.shared,(Ae&2)!==0){var h=o.pending;
vendor: 4,290 bytes, line 9
9return h===null?r.next=r:(r.next=h.next,h.next=r),o.pending=r,r=po(e),Cd(e,null,a),r}return fo(e,o,r,a),po(e)}function $a(e,r,a){if(r=r.updateQueue,r!==null&&(r=r.shared,(a&4194048)!==0)){var o=r.lanes;o&=e.pendingLanes,a|=o,r.lanes=a,Lf(e,a)}}function Xu(e,r){var a=e.updateQueue,o=e.alternate;if(o!==null&&(o=o.updateQueue,a===o)){var h=null,f=null;if(a=a.firstBaseUpdate,a!==null){do{var v={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};f===null?h=f=v:f=f.next=v,a=a.next}while(a!==null);f===null?h=f=r:f=f.next=r}else h=f=r;a={baseState:o.baseState,firstBaseUpdate:h,lastBaseUpdate:f,shared:o.shared,callbacks:o.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=r:e.next=r,a.lastBaseUpdate=r}var Zu=!1;function Ga(){if(Zu){var e=Ds;if(e!==null)throw e}}function Va(e,r,a,o){Zu=!1;var h=e.updateQueue;sr=!1;var f=h.firstBaseUpdate,v=h.lastBaseUpdate,S=h.shared.pending;if(S!==null){h.shared.pending=null;var C=S,D=C.next;C.next=null,v===null?f=D:v.next=D,v=C;var H=e.alternate;H!==null&&(H=H.updateQueue,S=H.lastBaseUpdate,S!==v&&(S===null?H.firstBaseUpdate=D:S.next=D,H.lastBaseUpdate=C))}if(f!==null){var G=h.baseState;v=0,H=D=C=null,S=f;do{var z=S.lane&-536870913,P=z!==S.lane;if(P?(ve&z)===z:(o&z)===z){z!==0&&z===Ns&&(Zu=!0),H!==null&&(H=H.next={lane:0,tag:S.tag,payload:S.payload,callback:null,next:null});e:{var ee=e,ue=S;z=r;var Ue=a;switch(ue.tag){case 1:if(ee=ue.payload,typeof ee=="function"){G=ee.call(Ue,G,z);break e}G=ee;break e;case 3:ee.flags=ee.flags&-65537|128;case 0:if(ee=ue.payload,z=typeof ee=="function"?ee.call(Ue,G,z):ee,z==null)break e;G=y({},G,z);break e;case 2:sr=!0}}z=S.callback,z!==null&&(e.flags|=64,P&&(e.flags|=8192),P=h.callbacks,P===null?h.callbacks=[z]:P.push(z))}else P={lane:z,tag:S.tag,payload:S.payload,callback:S.callback,next:null},H===null?(D=H=P,C=G):H=H.next=P,v|=z;if(S=S.next,S===null){if(S=h.shared.pending,S===null)break;P=S,S=P.next,P.next=null,h.lastBaseUpdate=P,h.shared.pending=null}}while(!0);H===null&&(C=G),h.baseState=C,h.firstBaseUpdate=D,h.lastBaseUpdate=H,f===null&&(h.shared.lanes=0),hr|=v,e.lanes=v,e.memoizedState=G}}function Kd(e,r){if(typeof e!="function")throw Error(i(191,e));e.call(r)}function Yd(e,r){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)Kd(a[e],r)}var Ps=k(null),To=k(0);function Fd(e,r){e=Bn,X(To,e),X(Ps,r),Bn=e|r.baseLanes}function Wu(){X(To,Bn),X(Ps,Ps.current)}function ec(){Bn=To.current,$(Ps),$(To)}var Pt=k(null),Xt=null;function or(e){var r=e.alternate;X(Qe,Qe.current&1),X(Pt,e),Xt===null&&(r===null||Ps.current!==null||r.memoizedState!==null)&&(Xt=e)}function tc(e){X(Qe,Qe.current),X(Pt,e),Xt===null&&(Xt=e)}function Qd(e){e.tag===22?(X(Qe,Qe.current),X(Pt,e),Xt===null&&(Xt=e)):lr()}function lr(){X(Qe,Qe.current),X(Pt,Pt.current)}function Bt(e){$(Pt),Xt===e&&(Xt=null),$(Qe)}var Qe=k(0);function Ro(e){for(var r=e;r!==null;){if(r.tag===13){var a=r.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||oh(a)||lh(a)))return r}else if(r.tag===19&&(r.memoizedProps.revealOrder==="forwards"||r.memoizedProps.revealOrder==="backwards"||r.memoizedProps.revealOrder==="unstable_legacy-backwards"||r.memoizedProps.revealOrder==="together")){if((r.flags&128)!==0)return r}else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===e)break;for(;r.sibling===null;){if(r.return===null||r.return===e)return null;r=r.return}r.sibling.return=r.return,r=r.sibling}return null}var jn=0,fe=null,je=null,Ze=null,Ao=!1,Bs=!1,Jr=!1,Oo=0,Ka=0,Hs=null,l_=0;function Ge(){throw Error(i(321))}function nc(e,r){if(r===null)return!1;for(var a=0;a<r.length&&a<e.length;a++)if(!Lt(e[a],r[a]))return!1;return!0}function rc(e,r,a,o,h,f){return jn=f,fe=r,r.memoizedState=null,r.updateQueue=null,r.lanes=0,B.H=e===null||e.memoizedState===null?Mp:vc,Jr=!1,f=a(o,h),Jr=!1,Bs&&(f=Xd(r,a,o,h)),Jd(e),f}function Jd(e){B.H=Qa;var r=je!==null&&je.next!==null;if(jn=0,Ze=je=fe=null,Ao=!1,Ka=0,Hs=null,r)throw Error(i(300));e===null||We||(e=e.dependencies,e!==null&&mo(e)&&(We=!0))}function Xd(e,r,a,o){fe=e;var h=0;do{if(Bs&&(Hs=null),Ka=0,Bs=!1,25<=h)throw Error(i(301));if(h+=1,Ze=je=null,e.updateQueue!=null){var f=e.updateQueue;f.lastEffect=null,f.events=null,f.stores=null,f.memoCache!=null&&(f.memoCache.index=0)}B.H=Up,f=r(a,o)}while(Bs);return f}
vendor: 5,180 bytes, line 9
9function u_(){var e=B.H,r=e.useState()[0];return r=typeof r.then=="function"?Ya(r):r,e=e.useState()[0],(je!==null?je.memoizedState:null)!==e&&(fe.flags|=1024),r}function sc(){var e=Oo!==0;return Oo=0,e}function ac(e,r,a){r.updateQueue=e.updateQueue,r.flags&=-2053,e.lanes&=~a}function ic(e){if(Ao){for(e=e.memoizedState;e!==null;){var r=e.queue;r!==null&&(r.pending=null),e=e.next}Ao=!1}jn=0,Ze=je=fe=null,Bs=!1,Ka=Oo=0,Hs=null}function St(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ze===null?fe.memoizedState=Ze=e:Ze=Ze.next=e,Ze}function Je(){if(je===null){var e=fe.alternate;e=e!==null?e.memoizedState:null}else e=je.next;var r=Ze===null?fe.memoizedState:Ze.next;if(r!==null)Ze=r,je=e;else{if(e===null)throw fe.alternate===null?Error(i(467)):Error(i(310));je=e,e={memoizedState:je.memoizedState,baseState:je.baseState,baseQueue:je.baseQueue,queue:je.queue,next:null},Ze===null?fe.memoizedState=Ze=e:Ze=Ze.next=e}return Ze}function Co(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ya(e){var r=Ka;return Ka+=1,Hs===null&&(Hs=[]),e=qd(Hs,e,r),r=fe,(Ze===null?r.memoizedState:Ze.next)===null&&(r=r.alternate,B.H=r===null||r.memoizedState===null?Mp:vc),e}function xo(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Ya(e);if(e.$$typeof===j)return dt(e)}throw Error(i(438,String(e)))}function oc(e){var r=null,a=fe.updateQueue;if(a!==null&&(r=a.memoCache),r==null){var o=fe.alternate;o!==null&&(o=o.updateQueue,o!==null&&(o=o.memoCache,o!=null&&(r={data:o.data.map(function(h){return h.slice()}),index:0})))}if(r==null&&(r={data:[],index:0}),a===null&&(a=Co(),fe.updateQueue=a),a.memoCache=r,a=r.data[r.index],a===void 0)for(a=r.data[r.index]=Array(e),o=0;o<e;o++)a[o]=le;return r.index++,a}function Mn(e,r){return typeof r=="function"?r(e):r}function ko(e){var r=Je();return lc(r,je,e)}function lc(e,r,a){var o=e.queue;if(o===null)throw Error(i(311));o.lastRenderedReducer=a;var h=e.baseQueue,f=o.pending;if(f!==null){if(h!==null){var v=h.next;h.next=f.next,f.next=v}r.baseQueue=h=f,o.pending=null}if(f=e.baseState,h===null)e.memoizedState=f;else{r=h.next;var S=v=null,C=null,D=r,H=!1;do{var G=D.lane&-536870913;if(G!==D.lane?(ve&G)===G:(jn&G)===G){var z=D.revertLane;if(z===0)C!==null&&(C=C.next={lane:0,revertLane:0,gesture:null,action:D.action,hasEagerState:D.hasEagerState,eagerState:D.eagerState,next:null}),G===Ns&&(H=!0);else if((jn&z)===z){D=D.next,z===Ns&&(H=!0);continue}else G={lane:0,revertLane:D.revertLane,gesture:null,action:D.action,hasEagerState:D.hasEagerState,eagerState:D.eagerState,next:null},C===null?(S=C=G,v=f):C=C.next=G,fe.lanes|=z,hr|=z;G=D.action,Jr&&a(f,G),f=D.hasEagerState?D.eagerState:a(f,G)}else z={lane:G,revertLane:D.revertLane,gesture:D.gesture,action:D.action,hasEagerState:D.hasEagerState,eagerState:D.eagerState,next:null},C===null?(S=C=z,v=f):C=C.next=z,fe.lanes|=G,hr|=G;D=D.next}while(D!==null&&D!==r);if(C===null?v=f:C.next=S,!Lt(f,e.memoizedState)&&(We=!0,H&&(a=Ds,a!==null)))throw a;e.memoizedState=f,e.baseState=v,e.baseQueue=C,o.lastRenderedState=f}return h===null&&(o.lanes=0),[e.memoizedState,o.dispatch]}function uc(e){var r=Je(),a=r.queue;if(a===null)throw Error(i(311));a.lastRenderedReducer=e;var o=a.dispatch,h=a.pending,f=r.memoizedState;if(h!==null){a.pending=null;var v=h=h.next;do f=e(f,v.action),v=v.next;while(v!==h);Lt(f,r.memoizedState)||(We=!0),r.memoizedState=f,r.baseQueue===null&&(r.baseState=f),a.lastRenderedState=f}return[f,o]}function Zd(e,r,a){var o=fe,h=Je(),f=_e;if(f){if(a===void 0)throw Error(i(407));a=a()}else a=r();var v=!Lt((je||h).memoizedState,a);if(v&&(h.memoizedState=a,We=!0),h=h.queue,fc(tp.bind(null,o,h,e),[e]),h.getSnapshot!==r||v||Ze!==null&&Ze.memoizedState.tag&1){if(o.flags|=2048,qs(9,{destroy:void 0},ep.bind(null,o,h,a,r),null),De===null)throw Error(i(349));f||(jn&127)!==0||Wd(o,r,a)}return a}function Wd(e,r,a){e.flags|=16384,e={getSnapshot:r,value:a},r=fe.updateQueue,r===null?(r=Co(),fe.updateQueue=r,r.stores=[e]):(a=r.stores,a===null?r.stores=[e]:a.push(e))}function ep(e,r,a,o){r.value=a,r.getSnapshot=o,np(r)&&rp(e)}function tp(e,r,a){return a(function(){np(r)&&rp(e)})}function np(e){var r=e.getSnapshot;e=e.value;try{var a=r();return!Lt(e,a)}catch{return!0}}function rp(e){var r=qr(e,2);r!==null&&xt(r,e,2)}function cc(e){var r=St();if(typeof e=="function"){var a=e;if(e=a(),Jr){Xn(!0);try{a()}finally{Xn(!1)}}}return r.memoizedState=r.baseState=e,r.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Mn,lastRenderedState:e},r}function sp(e,r,a,o){return e.baseState=a,lc(e,je,typeof o=="function"?o:Mn)}function c_(e,r,a,o,h){if(Uo(e))throw Error(i(485));if(e=r.action,e!==null){var f={payload:h,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(v){f.listeners.push(v)}};B.T!==null?a(!0):f.isTransition=!1,o(f),a=r.pending,a===null?(f.next=r.pending=f,ap(r,f)):(f.next=a.next,r.pending=a.next=f)}}function ap(e,r){var a=r.action,o=r.payload,h=e.state;if(r.isTransition){var f=B.T,v={};B.T=v;try{var S=a(h,o),C=B.S;C!==null&&C(v,S),ip(e,r,S)}catch(D){hc(e,r,D)}finally{f!==null&&v.types!==null&&(f.types=v.types),B.T=f}}
vendor: 5,925 bytes, line 9
9else try{f=a(h,o),ip(e,r,f)}catch(D){hc(e,r,D)}}function ip(e,r,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(o){op(e,r,o)},function(o){return hc(e,r,o)}):op(e,r,a)}function op(e,r,a){r.status="fulfilled",r.value=a,lp(r),e.state=a,r=e.pending,r!==null&&(a=r.next,a===r?e.pending=null:(a=a.next,r.next=a,ap(e,a)))}function hc(e,r,a){var o=e.pending;if(e.pending=null,o!==null){o=o.next;do r.status="rejected",r.reason=a,lp(r),r=r.next;while(r!==o)}e.action=null}function lp(e){e=e.listeners;for(var r=0;r<e.length;r++)(0,e[r])()}function up(e,r){return r}function cp(e,r){if(_e){var a=De.formState;if(a!==null){e:{var o=fe;if(_e){if(He){t:{for(var h=He,f=Jt;h.nodeType!==8;){if(!f){h=null;break t}if(h=Zt(h.nextSibling),h===null){h=null;break t}}f=h.data,h=f==="F!"||f==="F"?h:null}if(h){He=Zt(h.nextSibling),o=h.data==="F!";break e}}nr(o)}o=!1}o&&(r=a[0])}}return a=St(),a.memoizedState=a.baseState=r,o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:up,lastRenderedState:r},a.queue=o,a=xp.bind(null,fe,o),o.dispatch=a,o=cc(!1),f=mc.bind(null,fe,!1,o.queue),o=St(),h={state:r,dispatch:null,action:e,pending:null},o.queue=h,a=c_.bind(null,fe,h,f,a),h.dispatch=a,o.memoizedState=e,[r,a,!1]}function hp(e){var r=Je();return fp(r,je,e)}function fp(e,r,a){if(r=lc(e,r,up)[0],e=ko(Mn)[0],typeof r=="object"&&r!==null&&typeof r.then=="function")try{var o=Ya(r)}catch(v){throw v===Ls?_o:v}else o=r;r=Je();var h=r.queue,f=h.dispatch;return a!==r.memoizedState&&(fe.flags|=2048,qs(9,{destroy:void 0},h_.bind(null,h,a),null)),[o,f,e]}function h_(e,r){e.action=r}function dp(e){var r=Je(),a=je;if(a!==null)return fp(r,a,e);Je(),r=r.memoizedState,a=Je();var o=a.queue.dispatch;return a.memoizedState=e,[r,o,!1]}function qs(e,r,a,o){return e={tag:e,create:a,deps:o,inst:r,next:null},r=fe.updateQueue,r===null&&(r=Co(),fe.updateQueue=r),a=r.lastEffect,a===null?r.lastEffect=e.next=e:(o=a.next,a.next=e,e.next=o,r.lastEffect=e),e}function pp(){return Je().memoizedState}function jo(e,r,a,o){var h=St();fe.flags|=e,h.memoizedState=qs(1|r,{destroy:void 0},a,o===void 0?null:o)}function Mo(e,r,a,o){var h=Je();o=o===void 0?null:o;var f=h.memoizedState.inst;je!==null&&o!==null&&nc(o,je.memoizedState.deps)?h.memoizedState=qs(r,f,a,o):(fe.flags|=e,h.memoizedState=qs(1|r,f,a,o))}function gp(e,r){jo(8390656,8,e,r)}function fc(e,r){Mo(2048,8,e,r)}function f_(e){fe.flags|=4;var r=fe.updateQueue;if(r===null)r=Co(),fe.updateQueue=r,r.events=[e];else{var a=r.events;a===null?r.events=[e]:a.push(e)}}function yp(e){var r=Je().memoizedState;return f_({ref:r,nextImpl:e}),function(){if((Ae&2)!==0)throw Error(i(440));return r.impl.apply(void 0,arguments)}}function mp(e,r){return Mo(4,2,e,r)}function vp(e,r){return Mo(4,4,e,r)}function bp(e,r){if(typeof r=="function"){e=e();var a=r(e);return function(){typeof a=="function"?a():r(null)}}if(r!=null)return e=e(),r.current=e,function(){r.current=null}}function _p(e,r,a){a=a!=null?a.concat([e]):null,Mo(4,4,bp.bind(null,r,e),a)}function dc(){}function Sp(e,r){var a=Je();r=r===void 0?null:r;var o=a.memoizedState;return r!==null&&nc(r,o[1])?o[0]:(a.memoizedState=[e,r],e)}function wp(e,r){var a=Je();r=r===void 0?null:r;var o=a.memoizedState;if(r!==null&&nc(r,o[1]))return o[0];if(o=e(),Jr){Xn(!0);try{e()}finally{Xn(!1)}}return a.memoizedState=[o,r],o}function pc(e,r,a){return a===void 0||(jn&1073741824)!==0&&(ve&261930)===0?e.memoizedState=r:(e.memoizedState=a,e=Eg(),fe.lanes|=e,hr|=e,a)}function Ep(e,r,a,o){return Lt(a,r)?a:Ps.current!==null?(e=pc(e,a,o),Lt(e,r)||(We=!0),e):(jn&42)===0||(jn&1073741824)!==0&&(ve&261930)===0?(We=!0,e.memoizedState=a):(e=Eg(),fe.lanes|=e,hr|=e,r)}function Tp(e,r,a,o,h){var f=F.p;F.p=f!==0&&8>f?f:8;var v=B.T,S={};B.T=S,mc(e,!1,r,a);try{var C=h(),D=B.S;if(D!==null&&D(S,C),C!==null&&typeof C=="object"&&typeof C.then=="function"){var H=o_(C,o);Fa(e,r,H,It(e))}else Fa(e,r,o,It(e))}catch(G){Fa(e,r,{then:function(){},status:"rejected",reason:G},It())}finally{F.p=f,v!==null&&S.types!==null&&(v.types=S.types),B.T=v}}function d_(){}function gc(e,r,a,o){if(e.tag!==5)throw Error(i(476));var h=Rp(e).queue;Tp(e,h,r,oe,a===null?d_:function(){return Ap(e),a(o)})}function Rp(e){var r=e.memoizedState;if(r!==null)return r;r={memoizedState:oe,baseState:oe,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Mn,lastRenderedState:oe},next:null};var a={};return r.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Mn,lastRenderedState:a},next:null},e.memoizedState=r,e=e.alternate,e!==null&&(e.memoizedState=r),r}function Ap(e){var r=Rp(e);r.next===null&&(r=e.alternate.memoizedState),Fa(e,r.next.queue,{},It())}function yc(){return dt(hi)}function Op(){return Je().memoizedState}function Cp(){return Je().memoizedState}function p_(e){for(var r=e.return;r!==null;){switch(r.tag){case 24:case 3:var a=It();e=ar(a);var o=ir(r,e,a);o!==null&&(xt(o,r,a),$a(o,r,a)),r={cache:Vu()},e.payload=r;return}r=r.return}}function g_(e,r,a){var o=It();a={lane:o,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Uo(e)?kp(r,a):(a=Nu(e,r,a,o),a!==null&&(xt(a,e,o),jp(a,r,o)))}function xp(e,r,a){var o=It();Fa(e,r,a,o)}function Fa(e,r,a,o){var h={lane:o,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(Uo(e))kp(r,h);else{var f=e.alternate;if(e.lanes===0&&(f===null||f.lanes===0)&&(f=r.lastRenderedReducer,f!==null))try{var v=r.lastRenderedState,S=f(v,a);if(h.hasEagerState=!0,h.eagerState=S,Lt(S,v))return fo(e,r,h,0),De===null&&ho(),!1}catch{}if(a=Nu(e,r,h,o),a!==null)return xt(a,e,o),jp(a,r,o),!0}return!1}function mc(e,r,a,o){if(o={lane:2,revertLane:Qc(),gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null},Uo(e)){if(r)throw Error(i(479))}else r=Nu(e,a,o,2),r!==null&&xt(r,e,2)}function Uo(e){var r=e.alternate;return e===fe||r!==null&&r===fe}function kp(e,r){Bs=Ao=!0;var a=e.pending;
vendor: 10,278 bytes, line 9
9a===null?r.next=r:(r.next=a.next,a.next=r),e.pending=r}function jp(e,r,a){if((a&4194048)!==0){var o=r.lanes;o&=e.pendingLanes,a|=o,r.lanes=a,Lf(e,a)}}var Qa={readContext:dt,use:xo,useCallback:Ge,useContext:Ge,useEffect:Ge,useImperativeHandle:Ge,useLayoutEffect:Ge,useInsertionEffect:Ge,useMemo:Ge,useReducer:Ge,useRef:Ge,useState:Ge,useDebugValue:Ge,useDeferredValue:Ge,useTransition:Ge,useSyncExternalStore:Ge,useId:Ge,useHostTransitionStatus:Ge,useFormState:Ge,useActionState:Ge,useOptimistic:Ge,useMemoCache:Ge,useCacheRefresh:Ge};Qa.useEffectEvent=Ge;var Mp={readContext:dt,use:xo,useCallback:function(e,r){return St().memoizedState=[e,r===void 0?null:r],e},useContext:dt,useEffect:gp,useImperativeHandle:function(e,r,a){a=a!=null?a.concat([e]):null,jo(4194308,4,bp.bind(null,r,e),a)},useLayoutEffect:function(e,r){return jo(4194308,4,e,r)},useInsertionEffect:function(e,r){jo(4,2,e,r)},useMemo:function(e,r){var a=St();r=r===void 0?null:r;var o=e();if(Jr){Xn(!0);try{e()}finally{Xn(!1)}}return a.memoizedState=[o,r],o},useReducer:function(e,r,a){var o=St();if(a!==void 0){var h=a(r);if(Jr){Xn(!0);try{a(r)}finally{Xn(!1)}}}else h=r;return o.memoizedState=o.baseState=h,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:h},o.queue=e,e=e.dispatch=g_.bind(null,fe,e),[o.memoizedState,e]},useRef:function(e){var r=St();return e={current:e},r.memoizedState=e},useState:function(e){e=cc(e);var r=e.queue,a=xp.bind(null,fe,r);return r.dispatch=a,[e.memoizedState,a]},useDebugValue:dc,useDeferredValue:function(e,r){var a=St();return pc(a,e,r)},useTransition:function(){var e=cc(!1);return e=Tp.bind(null,fe,e.queue,!0,!1),St().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,r,a){var o=fe,h=St();if(_e){if(a===void 0)throw Error(i(407));a=a()}else{if(a=r(),De===null)throw Error(i(349));(ve&127)!==0||Wd(o,r,a)}h.memoizedState=a;var f={value:a,getSnapshot:r};return h.queue=f,gp(tp.bind(null,o,f,e),[e]),o.flags|=2048,qs(9,{destroy:void 0},ep.bind(null,o,f,a,r),null),a},useId:function(){var e=St(),r=De.identifierPrefix;if(_e){var a=dn,o=fn;a=(o&~(1<<32-Dt(o)-1)).toString(32)+a,r="_"+r+"R_"+a,a=Oo++,0<a&&(r+="H"+a.toString(32)),r+="_"}else a=l_++,r="_"+r+"r_"+a.toString(32)+"_";return e.memoizedState=r},useHostTransitionStatus:yc,useFormState:cp,useActionState:cp,useOptimistic:function(e){var r=St();r.memoizedState=r.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return r.queue=a,r=mc.bind(null,fe,!0,a),a.dispatch=r,[e,r]},useMemoCache:oc,useCacheRefresh:function(){return St().memoizedState=p_.bind(null,fe)},useEffectEvent:function(e){var r=St(),a={impl:e};return r.memoizedState=a,function(){if((Ae&2)!==0)throw Error(i(440));return a.impl.apply(void 0,arguments)}}},vc={readContext:dt,use:xo,useCallback:Sp,useContext:dt,useEffect:fc,useImperativeHandle:_p,useInsertionEffect:mp,useLayoutEffect:vp,useMemo:wp,useReducer:ko,useRef:pp,useState:function(){return ko(Mn)},useDebugValue:dc,useDeferredValue:function(e,r){var a=Je();return Ep(a,je.memoizedState,e,r)},useTransition:function(){var e=ko(Mn)[0],r=Je().memoizedState;return[typeof e=="boolean"?e:Ya(e),r]},useSyncExternalStore:Zd,useId:Op,useHostTransitionStatus:yc,useFormState:hp,useActionState:hp,useOptimistic:function(e,r){var a=Je();return sp(a,je,e,r)},useMemoCache:oc,useCacheRefresh:Cp};vc.useEffectEvent=yp;var Up={readContext:dt,use:xo,useCallback:Sp,useContext:dt,useEffect:fc,useImperativeHandle:_p,useInsertionEffect:mp,useLayoutEffect:vp,useMemo:wp,useReducer:uc,useRef:pp,useState:function(){return uc(Mn)},useDebugValue:dc,useDeferredValue:function(e,r){var a=Je();return je===null?pc(a,e,r):Ep(a,je.memoizedState,e,r)},useTransition:function(){var e=uc(Mn)[0],r=Je().memoizedState;return[typeof e=="boolean"?e:Ya(e),r]},useSyncExternalStore:Zd,useId:Op,useHostTransitionStatus:yc,useFormState:dp,useActionState:dp,useOptimistic:function(e,r){var a=Je();return je!==null?sp(a,je,e,r):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:oc,useCacheRefresh:Cp};Up.useEffectEvent=yp;function bc(e,r,a,o){r=e.memoizedState,a=a(o,r),a=a==null?r:y({},r,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var _c={enqueueSetState:function(e,r,a){e=e._reactInternals;var o=It(),h=ar(o);h.payload=r,a!=null&&(h.callback=a),r=ir(e,h,o),r!==null&&(xt(r,e,o),$a(r,e,o))},enqueueReplaceState:function(e,r,a){e=e._reactInternals;var o=It(),h=ar(o);h.tag=1,h.payload=r,a!=null&&(h.callback=a),r=ir(e,h,o),r!==null&&(xt(r,e,o),$a(r,e,o))},enqueueForceUpdate:function(e,r){e=e._reactInternals;var a=It(),o=ar(a);o.tag=2,r!=null&&(o.callback=r),r=ir(e,o,a),r!==null&&(xt(r,e,a),$a(r,e,a))}};function Np(e,r,a,o,h,f,v){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(o,f,v):r.prototype&&r.prototype.isPureReactComponent?!Da(a,o)||!Da(h,f):!0}function Dp(e,r,a,o){e=r.state,typeof r.componentWillReceiveProps=="function"&&r.componentWillReceiveProps(a,o),typeof r.UNSAFE_componentWillReceiveProps=="function"&&r.UNSAFE_componentWillReceiveProps(a,o),r.state!==e&&_c.enqueueReplaceState(r,r.state,null)}function Xr(e,r){var a=r;if("ref"in r){a={};for(var o in r)o!=="ref"&&(a[o]=r[o])}if(e=e.defaultProps){a===r&&(a=y({},a));for(var h in e)a[h]===void 0&&(a[h]=e[h])}return a}function Lp(e){co(e)}function zp(e){console.error(e)}function Pp(e){co(e)}function No(e,r){try{var a=e.onUncaughtError;a(r.value,{componentStack:r.stack})}catch(o){setTimeout(function(){throw o})}}function Bp(e,r,a){try{var o=e.onCaughtError;o(a.value,{componentStack:a.stack,errorBoundary:r.tag===1?r.stateNode:null})}catch(h){setTimeout(function(){throw h})}}function Sc(e,r,a){return a=ar(a),a.tag=3,a.payload={element:null},a.callback=function(){No(e,r)},a}function Hp(e){return e=ar(e),e.tag=3,e}function qp(e,r,a,o){var h=a.type.getDerivedStateFromError;if(typeof h=="function"){var f=o.value;e.payload=function(){return h(f)},e.callback=function(){Bp(r,a,o)}}var v=a.stateNode;v!==null&&typeof v.componentDidCatch=="function"&&(e.callback=function(){Bp(r,a,o),typeof h!="function"&&(fr===null?fr=new Set([this]):fr.add(this));var S=o.stack;this.componentDidCatch(o.value,{componentStack:S!==null?S:""})})}function y_(e,r,a,o,h){if(a.flags|=32768,o!==null&&typeof o=="object"&&typeof o.then=="function"){if(r=a.alternate,r!==null&&Us(r,a,h,!0),a=Pt.current,a!==null){switch(a.tag){case 31:case 13:return Xt===null?Ko():a.alternate===null&&Ve===0&&(Ve=3),a.flags&=-257,a.flags|=65536,a.lanes=h,o===So?a.flags|=16384:(r=a.updateQueue,r===null?a.updateQueue=new Set([o]):r.add(o),Kc(e,o,h)),!1;case 22:return a.flags|=65536,o===So?a.flags|=16384:(r=a.updateQueue,r===null?(r={transitions:null,markerInstances:null,retryQueue:new Set([o])},a.updateQueue=r):(a=r.retryQueue,a===null?r.retryQueue=new Set([o]):a.add(o)),Kc(e,o,h)),!1}throw Error(i(435,a.tag))}return Kc(e,o,h),Ko(),!1}if(_e)return r=Pt.current,r!==null?((r.flags&65536)===0&&(r.flags|=256),r.flags|=65536,r.lanes=h,o!==Hu&&(e=Error(i(422),{cause:o}),Pa(Yt(e,a)))):(o!==Hu&&(r=Error(i(423),{cause:o}),Pa(Yt(r,a))),e=e.current.alternate,e.flags|=65536,h&=-h,e.lanes|=h,o=Yt(o,a),h=Sc(e.stateNode,o,h),Xu(e,h),Ve!==4&&(Ve=2)),!1;var f=Error(i(520),{cause:o});if(f=Yt(f,a),ri===null?ri=[f]:ri.push(f),Ve!==4&&(Ve=2),r===null)return!0;o=Yt(o,a),a=r;do{switch(a.tag){case 3:return a.flags|=65536,e=h&-h,a.lanes|=e,e=Sc(a.stateNode,o,e),Xu(a,e),!1;case 1:if(r=a.type,f=a.stateNode,(a.flags&128)===0&&(typeof r.getDerivedStateFromError=="function"||f!==null&&typeof f.componentDidCatch=="function"&&(fr===null||!fr.has(f))))return a.flags|=65536,h&=-h,a.lanes|=h,h=Hp(h),qp(h,e,a,o),Xu(a,h),!1}a=a.return}while(a!==null);return!1}var wc=Error(i(461)),We=!1;function pt(e,r,a,o){r.child=e===null?Vd(r,null,a,o):Qr(r,e.child,a,o)}function Ip(e,r,a,o,h){a=a.render;var f=r.ref;if("ref"in o){var v={};for(var S in o)S!=="ref"&&(v[S]=o[S])}else v=o;return Vr(r),o=rc(e,r,a,v,f,h),S=sc(),e!==null&&!We?(ac(e,r,h),Un(e,r,h)):(_e&&S&&Pu(r),r.flags|=1,pt(e,r,o,h),r.child)}function $p(e,r,a,o,h){if(e===null){var f=a.type;return typeof f=="function"&&!Du(f)&&f.defaultProps===void 0&&a.compare===null?(r.tag=15,r.type=f,Gp(e,r,f,o,h)):(e=go(a.type,null,o,r,r.mode,h),e.ref=r.ref,e.return=r,r.child=e)}if(f=e.child,!kc(e,h)){var v=f.memoizedProps;if(a=a.compare,a=a!==null?a:Da,a(v,o)&&e.ref===r.ref)return Un(e,r,h)}return r.flags|=1,e=On(f,o),e.ref=r.ref,e.return=r,r.child=e}function Gp(e,r,a,o,h){if(e!==null){var f=e.memoizedProps;if(Da(f,o)&&e.ref===r.ref)if(We=!1,r.pendingProps=o=f,kc(e,h))(e.flags&131072)!==0&&(We=!0);else return r.lanes=e.lanes,Un(e,r,h)}return Ec(e,r,a,o,h)}function Vp(e,r,a,o){var h=o.children,f=e!==null?e.memoizedState:null;if(e===null&&r.stateNode===null&&(r.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),o.mode==="hidden"){if((r.flags&128)!==0){if(f=f!==null?f.baseLanes|a:a,e!==null){for(o=r.child=e.child,h=0;o!==null;)h=h|o.lanes|o.childLanes,o=o.sibling;o=h&~f}else o=0,r.child=null;return Kp(e,r,f,a,o)}if((a&536870912)!==0)r.memoizedState={baseLanes:0,cachePool:null},e!==null&&bo(r,f!==null?f.cachePool:null),f!==null?Fd(r,f):Wu(),Qd(r);else return o=r.lanes=536870912,Kp(e,r,f!==null?f.baseLanes|a:a,a,o)}else f!==null?(bo(r,f.cachePool),Fd(r,f),lr(),r.memoizedState=null):(e!==null&&bo(r,null),Wu(),lr());return pt(e,r,h,a),r.child}function Ja(e,r){return e!==null&&e.tag===22||r.stateNode!==null||(r.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.sibling}function Kp(e,r,a,o,h){var f=Yu();return f=f===null?null:{parent:Xe._currentValue,pool:f},r.memoizedState={baseLanes:a,cachePool:f},e!==null&&bo(r,null),Wu(),Qd(r),e!==null&&Us(e,r,o,!0),r.childLanes=h,null}function Do(e,r){return r=zo({mode:r.mode,children:r.children},e.mode),r.ref=e.ref,e.child=r,r.return=e,r}function Yp(e,r,a){return Qr(r,e.child,null,a),e=Do(r,r.pendingProps),e.flags|=2,Bt(r),r.memoizedState=null,e}function m_(e,r,a){var o=r.pendingProps,h=(r.flags&128)!==0;if(r.flags&=-129,e===null){if(_e){if(o.mode==="hidden")return e=Do(r,o),r.lanes=536870912,Ja(null,e);if(tc(r),(e=He)?(e=ay(e,Jt),e=e!==null&&e.data==="&"?e:null,e!==null&&(r.memoizedState={dehydrated:e,treeContext:er!==null?{id:fn,overflow:dn}:null,retryLane:536870912,hydrationErrors:null}
vendor: 4,547 bytes, line 9
9,a=kd(e),a.return=r,r.child=a,ft=r,He=null)):e=null,e===null)throw nr(r);return r.lanes=536870912,null}return Do(r,o)}var f=e.memoizedState;if(f!==null){var v=f.dehydrated;if(tc(r),h)if(r.flags&256)r.flags&=-257,r=Yp(e,r,a);else if(r.memoizedState!==null)r.child=e.child,r.flags|=128,r=null;else throw Error(i(558));else if(We||Us(e,r,a,!1),h=(a&e.childLanes)!==0,We||h){if(o=De,o!==null&&(v=zf(o,a),v!==0&&v!==f.retryLane))throw f.retryLane=v,qr(e,v),xt(o,e,v),wc;Ko(),r=Yp(e,r,a)}else e=f.treeContext,He=Zt(v.nextSibling),ft=r,_e=!0,tr=null,Jt=!1,e!==null&&Ud(r,e),r=Do(r,o),r.flags|=4096;return r}return e=On(e.child,{mode:o.mode,children:o.children}),e.ref=r.ref,r.child=e,e.return=r,e}function Lo(e,r){var a=r.ref;if(a===null)e!==null&&e.ref!==null&&(r.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(i(284));(e===null||e.ref!==a)&&(r.flags|=4194816)}}function Ec(e,r,a,o,h){return Vr(r),a=rc(e,r,a,o,void 0,h),o=sc(),e!==null&&!We?(ac(e,r,h),Un(e,r,h)):(_e&&o&&Pu(r),r.flags|=1,pt(e,r,a,h),r.child)}function Fp(e,r,a,o,h,f){return Vr(r),r.updateQueue=null,a=Xd(r,o,a,h),Jd(e),o=sc(),e!==null&&!We?(ac(e,r,f),Un(e,r,f)):(_e&&o&&Pu(r),r.flags|=1,pt(e,r,a,f),r.child)}function Qp(e,r,a,o,h){if(Vr(r),r.stateNode===null){var f=xs,v=a.contextType;typeof v=="object"&&v!==null&&(f=dt(v)),f=new a(o,f),r.memoizedState=f.state!==null&&f.state!==void 0?f.state:null,f.updater=_c,r.stateNode=f,f._reactInternals=r,f=r.stateNode,f.props=o,f.state=r.memoizedState,f.refs={},Qu(r),v=a.contextType,f.context=typeof v=="object"&&v!==null?dt(v):xs,f.state=r.memoizedState,v=a.getDerivedStateFromProps,typeof v=="function"&&(bc(r,a,v,o),f.state=r.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof f.getSnapshotBeforeUpdate=="function"||typeof f.UNSAFE_componentWillMount!="function"&&typeof f.componentWillMount!="function"||(v=f.state,typeof f.componentWillMount=="function"&&f.componentWillMount(),typeof f.UNSAFE_componentWillMount=="function"&&f.UNSAFE_componentWillMount(),v!==f.state&&_c.enqueueReplaceState(f,f.state,null),Va(r,o,f,h),Ga(),f.state=r.memoizedState),typeof f.componentDidMount=="function"&&(r.flags|=4194308),o=!0}else if(e===null){f=r.stateNode;var S=r.memoizedProps,C=Xr(a,S);f.props=C;var D=f.context,H=a.contextType;v=xs,typeof H=="object"&&H!==null&&(v=dt(H));var G=a.getDerivedStateFromProps;H=typeof G=="function"||typeof f.getSnapshotBeforeUpdate=="function",S=r.pendingProps!==S,H||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(S||D!==v)&&Dp(r,f,o,v),sr=!1;var z=r.memoizedState;f.state=z,Va(r,o,f,h),Ga(),D=r.memoizedState,S||z!==D||sr?(typeof G=="function"&&(bc(r,a,G,o),D=r.memoizedState),(C=sr||Np(r,a,C,o,z,D,v))?(H||typeof f.UNSAFE_componentWillMount!="function"&&typeof f.componentWillMount!="function"||(typeof f.componentWillMount=="function"&&f.componentWillMount(),typeof f.UNSAFE_componentWillMount=="function"&&f.UNSAFE_componentWillMount()),typeof f.componentDidMount=="function"&&(r.flags|=4194308)):(typeof f.componentDidMount=="function"&&(r.flags|=4194308),r.memoizedProps=o,r.memoizedState=D),f.props=o,f.state=D,f.context=v,o=C):(typeof f.componentDidMount=="function"&&(r.flags|=4194308),o=!1)}else{f=r.stateNode,Ju(e,r),v=r.memoizedProps,H=Xr(a,v),f.props=H,G=r.pendingProps,z=f.context,D=a.contextType,C=xs,typeof D=="object"&&D!==null&&(C=dt(D)),S=a.getDerivedStateFromProps,(D=typeof S=="function"||typeof f.getSnapshotBeforeUpdate=="function")||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(v!==G||z!==C)&&Dp(r,f,o,C),sr=!1,z=r.memoizedState,f.state=z,Va(r,o,f,h),Ga();var P=r.memoizedState;v!==G||z!==P||sr||e!==null&&e.dependencies!==null&&mo(e.dependencies)?(typeof S=="function"&&(bc(r,a,S,o),P=r.memoizedState),(H=sr||Np(r,a,H,o,z,P,C)||e!==null&&e.dependencies!==null&&mo(e.dependencies))?(D||typeof f.UNSAFE_componentWillUpdate!="function"&&typeof f.componentWillUpdate!="function"||(typeof f.componentWillUpdate=="function"&&f.componentWillUpdate(o,P,C),typeof f.UNSAFE_componentWillUpdate=="function"&&f.UNSAFE_componentWillUpdate(o,P,C)),typeof f.componentDidUpdate=="function"&&(r.flags|=4),typeof f.getSnapshotBeforeUpdate=="function"&&(r.flags|=1024)):(typeof f.componentDidUpdate!="function"||v===e.memoizedProps&&z===e.memoizedState||(r.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||v===e.memoizedProps&&z===e.memoizedState||(r.flags|=1024),r.memoizedProps=o,r.memoizedState=P),f.props=o,f.state=P,f.context=C,o=
vendor: 5,188 bytes, line 9
9H):(typeof f.componentDidUpdate!="function"||v===e.memoizedProps&&z===e.memoizedState||(r.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||v===e.memoizedProps&&z===e.memoizedState||(r.flags|=1024),o=!1)}return f=o,Lo(e,r),o=(r.flags&128)!==0,f||o?(f=r.stateNode,a=o&&typeof a.getDerivedStateFromError!="function"?null:f.render(),r.flags|=1,e!==null&&o?(r.child=Qr(r,e.child,null,h),r.child=Qr(r,null,a,h)):pt(e,r,a,h),r.memoizedState=f.state,e=r.child):e=Un(e,r,h),e}function Jp(e,r,a,o){return $r(),r.flags|=256,pt(e,r,a,o),r.child}var Tc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Rc(e){return{baseLanes:e,cachePool:Bd()}}function Ac(e,r,a){return e=e!==null?e.childLanes&~a:0,r&&(e|=qt),e}function Xp(e,r,a){var o=r.pendingProps,h=!1,f=(r.flags&128)!==0,v;if((v=f)||(v=e!==null&&e.memoizedState===null?!1:(Qe.current&2)!==0),v&&(h=!0,r.flags&=-129),v=(r.flags&32)!==0,r.flags&=-33,e===null){if(_e){if(h?or(r):lr(),(e=He)?(e=ay(e,Jt),e=e!==null&&e.data!=="&"?e:null,e!==null&&(r.memoizedState={dehydrated:e,treeContext:er!==null?{id:fn,overflow:dn}:null,retryLane:536870912,hydrationErrors:null},a=kd(e),a.return=r,r.child=a,ft=r,He=null)):e=null,e===null)throw nr(r);return lh(e)?r.lanes=32:r.lanes=536870912,null}var S=o.children;return o=o.fallback,h?(lr(),h=r.mode,S=zo({mode:"hidden",children:S},h),o=Ir(o,h,a,null),S.return=r,o.return=r,S.sibling=o,r.child=S,o=r.child,o.memoizedState=Rc(a),o.childLanes=Ac(e,v,a),r.memoizedState=Tc,Ja(null,o)):(or(r),Oc(r,S))}var C=e.memoizedState;if(C!==null&&(S=C.dehydrated,S!==null)){if(f)r.flags&256?(or(r),r.flags&=-257,r=Cc(e,r,a)):r.memoizedState!==null?(lr(),r.child=e.child,r.flags|=128,r=null):(lr(),S=o.fallback,h=r.mode,o=zo({mode:"visible",children:o.children},h),S=Ir(S,h,a,null),S.flags|=2,o.return=r,S.return=r,o.sibling=S,r.child=o,Qr(r,e.child,null,a),o=r.child,o.memoizedState=Rc(a),o.childLanes=Ac(e,v,a),r.memoizedState=Tc,r=Ja(null,o));else if(or(r),lh(S)){if(v=S.nextSibling&&S.nextSibling.dataset,v)var D=v.dgst;v=D,o=Error(i(419)),o.stack="",o.digest=v,Pa({value:o,source:null,stack:null}),r=Cc(e,r,a)}else if(We||Us(e,r,a,!1),v=(a&e.childLanes)!==0,We||v){if(v=De,v!==null&&(o=zf(v,a),o!==0&&o!==C.retryLane))throw C.retryLane=o,qr(e,o),xt(v,e,o),wc;oh(S)||Ko(),r=Cc(e,r,a)}else oh(S)?(r.flags|=192,r.child=e.child,r=null):(e=C.treeContext,He=Zt(S.nextSibling),ft=r,_e=!0,tr=null,Jt=!1,e!==null&&Ud(r,e),r=Oc(r,o.children),r.flags|=4096);return r}return h?(lr(),S=o.fallback,h=r.mode,C=e.child,D=C.sibling,o=On(C,{mode:"hidden",children:o.children}),o.subtreeFlags=C.subtreeFlags&65011712,D!==null?S=On(D,S):(S=Ir(S,h,a,null),S.flags|=2),S.return=r,o.return=r,o.sibling=S,r.child=o,Ja(null,o),o=r.child,S=e.child.memoizedState,S===null?S=Rc(a):(h=S.cachePool,h!==null?(C=Xe._currentValue,h=h.parent!==C?{parent:C,pool:C}:h):h=Bd(),S={baseLanes:S.baseLanes|a,cachePool:h}),o.memoizedState=S,o.childLanes=Ac(e,v,a),r.memoizedState=Tc,Ja(e.child,o)):(or(r),a=e.child,e=a.sibling,a=On(a,{mode:"visible",children:o.children}),a.return=r,a.sibling=null,e!==null&&(v=r.deletions,v===null?(r.deletions=[e],r.flags|=16):v.push(e)),r.child=a,r.memoizedState=null,a)}function Oc(e,r){return r=zo({mode:"visible",children:r},e.mode),r.return=e,e.child=r}function zo(e,r){return e=zt(22,e,null,r),e.lanes=0,e}function Cc(e,r,a){return Qr(r,e.child,null,a),e=Oc(r,r.pendingProps.children),e.flags|=2,r.memoizedState=null,e}function Zp(e,r,a){e.lanes|=r;var o=e.alternate;o!==null&&(o.lanes|=r),$u(e.return,r,a)}function xc(e,r,a,o,h,f){var v=e.memoizedState;v===null?e.memoizedState={isBackwards:r,rendering:null,renderingStartTime:0,last:o,tail:a,tailMode:h,treeForkCount:f}:(v.isBackwards=r,v.rendering=null,v.renderingStartTime=0,v.last=o,v.tail=a,v.tailMode=h,v.treeForkCount=f)}function Wp(e,r,a){var o=r.pendingProps,h=o.revealOrder,f=o.tail;o=o.children;var v=Qe.current,S=(v&2)!==0;if(S?(v=v&1|2,r.flags|=128):v&=1,X(Qe,v),pt(e,r,o,a),o=_e?za:0,!S&&e!==null&&(e.flags&128)!==0)e:for(e=r.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Zp(e,a,r);else if(e.tag===19)Zp(e,a,r);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===r)break e;for(;e.sibling===null;){if(e.return===null||e.return===r)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(h){case"forwards":for(a=r.child,h=null;a!==null;)e=a.alternate,e!==null&&Ro(e)===null&&(h=a),a=a.sibling;a=h,a===null?(h=r.child,r.child=null):(h=a.sibling,a.sibling=null),xc(r,!1,h,a,f,o);break;case"backwards":case"unstable_legacy-backwards":for(a=null,h=r.child,r.child=null;h!==null;){if(e=h.alternate,e!==null&&Ro(e)===null){r.child=h;break}e=h.sibling,h.sibling=a,a=h,h=e}xc(r,!0,a,null,f,o);break;case"together":xc(r,!1,null,null,void 0,o);break;default:r.memoizedState=null}return r.child}function Un(e,r,a){if(e!==null&&(r.dependencies=e.dependencies),hr|=r.lanes,(a&r.childLanes)===0)if(e!==null){if(Us(e,r,a,!1),(a&r.childLanes)===0)return null}else return null;if(e!==null&&r.child!==e.child)throw Error(i(153));if(r.child!==null){for(e=r.child,a=On(e,e.pendingProps),r.child=a,a.return=r;e.sibling!==null;)e=e.sibling,a=a.sibling=On(e,e.pendingProps),a.return=r;a.sibling=null}return r.child}
vendor: 4,080 bytes, line 9
9function kc(e,r){return(e.lanes&r)!==0?!0:(e=e.dependencies,!!(e!==null&&mo(e)))}function v_(e,r,a){switch(r.tag){case 3:Fe(r,r.stateNode.containerInfo),rr(r,Xe,e.memoizedState.cache),$r();break;case 27:case 5:Sn(r);break;case 4:Fe(r,r.stateNode.containerInfo);break;case 10:rr(r,r.type,r.memoizedProps.value);break;case 31:if(r.memoizedState!==null)return r.flags|=128,tc(r),null;break;case 13:var o=r.memoizedState;if(o!==null)return o.dehydrated!==null?(or(r),r.flags|=128,null):(a&r.child.childLanes)!==0?Xp(e,r,a):(or(r),e=Un(e,r,a),e!==null?e.sibling:null);or(r);break;case 19:var h=(e.flags&128)!==0;if(o=(a&r.childLanes)!==0,o||(Us(e,r,a,!1),o=(a&r.childLanes)!==0),h){if(o)return Wp(e,r,a);r.flags|=128}if(h=r.memoizedState,h!==null&&(h.rendering=null,h.tail=null,h.lastEffect=null),X(Qe,Qe.current),o)break;return null;case 22:return r.lanes=0,Vp(e,r,a,r.pendingProps);case 24:rr(r,Xe,e.memoizedState.cache)}return Un(e,r,a)}function eg(e,r,a){if(e!==null)if(e.memoizedProps!==r.pendingProps)We=!0;else{if(!kc(e,a)&&(r.flags&128)===0)return We=!1,v_(e,r,a);We=(e.flags&131072)!==0}else We=!1,_e&&(r.flags&1048576)!==0&&Md(r,za,r.index);switch(r.lanes=0,r.tag){case 16:e:{var o=r.pendingProps;if(e=Yr(r.elementType),r.type=e,typeof e=="function")Du(e)?(o=Xr(e,o),r.tag=1,r=Qp(null,r,e,o,a)):(r.tag=0,r=Ec(null,r,e,o,a));else{if(e!=null){var h=e.$$typeof;if(h===L){r.tag=11,r=Ip(null,r,e,o,a);break e}else if(h===q){r.tag=14,r=$p(null,r,e,o,a);break e}}throw r=Ye(e)||e,Error(i(306,r,""))}}return r;case 0:return Ec(e,r,r.type,r.pendingProps,a);case 1:return o=r.type,h=Xr(o,r.pendingProps),Qp(e,r,o,h,a);case 3:e:{if(Fe(r,r.stateNode.containerInfo),e===null)throw Error(i(387));o=r.pendingProps;var f=r.memoizedState;h=f.element,Ju(e,r),Va(r,o,null,a);var v=r.memoizedState;if(o=v.cache,rr(r,Xe,o),o!==f.cache&&Gu(r,[Xe],a,!0),Ga(),o=v.element,f.isDehydrated)if(f={element:o,isDehydrated:!1,cache:v.cache},r.updateQueue.baseState=f,r.memoizedState=f,r.flags&256){r=Jp(e,r,o,a);break e}else if(o!==h){h=Yt(Error(i(424)),r),Pa(h),r=Jp(e,r,o,a);break e}else for(e=r.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,He=Zt(e.firstChild),ft=r,_e=!0,tr=null,Jt=!0,a=Vd(r,null,o,a),r.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling;else{if($r(),o===h){r=Un(e,r,a);break e}pt(e,r,o,a)}r=r.child}return r;case 26:return Lo(e,r),e===null?(a=hy(r.type,null,r.pendingProps,null))?r.memoizedState=a:_e||(a=r.type,e=r.pendingProps,o=Wo(pe.current).createElement(a),o[ht]=r,o[Et]=e,gt(o,a,e),it(o),r.stateNode=o):r.memoizedState=hy(r.type,e.memoizedProps,r.pendingProps,e.memoizedState),null;case 27:return Sn(r),e===null&&_e&&(o=r.stateNode=ly(r.type,r.pendingProps,pe.current),ft=r,Jt=!0,h=He,yr(r.type)?(uh=h,He=Zt(o.firstChild)):He=h),pt(e,r,r.pendingProps.children,a),Lo(e,r),e===null&&(r.flags|=4194304),r.child;case 5:return e===null&&_e&&((h=o=He)&&(o=F_(o,r.type,r.pendingProps,Jt),o!==null?(r.stateNode=o,ft=r,He=Zt(o.firstChild),Jt=!1,h=!0):h=!1),h||nr(r)),Sn(r),h=r.type,f=r.pendingProps,v=e!==null?e.memoizedProps:null,o=f.children,sh(h,f)?o=null:v!==null&&sh(h,v)&&(r.flags|=32),r.memoizedState!==null&&(h=rc(e,r,u_,null,null,a),hi._currentValue=h),Lo(e,r),pt(e,r,o,a),r.child;case 6:return e===null&&_e&&((e=a=He)&&(a=Q_(a,r.pendingProps,Jt),a!==null?(r.stateNode=a,ft=r,He=null,e=!0):e=!1),e||nr(r)),null;case 13:return Xp(e,r,a);case 4:return Fe(r,r.stateNode.containerInfo),o=r.pendingProps,e===null?r.child=Qr(r,null,o,a):pt(e,r,o,a),r.child;case 11:return Ip(e,r,r.type,r.pendingProps,a);case 7:return pt(e,r,r.pendingProps,a),r.child;case 8:return pt(e,r,r.pendingProps.children,a),r.child;case 12:return pt(e,r,r.pendingProps.children,a),r.child;case 10:return o=r.pendingProps,rr(r,r.type,o.value),pt(e,r,o.children,a),r.child;case 9:return h=r.type._context,o=r.pendingProps.children,Vr(r),h=dt(h),o=o(h),r.flags|=1,pt(e,r,o,a),r.child;case 14:return $p(e,r,r.type,r.pendingProps,a);case 15:return Gp(e,r,r.type,r.pendingProps,a);case 19:return Wp(e,r,a);case 31:return m_(e,r,a);case 22:return Vp(e,r,a,r.pendingProps);
vendor: 3,295 bytes, line 9
9case 24:return Vr(r),o=dt(Xe),e===null?(h=Yu(),h===null&&(h=De,f=Vu(),h.pooledCache=f,f.refCount++,f!==null&&(h.pooledCacheLanes|=a),h=f),r.memoizedState={parent:o,cache:h},Qu(r),rr(r,Xe,h)):((e.lanes&a)!==0&&(Ju(e,r),Va(r,null,null,a),Ga()),h=e.memoizedState,f=r.memoizedState,h.parent!==o?(h={parent:o,cache:o},r.memoizedState=h,r.lanes===0&&(r.memoizedState=r.updateQueue.baseState=h),rr(r,Xe,o)):(o=f.cache,rr(r,Xe,o),o!==h.cache&&Gu(r,[Xe],a,!0))),pt(e,r,r.pendingProps.children,a),r.child;case 29:throw r.pendingProps}throw Error(i(156,r.tag))}function Nn(e){e.flags|=4}function jc(e,r,a,o,h){if((r=(e.mode&32)!==0)&&(r=!1),r){if(e.flags|=16777216,(h&335544128)===h)if(e.stateNode.complete)e.flags|=8192;else if(Og())e.flags|=8192;else throw Fr=So,Fu}else e.flags&=-16777217}function tg(e,r){if(r.type!=="stylesheet"||(r.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!yy(r))if(Og())e.flags|=8192;else throw Fr=So,Fu}function Po(e,r){r!==null&&(e.flags|=4),e.flags&16384&&(r=e.tag!==22?Nf():536870912,e.lanes|=r,Vs|=r)}function Xa(e,r){if(!_e)switch(e.tailMode){case"hidden":r=e.tail;for(var a=null;r!==null;)r.alternate!==null&&(a=r),r=r.sibling;a===null?e.tail=null:a.sibling=null;break;case"collapsed":a=e.tail;for(var o=null;a!==null;)a.alternate!==null&&(o=a),a=a.sibling;o===null?r||e.tail===null?e.tail=null:e.tail.sibling=null:o.sibling=null}}function qe(e){var r=e.alternate!==null&&e.alternate.child===e.child,a=0,o=0;if(r)for(var h=e.child;h!==null;)a|=h.lanes|h.childLanes,o|=h.subtreeFlags&65011712,o|=h.flags&65011712,h.return=e,h=h.sibling;else for(h=e.child;h!==null;)a|=h.lanes|h.childLanes,o|=h.subtreeFlags,o|=h.flags,h.return=e,h=h.sibling;return e.subtreeFlags|=o,e.childLanes=a,r}function b_(e,r,a){var o=r.pendingProps;switch(Bu(r),r.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return qe(r),null;case 1:return qe(r),null;case 3:return a=r.stateNode,o=null,e!==null&&(o=e.memoizedState.cache),r.memoizedState.cache!==o&&(r.flags|=2048),kn(Xe),Ne(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(Ms(r)?Nn(r):e===null||e.memoizedState.isDehydrated&&(r.flags&256)===0||(r.flags|=1024,qu())),qe(r),null;case 26:var h=r.type,f=r.memoizedState;return e===null?(Nn(r),f!==null?(qe(r),tg(r,f)):(qe(r),jc(r,h,null,o,a))):f?f!==e.memoizedState?(Nn(r),qe(r),tg(r,f)):(qe(r),r.flags&=-16777217):(e=e.memoizedProps,e!==o&&Nn(r),qe(r),jc(r,h,e,o,a)),null;case 27:if(wn(r),a=pe.current,h=r.type,e!==null&&r.stateNode!=null)e.memoizedProps!==o&&Nn(r);else{if(!o){if(r.stateNode===null)throw Error(i(166));return qe(r),null}e=W.current,Ms(r)?Nd(r):(e=ly(h,o,a),r.stateNode=e,Nn(r))}return qe(r),null;case 5:if(wn(r),h=r.type,e!==null&&r.stateNode!=null)e.memoizedProps!==o&&Nn(r);else{if(!o){if(r.stateNode===null)throw Error(i(166));return qe(r),null}if(f=W.current,Ms(r))Nd(r);else{var v=Wo(pe.current);switch(f){case 1:f=v.createElementNS("http://www.w3.org/2000/svg",h);break;case 2:f=v.createElementNS("http://www.w3.org/1998/Math/MathML",h);break;default:switch(h){case"svg":f=v.createElementNS("http://www.w3.org/2000/svg",h);break;case"math":f=v.createElementNS("http://www.w3.org/1998/Math/MathML",h);break;case"script":f=v.createElement("div"),f.innerHTML="<script><\/script>
9",f=f.removeChild(f.firstChild);break;case"select":f=typeof o.is=="string"?v.createElement("select",{is:o.is}):v.createElement("select"),o.multiple?f.multiple=!0:o.size&&(f.size=o.size);break;default:f=typeof o.is=="string"?v.createElement(h,{is:o.is}):v.createElement(h)}}f[ht]=r,f[Et]=o;e:for(v=r.child;v!==null;){if(v.tag===5||v.tag===6)f.appendChild(v.stateNode);else if(v.tag!==4&&v.tag!==27&&v.child!==null){v.child.return=v,v=v.child;continue}if(v===r)break e;for(;v.sibling===null;){if(v.return===null||v.return===r)break e;v=v.return}v.sibling.return=v.return,v=v.sibling}r.stateNode=f;e:switch(gt(f,h,o),h){case"button":case"input":case"select":case"textarea":o=!!o.autoFocus;break e;case"img":o=!0;break e;default:o=!1}o&&Nn(r)}}return qe(r),jc(r,r.type,e===null?null:e.memoizedProps,r.pendingProps,a),null;case 6:if(e&&r.stateNode!=null)e.memoizedProps!==o&&Nn(r);else{if(typeof o!="string"&&r.stateNode===null)throw Error(i(166));if(e=pe.current,Ms(r)){if(e=r.stateNode,a=r.memoizedProps,o=null,h=ft,h!==null)switch(h.tag){case 27:case 5:o=h.memoizedProps}e[ht]=r,e=!!(e.nodeValue===a||o!==null&&o.suppressHydrationWarning===!0||Xg(e.nodeValue,a)),e||nr(r,!0)}else e=Wo(e).createTextNode(o),e[ht]=r,r.stateNode=e}return qe(r),null;case 31:if(a=r.memoizedState,e===null||e.memoizedState!==null){if(o=Ms(r),a!==null){if(e===null){if(!o)throw Error(i(318));if(e=r.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(i(557));e[ht]=r}else $r(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;qe(r),e=!1}
vendor: 25,701 bytes, line 9
9else a=qu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return r.flags&256?(Bt(r),r):(Bt(r),null);if((r.flags&128)!==0)throw Error(i(558))}return qe(r),null;case 13:if(o=r.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(h=Ms(r),o!==null&&o.dehydrated!==null){if(e===null){if(!h)throw Error(i(318));if(h=r.memoizedState,h=h!==null?h.dehydrated:null,!h)throw Error(i(317));h[ht]=r}else $r(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;qe(r),h=!1}else h=qu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=h),h=!0;if(!h)return r.flags&256?(Bt(r),r):(Bt(r),null)}return Bt(r),(r.flags&128)!==0?(r.lanes=a,r):(a=o!==null,e=e!==null&&e.memoizedState!==null,a&&(o=r.child,h=null,o.alternate!==null&&o.alternate.memoizedState!==null&&o.alternate.memoizedState.cachePool!==null&&(h=o.alternate.memoizedState.cachePool.pool),f=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(f=o.memoizedState.cachePool.pool),f!==h&&(o.flags|=2048)),a!==e&&a&&(r.child.flags|=8192),Po(r,r.updateQueue),qe(r),null);case 4:return Ne(),e===null&&Wc(r.stateNode.containerInfo),qe(r),null;case 10:return kn(r.type),qe(r),null;case 19:if($(Qe),o=r.memoizedState,o===null)return qe(r),null;if(h=(r.flags&128)!==0,f=o.rendering,f===null)if(h)Xa(o,!1);else{if(Ve!==0||e!==null&&(e.flags&128)!==0)for(e=r.child;e!==null;){if(f=Ro(e),f!==null){for(r.flags|=128,Xa(o,!1),e=f.updateQueue,r.updateQueue=e,Po(r,e),r.subtreeFlags=0,e=a,a=r.child;a!==null;)xd(a,e),a=a.sibling;return X(Qe,Qe.current&1|2),_e&&Cn(r,o.treeForkCount),r.child}e=e.sibling}o.tail!==null&&bt()>$o&&(r.flags|=128,h=!0,Xa(o,!1),r.lanes=4194304)}else{if(!h)if(e=Ro(f),e!==null){if(r.flags|=128,h=!0,e=e.updateQueue,r.updateQueue=e,Po(r,e),Xa(o,!0),o.tail===null&&o.tailMode==="hidden"&&!f.alternate&&!_e)return qe(r),null}else 2*bt()-o.renderingStartTime>$o&&a!==536870912&&(r.flags|=128,h=!0,Xa(o,!1),r.lanes=4194304);o.isBackwards?(f.sibling=r.child,r.child=f):(e=o.last,e!==null?e.sibling=f:r.child=f,o.last=f)}return o.tail!==null?(e=o.tail,o.rendering=e,o.tail=e.sibling,o.renderingStartTime=bt(),e.sibling=null,a=Qe.current,X(Qe,h?a&1|2:a&1),_e&&Cn(r,o.treeForkCount),e):(qe(r),null);case 22:case 23:return Bt(r),ec(),o=r.memoizedState!==null,e!==null?e.memoizedState!==null!==o&&(r.flags|=8192):o&&(r.flags|=8192),o?(a&536870912)!==0&&(r.flags&128)===0&&(qe(r),r.subtreeFlags&6&&(r.flags|=8192)):qe(r),a=r.updateQueue,a!==null&&Po(r,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048),e!==null&&$(Kr),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),r.memoizedState.cache!==a&&(r.flags|=2048),kn(Xe),qe(r),null;case 25:return null;case 30:return null}throw Error(i(156,r.tag))}function __(e,r){switch(Bu(r),r.tag){case 1:return e=r.flags,e&65536?(r.flags=e&-65537|128,r):null;case 3:return kn(Xe),Ne(),e=r.flags,(e&65536)!==0&&(e&128)===0?(r.flags=e&-65537|128,r):null;case 26:case 27:case 5:return wn(r),null;case 31:if(r.memoizedState!==null){if(Bt(r),r.alternate===null)throw Error(i(340));$r()}return e=r.flags,e&65536?(r.flags=e&-65537|128,r):null;case 13:if(Bt(r),e=r.memoizedState,e!==null&&e.dehydrated!==null){if(r.alternate===null)throw Error(i(340));$r()}return e=r.flags,e&65536?(r.flags=e&-65537|128,r):null;case 19:return $(Qe),null;case 4:return Ne(),null;case 10:return kn(r.type),null;case 22:case 23:return Bt(r),ec(),e!==null&&$(Kr),e=r.flags,e&65536?(r.flags=e&-65537|128,r):null;case 24:return kn(Xe),null;case 25:return null;default:return null}}function ng(e,r){switch(Bu(r),r.tag){case 3:kn(Xe),Ne();break;case 26:case 27:case 5:wn(r);break;case 4:Ne();break;case 31:r.memoizedState!==null&&Bt(r);break;case 13:Bt(r);break;case 19:$(Qe);break;case 10:kn(r.type);break;case 22:case 23:Bt(r),ec(),e!==null&&$(Kr);break;case 24:kn(Xe)}}function Za(e,r){try{var a=r.updateQueue,o=a!==null?a.lastEffect:null;if(o!==null){var h=o.next;a=h;do{if((a.tag&e)===e){o=void 0;var f=a.create,v=a.inst;o=f(),v.destroy=o}a=a.next}while(a!==h)}}catch(S){ke(r,r.return,S)}}function ur(e,r,a){try{var o=r.updateQueue,h=o!==null?o.lastEffect:null;if(h!==null){var f=h.next;o=f;do{if((o.tag&e)===e){var v=o.inst,S=v.destroy;if(S!==void 0){v.destroy=void 0,h=r;var C=a,D=S;try{D()}catch(H){ke(h,C,H)}}}o=o.next}while(o!==f)}}catch(H){ke(r,r.return,H)}}function rg(e){var r=e.updateQueue;if(r!==null){var a=e.stateNode;try{Yd(r,a)}catch(o){ke(e,e.return,o)}}}function sg(e,r,a){a.props=Xr(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(o){ke(e,r,o)}}function Wa(e,r){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var o=e.stateNode;break;case 30:o=e.stateNode;break;default:o=e.stateNode}typeof a=="function"?e.refCleanup=a(o):a.current=o}}catch(h){ke(e,r,h)}}function pn(e,r){var a=e.ref,o=e.refCleanup;if(a!==null)if(typeof o=="function")try{o()}catch(h){ke(e,r,h)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(h){ke(e,r,h)}else a.current=null}function ag(e){var r=e.type,a=e.memoizedProps,o=e.stateNode;try{e:switch(r){case"button":case"input":case"select":case"textarea":a.autoFocus&&o.focus();break e;case"img":a.src?o.src=a.src:a.srcSet&&(o.srcset=a.srcSet)}}catch(h){ke(e,e.return,h)}}function Mc(e,r,a){try{var o=e.stateNode;I_(o,e.type,a,r),o[Et]=r}catch(h){ke(e,e.return,h)}}function ig(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&yr(e.type)||e.tag===4}function Uc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||ig(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&yr(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Nc(e,r,a){var o=e.tag;if(o===5||o===6)e=e.stateNode,r?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(e,r):(r=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,r.appendChild(e),a=a._reactRootContainer,a!=null||r.onclick!==null||(r.onclick=Rn));else if(o!==4&&(o===27&&yr(e.type)&&(a=e.stateNode,r=null),e=e.child,e!==null))for(Nc(e,r,a),e=e.sibling;e!==null;)Nc(e,r,a),e=e.sibling}function Bo(e,r,a){var o=e.tag;if(o===5||o===6)e=e.stateNode,r?a.insertBefore(e,r):a.appendChild(e);else if(o!==4&&(o===27&&yr(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(Bo(e,r,a),e=e.sibling;e!==null;)Bo(e,r,a),e=e.sibling}function og(e){var r=e.stateNode,a=e.memoizedProps;try{for(var o=e.type,h=r.attributes;h.length;)r.removeAttributeNode(h[0]);gt(r,o,a),r[ht]=e,r[Et]=a}catch(f){ke(e,e.return,f)}}var Dn=!1,et=!1,Dc=!1,lg=typeof WeakSet=="function"?WeakSet:Set,ot=null;function S_(e,r){if(e=e.containerInfo,nh=il,e=_d(e),Cu(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var o=a.getSelection&&a.getSelection();if(o&&o.rangeCount!==0){a=o.anchorNode;var h=o.anchorOffset,f=o.focusNode;o=o.focusOffset;try{a.nodeType,f.nodeType}catch{a=null;break e}var v=0,S=-1,C=-1,D=0,H=0,G=e,z=null;t:for(;;){for(var P;G!==a||h!==0&&G.nodeType!==3||(S=v+h),G!==f||o!==0&&G.nodeType!==3||(C=v+o),G.nodeType===3&&(v+=G.nodeValue.length),(P=G.firstChild)!==null;)z=G,G=P;for(;;){if(G===e)break t;if(z===a&&++D===h&&(S=v),z===f&&++H===o&&(C=v),(P=G.nextSibling)!==null)break;G=z,z=G.parentNode}G=P}a=S===-1||C===-1?null:{start:S,end:C}}else a=null}a=a||{start:0,end:0}}else a=null;for(rh={focusedElem:e,selectionRange:a},il=!1,ot=r;ot!==null;)if(r=ot,e=r.child,(r.subtreeFlags&1028)!==0&&e!==null)e.return=r,ot=e;else for(;ot!==null;){switch(r=ot,f=r.alternate,e=r.flags,r.tag){case 0:if((e&4)!==0&&(e=r.updateQueue,e=e!==null?e.events:null,e!==null))for(a=0;a<e.length;a++)h=e[a],h.ref.impl=h.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&f!==null){e=void 0,a=r,h=f.memoizedProps,f=f.memoizedState,o=a.stateNode;try{var ee=Xr(a.type,h);e=o.getSnapshotBeforeUpdate(ee,f),o.__reactInternalSnapshotBeforeUpdate=e}catch(ue){ke(a,a.return,ue)}}break;case 3:if((e&1024)!==0){if(e=r.stateNode.containerInfo,a=e.nodeType,a===9)ih(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":ih(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(i(163))}if(e=r.sibling,e!==null){e.return=r.return,ot=e;break}ot=r.return}}function ug(e,r,a){var o=a.flags;switch(a.tag){case 0:case 11:case 15:zn(e,a),o&4&&Za(5,a);break;case 1:if(zn(e,a),o&4)if(e=a.stateNode,r===null)try{e.componentDidMount()}catch(v){ke(a,a.return,v)}else{var h=Xr(a.type,r.memoizedProps);r=r.memoizedState;try{e.componentDidUpdate(h,r,e.__reactInternalSnapshotBeforeUpdate)}catch(v){ke(a,a.return,v)}}o&64&&rg(a),o&512&&Wa(a,a.return);break;case 3:if(zn(e,a),o&64&&(e=a.updateQueue,e!==null)){if(r=null,a.child!==null)switch(a.child.tag){case 27:case 5:r=a.child.stateNode;break;case 1:r=a.child.stateNode}try{Yd(e,r)}catch(v){ke(a,a.return,v)}}break;case 27:r===null&&o&4&&og(a);case 26:case 5:zn(e,a),r===null&&o&4&&ag(a),o&512&&Wa(a,a.return);break;case 12:zn(e,a);break;case 31:zn(e,a),o&4&&fg(e,a);break;case 13:zn(e,a),o&4&&dg(e,a),o&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=k_.bind(null,a),J_(e,a))));break;case 22:if(o=a.memoizedState!==null||Dn,!o){r=r!==null&&r.memoizedState!==null||et,h=Dn;var f=et;Dn=o,(et=r)&&!f?Pn(e,a,(a.subtreeFlags&8772)!==0):zn(e,a),Dn=h,et=f}break;case 30:break;default:zn(e,a)}}function cg(e){var r=e.alternate;r!==null&&(e.alternate=null,cg(r)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(r=e.stateNode,r!==null&&hu(r)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var Ie=null,Rt=!1;function Ln(e,r,a){for(a=a.child;a!==null;)hg(e,r,a),a=a.sibling}function hg(e,r,a){if(Nt&&typeof Nt.onCommitFiberUnmount=="function")try{Nt.onCommitFiberUnmount(Ea,a)}catch{}switch(a.tag){case 26:et||pn(a,r),Ln(e,r,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:et||pn(a,r);var o=Ie,h=Rt;yr(a.type)&&(Ie=a.stateNode,Rt=!1),Ln(e,r,a),li(a.stateNode),Ie=o,Rt=h;break;case 5:et||pn(a,r);case 6:if(o=Ie,h=Rt,Ie=null,Ln(e,r,a),Ie=o,Rt=h,Ie!==null)if(Rt)try{(Ie.nodeType===9?Ie.body:Ie.nodeName==="HTML"?Ie.ownerDocument.body:Ie).removeChild(a.stateNode)}catch(f){ke(a,r,f)}else try{Ie.removeChild(a.stateNode)}catch(f){ke(a,r,f)}break;case 18:Ie!==null&&(Rt?(e=Ie,ry(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),Ws(e)):ry(Ie,a.stateNode));break;case 4:o=Ie,h=Rt,Ie=a.stateNode.containerInfo,Rt=!0,Ln(e,r,a),Ie=o,Rt=h;break;case 0:case 11:case 14:case 15:ur(2,a,r),et||ur(4,a,r),Ln(e,r,a);break;case 1:et||(pn(a,r),o=a.stateNode,typeof o.componentWillUnmount=="function"&&sg(a,r,o)),Ln(e,r,a);break;case 21:Ln(e,r,a);break;case 22:et=(o=et)||a.memoizedState!==null,Ln(e,r,a),et=o;break;default:Ln(e,r,a)}}function fg(e,r){if(r.memoizedState===null&&(e=r.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Ws(e)}catch(a){ke(r,r.return,a)}}}function dg(e,r){if(r.memoizedState===null&&(e=r.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Ws(e)}catch(a){ke(r,r.return,a)}}function w_(e){switch(e.tag){case 31:case 13:case 19:var r=e.stateNode;return r===null&&(r=e.stateNode=new lg),r;case 22:return e=e.stateNode,r=e._retryCache,r===null&&(r=e._retryCache=new lg),r;default:throw Error(i(435,e.tag))}}function Ho(e,r){var a=w_(e);r.forEach(function(o){if(!a.has(o)){a.add(o);var h=j_.bind(null,e,o);o.then(h,h)}})}function At(e,r){var a=r.deletions;if(a!==null)for(var o=0;o<a.length;o++){var h=a[o],f=e,v=r,S=v;e:for(;S!==null;){switch(S.tag){case 27:if(yr(S.type)){Ie=S.stateNode,Rt=!1;break e}break;case 5:Ie=S.stateNode,Rt=!1;break e;case 3:case 4:Ie=S.stateNode.containerInfo,Rt=!0;break e}S=S.return}if(Ie===null)throw Error(i(160));hg(f,v,h),Ie=null,Rt=!1,f=h.alternate,f!==null&&(f.return=null),h.return=null}if(r.subtreeFlags&13886)for(r=r.child;r!==null;)pg(r,e),r=r.sibling}var rn=null;function pg(e,r){var a=e.alternate,o=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:At(r,e),Ot(e),o&4&&(ur(3,e,e.return),Za(3,e),ur(5,e,e.return));break;case 1:At(r,e),Ot(e),o&512&&(et||a===null||pn(a,a.return)),o&64&&Dn&&(e=e.updateQueue,e!==null&&(o=e.callbacks,o!==null&&(a=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=a===null?o:a.concat(o))));break;case 26:var h=rn;if(At(r,e),Ot(e),o&512&&(et||a===null||pn(a,a.return)),o&4){var f=a!==null?a.memoizedState:null;if(o=e.memoizedState,a===null)if(o===null)if(e.stateNode===null){e:{o=e.type,a=e.memoizedProps,h=h.ownerDocument||h;t:switch(o){case"title":f=h.getElementsByTagName("title")[0],(!f||f[Aa]||f[ht]||f.namespaceURI==="http://www.w3.org/2000/svg"||f.hasAttribute("itemprop"))&&(f=h.createElement(o),h.head.insertBefore(f,h.querySelector("head > title"))),gt(f,o,a),f[ht]=e,it(f),o=f;break e;case"link":var v=py("link","href",h).get(o+(a.href||""));if(v){for(var S=0;S<v.length;S++)if(f=v[S],f.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&f.getAttribute("rel")===(a.rel==null?null:a.rel)&&f.getAttribute("title")===(a.title==null?null:a.title)&&f.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){v.splice(S,1);break t}}f=h.createElement(o),gt(f,o,a),h.head.appendChild(f);break;case"meta":if(v=py("meta","content",h).get(o+(a.content||""))){for(S=0;S<v.length;S++)if(f=v[S],f.getAttribute("content")===(a.content==null?null:""+a.content)&&f.getAttribute("name")===(a.name==null?null:a.name)&&f.getAttribute("property")===(a.property==null?null:a.property)&&f.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&f.getAttribute("charset")===(a.charSet==null?null:a.charSet)){v.splice(S,1);break t}}f=h.createElement(o),gt(f,o,a),h.head.appendChild(f);break;default:throw Error(i(468,o))}f[ht]=e,it(f),o=f}e.stateNode=o}else gy(h,e.type,e.stateNode);else e.stateNode=dy(h,o,e.memoizedProps);else f!==o?(f===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):f.count--,o===null?gy(h,e.type,e.stateNode):dy(h,o,e.memoizedProps)):o===null&&e.stateNode!==null&&Mc(e,e.memoizedProps,a.memoizedProps)}break;case 27:At(r,e),Ot(e),o&512&&(et||a===null||pn(a,a.return)),a!==null&&o&4&&Mc(e,e.memoizedProps,a.memoizedProps);break;case 5:if(At(r,e),Ot(e),o&512&&(et||a===null||pn(a,a.return)),e.flags&32){h=e.stateNode;try{ws(h,"")}catch(ee){ke(e,e.return,ee)}}o&4&&e.stateNode!=null&&(h=e.memoizedProps,Mc(e,h,a!==null?a.memoizedProps:h)),o&1024&&(Dc=!0);break;case 6:if(At(r,e),Ot(e),o&4){if(e.stateNode===null)throw Error(i(162));o=e.memoizedProps,a=e.stateNode;try{a.nodeValue=o}catch(ee){ke(e,e.return,ee)}}break;case 3:if(nl=null,h=rn,rn=el(r.containerInfo),At(r,e),rn=h,Ot(e),o&4&&a!==null&&a.memoizedState.isDehydrated)try{Ws(r.containerInfo)}catch(ee){ke(e,e.return,ee)}Dc&&(Dc=!1,gg(e));break;case 4:o=rn,rn=el(e.stateNode.containerInfo),At(r,e),Ot(e),rn=o;break;case 12:At(r,e),Ot(e);break;case 31:At(r,e),Ot(e),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,Ho(e,o)));break;case 13:At(r,e),Ot(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(Io=bt()),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,Ho(e,o)));break;case 22:h=e.memoizedState!==null;var C=a!==null&&a.memoizedState!==null,D=Dn,H=et;if(Dn=D||h,et=H||C,At(r,e),et=H,Dn=D,Ot(e),o&8192)e:for(r=e.stateNode,r._visibility=h?r._visibility&-2:r._visibility|1,h&&(a===null||C||Dn||et||Zr(e)),a=null,r=e;;){if(r.tag===5||r.tag===26){if(a===null){C=a=r;try{if(f=C.stateNode,h)v=f.style,typeof v.setProperty=="function"?v.setProperty("display","none","important"):v.display="none";else{S=C.stateNode;var G=C.memoizedProps.style,z=G!=null&&G.hasOwnProperty("display")?G.display:null;S.style.display=z==null||typeof z=="boolean"?"":(""+z).trim()}}catch(ee){ke(C,C.return,ee)}}}else if(r.tag===6){if(a===null){C=r;try{C.stateNode.nodeValue=h?"":C.memoizedProps}catch(ee){ke(C,C.return,ee)}}}else if(r.tag===18){if(a===null){C=r;try{var P=C.stateNode;h?sy(P,!0):sy(C.stateNode,!1)}catch(ee){ke(C,C.return,ee)}}}else if((r.tag!==22&&r.tag!==23||r.memoizedState===null||r===e)&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===e)break e;for(;r.sibling===null;){if(r.return===null||r.return===e)break e;a===r&&(a=null),r=r.return}a===r&&(a=null),r.sibling.return=r.return,r=r.sibling}o&4&&(o=e.updateQueue,o!==null&&(a=o.retryQueue,a!==null&&(o.retryQueue=null,Ho(e,a))));break;case 19:At(r,e),Ot(e),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,Ho(e,o)));break;case 30:break;case 21:break;default:At(r,e),Ot(e)}}function Ot(e){var r=e.flags;if(r&2){try{for(var a,o=e.return;o!==null;){if(ig(o)){a=o;break}o=o.return}if(a==null)throw Error(i(160));switch(a.tag){case 27:var h=a.stateNode,f=Uc(e);Bo(e,f,h);break;case 5:var v=a.stateNode;a.flags&32&&(ws(v,""),a.flags&=-33);var S=Uc(e);Bo(e,S,v);break;case 3:case 4:var C=a.stateNode.containerInfo,D=Uc(e);Nc(e,D,C);break;default:throw Error(i(161))}}catch(H){ke(e,e.return,H)}e.flags&=-3}r&4096&&(e.flags&=-4097)}function gg(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var r=e;gg(r),r.tag===5&&r.flags&1024&&r.stateNode.reset(),e=e.sibling}}function zn(e,r){if(r.subtreeFlags&8772)for(r=r.child;r!==null;)ug(e,r.alternate,r),r=r.sibling}function Zr(e){for(e=e.child;e!==null;){var r=e;switch(r.tag){case 0:case 11:case 14:case 15:ur(4,r,r.return),Zr(r);break;case 1:pn(r,r.return);var a=r.stateNode;typeof a.componentWillUnmount=="function"&&sg(r,r.return,a),Zr(r);break;case 27:li(r.stateNode);case 26:case 5:pn(r,r.return),Zr(r);break;case 22:r.memoizedState===null&&Zr(r);break;case 30:Zr(r);break;default:Zr(r)}e=e.sibling}}function Pn(e,r,a){for(a=a&&(r.subtreeFlags&8772)!==0,r=r.child;r!==null;){var o=r.alternate,h=e,f=r,v=f.flags;switch(f.tag){case 0:case 11:case 15:Pn(h,f,a),Za(4,f);break;case 1:if(Pn(h,f,a),o=f,h=o.stateNode,typeof h.componentDidMount=="function")try{h.componentDidMount()}catch(D){ke(o,o.return,D)}if(o=f,h=o.updateQueue,h!==null){var S=o.stateNode;try{var C=h.shared.hiddenCallbacks;if(C!==null)for(h.shared.hiddenCallbacks=null,h=0;h<C.length;h++)Kd(C[h],S)}catch(D){ke(o,o.return,D)}}a&&v&64&&rg(f),Wa(f,f.return);break;case 27:og(f);case 26:case 5:Pn(h,f,a),a&&o===null&&v&4&&ag(f),Wa(f,f.return);break;case 12:Pn(h,f,a);break;case 31:Pn(h,f,a),a&&v&4&&fg(h,f);break;case 13:Pn(h,f,a),a&&v&4&&dg(h,f);break;case 22:f.memoizedState===null&&Pn(h,f,a),Wa(f,f.return);break;case 30:break;default:Pn(h,f,a)}r=r.sibling}}function Lc(e,r){var a=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),e=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(e=r.memoizedState.cachePool.pool),e!==a&&(e!=null&&e.refCount++,a!=null&&Ba(a))}function zc(e,r){e=null,r.alternate!==null&&(e=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==e&&(r.refCount++,e!=null&&Ba(e))}function sn(e,r,a,o){if(r.subtreeFlags&10256)for(r=r.child;r!==null;)yg(e,r,a,o),r=r.sibling}function yg(e,r,a,o){var h=r.flags;switch(r.tag){case 0:case 11:case 15:sn(e,r,a,o),h&2048&&Za(9,r);break;case 1:sn(e,r,a,o);break;case 3:sn(e,r,a,o),h&2048&&(e=null,r.alternate!==null&&(e=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==e&&(r.refCount++,e!=null&&Ba(e)));break;case 12:if(h&2048){sn(e,r,a,o),e=r.stateNode;try{var f=r.memoizedProps,v=f.id,S=f.onPostCommit;typeof S=="function"&&S(v,r.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(C){ke(r,r.return,C)}}else sn(e,r,a,o);break;case 31:sn(e,r,a,o);break;case 13:sn(e,r,a,o);break;case 23:break;case 22:f=r.stateNode,v=r.alternate,r.memoizedState!==null?f._visibility&2?sn(e,r,a,o):ei(e,r):f._visibility&2?sn(e,r,a,o):(f._visibility|=2,Is(e,r,a,o,(r.subtreeFlags&10256)!==0||!1)),h&2048&&Lc(v,r);break;case 24:sn(e,r,a,o),h&2048&&zc(r.alternate,r);break;default:sn(e,r,a,o)}}function Is(e,r,a,o,h){for(h=h&&((r.subtreeFlags&10256)!==0||!1),r=r.child;r!==null;){var f=e,v=r,S=a,C=o,D=v.flags;switch(v.tag){case 0:case 11:case 15:Is(f,v,S,C,h),Za(8,v);break;case 23:break;case 22:var H=v.stateNode;v.memoizedState!==null?H._visibility&2?Is(f,v,S,C,h):ei(f,v):(H._visibility|=2,Is(f,v,S,C,h)),h&&D&2048&&Lc(v.alternate,v);break;case 24:Is(f,v,S,C,h),h&&D&2048&&zc(v.alternate,v);break;default:Is(f,v,S,C,h)}r=r.sibling}}function ei(e,r){if(r.subtreeFlags&10256)for(r=r.child;r!==null;){var a=e,o=r,h=o.flags;switch(o.tag){case 22:ei(a,o),h&2048&&Lc(o.alternate,o);break;case 24:ei(a,o),h&2048&&zc(o.alternate,o);break;default:ei(a,o)}r=r.sibling}}var ti=8192;function $s(e,r,a){if(e.subtreeFlags&ti)for(e=e.child;e!==null;)mg(e,r,a),e=e.sibling}function mg(e,r,a){switch(e.tag){case 26:$s(e,r,a),e.flags&ti&&e.memoizedState!==null&&lS(a,rn,e.memoizedState,e.memoizedProps);break;case 5:$s(e,r,a);break;case 3:case 4:var o=rn;rn=el(e.stateNode.containerInfo),$s(e,r,a),rn=o;break;case 22:e.memoizedState===null&&(o=e.alternate,o!==null&&o.memoizedState!==null?(o=ti,ti=16777216,$s(e,r,a),ti=o):$s(e,r,a));break;default:$s(e,r,a)}}function vg(e){var r=e.alternate;if(r!==null&&(e=r.child,e!==null)){r.child=null;do r=e.sibling,e.sibling=null,e=r;while(e!==null)}}function ni(e){var r=e.deletions;if((e.flags&16)!==0){if(r!==null)for(var a=0;a<r.length;a++){var o=r[a];ot=o,_g(o,e)}vg(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)bg(e),e=e.sibling}function bg(e){switch(e.tag){case 0:case 11:case 15:ni(e),e.flags&2048&&ur(9,e,e.return);break;case 3:ni(e);break;case 12:ni(e);break;case 22:var r=e.stateNode;e.memoizedState!==null&&r._visibility&2&&(e.return===null||e.return.tag!==13)?(r._visibility&=-3,qo(e)):ni(e);break;default:ni(e)}}function qo(e){var r=e.deletions;if((e.flags&16)!==0){if(r!==null)for(var a=0;a<r.length;a++){var o=r[a];ot=o,_g(o,e)}vg(e)}for(e=e.child;e!==null;){switch(r=e,r.tag){case 0:case 11:case 15:ur(8,r,r.return),qo(r);break;case 22:a=r.stateNode,a._visibility&2&&(a._visibility&=-3,qo(r));break;default:qo(r)}e=e.sibling}}function _g(e,r){for(;ot!==null;){var a=ot;switch(a.tag){case 0:case 11:case 15:ur(8,a,r);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var o=a.memoizedState.cachePool.pool;o!=null&&o.refCount++}break;case 24:Ba(a.memoizedState.cache)}if(o=a.child,o!==null)o.return=a,ot=o;else e:for(a=e;ot!==null;){o=ot;var h=o.sibling,f=o.return;if(cg(o),o===a){ot=null;break e}if(h!==null){h.return=f,ot=h;break e}ot=f}}}var E_={getCacheForType:function(e){var r=dt(Xe),a=r.data.get(e);return a===void 0&&(a=e(),r.data.set(e,a)),a},cacheSignal:function(){return dt(Xe).controller.signal}},T_=typeof WeakMap=="function"?WeakMap:Map,Ae=0,De=null,ge=null,ve=0,xe=0,Ht=null,cr=!1,Gs=!1,Pc=!1,Bn=0,Ve=0,hr=0,Wr=0,Bc=0,qt=0,Vs=0,ri=null,Ct=null,Hc=!1,Io=0,Sg=0,$o=1/0,Go=null,fr=null,rt=0,dr=null,Ks=null,Hn=0,qc=0,Ic=null,wg=null,si=0,$c=null;function It(){return(Ae&2)!==0&&ve!==0?ve&-ve:B.T!==null?Qc():Pf()}function Eg(){if(qt===0)if((ve&536870912)===0||_e){var e=Xi;Xi<<=1,(Xi&3932160)===0&&(Xi=262144),qt=e}else qt=536870912;return e=Pt.current,e!==null&&(e.flags|=32),qt}function xt(e,r,a){(e===De&&(xe===2||xe===9)||e.cancelPendingCommit!==null)&&(Ys(e,0),pr(e,ve,qt,!1)),Ra(e,a),((Ae&2)===0||e!==De)&&(e===De&&((Ae&2)===0&&(Wr|=a),Ve===4&&pr(e,ve,qt,!1)),gn(e))}function Tg(e,r,a){if((Ae&6)!==0)throw Error(i(327));var o=!a&&(r&127)===0&&(r&e.expiredLanes)===0||Ta(e,r),h=o?O_(e,r):Vc(e,r,!0),f=o;do{if(h===0){Gs&&!o&&pr(e,r,0,!1);break}else{if(a=e.current.alternate,f&&!R_(a)){h=Vc(e,r,!1),f=!1;continue}if(h===2){if(f=r,e.errorRecoveryDisabledLanes&f)var v=0;else v=e.pendingLanes&-536870913,v=v!==0?v:v&536870912?536870912:0;if(v!==0){r=v;e:{var S=e;h=ri;var C=S.current.memoizedState.isDehydrated;if(C&&(Ys(S,v).flags|=256),v=Vc(S,v,!1),v!==2){if(Pc&&!C){S.errorRecoveryDisabledLanes|=f,Wr|=f,h=4;break e}f=Ct,Ct=h,f!==null&&(Ct===null?Ct=f:Ct.push.apply(Ct,f))}h=v}if(f=!1,h!==2)continue}}if(h===1){Ys(e,0),pr(e,r,0,!0);break}e:{switch(o=e,f=h,f){case 0:case 1:throw Error(i(345));case 4:if((r&4194048)!==r)break;case 6:pr(o,r,qt,!cr);break e;case 2:Ct=null;break;case 3:case 5:break;default:throw Error(i(329))}if((r&62914560)===r&&(h=Io+300-bt(),10<h)){if(pr(o,r,qt,!cr),Wi(o,0,!0)!==0)break e;Hn=r,o.timeoutHandle=ty(Rg.bind(null,o,a,Ct,Go,Hc,r,qt,Wr,Vs,cr,f,"Throttled",-0,0),h);break e}Rg(o,a,Ct,Go,Hc,r,qt,Wr,Vs,cr,f,null,-0,0)}}break}while(!0);gn(e)}function Rg(e,r,a,o,h,f,v,S,C,D,H,G,z,P){if(e.timeoutHandle=-1,G=r.subtreeFlags,G&8192||(G&16785408)===16785408){G={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Rn},mg(r,f,G);var ee=(f&62914560)===f?Io-bt():(f&4194048)===f?Sg-bt():0;if(ee=uS(G,ee),ee!==null){Hn=f,e.cancelPendingCommit=ee(Ug.bind(null,e,r,f,a,o,h,v,S,C,H,G,null,z,P)),pr(e,f,v,!D);return}}Ug(e,r,f,a,o,h,v,S,C)}function R_(e){for(var r=e;;){var a=r.tag;if((a===0||a===11||a===15)&&r.flags&16384&&(a=r.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var o=0;o<a.length;o++){var h=a[o],f=h.getSnapshot;h=h.value;try{if(!Lt(f(),h))return!1}catch{return!1}}if(a=r.child,r.subtreeFlags&16384&&a!==null)a.return=r,r=a;else{if(r===e)break;for(;r.sibling===null;){if(r.return===null||r.return===e)return!0;r=r.return}r.sibling.return=r.return,r=r.sibling}}return!0}function pr(e,r,a,o){r&=~Bc,r&=~Wr,e.suspendedLanes|=r,e.pingedLanes&=~r,o&&(e.warmLanes|=r),o=e.expirationTimes;for(var h=r;
vendor: 19,335 bytes, lines 9-10
90<h;){var f=31-Dt(h),v=1<<f;o[f]=-1,h&=~v}a!==0&&Df(e,a,r)}function Vo(){return(Ae&6)===0?(ai(0),!1):!0}function Gc(){if(ge!==null){if(xe===0)var e=ge.return;else e=ge,xn=Gr=null,ic(e),zs=null,qa=0,e=ge;for(;e!==null;)ng(e.alternate,e),e=e.return;ge=null}}function Ys(e,r){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,V_(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),Hn=0,Gc(),De=e,ge=a=On(e.current,null),ve=r,xe=0,Ht=null,cr=!1,Gs=Ta(e,r),Pc=!1,Vs=qt=Bc=Wr=hr=Ve=0,Ct=ri=null,Hc=!1,(r&8)!==0&&(r|=r&32);var o=e.entangledLanes;if(o!==0)for(e=e.entanglements,o&=r;0<o;){var h=31-Dt(o),f=1<<h;r|=e[h],o&=~f}return Bn=r,ho(),a}function Ag(e,r){fe=null,B.H=Qa,r===Ls||r===_o?(r=Id(),xe=3):r===Fu?(r=Id(),xe=4):xe=r===wc?8:r!==null&&typeof r=="object"&&typeof r.then=="function"?6:1,Ht=r,ge===null&&(Ve=1,No(e,Yt(r,e.current)))}function Og(){var e=Pt.current;return e===null?!0:(ve&4194048)===ve?Xt===null:(ve&62914560)===ve||(ve&536870912)!==0?e===Xt:!1}function Cg(){var e=B.H;return B.H=Qa,e===null?Qa:e}function xg(){var e=B.A;return B.A=E_,e}function Ko(){Ve=4,cr||(ve&4194048)!==ve&&Pt.current!==null||(Gs=!0),(hr&134217727)===0&&(Wr&134217727)===0||De===null||pr(De,ve,qt,!1)}function Vc(e,r,a){var o=Ae;Ae|=2;var h=Cg(),f=xg();(De!==e||ve!==r)&&(Go=null,Ys(e,r)),r=!1;var v=Ve;e:do try{if(xe!==0&&ge!==null){var S=ge,C=Ht;switch(xe){case 8:Gc(),v=6;break e;case 3:case 2:case 9:case 6:Pt.current===null&&(r=!0);var D=xe;if(xe=0,Ht=null,Fs(e,S,C,D),a&&Gs){v=0;break e}break;default:D=xe,xe=0,Ht=null,Fs(e,S,C,D)}}A_(),v=Ve;break}catch(H){Ag(e,H)}while(!0);return r&&e.shellSuspendCounter++,xn=Gr=null,Ae=o,B.H=h,B.A=f,ge===null&&(De=null,ve=0,ho()),v}function A_(){for(;ge!==null;)kg(ge)}function O_(e,r){var a=Ae;Ae|=2;var o=Cg(),h=xg();De!==e||ve!==r?(Go=null,$o=bt()+500,Ys(e,r)):Gs=Ta(e,r);e:do try{if(xe!==0&&ge!==null){r=ge;var f=Ht;t:switch(xe){case 1:xe=0,Ht=null,Fs(e,r,f,1);break;case 2:case 9:if(Hd(f)){xe=0,Ht=null,jg(r);break}r=function(){xe!==2&&xe!==9||De!==e||(xe=7),gn(e)},f.then(r,r);break e;case 3:xe=7;break e;case 4:xe=5;break e;case 7:Hd(f)?(xe=0,Ht=null,jg(r)):(xe=0,Ht=null,Fs(e,r,f,7));break;case 5:var v=null;switch(ge.tag){case 26:v=ge.memoizedState;case 5:case 27:var S=ge;if(v?yy(v):S.stateNode.complete){xe=0,Ht=null;var C=S.sibling;if(C!==null)ge=C;else{var D=S.return;D!==null?(ge=D,Yo(D)):ge=null}break t}}xe=0,Ht=null,Fs(e,r,f,5);break;case 6:xe=0,Ht=null,Fs(e,r,f,6);break;case 8:Gc(),Ve=6;break e;default:throw Error(i(462))}}C_();break}catch(H){Ag(e,H)}while(!0);return xn=Gr=null,B.H=o,B.A=h,Ae=a,ge!==null?0:(De=null,ve=0,ho(),Ve)}function C_(){for(;ge!==null&&!Qi();)kg(ge)}function kg(e){var r=eg(e.alternate,e,Bn);e.memoizedProps=e.pendingProps,r===null?Yo(e):ge=r}function jg(e){var r=e,a=r.alternate;switch(r.tag){case 15:case 0:r=Fp(a,r,r.pendingProps,r.type,void 0,ve);break;case 11:r=Fp(a,r,r.pendingProps,r.type.render,r.ref,ve);break;case 5:ic(r);default:ng(a,r),r=ge=xd(r,Bn),r=eg(a,r,Bn)}e.memoizedProps=e.pendingProps,r===null?Yo(e):ge=r}function Fs(e,r,a,o){xn=Gr=null,ic(r),zs=null,qa=0;var h=r.return;try{if(y_(e,h,r,a,ve)){Ve=1,No(e,Yt(a,e.current)),ge=null;return}}catch(f){if(h!==null)throw ge=h,f;Ve=1,No(e,Yt(a,e.current)),ge=null;return}r.flags&32768?(_e||o===1?e=!0:Gs||(ve&536870912)!==0?e=!1:(cr=e=!0,(o===2||o===9||o===3||o===6)&&(o=Pt.current,o!==null&&o.tag===13&&(o.flags|=16384))),Mg(r,e)):Yo(r)}function Yo(e){var r=e;do{if((r.flags&32768)!==0){Mg(r,cr);return}e=r.return;var a=b_(r.alternate,r,Bn);if(a!==null){ge=a;return}if(r=r.sibling,r!==null){ge=r;return}ge=r=e}while(r!==null);Ve===0&&(Ve=5)}function Mg(e,r){do{var a=__(e.alternate,e);if(a!==null){a.flags&=32767,ge=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!r&&(e=e.sibling,e!==null)){ge=e;return}ge=e=a}while(e!==null);Ve=6,ge=null}function Ug(e,r,a,o,h,f,v,S,C){e.cancelPendingCommit=null;do Fo();while(rt!==0);if((Ae&6)!==0)throw Error(i(327));if(r!==null){if(r===e.current)throw Error(i(177));if(f=r.lanes|r.childLanes,f|=Uu,ob(e,a,f,v,S,C),e===De&&(ge=De=null,ve=0),Ks=r,dr=e,Hn=a,qc=f,Ic=h,wg=o,(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,M_(gs,function(){return Pg(),null})):(e.callbackNode=null,e.callbackPriority=0),o=(r.flags&13878)!==0,(r.subtreeFlags&13878)!==0||o){o=B.T,B.T=null,h=F.p,F.p=2,v=Ae,Ae|=4;try{S_(e,r,a)}finally{Ae=v,F.p=h,B.T=o}}rt=1,Ng(),Dg(),Lg()}}function Ng(){if(rt===1){rt=0;var e=dr,r=Ks,a=(r.flags&13878)!==0;if((r.subtreeFlags&13878)!==0||a){a=B.T,B.T=null;var o=F.p;F.p=2;var h=Ae;Ae|=4;try{pg(r,e);var f=rh,v=_d(e.containerInfo),S=f.focusedElem,C=f.selectionRange;if(v!==S&&S&&S.ownerDocument&&bd(S.ownerDocument.documentElement,S)){if(C!==null&&Cu(S)){var D=C.start,H=C.end;if(H===void 0&&(H=D),"selectionStart"in S)S.selectionStart=D,S.selectionEnd=Math.min(H,S.value.length);else{var G=S.ownerDocument||document,z=G&&G.defaultView||window;if(z.getSelection){var P=z.getSelection(),ee=S.textContent.length,ue=Math.min(C.start,ee),Ue=C.end===void 0?ue:Math.min(C.end,ee);!P.extend&&ue>Ue&&(v=Ue,Ue=ue,ue=v);var M=vd(S,ue),x=vd(S,Ue);if(M&&x&&(P.rangeCount!==1||P.anchorNode!==M.node||P.anchorOffset!==M.offset||P.focusNode!==x.node||P.focusOffset!==x.offset)){var N=G.createRange();N.setStart(M.node,M.offset),P.removeAllRanges(),ue>Ue?(P.addRange(N),P.extend(x.node,x.offset)):(N.setEnd(x.node,x.offset),P.addRange(N))}}}}for(G=[],P=S;P=P.parentNode;)P.nodeType===1&&G.push({element:P,left:P.scrollLeft,top:P.scrollTop});for(typeof S.focus=="function"&&S.focus(),S=0;S<G.length;S++){var I=G[S];I.element.scrollLeft=I.left,I.element.scrollTop=I.top}}il=!!nh,rh=nh=null}finally{Ae=h,F.p=o,B.T=a}}e.current=r,rt=2}}function Dg(){if(rt===2){rt=0;var e=dr,r=Ks,a=(r.flags&8772)!==0;if((r.subtreeFlags&8772)!==0||a){a=B.T,B.T=null;var o=F.p;F.p=2;var h=Ae;Ae|=4;try{ug(e,r.alternate,r)}finally{Ae=h,F.p=o,B.T=a}}rt=3}}function Lg(){if(rt===4||rt===3){rt=0,iu();var e=dr,r=Ks,a=Hn,o=wg;(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?rt=5:(rt=0,Ks=dr=null,zg(e,e.pendingLanes));var h=e.pendingLanes;if(h===0&&(fr=null),uu(a),r=r.stateNode,Nt&&typeof Nt.onCommitFiberRoot=="function")try{Nt.onCommitFiberRoot(Ea,r,void 0,(r.current.flags&128)===128)}catch{}if(o!==null){r=B.T,h=F.p,F.p=2,B.T=null;try{for(var f=e.onRecoverableError,v=0;v<o.length;v++){var S=o[v];f(S.value,{componentStack:S.stack})}}finally{B.T=r,F.p=h}}(Hn&3)!==0&&Fo(),gn(e),h=e.pendingLanes,(a&261930)!==0&&(h&42)!==0?e===$c?si++:(si=0,$c=e):si=0,ai(0)}}function zg(e,r){(e.pooledCacheLanes&=r)===0&&(r=e.pooledCache,r!=null&&(e.pooledCache=null,Ba(r)))}function Fo(){return Ng(),Dg(),Lg(),Pg()}function Pg(){if(rt!==5)return!1;var e=dr,r=qc;qc=0;var a=uu(Hn),o=B.T,h=F.p;try{F.p=32>a?32:a,B.T=null,a=Ic,Ic=null;var f=dr,v=Hn;if(rt=0,Ks=dr=null,Hn=0,(Ae&6)!==0)throw Error(i(331));var S=Ae;if(Ae|=4,bg(f.current),yg(f,f.current,v,a),Ae=S,ai(0,!1),Nt&&typeof Nt.onPostCommitFiberRoot=="function")try{Nt.onPostCommitFiberRoot(Ea,f)}catch{}return!0}finally{F.p=h,B.T=o,zg(e,r)}}function Bg(e,r,a){r=Yt(a,r),r=Sc(e.stateNode,r,2),e=ir(e,r,2),e!==null&&(Ra(e,2),gn(e))}function ke(e,r,a){if(e.tag===3)Bg(e,e,a);else for(;r!==null;){if(r.tag===3){Bg(r,e,a);break}else if(r.tag===1){var o=r.stateNode;if(typeof r.type.getDerivedStateFromError=="function"||typeof o.componentDidCatch=="function"&&(fr===null||!fr.has(o))){e=Yt(a,e),a=Hp(2),o=ir(r,a,2),o!==null&&(qp(a,o,r,e),Ra(o,2),gn(o));break}}r=r.return}}function Kc(e,r,a){var o=e.pingCache;if(o===null){o=e.pingCache=new T_;var h=new Set;o.set(r,h)}else h=o.get(r),h===void 0&&(h=new Set,o.set(r,h));h.has(a)||(Pc=!0,h.add(a),e=x_.bind(null,e,r,a),r.then(e,e))}function x_(e,r,a){var o=e.pingCache;o!==null&&o.delete(r),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,De===e&&(ve&a)===a&&(Ve===4||Ve===3&&(ve&62914560)===ve&&300>bt()-Io?(Ae&2)===0&&Ys(e,0):Bc|=a,Vs===ve&&(Vs=0)),gn(e)}function Hg(e,r){r===0&&(r=Nf()),e=qr(e,r),e!==null&&(Ra(e,r),gn(e))}function k_(e){var r=e.memoizedState,a=0;r!==null&&(a=r.retryLane),Hg(e,a)}function j_(e,r){var a=0;switch(e.tag){case 31:case 13:var o=e.stateNode,h=e.memoizedState;h!==null&&(a=h.retryLane);break;case 19:o=e.stateNode;break;case 22:o=e.stateNode._retryCache;break;default:throw Error(i(314))}o!==null&&o.delete(r),Hg(e,a)}function M_(e,r){return tn(e,r)}var Qo=null,Qs=null,Yc=!1,Jo=!1,Fc=!1,gr=0;function gn(e){e!==Qs&&e.next===null&&(Qs===null?Qo=Qs=e:Qs=Qs.next=e),Jo=!0,Yc||(Yc=!0,N_())}function ai(e,r){if(!Fc&&Jo){Fc=!0;do for(var a=!1,o=Qo;o!==null;){if(e!==0){var h=o.pendingLanes;if(h===0)var f=0;else{var v=o.suspendedLanes,S=o.pingedLanes;f=(1<<31-Dt(42|e)+1)-1,f&=h&~(v&~S),f=f&201326741?f&201326741|1:f?f|2:0}f!==0&&(a=!0,Gg(o,f))}else f=ve,f=Wi(o,o===De?f:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),(f&3)===0||Ta(o,f)||(a=!0,Gg(o,f));o=o.next}while(a);Fc=!1}}function U_(){qg()}function qg(){Jo=Yc=!1;var e=0;gr!==0&&G_()&&(e=gr);for(var r=bt(),a=null,o=Qo;o!==null;){var h=o.next,f=Ig(o,r);f===0?(o.next=null,a===null?Qo=h:a.next=h,h===null&&(Qs=a)):(a=o,(e!==0||(f&3)!==0)&&(Jo=!0)),o=h}rt!==0&&rt!==5||ai(e),gr!==0&&(gr=0)}function Ig(e,r){for(var a=e.suspendedLanes,o=e.pingedLanes,h=e.expirationTimes,f=e.pendingLanes&-62914561;0<f;){var v=31-Dt(f),S=1<<v,C=h[v];C===-1?((S&a)===0||(S&o)!==0)&&(h[v]=ib(S,r)):C<=r&&(e.expiredLanes|=S),f&=~S}if(r=De,a=ve,a=Wi(e,e===r?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),o=e.callbackNode,a===0||e===r&&(xe===2||xe===9)||e.cancelPendingCommit!==null)return o!==null&&o!==null&&wa(o),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||Ta(e,a)){if(r=a&-a,r===e.callbackPriority)return r;switch(o!==null&&wa(o),uu(a)){case 2:case 8:a=hn;break;case 32:a=gs;break;case 268435456:a=Uf;break;default:a=gs}return o=$g.bind(null,e),a=tn(a,o),e.callbackPriority=r,e.callbackNode=a,r}return o!==null&&o!==null&&wa(o),e.callbackPriority=2,e.callbackNode=null,2}function $g(e,r){if(rt!==0&&rt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(Fo()&&e.callbackNode!==a)return null;var o=ve;return o=Wi(e,e===De?o:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),o===0?null:(Tg(e,o,r),Ig(e,bt()),e.callbackNode!=null&&e.callbackNode===a?$g.bind(null,e):null)}function Gg(e,r){if(Fo())return null;Tg(e,r,!0)}function N_(){K_(function(){(Ae&6)!==0?tn(ct,U_):qg()})}function Qc(){if(gr===0){var e=Ns;e===0&&(e=Ji,Ji<<=1,(Ji&261888)===0&&(Ji=256)),gr=e}return gr}function Vg(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:ro(""+e)}function Kg(e,r){var a=r.ownerDocument.createElement("input");return a.name=r.name,a.value=r.value,e.id&&a.setAttribute("form",e.id),r.parentNode.insertBefore(a,r),e=new FormData(e),a.parentNode.removeChild(a),e}function D_(e,r,a,o,h){if(r==="submit"&&a&&a.stateNode===h){var f=Vg((h[Et]||null).action),v=o.submitter;v&&(r=(r=v[Et]||null)?Vg(r.formAction):v.getAttribute("formAction"),r!==null&&(f=r,v=null));var S=new oo("action","action",null,o,h);e.push({event:S,listeners:[{instance:null,listener:function(){if(o.defaultPrevented){if(gr!==0){var C=v?Kg(h,v):new FormData(h);gc(a,{pending:!0,data:C,method:h.method,action:f},null,C)}}else typeof f=="function"&&(S.preventDefault(),C=v?Kg(h,v):new FormData(h),gc(a,{pending:!0,data:C,method:h.method,action:f},f,C))},currentTarget:h}]})}}for(var Jc=0;Jc<Mu.length;Jc++){var Xc=Mu[Jc],L_=Xc.toLowerCase(),z_=Xc[0].toUpperCase()+Xc.slice(1);nn(L_,"on"+z_)}nn(Ed,"onAnimationEnd"),nn(Td,"onAnimationIteration"),nn(Rd,"onAnimationStart"),nn("dblclick","onDoubleClick"),nn("focusin","onFocus"),nn("focusout","onBlur"),nn(Wb,"onTransitionRun"),nn(e_,"onTransitionStart"),nn(t_,"onTransitionCancel"),nn(Ad,"onTransitionEnd"),_s("onMouseEnter",["mouseout","mouseover"]),_s("onMouseLeave",["mouseout","mouseover"]),_s("onPointerEnter",["pointerout","pointerover"]),_s("onPointerLeave",["pointerout","pointerover"]),zr("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),zr("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),zr("onBeforeInput",["compositionend","keypress","textInput","paste"]),zr("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),zr("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),zr("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ii="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(" "),P_=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ii));function Yg(e,r){r=(r&4)!==0;for(var a=0;a<e.length;a++){var o=e[a],h=o.event;o=o.listeners;e:{var f=void 0;if(r)for(var v=o.length-1;0<=v;v--){var S=o[v],C=S.instance,D=S.currentTarget;if(S=S.listener,C!==f&&h.isPropagationStopped())break e;f=S,h.currentTarget=D;try{f(h)}catch(H){co(H)}h.currentTarget=null,f=C}else for(v=0;v<o.length;v++){if(S=o[v],C=S.instance,D=S.currentTarget,S=S.listener,C!==f&&h.isPropagationStopped())break e;f=S,h.currentTarget=D;try{f(h)}catch(H){co(H)}h.currentTarget=null,f=C}}}}function ye(e,r){var a=r[cu];a===void 0&&(a=r[cu]=new Set);var o=e+"__bubble";a.has(o)||(Fg(r,e,2,!1),a.add(o))}function Zc(e,r,a){var o=0;r&&(o|=4),Fg(a,e,o,r)}var Xo="_reactListening"+Math.random().toString(36).slice(2);function Wc(e){if(!e[Xo]){e[Xo]=!0,qf.forEach(function(a){a!=="selectionchange"&&(P_.has(a)||Zc(a,!1,e),Zc(a,!0,e))});var r=e.nodeType===9?e:e.ownerDocument;r===null||r[Xo]||(r[Xo]=!0,Zc("selectionchange",!1,r))}}function Fg(e,r,a,o){switch(Ey(r)){case 2:var h=fS;break;case 8:h=dS;break;default:h=ph}a=h.bind(null,r,a,e),h=void 0,!bu||r!=="touchstart"&&r!=="touchmove"&&r!=="wheel"||(h=!0),o?h!==void 0?e.addEventListener(r,a,{capture:!0,passive:h}):e.addEventListener(r,a,!0):h!==void 0?e.addEventListener(r,a,{passive:h}):e.addEventListener(r,a,!1)}function eh(e,r,a,o,h){var f=o;if((r&1)===0&&(r&2)===0&&o!==null)e:for(;;){if(o===null)return;var v=o.tag;if(v===3||v===4){var S=o.stateNode.containerInfo;if(S===h)break;if(v===4)for(v=o.return;v!==null;){var C=v.tag;if((C===3||C===4)&&v.stateNode.containerInfo===h)return;v=v.return}for(;S!==null;){if(v=ms(S),v===null)return;if(C=v.tag,C===5||C===6||C===26||C===27){o=f=v;continue e}S=S.parentNode}}o=o.return}Wf(function(){var D=f,H=mu(a),G=[];e:{var z=Od.get(e);if(z!==void 0){var P=oo,ee=e;switch(e){case"keypress":if(ao(a)===0)break e;case"keydown":case"keyup":P=jb;break;case"focusin":ee="focus",P=Eu;break;case"focusout":ee="blur",P=Eu;break;case"beforeblur":case"afterblur":P=Eu;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":P=nd;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":P=bb;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":P=Nb;break;case Ed:case Td:case Rd:P=wb;break;case Ad:P=Lb;break;case"scroll":case"scrollend":P=mb;break;case"wheel":P=Pb;break;case"copy":case"cut":case"paste":P=Tb;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":P=sd;break;case"toggle":case"beforetoggle":P=Hb}var ue=(r&4)!==0,Ue=!ue&&(e==="scroll"||e==="scrollend"),M=ue?z!==null?z+"Capture":null:z;ue=[];for(var x=D,N;x!==null;){var I=x;if(N=I.stateNode,I=I.tag,I!==5&&I!==26&&I!==27||N===null||M===null||(I=Ca(x,M),I!=null&&ue.push(oi(x,I,N))),Ue)break;x=x.return}0<ue.length&&(z=new P(z,ee,null,a,H),G.push({event:z,listeners:ue}))}}if((r&7)===0){e:{if(z=e==="mouseover"||e==="pointerover",P=e==="mouseout"||e==="pointerout",z&&a!==yu&&(ee=a.relatedTarget||a.fromElement)&&(ms(ee)||ee[ys]))break e;if((P||z)&&(z=H.window===H?H:(z=H.ownerDocument)?z.defaultView||z.parentWindow:window,P?(ee=a.relatedTarget||a.toElement,P=D,ee=ee?ms(ee):null,ee!==null&&(Ue=u(ee),ue=ee.tag,ee!==Ue||ue!==5&&ue!==27&&ue!==6)&&(ee=null)):(P=null,ee=D),P!==ee)){if(ue=nd,I="onMouseLeave",M="onMouseEnter",x="mouse",(e==="pointerout"||e==="pointerover")&&(ue=sd,I="onPointerLeave",M="onPointerEnter",x="pointer"),Ue=P==null?z:Oa(P),N=ee==null?z:Oa(ee),z=new ue(I,x+"leave",P,a,H),z.target=Ue,z.relatedTarget=N,I=null,ms(H)===D&&(ue=new ue(M,x+"enter",ee,a,H),ue.target=N,ue.relatedTarget=Ue,I=ue),Ue=I,P&&ee)t:{for(ue=B_,M=P,x=ee,N=0,I=M;I;I=ue(I))N++;I=0;for(var ie=x;ie;ie=ue(ie))I++;for(;0<N-I;)M=ue(M),N--;for(;0<I-N;)x=ue(x),I--;for(;N--;){if(M===x||x!==null&&M===x.alternate){ue=M;break t}M=ue(M),x=ue(x)}ue=null}else ue=null;P!==null&&Qg(G,z,P,ue,!1),ee!==null&&Ue!==null&&Qg(G,Ue,ee,ue,!0)}}e:{if(z=D?Oa(D):window,P=z.nodeName&&z.nodeName.toLowerCase(),P==="select"||P==="input"&&z.type==="file")var we=fd;else if(cd(z))if(dd)we=Jb;else{we=Fb;var ne=Yb}else P=z.nodeName,!P||P.toLowerCase()!=="input"||z.type!=="checkbox"&&z.type!=="radio"?D&&gu(D.elementType)&&(we=fd):we=Qb;if(we&&(we=we(e,D))){hd(G,we,a,H);break e}ne&&ne(e,z,D),e==="focusout"&&D&&z.type==="number"&&D.memoizedProps.value!=null&&pu(z,"number",z.value)}switch(ne=D?Oa(D):window,e){case"focusin":(cd(ne)||ne.contentEditable==="true")&&(As=ne,xu=D,La=null);break;case"focusout":La=xu=As=null;break;case"mousedown":ku=!0;break;case"contextmenu":case"mouseup":case"dragend":ku=!1,Sd(G,a,H);break;case"selectionchange":if(Zb)break;case"keydown":case"keyup":Sd(G,a,H)}var de;if(Ru)e:{switch(e){case"compositionstart":var be="onCompositionStart";break e;case"compositionend":be="onCompositionEnd";break e;case"compositionupdate":be="onCompositionUpdate";break e}be=void 0}else Rs?ld(e,a)&&(be="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(be="onCompositionStart");be&&(ad&&a.locale!=="ko"&&(Rs||be!=="onCompositionStart"?be==="onCompositionEnd"&&Rs&&(de=ed()):(Wn=H,_u="value"in Wn?Wn.value:Wn.textContent,Rs=!0)),ne=Zo(D,be),0<ne.length&&(be=new rd(be,e,null,a,H),G.push({event:be,listeners:ne}),de?be.data=de:(de=ud(a),de!==null&&(be.data=de)))),(de=Ib?$b(e,a):Gb(e,a))&&(be=Zo(D,"onBeforeInput"),0<be.length&&(ne=new rd("onBeforeInput","beforeinput",null,a,H),G.push({event:ne,listeners:be}),ne.data=de)),D_(G,e,D,a,H)}Yg(G,r)})}function oi(e,r,a){return{instance:e,listener:r,currentTarget:a}}function Zo(e,r){for(var a=r+"Capture",o=[];e!==null;){var h=e,f=h.stateNode;if(h=h.tag,h!==5&&h!==26&&h!==27||f===null||(h=Ca(e,a),h!=null&&o.unshift(oi(e,h,f)),h=Ca(e,r),h!=null&&o.push(oi(e,h,f))),e.tag===3)return o;e=e.return}return[]}function B_(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Qg(e,r,a,o,h){for(var f=r._reactName,v=[];a!==null&&a!==o;){var S=a,C=S.alternate,D=S.stateNode;if(S=S.tag,C!==null&&C===o)break;S!==5&&S!==26&&S!==27||D===null||(C=D,h?(D=Ca(a,f),D!=null&&v.unshift(oi(a,D,C))):h||(D=Ca(a,f),D!=null&&v.push(oi(a,D,C)))),a=a.return}v.length!==0&&e.push({event:r,listeners:v})}var H_=/\r\n?/g,q_=/\u0000|\uFFFD/g;function Jg(e){return(typeof e=="string"?e:""+e).replace(H_,` 10`).replace(q_,"")}function Xg(e,r){return r=Jg(r),Jg(e)===r}function Me(e,r,a,o,h,f){switch(a){case"children":typeof o=="str
10ing"?r==="body"||r==="textarea"&&o===""||ws(e,o):(typeof o=="number"||typeof o=="bigint")&&r!=="body"&&ws(e,""+o);break;case"className":to(e,"class",o);break;case"tabIndex":to(e,"tabindex",o);break;case"dir":case"role":case"viewBox":case"width":case"height":to(e,a,o);break;case"style":Xf(e,o,f);break;case"data":if(r!=="object"){to(e,"data",o);break}case"src":case"href":if(o===""&&(r!=="a"||a!=="href")){e.removeAttribute(a);break}if(o==null||typeof o=="function"||typeof o=="symbol"||typeof o=="boolean"){e.removeAttribute(a);break}o=ro(""+o),e.setAttribute(a,o);break;case"action":case"formAction":if(typeof o=="function"){e.setAttribute(a,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof f=="function"&&(a==="formAction"?(r!=="input"&&Me(e,r,"name",h.name,h,null),Me(e,r,"formEncType",h.formEncType,h,null),Me(e,r,"formMethod",h.formMethod,h,null),Me(e,r,"formTarget",h.formTarget,h,null)):(Me(e,r,"encType",h.encType,h,null),Me(e,r,"method",h.method,h,null),Me(e,r,"target",h.target,h,null)));if(o==null||typeof o=="symbol"||typeof o=="boolean"){e.removeAttribute(a);break}o=ro(""+o),e.setAttribute(a,o);break;case"onClick":o!=null&&(e.onclick=Rn);break;case"onScroll":o!=null&&ye("scroll",e);break;case"onScrollEnd":o!=null&&ye("scrollend",e);break;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(i(61));if(a=o.__html,a!=null){if(h.children!=null)throw Error(i(60));e.innerHTML=a}}break;case"multiple":e.multiple=o&&typeof o!="function"&&typeof o!="symbol";break;case"muted":e.muted=o&&typeof o!="function"&&typeof o!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(o==null||typeof o=="function"||typeof o=="boolean"||typeof o=="symbol"){e.removeAttribute("xlink:href");break}a=ro(""+o),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":o!=null&&typeof o!="function"&&typeof o!="symbol"?e.setAttribute(a,""+o):e.removeAttribute(a);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":o&&typeof o!="function"&&typeof o!="symbol"?e.setAttribute(a,""):e.removeAttribute(a);break;case"capture":case"download":o===!0?e.setAttribute(a,""):o!==!1&&o!=null&&typeof o!="function"&&typeof o!="symbol"?e.setAttribute(a,o):e.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":o!=null&&typeof o!="function"&&typeof o!="symbol"&&!isNaN(o)&&1<=o?e.setAttribute(a,o):e.removeAttribute(a);break;case"rowSpan":case"start":o==null||typeof o=="function"||typeof o=="symbol"||isNaN(o)?e.removeAttribute(a):e.setAttribute(a,o);break;case"popover":ye("beforetoggle",e),ye("toggle",e),eo(e,"popover",o);break;case"xlinkActuate":Tn(e,"http://www.w3.org/1999/xlink","xlink:actuate",o);break;case"xlinkArcrole":Tn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",o);break;case"xlinkRole":Tn(e,"http://www.w3.org/1999/xlink","xlink:role",o);break;case"xlinkShow":Tn(e,"http://www.w3.org/1999/xlink","xlink:show",o);break;case"xlinkTitle":Tn(e,"http://www.w3.org/1999/xlink","xlink:title",o);break;case"xlinkType":Tn(e,"http://www.w3.org/1999/xlink","xlink:type",o);break;case"xmlBase":Tn(e,"http://www.w3.org/XML/1998/namespace","xml:base",o);break;case"xmlLang":Tn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",o);break;case"xmlSpace":Tn(e,"http://www.w3.org/XML/1998/namespace","xml:space",o);break;case"is":eo(e,"is",o);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=gb.get(a)||a,eo(e,a,o))}}function th(e,r,a,o,h,f){switch(a){case"style":Xf(e,o,f);break;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(i(61));if(a=o.__html,a!=null){if(h.children!=null)throw Error(i(60));e.innerHTML=a}}break;
vendor: 6,669 bytes, line 10
10case"children":typeof o=="string"?ws(e,o):(typeof o=="number"||typeof o=="bigint")&&ws(e,""+o);break;case"onScroll":o!=null&&ye("scroll",e);break;case"onScrollEnd":o!=null&&ye("scrollend",e);break;case"onClick":o!=null&&(e.onclick=Rn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!If.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(h=a.endsWith("Capture"),r=a.slice(2,h?a.length-7:void 0),f=e[Et]||null,f=f!=null?f[a]:null,typeof f=="function"&&e.removeEventListener(r,f,h),typeof o=="function")){typeof f!="function"&&f!==null&&(a in e?e[a]=null:e.hasAttribute(a)&&e.removeAttribute(a)),e.addEventListener(r,o,h);break e}a in e?e[a]=o:o===!0?e.setAttribute(a,""):eo(e,a,o)}}}function gt(e,r,a){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":ye("error",e),ye("load",e);var o=!1,h=!1,f;for(f in a)if(a.hasOwnProperty(f)){var v=a[f];if(v!=null)switch(f){case"src":o=!0;break;case"srcSet":h=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(i(137,r));default:Me(e,r,f,v,a,null)}}h&&Me(e,r,"srcSet",a.srcSet,a,null),o&&Me(e,r,"src",a.src,a,null);return;case"input":ye("invalid",e);var S=f=v=h=null,C=null,D=null;for(o in a)if(a.hasOwnProperty(o)){var H=a[o];if(H!=null)switch(o){case"name":h=H;break;case"type":v=H;break;case"checked":C=H;break;case"defaultChecked":D=H;break;case"value":f=H;break;case"defaultValue":S=H;break;case"children":case"dangerouslySetInnerHTML":if(H!=null)throw Error(i(137,r));break;default:Me(e,r,o,H,a,null)}}Yf(e,f,S,C,D,v,h,!1);return;case"select":ye("invalid",e),o=v=f=null;for(h in a)if(a.hasOwnProperty(h)&&(S=a[h],S!=null))switch(h){case"value":f=S;break;case"defaultValue":v=S;break;case"multiple":o=S;default:Me(e,r,h,S,a,null)}r=f,a=v,e.multiple=!!o,r!=null?Ss(e,!!o,r,!1):a!=null&&Ss(e,!!o,a,!0);return;case"textarea":ye("invalid",e),f=h=o=null;for(v in a)if(a.hasOwnProperty(v)&&(S=a[v],S!=null))switch(v){case"value":o=S;break;case"defaultValue":h=S;break;case"children":f=S;break;case"dangerouslySetInnerHTML":if(S!=null)throw Error(i(91));break;default:Me(e,r,v,S,a,null)}Qf(e,o,h,f);return;case"option":for(C in a)a.hasOwnProperty(C)&&(o=a[C],o!=null)&&(C==="selected"?e.selected=o&&typeof o!="function"&&typeof o!="symbol":Me(e,r,C,o,a,null));return;case"dialog":ye("beforetoggle",e),ye("toggle",e),ye("cancel",e),ye("close",e);break;case"iframe":case"object":ye("load",e);break;case"video":case"audio":for(o=0;o<ii.length;o++)ye(ii[o],e);break;case"image":ye("error",e),ye("load",e);break;case"details":ye("toggle",e);break;case"embed":case"source":case"link":ye("error",e),ye("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(D in a)if(a.hasOwnProperty(D)&&(o=a[D],o!=null))switch(D){case"children":case"dangerouslySetInnerHTML":throw Error(i(137,r));default:Me(e,r,D,o,a,null)}return;default:if(gu(r)){for(H in a)a.hasOwnProperty(H)&&(o=a[H],o!==void 0&&th(e,r,H,o,a,void 0));return}}for(S in a)a.hasOwnProperty(S)&&(o=a[S],o!=null&&Me(e,r,S,o,a,null))}function I_(e,r,a,o){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var h=null,f=null,v=null,S=null,C=null,D=null,H=null;for(P in a){var G=a[P];if(a.hasOwnProperty(P)&&G!=null)switch(P){case"checked":break;case"value":break;case"defaultValue":C=G;default:o.hasOwnProperty(P)||Me(e,r,P,null,o,G)}}for(var z in o){var P=o[z];if(G=a[z],o.hasOwnProperty(z)&&(P!=null||G!=null))switch(z){case"type":f=P;break;case"name":h=P;break;case"checked":D=P;break;case"defaultChecked":H=P;break;case"value":v=P;break;case"defaultValue":S=P;break;case"children":case"dangerouslySetInnerHTML":if(P!=null)throw Error(i(137,r));break;default:P!==G&&Me(e,r,z,P,o,G)}}du(e,v,S,C,D,H,f,h);return;case"select":P=v=S=z=null;for(f in a)if(C=a[f],a.hasOwnProperty(f)&&C!=null)switch(f){case"value":break;case"multiple":P=C;default:o.hasOwnProperty(f)||Me(e,r,f,null,o,C)}for(h in o)if(f=o[h],C=a[h],o.hasOwnProperty(h)&&(f!=null||C!=null))switch(h){case"value":z=f;break;case"defaultValue":S=f;break;case"multiple":v=f;default:f!==C&&Me(e,r,h,f,o,C)}r=S,a=v,o=P,z!=null?Ss(e,!!a,z,!1):!!o!=!!a&&(r!=null?Ss(e,!!a,r,!0):Ss(e,!!a,a?[]:"",!1));return;case"textarea":P=z=null;for(S in a)if(h=a[S],a.hasOwnProperty(S)&&h!=null&&!o.hasOwnProperty(S))switch(S){case"value":break;case"children":break;default:Me(e,r,S,null,o,h)}for(v in o)if(h=o[v],f=a[v],o.hasOwnProperty(v)&&(h!=null||f!=null))switch(v){case"value":z=h;break;case"defaultValue":P=h;break;case"children":break;case"dangerouslySetInnerHTML":if(h!=null)throw Error(i(91));break;default:h!==f&&Me(e,r,v,h,o,f)}Ff(e,z,P);return;case"option":for(var ee in a)z=a[ee],a.hasOwnProperty(ee)&&z!=null&&!o.hasOwnProperty(ee)&&(ee==="selected"?e.selected=!1:Me(e,r,ee,null,o,z));for(C in o)z=o[C],P=a[C],o.hasOwnProperty(C)&&z!==P&&(z!=null||P!=null)&&(C==="selected"?e.selected=z&&typeof z!="function"&&typeof z!="symbol":Me(e,r,C,z,o,P));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var ue in a)z=a[ue],a.hasOwnProperty(ue)&&z!=null&&!o.hasOwnProperty(ue)&&Me(e,r,ue,null,o,z);for(D in o)if(z=o[D],P=a[D],o.hasOwnProperty(D)&&z!==P&&(z!=null||P!=null))switch(D){case"children":case"dangerouslySetInnerHTML":if(z!=null)throw Error(i(137,r));break;default:Me(e,r,D,z,o,P)}return;default:if(gu(r)){for(var Ue in a)z=a[Ue],a.hasOwnProperty(Ue)&&z!==void 0&&!o.hasOwnProperty(Ue)&&th(e,r,Ue,void 0,o,z);for(H in o)z=o[H],P=a[H],!o.hasOwnProperty(H)||z===P||z===void 0&&P===void 0||th(e,r,H,z,o,P);return}}for(var M in a)z=a[M],a.hasOwnProperty(M)&&z!=null&&!o.hasOwnProperty(M)&&Me(e,r,M,null,o,z);for(G in o)z=o[G],P=a[G],!o.hasOwnProperty(G)||z===P||z==null&&P==null||Me(e,r,G,z,o,P)}function Zg(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function $_(){if(typeof performance.getEntriesByType=="function"){for(var e=0,r=0,a=performance.getEntriesByType("resource"),o=0;o<a.length;o++){var h=a[o],f=h.transferSize,v=h.initiatorType,S=h.duration;if(f&&S&&Zg(v)){for(v=0,S=h.responseEnd,o+=1;o<a.length;o++){var C=a[o],D=C.startTime;if(D>S)break;var H=C.transferSize,G=C.initiatorType;H&&Zg(G)&&(C=C.responseEnd,v+=H*(C<S?1:(S-D)/(C-D)))}if(--o,r+=8*(f+v)/(h.duration/1e3),e++,10<e)break}}if(0<e)return r/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var nh=null,rh=null;
vendor: 9,309 bytes, line 10
10function Wo(e){return e.nodeType===9?e:e.ownerDocument}function Wg(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function ey(e,r){if(e===0)switch(r){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&r==="foreignObject"?0:e}function sh(e,r){return e==="textarea"||e==="noscript"||typeof r.children=="string"||typeof r.children=="number"||typeof r.children=="bigint"||typeof r.dangerouslySetInnerHTML=="object"&&r.dangerouslySetInnerHTML!==null&&r.dangerouslySetInnerHTML.__html!=null}var ah=null;function G_(){var e=window.event;return e&&e.type==="popstate"?e===ah?!1:(ah=e,!0):(ah=null,!1)}var ty=typeof setTimeout=="function"?setTimeout:void 0,V_=typeof clearTimeout=="function"?clearTimeout:void 0,ny=typeof Promise=="function"?Promise:void 0,K_=typeof queueMicrotask=="function"?queueMicrotask:typeof ny<"u"?function(e){return ny.resolve(null).then(e).catch(Y_)}:ty;function Y_(e){setTimeout(function(){throw e})}function yr(e){return e==="head"}function ry(e,r){var a=r,o=0;do{var h=a.nextSibling;if(e.removeChild(a),h&&h.nodeType===8)if(a=h.data,a==="/$"||a==="/&"){if(o===0){e.removeChild(h),Ws(r);return}o--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")o++;else if(a==="html")li(e.ownerDocument.documentElement);else if(a==="head"){a=e.ownerDocument.head,li(a);for(var f=a.firstChild;f;){var v=f.nextSibling,S=f.nodeName;f[Aa]||S==="SCRIPT"||S==="STYLE"||S==="LINK"&&f.rel.toLowerCase()==="stylesheet"||a.removeChild(f),f=v}}else a==="body"&&li(e.ownerDocument.body);a=h}while(a);Ws(r)}function sy(e,r){var a=e;e=0;do{var o=a.nextSibling;if(a.nodeType===1?r?(a._stashedDisplay=a.style.display,a.style.display="none"):(a.style.display=a._stashedDisplay||"",a.getAttribute("style")===""&&a.removeAttribute("style")):a.nodeType===3&&(r?(a._stashedText=a.nodeValue,a.nodeValue=""):a.nodeValue=a._stashedText||""),o&&o.nodeType===8)if(a=o.data,a==="/$"){if(e===0)break;e--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||e++;a=o}while(a)}function ih(e){var r=e.firstChild;for(r&&r.nodeType===10&&(r=r.nextSibling);r;){var a=r;switch(r=r.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":ih(a),hu(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function F_(e,r,a,o){for(;e.nodeType===1;){var h=a;if(e.nodeName.toLowerCase()!==r.toLowerCase()){if(!o&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(o){if(!e[Aa])switch(r){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(f=e.getAttribute("rel"),f==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(f!==h.rel||e.getAttribute("href")!==(h.href==null||h.href===""?null:h.href)||e.getAttribute("crossorigin")!==(h.crossOrigin==null?null:h.crossOrigin)||e.getAttribute("title")!==(h.title==null?null:h.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(f=e.getAttribute("src"),(f!==(h.src==null?null:h.src)||e.getAttribute("type")!==(h.type==null?null:h.type)||e.getAttribute("crossorigin")!==(h.crossOrigin==null?null:h.crossOrigin))&&f&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(r==="input"&&e.type==="hidden"){var f=h.name==null?null:""+h.name;if(h.type==="hidden"&&e.getAttribute("name")===f)return e}else return e;if(e=Zt(e.nextSibling),e===null)break}return null}function Q_(e,r,a){if(r==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=Zt(e.nextSibling),e===null))return null;return e}function ay(e,r){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!r||(e=Zt(e.nextSibling),e===null))return null;return e}function oh(e){return e.data==="$?"||e.data==="$~"}function lh(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function J_(e,r){var a=e.ownerDocument;if(e.data==="$~")e._reactRetry=r;else if(e.data!=="$?"||a.readyState!=="loading")r();else{var o=function(){r(),a.removeEventListener("DOMContentLoaded",o)};a.addEventListener("DOMContentLoaded",o),e._reactRetry=o}}function Zt(e){for(;e!=null;e=e.nextSibling){var r=e.nodeType;if(r===1||r===3)break;if(r===8){if(r=e.data,r==="$"||r==="$!"||r==="$?"||r==="$~"||r==="&"||r==="F!"||r==="F")break;if(r==="/$"||r==="/&")return null}}return e}var uh=null;function iy(e){e=e.nextSibling;for(var r=0;e;){if(e.nodeType===8){var a=e.data;if(a==="/$"||a==="/&"){if(r===0)return Zt(e.nextSibling);r--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||r++}e=e.nextSibling}return null}function oy(e){e=e.previousSibling;for(var r=0;e;){if(e.nodeType===8){var a=e.data;if(a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"){if(r===0)return e;r--}else a!=="/$"&&a!=="/&"||r++}e=e.previousSibling}return null}function ly(e,r,a){switch(r=Wo(a),e){case"html":if(e=r.documentElement,!e)throw Error(i(452));return e;case"head":if(e=r.head,!e)throw Error(i(453));return e;case"body":if(e=r.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function li(e){for(var r=e.attributes;r.length;)e.removeAttributeNode(r[0]);hu(e)}var Wt=new Map,uy=new Set;function el(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var qn=F.d;F.d={f:X_,r:Z_,D:W_,C:eS,L:tS,m:nS,X:sS,S:rS,M:aS};function X_(){var e=qn.f(),r=Vo();return e||r}function Z_(e){var r=vs(e);r!==null&&r.tag===5&&r.type==="form"?Ap(r):qn.r(e)}var Js=typeof document>"u"?null:document;function cy(e,r,a){var o=Js;if(o&&typeof r=="string"&&r){var h=Vt(r);h='link[rel="'+e+'"][href="'+h+'"]',typeof a=="string"&&(h+='[crossorigin="'+a+'"]'),uy.has(h)||(uy.add(h),e={rel:e,crossOrigin:a,href:r},o.querySelector(h)===null&&(r=o.createElement("link"),gt(r,"link",e),it(r),o.head.appendChild(r)))}}function W_(e){qn.D(e),cy("dns-prefetch",e,null)}function eS(e,r){qn.C(e,r),cy("preconnect",e,r)}function tS(e,r,a){qn.L(e,r,a);var o=Js;if(o&&e&&r){var h='link[rel="preload"][as="'+Vt(r)+'"]';r==="image"&&a&&a.imageSrcSet?(h+='[imagesrcset="'+Vt(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(h+='[imagesizes="'+Vt(a.imageSizes)+'"]')):h+='[href="'+Vt(e)+'"]';var f=h;switch(r){case"style":f=Xs(e);break;case"script":f=Zs(e)}Wt.has(f)||(e=y({rel:"preload",href:r==="image"&&a&&a.imageSrcSet?void 0:e,as:r},a),Wt.set(f,e),o.querySelector(h)!==null||r==="style"&&o.querySelector(ui(f))||r==="script"&&o.querySelector(ci(f))||(r=o.createElement("link"),gt(r,"link",e),it(r),o.head.appendChild(r)))}}function nS(e,r){qn.m(e,r);var a=Js;if(a&&e){var o=r&&typeof r.as=="string"?r.as:"script",h='link[rel="modulepreload"][as="'+Vt(o)+'"][href="'+Vt(e)+'"]',f=h;switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":f=Zs(e)}if(!Wt.has(f)&&(e=y({rel:"modulepreload",href:e},r),Wt.set(f,e),a.querySelector(h)===null)){switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(ci(f)))return}o=a.createElement("link"),gt(o,"link",e),it(o),a.head.appendChild(o)}}}function rS(e,r,a){qn.S(e,r,a);var o=Js;if(o&&e){var h=bs(o).hoistableStyles,f=Xs(e);r=r||"default";var v=h.get(f);if(!v){var S={loading:0,preload:null};if(v=o.querySelector(ui(f)))S.loading=5;else{e=y({rel:"stylesheet",href:e,"data-precedence":r},a),(a=Wt.get(f))&&ch(e,a);var C=v=o.createElement("link");it(C),gt(C,"link",e),C._p=new Promise(function(D,H){C.onload=D,C.onerror=H}),C.addEventListener("load",function(){S.loading|=1}),C.addEventListener("error",function(){S.loading|=2}),S.loading|=4,tl(v,r,o)}v={type:"stylesheet",instance:v,count:1,state:S},h.set(f,v)}}}function sS(e,r){qn.X(e,r);var a=Js;if(a&&e){var o=bs(a).hoistableScripts,h=Zs(e),f=o.get(h);f||(f=a.querySelector(ci(h)),f||(e=y({src:e,async:!0},r),(r=Wt.get(h))&&hh(e,r),f=a.createElement("script"),it(f),gt(f,"link",e),a.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},o.set(h,f))}}function aS(e,r){qn.M(e,r);var a=Js;if(a&&e){var o=bs(a).hoistableScripts,h=Zs(e),f=o.get(h);f||(f=a.querySelector(ci(h)),f||(e=y({src:e,async:!0,type:"module"},r),(r=Wt.get(h))&&hh(e,r),f=a.createElement("script"),it(f),gt(f,"link",e),a.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},o.set(h,f))}}function hy(e,r,a,o){var h=(h=pe.current)?el(h):null;if(!h)throw Error(i(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(r=Xs(a.href),a=bs(h).hoistableStyles,o=a.get(r),o||(o={type:"style",instance:null,count:0,state:null},a.set(r,o)),o):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=Xs(a.href);var f=bs(h).hoistableStyles,v=f.get(e);if(v||(h=h.ownerDocument||h,v={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},f.set(e,v),(f=h.querySelector(ui(e)))&&!f._p&&(v.instance=f,v.state.loading=5),Wt.has(e)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},Wt.set(e,a),f||iS(h,e,a,v.state))),r&&o===null)throw Error(i(528,""));return v}if(r&&o!==null)throw Error(i(529,""));return null;
vendor: 4,683 bytes, line 10
10case"script":return r=a.async,a=a.src,typeof a=="string"&&r&&typeof r!="function"&&typeof r!="symbol"?(r=Zs(a),a=bs(h).hoistableScripts,o=a.get(r),o||(o={type:"script",instance:null,count:0,state:null},a.set(r,o)),o):{type:"void",instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Xs(e){return'href="'+Vt(e)+'"'}function ui(e){return'link[rel="stylesheet"]['+e+"]"}function fy(e){return y({},e,{"data-precedence":e.precedence,precedence:null})}function iS(e,r,a,o){e.querySelector('link[rel="preload"][as="style"]['+r+"]")?o.loading=1:(r=e.createElement("link"),o.preload=r,r.addEventListener("load",function(){return o.loading|=1}),r.addEventListener("error",function(){return o.loading|=2}),gt(r,"link",a),it(r),e.head.appendChild(r))}function Zs(e){return'[src="'+Vt(e)+'"]'}function ci(e){return"script[async]"+e}function dy(e,r,a){if(r.count++,r.instance===null)switch(r.type){case"style":var o=e.querySelector('style[data-href~="'+Vt(a.href)+'"]');if(o)return r.instance=o,it(o),o;var h=y({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return o=(e.ownerDocument||e).createElement("style"),it(o),gt(o,"style",h),tl(o,a.precedence,e),r.instance=o;case"stylesheet":h=Xs(a.href);var f=e.querySelector(ui(h));if(f)return r.state.loading|=4,r.instance=f,it(f),f;o=fy(a),(h=Wt.get(h))&&ch(o,h),f=(e.ownerDocument||e).createElement("link"),it(f);var v=f;return v._p=new Promise(function(S,C){v.onload=S,v.onerror=C}),gt(f,"link",o),r.state.loading|=4,tl(f,a.precedence,e),r.instance=f;case"script":return f=Zs(a.src),(h=e.querySelector(ci(f)))?(r.instance=h,it(h),h):(o=a,(h=Wt.get(f))&&(o=y({},a),hh(o,h)),e=e.ownerDocument||e,h=e.createElement("script"),it(h),gt(h,"link",o),e.head.appendChild(h),r.instance=h);case"void":return null;default:throw Error(i(443,r.type))}else r.type==="stylesheet"&&(r.state.loading&4)===0&&(o=r.instance,r.state.loading|=4,tl(o,a.precedence,e));return r.instance}function tl(e,r,a){for(var o=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),h=o.length?o[o.length-1]:null,f=h,v=0;v<o.length;v++){var S=o[v];if(S.dataset.precedence===r)f=S;else if(f!==h)break}f?f.parentNode.insertBefore(e,f.nextSibling):(r=a.nodeType===9?a.head:a,r.insertBefore(e,r.firstChild))}function ch(e,r){e.crossOrigin==null&&(e.crossOrigin=r.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=r.referrerPolicy),e.title==null&&(e.title=r.title)}function hh(e,r){e.crossOrigin==null&&(e.crossOrigin=r.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=r.referrerPolicy),e.integrity==null&&(e.integrity=r.integrity)}var nl=null;function py(e,r,a){if(nl===null){var o=new Map,h=nl=new Map;h.set(a,o)}else h=nl,o=h.get(a),o||(o=new Map,h.set(a,o));if(o.has(e))return o;for(o.set(e,null),a=a.getElementsByTagName(e),h=0;h<a.length;h++){var f=a[h];if(!(f[Aa]||f[ht]||e==="link"&&f.getAttribute("rel")==="stylesheet")&&f.namespaceURI!=="http://www.w3.org/2000/svg"){var v=f.getAttribute(r)||"";v=e+v;var S=o.get(v);S?S.push(f):o.set(v,[f])}}return o}function gy(e,r,a){e=e.ownerDocument||e,e.head.insertBefore(a,r==="title"?e.querySelector("head > title"):null)}function oS(e,r,a){if(a===1||r.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof r.precedence!="string"||typeof r.href!="string"||r.href==="")break;return!0;case"link":if(typeof r.rel!="string"||typeof r.href!="string"||r.href===""||r.onLoad||r.onError)break;return r.rel==="stylesheet"?(e=r.disabled,typeof r.precedence=="string"&&e==null):!0;case"script":if(r.async&&typeof r.async!="function"&&typeof r.async!="symbol"&&!r.onLoad&&!r.onError&&r.src&&typeof r.src=="string")return!0}return!1}function yy(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function lS(e,r,a,o){if(a.type==="stylesheet"&&(typeof o.media!="string"||matchMedia(o.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var h=Xs(o.href),f=r.querySelector(ui(h));if(f){r=f._p,r!==null&&typeof r=="object"&&typeof r.then=="function"&&(e.count++,e=rl.bind(e),r.then(e,e)),a.state.loading|=4,a.instance=f,it(f);return}f=r.ownerDocument||r,o=fy(o),(h=Wt.get(h))&&ch(o,h),f=f.createElement("link"),it(f);var v=f;v._p=new Promise(function(S,C){v.onload=S,v.onerror=C}),gt(f,"link",o),a.instance=f}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(a,r),(r=a.state.preload)&&(a.state.loading&3)===0&&(e.count++,a=rl.bind(e),r.addEventListener("load",a),r.addEventListener("error",a))}}var fh=0;function uS(e,r){return e.stylesheets&&e.count===0&&al(e,e.stylesheets),0<e.count||0<e.imgCount?function(a){var o=setTimeout(function(){if(e.stylesheets&&al(e,e.stylesheets),e.unsu
vendor: 10,526 bytes, line 10
10spend){var f=e.unsuspend;e.unsuspend=null,f()}},6e4+r);0<e.imgBytes&&fh===0&&(fh=62500*$_());var h=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&al(e,e.stylesheets),e.unsuspend)){var f=e.unsuspend;e.unsuspend=null,f()}},(e.imgBytes>fh?50:800)+r);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(o),clearTimeout(h)}}:null}function rl(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)al(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var sl=null;function al(e,r){e.stylesheets=null,e.unsuspend!==null&&(e.count++,sl=new Map,r.forEach(cS,e),sl=null,rl.call(e))}function cS(e,r){if(!(r.state.loading&4)){var a=sl.get(e);if(a)var o=a.get(null);else{a=new Map,sl.set(e,a);for(var h=e.querySelectorAll("link[data-precedence],style[data-precedence]"),f=0;f<h.length;f++){var v=h[f];(v.nodeName==="LINK"||v.getAttribute("media")!=="not all")&&(a.set(v.dataset.precedence,v),o=v)}o&&a.set(null,o)}h=r.instance,v=h.getAttribute("data-precedence"),f=a.get(v)||o,f===o&&a.set(null,h),a.set(v,h),this.count++,o=rl.bind(this),h.addEventListener("load",o),h.addEventListener("error",o),f?f.parentNode.insertBefore(h,f.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(h,e.firstChild)),r.state.loading|=4}}var hi={$$typeof:j,Provider:null,Consumer:null,_currentValue:oe,_currentValue2:oe,_threadCount:0};function hS(e,r,a,o,h,f,v,S,C){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=ou(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ou(0),this.hiddenUpdates=ou(null),this.identifierPrefix=o,this.onUncaughtError=h,this.onCaughtError=f,this.onRecoverableError=v,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=C,this.incompleteTransitions=new Map}function my(e,r,a,o,h,f,v,S,C,D,H,G){return e=new hS(e,r,a,v,C,D,H,G,S),r=1,f===!0&&(r|=24),f=zt(3,null,null,r),e.current=f,f.stateNode=e,r=Vu(),r.refCount++,e.pooledCache=r,r.refCount++,f.memoizedState={element:o,isDehydrated:a,cache:r},Qu(f),e}function vy(e){return e?(e=xs,e):xs}function by(e,r,a,o,h,f){h=vy(h),o.context===null?o.context=h:o.pendingContext=h,o=ar(r),o.payload={element:a},f=f===void 0?null:f,f!==null&&(o.callback=f),a=ir(e,o,r),a!==null&&(xt(a,e,r),$a(a,e,r))}function _y(e,r){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<r?a:r}}function dh(e,r){_y(e,r),(e=e.alternate)&&_y(e,r)}function Sy(e){if(e.tag===13||e.tag===31){var r=qr(e,67108864);r!==null&&xt(r,e,67108864),dh(e,67108864)}}function wy(e){if(e.tag===13||e.tag===31){var r=It();r=lu(r);var a=qr(e,r);a!==null&&xt(a,e,r),dh(e,r)}}var il=!0;function fS(e,r,a,o){var h=B.T;B.T=null;var f=F.p;try{F.p=2,ph(e,r,a,o)}finally{F.p=f,B.T=h}}function dS(e,r,a,o){var h=B.T;B.T=null;var f=F.p;try{F.p=8,ph(e,r,a,o)}finally{F.p=f,B.T=h}}function ph(e,r,a,o){if(il){var h=gh(o);if(h===null)eh(e,r,o,ol,a),Ty(e,o);else if(gS(h,e,r,a,o))o.stopPropagation();else if(Ty(e,o),r&4&&-1<pS.indexOf(e)){for(;h!==null;){var f=vs(h);if(f!==null)switch(f.tag){case 3:if(f=f.stateNode,f.current.memoizedState.isDehydrated){var v=Lr(f.pendingLanes);if(v!==0){var S=f;for(S.pendingLanes|=2,S.entangledLanes|=2;v;){var C=1<<31-Dt(v);S.entanglements[1]|=C,v&=~C}gn(f),(Ae&6)===0&&($o=bt()+500,ai(0))}}break;case 31:case 13:S=qr(f,2),S!==null&&xt(S,f,2),Vo(),dh(f,2)}if(f=gh(o),f===null&&eh(e,r,o,ol,a),f===h)break;h=f}h!==null&&o.stopPropagation()}else eh(e,r,o,null,a)}}function gh(e){return e=mu(e),yh(e)}var ol=null;function yh(e){if(ol=null,e=ms(e),e!==null){var r=u(e);if(r===null)e=null;else{var a=r.tag;if(a===13){if(e=c(r),e!==null)return e;e=null}else if(a===31){if(e=d(r),e!==null)return e;e=null}else if(a===3){if(r.stateNode.current.memoizedState.isDehydrated)return r.tag===3?r.stateNode.containerInfo:null;e=null}else r!==e&&(e=null)}}return ol=e,null}function Ey(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(ze()){case ct:return 2;case hn:return 8;case gs:case eb:return 32;case Uf:return 268435456;default:return 32}default:return 32}}var mh=!1,mr=null,vr=null,br=null,fi=new Map,di=new Map,_r=[],pS="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function Ty(e,r){switch(e){case"focusin":case"focusout":mr=null;break;case"dragenter":case"dragleave":vr=null;break;case"mouseover":case"mouseout":br=null;break;case"pointerover":case"pointerout":fi.delete(r.pointerId);break;case"gotpointercapture":case"lostpointercapture":di.delete(r.pointerId)}}function pi(e,r,a,o,h,f){return e===null||e.nativeEvent!==f?(e={blockedOn:r,domEventName:a,eventSystemFlags:o,nativeEvent:f,targetContainers:[h]},r!==null&&(r=vs(r),r!==null&&Sy(r)),e):(e.eventSystemFlags|=o,r=e.targetContainers,h!==null&&r.indexOf(h)===-1&&r.push(h),e)}function gS(e,r,a,o,h){switch(r){case"focusin":return mr=pi(mr,e,r,a,o,h),!0;case"dragenter":return vr=pi(vr,e,r,a,o,h),!0;case"mouseover":return br=pi(br,e,r,a,o,h),!0;case"pointerover":var f=h.pointerId;return fi.set(f,pi(fi.get(f)||null,e,r,a,o,h)),!0;case"gotpointercapture":return f=h.pointerId,di.set(f,pi(di.get(f)||null,e,r,a,o,h)),!0}return!1}function Ry(e){var r=ms(e.target);if(r!==null){var a=u(r);if(a!==null){if(r=a.tag,r===13){if(r=c(a),r!==null){e.blockedOn=r,Bf(e.priority,function(){wy(a)});return}}else if(r===31){if(r=d(a),r!==null){e.blockedOn=r,Bf(e.priority,function(){wy(a)});return}}else if(r===3&&a.stateNode.current.memoizedState.isDehydrated){e.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}e.blockedOn=null}function ll(e){if(e.blockedOn!==null)return!1;for(var r=e.targetContainers;0<r.length;){var a=gh(e.nativeEvent);if(a===null){a=e.nativeEvent;var o=new a.constructor(a.type,a);yu=o,a.target.dispatchEvent(o),yu=null}else return r=vs(a),r!==null&&Sy(r),e.blockedOn=a,!1;r.shift()}return!0}function Ay(e,r,a){ll(e)&&a.delete(r)}function yS(){mh=!1,mr!==null&&ll(mr)&&(mr=null),vr!==null&&ll(vr)&&(vr=null),br!==null&&ll(br)&&(br=null),fi.forEach(Ay),di.forEach(Ay)}function ul(e,r){e.blockedOn===r&&(e.blockedOn=null,mh||(mh=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,yS)))}var cl=null;function Oy(e){cl!==e&&(cl=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){cl===e&&(cl=null);for(var r=0;r<e.length;r+=3){var a=e[r],o=e[r+1],h=e[r+2];if(typeof o!="function"){if(yh(o||a)===null)continue;break}var f=vs(a);f!==null&&(e.splice(r,3),r-=3,gc(f,{pending:!0,data:h,method:a.method,action:o},o,h))}}))}function Ws(e){function r(C){return ul(C,e)}mr!==null&&ul(mr,e),vr!==null&&ul(vr,e),br!==null&&ul(br,e),fi.forEach(r),di.forEach(r);for(var a=0;a<_r.length;a++){var o=_r[a];o.blockedOn===e&&(o.blockedOn=null)}for(;0<_r.length&&(a=_r[0],a.blockedOn===null);)Ry(a),a.blockedOn===null&&_r.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(o=0;o<a.length;o+=3){var h=a[o],f=a[o+1],v=h[Et]||null;if(typeof f=="function")v||Oy(a);else if(v){var S=null;if(f&&f.hasAttribute("formAction")){if(h=f,v=f[Et]||null)S=v.formAction;else if(yh(h)!==null)continue}else S=v.action;typeof S=="function"?a[o+1]=S:(a.splice(o,3),o-=3),Oy(a)}}}function Cy(){function e(f){f.canIntercept&&f.info==="react-transition"&&f.intercept({handler:function(){return new Promise(function(v){return h=v})},focusReset:"manual",scroll:"manual"})}function r(){h!==null&&(h(),h=null),o||setTimeout(a,20)}function a(){if(!o&&!navigation.transition){var f=navigation.currentEntry;f&&f.url!=null&&navigation.navigate(f.url,{state:f.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var o=!1,h=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",r),navigation.addEventListener("navigateerror",r),setTimeout(a,100),function(){o=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",r),navigation.removeEventListener("navigateerror",r),h!==null&&(h(),h=null)}}}function vh(e){this._internalRoot=e}hl.prototype.render=vh.prototype.render=function(e){var r=this._internalRoot;if(r===null)throw Error(i(409));var a=r.current,o=It();by(a,o,e,r,null,null)},hl.prototype.unmount=vh.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var r=e.containerInfo;by(e.current,2,null,e,null,null),Vo(),r[ys]=null}};function hl(e){this._internalRoot=e}hl.prototype.unstable_scheduleHydration=function(e){if(e){var r=Pf();e={blockedOn:null,target:e,priority:r};for(var a=0;a<_r.length&&r!==0&&r<_r[a].priority;a++);_r.splice(a,0,e),a===0&&Ry(e)}};var xy=n.version;if(xy!=="19.2.5")throw Error(i(527,xy,"19.2.5"));F.findDOMNode=function(e){var r=e._reactInternals;if(r===void 0)throw typeof e.render=="function"?Error(i(188)):(e=Object.keys(e).join(","),Error(i(268,e)));return e=g(r),e=e!==null?m(e):null,e=e===null?null:e.stateNode,e};var mS={bundleType:0,version:"19.2.5",rendererPackageName:"react-dom",currentDispatcherRef:B,reconcilerVersion:"19.2.5"};
10if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var fl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!fl.isDisabled&&fl.supportsFiber)try{Ea=fl.inject(mS),Nt=fl}catch{}}return yi.createRoot=function(e,r){if(!l(e))throw Error(i(299));var a=!1,o="",h=Lp,f=zp,v=Pp;return r!=null&&(r.unstable_strictMode===!0&&(a=!0),r.identifierPrefix!==void 0&&(o=r.identifierPrefix),r.onUncaughtError!==void 0&&(h=r.onUncaughtError),r.onCaughtError!==void 0&&(f=r.onCaughtError),r.onRecoverableError!==void 0&&(v=r.onRecoverableError)),r=my(e,1,!1,null,null,a,o,null,h,f,v,Cy),e[ys]=r.current,Wc(e),new vh(r)},yi.hydrateRoot=function(e,r,a){if(!l(e))throw Error(i(299));var o=!1,h="",f=Lp,v=zp,S=Pp,C=null;return a!=null&&(a.unstable_strictMode===!0&&(o=!0),a.identifierPrefix!==void 0&&(h=a.identifierPrefix),a.onUncaughtError!==void 0&&(f=a.onUncaughtError),a.onCaughtError!==void 0&&(v=a.onCaughtError),a.onRecoverableError!==void 0&&(S=a.onRecoverableError),a.formState!==void 0&&(C=a.formState)),r=my(e,1,!0,r,a??null,o,h,C,f,v,S,Cy),r.context=vy(null),a=r.current,o=It(),o=lu(o),h=ar(o),h.callback=null,ir(a,h,o),a=o,r.current.lanes=a,Ra(r,a),gn(r),e[ys]=r.current,Wc(e),new hl(r)},yi.version="19.2.5",yi}var By;function CS(){if(By)return Sh.exports;By=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(n){console.error(n)}}return t(),Sh.exports=OS(),Sh.exports}var xS=CS(),kS="__TSS_CONTEXT",Gh=Symbol.for("TSS_SERVER_FUNCTION"),jS="application/x-tss-framed",In={JSON:0,CHUNK:1,END:2,ERROR:3},MS=/;\s*v=(\d+)/;function US(t){const n=t.match(MS);return n?parseInt(n[1],10):void 0}function NS(t){const n=US(t);if(n!==void 0&&n!==1)throw new Error(`Incompatible framed protocol version: server=${n}, client=1. Please ensure client and server are using compatible versions.`)}var gv=()=>window.__TSS_START_OPTIONS__,yv=!1;function ki(t){return t[t.length-1]}function DS(t){return typeof t=="function"}function Ar(t,n){return DS(t)?t(n):t}var LS=Object.prototype.hasOwnProperty,Hy=Object.prototype.propertyIsEnumerable,zS=()=>Object.create(null),es=(t,n)=>ss(t,n,zS);function ss(t,n,s=()=>({}),i=0){if(t===n)return t;if(i>500)return n;const l=n,u=$y(t)&&$y(l);if(!u&&!(va(t)&&va(l)))return l;const c=u?t:qy(t);if(!c)return l;const d=u?l:qy(l);if(!d)return l;const p=c.length,g=d.length,m=u?new Array(g):s();let y=0;for(let b=0;b<g;b++){const _=u?b:d[b],w=t[_],A=l[_];if(w===A){m[_]=w,(u?b<p:LS.call(t,_))&&y++;continue}if(w===null||A===null||typeof w!="object"||typeof A!="object"){m[_]=A;continue}const R=ss(w,A,s,i+1);m[_]=R,R===w&&y++}return p===g&&y===p?t:m}function qy(t){const n=Object.getOwnPropertyNames(t);for(const l of n)if(!Hy.call(t,l))return!1;const s=Object.getOwnPropertySymbols(t);if(s.length===0)return n;const i=n;for(const l of s){if(!Hy.call(t,l))return!1;i.push(l)}return i}function va(t){if(!Iy(t))return!1;const n=t.constructor;if(typeof n>"u")return!0;const s=n.prototype;return!(!Iy(s)||!s.hasOwnProperty("isPrototypeOf"))}function Iy(t){return Object.prototype.toString.call(t)==="[object Object]"}function $y(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function jt(t,n,s){if(t===n)return!0;if(typeof t!=typeof n)return!1;if(Array.isArray(t)&&Array.isArray(n)){if(t.length!==n.length)return!1;for(let i=0,l=t.length;i<l;i++)if(!jt(t[i],n[i],s))return!1;return!0}if(va(t)&&va(n)){const i=s?.ignoreUndefined??!0;if(s?.partial){for(const c in n)if((!i||n[c]!==void 0)&&!jt(t[c],n[c],s))return!1;return!0}let l=0;if(!i)l=Object.keys(t).length;else for(const c in t)t[c]!==void 0&&l++;let u=0;for(const c in n)if((!i||n[c]!==void 0)&&(u++,u>l||!jt(t[c],n[c],s)))return!1;return l===u}return!1}function hs(t){let n,s;const i=new Promise((l,u)=>{n=l,s=u});return i.status="pending",i.resolve=l=>{i.status="resolved",i.value=l,n(l),t?.(l)},i.reject=l=>{i.status="rejected",s(l)},i}function PS(t){return typeof t?.message!="string"?!1:t.message.startsWith("Failed to fetch dynamically imported module")||t.message.startsWith("error loading dynamically imported module")||t.message.startsWith("Importing a module script failed")}function ji(t){return!!(t&&typeof t=="object"&&typeof t.then=="function")}function BS(t){return t.replace(/[\x00-\x1f\x7f]/g,"")}function Gy(t){let n;try{n=decodeURI(t)}catch{n=t.replaceAll(/%[0-9A-F]{2}/gi,s=>{try{return decodeURI(s)}catch{return s}})}return BS(n)}var HS=["http:","https:","mailto:","tel:"];function Ul(t,n){if(!t)return!1;try{const s=new URL(t);return!n.has(s.protocol)}catch{return!1}}var qS={"&":"\\u0026",">":"\\u003e","<":"\\u003c","\u2028":"\\u2028","\u2029":"\\u2029"},IS=/[&><\u2028\u2029]/g;function $S(t){return t.replace(IS,n=>qS[n])}function mi(t){if(!t)return{path:t,handledProtocolRelativeURL:!1};if(!/[%\\\x00-\x1f\x7f]/.test(t)&&!t.startsWith("//"))return{path:t,handledProtocolRelativeURL:!1};const n=/%25|%5C/gi;let s=0,i="",l;for(;(l=n.exec(t))!==null;)i+=Gy(t.slice(s,l.index))+l[0],s=n.lastIndex;i=i+Gy(s?t.slice(s):t);let u=!1;return i.startsWith("//")&&(u=!0,i="/"+i.replace(/^\/+/,"")),{path:i,handledProtocolRelativeURL:u}}function GS(t){return/\s|[^\u0000-\u007F]/.test(t)?t.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):t}function VS(t,n){if(t===n)return!0;
10if(t.length!==n.length)return!1;for(let s=0;s<t.length;s++)if(t[s]!==n[s])return!1;return!0}function Ut(){throw new Error("Invariant failed")}function Mi(t){const n=new Map;let s,i;const l=u=>{u.next&&(u.prev?(u.prev.next=u.next,u.next.prev=u.prev,u.next=void 0,i&&(i.next=u,u.prev=i)):(u.next.prev=void 0,s=u.next,u.next=void 0,i&&(u.prev=i,i.next=u)),i=u)};return{get(u){const c=n.get(u);if(c)return l(c),c.value},set(u,c){if(n.size>=t&&s){const p=s;n.delete(p.key),p.next&&(s=p.next,p.next.prev=void 0),p===i&&(i=void 0)}const d=n.get(u);if(d)d.value=c,l(d);else{const p={key:u,value:c,prev:i};i&&(i.next=p),i=p,s||(s=p),n.set(u,p)}},clear(){n.clear(),s=void 0,i=void 0}}}var Or=4,mv=5;function KS(t){const n=t.indexOf("{");if(n===-1)return null;const s=t.indexOf("}",n);return s===-1||n+1>=t.length?null:[n,s]}function yf(t,n,s=new Uint16Array(6)){const i=t.indexOf("/",n),l=i===-1?t.length:i,u=t.substring(n,l);if(!u||!u.includes("$"))return s[0]=0,s[1]=n,s[2]=n,s[3]=l,s[4]=l,s[5]=l,s;if(u==="$"){const d=t.length;return s[0]=2,s[1]=n,s[2]=n,s[3]=d,s[4]=d,s[5]=d,s}if(u.charCodeAt(0)===36)return s[0]=1,s[1]=n,s[2]=n+1,s[3]=l,s[4]=l,s[5]=l,s;const c=KS(u);if(c){const[d,p]=c,g=u.charCodeAt(d+1);if(g===45){if(d+2<u.length&&u.charCodeAt(d+2)===36){const m=d+3,y=p;if(m<y)return s[0]=3,s[1]=n+d,s[2]=n+m,s[3]=n+y,s[4]=n+p+1,s[5]=l,s}}else if(g===36){const m=d+1,y=d+2;return y===p?(s[0]=2,s[1]=n+d,s[2]=n+m,s[3]=n+y,s[4]=n+p+1,s[5]=t.length,s):(s[0]=1,s[1]=n+d,s[2]=n+y,s[3]=n+p,s[4]=n+p+1,s[5]=l,s)}}return s[0]=0,s[1]=n,s[2]=n,s[3]=l,s[4]=l,s[5]=l,s}function Yl(t,n,s,i,l,u,c){c?.(s);let d=i;{const p=s.fullPath??s.from,g=p.length,m=s.options?.caseSensitive??t,y=!!(s.options?.params?.parse&&s.options?.skipRouteOnParseError?.params);for(;d<g;){const _=yf(p,d,n);let w;const A=d,R=_[5];switch(d=R+1,u++,_[0]){case 0:{const O=p.substring(_[2],_[3]);if(m){const U=l.static?.get(O);if(U)w=U;else{l.static??=new Map;const j=as(s.fullPath??s.from);j.parent=l,j.depth=u,w=j,l.static.set(O,j)}}else{const U=O.toLowerCase(),j=l.staticInsensitive?.get(U);if(j)w=j;else{l.staticInsensitive??=new Map;const L=as(s.fullPath??s.from);L.parent=l,L.depth=u,w=L,l.staticInsensitive.set(U,L)}}break}case 1:{const O=p.substring(A,_[1]),U=p.substring(_[4],R),j=m&&!!(O||U),L=O?j?O:O.toLowerCase():void 0,Q=U?j?U:U.toLowerCase():void 0,V=!y&&l.dynamic?.find(q=>!q.skipOnParamError&&q.caseSensitive===j&&q.prefix===L&&q.suffix===Q);if(V)w=V;else{const q=Ah(1,s.fullPath??s.from,j,L,Q);w=q,q.depth=u,q.parent=l,l.dynamic??=[],l.dynamic.push(q)}break}case 3:{const O=p.substring(A,_[1]),U=p.substring(_[4],R),j=m&&!!(O||U),L=O?j?O:O.toLowerCase():void 0,Q=U?j?U:U.toLowerCase():void 0,V=!y&&l.optional?.find(q=>!q.skipOnParamError&&q.caseSensitive===j&&q.prefix===L&&q.suffix===Q);if(V)w=V;else{const q=Ah(3,s.fullPath??s.from,j,L,Q);w=q,q.parent=l,q.depth=u,l.optional??=[],l.optional.push(q)}break}case 2:{const O=p.substring(A,_[1]),U=p.substring(_[4],R),j=m&&!!(O||U),L=O?j?O:O.toLowerCase():void 0,Q=U?j?U:U.toLowerCase():void 0,V=Ah(2,s.fullPath??s.from,j,L,Q);w=V,V.parent=l,V.depth=u,l.wildcard??=[],l.wildcard.push(V)}}l=w}if(y&&s.children&&!s.isRoot&&s.id&&s.id.charCodeAt(s.id.lastIndexOf("/")+1)===95){const _=as(s.fullPath??s.from);_.kind=mv,_.parent=l,u++,_.depth=u,l.pathless??=[],l.pathless.push(_),l=_}const b=(s.path||!s.children)&&!s.isRoot;if(b&&p.endsWith("/")){const _=as(s.fullPath??s.from);_.kind=Or,_.parent=l,u++,_.depth=u,l.index=_,l=_}l.parse=s.options?.params?.parse??null,l.skipOnParamError=y,l.parsingPriority=s.options?.skipRouteOnParseError?.priority??0,b&&!l.route&&(l.route=s,l.fullPath=s.fullPath??s.from)}if(s.children)for(const p of s.children)Yl(t,n,p,d,l,u,c)}function Rh(t,n){if(t.skipOnParamError&&!n.skipOnParamError)return-1;if(!t.skipOnParamError&&n.skipOnParamError)return 1;if(t.skipOnParamError&&n.skipOnParamError&&(t.parsingPriority||n.parsingPriority))return n.parsingPriority-t.parsingPriority;if(t.prefix&&n.prefix&&t.prefix!==n.prefix){if(t.prefix.startsWith(n.prefix))return-1;if(n.prefix.startsWith(t.prefix))return 1}
10if(t.suffix&&n.suffix&&t.suffix!==n.suffix){if(t.suffix.endsWith(n.suffix))return-1;if(n.suffix.endsWith(t.suffix))return 1}return t.prefix&&!n.prefix?-1:!t.prefix&&n.prefix?1:t.suffix&&!n.suffix?-1:!t.suffix&&n.suffix?1:t.caseSensitive&&!n.caseSensitive?-1:!t.caseSensitive&&n.caseSensitive?1:0}function wr(t){if(t.pathless)for(const n of t.pathless)wr(n);if(t.static)for(const n of t.static.values())wr(n);if(t.staticInsensitive)for(const n of t.staticInsensitive.values())wr(n);if(t.dynamic?.length){t.dynamic.sort(Rh);for(const n of t.dynamic)wr(n)}if(t.optional?.length){t.optional.sort(Rh);for(const n of t.optional)wr(n)}if(t.wildcard?.length){t.wildcard.sort(Rh);for(const n of t.wildcard)wr(n)}}function as(t){return{kind:0,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:t,parent:null,parse:null,skipOnParamError:!1,parsingPriority:0}}function Ah(t,n,s,i,l){return{kind:t,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:n,parent:null,parse:null,skipOnParamError:!1,parsingPriority:0,caseSensitive:s,prefix:i,suffix:l}}function YS(t,n){const s=as("/"),i=new Uint16Array(6);for(const l of t)Yl(!1,i,l,1,s,0);wr(s),n.masksTree=s,n.flatCache=Mi(1e3)}function FS(t,n){t||="/";const s=n.flatCache.get(t);if(s)return s;const i=mf(t,n.masksTree);return n.flatCache.set(t,i),i}function QS(t,n,s,i,l){t||="/",i||="/";const u=n?`case\0${t}`:t;let c=l.singleCache.get(u);return c||(c=as("/"),Yl(n,new Uint16Array(6),{from:t},1,c,0),l.singleCache.set(u,c)),mf(i,c,s)}function JS(t,n,s=!1){const i=s?t:`nofuzz\0${t}`,l=n.matchCache.get(i);if(l!==void 0)return l;t||="/";let u;try{u=mf(t,n.segmentTree,s)}catch(c){if(c instanceof URIError)u=null;else throw c}return u&&(u.branch=WS(u.route)),n.matchCache.set(i,u),u}function XS(t){return t==="/"?t:t.replace(/\/{1,}$/,"")}function ZS(t,n=!1,s){const i=as(t.fullPath),l=new Uint16Array(6),u={},c={};let d=0;return Yl(n,l,t,1,i,0,p=>{if(s?.(p,d),p.id in u&&Ut(),u[p.id]=p,d!==0&&p.path){const g=XS(p.fullPath);(!c[g]||p.fullPath.endsWith("/"))&&(c[g]=p)}d++}),wr(i),{processedTree:{segmentTree:i,singleCache:Mi(1e3),matchCache:Mi(1e3),flatCache:null,masksTree:null},routesById:u,routesByPath:c}}function mf(t,n,s=!1){const i=t.split("/"),l=tw(t,i,n,s);if(!l)return null;const[u]=vv(t,i,l);return{route:l.node.route,rawParams:u,parsedParams:l.parsedParams}}function vv(t,n,s){const i=ew(s.node);let l=null;const u=Object.create(null);let c=s.extract?.part??0,d=s.extract?.node??0,p=s.extract?.path??0,g=s.extract?.segment??0;for(;d<i.length;c++,d++,p++,g++){const m=i[d];if(m.kind===Or)break;if(m.kind===mv){g--,c--,p--;continue}const y=n[c],b=p;if(y&&(p+=y.length),m.kind===1){l??=s.node.fullPath.split("/");const _=l[g],w=m.prefix?.length??0;if(_.charCodeAt(w)===123){const A=m.suffix?.length??0,R=_.substring(w+2,_.length-A-1),O=y.substring(w,y.length-A);u[R]=decodeURIComponent(O)}else{const A=_.substring(1);u[A]=decodeURIComponent(y)}}else if(m.kind===3){if(s.skipped&1<<d){c--,p=b-1;continue}l??=s.node.fullPath.split("/");const _=l[g],w=m.prefix?.length??0,A=m.suffix?.length??0,R=_.substring(w+3,_.length-A-1),O=m.suffix||m.prefix?y.substring(w,y.length-A):y;O&&(u[R]=decodeURIComponent(O))}else if(m.kind===2){const _=m,w=t.substring(b+(_.prefix?.length??0),t.length-(_.suffix?.length??0)),A=decodeURIComponent(w);u["*"]=A,u._splat=A;break}}return s.rawParams&&Object.assign(u,s.rawParams),[u,{part:c,node:d,path:p,segment:g}]}function WS(t){const n=[t];for(;t.parentRoute;)t=t.parentRoute,n.push(t);return n.reverse(),n}function ew(t){const n=Array(t.depth+1);do n[t.depth]=t,t=t.parent;while(t);return n}function tw(t,n,s,i){if(t==="/"&&s.index)return{node:s.index,skipped:0};const l=!ki(n),u=l&&t!=="/",c=n.length-(l?1:0),d=[{node:s,index:1,skipped:0,depth:1,statics:0,dynamics:0,optionals:0}];let p=null,g=null;for(;d.length;){const m=d.pop(),{node:y,index:b,skipped:_,depth:w,statics:A,dynamics:R,optionals:O}=m;let{extract:U,rawParams:j,parsedParams:L}=m;if(y.kind===2&&y.route&&!pl(g,m))continue;if(y.skipOnParamError){if(!Vy(t,n,m))continue;j=m.rawParams,U=m.extract,L=m.parsedParams}i&&y.route&&y.kind!==Or&&pl(p,m)&&(p=m);const Q=b===c;if(Q&&(y.route&&(!u||y.kind===Or||y.kind===2)&&pl(g,m)&&(g=m),!y.optional&&!y.wildcard&&!y.index&&!y.pathless))continue;const V=Q?void 0:n[b];let q;if(Q&&y.index){const K={node:y.index,index:b,skipped:_,depth:w+1,statics:A,dynamics:R,optionals:O,extract:U,rawParams:j,parsedParams:L};let J=!0;if(y.index.skipOnParamError&&(Vy(t,n,K)||(J=!1)),J){if(!R&&!O&&!_&&nw(A,c))return K;pl(g,K)&&(g=K)}}if(y.wildcard)for(let K=y.wildcard.length-1;K>=0;K--){const J=y.wildcard[K],{prefix:le,suffix:se}=J;if(!(le&&(Q||!(J.caseSensitive?V:q??=V.toLowerCase()).startsWith(le)))){if(se){if(Q)continue;const me=n.slice(b).join("/").slice(-se.length);if((J.caseSensitive?me:me.toLowerCase())!==se)continue}d.push({node:J,index:c,skipped:_,depth:w+1,statics:A,dynamics:R,optionals:O,extract:U,rawParams:j,parsedParams:L})}}if(y.optional){const K=_|1<<w,J=w+1;for(let le=y.optional.length-1;le>=0;le--){const se=y.optional[le];d.push({node:se,index:b,skipped:K,depth:J,statics:A,dynamics:R,optionals:O,extract:U,rawParams:j,parsedParams:L})}if(!Q)for(let le=y.optional.length-1;le>=0;le--){const se=y.optional[le],{prefix:me,suffix:Ce}=se;if(me||Ce){const Ye=se.caseSensitive?V:q??=V.toLowerCase();if(me&&!Ye.startsWith(me)||Ce&&!Ye.endsWith(Ce))continue}d.push({node:se,index:b+1,skipped:_,depth:J,statics:A,dynamics:R,optionals:O+dl(c,b),extract:U,rawParams:j,parsedParams:L})}}if(!Q&&y.dynamic&&V)for(let K=y.dynamic.length-1;K>=0;K--){const J=y.dynamic[K],{prefix:le,suffix:se}=J;if(le||se){const me=J.caseSensitive?V:q??=V.toLowerCase();if(le&&!me.startsWith(le)||se&&!me.endsWith(se))continue}d.push({node:J,index:b+1,skipped:_,depth:w+1,statics:A,dynamics:R+dl(c,b),optionals:O,extract:U,rawParams:j,parsedParams:L})}if(!Q&&y.staticInsensitive){const K=y.staticInsensitive.get(q??=V.toLowerCase());K&&d.push({node:K,index:b+1,skipped:_,depth:w+1,statics:A+dl(c,b),dynamics:R,optionals:O,extract:U,rawParams:j,parsedParams:L})}if(!Q&&y.static){const K=y.static.get(V);K&&d.push({node:K,index:b+1,skipped:_,depth:w+1,statics:A+dl(c,b),dynamics:R,optionals:O,extract:U,rawParams:j,parsedParams:L})}if(y.pathless){const K=w+1;for(let J=y.pathless.length-1;J>=0;J--){const le=y.pathless[J];d.push({node:le,index:b,skipped:_,depth:K,statics:A,dynamics:R,optionals:O,extract:U,rawParams:j,parsedParams:L})}}}if(g)return g;if(i&&p){let m=p.index;for(let b=0;b<p.index;b++)m+=n[b].length;const y=m===t.length?"/":t.slice(m);return p.rawParams??=Object.create(null),p.rawParams["**"]=decodeURIComponent(y),p}return null}function dl(t,n){return 2**(t-n-1)}function nw(t,n){return t===2**(n-1)-1}function Vy(t,n,s){try{const[i,l]=vv(t,n,s);s.rawParams=i,s.extract=l;const u=s.node.parse(i);return s.parsedParams=Object.assign(Object.create(null),s.parsedParams,u),!0}catch{return null}}function pl(t,n){return t?n.statics>t.statics||n.statics===t.statics&&(n.dynamics>t.dynamics||n.dynamics===t.dynamics&&(n.optionals>t.optionals||n.optionals===t.optionals&&((n.node.kind===Or)>(t.node.kind===Or)||n.node.kind===Or==(t.node.kind===Or)&&n.depth>
10t.depth))):!0}function Ol(t){return vf(t.filter(n=>n!==void 0).join("/"))}function vf(t){return t.replace(/\/{2,}/g,"/")}function bv(t){return t==="/"?t:t.replace(/^\/{1,}/,"")}function xr(t){const n=t.length;return n>1&&t[n-1]==="/"?t.replace(/\/{1,}$/,""):t}function _v(t){return xr(bv(t))}function Nl(t,n){return t?.endsWith("/")&&t!=="/"&&t!==`${n}/`?t.slice(0,-1):t}function rw(t,n,s){return Nl(t,s)===Nl(n,s)}function sw({base:t,to:n,trailingSlash:s="never",cache:i}){const l=n.startsWith("/"),u=!l&&n===".";let c;if(i){c=l?n:u?t:t+"\0"+n;const y=i.get(c);if(y)return y}let d;if(u)d=t.split("/");else if(l)d=n.split("/");else{for(d=t.split("/");d.length>1&&ki(d)==="";)d.pop();const y=n.split("/");for(let b=0,_=y.length;b<_;b++){const w=y[b];w===""?b?b===_-1&&d.push(w):d=[w]:w===".."?d.pop():w==="."||d.push(w)}}d.length>1&&(ki(d)===""?s==="never"&&d.pop():s==="always"&&d.push(""));let p,g="";for(let y=0;y<d.length;y++){y>0&&(g+="/");const b=d[y];if(!b)continue;p=yf(b,0,p);const _=p[0];if(_===0){g+=b;continue}const w=p[5],A=b.substring(0,p[1]),R=b.substring(p[4],w),O=b.substring(p[2],p[3]);_===1?g+=A||R?`${A}{$${O}}${R}`:`$${O}`:_===2?g+=A||R?`${A}{$}${R}`:"$":g+=`${A}{-$${O}}${R}`}g=vf(g);const m=g||"/";return c&&i&&i.set(c,m),m}function aw(t){const n=new Map(t.map(l=>[encodeURIComponent(l),l])),s=Array.from(n.keys()).map(l=>l.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),i=new RegExp(s,"g");return l=>l.replace(i,u=>n.get(u)??u)}function Oh(t,n,s){const i=n[t];return typeof i!="string"?i:t==="_splat"?/^[a-zA-Z0-9\-._~!/]*$/.test(i)?i:i.split("/").map(l=>Yy(l,s)).join("/"):Yy(i,s)}function Ky({path:t,params:n,decoder:s,...i}){let l=!1;const u=Object.create(null);if(!t||t==="/")return{interpolatedPath:"/",usedParams:u,isMissingParams:l};if(!t.includes("$"))return{interpolatedPath:t,usedParams:u,isMissingParams:l};const c=t.length;let d=0,p,g="";for(;d<c;){const m=d;p=yf(t,m,p);const y=p[5];if(d=y+1,m===y)continue;const b=p[0];if(b===0){g+="/"+t.substring(m,y);continue}if(b===2){const _=n._splat;u._splat=_,u["*"]=_;const w=t.substring(m,p[1]),A=t.substring(p[4],y);if(!_){l=!0,(w||A)&&(g+="/"+w+A);continue}const R=Oh("_splat",n,s);g+="/"+w+R+A;continue}if(b===1){const _=t.substring(p[2],p[3]);!l&&!(_ in n)&&(l=!0),u[_]=n[_];const w=t.substring(m,p[1]),A=t.substring(p[4],y),R=Oh(_,n,s)??"undefined";g+="/"+w+R+A;continue}if(b===3){const _=t.substring(p[2],p[3]),w=n[_];if(w==null)continue;u[_]=w;const A=t.substring(m,p[1]),R=t.substring(p[4],y),O=Oh(_,n,s)??"";g+="/"+A+O+R;continue}}return t.endsWith("/")&&(g+="/"),{usedParams:u,interpolatedPath:g||"/",isMissingParams:l}}function Yy(t,n){const s=encodeURIComponent(t);return n?.(s)??s}function ut(t){return t?.isNotFound===!0}function iw(){try{return typeof window<"u"&&typeof window.sessionStorage=="object"?window.sessionStorage:void 0}catch{return}}var ow="tsr-scroll-restoration-v1_3";function lw(){const t=iw();if(!t)return null;let n={};try{const i=JSON.parse(t.getItem("tsr-scroll-restoration-v1_3")||"{}");va(i)&&(n=i)}catch{}return{get state(){return n},set:i=>{n=Ar(i,n)||n},persist:()=>{try{t.setItem(ow,JSON.stringify(n))}catch{}}}}var Fy=lw(),uw=t=>t.state.__TSR_key||t.href;function cw(t){const n=[];let s;for(;s=t.parentNode;)n.push(`${t.tagName}:nth-child(${Array.prototype.indexOf.call(s.children,t)+1})`),t=s;return`${n.reverse().join(" > ")}`.toLowerCase()}var gl=!1,vi="window",Qy="data-scroll-restoration-id";function hw(t,n){if(!Fy)return;const s=Fy;if((t.options.scrollRestoration??!1)&&(t.isScrollRestoring=!0),t.isScrollRestorationSetup||!s)return;t.isScrollRestorationSetup=!0,gl=!1;const i=t.options.getScrollRestorationKey||uw,l=new Map;window.history.scrollRestoration="manual";const u=d=>{if(!(gl||!t.isScrollRestoring))if(d.target===document||d.target===window)l.set(vi,{scrollX:window.scrollX||0,scrollY:window.scrollY||0});else{const p=d.target;l.set(p,{scrollX:p.scrollLeft||0,scrollY:p.scrollTop||0})}},c=d=>{if(!t.isScrollRestoring||!d||l.size===0||!s)return;const p=s.state[d]||={};for(const[g,m]of l){let y;if(g===vi)y=vi;else if(g.isConnected){const b=g.getAttribute(Qy);y=b?`[${Qy}="${b}"]`:cw(g)}y&&(p[y]=m)}};document.addEventListener("scroll",u,!0),t.subscribe("onBeforeLoad",d=>{c(d.fromLocation?i(d.fromLocation):void 0),l.clear()}),window.addEventListener("pagehide",()=>{c(i(t.stores.resolvedLocation.get()??t.stores.location.get())),s.persist()}),t.subscribe("onRendered",d=>{const p=i(d.toLocation),g=t.options.scrollRestorationBehavior,m=t.options.scrollToTopSelectors;if(l.clear(),!t.resetNextScroll){t.resetNextScroll=!0;return}if(!(typeof t.options.scrollRestoration=="function"&&!t.options.scrollRestoration({location:t.latestLocation}))){gl=!0;try{const y=t.isScrollRestoring?s.state[p]:void 0;let b=!1;if(y)for(const _ in y){const w=y[_];if(!va(w))continue;const{scrollX:A,scrollY:R}=w;if(!(!Number.isFinite(A)||!Number.isFinite(R))){if(_===vi)window.scrollTo({top:R,left:A,behavior:g}),b=!0;else if(_){let O;try{O=document.querySelector(_)}catch{continue}O&&(O.scrollLeft=A,O.scrollTop=R,b=!0)}}}if(!b){const _=t.history.location.hash.slice(1);if(_){const w=window.history.state?.__hashScrollIntoViewOptions??!0;if(w){const A=document.getElementById(_);A&&A.scrollIntoView(w)}}else{const w={top:0,left:0,behavior:g};if(window.scrollTo(w),m)for(const A of m){if(A===vi)continue;const R=typeof A=="function"?A():document.querySelector(A);R&&R.scrollTo(w)}}}}finally{gl=!1}t.isScrollRestoring&&s.set(y=>(y[p]||={},y))}})}function Sv(t,n=String){const s=new URLSearchParams;for(const i in t){const l=t[i];l!==void 0&&s.set(i,n(l))}return s.toString()}function Ch(t){return t?t==="false"?!1:t==="true"?!0:+t*0===0&&+t+""===t?+t:t:""}function fw(t){const n=new URLSearchParams(t),s=Object.create(null);for(const[i,l]of n.entries()){const u=s[i];u==null?s[i]=Ch(l):Array.isArray(u)?u.push(Ch(l)):s[i]=[u,Ch(l)]}return s}var dw=gw(JSON.parse),pw=yw(JSON.stringify,JSON.parse);function gw(t){return n=>{n[0]==="?"&&(n=n.substring(1));const s=fw(n);for(const i in s){const l=s[i];if(typeof l=="string")try{s[i]=t(l)}catch{}}return s}}function yw(t,n){const s=typeof n=="function";function i(l){if(typeof l=="object"&&l!==null)try{return t(l)}catch{}else if(s&&typeof l=="string")try{return n(l),t(l)}catch{}return l}return l=>{const u=Sv(l,i);return u?`?${u}
10`:""}}var us="__root__";function bf(t){if(t.statusCode=t.statusCode||t.code||307,!t._builtLocation&&!t.reloadDocument&&typeof t.href=="string")try{new URL(t.href),t.reloadDocument=!0}catch{}const n=new Headers(t.headers);t.href&&n.get("Location")===null&&n.set("Location",t.href);const s=new Response(null,{status:t.statusCode,headers:n});if(s.options=t,t.throw)throw s;return s}function Mt(t){return t instanceof Response&&!!t.options}function mw(t){if(t!==null&&typeof t=="object"&&t.isSerializedRedirect)return bf(t)}function vw(t){return{input:({url:n})=>{for(const s of t)n=Vh(s,n);return n},output:({url:n})=>{for(let s=t.length-1;s>=0;s--)n=wv(t[s],n);return n}}}function bw(t){const n=_v(t.basepath),s=`/${n}`,i=`${s}/`,l=t.caseSensitive?s:s.toLowerCase(),u=t.caseSensitive?i:i.toLowerCase();return{input:({url:c})=>{const d=t.caseSensitive?c.pathname:c.pathname.toLowerCase();return d===l?c.pathname="/":d.startsWith(u)&&(c.pathname=c.pathname.slice(s.length)),c},output:({url:c})=>(c.pathname=Ol(["/",n,c.pathname]),c)}}function Vh(t,n){const s=t?.input?.({url:n});if(s){if(typeof s=="string")return new URL(s);if(s instanceof URL)return s}return n}function wv(t,n){const s=t?.output?.({url:n});if(s){if(typeof s=="string")return new URL(s);if(s instanceof URL)return s}return n}function _w(t,n){const{createMutableStore:s,createReadonlyStore:i,batch:l,init:u}=n,c=new Map,d=new Map,p=new Map,g=s(t.status),m=s(t.loadedAt),y=s(t.isLoading),b=s(t.isTransitioning),_=s(t.location),w=s(t.resolvedLocation),A=s(t.statusCode),R=s(t.redirect),O=s([]),U=s([]),j=s([]),L=i(()=>xh(c,O.get())),Q=i(()=>xh(d,U.get())),V=i(()=>xh(p,j.get())),q=i(()=>O.get()[0]),K=i(()=>O.get().some(F=>c.get(F)?.get().status==="pending")),J=i(()=>({locationHref:_.get().href,resolvedLocationHref:w.get()?.href,status:g.get()})),le=i(()=>({status:g.get(),loadedAt:m.get(),isLoading:y.get(),isTransitioning:b.get(),matches:L.get(),location:_.get(),resolvedLocation:w.get(),statusCode:A.get(),redirect:R.get()})),se=Mi(64);function me(F){let oe=se.get(F);return oe||(oe=i(()=>{const Re=O.get();for(const Oe of Re){const k=c.get(Oe);if(k&&k.routeId===F)return k.get()}}),se.set(F,oe)),oe}const Ce={status:g,loadedAt:m,isLoading:y,isTransitioning:b,location:_,resolvedLocation:w,statusCode:A,redirect:R,matchesId:O,pendingIds:U,cachedIds:j,matches:L,pendingMatches:Q,cachedMatches:V,firstId:q,hasPending:K,matchRouteDeps:J,matchStores:c,pendingMatchStores:d,cachedMatchStores:p,__store:le,getRouteMatchStore:me,setMatches:Ye,setPending:Be,setCached:B};Ye(t.matches),u?.(Ce);function Ye(F){kh(F,c,O,s,l)}function Be(F){kh(F,d,U,s,l)}function B(F){kh(F,p,j,s,l)}return Ce}function xh(t,n){const s=[];for(const i of n){const l=t.get(i);l&&s.push(l.get())}return s}function kh(t,n,s,i,l){const u=t.map(d=>d.id),c=new Set(u);l(()=>{for(const d of n.keys())c.has(d)||n.delete(d);for(const d of t){const p=n.get(d.id);if(!p){const g=i(d);g.routeId=d.routeId,n.set(d.id,g);continue}p.routeId=d.routeId,p.get()!==d&&p.set(d)}VS(s.get(),u)||s.set(u)})}var Kh=t=>{if(!t.rendered)return t.rendered=!0,t.onReady?.()},Sw=t=>t.stores.matchesId.get().some(n=>t.stores.matchStores.get(n)?.get()._forcePending),Fl=(t,n)=>!!(t.preload&&!t.router.stores.matchStores.has(n)),cs=(t,n,s=!0)=>{const i={...t.router.options.context??{}},l=s?n:n-1;for(let u=0;u<=l;u++){const c=t.matches[u];if(!c)continue;const d=t.router.getMatch(c.id);d&&Object.assign(i,d.__routeContext,d.__beforeLoadContext)}return i},Jy=(t,n)=>{if(!t.matches.length)return;const s=n.routeId,i=t.matches.findIndex(c=>c.routeId===t.router.routeTree.id),l=i>=0?i:0;let u=s?t.matches.findIndex(c=>c.routeId===s):t.firstBadMatchIndex??t.matches.length-1;u<0&&(u=l);for(let c=u;c>=0;c--){const d=t.matches[c];if(t.router.looseRoutesById[d.routeId].options.notFoundComponent)return c}return s?u:l},Cr=(t,n,s)=>{if(!(!Mt(s)&&!ut(s)))throw Mt(s)&&s.redirectHandled&&!s.options.reloadDocument||(n&&(n._nonReactive.beforeLoadPromise?.resolve(),n._nonReactive.loaderPromise?.resolve(),n._nonReactive.beforeLoadPromise=void 0,n._nonReactive.loaderPromise=void 0,n._nonReactive.error=s,t.updateMatch(n.id,i=>
10({...i,status:Mt(s)?"redirected":ut(s)?"notFound":i.status==="pending"?"success":i.status,context:cs(t,n.index),isFetching:!1,error:s})),ut(s)&&!s.routeId&&(s.routeId=n.routeId),n._nonReactive.loadPromise?.resolve()),Mt(s)&&(t.rendered=!0,s.options._fromLocation=t.location,s.redirectHandled=!0,s=t.router.resolveRedirect(s))),s},Ev=(t,n)=>{const s=t.router.getMatch(n);return!!(!s||s._nonReactive.dehydrated)},Xy=(t,n,s)=>{const i=cs(t,s);t.updateMatch(n,l=>({...l,context:i}))},bi=(t,n,s,i)=>{const{id:l,routeId:u}=t.matches[n],c=t.router.looseRoutesById[u];if(s instanceof Promise)throw s;s.routerCode=i,t.firstBadMatchIndex??=n,Cr(t,t.router.getMatch(l),s);try{c.options.onError?.(s)}catch(d){s=d,Cr(t,t.router.getMatch(l),s)}t.updateMatch(l,d=>(d._nonReactive.beforeLoadPromise?.resolve(),d._nonReactive.beforeLoadPromise=void 0,d._nonReactive.loadPromise?.resolve(),{...d,error:s,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController})),!t.preload&&!Mt(s)&&!ut(s)&&(t.serialError??=s)},Tv=(t,n,s,i)=>{if(i._nonReactive.pendingTimeout!==void 0)return;const l=s.options.pendingMs??t.router.options.defaultPendingMs;if(t.onReady&&!Fl(t,n)&&(s.options.loader||s.options.beforeLoad||Av(s))&&typeof l=="number"&&l!==1/0&&(s.options.pendingComponent??t.router.options?.defaultPendingComponent)){const u=setTimeout(()=>{Kh(t)},l);i._nonReactive.pendingTimeout=u}},ww=(t,n,s)=>{const i=t.router.getMatch(n);if(!i._nonReactive.beforeLoadPromise&&!i._nonReactive.loaderPromise)return;Tv(t,n,s,i);const l=()=>{const u=t.router.getMatch(n);u.preload&&(u.status==="redirected"||u.status==="notFound")&&Cr(t,u,u.error)};return i._nonReactive.beforeLoadPromise?i._nonReactive.beforeLoadPromise.then(l):l()},Ew=(t,n,s,i)=>{const l=t.router.getMatch(n);let u=l._nonReactive.loadPromise;l._nonReactive.loadPromise=hs(()=>{u?.resolve(),u=void 0});const{paramsError:c,searchError:d}=l;c&&bi(t,s,c,"PARSE_PARAMS"),d&&bi(t,s,d,"VALIDATE_SEARCH"),Tv(t,n,i,l);const p=new AbortController;let g=!1;const m=()=>{g||(g=!0,t.updateMatch(n,L=>({...L,isFetching:"beforeLoad",fetchCount:L.fetchCount+1,abortController:p})))},y=()=>{l._nonReactive.beforeLoadPromise?.resolve(),l._nonReactive.beforeLoadPromise=void 0,t.updateMatch(n,L=>({...L,isFetching:!1}))};if(!i.options.beforeLoad){t.router.batch(()=>{m(),y()});return}l._nonReactive.beforeLoadPromise=hs();const b={...cs(t,s,!1),...l.__routeContext},{search:_,params:w,cause:A}=l,R=Fl(t,n),O={search:_,abortController:p,params:w,preload:R,context:b,location:t.location,navigate:L=>t.router.navigate({...L,_fromLocation:t.location}),buildLocation:t.router.buildLocation,cause:R?"preload":A,matches:t.matches,routeId:i.id,...t.router.options.additionalContext},U=L=>{if(L===void 0){t.router.batch(()=>{m(),y()});return}(Mt(L)||ut(L))&&(m(),bi(t,s,L,"BEFORE_LOAD")),t.router.batch(()=>{m(),t.updateMatch(n,Q=>({...Q,__beforeLoadContext:L})),y()})};let j;try{if(j=i.options.beforeLoad(O),ji(j))return m(),j.catch(L=>{bi(t,s,L,"BEFORE_LOAD")}).then(U)}catch(L){m(),bi(t,s,L,"BEFORE_LOAD")}U(j)},Tw=(t,n)=>{const{id:s,routeId:i}=t.matches[n],l=t.router.looseRoutesById[i],u=()=>d(),c=()=>Ew(t,s,n,l),d=()=>{if(Ev(t,s))return;const p=ww(t,s,l);return ji(p)?p.then(c):c()};return u()},Rw=(t,n,s)=>{const i=t.router.getMatch(n);if(!i||!s.options.head&&!s.options.scripts&&!s.options.headers)return;const l={ssr:t.router.options.ssr,matches:t.matches,match:i,params:i.params,loaderData:i.loaderData};return Promise.all([s.options.head?.(l),s.options.scripts?.(l),s.options.headers?.(l)]).then(([u,c,d])=>({meta:u?.meta,links:u?.links,headScripts:u?.scripts,headers:d,scripts:c,styles:u?.styles}))},Rv=(t,n,s,i,l)=>{const u=n[i-1],{params:c,loaderDeps:d,abortController:p,cause:g}=t.router.getMatch(s),m=cs(t,i),y=Fl(t,s);return{params:c,deps:d,preload:!!y,parentMatchPromise:u,abortController:p,context:m,location:t.location,navigate:b=>t.router.navigate({...b,_fromLocation:t.location}),cause:y?"preload":g,route:l,...t.router.options.additionalContext}},Zy=async(t,n,s,i,l)=>{try{const u=t.router.getMatch(s);try{(!(yv??t.router.isServer)||u.ssr===!0)&&Ui(l);const c=l.options.loader,d=typeof c=="function"?c:c?.handler,p=d?.(Rv(t,n,s,i,l)),g=!!d&&ji(p);if((g||l._lazyPromise||l._componentsPromise||l.options.head||l.options.scripts||l.options.headers||u._nonReactive.minPendingPromise)&&t.updateMatch(s,y=>({...y,isFetching:"loader"})),d){const y=g?await p:p;Cr(t,t.router.getMatch(s),y),y!==void 0&&t.updateMatch(s,b=>({...b,loaderData:y}))}l._lazyPromise&&await l._lazyPromise;const m=u._nonReactive.minPendingPromise;m&&await m,l._componentsPromise&&await l._componentsPromise,t.updateMatch(s,y=>({...y,error:void 0,context:cs(t,i),status:"success",isFetching:!1,updatedAt:Date.now()}))}catch(c){let d=c;if(d?.name==="AbortError"){if(u.abortController.signal.aborted){u._nonReactive.loaderPromise?.resolve(),u._nonReactive.loaderPromise=void 0;return}t.updateMatch(s,g=>({...g,status:g.status==="pending"?"success":g.status,isFetching:!1,context:cs(t,i)}
10));return}const p=u._nonReactive.minPendingPromise;p&&await p,ut(c)&&await l.options.notFoundComponent?.preload?.(),Cr(t,t.router.getMatch(s),c);try{l.options.onError?.(c)}catch(g){d=g,Cr(t,t.router.getMatch(s),g)}!Mt(d)&&!ut(d)&&await Ui(l,["errorComponent"]),t.updateMatch(s,g=>({...g,error:d,context:cs(t,i),status:"error",isFetching:!1}))}}catch(u){const c=t.router.getMatch(s);c&&(c._nonReactive.loaderPromise=void 0),Cr(t,c,u)}},Aw=async(t,n,s)=>{async function i(_,w,A,R,O){const U=Date.now()-w.updatedAt,j=_?O.options.preloadStaleTime??t.router.options.defaultPreloadStaleTime??3e4:O.options.staleTime??t.router.options.defaultStaleTime??0,L=O.options.shouldReload,Q=typeof L=="function"?L(Rv(t,n,l,s,O)):L,{status:V,invalid:q}=R,K=U>=j&&(!!t.forceStaleReload||R.cause==="enter"||A!==void 0&&A!==R.id);c=V==="success"&&(q||(Q??K)),_&&O.options.preload===!1||(c&&!t.sync&&m?(d=!0,(async()=>{try{await Zy(t,n,l,s,O);const J=t.router.getMatch(l);J._nonReactive.loaderPromise?.resolve(),J._nonReactive.loadPromise?.resolve(),J._nonReactive.loaderPromise=void 0,J._nonReactive.loadPromise=void 0}catch(J){Mt(J)&&await t.router.navigate(J.options)}})()):V!=="success"||c?await Zy(t,n,l,s,O):Xy(t,l,s))}const{id:l,routeId:u}=t.matches[s];let c=!1,d=!1;const p=t.router.looseRoutesById[u],g=p.options.loader,m=((typeof g=="function"?void 0:g?.staleReloadMode)??t.router.options.defaultStaleReloadMode)!=="blocking";if(Ev(t,l)){if(!t.router.getMatch(l))return t.matches[s];Xy(t,l,s)}else{const _=t.router.getMatch(l),w=t.router.stores.matchesId.get()[s],A=(w&&t.router.stores.matchStores.get(w)||null)?.routeId===u?w:t.router.stores.matches.get().find(O=>O.routeId===u)?.id,R=Fl(t,l);if(_._nonReactive.loaderPromise){if(_.status==="success"&&!t.sync&&!_.preload&&m)return _;await _._nonReactive.loaderPromise;const O=t.router.getMatch(l),U=O._nonReactive.error||O.error;U&&Cr(t,O,U),O.status==="pending"&&await i(R,_,A,O,p)}else{const O=R&&!t.router.stores.matchStores.has(l),U=t.router.getMatch(l);U._nonReactive.loaderPromise=hs(),O!==U.preload&&t.updateMatch(l,j=>({...j,preload:O})),await i(R,_,A,U,p)}}const y=t.router.getMatch(l);d||(y._nonReactive.loaderPromise?.resolve(),y._nonReactive.loadPromise?.resolve(),y._nonReactive.loadPromise=void 0),clearTimeout(y._nonReactive.pendingTimeout),y._nonReactive.pendingTimeout=void 0,d||(y._nonReactive.loaderPromise=void 0),y._nonReactive.dehydrated=void 0;const b=d?y.isFetching:!1;return b!==y.isFetching||y.invalid!==!1?(t.updateMatch(l,_=>({..._,isFetching:b,invalid:!1})),t.router.getMatch(l)):y};async function Wy(t){const n=t,s=[];Sw(n.router)&&Kh(n);let i;for(let b=0;b<n.matches.length;b++){try{const _=Tw(n,b);ji(_)&&await _}catch(_){if(Mt(_))throw _;if(ut(_))i=_;else if(!n.preload)throw _;break}if(n.serialError||n.firstBadMatchIndex!=null)break}const l=n.firstBadMatchIndex??n.matches.length,u=i&&!n.preload?Jy(n,i):void 0,c=i&&n.preload?0:u!==void 0?Math.min(u+1,l):l;let d,p;for(let b=0;b<c;b++)s.push(Aw(n,s,b));try{await Promise.all(s)}catch{const b=await Promise.allSettled(s);for(const _ of b){if(_.status!=="rejected")continue;const w=_.reason;if(Mt(w))throw w;ut(w)?d??=w:p??=w}if(p!==void 0)throw p}const g=d??(i&&!n.preload?i:void 0);let m=n.firstBadMatchIndex!==void 0?n.firstBadMatchIndex:n.matches.length-1;if(!g&&i&&n.preload)return n.matches;if(g){const b=Jy(n,g);b===void 0&&Ut();const _=n.matches[b],w=n.router.looseRoutesById[_.routeId],A=n.router.options?.defaultNotFoundComponent;!w.options.notFoundComponent&&A&&(w.options.notFoundComponent=A),g.routeId=_.routeId;const R=_.routeId===n.router.routeTree.id;n.updateMatch(_.id,O=>({...O,...R?{status:"success",globalNotFound:!0,error:void 0}:{status:"notFound",error:g},isFetching:!1})),m=b,await Ui(w,["notFoundComponent"])}else if(!n.preload){const b=n.matches[0];b.globalNotFound||n.router.getMatch(b.id)?.globalNotFound&&n.updateMatch(b.id,_=>({..._,globalNotFound:!1,error:void 0}))}if(n.serialError&&n.firstBadMatchIndex!==void 0){const b=n.router.looseRoutesById[n.matches[n.firstBadMatchIndex].routeId];await Ui(b,["errorComponent"])}for(let b=0;b<=m;b++){const{id:_,routeId:w}=n.matches[b],A=n.router.looseRoutesById[w];try{const R=Rw(n,_,A);if(R){const O=await R;n.updateMatch(_,U=>({...U,...O}))}}catch(R){console.error(`Error executing head for route ${w}:`,R)}}const y=Kh(n);if(ji(y)&&await y,g)throw g;
10if(n.serialError&&!n.preload&&!n.onReady)throw n.serialError;return n.matches}function em(t,n){const s=n.map(i=>t.options[i]?.preload?.()).filter(Boolean);if(s.length!==0)return Promise.all(s)}function Ui(t,n=Cl){!t._lazyLoaded&&t._lazyPromise===void 0&&(t.lazyFn?t._lazyPromise=t.lazyFn().then(i=>{const{id:l,...u}=i.options;Object.assign(t.options,u),t._lazyLoaded=!0,t._lazyPromise=void 0}):t._lazyLoaded=!0);const s=()=>t._componentsLoaded?void 0:n===Cl?(()=>{if(t._componentsPromise===void 0){const i=em(t,Cl);i?t._componentsPromise=i.then(()=>{t._componentsLoaded=!0,t._componentsPromise=void 0}):t._componentsLoaded=!0}return t._componentsPromise})():em(t,n);return t._lazyPromise?t._lazyPromise.then(s):s()}function Av(t){for(const n of Cl)if(t.options[n]?.preload)return!0;return!1}var Cl=["component","errorComponent","pendingComponent","notFoundComponent"],kr="__TSR_index",tm="popstate",nm="beforeunload";function Ow(t){let n=t.getLocation();const s=new Set,i=c=>{n=t.getLocation(),s.forEach(d=>d({location:n,action:c}))},l=c=>{t.notifyOnIndexChange??!0?i(c):n=t.getLocation()},u=async({task:c,navigateOpts:d,...p})=>{if(d?.ignoreBlocker??!1){c();return}const g=t.getBlockers?.()??[],m=p.type==="PUSH"||p.type==="REPLACE";if(typeof document<"u"&&g.length&&m)for(const y of g){const b=Dl(p.path,p.state);if(await y.blockerFn({currentLocation:n,nextLocation:b,action:p.type})){t.onBlocked?.();return}}c()};return{get location(){return n},get length(){return t.getLength()},subscribers:s,subscribe:c=>(s.add(c),()=>{s.delete(c)}),push:(c,d,p)=>{const g=n.state[kr];d=rm(g+1,d),u({task:()=>{t.pushState(c,d),i({type:"PUSH"})},navigateOpts:p,type:"PUSH",path:c,state:d})},replace:(c,d,p)=>{const g=n.state[kr];d=rm(g,d),u({task:()=>{t.replaceState(c,d),i({type:"REPLACE"})},navigateOpts:p,type:"REPLACE",path:c,state:d})},go:(c,d)=>{u({task:()=>{t.go(c),l({type:"GO",index:c})},navigateOpts:d,type:"GO"})},back:c=>{u({task:()=>{t.back(c?.ignoreBlocker??!1),l({type:"BACK"})},navigateOpts:c,type:"BACK"})},forward:c=>{u({task:()=>{t.forward(c?.ignoreBlocker??!1),l({type:"FORWARD"})},navigateOpts:c,type:"FORWARD"})},canGoBack:()=>n.state[kr]!==0,createHref:c=>t.createHref(c),block:c=>{if(!t.setBlockers)return()=>{};const d=t.getBlockers?.()??[];return t.setBlockers([...d,c]),()=>{const p=t.getBlockers?.()??[];t.setBlockers?.(p.filter(g=>g!==c))}},flush:()=>t.flush?.(),destroy:()=>t.destroy?.(),notify:i}}function rm(t,n){n||(n={});const s=_f();return{...n,key:s,__TSR_key:s,[kr]:t}}function Cw(t){const n=typeof document<"u"?window:void 0,s=n.history.pushState,i=n.history.replaceState;let l=[];const u=()=>l,c=K=>l=K,d=(K=>K),p=(()=>Dl(`${n.location.pathname}${n.location.search}${n.location.hash}`,n.history.state));if(!n.history.state?.__TSR_key&&!n.history.state?.key){const K=_f();n.history.replaceState({[kr]:0,key:K,__TSR_key:K},"")}let g=p(),m,y=!1,b=!1,_=!1,w=!1;const A=()=>g;let R,O;const U=()=>{R&&(q._ignoreSubscribers=!0,(R.isPush?n.history.pushState:n.history.replaceState)(R.state,"",R.href),q._ignoreSubscribers=!1,R=void 0,O=void 0,m=void 0)},j=(K,J,le)=>{const se=d(J);O||(m=g),g=Dl(J,le),R={href:se,state:le,isPush:R?.isPush||K==="push"},O||(O=Promise.resolve().then(()=>U()))},L=K=>{g=p(),q.notify({type:K})},Q=async()=>{if(b){b=!1;return}const K=p(),J=K.state[kr]-g.state[kr],le=J===1,se=J===-1,me=!le&&!se||y;y=!1;const Ce=me?"GO":se?"BACK":"FORWARD",Ye=me?{type:"GO",index:J}:{type:se?"BACK":"FORWARD"};if(_)_=!1;else{const Be=u();if(typeof document<"u"&&Be.length){for(const B of Be)if(await B.blockerFn({currentLocation:g,nextLocation:K,action:Ce})){b=!0,n.history.go(1),q.notify(Ye);return}}}g=p(),q.notify(Ye)},V=K=>{if(w){w=!1;return}let J=!1;const le=u();if(typeof document<"u"&&le.length)for(const se of le){const me=se.enableBeforeUnload??!0;if(me===!0){J=!0;break}if(typeof me=="function"&&me()===!0){J=!0;break}}if(J)return K.preventDefault(),K.returnValue=""},q=Ow({getLocation:A,getLength:()=>n.history.length,pushState:(K,J)=>j("push",K,J),replaceState:(K,J)=>j("replace",K,J),back:K=>(K&&(_=!0),w=!0,n.history.back()),forward:K=>{K&&(_=!0),w=!0,n.history.forward()},go:K=>{y=!0,n.history.go(K)},createHref:K=>d(K),flush:U,destroy:()=>{n.history.pushState=s,n.history.replaceState=i,n.removeEventListener(nm,V,{capture:!0}),n.removeEventListener(tm,Q)},onBlocked:()=>{m&&g!==m&&(g=m)},getBlockers:u,setBlockers:c,notifyOnIndexChange:!1});return n.addEventListener(nm,V,{capture:!0}),n.addEventListener(tm,Q),n.history.pushState=function(...K){const J=s.apply(n.history,K);return q._ignoreSubscribers||L("PUSH"),J},n.history.replaceState=function(...K){const J=i.apply(n.history,K);return q._ignoreSubscribers||L("REPLACE"),J},q}function xw(t){let n=t.replace(/[\x00-\x1f\x7f]/g,"");return n.startsWith("//")&&(n="/"+n.replace(/^\/+/,"")),n}function Dl(t,n){const s=xw(t),i=s.indexOf("#"),l=s.indexOf("?"),u=_f();return{href:s,pathname:s.substring(0,i>0?l>0?Math.min(i,l):i:l>0?l:s.length),hash:i>-1?s.substring(i):"",search:l>-1?s.slice(l,i===-1?void 0:i):"",state:n||{[kr]:0,key:u,__TSR_key:u}}}function _f(){return(Math.random()+1).toString(36).substring(7)}function kw(t){return t instanceof Error?{name:t.name,message:t.message}:{data:t}}function da(t,n){const s=n,i=t;return{fromLocation:s,toLocation:i,pathChanged:s?.pathname!==i.pathname,hrefChanged:s?.href!==i.href,hashChanged:s?.hash!==i.hash}}var jw=class{constructor(t,n){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this.resetNextScroll=!0,this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.isScrollRestoring=!1,this.isScrollRestorationSetup=!1,this.startTransition=s=>s(),this.update=s=>{const i=this.options,l=this.basepath??i?.basepath??"/",u=this.basepath===void 0,c=i?.rewrite;if(this.options={...i,...s},this.isServer=this.options.isServer??typeof document>"u",this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=aw(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=Cw()),this.origin=this.options.origin,this.origin||(window?.origin&&window.origin!=="null"?this.origin=window.origin:this.origin="http://localhost"),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree){this.routeTree=this.options.routeTree;let m;this.resolvePathCache=Mi(1e3),m=this.buildRouteTree(),this.setRoutes(m)}if(!this.stores&&this.latestLocation){const m=this.getStoreConfig(this);this.batch=m.batch,this.stores=_w(Uw(this.latestLocation),m),hw(this)}let d=!1;const p=this.options.basepath??"/",g=this.options.rewrite;if(u||l!==p||c!==g){this.basepath=p;const m=[],y=_v(p);y&&y!=="/"&&m.push(bw({basepath:p})),g&&m.push(g),this.rewrite=m.length===0?void 0:m.length===1?m[0]:vw(m),this.history&&this.updateLatestLocation(),d=!0}d&&this.stores&&this.stores.location.set(this.latestLocation),typeof window<"u"&&"CSS"in window&&typeof window.CSS?.supports=="function"&&(this.isViewTransitionTypesSupported=window.CSS.supports("selector(:active-view-transition-type(a)"))},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{const s=ZS(this.routeTree,this.options.caseSensitive,(i,l)=>{i.init({originalIndex:l})});return this.options.routeMasks&&YS(this.options.routeMasks,s.processedTree),s},this.subscribe=(s,i)=>{const l={eventType:s,fn:i};return this.subscribers.add(l),()=>{this.subscribers.delete(l)}},this.emit=s=>
10{this.subscribers.forEach(i=>{i.eventType===s.type&&i.fn(s)})},this.parseLocation=(s,i)=>{const l=({pathname:p,search:g,hash:m,href:y,state:b})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(p)){const O=this.options.parseSearch(g),U=this.options.stringifySearch(O);return{href:p+U+m,publicHref:p+U+m,pathname:mi(p).path,external:!1,searchStr:U,search:es(i?.search,O),hash:mi(m.slice(1)).path,state:ss(i?.state,b)}}const _=new URL(y,this.origin),w=Vh(this.rewrite,_),A=this.options.parseSearch(w.search),R=this.options.stringifySearch(A);return w.search=R,{href:w.href.replace(w.origin,""),publicHref:y,pathname:mi(w.pathname).path,external:!!this.rewrite&&w.origin!==this.origin,searchStr:R,search:es(i?.search,A),hash:mi(w.hash.slice(1)).path,state:ss(i?.state,b)}},u=l(s),{__tempLocation:c,__tempKey:d}=u.state;if(c&&(!d||d===this.tempLocationKey)){const p=l(c);return p.state.key=u.state.key,p.state.__TSR_key=u.state.__TSR_key,delete p.state.__tempLocation,{...p,maskedLocation:u}}return u},this.resolvePathWithBase=(s,i)=>sw({base:s,to:vf(i),trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(s,i,l)=>typeof s=="string"?this.matchRoutesInternal({pathname:s,search:i},l):this.matchRoutesInternal(s,i),this.getMatchedRoutes=s=>Nw({pathname:s,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=s=>{const i=this.getMatch(s);i&&(i.abortController.abort(),clearTimeout(i._nonReactive.pendingTimeout),i._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{this.stores.pendingIds.get().forEach(s=>{this.cancelMatch(s)}),this.stores.matchesId.get().forEach(s=>{if(this.stores.pendingMatchStores.has(s))return;const i=this.stores.matchStores.get(s)?.get();i&&(i.status==="pending"||i.isFetching==="loader")&&this.cancelMatch(s)})},this.buildLocation=s=>{const i=(u={})=>{const c=u._fromLocation||this.pendingBuiltLocation||this.latestLocation,d=this.matchRoutesLightweight(c);u.from;const p=u.unsafeRelative==="path"?c.pathname:u.from??d.fullPath,g=this.resolvePathWithBase(p,"."),m=d.search,y=Object.assign(Object.create(null),d.params),b=u.to?this.resolvePathWithBase(g,`${u.to}`):this.resolvePathWithBase(g,"."),_=u.params===!1||u.params===null?Object.create(null):(u.params??!0)===!0?y:Object.assign(y,Ar(u.params,y)),w=this.getMatchedRoutes(b);let A=w.matchedRoutes;if((!w.foundRoute||w.foundRoute.path!=="/"&&w.routeParams["**"])&&this.options.notFoundRoute&&(A=[...A,this.options.notFoundRoute]),Object.keys(_).length>0)for(const le of A){const se=le.options.params?.stringify??le.options.stringifyParams;if(se)try{Object.assign(_,se(_))}catch{}}const R=s.leaveParams?b:mi(Ky({path:b,params:_,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path;let O=m;if(s._includeValidateSearch&&this.options.search?.strict){const le={};A.forEach(se=>{if(se.options.validateSearch)try{Object.assign(le,xl(se.options.validateSearch,{...le,...O}))}catch{}}),O=le}O=Dw({search:O,dest:u,destRoutes:A,_includeValidateSearch:s._includeValidateSearch}),O=es(m,O);const U=this.options.stringifySearch(O),j=u.hash===!0?c.hash:u.hash?Ar(u.hash,c.hash):void 0,L=j?`#${j}`:"";let Q=u.state===!0?c.state:u.state?Ar(u.state,c.state):{};Q=ss(c.state,Q);const V=`${R}${U}${L}`;let q,K,J=!1;if(this.rewrite){const le=new URL(V,this.origin),se=wv(this.rewrite,le);q=le.href.replace(le.origin,""),se.origin!==this.origin?(K=se.href,J=!0):K=se.pathname+se.search+se.hash}else q=GS(V),K=q;return{publicHref:K,href:q,pathname:R,search:O,searchStr:U,state:Q,hash:j??"",external:J,unmaskOnReload:u.unmaskOnReload}},l=(u={},c)=>{const d=i(u);let p=c?i(c):void 0;if(!p){const g=Object.create(null);if(this.options.routeMasks){const m=FS(d.pathname,this.processedTree);if(m){Object.assign(g,m.rawParams);const{from:y,params:b,..._}=m.route,w=b===!1||b===null?Object.create(null):(b??!0)===!0?g:Object.assign(g,Ar(b,g));c={from:s.from,..._,params:w},p=i(c)}}}return p&&(d.maskedLocation=p),d};return s.mask?l(s,{from:s.from,...s.mask}):l(s)},this.commitLocation=async({viewTransition:s,ignoreBlocker:i,...l})=>{const u=()=>{const p=["key","__TSR_key","__TSR_index","__hashScrollIntoViewOptions"];p.forEach(m=>{l.state[m]=this.latestLocation.state[m]}
10);const g=jt(l.state,this.latestLocation.state);return p.forEach(m=>{delete l.state[m]}),g},c=xr(this.latestLocation.href)===xr(l.href);let d=this.commitLocationPromise;if(this.commitLocationPromise=hs(()=>{d?.resolve(),d=void 0}),c&&u())this.load();else{let{maskedLocation:p,hashScrollIntoView:g,...m}=l;p&&(m={...p,state:{...p.state,__tempKey:void 0,__tempLocation:{...m,search:m.searchStr,state:{...m.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(m.unmaskOnReload??this.options.unmaskOnReload??!1)&&(m.state.__tempKey=this.tempLocationKey)),m.state.__hashScrollIntoViewOptions=g??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=s,this.history[l.replace?"replace":"push"](m.publicHref,m.state,{ignoreBlocker:i})}return this.resetNextScroll=l.resetScroll??!0,this.history.subscribers.size||this.load(),this.commitLocationPromise},this.buildAndCommitLocation=({replace:s,resetScroll:i,hashScrollIntoView:l,viewTransition:u,ignoreBlocker:c,href:d,...p}={})=>{if(d){const y=this.history.location.state.__TSR_index,b=Dl(d,{__TSR_index:s?y:y+1}),_=new URL(b.pathname,this.origin);p.to=Vh(this.rewrite,_).pathname,p.search=this.options.parseSearch(b.search),p.hash=b.hash.slice(1)}const g=this.buildLocation({...p,_includeValidateSearch:!0});this.pendingBuiltLocation=g;const m=this.commitLocation({...g,viewTransition:u,replace:s,resetScroll:i,hashScrollIntoView:l,ignoreBlocker:c});return Promise.resolve().then(()=>{this.pendingBuiltLocation===g&&(this.pendingBuiltLocation=void 0)}),m},this.navigate=async({to:s,reloadDocument:i,href:l,publicHref:u,...c})=>{let d=!1;if(l)try{new URL(`${l}`),d=!0}catch{}if(d&&!i&&(i=!0),i){if(s!==void 0||!l){const g=this.buildLocation({to:s,...c});l=l??g.publicHref,u=u??g.publicHref}const p=!d&&u?u:l;if(Ul(p,this.protocolAllowlist))return Promise.resolve();if(!c.ignoreBlocker){const g=this.history.getBlockers?.()??[];for(const m of g)if(m?.blockerFn&&await m.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return Promise.resolve()}return c.replace?window.location.replace(p):window.location.href=p,Promise.resolve()}return this.buildAndCommitLocation({...c,href:l,to:s,_isNavigate:!0})},this.beforeLoad=()=>{this.cancelMatches(),this.updateLatestLocation();const s=this.matchRoutes(this.latestLocation),i=this.stores.cachedMatches.get().filter(l=>!s.some(u=>u.id===l.id));this.batch(()=>{this.stores.status.set("pending"),this.stores.statusCode.set(200),this.stores.isLoading.set(!0),this.stores.location.set(this.latestLocation),this.stores.setPending(s),this.stores.setCached(i)})},this.load=async s=>{let i,l,u;const c=this.stores.resolvedLocation.get()??this.stores.location.get();for(u=new Promise(p=>{this.startTransition(async()=>{try{this.beforeLoad();const g=this.latestLocation,m=da(g,this.stores.resolvedLocation.get());this.stores.redirect.get()||this.emit({type:"onBeforeNavigate",...m}),this.emit({type:"onBeforeLoad",...m}),await Wy({router:this,sync:s?.sync,forceStaleReload:c.href===g.href,matches:this.stores.pendingMatches.get(),location:g,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{let y=null,b=null,_=null,w=null;this.batch(()=>{const A=this.stores.pendingMatches.get(),R=A.length,O=this.stores.matches.get();y=R?O.filter(L=>!this.stores.pendingMatchStores.has(L.id)):null;const U=new Set;for(const L of this.stores.pendingMatchStores.values())L.routeId&&U.add(L.routeId);const j=new Set;for(const L of this.stores.matchStores.values())L.routeId&&j.add(L.routeId);b=R?O.filter(L=>!U.has(L.routeId)):null,_=R?A.filter(L=>!j.has(L.routeId)):null,w=R?A.filter(L=>j.has(L.routeId)):O,this.stores.isLoading.set(!1),this.stores.loadedAt.set(Date.now()),R&&(this.stores.setMatches(A),this.stores.setPending([]),this.stores.setCached([...this.stores.cachedMatches.get(),...y.filter(L=>L.status!=="error"&&L.status!=="notFound"&&L.status!=="redirected")]),this.clearExpiredCache())});for(const[A,R]of[[b,"onLeave"],[_,"onEnter"],[w,"onStay"]])if(A)for(const O of A)this.looseRoutesById[O.routeId].options[R]?.(O)})})}})}catch(g){Mt(g)?(i=g,this.navigate({...i.options,replace:!0,ignoreBlocker:!0})):ut(g)&&(l=g);const m=i?i.status:l?404:this.stores.matches.get().some(y=>y.status==="error")?500:200;this.batch(()=>{this.stores.statusCode.set(m),this.stores.redirect.set(i)})}this.latestLoadPromise===u&&(this.commitLocationPromise?.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),p()})}),this.latestLoadPromise=u,await u;this.latestLoadPromise&&u!==this.latestLoadPromise;)await this.latestLoadPromise;let d;this.hasNotFoundMatch()?d=404:this.stores.matches.get().some(p=>p.status==="error")&&(d=500),d!==void 0&&this.stores.statusCode.set(d)},this.startViewTransition=s=>{const i=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,i&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let l;if(typeof i=="object"&&this.isViewTransitionTypesSupported){const u=this.latestLocation,c=this.stores.resolvedLocation.get(),d=typeof i.types=="function"?i.types(da(u,c)):i.types;if(d===!1){s();return}l={update:s,types:d}}else l=s;document.startViewTransition(l)}else s()},this.updateMatch=(s,i)=>{this.startTransition(()=>
10{const l=this.stores.pendingMatchStores.get(s);if(l){l.set(i);return}const u=this.stores.matchStores.get(s);if(u){u.set(i);return}const c=this.stores.cachedMatchStores.get(s);if(c){const d=i(c.get());d.status==="redirected"?this.stores.cachedMatchStores.delete(s)&&this.stores.cachedIds.set(p=>p.filter(g=>g!==s)):c.set(d)}})},this.getMatch=s=>this.stores.cachedMatchStores.get(s)?.get()??this.stores.pendingMatchStores.get(s)?.get()??this.stores.matchStores.get(s)?.get(),this.invalidate=s=>{const i=l=>s?.filter?.(l)??!0?{...l,invalid:!0,...s?.forcePending||l.status==="error"||l.status==="notFound"?{status:"pending",error:void 0}:void 0}:l;return this.batch(()=>{this.stores.setMatches(this.stores.matches.get().map(i)),this.stores.setCached(this.stores.cachedMatches.get().map(i)),this.stores.setPending(this.stores.pendingMatches.get().map(i))}),this.shouldViewTransition=!1,this.load({sync:s?.sync})},this.getParsedLocationHref=s=>s.publicHref||"/",this.resolveRedirect=s=>{const i=s.headers.get("Location");if(!s.options.href||s.options._builtLocation){const l=s.options._builtLocation??this.buildLocation(s.options),u=this.getParsedLocationHref(l);s.options.href=u,s.headers.set("Location",u)}else if(i)try{const l=new URL(i);if(this.origin&&l.origin===this.origin){const u=l.pathname+l.search+l.hash;s.options.href=u,s.headers.set("Location",u)}}catch{}if(s.options.href&&!s.options._builtLocation&&Ul(s.options.href,this.protocolAllowlist))throw new Error("Redirect blocked: unsafe protocol");return s.headers.get("Location")||s.headers.set("Location",s.options.href),s},this.clearCache=s=>{const i=s?.filter;i!==void 0?this.stores.setCached(this.stores.cachedMatches.get().filter(l=>!i(l))):this.stores.setCached([])},this.clearExpiredCache=()=>{const s=Date.now(),i=l=>{const u=this.looseRoutesById[l.routeId];if(!u.options.loader)return!0;const c=(l.preload?u.options.preloadGcTime??this.options.defaultPreloadGcTime:u.options.gcTime??this.options.defaultGcTime)??300*1e3;return l.status==="error"?!0:s-l.updatedAt>=c};this.clearCache({filter:i})},this.loadRouteChunk=Ui,this.preloadRoute=async s=>{const i=s._builtLocation??this.buildLocation(s);let l=this.matchRoutes(i,{throwOnError:!0,preload:!0,dest:s});const u=new Set([...this.stores.matchesId.get(),...this.stores.pendingIds.get()]),c=new Set([...u,...this.stores.cachedIds.get()]),d=l.filter(p=>!c.has(p.id));if(d.length){const p=this.stores.cachedMatches.get();this.stores.setCached([...p,...d])}try{return l=await Wy({router:this,matches:l,location:i,preload:!0,updateMatch:(p,g)=>{u.has(p)?l=l.map(m=>m.id===p?g(m):m):this.updateMatch(p,g)}}),l}catch(p){if(Mt(p))return p.options.reloadDocument?void 0:await this.preloadRoute({...p.options,_fromLocation:i});ut(p)||console.error(p);return}},this.matchRoute=(s,i)=>{const l={...s,to:s.to?this.resolvePathWithBase(s.from||"",s.to):void 0,params:s.params||{},leaveParams:!0},u=this.buildLocation(l);if(i?.pending&&this.stores.status.get()!=="pending")return!1;const c=(i?.pending===void 0?!this.stores.isLoading.get():i.pending)?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),d=QS(u.pathname,i?.caseSensitive??!1,i?.fuzzy??!1,c.pathname,this.processedTree);return!d||s.params&&!jt(d.rawParams,s.params,{partial:!0})?!1:i?.includeSearch??!0?jt(c.search,u.search,{partial:!0})?d.rawParams:!1:d.rawParams},this.hasNotFoundMatch=()=>this.stores.matches.get().some(s=>s.status==="notFound"||s.globalNotFound),this.getStoreConfig=n,this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...t,caseSensitive:t.caseSensitive??!1,notFoundMode:t.notFoundMode??"fuzzy",stringifySearch:t.stringifySearch??pw,parseSearch:t.parseSearch??dw,protocolAllowlist:t.protocolAllowlist??HS}),typeof document<"u"&&(self.__TSR_ROUTER__=this)}isShell(){return!!this.options.isShell}isPrerendering(){return!!this.options.isPrerendering}get state(){return this.stores.__store.get()}setRoutes({routesById:t,routesByPath:n,processedTree:s}){this.routesById=t,this.routesByPath=n,this.processedTree=s;const i=this.options.notFoundRoute;i&&(i.init({originalIndex:99999999999}),this.routesById[i.id]=i)}get looseRoutesById(){return this.routesById}getParentContext(t){return t?.id?t.context??this.options.context??void 0:this.options.context??void 0}matchRoutesInternal(t,n){const s=this.getMatchedRoutes(t.pathname),{foundRoute:i,routeParam
10s:l,parsedParams:u}=s;let{matchedRoutes:c}=s,d=!1;(i?i.path!=="/"&&l["**"]:xr(t.pathname))&&(this.options.notFoundRoute?c=[...c,this.options.notFoundRoute]:d=!0);const p=d?zw(this.options.notFoundMode,c):void 0,g=new Array(c.length),m=new Map;for(const y of this.stores.matchStores.values())y.routeId&&m.set(y.routeId,y.get());for(let y=0;y<c.length;y++){const b=c[y],_=g[y-1];let w,A,R;{const Ce=_?.search??t.search,Ye=_?._strictSearch??void 0;try{const Be=xl(b.options.validateSearch,{...Ce})??void 0;w={...Ce,...Be},A={...Ye,...Be},R=void 0}catch(Be){let B=Be;if(Be instanceof Ll||(B=new Ll(Be.message,{cause:Be})),n?.throwOnError)throw B;w=Ce,A={},R=B}}const O=b.options.loaderDeps?.({search:w})??"",U=O?JSON.stringify(O):"",{interpolatedPath:j,usedParams:L}=Ky({path:b.fullPath,params:l,decoder:this.pathParamsDecoder,server:this.isServer}),Q=b.id+j+U,V=this.getMatch(Q),q=m.get(b.id),K=V?._strictParams??L;let J;if(!V)try{sm(b,L,u,K)}catch(Ce){if(ut(Ce)||Mt(Ce)?J=Ce:J=new Mw(Ce.message,{cause:Ce}),n?.throwOnError)throw J}Object.assign(l,K);const le=q?"stay":"enter";let se;if(V)se={...V,cause:le,params:q?.params??l,_strictParams:K,search:es(q?q.search:V.search,w),_strictSearch:A};else{const Ce=b.options.loader||b.options.beforeLoad||b.lazyFn||Av(b)?"pending":"success";se={id:Q,ssr:b.options.ssr,index:y,routeId:b.id,params:q?.params??l,_strictParams:K,pathname:j,updatedAt:Date.now(),search:q?es(q.search,w):w,_strictSearch:A,searchError:void 0,status:Ce,isFetching:!1,error:void 0,paramsError:J,__routeContext:void 0,_nonReactive:{loadPromise:hs()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:le,loaderDeps:q?ss(q.loaderDeps,O):O,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:b.options.staticData||{},fullPath:b.fullPath}}n?.preload||(se.globalNotFound=p===b.id),se.searchError=R;const me=this.getParentContext(_);se.context={...me,...se.__routeContext,...se.__beforeLoadContext},g[y]=se}for(let y=0;y<g.length;y++){const b=g[y],_=this.looseRoutesById[b.routeId],w=this.getMatch(b.id),A=m.get(b.routeId);if(b.params=A?es(A.params,l):l,!w){const R=g[y-1],O=this.getParentContext(R);if(_.options.context){const U={deps:b.loaderDeps,params:b.params,context:O??{},location:t,navigate:j=>this.navigate({...j,_fromLocation:t}),buildLocation:this.buildLocation,cause:b.cause,abortController:b.abortController,preload:!!b.preload,matches:g,routeId:_.id};b.__routeContext=_.options.context(U)??void 0}b.context={...O,...b.__routeContext,...b.__beforeLoadContext}}}return g}matchRoutesLightweight(t){const{matchedRoutes:n,routeParams:s,parsedParams:i}=this.getMatchedRoutes(t.pathname),l=ki(n),u={...t.search};for(const m of n)try{Object.assign(u,xl(m.options.validateSearch,u))}catch{}const c=ki(this.stores.matchesId.get()),d=c&&this.stores.matchStores.get(c)?.get(),p=d&&d.routeId===l.id&&d.pathname===t.pathname;let g;if(p)g=d.params;else{const m=Object.assign(Object.create(null),s);for(const y of n)try{sm(y,s,i??{},m)}catch{}g=m}return{matchedRoutes:n,fullPath:l.fullPath,search:u,params:g}}},Ll=class extends Error{},Mw=class extends Error{};function Uw(t){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:t,matches:[],statusCode:200}}function xl(t,n){if(t==null)return{};if("~standard"in t){const s=t["~standard"].validate(n);if(s instanceof Promise)throw new Ll("Async validation not supported");if(s.issues)throw new Ll(JSON.stringify(s.issues,void 0,2),{cause:s});return s.value}return"parse"in t?t.parse(n):typeof t=="function"?t(n):{}}function Nw({pathname:t,routesById:n,processedTree:s}){const i=Object.create(null),l=xr(t);let u,c;const d=JS(l,s,!0);return d&&(u=d.route,Object.assign(i,d.rawParams),c=Object.assign(Object.create(null),d.parsedParams)),{matchedRoutes:d?.branch||[n.__root__],routeParams:i,foundRoute:u,parsedParams:c}}function Dw({search:t,dest:n,destRoutes:s,_includeValidateSearch:i}){return Lw(s)(t,n,i??!1)}function Lw(t){const n={dest:null,_includeValidateSearch:!1,middlewares:[]};for(const l of t){if("search"in l.options)l.options.search?.middlewares&&n.middlewares.push(...l.options.search.middlewares);else if(l.options.preSearchFilters||l.options.postSearchFilters){const u=({search:c,next:d})=>{let p=c;
10"preSearchFilters"in l.options&&l.options.preSearchFilters&&(p=l.options.preSearchFilters.reduce((m,y)=>y(m),c));const g=d(p);return"postSearchFilters"in l.options&&l.options.postSearchFilters?l.options.postSearchFilters.reduce((m,y)=>y(m),g):g};n.middlewares.push(u)}if(l.options.validateSearch){const u=({search:c,next:d})=>{const p=d(c);if(!n._includeValidateSearch)return p;try{return{...p,...xl(l.options.validateSearch,p)??void 0}}catch{return p}};n.middlewares.push(u)}}const s=({search:l})=>{const u=n.dest;return u.search?u.search===!0?l:Ar(u.search,l):{}};n.middlewares.push(s);const i=(l,u,c)=>{if(l>=c.length)return u;const d=c[l];return d({search:u,next:g=>i(l+1,g,c)})};return function(u,c,d){return n.dest=c,n._includeValidateSearch=d,i(0,u,n.middlewares)}}function zw(t,n){if(t!=="root")for(let s=n.length-1;s>=0;s--){const i=n[s];if(i.children)return i.id}return us}function sm(t,n,s,i){const l=t.options.params?.parse??t.options.parseParams;if(l)if(t.options.skipRouteOnParseError)for(const u in n)u in s&&(i[u]=s[u]);else{const u=l(i);Object.assign(i,u)}}var bn=Symbol.for("TSR_DEFERRED_PROMISE");function Pw(t,n){const s=t;return s[bn]||(s[bn]={status:"pending"},s.then(i=>{s[bn].status="success",s[bn].data=i}).catch(i=>{s[bn].status="error",s[bn].error={data:kw(i),__isServerError:!0}})),s}var Bw="Error preloading route! âï¸";function am(t,n){if(t)return typeof t=="string"?t:t[n]}function Hw(t){return typeof t=="string"?{href:t,crossOrigin:void 0}:t}function qw(t){if(t.tag!=="link")return;const n=t.attrs?.rel,s=t.attrs?.href;if(typeof s=="string"&&(typeof n=="string"?n.split(/\s+/):[]).includes("stylesheet"))return s}function Iw(t,n){const s=qw(n);return!!s&&t?.inlineCss?.styles[s]!==void 0}var Ov=class{get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(t){if(this.init=n=>{this.originalIndex=n.originalIndex;const s=this.options,i=!s?.path&&!s?.id;this.parentRoute=this.options.getParentRoute?.(),i?this._path=us:this.parentRoute||Ut();let l=i?us:s?.path;l&&l!=="/"&&(l=bv(l));const u=s?.id||l;let c=i?us:Ol([this.parentRoute.id==="__root__"?"":this.parentRoute.id,u]);l==="__root__"&&(l="/"),c!=="__root__"&&(c=Ol(["/",c]));const d=c==="__root__"?"/":Ol([this.parentRoute.fullPath,l]);this._path=l,this._id=c,this._fullPath=d,this._to=xr(d)},this.addChildren=n=>this._addFileChildren(n),this._addFileChildren=n=>(Array.isArray(n)&&(this.children=n),typeof n=="object"&&n!==null&&(this.children=Object.values(n)),this),this._addFileTypes=()=>this,this.updateLoader=n=>(Object.assign(this.options,n),this),this.update=n=>(Object.assign(this.options,n),this),this.lazy=n=>(this.lazyFn=n,this),this.redirect=n=>bf({from:this.fullPath,...n}),this.options=t||{},this.isRoot=!t?.getParentRoute,t?.id&&t?.path)throw new Error("Route cannot have both an 'id' and a 'path' option.")}},$w=class extends Ov{constructor(t){super(t)}};function Gw(t){if(typeof document<"u"&&document.querySelector){const n=t.stores.location.get(),s=n.state.__hashScrollIntoViewOptions??!0;if(s&&n.hash!==""){const i=document.getElementById(n.hash);i&&i.scrollIntoView(s)}}}var Vw=(t=>(t[t.AggregateError=1]="AggregateError",t[t.ArrowFunction=2]="ArrowFunction",t[t.ErrorPrototypeStack=4]="ErrorPrototypeStack",t[t.ObjectAssign=8]="ObjectAssign",t[t.BigIntTypedArray=16]="BigIntTypedArray",t[t.RegExp=32]="RegExp",t))(Vw||{}),Kn=Symbol.asyncIterator,Cv=Symbol.hasInstance,pa=Symbol.isConcatSpreadable,Yn=Symbol.iterator,xv=Symbol.match,kv=Symbol.matchAll,jv=Symbol.replace,Mv=Symbol.search,Uv=Symbol.species,Nv=Symbol.split,Dv=Symbol.toPrimitive,ga=Symbol.toStringTag,Lv=Symbol.unscopables,zv={[Kn]:0,[Cv]:1,[pa]:2,[Yn]:3,[xv]:4,[kv]:5,[jv]:6,[Mv]:7,[Uv]:8,[Nv]:9,[Dv]:10,[ga]:11,[Lv]:12},Kw={0:Kn,1:Cv,2:pa,3:Yn,4:xv,5:kv,6:jv,7:Mv,8:Uv,9:Nv,10:Dv,11:ga,12:Lv},E=void 0,Yw={2:!0,3:!1,1:E,0:null,4:-0,5:Number.POSITIVE_INFINITY,6:Number.NEGATIVE_INFINITY,7:Number.NaN},Fw={0:"Error",1:"EvalError",2:"RangeError",3:"ReferenceError",4:"SyntaxError",5:"TypeError",6:"URIError"},Qw={0:Error,1:EvalError,2:RangeError,3:ReferenceError,4:SyntaxError,5:TypeError,6:URIError};function Te(t,n,s,i,l,u,c,d,p,g,m,y){return{t,i:n,s,c:i,m:l,p:u,e:c,a:d,f:p,b:g,o:m,l:y}}function jr(t){return Te(2,E,t,E,E,E,E,E,E,E,E,E)}var Pv=jr(2),Bv=jr(3),Jw=jr(1),Xw=jr(0),Zw=jr(4),Ww=jr(5),eE=jr(6),tE=jr(7);function nE(t){switch(t){case'"':return'\\"';case"\\":return"\\\\";case` 11`:return"\\n";case"\r":return"\\r";case"\b":return"\\b";case" ":return"\\t";case"\f":return"\\f";case"<":return"\\x3C";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:return E}}function Mr(t){let n="",s=0,i;for(let l=0,u=t.length;l<u;l++)i=nE(t[l]),i&&(n+=t.slice(s,l)+i,s=l+1);return s===0?n=t:n+=t.slice(s),n}function rE(t){switch(t){case"\\\\":return"\\";case'\\"':return'"';case"\\n":return` 12`;case"\\r":return"\r";case"\\b":return"\b";case"\\t":return" ";case"\\f":return"\f";case"\\x3C":return"<";case"\\u2028":return"\u2028";case"\\u2029":return"\u2029";default:return t}}function Ur(t){return t.replace(/(\\\\|\\"|\\n|\\r|\\b|\\t|\\f|\\u2028|\\u2029|\\x3C)/g,rE)}var yl="__SEROVAL_REFS__",Hv=new Map,ha=new Map;function qv(t){return Hv.has(t)}function sE(t){return ha.has(t)}function aE(t){if(qv(t))return Hv.get(t);throw new LE(t)}function iE(t){if(sE(t))return ha.get(t);throw new zE(t)}typeof globalThis<"u"?Object.defineProperty(globalThis,yl,{value:ha,c
12onfigurable:!0,writable:!1,enumerable:!1}):typeof window<"u"?Object.defineProperty(window,yl,{value:ha,configurable:!0,writable:!1,enumerable:!1}):typeof self<"u"?Object.defineProperty(self,yl,{value:ha,configurable:!0,writable:!1,enumerable:!1}):typeof global<"u"&&Object.defineProperty(global,yl,{value:ha,configurable:!0,writable:!1,enumerable:!1});function Sf(t){return t instanceof EvalError?1:t instanceof RangeError?2:t instanceof ReferenceError?3:t instanceof SyntaxError?4:t instanceof TypeError?5:t instanceof URIError?6:0}function oE(t){let n=Fw[Sf(t)];return t.name!==n?{name:t.name}:t.constructor.name!==n?{name:t.constructor.name}:{}}function Iv(t,n){let s=oE(t),i=Object.getOwnPropertyNames(t);for(let l=0,u=i.length,c;l<u;l++)c=i[l],c!=="name"&&c!=="message"&&(c==="stack"?n&4&&(s=s||{},s[c]=t[c]):(s=s||{},s[c]=t[c]));return s}function $v(t){return Object.isFrozen(t)?3:Object.isSealed(t)?2:Object.isExtensible(t)?0:1}function lE(t){switch(t){case Number.POSITIVE_INFINITY:return Ww;case Number.NEGATIVE_INFINITY:return eE}return t!==t?tE:Object.is(t,-0)?Zw:Te(0,E,t,E,E,E,E,E,E,E,E,E)}function Gv(t){return Te(1,E,Mr(t),E,E,E,E,E,E,E,E,E)}function uE(t){return Te(3,E,""+t,E,E,E,E,E,E,E,E,E)}function cE(t){return Te(4,t,E,E,E,E,E,E,E,E,E,E)}function hE(t,n){let s=n.valueOf();return Te(5,t,s!==s?"":n.toISOString(),E,E,E,E,E,E,E,E,E)}function fE(t,n){return Te(6,t,E,Mr(n.source),n.flags,E,E,E,E,E,E,E)}function dE(t,n){return Te(17,t,zv[n],E,E,E,E,E,E,E,E,E)}function pE(t,n){return Te(18,t,Mr(aE(n)),E,E,E,E,E,E,E,E,E)}function gE(t,n,s){return Te(25,t,s,Mr(n),E,E,E,E,E,E,E,E)}function yE(t,n,s){return Te(9,t,E,E,E,E,E,s,E,E,$v(n),E)}function mE(t,n){return Te(21,t,E,E,E,E,E,E,n,E,E,E)}function vE(t,n,s){return Te(15,t,E,n.constructor.name,E,E,E,E,s,n.byteOffset,E,n.length)}function bE(t,n,s){return Te(16,t,E,n.constructor.name,E,E,E,E,s,n.byteOffset,E,n.byteLength)}function _E(t,n,s){return Te(20,t,E,E,E,E,E,E,s,n.byteOffset,E,n.byteLength)}function SE(t,n,s){return Te(13,t,Sf(n),E,Mr(n.message),s,E,E,E,E,E,E)}function wE(t,n,s){return Te(14,t,Sf(n),E,Mr(n.message),s,E,E,E,E,E,E)}function EE(t,n){return Te(7,t,E,E,E,E,E,n,E,E,E,E)}function TE(t,n){return Te(28,E,E,E,E,E,E,[t,n],E,E,E,E)}function RE(t,n){return Te(30,E,E,E,E,E,E,[t,n],E,E,E,E)}function AE(t,n,s){return Te(31,t,E,E,E,E,E,s,n,E,E,E)}function OE(t,n){return Te(32,t,E,E,E,E,E,E,n,E,E,E)}function CE(t,n){return Te(33,t,E,E,E,E,E,E,n,E,E,E)}function xE(t,n){return Te(34,t,E,E,E,E,E,E,n,E,E,E)}function kE(t,n,s,i){return Te(35,t,s,E,E,E,E,n,E,E,E,i)}var jE={parsing:1,serialization:2,deserialization:3};function ME(t){return`Seroval Error (step: ${jE[t]})`}var UE=(t,n)=>ME(t),Vv=class extends Error{constructor(t,n){super(UE(t)),this.cause=n}},im=class extends Vv{constructor(t){super("parsing",t)}},NE=class extends Vv{constructor(t){super("deserialization",t)}};function Fn(t){return`Seroval Error (specific: ${t})`}var Ql=class extends Error{constructor(n){super(Fn(1)),this.value=n}},Kv=class extends Error{constructor(n){super(Fn(2))}},DE=class extends Error{constructor(t){super(Fn(3))}},Vi=class extends Error{constructor(t){super(Fn(4))}},LE=class extends Error{constructor(t){super(Fn(5)),this.value=t}},zE=class extends Error{constructor(t){super(Fn(6))}},PE=class extends Error{constructor(t){super(Fn(7))}},Nr=class extends Error{constructor(t){super(Fn(8))}},BE=class extends Error{constructor(n){super(Fn(9))}},HE=class{constructor(t,n){this.value=t,this.replacement=n}},Jl=()=>{let t={p:0,s:0,f:0};return t.p=new Promise((n,s)=>{t.s=n,t.f=s}),t},qE=(t,n)=>{t.s(n),t.p.s=1,t.p.v=n},IE=(t,n)=>{t.f(n),t.p.s=2,t.p.v=n};Jl.toString();qE.toString();IE.toString();var $E=()=>{let t=[],n=[],s=!0,i=!1,l=0,u=(p,g,m)=>{for(m=0;m<l;m++)n[m]&&n[m][g](p)},c=(p,g,m,y)=>{for(g=0,m=t.length;g<m;g++)y=t[g],!s&&g===m-1?p[i?"return":"throw"](y):p.next(y)},d=(p,g)=>(s&&(g=l++,n[g]=p),c(p),()=>{s&&(n[g]=n[l],n[l--]=void 0)});return{__SEROVAL_STREAM__:!0,on:p=>d(p),next:p=>{s&&(t.push(p),u(p,"next"))},throw:p=>{s&&(t.push(p),u(p,"throw"),s=!1,i=!1,n.length=0)},return:p=>{s&&(t.push(p),u(p,"return"),s=!1,i=!0,n.length=0)}}},GE=t=>n=>()=>{let s=0,i={[t]:()=>i,next:()=>{if(s>n.d)return{done:!0,value:void 0};let l=s++,u=n.v[l];if(l===n.t)throw u;return{done:l===n.d,value:u}}};return i},VE=(t,n)=>s=>()=>
12{let i=0,l=-1,u=!1,c=[],d=[],p=(m=0,y=d.length)=>{for(;m<y;m++)d[m].s({done:!0,value:void 0})};s.on({next:m=>{let y=d.shift();y&&y.s({done:!1,value:m}),c.push(m)},throw:m=>{let y=d.shift();y&&y.f(m),p(),l=c.length,u=!0,c.push(m)},return:m=>{let y=d.shift();y&&y.s({done:!0,value:m}),p(),l=c.length,c.push(m)}});let g={[t]:()=>g,next:()=>{if(l===-1){let b=i++;if(b>=c.length){let _=n();return d.push(_),_.p}return{done:!1,value:c[b]}}if(i>l)return{done:!0,value:void 0};let m=i++,y=c[m];if(m!==l)return{done:!1,value:y};if(u)throw y;return{done:!0,value:y}}};return g},Yv=t=>{let n=atob(t),s=n.length,i=new Uint8Array(s);for(let l=0;l<s;l++)i[l]=n.charCodeAt(l);return i.buffer};Yv.toString();function KE(t){return"__SEROVAL_SEQUENCE__"in t}function Fv(t,n,s){return{__SEROVAL_SEQUENCE__:!0,v:t,t:n,d:s}}function YE(t){let n=[],s=-1,i=-1,l=t[Yn]();for(;;)try{let u=l.next();if(n.push(u.value),u.done){i=n.length-1;break}}catch(u){s=n.length,n.push(u)}return Fv(n,s,i)}var FE=GE(Yn);function QE(t){return FE(t)}var JE={},XE={},ZE={0:{},1:{},2:{},3:{},4:{},5:{}};function Xl(t){return"__SEROVAL_STREAM__"in t}function fs(){return $E()}function WE(t){let n=fs(),s=t[Kn]();async function i(){try{let l=await s.next();l.done?n.return(l.value):(n.next(l.value),await i())}catch(l){n.throw(l)}}return i().catch(()=>{}),n}var eT=VE(Kn,Jl);function tT(t){return eT(t)}async function nT(t){try{return[1,await t]}catch(n){return[0,n]}}function rT(t,n){return{plugins:n.plugins,mode:t,marked:new Set,features:63^(n.disabledFeatures||0),refs:n.refs||new Map,depthLimit:n.depthLimit||1e3}}function kl(t,n){t.marked.add(n)}function sT(t,n){let s=t.refs.size;return t.refs.set(n,s),s}function Zl(t,n){let s=t.refs.get(n);return s!=null?(kl(t,s),{type:1,value:cE(s)}):{type:0,value:sT(t,n)}}function wf(t,n){let s=Zl(t,n);return s.type===1?s:qv(n)?{type:2,value:pE(s.value,n)}:s}function is(t,n){let s=wf(t,n);if(s.type!==0)return s.value;if(n in zv)return dE(s.value,n);throw new Ql(n)}function Wl(t,n){let s=Zl(t,ZE[n]);return s.type===1?s.value:Te(26,s.value,n,E,E,E,E,E,E,E,E,E)}function aT(t){let n=Zl(t,JE);return n.type===1?n.value:Te(27,n.value,E,E,E,E,E,E,is(t,Yn),E,E,E)}function iT(t){let n=Zl(t,XE);return n.type===1?n.value:Te(29,n.value,E,E,E,E,E,[Wl(t,1),is(t,Kn)],E,E,E,E)}function oT(t,n,s,i){return Te(s?11:10,t,E,E,E,i,E,E,E,E,$v(n),E)}function lT(t,n,s,i){return Te(8,n,E,E,E,E,{k:s,v:i},E,Wl(t,0),E,E,E)}function uT(t,n,s){let i=new Uint8Array(s),l="";for(let u=0,c=i.length;u<c;u++)l+=String.fromCharCode(i[u]);return Te(19,n,Mr(btoa(l)),E,E,E,E,E,Wl(t,5),E,E,E)}function cT(t,n){return{base:rT(t,n),child:void 0}}var hT=class{constructor(t,n){this._p=t,this.depth=n}parse(t){return st(this._p,this.depth,t)}};async function fT(t,n,s){let i=[];for(let l=0,u=s.length;l<u;l++)l in s?i[l]=await st(t,n,s[l]):i[l]=0;return i}async function dT(t,n,s,i){return yE(s,i,await fT(t,n,i))}async function Ef(t,n,s){let i=Object.entries(s),l=[],u=[];for(let c=0,d=i.length;c<d;c++)l.push(Mr(i[c][0])),u.push(await st(t,n,i[c][1]));return Yn in s&&(l.push(is(t.base,Yn)),u.push(TE(aT(t.base),await st(t,n,YE(s))))),Kn in s&&(l.push(is(t.base,Kn)),u.push(RE(iT(t.base),await st(t,n,WE(s))))),ga in s&&(l.push(is(t.base,ga)),u.push(Gv(s[ga]))),pa in s&&(l.push(is(t.base,pa)),u.push(s[pa]?Pv:Bv)),{k:l,v:u}}async function jh(t,n,s,i,l){return oT(s,i,l,await Ef(t,n,i))}async function pT(t,n,s,i){return mE(s,await st(t,n,i.valueOf()))}async function gT(t,n,s,i){return vE(s,i,await st(t,n,i.buffer))}async function yT(t,n,s,i){return bE(s,i,await st(t,n,i.buffer))}async function mT(t,n,s,i){return _E(s,i,await st(t,n,i.buffer))}async function om(t,n,s,i){let l=Iv(i,t.base.features);return SE(s,i,l?await Ef(t,n,l):E)}async function vT(t,n,s,i){let l=Iv(i,t.base.features);return wE(s,i,l?await Ef(t,n,l):E)}async function bT(t,n,s,i){let l=[],u=[];for(let[c,d]of i.entries())l.push(await st(t,n,c)),u.push(await st(t,n,d));return lT(t.base,s,l,u)}async function _T(t,n,s,i){let l=[];for(let u of i.keys())l.push(await st(t,n,u));return EE(s,l)}async function Qv(t,n,s,i){let l=t.base.plugins;if(l)for(let u=0,c=l.length;u<c;u++){let d=l[u];if(d.parse.async&&d.test(i))return gE(s,d.tag,await d.parse.async(i,new hT(t,n),{id:s}))}return E}async function ST(t,n,s,i){let[l,u]=await nT(i);return Te(12,s,l,E,E,E,E,E,await st(t,n,u),E,E,E)}function wT(t,n,s,i,l){let u=[],c=s.on({next:d=>{kl(this.base,n),st(this,t,d).then(p=>{u.push(OE(n,p))},p=>{l(p),c()})},throw:d=>{kl(this.base,n),st(this,t,d).then(p=>{u.push(CE(n,p)),i(u),c()},p=>{l(p),c()})},return:d=>{kl(this.base,n),st(this,t,d).then(p=>{u.push(xE(n,p)),i(u),c()},p=>{l(p),c()})}})}async function ET(t,n,s,i){return AE(s,Wl(t.base,4),await new Promise(wT.bind(t,n,s,i)))}async function TT(t,n,s,i){let l=[];for(let u=0,c=i.v.length;u<c;u++)l[u]=await st(t,n,i.v[u]);return kE(s,l,i.t,i.d)}async function RT(t,n,s,i){if(Array.isArray(i))return dT(t,n,s,i);if(Xl(i))return ET(t,n,s,i);if(KE(i))return TT(t,n,s,i);let l=i.constructor;if(l===HE)return st(t,n,i.replacement);let u=await Qv(t,n,s,i);if(u)return u;switch(l){case Object:return jh(t,n,s,i,!1);case E:return jh(t,n,s,i,!0);case Date:return hE(s,i);case Error:case EvalError:case RangeError:case ReferenceError:case SyntaxError:case TypeError:case URIError:return om(t,n,s,i);case Number:case Boolean:case String:case BigInt:return pT(t,n,s,i);case ArrayBuffer:return uT(t.base,s,i);case Int8Array:case Int16Array:case Int32Array:case Uint8Array:case Uint16Array:case Uint32Array:case Uint8ClampedArray:case Float32Array:case Float64Array:return gT(t,n,s,i);case DataView:return mT(t,n,s,i);case Map:return bT(t,n,s,i);case Set:return _T(t,n,s,i)}
12if(l===Promise||i instanceof Promise)return ST(t,n,s,i);let c=t.base.features;if(c&32&&l===RegExp)return fE(s,i);if(c&16)switch(l){case BigInt64Array:case BigUint64Array:return yT(t,n,s,i)}if(c&1&&typeof AggregateError<"u"&&(l===AggregateError||i instanceof AggregateError))return vT(t,n,s,i);if(i instanceof Error)return om(t,n,s,i);if(Yn in i||Kn in i)return jh(t,n,s,i,!!l);throw new Ql(i)}async function AT(t,n,s){let i=wf(t.base,s);if(i.type!==0)return i.value;let l=await Qv(t,n,i.value,s);if(l)return l;throw new Ql(s)}async function st(t,n,s){switch(typeof s){case"boolean":return s?Pv:Bv;case"undefined":return Jw;case"string":return Gv(s);case"number":return lE(s);case"bigint":return uE(s);case"object":{if(s){let i=wf(t.base,s);return i.type===0?await RT(t,n+1,i.value,s):i.value}return Xw}case"symbol":return is(t.base,s);case"function":return AT(t,n,s);default:throw new Ql(s)}}async function OT(t,n){try{return await st(t,0,n)}catch(s){throw s instanceof im?s:new im(s)}}var CT=(t=>(t[t.Vanilla=1]="Vanilla",t[t.Cross=2]="Cross",t))(CT||{});function Jv(t,n){for(let s=0,i=n.length;s<i;s++){let l=n[s];t.has(l)||(t.add(l),l.extends&&Jv(t,l.extends))}}function Xv(t){if(t){let n=new Set;return Jv(n,t),[...n]}}function xT(t){switch(t){case"Int8Array":return Int8Array;case"Int16Array":return Int16Array;case"Int32Array":return Int32Array;case"Uint8Array":return Uint8Array;case"Uint16Array":return Uint16Array;case"Uint32Array":return Uint32Array;case"Uint8ClampedArray":return Uint8ClampedArray;case"Float32Array":return Float32Array;case"Float64Array":return Float64Array;case"BigInt64Array":return BigInt64Array;case"BigUint64Array":return BigUint64Array;default:throw new PE(t)}}var kT=1e6,jT=1e4,MT=2e4;function Zv(t,n){switch(n){case 3:return Object.freeze(t);case 1:return Object.preventExtensions(t);case 2:return Object.seal(t);default:return t}}var UT=1e3;function NT(t,n){var s;return{mode:t,plugins:n.plugins,refs:n.refs||new Map,features:(s=n.features)!=null?s:63^(n.disabledFeatures||0),depthLimit:n.depthLimit||UT}}function DT(t){return{mode:2,base:NT(2,t),child:E}}var LT=class{constructor(t,n){this._p=t,this.depth=n}deserialize(t){return Le(this._p,this.depth,t)}};function Wv(t,n){if(n<0||!Number.isFinite(n)||!Number.isInteger(n))throw new Nr({t:4,i:n});if(t.refs.has(n))throw new Error("Conflicted ref id: "+n)}function zT(t,n,s){return Wv(t.base,n),t.state.marked.has(n)&&t.base.refs.set(n,s),s}function PT(t,n,s){return Wv(t.base,n),t.base.refs.set(n,s),s}function at(t,n,s){return t.mode===1?zT(t,n,s):PT(t,n,s)}function Yh(t,n,s){if(Object.hasOwn(n,s))return n[s];throw new Nr(t)}function BT(t,n){return at(t,n.i,iE(Ur(n.s)))}function HT(t,n,s){let i=s.a,l=i.length,u=at(t,s.i,new Array(l));for(let c=0,d;c<l;c++)d=i[c],d&&(u[c]=Le(t,n,d));return Zv(u,s.o),u}function qT(t){switch(t){case"constructor":case"__proto__":case"prototype":case"__defineGetter__":case"__defineSetter__":case"__lookupGetter__":case"__lookupSetter__":return!1;default:return!0}}function IT(t){switch(t){case Kn:case pa:case ga:case Yn:return!0;default:return!1}}function lm(t,n,s){qT(n)?t[n]=s:Object.defineProperty(t,n,{value:s,configurable:!0,enumerable:!0,writable:!0})}function $T(t,n,s,i,l){if(typeof i=="string")lm(s,Ur(i),Le(t,n,l));else{let u=Le(t,n,i);switch(typeof u){case"string":lm(s,u,Le(t,n,l));break;case"symbol":IT(u)&&(s[u]=Le(t,n,l));break;default:throw new Nr(i)}}}function e0(t,n,s,i){let l=s.k;if(l.length>0)for(let u=0,c=s.v,d=l.length;u<d;u++)$T(t,n,i,l[u],c[u]);return i}function GT(t,n,s){let i=at(t,s.i,s.t===10?{}:Object.create(null));return e0(t,n,s.p,i),Zv(i,s.o),i}function VT(t,n){return at(t,n.i,new Date(n.s))}function KT(t,n){if(t.base.features&32){let s=Ur(n.c);if(s.length>MT)throw new Nr(n);return at(t,n.i,new RegExp(s,n.m))}throw new Kv(n)}function YT(t,n,s){let i=at(t,s.i,new Set);for(let l=0,u=s.a,c=u.length;l<c;l++)i.add(Le(t,n,u[l]));return i}function FT(t,n,s){let i=at(t,s.i,new Map);for(let l=0,u=s.e.k,c=s.e.v,d=u.length;l<d;l++)i.set(Le(t,n,u[l]),Le(t,n,c[l]));return i}function QT(t,n){if(n.s.length>kT)throw new Nr(n);return at(t,n.i,Yv(Ur(n.s)))}function JT(t,n,s){var i;let l=xT(s.c),u=Le(t,n,s.f),c=(i=s.b)!=null?i:0;if(c<0||c>u.byteLength)throw new Nr(s);return at(t,s.i,new l(u,c,s.l))}function XT(t,n,s){var i;let l=Le(t,n,s.f),u=(i=s.b)!=null?i:0;if(u<0||u>l.byteLength)throw new Nr(s);return at(t,s.i,new DataView(l,u,s.l))}function t0(t,n,s,i){if(s.p){let l=e0(t,n,s.p,{});Object.defineProperties(i,Object.getOwnPropertyDescriptors(l))}return i}function ZT(t,n,s){let i=at(t,s.i,new AggregateError([],Ur(s.m)));
12return t0(t,n,s,i)}function WT(t,n,s){let i=Yh(s,Qw,s.s),l=at(t,s.i,new i(Ur(s.m)));return t0(t,n,s,l)}function eR(t,n,s){let i=Jl(),l=at(t,s.i,i.p),u=Le(t,n,s.f);return s.s?i.s(u):i.f(u),l}function tR(t,n,s){return at(t,s.i,Object(Le(t,n,s.f)))}function nR(t,n,s){let i=t.base.plugins;if(i){let l=Ur(s.c);for(let u=0,c=i.length;u<c;u++){let d=i[u];if(d.tag===l)return at(t,s.i,d.deserialize(s.s,new LT(t,n),{id:s.i}))}}throw new DE(s.c)}function rR(t,n){return at(t,n.i,at(t,n.s,Jl()).p)}function sR(t,n,s){let i=t.base.refs.get(s.i);if(i)return i.s(Le(t,n,s.a[1])),E;throw new Vi("Promise")}function aR(t,n,s){let i=t.base.refs.get(s.i);if(i)return i.f(Le(t,n,s.a[1])),E;throw new Vi("Promise")}function iR(t,n,s){Le(t,n,s.a[0]);let i=Le(t,n,s.a[1]);return QE(i)}function oR(t,n,s){Le(t,n,s.a[0]);let i=Le(t,n,s.a[1]);return tT(i)}function lR(t,n,s){let i=at(t,s.i,fs()),l=s.a,u=l.length;if(u)for(let c=0;c<u;c++)Le(t,n,l[c]);return i}function uR(t,n,s){let i=t.base.refs.get(s.i);if(i&&Xl(i))return i.next(Le(t,n,s.f)),E;throw new Vi("Stream")}function cR(t,n,s){let i=t.base.refs.get(s.i);if(i&&Xl(i))return i.throw(Le(t,n,s.f)),E;throw new Vi("Stream")}function hR(t,n,s){let i=t.base.refs.get(s.i);if(i&&Xl(i))return i.return(Le(t,n,s.f)),E;throw new Vi("Stream")}function fR(t,n,s){return Le(t,n,s.f),E}function dR(t,n,s){return Le(t,n,s.a[1]),E}function pR(t,n,s){let i=at(t,s.i,Fv([],s.s,s.l));for(let l=0,u=s.a.length;l<u;l++)i.v[l]=Le(t,n,s.a[l]);return i}function Le(t,n,s){if(n>t.base.depthLimit)throw new BE(t.base.depthLimit);switch(n+=1,s.t){case 2:return Yh(s,Yw,s.s);case 0:return Number(s.s);case 1:return Ur(String(s.s));case 3:if(String(s.s).length>jT)throw new Nr(s);return BigInt(s.s);case 4:return t.base.refs.get(s.i);case 18:return BT(t,s);case 9:return HT(t,n,s);case 10:case 11:return GT(t,n,s);case 5:return VT(t,s);case 6:return KT(t,s);case 7:return YT(t,n,s);case 8:return FT(t,n,s);case 19:return QT(t,s);case 16:case 15:return JT(t,n,s);case 20:return XT(t,n,s);case 14:return ZT(t,n,s);case 13:return WT(t,n,s);case 12:return eR(t,n,s);case 17:return Yh(s,Kw,s.s);case 21:return tR(t,n,s);case 25:return nR(t,n,s);case 22:return rR(t,s);case 23:return sR(t,n,s);case 24:return aR(t,n,s);case 28:return iR(t,n,s);case 30:return oR(t,n,s);case 31:return lR(t,n,s);case 32:return uR(t,n,s);case 33:return cR(t,n,s);case 34:return hR(t,n,s);case 27:return fR(t,n,s);case 29:return dR(t,n,s);case 35:return pR(t,n,s);default:throw new Kv(s)}}function gR(t,n){try{return Le(t,0,n)}catch(s){throw new NE(s)}}var yR=()=>T;yR.toString();function um(t,n){let s=Xv(n.plugins),i=DT({plugins:s,refs:n.refs,features:n.features,disabledFeatures:n.disabledFeatures,depthLimit:n.depthLimit});return gR(i,t)}async function mR(t,n={}){let s=Xv(n.plugins),i=cT(1,{plugins:s,disabledFeatures:n.disabledFeatures});return{t:await OT(i,t),f:i.base.features,m:Array.from(i.base.marked)}}function vR(t){return{tag:"$TSR/t/"+t.key,test:t.test,parse:{sync(n,s,i){return{v:s.parse(t.toSerializable(n))}},async async(n,s,i){return{v:await s.parse(t.toSerializable(n))}},stream(n,s,i){return{v:s.parse(t.toSerializable(n))}}},serialize:void 0,deserialize(n,s,i){return t.fromSerializable(s.deserialize(n.v))}}}var bR=class{constructor(t,n){this.stream=t,this.hint=n?.hint??"binary"}},zl=globalThis.Buffer,n0=!!zl&&typeof zl.from=="function";function r0(t){if(t.length===0)return"";if(n0)return zl.from(t).toString("base64");const n=32768,s=[];for(let i=0;i<t.length;i+=n){const l=t.subarray(i,i+n);s.push(String.fromCharCode.apply(null,l))}return btoa(s.join(""))}function s0(t){if(t.length===0)return new Uint8Array(0);if(n0){const i=zl.from(t,"base64");return new Uint8Array(i.buffer,i.byteOffset,i.byteLength)}const n=atob(t),s=new Uint8Array(n.length);for(let i=0;i<n.length;i++)s[i]=n.charCodeAt(i);return s}var _i=Object.create(null),Si=Object.create(null),_R=t=>new ReadableStream({start(n){t.on({next(s){try{n.enqueue(s0(s))}catch{}},throw(s){n.error(s)},return(){try{n.close()}catch{}}})}}),SR=new TextEncoder,wR=t=>new ReadableStream({start(n){t.on({next(s){try{typeof s=="string"?n.enqueue(SR.encode(s)):n.enqueue(s0(s.$b64))}catch{}},throw(s){n.error(s)},return(){try{n.close()}catch{}}})}}),ER="(s=>new ReadableStream({start(c){s.on({next(b){try{const d=atob(b),a=new Uint8Array(d.length);for(let i=0;i<d.length;
12i++)a[i]=d.charCodeAt(i);c.enqueue(a)}catch(_){}},throw(e){c.error(e)},return(){try{c.close()}catch(_){}}})}}))",TR="(s=>{const e=new TextEncoder();return new ReadableStream({start(c){s.on({next(v){try{if(typeof v==='string'){c.enqueue(e.encode(v))}else{const d=atob(v.$b64),a=new Uint8Array(d.length);for(let i=0;i<d.length;i++)a[i]=d.charCodeAt(i);c.enqueue(a)}}catch(_){}},throw(x){c.error(x)},return(){try{c.close()}catch(_){}}})}})})";function cm(t){const n=fs(),s=t.getReader();return(async()=>{try{for(;;){const{done:i,value:l}=await s.read();if(i){n.return(void 0);break}n.next(r0(l))}}catch(i){n.throw(i)}finally{s.releaseLock()}})(),n}function hm(t){const n=fs(),s=t.getReader(),i=new TextDecoder("utf-8",{fatal:!0});return(async()=>{try{for(;;){const{done:l,value:u}=await s.read();if(l){try{const c=i.decode();c.length>0&&n.next(c)}catch{}n.return(void 0);break}try{const c=i.decode(u,{stream:!0});c.length>0&&n.next(c)}catch{n.next({$b64:r0(u)})}}}catch(l){n.throw(l)}finally{s.releaseLock()}})(),n}var RR={tag:"tss/RawStream",extends:[{tag:"tss/RawStreamFactory",test(t){return t===_i},parse:{sync(t,n,s){return{}},async async(t,n,s){return{}},stream(t,n,s){return{}}},serialize(t,n,s){return ER},deserialize(t,n,s){return _i}},{tag:"tss/RawStreamFactoryText",test(t){return t===Si},parse:{sync(t,n,s){return{}},async async(t,n,s){return{}},stream(t,n,s){return{}}},serialize(t,n,s){return TR},deserialize(t,n,s){return Si}}],test(t){return t instanceof bR},parse:{sync(t,n,s){const i=t.hint==="text"?Si:_i;return{hint:n.parse(t.hint),factory:n.parse(i),stream:n.parse(fs())}},async async(t,n,s){const i=t.hint==="text"?Si:_i,l=t.hint==="text"?hm(t.stream):cm(t.stream);return{hint:await n.parse(t.hint),factory:await n.parse(i),stream:await n.parse(l)}},stream(t,n,s){const i=t.hint==="text"?Si:_i,l=t.hint==="text"?hm(t.stream):cm(t.stream);return{hint:n.parse(t.hint),factory:n.parse(i),stream:n.parse(l)}}},serialize(t,n,s){return"("+n.serialize(t.factory)+")("+n.serialize(t.stream)+")"},deserialize(t,n,s){const i=n.deserialize(t.stream);return n.deserialize(t.hint)==="text"?wR(i):_R(i)}};function AR(t){return{tag:"tss/RawStream",test:()=>!1,parse:{},serialize(){throw new Error("RawStreamDeserializePlugin.serialize should not be called. Client only deserializes.")},deserialize(n,s,i){return t(typeof s?.deserialize=="function"?s.deserialize(n.streamId):n.streamId)}}}var OR={tag:"$TSR/Error",test(t){return t instanceof Error},parse:{sync(t,n){return{message:n.parse(t.message)}},async async(t,n){return{message:await n.parse(t.message)}},stream(t,n){return{message:n.parse(t.message)}}},serialize(t,n){return"new Error("+n.serialize(t.message)+")"},deserialize(t,n){return new Error(n.deserialize(t.message))}},Er={},a0=t=>new ReadableStream({start:n=>{t.on({next:s=>{try{n.enqueue(s)}catch{}},throw:s=>{n.error(s)},return:()=>{try{n.close()}catch{}}})}}),CR={tag:"seroval-plugins/web/ReadableStreamFactory",test(t){return t===Er},parse:{sync(){return Er},async async(){return await Promise.resolve(Er)},stream(){return Er}},serialize(){return a0.toString()},deserialize(){return Er}};function fm(t){let n=fs(),s=t.getReader();async function i(){try{let l=await s.read();l.done?n.return(l.value):(n.next(l.value),await i())}catch(l){n.throw(l)}}return i().catch(()=>{}),n}var xR={tag:"seroval/plugins/web/ReadableStream",extends:[CR],test(t){return typeof ReadableStream>"u"?!1:t instanceof ReadableStream},parse:{sync(t,n){return{factory:n.parse(Er),stream:n.parse(fs())}},async async(t,n){return{factory:await n.parse(Er),stream:await n.parse(fm(t))}},stream(t,n){return{factory:n.parse(Er),stream:n.parse(fm(t))}}},serialize(t,n){return"("+n.serialize(t.factory)+")("+n.serialize(t.stream)+")"},deserialize(t,n){let s=n.deserialize(t.stream);return a0(s)}},kR=xR,jR=[OR,RR,kR];function MR(){return[...gv()?.serializationAdapters?.map(vR)??[],...jR]}var dm=new TextDecoder,UR=new Uint8Array(0),pm=16*1024*1024,gm=32*1024*1024,ym=1024,mm=1e5;function NR(t){const n=new Map,s=new Map,i=new Set;let l=!1,u=null,c=0,d;const p=new ReadableStream({start(y){d=y},cancel(){l=!0;try{u?.cancel()}catch{}n.forEach(y=>{try{y.error(new Error("Framed response cancelled"))}catch{}}),n.clear(),s.clear(),i.clear()}});function g(y){const b=s.get(y);if(b)return b;if(i.has(y))return new ReadableStream({start(w){w.close()}});if(s.size>
12=ym)throw new Error(`Too many raw streams in framed response (max ${ym})`);const _=new ReadableStream({start(w){n.set(y,w)},cancel(){i.add(y),n.delete(y),s.delete(y)}});return s.set(y,_),_}function m(y){return g(y),n.get(y)}return(async()=>{const y=t.getReader();u=y;const b=[];let _=0;function w(){if(_<9)return null;const R=b[0];if(R.length>=9)return{type:R[0],streamId:(R[1]<<24|R[2]<<16|R[3]<<8|R[4])>>>0,length:(R[5]<<24|R[6]<<16|R[7]<<8|R[8])>>>0};const O=new Uint8Array(9);let U=0,j=9;for(let L=0;L<b.length&&j>0;L++){const Q=b[L],V=Math.min(Q.length,j);O.set(Q.subarray(0,V),U),U+=V,j-=V}return{type:O[0],streamId:(O[1]<<24|O[2]<<16|O[3]<<8|O[4])>>>0,length:(O[5]<<24|O[6]<<16|O[7]<<8|O[8])>>>0}}function A(R){if(R===0)return UR;const O=new Uint8Array(R);let U=0,j=R;for(;j>0&&b.length>0;){const L=b[0];if(!L)break;const Q=Math.min(L.length,j);O.set(L.subarray(0,Q),U),U+=Q,j-=Q,Q===L.length?b.shift():b[0]=L.subarray(Q)}return _-=R,O}try{for(;;){const{done:R,value:O}=await y.read();if(l||R)break;if(O){if(_+O.length>gm)throw new Error(`Framed response buffer exceeded ${gm} bytes`);for(b.push(O),_+=O.length;;){const U=w();if(!U)break;const{type:j,streamId:L,length:Q}=U;if(j!==In.JSON&&j!==In.CHUNK&&j!==In.END&&j!==In.ERROR)throw new Error(`Unknown frame type: ${j}`);if(j===In.JSON){if(L!==0)throw new Error("Invalid JSON frame streamId (expected 0)")}else if(L===0)throw new Error("Invalid raw frame streamId (expected non-zero)");if(Q>pm)throw new Error(`Frame payload too large: ${Q} bytes (max ${pm})`);const V=9+Q;if(_<V)break;if(++c>mm)throw new Error(`Too many frames in framed response (max ${mm})`);A(9);const q=A(Q);switch(j){case In.JSON:try{d.enqueue(dm.decode(q))}catch{}break;case In.CHUNK:{const K=m(L);K&&K.enqueue(q);break}case In.END:{const K=m(L);if(i.add(L),K){try{K.close()}catch{}n.delete(L)}break}case In.ERROR:{const K=m(L);if(i.add(L),K){const J=dm.decode(q);K.error(new Error(J)),n.delete(L)}break}}}}}if(_!==0)throw new Error("Incomplete frame at end of framed response");try{d.close()}catch{}n.forEach(R=>{try{R.close()}catch{}}),n.clear()}catch(R){try{d.error(R)}catch{}n.forEach(O=>{try{O.error(R)}catch{}}),n.clear()}finally{try{y.releaseLock()}catch{}u=null}})(),{getOrCreateStream:g,jsonChunks:p}}var Ni=null;async function Fh(t){t.length>0&&await Promise.allSettled(t)}var DR=Object.prototype.hasOwnProperty;function i0(t){for(const n in t)if(DR.call(t,n))return!0;return!1}async function LR(t,n,s){Ni||(Ni=MR());const i=n[0],l=i.fetch??s,u=i.data instanceof FormData?"formData":"payload",c=i.headers?new Headers(i.headers):new Headers;if(c.set("x-tsr-serverFn","true"),u==="payload"&&c.set("accept",`${jS}, application/x-ndjson, application/json`),i.method==="GET"){if(u==="formData")throw new Error("FormData is not supported with GET requests");const p=await o0(i);if(p!==void 0){const g=Sv({payload:p});t.includes("?")?t+=`&${g}`:t+=`?${g}`}}let d;if(i.method==="POST"){const p=await zR(i);p?.contentType&&c.set("content-type",p.contentType),d=p?.body}return await PR(async()=>l(t,{method:i.method,headers:c,signal:i.signal,body:d}))}async function o0(t){let n=!1;const s={};if(t.data!==void 0&&(n=!0,s.data=t.data),t.context&&i0(t.context)&&(n=!0,s.context=t.context),n)return l0(s)}async function l0(t){return JSON.stringify(await Promise.resolve(mR(t,{plugins:Ni})))}async function zR(t){if(t.data instanceof FormData){let s;return t.context&&i0(t.context)&&(s=await l0(t.context)),s!==void 0&&t.data.set(kS,s),{body:t.data}}const n=await o0(t);if(n)return{body:n,contentType:"application/json"}}async function PR(t){let n;try{n=await t()}catch(i){if(i instanceof Response)n=i;else throw console.log(i),i}if(n.headers.get("x-tss-raw")==="true")return n;const s=n.headers.get("content-type");if(s||Ut(),n.headers.get("x-tss-serialized")){let i;if(s.includes("application/x-tss-framed")){if(NS(s),!n.body)throw new Error("No response body for framed response");const{getOrCreateStream:l,jsonChunks:u}=NR(n.body),c=[AR(l),...Ni||[]],d=new Map;i=await BR({jsonStream:u,onMessage:p=>um(p,{refs:d,plugins:c}),onError(p,g){console.error(p,g)}})}else if(s.includes("application/json")){const l=await n.json(),u=[];i=um(l,{plugins:Ni}),await Fh(u)}if(i||Ut(),i instanceof Error)throw i;return i}if(s.includes("application/json")){const i=await n.json(),l=mw(i);if(l)throw l;if(ut(i))throw i;return i}if(!n.ok)throw new Error(await n.text());return n}async function BR({jsonStream:t,onMessage:n,onError:s}){const i=t.getReader(),{value:l,done:u}=await i.read();if(u||!l)throw new Error("Stream ended before first object");const c=JSON.parse(l);let d=!1;const p=(async()=>{try{for(;;){const{value:y,done:b}=await i.read();if(b)break;
12if(y)try{const _=[];try{n(JSON.parse(y))}finally{}await Fh(_)}catch(_){s?.(`Invalid JSON: ${y}`,_)}}}catch(y){d||s?.("Stream processing error:",y)}})();let g;const m=[];try{g=n(c)}catch(y){throw d=!0,i.cancel().catch(()=>{}),y}return await Fh(m),Promise.resolve(g).catch(()=>{d=!0,i.cancel().catch(()=>{})}),p.finally(()=>{try{i.releaseLock()}catch{}}),g}function HR(t){const n="/_serverFn/"+t;return Object.assign((...l)=>{const u=gv()?.serverFns?.fetch;return LR(n,l,u??fetch)},{url:n,serverFnMeta:{id:t},[Gh]:!0})}var qR={key:"$TSS/serverfn",test:t=>typeof t!="function"||!(Gh in t)?!1:!!t[Gh],toSerializable:({serverFnMeta:t})=>({functionId:t.id}),fromSerializable:({functionId:t})=>HR(t)};function vm(t){return t.replaceAll("\0","/").replaceAll("�","/")}function IR(t,n){t.id=n.i,t.__beforeLoadContext=n.b,t.loaderData=n.l,t.status=n.s,t.ssr=n.ssr,t.updatedAt=n.u,t.error=n.e,n.g!==void 0&&(t.globalNotFound=n.g)}async function $R(t){window.$_TSR||Ut();const n=t.options.serializationAdapters;if(n?.length){const R=new Map;n.forEach(O=>{R.set(O.key,O.fromSerializable)}),window.$_TSR.t=R,window.$_TSR.buffer.forEach(O=>O())}window.$_TSR.initialized=!0,window.$_TSR.router||Ut();const s=window.$_TSR.router;s.matches.forEach(R=>{R.i=vm(R.i)}),s.lastMatchId&&(s.lastMatchId=vm(s.lastMatchId));const{manifest:i,dehydratedData:l,lastMatchId:u}=s;t.ssr={manifest:i};const c=document.querySelector('meta[property="csp-nonce"]')?.content;t.options.ssr={nonce:c};const d=t.matchRoutes(t.stores.location.get()),p=Promise.all(d.map(R=>t.loadRouteChunk(t.looseRoutesById[R.routeId])));function g(R){const O=t.looseRoutesById[R.routeId].options.pendingMinMs??t.options.defaultPendingMinMs;if(O){const U=hs();R._nonReactive.minPendingPromise=U,R._forcePending=!0,setTimeout(()=>{U.resolve(),t.updateMatch(R.id,j=>(j._nonReactive.minPendingPromise=void 0,{...j,_forcePending:void 0}))},O)}}function m(R){const O=t.looseRoutesById[R.routeId];O&&(O.options.ssr=R.ssr)}let y;d.forEach(R=>{const O=s.matches.find(U=>U.i===R.id);if(!O){R._nonReactive.dehydrated=!1,R.ssr=!1,m(R);return}IR(R,O),m(R),R._nonReactive.dehydrated=R.ssr!==!1,(R.ssr==="data-only"||R.ssr===!1)&&y===void 0&&(y=R.index,g(R))}),t.stores.setMatches(d),await t.options.hydrate?.(l);const b=t.stores.matches.get(),_=t.stores.location.get();await Promise.all(b.map(async R=>{try{const O=t.looseRoutesById[R.routeId],U=b[R.index-1]?.context??t.options.context;if(O.options.context){const V={deps:R.loaderDeps,params:R.params,context:U??{},location:_,navigate:q=>t.navigate({...q,_fromLocation:_}),buildLocation:t.buildLocation,cause:R.cause,abortController:R.abortController,preload:!1,matches:d,routeId:O.id};
12R.__routeContext=O.options.context(V)??void 0}R.context={...U,...R.__routeContext,...R.__beforeLoadContext};const j={ssr:t.options.ssr,matches:b,match:R,params:R.params,loaderData:R.loaderData},L=await O.options.head?.(j),Q=await O.options.scripts?.(j);R.meta=L?.meta,R.links=L?.links,R.headScripts=L?.scripts,R.styles=L?.styles,R.scripts=Q}catch(O){if(ut(O))R.error={isNotFound:!0},console.error(`NotFound error during hydration for routeId: ${R.routeId}`,O);else throw R.error=O,console.error(`Error during hydration for route ${R.routeId}:`,O),O}}));const w=d[d.length-1].id!==u;if(!d.some(R=>R.ssr===!1)&&!w)return d.forEach(R=>{R._nonReactive.dehydrated=void 0}),t.stores.resolvedLocation.set(t.stores.location.get()),p;const A=Promise.resolve().then(()=>t.load()).catch(R=>{console.error("Error during router hydration:",R)});if(w){const R=d[1];R||Ut(),g(R),R._displayPending=!0,R._nonReactive.displayPendingPromise=A,A.then(()=>{t.batch(()=>{t.stores.status.get()==="pending"&&(t.stores.status.set("idle"),t.stores.resolvedLocation.set(t.stores.location.get())),t.updateMatch(R.id,O=>({...O,_displayPending:void 0,displayPendingPromise:void 0}))})})}return p}var Pl=re.use,Ti=typeof window<"u"?re.useLayoutEffect:re.useEffect;function Mh(t){const n=re.useRef({value:t,prev:null}),s=n.current.value;return t!==s&&(n.current={value:t,prev:s}),n.current.prev}function GR(t,n,s={},i={}){re.useEffect(()=>{if(!t.current||i.disabled||typeof IntersectionObserver!="function")return;const l=new IntersectionObserver(([u])=>{n(u)},s);return l.observe(t.current),()=>{l.disconnect()}},[n,s,i.disabled,t])}function VR(t){const n=re.useRef(null);return re.useImperativeHandle(t,()=>n.current,[]),n}function KR({promise:t}){if(Pl)return Pl(t);const n=Pw(t);if(n[bn].status==="pending")throw n;if(n[bn].status==="error")throw n[bn].error;return n[bn].data}function YR(t){const n=Y.jsx(FR,{...t});return t.fallback?Y.jsx(re.Suspense,{fallback:t.fallback,children:n}):n}function FR(t){const n=KR(t);return t.children(n)}function Tf(t){const n=t.errorComponent??Rf;return Y.jsx(QR,{getResetKey:t.getResetKey,onCatch:t.onCatch,children:({error:s,reset:i})=>s?re.createElement(n,{error:s,reset:i}):t.children})}var QR=class extends re.Component{constructor(...t){super(...t),this.state={error:null}}static getDerivedStateFromProps(t,n){const s=t.getResetKey();return n.error&&n.resetKey!==s?{resetKey:s,error:null}:{resetKey:s}}static getDerivedStateFromError(t){return{error:t}}reset(){this.setState({error:null})}componentDidCatch(t,n){this.props.onCatch&&this.props.onCatch(t,n)}render(){return this.props.children({error:this.state.error,reset:()=>{this.reset()}})}};function Rf({error:t}){const[n,s]=re.useState(!1);return Y.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[Y.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[Y.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),Y.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>s(i=>!i),children:n?"Hide Error":"Show Error"})]}),Y.jsx("div",{style:{height:".25rem"}}),n?Y.jsx("div",{children:Y.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:t.message?Y.jsx("code",{children:t.message}):null})}):null]})}function JR({children:t,fallback:n=null}){return Af()?Y.jsx(ma.Fragment,{children:t}):Y.jsx(ma.Fragment,{children:n})}function Af(){return ma.useSyncExternalStore(XR,()=>!0,()=>!1)}function XR(){return()=>{}}var u0=re.createContext(null);function vt(t){return re.useContext(u0)}var eu=re.createContext(void 0),ZR=re.createContext(void 0),$e=(t=>(t[t.None=0]="None",t[t.Mutable=1]="Mutable",t[t.Watching=2]="Watching",t[t.RecursedCheck=4]="RecursedCheck",t[t.Recursed=8]="Recursed",t[t.Dirty=16]="Dirty",t[t.Pending=32]="Pending",t))($e||{});function WR({update:t,notify:n,unwatched:s}){return{link:i,unlink:l,propagate:u,checkDirty:c,shallowPropagate:d};function i(g,m,y){const b=m.depsTail;if(b!==void 0&&b.dep===g)return;const _=b!==void 0?b.nextDep:m.deps;if(_!==void 0&&_.dep===g){_.version=y,m.depsTail=_;return}const w=g.subsTail;if(w!==void 0&&w.version===y&&w.sub===m)return;const A=m.depsTail=g.subsTail={version:y,dep:g,sub:m,prevDep:b,nextDep:_,prevSub:w,nextSub:void 0};_!==void 0&&(_.prevDep=A),b!==void 0?b.nextDep=A:m.deps=A,w!==void 0?w.nextSub=A:g.subs=A}function l(g,m=g.sub){const y=g.dep,b=g.prevDep,_=g.nextDep,w=g.nextSub,A=g.prevSub;return _!==void 0?_.prevDep=b:m.depsTail=b,b!==void 0?b.nextDep=_:m.deps=_,w!==void 0?w.prevSub=A:y.subsTail=A,A!==void 0?A.nextSub=w:(y.subs=w)===void 0&&s(y),_}function u(g){let m=g.nextSub,y;
12e:do{const b=g.sub;let _=b.flags;if(_&60?_&12?_&4?!(_&48)&&p(g,b)?(b.flags=_|40,_&=1):_=0:b.flags=_&-9|32:_=0:b.flags=_|32,_&2&&n(b),_&1){const w=b.subs;if(w!==void 0){const A=(g=w).nextSub;A!==void 0&&(y={value:m,prev:y},m=A);continue}}if((g=m)!==void 0){m=g.nextSub;continue}for(;y!==void 0;)if(g=y.value,y=y.prev,g!==void 0){m=g.nextSub;continue e}break}while(!0)}function c(g,m){let y,b=0,_=!1;e:do{const w=g.dep,A=w.flags;if(m.flags&16)_=!0;else if((A&17)===17){if(t(w)){const R=w.subs;R.nextSub!==void 0&&d(R),_=!0}}else if((A&33)===33){(g.nextSub!==void 0||g.prevSub!==void 0)&&(y={value:g,prev:y}),g=w.deps,m=w,++b;continue}if(!_){const R=g.nextDep;if(R!==void 0){g=R;continue}}for(;b--;){const R=m.subs,O=R.nextSub!==void 0;if(O?(g=y.value,y=y.prev):g=R,_){if(t(m)){O&&d(R),m=g.sub;continue}_=!1}else m.flags&=-33;m=g.sub;const U=g.nextDep;if(U!==void 0){g=U;continue e}}return _}while(!0)}function d(g){do{const m=g.sub,y=m.flags;(y&48)===32&&(m.flags=y|16,(y&6)===2&&n(m))}while((g=g.nextSub)!==void 0)}function p(g,m){let y=m.depsTail;for(;y!==void 0;){if(y===g)return!0;y=y.prevDep}return!1}}function eA(t,n,s){const i=typeof t=="object",l=i?t:void 0;return{next:(i?t.next:t)?.bind(l),error:(i?t.error:n)?.bind(l),complete:(i?t.complete:s)?.bind(l)}}const Qh=[];let jl=0;const{link:bm,unlink:tA,propagate:nA,checkDirty:c0,shallowPropagate:_m}=WR({update(t){return t._update()},notify(t){Qh[Jh++]=t,t.flags&=~$e.Watching},unwatched(t){t.depsTail!==void 0&&(t.depsTail=void 0,t.flags=$e.Mutable|$e.Dirty,Bl(t))}});let ml=0,Jh=0,mn,Xh=0;function h0(t){try{++Xh,t()}finally{--Xh||f0()}}function Bl(t){const n=t.depsTail;let s=n!==void 0?n.nextDep:t.deps;for(;s!==void 0;)s=tA(s,t)}function f0(){if(!(Xh>0)){for(;ml<Jh;){const t=Qh[ml];Qh[ml++]=void 0,t.notify()}ml=0,Jh=0}}function Sm(t,n){const s=typeof t=="function",i=t,l={_snapshot:s?void 0:t,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:s?$e.None:$e.Mutable,get(){return mn!==void 0&&bm(l,mn,jl),l._snapshot},subscribe(u){const c=eA(u),d={current:!1},p=rA(()=>{l.get(),d.current?c.next?.(l._snapshot):d.current=!0});return{unsubscribe:()=>{p.stop()}}},_update(u){const c=mn,d=n?.compare??Object.is;if(s)mn=l,++jl,l.depsTail=void 0;else if(u===void 0)return!1;s&&(l.flags=$e.Mutable|$e.RecursedCheck);try{const p=l._snapshot,g=typeof u=="function"?u(p):u===void 0&&s?i(p):u;return p===void 0||!d(p,g)?(l._snapshot=g,!0):!1}finally{mn=c,s&&(l.flags&=~$e.RecursedCheck),Bl(l)}}};return s?(l.flags=$e.Mutable|$e.Dirty,l.get=function(){const u=l.flags;if(u&$e.Dirty||u&$e.Pending&&c0(l.deps,l)){if(l._update()){const c=l.subs;c!==void 0&&_m(c)}}else u&$e.Pending&&(l.flags=u&~$e.Pending);return mn!==void 0&&bm(l,mn,jl),l._snapshot}):l.set=function(u){if(l._update(u)){const c=l.subs;c!==void 0&&(nA(c),_m(c),f0())}},l}function rA(t){const n=()=>{const i=mn;mn=s,++jl,s.depsTail=void 0,s.flags=$e.Watching|$e.RecursedCheck;try{return t()}finally{mn=i,s.flags&=~$e.RecursedCheck,Bl(s)}},s={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:$e.Watching|$e.RecursedCheck,notify(){const i=this.flags;i&$e.Dirty||i&$e.Pending&&c0(this.deps,this)?n():this.flags=$e.Watching},stop(){this.flags=$e.None,this.depsTail=void 0,Bl(this)}};return n(),s}var Uh={exports:{}},Nh={},Dh={exports:{}},Lh={};var wm;function sA(){if(wm)return Lh;wm=1;var t=Gi();function n(y,b){return y===b&&(y!==0||1/y===1/b)||y!==y&&b!==b}var s=typeof Object.is=="function"?Object.is:n,i=t.useState,l=t.useEffect,u=t.useLayoutEffect,c=t.useDebugValue;function d(y,b){var _=b(),w=i({inst:{value:_,getSnapshot:b}}),A=w[0].inst,R=w[1];return u(function(){A.value=_,A.getSnapshot=b,p(A)&&R({inst:A})},[y,_,b]),l(function(){return p(A)&&R({inst:A}),y(function(){p(A)&&R({inst:A})})},[y]),c(_),_}function p(y){var b=y.getSnapshot;y=y.value;try{var _=b();return!s(y,_)}catch{return!0}}function g(y,b){return b()}var m=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?g:d;return Lh.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:m,Lh}var Em;function aA(){return Em||(Em=1,Dh.exports=sA()),Dh.exports}var Tm;
12function iA(){if(Tm)return Nh;Tm=1;var t=Gi(),n=aA();function s(g,m){return g===m&&(g!==0||1/g===1/m)||g!==g&&m!==m}var i=typeof Object.is=="function"?Object.is:s,l=n.useSyncExternalStore,u=t.useRef,c=t.useEffect,d=t.useMemo,p=t.useDebugValue;return Nh.useSyncExternalStoreWithSelector=function(g,m,y,b,_){var w=u(null);if(w.current===null){var A={hasValue:!1,value:null};w.current=A}else A=w.current;w=d(function(){function O(V){if(!U){if(U=!0,j=V,V=b(V),_!==void 0&&A.hasValue){var q=A.value;if(_(q,V))return L=q}return L=V}if(q=L,i(j,V))return q;var K=b(V);return _!==void 0&&_(q,K)?(j=V,q):(j=V,L=K)}var U=!1,j,L,Q=y===void 0?null:y;return[function(){return O(m())},Q===null?void 0:function(){return O(Q())}]},[m,y,b,_]);var R=l(g,w[0],w[1]);return c(function(){A.hasValue=!0,A.value=R},[R]),p(R),R},Nh}var Rm;function oA(){return Rm||(Rm=1,Uh.exports=iA()),Uh.exports}var lA=oA();function uA(t,n){return t===n}function nt(t,n,s=uA){const i=re.useCallback(c=>{if(!t)return()=>{};const{unsubscribe:d}=t.subscribe(c);return d},[t]),l=re.useCallback(()=>t?.get(),[t]);return lA.useSyncExternalStoreWithSelector(i,l,l,n,s)}var cA={get:()=>{},subscribe:()=>({unsubscribe:()=>{}})};function ds(t){const n=vt(),s=re.useContext(t.from?ZR:eu),i=t.from??s,l=i?t.from?n.stores.getRouteMatchStore(i):n.stores.matchStores.get(i):void 0,u=re.useRef(void 0);return nt(l??cA,c=>{if((t.shouldThrow??!0)&&!c&&Ut(),c===void 0)return;const d=t.select?t.select(c):c;if(t.structuralSharing??n.options.defaultStructuralSharing){const p=ss(u.current,d);return u.current=p,p}return d})}function d0(t){return ds({from:t.from,strict:t.strict,structuralSharing:t.structuralSharing,select:n=>t.select?t.select(n.loaderData):n.loaderData})}function p0(t){const{select:n,...s}=t;return ds({...s,select:i=>n?n(i.loaderDeps):i.loaderDeps})}function g0(t){return ds({from:t.from,shouldThrow:t.shouldThrow,structuralSharing:t.structuralSharing,strict:t.strict,select:n=>{const s=t.strict===!1?n.params:n._strictParams;return t.select?t.select(s):s}})}function y0(t){return ds({from:t.from,strict:t.strict,shouldThrow:t.shouldThrow,structuralSharing:t.structuralSharing,select:n=>t.select?t.select(n.search):n.search})}function m0(t){const n=vt();return re.useCallback(s=>n.navigate({...s,from:s.from??t?.from}),[t?.from,n])}function v0(t){return ds({...t,select:n=>t.select?t.select(n.context):n.context})}var hA=pv();function fA(t,n){const s=vt(),i=VR(n),{activeProps:l,inactiveProps:u,activeOptions:c,to:d,preload:p,preloadDelay:g,preloadIntentProximity:m,hashScrollIntoView:y,replace:b,startTransition:_,resetScroll:w,viewTransition:A,children:R,target:O,disabled:U,style:j,className:L,onClick:Q,onBlur:V,onFocus:q,onMouseEnter:K,onMouseLeave:J,onTouchStart:le,ignoreBlocker:se,params:me,search:Ce,hash:Ye,state:Be,mask:B,reloadDocument:F,unsafeRelative:oe,from:Re,_fromLocation:Oe,...k}=t,$=Af(),X=re.useMemo(()=>t,[s,t.from,t._fromLocation,t.hash,t.to,t.search,t.params,t.state,t.mask,t.unsafeRelative]),W=nt(s.stores.location,ze=>ze,(ze,ct)=>ze.href===ct.href),ae=re.useMemo(()=>{const ze={_fromLocation:W,...X};return s.buildLocation(ze)},[s,W,X]),pe=ae.maskedLocation?ae.maskedLocation.publicHref:ae.publicHref,Se=ae.maskedLocation?ae.maskedLocation.external:ae.external,Fe=re.useMemo(()=>vA(pe,Se,s.history,U),[U,Se,pe,s.history]),Ne=re.useMemo(()=>{if(Fe?.external)return Ul(Fe.href,s.protocolAllowlist)?void 0:Fe.href;if(!bA(d)&&!(typeof d!="string"||d.indexOf(":")===-1))try{return new URL(d),Ul(d,s.protocolAllowlist)?void 0:d}catch{}},[d,Fe,s.protocolAllowlist]),Sn=re.useMemo(()=>{if(Ne)return!1;if(c?.exact){if(!rw(W.pathname,ae.pathname,s.basepath))return!1}else{const ze=Nl(W.pathname,s.basepath),ct=Nl(ae.pathname,s.basepath);if(!(ze.startsWith(ct)&&(ze.length===ct.length||ze[ct.length]==="/")))return!1}return(c?.includeSearch??!0)&&!jt(W.search,ae.search,{partial:!c?.exact,ignoreUndefined:!c?.explicitUndefined})?!1:c?.includeHash?$&&W.hash===ae.hash:!0},[c?.exact,c?.explicitUndefined,c?.includeHash,c?.includeSearch,W,Ne,$,ae.hash,ae.pathname,ae.search,s.basepath]),wn=Sn?Ar(l,{})??dA:zh,Jn=Sn?zh:Ar(u,{}
12)??zh,_a=[L,wn.className,Jn.className].filter(Boolean).join(" "),cn=(j||wn.style||Jn.style)&&{...j,...wn.style,...Jn.style},[Sa,ps]=re.useState(!1),Fi=re.useRef(!1),En=t.reloadDocument||Ne?!1:p??s.options.defaultPreload,Dr=g??s.options.defaultPreloadDelay??0,tn=re.useCallback(()=>{s.preloadRoute({...X,_builtLocation:ae}).catch(ze=>{console.warn(ze),console.warn(Bw)})},[s,X,ae]);GR(i,re.useCallback(ze=>{ze?.isIntersecting&&tn()},[tn]),mA,{disabled:!!U||En!=="viewport"}),re.useEffect(()=>{Fi.current||!U&&En==="render"&&(tn(),Fi.current=!0)},[U,tn,En]);const wa=ze=>{const ct=ze.currentTarget.getAttribute("target"),hn=O!==void 0?O:ct;if(!U&&!_A(ze)&&!ze.defaultPrevented&&(!hn||hn==="_self")&&ze.button===0){ze.preventDefault(),hA.flushSync(()=>{ps(!0)});const gs=s.subscribe("onResolved",()=>{gs(),ps(!1)});s.navigate({...X,replace:b,resetScroll:w,hashScrollIntoView:y,startTransition:_,viewTransition:A,ignoreBlocker:se})}};if(Ne)return{...k,ref:i,href:Ne,...R&&{children:R},...O&&{target:O},...U&&{disabled:U},...j&&{style:j},...L&&{className:L},...Q&&{onClick:Q},...V&&{onBlur:V},...q&&{onFocus:q},...K&&{onMouseEnter:K},...J&&{onMouseLeave:J},...le&&{onTouchStart:le}};const Qi=ze=>{if(U||En!=="intent")return;if(!Dr){tn();return}const ct=ze.currentTarget;if(wi.has(ct))return;const hn=setTimeout(()=>{wi.delete(ct),tn()},Dr);wi.set(ct,hn)},iu=ze=>{U||En!=="intent"||tn()},bt=ze=>{if(U||!En||!Dr)return;const ct=ze.currentTarget,hn=wi.get(ct);hn&&(clearTimeout(hn),wi.delete(ct))};return{...k,...wn,...Jn,href:Fe?.href,ref:i,onClick:ea([Q,wa]),onBlur:ea([V,bt]),onFocus:ea([q,Qi]),onMouseEnter:ea([K,Qi]),onMouseLeave:ea([J,bt]),onTouchStart:ea([le,iu]),disabled:!!U,target:O,...cn&&{style:cn},..._a&&{className:_a},...U&&pA,...Sn&&gA,...$&&Sa&&yA}}var zh={},dA={className:"active"},pA={role:"link","aria-disabled":!0},gA={"data-status":"active","aria-current":"page"},yA={"data-transitioning":"transitioning"},wi=new WeakMap,mA={rootMargin:"100px"},ea=t=>n=>{for(const s of t)if(s){if(n.defaultPrevented)return;s(n)}};function vA(t,n,s,i){if(!i)return n?{href:t,external:!0}:{href:s.createHref(t)||"/",external:!1}}function bA(t){if(typeof t!="string")return!1;const n=t.charCodeAt(0);return n===47?t.charCodeAt(1)!==47:n===46}var Of=re.forwardRef((t,n)=>{const{_asChild:s,...i}=t,{type:l,...u}=fA(i,n),c=typeof i.children=="function"?i.children({isActive:u["data-status"]==="active"}):i.children;if(!s){const{disabled:d,...p}=u;return re.createElement("a",p,c)}return re.createElement(s,u,c)});function _A(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}var SA=class extends Ov{constructor(n){super(n),this.useMatch=s=>ds({select:s?.select,from:this.id,structuralSharing:s?.structuralSharing}),this.useRouteContext=s=>v0({...s,from:this.id}),this.useSearch=s=>y0({select:s?.select,structuralSharing:s?.structuralSharing,from:this.id}),this.useParams=s=>g0({select:s?.select,structuralSharing:s?.structuralSharing,from:this.id}),this.useLoaderDeps=s=>p0({...s,from:this.id}),this.useLoaderData=s=>d0({...s,from:this.id}),this.useNavigate=()=>m0({from:this.fullPath}),this.Link=ma.forwardRef((s,i)=>Y.jsx(Of,{ref:i,from:this.fullPath,...s}))}};function wA(t){return new SA(t)}function EA(){return t=>RA(t)}var TA=class extends $w{constructor(t){super(t),this.useMatch=n=>ds({select:n?.select,from:this.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>v0({...n,from:this.id}),this.useSearch=n=>y0({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useParams=n=>g0({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useLoaderDeps=n=>p0({...n,from:this.id}),this.useLoaderData=n=>d0({...n,from:this.id}),this.useNavigate=()=>m0({from:this.fullPath}),this.Link=ma.forwardRef((n,s)=>Y.jsx(Of,{ref:s,from:this.fullPath,...n}))}};function RA(t){return new TA(t)}function Cf(t){return new AA(t,{silent:!0}).createRoute}var AA=class{constructor(t,n){this.path=t,this.createRoute=s=>{const i=wA(s);return i.isRoot=!1,i},this.silent=n?.silent}};function b0(t,n){let s,i,l,u;const c=()=>(s||(s=t().then(p=>{s=void 0,i=p[n]}).catch(p=>{if(l=p,PS(l)&&l instanceof Error&&typeof window<"u"&&typeof sessionStorage<"u"){const g=`tanstack_router_reload:${l.message}`;sessionStorage.getItem(g)||(sessionStorage.setItem(g,"1"),u=!0)}})),s),d=function(g){if(u)throw window.location.reload(),new Promise(()=>{});if(l)throw l;if(!i)if(Pl)Pl(c());else throw c();return re.createElement(i,g)};return d.preload=c,d}function OA(t){const n=vt(),s=`not-found-${nt(n.stores.location,i=>i.pathname)}-${nt(n.stores.status,i=>i)}`;return Y.jsx(Tf,{getResetKey:()=>s,onCatch:(i,l)=>{if(ut(i))t.onCatch?.(i,l);else throw i},errorComponent:({error:i})=>{if(ut(i))return t.fallback?.(i);throw i},children:t.children})}function CA(){return Y.jsx("p",{children:"Not Found"})}function ia(t){return Y.jsx(Y.Fragment,{children:t.children})}function _0(t,n,s){return n.options.notFoundComponent?Y.jsx(n.options.notFoundComponent,{...s}):t.options.defaultNotFoundComponent?Y.jsx(t.options.defaultNotFoundComponent,{...s}):Y.jsx(CA,{})}function xA(t){return null}function kA(){return xA(vt()),null}
12var S0=re.memo(function({matchId:n}){const s=vt(),i=s.stores.matchStores.get(n);i||Ut();const l=nt(s.stores.loadedAt,c=>c),u=nt(i,c=>c);return Y.jsx(jA,{router:s,matchId:n,resetKey:l,matchState:re.useMemo(()=>{const c=u.routeId,d=s.routesById[c].parentRoute?.id;return{routeId:c,ssr:u.ssr,_displayPending:u._displayPending,parentRouteId:d}},[u._displayPending,u.routeId,u.ssr,s.routesById])})});function jA({router:t,matchId:n,resetKey:s,matchState:i}){const l=t.routesById[i.routeId],u=l.options.pendingComponent??t.options.defaultPendingComponent,c=u?Y.jsx(u,{}):null,d=l.options.errorComponent??t.options.defaultErrorComponent,p=l.options.onCatch??t.options.defaultOnCatch,g=l.isRoot?l.options.notFoundComponent??t.options.notFoundRoute?.options.component:l.options.notFoundComponent,m=i.ssr===!1||i.ssr==="data-only",y=(!l.isRoot||l.options.wrapInSuspense||m)&&(l.options.wrapInSuspense??u??(l.options.errorComponent?.preload||m))?re.Suspense:ia,b=d?Tf:ia,_=g?OA:ia;return Y.jsxs(l.isRoot?l.options.shellComponent??ia:ia,{children:[Y.jsx(eu.Provider,{value:n,children:Y.jsx(y,{fallback:c,children:Y.jsx(b,{getResetKey:()=>s,errorComponent:d||Rf,onCatch:(w,A)=>{if(ut(w))throw w.routeId??=i.routeId,w;p?.(w,A)},children:Y.jsx(_,{fallback:w=>{if(w.routeId??=i.routeId,!g||w.routeId&&w.routeId!==i.routeId||!w.routeId&&
12!l.isRoot)throw w;return re.createElement(g,w)},children:m||i._displayPending?Y.jsx(JR,{fallback:c,children:Y.jsx(Am,{matchId:n})}):Y.jsx(Am,{matchId:n})})})})}),i.parentRouteId===us?Y.jsxs(Y.Fragment,{children:[Y.jsx(MA,{resetKey:s}),t.options.scrollRestoration&&yv?Y.jsx(kA,{}):null]}):null]})}function MA({resetKey:t}){const n=vt(),s=re.useRef(void 0);return Ti(()=>{const i=n.latestLocation.href;(s.current===void 0||s.current!==i)&&(n.emit({type:"onRendered",...da(n.stores.location.get(),n.stores.resolvedLocation.get())}),s.current=i)},[n.latestLocation.state.__TSR_key,t,n]),null}var Am=re.memo(function({matchId:n}){const s=vt(),i=(m,y)=>s.getMatch(m.id)?._nonReactive[y]??m._nonReactive[y],l=s.stores.matchStores.get(n);l||Ut();const u=nt(l,m=>m),c=u.routeId,d=s.routesById[c],p=re.useMemo(()=>{const m=(s.routesById[c].options.remountDeps??s.options.defaultRemountDeps)?.({routeId:c,loaderDeps:u.loaderDeps,params:u._strictParams,search:u._strictSearch});return m?JSON.stringify(m):void 0},[c,u.loaderDeps,u._strictParams,u._strictSearch,s.options.defaultRemountDeps,s.routesById]),g=re.useMemo(()=>{const m=d.options.component??s.options.defaultComponent;return m?Y.jsx(m,{},p):Y.jsx(w0,{})},[p,d.options.component,s.options.defaultComponent]);if(u._displayPending)throw i(u,"displayPendingPromise");if(u._forcePending)throw i(u,"minPendingPromise");if(u.status==="pending"){const m=d.options.pendingMinMs??s.options.defaultPendingMinMs;if(m){const y=s.getMatch(u.id);if(y&&!y._nonReactive.minPendingPromise){const b=hs();y._nonReactive.minPendingPromise=b,setTimeout(()=>{b.resolve(),y._nonReactive.minPendingPromise=void 0},m)}}throw i(u,"loadPromise")}if(u.status==="notFound")return ut(u.error)||Ut(),_0(s,d,u.error);if(u.status==="redirected")throw Mt(u.error)||Ut(),i(u,"loadPromise");if(u.status==="error")throw u.error;return g}),w0=re.memo(function(){const n=vt(),s=re.useContext(eu);let i,l=!1,u;{const g=s?n.stores.matchStores.get(s):void 0;[i,l]=nt(g,m=>[m?.routeId,m?.globalNotFound??!1]),u=nt(n.stores.matchesId,m=>m[m.findIndex(y=>y===s)+1])}const c=i?n.routesById[i]:void 0,d=n.options.defaultPendingComponent?Y.jsx(n.options.defaultPendingComponent,{}):null;if(l)return c||Ut(),_0(n,c,void 0);if(!u)return null;const p=Y.jsx(S0,{matchId:u});return i===us?Y.jsx(re.Suspense,{fallback:d,children:p}):p});function UA(){const t=vt(),n=re.useRef({router:t,mounted:!1}),[s,i]=re.useState(!1),l=nt(t.stores.isLoading,y=>y),u=nt(t.stores.hasPending,y=>y),c=Mh(l),d=l||s||u,p=Mh(d),g=l||u,m=Mh(g);return t.startTransition=y=>{i(!0),re.startTransition(()=>{y(),i(!1)})},re.useEffect(()=>{const y=t.history.subscribe(t.load),b=t.buildLocation({to:t.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return xr(t.latestLocation.publicHref)!==xr(b.publicHref)&&t.commitLocation({...b,replace:!0}),()=>{y()}},[t,t.history]),Ti(()=>{if(typeof window<"u"&&t.ssr||n.current.router===t&&n.current.mounted)return;n.current={router:t,mounted:!0},(async()=>{try{await t.load()}catch(b){console.error(b)}})()},[t]),Ti(()=>{c&&!l&&t.emit({type:"onLoad",...da(t.stores.location.get(),t.stores.resolvedLocation.get())})},[c,t,l]),Ti(()=>{m&&!g&&t.emit({type:"onBeforeRouteMount",...da(t.stores.location.get(),t.stores.resolvedLocation.get())})},[g,m,t]),Ti(()=>{if(p&&!d){const y=da(t.stores.location.get(),t.stores.resolvedLocation.get());t.emit({type:"onResolved",...y}),h0(()=>{t.stores.status.set("idle"),t.stores.resolvedLocation.set(t.stores.location.get())}),y.hrefChanged&&Gw(t)}},[d,p,t]),null}function NA(){const t=vt(),n=t.routesById[us].options.pendingComponent??t.options.defaultPendingComponent,s=n?Y.jsx(n,{}):null,i=Y.jsxs(typeof document<"u"&&t.ssr?ia:re.Suspense,{fallback:s,children:[Y.jsx(UA,{}),Y.jsx(DA,{})]});return t.options.InnerWrap?Y.jsx(t.options.InnerWrap,{children:i}):i}function DA(){const t=vt(),n=nt(t.stores.firstId,l=>l),s=nt(t.stores.loadedAt,l=>l),i=n?Y.jsx(S0,{matchId:n}):null;return Y.jsx(eu.Provider,{value:n,children:t.options.disableGlobalCatchBoundary?i:Y.jsx(Tf,{getResetKey:()=>s,errorComponent:Rf,onCatch:void 0,children:i})})}var LA=t=>({createMutableStore:Sm,createReadonlyStore:Sm,batch:h0}),zA=t=>new PA(t),PA=class extends jw{constructor(t){super(t,LA)}};function BA({router:t,children:n,...s}){Object.keys(s).length>0&&t.update({...t.options,...s,context:{...t.options.context,...s.context}});const i=Y.jsx(u0.Provider,{value:t,children:n});return t.options.Wrap?Y.jsx(t.options.Wrap,{children:i}):i}function HA({router:t,...n}){return Y.jsx(BA,{router:t,...n,children:Y.jsx(NA,{})})}function E0(t){const{attrs:n,children:s,nonce:i}=t;switch(t.tag){case"title":return Y.jsx("title",{...n,suppressHydrationWarning:!0,children:s});case"meta":return Y.jsx("meta",{...n,suppressHydrationWarning:!0});case"link":return Y.jsx("link",{...n,precedence:n?.precedence??(n?.rel==="stylesheet"?"default":void 0),nonce:i,suppressHydrationWarning:!0});case"style":return t.inlineCss,Y.jsx("style",{...n,dangerouslySetInnerHTML:{__html:s},nonce:i});case"script":return Y.jsx(qA,{attrs:n,children:s});default:return null}}function qA({attrs:t,children:n}){vt();const s=Af(),i=typeof t?.type=="string"&&t.type!==""&&t.type!=="text/javascript"&&t.type!=="module";if(re.useEffect(()=>{if(!i){if(t?.src){const l=(()=>{try{const c=document.baseURI||window.location.href;return new URL(t.src,c).href}catch{return t.src}})();if(Array.from(document.querySelectorAll("script[src]")).find(c=>c.src===l))return;const u=document.createElement("script");for(const[c,d]of Object.entries(t))c!=="suppressHydrationWarning"&&d!==void 0&&d!==!1&&u.setAttribute(c,typeof d=="boolean"?"":String(d));return document.head.appendChild(u),()=>{u.parentNode&&u.parentNode.removeChild(u)}}if(typeof n=="string"){const l=typeof t?.type=="string"?t.type:"text/javascript",u=typeof t?.nonce=="string"?t.nonce:void 0;if(Array.from(document.querySelectorAll("script:not([src])")).find(d=>{if(!(d instanceof HTMLScriptElement))return!1;const p=d.getAttribute("type")??"text/javascript",g=d.getAttribute("nonce")??void 0;return d.textContent===n&&p===l&&g===u}))return;const c=document.createElement("script");
12if(c.textContent=n,t)for(const[d,p]of Object.entries(t))d!=="suppressHydrationWarning"&&p!==void 0&&p!==!1&&c.setAttribute(d,typeof p=="boolean"?"":String(p));return document.head.appendChild(c),()=>{c.parentNode&&c.parentNode.removeChild(c)}}}},[t,n,i]),i&&typeof n=="string")return Y.jsx("script",{...t,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:n}});if(!s){if(t?.src)return Y.jsx("script",{...t,suppressHydrationWarning:!0});if(typeof n=="string")return Y.jsx("script",{...t,dangerouslySetInnerHTML:{__html:n},suppressHydrationWarning:!0})}return null}var IA=t=>{const n=vt(),s=n.options.ssr?.nonce,i=nt(n.stores.matches,g=>g.map(m=>m.meta).filter(Boolean),jt),l=re.useMemo(()=>{const g=[],m={};let y;for(let b=i.length-1;b>=0;b--){const _=i[b];for(let w=_.length-1;w>=0;w--){const A=_[w];if(A)if(A.title)y||(y={tag:"title",children:A.title});else if("script:ld+json"in A)try{const R=JSON.stringify(A["script:ld+json"]);g.push({tag:"script",attrs:{type:"application/ld+json"},children:$S(R)})}catch{}else{const R=A.name??A.property;if(R){if(m[R])continue;m[R]=!0}g.push({tag:"meta",attrs:{...A,nonce:s}})}}}return y&&g.push(y),s&&g.push({tag:"meta",attrs:{property:"csp-nonce",content:s}}),g.reverse(),g},[i,s]),u=nt(n.stores.matches,g=>{const m=g.map(_=>_.links).filter(Boolean).flat(1).map(_=>({tag:"link",attrs:{..._,nonce:s}})),y=n.ssr?.manifest,b=g.map(_=>y?.routes[_.routeId]?.assets??[]).filter(Boolean).flat(1).flatMap(_=>_.tag==="link"?Iw(y,_)?[]:[{tag:"link",attrs:{..._.attrs,crossOrigin:am(t,"stylesheet")??_.attrs?.crossOrigin,suppressHydrationWarning:!0,nonce:s}}]:_.tag==="style"?[{tag:"style",attrs:{..._.attrs,nonce:s},children:_.children,..._.inlineCss?{inlineCss:!0}:{}}]:[]);return[...m,...b]},jt),c=nt(n.stores.matches,g=>{const m=[];return g.map(y=>n.looseRoutesById[y.routeId]).forEach(y=>n.ssr?.manifest?.routes[y.id]?.preloads?.filter(Boolean).forEach(b=>{const _=Hw(b);m.push({tag:"link",attrs:{rel:"modulepreload",href:_.href,crossOrigin:am(t,"modulepreload")??_.crossOrigin,nonce:s}})})),m},jt),d=nt(n.stores.matches,g=>g.map(m=>m.styles).flat(1).filter(Boolean).map(({children:m,...y})=>({tag:"style",attrs:{...y,nonce:s},children:m})),jt),p=nt(n.stores.matches,g=>g.map(m=>m.headScripts).flat(1).filter(Boolean).map(({children:m,...y})=>({tag:"script",attrs:{...y,nonce:s},children:m})),jt);return $A([...l,...c,...u,...d,...p],g=>JSON.stringify(g))};function $A(t,n){const s=new Set;return t.filter(i=>{const l=n(i);return s.has(l)?!1:(s.add(l),!0)})}function GA(t){const n=IA(t.assetCrossOrigin),s=vt().options.ssr?.nonce;return Y.jsx(Y.Fragment,{children:n.map(i=>re.createElement(E0,{...i,key:`tsr-meta-${JSON.stringify(i)}`,nonce:s}))})}var VA=()=>{const t=vt(),n=t.options.ssr?.nonce,s=u=>{const c=[],d=t.ssr?.manifest;return d?(u.map(p=>t.looseRoutesById[p.routeId]).forEach(p=>d.routes[p.id]?.assets?.filter(g=>g.tag==="script").forEach(g=>{c.push({tag:"script",attrs:{...g.attrs,nonce:n},children:g.children})})),c):[]},i=u=>u.map(c=>c.scripts).flat(1).filter(Boolean).map(({children:c,...d})=>({tag:"script",attrs:{...d,suppressHydrationWarning:!0,nonce:n},children:c})),l=nt(t.stores.matches,s,jt);return KA(t,nt(t.stores.matches,i,jt),l)};function KA(t,n,s){let i;t.serverSsr&&(i=t.serverSsr.takeBufferedScripts());const l=[...n,...s];return i&&l.unshift(i),Y.jsx(Y.Fragment,{children:l.map((u,c)=>re.createElement(E0,{...u,key:`tsr-scripts-${u.tag}-${c}`}))})}var os=(t,n)=>{const s={type:"request",...n||t};return{options:s,middleware:i=>os({},Object.assign(s,{middleware:i})),inputValidator:i=>os({},Object.assign(s,{inputValidator:i})),client:i=>os({},Object.assign(s,{client:i})),server:i=>os({},Object.assign(s,{server:i}))}};function T0(t,n){for(let s=0,i=n.length;s<i;s++){const l=n[s];t.has(l)||(t.add(l),l.extends&&T0(t,l.extends))}}var YA=t=>({getOptions:async()=>{const n=await t();if(n.serializationAdapters){const s=new Set;T0(s,n.serializationAdapters),n.serializationAdapters=Array.from(s)}return n},createMiddleware:os});function tu(t,n){var s={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&n.indexOf(i)<0&&(s[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var l=0,i=Object.getOwnPropertySymbols(t);l<i.length;l++)n.indexOf(i[l])<0&&Object.prototype.propertyIsEnumerable.call(t,i[l])&&(s[i[l]]=t[i[l]]);return s}function FA(t,n,s,i){function l(u){return u instanceof s?u:new s(function(c){c(u)})}
12return new(s||(s=Promise))(function(u,c){function d(m){try{g(i.next(m))}catch(y){c(y)}}function p(m){try{g(i.throw(m))}catch(y){c(y)}}function g(m){m.done?u(m.value):l(m.value).then(d,p)}g((i=i.apply(t,n||[])).next())})}const QA=t=>t?(...n)=>t(...n):(...n)=>fetch(...n);class xf extends Error{constructor(n,s="FunctionsError",i){super(n),this.name=s,this.context=i}toJSON(){return{name:this.name,message:this.message,context:this.context}}}class JA extends xf{constructor(n){super("Failed to send a request to the Edge Function","FunctionsFetchError",n)}}class Om extends xf{constructor(n){super("Relay Error invoking the Edge Function","FunctionsRelayError",n)}}class Cm extends xf{constructor(n){super("Edge Function returned a non-2xx status code","FunctionsHttpError",n)}}var Zh;(function(t){t.Any="any",t.ApNortheast1="ap-northeast-1",t.ApNortheast2="ap-northeast-2",t.ApSouth1="ap-south-1",t.ApSoutheast1="ap-southeast-1",t.ApSoutheast2="ap-southeast-2",t.CaCentral1="ca-central-1",t.EuCentral1="eu-central-1",t.EuWest1="eu-west-1",t.EuWest2="eu-west-2",t.EuWest3="eu-west-3",t.SaEast1="sa-east-1",t.UsEast1="us-east-1",t.UsWest1="us-west-1",t.UsWest2="us-west-2"})(Zh||(Zh={}));class XA{constructor(n,{headers:s={},customFetch:i,region:l=Zh.Any}={}){this.url=n,this.headers=s,this.region=l,this.fetch=QA(i)}setAuth(n){this.headers.Authorization=`Bearer ${n}`}invoke(n){return FA(this,arguments,void 0,function*(s,i={}){var l;let u,c;try{const{headers:d,method:p,body:g,signal:m,timeout:y}=i;let b={},{region:_}=i;_||(_=this.region);const w=new URL(`${this.url}/${s}`);_&&_!=="any"&&(b["x-region"]=_,w.searchParams.set("forceFunctionRegion",_));let A;g&&(d&&!Object.prototype.hasOwnProperty.call(d,"Content-Type")||!d)?typeof Blob<"u"&&g instanceof Blob||g instanceof ArrayBuffer?(b["Content-Type"]="application/octet-stream",A=g):typeof g=="string"?(b["Content-Type"]="text/plain",A=g):typeof FormData<"u"&&g instanceof FormData?A=g:(b["Content-Type"]="application/json",A=JSON.stringify(g)):g&&typeof g!="string"&&!(typeof Blob<"u"&&g instanceof Blob)&&!(g instanceof ArrayBuffer)&&!(typeof FormData<"u"&&g instanceof FormData)?A=JSON.stringify(g):A=g;let R=m;y&&(c=new AbortController,u=setTimeout(()=>c.abort(),y),m?(R=c.signal,m.addEventListener("abort",()=>c.abort())):R=c.signal);const O=yield this.fetch(w.toString(),{method:p||"POST",headers:Object.assign(Object.assign(Object.assign({},b),this.headers),d),body:A,signal:R}).catch(Q=>{throw new JA(Q)}),U=O.headers.get("x-relay-error");if(U&&U==="true")throw new Om(O);if(!O.ok)throw new Cm(O);let j=((l=O.headers.get("Content-Type"))!==null&&l!==void 0?l:"text/plain").split(";")[0].trim(),L;return j==="application/json"?L=yield O.json():j==="application/octet-stream"||j==="application/pdf"?L=yield O.blob():j==="text/event-stream"?L=O:j==="multipart/form-data"?L=yield O.formData():L=yield O.text(),{data:L,error:null,response:O}}catch(d){return{data:null,error:d,response:d instanceof Cm||d instanceof Om?d.context:void 0}}finally{u&&clearTimeout(u)}})}}const R0=3,xm=t=>Math.min(1e3*2**t,3e4),ZA=[520,503],A0=["GET","HEAD","OPTIONS"];var WA=class extends Error{constructor(t){super(t.message),this.name="PostgrestError",this.details=t.details,this.hint=t.hint,this.co
12de=t.code}toJSON(){return{name:this.name,message:this.message,details:this.details,hint:this.hint,code:this.code}}};function km(t,n){return new Promise(s=>{if(n?.aborted){s();return}const i=setTimeout(()=>{n?.removeEventListener("abort",l),s()},t);function l(){clearTimeout(i),s()}n?.addEventListener("abort",l)})}function e1(t,n,s,i){return!(!i||s>=R0||!A0.includes(t)||!ZA.includes(n))}var t1=class{constructor(t){var n,s,i,l,u;this.shouldThrowOnError=!1,this.retryEnabled=!0,this.method=t.method,this.url=t.url,this.headers=new Headers(t.headers),this.schema=t.schema,this.body=t.body,this.shouldThrowOnError=(n=t.shouldThrowOnError)!==null&&n!==void 0?n:!1,this.signal=t.signal,this.isMaybeSingle=(s=t.isMaybeSingle)!==null&&s!==void 0?s:!1,this.shouldStripNulls=(i=t.shouldStripNulls)!==null&&i!==void 0?i:!1,this.urlLengthLimit=(l=t.urlLengthLimit)!==null&&l!==void 0?l:8e3,this.retryEnabled=(u=t.retry)!==null&&u!==void 0?u:!0,t.fetch?this.fetch=t.fetch:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}stripNulls(){if(this.headers.get("Accept")==="text/csv")throw new Error("stripNulls() cannot be used with csv()");return this.shouldStripNulls=!0,this}setHeader(t,n){return this.headers=new Headers(this.headers),this.headers.set(t,n),this}retry(t){return this.retryEnabled=t,this}then(t,n){var s=this;if(this.schema===void 0||(["GET","HEAD"].includes(this.method)?this.headers.set("Accept-Profile",this.schema):this.headers.set("Content-Profile",this.schema)),this.method!=="GET"&&this.method!=="HEAD"&&this.headers.set("Content-Type","application/json"),this.shouldStripNulls){const c=this.headers.get("Accept");c==="application/vnd.pgrst.object+json"?this.headers.set("Accept","application/vnd.pgrst.object+json;nulls=stripped"):(!c||c==="application/json")&&this.headers.set("Accept","application/vnd.pgrst.array+json;nulls=stripped")}const i=this.fetch;let u=(async()=>{let c=0;for(;;){const g=new Headers(s.headers);c>0&&g.set("X-Retry-Count",String(c));let m;try{m=await i(s.url.toString(),{method:s.method,headers:g,body:JSON.stringify(s.body,(y,b)=>typeof b=="bigint"?b.toString():b),signal:s.signal})}catch(y){if(y?.name==="AbortError"||y?.code==="ABORT_ERR"||!A0.includes(s.method))throw y;if(s.retryEnabled&&c<R0){const b=xm(c);c++,await km(b,s.signal);continue}throw y}if(e1(s.method,m.status,c,s.retryEnabled)){var d,p;const y=(d=(p=m.headers)===null||p===void 0?void 0:p.get("Retry-After"))!==null&&d!==void 0?d:null,b=y!==null?Math.max(0,parseInt(y,10)||0)*1e3:xm(c);await m.text(),c++,await km(b,s.signal);continue}return await s.processResponse(m)}})();return this.shouldThrowOnError||(u=u.catch(c=>{var d;let p="",g="",m="";const y=c?.cause;if(y){var b,_,w,A;const U=(b=y?.message)!==null&&b!==void 0?b:"",j=(_=y?.code)!==null&&_!==void 0?_:"";p=`${(w=c?.name)!==null&&w!==void 0?w:"FetchError"}: ${c?.message}`,p+=` 13 14Caused by: ${(A=y?.name)!==null&&A!==void 0?A:"Error"}: ${U}`,j&&(p+=` (${j})`),y?.stack&&(p+=` 15${y.stack}`)}else{var R;p=(R=c?.stack)!==null&&R!==void 0?R:""}const O=this.url.toString().length;return c?.name==="AbortError"||c?.code==="ABORT_ERR"?(m="",g="Request was aborted (timeout or manual cancellation)",O>this.urlLengthLimit&&(g+=`. Note: Your request URL is ${O} characters, which may exceed server limits. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [many IDs])), consider using an RPC function to pass values server-side.`)):(y?.name==="HeadersOverflowError"||y?.code==="UND_ERR_HEADERS_OVERFLOW")&&(m="",g="HTTP headers exceeded server limits (typically 16KB)",O>this.urlLengthLimit&&(g+=`. Your request URL is ${O} characters. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [200+ IDs])), consider using an RPC function instead.`)),{success:!1,error:{message:`${(d=c?.name)!==null&&d!==void 0?d:"FetchError"}: ${c?.message}`,details:p,hint:g,code:m},data:null,count:null,status:0,statusText:""}})),u.then(t,n)}async processResponse(t){var n=this;
15let s=null,i=null,l=null,u=t.status,c=t.statusText;if(t.ok){var d,p;if(n.method!=="HEAD"){var g;const b=await t.text();b===""||(n.headers.get("Accept")==="text/csv"||n.headers.get("Accept")&&(!((g=n.headers.get("Accept"))===null||g===void 0)&&g.includes("application/vnd.pgrst.plan+text"))?i=b:i=JSON.parse(b))}const m=(d=n.headers.get("Prefer"))===null||d===void 0?void 0:d.match(/count=(exact|planned|estimated)/),y=(p=t.headers.get("content-range"))===null||p===void 0?void 0:p.split("/");m&&y&&y.length>1&&(l=parseInt(y[1])),n.isMaybeSingle&&Array.isArray(i)&&(i.length>1?(s={code:"PGRST116",details:`Results contain ${i.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},i=null,l=null,u=406,c="Not Acceptable"):i.length===1?i=i[0]:i=null)}else{const m=await t.text();try{s=JSON.parse(m),Array.isArray(s)&&t.status===404&&(i=[],s=null,u=200,c="OK")}catch{t.status===404&&m===""?(u=204,c="No Content"):s={message:m}}if(s&&n.shouldThrowOnError)throw new WA(s)}return{success:s===null,error:s,data:i,count:l,status:u,statusText:c}}returns(){return this}overrideTypes(){return this}},n1=class extends t1{select(t){let n=!1;const s=(t??"*").split("").map(i=>/\s/.test(i)&&!n?"":(i==='"'&&(n=!n),i)).join("");return this.url.searchParams.set("select",s),this.headers.append("Prefer","return=representation"),this}order(t,{ascending:n=!0,nullsFirst:s,foreignTable:i,referencedTable:l=i}={}){const u=l?`${l}.order`:"order",c=this.url.searchParams.get(u);return this.url.searchParams.set(u,`${c?`${c},`:""}${t}.${n?"asc":"desc"}${s===void 0?"":s?".nullsfirst":".nullslast"}`),this}limit(t,{foreignTable:n,referencedTable:s=n}={}){const i=typeof s>"u"?"limit":`${s}.limit`;return this.url.searchParams.set(i,`${t}`),this}range(t,n,{foreignTable:s,referencedTable:i=s}={}){const l=typeof i>"u"?"offset":`${i}.offset`,u=typeof i>"u"?"limit":`${i}.limit`;return this.url.searchParams.set(l,`${t}`),this.url.searchParams.set(u,`${n-t+1}`),this}abortSignal(t){return this.signal=t,this}single(){return this.headers.set("Accept","application/vnd.pgrst.object+json"),this}maybeSingle(){return this.isMaybeSingle=!0,this}csv(){return this.headers.set("Accept","text/csv"),this}geojson(){return this.headers.set("Accept","application/geo+json"),this}explain({analyze:t=!1,verbose:n=!1,settings:s=!1,buffers:i=!1,wal:l=!1,format:u="text"}={}){var c;const d=[t?"analyze":null,n?"verbose":null,s?"settings":null,i?"buffers":null,l?"wal":null].filter(Boolean).join("|"),p=(c=this.headers.get("Accept"))!==null&&c!==void 0?c:"application/json";return this.headers.set("Accept",`application/vnd.pgrst.plan+${u}; for="${p}"; options=${d};`),u==="json"?this:this}rollback(){return this.headers.append("Prefer","tx=rollback"),this}returns(){return this}maxAffected(t){return this.headers.append("Prefer","handling=strict"),this.headers.append("Prefer",`max-affected=${t}`),this}};const jm=new RegExp("[,()]");var oa=class extends n1{eq(t,n){return this.url.searchParams.append(t,`eq.${n}`),this}neq(t,n){return this.url.searchParams.append(t,`neq.${n}`),this}gt(t,n){return this.url.searchParams.append(t,`gt.${n}`),this}gte(t,n){return this.url.searchParams.append(t,`gte.${n}`),this}lt(t,n){return this.url.searchParams.append(t,`lt.${n}`),this}lte(t,n){return this.url.searchParams.append(t,`lte.${n}`),this}like(t,n){return this.url.searchParams.append(t,`like.${n}`),this}likeAllOf(t,n){return this.url.searchParams.append(t,`like(all).{${n.join(",")}}`),this}likeAnyOf(t,n){return this.url.searchParams.append(t,`like(any).{${n.join(",")}}`),this}ilike(t,n){return this.url.searchParams.append(t,`ilike.${n}`),this}ilikeAllOf(t,n){return this.url.searchParams.append(t,`ilike(all).{${n.join(",")}}`),this}ilikeAnyOf(t,n){return this.url.searchParams.append(t,`ilike(any).{${n.join(",")}}`),this}regexMatch(t,n){return this.url.searchParams.append(t,`match.${n}`),this}regexIMatch(t,n){return this.url.searchParams.append(t,`imatch.${n}`),this}is(t,n){return this.url.searchParams.append(t,`is.${n}`),this}isDistinct(t,n){return this.url.searchParams.append(t,`isdistinct.${n}`),this}in(t,n){const s=Array.from(new Set(n)).map(i=>typeof i=="string"&&jm.test(i)?`"${i}"`:`${i}`).join(",");return this.url.searchParams.append(t,`in.(${s})`),this}notIn(t,n){const s=Array.from(new Set(n)).map(i=>typeof i=="string"&&jm.test(i)?`"${i}"`:`${i}`).join(",");return this.url.searchParams.append(t,`not.in.(${s})`),this}contains(t,n){return typeof n=="string"?this.url.searchParams.append(t,`cs.${n}`):Array.isArray(n)?this.url.searchParams.append(t,`cs.{${n.join(",")}}`):this.url.searchParams.append(t,`cs.${JSON.stringify(n)}`),this}containedBy(t,n){return typeof n=="string"?this.url.searchParams.append(t,`cd.${n}`):Array.isArray(n)?this.url.searchParams.append(t,`cd.{${n.join(",")}}`):this.url.searchParams.append(t,`cd.${JSON.stringify(n)}`),this}rangeGt(t,n){return this.url.searchParams.append(t,`sr.${n}`),this}rangeGte(t,n){return this.url.searchParams.append(t,`nxl.${n}`),this}rangeLt(t,n){return this.url.searchParams.append(t,`sl.${n}`),this}rangeLte(t,n){return this.url.searchParams.append(t,`nxr.${n}`),this}rangeAdjacent(t,n){return this.url.searchParams.append(t,`adj.${n}`),this}overlaps(t,n){return typeof n=="string"?this.url.searchParams.append(t,`ov.${n}`):this.url.searchParams.append(t,`ov.{${n.join(",")}}`),this}textSearch(t,n,{config:s,type:i}={}){let l="";i==="plain"?l="pl":i==="phrase"?l="ph":i==="websearch"&&(l="w");const u=s===void 0?"":`(${s})`;return this.url.searchParams.append(t,`${l}fts${u}.${n}`),this}match(t){return Object.entries(t).filter(([n,s])=>
15s!==void 0).forEach(([n,s])=>{this.url.searchParams.append(n,`eq.${s}`)}),this}not(t,n,s){return this.url.searchParams.append(t,`not.${n}.${s}`),this}or(t,{foreignTable:n,referencedTable:s=n}={}){const i=s?`${s}.or`:"or";return this.url.searchParams.append(i,`(${t})`),this}filter(t,n,s){return this.url.searchParams.append(t,`${n}.${s}`),this}},r1=class{constructor(t,{headers:n={},schema:s,fetch:i,urlLengthLimit:l=8e3,retry:u}){this.url=t,this.headers=new Headers(n),this.schema=s,this.fetch=i,this.urlLengthLimit=l,this.retry=u}cloneRequestState(){return{url:new URL(this.url.toString()),headers:new Headers(this.headers)}}select(t,n){const{head:s=!1,count:i}=n??{},l=s?"HEAD":"GET";let u=!1;const c=(t??"*").split("").map(g=>/\s/.test(g)&&!u?"":(g==='"'&&(u=!u),g)).join(""),{url:d,headers:p}=this.cloneRequestState();return d.searchParams.set("select",c),i&&p.append("Prefer",`count=${i}`),new oa({method:l,url:d,headers:p,schema:this.schema,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}insert(t,{count:n,defaultToNull:s=!0}={}){var i;const l="POST",{url:u,headers:c}=this.cloneRequestState();if(n&&c.append("Prefer",`count=${n}`),s||c.append("Prefer","missing=default"),Array.isArray(t)){const d=t.reduce((p,g)=>p.concat(Object.keys(g)),[]);if(d.length>0){const p=[...new Set(d)].map(g=>`"${g}"`);u.searchParams.set("columns",p.join(","))}}return new oa({method:l,url:u,headers:c,schema:this.schema,body:t,fetch:(i=this.fetch)!==null&&i!==void 0?i:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}upsert(t,{onConflict:n,ignoreDuplicates:s=!1,count:i,defaultToNull:l=!0}={}){var u;const c="POST",{url:d,headers:p}=this.cloneRequestState();if(p.append("Prefer",`resolution=${s?"ignore":"merge"}-duplicates`),n!==void 0&&d.searchParams.set("on_conflict",n),i&&p.append("Prefer",`count=${i}`),l||p.append("Prefer","missing=default"),Array.isArray(t)){const g=t.reduce((m,y)=>m.concat(Object.keys(y)),[]);if(g.length>0){const m=[...new Set(g)].map(y=>`"${y}"`);d.searchParams.set("columns",m.join(","))}}return new oa({method:c,url:d,headers:p,schema:this.schema,body:t,fetch:(u=this.fetch)!==null&&u!==void 0?u:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}update(t,{count:n}={}){var s;const i="PATCH",{url:l,headers:u}=this.cloneRequestState();return n&&u.append("Prefer",`count=${n}`),new oa({method:i,url:l,headers:u,schema:this.schema,body:t,fetch:(s=this.fetch)!==null&&s!==void 0?s:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}delete({count:t}={}){var n;const s="DELETE",{url:i,headers:l}=this.cloneRequestState();return t&&l.append("Prefer",`count=${t}`),new oa({method:s,url:i,headers:l,schema:this.schema,fetch:(n=this.fetch)!==null&&n!==void 0?n:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};function Di(t){"@babel/helpers - typeof";return Di=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Di(t)}function s1(t,n){if(Di(t)!="object"||!t)return t;var s=t[Symbol.toPrimitive];if(s!==void 0){var i=s.call(t,n);if(Di(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(t)}function a1(t){var n=s1(t,"string");return Di(n)=="symbol"?n:n+""}function i1(t,n,s){return(n=a1(n))in t?Object.defineProperty(t,n,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[n]=s,t}function Mm(t,n){var s=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);n&&(i=i.filter(function(l){return Object.getOwnPropertyDescriptor(t,l).enumerable})),s.push.apply(s,i)}return s}function vl(t){for(var n=1;n<arguments.length;n++){var s=arguments[n]!=null?arguments[n]:{};n%2?Mm(Object(s),!0).forEach(function(i){i1(t,i,s[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(s)):Mm(Object(s)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(s,i))})}return t}var o1=class O0{constructor(n,{headers:s={},schema:i,fetch:l,timeout:u,urlLengthLimit:c=8e3,retry:d}={}){this.url=n,this.headers=new Headers(s),this.schemaName=i,this.urlLengthLimit=c;const p=l??globalThis.fetch;u!==void 0&&u>0?this.fetch=(g,m)=>{const y=new AbortController,b=setTimeout(()=>y.abort(),u),_=m?.signal;if(_){if(_.aborted)return clearTimeout(b),p(g,m);const w=()=>{clearTimeout(b),y.abort()};return _.addEventListener("abort",w,{once:!0}),p(g,vl(vl({},m),{},{signal:y.signal})).finally(()=>{clearTimeout(b),_.removeEventListener("abort",w)})}return p(g,vl(vl({},m),{},{signal:y.signal})).finally(()=>clearTimeout(b))}:this.fetch=p,this.retry=d}
15from(n){if(!n||typeof n!="string"||n.trim()==="")throw new Error("Invalid relation name: relation must be a non-empty string.");return new r1(new URL(`${this.url}/${n}`),{headers:new Headers(this.headers),schema:this.schemaName,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}schema(n){return new O0(this.url,{headers:this.headers,schema:n,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}rpc(n,s={},{head:i=!1,get:l=!1,count:u}={}){var c;let d;const p=new URL(`${this.url}/rpc/${n}`);let g;const m=_=>_!==null&&typeof _=="object"&&(!Array.isArray(_)||_.some(m)),y=i&&Object.values(s).some(m);y?(d="POST",g=s):i||l?(d=i?"HEAD":"GET",Object.entries(s).filter(([_,w])=>w!==void 0).map(([_,w])=>[_,Array.isArray(w)?`{${w.join(",")}}`:`${w}`]).forEach(([_,w])=>{p.searchParams.append(_,w)})):(d="POST",g=s);const b=new Headers(this.headers);return y?b.set("Prefer",u?`count=${u},return=minimal`:"return=minimal"):u&&b.set("Prefer",`count=${u}`),new oa({method:d,url:p,headers:b,schema:this.schemaName,body:g,fetch:(c=this.fetch)!==null&&c!==void 0?c:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};class l1{constructor(){}static detectEnvironment(){var n;if(typeof WebSocket<"u")return{type:"native",wsConstructor:WebSocket};const s=globalThis;if(typeof globalThis<"u"&&typeof s.WebSocket<"u")return{type:"native",wsConstructor:s.WebSocket};const i=typeof global<"u"?global:void 0;if(i&&typeof i.WebSocket<"u")return{type:"native",wsConstructor:i.WebSocket};if(typeof globalThis<"u"&&typeof s.WebSocketPair<"u"&&typeof globalThis.WebSocket>"u")return{type:"cloudflare",error:"Cloudflare Workers detected. WebSocket clients are not supported in Cloudflare Workers.",workaround:"Use Cloudflare Workers WebSocket API for server-side WebSocket handling, or deploy to a different runtime."};if(typeof globalThis<"u"&&s.EdgeRuntime||typeof navigator<"u"&&(!((n=navigator.userAgent)===null||n===void 0)&&n.includes("Vercel-Edge")))return{type:"unsupported",error:"Edge runtime detected (Vercel Edge/Netlify Edge). WebSockets are not supported in edge functions.",workaround:"Use serverless functions or a different deployment target for WebSocket functionality."};const l=globalThis.process;if(l){const u=l.versions;if(u&&u.node){const c=u.node,d=parseInt(c.replace(/^v/,"").split(".")[0]);return d>=22?typeof globalThis.WebSocket<"u"?{type:"native",wsConstructor:globalThis.WebSocket}:{type:"unsupported",error:`Node.js ${d} detected but native WebSocket not found.`,workaround:"Provide a WebSocket implementation via the transport option."}:{type:"unsupported",error:`Node.js ${d} detected without native WebSocket support.`,workaround:`For Node.js < 22, install "ws" package and provide it via the transport option: 16import ws from "ws" 17new RealtimeClient(url, { transport: ws })`}}}return{type:"unsupported",error:"Unknown JavaScript runtime without WebSocket support.",workaround:"Ensure you're running in a supported environment (browser, Node.js, Deno) or provide a custom WebSocket implementation."}}static getWebSocketConstructor(){const n=this.detectEnvironment();if(n.wsConstructor)return n.wsConstructor;let s=n.error||"WebSocket not supported in this environment.";throw n.workaround&&(s+=` 18 19Suggested solution: ${n.workaround}`),new Error(s)}static isWebSocketSupported(){try{const n=this.detectEnvironment();return n.type==="native"||n.type==="ws"}catch{return!1}}}const u1="2.105.4",c1=`realtime-js/${u1}`,h1="1.0.0",C0="2.0.0",f1=C0,d1=1e4,p1=100,Tr={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},x0={close:"phx_close",error:"phx_error",join:"phx_join",leave:"phx_leave",access_token:"access_token"},Wh={connecting:"connecting",closing:"closing",closed:"closed"};class g1{constructor(n){this.HEADER_LENGTH=1,this.USER_BROADCAST_PUSH_META_LENGTH=6,this.KINDS={userBroadcastPush:3,userBroadcast:4},this.BINARY_ENCODING=0,this.JSON_ENCODING=1,this.BROADCAST_EVENT="broadcast",this.allowedMetadataKeys=[],this.allowedMetadataKeys=n??[]}encode(n,s){if(n.event===this.BROADCAST_EVENT&&!(n.payload instanceof ArrayBuffer)&&typeof n.payload.event=="string")return s(this._binaryEncodeUserBroadcastPush(n));let i=[n.join_ref,n.ref,n.topic,n.event,n.payload];return s(JSON.stringify(i))}_binaryEncodeUserBroadcastPush(n){var s;return this._isArrayBuffer((s=n.payload)===null||s===void 0?void 0:s.payload)?this._encodeBinaryUserBroadcastPush(n):this._encodeJsonUserBroadcastPush(n)}_encodeBinaryUserBroadcastPush(n){var s,i;const l=(i=(s=n.payload)===null||s===void 0?void 0:s.payload)!==null&&i!==void 0?i:new ArrayBuffer(0);return this._encodeUserBroadcastPush(n,this.BINARY_ENCODING,l)}_encodeJsonUserBroadcastPush(n){var s,i;const l=(i=(s=n.payload)===null||s===void 0?void 0:s.payload)!==null&&i!==void 0?i:{},c=new TextEncoder().encode(JSON.stringify(l)).buffer;return this._encodeUserBroadcastPush(n,this.JSON_ENCODING,c)}_encodeUserBroadcastPush(n,s,i){var l,u;
19const c=n.topic,d=(l=n.ref)!==null&&l!==void 0?l:"",p=(u=n.join_ref)!==null&&u!==void 0?u:"",g=n.payload.event,m=this.allowedMetadataKeys?this._pick(n.payload,this.allowedMetadataKeys):{},y=Object.keys(m).length===0?"":JSON.stringify(m);if(p.length>255)throw new Error(`joinRef length ${p.length} exceeds maximum of 255`);if(d.length>255)throw new Error(`ref length ${d.length} exceeds maximum of 255`);if(c.length>255)throw new Error(`topic length ${c.length} exceeds maximum of 255`);if(g.length>255)throw new Error(`userEvent length ${g.length} exceeds maximum of 255`);if(y.length>255)throw new Error(`metadata length ${y.length} exceeds maximum of 255`);const b=this.USER_BROADCAST_PUSH_META_LENGTH+p.length+d.length+c.length+g.length+y.length,_=new ArrayBuffer(this.HEADER_LENGTH+b);let w=new DataView(_),A=0;w.setUint8(A++,this.KINDS.userBroadcastPush),w.setUint8(A++,p.length),w.setUint8(A++,d.length),w.setUint8(A++,c.length),w.setUint8(A++,g.length),w.setUint8(A++,y.length),w.setUint8(A++,s),Array.from(p,O=>w.setUint8(A++,O.charCodeAt(0))),Array.from(d,O=>w.setUint8(A++,O.charCodeAt(0))),Array.from(c,O=>w.setUint8(A++,O.charCodeAt(0))),Array.from(g,O=>w.setUint8(A++,O.charCodeAt(0))),Array.from(y,O=>w.setUint8(A++,O.charCodeAt(0)));var R=new Uint8Array(_.byteLength+i.byteLength);return R.set(new Uint8Array(_),0),R.set(new Uint8Array(i),_.byteLength),R.buffer}decode(n,s){if(this._isArrayBuffer(n)){let i=this._binaryDecode(n);return s(i)}if(typeof n=="string"){const i=JSON.parse(n),[l,u,c,d,p]=i;return s({join_ref:l,ref:u,topic:c,event:d,payload:p})}return s({})}_binaryDecode(n){const s=new DataView(n),i=s.getUint8(0),l=new TextDecoder;if(i===this.KINDS.userBroadcast)return this._decodeUserBroadcast(n,s,l)}_decodeUserBroadcast(n,s,i){const l=s.getUint8(1),u=s.getUint8(2),c=s.getUint8(3),d=s.getUint8(4);let p=this.HEADER_LENGTH+4;const g=i.decode(n.slice(p,p+l));p=p+l;const m=i.decode(n.slice(p,p+u));p=p+u;const y=i.decode(n.slice(p,p+c));p=p+c;const b=n.slice(p,n.byteLength),_=d===this.JSON_ENCODING?JSON.parse(i.decode(b)):b,w={type:this.BROADCAST_EVENT,event:m,payload:_};return c>0&&(w.meta=JSON.parse(y)),{join_ref:null,ref:null,topic:g,event:this.BROADCAST_EVENT,payload:w}}_isArrayBuffer(n){var s;return n instanceof ArrayBuffer||((s=n?.constructor)===null||s===void 0?void 0:s.name)==="ArrayBuffer"}_pick(n,s){return!n||typeof n!="object"?{}:Object.fromEntries(Object.entries(n).filter(([i])=>s.includes(i)))}}var Pe;(function(t){t.abstime="abstime",t.bool="bool",t.date="date",t.daterange="daterange",t.float4="float4",t.float8="float8",t.int2="int2",t.int4="int4",t.int4range="int4range",t.int8="int8",t.int8range="int8range",t.json="json",t.jsonb="jsonb",t.money="money",t.numeric="numeric",t.oid="oid",t.reltime="reltime",t.text="text",t.time="time",t.timestamp="timestamp",t.timestamptz="timestamptz",t.timetz="timetz",t.tsrange="tsrange",t.tstzrange="tstzrange"})(Pe||(Pe={}));const Um=(t,n,s={})=>{var i;const l=(i=s.skipTypes)!==null&&i!==void 0?i:[];return n?Object.keys(n).reduce((u,c)=>(u[c]=y1(c,t,n,l),u),{}):{}},y1=(t,n,s,i)=>{const l=n.find(d=>d.name===t),u=l?.type,c=s[t];return u&&!i.includes(u)?k0(u,c):ef(c)},k0=(t,n)=>{if(t.charAt(0)==="_"){const s=t.slice(1,t.length);return _1(n,s)}switch(t){case Pe.bool:return m1(n);case Pe.float4:case Pe.float8:case Pe.int2:case Pe.int4:case Pe.int8:case Pe.numeric:case Pe.oid:return v1(n);case Pe.json:case Pe.jsonb:return b1(n);case Pe.timestamp:return S1(n);case Pe.abstime:case Pe.date:case Pe.daterange:case Pe.int4range:case Pe.int8range:case Pe.money:case Pe.reltime:case Pe.text:case Pe.time:case Pe.timestamptz:case Pe.timetz:case Pe.tsrange:case Pe.tstzrange:return ef(n);default:return ef(n)}},ef=t=>t,m1=t=>{switch(t){case"t":return!0;case"f":return!1;default:return t}},v1=t=>{if(typeof t=="string"){const n=parseFloat(t);if(!Number.isNaN(n))return n}return t},b1=t=>{if(typeof t=="string")try{return JSON.parse(t)}catch{return t}return t},_1=(t,n)=>{if(typeof t!="string")return t;const s=t.length-1,i=t[s];if(t[0]==="{"&&i==="}"){let u;const c=t.slice(1,s);try{u=JSON.parse("["+c+"]")}catch{u=c?c.split(","):[]}return u.map(d=>k0(n,d))}return t},S1=t=>typeof t=="string"?t.replace(" ","T"):t,j0=t=>{const n=new URL(t);return n.protocol=n.protocol.replace(/^ws/i,"http"),n.pathname=n.pathname.replace(/\/+$/,"").replace(/\/socket\/websocket$/i,"").replace(/\/socket$/i,"").replace(/\/websocket$/i,""),n.pathname===""||n.pathname==="/"?n.pathname="/api/broadcast":n.pathname=n.pathname+"/api/broadcast",n.href};var Oi=t=>typeof t=="function"?t:function(){return t},w1=typeof self<"u"?self:null,la=typeof window<"u"?window:null,vn=w1||la||globalThis,E1="2.0.0",T1=1e4,R1=1e3,_n={connecting:0,open:1,closing:2,closed:3},kt={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},Gn={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave"},tf={longpoll:"longpoll",websocket:"websocket"},A1={complete:4},nf="base64url.bearer.phx.",bl=class{constructor(t,n,s,i){this.channel=t,this.event=n,this.payload=s||function(){return{}},this.receivedResp=null,this.timeout=i,this.timeoutTimer=null,this.recHo
vendor: 8,700 bytes, line 19
19oks=[],this.sent=!1,this.ref=void 0}resend(t){this.timeout=t,this.reset(),this.send()}send(){this.hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload(),ref:this.ref,join_ref:this.channel.joinRef()}))}receive(t,n){return this.hasReceived(t)&&n(this.receivedResp.response),this.recHooks.push({status:t,callback:n}),this}reset(){this.cancelRefEvent(),this.ref=null,this.refEvent=null,this.receivedResp=null,this.sent=!1}destroy(){this.cancelRefEvent(),this.cancelTimeout()}matchReceive({status:t,response:n,_ref:s}){this.recHooks.filter(i=>i.status===t).forEach(i=>i.callback(n))}cancelRefEvent(){this.refEvent&&this.channel.off(this.refEvent)}cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=null}startTimeout(){this.timeoutTimer&&this.cancelTimeout(),this.ref=this.channel.socket.makeRef(),this.refEvent=this.channel.replyEventName(this.ref),this.channel.on(this.refEvent,t=>{this.cancelRefEvent(),this.cancelTimeout(),this.receivedResp=t,this.matchReceive(t)}),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}hasReceived(t){return this.receivedResp&&this.receivedResp.status===t}trigger(t,n){this.channel.trigger(this.refEvent,{status:t,response:n})}},M0=class{constructor(t,n){this.callback=t,this.timerCalc=n,this.timer=void 0,this.tries=0}reset(){this.tries=0,clearTimeout(this.timer)}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout(()=>{this.tries=this.tries+1,this.callback()},this.timerCalc(this.tries+1))}},O1=class{constructor(t,n,s){this.state=kt.closed,this.topic=t,this.params=Oi(n||{}),this.socket=s,this.bindings=[],this.bindingRef=0,this.timeout=this.socket.timeout,this.joinedOnce=!1,this.joinPush=new bl(this,Gn.join,this.params,this.timeout),this.pushBuffer=[],this.stateChangeRefs=[],this.rejoinTimer=new M0(()=>{this.socket.isConnected()&&this.rejoin()},this.socket.rejoinAfterMs),this.stateChangeRefs.push(this.socket.onError(()=>this.rejoinTimer.reset())),this.stateChangeRefs.push(this.socket.onOpen(()=>{this.rejoinTimer.reset(),this.isErrored()&&this.rejoin()})),this.joinPush.receive("ok",()=>{this.state=kt.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(i=>i.send()),this.pushBuffer=[]}),this.joinPush.receive("error",i=>{this.state=kt.errored,this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,i),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.onClose(()=>{this.rejoinTimer.reset(),this.socket.hasLogger()&&this.socket.log("channel",`close ${this.topic}`),this.state=kt.closed,this.socket.remove(this)}),this.onError(i=>{this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,i),this.isJoining()&&this.joinPush.reset(),this.state=kt.errored,this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.joinPush.receive("timeout",()=>{this.socket.hasLogger()&&this.socket.log("channel",`timeout ${this.topic}`,this.joinPush.timeout),new bl(this,Gn.leave,Oi({}),this.timeout).send(),this.state=kt.errored,this.joinPush.reset(),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.on(Gn.reply,(i,l)=>{this.trigger(this.replyEventName(l),i)})}join(t=this.timeout){if(this.joinedOnce)throw new Error("tried to join multiple times. 'join' can only be called a single time per channel instance");return this.timeout=t,this.joinedOnce=!0,this.rejoin(),this.joinPush}teardown(){this.pushBuffer.forEach(t=>t.destroy()),this.pushBuffer=[],this.rejoinTimer.reset(),this.joinPush.destroy(),this.state=kt.closed,this.bindings=[]}onClose(t){this.on(Gn.close,t)}onError(t){return this.on(Gn.error,n=>t(n))}on(t,n){let s=this.bindingRef++;return this.bindings.push({event:t,ref:s,callback:n}),s}off(t,n){this.bindings=this.bindings.filter(s=>!(s.event===t&&(typeof n>"u"||n===s.ref)))}canPush(){return this.socket.isConnected()&&this.isJoined()}push(t,n,s=this.timeout){if(n=n||{},!this.joinedOnce)throw new Error(`tried to push '${t}' to '${this.topic}' before joining. Use channel.join() before pushing events`);let i=new bl(this,t,function(){return n},s);return this.canPush()?i.send():(i.startTimeout(),this.pushBuffer.push(i)),i}leave(t=this.timeout){this.rejoinTimer.reset(),this.joinPush.cancelTimeout(),this.state=kt.leaving;let n=()=>{this.socket.hasLogger()&&this.socket.log("channel",`leave ${this.topic}`),this.trigger(Gn.close,"leave")},s=new bl(this,Gn.leave,Oi({}),t);return s.receive("ok",()=>n()).receive("timeout",()=>n()),s.send(),this.canPush()||s.trigger("ok",{}),s}onMessage(t,n,s){return n}filterBindings(t,n,s){return!0}isMember(t,n,s,i){return this.topic!==t?!1:i&&i!==this.joinRef()?(this.socket.hasLogger()&&this.socket.log("channel","dropping outdated message",{topic:t,event:n,payload:s,joinRef:i}),!1):!0}joinRef(){return this.joinPush.ref}rejoin(t=this.timeout){this.isLeaving()||(this.socket.leaveOpenTopic(this.topic),this.state=kt.joining,this.joinPush.resend(t))}trigger(t,n,s,i){let l=this.onMessage(t,n,s,i);if(n&&!l)throw new Error("channel onMessage callbacks must return the payload, modified or unmodified");let u=this.bindings.filter(c=>c.event===t&&this.filterBindings(c,n,s));for(let c=0;c<u.length;c++)u[c].callback(l,s,i||this.joinRef())}replyEventName(t){return`chan_reply_${t}`}isClosed(){return this.state===kt.closed}isErrored(){return this.state===kt.errored}isJoined(){return this.state===kt.joined}isJoining(){return this.state===kt.joining}isLeaving(){return this.state===kt.leaving}},Hl=class{static request(t,n,s,i,l,u,c){if(vn.XDomainRequest){let d=new vn.XDomainRequest;return this.xdomainRequest(d,t,n,i,l,u,c)}else if(vn.XMLHttpRequest){let d=new vn.XMLHttpRequest;return this.xhrRequest(d,t,n,s,i,l,u,c)}else{if(vn.fetch&&vn.AbortController)return this.fetchRequest(t,n,s,i,l,u,c);throw new Error("No suitable XMLHttpRequest implementation found")}}static fetchRequest(t,n,s,i,l,u,c){let d={method:t,headers:s,body:i},p=null;return l&&(p=new AbortController,setTimeout(()=>p.abort(),l),d.signal=p.signal),vn.fetch(n,d).then(g=>g.text()).then(g=>this.parseJSON(g)).then(g=>c&&c(g)).catch(g=>{g.name==="AbortError"&&u?u():c&&c(null)}),p}static xdomainRequest(t,n,s,i,l,u,c){return t.timeout=l,t.open(n,s),t.onload=()=>{let d=this.parseJSON(t.responseText);c&&c(d)},u&&(t.ontimeout=u),t.onprogress=()=>{},t.send(i),t}static xhrRequest(t,n,s,i,l,u,c,d){t.open(n,s,!0),t.timeout=u;for(let[p,g]of Object.entries(i))t.setRequestHeader(p,g);return t.onerror=()=>d&&d(null),t.onreadystatechange=()=>{if(t.readyState===A1.complete&&d){let p=this.parseJSON(t.responseText);d(p)}},c&&(t.ontimeout=c),t.send(l),t}static parseJSON(t){if(!t||t==="")return null;try{return JSON.parse(t)}catch{return console&&console.log("failed to parse JSON response",t),null}}static serialize(t,n){let s=[];for(var i in t){if(!Object.prototype.hasOwnProperty.call(t,i))continue;let l=n?`${n}[${i}]`:i,u=t[i];typeof u=="object"?s.push(this.serialize(u,l)):s.push(encodeURIComponent(l)+"="+encodeURIComponent(u))}return s.join("&")}static appendParams(t,n){if(Object.keys(n).length===0)return t;let s=t.match(/\?/)?"&":"?";return`${t}${s}${this.serialize(n)}`}},C1=t=>{let n="",s=new Uint8Array(t),i=s.byteLength;for(let l=0;l<i;l++)n+=String.fromCharCode(s[l]);return btoa(n)},ta=class{constructor(t,n){n&&n.length===2&&n[1].startsWith(nf)&&(this.authToken=atob(n[1].slice(nf.length))),this.endPoint=null,this.token=null,this.skipHeartbeat=!0,this.reqs=new Set,this.awaitingBatchAck=!1,this.currentBatch=null,this.currentBatchTimer=null,this.batchBuffer=[],this.onopen=function(){},this.onerror=function(){},this.onmessage=function(){},this.onclose=function(){},this.pollEndpoint=this.normalizeEndpoint(t),this.readyState=_n.connecting,setTimeout(()=>this.poll(),0)}normalizeEndpoint(t){return t.replace("ws://","http://").replace("wss://","https://").replace(new RegExp("(.*)/"+tf.websocket),"$1/"+tf.longpoll)}endpointURL(){return Hl.appendParams(this.pollEndpoint,{token:this.token})}closeAndRetry(t,n,s){this.close(t,n,s),this.readyState=_n.connecting}ontimeout(){this.onerror("timeout"),this.closeAndRetry(1005,"timeout",!1)}isActive(){return this.readyState===_n.open||this.readyState===_n.connecting}poll(){const t={Accept:"application/json"};this.authToken&&(t["X-Phoenix-AuthToken"]=this.authToken),this.ajax("GET",t,null,()=>this.ontimeout(),n=>{if(n){var{status:s,token:i,messages:l}=n;if(s===410&&this.token!==null){this.onerror(410),this.closeAndRetry(3410,"session_gone",!1);return}this.token=i}else s=0;switch(s){case 200:l.forEach(u=>{setTimeout(()=>this.onmessage({data:u}),0)}),this.poll();break;case 204:this.poll();break;case 410:this.readyState=_n.open,this.onopen({}),this.poll();break;
19case 403:this.onerror(403),this.close(1008,"forbidden",!1);break;case 0:case 500:this.onerror(500),this.closeAndRetry(1011,"internal server error",500);break;default:throw new Error(`unhandled poll status ${s}`)}})}send(t){typeof t!="string"&&(t=C1(t)),this.currentBatch?this.currentBatch.push(t):this.awaitingBatchAck?this.batchBuffer.push(t):(this.currentBatch=[t],this.currentBatchTimer=setTimeout(()=>{this.batchSend(this.currentBatch),this.currentBatch=null},0))}batchSend(t){this.awaitingBatchAck=!0,this.ajax("POST",{"Content-Type":"application/x-ndjson"},t.join(` 20`),()=>this.onerror("timeout"),n=>{this.awaitingBatchAck=!1,!n||n.status!==200?(this.onerror(n&&n.status),this.closeAndRetry(1011,"internal server error",!1)):this.batchBuffer.length>0&&(this.batchSend(this.batchBuffer),this.batchBuffer=[])})}close(t,n,s){for(let l of this.reqs)l.abort();this.readyState=_n.closed;let i=Object.assign({code:1e3,reason:void 0,wasClean:!0},{code:t,reason:n,wasClean:s});this.batchBuffer=[],clearTimeout(this.currentBatchTimer),this.currentBatchTimer=null,typeof CloseEvent<"u"?this.onclose(new CloseEvent("close",i)):this.onclose(i)}ajax(t,n,s,i,l){let u,c=()=>{this.reqs.delete(u),i()};u=Hl.request(t,this.endpointURL(),n,s,this.timeout,c,d=>{this.reqs.delete(u),this.isActive()&&l(d)}),this.reqs.add(u)}},x1=class Ri{constructor(n,s={}){let i=s.events||{state:"presence_state",diff:"presence_diff"};this.state={},this.pendingDiffs=[],this.channel=n,this.joinRef=null,this.caller={onJoin:function(){},onLeave:function(){},onSync:function(){}},this.channel.on(i.state,l=>{let{onJoin:u,onLeave:c,onSync:d}=this.caller;this.joinRef=this.channel.joinRef(),this.state=Ri.syncState(this.state,l,u,c),this.pendingDiffs.forEach(p=>{this.state=Ri.syncDiff(this.state,p,u,c)}),this.pendingDiffs=[],d()}),this.channel.on(i.diff,l=>{let{onJoin:u,onLeave:c,onSync:d}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(l):(this.state=Ri.syncDiff(this.state,l,u,c),d())})}onJoin(n){this.caller.onJoin=n}onLeave(n){this.caller.onLeave=n}onSync(n){this.caller.onSync=n}list(n){return Ri.list(this.state,n)}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel.joinRef()}static syncState(n,s,i,l){let u=this.clone(n),c={},d={};return this.map(u,(p,g)=>{s[p]||(d[p]=g)}),this.map(s,(p,g)=>{let m=u[p];if(m){let y=g.metas.map(A=>A.phx_ref),b=m.metas.map(A=>A.phx_ref),_=g.metas.filter(A=>b.indexOf(A.phx_ref)<0),w=m.metas.filter(A=>y.indexOf(A.phx_ref)<0);_.length>0&&(c[p]=g,c[p].metas=_),w.length>0&&(d[p]=this.clone(m),d[p].metas=w)}else c[p]=g}),this.syncDiff(u,{joins:c,leaves:d},i,l)}static syncDiff(n,s,i,l){let{joins:u,leaves:c}=this.clone(s);return i||(i=function(){}),l||(l=function(){}),this.map(u,(d,p)=>{let g=n[d];if(n[d]=this.clone(p),g){let m=n[d].metas.map(b=>b.phx_ref),y=g.metas.filter(b=>m.indexOf(b.phx_ref)<0);n[d].metas.unshift(...y)}i(d,g,p)}),this.map(c,(d,p)=>{let g=n[d];if(!g)return;let m=p.metas.map(y=>y.phx_ref);g.metas=g.metas.filter(y=>m.indexOf(y.phx_ref)<0),l(d,g,p),g.metas.length===0&&delete n[d]}),n}static list(n,s){return s||(s=function(i,l){return l}),this.map(n,(i,l)=>s(i,l))}static map(n,s){return Object.getOwnPropertyNames(n).map(i=>s(i,n[i]))}static clone(n){return JSON.parse(JSON.stringify(n))}},_l={HEADER_LENGTH:1,META_LENGTH:4,KINDS:{push:0,reply:1,broadcast:2},encode(t,n){if(t.payload.constructor===ArrayBuffer)return n(this.binaryEncode(t));{let s=[t.join_ref,t.ref,t.topic,t.event,t.payload];return n(JSON.stringify(s))}},decode(t,n){if(t.constructor===ArrayBuffer)return n(this.binaryDecode(t));{let[s,i,l,u,c]=JSON.parse(t);return n({join_ref:s,ref:i,topic:l,event:u,payload:c})}},binaryEncode(t){let{join_ref:n,ref:s,event:i,topic:l,payload:u}=t,c=this.META_LENGTH+n.length+s.length+l.length+i.length,d=new ArrayBuffer(this.HEADER_LENGTH+c),p=new DataView(d),g=0;p.setUint8(g++,this.KINDS.push),p.setUint8(g++,n.length),p.setUint8(g++,s.length),p.setUint8(g++,l.length),p.setUint8(g++,i.length),Array.from(n,y=>p.setUint8(g++,y.charCodeAt(0))),Array.from(s,y=>p.setUint8(g++,y.charCodeAt(0))),Array.from(l,y=>
20p.setUint8(g++,y.charCodeAt(0))),Array.from(i,y=>p.setUint8(g++,y.charCodeAt(0)));var m=new Uint8Array(d.byteLength+u.byteLength);return m.set(new Uint8Array(d),0),m.set(new Uint8Array(u),d.byteLength),m.buffer},binaryDecode(t){let n=new DataView(t),s=n.getUint8(0),i=new TextDecoder;switch(s){case this.KINDS.push:return this.decodePush(t,n,i);case this.KINDS.reply:return this.decodeReply(t,n,i);case this.KINDS.broadcast:return this.decodeBroadcast(t,n,i)}},decodePush(t,n,s){let i=n.getUint8(1),l=n.getUint8(2),u=n.getUint8(3),c=this.HEADER_LENGTH+this.META_LENGTH-1,d=s.decode(t.slice(c,c+i));c=c+i;let p=s.decode(t.slice(c,c+l));c=c+l;let g=s.decode(t.slice(c,c+u));c=c+u;let m=t.slice(c,t.byteLength);return{join_ref:d,ref:null,topic:p,event:g,payload:m}},decodeReply(t,n,s){let i=n.getUint8(1),l=n.getUint8(2),u=n.getUint8(3),c=n.getUint8(4),d=this.HEADER_LENGTH+this.META_LENGTH,p=s.decode(t.slice(d,d+i));d=d+i;let g=s.decode(t.slice(d,d+l));d=d+l;let m=s.decode(t.slice(d,d+u));d=d+u;let y=s.decode(t.slice(d,d+c));d=d+c;let b=t.slice(d,t.byteLength),_={status:y,response:b};return{join_ref:p,ref:g,topic:m,event:Gn.reply,payload:_}},decodeBroadcast(t,n,s){let i=n.getUint8(1),l=n.getUint8(2),u=this.HEADER_LENGTH+2,c=s.decode(t.slice(u,u+i));u=u+i;let d=s.decode(t.slice(u,u+l));u=u+l;let p=t.slice(u,t.byteLength);return{join_ref:null,ref:null,topic:c,event:d,payload:p}}},k1=class{constructor(t,n={}){this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.channels=[],this.sendBuffer=[],this.ref=0,this.fallbackRef=null,this.timeout=n.timeout||T1,this.transport=n.transport||vn.WebSocket||ta,this.conn=void 0,this.primaryPassedHealthCheck=!1,this.longPollFallbackMs=n.longPollFallbackMs,this.fallbackTimer=null;let s=null;try{s=vn&&vn.sessionStorage}catch{}this.sessionStore=n.sessionStorage||s,this.establishedConnections=0,this.defaultEncoder=_l.encode.bind(_l),this.defaultDecoder=_l.decode.bind(_l),this.closeWasClean=!0,this.disconnecting=!1,this.binaryType=n.binaryType||"arraybuffer",this.connectClock=1,this.pageHidden=!1,this.encode=void 0,this.decode=void 0,this.transport!==ta?(this.encode=n.encode||this.defaultEncoder,this.decode=n.decode||this.defaultDecoder):(this.encode=this.defaultEncoder,this.decode=this.defaultDecoder);let i=null;la&&la.addEventListener&&(la.addEventListener("pagehide",l=>{this.conn&&(this.disconnect(),i=this.connectClock)}),la.addEventListener("pageshow",l=>{i===this.connectClock&&(i=null,this.connect())}),la.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"?this.pageHidden=!0:(this.pageHidden=!1,!this.isConnected()&&!this.closeWasClean&&this.teardown(()=>this.connect()))})),this.heartbeatIntervalMs=n.heartbeatIntervalMs||3e4,this.autoSendHeartbeat=n.autoSendHeartbeat??!0,this.heartbeatCallback=n.heartbeatCallback??(()=>{}),this.rejoinAfterMs=l=>n.rejoinAfterMs?n.rejoinAfterMs(l):[1e3,2e3,5e3][l-1]||1e4,this.reconnectAfterMs=l=>n.reconnectAfterMs?n.reconnectAfterMs(l):[10,50,100,150,200,250,500,1e3,2e3][l-1]||5e3,this.logger=n.logger||null,!this.logger&&n.debug&&(this.logger=(l,u,c)=>{console.log(`${l}: ${u}`,c)}),this.longpollerTimeout=n.longpollerTimeout||2e4,this.params=Oi(n.params||{}),this.endPoint=`${t}/${tf.websocket}`,this.vsn=n.vsn||E1,this.heartbeatTimeoutTimer=null,this.heartbeatTimer=null,this.heartbeatSentAt=null,this.pendingHeartbeatRef=null,this.reconnectTimer=new M0(()=>{if(this.pageHidden){this.log("Not reconnecting as page is hidden!"),this.teardown();return}this.teardown(async()=>{n.beforeReconnect&&await n.beforeReconnect(),this.connect()})},this.reconnectAfterMs),this.authToken=n.authToken}getLongPollTransport(){return ta}replaceTransport(t){this.connectClock++,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.conn&&(this.conn.close(),this.conn=null),this.transport=t}protocol(){return location.protocol.match(/^https/)?"wss":"ws"}endPointURL(){let t=Hl.appendParams(Hl.appendParams(this.endPoint,this.params()),{vsn:this.vsn});return t.charAt(0)!=="/"?t:t.charAt(1)==="/"?`${this.protocol()}:${t}`:`${this.protocol()}://${location.host}${t}`}disconnect(t,n,s){this.connectClock++,this.disconnecting=!0,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.teardown(()=>{this.disconnecting=!1,t&&t()},n,s)}connect(t){t&&(console&&console.log("passing params to connect is deprecated. Instead pass :params to the Socket constructor"),this.params=Oi(t)),!(this.conn&&!this.disconnecting)&&(this.longPollFallbackMs&&this.transport!==ta?this.connectWithF
vendor: 4,353 bytes, line 20
20allback(ta,this.longPollFallbackMs):this.transportConnect())}log(t,n,s){this.logger&&this.logger(t,n,s)}hasLogger(){return this.logger!==null}onOpen(t){let n=this.makeRef();return this.stateChangeCallbacks.open.push([n,t]),n}onClose(t){let n=this.makeRef();return this.stateChangeCallbacks.close.push([n,t]),n}onError(t){let n=this.makeRef();return this.stateChangeCallbacks.error.push([n,t]),n}onMessage(t){let n=this.makeRef();return this.stateChangeCallbacks.message.push([n,t]),n}onHeartbeat(t){this.heartbeatCallback=t}ping(t){if(!this.isConnected())return!1;let n=this.makeRef(),s=Date.now();this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:n});let i=this.onMessage(l=>{l.ref===n&&(this.off([i]),t(Date.now()-s))});return!0}transportName(t){return t===ta?"LongPoll":t.name}transportConnect(){this.connectClock++,this.closeWasClean=!1;let t;this.authToken&&(t=["phoenix",`${nf}${btoa(this.authToken).replace(/=/g,"")}`]),this.conn=new this.transport(this.endPointURL(),t),this.conn.binaryType=this.binaryType,this.conn.timeout=this.longpollerTimeout,this.conn.onopen=()=>this.onConnOpen(),this.conn.onerror=n=>this.onConnError(n),this.conn.onmessage=n=>this.onConnMessage(n),this.conn.onclose=n=>this.onConnClose(n)}getSession(t){return this.sessionStore&&this.sessionStore.getItem(t)}storeSession(t,n){this.sessionStore&&this.sessionStore.setItem(t,n)}connectWithFallback(t,n=2500){clearTimeout(this.fallbackTimer);let s=!1,i=!0,l,u,c=this.transportName(t),d=p=>{this.log("transport",`falling back to ${c}...`,p),this.off([l,u]),i=!1,this.replaceTransport(t),this.transportConnect()};if(this.getSession(`phx:fallback:${c}`))return d("memorized");this.fallbackTimer=setTimeout(d,n),u=this.onError(p=>{this.log("transport","error",p),i&&!s&&(clearTimeout(this.fallbackTimer),d(p))}),this.fallbackRef&&this.off([this.fallbackRef]),this.fallbackRef=this.onOpen(()=>{if(s=!0,!i){let p=this.transportName(t);return this.primaryPassedHealthCheck||this.storeSession(`phx:fallback:${p}`,"true"),this.log("transport",`established ${p} fallback`)}clearTimeout(this.fallbackTimer),this.fallbackTimer=setTimeout(d,n),this.ping(p=>{this.log("transport","connected to primary after",p),this.primaryPassedHealthCheck=!0,clearTimeout(this.fallbackTimer)})}),this.transportConnect()}clearHeartbeats(){clearTimeout(this.heartbeatTimer),clearTimeout(this.heartbeatTimeoutTimer)}onConnOpen(){this.hasLogger()&&this.log("transport",`connected to ${this.endPointURL()}`),this.closeWasClean=!1,this.disconnecting=!1,this.establishedConnections++,this.flushSendBuffer(),this.reconnectTimer.reset(),this.autoSendHeartbeat&&this.resetHeartbeat(),this.triggerStateCallbacks("open")}heartbeatTimeout(){if(this.pendingHeartbeatRef){this.pendingHeartbeatRef=null,this.heartbeatSentAt=null,this.hasLogger()&&this.log("transport","heartbeat timeout. Attempting to re-establish connection");try{this.heartbeatCallback("timeout")}catch(t){this.log("error","error in heartbeat callback",t)}this.triggerChanError(new Error("heartbeat timeout")),this.closeWasClean=!1,this.teardown(()=>this.reconnectTimer.scheduleTimeout(),R1,"heartbeat timeout")}}resetHeartbeat(){this.conn&&this.conn.skipHeartbeat||(this.pendingHeartbeatRef=null,this.clearHeartbeats(),this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}teardown(t,n,s){if(!this.conn)return t&&t();const i=this.conn;this.waitForBufferDone(i,()=>{n?i.close(n,s||""):i.close(),this.waitForSocketClosed(i,()=>{this.conn===i&&(this.conn.onopen=function(){},this.conn.onerror=function(){},this.conn.onmessage=function(){},this.conn.onclose=function(){},this.conn=null),t&&t()})})}waitForBufferDone(t,n,s=1){if(s===5||!t.bufferedAmount){n();return}setTimeout(()=>{this.waitForBufferDone(t,n,s+1)},150*s)}waitForSocketClosed(t,n,s=1){if(s===5||t.readyState===_n.closed){n();return}setTimeout(()=>{this.waitForSocketClosed(t,n,s+1)},150*s)}onConnClose(t){this.conn&&(this.conn.onclose=()=>{}),this.hasLogger()&&this.log("transport","close",t),this.triggerChanError(t),this.clearHeartbeats(),this.closeWasClean||this.reconnectTimer.scheduleTimeout(),this.triggerStateCallbacks("close",t)}onConnError(t){this.hasLogger()&&this.log("transport","error",t);let n=this.transport,s=this.establishedConnections;this.triggerStateCallbacks("error",t,n,s),(n===this.transport||s>0)&&this.triggerChanError(t)}
vendor: 3,314 bytes, line 20
20triggerChanError(t){this.channels.forEach(n=>{n.isErrored()||n.isLeaving()||n.isClosed()||n.trigger(Gn.error,t)})}connectionState(){switch(this.conn&&this.conn.readyState){case _n.connecting:return"connecting";case _n.open:return"open";case _n.closing:return"closing";default:return"closed"}}isConnected(){return this.connectionState()==="open"}remove(t){this.off(t.stateChangeRefs),this.channels=this.channels.filter(n=>n!==t)}off(t){for(let n in this.stateChangeCallbacks)this.stateChangeCallbacks[n]=this.stateChangeCallbacks[n].filter(([s])=>t.indexOf(s)===-1)}channel(t,n={}){let s=new O1(t,n,this);return this.channels.push(s),s}push(t){if(this.hasLogger()){let{topic:n,event:s,payload:i,ref:l,join_ref:u}=t;this.log("push",`${n} ${s} (${u}, ${l})`,i)}this.isConnected()?this.encode(t,n=>this.conn.send(n)):this.sendBuffer.push(()=>this.encode(t,n=>this.conn.send(n)))}makeRef(){let t=this.ref+1;return t===this.ref?this.ref=0:this.ref=t,this.ref.toString()}sendHeartbeat(){if(!this.isConnected()){try{this.heartbeatCallback("disconnected")}catch(t){this.log("error","error in heartbeat callback",t)}return}if(this.pendingHeartbeatRef){this.heartbeatTimeout();return}this.pendingHeartbeatRef=this.makeRef(),this.heartbeatSentAt=Date.now(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef});try{this.heartbeatCallback("sent")}catch(t){this.log("error","error in heartbeat callback",t)}this.heartbeatTimeoutTimer=setTimeout(()=>this.heartbeatTimeout(),this.heartbeatIntervalMs)}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(t=>t()),this.sendBuffer=[])}onConnMessage(t){this.decode(t.data,n=>{let{topic:s,event:i,payload:l,ref:u,join_ref:c}=n;if(u&&u===this.pendingHeartbeatRef){const d=this.heartbeatSentAt?Date.now()-this.heartbeatSentAt:void 0;this.clearHeartbeats();try{this.heartbeatCallback(l.status==="ok"?"ok":"error",d)}catch(p){this.log("error","error in heartbeat callback",p)}this.pendingHeartbeatRef=null,this.heartbeatSentAt=null,this.autoSendHeartbeat&&(this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}this.hasLogger()&&this.log("receive",`${l.status||""} ${s} ${i} ${u&&"("+u+")"||""}`.trim(),l);for(let d=0;d<this.channels.length;d++){const p=this.channels[d];p.isMember(s,i,l,c)&&p.trigger(i,l,u,c)}this.triggerStateCallbacks("message",n)})}triggerStateCallbacks(t,...n){try{this.stateChangeCallbacks[t].forEach(([s,i])=>{try{i(...n)}catch(l){this.log("error",`error in ${t} callback`,l)}})}catch(s){this.log("error",`error triggering ${t} callbacks`,s)}}leaveOpenTopic(t){let n=this.channels.find(s=>s.topic===t&&(s.isJoined()||s.isJoining()));n&&(this.hasLogger()&&this.log("transport",`leaving duplicate topic "${t}"`),n.leave())}};class Ci{constructor(n,s){const i=M1(s);this.presence=new x1(n.getChannel(),i),this.presence.onJoin((l,u,c)=>{const d=Ci.onJoinPayload(l,u,c);n.getChannel().trigger("presence",d)}),this.presence.onLeave((l,u,c)=>{const d=Ci.onLeavePayload(l,u,c);n.getChannel().trigger("presence",d)}),this.presence.onSync(()=>{n.getChannel().trigger("presence",{event:"sync"})})}get state(){return Ci.transformState(this.presence.state)}static transformState(n){return n=j1(n),Object.getOwnPropertyNames(n).reduce((s,i)=>{const l=n[i];return s[i]=Ml(l),s},{})}
20static onJoinPayload(n,s,i){const l=Nm(s),u=Ml(i);return{event:"join",key:n,currentPresences:l,newPresences:u}}static onLeavePayload(n,s,i){const l=Nm(s),u=Ml(i);return{event:"leave",key:n,currentPresences:l,leftPresences:u}}}function Ml(t){return t.metas.map(n=>(n.presence_ref=n.phx_ref,delete n.phx_ref,delete n.phx_ref_prev,n))}function j1(t){return JSON.parse(JSON.stringify(t))}function M1(t){return t?.events&&{events:t.events}}function Nm(t){return t?.metas?Ml(t):[]}var Dm;(function(t){t.SYNC="sync",t.JOIN="join",t.LEAVE="leave"})(Dm||(Dm={}));class U1{get state(){return this.presenceAdapter.state}constructor(n,s){this.channel=n,this.presenceAdapter=new Ci(this.channel.channelAdapter,s)}}function N1(t){if(t instanceof Error)return t;if(typeof t=="string")return new Error(t);if(t&&typeof t=="object"){const n=t;if(typeof n.code=="number"){const s=typeof n.reason=="string"&&n.reason?` (${n.reason})`:"";return new Error(`socket closed: ${n.code}${s}`,{cause:t})}return new Error("channel error: transport failure",{cause:t})}return new Error("channel error: connection lost")}class D1{constructor(n,s,i){const l=L1(i);this.channel=n.getSocket().channel(s,l),this.socket=n}get state(){return this.channel.state}set state(n){this.channel.state=n}get joinedOnce(){return this.channel.joinedOnce}get joinPush(){return this.channel.joinPush}get rejoinTimer(){return this.channel.rejoinTimer}on(n,s){return this.channel.on(n,s)}off(n,s){this.channel.off(n,s)}subscribe(n){return this.channel.join(n)}unsubscribe(n){return this.channel.leave(n)}teardown(){this.channel.teardown()}onClose(n){this.channel.onClose(n)}onError(n){return this.channel.onError(n)}push(n,s,i){let l;try{l=this.channel.push(n,s,i)}catch{throw new Error(`tried to push '${n}' to '${this.channel.topic}' before joining. Use channel.subscribe() before pushing events`)}if(this.channel.pushBuffer.length>p1){const u=this.channel.pushBuffer.shift();u.cancelTimeout(),this.socket.log("channel",`discarded push due to buffer overflow: ${u.event}`,u.payload())}return l}updateJoinPayload(n){const s=this.channel.joinPush.payload();this.channel.joinPush.payload=()=>Object.assign(Object.assign({},s),n)}canPush(){return this.socket.isConnected()&&this.state===Tr.joined}isJoined(){return this.state===Tr.joined}isJoining(){return this.state===Tr.joining}isClosed(){return this.state===Tr.closed}isLeaving(){return this.state===Tr.leaving}updateFilterBindings(n){this.channel.filterBindings=n}updatePayloadTransform(n){this.channel.onMessage=n}getChannel(){return this.channel}}function L1(t){return{config:Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},t.config)}}var Lm;(function(t){t.ALL="*",t.INSERT="INSERT",t.UPDATE="UPDATE",t.DELETE="DELETE"})(Lm||(Lm={}));var fa;(function(t){t.BROADCAST="broadcast",t.PRESENCE="presence",t.POSTGRES_CHANGES="postgres_changes",t.SYSTEM="system"})(fa||(fa={}));var Vn;(function(t){t.SUBSCRIBED="SUBSCRIBED",t.TIMED_OUT="TIMED_OUT",t.CLOSED="CLOSED",t.CHANNEL_ERROR="CHANNEL_ERROR"})(Vn||(Vn={}));class xi{get state(){return this.channelAdapter.state}set state(n){this.channelAdapter.state=n}get joinedOnce(){return this.channelAdapter.joinedOnce}get timeout(){return this.socket.timeout}get joinPush(){return this.channelAdapter.joinPush}get rejoinTimer(){return this.channelAdapter.rejoinTimer}constructor(n,s={config:{}},i){var l,u;if(this.topic=n,this.params=s,this.socket=i,this.bindings={},this.subTopic=n.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},s.config),this.channelAdapter=new D1(this.socket.socketAdapter,n,this.params),this.presence=new U1(this),this._onClose(()=>{this.socket._remove(this)}),this._updateFilterTransform(),this.broadcastEndpointURL=j0(this.socket.socketAdapter.endPointURL()),this.private=this.params.config.private||!1,!this.private&&(!((u=(l=this.params.config)===null||l===void 0?void 0:l.broadcast)===null||u===void 0)&&u.replay))throw new Error(`tried to use replay on public channel '${this.topic}'. It must be a private channel.`)}subscribe(n,s=this.timeout){var i,l,u;if(this.socket.isConnected()||this.socket.connect(),this.channelAdapter.isClosed()){const{config:{broadcast:c,presence:d,private:p}}=this.params,g=(l=(i=this.bindings.postgres_changes)===null||i===void 0?void 0:i.map(_=>_.filter))!==null&&l!==void 0?l:[],m=!!this.bindings[fa.PRESENCE]&&this.bindings[fa.PRESENCE].length>0||((u=this.params.config.presence)===null||u===void 0?void 0:u.enabled)===!0,y={},b={broadcast:c,presence:Object.assign(Object.assign({},d),{enabled:m}),postgres_changes:g,private:p};this.socket.accessTokenValue&&(y.access_token=this.socket.accessTokenValue),this._onError(_=>{n?.(Vn.CHANNEL_ERROR,N1(_))}),this._onClose(()=>n?.(Vn.CLOSED)),this.updateJoinPayload(Object.assign({config:b},y)),this._updateFilterMessage(),this.channelAdapter.subscribe(s).receive("ok",async({postgres_changes:_})=>
20{if(this.socket._isManualToken()||this.socket.setAuth(),_===void 0){n?.(Vn.SUBSCRIBED);return}this._updatePostgresBindings(_,n)}).receive("error",_=>{this.state=Tr.errored;const w=Object.values(_).join(", ")||"error";n?.(Vn.CHANNEL_ERROR,new Error(w,{cause:_}))}).receive("timeout",()=>{n?.(Vn.TIMED_OUT)})}return this}_updatePostgresBindings(n,s){var i;const l=this.bindings.postgres_changes,u=(i=l?.length)!==null&&i!==void 0?i:0,c=[];for(let d=0;d<u;d++){const p=l[d],{filter:{event:g,schema:m,table:y,filter:b}}=p,_=n&&n[d];if(_&&_.event===g&&xi.isFilterValueEqual(_.schema,m)&&xi.isFilterValueEqual(_.table,y)&&xi.isFilterValueEqual(_.filter,b))c.push(Object.assign(Object.assign({},p),{id:_.id}));else{this.unsubscribe(),this.state=Tr.errored,s?.(Vn.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=c,this.state!=Tr.errored&&s&&s(Vn.SUBSCRIBED)}presenceState(){return this.presence.state}async track(n,s={}){return await this.send({type:"presence",event:"track",payload:n},s.timeout||this.timeout)}async untrack(n={}){return await this.send({type:"presence",event:"untrack"},n)}on(n,s,i){const l=this.channelAdapter.isJoined()||this.channelAdapter.isJoining(),u=n===fa.PRESENCE||n===fa.POSTGRES_CHANGES;if(l&&u)throw this.socket.log("channel",`cannot add \`${n}\` callbacks for ${this.topic} after \`subscribe()\`.`),new Error(`cannot add \`${n}\` callbacks for ${this.topic} after \`subscribe()\`.`);return this._on(n,s,i)}async httpSend(n,s,i={}){var l;if(s==null)return Promise.reject(new Error("Payload is required for httpSend()"));const u={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(u.Authorization=`Bearer ${this.socket.accessTokenValue}`);const c={method:"POST",headers:u,body:JSON.stringify({messages:[{topic:this.subTopic,event:n,payload:s,private:this.private}]})},d=await this._fetchWithTimeout(this.broadcastEndpointURL,c,(l=i.timeout)!==null&&l!==void 0?l:this.timeout);if(d.status===202)return{success:!0};let p=d.statusText;try{const g=await d.json();p=g.error||g.message||p}catch{}return Promise.reject(new Error(p))}async send(n,s={}){var i,l;if(!this.channelAdapter.canPush()&&n.type==="broadcast"){console.warn("Realtime send() is automatically falling back to REST API. This behavior will be deprecated
20in the future. Please use httpSend() explicitly for REST delivery.");const{event:u,payload:c}=n,d={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(d.Authorization=`Bearer ${this.socket.accessTokenValue}`);const p={method:"POST",headers:d,body:JSON.stringify({messages:[{topic:this.subTopic,event:u,payload:c,private:this.private}]})};try{const g=await this._fetchWithTimeout(this.broadcastEndpointURL,p,(i=s.timeout)!==null&&i!==void 0?i:this.timeout);return await((l=g.body)===null||l===void 0?void 0:l.cancel()),g.ok?"ok":"error"}catch(g){return g instanceof Error&&g.name==="AbortError"?"timed out":"error"}}else return new Promise(u=>{var c,d,p;const g=this.channelAdapter.push(n.type,n,s.timeout||this.timeout);n.type==="broadcast"&&!(!((p=(d=(c=this.params)===null||c===void 0?void 0:c.config)===null||d===void 0?void 0:d.broadcast)===null||p===void 0)&&p.ack)&&u("ok"),g.receive("ok",()=>u("ok")),g.receive("error",()=>u("error")),g.receive("timeout",()=>u("timed out"))})}updateJoinPayload(n){this.channelAdapter.updateJoinPayload(n)}async unsubscribe(n=this.timeout){return new Promise(s=>{this.channelAdapter.unsubscribe(n).receive("ok",()=>s("ok")).receive("timeout",()=>s("timed out")).receive("error",()=>s("error"))})}teardown(){this.channelAdapter.teardown()}async _fetchWithTimeout(n,s,i){const l=new AbortController,u=setTimeout(()=>l.abort(),i),c=await this.socket.fetch(n,Object.assign(Object.assign({},s),{signal:l.signal}));return clearTimeout(u),c}_on(n,s,i){const l=n.toLocaleLowerCase(),u=this.channelAdapter.on(n,i),c={type:l,filter:s,callback:i,ref:u};return this.bindings[l]?this.bindings[l].push(c):this.bindings[l]=[c],this._updateFilterMessage(),this}_onClose(n){this.channelAdapter.onClose(n)}_onError(n){this.channelAdapter.onError(n)}_updateFilterMessage(){this.channelAdapter.updateFilterBindings((n,s,i)=>{var l,u,c,d,p,g,m;
20const y=n.event.toLocaleLowerCase();if(this._notThisChannelEvent(y,i))return!1;const b=(l=this.bindings[y])===null||l===void 0?void 0:l.find(_=>_.ref===n.ref);if(!b)return!0;if(["broadcast","presence","postgres_changes"].includes(y))if("id"in b){const _=b.id,w=(u=b.filter)===null||u===void 0?void 0:u.event;return _&&((c=s.ids)===null||c===void 0?void 0:c.includes(_))&&(w==="*"||w?.toLocaleLowerCase()===((d=s.data)===null||d===void 0?void 0:d.type.toLocaleLowerCase()))}else{const _=(g=(p=b?.filter)===null||p===void 0?void 0:p.event)===null||g===void 0?void 0:g.toLocaleLowerCase();return _==="*"||_===((m=s?.event)===null||m===void 0?void 0:m.toLocaleLowerCase())}else return b.type.toLocaleLowerCase()===y})}_notThisChannelEvent(n,s){const{close:i,error:l,leave:u,join:c}=x0;return s&&[i,l,u,c].includes(n)&&s!==this.joinPush.ref}_updateFilterTransform(){this.channelAdapter.updatePayloadTransform((n,s,i)=>{if(typeof s=="object"&&"ids"in s){const l=s.data,{schema:u,table:c,commit_timestamp:d,type:p,errors:g}=l;return Object.assign(Object.assign({},{schema:u,table:c,commit_timestamp:d,eventType:p,new:{},old:{},errors:g}),this._getPayloadRecords(l))}return s})}copyBindings(n){if(this.joinedOnce)throw new Error("cannot copy bindings into joined channel");for(const s in n.bindings)for(const i of n.bindings[s])this._on(i.type,i.filter,i.callback)}static isFilterValueEqual(n,s){return(n??void 0)===(s??void 0)}_getPayloadRecords(n){const s={new:{},old:{}};return(n.type==="INSERT"||n.type==="UPDATE")&&(s.new=Um(n.columns,n.record)),(n.type==="UPDATE"||n.type==="DELETE")&&(s.old=Um(n.columns,n.old_record)),s}}class z1{constructor(n,s){this.socket=new k1(n,s)}get timeout(){return this.socket.timeout}get endPoint(){return this.socket.endPoint}get transport(){return this.socket.transport}get heartbeatIntervalMs(){return this.socket.heartbeatIntervalMs}get heartbeatCallback(){return this.socket.heartbeatCallback}set heartbeatCallback(n){this.socket.heartbeatCallback=n}get heartbeatTimer(){return this.socket.heartbeatTimer}get pendingHeartbeatRef(){return this.socket.pendingHeartbeatRef}get reconnectTimer(){return this.socket.reconnectTimer}get vsn(){return this.socket.vsn}get encode(){return this.socket.encode}get decode(){return this.socket.decode}get reconnectAfterMs(){return this.socket.reconnectAfterMs}get sendBuffer(){return this.socket.sendBuffer}get stateChangeCallbacks(){return this.socket.stateChangeCallbacks}connect(){this.socket.connect()}disconnect(n,s,i,l=1e4){return new Promise(u=>{setTimeout(()=>u("timeout"),l),this.socket.disconnect(()=>{n(),u("ok")},s,i)})}push(n){this.socket.push(n)}log(n,s,i){this.socket.log(n,s,i)}makeRef(){return this.socket.makeRef()}onOpen(n){this.socket.onOpen(n)}onClose(n){this.socket.onClose(n)}onError(n){this.socket.onError(n)}onMessage(n){this.socket.onMessage(n)}isConnected(){return this.socket.isConnected()}isConnecting(){return this.socket.connectionState()==Wh.connecting}isDisconnecting(){return this.socket.connectionState()==Wh.closing}connectionState(){return this.socket.connectionState()}endPointURL(){return this.socket.endPointURL()}sendHeartbeat(){this.socket.sendHeartbeat()}getSocket(){return this.socket}}const zm={HEARTBEAT_INTERVAL:25e3},P1=[1e3,2e3,5e3,1e4],B1=1e4;function H1(){const t=new Map;return{get length(){return t.size},clear(){t.clear()},getItem(n){return t.has(n)?t.get(n):null},key(n){var s;return(s=Array.from(t.keys())[n])!==null&&s!==void 0?s:null},removeItem(n){t.delete(n)},setItem(n,s){t.set(n,String(s))}}}function q1(){try{if(typeof globalThis<"u"&&globalThis.sessionStorage)return globalThis.sessionStorage}catch{}return H1()}const I1=` 21 addEventListener("message", (e) => { 22 if (e.data.event === "start") { 23 setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval); 24 } 25 });`;class $1{get endPoint(){return this.socketAdapter.endPoint}get timeout(){return this.socketAdapter.timeout}get transport(){return this.socketAdapter.transport}get heartbeatCallback(){return this.socketAdapter.heartbeatCallback}get heartbeatIntervalMs(){return this.socketAdapter.heartbeatIntervalMs}get heartbeatTimer(){return this.worker?this._workerHeartbeatTimer:this.socketAdapter.heartbeatTimer}get pendingHeartbeatRef(){return this.worker?this._pendingWorkerHeartbeatRef:this.socketAdapter.pendingHeartbeatRef}get reconnectTimer(){return this.socketAdapter.reconnectTimer}get vsn(){return this.socketAdapter.vsn}get encode(){return this.socketAdapter.encode}get decode(){return this.socketAdapter.decode}get reconnectAfterMs(){return this.socketAdapter.reconnectAfterMs}get sendBuffer(){return this.socketAdapter.sendBuffer}get stateChangeCallbacks(){return this.socketAdapter.stateChangeCallbacks}constructor(n,s){var i;if(this.channels=new Array,this.accessTokenValue=null,this.accessToken=null,this.apiKey=null,this.httpEndpoint="",this.headers={},this.params={}
25,this.ref=0,this.serializer=new g1,this._manuallySetToken=!1,this._authPromise=null,this._workerHeartbeatTimer=void 0,this._pendingWorkerHeartbeatRef=null,this._pendingDisconnectTimer=null,this._disconnectOnEmptyChannelsAfterMs=0,this._resolveFetch=u=>u?(...c)=>u(...c):(...c)=>fetch(...c),!(!((i=s?.params)===null||i===void 0)&&i.apikey))throw new Error("API key is required to connect to Realtime");this.apiKey=s.params.apikey;const l=this._initializeOptions(s);this.socketAdapter=new z1(n,l),this.httpEndpoint=j0(n),this.fetch=this._resolveFetch(s?.fetch)}connect(){if(!(this.isConnecting()||this.isDisconnecting()||this.isConnected())){this.accessToken&&!this._authPromise&&this._setAuthSafely("connect"),this._setupConnectionHandlers();try{this.socketAdapter.connect()}catch(n){const s=n.message;throw s.includes("Node.js")?new Error(`${s} 26 27To use Realtime in Node.js, you need to provide a WebSocket implementation: 28 29Option 1: Use Node.js 22+ which has native WebSocket support 30Option 2: Install and provide the "ws" package: 31 32 npm install ws 33 34 import ws from "ws" 35 const client = new RealtimeClient(url, { 36 ...options, 37 transport: ws 38 })`):new Error(`WebSocket not available: ${s}`)}this._handleNodeJsRaceCondition()}}endpointURL(){return this.socketAdapter.endPointURL()}async disconnect(n,s){return this._cancelPendingDisconnect(),this.isDisconnecting()?"ok":await this.socketAdapter.disconnect(()=>{clearInterval(this._workerHeartbeatTimer),this._terminateWorker()},n,s)}getChannels(){return this.channels}async removeChannel(n){const s=await n.unsubscribe();return s==="ok"&&n.teardown(),s}async removeAllChannels(){const n=this.channels.map(async i=>{const l=await i.unsubscribe();return i.teardown(),l}),s=await Promise.all(n);return await this.disconnect(),s}log(n,s,i){this.socketAdapter.log(n,s,i)}connectionState(){return this.socketAdapter.connectionState()||Wh.closed}isConnected(){return this.socketAdapter.isConnected()}isConnecting(){return this.socketAdapter.isConnecting()}isDisconnecting(){return this.socketAdapter.isDisconnecting()}channel(n,s={config:{}}){const i=`realtime:${n}`,l=this.getChannels().find(u=>u.topic===i);if(l)return l;{const u=new xi(`realtime:${n}`,s,this);return this._cancelPendingDisconnect(),this.channels.push(u),u}}push(n){this.socketAdapter.push(n)}async setAuth(n=null){this._authPromise=this._performAuth(n);try{await this._authPromise}finally{this._authPromise=null}}_isManualToken(){return this._manuallySetToken}async sendHeartbeat(){this.socketAdapter.sendHeartbeat()}onHeartbeat(n){this.socketAdapter.heartbeatCallback=this._wrapHeartbeatCallback(n)}_makeRef(){return this.socketAdapter.makeRef()}_remove(n){this.channels=this.channels.filter(s=>s.topic!==n.topic),this.channels.length===0&&(this.log("transport","no channels remaining, scheduling disconnect"),this._schedulePendingDisconnect())}_schedulePendingDisconnect(){if(this._cancelPendingDisconnect(),this._disconnectOnEmptyChannelsAfterMs===0){this.log("transport","disconnecting immediately - no channels"),this.disconnect();return}
38this._pendingDisconnectTimer=setTimeout(()=>{this._pendingDisconnectTimer=null,this.channels.length===0&&(this.log("transport","deferred disconnect fired - no channels, disconnecting"),this.disconnect())},this._disconnectOnEmptyChannelsAfterMs),this.log("transport",`deferred disconnect scheduled in ${this._disconnectOnEmptyChannelsAfterMs}ms`)}_cancelPendingDisconnect(){this._pendingDisconnectTimer!==null&&(this.log("transport","pending disconnect cancelled - channel activity detected"),clearTimeout(this._pendingDisconnectTimer),this._pendingDisconnectTimer=null)}async _performAuth(n=null){let s,i=!1;if(n)s=n,i=!0;else if(this.accessToken)try{s=await this.accessToken()}catch(l){this.log("error","Error fetching access token from callback",l),s=this.accessTokenValue}else s=this.accessTokenValue;i?this._manuallySetToken=!0:this.accessToken&&(this._manuallySetToken=!1),this.accessTokenValue!=s&&(this.accessTokenValue=s,this.channels.forEach(l=>{const u={access_token:s,version:c1};s&&l.updateJoinPayload(u),l.joinedOnce&&l.channelAdapter.isJoined()&&l.channelAdapter.push(x0.access_token,{access_token:s})}))}async _waitForAuthIfNeeded(){this._authPromise&&await this._authPromise}_setAuthSafely(n="general"){this._isManualToken()||this.setAuth().catch(s=>{this.log("error",`Error setting auth in ${n}`,s)})}_setupConnectionHandlers(){this.socketAdapter.onOpen(()=>{(this._authPromise||(this.accessToken&&!this.accessTokenValue?this.setAuth():Promise.resolve())).catch(s=>{this.log("error","error waiting for auth on connect",s)}),this.worker&&!this.workerRef&&this._startWorkerHeartbeat()}),this.socketAdapter.onClose(()=>{this.worker&&this.workerRef&&this._terminateWorker()}),this.socketAdapter.onMessage(n=>{n.ref&&n.ref===this._pendingWorkerHeartbeatRef&&(this._pendingWorkerHeartbeatRef=null)})}_handleNodeJsRaceCondition(){this.socketAdapter.isConnected()&&this.socketAdapter.getSocket().onConnOpen()}_wrapHeartbeatCallback(n){return(s,i)=>{s=="sent"&&this._setAuthSafely(),n&&n(s,i)}}_startWorkerHeartbeat(){this.workerUrl?this.log("worker",`starting worker for from ${this.workerUrl}`):this.log("worker","starting default worker");const n=this._workerObjectUrl(this.workerUrl);this.workerRef=new Worker(n),this.workerRef.onerror=s=>{this.log("worker","worker error",s.message),this._terminateWorker(),this.disconnect()},this.workerRef.onmessage=s=>{s.data.event==="keepAlive"&&this.sendHeartbeat()},this.workerRef.postMessage({event:"start",interval:this.heartbeatIntervalMs})}_terminateWorker(){this.workerRef&&(this.log("worker","terminating worker"),this.workerRef.terminate(),this.workerRef=void 0)}_workerObjectUrl(n){let s;if(n)s=n;else{const i=new Blob([I1],{type:"application/javascript"});s=URL.createObjectURL(i)}return s}_initializeOptions(n){var s,i,l,u,c,d,p,g,m,y,b,_;this.worker=(s=n?.worker)!==null&&s!==void 0?s:!1,this.accessToken=(i=n?.accessToken)!==null&&i!==void 0?i:null;const w={};w.timeout=(l=n?.timeout)!==null&&l!==void 0?l:d1,w.heartbeatIntervalMs=(u=n?.heartbeatIntervalMs)!==null&&u!==void 0?u:zm.HEARTBEAT_INTERVAL,this._disconnectOnEmptyChannelsAfterMs=(c=n?.disconnectOnEmptyChannelsAfterMs)!==null&&c!==void 0?c:2*((d=n?.heartbeatIntervalMs)!==null&&d!==void 0?d:zm.HEARTBEAT_INTERVAL),w.transport=(p=n?.transport)!==null&&p!==void 0?p:l1.getWebSocketConstructor(),w.params=n?.params,w.logger=n?.logger,w.heartbeatCallback=this._wrapHeartbeatCallback(n?.heartbeatCallback),w.sessionStorage=(g=n?.sessionStorage)!==null&&g!==void 0?g:q1(),w.reconnectAfterMs=(m=n?.reconnectAfterMs)!==null&&m!==void 0?m:(U=>P1[U-1]||B1);let A,R;const O=(y=n?.vsn)!==null&&y!==void 0?y:f1;switch(O){case h1:A=(U,j)=>j(JSON.stringify(U)),R=(U,j)=>j(JSON.parse(U));break;case C0:A=this.serializer.encode.bind(this.serializer),R=this.serializer.decode.bind(this.serializer);break;default:throw new Error(`Unsupported serializer version: ${w.vsn}`)}if(w.vsn=O,w.encode=(b=n?.encode)!==null&&b!==void 0?b:A,w.decode=(_=n?.decode)!==null&&_!==void 0?_:R,w.beforeReconnect=this._reconnectAuth.bind(this),(n?.logLevel||n?.log_level)&&(this.logLevel=n.logLevel||n.log_level,w.params=Object.assign(Object.assign({},w.params),{log_level:this.logLevel})),this.worker){if(typeof window<"u"&&!window.Worker)throw new Error("Web Worker is not supported");this.workerUrl=n?.workerUrl,w.autoSendHeartbeat=!this.worker}return w}async _reconnectAuth(){await this._waitForAuthIfNeeded(),this.isConnected()||this.connect()}}
38var Li=class extends Error{constructor(t,n){super(t),this.name="IcebergError",this.status=n.status,this.icebergType=n.icebergType,this.icebergCode=n.icebergCode,this.details=n.details,this.isCommitStateUnknown=n.icebergType==="CommitStateUnknownException"||[500,502,504].includes(n.status)&&n.icebergType?.includes("CommitState")===!0}isNotFound(){return this.status===404}isConflict(){return this.status===409}isAuthenticationTimeout(){return this.status===419}};function G1(t,n,s){const i=new URL(n,t);if(s)for(const[l,u]of Object.entries(s))u!==void 0&&i.searchParams.set(l,u);return i.toString()}async function V1(t){return!t||t.type==="none"?{}:t.type==="bearer"?{Authorization:`Bearer ${t.token}`}:t.type==="header"?{[t.name]:t.value}:t.type==="custom"?await t.getHeaders():{}}function K1(t){const n=t.fetchImpl??globalThis.fetch;return{async request({method:s,path:i,query:l,body:u,headers:c}){const d=G1(t.baseUrl,i,l),p=await V1(t.auth),g=await n(d,{method:s,headers:{...u?{"Content-Type":"application/json"}:{},...p,...c},body:u?JSON.stringify(u):void 0}),m=await g.text(),y=(g.headers.get("content-type")||"").includes("application/json"),b=y&&m?JSON.parse(m):m;if(!g.ok){const _=y?b:void 0,w=_?.error;throw new Li(w?.message??`Request failed with status ${g.status}`,{status:g.status,icebergType:w?.type,icebergCode:w?.code,details:_})}return{status:g.status,headers:g.headers,data:b}}}}function Sl(t){return t.join("�")}var Y1=class{constructor(t,n=""){this.client=t,this.prefix=n}async listNamespaces(t){const n=t?{parent:Sl(t.namespace)}:void 0;return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces`,query:n})).data.namespaces.map(i=>({namespace:i}))}async createNamespace(t,n){const s={namespace:t.namespace,properties:n?.properties};return(await this.client.request({method:"POST",path:`${this.prefix}/namespaces`,body:s})).data}async dropNamespace(t){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${Sl(t.namespace)}`})}async loadNamespaceMetadata(t){return{properties:(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${Sl(t.namespace)}`})).data.properties}}async namespaceExists(t){try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${Sl(t.namespace)}`}),!0}catch(n){if(n instanceof Li&&n.status===404)return!1;throw n}}async createNamespaceIfNotExists(t,n){try{return await this.createNamespace(t,n)}catch(s){if(s instanceof Li&&s.status===409)return;throw s}}};function na(t){return t.join("�")}var F1=class{constructor(t,n="",s){this.client=t,this.prefix=n,this.accessDelegation=s}async listTables(t){return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${na(t.namespace)}/tables`})).data.identifiers}async createTable(t,n){const s={};return this.accessDelegation&&(s["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${na(t.namespace)}/tables`,body:n,headers:s})).data.metadata}async updateTable(t,n){const s=await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${na(t.namespace)}/tables/${t.name}`,body:n});return{"metadata-location":s.data["metadata-location"],metadata:s.data.metadata}}async dropTable(t,n){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${na(t.namespace)}/tables/${t.name}`,query:{purgeRequested:String(n?.purge??!1)}})}async loadTable(t){const n={};return this.accessDelegation&&(n["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${na(t.namespace)}/tables/${t.name}`,headers:n})).data.metadata}async tableExists(t){const n={};this.accessDelegation&&(n["X-Iceberg-Access-Delegation"]=this.accessDelegation);try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${na(t.namespace)}/tables/${t.name}`,headers:n}),!0}catch(s){if(s instanceof Li&&s.status===404)return!1;throw s}}async createTableIfNotExists(t,n){try{return await this.createTable(t,n)}catch(s){if(s instanceof Li&&s.status===409)return await this.loadTable({namespace:t.namespace,name:n.name});throw s}}},Q1=class{constructor(t){let n="v1";t.catalogName&&(n+=`/${t.catalogName}`);const s=t.baseUrl.endsWith("/")?t.baseUrl:`${t.baseUrl}/`;this.client=K1({baseUrl:s,auth:t.auth,fetchImpl:t.fetch}),this.accessDelegation=t.accessDelegation?.join(","),this.namespaceOps=new Y1(this.client,n),this.tableOps=new F1(this.client,n,this.accessDelegation)}async listNamespaces(t){return this.namespaceOps.listNamespaces(t)}async createNamespace(t,n){return this.namespaceOps.createNamespace(t,n)}async dropNamespace(t){await this.namespaceOps.dropNamespace(t)}async loadNamespaceMetadata(t){return this.namespaceOps.loadNamespaceMetadata(t)}async listTables(t){return this.tableOps.listTables(t)}
38async createTable(t,n){return this.tableOps.createTable(t,n)}async updateTable(t,n){return this.tableOps.updateTable(t,n)}async dropTable(t,n){await this.tableOps.dropTable(t,n)}async loadTable(t){return this.tableOps.loadTable(t)}async namespaceExists(t){return this.namespaceOps.namespaceExists(t)}async tableExists(t){return this.tableOps.tableExists(t)}async createNamespaceIfNotExists(t,n){return this.namespaceOps.createNamespaceIfNotExists(t,n)}async createTableIfNotExists(t,n){return this.tableOps.createTableIfNotExists(t,n)}};function zi(t){"@babel/helpers - typeof";return zi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},zi(t)}function J1(t,n){if(zi(t)!="object"||!t)return t;var s=t[Symbol.toPrimitive];if(s!==void 0){var i=s.call(t,n);if(zi(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(t)}function X1(t){var n=J1(t,"string");return zi(n)=="symbol"?n:n+""}function Z1(t,n,s){return(n=X1(n))in t?Object.defineProperty(t,n,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[n]=s,t}function Pm(t,n){var s=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);n&&(i=i.filter(function(l){return Object.getOwnPropertyDescriptor(t,l).enumerable})),s.push.apply(s,i)}return s}function ce(t){for(var n=1;n<arguments.length;n++){var s=arguments[n]!=null?arguments[n]:{};n%2?Pm(Object(s),!0).forEach(function(i){Z1(t,i,s[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(s)):Pm(Object(s)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(s,i))})}return t}var nu=class extends Error{constructor(t,n="storage",s,i){super(t),this.__isStorageError=!0,this.namespace=n,this.name=n==="vectors"?"StorageVectorsError":"StorageError",this.status=s,this.statusCode=i}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}};function ru(t){return typeof t=="object"&&t!==null&&"__isStorageError"in t}var rf=class extends nu{constructor(t,n,s,i="storage"){super(t,i,n,s),this.name=i==="vectors"?"StorageVectorsApiError":"StorageApiError",this.status=n,this.statusCode=s}toJSON(){return ce({},super.toJSON())}},U0=class extends nu{constructor(t,n,s="storage"){super(t,s),this.name=s==="vectors"?"StorageVectorsUnknownError":"StorageUnknownError",this.originalError=n}};function ql(t,n,s){const i=ce({},t),l=n.toLowerCase();for(const u of Object.keys(i))u.toLowerCase()===l&&delete i[u];return i[l]=s,i}function W1(t){const n={};for(const[s,i]of Object.entries(t))n[s.toLowerCase()]=i;return n}const eO=t=>t?(...n)=>t(...n):(...n)=>fetch(...n),tO=t=>{if(typeof t!="object"||t===null)return!1;const n=Object.getPrototypeOf(t);return(n===null||n===Object.prototype||Object.getPrototypeOf(n)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},sf=t=>{if(Array.isArray(t))return t.map(s=>sf(s));if(typeof t=="function"||t!==Object(t))return t;const n={};return Object.entries(t).forEach(([s,i])=>{const l=s.replace(/([-_][a-z])/gi,u=>u.toUpperCase().replace(/[-_]/g,""));n[l]=sf(i)}),n},nO=t=>!t||typeof t!="string"||t.length===0||t.length>100||t.trim()!==t||t.includes("/")||t.includes("\\")?!1:/^[\w!.\*'() &$@=;:+,?-]+$/.test(t),Bm=t=>{if(typeof t=="object"&&t!==null){const n=t;if(typeof n.msg=="string")return n.msg;if(typeof n.message=="string")return n.message;if(typeof n.error_description=="string")return n.error_description;if(typeof n.error=="string")return n.error;if(typeof n.error=="object"&&n.error!==null){const s=n.error;if(typeof s.message=="string")return s.message}}return JSON.stringify(t)},rO=async(t,n,s,i)=>{if(t!==null&&typeof t=="object"&&"json"in t&&typeof t.json=="function"){const l=t;let u=parseInt(String(l.status),10);Number.isFinite(u)||(u=500),l.json().then(c=>{const d=c?.statusCode||c?.code||u+"";n(new rf(Bm(c),u,d,i))}).catch(()=>{const c=u+"";n(new rf(l.statusText||`HTTP ${u} error`,u,c,i))})}else n(new U0(Bm(t),t,i))},sO=(t,n,s,i)=>{const l={method:t,headers:n?.headers||{}};if(t==="GET"||t==="HEAD"||!i)return ce(ce({},l),s);if(tO(i)){var u;const c=n?.headers||{};let d;for(const[p,g]of Object.entries(c))p.toLowerCase()==="content-type"&&(d=g);l.headers=ql(c,"Content-Type",(u=d)!==null&&u!==void 0?u:"application/json"),l.body=JSON.stringify(i)}else l.body=i;return n?.duplex&&(l.duplex=n.duplex),ce(ce({},l),s)};async function Ei(t,n,s,i,l,u,c){return new Promise((d,p)=>{t(s,sO(n,i,l,u)).then(g=>{if(!g.ok)throw g;if(i?.noResolveJson)return g;if(c==="vectors"){const m=g.headers.get("content-type");if(g.headers.get("content-length")==="0"||g.status===204)return{};if(!m||!m.includes("application/json"))return{}}return g.json()}).then(g=>d(g)).catch(g=>rO(g,p,i,c))})}function N0(t="storage"){return{get:async(n,s,i,l)=>Ei(n,"GET",s,i,l,void 0,t),post:async(n,s,i,l,u)=>Ei(n,"POST",s,l,u,i,t),put:async(n,s,i,l,u)=>Ei(n,"PUT",s,l,u,i,t),head:async(n,s,i,l)=>Ei(n,"HEAD",s,ce(ce({},i),{},{noResolveJson:!0}),l,void 0,t),remove:async(n,s,i,l,u)=>Ei(n,"DELETE",s,l,u,i,t)}}const aO=N0("storage"),{get:Pi,post:on,put:af,head:iO,remove:kf}=aO,$t=N0("vectors");var ba=class{constructor(t,n={},s,i="storage"){this.shouldThrowOnError=!1,this.url=t,this.headers=W1(n),this.fetch=eO(s),this.namespace=i}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(t,n){return this.headers=ql(this.headers,t,n),this}async handleOperation(t){var n=this;try{return{data:await t(),error:null}}catch(s){if(n.shouldThrowOnError)throw s;if(ru(s))return{data:null,error:s};throw s}}},oO=class{constructor(t,n){this.downloadFn=t,this.shouldThrowOnError=n}then(t,n){return this.execute().then(t,n)}async execute(){var t=this;try{return{data:(await t.downloadFn()).body,error:null}}catch(n){if(t.shouldThrowOnError)throw n;if(ru(n))return{data:null,error:n};throw n}}};let D0;D0=Symbol.toStringTag;var lO=class{constructor(t,n){this.downloadFn=t,this.shouldThrowOnError=n,this[D0]="BlobDownloadBuilder",this.promise=null}asStream(){return new oO(this.downloadFn,this.shouldThrowOnError)}then(t,n){return this.getPromise().then(t,n)}catch(t){return this.getPromise().catch(t)}finally(t){return this.getPromise().finally(t)}getPromise(){return this.promise||(this.promise=this.execute()),this.promise}async execute(){var t=this;try{return{data:await(await t.downloadFn()).blob(),error:null}}catch(n){if(t.shouldThrowOnError)throw n;if(ru(n))return{data:null,error:n};throw n}}};const uO={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},Hm={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};var cO=class extends ba{constructor(t,n={},s,i){super(t,n,i,"storage"),this.bucketId=s}async uploadOrUpdate(t,n,s,i){var l=this;return l.handleOperation(async()=>{let u;const c=ce(ce({},Hm),i);let d=ce(ce({},l.headers),t==="POST"&&{"x-upsert":String(c.upsert)});const p=c.metadata;if(typeof Blob<"u"&&s instanceof Blob?(u=new FormData,u.append("cacheControl",c.cacheControl),p&&u.append("metadata",l.encodeMetadata(p)),u.append("",s)):typeof FormData<"u"&&s instanceof FormData?(u=s,u.has("cacheControl")||u.append("cacheControl",c.cacheControl),p&&!u.has("metadata")&&u.append("metadata",l.encodeMetadata(p))):(u=s,d["cache-control"]=`max-age=${c.cacheControl}`,d["content-type"]=c.contentType,p&&(d["x-metadata"]=l.toBase64(l.encodeMetadata(p))),(typeof ReadableStream<"u"&&u instanceof ReadableStream||u&&typeof u=="object"&&"pipe"in u&&typeof u.pipe=="function")&&!c.duplex&&(c.duplex="half")),i?.headers)for(const[b,_]of Object.entries(i.headers))d=ql(d,b,_);const g=l._removeEmptyFolders(n),m=l._getFinalPath(g),y=await(t=="PUT"?af:on)(l.fetch,`${l.url}/object/${m}`,u,ce({headers:d},c?.duplex?{duplex:c.duplex}:{}));return{path:g,id:y.Id,fullPath:y.Key}})}async upload(t,n,s){return this.uploadOrUpdate("POST",t,n,s)}async uploadToSignedUrl(t,n,s,i){var l=this;const u=l._removeEmptyFolders(t),c=l._getFinalPath(u),d=new URL(l.url+`/object/upload/sign/${c}`);return d.searchParams.set("token",n),l.handleOperation(async()=>{let p;const g=ce(ce({},Hm),i);let m=ce(ce({},l.headers),{"x-upsert":String(g.upsert)});const y=g.metadata;if(typeof Blob<"u"&&s instanceof Blob?(p=new FormData,p.append("cacheControl",g.cacheControl),y&&p.append("metadata",l.encodeMetadata(y)),p.append("",s)):typeof FormData<"u"&&s instanceof FormData?(p=s,p.has("cacheControl")||p.append("cacheControl",g.cacheControl),y&&!p.has("metadata")&&p.append("metadata",l.encodeMetadata(y))):(p=s,m["cache-control"]=`max-age=${g.cac
38heControl}`,m["content-type"]=g.contentType,y&&(m["x-metadata"]=l.toBase64(l.encodeMetadata(y))),(typeof ReadableStream<"u"&&p instanceof ReadableStream||p&&typeof p=="object"&&"pipe"in p&&typeof p.pipe=="function")&&!g.duplex&&(g.duplex="half")),i?.headers)for(const[b,_]of Object.entries(i.headers))m=ql(m,b,_);return{path:u,fullPath:(await af(l.fetch,d.toString(),p,ce({headers:m},g?.duplex?{duplex:g.duplex}:{}))).Key}})}async createSignedUploadUrl(t,n){var s=this;return s.handleOperation(async()=>{let i=s._getFinalPath(t);const l=ce({},s.headers);n?.upsert&&(l["x-upsert"]="true");const u=await on(s.fetch,`${s.url}/object/upload/sign/${i}`,{},{headers:l}),c=new URL(s.url+u.url),d=c.searchParams.get("token");if(!d)throw new nu("No token returned by API");return{signedUrl:c.toString(),path:t,token:d}})}async update(t,n,s){return this.uploadOrUpdate("PUT",t,n,s)}async move(t,n,s){var i=this;return i.handleOperation(async()=>await on(i.fetch,`${i.url}/object/move`,{bucketId:i.bucketId,sourceKey:t,destinationKey:n,destinationBucket:s?.destinationBucket},{headers:i.headers}))}async copy(t,n,s){var i=this;return i.handleOperation(async()=>({path:(await on(i.fetch,`${i.url}/object/copy`,{bucketId:i.bucketId,sourceKey:t,destinationKey:n,destinationBucket:s?.destinationBucket},{headers:i.headers})).Key}))}async createSignedUrl(t,n,s){var i=this;return i.handleOperation(async()=>{let l=i._getFinalPath(t);const u=typeof s?.transform=="object"&&s.transform!==null&&Object.keys(s.transform).length>0;let c=await on(i.fetch,`${i.url}/object/sign/${l}`,ce({expiresIn:n},u?{transform:s.transform}:{}),{headers:i.headers});const d=new URLSearchParams;s?.download&&d.set("download",s.download===!0?"":s.download),s?.cacheNonce!=null&&d.set("cacheNonce",String(s.cacheNonce));const p=d.toString();return{signedUrl:encodeURI(`${i.url}${c.signedURL}${p?`&${p}`:""}`)}})}async createSignedUrls(t,n,s){var i=this;return i.handleOperation(async()=>{const l=await on(i.fetch,`${i.url}/object/sign/${i.bucketId}`,{expiresIn:n,paths:t},{headers:i.headers}),u=new URLSearchParams;s?.download&&u.set("download",s.download===!0?"":s.download),s?.cacheNonce!=null&&u.set("cacheNonce",String(s.cacheNonce));const c=u.toString();return l.map(d=>ce(ce({},d),{},{signedUrl:d.signedURL?encodeURI(`${i.url}${d.signedURL}${c?`&${c}`:""}`):null}))})}download(t,n,s){const i=typeof n?.transform=="object"&&n.transform!==null&&Object.keys(n.transform).length>0?"render/image/authenticated":"object",l=new URLSearchParams;n?.transform&&this.applyTransformOptsToQuery(l,n.transform),n?.cacheNonce!=null&&l.set("cacheNonce",String(n.cacheNonce));const u=l.toString(),c=this._getFinalPath(t),d=()=>Pi(this.fetch,`${this.url}/${i}/${c}${u?`?${u}`:""}`,{headers:this.headers,noResolveJson:!0},s);return new lO(d,this.shouldThrowOnError)}async info(t){var n=this;const s=n._getFinalPath(t);return n.handleOperation(async()=>sf(await Pi(n.fetch,`${n.url}/object/info/${s}`,{headers:n.headers})))}async exists(t){var n=this;const s=n._getFinalPath(t);try{return await iO(n.fetch,`${n.url}/object/${s}`,{headers:n.headers}),{data:!0,error:null}}catch(l){if(n.shouldThrowOnError)throw l;if(ru(l)){var i;const u=l instanceof rf?l.status:l instanceof U0?(i=l.originalError)===null||i===void 0?void 0:i.status:void 0;if(u!==void 0&&[400,404].includes(u))return{data:!1,error:l}}throw l}}getPublicUrl(t,n){const s=this._getFinalPath(t),i=new URLSearchParams;n?.download&&i.set("download",n.download===!0?"":n.download),n?.transform&&this.applyTransformOptsToQuery(i,n.transform),n?.cacheNonce!=null&&i.set("cacheNonce",String(n.cacheNonce));const l=i.toString(),u=typeof n?.transform=="object"&&n.transform!==null&&Object.keys(n.transform).length>0?"render/image":"object";return{data:{publicUrl:encodeURI(`${this.url}/${u}/public/${s}`)+(l?`?${l}`:"")}}}async remove(t){var n=this;return n.handleOperation(async()=>await kf(n.fetch,`${n.url}/object/${n.bucketId}`,{prefixes:t},{headers:n.headers}))}async list(t,n,s){var i=this;return i.handleOperation(async()=>{const l=ce(ce(ce({},uO),n),{},{prefix:t||""});return await on(i.fetch,`${i.url}/object/list/${i.bucketId}`,l,{headers:i.headers},s)})}async listV2(t,n){var s=this;return s.handleOperation(async()=>{const i=ce({},t);return await on(s.fetch,`${s.url}/object/list-v2/${s.bucketId}`,i,{headers:s.headers},n)})}encodeMetadata(t){return JSON.stringify(t)}toBase64(t){return typeof Buffer<"u"?Buffer.from(t).toString("base64"):btoa(t)}_getFinalPath(t){return`${this.bucketId}/${t.replace(/^\/+/,"")}`}_removeEmptyFolders(t){return t.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}applyTransformOptsToQuery(t,n){return n.width&&t.set("width",n.width.toString()),n.height&&t.set("height",n.height.toString()),n.resize&&t.set("resize",n.resize),n.format&&t.set("format",n.format),n.quality&&t.set("qual
38ity",n.quality.toString()),t}};const hO="2.105.4",Ki={"X-Client-Info":`storage-js/${hO}`};var fO=class extends ba{constructor(t,n={},s,i){const l=new URL(t);i?.useNewHostname&&/supabase\.(co|in|red)$/.test(l.hostname)&&!l.hostname.includes("storage.supabase.")&&(l.hostname=l.hostname.replace("supabase.","storage.supabase."));const u=l.href.replace(/\/$/,""),c=ce(ce({},Ki),n);super(u,c,s,"storage")}async listBuckets(t){var n=this;return n.handleOperation(async()=>{const s=n.listBucketOptionsToQueryString(t);return await Pi(n.fetch,`${n.url}/bucket${s}`,{headers:n.headers})})}async getBucket(t){var n=this;return n.handleOperation(async()=>await Pi(n.fetch,`${n.url}/bucket/${t}`,{headers:n.headers}))}async createBucket(t,n={public:!1}){var s=this;return s.handleOperation(async()=>await on(s.fetch,`${s.url}/bucket`,{id:t,name:t,type:n.type,public:n.public,file_size_limit:n.fileSizeLimit,allowed_mime_types:n.allowedMimeTypes},{headers:s.headers}))}async updateBucket(t,n){var s=this;return s.handleOperation(async()=>await af(s.fetch,`${s.url}/bucket/${t}`,{id:t,name:t,public:n.public,file_size_limit:n.fileSizeLimit,allowed_mime_types:n.allowedMimeTypes},{headers:s.headers}))}async emptyBucket(t){var n=this;return n.handleOperation(async()=>await on(n.fetch,`${n.url}/bucket/${t}/empty`,{},{headers:n.headers}))}async deleteBucket(t){var n=this;return n.handleOperation(async()=>await kf(n.fetch,`${n.url}/bucket/${t}`,{},{headers:n.headers}))}listBucketOptionsToQueryString(t){const n={};return t&&("limit"in t&&(n.limit=String(t.limit)),"offset"in t&&(n.offset=String(t.offset)),t.search&&(n.search=t.search),t.sortColumn&&(n.sortColumn=t.sortColumn),t.sortOrder&&(n.sortOrder=t.sortOrder)),Object.keys(n).length>0?"?"+new URLSearchParams(n).toString():""}},dO=class extends ba{constructor(t,n={},s){const i=t.replace(/\/$/,""),l=ce(ce({},Ki),n);super(i,l,s,"storage")}async createBucket(t){var n=this;return n.handleOperation(async()=>await on(n.fetch,`${n.url}/bucket`,{name:t},{headers:n.headers}))}async listBuckets(t){var n=this;return n.handleOperation(async()=>{const s=new URLSearchParams;t?.limit!==void 0&&s.set("limit",t.limit.toString()),t?.offset!==void 0&&s.set("offset",t.offset.toString()),t?.sortColumn&&s.set("sortColumn",t.sortColumn),t?.sortOrder&&s.set("sortOrder",t.sortOrder),t?.search&&s.set("search",t.search);const i=s.toString(),l=i?`${n.url}/bucket?${i}`:`${n.url}/bucket`;return await Pi(n.fetch,l,{headers:n.headers})})}async deleteBucket(t){var n=this;return n.handleOperation(async()=>await kf(n.fetch,`${n.url}/bucket/${t}`,{},{headers:n.headers}))}from(t){var n=this;if(!nO(t))throw new nu("Invalid bucket name: File, folder, and bucket names must follow AWS object key naming guidelines and should avoid the use of any other characters.");const s=new Q1({baseUrl:this.url,catalogName:t,auth:{type:"custom",getHeaders:async()=>n.headers},fetch:this.fetch}),i=this.shouldThrowOnError;return new Proxy(s,{get(l,u){const c=l[u];return typeof c!="function"?c:async(...d)=>{try{return{data:await c.apply(l,d),error:null}}catch(p){if(i)throw p;return{data:null,error:p}}}}})}},pO=class extends ba{constructor(t,n={},s){const i=t.replace(/\/$/,""),l=ce(ce({},Ki),{},{"Content-Type":"application/json"},n);super(i,l,s,"vectors")}async createIndex(t){var n=this;return n.handleOperation(async()=>await $t.post(n.fetch,`${n.url}/CreateIndex`,t,{headers:n.headers})||{})}async getIndex(t,n){var s=this;return s.handleOperation(async()=>await $t.post(s.fetch,`${s.url}/GetIndex`,{vectorBucketName:t,indexName:n},{headers:s.headers}))}async listIndexes(t){var n=this;return n.handleOperation(async()=>await $t.post(n.fetch,`${n.url}/ListIndexes`,t,{headers:n.headers}))}async deleteIndex(t,n){var s=this;return s.handleOperation(async()=>await $t.post(s.fetch,`${s.url}/DeleteIndex`,{vectorBucketName:t,indexName:n},{headers:s.headers})||{})}},gO=class extends ba{constructor(t,n={},s){const i=t.replace(/\/$/,""),l=ce(ce({},Ki),{},{"Content-Type":"application/json"},n);super(i,l,s,"vectors")}async putVectors(t){var n=this;if(t.vectors.length<1||t.vectors.length>500)throw new Error("Vector batch size must be between 1 and 500 items");return n.handleOperation(async()=>await $t.post(n.fetch,`${n.url}/PutVectors`,t,{headers:n.headers})||{})}async getVectors(t){var n=this;return n.handleOperation(async()=>await $t.post(n.fetch,`${n.url}/GetVectors`,t,{headers:n.headers}))}async listVectors(t){var n=this;if(t.segmentCount!==void 0){if(t.segmentCount<1||t.segmentCount>16)throw new Error("segmentCount must be between 1 and 16");
38if(t.segmentIndex!==void 0&&(t.segmentIndex<0||t.segmentIndex>=t.segmentCount))throw new Error(`segmentIndex must be between 0 and ${t.segmentCount-1}`)}return n.handleOperation(async()=>await $t.post(n.fetch,`${n.url}/ListVectors`,t,{headers:n.headers}))}async queryVectors(t){var n=this;return n.handleOperation(async()=>await $t.post(n.fetch,`${n.url}/QueryVectors`,t,{headers:n.headers}))}async deleteVectors(t){var n=this;if(t.keys.length<1||t.keys.length>500)throw new Error("Keys batch size must be between 1 and 500 items");return n.handleOperation(async()=>await $t.post(n.fetch,`${n.url}/DeleteVectors`,t,{headers:n.headers})||{})}},yO=class extends ba{constructor(t,n={},s){const i=t.replace(/\/$/,""),l=ce(ce({},Ki),{},{"Content-Type":"application/json"},n);super(i,l,s,"vectors")}async createBucket(t){var n=this;return n.handleOperation(async()=>await $t.post(n.fetch,`${n.url}/CreateVectorBucket`,{vectorBucketName:t},{headers:n.headers})||{})}async getBucket(t){var n=this;return n.handleOperation(async()=>await $t.post(n.fetch,`${n.url}/GetVectorBucket`,{vectorBucketName:t},{headers:n.headers}))}async listBuckets(t={}){var n=this;return n.handleOperation(async()=>await $t.post(n.fetch,`${n.url}/ListVectorBuckets`,t,{headers:n.headers}))}async deleteBucket(t){var n=this;return n.handleOperation(async()=>await $t.post(n.fetch,`${n.url}/DeleteVectorBucket`,{vectorBucketName:t},{headers:n.headers})||{})}},mO=class extends yO{constructor(t,n={}){super(t,n.headers||{},n.fetch)}from(t){return new vO(this.url,this.headers,t,this.fetch)}async createBucket(t){var n=()=>super.createBucket,s=this;return n().call(s,t)}async getBucket(t){var n=()=>super.getBucket,s=this;return n().call(s,t)}async listBuckets(t={}){var n=()=>super.listBuckets,s=this;return n().call(s,t)}async deleteBucket(t){var n=()=>super.deleteBucket,s=this;return n().call(s,t)}},vO=class extends pO{constructor(t,n,s,i){super(t,n,i),this.vectorBucketName=s}async createIndex(t){var n=()=>super.createIndex,s=this;return n().call(s,ce(ce({},t),{},{vectorBucketName:s.vectorBucketName}))}async listIndexes(t={}){var n=()=>super.listIndexes,s=this;return n().call(s,ce(ce({},t),{},{vectorBucketName:s.vectorBucketName}))}async getIndex(t){var n=()=>super.getIndex,s=this;return n().call(s,s.vectorBucketName,t)}async deleteIndex(t){var n=()=>super.deleteIndex,s=this;return n().call(s,s.vectorBucketName,t)}index(t){return new bO(this.url,this.headers,this.vectorBucketName,t,this.fetch)}},bO=class extends gO{constructor(t,n,s,i,l){super(t,n,l),this.vectorBucketName=s,this.indexName=i}async putVectors(t){var n=()=>super.putVectors,s=this;return n().call(s,ce(ce({},t),{},{vectorBucketName:s.vectorBucketName,indexName:s.indexName}))}async getVectors(t){var n=()=>super.getVectors,s=this;return n().call(s,ce(ce({},t),{},{vectorBucketName:s.vectorBucketName,indexName:s.indexName}))}async listVectors(t={}){var n=()=>super.listVectors,s=this;return n().call(s,ce(ce({},t),{},{vectorBucketName:s.vectorBucketName,indexName:s.indexName}))}async queryVectors(t){var n=()=>super.queryVectors,s=this;return n().call(s,ce(ce({},t),{},{vectorBucketName:s.vectorBucketName,indexName:s.indexName}))}async deleteVectors(t){var n=()=>super.deleteVectors,s=this;return n().call(s,ce(ce({},t),{},{vectorBucketName:s.vectorBucketName,indexName:s.indexName}))}},_O=class extends fO{constructor(t,n={},s,i){super(t,n,s,i)}from(t){return new cO(this.url,this.headers,t,this.fetch)}get vectors(){return new mO(this.url+"/vector",{headers:this.headers,fetch:this.fetch})}get analytics(){return new dO(this.url+"/iceberg",this.headers,this.fetch)}};const L0="2.105.4",ua=30*1e3,of=3,Ph=of*ua,SO="http://localhost:9999",wO="supabase.auth.token",EO={"X-Client-Info":`gotrue-js/${L0}`},lf="X-Supabase-Api-Version",z0={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},TO=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,RO=600*1e3;class Bi extends Error{constructor(n,s,i){super(n),this.__isAuthError=!0,this.name="AuthError",this.status=s,this.code=i}toJSON(){return{name:this.name,message:this.message,status:this.status,code:this.code}}}function Z(t){return typeof t=="object"&&t!==null&&"__isAuthError"in t}class AO extends Bi{constructor(n,s,i){super(n,s,i),this.name="AuthApiError",this.status=s,this.code=i}
38}function OO(t){return Z(t)&&t.name==="AuthApiError"}class un extends Bi{constructor(n,s){super(n),this.name="AuthUnknownError",this.originalError=s}}class Qn extends Bi{constructor(n,s,i,l){super(n,i,l),this.name=s,this.status=i}}class lt extends Qn{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function wl(t){return Z(t)&&t.name==="AuthSessionMissingError"}class ra extends Qn{constructor(){super("Auth session or user missing","AuthInvalidTokenResponseError",500,void 0)}}class El extends Qn{constructor(n){super(n,"AuthInvalidCredentialsError",400,void 0)}}class Tl extends Qn{constructor(n,s=null){super(n,"AuthImplicitGrantRedirectError",500,void 0),this.details=null,this.details=s}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{details:this.details})}}function CO(t){return Z(t)&&t.name==="AuthImplicitGrantRedirectError"}class qm extends Qn{constructor(n,s=null){super(n,"AuthPKCEGrantCodeExchangeError",500,void 0),this.details=null,this.details=s}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{details:this.details})}}class xO extends Qn{constructor(){super("PKCE code verifier not found in storage. This can happen if the auth flow was initiated in a different browser or device, or if the storage was cleared. For SSR frameworks (Next.js, SvelteKit, etc.), use @supabase/ssr on both the server and client to store the code verifier in cookies.","AuthPKCECodeVerifierMissingError",400,"pkce_code_verifier_not_found")}}class uf extends Qn{constructor(n,s){super(n,"AuthRetryableFetchError",s,void 0)}}function Bh(t){return Z(t)&&t.name==="AuthRetryableFetchError"}class Im extends Qn{constructor(n,s,i){super(n,"AuthWeakPasswordError",s,"weak_password"),this.reasons=i}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{reasons:this.reasons})}}class cf extends Qn{constructor(n){super(n,"AuthInvalidJwtError",400,"invalid_jwt")}}const Il="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),$m=` 39\r=`.split(""),kO=(()=>{const t=new Array(128);for(let n=0;n<t.length;n+=1)t[n]=-1;for(let n=0;n<$m.length;n+=1)t[$m[n].charCodeAt(0)]=-2;for(let n=0;n<Il.length;n+=1)t[Il[n].charCodeAt(0)]=n;return t})();function Gm(t,n,s){if(t!==null)for(n.queue=n.queue<<8|t,n.queuedBits+=8;n.queuedBits>=6;){const i=n.queue>>n.queuedBits-6&63;s(Il[i]),n.queuedBits-=6}else if(n.queuedBits>0)for(n.queue=n.queue<<6-n.queuedBits,n.queuedBits=6;n.queuedBits>=6;){const i=n.queue>>n.queuedBits-6&63;s(Il[i]),n.queuedBits-=6}}function P0(t,n,s){const i=kO[t];if(i>-1)for(n.queue=n.queue<<6|i,n.queuedBits+=6;n.queuedBits>=8;)s(n.queue>>n.queuedBits-8&255),n.queuedBits-=8;else{if(i===-2)return;throw new Error(`Invalid Base64-URL character "${String.fromCharCode(t)}"`)}}function Vm(t){const n=[],s=c=>{n.push(String.fromCodePoint(c))},i={utf8seq:0,codepoint:0},l={queue:0,queuedBits:0},u=c=>{UO(c,i,s)};for(let c=0;c<t.length;c+=1)P0(t.charCodeAt(c),l,u);return n.join("")}function jO(t,n){if(t<=127){n(t);return}else if(t<=2047){n(192|t>>6),n(128|t&63);return}else if(t<=65535){n(224|t>>12),n(128|t>>6&63),n(128|t&63);return}else if(t<=1114111){n(240|t>>18),n(128|t>>12&63),n(128|t>>6&63),n(128|t&63);return}throw new Error(`Unrecognized Unicode codepoint: ${t.toString(16)}`)}function MO(t,n){for(let s=0;s<t.length;s+=1){let i=t.charCodeAt(s);if(i>55295&&i<=56319){const l=(i-55296)*1024&65535;i=(t.charCodeAt(s+1)-56320&65535|l)+65536,s+=1}jO(i,n)}}function UO(t,n,s){if(n.utf8seq===0){if(t<=127){s(t);return}for(let i=1;i<6;i+=1)if((t>>7-i&1)===0){n.utf8seq=i;break}if(n.utf8seq===2)n.codepoint=t&31;else if(n.utf8seq===3)n.codepoint=t&15;else if(n.utf8seq===4)n.codepoint=t&7;else throw new Error("Invalid UTF-8 sequence");n.utf8seq-=1}else if(n.utf8seq>0){if(t<=127)throw new Error("Invalid UTF-8 sequence");n.codepoint=n.codepoint<<6|t&63,n.utf8seq-=1,n.utf8seq===0&&s(n.codepoint)}}function ya(t){const n=[],s={queue:0,queuedBits:0},i=l=>{n.push(l)};for(let l=0;l<t.length;l+=1)P0(t.charCodeAt(l),s,i);return new Uint8Array(n)}function NO(t){const n=[];return MO(t,s=>n.push(s)),new Uint8Array(n)}function ls(t){const n=[],s={queue:0,queuedBits:0},i=l=>{n.push(l)};return t.forEach(l=>Gm(l,s,i)),Gm(null,s,i),n.join("")}function DO(t){return Math.round(Date.now()/1e3)+t}function LO(){return Symbol("auth-callback")}const mt=()=>typeof window<"u"&&typeof document<"u",ts={tested:!1,writable:!1},B0=()=>
39{if(!mt())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(ts.tested)return ts.writable;const t=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(t,t),globalThis.localStorage.removeItem(t),ts.tested=!0,ts.writable=!0}catch{ts.tested=!0,ts.writable=!1}return ts.writable};function zO(t){const n={},s=new URL(t);if(s.hash&&s.hash[0]==="#")try{new URLSearchParams(s.hash.substring(1)).forEach((l,u)=>{n[u]=l})}catch{}return s.searchParams.forEach((i,l)=>{n[l]=i}),n}const H0=t=>t?(...n)=>t(...n):(...n)=>fetch(...n),PO=t=>typeof t=="object"&&t!==null&&"status"in t&&"ok"in t&&"json"in t&&typeof t.json=="function",ca=async(t,n,s)=>{await t.setItem(n,JSON.stringify(s))},ns=async(t,n)=>{const s=await t.getItem(n);if(!s)return null;try{return JSON.parse(s)}catch{return null}},yt=async(t,n)=>{await t.removeItem(n)};class su{constructor(){this.promise=new su.promiseConstructor((n,s)=>{this.resolve=n,this.reject=s})}}su.promiseConstructor=Promise;function Rl(t){const n=t.split(".");if(n.length!==3)throw new cf("Invalid JWT structure");for(let i=0;i<n.length;i++)if(!TO.test(n[i]))throw new cf("JWT not in base64url format");return{header:JSON.parse(Vm(n[0])),payload:JSON.parse(Vm(n[1])),signature:ya(n[2]),raw:{header:n[0],payload:n[1]}}}async function BO(t){return await new Promise(n=>{setTimeout(()=>n(null),t)})}function HO(t,n){return new Promise((i,l)=>{(async()=>{for(let u=0;u<1/0;u++)try{const c=await t(u);if(!n(u,null,c)){i(c);return}}catch(c){if(!n(u,c)){l(c);return}}})()})}function qO(t){return("0"+t.toString(16)).substr(-2)}function IO(){const n=new Uint32Array(56);if(typeof crypto>"u"){const s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",i=s.length;let l="";for(let u=0;u<56;u++)l+=s.charAt(Math.floor(Math.random()*i));return l}return crypto.getRandomValues(n),Array.from(n,qO).join("")}async function $O(t){const s=new TextEncoder().encode(t),i=await crypto.subtle.digest("SHA-256",s),l=new Uint8Array(i);return Array.from(l).map(u=>String.fromCharCode(u)).join("")}async function GO(t){if(!(typeof crypto<"u"&&typeof crypto.subtle<"u"&&typeof TextEncoder<"u"))return console.warn("WebCrypto API is not supported. Code challenge method will default to use plain instead of sha256."),t;const s=await $O(t);return btoa(s).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function sa(t,n,s=!1){const i=IO();let l=i;s&&(l+="/recovery"),await ca(t,`${n}-code-verifier`,l);const u=await GO(i);return[u,i===u?"plain":"s256"]}const VO=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function KO(t){const n=t.headers.get(lf);if(!n||!n.match(VO))return null;try{return new Date(`${n}T00:00:00.0Z`)}catch{return null}}function YO(t){if(!t)throw new Error("Missing exp claim");const n=Math.floor(Date.now()/1e3);if(t<=n)throw new Error("JWT has expired")}function FO(t){switch(t){case"RS256":return{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}};case"ES256":return{name:"ECDSA",namedCurve:"P-256",hash:{name:"SHA-256"}};default:throw new Error("Invalid alg claim")}}const QO=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function $n(t){if(!QO.test(t))throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not")}function an(t){if(!t.passkey)throw new Error("@supabase/auth-js: the passkey API is experimental and disabled by default. Enable it by passing `auth: { experimental: { passkey: true } }` to createClient (or to the GoTrueClient constructor).")}function Hh(){const t={};return new Proxy(t,{get:(n,s)=>{if(s==="__isUserNotAvailableProxy")return!0;if(typeof s=="symbol"){const i=s.toString();if(i==="Symbol(Symbol.toPrimitive)"||i==="Symbol(Symbol.toStringTag)"||i==="Symbol(util.inspect.custom)")return}throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Accessing the "${s}" property of the session object is not supported. Please use getUser() instead.`)},set:(n,s)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Setting the "${s}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)},deleteProperty:(n,s)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Deleting the "${s}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)}})}function JO(t,n){return new Proxy(t,{get:(s,i,l)=>{if(i==="__isInsecureUserWarningProxy")return!0;
39if(typeof i=="symbol"){const u=i.toString();if(u==="Symbol(Symbol.toPrimitive)"||u==="Symbol(Symbol.toStringTag)"||u==="Symbol(util.inspect.custom)"||u==="Symbol(nodejs.util.inspect.custom)")return Reflect.get(s,i,l)}return!n.value&&typeof i=="string"&&(console.warn("Using the user object as returned from supabase.auth.getSession() or from some supabase.auth.onAuthStateChange() events could be insecure! This value comes directly from the storage medium (usually cookies on the server) and may not be authentic. Use supabase.auth.getUser() instead which authenticates the data by contacting the Supabase Auth server."),n.value=!0),Reflect.get(s,i,l)}})}function Km(t){return JSON.parse(JSON.stringify(t))}const rs=t=>{if(typeof t=="object"&&t!==null){const n=t;if(typeof n.msg=="string")return n.msg;if(typeof n.message=="string")return n.message;if(typeof n.error_description=="string")return n.error_description;if(typeof n.error=="string")return n.error}return JSON.stringify(t)},XO=[502,503,504,520,521,522,523,524,530];async function Ym(t){var n;if(!PO(t))throw new uf(rs(t),0);if(XO.includes(t.status))throw new uf(rs(t),t.status);let s;try{s=await t.json()}catch(u){throw new un(rs(u),u)}let i;const l=KO(t);if(l&&l.getTime()>=z0["2024-01-01"].timestamp&&typeof s=="object"&&s&&typeof s.code=="string"?i=s.code:typeof s=="object"&&s&&typeof s.error_code=="string"&&(i=s.error_code),i){if(i==="weak_password")throw new Im(rs(s),t.status,((n=s.weak_password)===null||n===void 0?void 0:n.reasons)||[]);if(i==="session_not_found")throw new lt}else if(typeof s=="object"&&s&&typeof s.weak_password=="object"&&s.weak_password&&Array.isArray(s.weak_password.reasons)&&s.weak_password.reasons.length&&s.weak_password.reasons.reduce((u,c)=>u&&typeof c=="string",!0))throw new Im(rs(s),t.status,s.weak_password.reasons);throw new AO(rs(s),t.status||500,i)}const ZO=(t,n,s,i)=>{const l={method:t,headers:n?.headers||{}};return t==="GET"?l:(l.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},n?.headers),l.body=JSON.stringify(i),Object.assign(Object.assign({},l),s))};async function te(t,n,s,i){var l;const u=Object.assign({},i?.headers);u[lf]||(u[lf]=z0["2024-01-01"].name),i?.jwt&&(u.Authorization=`Bearer ${i.jwt}`);const c=(l=i?.query)!==null&&l!==void 0?l:{};i?.redirectTo&&(c.redirect_to=i.redirectTo);const d=Object.keys(c).length?"?"+new URLSearchParams(c).toString():"",p=await WO(t,n,s+d,{headers:u,noResolveJson:i?.noResolveJson},{},i?.body);return i?.xform?i?.xform(p):{data:Object.assign({},p),error:null}}async function WO(t,n,s,i,l,u){const c=ZO(n,i,l,u);let d;try{d=await t(s,Object.assign({},c))}catch(p){throw console.error(p),new uf(rs(p),0)}if(d.ok||await Ym(d),i?.noResolveJson)return d;try{return await d.json()}catch(p){await Ym(p)}}function en(t){var n;let s=null;nC(t)&&(s=Object.assign({},t),t.expires_at||(s.expires_at=DO(t.expires_in)));const i=(n=t.user)!==null&&n!==void 0?n:t;return{data:{session:s,user:i},error:null}}function Fm(t){const n=en(t);return!n.error&&t.weak_password&&typeof t.weak_password=="object"&&Array.isArray(t.weak_password.reasons)&&t.weak_password.reasons.length&&t.weak_password.message&&typeof t.weak_password.message=="string"&&t.weak_password.reasons.reduce((s,i)=>s&&typeof i=="string",!0)&&(n.data.weak_password=t.weak_password),n}function Rr(t){var n;return{data:{user:(n=t.user)!==null&&n!==void 0?n:t},error:null}}function eC(t){return{data:t,error:null}}function tC(t){const{action_link:n,email_otp:s,hashed_token:i,redirect_to:l,verification_type:u}=t,c=tu(t,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),d={action_link:n,email_otp:s,hashed_token:i,redirect_to:l,verification_type:u},p=Object.assign({},c);return{data:{properties:d,user:p},error:null}}function Qm(t){return t}function nC(t){return!!t.access_token&&!!t.refresh_token&&!!t.expires_in}const qh=["global","local","others"];class rC{constructor({url:n="",headers:s={},fetch:i,experimental:l}){this.url=n,this.headers=s,this.fetch=H0(i),this.experimental=l??{},this.mfa={listFactors:this._listFactors.bind(this),deleteFactor:this._deleteFactor.bind(this)},this.oauth={listClients:this._listOAuthClients.bind(this),createClient:this._createOAuthClient.bind(this),getClient:this._getOAuthClient.bind(this),updateClient:this._updateOAuthClient.bind(this),deleteClient:this._deleteOAuthClient.bind(this),regenerateClientSecret:this._regenerateOAuthClientSecret.bind(this)},this.customProviders={listProviders:this._listCustomProviders.bind(this),createProvider:this._createCustomProvider.bind(this),getProvider:this._getCustomProvider.bind(this),updateProvider:this._updateCustomProvider.bind(this),deleteProvider:this._deleteCustomProvider.bind(this)},this.passkey={listPasskeys:this._adminListPasskeys.bind(this),deletePasskey:this._adminDeletePasskey.bind(this)}}async signOut(n,s=qh[0]){if(qh.indexOf(s)<0)throw new Error(`@supabase/auth-js: Parameter scope must be one of ${qh.join(", ")}`);try{return await te(this.fetch,"POST",`${this.url}/logout?scope=${s}`,{headers:this.headers,jwt:n,noResolveJson:!0}),{data:null,error:null}}catch(i){if(Z(i))return{data:null,error:i};throw i}}async inviteUserByEmail(n,s={}){try{return await te(this.fetch,"POST",`${this.url}/invite`,{body:{email:n,data:s.data},headers:this.headers,redirectTo:s.redirectTo,xform:Rr})}catch(i){if(Z(i))return{data:{user:null},error:i};throw i}}async generateLink(n){try{const{options:s}=n,i=tu(n,["options"]),l=Object.assign(Object.assign({},i),s);return"newEmail"in i&&(l.new_email=i?.newEmail,delete l.newEmail),await te(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:l,headers:this.headers,xform:tC,redirectTo:s?.redirectTo})}catch(s){if(Z(s))return{data:{properties:null,user:null},error:s};throw s}}async createUser(n){try{return await te(this.fetch,"POST",`${this.url}/admin/users`,{body:n,headers:this.headers,xform:Rr})}catch(s){if(Z(s))return{data:{user:null},error:s};throw s}}async listUsers(n){var s,i,l,u,c,d,p;try{const g={nextPage:null,lastPage:0,total:0},m=await te(this.fetch,"GET",`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:(i=(s=n?.page)===null||s===void 0?void 0:s.toString())!==null&&i!==void 0?i:"",per_page:(u=(l=n?.perPage)===null||l===void 0?void 0:l.toString())!==null&&u!==void 0?u:""},xform:Qm});if(m.error)throw m.error;const y=await m.json(),b=(c=m.headers.get("x-total-count"))!==null&&c!==void 0?c:0,_=(p=(d=m.headers.get("link"))===null||d===void 0?void 0:d.split(","))!==null&&p!==void 0?p:[];return _.length>0&&(_.forEach(w=>{const A=parseInt(w.split(";")[0].split("=")[1].substring(0,1)),R=JSON.parse(w.split(";")[1].split("=")[1]);g[`${R}Page`]=A}),g.total=parseInt(b)),{data:Object.assign(Object.assign({},y),g),error:null}}catch(g){if(Z(g))return{data:{users:[]},error:g};throw g}}async getUserById(n){$n(n);try{return await te(this.fetch,"GET",`${this.url}/admin/users/${n}`,{headers:this.headers,xform:Rr})}catch(s){if(Z(s))return{data:{user:null},error:s};throw s}}async updateUserById(n,s){$n(n);try{return await te(this.fetch,"PUT",`${this.url}/admin/users/${n}`,{body:s,headers:this.headers,xform:Rr})}catch(i){if(Z(i))return{data:{user:null},error:i};throw i}}async deleteUser(n,s=!1){$n(n);
39try{return await te(this.fetch,"DELETE",`${this.url}/admin/users/${n}`,{headers:this.headers,body:{should_soft_delete:s},xform:Rr})}catch(i){if(Z(i))return{data:{user:null},error:i};throw i}}async _listFactors(n){$n(n.userId);try{const{data:s,error:i}=await te(this.fetch,"GET",`${this.url}/admin/users/${n.userId}/factors`,{headers:this.headers,xform:l=>({data:{factors:l},error:null})});return{data:s,error:i}}catch(s){if(Z(s))return{data:null,error:s};throw s}}async _deleteFactor(n){$n(n.userId),$n(n.id);try{return{data:await te(this.fetch,"DELETE",`${this.url}/admin/users/${n.userId}/factors/${n.id}`,{headers:this.headers}),error:null}}catch(s){if(Z(s))return{data:null,error:s};throw s}}async _listOAuthClients(n){var s,i,l,u,c,d,p;try{const g={nextPage:null,lastPage:0,total:0},m=await te(this.fetch,"GET",`${this.url}/admin/oauth/clients`,{headers:this.headers,noResolveJson:!0,query:{page:(i=(s=n?.page)===null||s===void 0?void 0:s.toString())!==null&&i!==void 0?i:"",per_page:(u=(l=n?.perPage)===null||l===void 0?void 0:l.toString())!==null&&u!==void 0?u:""},xform:Qm});if(m.error)throw m.error;const y=await m.json(),b=(c=m.headers.get("x-total-count"))!==null&&c!==void 0?c:0,_=(p=(d=m.headers.get("link"))===null||d===void 0?void 0:d.split(","))!==null&&p!==void 0?p:[];return _.length>0&&(_.forEach(w=>{const A=parseInt(w.split(";")[0].split("=")[1].substring(0,1)),R=JSON.parse(w.split(";")[1].split("=")[1]);g[`${R}Page`]=A}),g.total=parseInt(b)),{data:Object.assign(Object.assign({},y),g),error:null}}catch(g){if(Z(g))return{data:{clients:[]},error:g};throw g}}async _createOAuthClient(n){try{return await te(this.fetch,"POST",`${this.url}/admin/oauth/clients`,{body:n,headers:this.headers,xform:s=>({data:s,error:null})})}catch(s){if(Z(s))return{data:null,error:s};throw s}}async _getOAuthClient(n){try{return await te(this.fetch,"GET",`${this.url}/admin/oauth/clients/${n}`,{headers:this.headers,xform:s=>({data:s,error:null})})}catch(s){if(Z(s))return{data:null,error:s};throw s}}async _updateOAuthClient(n,s){try{return await te(this.fetch,"PUT",`${this.url}/admin/oauth/clients/${n}`,{body:s,headers:this.headers,xform:i=>({data:i,error:null})})}catch(i){if(Z(i))return{data:null,error:i};throw i}}async _deleteOAuthClient(n){try{return await te(this.fetch,"DELETE",`${this.url}/admin/oauth/clients/${n}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(s){if(Z(s))return{data:null,error:s};throw s}}async _regenerateOAuthClientSecret(n){try{return await te(this.fetch,"POST",`${this.url}/admin/oauth/clients/${n}/regenerate_secret`,{headers:this.headers,xform:s=>({data:s,error:null})})}catch(s){if(Z(s))return{data:null,error:s};throw s}}async _listCustomProviders(n){try{const s={};return n?.type&&(s.type=n.type),await te(this.fetch,"GET",`${this.url}/admin/custom-providers`,{headers:this.headers,query:s,xform:i=>{var l;return{data:{providers:(l=i?.providers)!==null&&l!==void 0?l:[]},error:null}}})}catch(s){if(Z(s))return{data:{providers:[]},error:s};throw s}}async _createCustomProvider(n){try{return await te(this.fetch,"POST",`${this.url}/admin/custom-providers`,{body:n,headers:this.headers,xform:s=>({data:s,error:null})})}catch(s){if(Z(s))return{data:null,error:s};throw s}}async _getCustomProvider(n){try{return await te(this.fetch,"GET",`${this.url}/admin/custom-providers/${n}`,{headers:this.headers,xform:s=>({data:s,error:null})})}catch(s){if(Z(s))return{data:null,error:s};throw s}}async _updateCustomProvider(n,s){try{return await te(this.fetch,"PUT",`${this.url}/admin/custom-providers/${n}`,{body:s,headers:this.headers,xform:i=>({data:i,error:null})})}catch(i){if(Z(i))return{data:null,error:i};throw i}}async _deleteCustomProvider(n){try{return await te(this.fetch,"DELETE",`${this.url}/admin/custom-providers/${n}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(s){if(Z(s))return{data:null,error:s};throw s}}async _adminListPasskeys(n){an(this.experimental),$n(n.userId);try{return await te(this.fetch,"GET",`${this.url}/admin/users/${n.userId}/passkeys`,{headers:this.headers,xform:s=>({data:s,error:null})})}catch(s){if(Z(s))return{data:null,error:s};throw s}}async _adminDeletePasskey(n){an(this.experimental),$n(n.userId),$n(n.passkeyId);
39try{return await te(this.fetch,"DELETE",`${this.url}/admin/users/${n.userId}/passkeys/${n.passkeyId}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(s){if(Z(s))return{data:null,error:s};throw s}}}function Jm(t={}){return{getItem:n=>t[n]||null,setItem:(n,s)=>{t[n]=s},removeItem:n=>{delete t[n]}}}const yn={debug:!!(globalThis&&B0()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug")==="true")};class q0 extends Error{constructor(n){super(n),this.isAcquireTimeout=!0}}class Xm extends q0{}async function sC(t,n,s){yn.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire lock",t,n);const i=new globalThis.AbortController;let l;n>0&&(l=setTimeout(()=>{i.abort(),yn.debug&&console.log("@supabase/gotrue-js: navigatorLock acquire timed out",t)},n)),await Promise.resolve();try{return await globalThis.navigator.locks.request(t,n===0?{mode:"exclusive",ifAvailable:!0}:{mode:"exclusive",signal:i.signal},async u=>{if(u){clearTimeout(l),yn.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquired",t,u.name);try{return await s()}finally{yn.debug&&console.log("@supabase/gotrue-js: navigatorLock: released",t,u.name)}}else{if(n===0)throw yn.debug&&console.log("@supabase/gotrue-js: navigatorLock: not immediately available",t),new Xm(`Acquiring an exclusive Navigator LockManager lock "${t}" immediately failed`);if(yn.debug)try{const c=await globalThis.navigator.locks.query();console.log("@supabase/gotrue-js: Navigator LockManager state",JSON.stringify(c,null," "))}catch(c){console.warn("@supabase/gotrue-js: Error when querying Navigator LockManager state",c)}return console.warn("@supabase/gotrue-js: Navigator LockManager returned a null lock when using #request without ifAvailable set to true, it appears this browser is not following the LockManager spec https://developer.mozilla.org/en-US/docs/Web/API/LockManager/request"),clearTimeout(l),await s()}})}catch(u){if(n>0&&clearTimeout(l),u!==null&&typeof u=="object"&&"name"in u&&u.name==="AbortError"&&n>0){if(i.signal.aborted)return yn.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire timeout, recovering by stealing lock",t),console.warn(`@supabase/gotrue-js: Lock "${t}" was not released within ${n}ms. This may indicate an orphaned lock from a component unmount (e.g., React Strict Mode). Forcefully acquiring the lock to recover.`),await Promise.resolve().then(()=>globalThis.navigator.locks.request(t,{mode:"exclusive",steal:!0},async c=>{if(c){yn.debug&&console.log("@supabase/gotrue-js: navigatorLock: recovered (stolen)",t,c.name);try{return await s()}finally{yn.debug&&console.log("@supabase/gotrue-js: navigatorLock: released (stolen)",t,c.name)}}else return console.warn("@supabase/gotrue-js: Navigator LockManager returned null lock even with steal: true"),await s()}));throw yn.debug&&console.log("@supabase/gotrue-js: navigatorLock: lock was stolen by another request",t),new Xm(`Lock "${t}" was released because another request stole it`)}throw u}}function aC(){if(typeof globalThis!="object")try{Object.defineProperty(Object.prototype,"__magic__",{get:function(){return this},configurable:!0}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__}catch{typeof self<"u"&&(self.globalThis=self)}}function I0(t){if(!/^0x[a-fA-F0-9]{40}$/.test(t))throw new Error(`@supabase/auth-js: Address "${t}" is invalid.`);return t.toLowerCase()}function iC(t){return parseInt(t,16)}function oC(t){const n=new TextEncoder().encode(t);return"0x"+Array.from(n,i=>i.toString(16).padStart(2,"0")).join("")}function lC(t){var n;const{chainId:s,domain:i,expirationTime:l,issuedAt:u=new Date,nonce:c,notBefore:d,requestId:p,resources:g,scheme:m,uri:y,version:b}=t;{if(!Number.isInteger(s))throw new Error(`@supabase/auth-js: Invalid SIWE message field "chainId". Chain ID must be a EIP-155 chain ID. Provided value: ${s}`);if(!i)throw new Error('@supabase/auth-js: Invalid SIWE message field "domain". Domain must be provided.');if(c&&c.length<8)throw new Error(`@supabase/auth-js: Invalid SIWE message field "nonce". Nonce must be at least 8 characters. Provided value: ${c}`);if(!y)throw new Error('@supabase/auth-js: Invalid SIWE message field "uri". URI must be provided.');if(b!=="1")throw new Error(`@supabase/auth-js: Invalid SIWE message field "version". Version must be '1'. Provided value: ${b}`);if(!((n=t.statement)===null||n===void 0)&&n.includes(` 40`))throw new Error(`@supabase/auth-js: Invalid SIWE message field "statement". Statement must not include '\\n'. Provided value: ${t.statement}`)}const _=I0(t.address),w=m?`${m}://${i}`:i,A=t.statement?`${t.statement} 41`:"",R=`${w} wants you to sign in with your Ethereum account: 42${_} 43 44${A}`;let O=`URI: ${y} 45Version: ${b} 46Chain ID: ${s}${c?` 47Nonce: ${c}`:""} 48Issued At: ${u.toISOString()}`;if(l&&(O+=` 49Expiration Time: ${l.toISOString()}`),d&&(O+=` 50Not Before: ${d.toISOString()}`),p&&(O+=` 51Request ID: ${p}`),g){let U=` 52Resources:`;
52for(const j of g){if(!j||typeof j!="string")throw new Error(`@supabase/auth-js: Invalid SIWE message field "resources". Every resource must be a valid string. Provided value: ${j}`);U+=` 53- ${j}`}O+=U}return`${R} 54${O}`}class tt extends Error{constructor({message:n,code:s,cause:i,name:l}){var u;super(n,{cause:i}),this.__isWebAuthnError=!0,this.name=(u=l??(i instanceof Error?i.name:void 0))!==null&&u!==void 0?u:"Unknown Error",this.code=s}toJSON(){return{name:this.name,message:this.message,code:this.code}}}class $l extends tt{constructor(n,s){super({code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:s,message:n}),this.name="WebAuthnUnknownError",this.originalError=s}}function uC({error:t,options:n}){var s,i,l;const{publicKey:u}=n;if(!u)throw Error("options was missing required publicKey property");if(t.name==="AbortError"){if(n.signal instanceof AbortSignal)return new tt({message:"Registration ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:t})}else if(t.name==="ConstraintError"){if(((s=u.authenticatorSelection)===null||s===void 0?void 0:s.requireResidentKey)===!0)return new tt({message:"Discoverable credentials were required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT",cause:t});if(n.mediation==="conditional"&&((i=u.authenticatorSelection)===null||i===void 0?void 0:i.userVerification)==="required")return new tt({message:"User verification was required during automatic registration but it could not be performed",code:"ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE",cause:t});if(((l=u.authenticatorSelection)===null||l===void 0?void 0:l.userVerification)==="required")return new tt({message:"User verification was required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT",cause:t})}else{if(t.name==="InvalidStateError")return new tt({message:"The authenticator was previously registered",code:"ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",cause:t});if(t.name==="NotAllowedError")return new tt({message:t.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t});if(t.name==="NotSupportedError")return u.pubKeyCredParams.filter(d=>d.type==="public-key").length===0?new tt({message:'No entry in pubKeyCredParams was of type "public-key"',code:"ERROR_MALFORMED_PUBKEYCREDPARAMS",cause:t}):new tt({message:"No available authenticator supported any of the specified pubKeyCredParams algorithms",code:"ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG",cause:t});if(t.name==="SecurityError"){const c=window.location.hostname;if($0(c)){if(u.rp.id!==c)return new tt({message:`The RP ID "${u.rp.id}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:t})}else return new tt({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:t})}else if(t.name==="TypeError"){if(u.user.id.byteLength<1||u.user.id.byteLength>64)return new tt({message:"User ID was not between 1 and 64 characters",code:"ERROR_INVALID_USER_ID_LENGTH",cause:t})}else if(t.name==="UnknownError")return new tt({message:"The authenticator was unable to process the specified options, or could not create a new credential",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:t})}return new tt({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t})}function cC({error:t,options:n}){const{publicKey:s}=n;if(!s)throw Error("options was missing required publicKey property");if(t.name==="AbortError"){if(n.signal instanceof AbortSignal)return new tt({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:t})}else{if(t.name==="NotAllowedError")return new tt({message:t.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t});if(t.name==="SecurityError"){const i=window.location.hostname;if($0(i)){if(s.rpId!==i)return new tt({message:`The RP ID "${s.rpId}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:t})}else return new tt({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:t})}else if(t.name==="UnknownError")return new tt({message:"The authenticator was unable to process the specified options, or could not create a new assertion signature",code:"ERROR_AUTHENTICATOR_GENERAL_ER
54ROR",cause:t})}return new tt({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t})}class hC{createNewAbortSignal(){if(this.controller){const s=new Error("Cancelling existing WebAuthn API call for new one");s.name="AbortError",this.controller.abort(s)}const n=new AbortController;return this.controller=n,n.signal}cancelCeremony(){if(this.controller){const n=new Error("Manually cancelling existing WebAuthn API call");n.name="AbortError",this.controller.abort(n),this.controller=void 0}}}const hf=new hC;function Zm(t){if(!t)throw new Error("Credential creation options are required");if(typeof PublicKeyCredential<"u"&&"parseCreationOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseCreationOptionsFromJSON=="function")return PublicKeyCredential.parseCreationOptionsFromJSON(t);const{challenge:n,user:s,excludeCredentials:i}=t,l=tu(t,["challenge","user","excludeCredentials"]),u=ya(n).buffer,c=Object.assign(Object.assign({},s),{id:ya(s.id).buffer}),d=Object.assign(Object.assign({},l),{challenge:u,user:c});if(i&&i.length>0){d.excludeCredentials=new Array(i.length);for(let p=0;p<i.length;p++){const g=i[p];d.excludeCredentials[p]=Object.assign(Object.assign({},g),{id:ya(g.id).buffer,type:g.type||"public-key",transports:g.transports})}}return d}function Wm(t){if(!t)throw new Error("Credential request options are required");if(typeof PublicKeyCredential<"u"&&"parseRequestOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseRequestOptionsFromJSON=="function")return PublicKeyCredential.parseRequestOptionsFromJSON(t);const{challenge:n,allowCredentials:s}=t,i=tu(t,["challenge","allowCredentials"]),l=ya(n).buffer,u=Object.assign(Object.assign({},i),{challenge:l});if(s&&s.length>0){u.allowCredentials=new Array(s.length);for(let c=0;c<s.length;c++){const d=s[c];u.allowCredentials[c]=Object.assign(Object.assign({},d),{id:ya(d.id).buffer,type:d.type||"public-key",transports:d.transports})}}return u}function ev(t){var n;if("toJSON"in t&&typeof t.toJSON=="function")return t.toJSON();const s=t;return{id:t.id,rawId:t.id,response:{attestationObject:ls(new Uint8Array(t.response.attestationObject)),clientDataJSON:ls(new Uint8Array(t.response.clientDataJSON))},type:"public-key",clientExtensionResults:t.getClientExtensionResults(),authenticatorAttachment:(n=s.authenticatorAttachment)!==null&&n!==void 0?n:void 0}}function tv(t){var n;if("toJSON"in t&&typeof t.toJSON=="function")return t.toJSON();const s=t,i=t.getClientExtensionResults(),l=t.response;return{id:t.id,rawId:t.id,response:{authenticatorData:ls(new Uint8Array(l.authenticatorData)),clientDataJSON:ls(new Uint8Array(l.clientDataJSON)),signature:ls(new Uint8Array(l.signature)),userHandle:l.userHandle?ls(new Uint8Array(l.userHandle)):void 0},type:"public-key",clientExtensionResults:i,authenticatorAttachment:(n=s.authenticatorAttachment)!==null&&n!==void 0?n:void 0}}function $0(t){return t==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(t)}function Gl(){var t,n;return!!(mt()&&"PublicKeyCredential"in window&&window.PublicKeyCredential&&"credentials"in navigator&&typeof((t=navigator?.credentials)===null||t===void 0?void 0:t.create)=="function"&&typeof((n=navigator?.credentials)===null||n===void 0?void 0:n.get)=="function")}async function G0(t){try{const n=await navigator.credentials.create(t);return n?n instanceof PublicKeyCredential?{data:n,error:null}:{data:null,error:new $l("Browser returned unexpected credential type",n)}:{data:null,error:new $l("Empty credential response",n)}}catch(n){return{data:null,error:uC({error:n,options:t})}}}async function V0(t){try{const n=await navigator.credentials.get(t);return n?n instanceof PublicKeyCredential?{data:n,error:null}:{data:null,error:new $l("Browser returned unexpected credential type",n)}:{data:null,error:new $l("Empty credential response",n)}}catch(n){return{data:null,error:cC({error:n,options:t})}}}const fC={hints:["security-key"],authenticatorSelection:{authenticatorAttachment:"cross-platform",requireResidentKey:!1,userVerification:"preferred",residentKey:"discouraged"},attestation:"direct"},dC={userVerification:"preferred",hints:["security-key"],attestation:"direct"};function Vl(...t){const n=l=>l!==null&&typeof l=="object"&&!Array.isArray(l),s=l=>l instanceof ArrayBuffer||ArrayBuffer.isView(l),i={};for(const l of t)if(l)for(const u in l){const c=l[u];if(c!==void 0)if(Array.isArray(c))i[u]=c;else if(s(c))i[u]=c;else if(n(c)){const d=i[u];n(d)?i[u]=Vl(d,c):i[u]=Vl(c)}else i[u]=c}return i}function pC(t,n){return Vl(fC,t,n||{})}function gC(t,n){return Vl(dC,t,n||{})}class yC{constructor(n){this.client=n,this.enroll=this._enroll.bind(this),this.challenge=this._challenge.bind(this),this.verify=this._verify.bind(this),this.authenticate=this._authenticate.bind(this),this.register=this._register.bind(this)}async _enroll(n){return this.client.mfa.enroll(Object.assign(Object.assign({},n),{factorType:"webauthn"}))}async _challenge({factorId:n,webauthn:s,friendlyName:i,signal:l},u){var c;try{const{data:d,error:p}=await this.client.mfa.challenge({factorId:n,webauthn:s});if(!d)return{data:null,error:p};const g=l??hf.createNewAbortSignal();if(d.webauthn.type==="create"){const{user:m}=d.webauthn.credential_options.publicKey;if(!m.name){const y=i;if(y)m.name=`${m.id}:${y}`;else{const _=(await this.client.getUser()).data.user,w=((c=_?.user_metadata)===null||c===void 0?void 0:c.name)||_?.email||_?.id||"User";m.name=`${m.id}:${w}`}}m.displayName||(m.displayName=m.name)}
54switch(d.webauthn.type){case"create":{const m=pC(d.webauthn.credential_options.publicKey,u?.create),{data:y,error:b}=await G0({publicKey:m,signal:g});return y?{data:{factorId:n,challengeId:d.id,webauthn:{type:d.webauthn.type,credential_response:y}},error:null}:{data:null,error:b}}case"request":{const m=gC(d.webauthn.credential_options.publicKey,u?.request),{data:y,error:b}=await V0(Object.assign(Object.assign({},d.webauthn.credential_options),{publicKey:m,signal:g}));return y?{data:{factorId:n,challengeId:d.id,webauthn:{type:d.webauthn.type,credential_response:y}},error:null}:{data:null,error:b}}}}catch(d){return Z(d)?{data:null,error:d}:{data:null,error:new un("Unexpected error in challenge",d)}}}async _verify({challengeId:n,factorId:s,webauthn:i}){return this.client.mfa.verify({factorId:s,challengeId:n,webauthn:i})}async _authenticate({factorId:n,webauthn:{rpId:s=typeof window<"u"?window.location.hostname:void 0,rpOrigins:i=typeof window<"u"?[window.location.origin]:void 0,signal:l}={}},u){if(!s)return{data:null,error:new Bi("rpId is required for WebAuthn authentication")};try{if(!Gl())return{data:null,error:new un("Browser does not support WebAuthn",null)};const{data:c,error:d}=await this.challenge({factorId:n,webauthn:{rpId:s,rpOrigins:i},signal:l},{request:u});if(!c)return{data:null,error:d};const{webauthn:p}=c;return this._verify({factorId:n,challengeId:c.challengeId,webauthn:{type:p.type,rpId:s,rpOrigins:i,credential_response:p.credential_response}})}catch(c){return Z(c)?{data:null,error:c}:{data:null,error:new un("Unexpected error in authenticate",c)}}}async _register({friendlyName:n,webauthn:{rpId:s=typeof window<"u"?window.location.hostname:void 0,rpOrigins:i=typeof window<"u"?[window.location.origin]:void 0,signal:l}={}},u){if(!s)return{data:null,error:new Bi("rpId is required for WebAuthn registration")};try{if(!Gl())return{data:null,error:new un("Browser does not support WebAuthn",null)};const{data:c,error:d}=await this._enroll({friendlyName:n});if(!c)return await this.client.mfa.listFactors().then(m=>{var y;return(y=m.data)===null||y===void 0?void 0:y.all.find(b=>b.factor_type==="webauthn"&&b.friendly_name===n&&b.status!=="unverified")}).then(m=>m?this.client.mfa.unenroll({factorId:m?.id}):void 0),{data:null,error:d};const{data:p,error:g}=await this._challenge({factorId:c.id,friendlyName:c.friendly_name,webauthn:{rpId:s,rpOrigins:i},signal:l},{create:u});return p?this._verify({factorId:c.id,challengeId:p.challengeId,webauthn:{rpId:s,rpOrigins:i,type:p.webauthn.type,credential_response:p.webauthn.credential_response}}):{data:null,error:g}}catch(c){return Z(c)?{data:null,error:c}:{data:null,error:new un("Unexpected error in register",c)}}}}aC();const mC={url:SO,storageKey:wO,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:EO,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1,throwOnError:!1,lockAcquireTimeout:5e3,skipAutoInitialize:!1,experimental:{}};async function nv(t,n,s){return await s()}const aa={};class Hi{get jwks(){var n,s;return(s=(n=aa[this.storageKey])===null||n===void 0?void 0:n.jwks)!==null&&s!==void 0?s:{keys:[]}}set jwks(n){aa[this.storageKey]=Object.assign(Object.assign({},aa[this.storageKey]),{jwks:n})}get jwks_cached_at(){var n,s;return(s=(n=aa[this.storageKey])===null||n===void 0?void 0:n.cachedAt)!==null&&s!==void 0?s:Number.MIN_SAFE_INTEGER}set jwks_cached_at(n){aa[this.storageKey]=Object.assign(Object.assign({},aa[this.storageKey]),{cachedAt:n})}constructor(n){var s,i,l,u;this.userStorage=null,this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=null,this.autoRefreshTickTimeout=null,this.visibilityChangedCallback=null,this.refreshingDeferred=null,this.initializePromise=null,this.detectSessionInUrl=!0,this.hasCustomAuthorizationHeader=!1,this.suppressGetSessionWarning=!1,this.lockAcquired=!1,this.pendingInLock=[],this.broadcastChannel=null,this.logger=console.log;const c=Object.assign(Object.assign({},mC),n);if(this.storageKey=c.storageKey,this.instanceID=(s=Hi.nextInstanceID[this.storageKey])!==null&&s!==void 0?s:0,Hi.nextInstanceID[this.storageKey]=this.instanceID+1,this.logDebugMessages=!!c.debug,typeof c.debug=="function"&&(this.logger=c.debug),this.instanceID>0&&mt()){const d=`${this._logPrefix()} Multiple GoTrueClient instances detected in the same browser context. It is not an error, but this should be avoided as it may produce undefined behavior when used concurrently under the same storage key.`;console.warn(d),this.logDebugMessages&&console.trace(d)}if(this.persistSession=c.persistSession,this.autoRefreshToken=c.autoRefreshToken,this.experimental=(i=c.experimental)!==null&&i!==void 0?i:{},this.admin=new rC({url:c.url,headers:c.headers,fetch:c.fetch,experimental:this.experimental}),this.url=c.url,this.headers=c.headers,this.fetch=H0(c.fetch),this.lock=c.lock||nv,this.detectSessionInUrl=c.detectSessionInUrl,this.flowType=c.flowType,this.hasCustomAuthorizationHeader=c.hasCustomAuthorizationHeader,this.throwOnError=c.throwOnError,this.lockAcquireTimeout=c.lockAcquireTimeout,c.lock?this.lock=c.lock:this.persistSession&&mt()&&(!((l=globalThis?.navigator)===null||l===void 0)&&l.locks)?this.lock=sC:this.lock=nv,this.jwks||(this.jwks={keys:[]},this.jwks_cached_at=Number.MIN_SAFE_INTEGER),this.mfa={verify:this._verify.bind(this),enroll:this._enroll.bind(this),unenroll:this._unenroll.bind(this),challenge:this._challenge.bind(this),listFactors:this._listFactors.bind(this),challengeAndVerify:this._challengeAndVerify.bind(this),getAuthenticatorAssuranceLevel:this._getAuthenticatorAssuranceLevel.bind(this),webauthn:new yC(this)}
54,this.oauth={getAuthorizationDetails:this._getAuthorizationDetails.bind(this),approveAuthorization:this._approveAuthorization.bind(this),denyAuthorization:this._denyAuthorization.bind(this),listGrants:this._listOAuthGrants.bind(this),revokeGrant:this._revokeOAuthGrant.bind(this)},this.passkey={startRegistration:this._startPasskeyRegistration.bind(this),verifyRegistration:this._verifyPasskeyRegistration.bind(this),startAuthentication:this._startPasskeyAuthentication.bind(this),verifyAuthentication:this._verifyPasskeyAuthentication.bind(this),list:this._listPasskeys.bind(this),update:this._updatePasskey.bind(this),delete:this._deletePasskey.bind(this)},this.persistSession?(c.storage?this.storage=c.storage:B0()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=Jm(this.memoryStorage)),c.userStorage&&(this.userStorage=c.userStorage)):(this.memoryStorage={},this.storage=Jm(this.memoryStorage)),mt()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(d){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",d)}(u=this.broadcastChannel)===null||u===void 0||u.addEventListener("message",async d=>{this._debug("received broadcast notification from other tab or client",d);try{await this._notifyAllSubscribers(d.data.event,d.data.session,!1)}catch(p){this._debug("#broadcastChannel","error",p)}})}c.skipAutoInitialize||this.initialize().catch(d=>{this._debug("#initialize()","error",d)})}isThrowOnErrorEnabled(){return this.throwOnError}_returnResult(n){if(this.throwOnError&&n&&n.error)throw n.error;return n}_logPrefix(){return`GoTrueClient@${this.storageKey}:${this.instanceID} (${L0}) ${new Date().toISOString()}`}_debug(...n){return this.logDebugMessages&&this.logger(this._logPrefix(),...n),this}async initialize(){return this.initializePromise?await this.initializePromise:(this.initializePromise=(async()=>await this._acquireLock(this.lockAcquireTimeout,async()=>await this._initialize()))(),await this.initializePromise)}async _initialize(){var n;try{let s={},i="none";if(mt()&&(s=zO(window.location.href),this._isImplicitGrantCallback(s)?i="implicit":await this._isPKCECallback(s)&&(i="pkce")),mt()&&this.detectSessionInUrl&&i!=="none"){const{data:l,error:u}=await this._getSessionFromURL(s,i);if(u){if(this._debug("#_initialize()","error detecting session from URL",u),CO(u)){const p=(n=u.details)===null||n===void 0?void 0:n.code;if(p==="identity_already_exists"||p==="identity_not_found"||p==="single_identity_not_deletable")return{error:u}}return{error:u}}const{session:c,redirectType:d}=l;return this._debug("#_initialize()","detected session in URL",c,"redirect type",d),await this._saveSession(c),setTimeout(async()=>{d==="recovery"?await this._notifyAllSubscribers("PASSWORD_RECOVERY",c):await this._notifyAllSubscribers("SIGNED_IN",c)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(s){return Z(s)?this._returnResult({error:s}):this._returnResult({error:new un("Unexpected error during initialization",s)})}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(n){var s,i,l;try{const u=await te(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:(i=(s=n?.options)===null||s===void 0?void 0:s.data)!==null&&i!==void 0?i:{},gotrue_meta_security:{captcha_token:(l=n?.options)===null||l===void 0?void 0:l.captchaToken}},xform:en}),{data:c,error:d}=u;if(d||!c)return this._returnResult({data:{user:null,session:null},error:d});const p=c.session,g=c.user;return c.session&&(await this._saveSession(c.session),await this._notifyAllSubscribers("SIGNED_IN",p)),this._returnResult({data:{user:g,session:p},error:null})}catch(u){if(Z(u))return this._returnResult({data:{user:null,session:null},error:u});throw u}}async signUp(n){var s,i,l;try{let u;if("email"in n){const{email:m,password:y,options:b}=n;let _=null,w=null;this.flowType==="pkce"&&([_,w]=await sa(this.storage,this.storageKey)),u=await te(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:b?.emailRedirectTo,body:{email:m,password:y,data:(s=b?.data)!==null&&s!==void 0?s:{},gotrue_meta_security:{captcha_token:b?.captchaToken},code_challenge:_,code_challenge_method:w},xform:en})}else if("phone"in n){const{phone:m,password:y,options:b}=n;u=await te(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:m,password:y,data:(i=b?.data)!==null&&i!==void 0?i:{},channel:(l=b?.channel)!==null&&l!==void 0?l:"sms",gotrue_meta_security:{captcha_token:b?.captchaToken}},xform:en})}else throw new El("You must provide either an email or phone number and a password");const{data:c,error:d}=u;if(d||!c)return await yt(this.storage,`${this.storageKey}-code-verifier`),this._returnResult({data:{user:null,session:null},error:d});const p=c.session,g=c.user;return c.session&&(await this._saveSession(c.session),await this._notifyAllSubscribers("SIGNED_IN",p)),this._returnResult({data:{user:g,session:p},error:null})}catch(u){if(await yt(this.storage,`${this.storageKey}-code-verifier`),Z(u))return this._returnResult({data:{user:null,session:null},error:u});throw u}}async signInWithPassword(n){try{let s;if("email"in n){const{email:u,password:c,options:d}=n;s=await te(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:u,password:c,gotrue_meta_security:{captcha_token:d?.captchaToken}},xform:Fm})}else if("phone"in n){const{phone:u,password:c,options:d}=n;s=await te(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:u,password:c,gotrue_meta_security:{captcha_token:d?.captchaToken}},xform:Fm})}else throw new El("You must provide either an email or phone number and a password");const{data:i,error:l}=s;if(l)return this._returnResult({data:{user:null,session:null},error:l});if(!i||!i.session||!i.user){const u=new ra;return this._returnResult({data:{user:null,session:null},error:u})}return i.session&&(await this._saveSession(i.session),await this._notifyAllSubscribers("SIGNED_IN",i.session)),this._returnResult({data:Object.assign({user:i.user,session:i.session},i.weak_password?{weakPassword:i.weak_password}:null),error:l})}catch(s){if(Z(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}}async signInWithOAuth(n){var s,i,l,u;return await this._handleProviderSignIn(n.provider,{redirectTo:(s=n.options)===null||s===void 0?void 0:s.redirectTo,scopes:(i=n.options)===null||i===void 0?void 0:i.scopes,queryParams:(l=n.options)===null||l===void 0?void 0:l.queryParams,skipBrowserRedirect:(u=n.options)===null||u===void 0?void 0:u.skipBrowserRedirect})}async exchangeCodeForSession(n){return await this.initializePromise,this._acquireLock(this.lockAcquireTimeout,async()=>this._exchangeCodeForSession(n))}async signInWithWeb3(n){const{chain:s}=n;switch(s){case"ethereum":return await this.signInWithEthereum(n);case"solana":return await this.signInWithSolana(n);default:throw new Error(`@supabase/auth-js: Unsupported chain "${s}"`)}}async signInWithEthereum(n){var s,i,l,u,c,d,p,g,m,y,b;let _,w;if("message"in n)_=n.message,w=n.signature;else{const{chain:A,wallet:R,statement:O,options:U}=n;let j;if(mt())if(typeof R=="object")j=R;else{const J=window;if("ethereum"in J&&typeof J.ethereum=="object"&&"request"in J.ethereum&&typeof J.ethereum.request=="function")j=J.ethereum;else throw new Error("@supabase/auth-js: No compatible Ethereum wallet interface on the window object (window.ethereum) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'ethereum', wallet: resolvedUserWallet }) instead.")}else{if(typeof R!="object"||!U?.url)throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");j=R}const L=new URL((s=U?.url)!==null&&s!==void 0?s:window.location.href),Q=await j.request({method:"eth_requestAccounts"}).then(J=>J).catch(()=>{throw new Error("@supabase/auth-js: Wallet method eth_requestAccounts is missing or invalid")});if(!Q||Q.length===0)throw new Error("@supabase/auth-js: No accounts available. Please ensure the wallet is connected.");const V=I0(Q[0]);let q=(i=U?.signInWithEthereum)===null||i===void 0?void 0:i.chainId;if(!q){const J=await j.request({method:"eth_chainId"});q=iC(J)}const K={domain:L.host,address:V,statement:O,uri:L.href,version:"1",chainId:q,nonce:(l=U?.signInWithEthereum)===null||l===void 0?void 0:l.nonce,issuedAt:(c=(u=U?.signInWithEthereum)===null||u===void 0?void 0:u.issuedAt)!==null&&c!==void 0?c:new Date,expirationTime:(d=U?.signInWithEthereum)===null||d===void 0?void 0:d.expirationTime,notBefore:(p=U?.signInWithEthereum)===null||p===void 0?void 0:p.notBefore,requestId:(g=U?.signInWithEthereum)===null||g===void 0?void 0:g.requestId,resources:(m=U?.signInWithEthereum)===null||m===void 0?void 0:m.resources};_=lC(K),w=await j.request({method:"personal_sign",params:[oC(_),V]})}try{const{data:A,error:R}=await te(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"ethereum",message:_,signature:w},!((y=n.options)===null||y===void 0)&&y.captchaToken?{gotrue_meta_security:{captcha_token:(b=n.options)===null||b===void 0?void 0:b.captchaToken}}:null),xform:en});if(R)throw R;if(!A||!A.session||!A.user){const O=new ra;return this._returnResult({data:{user:null,session:null},error:O})}
54return A.session&&(await this._saveSession(A.session),await this._notifyAllSubscribers("SIGNED_IN",A.session)),this._returnResult({data:Object.assign({},A),error:R})}catch(A){if(Z(A))return this._returnResult({data:{user:null,session:null},error:A});throw A}}async signInWithSolana(n){var s,i,l,u,c,d,p,g,m,y,b,_;let w,A;if("message"in n)w=n.message,A=n.signature;else{const{chain:R,wallet:O,statement:U,options:j}=n;let L;if(mt())if(typeof O=="object")L=O;else{const V=window;if("solana"in V&&typeof V.solana=="object"&&("signIn"in V.solana&&typeof V.solana.signIn=="function"||"signMessage"in V.solana&&typeof V.solana.signMessage=="function"))L=V.solana;else throw new Error("@supabase/auth-js: No compatible Solana wallet interface on the window object (window.solana) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'solana', wallet: resolvedUserWallet }) instead.")}else{if(typeof O!="object"||!j?.url)throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");L=O}const Q=new URL((s=j?.url)!==null&&s!==void 0?s:window.location.href);if("signIn"in L&&L.signIn){const V=await L.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},j?.signInWithSolana),{version:"1",domain:Q.host,uri:Q.href}),U?{statement:U}:null));let q;if(Array.isArray(V)&&V[0]&&typeof V[0]=="object")q=V[0];else if(V&&typeof V=="object"&&"signedMessage"in V&&"signature"in V)q=V;else throw new Error("@supabase/auth-js: Wallet method signIn() returned unrecognized value");if("signedMessage"in q&&"signature"in q&&(typeof q.signedMessage=="string"||q.signedMessage instanceof Uint8Array)&&q.signature instanceof Uint8Array)w=typeof q.signedMessage=="string"?q.signedMessage:new TextDecoder().decode(q.signedMessage),A=q.signature;else throw new Error("@supabase/auth-js: Wallet method signIn() API returned object without signedMessage and signature fields")}else{if(!("signMessage"in L)||typeof L.signMessage!="function"||!("publicKey"in L)||typeof L!="object"||!L.publicKey||!("toBase58"in L.publicKey)||typeof L.publicKey.toBase58!="function")throw new Error("@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API");w=[`${Q.host} wants you to sign in with your Solana account:`,L.publicKey.toBase58(),...U?["",U,""]:[""],"Version: 1",`URI: ${Q.href}`,`Issued At: ${(l=(i=j?.signInWithSolana)===null||i===void 0?void 0:i.issuedAt)!==null&&l!==void 0?l:new Date().toISOString()}`,...!((u=j?.signInWithSolana)===null||u===void 0)&&u.notBefore?[`Not Before: ${j.signInWithSolana.notBefore}`]:[],...!((c=j?.signInWithSolana)===null||c===void 0)&&c.expirationTime?[`Expiration Time: ${j.signInWithSolana.expirationTime}`]:[],...!((d=j?.signInWithSolana)===null||d===void 0)&&d.chainId?[`Chain ID: ${j.signInWithSolana.chainId}`]:[],...!((p=j?.signInWithSolana)===null||p===void 0)&&p.nonce?[`Nonce: ${j.signInWithSolana.nonce}`]:[],...!((g=j?.signInWithSolana)===null||g===void 0)&&g.requestId?[`Request ID: ${j.signInWithSolana.requestId}`]:[],...!((y=(m=j?.signInWithSolana)===null||m===void 0?void 0:m.resources)===null||y===void 0)&&y.length?["Resources",...j.signInWithSolana.resources.map(q=>`- ${q}`)]:[]].join(` 55`);const V=await L.signMessage(new TextEncoder().encode(w),"utf8");if(!V||!(V instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");A=V}}try{const{data:R,error:O}=await te(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:w,signature:ls(A)},!((b=n.options)===null||b===void 0)&&b.captchaToken?{gotrue_meta_security:{captcha_token:(_=n.options)===null||_===void 0?void 0:_.captchaToken}}:null),xform:en});if(O)throw O;if(!R||!R.session||!R.user){const U=new ra;return this._returnResult({data:{user:null,session:null},error:U})}return R.session&&(await this._saveSession(R.session),await this._notifyAllSubscribers("SIGNED_IN",R.session)),this._returnResult({data:Object.assign({},R),error:O})}catch(R){if(Z(R))return this._returnResult({data:{user:null,session:null},error:R});throw R}}async _exchangeCodeForSession(n){const s=await ns(this.storage,`${this.storageKey}-code-verifier`),[i,l]=(s??"").split("/");try{if(!i&&this.flowType==="pkce")throw new xO;const{data:u,error:c}=await te(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:n,code_verifier:i},xform:en});if(await yt(this.storage,`${this.storageKey}-code-verifier`),c)throw c;if(!u||!u.session||!u.user){const d=new ra;return this._returnResult({data:{user:null,session:null,redirectType:null},error:d})}return u.session&&(await this._saveSession(u.session),await this._notifyAllSubscribers(l==="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",u.session)),this._returnResult({data:Object.assign(Object.assign({},u),{redirectType:l??null}),error:c})}catch(u){if(await yt(this.storage,`${this.storageKey}-code-verifier`),Z(u))return this._returnResult({data:{user:null,session:null,redirectType:null},error:u});throw u}}async signInWithIdToken(n){try{const{options:s,provider:i,token:l,access_token:u,nonce:c}=n,d=await te(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:i,id_token:l,access_token:u,nonce:c,gotrue_meta_security:{captcha_token:s?.captchaToken}},xform:en}),{data:p,error:g}=d;if(g)return this._returnResult({data:{user:null,session:null},error:g});if(!p||!p.session||!p.user){const m=new ra;return this._returnResult({data:{user:null,session:null},error:m})}return p.session&&(await this._saveSession(p.session),await this._notifyAllSubscribers("SIGNED_IN",p.session)),this._returnResult({data:p,error:g})}catch(s){if(Z(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}}async signInWithOtp(n){var s,i,l,u,c;try{if("email"in n){const{email:d,options:p}=n;let g=null,m=null;this.flowType==="pkce"&&([g,m]=await sa(this.storage,this.storageKey));const{error:y}=await te(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:d,data:(s=p?.data)!==null&&s!==void 0?s:{},create_user:(i=p?.shouldCreateUser)!==null&&i!==void 0?i:!0,gotrue_meta_security:{captcha_token:p?.captchaToken},code_challenge:g,code_challenge_method:m},redirectTo:p?.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:y})}if("phone"in n){const{phone:d,options:p}=n,{data:g,error:m}=await te(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:d,data:(l=p?.data)!==null&&l!==void 0?l:{},create_user:(u=p?.shouldCreateUser)!==null&&u!==void 0?u:!0,gotrue_meta_security:{captcha_token:p?.captchaToken},channel:(c=p?.channel)!==null&&c!==void 0?c:"sms"}});return this._returnResult({data:{user:null,session:null,messageId:g?.message_id},error:m})}throw new El("You must provide either an email or phone number.")}catch(d){if(await yt(this.storage,`${this.storageKey}-code-verifier`),Z(d))return this._returnResult({data:{user:null,session:null},error:d});throw d}}async verifyOtp(n){var s,i;try{let l,u;"options"in n&&(l=(s=n.options)===null||s===void 0?void 0:s.redirectTo,u=(i=n.options)===null||i===void 0?void 0:i.captchaToken);const{data:c,error:d}=await te(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},n),{gotrue_meta_security:{captcha_token:u}}),redirectTo:l,xform:en});if(d)throw d;if(!c)throw new Error("An error occurred on token verification.");const p=c.session,g=c.user;return p?.access_token&&(await this._saveSession(p),await this._notifyAllSubscribers(n.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",p)),this._returnResult({data:{user:g,session:p},error:null})}catch(l){if(Z(l))return this._returnResult({data:{user:null,session:null},error:l});throw l}}async signInWithSSO(n){var s,i,l,u,c;try{let d=null,p=null;this.flowType==="pkce"&&([d,p]=await sa(this.storage,this.storageKey));const g=await te(this.fetch,"POST",`${this.url}/sso`,{body:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},"providerId"in n?{provider_id:n.providerId}:null),"domain"in n?{domain:n.domain}:null),{redirect_to:(i=(s=n.options)===null||s===void 0?void 0:s.redirectTo)!==null&&i!==void 0?i:void 0}),!((l=n?.options)===null||l===void 0)&&l.captchaToken?{gotrue_meta_security:{captcha_token:n.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:d,code_challenge_method:p}),headers:this.headers,xform:eC});return!((u=g.data)===null||u===void 0)&&u.url&&mt()&&!(!((c=n.options)===null||c===void 0)&&c.skipBrowserRedirect)&&window.location.assign(g.data.url),this._returnResult(g)}catch(d){if(await yt(this.storage,`${this.storageKey}-code-verifier`),Z(d))return this._returnResult({data:null,error:d});throw d}}async reauthenticate(){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._reauthenticate())}async _reauthenticate(){try{return await this._useSession(async n=>{const{data:{session:s},error:i}=n;if(i)throw i;if(!s)throw new lt;const{error:l}=await te(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:s.access_token});return this._returnResult({data:{user:null,session:null},error:l})})}catch(n){if(Z(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async resend(n){try{const s=`${this.url}/resend`;if("email"in n){const{email:i,type:l,options:u}=n,{error:c}=await te(this.fetch,"POST",s,{headers:this.headers,body:{email:i,type:l,gotrue_meta_security:{captcha_token:u?.captchaToken}},redirectTo:u?.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:c})}else if("phone"in n){const{phone:i,type:l,options:u}=n,{data:c,error:d}=await te(this.fetch,"POST",s,{headers:this.headers,body:{phone:i,type:l,gotrue_meta_security:{captcha_token:u?.captchaToken}}});return this._returnResult({data:{user:null,session:null,messageId:c?.message_id},error:d})}throw new El("You must provide either an email or phone number and a type")}catch(s){if(Z(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}}async getSession(){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>this._useSession(async s=>s))}async _acquireLock(n,s){this._debug("#_acquireLock","begin",n);try{if(this.lockAcquired){const i=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),l=(async()=>(await i,await s()))();return this.pendingInLock.push((async()=>{try{await l}catch{}})()),l}return await this.lock(`lock:${this.storageKey}`,n,async()=>{this._debug("#_acquireLock","lock acquired for storage key",this.storageKey);try{this.lockAcquired=!0;const i=s();for(this.pendingInLock.push((async()=>{try{await i}catch{}})()),await i;this.pendingInLock.length;){const l=[...this.pendingInLock];await Promise.all(l),this.pendingInLock.splice(0,l.length)}return await i}finally{this._debug("#_acquireLock","lock released for storage key",this.storageKey),this.lockAcquired=!1}})}finally{this._debug("#_acquireLock","end")}}async _useSession(n){this._debug("#_useSession","begin");try{const s=await this.__loadSession();return await n(s)}finally{this._debug("#_useSession","end")}}async __loadSession(){this._debug("#__loadSession()","begin"),this.lockAcquired||this._debug("#__loadSession()","used outside of an acquired lock!",new Error().stack);try{let n=null;const s=await ns(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",s),s!==null&&(this._isValidSession(s)?n=s:(this._debug("#getSession()","session from storage is not val
55id"),await this._removeSession())),!n)return{data:{session:null},error:null};const i=n.expires_at?n.expires_at*1e3-Date.now()<Ph:!1;if(this._debug("#__loadSession()",`session has${i?"":" not"} expired`,"expires_at",n.expires_at),!i){if(this.userStorage){const c=await ns(this.userStorage,this.storageKey+"-user");c?.user?n.user=c.user:n.user=Hh()}if(this.storage.isServer&&n.user&&!n.user.__isUserNotAvailableProxy){const c={value:this.suppressGetSessionWarning};n.user=JO(n.user,c),c.value&&(this.suppressGetSessionWarning=!0)}return{data:{session:n},error:null}}const{data:l,error:u}=await this._callRefreshToken(n.refresh_token);return u?this._returnResult({data:{session:null},error:u}):this._returnResult({data:{session:l},error:null})}finally{this._debug("#__loadSession()","end")}}async getUser(n){if(n)return await this._getUser(n);await this.initializePromise;const s=await this._acquireLock(this.lockAcquireTimeout,async()=>await this._getUser());return s.data.user&&(this.suppressGetSessionWarning=!0),s}async _getUser(n){try{return n?await te(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:n,xform:Rr}):await this._useSession(async s=>{var i,l,u;const{data:c,error:d}=s;if(d)throw d;return!(!((i=c.session)===null||i===void 0)&&i.access_token)&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new lt}:await te(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:(u=(l=c.session)===null||l===void 0?void 0:l.access_token)!==null&&u!==void 0?u:void 0,xform:Rr})})}catch(s){if(Z(s))return wl(s)&&(await this._removeSession(),await yt(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({data:{user:null},error:s});throw s}}async updateUser(n,s={}){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._updateUser(n,s))}async _updateUser(n,s={}){try{return await this._useSession(async i=>{const{data:l,error:u}=i;if(u)throw u;if(!l.session)throw new lt;const c=l.session;let d=null,p=null;this.flowType==="pkce"&&n.email!=null&&([d,p]=await sa(this.storage,this.storageKey));const{data:g,error:m}=await te(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:s?.emailRedirectTo,body:Object.assign(Object.assign({},n),{code_challenge:d,code_challenge_method:p}),jwt:c.access_token,xform:Rr});if(m)throw m;return c.user=g.user,await this._saveSession(c),await this._notifyAllSubscribers("USER_UPDATED",c),this._returnResult({data:{user:c.user},error:null})})}catch(i){if(await yt(this.storage,`${this.storageKey}-code-verifier`),Z(i))return this._returnResult({data:{user:null},error:i});throw i}}async setSession(n){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._setSession(n))}async _setSession(n){try{if(!n.access_token||!n.refresh_token)throw new lt;const s=Date.now()/1e3;let i=s,l=!0,u=null;const{payload:c}=Rl(n.access_token);if(c.exp&&(i=c.exp,l=i<=s),l){const{data:d,error:p}=await this._callRefreshToken(n.refresh_token);if(p)return this._returnResult({data:{user:null,session:null},error:p});if(!d)return{data:{user:null,session:null},error:null};u=d}else{const{data:d,error:p}=await this._getUser(n.access_token);if(p)return this._returnResult({data:{user:null,session:null},error:p});u={access_token:n.access_token,refresh_token:n.refresh_token,user:d.user,token_type:"bearer",expires_in:i-s,expires_at:i},await this._saveSession(u),await this._notifyAllSubscribers("SIGNED_IN",u)}return this._returnResult({data:{user:u.user,session:u},error:null})}catch(s){if(Z(s))return this._returnResult({data:{session:null,user:null},error:s});throw s}}async refreshSession(n){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._refreshSession(n))}async _refreshSession(n){try{return await this._useSession(async s=>{var i;if(!n){const{data:c,error:d}=s;if(d)throw d;n=(i=c.session)!==null&&i!==void 0?i:void 0}if(!n?.refresh_token)throw new lt;const{data:l,error:u}=await this._callRefreshToken(n.refresh_token);return u?this._returnResult({data:{user:null,session:null},error:u}):l?this._returnResult({data:{user:l.user,session:l},error:null}):this._returnResult({data:{user:null,session:null},error:null})})}catch(s){if(Z(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}}async _getSessionFromURL(n,s){var i;try{if(!mt())throw new Tl("No browser detected.");
55if(n.error||n.error_description||n.error_code)throw new Tl(n.error_description||"Error in URL with unspecified error_description",{error:n.error||"unspecified_error",code:n.error_code||"unspecified_code"});switch(s){case"implicit":if(this.flowType==="pkce")throw new qm("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new Tl("Not a valid implicit grant flow url.");break;default:}if(s==="pkce"){if(this._debug("#_initialize()","begin","is PKCE flow",!0),!n.code)throw new qm("No code detected.");const{data:j,error:L}=await this._exchangeCodeForSession(n.code);if(L)throw L;const Q=new URL(window.location.href);return Q.searchParams.delete("code"),window.history.replaceState(window.history.state,"",Q.toString()),{data:{session:j.session,redirectType:(i=j.redirectType)!==null&&i!==void 0?i:null},error:null}}const{provider_token:l,provider_refresh_token:u,access_token:c,refresh_token:d,expires_in:p,expires_at:g,token_type:m}=n;if(!c||!p||!d||!m)throw new Tl("No session defined in URL");const y=Math.round(Date.now()/1e3),b=parseInt(p);let _=y+b;g&&(_=parseInt(g));const w=_-y;w*1e3<=ua&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${w}s, should have been closer to ${b}s`);const A=_-b;y-A>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",A,_,y):y-A<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",A,_,y);const{data:R,error:O}=await this._getUser(c);if(O)throw O;const U={provider_token:l,provider_refresh_token:u,access_token:c,expires_in:b,expires_at:_,refresh_token:d,token_type:m,user:R.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),this._returnResult({data:{session:U,redirectType:n.type},error:null})}catch(l){if(Z(l))return this._returnResult({data:{session:null,redirectType:null},error:l});throw l}}_isImplicitGrantCallback(n){return typeof this.detectSessionInUrl=="function"?this.detectSessionInUrl(new URL(window.location.href),n):!!(n.access_token||n.error_description)}async _isPKCECallback(n){const s=await ns(this.storage,`${this.storageKey}-code-verifier`);return!!(n.code&&s)}async signOut(n={scope:"global"}){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._signOut(n))}async _signOut({scope:n}={scope:"global"}){return await this._useSession(async s=>{var i;const{data:l,error:u}=s;if(u&&!wl(u))return this._returnResult({error:u});const c=(i=l.session)===null||i===void 0?void 0:i.access_token;if(c){const{error:d}=await this.admin.signOut(c,n);if(d&&!(OO(d)&&(d.status===404||d.status===401||d.status===403)||wl(d)))return this._returnResult({error:d})}return n!=="others"&&(await this._removeSession(),await yt(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({error:null})})}onAuthStateChange(n){const s=LO(),i={id:s,callback:n,unsubscribe:()=>{this._debug("#unsubscribe()","state change callback with id removed",s),this.stateChangeEmitters.delete(s)}};return this._debug("#onAuthStateChange()","registered callback with id",s),this.stateChangeEmitters.set(s,i),(async()=>(await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>{this._emitInitialSession(s)})))(),{data:{subscription:i}}}async _emitInitialSession(n){return await this._useSession(async s=>{var i,l;try{const{data:{session:u},error:c}=s;if(c)throw c;await((i=this.stateChangeEmitters.get(n))===null||i===void 0?void 0:i.callback("INITIAL_SESSION",u)),this._debug("INITIAL_SESSION","callback id",n,"session",u)}catch(u){await((l=this.stateChangeEmitters.get(n))===null||l===void 0?void 0:l.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",n,"error",u),wl(u)?console.warn(u):console.error(u)}})}async resetPasswordForEmail(n,s={}){let i=null,l=null;this.flowType==="pkce"&&([i,l]=await sa(this.storage,this.storageKey,!0));try{return await te(this.fetch,"POST",`${this.url}
55/recover`,{body:{email:n,code_challenge:i,code_challenge_method:l,gotrue_meta_security:{captcha_token:s.captchaToken}},headers:this.headers,redirectTo:s.redirectTo})}catch(u){if(await yt(this.storage,`${this.storageKey}-code-verifier`),Z(u))return this._returnResult({data:null,error:u});throw u}}async getUserIdentities(){var n;try{const{data:s,error:i}=await this.getUser();if(i)throw i;return this._returnResult({data:{identities:(n=s.user.identities)!==null&&n!==void 0?n:[]},error:null})}catch(s){if(Z(s))return this._returnResult({data:null,error:s});throw s}}async linkIdentity(n){return"token"in n?this.linkIdentityIdToken(n):this.linkIdentityOAuth(n)}async linkIdentityOAuth(n){var s;try{const{data:i,error:l}=await this._useSession(async u=>{var c,d,p,g,m;const{data:y,error:b}=u;if(b)throw b;const _=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,n.provider,{redirectTo:(c=n.options)===null||c===void 0?void 0:c.redirectTo,scopes:(d=n.options)===null||d===void 0?void 0:d.scopes,queryParams:(p=n.options)===null||p===void 0?void 0:p.queryParams,skipBrowserRedirect:!0});return await te(this.fetch,"GET",_,{headers:this.headers,jwt:(m=(g=y.session)===null||g===void 0?void 0:g.access_token)!==null&&m!==void 0?m:void 0})});if(l)throw l;return mt()&&!(!((s=n.options)===null||s===void 0)&&s.skipBrowserRedirect)&&window.location.assign(i?.url),this._returnResult({data:{provider:n.provider,url:i?.url},error:null})}catch(i){if(Z(i))return this._returnResult({data:{provider:n.provider,url:null},error:i});throw i}}async linkIdentityIdToken(n){return await this._useSession(async s=>{var i;try{const{error:l,data:{session:u}}=s;if(l)throw l;const{options:c,provider:d,token:p,access_token:g,nonce:m}=n,y=await te(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,jwt:(i=u?.access_token)!==null&&i!==void 0?i:void 0,body:{provider:d,id_token:p,access_token:g,nonce:m,link_identity:!0,gotrue_meta_security:{captcha_token:c?.captchaToken}},xform:en}),{data:b,error:_}=y;return _?this._returnResult({data:{user:null,session:null},error:_}):!b||!b.session||!b.user?this._returnResult({data:{user:null,session:null},error:new ra}):(b.session&&(await this._saveSession(b.session),await this._notifyAllSubscribers("USER_UPDATED",b.session)),this._returnResult({data:b,error:_}))}catch(l){if(await yt(this.storage,`${this.storageKey}-code-verifier`),Z(l))return this._returnResult({data:{user:null,session:null},error:l});throw l}})}async unlinkIdentity(n){try{return await this._useSession(async s=>{var i,l;const{data:u,error:c}=s;if(c)throw c;return await te(this.fetch,"DELETE",`${this.url}/user/identities/${n.identity_id}`,{headers:this.headers,jwt:(l=(i=u.session)===null||i===void 0?void 0:i.access_token)!==null&&l!==void 0?l:void 0})})}catch(s){if(Z(s))return this._returnResult({data:null,error:s});throw s}}async _refreshAccessToken(n){const s=`#_refreshAccessToken(${n.substring(0,5)}...)`;this._debug(s,"begin");try{const i=Date.now();return await HO(async l=>(l>0&&await BO(200*Math.pow(2,l-1)),this._debug(s,"refreshing attempt",l),await te(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:n},headers:this.headers,xform:en})),(l,u)=>{const c=200*Math.pow(2,l);return u&&Bh(u)&&Date.now()+c-i<ua})}catch(i){if(this._debug(s,"error",i),Z(i))return this._returnResult({data:{session:null,user:null},error:i});throw i}finally{this._debug(s,"end")}}_isValidSession(n){return typeof n=="object"&&n!==null&&"access_token"in n&&"refresh_token"in n&&"expires_at"in n}async _handleProviderSignIn(n,s){const i=await this._getUrlForProvider(`${this.url}/authorize`,n,{redirectTo:s.redirectTo,scopes:s.scopes,queryParams:s.queryParams});return this._debug("#_handleProviderSignIn()","provider",n,"options",s,"url",i),mt()&&!s.skipBrowserRedirect&&window.location.assign(i),{data:{provider:n,url:i},error:null}}async _recoverAndRefresh(){var n,s;const i="#_recoverAndRefresh()";this._debug(i,"begin");try{const l=await ns(this.storage,this.storageKey);if(l&&this.userStorage){let c=await ns(this.userStorage,this.storageKey+"-user");!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!c&&(c={user:l.user},await ca(this.userStorage,this.storageKey+"-user",c)),l.user=(n=c?.user)!==null&&n!==void 0?n:Hh()}else if(l&&!l.user&&!l.user){const c=await ns(this.storage,this.storageKey+"-user");c&&c?.user?(l.user=c.user,await yt(this.storage,this.storageKey+"-user"),await ca(this.storage,this.storageKey,l)):l.user=Hh()}if(this._debug(i,"session from storage",l),!this._isValidSession(l)){this._debug(i,"session is not val
55id"),l!==null&&await this._removeSession();return}const u=((s=l.expires_at)!==null&&s!==void 0?s:1/0)*1e3-Date.now()<Ph;if(this._debug(i,`session has${u?"":" not"} expired with margin of ${Ph}s`),u){if(this.autoRefreshToken&&l.refresh_token){const{error:c}=await this._callRefreshToken(l.refresh_token);c&&(console.error(c),Bh(c)||(this._debug(i,"refresh failed with a non-retryable error, removing the session",c),await this._removeSession()))}}else if(l.user&&l.user.__isUserNotAvailableProxy===!0)try{const{data:c,error:d}=await this._getUser(l.access_token);!d&&c?.user?(l.user=c.user,await this._saveSession(l),await this._notifyAllSubscribers("SIGNED_IN",l)):this._debug(i,"could not get user data, skipping SIGNED_IN notification")}catch(c){console.error("Error getting user data:",c),this._debug(i,"error getting user data, skipping SIGNED_IN notification",c)}else await this._notifyAllSubscribers("SIGNED_IN",l)}catch(l){this._debug(i,"error",l),console.error(l);return}finally{this._debug(i,"end")}}async _callRefreshToken(n){var s,i;if(!n)throw new lt;if(this.refreshingDeferred)return this.refreshingDeferred.promise;const l=`#_callRefreshToken(${n.substring(0,5)}...)`;this._debug(l,"begin");try{this.refreshingDeferred=new su;const{data:u,error:c}=await this._refreshAccessToken(n);if(c)throw c;if(!u.session)throw new lt;await this._saveSession(u.session),await this._notifyAllSubscribers("TOKEN_REFRESHED",u.session);const d={data:u.session,error:null};return this.refreshingDeferred.resolve(d),d}catch(u){if(this._debug(l,"error",u),Z(u)){const c={data:null,error:u};return Bh(u)||await this._removeSession(),(s=this.refreshingDeferred)===null||s===void 0||s.resolve(c),c}throw(i=this.refreshingDeferred)===null||i===void 0||i.reject(u),u}finally{this.refreshingDeferred=null,this._debug(l,"end")}}async _notifyAllSubscribers(n,s,i=!0){const l=`#_notifyAllSubscribers(${n})`;this._debug(l,"begin",s,`broadcast = ${i}`);try{this.broadcastChannel&&i&&this.broadcastChannel.postMessage({event:n,session:s});const u=[],c=Array.from(this.stateChangeEmitters.values()).map(async d=>{try{await d.callback(n,s)}catch(p){u.push(p)}});if(await Promise.all(c),u.length>0){for(let d=0;d<u.length;d+=1)console.error(u[d]);throw u[0]}}finally{this._debug(l,"end")}}async _saveSession(n){this._debug("#_saveSession()",n),this.suppressGetSessionWarning=!0,await yt(this.storage,`${this.storageKey}-code-verifier`);const s=Object.assign({},n),i=s.user&&s.user.__isUserNotAvailableProxy===!0;if(this.userStorage){!i&&s.user&&await ca(this.userStorage,this.storageKey+"-user",{user:s.user});const l=Object.assign({},s);delete l.user;const u=Km(l);await ca(this.storage,this.storageKey,u)}else{const l=Km(s);await ca(this.storage,this.storageKey,l)}}async _removeSession(){this._debug("#_removeSession()"),this.suppressGetSessionWarning=!1,await yt(this.storage,this.storageKey),await yt(this.storage,this.storageKey+"-code-verifier"),await yt(this.storage,this.storageKey+"-user"),this.userStorage&&await yt(this.userStorage,this.storageKey+"-user"),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const n=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{n&&mt()&&window?.removeEventListener&&window.removeEventListener("visibilitychange",n)}catch(s){console.error("removing visibilitychange callback failed",s)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const n=setInterval(()=>this._autoRefreshTokenTick(),ua);this.autoRefreshTicker=n,n&&typeof n=="object"&&typeof n.unref=="function"?n.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(n);const s=setTimeout(async()=>{await this.initializePromise,await this._autoRefreshTokenTick()},0);this.autoRefreshTickTimeout=s,s&&typeof s=="object"&&typeof s.unref=="function"?s.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(s)}async _stopAutoRefresh(){this._debug("#_stopAutoRefresh()");const n=this.autoRefreshTicker;this.autoRefreshTicker=null,n&&clearInterval(n);const s=this.autoRefreshTickTimeout;this.autoRefreshTickTimeout=null,s&&clearTimeout(s)}async startAutoRefresh(){this._removeVisibilityChangedCallback(),await this._startAutoRefresh()}async stopAutoRefresh(){this._removeVisibilityChangedCallback(),await this._stopAutoRefresh()}async _autoRefreshTokenTick(){this._debug("#_autoRefreshTokenTick()","begin");try{await this._acquireLock(0,async()=>{try{const n=Date.now();try{return await this._useSession(async s=>{const{data:{session:i}}=s;
55if(!i||!i.refresh_token||!i.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const l=Math.floor((i.expires_at*1e3-n)/ua);this._debug("#_autoRefreshTokenTick()",`access token expires in ${l} ticks, a tick lasts ${ua}ms, refresh threshold is ${of} ticks`),l<=of&&await this._callRefreshToken(i.refresh_token)})}catch(s){console.error("Auto refresh tick failed with error. This is likely a transient error.",s)}}finally{this._debug("#_autoRefreshTokenTick()","end")}})}catch(n){if(n instanceof q0)this._debug("auto refresh token tick lock not available");else throw n}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!mt()||!window?.addEventListener)return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=async()=>{try{await this._onVisibilityChanged(!1)}catch(n){this._debug("#visibilityChangedCallback","error",n)}},window?.addEventListener("visibilitychange",this.visibilityChangedCallback),await this._onVisibilityChanged(!0)}catch(n){console.error("_handleVisibilityChange",n)}}async _onVisibilityChanged(n){const s=`#_onVisibilityChanged(${n})`;this._debug(s,"visibilityState",document.visibilityState),document.visibilityState==="visible"?(this.autoRefreshToken&&this._startAutoRefresh(),n||(await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>{if(document.visibilityState!=="visible"){this._debug(s,"acquired the lock to recover the session, but the browser visibilityState is no longer visible, aborting");return}await this._recoverAndRefresh()}))):document.visibilityState==="hidden"&&this.autoRefreshToken&&this._stopAutoRefresh()}async _getUrlForProvider(n,s,i){const l=[`provider=${encodeURIComponent(s)}`];if(i?.redirectTo&&l.push(`redirect_to=${encodeURIComponent(i.redirectTo)}`),i?.scopes&&l.push(`scopes=${encodeURIComponent(i.scopes)}`),this.flowType==="pkce"){const[u,c]=await sa(this.storage,this.storageKey),d=new URLSearchParams({code_challenge:`${encodeURIComponent(u)}`,code_challenge_method:`${encodeURIComponent(c)}`});l.push(d.toString())}if(i?.queryParams){const u=new URLSearchParams(i.queryParams);l.push(u.toString())}return i?.skipBrowserRedirect&&l.push(`skip_http_redirect=${i.skipBrowserRedirect}`),`${n}?${l.join("&")}`}async _unenroll(n){try{return await this._useSession(async s=>{var i;const{data:l,error:u}=s;return u?this._returnResult({data:null,error:u}):await te(this.fetch,"DELETE",`${this.url}/factors/${n.factorId}`,{headers:this.headers,jwt:(i=l?.session)===null||i===void 0?void 0:i.access_token})})}catch(s){if(Z(s))return this._returnResult({data:null,error:s});throw s}}async _enroll(n){try{return await this._useSession(async s=>{var i,l;const{data:u,error:c}=s;if(c)return this._returnResult({data:null,error:c});const d=Object.assign({friendly_name:n.friendlyName,factor_type:n.factorType},n.factorType==="phone"?{phone:n.phone}:n.factorType==="totp"?{issuer:n.issuer}:{}),{data:p,error:g}=await te(this.fetch,"POST",`${this.url}/factors`,{body:d,headers:this.headers,jwt:(i=u?.session)===null||i===void 0?void 0:i.access_token});return g?this._returnResult({data:null,error:g}):(n.factorType==="totp"&&p.type==="totp"&&(!((l=p?.totp)===null||l===void 0)&&l.qr_code)&&(p.totp.qr_code=`data:image/svg+xml;utf-8,${p.totp.qr_code}`),this._returnResult({data:p,error:null}))})}catch(s){if(Z(s))return this._returnResult({data:null,error:s});throw s}}async _verify(n){return this._acquireLock(this.lockAcquireTimeout,async()=>{try{return await this._useSession(async s=>{var i;const{data:l,error:u}=s;if(u)return this._returnResult({data:null,error:u});const c=Object.assign({challenge_id:n.challengeId},"webauthn"in n?{webauthn:Object.assign(Object.assign({},n.webauthn),{credential_response:n.webauthn.type==="create"?ev(n.webauthn.credential_response):tv(n.webauthn.credential_response)})}:{code:n.code}),{data:d,error:p}=await te(this.fetch,"POST",`${this.url}/factors/${n.factorId}/verify`,{body:c,headers:this.headers,jwt:(i=l?.session)===null||i===void 0?void 0:i.access_token});return p?this._returnResult({data:null,error:p}):(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+d.expires_in},d)),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",d),this._returnResult({data:d,error:p}))})}catch(s){if(Z(s))return this._returnResult({data:null,error:s});throw s}})}async _challenge(n){return this._acquireLock(this.lockAcquireTimeout,async()=>{try{return await this._useSession(async s=>{var i;const{data:l,error:u}=s;if(u)return this._returnResult({data:null,error:u});const c=await te(this.fetch,"POST",`${this.url}/factors/${n.factorId}/challenge`,{body:n,headers:this.headers,jwt:(i=l?.session)===null||i===void 0?void 0:i.access_token});if(c.error)return c;const{data:d}=c;if(d.type!=="webauthn")return{data:d,error:null};switch(d.webauthn.type){case"create":return{data:Object.assign(Object.assign({},d),{webauthn:Object.assign(Object.assign({},d.webauthn),{credential_options:Object.assign(Object.assign({},d.webauthn.credential_options),{publicKey:Zm(d.webauthn.credential_options.publicKey)})})}),error:null};case"request":return{data:Object.assign(Object.assign({},d),{webauthn:Object.assign(Object.assign({},d.webauthn),{credential_options:Object.assign(Object.assign({},d.webauthn.credential_options),{publicKey:Wm(d.webauthn.credential_options.publicKey)})})}),error:null}}})}catch(s){if(Z(s))return this._returnResult({data:null,error:s});throw s}})}async _challengeAndVerify(n){const{data:s,error:i}=await this._challenge({factorId:n.factorId});return i?this._returnResult({data:null,error:i}):await this._verify({factorId:n.factorId,challengeId:s.id,code:n.code})}async _listFactors(){var n;const{data:{user:s},error:i}=await this.getUser();if(i)return{data:null,error:i};const l={all:[],phone:[],totp:[],webauthn:[]};for(const u of(n=s?.factors)!==null&&n!==void 0?n:[])l.all.push(u),u.status==="verified"&&l[u.factor_type].push(u);return{data:l,error:null}}async _getAuthenticatorAssuranceLevel(n){var s,i,l,u;if(n)try{const{payload:_}=Rl(n);let w=null;_.aal&&(w=_.aal);let A=w;const{data:{user:R},error:O}=await this.getUser(n);if(O)return this._returnResult({data:null,error:O});((i=(s=R?.factors)===null||s===void 0?void 0:s.filter(L=>L.status==="verified"))!==null&&i!==void 0?i:[]).length>0&&(A="aal2");const j=_.amr||[];return{data:{currentLevel:w,nextLevel:A,currentAuthenticationMethods:j},error:null}}catch(_){if(Z(_))return this._returnResult({data:null,error:_});throw _}const{data:{session:c},error:d}
55=await this.getSession();if(d)return this._returnResult({data:null,error:d});if(!c)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const{payload:p}=Rl(c.access_token);let g=null;p.aal&&(g=p.aal);let m=g;((u=(l=c.user.factors)===null||l===void 0?void 0:l.filter(_=>_.status==="verified"))!==null&&u!==void 0?u:[]).length>0&&(m="aal2");const b=p.amr||[];return{data:{currentLevel:g,nextLevel:m,currentAuthenticationMethods:b},error:null}}async _getAuthorizationDetails(n){try{return await this._useSession(async s=>{const{data:{session:i},error:l}=s;return l?this._returnResult({data:null,error:l}):i?await te(this.fetch,"GET",`${this.url}/oauth/authorizations/${n}`,{headers:this.headers,jwt:i.access_token,xform:u=>({data:u,error:null})}):this._returnResult({data:null,error:new lt})})}catch(s){if(Z(s))return this._returnResult({data:null,error:s});throw s}}async _approveAuthorization(n,s){try{return await this._useSession(async i=>{const{data:{session:l},error:u}=i;if(u)return this._returnResult({data:null,error:u});if(!l)return this._returnResult({data:null,error:new lt});const c=await te(this.fetch,"POST",`${this.url}/oauth/authorizations/${n}/consent`,{headers:this.headers,jwt:l.access_token,body:{action:"approve"},xform:d=>({data:d,error:null})});return c.data&&c.data.redirect_url&&mt()&&!s?.skipBrowserRedirect&&window.location.assign(c.data.redirect_url),c})}catch(i){if(Z(i))return this._returnResult({data:null,error:i});throw i}}async _denyAuthorization(n,s){try{return await this._useSession(async i=>{const{data:{session:l},error:u}=i;if(u)return this._returnResult({data:null,error:u});if(!l)return this._returnResult({data:null,error:new lt});const c=await te(this.fetch,"POST",`${this.url}/oauth/authorizations/${n}/consent`,{headers:this.headers,jwt:l.access_token,body:{action:"deny"},xform:d=>({data:d,error:null})});return c.data&&c.data.redirect_url&&mt()&&!s?.skipBrowserRedirect&&window.location.assign(c.data.redirect_url),c})}catch(i){if(Z(i))return this._returnResult({data:null,error:i});throw i}}async _listOAuthGrants(){try{return await this._useSession(async n=>{const{data:{session:s},error:i}=n;return i?this._returnResult({data:null,error:i}):s?await te(this.fetch,"GET",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:s.access_token,xform:l=>({data:l,error:null})}):this._returnResult({data:null,error:new lt})})}catch(n){if(Z(n))return this._returnResult({data:null,error:n});throw n}}async _revokeOAuthGrant(n){try{return await this._useSession(async s=>{const{data:{session:i},error:l}=s;return l?this._returnResult({data:null,error:l}):i?(await te(this.fetch,"DELETE",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:i.access_token,query:{client_id:n.clientId},noResolveJson:!0}),{data:{},error:null}):this._returnResult({data:null,error:new lt})})}catch(s){if(Z(s))return this._returnResult({data:null,error:s});throw s}}async fetchJwk(n,s={keys:[]}){let i=s.keys.find(d=>d.kid===n);if(i)return i;const l=Date.now();if(i=this.jwks.keys.find(d=>d.kid===n),i&&this.jwks_cached_at+RO>l)return i;const{data:u,error:c}=await te(this.fetch,"GET",`${this.url}/.well-known/jwks.json`,{headers:this.headers});if(c)throw c;return!u.keys||u.keys.length===0||(this.jwks=u,this.jwks_cached_at=l,i=u.keys.find(d=>d.kid===n),!i)?null:i}async getClaims(n,s={}){try{let i=n;if(!i){const{data:_,error:w}
55=await this.getSession();if(w||!_.session)return this._returnResult({data:null,error:w});i=_.session.access_token}const{header:l,payload:u,signature:c,raw:{header:d,payload:p}}=Rl(i);s?.allowExpired||YO(u.exp);const g=!l.alg||l.alg.startsWith("HS")||!l.kid||!("crypto"in globalThis&&"subtle"in globalThis.crypto)?null:await this.fetchJwk(l.kid,s?.keys?{keys:s.keys}:s?.jwks);if(!g){const{error:_}=await this.getUser(i);if(_)throw _;return{data:{claims:u,header:l,signature:c},error:null}}const m=FO(l.alg),y=await crypto.subtle.importKey("jwk",g,m,!0,["verify"]);if(!await crypto.subtle.verify(m,y,c,NO(`${d}.${p}`)))throw new cf("Invalid JWT signature");return{data:{claims:u,header:l,signature:c},error:null}}catch(i){if(Z(i))return this._returnResult({data:null,error:i});throw i}}async signInWithPasskey(n){var s,i,l;an(this.experimental);try{if(!Gl())return this._returnResult({data:null,error:new un("Browser does not support WebAuthn",null)});const{data:u,error:c}=await this._startPasskeyAuthentication({options:{captchaToken:(s=n?.options)===null||s===void 0?void 0:s.captchaToken}});if(c||!u)return this._returnResult({data:null,error:c});const d=Wm(u.options),p=(l=(i=n?.options)===null||i===void 0?void 0:i.signal)!==null&&l!==void 0?l:hf.createNewAbortSignal(),{data:g,error:m}=await V0({publicKey:d,signal:p});if(m||!g)return this._returnResult({data:null,error:m??new un("WebAuthn ceremony failed",null)});const y=tv(g);return this._verifyPasskeyAuthentication({challengeId:u.challenge_id,credential:y})}catch(u){if(Z(u))return this._returnResult({data:null,error:u});throw u}}async registerPasskey(n){var s,i;an(this.experimental);try{if(!Gl())return this._returnResult({data:null,error:new un("Browser does not support WebAuthn",null)});const{data:l,error:u}=await this._startPasskeyRegistration();if(u||!l)return this._returnResult({data:null,error:u});const c=Zm(l.options),d=(i=(s=n?.options)===null||s===void 0?void 0:s.signal)!==null&&i!==void 0?i:hf.createNewAbortSignal(),{data:p,error:g}=await G0({publicKey:c,signal:d});if(g||!p)return this._returnResult({data:null,error:g??new un("WebAuthn ceremony failed",null)});const m=ev(p);return this._verifyPasskeyRegistration({challengeId:l.challenge_id,credential:m})}catch(l){if(Z(l))return this._returnResult({data:null,error:l});throw l}}async _startPasskeyRegistration(){an(this.experimental);try{return await this._useSession(async n=>{const{data:{session:s},error:i}=n;if(i)return this._returnResult({data:null,error:i});if(!s)return this._returnResult({data:null,error:new lt});const{data:l,error:u}=await te(this.fetch,"POST",`${this.url}/passkeys/registration/options`,{headers:this.headers,jwt:s.access_token,body:{}});return u?this._returnResult({data:null,error:u}):this._returnResult({data:l,error:null})})}catch(n){if(Z(n))return this._returnResult({data:null,error:n});throw n}}async _verifyPasskeyRegistration(n){an(this.experimental);try{return await this._useSession(async s=>{const{data:{session:i},error:l}=s;if(l)return this._returnResult({data:null,error:l});if(!i)return this._returnResult({data:null,error:new lt});const{data:u,error:c}=await te(this.fetch,"POST",`${this.url}/passkeys/registration/verify`,{headers:this.headers,jwt:i.access_token,body:{challenge_id:n.challengeId,credential:n.credential}});return c?this._returnResult({data:null,error:c}):this._returnResult({data:u,error:null})})}catch(s){if(Z(s))return this._returnResult({data:null,error:s});throw s}}async _startPasskeyAuthentication(n){var s;an(this.experimental);try{const{data:i,error:l}=await te(this.fetch,"POST",`${this.url}/passkeys/authentication/options`,{headers:this.headers,body:{gotrue_meta_security:{captcha_token:(s=n?.options)===null||s===void 0?void 0:s.captchaToken}}});return l?this._returnResult({data:null,error:l}):this._returnResult({data:i,error:null})}catch(i){if(Z(i))return this._returnResult({data:null,error:i});throw i}}async _verifyPasskeyAuthentication(n){an(this.experimental);try{const{data:s,error:i}=await te(this.fetch,"POST",`${this.url}/passkeys/authentication/verify`,{headers:this.headers,body:{challenge_id:n.challengeId,credential:n.credential},xform:en});return i?this._returnResult({data:null,error:i}):(s.session&&(await this._saveSession(s.session),await this._notifyAllSubscribers("SIGNED_IN",s.session)),this._returnResult({data:s,error:null}))}catch(s){if(Z(s))return this._returnResult({data:null,error:s});throw s}}async _listPasskeys(){an(this.experimental);try{return await this._useSession(async n=>{const{data:{session:s},error:i}=n;if(i)return this._returnResult({data:null,error:i});if(!s)return this._returnResult({data:null,error:new lt});const{data:l,error:u}=await te(this.fetch,"GET",`${this.url}/passkeys`,{headers:this.headers,jwt:s.access_token,xform:c=>({data:c,error:null})});return u?this._returnResult({data:null,error:u}):this._returnResult({data:l,error:null})})}catch(n){if(Z(n))return this._returnResult({data:null,error:n});throw n}}async _updatePasskey(n){an(this.experimental);try{return await this._useSession(async s=>{const{data:{session:i},error:l}=s;if(l)return this._returnResult({data:null,error:l});if(!i)return this._returnResult({data:null,error:new lt});const{data:u,error:c}=await te(this.fetch,"PATCH",`${this.url}/passkeys/${n.passkeyId}`,{headers:this.headers,jwt:i.access_token,body:{friendly_name:n.friendlyName}});return c?this._returnResult({data:null,error:c}):this._returnResult({data:u,error:null})})}catch(s){if(Z(s))return this._returnResult({data:null,error:s});throw s}}async _deletePasskey(n){an(this.experimental);try{return await this._useSession(async s=>{const{data:{session:i},error:l}=s;if(l)return this._returnResult({data:null,error:l});if(!i)return this._returnResult({data:null,error:new lt});const{error:u}
55=await te(this.fetch,"DELETE",`${this.url}/passkeys/${n.passkeyId}`,{headers:this.headers,jwt:i.access_token,noResolveJson:!0});return u?this._returnResult({data:null,error:u}):this._returnResult({data:null,error:null})})}catch(s){if(Z(s))return this._returnResult({data:null,error:s});throw s}}}Hi.nextInstanceID={};const vC=Hi,bC="2.105.4";let Ai="";typeof Deno<"u"?Ai="deno":typeof document<"u"?Ai="web":typeof navigator<"u"&&navigator.product==="ReactNative"?Ai="react-native":Ai="node";const _C={"X-Client-Info":`supabase-js-${Ai}/${bC}`},SC={headers:_C},wC={schema:"public"},EC={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},TC={};function qi(t){"@babel/helpers - typeof";return qi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},qi(t)}function RC(t,n){if(qi(t)!="object"||!t)return t;var s=t[Symbol.toPrimitive];if(s!==void 0){var i=s.call(t,n);if(qi(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(t)}function AC(t){var n=RC(t,"string");return qi(n)=="symbol"?n:n+""}function OC(t,n,s){return(n=AC(n))in t?Object.defineProperty(t,n,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[n]=s,t}function rv(t,n){var s=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);n&&(i=i.filter(function(l){return Object.getOwnPropertyDescriptor(t,l).enumerable})),s.push.apply(s,i)}return s}function Ke(t){for(var n=1;n<arguments.length;n++){var s=arguments[n]!=null?arguments[n]:{};n%2?rv(Object(s),!0).forEach(function(i){OC(t,i,s[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(s)):rv(Object(s)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(s,i))})}return t}const CC=t=>t?(...n)=>t(...n):(...n)=>fetch(...n),xC=()=>Headers,kC=(t,n,s)=>{const i=CC(s),l=xC();return async(u,c)=>{var d;const p=(d=await n())!==null&&d!==void 0?d:t;let g=new l(c?.headers);return g.has("apikey")||g.set("apikey",t),g.has("Authorization")||g.set("Authorization",`Bearer ${p}`),i(u,Ke(Ke({},c),{},{headers:g}))}};function jC(t){return t.endsWith("/")?t:t+"/"}function MC(t,n){var s,i;const{db:l,auth:u,realtime:c,global:d}=t,{db:p,auth:g,realtime:m,global:y}=n,b={db:Ke(Ke({},p),l),auth:Ke(Ke({},g),u),realtime:Ke(Ke({},m),c),storage:{},global:Ke(Ke(Ke({},y),d),{},{headers:Ke(Ke({},(s=y?.headers)!==null&&s!==void 0?s:{}),(i=d?.headers)!==null&&i!==void 0?i:{})}),accessToken:async()=>""};return t.accessToken?b.accessToken=t.accessToken:delete b.accessToken,b}function UC(t){const n=t?.trim();if(!n)throw new Error("supabaseUrl is required.");if(!n.match(/^https?:\/\//i))throw new Error("Invalid supabaseUrl: Must be a valid HTTP or HTTPS URL.");try{return new URL(jC(n))}catch{throw Error("Invalid supabaseUrl: Provided URL is malformed.")}}var NC=class extends vC{constructor(t){super(t)}},DC=class{constructor(t,n,s){var i,l;this.supabaseUrl=t,this.supabaseKey=n;const u=UC(t);if(!n)throw new Error("supabaseKey is required.");this.realtimeUrl=new URL("realtime/v1",u),this.realtimeUrl.protocol=this.realtimeUrl.protocol.replace("http","ws"),this.authUrl=new URL("auth/v1",u),this.storageUrl=new URL("storage/v1",u),this.functionsUrl=new URL("functions/v1",u);const c=`sb-${u.hostname.split(".")[0]}-auth-token`,d={db:wC,realtime:TC,auth:Ke(Ke({},EC),{},{storageKey:c}),global:SC},p=MC(s??{},d);if(this.storageKey=(i=p.auth.storageKey)!==null&&i!==void 0?i:"",this.headers=(l=p.global.headers)!==null&&l!==void 0?l:{},p.accessToken)this.accessToken=p.accessToken,this.auth=new Proxy({},{get:(m,y)=>{throw new Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(y)} is not possible`)}});else{var g;this.auth=this._initSupabaseAuthClient((g=p.auth)!==null&&g!==void 0?g:{},this.headers,p.global.fetch)}this.fetch=kC(n,this._getAccessToken.bind(this),p.global.fetch),this.realtime=this._initRealtimeClient(Ke({headers:this.headers,accessToken:this._getAccessToken.bind(this),fetch:this.fetch},p.realtime)),this.accessToken&&Promise.resolve(this.accessToken()).then(m=>this.realtime.setAuth(m)).catch(m=>console.warn("Failed to set initial Realtime auth token:",m)),this.rest=new o1(new URL("rest/v1",u).href,{headers:this.headers,schema:p.db.schema,fetch:this.fetch,timeout:p.db.timeout,urlLengthLimit:p.db.urlLengthLimit}),this.storage=new _O(this.storageUrl.href,this.headers,this.fetch,s?.storage),p.accessToken||this._listenForAuthEvents()}get functions(){return new XA(this.functionsUrl.href,{headers:this.headers,customFetch:this.fetch})}from(t){return this.rest.from(t)}schema(t){return this.rest.schema(t)}rpc(t,n={},s={head:!1,get:!1,count:void 0}){return this.rest.rpc(t,n,s)}channel(t,n={config:{}}){return this.realtime.channel(t,n)}getChannels(){return this.realtime.getChannels()}removeChannel(t){return this.realtime.removeChannel(t)}removeAllChannels(){return this.realtime.removeAllChannels()}async _getAccessToken(){var t=this,n,s;if(t.accessToken)return await t.accessToken();const{data:i}=await t.auth.getSession();return(n=(s=i.session)===null||s===void 0?void 0:s.access_token)!==null&&n!==void 0?n:t.supabaseKey}_initSupabaseAuthClient({autoRefreshToken:t,persistSession:n,detectSessionInUrl:s,storage:i,userStorage:l,storageKey:u,flowType:c,lock:d,debug:p,throwOnError:g,experimental:m,lockAcquireTimeout:y,skipAutoInitialize:b},_,w){const A={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new NC({url:this.authUrl.href,headers:Ke(Ke({},A),_),storageKey:u,autoRefreshToken:t,persistSession:n,detectSessionInUrl:s,storage:i,userStorage:l,flowType:c,lock:d,debug:p,throwOnError:g,experimental:m,fetch:w,lockAcquireTimeout:y,skipAutoInitialize:b,hasCustomAuthorizationHeader:Object.keys(this.headers).some(R=>R.toLowerCase()==="authorization")})}_initRealtimeClient(t){return new $1(this.realtimeUrl.href,Ke(Ke({},t),{},{params:Ke(Ke({},{apikey:this.supabaseKey}),t?.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((t,n)=>{this._handleTokenChanged(t,"CLIENT",n?.access_token)})}_handleTokenChanged(t,n,s){(t==="TOKEN_REFRESHED"||t==="SIGNED_IN")&&this.changedAccessToken!==s?(this.changedAccessToken=s,this.realtime.setAuth(s)):t==="SIGNED_OUT"&&(this.realtime.setAuth(),n=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}};const LC=(t,n,s)=>new DC(t,n,s);function zC(){if(typeof window<"u")return!1;const t=globalThis.process;if(!t)return!1;
55const n=t.version;if(n==null)return!1;const s=n.match(/^v(\d+)\./);return s?parseInt(s[1],10)<=18:!1}zC()&&console.warn("â ï¸ Node.js 18 and below are deprecated and will no longer be supported in future versions of @supabase/supabase-js. Please upgrade to Node.js 20 or later. For more information, visit: https://github.com/orgs/supabase/discussions/37217");function PC(){return LC("https://onstxhriyutloqsvnwxf.supabase.co","eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Im9uc3R4aHJpeXV0bG9xc3Zud3hmIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Nzg4NTM4NDEsImV4cCI6MjA5NDQyOTg0MX0.l2D9dunckNnQSMi1TVnMmOeo9cP2YbQ1kKEIlbILE6M",{auth:{storage:typeof window<"u"?localStorage:void 0,persistSession:!0,autoRefreshToken:!0}})}let Ih;const BC=new Proxy({},{get(t,n,s){return Ih||(Ih=PC()),Reflect.get(Ih,n,s)}}),HC=os({type:"function"}).client(async({next:t})=>{const{data:n}=await BC.auth.getSession(),s=n.session?.access_token;return t({headers:s?{Authorization:`Bearer ${s}`}:{}})}),qC=os(),sv=YA(()=>({functionMiddleware:[HC],requestMiddleware:[qC]}));var au=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},IC=class extends au{#e;#n;#t;constructor(){super(),this.#t=t=>{if(typeof window<"u"&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}}}onSubscribe(){this.#n||this.setEventListener(this.#t)}onUnsubscribe(){this.hasListeners()||(this.#n?.(),this.#n=void 0)}setEventListener(t){this.#t=t,this.#n?.(),this.#n=t(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()})}setFocused(t){this.#e!==t&&(this.#e=t,this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},K0=new IC,$C={setTimeout:(t,n)=>setTimeout(t,n),clearTimeout:t=>clearTimeout(t),setInterval:(t,n)=>setInterval(t,n),clearInterval:t=>clearInterval(t)},GC=class{#e=$C;#n=!1;setTimeoutProvider(t){this.#e=t}setTimeout(t,n){return this.#e.setTimeout(t,n)}clearTimeout(t){this.#e.clearTimeout(t)}setInterval(t,n){return this.#e.setInterval(t,n)}clearInterval(t){this.#e.clearInterval(t)}},ff=new GC;function VC(t){setTimeout(t,0)}var KC=typeof window>"u"||"Deno"in globalThis;function ln(){}function YC(t,n){return typeof t=="function"?t(n):t}function FC(t){return typeof t=="number"&&t>=0&&t!==1/0}function QC(t,n){return Math.max(t+(n||0)-Date.now(),0)}function df(t,n){return typeof t=="function"?t(n):t}function JC(t,n){return typeof t=="function"?t(n):t}function av(t,n){const{type:s="all",exact:i,fetchStatus:l,predicate:u,queryKey:c,stale:d}=t;if(c){if(i){if(n.queryHash!==jf(c,n.options))return!1}else if(!$i(n.queryKey,c))return!1}if(s!=="all"){const p=n.isActive();if(s==="active"&&!p||s==="inactive"&&p)return!1}return!(typeof d=="boolean"&&n.isStale()!==d||l&&l!==n.state.fetchStatus||u&&!u(n))}function iv(t,n){const{exact:s,status:i,predicate:l,mutationKey:u}=t;if(u){if(!n.options.mutationKey)return!1;if(s){if(Ii(n.options.mutationKey)!==Ii(u))return!1}else if(!$i(n.options.mutationKey,u))return!1}return!(i&&n.state.status!==i||l&&!l(n))}function jf(t,n){return(n?.queryKeyHashFn||Ii)(t)}function Ii(t){return JSON.stringify(t,(n,s)=>pf(s)?Object.keys(s).sort().reduce((i,l)=>(i[l]=s[l],i),{}):s)}function $i(t,n){return t===n?!0:typeof t!=typeof n?!1:t&&n&&typeof t=="object"&&typeof n=="object"?Object.keys(n).every(s=>$i(t[s],n[s])):!1}var XC=Object.prototype.hasOwnProperty;function Y0(t,n,s=0){if(t===n)return t;if(s>500)return n;const i=ov(t)&&ov(n);if(!i&&!(pf(t)&&pf(n)))return n;const u=(i?t:Object.keys(t)).length,c=i?n:Object.keys(n),d=c.length,p=i?new Array(d):{};let g=0;for(let m=0;m<d;m++){const y=i?m:c[m],b=t[y],_=n[y];if(b===_){p[y]=b,(i?m<u:XC.call(t,y))&&g++;continue}if(b===null||_===null||typeof b!="object"||typeof _!="object"){p[y]=_;continue}const w=Y0(b,_,s+1);p[y]=w,w===b&&g++}return u===d&&g===u?t:p}function ov(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function pf(t){if(!lv(t))return!1;const n=t.constructor;if(n===void 0)return!0;const s=n.prototype;return!(!lv(s)||!s.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(t)!==Object.prototype)}function lv(t){return Object.prototype.toString.call(t)==="[object Object]"}function ZC(t){return new Promise(n=>{ff.setTimeout(n,t)})}function WC(t,n,s){return typeof s.structuralSharing=="function"?s.structuralSharing(t,n):s.structuralSharing!==!1?Y0(t,n):n}function ex(t,n,s=0){const i=[...t,n];return s&&i.length>s?i.slice(1):i}function tx(t,n,s=0){const i=[n,...t];return s&&i.length>s?i.slice(0,-1):i}var Mf=Symbol();function F0(t,n){return!t.queryFn&&n?.initialPromise?()=>n.initialPromise:!t.queryFn||t.queryFn===Mf?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}function nx(t,n,s){let i=!1,l;return Object.defineProperty(t,"signal",{enumerable:!0,get:()=>(l??=n(),i||(i=!0,l.aborted?s():l.addEventListener("abort",s,{once:!0})),l)}),t}var Q0=(()=>{let t=()=>KC;return{isServer(){return t()},setIsServer(n){t=n}}})();function rx(){let t,n;const s=new Promise((l,u)=>{t=l,n=u});s.status="pending",s.catch(()=>{});function i(l){Object.assign(s,l),delete s.resolve,delete s.reject}return s.resolve=l=>{i({status:"fulfilled",value:l}),t(l)},s.reject=l=>{i({status:"rejected",reason:l}),n(l)},s}var sx=VC;function ax(){let t=[],n=0,s=d=>{d()},i=d=>{d()},l=sx;const u=d=>{n?t.push(d):l(()=>{s(d)})},c=()=>{const d=t;t=[],d.length&&l(()=>{i(()=>{d.forEach(p=>{s(p)})})})};return{batch:d=>{let p;n++;try{p=d()}finally{n--,n||c()}return p},batchCalls:d=>(...p)=>{u(()=>{d(...p)})},schedule:u,setNotifyFunction:d=>{s=d},setBatchNotifyFunction:d=>{i=d},setScheduler:d=>{l=d}}}var wt=ax(),ix=class extends au{#e=!0;#n;#t;constructor(){super(),this.#t=t=>{if(typeof window<"u"&&window.addEventListener){const n=()=>t(!0),s=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",s,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",s)}}}}onSubscribe(){this.#n||this.setEventListener(this.#t)}onUnsubscribe(){this.hasListeners()||(this.#n?.(),this.#n=void 0)}setEventListener(t){this.#t=t,this.#n?.(),this.#n=t(this.setOnline.bind(this))}
vendor: 24,036 bytes, line 55
55setOnline(t){this.#e!==t&&(this.#e=t,this.listeners.forEach(s=>{s(t)}))}isOnline(){return this.#e}},Kl=new ix;function ox(t){return Math.min(1e3*2**t,3e4)}function J0(t){return(t??"online")==="online"?Kl.isOnline():!0}var gf=class extends Error{constructor(t){super("CancelledError"),this.revert=t?.revert,this.silent=t?.silent}};function X0(t){let n=!1,s=0,i;const l=rx(),u=()=>l.status!=="pending",c=A=>{if(!u()){const R=new gf(A);b(R),t.onCancel?.(R)}},d=()=>{n=!0},p=()=>{n=!1},g=()=>K0.isFocused()&&(t.networkMode==="always"||Kl.isOnline())&&t.canRun(),m=()=>J0(t.networkMode)&&t.canRun(),y=A=>{u()||(i?.(),l.resolve(A))},b=A=>{u()||(i?.(),l.reject(A))},_=()=>new Promise(A=>{i=R=>{(u()||g())&&A(R)},t.onPause?.()}).then(()=>{i=void 0,u()||t.onContinue?.()}),w=()=>{if(u())return;let A;const R=s===0?t.initialPromise:void 0;try{A=R??t.fn()}catch(O){A=Promise.reject(O)}Promise.resolve(A).then(y).catch(O=>{if(u())return;const U=t.retry??(Q0.isServer()?0:3),j=t.retryDelay??ox,L=typeof j=="function"?j(s,O):j,Q=U===!0||typeof U=="number"&&s<U||typeof U=="function"&&U(s,O);if(n||!Q){b(O);return}s++,t.onFail?.(s,O),ZC(L).then(()=>g()?void 0:_()).then(()=>{n?b(O):w()})})};return{promise:l,status:()=>l.status,cancel:c,continue:()=>(i?.(),l),cancelRetry:d,continueRetry:p,canStart:m,start:()=>(m()?w():_().then(w),l)}}var Z0=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),FC(this.gcTime)&&(this.#e=ff.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(Q0.isServer()?1/0:300*1e3))}clearGcTimeout(){this.#e!==void 0&&(ff.clearTimeout(this.#e),this.#e=void 0)}},lx=class extends Z0{#e;#n;#t;#s;#r;#a;#i;constructor(t){super(),this.#i=!1,this.#a=t.defaultOptions,this.setOptions(t.options),this.observers=[],this.#s=t.client,this.#t=this.#s.getQueryCache(),this.queryKey=t.queryKey,this.queryHash=t.queryHash,this.#e=cv(this.options),this.state=t.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#r?.promise}setOptions(t){if(this.options={...this.#a,...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=cv(this.options);n.data!==void 0&&(this.setState(uv(n.data,n.dataUpdatedAt)),this.#e=n)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#t.remove(this)}setData(t,n){const s=WC(this.state.data,t,this.options);return this.#o({data:s,type:"success",dataUpdatedAt:n?.updatedAt,manual:n?.manual}),s}setState(t,n){this.#o({type:"setState",state:t,setStateOptions:n})}cancel(t){const n=this.#r?.promise;return this.#r?.cancel(t),n?n.then(ln).catch(ln):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#e}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>JC(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Mf||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>df(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!QC(this.state.dataUpdatedAt,t)}onFocus(){this.observers.find(n=>n.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#r?.continue()}onOnline(){this.observers.find(n=>n.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#r?.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),this.#t.notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(this.#r&&(this.#i||this.#l()?this.#r.cancel({revert:!0}):this.#r.cancelRetry()),this.scheduleGc()),this.#t.notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}#l(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"}invalidate(){this.state.isInvalidated||this.#o({type:"invalidate"})}async fetch(t,n){if(this.state.fetchStatus!=="idle"&&this.#r?.status()!=="rejected"){if(this.state.data!==void 0&&n?.cancelRefetch)this.cancel({silent:!0});else if(this.#r)return this.#r.continueRetry(),this.#r.promise}if(t&&this.setOptions(t),!this.options.queryFn){const d=this.observers.find(p=>p.options.queryFn);d&&this.setOptions(d.options)}const s=new AbortController,i=d=>{Object.defineProperty(d,"signal",{enumerable:!0,get:()=>(this.#i=!0,s.signal)})},l=()=>{const d=F0(this.options,n),g=(()=>{const m={client:this.#s,queryKey:this.queryKey,meta:this.meta};return i(m),m})();return this.#i=!1,this.options.persister?this.options.persister(d,g,this):d(g)},c=(()=>{const d={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:this.#s,state:this.state,fetchFn:l};return i(d),d})();this.options.behavior?.onFetch(c,this),this.#n=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==c.fetchOptions?.meta)&&this.#o({type:"fetch",meta:c.fetchOptions?.meta}),this.#r=X0({initialPromise:n?.initialPromise,fn:c.fetchFn,onCancel:d=>{d instanceof gf&&d.revert&&this.setState({...this.#n,fetchStatus:"idle"}),s.abort()},onFail:(d,p)=>{this.#o({type:"failed",failureCount:d,error:p})},onPause:()=>{this.#o({type:"pause"})},onContinue:()=>{this.#o({type:"continue"})},retry:c.options.retry,retryDelay:c.options.retryDelay,networkMode:c.options.networkMode,canRun:()=>!0});try{const d=await this.#r.start();if(d===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(d),this.#t.config.onSuccess?.(d,this),this.#t.config.onSettled?.(d,this.state.error,this),d}catch(d){if(d instanceof gf){if(d.silent)return this.#r.promise;if(d.revert){if(this.state.data===void 0)throw d;return this.state.data}}throw this.#o({type:"error",error:d}),this.#t.config.onError?.(d,this),this.#t.config.onSettled?.(this.state.data,d,this),d}finally{this.scheduleGc()}}#o(t){const n=s=>{switch(t.type){case"failed":return{...s,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...s,fetchStatus:"paused"};case"continue":return{...s,fetchStatus:"fetching"};case"fetch":return{...s,...ux(s.data,this.options),fetchMeta:t.meta??null};case"success":const i={...s,...uv(t.data,t.dataUpdatedAt),dataUpdateCount:s.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#n=t.manual?i:void 0,i;case"error":const l=t.error;return{...s,error:l,errorUpdateCount:s.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:s.fetchFailureCount+1,fetchFailureReason:l,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...s,isInvalidated:!0};case"setState":return{...s,...t.state}}};this.state=n(this.state),wt.batch(()=>{this.observers.forEach(s=>{s.onQueryUpdate()}),this.#t.notify({query:this,type:"updated",action:t})})}};function ux(t,n){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:J0(n.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function uv(t,n){return{data:t,dataUpdatedAt:n??Date.now(),error:null,isInvalidated:!1,status:"success"}}function cv(t){const n=typeof t.initialData=="function"?t.initialData():t.initialData,s=n!==void 0,i=s?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:n,dataUpdateCount:0,dataUpdatedAt:s?i??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:s?"success":"pending",fetchStatus:"idle"}}function hv(t){return{onFetch:(n,s)=>{const i=n.options,l=n.fetchOptions?.meta?.fetchMore?.direction,u=n.state.data?.pages||[],c=n.state.data?.pageParams||[];let d={pages:[],pageParams:[]},p=0;const g=async()=>{let m=!1;const y=w=>{nx(w,()=>n.signal,()=>m=!0)},b=F0(n.options,n.fetchOptions),_=async(w,A,R)=>{if(m)return Promise.reject();if(A==null&&w.pages.length)return Promise.resolve(w);const U=(()=>{const V={client:n.client,queryKey:n.queryKey,pageParam:A,direction:R?"backward":"forward",meta:n.options.meta};return y(V),V})(),j=await b(U),{maxPages:L}=n.options,Q=R?tx:ex;return{pages:Q(w.pages,j,L),pageParams:Q(w.pageParams,A,L)}};if(l&&u.length){const w=l==="backward",A=w?cx:fv,R={pages:u,pageParams:c},O=A(i,R);d=await _(R,O,w)}else{const w=t??u.length;do{const A=p===0?c[0]??i.initialPageParam:fv(i,d);if(p>0&&A==null)break;d=await _(d,A),p++}while(p<w)}return d};n.options.persister?n.fetchFn=()=>n.options.persister?.(g,{client:n.client,queryKey:n.queryKey,meta:n.options.meta,signal:n.signal},s):n.fetchFn=g}}}function fv(t,{pages:n,pageParams:s}){const i=n.length-1;return n.length>0?t.getNextPageParam(n[i],n,s[i],s):void 0}function cx(t,{pages:n,pageParams:s}){return n.length>0?t.getPreviousPageParam?.(n[0],n,s[0],s):void 0}var hx=class extends Z0{#e;#n;#t;#s;constructor(t){super(),this.#e=t.client,this.mutationId=t.mutationId,this.#t=t.mutationCache,this.#n=[],this.state=t.state||fx(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){this.#n.includes(t)||(this.#n.push(t),this.clearGcTimeout(),this.#t.notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){this.#n=this.#n.filter(n=>n!==t),this.scheduleGc(),this.#t.notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){this.#n.length||(this.state.status==="pending"?this.scheduleGc():this.#t.remove(this))}continue(){return this.#s?.continue()??this.execute(this.state.variables)}async execute(t){const n=()=>{this.#r({type:"continue"})},s={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#s=X0({fn:()=>this.options.mutationFn?this.options.mutationFn(t,s):Promise.reject(new Error("No mutationFn found")),onFail:(u,c)=>{this.#r({type:"failed",failureCount:u,error:c})},onPause:()=>{this.#r({type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#t.canRun(this)});const i=this.state.status==="pending",l=!this.#s.canStart();try{if(i)n();else{this.#r({type:"pending",variables:t,isPaused:l}),this.#t.config.onMutate&&await this.#t.config.onMutate(t,this,s);const c=await this.options.onMutate?.(t,s);c!==this.state.context&&this.#r({type:"pending",context:c,variables:t,isPaused:l})}const u=await this.#s.start();return await this.#t.config.onSuccess?.(u,t,this.state.context,this,s),await this.options.onSuccess?.(u,t,this.state.context,s),await this.#t.config.onSettled?.(u,null,this.state.variables,this.state.context,this,s),await this.options.onSettled?.(u,null,t,this.state.context,s),this.#r({type:"success",data:u}),u}catch(u){try{await this.#t.config.onError?.(u,t,this.state.context,this,s)}catch(c){Promise.reject(c)}try{await this.options.onError?.(u,t,this.state.context,s)}catch(c){Promise.reject(c)}try{await this.#t.config.onSettled?.(void 0,u,this.state.variables,this.state.context,this,s)}catch(c){Promise.reject(c)}try{await this.options.onSettled?.(void 0,u,t,this.state.context,s)}catch(c){Promise.reject(c)}throw this.#r({type:"error",error:u}),u}finally{this.#t.runNext(this)}}#r(t){const n=s=>{switch(t.type){case"failed":return{...s,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...s,isPaused:!0};case"continue":return{...s,isPaused:!1};case"pending":return{...s,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...s,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...s,data:void 0,error:t.error,failureCount:s.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),wt.batch(()=>{this.#n.forEach(s=>{s.onMutationUpdate(t)}),this.#t.notify({mutation:this,type:"updated",action:t})})}};function fx(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var dx=class extends au{constructor(t={}){super(),this.config=t,this.#e=new Set,this.#n=new Map,this.#t=0}#e;#n;#t;build(t,n,s){const i=new hx({client:t,mutationCache:this,mutationId:++this.#t,options:t.defaultMutationOptions(n),state:s});return this.add(i),i}add(t){this.#e.add(t);const n=Al(t);if(typeof n=="string"){const s=this.#n.get(n);s?s.push(t):this.#n.set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(this.#e.delete(t)){const n=Al(t);if(typeof n=="string"){const s=this.#n.get(n);if(s)if(s.length>1){const i=s.indexOf(t);i!==-1&&s.splice(i,1)}else s[0]===t&&this.#n.delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=Al(t);if(typeof n=="string"){const i=this.#n.get(n)?.find(l=>l.state.status==="pending");return!i||i===t}else return!0}runNext(t){const n=Al(t);return typeof n=="string"?this.#n.get(n)?.find(i=>i!==t&&i.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){wt.batch(()=>{this.#e.forEach(t=>{this.notify({type:"removed",mutation:t})}),this.#e.clear(),this.#n.clear()})}getAll(){return Array.from(this.#e)}find(t){const n={exact:!0,...t};return this.getAll().find(s=>iv(n,s))}findAll(t={}){return this.getAll().filter(n=>iv(t,n))}notify(t){wt.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return wt.batch(()=>Promise.all(t.map(n=>n.continue().catch(ln))))}};function Al(t){return t.options.scope?.id}var px=class extends au{constructor(t={}){super(),this.config=t,this.#e=new Map}#e;build(t,n,s){const i=n.queryKey,l=n.queryHash??jf(i,n);let u=this.get(l);return u||(u=new lx({client:t,queryKey:i,queryHash:l,options:t.defaultQueryOptions(n),state:s,defaultOptions:t.getQueryDefaults(i)}),this.add(u)),u}add(t){this.#e.has(t.queryHash)||(this.#e.set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=this.#e.get(t.queryHash);n&&(t.destroy(),n===t&&this.#e.delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){wt.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return this.#e.get(t)}getAll(){return[...this.#e.values()]}find(t){const n={exact:!0,...t};return this.getAll().find(s=>av(n,s))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(s=>av(t,s)):n}notify(t){wt.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){wt.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){wt.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},gx=class{#e;#n;#t;#s;#r;#a;#i;#l;constructor(t={}){this.#e=t.queryCache||new px,this.#n=t.mutationCache||new dx,this.#t=t.defaultOptions||{},this.#s=new Map,this.#r=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#i=K0.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#l=Kl.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#i?.(),this.#i=void 0,this.#l?.(),this.#l=void 0)}isFetching(t){return this.#e.findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return this.#n.findAll({...t,status:"pending"}).length}getQueryData(t){const n=this.defaultQueryOptions({queryKey:t});return this.#e.get(n.queryHash)?.state.data}ensureQueryData(t){const n=this.defaultQueryOptions(t),s=this.#e.build(this,n),i=s.state.data;return i===void 0?this.fetchQuery(t):(t.revalidateIfStale&&s.isStaleByTime(df(n.staleTime,s))&&this.prefetchQuery(n),Promise.resolve(i))}getQueriesData(t){return this.#e.findAll(t).map(({queryKey:n,state:s})=>{const i=s.data;return[n,i]})}setQueryData(t,n,s){const i=this.defaultQueryOptions({queryKey:t}),u=this.#e.get(i.queryHash)?.state.data,c=YC(n,u);if(c!==void 0)return this.#e.build(this,i).setData(c,{...s,manual:!0})}setQueriesData(t,n,s){return wt.batch(()=>this.#e.findAll(t).map(({queryKey:i})=>[i,this.setQueryData(i,n,s)]))}getQueryState(t){const n=this.defaultQueryOptions({queryKey:t});return this.#e.get(n.queryHash)?.state}removeQueries(t){const n=this.#e;wt.batch(()=>{n.findAll(t).forEach(s=>{n.remove(s)})})}resetQueries(t,n){const s=this.#e;return wt.batch(()=>(s.findAll(t).forEach(i=>{i.reset()}),this.refetchQueries({type:"active",...t},n)))}cancelQueries(t,n={}){const s={revert:!0,...n},i=wt.batch(()=>this.#e.findAll(t).map(l=>l.cancel(s)));return Promise.all(i).then(ln).catch(ln)}invalidateQueries(t,n={}){return wt.batch(()=>(this.#e.findAll(t).forEach(s=>{s.invalidate()}),t?.refetchType==="none"?Promise.resolve():this.refetchQueries({...t,type:t?.refetchType??t?.type??"active"},n)))}refetchQueries(t,n={}){const s={...n,cancelRefetch:n.cancelRefetch??!0},i=wt.batch(()=>this.#e.findAll(t).filter(l=>!l.isDisabled()&&!l.isStatic()).map(l=>{let u=l.fetch(void 0,s);return s.throwOnError||(u=u.catch(ln)),l.state.fetchStatus==="paused"?Promise.resolve():u}));return Promise.all(i).then(ln)}fetchQuery(t){const n=this.defaultQueryOptions(t);n.retry===void 0&&(n.retry=!1);const s=this.#e.build(this,n);return s.isStaleByTime(df(n.staleTime,s))?s.fetch(n):Promise.resolve(s.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(ln).catch(ln)}fetchInfiniteQuery(t){return t.behavior=hv(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(ln).catch(ln)}ensureInfiniteQueryData(t){return t.behavior=hv(t.pages),this.ensureQueryData(t)}resumePausedMutations(){return Kl.isOnline()?this.#n.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#n}getDefaultOptions(){return this.#t}setDefaultOptions(t){this.#t=t}setQueryDefaults(t,n){this.#s.set(Ii(t),{queryKey:t,defaultOptions:n})}getQueryDefaults(t){const n=[...this.#s.values()],s={};return n.forEach(i=>{$i(t,i.queryKey)&&Object.assign(s,i.defaultOptions)}),s}setMutationDefaults(t,n){this.#r.set(Ii(t),{mutationKey:t,defaultOptions:n})}getMutationDefaults(t){const n=[...this.#r.values()],s={};return n.forEach(i=>{$i(t,i.mutationKey)&&Object.assign(s,i.defaultOptions)}),s}defaultQueryOptions(t){if(t._defaulted)return t;const n={...this.#t.queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return n.queryHash||(n.queryHash=jf(n.queryKey,n)),n.refetchOnReconnect===void 0&&(n.refetchOnReconnect=n.networkMode!=="always"),n.throwOnError===void 0&&(n.throwOnError=!!n.suspense),!n.networkMode&&n.persister&&(n.networkMode="offlineFirst"),n.queryFn===Mf&&(n.enabled=!1),n}defaultMutationOptions(t){return t?._defaulted?t:{...this.#t.mutations,...t?.mutationKey&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){this.#e.clear(),this.#n.clear()}},yx=re.createContext(void 0),mx=({client:t,children:n})=>(re.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),Y.jsx(yx.Provider,{value:t,children:n}));const vx="/assets/styles-D8LVBU9f.css";function bx(){return Y.jsx("div",{className:"flex min-h-screen items-center justify-center bg-background px-4",children:Y.jsxs("div",{className:"max-w-md text-center",children:[Y.jsx("h1",{className:"text-7xl font-bold text-foreground",children:"404"}),Y.jsx("h2",{className:"mt-4 text-xl font-semibold text-foreground",children:"Page not found"}),Y.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:"The page you're looking for doesn't exist or has been moved."}),Y.jsx("div",{className:"mt-6",children:Y.jsx(Of,{to:"/",className:"inline-flex items-center justify-center rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground transition-colors hover:bg-primary/90",children:"Go home"})})]})})}function _x({error:t,reset:n}){console.error(t);const s=vt();return Y.jsx("div",{className:"flex min-h-screen items-center justify-center bg-background px-4",children:Y.jsxs("div",{className:"max-w-md text-center",children:[Y.jsx("h1",{className:"text-xl font-semibold tracking-tight text-foreground",children:"This page didn't load"}),Y.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:"Something went wrong on our end. You can try refreshing or head back home."}),Y.jsxs("div",{className:"mt-6 flex flex-wrap justify-center gap-2",children:[Y.jsx("button",{onClick:()=>{s.invalidate(),n()},className:"inline-flex items-center justify-center rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground transition-colors hover:bg-primary/90",children:"Try again"}),Y.jsx("a",{href:"/",className:"inline-flex items-center justify-center rounded-md border border-input bg-background px-4 py-2 text-sm font-medium text-foreground transition-colors hover:bg-accent",children:"Go home"})]})]})})}const Yi=EA()({head:()=>({meta:[{charSet:"utf-8"},{name:"viewport",content:"width=device-width, initial-scale=1"},{title:"Votre feuille de route Climat avec Carbo"},{name:"description",content:"Projetez-vous sur 5 ans en quelques secondes, et entamez votre parcours de décarbonation."},{name:"author",content:"Lovable"},{property:"og:title",content:"Votre feuille de route Climat avec Carbo"},{property:"og:description",content:"Projetez-vous sur 5 ans en quelques secondes, et entamez votre parcours de décarbonation."},{property:"og:type",content:"website"},{name:"twitter:card",content:"summary"},{name:"twitter:site",content:"@Lovable"},{name:"twitter:title",content:"Votre feuille de route Climat avec Carbo"},{name:"twitter:description",content:"Projetez-vous sur 5 ans en quelques secondes, et entamez votre parcours de décarbonation."},{property:"og:image",content:"https://pub-bb2e103a32db4e198524a2e9ed8f35b4.r2.dev/a7d0eac7-0f67-4d30-b5a4-9d40ba7fb2b7/id-preview-4eb27d57--12d75a05-022f-48c8-9bc7-107b34d9615b.lovable.app-1778859911155.png"},{name:"twitter:image",content:"https://pub-bb2e103a32db4e198524a2e9ed8f35b4.r2.dev/a7d0eac7-0f67-4d30-b5a4-9d40ba7fb2b7/id-preview-4eb27d57--12d75a05-022f-48c8-9bc7-107b34d9615b.lovable.app-1778859911155.png"}],links:[{rel:"stylesheet",href:vx},{rel:"icon",type:"image/png",href:"/favicon.png"}]}),shellComponent:Sx,component:wx,notFoundComponent:bx,errorComponent:_x});function Sx({children:t}){return Y.jsxs("html",{lang:"en",children:[Y.jsx("head",{children:Y.jsx(GA,{})}),Y.jsxs("body",{children:[t,Y.jsx(VA,{})]})]})}function wx(){const{queryClient:t}=Yi.useRouteContext();return Y.jsx(mx,{client:t,children:Y.jsx(w0,{})})}const Ex="modulepreload",Tx=function(t){return"/"+t},dv={},W0=function(n,s,i){let l=Promise.resolve();if(s&&s.length>0){let p=function(g){return Promise.all(g.map(m=>Promise.resolve(m).then(y=>({status:"fulfilled",value:y}),y=>({status:"rejected",reason:y}))))};document.getElementsByTagName("link");const c=document.querySelector("meta[property=csp-nonce]"),d=c?.nonce||c?.getAttribute("nonce");l=p(s.map(g=>{if(g=Tx(g),g in dv)return;dv[g]=!0;const m=g.endsWith(".css"),y=m?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${g}"]${y}`))return;const b=document.createElement("link");if(b.rel=m?"stylesheet":Ex,m||(b.as="script"),b.crossOrigin="",b.href=g,d&&b.setAttribute("nonce",d),document.head.appendChild(b),m)return new Promise((_,w)=>{b.addEventListener("load",_),b.addEventListener("error",()=>w(new Error(`Unable to preload CSS for ${g}`)))})}))}function u(c){const d=new Event("vite:preloadError",{cancelable:!0});if(d.payload=c,window.dispatchEvent(d),!d.defaultPrevented)throw c}return l.then(c=>{for(const d of c||[])d.status==="rejected"&&u(d.reason);return n().catch(u)})},Rx=()=>W0(()=>import("./questionnaire-DR-OE8ma.js"),__vite__mapDeps([0,1])),Ax=Cf("/questionnaire")({head:()=>({meta:[{title:"Questionnaire â Ma feuille de route Climat"},{name:"description",content:"Quelques questions pour construire votre feuille de route sur 5 ans."}]}),component:b0(Rx,"component")}),Ox=()=>W0(()=>
55import("./feuille-de-route-DCtkxTgR.js"),__vite__mapDeps([2,1])),Cx=Cf("/feuille-de-route")({head:()=>({meta:[{title:"Ma feuille de route Climat â Carbo"},{name:"description",content:"Obtenez gratuitement votre plan de décarbonation personnalisé sur 5 ans."}]}),component:b0(Ox,"component")}),xx=Cf("/")({beforeLoad:()=>{throw bf({to:"/questionnaire"})}}),kx=Ax.update({id:"/questionnaire",path:"/questionnaire",getParentRoute:()=>Yi}),jx=Cx.update({id:"/feuille-de-route",path:"/feuille-de-route",getParentRoute:()=>Yi}),Mx=xx.update({id:"/",path:"/",getParentRoute:()=>Yi}),Ux={IndexRoute:Mx,FeuilleDeRouteRoute:jx,QuestionnaireRoute:kx},Nx=Yi._addFileChildren(Ux),Dx=()=>{const t=new gx;return zA({routeTree:Nx,context:{queryClient:t},scrollRestoration:!0,defaultPreloadStaleTime:0})};async function Lx(){const t=await Dx();let n;if(sv){const s=await sv.getOptions();s.serializationAdapters=s.serializationAdapters??[],window.__TSS_START_OPTIONS__=s,n=s.serializationAdapters,t.options.defaultSsr=s.defaultSsr}else n=[],window.__TSS_START_OPTIONS__={serializationAdapters:n};return n.push(qR),t.options.serializationAdapters&&n.push(...t.options.serializationAdapters),t.update({basepath:"",serializationAdapters:n}),t.stores.matchesId.get().length||await $R(t),t}async function zx(){const t=await Lx();return window.$_TSR?.h(),t}var $h;function Px(){return $h||($h=zx()),Y.jsx(YR,{promise:$h,children:t=>Y.jsx(HA,{router:t})})}re.startTransition(()=>{xS.hydrateRoot(document,Y.jsx(re.StrictMode,{children:Y.jsx(Px,{})}))});export{Of as L,Bx as R,Y as j,re as r,BC as s,m0 as u};
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.