vendor: 4,108 bytes, lines 1-2
1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/terms-9YI56DPk.js","assets/Footer-B0fOUnwr.js","assets/privacy-CSYxPMp6.js","assets/delete-data-BWbLSmnd.js","assets/cookie-policy-B1dXX5k1.js","assets/index-BX1PG1So.js"])))=>i.map(i=>d[i]); 2function RS(e,t){for(var r=0;r<t.length;r++){const a=t[r];if(typeof a!="string"&&!Array.isArray(a)){for(const o in a)if(o!=="default"&&!(o in e)){const c=Object.getOwnPropertyDescriptor(a,o);c&&Object.defineProperty(e,o,c.get?c:{enumerable:!0,get:()=>a[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}function cb(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var rf={exports:{}},Fi={};var fy;function xS(){if(fy)return Fi;fy=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function r(a,o,c){var u=null;if(c!==void 0&&(u=""+c),o.key!==void 0&&(u=""+o.key),"key"in o){c={};for(var f in o)f!=="key"&&(c[f]=o[f])}else c=o;return o=c.ref,{$$typeof:e,type:a,key:u,ref:o!==void 0?o:null,props:c}}return Fi.Fragment=t,Fi.jsx=r,Fi.jsxs=r,Fi}var hy;function AS(){return hy||(hy=1,rf.exports=xS()),rf.exports}var J=AS(),sf={exports:{}},_e={};var py;function OS(){if(py)return _e;py=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),c=Symbol.for("react.consumer"),u=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),g=Symbol.for("react.activity"),b=Symbol.iterator;function w(C){return C===null||typeof C!="object"?null:(C=b&&C[b]||C["@@iterator"],typeof C=="function"?C:null)}var _={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},x=Object.assign,E={};function R(C,$,K){this.props=C,this.context=$,this.refs=E,this.updater=K||_}R.prototype.isReactComponent={},R.prototype.setState=function(C,$){if(typeof C!="object"&&typeof C!="function"&&C!=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,C,$,"setState")},R.prototype.forceUpdate=function(C){this.updater.enqueueForceUpdate(this,C,"forceUpdate")};function M(){}M.prototype=R.prototype;function j(C,$,K){this.props=C,this.context=$,this.refs=E,this.updater=K||_}var L=j.prototype=new M;L.constructor=j,x(L,R.prototype),L.isPureReactComponent=!0;var X=Array.isArray;function G(){}var H={H:null,A:null,T:null,S:null},U=Object.prototype.hasOwnProperty;function Q(C,$,K){var W=K.ref;return{$$typeof:e,type:C,key:$,ref:W!==void 0?W:null,props:K}}function fe(C,$){return Q(C.type,$,C.props)}function ie(C){return typeof C=="object"&&C!==null&&C.$$typeof===e}function ve(C){var $={"=":"=0",":":"=2"};return"$"+C.replace(/[=:]/g,function(K){return $[K]})}var Se=/\/+/g;function ze(C,$){return typeof C=="object"&&C!==null&&C.key!=null?ve(""+C.key):$.toString(36)}function Ae(C){switch(C.status){case"fulfilled":return C.value;case"rejected":throw C.reason;default:switch(typeof C.status=="string"?C.then(G,G):(C.status="pending",C.then(function($){C.status==="pending"&&(C.status="fulfilled",C.value=$)},function($){C.status==="pending"&&(C.status="rejected",C.reason=$)})),C.status){case"fulfilled":return C.value;case"rejected":throw C.reason}}throw C}function D(C,$,K,W,Z){var se=typeof C;(se==="undefined"||se==="boolean")&&(C=null);var we=!1;if(C===null)we=!0;else switch(se){case"bigint":case"string":case"number":we=!0;break;case"object":switch(C.$$typeof){case e:case t:we=!0;break;case y:return we=C._init,D(we(C._payload),$,K,W,Z)}}if(we)return Z=Z(C),we=W===""?"."+ze(C,0):W,X(Z)?(K="",we!=null&&(K=we.replace(Se,"$&/")+"/"),D(Z,$,K,"",function(xt){return xt})):Z!=null&&(ie(Z)&&(Z=fe(Z,K+(Z.key==null||C&&C.key===Z.key?"":(""+Z.key).replace(Se,"$&/")+"/")+we)),$.push(Z)),1;we=0;var ye=W===""?".":W+":";if(X(C))for(var pe=0;pe<C.length;pe++)W=C[pe],se=ye+ze(W,pe),we+=D(W,$,K,se,Z);
vendor: 4,726 bytes, line 2
2else if(pe=w(C),typeof pe=="function")for(C=pe.call(C),pe=0;!(W=C.next()).done;)W=W.value,se=ye+ze(W,pe++),we+=D(W,$,K,se,Z);else if(se==="object"){if(typeof C.then=="function")return D(Ae(C),$,K,W,Z);throw $=String(C),Error("Objects are not valid as a React child (found: "+($==="[object Object]"?"object with keys {"+Object.keys(C).join(", ")+"}":$)+"). If you meant to render a collection of children, use an array instead.")}return we}function F(C,$,K){if(C==null)return C;var W=[],Z=0;return D(C,W,"","",function(se){return $.call(K,se,Z++)}),W}function ae(C){if(C._status===-1){var $=C._result;$=$(),$.then(function(K){(C._status===0||C._status===-1)&&(C._status=1,C._result=K)},function(K){(C._status===0||C._status===-1)&&(C._status=2,C._result=K)}),C._status===-1&&(C._status=0,C._result=$)}if(C._status===1)return C._result.default;throw C._result}var Ee=typeof reportError=="function"?reportError:function(C){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var $=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof C=="object"&&C!==null&&typeof C.message=="string"?String(C.message):String(C),error:C});if(!window.dispatchEvent($))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",C);return}console.error(C)},ee={map:F,forEach:function(C,$,K){F(C,function(){$.apply(this,arguments)},K)},count:function(C){var $=0;return F(C,function(){$++}),$},toArray:function(C){return F(C,function($){return $})||[]},only:function(C){if(!ie(C))throw Error("React.Children.only expected to receive a single React element child.");return C}};return _e.Activity=g,_e.Children=ee,_e.Component=R,_e.Fragment=r,_e.Profiler=o,_e.PureComponent=j,_e.StrictMode=a,_e.Suspense=p,_e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=H,_e.__COMPILER_RUNTIME={__proto__:null,c:function(C){return H.H.useMemoCache(C)}},_e.cache=function(C){return function(){return C.apply(null,arguments)}},_e.cacheSignal=function(){return null},_e.cloneElement=function(C,$,K){if(C==null)throw Error("The argument must be a React element, but you passed "+C+".");var W=x({},C.props),Z=C.key;if($!=null)for(se in $.key!==void 0&&(Z=""+$.key),$)!U.call($,se)||se==="key"||se==="__self"||se==="__source"||se==="ref"&&$.ref===void 0||(W[se]=$[se]);var se=arguments.length-2;if(se===1)W.children=K;else if(1<se){for(var we=Array(se),ye=0;ye<se;ye++)we[ye]=arguments[ye+2];W.children=we}return Q(C.type,Z,W)},_e.createContext=function(C){return C={$$typeof:u,_currentValue:C,_currentValue2:C,_threadCount:0,Provider:null,Consumer:null},C.Provider=C,C.Consumer={$$typeof:c,_context:C},C},_e.createElement=function(C,$,K){var W,Z={},se=null;if($!=null)for(W in $.key!==void 0&&(se=""+$.key),$)U.call($,W)&&W!=="key"&&W!=="__self"&&W!=="__source"&&(Z[W]=$[W]);var we=arguments.length-2;if(we===1)Z.children=K;else if(1<we){for(var ye=Array(we),pe=0;pe<we;pe++)ye[pe]=arguments[pe+2];Z.children=ye}if(C&&C.defaultProps)for(W in we=C.defaultProps,we)Z[W]===void 0&&(Z[W]=we[W]);return Q(C,se,Z)},_e.createRef=function(){return{current:null}},_e.forwardRef=function(C){return{$$typeof:f,render:C}},_e.isValidElement=ie,_e.lazy=function(C){return{$$typeof:y,_payload:{_status:-1,_result:C},_init:ae}},_e.memo=function(C,$){return{$$typeof:m,type:C,compare:$===void 0?null:$}},_e.startTransition=function(C){var $=H.T,K={};H.T=K;try{var W=C(),Z=H.S;Z!==null&&Z(K,W),typeof W=="object"&&W!==null&&typeof W.then=="function"&&W.then(G,Ee)}catch(se){Ee(se)}finally{$!==null&&K.types!==null&&($.types=K.types),H.T=$}},_e.unstable_useCacheRefresh=function(){return H.H.useCacheRefresh()},_e.use=function(C){return H.H.use(C)},_e.useActionState=function(C,$,K){return H.H.useActionState(C,$,K)},_e.useCallback=function(C,$){return H.H.useCallback(C,$)},_e.useContext=function(C){return H.H.useContext(C)},_e.useDebugValue=function(){},_e.useDeferredValue=function(C,$){return H.H.useDeferredValue(C,$)},_e.useEffect=function(C,$){return H.H.useEffect(C,$)},_e.useEffectEvent=function(C){return H.H.useEffectEvent(C)},_e.useId=function(){return H.H.useId()},_e.useImperativeHandle=function(C,$,K){return H.H.useImperativeHandle(C,$,K)},_e.useInsertionEffect=function(C,$){return H.H.useInsertionEffect(C,$)},_e.useLayoutEffect=function(C,$){return H.H.useLayoutEffect(C,$)},_e.useMemo=function(C,$){return H.H.useMemo(C,$)},_e.useOptimistic=function(C,$){return H.H.useOptimistic(C,$)},_e.useReducer=function(C,$,K){return H.H.useReducer(C,$,K)},_e.useRef=function(C){return H.H.useRef(C)},_e.useState=function(C){return H.H.useState(C)},_e.useSyncExternalStore=function(C,$,K){return H.H.useSyncExternalStore(C,$,K)},_e.useTransition=function(){return H.H.useTransition()}
vendor: 4,646 bytes, line 2
2,_e.version="19.2.5",_e}var my;function xo(){return my||(my=1,sf.exports=OS()),sf.exports}var ne=xo();const te=cb(ne),CS=RS({__proto__:null,default:te},[ne]);var af={exports:{}},Ji={},of={exports:{}},lf={};var gy;function kS(){return gy||(gy=1,(function(e){function t(D,F){var ae=D.length;D.push(F);e:for(;0<ae;){var Ee=ae-1>>>1,ee=D[Ee];if(0<o(ee,F))D[Ee]=F,D[ae]=ee,ae=Ee;else break e}}function r(D){return D.length===0?null:D[0]}function a(D){if(D.length===0)return null;var F=D[0],ae=D.pop();if(ae!==F){D[0]=ae;e:for(var Ee=0,ee=D.length,C=ee>>>1;Ee<C;){var $=2*(Ee+1)-1,K=D[$],W=$+1,Z=D[W];if(0>o(K,ae))W<ee&&0>o(Z,K)?(D[Ee]=Z,D[W]=ae,Ee=W):(D[Ee]=K,D[$]=ae,Ee=$);else if(W<ee&&0>o(Z,ae))D[Ee]=Z,D[W]=ae,Ee=W;else break e}}return F}function o(D,F){var ae=D.sortIndex-F.sortIndex;return ae!==0?ae:D.id-F.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var c=performance;e.unstable_now=function(){return c.now()}}else{var u=Date,f=u.now();e.unstable_now=function(){return u.now()-f}}var p=[],m=[],y=1,g=null,b=3,w=!1,_=!1,x=!1,E=!1,R=typeof setTimeout=="function"?setTimeout:null,M=typeof clearTimeout=="function"?clearTimeout:null,j=typeof setImmediate<"u"?setImmediate:null;function L(D){for(var F=r(m);F!==null;){if(F.callback===null)a(m);else if(F.startTime<=D)a(m),F.sortIndex=F.expirationTime,t(p,F);else break;F=r(m)}}function X(D){if(x=!1,L(D),!_)if(r(p)!==null)_=!0,G||(G=!0,ve());else{var F=r(m);F!==null&&Ae(X,F.startTime-D)}}var G=!1,H=-1,U=5,Q=-1;function fe(){return E?!0:!(e.unstable_now()-Q<U)}function ie(){if(E=!1,G){var D=e.unstable_now();Q=D;var F=!0;try{e:{_=!1,x&&(x=!1,M(H),H=-1),w=!0;var ae=b;try{t:{for(L(D),g=r(p);g!==null&&!(g.expirationTime>D&&fe());){var Ee=g.callback;if(typeof Ee=="function"){g.callback=null,b=g.priorityLevel;var ee=Ee(g.expirationTime<=D);if(D=e.unstable_now(),typeof ee=="function"){g.callback=ee,L(D),F=!0;break t}g===r(p)&&a(p),L(D)}else a(p);g=r(p)}if(g!==null)F=!0;else{var C=r(m);C!==null&&Ae(X,C.startTime-D),F=!1}}break e}finally{g=null,b=ae,w=!1}F=void 0}}finally{F?ve():G=!1}}}var ve;if(typeof j=="function")ve=function(){j(ie)};else if(typeof MessageChannel<"u"){var Se=new MessageChannel,ze=Se.port2;Se.port1.onmessage=ie,ve=function(){ze.postMessage(null)}}else ve=function(){R(ie,0)};function Ae(D,F){H=R(function(){D(e.unstable_now())},F)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(D){D.callback=null},e.unstable_forceFrameRate=function(D){0>D||125<D?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):U=0<D?Math.floor(1e3/D):5},e.unstable_getCurrentPriorityLevel=function(){return b},e.unstable_next=function(D){switch(b){case 1:case 2:case 3:var F=3;break;default:F=b}var ae=b;b=F;try{return D()}finally{b=ae}},e.unstable_requestPaint=function(){E=!0},e.unstable_runWithPriority=function(D,F){switch(D){case 1:case 2:case 3:case 4:case 5:break;default:D=3}var ae=b;b=D;try{return F()}finally{b=ae}},e.unstable_scheduleCallback=function(D,F,ae){var Ee=e.unstable_now();switch(typeof ae=="object"&&ae!==null?(ae=ae.delay,ae=typeof ae=="number"&&0<ae?Ee+ae:Ee):ae=Ee,D){case 1:var ee=-1;break;case 2:ee=250;break;case 5:ee=1073741823;break;case 4:ee=1e4;break;default:ee=5e3}return ee=ae+ee,D={id:y++,callback:F,priorityLevel:D,startTime:ae,expirationTime:ee,sortIndex:-1},ae>Ee?(D.sortIndex=ae,t(m,D),r(p)===null&&D===r(m)&&(x?(M(H),H=-1):x=!0,Ae(X,ae-Ee))):(D.sortIndex=ee,t(p,D),_||w||(_=!0,G||(G=!0,ve()))),D},e.unstable_shouldYield=fe,e.unstable_wrapCallback=function(D){var F=b;return function(){var ae=b;b=F;try{return D.apply(this,arguments)}finally{b=ae}}}})(lf)),lf}var yy;function jS(){return yy||(yy=1,of.exports=kS()),of.exports}var cf={exports:{}},Ut={};var vy;function MS(){if(vy)return Ut;vy=1;var e=xo();function t(p){var m="https://react.dev/errors/"+p;if(1<arguments.length){m+="?args[]="+encodeURIComponent(arguments[1]);for(var y=2;y<arguments.length;y++)m+="&args[]="+encodeURIComponent(arguments[y])}return"Minified React error #"+p+"; visit "+m+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(){}var a={d:{f:r,r:function(){throw Error(t(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},o=Symbol.for("react.portal");function c(p,m,y){var g=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:g==null?null:""+g,children:p,containerInfo:m,implementation:y}}
vendor: 7,825 bytes, lines 2-4
2var u=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function f(p,m){if(p==="font")return"";if(typeof m=="string")return m==="use-credentials"?m:""}return Ut.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,Ut.createPortal=function(p,m){var y=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!m||m.nodeType!==1&&m.nodeType!==9&&m.nodeType!==11)throw Error(t(299));return c(p,m,null,y)},Ut.flushSync=function(p){var m=u.T,y=a.p;try{if(u.T=null,a.p=2,p)return p()}finally{u.T=m,a.p=y,a.d.f()}},Ut.preconnect=function(p,m){typeof p=="string"&&(m?(m=m.crossOrigin,m=typeof m=="string"?m==="use-credentials"?m:"":void 0):m=null,a.d.C(p,m))},Ut.prefetchDNS=function(p){typeof p=="string"&&a.d.D(p)},Ut.preinit=function(p,m){if(typeof p=="string"&&m&&typeof m.as=="string"){var y=m.as,g=f(y,m.crossOrigin),b=typeof m.integrity=="string"?m.integrity:void 0,w=typeof m.fetchPriority=="string"?m.fetchPriority:void 0;y==="style"?a.d.S(p,typeof m.precedence=="string"?m.precedence:void 0,{crossOrigin:g,integrity:b,fetchPriority:w}):y==="script"&&a.d.X(p,{crossOrigin:g,integrity:b,fetchPriority:w,nonce:typeof m.nonce=="string"?m.nonce:void 0})}},Ut.preinitModule=function(p,m){if(typeof p=="string")if(typeof m=="object"&&m!==null){if(m.as==null||m.as==="script"){var y=f(m.as,m.crossOrigin);a.d.M(p,{crossOrigin:y,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0})}}else m==null&&a.d.M(p)},Ut.preload=function(p,m){if(typeof p=="string"&&typeof m=="object"&&m!==null&&typeof m.as=="string"){var y=m.as,g=f(y,m.crossOrigin);a.d.L(p,y,{crossOrigin:g,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0,type:typeof m.type=="string"?m.type:void 0,fetchPriority:typeof m.fetchPriority=="string"?m.fetchPriority:void 0,referrerPolicy:typeof m.referrerPolicy=="string"?m.referrerPolicy:void 0,imageSrcSet:typeof m.imageSrcSet=="string"?m.imageSrcSet:void 0,imageSizes:typeof m.imageSizes=="string"?m.imageSizes:void 0,media:typeof m.media=="string"?m.media:void 0})}},Ut.preloadModule=function(p,m){if(typeof p=="string")if(m){var y=f(m.as,m.crossOrigin);a.d.m(p,{as:typeof m.as=="string"&&m.as!=="script"?m.as:void 0,crossOrigin:y,integrity:typeof m.integrity=="string"?m.integrity:void 0})}else a.d.m(p)},Ut.requestFormReset=function(p){a.d.r(p)},Ut.unstable_batchedUpdates=function(p,m){return p(m)},Ut.useFormState=function(p,m,y){return u.H.useFormState(p,m,y)},Ut.useFormStatus=function(){return u.H.useHostTransitionStatus()},Ut.version="19.2.5",Ut}var by;function ub(){if(by)return cf.exports;by=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),cf.exports=MS(),cf.exports}var wy;function NS(){if(wy)return Ji;wy=1;var e=jS(),t=xo(),r=ub();function a(n){var s="https://react.dev/errors/"+n;if(1<arguments.length){s+="?args[]="+encodeURIComponent(arguments[1]);for(var i=2;i<arguments.length;i++)s+="&args[]="+encodeURIComponent(arguments[i])}return"Minified React error #"+n+"; visit "+s+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(n){return!(!n||n.nodeType!==1&&n.nodeType!==9&&n.nodeType!==11)}function c(n){var s=n,i=n;if(n.alternate)for(;s.return;)s=s.return;else{n=s;do s=n,(s.flags&4098)!==0&&(i=s.return),n=s.return;while(n)}return s.tag===3?i:null}function u(n){if(n.tag===13){var s=n.memoizedState;if(s===null&&(n=n.alternate,n!==null&&(s=n.memoizedState)),s!==null)return s.dehydrated}return null}function f(n){if(n.tag===31){var s=n.memoizedState;if(s===null&&(n=n.alternate,n!==null&&(s=n.memoizedState)),s!==null)return s.dehydrated}return null}function p(n){if(c(n)!==n)throw Error(a(188))}function m(n){var s=n.alternate;if(!s){if(s=c(n),s===null)throw Error(a(188));return s!==n?null:n}for(var i=n,l=s;;){var d=i.return;if(d===null)break;var h=d.alternate;if(h===null){if(l=d.return,l!==null){i=l;continue}break}if(d.child===h.child){for(h=d.child;h;){if(h===i)return p(d),n;if(h===l)return p(d),s;h=h.sibling}throw Error(a(188))}if(i.return!==l.return)i=d,l=h;else{for(var v=!1,S=d.child;S;){if(S===i){v=!0,i=d,l=h;break}if(S===l){v=!0,l=d,i=h;break}S=S.sibling}if(!v){for(S=h.child;S;){if(S===i){v=!0,i=h,l=d;break}if(S===l){v=!0,l=h,i=d;break}S=S.sibling}if(!v)throw Error(a(189))}}if(i.alternate!==l)throw Error(a(190))}if(i.tag!==3)throw Error(a(188));return i.stateNode.current===i?n:s}function y(n){var s=n.tag;if(s===5||s===26||s===27||s===6)return n;for(n=n.child;n!==null;){if(s=y(n),s!==null)return s;n=n.sibling}return null}var g=Object.assign,b=Symbol.for("react.element"),w=Symbol.for("react.transitional.element"),_=Symbol.for("react.portal"),x=Symbol.for("react.fragment"),E=Symbol.for("react.strict_mode"),R=Symbol.for("react.profiler"),M=Symbol.for("react.consumer"),j=Symbol.for("react.context"),L=Symbol.for("react.forward_ref"),X=Symbol.for("react.suspense"),G=Symbol.for("react.suspense_list"),H=Symbol.for("react.memo"),U=Symbol.for("react.lazy"),Q=Symbol.for("react.activity"),fe=Symbol.for("react.memo_cache_sentinel"),ie=Symbol.iterator;function ve(n){return n===null||typeof n!="object"?null:(n=ie&&n[ie]||n["@@iterator"],typeof n=="function"?n:null)}var Se=Symbol.for("react.client.reference");function ze(n){if(n==null)return null;if(typeof n=="function")return n.$$typeof===Se?null:n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case x:return"Fragment";case R:return"Profiler";case E:return"StrictMode";case X:return"Suspense";case G:return"SuspenseList";case Q:return"Activity"}if(typeof n=="object")switch(n.$$typeof){case _:return"Portal";case j:return n.displayName||"Context";case M:return(n._context.displayName||"Context")+".Consumer";case L:var s=n.render;return n=n.displayName,n||(n=s.displayName||s.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case H:return s=n.displayName||null,s!==null?s:ze(n.type)||"Memo";case U:s=n._payload,n=n._init;try{return ze(n(s))}catch{}}return null}var Ae=Array.isArray,D=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ae={pending:!1,data:null,method:null,action:null},Ee=[],ee=-1;function C(n){return{current:n}}function $(n){0>ee||(n.current=Ee[ee],Ee[ee]=null,ee--)}function K(n,s){ee++,Ee[ee]=n.current,n.current=s}var W=C(null),Z=C(null),se=C(null),we=C(null);function ye(n,s){switch(K(se,s),K(Z,n),K(W,null),s.nodeType){case 9:case 11:n=(n=s.documentElement)&&(n=n.namespaceURI)?Lg(n):0;break;default:if(n=s.tagName,s=s.namespaceURI)s=Lg(s),n=Ug(s,n);else switch(n){case"svg":n=1;break;case"math":n=2;break;default:n=0}}$(W),K(W,n)}function pe(){$(W),$(Z),$(se)}function xt(n){n.memoizedState!==null&&K(we,n);var s=W.current,i=Ug(s,n.type);s!==i&&(K(Z,n),K(W,i))}function ft(n){Z.current===n&&($(W),$(Z)),we.current===n&&($(we),Gi._currentValue=ae)}var at,Rn;function ht(n){if(at===void 0)try{throw Error()}catch(i){var s=i.stack.trim().match(/\n( *(at )?)/);at=s&&s[1]||"",Rn=-1<i.stack.indexOf(` 3 at`)?" (<anonymous>)":-1<i.stack.indexOf("@")?"@unknown:0:0":""}return` 4`+at+n+Rn}var ps=!1;function Jn(n,s){if(!n||ps)return"";ps=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(s){var Y=function(){throw Error()};if(Object.defineProperty(Y.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Y,[])}catch(I){var B=I}Reflect.construct(n,[],Y)}else{try{Y.call()}catch(I){B=I}n.call(Y.prototype)}}else{try{throw Error()}catch(I){B=I}(Y=n())&&typeof Y.catch=="function"&&Y.catch(function(){})}}
vendor: 8,579 bytes, lines 4-9
4catch(I){if(I&&B&&typeof I.stack=="string")return[I.stack,B.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var d=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");d&&d.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var h=l.DetermineComponentFrameRoot(),v=h[0],S=h[1];if(v&&S){var O=v.split(` 5`),P=S.split(` 6`);for(d=l=0;l<O.length&&!O[l].includes("DetermineComponentFrameRoot");)l++;for(;d<P.length&&!P[d].includes("DetermineComponentFrameRoot");)d++;if(l===O.length||d===P.length)for(l=O.length-1,d=P.length-1;1<=l&&0<=d&&O[l]!==P[d];)d--;for(;1<=l&&0<=d;l--,d--)if(O[l]!==P[d]){if(l!==1||d!==1)do if(l--,d--,0>d||O[l]!==P[d]){var q=` 7`+O[l].replace(" at new "," at ");return n.displayName&&q.includes("<anonymous>")&&(q=q.replace("<anonymous>",n.displayName)),q}while(1<=l&&0<=d);break}}}finally{ps=!1,Error.prepareStackTrace=i}return(i=n?n.displayName||n.name:"")?ht(i):""}function Ln(n,s){switch(n.tag){case 26:case 27:case 5:return ht(n.type);case 16:return ht("Lazy");case 13:return n.child!==s&&s!==null?ht("Suspense Fallback"):ht("Suspense");case 19:return ht("SuspenseList");case 0:case 15:return Jn(n.type,!1);case 11:return Jn(n.type.render,!1);case 1:return Jn(n.type,!0);case 31:return ht("Activity");default:return""}}function fn(n){try{var s="",i=null;do s+=Ln(n,i),i=n,n=n.return;while(n);return s}catch(l){return` 8Error generating stack: `+l.message+` 9`+l.stack}}var At=Object.prototype.hasOwnProperty,nn=e.unstable_scheduleCallback,ms=e.unstable_cancelCallback,bt=e.unstable_shouldYield,Un=e.unstable_requestPaint,wt=e.unstable_now,Ie=e.unstable_getCurrentPriorityLevel,We=e.unstable_ImmediatePriority,hn=e.unstable_UserBlockingPriority,Qn=e.unstable_NormalPriority,ri=e.unstable_LowPriority,Xn=e.unstable_IdlePriority,Mo=e.log,Rr=e.unstable_setDisableYieldValue,gs=null,Pt=null;function xn(n){if(typeof Mo=="function"&&Rr(n),Pt&&typeof Pt.setStrictMode=="function")try{Pt.setStrictMode(gs,n)}catch{}}var Dt=Math.clz32?Math.clz32:zn,Kc=Math.log,si=Math.LN2;function zn(n){return n>>>=0,n===0?32:31-(Kc(n)/si|0)|0}var Zs=256,Ws=262144,ys=4194304;function Pn(n){var s=n&42;if(s!==0)return s;switch(n&-n){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 n&261888;case 262144:case 524288:case 1048576:case 2097152:return n&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return n&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return n}}function be(n,s,i){var l=n.pendingLanes;if(l===0)return 0;var d=0,h=n.suspendedLanes,v=n.pingedLanes;n=n.warmLanes;var S=l&134217727;return S!==0?(l=S&~h,l!==0?d=Pn(l):(v&=S,v!==0?d=Pn(v):i||(i=S&~n,i!==0&&(d=Pn(i))))):(S=l&~h,S!==0?d=Pn(S):v!==0?d=Pn(v):i||(i=l&~n,i!==0&&(d=Pn(i)))),d===0?0:s!==0&&s!==d&&(s&h)===0&&(h=d&-d,i=s&-s,h>=i||h===32&&(i&4194048)!==0)?s:d}function Je(n,s){return(n.pendingLanes&~(n.suspendedLanes&~n.pingedLanes)&s)===0}function _t(n,s){switch(n){case 1:case 2:case 4:case 8:case 64:return s+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 s+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 Lt(){var n=ys;return ys<<=1,(ys&62914560)===0&&(ys=4194304),n}function xr(n){for(var s=[],i=0;31>i;i++)s.push(n);return s}function Ze(n,s){n.pendingLanes|=s,s!==268435456&&(n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0)}function Ht(n,s,i,l,d,h){var v=n.pendingLanes;n.pendingLanes=i,n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0,n.expiredLanes&=i,n.entangledLanes&=i,n.errorRecoveryDisabledLanes&=i,n.shellSuspendCounter=0;var S=n.entanglements,O=n.expirationTimes,P=n.hiddenUpdates;for(i=v&~i;0<i;){var q=31-Dt(i),Y=1<<q;S[q]=0,O[q]=-1;var B=P[q];if(B!==null)for(P[q]=null,q=0;q<B.length;q++){var I=B[q];I!==null&&(I.lane&=-536870913)}i&=~Y}l!==0&&vs(n,l,0),h!==0&&d===0&&n.tag!==0&&(n.suspendedLanes|=h&~(v&~s))}function vs(n,s,i){n.pendingLanes|=s,n.suspendedLanes&=~s;var l=31-Dt(s);n.entangledLanes|=s,n.entanglements[l]=n.entanglements[l]|1073741824|i&261930}function qt(n,s){var i=n.entangledLanes|=s;for(n=n.entanglements;i;){var l=31-Dt(i),d=1<<l;d&s|n[l]&s&&(n[l]|=s),i&=~d}}function $t(n,s){var i=s&-s;return i=(i&42)!==0?1:ea(i),(i&(n.suspendedLanes|s))!==0?0:i}function ea(n){switch(n){case 2:n=1;break;case 8:n=4;break;case 32:n=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:n=128;break;case 268435456:n=134217728;break;default:n=0}return n}function An(n){return n&=-n,2<n?8<n?(n&134217727)!==0?32:268435456:8:2}function Yc(){var n=F.p;return n!==0?n:(n=window.event,n===void 0?32:ay(n.type))}function _h(n,s){var i=F.p;try{return F.p=n,s()}finally{F.p=i}}var Ar=Math.random().toString(36).slice(2),Ot="__reactFiber$"+Ar,Gt="__reactProps$"+Ar,ta="__reactContainer$"+Ar,Fc="__reactEvents$"+Ar,pw="__reactListeners$"+Ar,mw="__reactHandles$"+Ar,Sh="__reactResources$"+Ar,ai="__reactMarker$"+Ar;function Jc(n){delete n[Ot],delete n[Gt],delete n[Fc],delete n[pw],delete n[mw]}function na(n){var s=n[Ot];if(s)return s;for(var i=n.parentNode;i;){if(s=i[ta]||i[Ot]){if(i=s.alternate,s.child!==null||i!==null&&i.child!==null)for(n=$g(n);n!==null;){if(i=n[Ot])return i;n=$g(n)}return s}n=i,i=n.parentNode}return null}function ra(n){if(n=n[Ot]||n[ta]){var s=n.tag;if(s===5||s===6||s===13||s===31||s===26||s===27||s===3)return n}return null}function ii(n){var s=n.tag;if(s===5||s===26||s===27||s===6)return n.stateNode;throw Error(a(33))}function sa(n){var s=n[Sh];return s||(s=n[Sh]={hoistableStyles:new Map,hoistableScripts:new Map}),s}function St(n){n[ai]=!0}var Eh=new Set,Th={};function bs(n,s){aa(n,s),aa(n+"Capture",s)}function aa(n,s){for(Th[n]=s,n=0;n<s.length;n++)Eh.add(s[n])}var gw=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]*$"),Rh={},xh={};function yw(n){return At.call(xh,n)?!0:At.call(Rh,n)?!1:gw.test(n)?xh[n]=!0:(Rh[n]=!0,!1)}function No(n,s,i){if(yw(s))if(i===null)n.removeAttribute(s);else{switch(typeof i){case"undefined":case"function":case"symbol":n.removeAttribute(s);return;case"boolean":var l=s.toLowerCase().slice(0,5);if(l!=="data-"&&l!=="aria-"){n.removeAttribute(s);return}}n.setAttribute(s,""+i)}}function Do(n,s,i){if(i===null)n.removeAttribute(s);else{switch(typeof i){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(s);return}n.setAttribute(s,""+i)}}function Zn(n,s,i,l){if(l===null)n.removeAttribute(i);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(i);return}n.setAttributeNS(s,i,""+l)}}function pn(n){switch(typeof n){case"bigint":case"boolean":case"number":case"string":case"undefined":return n;case"object":return n;default:return""}}function Ah(n){var s=n.type;return(n=n.nodeName)&&n.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function vw(n,s,i){var l=Object.getOwnPropertyDescriptor(n.constructor.prototype,s);if(!n.hasOwnProperty(s)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var d=l.get,h=l.set;return Object.defineProperty(n,s,{configurable:!0,get:function(){return d.call(this)},set:function(v){i=""+v,h.call(this,v)}}),Object.defineProperty(n,s,{enumerable:l.enumerable}),{getValue:function(){return i},setValue:function(v){i=""+v},stopTracking:function(){n._valueTracker=null,delete n[s]}}}}function Qc(n){if(!n._valueTracker){var s=Ah(n)?"checked":"value";n._valueTracker=vw(n,s,""+n[s])}}function Oh(n){if(!n)return!1;var s=n._valueTracker;if(!s)return!0;var i=s.getValue(),l="";return n&&(l=Ah(n)?n.checked?"true":"false":n.value),n=l,n!==i?(s.setValue(n),!0):!1}
vendor: 4,644 bytes, line 9
9function Lo(n){if(n=n||(typeof document<"u"?document:void 0),typeof n>"u")return null;try{return n.activeElement||n.body}catch{return n.body}}var bw=/[\n"\\]/g;function mn(n){return n.replace(bw,function(s){return"\\"+s.charCodeAt(0).toString(16)+" "})}function Xc(n,s,i,l,d,h,v,S){n.name="",v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"?n.type=v:n.removeAttribute("type"),s!=null?v==="number"?(s===0&&n.value===""||n.value!=s)&&(n.value=""+pn(s)):n.value!==""+pn(s)&&(n.value=""+pn(s)):v!=="submit"&&v!=="reset"||n.removeAttribute("value"),s!=null?Zc(n,v,pn(s)):i!=null?Zc(n,v,pn(i)):l!=null&&n.removeAttribute("value"),d==null&&h!=null&&(n.defaultChecked=!!h),d!=null&&(n.checked=d&&typeof d!="function"&&typeof d!="symbol"),S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"?n.name=""+pn(S):n.removeAttribute("name")}function Ch(n,s,i,l,d,h,v,S){if(h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"&&(n.type=h),s!=null||i!=null){if(!(h!=="submit"&&h!=="reset"||s!=null)){Qc(n);return}i=i!=null?""+pn(i):"",s=s!=null?""+pn(s):i,S||s===n.value||(n.value=s),n.defaultValue=s}l=l??d,l=typeof l!="function"&&typeof l!="symbol"&&!!l,n.checked=S?n.checked:!!l,n.defaultChecked=!!l,v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"&&(n.name=v),Qc(n)}function Zc(n,s,i){s==="number"&&Lo(n.ownerDocument)===n||n.defaultValue===""+i||(n.defaultValue=""+i)}function ia(n,s,i,l){if(n=n.options,s){s={};for(var d=0;d<i.length;d++)s["$"+i[d]]=!0;for(i=0;i<n.length;i++)d=s.hasOwnProperty("$"+n[i].value),n[i].selected!==d&&(n[i].selected=d),d&&l&&(n[i].defaultSelected=!0)}else{for(i=""+pn(i),s=null,d=0;d<n.length;d++){if(n[d].value===i){n[d].selected=!0,l&&(n[d].defaultSelected=!0);return}s!==null||n[d].disabled||(s=n[d])}s!==null&&(s.selected=!0)}}function kh(n,s,i){if(s!=null&&(s=""+pn(s),s!==n.value&&(n.value=s),i==null)){n.defaultValue!==s&&(n.defaultValue=s);return}n.defaultValue=i!=null?""+pn(i):""}function jh(n,s,i,l){if(s==null){if(l!=null){if(i!=null)throw Error(a(92));if(Ae(l)){if(1<l.length)throw Error(a(93));l=l[0]}i=l}i==null&&(i=""),s=i}i=pn(s),n.defaultValue=i,l=n.textContent,l===i&&l!==""&&l!==null&&(n.value=l),Qc(n)}function oa(n,s){if(s){var i=n.firstChild;if(i&&i===n.lastChild&&i.nodeType===3){i.nodeValue=s;return}}n.textContent=s}var ww=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 Mh(n,s,i){var l=s.indexOf("--")===0;i==null||typeof i=="boolean"||i===""?l?n.setProperty(s,""):s==="float"?n.cssFloat="":n[s]="":l?n.setProperty(s,i):typeof i!="number"||i===0||ww.has(s)?s==="float"?n.cssFloat=i:n[s]=(""+i).trim():n[s]=i+"px"}function Nh(n,s,i){if(s!=null&&typeof s!="object")throw Error(a(62));if(n=n.style,i!=null){for(var l in i)!i.hasOwnProperty(l)||s!=null&&s.hasOwnProperty(l)||(l.indexOf("--")===0?n.setProperty(l,""):l==="float"?n.cssFloat="":n[l]="");for(var d in s)l=s[d],s.hasOwnProperty(d)&&i[d]!==l&&Mh(n,d,l)}else for(var h in s)s.hasOwnProperty(h)&&Mh(n,h,s[h])}function Wc(n){if(n.indexOf("-")===-1)return!1;switch(n){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 _w=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"],["colorRen
9dering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),Sw=/^[\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 Uo(n){return Sw.test(""+n)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":n}function Wn(){}var eu=null;function tu(n){return n=n.target||n.srcElement||window,n.correspondingUseElement&&(n=n.correspondingUseElement),n.nodeType===3?n.parentNode:n}var la=null,ca=null;function Dh(n){var s=ra(n);if(s&&(n=s.stateNode)){var i=n[Gt]||null;e:switch(n=s.stateNode,s.type){case"input":if(Xc(n,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name),s=i.name,i.type==="radio"&&s!=null){for(i=n;i.parentNode;)i=i.parentNode;for(i=i.querySelectorAll('input[name="'+mn(""+s)+'"][type="radio"]'),s=0;s<i.length;s++){var l=i[s];if(l!==n&&l.form===n.form){var d=l[Gt]||null;if(!d)throw Error(a(90));Xc(l,d.value,d.defaultValue,d.defaultValue,d.checked,d.defaultChecked,d.type,d.name)}}for(s=0;s<i.length;s++)l=i[s],l.form===n.form&&Oh(l)}break e;case"textarea":kh(n,i.value,i.defaultValue);break e;case"select":s=i.value,s!=null&&ia(n,!!i.multiple,s,!1)}}}var nu=!1;function Lh(n,s,i){if(nu)return n(s,i);nu=!0;try{var l=n(s);return l}finally{if(nu=!1,(la!==null||ca!==null)&&(El(),la&&(s=la,n=ca,ca=la=null,Dh(s),n)))for(s=0;s<n.length;s++)Dh(n[s])}}function oi(n,s){var i=n.stateNode;if(i===null)return null;var l=i[Gt]||null;if(l===null)return null;i=l[s];e:switch(s){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(l=!l.disabled)||(n=n.type,l=!(n==="button"||n==="input"||n==="select"||n==="textarea")),n=!l;break e;default:n=!1}if(n)return null;if(i&&typeof i!="function")throw Error(a(231,s,typeof i));return i}var er=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ru=!1;if(er)try{var li={};Object.defineProperty(li,"passive",{get:function(){ru=!0}}),window.addEventListener("test",li,li),window.removeEventListener("test",li,li)}catch{ru=!1}var Or=null,su=null,zo=null;function Uh(){if(zo)return zo;var n,s=su,i=s.length,l,d="value"in Or?Or.value:Or.textContent,h=d.length;for(n=0;n<i&&s[n]===d[n];n++);var v=i-n;for(l=1;l<=v&&s[i-l]===d[h-l];l++);return zo=d.slice(n,1<l?1-l:void 0)}function Po(n){var s=n.keyCode;return"charCode"in n?(n=n.charCode,n===0&&s===13&&(n=13)):n=s,n===10&&(n=13),32<=n||n===13?n:0}function Bo(){return!0}function zh(){return!1}function Vt(n){function s(i,l,d,h,v){this._reactName=i,this._targetInst=d,this.type=l,this.nativeEvent=h,this.target=v,this.currentTarget=null;
vendor: 2,622 bytes, line 9
9for(var S in n)n.hasOwnProperty(S)&&(i=n[S],this[S]=i?i(h):h[S]);return this.isDefaultPrevented=(h.defaultPrevented!=null?h.defaultPrevented:h.returnValue===!1)?Bo:zh,this.isPropagationStopped=zh,this}return g(s.prototype,{preventDefault:function(){this.defaultPrevented=!0;var i=this.nativeEvent;i&&(i.preventDefault?i.preventDefault():typeof i.returnValue!="unknown"&&(i.returnValue=!1),this.isDefaultPrevented=Bo)},stopPropagation:function(){var i=this.nativeEvent;i&&(i.stopPropagation?i.stopPropagation():typeof i.cancelBubble!="unknown"&&(i.cancelBubble=!0),this.isPropagationStopped=Bo)},persist:function(){},isPersistent:Bo}),s}var ws={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(n){return n.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Io=Vt(ws),ci=g({},ws,{view:0,detail:0}),Ew=Vt(ci),au,iu,ui,Ho=g({},ci,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:lu,button:0,buttons:0,relatedTarget:function(n){return n.relatedTarget===void 0?n.fromElement===n.srcElement?n.toElement:n.fromElement:n.relatedTarget},movementX:function(n){return"movementX"in n?n.movementX:(n!==ui&&(ui&&n.type==="mousemove"?(au=n.screenX-ui.screenX,iu=n.screenY-ui.screenY):iu=au=0,ui=n),au)},movementY:function(n){return"movementY"in n?n.movementY:iu}}),Ph=Vt(Ho),Tw=g({},Ho,{dataTransfer:0}),Rw=Vt(Tw),xw=g({},ci,{relatedTarget:0}),ou=Vt(xw),Aw=g({},ws,{animationName:0,elapsedTime:0,pseudoElement:0}),Ow=Vt(Aw),Cw=g({},ws,{clipboardData:function(n){return"clipboardData"in n?n.clipboardData:window.clipboardData}}),kw=Vt(Cw),jw=g({},ws,{data:0}),Bh=Vt(jw),Mw={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Nw={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"},Dw={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Lw(n){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(n):(n=Dw[n])?!!s[n]:!1}function lu(){return Lw}var Uw=g({},ci,{key:function(n){if(n.key){var s=Mw[n.key]||n.key;if(s!=="Unidentified")return s}return n.type==="keypress"?(n=Po(n),n===13?"Enter":String.fromCharCode(n)):n.type==="
9keydown"||n.type==="keyup"?Nw[n.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:lu,charCode:function(n){return n.type==="keypress"?Po(n):0},keyCode:function(n){return n.type==="keydown"||n.type==="keyup"?n.keyCode:0},which:function(n){return n.type==="keypress"?Po(n):n.type==="keydown"||n.type==="keyup"?n.keyCode:0}}),zw=Vt(Uw),Pw=g({},Ho,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Ih=Vt(Pw),Bw=g({},ci,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:lu}),Iw=Vt(Bw),Hw=g({},ws,{propertyName:0,elapsedTime:0,pseudoElement:0}),qw=Vt(Hw),$w=g({},Ho,{deltaX:function(n){return"deltaX"in n?n.deltaX:"wheelDeltaX"in n?-n.wheelDeltaX:0},deltaY:function(n){return"deltaY"in n?n.deltaY:"wheelDeltaY"in n?-n.wheelDeltaY:"wheelDelta"in n?-n.wheelDelta:0},deltaZ:0,deltaMode:0}),Gw=Vt($w),Vw=g({},ws,{newState:0,oldState:0}),Kw=Vt(Vw),Yw=[9,13,27,32],cu=er&&"CompositionEvent"in window,di=null;er&&"documentMode"in document&&(di=document.documentMode);var Fw=er&&"TextEvent"in window&&!di,Hh=er&&(!cu||di&&8<di&&11>=di),qh=" ",$h=!1;function Gh(n,s){switch(n){case"keyup":return Yw.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Vh(n){return n=n.detail,typeof n=="object"&&"data"in n?n.data:null}var ua=!1;function Jw(n,s){switch(n){case"compositionend":return Vh(s);case"keypress":return s.which!==32?null:($h=!0,qh);case"textInput":return n=s.data,n===qh&&$h?null:n;default:return null}}function Qw(n,s){if(ua)return n==="compositionend"||!cu&&Gh(n,s)?(n=Uh(),zo=su=Or=null,ua=!1,n):null;switch(n){case"paste":return null;case"keypress":if(!(s.ctrlKey||s.altKey||s.metaKey)||s.ctrlKey&&s.altKey){if(s.char&&1<s.char.length)return s.char;if(s.which)return String.fromCharCode(s.which)}return null;case"compositionend":return Hh&&s.locale!=="ko"?null:s.data;default:return null}}var Xw={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 Kh(n){var s=n&&n.nodeName&&n.nodeName.toLowerCase();return s==="input"?!!Xw[n.type]:s==="textarea"}function Yh(n,s,i,l){la?ca?ca.push(l):ca=[l]:la=l,s=kl(s,"onChange"),0<s.length&&(i=new Io("onChange","change",null,i,l),n.push({event:i,listeners:s}))}var fi=null,hi=null;function Zw(n){Cg(n,0)}function qo(n){var s=ii(n);if(Oh(s))return n}function Fh(n,s){if(n==="change")return s}var Jh=!1;if(er){var uu;if(er){var du="oninput"in document;if(!du){var Qh=document.createElement("div");Qh.setAttribute("oninput","return;"),du=typeof Qh.oninput=="function"}uu=du}else uu=!1;Jh=uu&&(!document.documentMode||9<document.documentMode)}function Xh(){fi&&(fi.detachEvent("onpropertychange",Zh),hi=fi=null)}function Zh(n){if(n.propertyName==="value"&&qo(hi)){var s=[];Yh(s,hi,n,tu(n)),Lh(Zw,s)}}function Ww(n,s,i){n==="focusin"?(Xh(),fi=s,hi=i,fi.attachEvent("onpropertychange",Zh)):n==="focusout"&&Xh()}function e_(n){if(n==="selectionchange"||n==="keyup"||n==="keydown")return qo(hi)}
vendor: 16,948 bytes, line 9
9function t_(n,s){if(n==="click")return qo(s)}function n_(n,s){if(n==="input"||n==="change")return qo(s)}function r_(n,s){return n===s&&(n!==0||1/n===1/s)||n!==n&&s!==s}var rn=typeof Object.is=="function"?Object.is:r_;function pi(n,s){if(rn(n,s))return!0;if(typeof n!="object"||n===null||typeof s!="object"||s===null)return!1;var i=Object.keys(n),l=Object.keys(s);if(i.length!==l.length)return!1;for(l=0;l<i.length;l++){var d=i[l];if(!At.call(s,d)||!rn(n[d],s[d]))return!1}return!0}function Wh(n){for(;n&&n.firstChild;)n=n.firstChild;return n}function ep(n,s){var i=Wh(n);n=0;for(var l;i;){if(i.nodeType===3){if(l=n+i.textContent.length,n<=s&&l>=s)return{node:i,offset:s-n};n=l}e:{for(;i;){if(i.nextSibling){i=i.nextSibling;break e}i=i.parentNode}i=void 0}i=Wh(i)}}function tp(n,s){return n&&s?n===s?!0:n&&n.nodeType===3?!1:s&&s.nodeType===3?tp(n,s.parentNode):"contains"in n?n.contains(s):n.compareDocumentPosition?!!(n.compareDocumentPosition(s)&16):!1:!1}function np(n){n=n!=null&&n.ownerDocument!=null&&n.ownerDocument.defaultView!=null?n.ownerDocument.defaultView:window;for(var s=Lo(n.document);s instanceof n.HTMLIFrameElement;){try{var i=typeof s.contentWindow.location.href=="string"}catch{i=!1}if(i)n=s.contentWindow;else break;s=Lo(n.document)}return s}function fu(n){var s=n&&n.nodeName&&n.nodeName.toLowerCase();return s&&(s==="input"&&(n.type==="text"||n.type==="search"||n.type==="tel"||n.type==="url"||n.type==="password")||s==="textarea"||n.contentEditable==="true")}var s_=er&&"documentMode"in document&&11>=document.documentMode,da=null,hu=null,mi=null,pu=!1;function rp(n,s,i){var l=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;pu||da==null||da!==Lo(l)||(l=da,"selectionStart"in l&&fu(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),mi&&pi(mi,l)||(mi=l,l=kl(hu,"onSelect"),0<l.length&&(s=new Io("onSelect","select",null,s,i),n.push({event:s,listeners:l}),s.target=da)))}function _s(n,s){var i={};return i[n.toLowerCase()]=s.toLowerCase(),i["Webkit"+n]="webkit"+s,i["Moz"+n]="moz"+s,i}var fa={animationend:_s("Animation","AnimationEnd"),animationiteration:_s("Animation","AnimationIteration"),animationstart:_s("Animation","AnimationStart"),transitionrun:_s("Transition","TransitionRun"),transitionstart:_s("Transition","TransitionStart"),transitioncancel:_s("Transition","TransitionCancel"),transitionend:_s("Transition","TransitionEnd")},mu={},sp={};er&&(sp=document.createElement("div").style,"AnimationEvent"in window||(delete fa.animationend.animation,delete fa.animationiteration.animation,delete fa.animationstart.animation),"TransitionEvent"in window||delete fa.transitionend.transition);function Ss(n){if(mu[n])return mu[n];if(!fa[n])return n;var s=fa[n],i;for(i in s)if(s.hasOwnProperty(i)&&i in sp)return mu[n]=s[i];return n}var ap=Ss("animationend"),ip=Ss("animationiteration"),op=Ss("animationstart"),a_=Ss("transitionrun"),i_=Ss("transitionstart"),o_=Ss("transitioncancel"),lp=Ss("transitionend"),cp=new Map,gu="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(" ");gu.push("scrollEnd");function On(n,s){cp.set(n,s),bs(s,[n])}var $o=typeof reportError=="function"?reportError:function(n){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var s=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof n=="object"&&n!==null&&typeof n.message=="string"?String(n.message):String(n),error:n});if(!window.dispatchEvent(s))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",n);return}console.error(n)},gn=[],ha=0,yu=0;function Go(){for(var n=ha,s=yu=ha=0;s<n;){var i=gn[s];gn[s++]=null;var l=gn[s];gn[s++]=null;var d=gn[s];gn[s++]=null;var h=gn[s];if(gn[s++]=null,l!==null&&d!==null){var v=l.pending;v===null?d.next=d:(d.next=v.next,v.next=d),l.pending=d}h!==0&&up(i,d,h)}}function Vo(n,s,i,l){gn[ha++]=n,gn[ha++]=s,gn[ha++]=i,gn[ha++]=l,yu|=l,n.lanes|=l,n=n.alternate,n!==null&&(n.lanes|=l)}function vu(n,s,i,l){return Vo(n,s,i,l),Ko(n)}function Es(n,s){return Vo(n,null,null,s),Ko(n)}function up(n,s,i){n.lanes|=i;var l=n.alternate;l!==null&&(l.lanes|=i);for(var d=!1,h=n.return;h!==null;)h.childLanes|=i,l=h.alternate,l!==null&&(l.childLanes|=i),h.tag===22&&(n=h.stateNode,n===null||n._visibility&1||(d=!0)),n=h,h=h.return;return n.tag===3?(h=n.stateNode,d&&s!==null&&(d=31-Dt(i),n=h.hiddenUpdates,l=n[d],l===null?n[d]=[s]:l.push(s),s.lane=i|536870912),h):null}function Ko(n){if(50<zi)throw zi=0,Ad=null,Error(a(185));for(var s=n.return;s!==null;)n=s,s=n.return;return n.tag===3?n.stateNode:null}var pa={};function l_(n,s,i,l){this.tag=n,this.key=i,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=s,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function sn(n,s,i,l){return new l_(n,s,i,l)}function bu(n){return n=n.prototype,!(!n||!n.isReactComponent)}function tr(n,s){var i=n.alternate;return i===null?(i=sn(n.tag,s,n.key,n.mode),i.elementType=n.elementType,i.type=n.type,i.stateNode=n.stateNode,i.alternate=n,n.alternate=i):(i.pendingProps=s,i.type=n.type,i.flags=0,i.subtreeFlags=0,i.deletions=null),i.flags=n.flags&65011712,i.childLanes=n.childLanes,i.lanes=n.lanes,i.child=n.child,i.memoizedProps=n.memoizedProps,i.memoizedState=n.memoizedState,i.updateQueue=n.updateQueue,s=n.dependencies,i.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},i.sibling=n.sibling,i.index=n.index,i.ref=n.ref,i.refCleanup=n.refCleanup,i}function dp(n,s){n.flags&=65011714;var i=n.alternate;return i===null?(n.childLanes=0,n.lanes=s,n.child=null,n.subtreeFlags=0,n.memoizedProps=null,n.memoizedState=null,n.updateQueue=null,n.dependencies=null,n.stateNode=null):(n.childLanes=i.childLanes,n.lanes=i.lanes,n.child=i.child,n.subtreeFlags=0,n.deletions=null,n.memoizedProps=i.memoizedProps,n.memoizedState=i.memoizedState,n.updateQueue=i.updateQueue,n.type=i.type,s=i.dependencies,n.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext}),n}function Yo(n,s,i,l,d,h){var v=0;if(l=n,typeof n=="function")bu(n)&&(v=1);else if(typeof n=="string")v=hS(n,i,W.current)?26:n==="html"||n==="head"||n==="body"?27:5;else e:switch(n){case Q:return n=sn(31,i,s,d),n.elementType=Q,n.lanes=h,n;case x:return Ts(i.children,d,h,s);case E:v=8,d|=24;break;case R:return n=sn(12,i,s,d|2),n.elementType=R,n.lanes=h,n;case X:return n=sn(13,i,s,d),n.elementType=X,n.lanes=h,n;case G:return n=sn(19,i,s,d),n.elementType=G,n.lanes=h,n;default:if(typeof n=="object"&&n!==null)switch(n.$$typeof){case j:v=10;break e;case M:v=9;break e;case L:v=11;break e;case H:v=14;break e;case U:v=16,l=null;break e}v=29,i=Error(a(130,n===null?"null":typeof n,"")),l=null}return s=sn(v,i,s,d),s.elementType=n,s.type=l,s.lanes=h,s}function Ts(n,s,i,l){return n=sn(7,n,l,s),n.lanes=i,n}function wu(n,s,i){return n=sn(6,n,null,s),n.lanes=i,n}function fp(n){var s=sn(18,null,null,0);return s.stateNode=n,s}function _u(n,s,i){return s=sn(4,n.children!==null?n.children:[],n.key,s),s.lanes=i,s.stateNode={containerInfo:n.containerInfo,pendingChildren:null,implementation:n.implementation},s}var hp=new WeakMap;function yn(n,s){if(typeof n=="object"&&n!==null){var i=hp.get(n);return i!==void 0?i:(s={value:n,source:s,stack:fn(s)},hp.set(n,s),s)}return{value:n,source:s,stack:fn(s)}}var ma=[],ga=0,Fo=null,gi=0,vn=[],bn=0,Cr=null,Bn=1,In="";function nr(n,s){ma[ga++]=gi,ma[ga++]=Fo,Fo=n,gi=s}function pp(n,s,i){vn[bn++]=Bn,vn[bn++]=In,vn[bn++]=Cr,Cr=n;var l=Bn;n=In;var d=32-Dt(l)-1;l&=~(1<<d),i+=1;var h=32-Dt(s)+d;if(30<h){var v=d-d%5;h=(l&(1<<v)-1).toString(32),l>>=v,d-=v,Bn=1<<32-Dt(s)+d|i<<d|l,In=h+n}else Bn=1<<h|i<<d|l,In=n}function Su(n){n.return!==null&&(nr(n,1),pp(n,1,0))}function Eu(n){for(;n===Fo;)Fo=ma[--ga],ma[ga]=null,gi=ma[--ga],ma[ga]=null;for(;n===Cr;)Cr=vn[--bn],vn[bn]=null,In=vn[--bn],vn[bn]=null,Bn=vn[--bn],vn[bn]=null}function mp(n,s){vn[bn++]=Bn,vn[bn++]=In,vn[bn++]=Cr,Bn=s.id,In=s.overflow,Cr=n}var Ct=null,Ye=null,Me=!1,kr=null,wn=!1,Tu=Error(a(519));function jr(n){var s=Error(a(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw yi(yn(s,n)),Tu}function gp(n){var s=n.stateNode,i=n.type,l=n.memoizedProps;switch(s[Ot]=n,s[Gt]=l,i){case"dialog":Ce("cancel",s),Ce("close",s);break;case"iframe":case"object":case"embed":Ce("load",s);break;case"video":case"audio":for(i=0;i<Bi.length;i++)Ce(Bi[i],s);break;case"source":Ce("error",s);break;case"img":case"image":case"link":Ce("error",s),Ce("load",s);break;case"details":Ce("toggle",s);break;case"input":Ce("invalid",s),Ch(s,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0);break;case"select":Ce("invalid",s);break;case"textarea":Ce("invalid",s),jh(s,l.value,l.defaultValue,l.children)}i=l.children,typeof i!="string"&&typeof i!="number"&&typeof i!="bigint"||s.textContent===""+i||l.suppressHydrationWarning===!0||Ng(s.textContent,i)?(l.popover!=null&&(Ce("beforetoggle",s),Ce("toggle",s)),l.onScroll!=null&&Ce("scroll",s),l.onScrollEnd!=null&&Ce("scrollend",s),l.onClick!=null&&(s.onclick=Wn),s=!0):s=!1,s||jr(n,!0)}function yp(n){for(Ct=n.return;Ct;)switch(Ct.tag){case 5:case 31:case 13:wn=!1;return;case 27:case 3:wn=!0;return;default:Ct=Ct.return}}function ya(n){if(n!==Ct)return!1;if(!Me)return yp(n),Me=!0,!1;var s=n.tag,i;if((i=s!==3&&s!==27)&&((i=s===5)&&(i=n.type,i=!(i!=="form"&&i!=="button")||qd(n.type,n.memoizedProps)),i=!i),i&&Ye&&jr(n),yp(n),s===13){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(a(317));Ye=qg(n)}else if(s===31){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(a(317));Ye=qg(n)}else s===27?(s=Ye,Vr(n.type)?(n=Yd,Yd=null,Ye=n):Ye=s):Ye=Ct?Sn(n.stateNode.nextSibling):null;return!0}function Rs(){Ye=Ct=null,Me=!1}function Ru(){var n=kr;return n!==null&&(Jt===null?Jt=n:Jt.push.apply(Jt,n),kr=null),n}function yi(n){kr===null?kr=[n]:kr.push(n)}var xu=C(null),xs=null,rr=null;function Mr(n,s,i){K(xu,s._currentValue),s._currentValue=i}function sr(n){n._currentValue=xu.current,$(xu)}function Au(n,s,i){for(;n!==null;){var l=n.alternate;if((n.childLanes&s)!==s?(n.childLanes|=s,l!==null&&(l.childLanes|=s)):l!==null&&(l.childLanes&s)!==s&&(l.childLanes|=s),n===i)break;n=n.return}}function Ou(n,s,i,l){var d=n.child;for(d!==null&&(d.return=n);d!==null;){var h=d.dependencies;if(h!==null){var v=d.child;h=h.firstContext;e:for(;h!==null;){var S=h;h=d;for(var O=0;O<s.length;O++)if(S.context===s[O]){h.lanes|=i,S=h.alternate,S!==null&&(S.lanes|=i),Au(h.return,i,n),l||(v=null);break e}h=S.next}}else if(d.tag===18){if(v=d.return,v===null)throw Error(a(341));v.lanes|=i,h=v.alternate,h!==null&&(h.lanes|=i),Au(v,i,n),v=null}else v=d.child;if(v!==null)v.return=d;else for(v=d;v!==null;){if(v===n){v=null;break}if(d=v.sibling,d!==null){d.return=v.return,v=d;break}v=v.return}d=v}}function va(n,s,i,l){n=null;for(var d=s,h=!1;d!==null;){if(!h){if((d.flags&524288)!==0)h=!0;else if((d.flags&262144)!==0)break}if(d.tag===10){var v=d.alternate;if(v===null)throw Error(a(387));if(v=v.memoizedProps,v!==null){var S=d.type;rn(d.pendingProps.value,v.value)||(n!==null?n.push(S):n=[S])}}else if(d===we.current){if(v=d.alternate,v===null)throw Error(a(387));v.memoizedState.memoizedState!==d.memoizedState.memoizedState&&(n!==null?n.push(Gi):n=[Gi])}d=d.return}n!==null&&Ou(s,n,i,l),s.flags|=262144}function Jo(n){for(n=n.firstContext;n!==null;){if(!rn(n.context._currentValue,n.memoizedValue))return!0;n=n.next}return!1}function As(n){xs=n,rr=null,n=n.dependencies,n!==null&&(n.firstContext=null)}function kt(n){return vp(xs,n)}function Qo(n,s){return xs===null&&As(n),vp(n,s)}function vp(n,s){var i=s._currentValue;if(s={context:s,memoizedValue:i,next:null},rr===null){if(n===null)throw Error(a(308));rr=s,n.dependencies={lanes:0,firstContext:s},n.flags|=524288}else rr=rr.next=s;return i}var c_=typeof AbortController<"u"?AbortController:function(){var n=[],s=this.signal={aborted:!1,addEventListener:function(i,l){n.push(l)}};this.abort=function(){s.aborted=!0,n.forEach(function(i){return i()})}},u_=e.unstable_scheduleCallback,d_=e.unstable_NormalPriority,it={$$typeof:j,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Cu(){return{controller:new c_,data:new Map,refCount:0}}function vi(n){n.refCount--,n.refCount===0&&u_(d_,function(){n.controller.abort()})}var bi=null,ku=0,ba=0,wa=null;function f_(n,s){if(bi===null){var i=bi=[];ku=0,ba=Nd(),wa={status:"pending",value:void 0,then:function(l){i.push(l)}}}return ku++,s.then(bp,bp),s}function bp(){if(--ku===0&&bi!==null){wa!==null&&(wa.status="fulfilled");var n=bi;bi=null,ba=0,wa=null;for(var s=0;s<n.length;s++)(0,n[s])()}}function h_(n,s){var i=[],l={status:"pending",value:null,reason:null,then:function(d){i.push(d)}};return n.then(function(){l.status="fulfilled",l.value=s;for(var d=0;d<i.length;d++)(0,i[d])(s)},function(d){for(l.status="rejected",l.reason=d,d=0;d<i.length;d++)(0,i[d])(void 0)}),l}var wp=D.S;D.S=function(n,s){rg=wt(),typeof s=="object"&&s!==null&&typeof s.then=="function"&&f_(n,s),wp!==null&&wp(n,s)};var Os=C(null);function ju(){var n=Os.current;return n!==null?n:Ge.pooledCache}function Xo(n,s){s===null?K(Os,Os.current):K(Os,s.pool)}function _p(){var n=ju();return n===null?null:{parent:it._currentValue,pool:n}}var _a=Error(a(460)),Mu=Error(a(474)),Zo=Error(a(542)),Wo={then:function(){}};function Sp(n){return n=n.status,n==="fulfilled"||n==="rejected"}function Ep(n,s,i){switch(i=n[i],i===void 0?n.push(s):i!==s&&(s.then(Wn,Wn),s=i),s.status){case"fulfilled":return s.value;case"rejected":throw n=s.reason,Rp(n),n;default:if(typeof s.status=="string")s.then(Wn,Wn);else{if(n=Ge,n!==null&&100<n.shellSuspendCounter)throw Error(a(482));n=s,n.status="pending",n.then(function(l){if(s.status==="pending"){var d=s;d.status="fulfilled",d.value=l}},function(l){if(s.status==="pending"){var d=s;d.status="rejected",d.reason=l}})}switch(s.status){case"fulfilled":return s.value;case"rejected":throw n=s.reason,Rp(n),n}throw ks=s,_a}}function Cs(n){try{var s=n._init;return s(n._payload)}catch(i){throw i!==null&&typeof i=="object"&&typeof i.then=="function"?(ks=i,_a):i}}var ks=null;function Tp(){if(ks===null)throw Error(a(459));var n=ks;return ks=null,n}function Rp(n){if(n===_a||n===Zo)throw Error(a(483))}var Sa=null,wi=0;function el(n){var s=wi;return wi+=1,Sa===null&&(Sa=[]),Ep(Sa,n,s)}function _i(n,s){s=s.props.ref,n.ref=s!==void 0?s:null}function tl(n,s){throw s.$$typeof===b?Error(a(525)):(n=Object.prototype.toString.call(s),Error(a(31,n==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":n)))}function xp(n){function s(N,k){if(n){var z=N.deletions;z===null?(N.deletions=[k],N.flags|=16):z.push(k)}}function i(N,k){if(!n)return null;for(;k!==null;)s(N,k),k=k.sibling;return null}function l(N){for(var k=new Map;N!==null;)N.key!==null?k.set(N.key,N):k.set(N.index,N),N=N.sibling;return k}function d(N,k){return N=tr(N,k),N.index=0,N.sibling=null,N}function h(N,k,z){return N.index=z,n?(z=N.alternate,z!==null?(z=z.index,z<k?(N.flags|=67108866,k):z):(N.flags|=67108866,k)):(N.flags|=1048576,k)}function v(N){return n&&N.alternate===null&&(N.flags|=67108866),N}function S(N,k,z,V){return k===null||k.tag!==6?(k=wu(z,N.mode,V),k.return=N,k):(k=d(k,z),k.return=N,k)}function O(N,k,z,V){var he=z.type;return he===x?q(N,k,z.props.children,V,z.key):k!==null&&(k.elementType===he||typeof he=="object"&&he!==null&&he.$$typeof===U&&Cs(he)===k.type)?(k=d(k,z.props),_i(k,z),k.return=N,k):(k=Yo(z.type,z.key,z.props,null,N.mode,V),_i(k,z),k.return=N,k)}function P(N,k,z,V){return k===null||k.tag!==4||k.stateNode.containerInfo!==z.containerInfo||k.stateNode.implementation!==z.implementation?(k=_u(z,N.mode,V),k.return=N,k):(k=d(k,z.children||[]),k.return=N,k)}function q(N,k,z,V,he){return k===null||k.tag!==7?(k=Ts(z,N.mode,V,he),k.return=N,k):(k=d(k,z),k.return=N,k)}function Y(N,k,z){if(typeof k=="string"&&k!==""||typeof k=="number"||typeof k=="bigint")return k=wu(""+k,N.mode,z),k.return=N,k;if(typeof k=="object"&&k!==null){switch(k.$$typeof){case w:return z=Yo(k.type,k.key,k.props,null,N.mode,z),_i(z,k),z.return=N,z;
vendor: 7,121 bytes, line 9
9case _:return k=_u(k,N.mode,z),k.return=N,k;case U:return k=Cs(k),Y(N,k,z)}if(Ae(k)||ve(k))return k=Ts(k,N.mode,z,null),k.return=N,k;if(typeof k.then=="function")return Y(N,el(k),z);if(k.$$typeof===j)return Y(N,Qo(N,k),z);tl(N,k)}return null}function B(N,k,z,V){var he=k!==null?k.key:null;if(typeof z=="string"&&z!==""||typeof z=="number"||typeof z=="bigint")return he!==null?null:S(N,k,""+z,V);if(typeof z=="object"&&z!==null){switch(z.$$typeof){case w:return z.key===he?O(N,k,z,V):null;case _:return z.key===he?P(N,k,z,V):null;case U:return z=Cs(z),B(N,k,z,V)}if(Ae(z)||ve(z))return he!==null?null:q(N,k,z,V,null);if(typeof z.then=="function")return B(N,k,el(z),V);if(z.$$typeof===j)return B(N,k,Qo(N,z),V);tl(N,z)}return null}function I(N,k,z,V,he){if(typeof V=="string"&&V!==""||typeof V=="number"||typeof V=="bigint")return N=N.get(z)||null,S(k,N,""+V,he);if(typeof V=="object"&&V!==null){switch(V.$$typeof){case w:return N=N.get(V.key===null?z:V.key)||null,O(k,N,V,he);case _:return N=N.get(V.key===null?z:V.key)||null,P(k,N,V,he);case U:return V=Cs(V),I(N,k,z,V,he)}if(Ae(V)||ve(V))return N=N.get(z)||null,q(k,N,V,he,null);if(typeof V.then=="function")return I(N,k,z,el(V),he);if(V.$$typeof===j)return I(N,k,z,Qo(k,V),he);tl(k,V)}return null}function oe(N,k,z,V){for(var he=null,Ne=null,de=k,Re=k=0,je=null;de!==null&&Re<z.length;Re++){de.index>Re?(je=de,de=null):je=de.sibling;var De=B(N,de,z[Re],V);if(De===null){de===null&&(de=je);break}n&&de&&De.alternate===null&&s(N,de),k=h(De,k,Re),Ne===null?he=De:Ne.sibling=De,Ne=De,de=je}if(Re===z.length)return i(N,de),Me&&nr(N,Re),he;if(de===null){for(;Re<z.length;Re++)de=Y(N,z[Re],V),de!==null&&(k=h(de,k,Re),Ne===null?he=de:Ne.sibling=de,Ne=de);return Me&&nr(N,Re),he}for(de=l(de);Re<z.length;Re++)je=I(de,N,Re,z[Re],V),je!==null&&(n&&je.alternate!==null&&de.delete(je.key===null?Re:je.key),k=h(je,k,Re),Ne===null?he=je:Ne.sibling=je,Ne=je);return n&&de.forEach(function(Qr){return s(N,Qr)}),Me&&nr(N,Re),he}function me(N,k,z,V){if(z==null)throw Error(a(151));for(var he=null,Ne=null,de=k,Re=k=0,je=null,De=z.next();de!==null&&!De.done;Re++,De=z.next()){de.index>Re?(je=de,de=null):je=de.sibling;var Qr=B(N,de,De.value,V);if(Qr===null){de===null&&(de=je);break}n&&de&&Qr.alternate===null&&s(N,de),k=h(Qr,k,Re),Ne===null?he=Qr:Ne.sibling=Qr,Ne=Qr,de=je}if(De.done)return i(N,de),Me&&nr(N,Re),he;if(de===null){for(;!De.done;Re++,De=z.next())De=Y(N,De.value,V),De!==null&&(k=h(De,k,Re),Ne===null?he=De:Ne.sibling=De,Ne=De);return Me&&nr(N,Re),he}for(de=l(de);!De.done;Re++,De=z.next())De=I(de,N,Re,De.value,V),De!==null&&(n&&De.alternate!==null&&de.delete(De.key===null?Re:De.key),k=h(De,k,Re),Ne===null?he=De:Ne.sibling=De,Ne=De);return n&&de.forEach(function(TS){return s(N,TS)}),Me&&nr(N,Re),he}function $e(N,k,z,V){if(typeof z=="object"&&z!==null&&z.type===x&&z.key===null&&(z=z.props.children),typeof z=="object"&&z!==null){switch(z.$$typeof){case w:e:{for(var he=z.key;k!==null;){if(k.key===he){if(he=z.type,he===x){if(k.tag===7){i(N,k.sibling),V=d(k,z.props.children),V.return=N,N=V;break e}}else if(k.elementType===he||typeof he=="object"&&he!==null&&he.$$typeof===U&&Cs(he)===k.type){i(N,k.sibling),V=d(k,z.props),_i(V,z),V.return=N,N=V;break e}i(N,k);break}else s(N,k);k=k.sibling}z.type===x?(V=Ts(z.props.children,N.mode,V,z.key),V.return=N,N=V):(V=Yo(z.type,z.key,z.props,null,N.mode,V),_i(V,z),V.return=N,N=V)}return v(N);case _:e:{for(he=z.key;k!==null;){if(k.key===he)if(k.tag===4&&k.stateNode.containerInfo===z.containerInfo&&k.stateNode.implementation===z.implementation){i(N,k.sibling),V=d(k,z.children||[]),V.return=N,N=V;break e}else{i(N,k);break}else s(N,k);k=k.sibling}V=_u(z,N.mode,V),V.return=N,N=V}return v(N);case U:return z=Cs(z),$e(N,k,z,V)}if(Ae(z))return oe(N,k,z,V);if(ve(z)){if(he=ve(z),typeof he!="function")throw Error(a(150));return z=he.call(z),me(N,k,z,V)}if(typeof z.then=="function")return $e(N,k,el(z),V);if(z.$$typeof===j)return $e(N,k,Qo(N,z),V);tl(N,z)}return typeof z=="string"&&z!==""||typeof z=="number"||typeof z=="bigint"?(z=""+z,k!==null&&k.tag===6?(i(N,k.sibling),V=d(k,z),V.return=N,N=V):(i(N,k),V=wu(z,N.mode,V),V.return=N,N=V),v(N)):i(N,k)}return function(N,k,z,V){try{wi=0;var he=$e(N,k,z,V);return Sa=null,he}catch(de){if(de===_a||de===Zo)throw de;var Ne=sn(29,de,null,N.mode);return Ne.lanes=V,Ne.return=N,Ne}}}var js=xp(!0),Ap=xp(!1),Nr=!1;function Nu(n){n.updateQueue={baseState:n.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Du(n,s){n=n.updateQueue,s.updateQueue===n&&(s.updateQueue={baseState:n.baseState,firstBaseUpdate:n.firstBaseUpdate,lastBaseUpdate:n.lastBaseUpdate,shared:n.shared,callbacks:null})}function Dr(n){return{lane:n,tag:0,payload:null,callback:null,next:null}}function Lr(n,s,i){var l=n.updateQueue;if(l===null)return null;if(l=l.shared,(Ue&2)!==0){var d=l.pending;return d===null?s.next=s:(s.next=d.next,d.next=s),l.pending=s,s=Ko(n),up(n,null,i),s}return Vo(n,l,s,i),Ko(n)}function Si(n,s,i){if(s=s.updateQueue,s!==null&&(s=s.shared,(i&4194048)!==0)){var l=s.lanes;l&=n.pendingLanes,i|=l,s.lanes=i,qt(n,i)}}function Lu(n,s){var i=n.updateQueue,l=n.alternate;if(l!==null&&(l=l.updateQueue,i===l)){var d=null,h=null;if(i=i.firstBaseUpdate,i!==null){do{var v={lane:i.lane,tag:i.tag,payload:i.payload,callback:null,next:null};h===null?d=h=v:h=h.next=v,i=i.next}while(i!==null);h===null?d=h=s:h=h.next=s}else d=h=s;i={baseState:l.baseState,firstBaseUpdate:d,lastBaseUpdate:h,shared:l.shared,callbacks:l.callbacks},n.updateQueue=i;return}n=i.lastBaseUpdate,n===null?i.firstBaseUpdate=s:n.next=s,i.lastBaseUpdate=s}var Uu=!1;function Ei(){if(Uu){var n=wa;if(n!==null)throw n}}function Ti(n,s,i,l){Uu=!1;var d=n.updateQueue;Nr=!1;var h=d.firstBaseUpdate,v=d.lastBaseUpdate,S=d.shared.pending;if(S!==null){d.shared.pending=null;var O=S,P=O.next;O.next=null,v===null?h=P:v.next=P,v=O;var q=n.alternate;q!==null&&(q=q.updateQueue,S=q.lastBaseUpdate,S!==v&&(S===null?q.firstBaseUpdate=P:S.next=P,q.lastBaseUpdate=O))}if(h!==null){var Y=d.baseState;v=0,q=P=O=null,S=h;do{var B=S.lane&-536870913,I=B!==S.lane;if(I?(ke&B)===B:(l&B)===B){B!==0&&B===ba&&(Uu=!0),q!==null&&(q=q.next={lane:0,tag:S.tag,payload:S.payload,callback:null,next:null});e:{var oe=n,me=S;B=s;var $e=i;switch(me.tag){case 1:if(oe=me.payload,typeof oe=="function"){Y=oe.call($e,Y,B);break e}Y=oe;break e;case 3:oe.flags=oe.flags&-65537|128;case 0:if(oe=me.payload,B=typeof oe=="function"?oe.call($e,Y,B):oe,B==null)break e;Y=g({},Y,B);break e;case 2:Nr=!0}}B=S.callback,B!==null&&(n.flags|=64,I&&(n.flags|=8192),I=d.callbacks,I===null?d.callbacks=[B]:I.push(B))}else I={lane:B,tag:S.tag,payload:S.payload,callback:S.callback,next:null},q===null?(P=q=I,O=Y):q=q.next=I,v|=B;if(S=S.next,S===null){if(S=d.shared.pending,S===null)break;I=S,S=I.next,I.next=null,d.lastBaseUpdate=I,d.shared.pending=null}}while(!0);q===null&&(O=Y),d.baseState=O,d.firstBaseUpdate=P,d.lastBaseUpdate=q,h===null&&(d.shared.lanes=0),Ir|=v,n.lanes=v,n.memoizedState=Y}}function Op(n,s){if(typeof n!="function")throw Error(a(191,n));n.call(s)}function Cp(n,s){var i=n.callbacks;
vendor: 4,963 bytes, line 9
9if(i!==null)for(n.callbacks=null,n=0;n<i.length;n++)Op(i[n],s)}var Ea=C(null),nl=C(0);function kp(n,s){n=hr,K(nl,n),K(Ea,s),hr=n|s.baseLanes}function zu(){K(nl,hr),K(Ea,Ea.current)}function Pu(){hr=nl.current,$(Ea),$(nl)}var an=C(null),_n=null;function Ur(n){var s=n.alternate;K(rt,rt.current&1),K(an,n),_n===null&&(s===null||Ea.current!==null||s.memoizedState!==null)&&(_n=n)}function Bu(n){K(rt,rt.current),K(an,n),_n===null&&(_n=n)}function jp(n){n.tag===22?(K(rt,rt.current),K(an,n),_n===null&&(_n=n)):zr()}function zr(){K(rt,rt.current),K(an,an.current)}function on(n){$(an),_n===n&&(_n=null),$(rt)}var rt=C(0);function rl(n){for(var s=n;s!==null;){if(s.tag===13){var i=s.memoizedState;if(i!==null&&(i=i.dehydrated,i===null||Vd(i)||Kd(i)))return s}else if(s.tag===19&&(s.memoizedProps.revealOrder==="forwards"||s.memoizedProps.revealOrder==="backwards"||s.memoizedProps.revealOrder==="unstable_legacy-backwards"||s.memoizedProps.revealOrder==="together")){if((s.flags&128)!==0)return s}else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===n)break;for(;s.sibling===null;){if(s.return===null||s.return===n)return null;s=s.return}s.sibling.return=s.return,s=s.sibling}return null}var ar=0,Te=null,He=null,ot=null,sl=!1,Ta=!1,Ms=!1,al=0,Ri=0,Ra=null,p_=0;function et(){throw Error(a(321))}function Iu(n,s){if(s===null)return!1;for(var i=0;i<s.length&&i<n.length;i++)if(!rn(n[i],s[i]))return!1;return!0}function Hu(n,s,i,l,d,h){return ar=h,Te=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,D.H=n===null||n.memoizedState===null?pm:nd,Ms=!1,h=i(l,d),Ms=!1,Ta&&(h=Np(s,i,l,d)),Mp(n),h}function Mp(n){D.H=Oi;var s=He!==null&&He.next!==null;if(ar=0,ot=He=Te=null,sl=!1,Ri=0,Ra=null,s)throw Error(a(300));n===null||lt||(n=n.dependencies,n!==null&&Jo(n)&&(lt=!0))}function Np(n,s,i,l){Te=n;var d=0;do{if(Ta&&(Ra=null),Ri=0,Ta=!1,25<=d)throw Error(a(301));if(d+=1,ot=He=null,n.updateQueue!=null){var h=n.updateQueue;h.lastEffect=null,h.events=null,h.stores=null,h.memoCache!=null&&(h.memoCache.index=0)}D.H=mm,h=s(i,l)}while(Ta);return h}function m_(){var n=D.H,s=n.useState()[0];return s=typeof s.then=="function"?xi(s):s,n=n.useState()[0],(He!==null?He.memoizedState:null)!==n&&(Te.flags|=1024),s}function qu(){var n=al!==0;return al=0,n}function $u(n,s,i){s.updateQueue=n.updateQueue,s.flags&=-2053,n.lanes&=~i}function Gu(n){if(sl){for(n=n.memoizedState;n!==null;){var s=n.queue;s!==null&&(s.pending=null),n=n.next}sl=!1}ar=0,ot=He=Te=null,Ta=!1,Ri=al=0,Ra=null}function Bt(){var n={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ot===null?Te.memoizedState=ot=n:ot=ot.next=n,ot}function st(){if(He===null){var n=Te.alternate;n=n!==null?n.memoizedState:null}else n=He.next;var s=ot===null?Te.memoizedState:ot.next;if(s!==null)ot=s,He=n;else{if(n===null)throw Te.alternate===null?Error(a(467)):Error(a(310));He=n,n={memoizedState:He.memoizedState,baseState:He.baseState,baseQueue:He.baseQueue,queue:He.queue,next:null},ot===null?Te.memoizedState=ot=n:ot=ot.next=n}return ot}function il(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function xi(n){var s=Ri;return Ri+=1,Ra===null&&(Ra=[]),n=Ep(Ra,n,s),s=Te,(ot===null?s.memoizedState:ot.next)===null&&(s=s.alternate,D.H=s===null||s.memoizedState===null?pm:nd),n}function ol(n){if(n!==null&&typeof n=="object"){if(typeof n.then=="function")return xi(n);if(n.$$typeof===j)return kt(n)}throw Error(a(438,String(n)))}function Vu(n){var s=null,i=Te.updateQueue;if(i!==null&&(s=i.memoCache),s==null){var l=Te.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(s={data:l.data.map(function(d){return d.slice()}),index:0})))}if(s==null&&(s={data:[],index:0}),i===null&&(i=il(),Te.updateQueue=i),i.memoCache=s,i=s.data[s.index],i===void 0)for(i=s.data[s.index]=Array(n),l=0;l<n;l++)i[l]=fe;return s.index++,i}function ir(n,s){return typeof s=="function"?s(n):s}function ll(n){var s=st();return Ku(s,He,n)}function Ku(n,s,i){var l=n.queue;if(l===null)throw Error(a(311));l.lastRenderedReducer=i;var d=n.baseQueue,h=l.pending;if(h!==null){if(d!==null){var v=d.next;d.next=h.next,h.next=v}s.baseQueue=d=h,l.pending=null}if(h=n.baseState,d===null)n.memoizedState=h;else{s=d.next;var S=v=null,O=null,P=s,q=!1;do{var Y=P.lane&-536870913;if(Y!==P.lane?(ke&Y)===Y:(ar&Y)===Y){var B=P.revertLane;if(B===0)O!==null&&(O=O.next={lane:0,revertLane:0,gesture:null,action:P.action,hasEagerState:P.hasEagerState,eagerState:P.eagerState,next:null}),Y===ba&&(q=!0);else if((ar&B)===B){P=P.next,B===ba&&(q=!0);continue}else Y={lane:0,revertLane:P.revertLane,gesture:null,action:P.action,hasEagerState:P.hasEagerState,eagerState:P.eagerState,next:null},O===null?(S=O=Y,v=h):O=O.next=Y,Te.lanes|=B,Ir|=B;Y=P.action,Ms&&i(h,Y),h=P.hasEagerState?P.eagerState:i(h,Y)}else B={lane:Y,revertLane:P.revertLane,gesture:P.gesture,action:P.action,hasEagerState:P.hasEagerState,eagerState:P.eagerState,next:null},O===null?(S=O=B,v=h):O=O.next=B,Te.lanes|=Y,Ir|=Y;P=P.next}
vendor: 3,517 bytes, line 9
9while(P!==null&&P!==s);if(O===null?v=h:O.next=S,!rn(h,n.memoizedState)&&(lt=!0,q&&(i=wa,i!==null)))throw i;n.memoizedState=h,n.baseState=v,n.baseQueue=O,l.lastRenderedState=h}return d===null&&(l.lanes=0),[n.memoizedState,l.dispatch]}function Yu(n){var s=st(),i=s.queue;if(i===null)throw Error(a(311));i.lastRenderedReducer=n;var l=i.dispatch,d=i.pending,h=s.memoizedState;if(d!==null){i.pending=null;var v=d=d.next;do h=n(h,v.action),v=v.next;while(v!==d);rn(h,s.memoizedState)||(lt=!0),s.memoizedState=h,s.baseQueue===null&&(s.baseState=h),i.lastRenderedState=h}return[h,l]}function Dp(n,s,i){var l=Te,d=st(),h=Me;if(h){if(i===void 0)throw Error(a(407));i=i()}else i=s();var v=!rn((He||d).memoizedState,i);if(v&&(d.memoizedState=i,lt=!0),d=d.queue,Qu(zp.bind(null,l,d,n),[n]),d.getSnapshot!==s||v||ot!==null&&ot.memoizedState.tag&1){if(l.flags|=2048,xa(9,{destroy:void 0},Up.bind(null,l,d,i,s),null),Ge===null)throw Error(a(349));h||(ar&127)!==0||Lp(l,s,i)}return i}function Lp(n,s,i){n.flags|=16384,n={getSnapshot:s,value:i},s=Te.updateQueue,s===null?(s=il(),Te.updateQueue=s,s.stores=[n]):(i=s.stores,i===null?s.stores=[n]:i.push(n))}function Up(n,s,i,l){s.value=i,s.getSnapshot=l,Pp(s)&&Bp(n)}function zp(n,s,i){return i(function(){Pp(s)&&Bp(n)})}function Pp(n){var s=n.getSnapshot;n=n.value;try{var i=s();return!rn(n,i)}catch{return!0}}function Bp(n){var s=Es(n,2);s!==null&&Qt(s,n,2)}function Fu(n){var s=Bt();if(typeof n=="function"){var i=n;if(n=i(),Ms){xn(!0);try{i()}finally{xn(!1)}}}return s.memoizedState=s.baseState=n,s.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ir,lastRenderedState:n},s}function Ip(n,s,i,l){return n.baseState=i,Ku(n,He,typeof l=="function"?l:ir)}function g_(n,s,i,l,d){if(dl(n))throw Error(a(485));if(n=s.action,n!==null){var h={payload:d,action:n,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(v){h.listeners.push(v)}};D.T!==null?i(!0):h.isTransition=!1,l(h),i=s.pending,i===null?(h.next=s.pending=h,Hp(s,h)):(h.next=i.next,s.pending=i.next=h)}}function Hp(n,s){var i=s.action,l=s.payload,d=n.state;if(s.isTransition){var h=D.T,v={};D.T=v;try{var S=i(d,l),O=D.S;O!==null&&O(v,S),qp(n,s,S)}catch(P){Ju(n,s,P)}finally{h!==null&&v.types!==null&&(h.types=v.types),D.T=h}}else try{h=i(d,l),qp(n,s,h)}catch(P){Ju(n,s,P)}}function qp(n,s,i){i!==null&&typeof i=="object"&&typeof i.then=="function"?i.then(function(l){$p(n,s,l)},function(l){return Ju(n,s,l)}):$p(n,s,i)}function $p(n,s,i){s.status="fulfilled",s.value=i,Gp(s),n.state=i,s=n.pending,s!==null&&(i=s.next,i===s?n.pending=null:(i=i.next,s.next=i,Hp(n,i)))}function Ju(n,s,i){var l=n.pending;if(n.pending=null,l!==null){l=l.next;do s.status="rejected",s.reason=i,Gp(s),s=s.next;while(s!==l)}n.action=null}function Gp(n){n=n.listeners;for(var s=0;s<n.length;s++)(0,n[s])()}function Vp(n,s){return s}function Kp(n,s){if(Me){var i=Ge.formState;if(i!==null){e:{var l=Te;if(Me){if(Ye){t:{for(var d=Ye,h=wn;d.nodeType!==8;){if(!h){d=null;break t}if(d=Sn(d.nextSibling),d===null){d=null;break t}}h=d.data,d=h==="F!"||h==="F"?d:null}if(d){Ye=Sn(d.nextSibling),l=d.data==="F!";break e}}jr(l)}l=!1}l&&(s=i[0])}}return i=Bt(),i.memoizedState=i.baseState=s,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Vp,lastRenderedState:s},i.queue=l,i=dm.bind(null,Te,l),l.dispatch=i,l=Fu(!1),h=td.bind(null,Te,!1,l.queue),l=Bt(),d={state:s,dispatch:null,action:n,pending:null},l.queue=d,i=g_.bind(null,Te,d,h,i),d.dispatch=i,l.memoizedState=n,[s,i,!1]}function Yp(n){var s=st();
vendor: 5,991 bytes, line 9
9return Fp(s,He,n)}function Fp(n,s,i){if(s=Ku(n,s,Vp)[0],n=ll(ir)[0],typeof s=="object"&&s!==null&&typeof s.then=="function")try{var l=xi(s)}catch(v){throw v===_a?Zo:v}else l=s;s=st();var d=s.queue,h=d.dispatch;return i!==s.memoizedState&&(Te.flags|=2048,xa(9,{destroy:void 0},y_.bind(null,d,i),null)),[l,h,n]}function y_(n,s){n.action=s}function Jp(n){var s=st(),i=He;if(i!==null)return Fp(s,i,n);st(),s=s.memoizedState,i=st();var l=i.queue.dispatch;return i.memoizedState=n,[s,l,!1]}function xa(n,s,i,l){return n={tag:n,create:i,deps:l,inst:s,next:null},s=Te.updateQueue,s===null&&(s=il(),Te.updateQueue=s),i=s.lastEffect,i===null?s.lastEffect=n.next=n:(l=i.next,i.next=n,n.next=l,s.lastEffect=n),n}function Qp(){return st().memoizedState}function cl(n,s,i,l){var d=Bt();Te.flags|=n,d.memoizedState=xa(1|s,{destroy:void 0},i,l===void 0?null:l)}function ul(n,s,i,l){var d=st();l=l===void 0?null:l;var h=d.memoizedState.inst;He!==null&&l!==null&&Iu(l,He.memoizedState.deps)?d.memoizedState=xa(s,h,i,l):(Te.flags|=n,d.memoizedState=xa(1|s,h,i,l))}function Xp(n,s){cl(8390656,8,n,s)}function Qu(n,s){ul(2048,8,n,s)}function v_(n){Te.flags|=4;var s=Te.updateQueue;if(s===null)s=il(),Te.updateQueue=s,s.events=[n];else{var i=s.events;i===null?s.events=[n]:i.push(n)}}function Zp(n){var s=st().memoizedState;return v_({ref:s,nextImpl:n}),function(){if((Ue&2)!==0)throw Error(a(440));return s.impl.apply(void 0,arguments)}}function Wp(n,s){return ul(4,2,n,s)}function em(n,s){return ul(4,4,n,s)}function tm(n,s){if(typeof s=="function"){n=n();var i=s(n);return function(){typeof i=="function"?i():s(null)}}if(s!=null)return n=n(),s.current=n,function(){s.current=null}}function nm(n,s,i){i=i!=null?i.concat([n]):null,ul(4,4,tm.bind(null,s,n),i)}function Xu(){}function rm(n,s){var i=st();s=s===void 0?null:s;var l=i.memoizedState;return s!==null&&Iu(s,l[1])?l[0]:(i.memoizedState=[n,s],n)}function sm(n,s){var i=st();s=s===void 0?null:s;var l=i.memoizedState;if(s!==null&&Iu(s,l[1]))return l[0];if(l=n(),Ms){xn(!0);try{n()}finally{xn(!1)}}return i.memoizedState=[l,s],l}function Zu(n,s,i){return i===void 0||(ar&1073741824)!==0&&(ke&261930)===0?n.memoizedState=s:(n.memoizedState=i,n=ag(),Te.lanes|=n,Ir|=n,i)}function am(n,s,i,l){return rn(i,s)?i:Ea.current!==null?(n=Zu(n,i,l),rn(n,s)||(lt=!0),n):(ar&42)===0||(ar&1073741824)!==0&&(ke&261930)===0?(lt=!0,n.memoizedState=i):(n=ag(),Te.lanes|=n,Ir|=n,s)}function im(n,s,i,l,d){var h=F.p;F.p=h!==0&&8>h?h:8;var v=D.T,S={};D.T=S,td(n,!1,s,i);try{var O=d(),P=D.S;if(P!==null&&P(S,O),O!==null&&typeof O=="object"&&typeof O.then=="function"){var q=h_(O,l);Ai(n,s,q,un(n))}else Ai(n,s,l,un(n))}catch(Y){Ai(n,s,{then:function(){},status:"rejected",reason:Y},un())}finally{F.p=h,v!==null&&S.types!==null&&(v.types=S.types),D.T=v}}function b_(){}function Wu(n,s,i,l){if(n.tag!==5)throw Error(a(476));var d=om(n).queue;im(n,d,s,ae,i===null?b_:function(){return lm(n),i(l)})}function om(n){var s=n.memoizedState;if(s!==null)return s;s={memoizedState:ae,baseState:ae,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ir,lastRenderedState:ae},next:null};var i={};return s.next={memoizedState:i,baseState:i,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ir,lastRenderedState:i},next:null},n.memoizedState=s,n=n.alternate,n!==null&&(n.memoizedState=s),s}function lm(n){var s=om(n);s.next===null&&(s=n.alternate.memoizedState),Ai(n,s.next.queue,{},un())}function ed(){return kt(Gi)}function cm(){return st().memoizedState}function um(){return st().memoizedState}function w_(n){for(var s=n.return;s!==null;){switch(s.tag){case 24:case 3:var i=un();n=Dr(i);var l=Lr(s,n,i);l!==null&&(Qt(l,s,i),Si(l,s,i)),s={cache:Cu()},n.payload=s;return}s=s.return}}function __(n,s,i){var l=un();i={lane:l,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},dl(n)?fm(s,i):(i=vu(n,s,i,l),i!==null&&(Qt(i,n,l),hm(i,s,l)))}function dm(n,s,i){var l=un();Ai(n,s,i,l)}function Ai(n,s,i,l){var d={lane:l,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null};if(dl(n))fm(s,d);else{var h=n.alternate;if(n.lanes===0&&(h===null||h.lanes===0)&&(h=s.lastRenderedReducer,h!==null))try{var v=s.lastRenderedState,S=h(v,i);if(d.hasEagerState=!0,d.eagerState=S,rn(S,v))return Vo(n,s,d,0),Ge===null&&Go(),!1}catch{}if(i=vu(n,s,d,l),i!==null)return Qt(i,n,l),hm(i,s,l),!0}return!1}function td(n,s,i,l){if(l={lane:2,revertLane:Nd(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},dl(n)){if(s)throw Error(a(479))}else s=vu(n,i,l,2),s!==null&&Qt(s,n,2)}function dl(n){var s=n.alternate;return n===Te||s!==null&&s===Te}function fm(n,s){Ta=sl=!0;var i=n.pending;i===null?s.next=s:(s.next=i.next,i.next=s),n.pending=s}function hm(n,s,i){if((i&4194048)!==0){var l=s.lanes;l&=n.pendingLanes,i|=l,s.lanes=i,qt(n,i)}}var Oi={readContext:kt,use:ol,useCallback:et,useContext:et,useEffect:et,useImperativeHandle:et,useLayoutEffect:et,useInsertionEffect:et,useMemo:et,useReducer:et,useRef:et,useState:et,useDebugValue:et,useDeferredValue:et,useTransition:et,useSyncExternalStore:et,useId:et,useHostTransitionStatus:et,useFormState:et,useActionState:et,useOptimistic:et,useMemoCache:et,useCacheRefresh:et};Oi.useEffectEvent=et;var pm={readContext:kt,use:ol,useCallback:function(n,s){return Bt().memoizedState=[n,s===void 0?null:s],n},useContext:kt,useEffect:Xp,useImperativeHandle:function(n,s,i){i=i!=null?i.concat([n]):null,cl(4194308,4,tm.bind(null,s,n),i)},useLayoutEffect:function(n,s){return cl(4194308,4,n,s)},useInsertionEffect:function(n,s){cl(4,2,n,s)},useMemo:function(n,s){var i=Bt();s=s===void 0?null:s;var l=n();if(Ms){xn(!0);try{n()}finally{xn(!1)}}return i.memoizedState=[l,s],l},useReducer:function(n,s,i){var l=Bt();if(i!==void 0){var d=i(s);if(Ms){xn(!0);try{i(s)}finally{xn(!1)}}}else d=s;return l.memoizedState=l.baseState=d,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:n,lastRenderedState:d},l.queue=n,n=n.dispatch=__.bind(null,Te,n),[l.memoizedState,n]}
vendor: 6,243 bytes, line 9
9,useRef:function(n){var s=Bt();return n={current:n},s.memoizedState=n},useState:function(n){n=Fu(n);var s=n.queue,i=dm.bind(null,Te,s);return s.dispatch=i,[n.memoizedState,i]},useDebugValue:Xu,useDeferredValue:function(n,s){var i=Bt();return Zu(i,n,s)},useTransition:function(){var n=Fu(!1);return n=im.bind(null,Te,n.queue,!0,!1),Bt().memoizedState=n,[!1,n]},useSyncExternalStore:function(n,s,i){var l=Te,d=Bt();if(Me){if(i===void 0)throw Error(a(407));i=i()}else{if(i=s(),Ge===null)throw Error(a(349));(ke&127)!==0||Lp(l,s,i)}d.memoizedState=i;var h={value:i,getSnapshot:s};return d.queue=h,Xp(zp.bind(null,l,h,n),[n]),l.flags|=2048,xa(9,{destroy:void 0},Up.bind(null,l,h,i,s),null),i},useId:function(){var n=Bt(),s=Ge.identifierPrefix;if(Me){var i=In,l=Bn;i=(l&~(1<<32-Dt(l)-1)).toString(32)+i,s="_"+s+"R_"+i,i=al++,0<i&&(s+="H"+i.toString(32)),s+="_"}else i=p_++,s="_"+s+"r_"+i.toString(32)+"_";return n.memoizedState=s},useHostTransitionStatus:ed,useFormState:Kp,useActionState:Kp,useOptimistic:function(n){var s=Bt();s.memoizedState=s.baseState=n;var i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return s.queue=i,s=td.bind(null,Te,!0,i),i.dispatch=s,[n,s]},useMemoCache:Vu,useCacheRefresh:function(){return Bt().memoizedState=w_.bind(null,Te)},useEffectEvent:function(n){var s=Bt(),i={impl:n};return s.memoizedState=i,function(){if((Ue&2)!==0)throw Error(a(440));return i.impl.apply(void 0,arguments)}}},nd={readContext:kt,use:ol,useCallback:rm,useContext:kt,useEffect:Qu,useImperativeHandle:nm,useInsertionEffect:Wp,useLayoutEffect:em,useMemo:sm,useReducer:ll,useRef:Qp,useState:function(){return ll(ir)},useDebugValue:Xu,useDeferredValue:function(n,s){var i=st();return am(i,He.memoizedState,n,s)},useTransition:function(){var n=ll(ir)[0],s=st().memoizedState;return[typeof n=="boolean"?n:xi(n),s]},useSyncExternalStore:Dp,useId:cm,useHostTransitionStatus:ed,useFormState:Yp,useActionState:Yp,useOptimistic:function(n,s){var i=st();return Ip(i,He,n,s)},useMemoCache:Vu,useCacheRefresh:um};nd.useEffectEvent=Zp;var mm={readContext:kt,use:ol,useCallback:rm,useContext:kt,useEffect:Qu,useImperativeHandle:nm,useInsertionEffect:Wp,useLayoutEffect:em,useMemo:sm,useReducer:Yu,useRef:Qp,useState:function(){return Yu(ir)},useDebugValue:Xu,useDeferredValue:function(n,s){var i=st();return He===null?Zu(i,n,s):am(i,He.memoizedState,n,s)},useTransition:function(){var n=Yu(ir)[0],s=st().memoizedState;return[typeof n=="boolean"?n:xi(n),s]},useSyncExternalStore:Dp,useId:cm,useHostTransitionStatus:ed,useFormState:Jp,useActionState:Jp,useOptimistic:function(n,s){var i=st();return He!==null?Ip(i,He,n,s):(i.baseState=n,[n,i.queue.dispatch])},useMemoCache:Vu,useCacheRefresh:um};mm.useEffectEvent=Zp;function rd(n,s,i,l){s=n.memoizedState,i=i(l,s),i=i==null?s:g({},s,i),n.memoizedState=i,n.lanes===0&&(n.updateQueue.baseState=i)}var sd={enqueueSetState:function(n,s,i){n=n._reactInternals;var l=un(),d=Dr(l);d.payload=s,i!=null&&(d.callback=i),s=Lr(n,d,l),s!==null&&(Qt(s,n,l),Si(s,n,l))},enqueueReplaceState:function(n,s,i){n=n._reactInternals;var l=un(),d=Dr(l);d.tag=1,d.payload=s,i!=null&&(d.callback=i),s=Lr(n,d,l),s!==null&&(Qt(s,n,l),Si(s,n,l))},enqueueForceUpdate:function(n,s){n=n._reactInternals;var i=un(),l=Dr(i);l.tag=2,s!=null&&(l.callback=s),s=Lr(n,l,i),s!==null&&(Qt(s,n,i),Si(s,n,i))}};function gm(n,s,i,l,d,h,v){return n=n.stateNode,typeof n.shouldComponentUpdate=="function"?n.shouldComponentUpdate(l,h,v):s.prototype&&s.prototype.isPureReactComponent?!pi(i,l)||!pi(d,h):!0}function ym(n,s,i,l){n=s.state,typeof s.componentWillReceiveProps=="function"&&s.componentWillReceiveProps(i,l),typeof s.UNSAFE_componentWillReceiveProps=="function"&&s.UNSAFE_componentWillReceiveProps(i,l),s.state!==n&&sd.enqueueReplaceState(s,s.state,null)}function Ns(n,s){var i=s;if("ref"in s){i={};for(var l in s)l!=="ref"&&(i[l]=s[l])}if(n=n.defaultProps){i===s&&(i=g({},i));for(var d in n)i[d]===void 0&&(i[d]=n[d])}return i}function vm(n){$o(n)}function bm(n){console.error(n)}function wm(n){$o(n)}function fl(n,s){try{var i=n.onUncaughtError;i(s.value,{componentStack:s.stack})}catch(l){setTimeout(function(){throw l})}}function _m(n,s,i){try{var l=n.onCaughtError;l(i.value,{componentStack:i.stack,errorBoundary:s.tag===1?s.stateNode:null})}catch(d){setTimeout(function(){throw d})}}function ad(n,s,i){return i=Dr(i),i.tag=3,i.payload={element:null},i.callback=function(){fl(n,s)},i}function Sm(n){return n=Dr(n),n.tag=3,n}function Em(n,s,i,l){var d=i.type.getDerivedStateFromError;if(typeof d=="function"){var h=l.value;n.payload=function(){return d(h)},n.callback=function(){_m(s,i,l)}}var v=i.stateNode;v!==null&&typeof v.componentDidCatch=="function"&&(n.callback=function(){_m(s,i,l),typeof d!="function"&&(Hr===null?Hr=new Set([this]):Hr.add(this));var S=l.stack;this.componentDidCatch(l.value,{componentStack:S!==null?S:""})})}function S_(n,s,i,l,d){if(i.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(s=i.alternate,s!==null&&va(s,i,d,!0),i=an.current,i!==null){switch(i.tag){case 31:case 13:return _n===null?Tl():i.alternate===null&&tt===0&&(tt=3),i.flags&=-257,i.flags|=65536,i.lanes=d,l===Wo?i.flags|=16384:(s=i.updateQueue,s===null?i.updateQueue=new Set([l]):s.add(l),kd(n,l,d)),!1;case 22:return i.flags|=65536,l===Wo?i.flags|=16384:(s=i.updateQueue,s===null?(s={transitions:null,markerInstances:null,retryQueue:new Set([l])},i.updateQueue=s):(i=s.retryQueue,i===null?s.retryQueue=new Set([l]):i.add(l)),kd(n,l,d)),!1}throw Error(a(435,i.tag))}return kd(n,l,d),Tl(),!1}if(Me)return s=an.current,s!==null?((s.flags&65536)===0&&(s.flags|=256),s.flags|=65536,s.lanes=d,l!==Tu&&(n=Error(a(422),{cause:l}),yi(yn(n,i)))):(l!==Tu&&(s=Error(a(423),{cause:l}),yi(yn(s,i))),n=n.current.alternate,n.flags|=65536,d&=-d,n.lanes|=d,l=yn(l,i),d=ad(n.stateNode,l,d),Lu(n,d),tt!==4&&(tt=2)),!1;var h=Error(a(520),{cause:l});if(h=yn(h,i),Ui===null?Ui=[h]:Ui.push(h),tt!==4&&(tt=2),s===null)return!0;l=yn(l,i),i=s;do{switch(i.tag){case 3:return i.flags|=65536,n=d&-d,i.lanes|=n,n=ad(i.stateNode,l,n),Lu(i,n),!1;case 1:if(s=i.type,h=i.stateNode,(i.flags&128)===0&&(typeof s.getDerivedStateFromError=="function"||h!==null&&typeof h.componentDidCatch=="function"&&(Hr===null||!Hr.has(h
vendor: 14,236 bytes, line 9
9))))return i.flags|=65536,d&=-d,i.lanes|=d,d=Sm(d),Em(d,n,i,l),Lu(i,d),!1}i=i.return}while(i!==null);return!1}var id=Error(a(461)),lt=!1;function jt(n,s,i,l){s.child=n===null?Ap(s,null,i,l):js(s,n.child,i,l)}function Tm(n,s,i,l,d){i=i.render;var h=s.ref;if("ref"in l){var v={};for(var S in l)S!=="ref"&&(v[S]=l[S])}else v=l;return As(s),l=Hu(n,s,i,v,h,d),S=qu(),n!==null&&!lt?($u(n,s,d),or(n,s,d)):(Me&&S&&Su(s),s.flags|=1,jt(n,s,l,d),s.child)}function Rm(n,s,i,l,d){if(n===null){var h=i.type;return typeof h=="function"&&!bu(h)&&h.defaultProps===void 0&&i.compare===null?(s.tag=15,s.type=h,xm(n,s,h,l,d)):(n=Yo(i.type,null,l,s,s.mode,d),n.ref=s.ref,n.return=s,s.child=n)}if(h=n.child,!pd(n,d)){var v=h.memoizedProps;if(i=i.compare,i=i!==null?i:pi,i(v,l)&&n.ref===s.ref)return or(n,s,d)}return s.flags|=1,n=tr(h,l),n.ref=s.ref,n.return=s,s.child=n}function xm(n,s,i,l,d){if(n!==null){var h=n.memoizedProps;if(pi(h,l)&&n.ref===s.ref)if(lt=!1,s.pendingProps=l=h,pd(n,d))(n.flags&131072)!==0&&(lt=!0);else return s.lanes=n.lanes,or(n,s,d)}return od(n,s,i,l,d)}function Am(n,s,i,l){var d=l.children,h=n!==null?n.memoizedState:null;if(n===null&&s.stateNode===null&&(s.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.mode==="hidden"){if((s.flags&128)!==0){if(h=h!==null?h.baseLanes|i:i,n!==null){for(l=s.child=n.child,d=0;l!==null;)d=d|l.lanes|l.childLanes,l=l.sibling;l=d&~h}else l=0,s.child=null;return Om(n,s,h,i,l)}if((i&536870912)!==0)s.memoizedState={baseLanes:0,cachePool:null},n!==null&&Xo(s,h!==null?h.cachePool:null),h!==null?kp(s,h):zu(),jp(s);else return l=s.lanes=536870912,Om(n,s,h!==null?h.baseLanes|i:i,i,l)}else h!==null?(Xo(s,h.cachePool),kp(s,h),zr(),s.memoizedState=null):(n!==null&&Xo(s,null),zu(),zr());return jt(n,s,d,i),s.child}function Ci(n,s){return n!==null&&n.tag===22||s.stateNode!==null||(s.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.sibling}function Om(n,s,i,l,d){var h=ju();return h=h===null?null:{parent:it._currentValue,pool:h},s.memoizedState={baseLanes:i,cachePool:h},n!==null&&Xo(s,null),zu(),jp(s),n!==null&&va(n,s,l,!0),s.childLanes=d,null}function hl(n,s){return s=ml({mode:s.mode,children:s.children},n.mode),s.ref=n.ref,n.child=s,s.return=n,s}function Cm(n,s,i){return js(s,n.child,null,i),n=hl(s,s.pendingProps),n.flags|=2,on(s),s.memoizedState=null,n}function E_(n,s,i){var l=s.pendingProps,d=(s.flags&128)!==0;if(s.flags&=-129,n===null){if(Me){if(l.mode==="hidden")return n=hl(s,l),s.lanes=536870912,Ci(null,n);if(Bu(s),(n=Ye)?(n=Hg(n,wn),n=n!==null&&n.data==="&"?n:null,n!==null&&(s.memoizedState={dehydrated:n,treeContext:Cr!==null?{id:Bn,overflow:In}:null,retryLane:536870912,hydrationErrors:null},i=fp(n),i.return=s,s.child=i,Ct=s,Ye=null)):n=null,n===null)throw jr(s);return s.lanes=536870912,null}return hl(s,l)}var h=n.memoizedState;if(h!==null){var v=h.dehydrated;if(Bu(s),d)if(s.flags&256)s.flags&=-257,s=Cm(n,s,i);else if(s.memoizedState!==null)s.child=n.child,s.flags|=128,s=null;else throw Error(a(558));else if(lt||va(n,s,i,!1),d=(i&n.childLanes)!==0,lt||d){if(l=Ge,l!==null&&(v=$t(l,i),v!==0&&v!==h.retryLane))throw h.retryLane=v,Es(n,v),Qt(l,n,v),id;Tl(),s=Cm(n,s,i)}else n=h.treeContext,Ye=Sn(v.nextSibling),Ct=s,Me=!0,kr=null,wn=!1,n!==null&&mp(s,n),s=hl(s,l),s.flags|=4096;return s}return n=tr(n.child,{mode:l.mode,children:l.children}),n.ref=s.ref,s.child=n,n.return=s,n}function pl(n,s){var i=s.ref;if(i===null)n!==null&&n.ref!==null&&(s.flags|=4194816);else{if(typeof i!="function"&&typeof i!="object")throw Error(a(284));(n===null||n.ref!==i)&&(s.flags|=4194816)}}function od(n,s,i,l,d){return As(s),i=Hu(n,s,i,l,void 0,d),l=qu(),n!==null&&!lt?($u(n,s,d),or(n,s,d)):(Me&&l&&Su(s),s.flags|=1,jt(n,s,i,d),s.child)}function km(n,s,i,l,d,h){return As(s),s.updateQueue=null,i=Np(s,l,i,d),Mp(n),l=qu(),n!==null&&!lt?($u(n,s,h),or(n,s,h)):(Me&&l&&Su(s),s.flags|=1,jt(n,s,i,h),s.child)}function jm(n,s,i,l,d){if(As(s),s.stateNode===null){var h=pa,v=i.contextType;typeof v=="object"&&v!==null&&(h=kt(v)),h=new i(l,h),s.memoizedState=h.state!==null&&h.state!==void 0?h.state:null,h.updater=sd,s.stateNode=h,h._reactInternals=s,h=s.stateNode,h.props=l,h.state=s.memoizedState,h.refs={},Nu(s),v=i.contextType,h.context=typeof v=="object"&&v!==null?kt(v):pa,h.state=s.memoizedState,v=i.getDerivedStateFromProps,typeof v=="function"&&(rd(s,i,v,l),h.state=s.memoizedState),typeof i.getDerivedStateFromProps=="function"||typeof h.getSnapshotBeforeUpdate=="function"||typeof h.UNSAFE_componentWillMount!="function"&&typeof h.componentWillMount!="function"||(v=h.state,typeof h.componentWillMount=="function"&&h.componentWillMount(),typeof h.UNSAFE_componentWillMount=="function"&&h.UNSAFE_componentWillMount(),v!==h.state&&sd.enqueueReplaceState(h,h.state,null),Ti(s,l,h,d),Ei(),h.state=s.memoizedState),typeof h.componentDidMount=="function"&&(s.flags|=4194308),l=!0}else if(n===null){h=s.stateNode;var S=s.memoizedProps,O=Ns(i,S);h.props=O;var P=h.context,q=i.contextType;v=pa,typeof q=="object"&&q!==null&&(v=kt(q));var Y=i.getDerivedStateFromProps;q=typeof Y=="function"||typeof h.getSnapshotBeforeUpdate=="function",S=s.pendingProps!==S,q||typeof h.UNSAFE_componentWillReceiveProps!="function"&&typeof h.componentWillReceiveProps!="function"||(S||P!==v)&&ym(s,h,l,v),Nr=!1;var B=s.memoizedState;h.state=B,Ti(s,l,h,d),Ei(),P=s.memoizedState,S||B!==P||Nr?(typeof Y=="function"&&(rd(s,i,Y,l),P=s.memoizedState),(O=Nr||gm(s,i,O,l,B,P,v))?(q||typeof h.UNSAFE_componentWillMount!="function"&&typeof h.componentWillMount!="function"||(typeof h.componentWillMount=="function"&&h.componentWillMount(),typeof h.UNSAFE_componentWillMount=="function"&&h.UNSAFE_componentWillMount()),typeof h.componentDidMount=="function"&&(s.flags|=4194308)):(typeof h.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=l,s.memoizedState=P),h.props=l,h.state=P,h.context=v,l=O):(typeof h.componentDidMount=="function"&&(s.flags|=4194308),l=!1)}else{h=s.stateNode,Du(n,s),v=s.memoizedProps,q=Ns(i,v),h.props=q,Y=s.pendingProps,B=h.context,P=i.contextType,O=pa,typeof P=="object"&&P!==null&&(O=kt(P)),S=i.getDerivedStateFromProps,(P=typeof S=="function"||typeof h.getSnapshotBeforeUpdate=="function")||typeof h.UNSAFE_componentWillReceiveProps!="function"&&typeof h.componentWillReceiveProps!="function"||(v!==Y||B!==O)&&ym(s,h,l,O),Nr=!1,B=s.memoizedState,h.state=B,Ti(s,l,h,d),Ei();var I=s.memoizedState;v!==Y||B!==I||Nr||n!==null&&n.dependencies!==null&&Jo(n.dependencies)?(typeof S=="function"&&(rd(s,i,S,l),I=s.memoizedState),(q=Nr||gm(s,i,q,l,B,I,O)||n!==null&&n.dependencies!==null&&Jo(n.dependencies))?(P||typeof h.UNSAFE_componentWillUpdate!="function"&&typeof h.componentWillUpdate!="function"||(typeof h.componentWillUpdate=="function"&&h.componentWillUpdate(l,I,O),typeof h.UNSAFE_componentWillUpdate=="function"&&h.UNSAFE_componentWillUpdate(l,I,O)),typeof h.componentDidUpdate=="function"&&(s.flags|=4),typeof h.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof h.componentDidUpdate!="function"||v===n.memoizedProps&&B===n.memoizedState||(s.flags|=4),typeof h.getSnapshotBeforeUpdate!="function"||v===n.memoizedProps&&B===n.memoizedState||(s.flags|=1024),s.memoizedProps=l,s.memoizedState=I),h.props=l,h.state=I,h.context=O,l=q):(typeof h.componentDidUpdate!="function"||v===n.memoizedProps&&B===n.memoizedState||(s.flags|=4),typeof h.getSnapshotBeforeUpdate!="function"||v===n.memoizedProps&&B===n.memoizedState||(s.flags|=1024),l=!1)}return h=l,pl(n,s),l=(s.flags&128)!==0,h||l?(h=s.stateNode,i=l&&typeof i.getDerivedStateFromError!="function"?null:h.render(),s.flags|=1,n!==null&&l?(s.child=js(s,n.child,null,d),s.child=js(s,null,i,d)):jt(n,s,i,d),s.memoizedState=h.state,n=s.child):n=or(n,s,d),n}function Mm(n,s,i,l){return Rs(),s.flags|=256,jt(n,s,i,l),s.child}var ld={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function cd(n){return{baseLanes:n,cachePool:_p()}}function ud(n,s,i){return n=n!==null?n.childLanes&~i:0,s&&(n|=cn),n}function Nm(n,s,i){var l=s.pendingProps,d=!1,h=(s.flags&128)!==0,v;if((v=h)||(v=n!==null&&n.memoizedState===null?!1:(rt.current&2)!==0),v&&(d=!0,s.flags&=-129),v=(s.flags&32)!==0,s.flags&=-33,n===null){if(Me){if(d?Ur(s):zr(),(n=Ye)?(n=Hg(n,wn),n=n!==null&&n.data!=="&"?n:null,n!==null&&(s.memoizedState={dehydrated:n,treeContext:Cr!==null?{id:Bn,overflow:In}:null,retryLane:536870912,hydrationErrors:null},i=fp(n),i.return=s,s.child=i,Ct=s,Ye=null)):n=null,n===null)throw jr(s);return Kd(n)?s.lanes=32:s.lanes=536870912,null}var S=l.children;return l=l.fallback,d?(zr(),d=s.mode,S=ml({mode:"hidden",children:S},d),l=Ts(l,d,i,null),S.return=s,l.return=s,S.sibling=l,s.child=S,l=s.child,l.memoizedState=cd(i),l.childLanes=ud(n,v,i),s.memoizedState=ld,Ci(null,l)):(Ur(s),dd(s,S))}var O=n.memoizedState;if(O!==null&&(S=O.dehydrated,S!==null)){if(h)s.flags&256?(Ur(s),s.flags&=-257,s=fd(n,s,i)):s.memoizedState!==null?(zr(),s.child=n.child,s.flags|=128,s=null):(zr(),S=l.fallback,d=s.mode,l=ml({mode:"visible",children:l.children},d),S=Ts(S,d,i,null),S.flags|=2,l.return=s,S.return=s,l.sibling=S,s.child=l,js(s,n.child,null,i),l=s.child,l.memoizedState=cd(i),l.childLanes=ud(n,v,i),s.memoizedState=ld,s=Ci(null,l));else if(Ur(s),Kd(S)){if(v=S.nextSibling&&S.nextSibling.dataset,v)var P=v.dgst;v=P,l=Error(a(419)),l.stack="",l.digest=v,yi({value:l,source:null,stack:null}),s=fd(n,s,i)}else if(lt||va(n,s,i,!1),v=(i&n.childLanes)!==0,lt||v){if(v=Ge,v!==null&&(l=$t(v,i),l!==0&&l!==O.retryLane))throw O.retryLane=l,Es(n,l),Qt(v,n,l),id;Vd(S)||Tl(),s=fd(n,s,i)}else Vd(S)?(s.flags|=192,s.child=n.child,s=null):(n=O.treeContext,Ye=Sn(S.nextSibling),Ct=s,Me=!0,kr=null,wn=!1,n!==null&&mp(s,n),s=dd(s,l.children),s.flags|=4096);return s}return d?(zr(),S=l.fallback,d=s.mode,O=n.child,P=O.sibling,l=tr(O,{mode:"hidden",children:l.children}),l.subtreeFlags=O.subtreeFlags&65011712,P!==null?S=tr(P,S):(S=Ts(S,d,i,null),S.flags|=2),S.return=s,l.return=s,l.sibling=S,s.child=l,Ci(null,l),l=s.child,S=n.child.memoizedState,S===null?S=cd(i):(d=S.cachePool,d!==null?(O=it._currentValue,d=d.parent!==O?{parent:O,pool:O}:d):d=_p(),S={baseLanes:S.baseLanes|i,cachePool:d}),l.memoizedState=S,l.childLanes=ud(n,v,i),s.memoizedState=ld,Ci(n.child,l)):(Ur(s),i=n.child,n=i.sibling,i=tr(i,{mode:"visible",children:l.children}),i.return=s,i.sibling=null,n!==null&&(v=s.deletions,v===null?(s.deletions=[n],s.flags|=16):v.push(n)),s.child=i,s.memoizedState=null,i)}function dd(n,s){return s=ml({mode:"visible",children:s},n.mode),s.return=n,n.child=s}function ml(n,s){return n=sn(22,n,null,s),n.lanes=0,n}function fd(n,s,i){return js(s,n.child,null,i),n=dd(s,s.pendingProps.children),n.flags|=2,s.memoizedState=null,n}function Dm(n,s,i){n.lanes|=s;var l=n.alternate;l!==null&&(l.lanes|=s),Au(n.return,s,i)}function hd(n,s,i,l,d,h){var v=n.memoizedState;v===null?n.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:l,tail:i,tailMode:d,treeForkCount:h}:(v.isBackwards=s,v.rendering=null,v.renderingStartTime=0,v.last=l,v.tail=i,v.tailMode=d,v.treeForkCount=h)}function Lm(n,s,i){var l=s.pendingProps,d=l.revealOrder,h=l.tail;l=l.children;var v=rt.current,S=(v&2)!==0;if(S?(v=v&1|2,s.flags|=128):v&=1,K(rt,v),jt(n,s,l,i),l=Me?gi:0,!S&&n!==null&&(n.flags&128)!==0)e:for(n=s.child;n!==null;){if(n.tag===13)n.memoizedState!==null&&Dm(n,i,s);else if(n.tag===19)Dm(n,i,s);else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===s)break e;for(;n.sibling===null;){if(n.return===null||n.return===s)break e;n=n.return}n.sibling.return=n.return,n=n.sibling}switch(d){case"forwards":for(i=s.child,d=null;i!==null;)n=i.alternate,n!==null&&rl(n)===null&&(d=i),i=i.sibling;i=d,i===null?(d=s.child,s.child=null):(d=i.sibling,i.sibling=null),hd(s,!1,d,i,h,l);break;case"backwards":case"unstable_legacy-backwards":for(i=null,d=s.child,s.child=null;d!==null;){if(n=d.alternate,n!==null&&rl(n)===null){s.child=d;break}n=d.sibling,d.sibling=i,i=d,d=n}hd(s,!0,i,null,h,l);break;case"together":hd(s,!1,null,null,void 0,l);break;default:s.memoizedState=null}return s.child}function or(n,s,i){if(n!==null&&(s.dependencies=n.dependencies),Ir|=s.lanes,(i&s.childLanes)===0)if(n!==null){if(va(n,s,i,!1),(i&s.childLanes)===0)return null}else return null;if(n!==null&&s.child!==n.child)throw Error(a(153));if(s.child!==null){for(n=s.child,i=tr(n,n.pendingProps),s.child=i,i.return=s;n.sibling!==null;)n=n.sibling,i=i.sibling=tr(n,n.pendingProps),i.return=s;i.sibling=null}return s.child}function pd(n,s){return(n.lanes&s)!==0?!0:(n=n.dependencies,!!(n!==null&&Jo(n)))}function T_(n,s,i){switch(s.tag){case 3:ye(s,s.stateNode.containerInfo),Mr(s,it,n.memoizedState.cache),Rs();break;case 27:case 5:xt(s);break;case 4:ye(s,s.stateNode.containerInfo);break;case 10:Mr(s,s.type,s.memoizedProps.value);break;case 31:if(s.memoizedState!==null)return s.flags|=128,Bu(s),null;break;case 13:var l=s.memoizedState;if(l!==null)return l.dehydrated!==null?(Ur(s),s.flags|=128,null):(i&s.child.childLanes)!==0?Nm(n,s,i):(Ur(s),n=or(n,s,i),n!==null?n.sibling:null);Ur(s);break;case 19:var d=(n.flags&128)!==0;if(l=(i&s.childLanes)!==0,l||(va(n,s,i,!1),l=(i&s.childLanes)!==0),d){if(l)return Lm(n,s,i);s.flags|=128}if(d=s.memoizedState,d!==null&&(d.rendering=null,d.tail=null,d.lastEffect=null),K(rt,rt.current),l)break;return null;case 22:return s.lanes=0,Am(n,s,i,s.pendingProps);case 24:Mr(s,it,n.memoizedState.cache)}return or(n,s,i)}function Um(n,s,i){if(n!==null)if(n.memoizedProps!==s.pendingProps)lt=!0;else{if(!pd(n,i)&&(s.flags&128)===0)return lt=!1,T_(n,s,i);lt=(n.flags&131072)!==0}else lt=!1,Me&&(s.flags&1048576)!==0&&pp(s,gi,s.index);switch(s.lanes=0,s.tag){case 16:e:{var l=s.pendingProps;if(n=Cs(s.elementType),s.type=n,typeof n=="function")bu(n)?(l=Ns(n,l),s.tag=1,s=jm(null,s,n,l,i)):(s.tag=0,s=od(null,s,n,l,i));else{if(n!=null){var d=n.$$typeof;if(d===L){s.tag=11,s=Tm(null,s,n,l,i);break e}else if(d===H){s.tag=14,s=Rm(null,s,n,l,i);break e}}throw s=ze(n)||n,Error(a(306,s,""))}}return s;case 0:return od(n,s,s.type,s.pendingProps,i);case 1:return l=s.type,d=Ns(l,s.pendingProps),jm(n,s,l,d,i);case 3:e:{if(ye(s,s.stateNode.containerInfo),n===null)throw Error(a(387));l=s.pendingProps;var h=s.memoizedState;d=h.element,Du(n,s),Ti(s,l,null,i);var v=s.memoizedState;
vendor: 5,630 bytes, line 9
9if(l=v.cache,Mr(s,it,l),l!==h.cache&&Ou(s,[it],i,!0),Ei(),l=v.element,h.isDehydrated)if(h={element:l,isDehydrated:!1,cache:v.cache},s.updateQueue.baseState=h,s.memoizedState=h,s.flags&256){s=Mm(n,s,l,i);break e}else if(l!==d){d=yn(Error(a(424)),s),yi(d),s=Mm(n,s,l,i);break e}else for(n=s.stateNode.containerInfo,n.nodeType===9?n=n.body:n=n.nodeName==="HTML"?n.ownerDocument.body:n,Ye=Sn(n.firstChild),Ct=s,Me=!0,kr=null,wn=!0,i=Ap(s,null,l,i),s.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling;else{if(Rs(),l===d){s=or(n,s,i);break e}jt(n,s,l,i)}s=s.child}return s;case 26:return pl(n,s),n===null?(i=Yg(s.type,null,s.pendingProps,null))?s.memoizedState=i:Me||(i=s.type,n=s.pendingProps,l=jl(se.current).createElement(i),l[Ot]=s,l[Gt]=n,Mt(l,i,n),St(l),s.stateNode=l):s.memoizedState=Yg(s.type,n.memoizedProps,s.pendingProps,n.memoizedState),null;case 27:return xt(s),n===null&&Me&&(l=s.stateNode=Gg(s.type,s.pendingProps,se.current),Ct=s,wn=!0,d=Ye,Vr(s.type)?(Yd=d,Ye=Sn(l.firstChild)):Ye=d),jt(n,s,s.pendingProps.children,i),pl(n,s),n===null&&(s.flags|=4194304),s.child;case 5:return n===null&&Me&&((d=l=Ye)&&(l=eS(l,s.type,s.pendingProps,wn),l!==null?(s.stateNode=l,Ct=s,Ye=Sn(l.firstChild),wn=!1,d=!0):d=!1),d||jr(s)),xt(s),d=s.type,h=s.pendingProps,v=n!==null?n.memoizedProps:null,l=h.children,qd(d,h)?l=null:v!==null&&qd(d,v)&&(s.flags|=32),s.memoizedState!==null&&(d=Hu(n,s,m_,null,null,i),Gi._currentValue=d),pl(n,s),jt(n,s,l,i),s.child;case 6:return n===null&&Me&&((n=i=Ye)&&(i=tS(i,s.pendingProps,wn),i!==null?(s.stateNode=i,Ct=s,Ye=null,n=!0):n=!1),n||jr(s)),null;case 13:return Nm(n,s,i);case 4:return ye(s,s.stateNode.containerInfo),l=s.pendingProps,n===null?s.child=js(s,null,l,i):jt(n,s,l,i),s.child;case 11:return Tm(n,s,s.type,s.pendingProps,i);case 7:return jt(n,s,s.pendingProps,i),s.child;case 8:return jt(n,s,s.pendingProps.children,i),s.child;case 12:return jt(n,s,s.pendingProps.children,i),s.child;case 10:return l=s.pendingProps,Mr(s,s.type,l.value),jt(n,s,l.children,i),s.child;case 9:return d=s.type._context,l=s.pendingProps.children,As(s),d=kt(d),l=l(d),s.flags|=1,jt(n,s,l,i),s.child;case 14:return Rm(n,s,s.type,s.pendingProps,i);case 15:return xm(n,s,s.type,s.pendingProps,i);case 19:return Lm(n,s,i);case 31:return E_(n,s,i);case 22:return Am(n,s,i,s.pendingProps);case 24:return As(s),l=kt(it),n===null?(d=ju(),d===null&&(d=Ge,h=Cu(),d.pooledCache=h,h.refCount++,h!==null&&(d.pooledCacheLanes|=i),d=h),s.memoizedState={parent:l,cache:d},Nu(s),Mr(s,it,d)):((n.lanes&i)!==0&&(Du(n,s),Ti(s,null,null,i),Ei()),d=n.memoizedState,h=s.memoizedState,d.parent!==l?(d={parent:l,cache:l},s.memoizedState=d,s.lanes===0&&(s.memoizedState=s.updateQueue.baseState=d),Mr(s,it,l)):(l=h.cache,Mr(s,it,l),l!==d.cache&&Ou(s,[it],i,!0))),jt(n,s,s.pendingProps.children,i),s.child;case 29:throw s.pendingProps}throw Error(a(156,s.tag))}function lr(n){n.flags|=4}function md(n,s,i,l,d){if((s=(n.mode&32)!==0)&&(s=!1),s){if(n.flags|=16777216,(d&335544128)===d)if(n.stateNode.complete)n.flags|=8192;else if(cg())n.flags|=8192;else throw ks=Wo,Mu}else n.flags&=-16777217}function zm(n,s){if(s.type!=="stylesheet"||(s.state.loading&4)!==0)n.flags&=-16777217;else if(n.flags|=16777216,!Zg(s))if(cg())n.flags|=8192;else throw ks=Wo,Mu}function gl(n,s){s!==null&&(n.flags|=4),n.flags&16384&&(s=n.tag!==22?Lt():536870912,n.lanes|=s,ka|=s)}function ki(n,s){if(!Me)switch(n.tailMode){case"hidden":s=n.tail;for(var i=null;s!==null;)s.alternate!==null&&(i=s),s=s.sibling;i===null?n.tail=null:i.sibling=null;break;case"collapsed":i=n.tail;for(var l=null;i!==null;)i.alternate!==null&&(l=i),i=i.sibling;l===null?s||n.tail===null?n.tail=null:n.tail.sibling=null:l.sibling=null}}function Fe(n){var s=n.alternate!==null&&n.alternate.child===n.child,i=0,l=0;if(s)for(var d=n.child;d!==null;)i|=d.lanes|d.childLanes,l|=d.subtreeFlags&65011712,l|=d.flags&65011712,d.return=n,d=d.sibling;else for(d=n.child;d!==null;)i|=d.lanes|d.childLanes,l|=d.subtreeFlags,l|=d.flags,d.return=n,d=d.sibling;return n.subtreeFlags|=l,n.childLanes=i,s}function R_(n,s,i){var l=s.pendingProps;switch(Eu(s),s.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Fe(s),null;case 1:return Fe(s),null;case 3:return i=s.stateNode,l=null,n!==null&&(l=n.memoizedState.cache),s.memoizedState.cache!==l&&(s.flags|=2048),sr(it),pe(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(n===null||n.child===null)&&(ya(s)?lr(s):n===null||n.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,Ru())),Fe(s),null;case 26:var d=s.type,h=s.memoizedState;return n===null?(lr(s),h!==null?(Fe(s),zm(s,h)):(Fe(s),md(s,d,null,l,i))):h?h!==n.memoizedState?(lr(s),Fe(s),zm(s,h)):(Fe(s),s.flags&=-16777217):(n=n.memoizedProps,n!==l&&lr(s),Fe(s),md(s,d,n,l,i)),null;case 27:if(ft(s),i=se.current,d=s.type,n!==null&&s.stateNode!=null)n.memoizedProps!==l&&lr(s);else{if(!l){if(s.stateNode===null)throw Error(a(166));return Fe(s),null}n=W.current,ya(s)?gp(s):(n=Gg(d,l,i),s.stateNode=n,lr(s))}return Fe(s),null;case 5:if(ft(s),d=s.type,n!==null&&s.stateNode!=null)n.memoizedProps!==l&&lr(s);else{if(!l){if(s.stateNode===null)throw Error(a(166));return Fe(s),null}if(h=W.current,ya(s))gp(s);else{var v=jl(se.current);switch(h){case 1:h=v.createElementNS("http://www.w3.org/2000/svg",d);break;case 2:h=v.createElementNS("http://www.w3.org/1998/Math/MathML",d);break;default:switch(d){case"svg":h=v.createElementNS("http://www.w3.org/2000/svg",d);break;case"math":h=v.createElementNS("http://www.w3.org/1998/Math/MathML",d);break;case"script":h=v.createElement("div"),h.innerHTML="<script><\/script>",h=h.removeChild(h.firstChild);break;
vendor: 24,629 bytes, line 9
9case"select":h=typeof l.is=="string"?v.createElement("select",{is:l.is}):v.createElement("select"),l.multiple?h.multiple=!0:l.size&&(h.size=l.size);break;default:h=typeof l.is=="string"?v.createElement(d,{is:l.is}):v.createElement(d)}}h[Ot]=s,h[Gt]=l;e:for(v=s.child;v!==null;){if(v.tag===5||v.tag===6)h.appendChild(v.stateNode);else if(v.tag!==4&&v.tag!==27&&v.child!==null){v.child.return=v,v=v.child;continue}if(v===s)break e;for(;v.sibling===null;){if(v.return===null||v.return===s)break e;v=v.return}v.sibling.return=v.return,v=v.sibling}s.stateNode=h;e:switch(Mt(h,d,l),d){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break e;case"img":l=!0;break e;default:l=!1}l&&lr(s)}}return Fe(s),md(s,s.type,n===null?null:n.memoizedProps,s.pendingProps,i),null;case 6:if(n&&s.stateNode!=null)n.memoizedProps!==l&&lr(s);else{if(typeof l!="string"&&s.stateNode===null)throw Error(a(166));if(n=se.current,ya(s)){if(n=s.stateNode,i=s.memoizedProps,l=null,d=Ct,d!==null)switch(d.tag){case 27:case 5:l=d.memoizedProps}n[Ot]=s,n=!!(n.nodeValue===i||l!==null&&l.suppressHydrationWarning===!0||Ng(n.nodeValue,i)),n||jr(s,!0)}else n=jl(n).createTextNode(l),n[Ot]=s,s.stateNode=n}return Fe(s),null;case 31:if(i=s.memoizedState,n===null||n.memoizedState!==null){if(l=ya(s),i!==null){if(n===null){if(!l)throw Error(a(318));if(n=s.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(a(557));n[Ot]=s}else Rs(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;Fe(s),n=!1}else i=Ru(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=i),n=!0;if(!n)return s.flags&256?(on(s),s):(on(s),null);if((s.flags&128)!==0)throw Error(a(558))}return Fe(s),null;case 13:if(l=s.memoizedState,n===null||n.memoizedState!==null&&n.memoizedState.dehydrated!==null){if(d=ya(s),l!==null&&l.dehydrated!==null){if(n===null){if(!d)throw Error(a(318));if(d=s.memoizedState,d=d!==null?d.dehydrated:null,!d)throw Error(a(317));d[Ot]=s}else Rs(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;Fe(s),d=!1}else d=Ru(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=d),d=!0;if(!d)return s.flags&256?(on(s),s):(on(s),null)}return on(s),(s.flags&128)!==0?(s.lanes=i,s):(i=l!==null,n=n!==null&&n.memoizedState!==null,i&&(l=s.child,d=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(d=l.alternate.memoizedState.cachePool.pool),h=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(h=l.memoizedState.cachePool.pool),h!==d&&(l.flags|=2048)),i!==n&&i&&(s.child.flags|=8192),gl(s,s.updateQueue),Fe(s),null);case 4:return pe(),n===null&&zd(s.stateNode.containerInfo),Fe(s),null;case 10:return sr(s.type),Fe(s),null;case 19:if($(rt),l=s.memoizedState,l===null)return Fe(s),null;if(d=(s.flags&128)!==0,h=l.rendering,h===null)if(d)ki(l,!1);else{if(tt!==0||n!==null&&(n.flags&128)!==0)for(n=s.child;n!==null;){if(h=rl(n),h!==null){for(s.flags|=128,ki(l,!1),n=h.updateQueue,s.updateQueue=n,gl(s,n),s.subtreeFlags=0,n=i,i=s.child;i!==null;)dp(i,n),i=i.sibling;return K(rt,rt.current&1|2),Me&&nr(s,l.treeForkCount),s.child}n=n.sibling}l.tail!==null&&wt()>_l&&(s.flags|=128,d=!0,ki(l,!1),s.lanes=4194304)}else{if(!d)if(n=rl(h),n!==null){if(s.flags|=128,d=!0,n=n.updateQueue,s.updateQueue=n,gl(s,n),ki(l,!0),l.tail===null&&l.tailMode==="hidden"&&!h.alternate&&!Me)return Fe(s),null}else 2*wt()-l.renderingStartTime>_l&&i!==536870912&&(s.flags|=128,d=!0,ki(l,!1),s.lanes=4194304);l.isBackwards?(h.sibling=s.child,s.child=h):(n=l.last,n!==null?n.sibling=h:s.child=h,l.last=h)}return l.tail!==null?(n=l.tail,l.rendering=n,l.tail=n.sibling,l.renderingStartTime=wt(),n.sibling=null,i=rt.current,K(rt,d?i&1|2:i&1),Me&&nr(s,l.treeForkCount),n):(Fe(s),null);case 22:case 23:return on(s),Pu(),l=s.memoizedState!==null,n!==null?n.memoizedState!==null!==l&&(s.flags|=8192):l&&(s.flags|=8192),l?(i&536870912)!==0&&(s.flags&128)===0&&(Fe(s),s.subtreeFlags&6&&(s.flags|=8192)):Fe(s),i=s.updateQueue,i!==null&&gl(s,i.retryQueue),i=null,n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(i=n.memoizedState.cachePool.pool),l=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(l=s.memoizedState.cachePool.pool),l!==i&&(s.flags|=2048),n!==null&&$(Os),null;case 24:return i=null,n!==null&&(i=n.memoizedState.cache),s.memoizedState.cache!==i&&(s.flags|=2048),sr(it),Fe(s),null;case 25:return null;case 30:return null}throw Error(a(156,s.tag))}function x_(n,s){switch(Eu(s),s.tag){case 1:return n=s.flags,n&65536?(s.flags=n&-65537|128,s):null;case 3:return sr(it),pe(),n=s.flags,(n&65536)!==0&&(n&128)===0?(s.flags=n&-65537|128,s):null;case 26:case 27:case 5:return ft(s),null;case 31:if(s.memoizedState!==null){if(on(s),s.alternate===null)throw Error(a(340));Rs()}return n=s.flags,n&65536?(s.flags=n&-65537|128,s):null;case 13:if(on(s),n=s.memoizedState,n!==null&&n.dehydrated!==null){if(s.alternate===null)throw Error(a(340));Rs()}return n=s.flags,n&65536?(s.flags=n&-65537|128,s):null;case 19:return $(rt),null;case 4:return pe(),null;case 10:return sr(s.type),null;case 22:case 23:return on(s),Pu(),n!==null&&$(Os),n=s.flags,n&65536?(s.flags=n&-65537|128,s):null;case 24:return sr(it),null;case 25:return null;default:return null}}function Pm(n,s){switch(Eu(s),s.tag){case 3:sr(it),pe();break;case 26:case 27:case 5:ft(s);break;case 4:pe();break;case 31:s.memoizedState!==null&&on(s);break;case 13:on(s);break;case 19:$(rt);break;case 10:sr(s.type);break;case 22:case 23:on(s),Pu(),n!==null&&$(Os);break;case 24:sr(it)}}function ji(n,s){try{var i=s.updateQueue,l=i!==null?i.lastEffect:null;if(l!==null){var d=l.next;i=d;do{if((i.tag&n)===n){l=void 0;var h=i.create,v=i.inst;l=h(),v.destroy=l}i=i.next}while(i!==d)}}catch(S){Be(s,s.return,S)}}function Pr(n,s,i){try{var l=s.updateQueue,d=l!==null?l.lastEffect:null;if(d!==null){var h=d.next;l=h;do{if((l.tag&n)===n){var v=l.inst,S=v.destroy;if(S!==void 0){v.destroy=void 0,d=s;var O=i,P=S;try{P()}catch(q){Be(d,O,q)}}}l=l.next}while(l!==h)}}catch(q){Be(s,s.return,q)}}function Bm(n){var s=n.updateQueue;if(s!==null){var i=n.stateNode;try{Cp(s,i)}catch(l){Be(n,n.return,l)}}}function Im(n,s,i){i.props=Ns(n.type,n.memoizedProps),i.state=n.memoizedState;try{i.componentWillUnmount()}catch(l){Be(n,s,l)}}function Mi(n,s){try{var i=n.ref;if(i!==null){switch(n.tag){case 26:case 27:case 5:var l=n.stateNode;break;case 30:l=n.stateNode;break;default:l=n.stateNode}typeof i=="function"?n.refCleanup=i(l):i.current=l}}catch(d){Be(n,s,d)}}function Hn(n,s){var i=n.ref,l=n.refCleanup;if(i!==null)if(typeof l=="function")try{l()}catch(d){Be(n,s,d)}finally{n.refCleanup=null,n=n.alternate,n!=null&&(n.refCleanup=null)}else if(typeof i=="function")try{i(null)}catch(d){Be(n,s,d)}else i.current=null}function Hm(n){var s=n.type,i=n.memoizedProps,l=n.stateNode;try{e:switch(s){case"button":case"input":case"select":case"textarea":i.autoFocus&&l.focus();break e;case"img":i.src?l.src=i.src:i.srcSet&&(l.srcset=i.srcSet)}}catch(d){Be(n,n.return,d)}}function gd(n,s,i){try{var l=n.stateNode;F_(l,n.type,i,s),l[Gt]=s}catch(d){Be(n,n.return,d)}}function qm(n){return n.tag===5||n.tag===3||n.tag===26||n.tag===27&&Vr(n.type)||n.tag===4}function yd(n){e:for(;;){for(;n.sibling===null;){if(n.return===null||qm(n.return))return null;n=n.return}for(n.sibling.return=n.return,n=n.sibling;n.tag!==5&&n.tag!==6&&n.tag!==18;){if(n.tag===27&&Vr(n.type)||n.flags&2||n.child===null||n.tag===4)continue e;n.child.return=n,n=n.child}if(!(n.flags&2))return n.stateNode}}function vd(n,s,i){var l=n.tag;if(l===5||l===6)n=n.stateNode,s?(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i).insertBefore(n,s):(s=i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,s.appendChild(n),i=i._reactRootContainer,i!=null||s.onclick!==null||(s.onclick=Wn));else if(l!==4&&(l===27&&Vr(n.type)&&(i=n.stateNode,s=null),n=n.child,n!==null))for(vd(n,s,i),n=n.sibling;n!==null;)vd(n,s,i),n=n.sibling}function yl(n,s,i){var l=n.tag;if(l===5||l===6)n=n.stateNode,s?i.insertBefore(n,s):i.appendChild(n);else if(l!==4&&(l===27&&Vr(n.type)&&(i=n.stateNode),n=n.child,n!==null))for(yl(n,s,i),n=n.sibling;n!==null;)yl(n,s,i),n=n.sibling}function $m(n){var s=n.stateNode,i=n.memoizedProps;try{for(var l=n.type,d=s.attributes;d.length;)s.removeAttributeNode(d[0]);Mt(s,l,i),s[Ot]=n,s[Gt]=i}catch(h){Be(n,n.return,h)}}var cr=!1,ct=!1,bd=!1,Gm=typeof WeakSet=="function"?WeakSet:Set,Et=null;function A_(n,s){if(n=n.containerInfo,Id=Pl,n=np(n),fu(n)){if("selectionStart"in n)var i={start:n.selectionStart,end:n.selectionEnd};else e:{i=(i=n.ownerDocument)&&i.defaultView||window;var l=i.getSelection&&i.getSelection();if(l&&l.rangeCount!==0){i=l.anchorNode;var d=l.anchorOffset,h=l.focusNode;l=l.focusOffset;try{i.nodeType,h.nodeType}catch{i=null;break e}var v=0,S=-1,O=-1,P=0,q=0,Y=n,B=null;t:for(;;){for(var I;Y!==i||d!==0&&Y.nodeType!==3||(S=v+d),Y!==h||l!==0&&Y.nodeType!==3||(O=v+l),Y.nodeType===3&&(v+=Y.nodeValue.length),(I=Y.firstChild)!==null;)B=Y,Y=I;for(;;){if(Y===n)break t;if(B===i&&++P===d&&(S=v),B===h&&++q===l&&(O=v),(I=Y.nextSibling)!==null)break;Y=B,B=Y.parentNode}Y=I}i=S===-1||O===-1?null:{start:S,end:O}}else i=null}i=i||{start:0,end:0}}else i=null;for(Hd={focusedElem:n,selectionRange:i},Pl=!1,Et=s;Et!==null;)if(s=Et,n=s.child,(s.subtreeFlags&1028)!==0&&n!==null)n.return=s,Et=n;else for(;Et!==null;){switch(s=Et,h=s.alternate,n=s.flags,s.tag){case 0:if((n&4)!==0&&(n=s.updateQueue,n=n!==null?n.events:null,n!==null))for(i=0;i<n.length;i++)d=n[i],d.ref.impl=d.nextImpl;break;case 11:case 15:break;case 1:if((n&1024)!==0&&h!==null){n=void 0,i=s,d=h.memoizedProps,h=h.memoizedState,l=i.stateNode;try{var oe=Ns(i.type,d);n=l.getSnapshotBeforeUpdate(oe,h),l.__reactInternalSnapshotBeforeUpdate=n}catch(me){Be(i,i.return,me)}}break;case 3:if((n&1024)!==0){if(n=s.stateNode.containerInfo,i=n.nodeType,i===9)Gd(n);else if(i===1)switch(n.nodeName){case"HEAD":case"HTML":case"BODY":Gd(n);break;default:n.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((n&1024)!==0)throw Error(a(163))}if(n=s.sibling,n!==null){n.return=s.return,Et=n;break}Et=s.return}}function Vm(n,s,i){var l=i.flags;switch(i.tag){case 0:case 11:case 15:dr(n,i),l&4&&ji(5,i);break;case 1:if(dr(n,i),l&4)if(n=i.stateNode,s===null)try{n.componentDidMount()}catch(v){Be(i,i.return,v)}else{var d=Ns(i.type,s.memoizedProps);s=s.memoizedState;try{n.componentDidUpdate(d,s,n.__reactInternalSnapshotBeforeUpdate)}catch(v){Be(i,i.return,v)}}l&64&&Bm(i),l&512&&Mi(i,i.return);break;case 3:if(dr(n,i),l&64&&(n=i.updateQueue,n!==null)){if(s=null,i.child!==null)switch(i.child.tag){case 27:case 5:s=i.child.stateNode;break;case 1:s=i.child.stateNode}try{Cp(n,s)}catch(v){Be(i,i.return,v)}}break;case 27:s===null&&l&4&&$m(i);case 26:case 5:dr(n,i),s===null&&l&4&&Hm(i),l&512&&Mi(i,i.return);break;case 12:dr(n,i);break;case 31:dr(n,i),l&4&&Fm(n,i);break;case 13:dr(n,i),l&4&&Jm(n,i),l&64&&(n=i.memoizedState,n!==null&&(n=n.dehydrated,n!==null&&(i=U_.bind(null,i),nS(n,i))));break;case 22:if(l=i.memoizedState!==null||cr,!l){s=s!==null&&s.memoizedState!==null||ct,d=cr;var h=ct;cr=l,(ct=s)&&!h?fr(n,i,(i.subtreeFlags&8772)!==0):dr(n,i),cr=d,ct=h}break;case 30:break;default:dr(n,i)}}function Km(n){var s=n.alternate;s!==null&&(n.alternate=null,Km(s)),n.child=null,n.deletions=null,n.sibling=null,n.tag===5&&(s=n.stateNode,s!==null&&Jc(s)),n.stateNode=null,n.return=null,n.dependencies=null,n.memoizedProps=null,n.memoizedState=null,n.pendingProps=null,n.stateNode=null,n.updateQueue=null}var Qe=null,Kt=!1;function ur(n,s,i){for(i=i.child;i!==null;)Ym(n,s,i),i=i.sibling}function Ym(n,s,i){if(Pt&&typeof Pt.onCommitFiberUnmount=="function")try{Pt.onCommitFiberUnmount(gs,i)}catch{}switch(i.tag){case 26:ct||Hn(i,s),ur(n,s,i),i.memoizedState?i.memoizedState.count--:i.stateNode&&(i=i.stateNode,i.parentNode.removeChild(i));break;case 27:ct||Hn(i,s);var l=Qe,d=Kt;Vr(i.type)&&(Qe=i.stateNode,Kt=!1),ur(n,s,i),Hi(i.stateNode),Qe=l,Kt=d;break;case 5:ct||Hn(i,s);case 6:if(l=Qe,d=Kt,Qe=null,ur(n,s,i),Qe=l,Kt=d,Qe!==null)if(Kt)try{(Qe.nodeType===9?Qe.body:Qe.nodeName==="HTML"?Qe.ownerDocument.body:Qe).removeChild(i.stateNode)}catch(h){Be(i,s,h)}else try{Qe.removeChild(i.stateNode)}catch(h){Be(i,s,h)}break;case 18:Qe!==null&&(Kt?(n=Qe,Bg(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,i.stateNode),Pa(n)):Bg(Qe,i.stateNode));break;case 4:l=Qe,d=Kt,Qe=i.stateNode.containerInfo,Kt=!0,ur(n,s,i),Qe=l,Kt=d;break;case 0:case 11:case 14:case 15:Pr(2,i,s),ct||Pr(4,i,s),ur(n,s,i);break;case 1:ct||(Hn(i,s),l=i.stateNode,typeof l.componentWillUnmount=="function"&&Im(i,s,l)),ur(n,s,i);break;case 21:ur(n,s,i);break;case 22:ct=(l=ct)||i.memoizedState!==null,ur(n,s,i),ct=l;break;default:ur(n,s,i)}}function Fm(n,s){if(s.memoizedState===null&&(n=s.alternate,n!==null&&(n=n.memoizedState,n!==null))){n=n.dehydrated;try{Pa(n)}catch(i){Be(s,s.return,i)}}}function Jm(n,s){if(s.memoizedState===null&&(n=s.alternate,n!==null&&(n=n.memoizedState,n!==null&&(n=n.dehydrated,n!==null))))try{Pa(n)}catch(i){Be(s,s.return,i)}}function O_(n){switch(n.tag){case 31:case 13:case 19:var s=n.stateNode;return s===null&&(s=n.stateNode=new Gm),s;case 22:return n=n.stateNode,s=n._retryCache,s===null&&(s=n._retryCache=new Gm),s;default:throw Error(a(435,n.tag))}}function vl(n,s){var i=O_(n);s.forEach(function(l){if(!i.has(l)){i.add(l);var d=z_.bind(null,n,l);l.then(d,d)}})}function Yt(n,s){var i=s.deletions;if(i!==null)for(var l=0;l<i.length;l++){var d=i[l],h=n,v=s,S=v;e:for(;S!==null;){switch(S.tag){case 27:if(Vr(S.type)){Qe=S.stateNode,Kt=!1;break e}break;case 5:Qe=S.stateNode,Kt=!1;break e;case 3:case 4:Qe=S.stateNode.containerInfo,Kt=!0;break e}S=S.return}if(Qe===null)throw Error(a(160));Ym(h,v,d),Qe=null,Kt=!1,h=d.alternate,h!==null&&(h.return=null),d.return=null}if(s.subtreeFlags&13886)for(s=s.child;s!==null;)Qm(s,n),s=s.sibling}var Cn=null;function Qm(n,s){var i=n.alternate,l=n.flags;switch(n.tag){case 0:case 11:case 14:case 15:Yt(s,n),Ft(n),l&4&&(Pr(3,n,n.return),ji(3,n),Pr(5,n,n.return));break;case 1:Yt(s,n),Ft(n),l&512&&(ct||i===null||Hn(i,i.return)),l&64&&cr&&(n=n.updateQueue,n!==null&&(l=n.callbacks,l!==null&&(i=n.shared.hiddenCallbacks,n.shared.hiddenCallbacks=i===null?l:i.concat(l))));break;case 26:var d=Cn;if(Yt(s,n),Ft(n),l&512&&(ct||i===null||Hn(i,i.return)),l&4){var h=i!==null?i.memoizedState:null;if(l=n.memoizedState,i===null)if(l===null)if(n.stateNode===null){e:{l=n.type,i=n.memoizedProps,d=d.ownerDocument||d;t:switch(l){case"title":h=d.getElementsByTagName("title")[0],(!h||h[ai]||h[Ot]||h.namespaceURI==="http://www.w3.org/2000/svg"||h.hasAttribute("itemprop"))&&(h=d.createElement(l),d.head.insertBefore(h,d.querySelector("head > title"))),Mt(h,l,i),h[Ot]=n,St(h),l=h;break e;case"link":var v=Qg("link","href",d).get(l+(i.href||""));if(v){for(var S=0;S<v.length;S++)if(h=v[S],h.getAttribute("href")===(i.href==null||i.href===""?null:i.href)&&h.getAttribute("rel")===(i.rel==null?null:i.rel)&&h.getAttribute("title")===(i.title==null?null:i.title)&&h.getAttribute("crossorigin")===(i.crossOrigin==null?null:i.crossOrigin)){v.splice(S,1);break t}}h=d.createElement(l),Mt(h,l,i),d.head.appendChild(h);break;case"meta":if(v=Qg("meta","content",d).get(l+(i.content||""))){for(S=0;S<v.length;S++)if(h=v[S],h.getAttribute("content")===(i.content==null?null:""+i.content)&&h.getAttribute("name")===(i.name==null?null:i.name)&&h.getAttribute("property")===(i.property==null?null:i.property)&&h.getAttribute("http-equiv")===(i.httpEquiv==null?null:i.httpEquiv)&&h.getAttribute("charset")===(i.charSet==null?null:i.charSet)){v.splice(S,1);break t}}h=d.createElement(l),Mt(h,l,i),d.head.appendChild(h);break;default:throw Error(a(468,l))}h[Ot]=n,St(h),l=h}n.stateNode=l}else Xg(d,n.type,n.stateNode);else n.stateNode=Jg(d,l,n.memoizedProps);else h!==l?(h===null?i.stateNode!==null&&(i=i.stateNode,i.parentNode.removeChild(i)):h.count--,l===null?Xg(d,n.type,n.stateNode):Jg(d,l,n.memoizedProps)):l===null&&n.stateNode!==null&&gd(n,n.memoizedProps,i.memoizedProps)}break;case 27:Yt(s,n),Ft(n),l&512&&(ct||i===null||Hn(i,i.return)),i!==null&&l&4&&gd(n,n.memoizedProps,i.memoizedProps);break;case 5:if(Yt(s,n),Ft(n),l&512&&(ct||i===null||Hn(i,i.return)),n.flags&32){d=n.stateNode;try{oa(d,"")}catch(oe){Be(n,n.return,oe)}}l&4&&n.stateNode!=null&&(d=n.memoizedProps,gd(n,d,i!==null?i.memoizedProps:d)),l&1024&&(bd=!0);break;case 6:if(Yt(s,n),Ft(n),l&4){if(n.stateNode===null)throw Error(a(162));l=n.memoizedProps,i=n.stateNode;try{i.nodeValue=l}catch(oe){Be(n,n.return,oe)}}break;case 3:if(Dl=null,d=Cn,Cn=Ml(s.containerInfo),Yt(s,n),Cn=d,Ft(n),l&4&&i!==null&&i.memoizedState.isDehydrated)try{Pa(s.containerInfo)}catch(oe){Be(n,n.return,oe)}bd&&(bd=!1,Xm(n));break;case 4:l=Cn,Cn=Ml(n.stateNode.containerInfo),Yt(s,n),Ft(n),Cn=l;break;case 12:Yt(s,n),Ft(n);break;case 31:Yt(s,n),Ft(n),l&4&&(l=n.updateQueue,l!==null&&(n.updateQueue=null,vl(n,l)));break;case 13:Yt(s,n),Ft(n),n.child.flags&8192&&n.memoizedState!==null!=(i!==null&&i.memoizedState!==null)&&(wl=wt()),l&4&&(l=n.updateQueue,l!==null&&(n.updateQueue=null,vl(n,l)));break;case 22:d=n.memoizedState!==null;var O=i!==null&&i.memoizedState!==null,P=cr,q=ct;if(cr=P||d,ct=q||O,Yt(s,n),ct=q,cr=P,Ft(n),l&8192)e:for(s=n.stateNode,s._visibility=d?s._visibility&-2:s._visibility|1,d&&(i===null||O||cr||ct||Ds(n)),i=null,s=n;;){if(s.tag===5||s.tag===26){if(i===null){O=i=s;try{if(h=O.stateNode,d)v=h.style,typeof v.setProperty=="function"?v.setProperty("display","none","important"):v.display="none";else{S=O.stateNode;var Y=O.memoizedProps.style,B=Y!=null&&Y.hasOwnProperty("display")?Y.display:null;S.style.display=B==null||typeof B=="boolean"?"":(""+B).trim()}}catch(oe){Be(O,O.return,oe)}}}else if(s.tag===6){if(i===null){O=s;try{O.stateNode.nodeValue=d?"":O.memoizedProps}catch(oe){Be(O,O.return,oe)}}}else if(s.tag===18){if(i===null){O=s;try{var I=O.stateNode;d?Ig(I,!0):Ig(O.stateNode,!1)}catch(oe){Be(O,O.return,oe)}}}else if((s.tag!==22&&s.tag!==23||s.memoizedState===null||s===n)&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===n)break e;for(;s.sibling===null;){if(s.return===null||s.return===n)break e;i===s&&(i=null),s=s.return}i===s&&(i=null),s.sibling.return=s.return,s=s.sibling}l&4&&(l=n.updateQueue,l!==null&&(i=l.retryQueue,i!==null&&(l.retryQueue=null,vl(n,i))));break;case 19:Yt(s,n),Ft(n),l&4&&(l=n.updateQueue,l!==null&&(n.updateQueue=null,vl(n,l)));break;case 30:break;case 21:break;default:Yt(s,n),Ft(n)}}function Ft(n){var s=n.flags;if(s&2){try{for(var i,l=n.return;l!==null;){if(qm(l)){i=l;break}l=l.return}if(i==null)throw Error(a(160));switch(i.tag){case 27:var d=i.stateNode,h=yd(n);yl(n,h,d);break;case 5:var v=i.stateNode;i.flags&32&&(oa(v,""),i.flags&=-33);var S=yd(n);yl(n,S,v);break;case 3:case 4:var O=i.stateNode.containerInfo,P=yd(n);vd(n,P,O);break;default:throw Error(a(161))}}catch(q){Be(n,n.return,q)}n.flags&=-3}s&4096&&(n.flags&=-4097)}function Xm(n){if(n.subtreeFlags&1024)for(n=n.child;n!==null;){var s=n;Xm(s),s.tag===5&&s.flags&1024&&s.stateNode.reset(),n=n.sibling}}function dr(n,s){if(s.subtreeFlags&8772)for(s=s.child;s!==null;)Vm(n,s.alternate,s),s=s.sibling}function Ds(n){for(n=n.child;n!==null;){var s=n;switch(s.tag){case 0:case 11:case 14:case 15:Pr(4,s,s.return),Ds(s);break;case 1:Hn(s,s.return);var i=s.stateNode;typeof i.componentWillUnmount=="function"&&Im(s,s.return,i),Ds(s);break;case 27:Hi(s.stateNode);case 26:case 5:Hn(s,s.return),Ds(s);break;case 22:s.memoizedState===null&&Ds(s);break;case 30:Ds(s);break;default:Ds(s)}n=n.sibling}}function fr(n,s,i){for(i=i&&(s.subtreeFlags&8772)!==0,s=s.child;s!==null;){var l=s.alternate,d=n,h=s,v=h.flags;switch(h.tag){case 0:case 11:case 15:fr(d,h,i),ji(4,h);break;case 1:if(fr(d,h,i),l=h,d=l.stateNode,typeof d.componentDidMount=="function")try{d.componentDidMount()}catch(P){Be(l,l.return,P)}if(l=h,d=l.updateQueue,d!==null){var S=l.stateNode;try{var O=d.shared.hiddenCallbacks;if(O!==null)for(d.shared.hiddenCallbacks=null,d=0;d<O.length;d++)Op(O[d],S)}catch(P){Be(l,l.return,P)}}i&&v&64&&Bm(h),Mi(h,h.return);break;case 27:$m(h);case 26:case 5:fr(d,h,i),i&&l===null&&v&4&&Hm(h),Mi(h,h.return);break;case 12:fr(d,h,i);break;case 31:fr(d,h,i),i&&v&4&&Fm(d,h);break;case 13:fr(d,h,i),i&&v&4&&Jm(d,h);break;case 22:h.memoizedState===null&&fr(d,h,i),Mi(h,h.return);break;case 30:break;default:fr(d,h,i)}s=s.sibling}}function wd(n,s){var i=null;n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(i=n.memoizedState.cachePool.pool),n=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(n=s.memoizedState.cachePool.pool),n!==i&&(n!=null&&n.refCount++,i!=null&&vi(i))}function _d(n,s){n=null,s.alternate!==null&&(n=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==n&&(s.refCount++,n!=null&&vi(n))}function kn(n,s,i,l){if(s.subtreeFlags&10256)for(s=s.child;s!==null;)Zm(n,s,i,l),s=s.sibling}function Zm(n,s,i,l){var d=s.flags;switch(s.tag){case 0:case 11:case 15:kn(n,s,i,l),d&2048&&ji(9,s);break;case 1:kn(n,s,i,l);break;case 3:kn(n,s,i,l),d&2048&&(n=null,s.alternate!==null&&(n=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==n&&(s.refCount++,n!=null&&vi(n)));break;case 12:if(d&2048){kn(n,s,i,l),n=s.stateNode;try{var h=s.memoizedProps,v=h.id,S=h.onPostCommit;typeof S=="function"&&S(v,s.alternate===null?"mount":"update",n.passiveEffectDuration,-0)}catch(O){Be(s,s.return,O)}}else kn(n,s,i,l);break;case 31:kn(n,s,i,l);break;case 13:kn(n,s,i,l);break;case 23:break;case 22:h=s.stateNode,v=s.alternate,s.memoizedState!==null?h._visibility&2?kn(n,s,i,l):Ni(n,s):h._visibility&2?kn(n,s,i,l):(h._visibility|=2,Aa(n,s,i,l,(s.subtreeFlags&10256)!==0||!1)),d&2048&&wd(v,s);break;case 24:kn(n,s,i,l),d&2048&&_d(s.alternate,s);break;default:kn(n,s,i,l)}}function Aa(n,s,i,l,d){for(d=d&&((s.subtreeFlags&10256)!==0||!1),s=s.child;s!==null;){var h=n,v=s,S=i,O=l,P=v.flags;switch(v.tag){case 0:case 11:case 15:Aa(h,v,S,O,d),ji(8,v);break;case 23:break;case 22:var q=v.stateNode;v.memoizedState!==null?q._visibility&2?Aa(h,v,S,O,d):Ni(h,v):(q._visibility|=2,Aa(h,v,S,O,d)),d&&P&2048&&wd(v.alternate,v);break;case 24:Aa(h,v,S,O,d),d&&P&2048&&_d(v.alternate,v);break;default:Aa(h,v,S,O,d)}s=s.sibling}}function Ni(n,s){if(s.subtreeFlags&10256)for(s=s.child;s!==null;){var i=n,l=s,d=l.flags;switch(l.tag){case 22:Ni(i,l),d&2048&&wd(l.alternate,l);break;case 24:Ni(i,l),d&2048&&_d(l.alternate,l);break;default:Ni(i,l)}s=s.sibling}}var Di=8192;function Oa(n,s,i){if(n.subtreeFlags&Di)for(n=n.child;n!==null;)Wm(n,s,i),n=n.sibling}function Wm(n,s,i){switch(n.tag){case 26:Oa(n,s,i),n.flags&Di&&n.memoizedState!==null&&pS(i,Cn,n.memoizedState,n.memoizedProps);break;case 5:Oa(n,s,i);break;case 3:case 4:var l=Cn;Cn=Ml(n.stateNode.containerInfo),Oa(n,s,i),Cn=l;break;case 22:n.memoizedState===null&&(l=n.alternate,l!==null&&l.memoizedState!==null?(l=Di,Di=16777216,Oa(n,s,i),Di=l):Oa(n,s,i));break;default:Oa(n,s,i)}}function eg(n){var s=n.alternate;if(s!==null&&(n=s.child,n!==null)){s.child=null;do s=n.sibling,n.sibling=null,n=s;while(n!==null)}}function Li(n){var s=n.deletions;if((n.flags&16)!==0){if(s!==null)for(var i=0;i<s.length;i++){var l=s[i];Et=l,ng(l,n)}eg(n)}if(n.subtreeFlags&10256)for(n=n.child;n!==null;)tg(n),n=n.sibling}function tg(n){switch(n.tag){case 0:case 11:case 15:Li(n),n.flags&2048&&Pr(9,n,n.return);break;case 3:Li(n);break;case 12:Li(n);break;case 22:var s=n.stateNode;n.memoizedState!==null&&s._visibility&2&&(n.return===null||n.return.tag!==13)?(s._visibility&=-3,bl(n)):Li(n);break;default:Li(n)}}function bl(n){var s=n.deletions;if((n.flags&16)!==0){if(s!==null)for(var i=0;i<s.length;i++){var l=s[i];Et=l,ng(l,n)}eg(n)}for(n=n.child;n!==null;){switch(s=n,s.tag){case 0:case 11:case 15:Pr(8,s,s.return),bl(s);break;case 22:i=s.stateNode,i._visibility&2&&(i._visibility&=-3,bl(s));break;default:bl(s)}n=n.sibling}}function ng(n,s){for(;Et!==null;){var i=Et;switch(i.tag){case 0:case 11:case 15:Pr(8,i,s);break;case 23:case 22:if(i.memoizedState!==null&&i.memoizedState.cachePool!==null){var l=i.memoizedState.cachePool.pool;l!=null&&l.refCount++}break;case 24:vi(i.memoizedState.cache)}if(l=i.child,l!==null)l.return=i,Et=l;else e:for(i=n;Et!==null;){l=Et;var d=l.sibling,h=l.return;if(Km(l),l===i){Et=null;break e}if(d!==null){d.return=h,Et=d;break e}Et=h}}}var C_={getCacheForType:function(n){var s=kt(it),i=s.data.get(n);return i===void 0&&(i=n(),s.data.set(n,i)),i},cacheSignal:function(){return kt(it).controller.signal}},k_=typeof WeakMap=="function"?WeakMap:Map,Ue=0,Ge=null,Oe=null,ke=0,Pe=0,ln=null,Br=!1,Ca=!1,Sd=!1,hr=0,tt=0,Ir=0,Ls=0,Ed=0,cn=0,ka=0,Ui=null,Jt=null,Td=!1,wl=0,rg=0,_l=1/0,Sl=null,Hr=null,pt=0,qr=null,ja=null,pr=0,Rd=0,xd=null,sg=null,zi=0,Ad=null;
vendor: 4,419 bytes, line 9
9function un(){return(Ue&2)!==0&&ke!==0?ke&-ke:D.T!==null?Nd():Yc()}function ag(){if(cn===0)if((ke&536870912)===0||Me){var n=Ws;Ws<<=1,(Ws&3932160)===0&&(Ws=262144),cn=n}else cn=536870912;return n=an.current,n!==null&&(n.flags|=32),cn}function Qt(n,s,i){(n===Ge&&(Pe===2||Pe===9)||n.cancelPendingCommit!==null)&&(Ma(n,0),$r(n,ke,cn,!1)),Ze(n,i),((Ue&2)===0||n!==Ge)&&(n===Ge&&((Ue&2)===0&&(Ls|=i),tt===4&&$r(n,ke,cn,!1)),qn(n))}function ig(n,s,i){if((Ue&6)!==0)throw Error(a(327));var l=!i&&(s&127)===0&&(s&n.expiredLanes)===0||Je(n,s),d=l?N_(n,s):Cd(n,s,!0),h=l;do{if(d===0){Ca&&!l&&$r(n,s,0,!1);break}else{if(i=n.current.alternate,h&&!j_(i)){d=Cd(n,s,!1),h=!1;continue}if(d===2){if(h=s,n.errorRecoveryDisabledLanes&h)var v=0;else v=n.pendingLanes&-536870913,v=v!==0?v:v&536870912?536870912:0;if(v!==0){s=v;e:{var S=n;d=Ui;var O=S.current.memoizedState.isDehydrated;if(O&&(Ma(S,v).flags|=256),v=Cd(S,v,!1),v!==2){if(Sd&&!O){S.errorRecoveryDisabledLanes|=h,Ls|=h,d=4;break e}h=Jt,Jt=d,h!==null&&(Jt===null?Jt=h:Jt.push.apply(Jt,h))}d=v}if(h=!1,d!==2)continue}}if(d===1){Ma(n,0),$r(n,s,0,!0);break}e:{switch(l=n,h=d,h){case 0:case 1:throw Error(a(345));case 4:if((s&4194048)!==s)break;case 6:$r(l,s,cn,!Br);break e;case 2:Jt=null;break;case 3:case 5:break;default:throw Error(a(329))}if((s&62914560)===s&&(d=wl+300-wt(),10<d)){if($r(l,s,cn,!Br),be(l,0,!0)!==0)break e;pr=s,l.timeoutHandle=zg(og.bind(null,l,i,Jt,Sl,Td,s,cn,Ls,ka,Br,h,"Throttled",-0,0),d);break e}og(l,i,Jt,Sl,Td,s,cn,Ls,ka,Br,h,null,-0,0)}}break}while(!0);qn(n)}function og(n,s,i,l,d,h,v,S,O,P,q,Y,B,I){if(n.timeoutHandle=-1,Y=s.subtreeFlags,Y&8192||(Y&16785408)===16785408){Y={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Wn},Wm(s,h,Y);var oe=(h&62914560)===h?wl-wt():(h&4194048)===h?rg-wt():0;if(oe=mS(Y,oe),oe!==null){pr=h,n.cancelPendingCommit=oe(mg.bind(null,n,s,h,i,l,d,v,S,O,q,Y,null,B,I)),$r(n,h,v,!P);return}}mg(n,s,h,i,l,d,v,S,O)}function j_(n){for(var s=n;;){var i=s.tag;if((i===0||i===11||i===15)&&s.flags&16384&&(i=s.updateQueue,i!==null&&(i=i.stores,i!==null)))for(var l=0;l<i.length;l++){var d=i[l],h=d.getSnapshot;d=d.value;try{if(!rn(h(),d))return!1}catch{return!1}}if(i=s.child,s.subtreeFlags&16384&&i!==null)i.return=s,s=i;else{if(s===n)break;for(;s.sibling===null;){if(s.return===null||s.return===n)return!0;s=s.return}s.sibling.return=s.return,s=s.sibling}}return!0}function $r(n,s,i,l){s&=~Ed,s&=~Ls,n.suspendedLanes|=s,n.pingedLanes&=~s,l&&(n.warmLanes|=s),l=n.expirationTimes;for(var d=s;0<d;){var h=31-Dt(d),v=1<<h;l[h]=-1,d&=~v}i!==0&&vs(n,i,s)}function El(){return(Ue&6)===0?(Pi(0),!1):!0}function Od(){if(Oe!==null){if(Pe===0)var n=Oe.return;else n=Oe,rr=xs=null,Gu(n),Sa=null,wi=0,n=Oe;for(;n!==null;)Pm(n.alternate,n),n=n.return;Oe=null}}function Ma(n,s){var i=n.timeoutHandle;i!==-1&&(n.timeoutHandle=-1,X_(i)),i=n.cancelPendingCommit,i!==null&&(n.cancelPendingCommit=null,i()),pr=0,Od(),Ge=n,Oe=i=tr(n.current,null),ke=s,Pe=0,ln=null,Br=!1,Ca=Je(n,s),Sd=!1,ka=cn=Ed=Ls=Ir=tt=0,Jt=Ui=null,Td=!1,(s&8)!==0&&(s|=s&32);var l=n.entangledLanes;if(l!==0)for(n=n.entanglements,l&=s;0<l;){var d=31-Dt(l),h=1<<d;s|=n[d],l&=~h}return hr=s,Go(),i}function lg(n,s){Te=null,D.H=Oi,s===_a||s===Zo?(s=Tp(),Pe=3):s===Mu?(s=Tp(),Pe=4):Pe=s===id?8:s!==null&&typeof s=="object"&&typeof s.then=="function"?6:1,ln=s,Oe===null&&(tt=1,fl(n,yn(s,n.current)))}function cg(){var n=an.current;return n===null?!0:(ke&4194048)===ke?_n===null:(ke&62914560)===ke||(ke&536870912)!==0?n===_n:!1}function ug(){var n=D.H;return D.H=Oi,n===null?Oi:n}function dg(){var n=D.A;return D.A=C_,n}function Tl(){tt=4,Br||(ke&4194048)!==ke&&an.current!==null||(Ca=!0),(Ir&134217727)===0&&(Ls&134217727)===0||Ge===null||$r(Ge,ke,cn,!1)}function Cd(n,s,i){var l=Ue;Ue|=2;var d=ug(),h=dg();(Ge!==n||ke!==s)&&(Sl=null,Ma(n,s)),s=!1;var v=tt;e:do try{if(Pe!==0&&Oe!==null){var S=Oe,O=ln;switch(Pe){case 8:Od(),v=6;break e;case 3:case 2:case 9:case 6:an.current===null&&(s=!0);var P=Pe;if(Pe=0,ln=null,Na(n,S,O,P),i&&Ca){v=0;break e}break;default:P=Pe,Pe=0,ln=null,Na(n,S,O,P)}}M_(),v=tt;break}catch(q){lg(n,q)}while(!0);return s&&n.shellSuspendCounter++,rr=xs=null,Ue=l,D.H=d,D.A=h,Oe===null&&(Ge=null,ke=0,Go()),v}function M_(){for(;Oe!==null;)fg(Oe)}function N_(n,s){var i=Ue;Ue|=2;var l=ug(),d=dg();Ge!==n||ke!==s?(Sl=null,_l=wt()+500,Ma(n,s)):Ca=Je(n,s);e:do try{if(Pe!==0&&Oe!==null){s=Oe;
vendor: 4,539 bytes, line 9
9var h=ln;t:switch(Pe){case 1:Pe=0,ln=null,Na(n,s,h,1);break;case 2:case 9:if(Sp(h)){Pe=0,ln=null,hg(s);break}s=function(){Pe!==2&&Pe!==9||Ge!==n||(Pe=7),qn(n)},h.then(s,s);break e;case 3:Pe=7;break e;case 4:Pe=5;break e;case 7:Sp(h)?(Pe=0,ln=null,hg(s)):(Pe=0,ln=null,Na(n,s,h,7));break;case 5:var v=null;switch(Oe.tag){case 26:v=Oe.memoizedState;case 5:case 27:var S=Oe;if(v?Zg(v):S.stateNode.complete){Pe=0,ln=null;var O=S.sibling;if(O!==null)Oe=O;else{var P=S.return;P!==null?(Oe=P,Rl(P)):Oe=null}break t}}Pe=0,ln=null,Na(n,s,h,5);break;case 6:Pe=0,ln=null,Na(n,s,h,6);break;case 8:Od(),tt=6;break e;default:throw Error(a(462))}}D_();break}catch(q){lg(n,q)}while(!0);return rr=xs=null,D.H=l,D.A=d,Ue=i,Oe!==null?0:(Ge=null,ke=0,Go(),tt)}function D_(){for(;Oe!==null&&!bt();)fg(Oe)}function fg(n){var s=Um(n.alternate,n,hr);n.memoizedProps=n.pendingProps,s===null?Rl(n):Oe=s}function hg(n){var s=n,i=s.alternate;switch(s.tag){case 15:case 0:s=km(i,s,s.pendingProps,s.type,void 0,ke);break;case 11:s=km(i,s,s.pendingProps,s.type.render,s.ref,ke);break;case 5:Gu(s);default:Pm(i,s),s=Oe=dp(s,hr),s=Um(i,s,hr)}n.memoizedProps=n.pendingProps,s===null?Rl(n):Oe=s}function Na(n,s,i,l){rr=xs=null,Gu(s),Sa=null,wi=0;var d=s.return;try{if(S_(n,d,s,i,ke)){tt=1,fl(n,yn(i,n.current)),Oe=null;return}}catch(h){if(d!==null)throw Oe=d,h;tt=1,fl(n,yn(i,n.current)),Oe=null;return}s.flags&32768?(Me||l===1?n=!0:Ca||(ke&536870912)!==0?n=!1:(Br=n=!0,(l===2||l===9||l===3||l===6)&&(l=an.current,l!==null&&l.tag===13&&(l.flags|=16384))),pg(s,n)):Rl(s)}function Rl(n){var s=n;do{if((s.flags&32768)!==0){pg(s,Br);return}n=s.return;var i=R_(s.alternate,s,hr);if(i!==null){Oe=i;return}if(s=s.sibling,s!==null){Oe=s;return}Oe=s=n}while(s!==null);tt===0&&(tt=5)}function pg(n,s){do{var i=x_(n.alternate,n);if(i!==null){i.flags&=32767,Oe=i;return}if(i=n.return,i!==null&&(i.flags|=32768,i.subtreeFlags=0,i.deletions=null),!s&&(n=n.sibling,n!==null)){Oe=n;return}Oe=n=i}while(n!==null);tt=6,Oe=null}function mg(n,s,i,l,d,h,v,S,O){n.cancelPendingCommit=null;do xl();while(pt!==0);if((Ue&6)!==0)throw Error(a(327));if(s!==null){if(s===n.current)throw Error(a(177));if(h=s.lanes|s.childLanes,h|=yu,Ht(n,i,h,v,S,O),n===Ge&&(Oe=Ge=null,ke=0),ja=s,qr=n,pr=i,Rd=h,xd=d,sg=l,(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?(n.callbackNode=null,n.callbackPriority=0,P_(Qn,function(){return wg(),null})):(n.callbackNode=null,n.callbackPriority=0),l=(s.flags&13878)!==0,(s.subtreeFlags&13878)!==0||l){l=D.T,D.T=null,d=F.p,F.p=2,v=Ue,Ue|=4;try{A_(n,s,i)}finally{Ue=v,F.p=d,D.T=l}}pt=1,gg(),yg(),vg()}}function gg(){if(pt===1){pt=0;var n=qr,s=ja,i=(s.flags&13878)!==0;if((s.subtreeFlags&13878)!==0||i){i=D.T,D.T=null;var l=F.p;F.p=2;var d=Ue;Ue|=4;try{Qm(s,n);var h=Hd,v=np(n.containerInfo),S=h.focusedElem,O=h.selectionRange;if(v!==S&&S&&S.ownerDocument&&tp(S.ownerDocument.documentElement,S)){if(O!==null&&fu(S)){var P=O.start,q=O.end;if(q===void 0&&(q=P),"selectionStart"in S)S.selectionStart=P,S.selectionEnd=Math.min(q,S.value.length);else{var Y=S.ownerDocument||document,B=Y&&Y.defaultView||window;if(B.getSelection){var I=B.getSelection(),oe=S.textContent.length,me=Math.min(O.start,oe),$e=O.end===void 0?me:Math.min(O.end,oe);!I.extend&&me>$e&&(v=$e,$e=me,me=v);var N=ep(S,me),k=ep(S,$e);if(N&&k&&(I.rangeCount!==1||I.anchorNode!==N.node||I.anchorOffset!==N.offset||I.focusNode!==k.node||I.focusOffset!==k.offset)){var z=Y.createRange();z.setStart(N.node,N.offset),I.removeAllRanges(),me>$e?(I.addRange(z),I.extend(k.node,k.offset)):(z.setEnd(k.node,k.offset),I.addRange(z))}}}}for(Y=[],I=S;I=I.parentNode;)I.nodeType===1&&Y.push({element:I,left:I.scrollLeft,top:I.scrollTop});for(typeof S.focus=="function"&&S.focus(),S=0;S<Y.length;S++){var V=Y[S];V.element.scrollLeft=V.left,V.element.scrollTop=V.top}}Pl=!!Id,Hd=Id=null}finally{Ue=d,F.p=l,D.T=i}}n.current=s,pt=2}}function yg(){if(pt===2){pt=0;var n=qr,s=ja,i=(s.flags&8772)!==0;if((s.subtreeFlags&8772)!==0||i){i=D.T,D.T=null;var l=F.p;F.p=2;var d=Ue;Ue|=4;try{Vm(n,s.alternate,s)}finally{Ue=d,F.p=l,D.T=i}}pt=3}}function vg(){if(pt===4||pt===3){pt=0,Un();var n=qr,s=ja,i=pr,l=sg;(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?pt=5:(pt=0,ja=qr=null,bg(n,n.pendingLanes));var d=n.pendingLanes;if(d===0&&(Hr=null),An(i),s=s.stateNode,Pt&&typeof Pt.onCommitFiberRoot=="function")try{Pt.onCommitFiberRoot(gs,s,void 0,(s.current.flags&128)===128)}catch{}if(l!==null){s=D.T,d=F.p,F.p=2,D.T=null;try{for(var h=n.onRecoverableError,v=0;v<l.length;v++){var S=l[v];h(S.value,{componentStack:S.stack})}}finally{D.T=s,F.p=d}}
vendor: 9,182 bytes, line 9
9(pr&3)!==0&&xl(),qn(n),d=n.pendingLanes,(i&261930)!==0&&(d&42)!==0?n===Ad?zi++:(zi=0,Ad=n):zi=0,Pi(0)}}function bg(n,s){(n.pooledCacheLanes&=s)===0&&(s=n.pooledCache,s!=null&&(n.pooledCache=null,vi(s)))}function xl(){return gg(),yg(),vg(),wg()}function wg(){if(pt!==5)return!1;var n=qr,s=Rd;Rd=0;var i=An(pr),l=D.T,d=F.p;try{F.p=32>i?32:i,D.T=null,i=xd,xd=null;var h=qr,v=pr;if(pt=0,ja=qr=null,pr=0,(Ue&6)!==0)throw Error(a(331));var S=Ue;if(Ue|=4,tg(h.current),Zm(h,h.current,v,i),Ue=S,Pi(0,!1),Pt&&typeof Pt.onPostCommitFiberRoot=="function")try{Pt.onPostCommitFiberRoot(gs,h)}catch{}return!0}finally{F.p=d,D.T=l,bg(n,s)}}function _g(n,s,i){s=yn(i,s),s=ad(n.stateNode,s,2),n=Lr(n,s,2),n!==null&&(Ze(n,2),qn(n))}function Be(n,s,i){if(n.tag===3)_g(n,n,i);else for(;s!==null;){if(s.tag===3){_g(s,n,i);break}else if(s.tag===1){var l=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(Hr===null||!Hr.has(l))){n=yn(i,n),i=Sm(2),l=Lr(s,i,2),l!==null&&(Em(i,l,s,n),Ze(l,2),qn(l));break}}s=s.return}}function kd(n,s,i){var l=n.pingCache;if(l===null){l=n.pingCache=new k_;var d=new Set;l.set(s,d)}else d=l.get(s),d===void 0&&(d=new Set,l.set(s,d));d.has(i)||(Sd=!0,d.add(i),n=L_.bind(null,n,s,i),s.then(n,n))}function L_(n,s,i){var l=n.pingCache;l!==null&&l.delete(s),n.pingedLanes|=n.suspendedLanes&i,n.warmLanes&=~i,Ge===n&&(ke&i)===i&&(tt===4||tt===3&&(ke&62914560)===ke&&300>wt()-wl?(Ue&2)===0&&Ma(n,0):Ed|=i,ka===ke&&(ka=0)),qn(n)}function Sg(n,s){s===0&&(s=Lt()),n=Es(n,s),n!==null&&(Ze(n,s),qn(n))}function U_(n){var s=n.memoizedState,i=0;s!==null&&(i=s.retryLane),Sg(n,i)}function z_(n,s){var i=0;switch(n.tag){case 31:case 13:var l=n.stateNode,d=n.memoizedState;d!==null&&(i=d.retryLane);break;case 19:l=n.stateNode;break;case 22:l=n.stateNode._retryCache;break;default:throw Error(a(314))}l!==null&&l.delete(s),Sg(n,i)}function P_(n,s){return nn(n,s)}var Al=null,Da=null,jd=!1,Ol=!1,Md=!1,Gr=0;function qn(n){n!==Da&&n.next===null&&(Da===null?Al=Da=n:Da=Da.next=n),Ol=!0,jd||(jd=!0,I_())}function Pi(n,s){if(!Md&&Ol){Md=!0;do for(var i=!1,l=Al;l!==null;){if(n!==0){var d=l.pendingLanes;if(d===0)var h=0;else{var v=l.suspendedLanes,S=l.pingedLanes;h=(1<<31-Dt(42|n)+1)-1,h&=d&~(v&~S),h=h&201326741?h&201326741|1:h?h|2:0}h!==0&&(i=!0,xg(l,h))}else h=ke,h=be(l,l===Ge?h:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(h&3)===0||Je(l,h)||(i=!0,xg(l,h));l=l.next}while(i);Md=!1}}function B_(){Eg()}function Eg(){Ol=jd=!1;var n=0;Gr!==0&&Q_()&&(n=Gr);for(var s=wt(),i=null,l=Al;l!==null;){var d=l.next,h=Tg(l,s);h===0?(l.next=null,i===null?Al=d:i.next=d,d===null&&(Da=i)):(i=l,(n!==0||(h&3)!==0)&&(Ol=!0)),l=d}pt!==0&&pt!==5||Pi(n),Gr!==0&&(Gr=0)}function Tg(n,s){for(var i=n.suspendedLanes,l=n.pingedLanes,d=n.expirationTimes,h=n.pendingLanes&-62914561;0<h;){var v=31-Dt(h),S=1<<v,O=d[v];O===-1?((S&i)===0||(S&l)!==0)&&(d[v]=_t(S,s)):O<=s&&(n.expiredLanes|=S),h&=~S}if(s=Ge,i=ke,i=be(n,n===s?i:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),l=n.callbackNode,i===0||n===s&&(Pe===2||Pe===9)||n.cancelPendingCommit!==null)return l!==null&&l!==null&&ms(l),n.callbackNode=null,n.callbackPriority=0;if((i&3)===0||Je(n,i)){if(s=i&-i,s===n.callbackPriority)return s;switch(l!==null&&ms(l),An(i)){case 2:case 8:i=hn;break;case 32:i=Qn;break;case 268435456:i=Xn;break;default:i=Qn}return l=Rg.bind(null,n),i=nn(i,l),n.callbackPriority=s,n.callbackNode=i,s}return l!==null&&l!==null&&ms(l),n.callbackPriority=2,n.callbackNode=null,2}function Rg(n,s){if(pt!==0&&pt!==5)return n.callbackNode=null,n.callbackPriority=0,null;var i=n.callbackNode;if(xl()&&n.callbackNode!==i)return null;var l=ke;return l=be(n,n===Ge?l:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),l===0?null:(ig(n,l,s),Tg(n,wt()),n.callbackNode!=null&&n.callbackNode===i?Rg.bind(null,n):null)}function xg(n,s){if(xl())return null;ig(n,s,!0)}function I_(){Z_(function(){(Ue&6)!==0?nn(We,B_):Eg()})}function Nd(){if(Gr===0){var n=ba;n===0&&(n=Zs,Zs<<=1,(Zs&261888)===0&&(Zs=256)),Gr=n}return Gr}function Ag(n){return n==null||typeof n=="symbol"||typeof n=="boolean"?null:typeof n=="function"?n:Uo(""+n)}function Og(n,s){var i=s.ownerDocument.createElement("input");return i.name=s.name,i.value=s.value,n.id&&i.setAttribute("form",n.id),s.parentNode.insertBefore(i,s),n=new FormData(n),i.parentNode.removeChild(i),n}function H_(n,s,i,l,d){if(s==="submit"&&i&&i.stateNode===d){var h=Ag((d[Gt]||null).action),v=l.submitter;v&&(s=(s=v[Gt]||null)?Ag(s.formAction):v.getAttribute("formAction"),s!==null&&(h=s,v=null));var S=new Io("action","action",null,l,d);n.push({event:S,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(Gr!==0){var O=v?Og(d,v):new FormData(d);Wu(i,{pending:!0,data:O,method:d.method,action:h},null,O)}}else typeof h=="function"&&(S.preventDefault(),O=v?Og(d,v):new FormData(d),Wu(i,{pending:!0,data:O,method:d.method,action:h},h,O))},currentTarget:d}]})}}for(var Dd=0;Dd<gu.length;Dd++){var Ld=gu[Dd],q_=Ld.toLowerCase(),$_=Ld[0].toUpperCase()+Ld.slice(1);On(q_,"on"+$_)}On(ap,"onAnimationEnd"),On(ip,"onAnimationIteration"),On(op,"onAnimationStart"),On("dblclick","onDoubleClick"),On("focusin","onFocus"),On("focusout","onBlur"),On(a_,"onTransitionRun"),On(i_,"onTransitionStart"),On(o_,"onTransitionCancel"),On(lp,"onTransitionEnd"),aa("onMouseEnter",["mouseout","mouseover"]),aa("onMouseLeave",["mouseout","mouseover"]),aa("onPointerEnter",["pointerout","pointerover"]),aa("onPointerLeave",["pointerout","pointerover"]),bs("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),bs("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),bs("onBeforeInput",["compositionend","keypress","textInput","paste"]),bs("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),bs("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),bs("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Bi="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(" "),G_=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Bi));function Cg(n,s){s=(s&4)!==0;for(var i=0;i<n.length;i++){var l=n[i],d=l.event;l=l.listeners;e:{var h=void 0;if(s)for(var v=l.length-1;0<=v;v--){var S=l[v],O=S.instance,P=S.currentTarget;if(S=S.listener,O!==h&&d.isPropagationStopped())break e;h=S,d.currentTarget=P;try{h(d)}catch(q){$o(q)}d.currentTarget=null,h=O}else for(v=0;v<l.length;v++){if(S=l[v],O=S.instance,P=S.currentTarget,S=S.listener,O!==h&&d.isPropagationStopped())break e;h=S,d.currentTarget=P;try{h(d)}catch(q){$o(q)}d.currentTarget=null,h=O}}}}function Ce(n,s){var i=s[Fc];i===void 0&&(i=s[Fc]=new Set);var l=n+"__bubble";i.has(l)||(kg(s,n,2,!1),i.add(l))}function Ud(n,s,i){var l=0;s&&(l|=4),kg(i,n,l,s)}var Cl="_reactListening"+Math.random().toString(36).slice(2);function zd(n){if(!n[Cl]){n[Cl]=!0,Eh.forEach(function(i){i!=="selectionchange"&&(G_.has(i)||Ud(i,!1,n),Ud(i,!0,n))});var s=n.nodeType===9?n:n.ownerDocument;s===null||s[Cl]||(s[Cl]=!0,Ud("selectionchange",!1,s))}}function kg(n,s,i,l){switch(ay(s)){case 2:var d=vS;break;case 8:d=bS;break;default:d=Zd}i=d.bind(null,s,i,n),d=void 0,!ru||s!=="touchstart"&&s!=="touchmove"&&s!=="wheel"||(d=!0),l?d!==void 0?n.addEventListener(s,i,{capture:!0,passive:d}):n.addEventListener(s,i,!0):d!==void 0?n.addEventListener(s,i,{passive:d}):n.addEventListener(s,i,!1)}function Pd(n,s,i,l,d){var h=l;if((s&1)===0&&(s&2)===0&&l!==null)e:for(;;){if(l===null)return;var v=l.tag;if(v===3||v===4){var S=l.stateNode.containerInfo;if(S===d)break;if(v===4)for(v=l.return;v!==null;){var O=v.tag;if((O===3||O===4)&&v.stateNode.containerInfo===d)return;v=v.return}for(;S!==null;){if(v=na(S),v===null)return;if(O=v.tag,O===5||O===6||O===26||O===27){l=h=v;continue e}S=S.parentNode}}l=l.return}Lh(function(){var P=h,q=tu(i),Y=[];e:{var B=cp.get(n);if(B!==void 0){var I=Io,oe=n;switch(n){case"keypress":if(Po(i)===0)break e;case"keydown":case"keyup":I=zw;break;case"focusin":oe="focus",I=ou;break;case"focusout":oe="blur",I=ou;break;case"beforeblur":case"afterblur":I=ou;break;case"click":if(i.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":I=Ph;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":I=Rw;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":I=Iw;break;case ap:case ip:case op:I=Ow;break;case lp:I=qw;break;case"scroll":case"scrollend":I=Ew;break;case"wheel":I=Gw;break;case"copy":case"cut":case"paste":I=kw;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":I=Ih;break;case"toggle":case"beforetoggle":I=Kw}var me=(s&4)!==0,$e=!me&&(n==="scroll"||n==="scrollend"),N=me?B!==null?B+"
9Capture":null:B;me=[];for(var k=P,z;k!==null;){var V=k;if(z=V.stateNode,V=V.tag,V!==5&&V!==26&&V!==27||z===null||N===null||(V=oi(k,N),V!=null&&me.push(Ii(k,V,z))),$e)break;k=k.return}0<me.length&&(B=new I(B,oe,null,i,q),Y.push({event:B,listeners:me}))}}if((s&7)===0){e:{if(B=n==="mouseover"||n==="pointerover",I=n==="mouseout"||n==="pointerout",B&&i!==eu&&(oe=i.relatedTarget||i.fromElement)&&(na(oe)||oe[ta]))break e;if((I||B)&&(B=q.window===q?q:(B=q.ownerDocument)?B.defaultView||B.parentWindow:window,I?(oe=i.relatedTarget||i.toElement,I=P,oe=oe?na(oe):null,oe!==null&&($e=c(oe),me=oe.tag,oe!==$e||me!==5&&me!==27&&me!==6)&&(oe=null)):(I=null,oe=P),I!==oe)){if(me=Ph,V="onMouseLeave",N="onMouseEnter",k="mouse",(n==="pointerout"||n==="pointerover")&&(me=Ih,V="onPointerLeave",N="onPointerEnter",k="pointer"),$e=I==null?B:ii(I),z=oe==null?B:ii(oe),B=new me(V,k+"leave",I,i,q),B.target=$e,B.relatedTarget=z,V=null,na(q)===P&&(me=new me(N,k+"enter",oe,i,q),me.target=z,me.relatedTarget=$e,V=me),$e=V,I&&oe)t:{for(me=V_,N=I,k=oe,z=0,V=N;V;V=me(V))z++;V=0;for(var he=k;he;he=me(he))V++;for(;0<z-V;)N=me(N),z--;for(;0<V-z;)k=me(k),V--;for(;z--;){if(N===k||k!==null&&N===k.alternate){me=N;break t}N=me(N),k=me(k)}me=null}else me=null;I!==null&&jg(Y,B,I,me,!1),oe!==null&&$e!==null&&jg(Y,$e,oe,me,!0)}}e:{if(B=P?ii(P):window,I=B.nodeName&&B.nodeName.toLowerCase(),I==="select"||I==="input"&&B.type==="file")var Ne=Fh;else if(Kh(B))if(Jh)Ne=n_;else{Ne=e_;var de=Ww}else I=B.nodeName,!I||I.toLowerCase()!=="input"||B.type!=="checkbox"&&B.type!=="radio"?P&&Wc(P.elementType)&&(Ne=Fh):Ne=t_;if(Ne&&(Ne=Ne(n,P))){Yh(Y,Ne,i,q);break e}de&&de(n,B,P),n==="focusout"&&P&&B.type==="number"&&P.memoizedProps.value!=null&&Zc(B,"number",B.value)}switch(de=P?ii(P):window,n){case"focusin":(Kh(de)||de.contentEditable==="true")&&(da=de,hu=P,mi=null);break;case"focusout":mi=hu=da=null;break;case"mousedown":pu=!0;break;case"contextmenu":case"mouseup":case"dragend":pu=!1,rp(Y,i,q);break;case"selectionchange":if(s_)break;case"keydown":case"keyup":rp(Y,i,q)}var Re;if(cu)e:{switch(n){case"compositionstart":var je="onCompositionStart";break e;case"compositionend":je="onCompositionEnd";break e;case"compositionupdate":je="onCompositionUpdate";break e}je=void 0}else ua?Gh(n,i)&&(je="onCompositionEnd"):n==="keydown"&&i.keyCode===229&&(je="onCompositionStart");je&&(Hh&&i.locale!=="ko"&&(ua||je!=="onCompositionStart"?je==="onCompositionEnd"&&ua&&(Re=Uh()):(Or=q,su="value"in Or?Or.value:Or.textContent,ua=!0)),de=kl(P,je),0<de.length&&(je=new Bh(je,n,null,i,q),Y.push({event:je,listeners:de}),Re?je.data=Re:(Re=Vh(i),Re!==null&&(je.data=Re)))),(Re=Fw?Jw(n,i):Qw(n,i))&&(je=kl(P,"onBeforeInput"),0<je.length&&(de=new Bh("onBeforeInput","beforeinput",null,i,q),Y.push({event:de,listeners:je}),de.data=Re)),H_(Y,n,P,i,q)}Cg(Y,s)})}function Ii(n,s,i){return{instance:n,listener:s,currentTarget:i}}function kl(n,s){for(var i=s+"Capture",l=[];n!==null;){var d=n,h=d.stateNode;if(d=d.tag,d!==5&&d!==26&&d!==27||h===null||(d=oi(n,i),d!=null&&l.unshift(Ii(n,d,h)),d=oi(n,s),d!=null&&l.push(Ii(n,d,h))),n.tag===3)return l;n=n.return}return[]}function V_(n){if(n===null)return null;do n=n.return;while(n&&n.tag!==5&&n.tag!==27);return n||null}function jg(n,s,i,l,d){for(var h=s._reactName,v=[];i!==null&&i!==l;){var S=i,O=S.alternate,P=S.stateNode;if(S=S.tag,O!==null&&O===l)break;S!==5&&S!==26&&S!==27||P===null||(O=P,d?(P=oi(i,h),P!=null&&v.unshift(Ii(i,P,O))):d||(P=oi(i,h),P!=null&&v.push(Ii(i,P,O)))),i=i.return}v.length!==0&&n.push({event:s,listeners:v})}var K_=/\r\n?/g,Y_=/\u0000|\uFFFD/g;function Mg(n){return(typeof n=="string"?n:""+n).replace(K_,` 10`).replace(Y_,"")}function Ng(n,s){return s=Mg(s),Mg(n)===s}function qe(n,s,i,l,d,h){switch(i){case"children":typeof l=="string"?s==="body"||s==="textarea"&&l===""||oa(n,l):(typeof l=="number"||typeof l=="bigint")&&s!=="body"&&oa(n,""+l);break;case"className":Do(n,"class",l);break;case"tabIndex":Do(n,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":Do(n,i,l);break;case"style":Nh(n,l,h);break;case"data":if(s!=="object"){Do(n,"data",l);break}case"src":case"href":if(l===""&&(s!=="a"||i!=="href")){n.removeAttribute(i);break}if(l==null||typeof l=="function"||typeof l=="symbol"||typeof l=="boolean"){n.removeAttribute(i);break}l=Uo(""+l),n.setAttribute(i,l);break;case"action":case"formAction":if(typeof l=="function"){n.setAttribute(i,"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 h=="function"&&(i==="formAction"?(s!=="input"&&qe(n,s,"name",d.name,d,null),qe(n,s,"formEncType",d.formEncType,d,null),qe(n,s,"formMethod",d.formMethod,d,null),qe(n,s,"formTarget",d.formTarget,d,null)):(qe(n,s,"encType",d.encType,d,null),qe(n,s,"method",d.method,d,null),qe(n,s,"target",d.target,d,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){n.removeAttribute(i);break}l=Uo(""+l),n.setAttribute(i,l);break;case"onClick":l!=null&&(n.onclick=Wn);break;
vendor: 4,766 bytes, line 10
10case"onScroll":l!=null&&Ce("scroll",n);break;case"onScrollEnd":l!=null&&Ce("scrollend",n);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(a(61));if(i=l.__html,i!=null){if(d.children!=null)throw Error(a(60));n.innerHTML=i}}break;case"multiple":n.multiple=l&&typeof l!="function"&&typeof l!="symbol";break;case"muted":n.muted=l&&typeof l!="function"&&typeof l!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(l==null||typeof l=="function"||typeof l=="boolean"||typeof l=="symbol"){n.removeAttribute("xlink:href");break}i=Uo(""+l),n.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",i);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":l!=null&&typeof l!="function"&&typeof l!="symbol"?n.setAttribute(i,""+l):n.removeAttribute(i);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":l&&typeof l!="function"&&typeof l!="symbol"?n.setAttribute(i,""):n.removeAttribute(i);break;case"capture":case"download":l===!0?n.setAttribute(i,""):l!==!1&&l!=null&&typeof l!="function"&&typeof l!="symbol"?n.setAttribute(i,l):n.removeAttribute(i);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!="function"&&typeof l!="symbol"&&!isNaN(l)&&1<=l?n.setAttribute(i,l):n.removeAttribute(i);break;case"rowSpan":case"start":l==null||typeof l=="function"||typeof l=="symbol"||isNaN(l)?n.removeAttribute(i):n.setAttribute(i,l);break;case"popover":Ce("beforetoggle",n),Ce("toggle",n),No(n,"popover",l);break;case"xlinkActuate":Zn(n,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":Zn(n,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":Zn(n,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":Zn(n,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":Zn(n,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":Zn(n,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":Zn(n,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":Zn(n,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":Zn(n,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":No(n,"is",l);break;case"innerText":case"textContent":break;default:(!(2<i.length)||i[0]!=="o"&&i[0]!=="O"||i[1]!=="n"&&i[1]!=="N")&&(i=_w.get(i)||i,No(n,i,l))}}function Bd(n,s,i,l,d,h){switch(i){case"style":Nh(n,l,h);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(a(61));if(i=l.__html,i!=null){if(d.children!=null)throw Error(a(60));n.innerHTML=i}}break;case"children":typeof l=="string"?oa(n,l):(typeof l=="number"||typeof l=="bigint")&&oa(n,""+l);break;case"onScroll":l!=null&&Ce("scroll",n);break;case"onScrollEnd":l!=null&&Ce("scrollend",n);break;case"onClick":l!=null&&(n.onclick=Wn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Th.hasOwnProperty(i))e:{if(i[0]==="o"&&i[1]==="n"&&(d=i.endsWith("Capture"),s=i.slice(2,d?i.length-7:void 0),h=n[Gt]||null,h=h!=null?h[i]:null,typeof h=="function"&&n.removeEventListener(s,h,d),typeof l=="function")){typeof h!="function"&&h!==null&&(i in n?n[i]=null:n.hasAttribute(i)&&n.removeAttribute(i)),n.addEventListener(s,l,d);break e}i in n?n[i]=l:l===!0?n.setAttribute(i,""):No(n,i,l)}}}function Mt(n,s,i){switch(s){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ce("error",n),Ce("load",n);var l=!1,d=!1,h;for(h in i)if(i.hasOwnProperty(h)){var v=i[h];if(v!=null)switch(h){case"src":l=!0;break;case"srcSet":d=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(a(137,s));default:qe(n,s,h,v,i,null)}}d&&qe(n,s,"srcSet",i.srcSet,i,null),l&&qe(n,s,"src",i.src,i,null);return;case"input":Ce("invalid",n);var S=h=v=d=null,O=null,P=null;for(l in i)if(i.hasOwnProperty(l)){var q=i[l];if(q!=null)switch(l){case"name":d=q;break;case"type":v=q;break;case"checked":O=q;break;case"defaultChecked":P=q;break;case"value":h=q;break;case"defaultValue":S=q;break;case"children":case"dangerouslySetInnerHTML":if(q!=null)throw Error(a(137,s));break;default:qe(n,s,l,q,i,null)}}
vendor: 5,027 bytes, line 10
10Ch(n,h,S,O,P,v,d,!1);return;case"select":Ce("invalid",n),l=v=h=null;for(d in i)if(i.hasOwnProperty(d)&&(S=i[d],S!=null))switch(d){case"value":h=S;break;case"defaultValue":v=S;break;case"multiple":l=S;default:qe(n,s,d,S,i,null)}s=h,i=v,n.multiple=!!l,s!=null?ia(n,!!l,s,!1):i!=null&&ia(n,!!l,i,!0);return;case"textarea":Ce("invalid",n),h=d=l=null;for(v in i)if(i.hasOwnProperty(v)&&(S=i[v],S!=null))switch(v){case"value":l=S;break;case"defaultValue":d=S;break;case"children":h=S;break;case"dangerouslySetInnerHTML":if(S!=null)throw Error(a(91));break;default:qe(n,s,v,S,i,null)}jh(n,l,d,h);return;case"option":for(O in i)i.hasOwnProperty(O)&&(l=i[O],l!=null)&&(O==="selected"?n.selected=l&&typeof l!="function"&&typeof l!="symbol":qe(n,s,O,l,i,null));return;case"dialog":Ce("beforetoggle",n),Ce("toggle",n),Ce("cancel",n),Ce("close",n);break;case"iframe":case"object":Ce("load",n);break;case"video":case"audio":for(l=0;l<Bi.length;l++)Ce(Bi[l],n);break;case"image":Ce("error",n),Ce("load",n);break;case"details":Ce("toggle",n);break;case"embed":case"source":case"link":Ce("error",n),Ce("load",n);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(P in i)if(i.hasOwnProperty(P)&&(l=i[P],l!=null))switch(P){case"children":case"dangerouslySetInnerHTML":throw Error(a(137,s));default:qe(n,s,P,l,i,null)}return;default:if(Wc(s)){for(q in i)i.hasOwnProperty(q)&&(l=i[q],l!==void 0&&Bd(n,s,q,l,i,void 0));return}}for(S in i)i.hasOwnProperty(S)&&(l=i[S],l!=null&&qe(n,s,S,l,i,null))}function F_(n,s,i,l){switch(s){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var d=null,h=null,v=null,S=null,O=null,P=null,q=null;for(I in i){var Y=i[I];if(i.hasOwnProperty(I)&&Y!=null)switch(I){case"checked":break;case"value":break;case"defaultValue":O=Y;default:l.hasOwnProperty(I)||qe(n,s,I,null,l,Y)}}for(var B in l){var I=l[B];if(Y=i[B],l.hasOwnProperty(B)&&(I!=null||Y!=null))switch(B){case"type":h=I;break;case"name":d=I;break;case"checked":P=I;break;case"defaultChecked":q=I;break;case"value":v=I;break;case"defaultValue":S=I;break;case"children":case"dangerouslySetInnerHTML":if(I!=null)throw Error(a(137,s));break;default:I!==Y&&qe(n,s,B,I,l,Y)}}Xc(n,v,S,O,P,q,h,d);return;case"select":I=v=S=B=null;for(h in i)if(O=i[h],i.hasOwnProperty(h)&&O!=null)switch(h){case"value":break;case"multiple":I=O;default:l.hasOwnProperty(h)||qe(n,s,h,null,l,O)}for(d in l)if(h=l[d],O=i[d],l.hasOwnProperty(d)&&(h!=null||O!=null))switch(d){case"value":B=h;break;case"defaultValue":S=h;break;case"multiple":v=h;default:h!==O&&qe(n,s,d,h,l,O)}s=S,i=v,l=I,B!=null?ia(n,!!i,B,!1):!!l!=!!i&&(s!=null?ia(n,!!i,s,!0):ia(n,!!i,i?[]:"",!1));return;case"textarea":I=B=null;for(S in i)if(d=i[S],i.hasOwnProperty(S)&&d!=null&&!l.hasOwnProperty(S))switch(S){case"value":break;case"children":break;default:qe(n,s,S,null,l,d)}for(v in l)if(d=l[v],h=i[v],l.hasOwnProperty(v)&&(d!=null||h!=null))switch(v){case"value":B=d;break;case"defaultValue":I=d;break;case"children":break;case"dangerouslySetInnerHTML":if(d!=null)throw Error(a(91));break;default:d!==h&&qe(n,s,v,d,l,h)}kh(n,B,I);return;case"option":for(var oe in i)B=i[oe],i.hasOwnProperty(oe)&&B!=null&&!l.hasOwnProperty(oe)&&(oe==="selected"?n.selected=!1:qe(n,s,oe,null,l,B));for(O in l)B=l[O],I=i[O],l.hasOwnProperty(O)&&B!==I&&(B!=null||I!=null)&&(O==="selected"?n.selected=B&&typeof B!="function"&&typeof B!="symbol":qe(n,s,O,B,l,I));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 me in i)B=i[me],i.hasOwnProperty(me)&&B!=null&&!l.hasOwnProperty(me)&&qe(n,s,me,null,l,B);for(P in l)if(B=l[P],I=i[P],l.hasOwnProperty(P)&&B!==I&&(B!=null||I!=null))switch(P){case"children":case"dangerouslySetInnerHTML":if(B!=null)throw Error(a(137,s));break;default:qe(n,s,P,B,l,I)}return;default:if(Wc(s)){for(var $e in i)B=i[$e],i.hasOwnProperty($e)&&B!==void 0&&!l.hasOwnProperty($e)&&Bd(n,s,$e,void 0,l,B);for(q in l)B=l[q],I=i[q],!l.hasOwnProperty(q)||B===I||B===void 0&&I===void 0||Bd(n,s,q,B,l,I);return}}for(var N in i)B=i[N],i.hasOwnProperty(N)&&B!=null&&!l.hasOwnProperty(N)&&qe(n,s,N,null,l,B);for(Y in l)B=l[Y],I=i[Y],!l.hasOwnProperty(Y)||B===I||B==null&&I==null||qe(n,s,Y,B,l,I)}function Dg(n){switch(n){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function J_(){if(typeof performance.getEntriesByType=="function"){for(var n=0,s=0,i=performance.getEntriesByType("resource"),l=0;l<i.length;l++){var d=i[l],h=d.transferSize,v=d.initiatorType,S=d.duration;if(h&&S&&Dg(v)){for(v=0,S=d.responseEnd,l+=1;l<i.length;l++){var O=i[l],P=O.startTime;if(P>S)break;var q=O.transferSize,Y=O.initiatorType;q&&Dg(Y)&&(O=O.responseEnd,v+=q*(O<S?1:(S-P)/(O-P)))}if(--l,s+=8*(h+v)/(d.duration/1e3),n++,10<n)break}}if(0<n)return s/n/1e6}return navigator.connection&&(n=navigator.connection.downlink,typeof n=="number")?
vendor: 9,435 bytes, line 10
10n:5}var Id=null,Hd=null;function jl(n){return n.nodeType===9?n:n.ownerDocument}function Lg(n){switch(n){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Ug(n,s){if(n===0)switch(s){case"svg":return 1;case"math":return 2;default:return 0}return n===1&&s==="foreignObject"?0:n}function qd(n,s){return n==="textarea"||n==="noscript"||typeof s.children=="string"||typeof s.children=="number"||typeof s.children=="bigint"||typeof s.dangerouslySetInnerHTML=="object"&&s.dangerouslySetInnerHTML!==null&&s.dangerouslySetInnerHTML.__html!=null}var $d=null;function Q_(){var n=window.event;return n&&n.type==="popstate"?n===$d?!1:($d=n,!0):($d=null,!1)}var zg=typeof setTimeout=="function"?setTimeout:void 0,X_=typeof clearTimeout=="function"?clearTimeout:void 0,Pg=typeof Promise=="function"?Promise:void 0,Z_=typeof queueMicrotask=="function"?queueMicrotask:typeof Pg<"u"?function(n){return Pg.resolve(null).then(n).catch(W_)}:zg;function W_(n){setTimeout(function(){throw n})}function Vr(n){return n==="head"}function Bg(n,s){var i=s,l=0;do{var d=i.nextSibling;if(n.removeChild(i),d&&d.nodeType===8)if(i=d.data,i==="/$"||i==="/&"){if(l===0){n.removeChild(d),Pa(s);return}l--}else if(i==="$"||i==="$?"||i==="$~"||i==="$!"||i==="&")l++;else if(i==="html")Hi(n.ownerDocument.documentElement);else if(i==="head"){i=n.ownerDocument.head,Hi(i);for(var h=i.firstChild;h;){var v=h.nextSibling,S=h.nodeName;h[ai]||S==="SCRIPT"||S==="STYLE"||S==="LINK"&&h.rel.toLowerCase()==="stylesheet"||i.removeChild(h),h=v}}else i==="body"&&Hi(n.ownerDocument.body);i=d}while(i);Pa(s)}function Ig(n,s){var i=n;n=0;do{var l=i.nextSibling;if(i.nodeType===1?s?(i._stashedDisplay=i.style.display,i.style.display="none"):(i.style.display=i._stashedDisplay||"",i.getAttribute("style")===""&&i.removeAttribute("style")):i.nodeType===3&&(s?(i._stashedText=i.nodeValue,i.nodeValue=""):i.nodeValue=i._stashedText||""),l&&l.nodeType===8)if(i=l.data,i==="/$"){if(n===0)break;n--}else i!=="$"&&i!=="$?"&&i!=="$~"&&i!=="$!"||n++;i=l}while(i)}function Gd(n){var s=n.firstChild;for(s&&s.nodeType===10&&(s=s.nextSibling);s;){var i=s;switch(s=s.nextSibling,i.nodeName){case"HTML":case"HEAD":case"BODY":Gd(i),Jc(i);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(i.rel.toLowerCase()==="stylesheet")continue}n.removeChild(i)}}function eS(n,s,i,l){for(;n.nodeType===1;){var d=i;if(n.nodeName.toLowerCase()!==s.toLowerCase()){if(!l&&(n.nodeName!=="INPUT"||n.type!=="hidden"))break}else if(l){if(!n[ai])switch(s){case"meta":if(!n.hasAttribute("itemprop"))break;return n;case"link":if(h=n.getAttribute("rel"),h==="stylesheet"&&n.hasAttribute("data-precedence"))break;if(h!==d.rel||n.getAttribute("href")!==(d.href==null||d.href===""?null:d.href)||n.getAttribute("crossorigin")!==(d.crossOrigin==null?null:d.crossOrigin)||n.getAttribute("title")!==(d.title==null?null:d.title))break;return n;case"style":if(n.hasAttribute("data-precedence"))break;return n;case"script":if(h=n.getAttribute("src"),(h!==(d.src==null?null:d.src)||n.getAttribute("type")!==(d.type==null?null:d.type)||n.getAttribute("crossorigin")!==(d.crossOrigin==null?null:d.crossOrigin))&&h&&n.hasAttribute("async")&&!n.hasAttribute("itemprop"))break;return n;default:return n}}else if(s==="input"&&n.type==="hidden"){var h=d.name==null?null:""+d.name;if(d.type==="hidden"&&n.getAttribute("name")===h)return n}else return n;if(n=Sn(n.nextSibling),n===null)break}return null}function tS(n,s,i){if(s==="")return null;for(;n.nodeType!==3;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!i||(n=Sn(n.nextSibling),n===null))return null;return n}function Hg(n,s){for(;n.nodeType!==8;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!s||(n=Sn(n.nextSibling),n===null))return null;return n}function Vd(n){return n.data==="$?"||n.data==="$~"}function Kd(n){return n.data==="$!"||n.data==="$?"&&n.ownerDocument.readyState!=="loading"}function nS(n,s){var i=n.ownerDocument;if(n.data==="$~")n._reactRetry=s;else if(n.data!=="$?"||i.readyState!=="loading")s();else{var l=function(){s(),i.removeEventListener("DOMContentLoaded",l)};i.addEventListener("DOMContentLoaded",l),n._reactRetry=l}}function Sn(n){for(;n!=null;n=n.nextSibling){var s=n.nodeType;if(s===1||s===3)break;if(s===8){if(s=n.data,s==="$"||s==="$!"||s==="$?"||s==="$~"||s==="&"||s==="F!"||s==="F")break;if(s==="/$"||s==="/&")return null}}return n}var Yd=null;function qg(n){n=n.nextSibling;for(var s=0;n;){if(n.nodeType===8){var i=n.data;if(i==="/$"||i==="/&"){if(s===0)return Sn(n.nextSibling);s--}else i!=="$"&&i!=="$!"&&i!=="$?"&&i!=="$~"&&i!=="&"||s++}n=n.nextSibling}return null}function $g(n){n=n.previousSibling;for(var s=0;n;){if(n.nodeType===8){var i=n.data;if(i==="$"||i==="$!"||i==="$?"||i==="$~"||i==="&"){if(s===0)return n;s--}else i!=="/$"&&i!=="/&"||s++}n=n.previousSibling}return null}function Gg(n,s,i){switch(s=jl(i),n){case"html":if(n=s.documentElement,!n)throw Error(a(452));return n;case"head":if(n=s.head,!n)throw Error(a(453));return n;case"body":if(n=s.body,!n)throw Error(a(454));return n;default:throw Error(a(451))}}function Hi(n){for(var s=n.attributes;s.length;)n.removeAttributeNode(s[0]);Jc(n)}var En=new Map,Vg=new Set;function Ml(n){return typeof n.getRootNode=="function"?n.getRootNode():n.nodeType===9?n:n.ownerDocument}var mr=F.d;F.d={f:rS,r:sS,D:aS,C:iS,L:oS,m:lS,X:uS,S:cS,M:dS};function rS(){var n=mr.f(),s=El();return n||s}function sS(n){var s=ra(n);s!==null&&s.tag===5&&s.type==="form"?lm(s):mr.r(n)}var La=typeof document>"u"?null:document;function Kg(n,s,i){var l=La;if(l&&typeof s=="string"&&s){var d=mn(s);d='link[rel="'+n+'"][href="'+d+'"]',typeof i=="string"&&(d+='[crossorigin="'+i+'"]'),Vg.has(d)||(Vg.add(d),n={rel:n,crossOrigin:i,href:s},l.querySelector(d)===null&&(s=l.createElement("link"),Mt(s,"link",n),St(s),l.head.appendChild(s)))}}function aS(n){mr.D(n),Kg("dns-prefetch",n,null)}function iS(n,s){mr.C(n,s),Kg("preconnect",n,s)}function oS(n,s,i){mr.L(n,s,i);var l=La;if(l&&n&&s){var d='link[rel="preload"][as="'+mn(s)+'"]';s==="image"&&i&&i.imageSrcSet?(d+='[imagesrcset="'+mn(i.imageSrcSet)+'"]',typeof i.imageSizes=="string"&&(d+='[imagesizes="'+mn(i.imageSizes)+'"]')):d+='[href="'+mn(n)+'"]';var h=d;switch(s){case"style":h=Ua(n);break;case"script":h=za(n)}En.has(h)||(n=g({rel:"preload",href:s==="image"&&i&&i.imageSrcSet?void 0:n,as:s},i),En.set(h,n),l.querySelector(d)!==null||s==="style"&&l.querySelector(qi(h))||s==="script"&&l.querySelector($i(h))||(s=l.createElement("link"),Mt(s,"link",n),St(s),l.head.appendChild(s)))}}function lS(n,s){mr.m(n,s);var i=La;if(i&&n){var l=s&&typeof s.as=="string"?s.as:"script",d='link[rel="modulepreload"][as="'+mn(l)+'"][href="'+mn(n)+'"]',h=d;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":h=za(n)}if(!En.has(h)&&(n=g({rel:"modulepreload",href:n},s),En.set(h,n),i.querySelector(d)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(i.querySelector($i(h)))return}l=i.createElement("link"),Mt(l,"link",n),St(l),i.head.appendChild(l)}}}function cS(n,s,i){mr.S(n,s,i);var l=La;if(l&&n){var d=sa(l).hoistableStyles,h=Ua(n);s=s||"default";var v=d.get(h);if(!v){var S={loading:0,preload:null};if(v=l.querySelector(qi(h)))S.loading=5;else{n=g({rel:"stylesheet",href:n,"data-precedence":s},i),(i=En.get(h))&&Fd(n,i);var O=v=l.createElement("link");St(O),Mt(O,"link",n),O._p=new Promise(function(P,q){O.onload=P,O.onerror=q}),O.addEventListener("load",function(){S.loading|=1}),O.addEventListener("error",function(){S.loading|=2}),S.loading|=4,Nl(v,s,l)}v={type:"stylesheet",instance:v,count:1,state:S},d.set(h,v)}}}function uS(n,s){mr.X(n,s);var i=La;if(i&&n){var l=sa(i).hoistableScripts,d=za(n),h=l.get(d);h||(h=i.querySelector($i(d)),h||(n=g({src:n,async:!0},s),(s=En.get(d))&&Jd(n,s),h=i.createElement("script"),St(h),Mt(h,"link",n),i.head.appendChild(h)),h={type:"script",instance:h,count:1,state:null},l.set(d,h))}}function dS(n,s){mr.M(n,s);var i=La;if(i&&n){var l=sa(i).hoistableScripts,d=za(n),h=l.get(d);h||(h=i.querySelector($i(d)),h||(n=g({src:n,async:!0,type:"module"},s),(s=En.get(d))&&Jd(n,s),h=i.createElement("script"),St(h),Mt(h,"link",n),i.head.appendChild(h)),h={type:"script",instance:h,count:1,state:null},l.set(d,h))}}function Yg(n,s,i,l){var d=(d=se.current)?Ml(d):null;if(!d)throw Error(a(446));switch(n){case"meta":case"title":return null;case"style":return typeof i.precedence=="string"&&typeof i.href=="string"?(s=Ua(i.href),i=sa(d).hoistableStyles,l=i.get(s),l||(l={type:"style",instance:null,count:0,state:null},i.set(s,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(i.rel==="stylesheet"&&typeof i.href=="string"&&typeof i.precedence=="string"){n=Ua(i.href);var h=sa(d).hoistableStyles,v=h.get(n);if(v||(d=d.ownerDocument||d,v={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},h.set(n,v),(h=d.querySelector(qi(n)))&&!h._p&&(v.instance=h,v.state.loading=5),En.has(n)||(i={rel:"preload",as:"style",href:i.href,crossOrigin:i.crossOrigin,integrity:i.integrity,media:i.media,hrefLang:i.hrefLang,referrerPolicy:i.referrerPolicy},En.set(n,i),h||fS(d,n,i,v.state))),s&&l===null)throw Error(a(528,""));return v}if(s&&l!==null)throw Error(a(529,""));return null;case"script":return s=i.async,i=i.src,typeof i=="string"&&s&&typeof s!="function"&&typeof s!="symbol"?
vendor: 4,096 bytes, line 10
10(s=za(i),i=sa(d).hoistableScripts,l=i.get(s),l||(l={type:"script",instance:null,count:0,state:null},i.set(s,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(a(444,n))}}function Ua(n){return'href="'+mn(n)+'"'}function qi(n){return'link[rel="stylesheet"]['+n+"]"}function Fg(n){return g({},n,{"data-precedence":n.precedence,precedence:null})}function fS(n,s,i,l){n.querySelector('link[rel="preload"][as="style"]['+s+"]")?l.loading=1:(s=n.createElement("link"),l.preload=s,s.addEventListener("load",function(){return l.loading|=1}),s.addEventListener("error",function(){return l.loading|=2}),Mt(s,"link",i),St(s),n.head.appendChild(s))}function za(n){return'[src="'+mn(n)+'"]'}function $i(n){return"script[async]"+n}function Jg(n,s,i){if(s.count++,s.instance===null)switch(s.type){case"style":var l=n.querySelector('style[data-href~="'+mn(i.href)+'"]');if(l)return s.instance=l,St(l),l;var d=g({},i,{"data-href":i.href,"data-precedence":i.precedence,href:null,precedence:null});return l=(n.ownerDocument||n).createElement("style"),St(l),Mt(l,"style",d),Nl(l,i.precedence,n),s.instance=l;case"stylesheet":d=Ua(i.href);var h=n.querySelector(qi(d));if(h)return s.state.loading|=4,s.instance=h,St(h),h;l=Fg(i),(d=En.get(d))&&Fd(l,d),h=(n.ownerDocument||n).createElement("link"),St(h);var v=h;return v._p=new Promise(function(S,O){v.onload=S,v.onerror=O}),Mt(h,"link",l),s.state.loading|=4,Nl(h,i.precedence,n),s.instance=h;case"script":return h=za(i.src),(d=n.querySelector($i(h)))?(s.instance=d,St(d),d):(l=i,(d=En.get(h))&&(l=g({},i),Jd(l,d)),n=n.ownerDocument||n,d=n.createElement("script"),St(d),Mt(d,"link",l),n.head.appendChild(d),s.instance=d);case"void":return null;default:throw Error(a(443,s.type))}else s.type==="stylesheet"&&(s.state.loading&4)===0&&(l=s.instance,s.state.loading|=4,Nl(l,i.precedence,n));return s.instance}function Nl(n,s,i){for(var l=i.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),d=l.length?l[l.length-1]:null,h=d,v=0;v<l.length;v++){var S=l[v];if(S.dataset.precedence===s)h=S;else if(h!==d)break}h?h.parentNode.insertBefore(n,h.nextSibling):(s=i.nodeType===9?i.head:i,s.insertBefore(n,s.firstChild))}function Fd(n,s){n.crossOrigin==null&&(n.crossOrigin=s.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=s.referrerPolicy),n.title==null&&(n.title=s.title)}function Jd(n,s){n.crossOrigin==null&&(n.crossOrigin=s.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=s.referrerPolicy),n.integrity==null&&(n.integrity=s.integrity)}var Dl=null;function Qg(n,s,i){if(Dl===null){var l=new Map,d=Dl=new Map;d.set(i,l)}else d=Dl,l=d.get(i),l||(l=new Map,d.set(i,l));if(l.has(n))return l;for(l.set(n,null),i=i.getElementsByTagName(n),d=0;d<i.length;d++){var h=i[d];if(!(h[ai]||h[Ot]||n==="link"&&h.getAttribute("rel")==="stylesheet")&&h.namespaceURI!=="http://www.w3.org/2000/svg"){var v=h.getAttribute(s)||"";v=n+v;var S=l.get(v);S?S.push(h):l.set(v,[h])}}return l}function Xg(n,s,i){n=n.ownerDocument||n,n.head.insertBefore(i,s==="title"?n.querySelector("head > title"):null)}function hS(n,s,i){if(i===1||s.itemProp!=null)return!1;switch(n){case"meta":case"title":return!0;case"style":if(typeof s.precedence!="string"||typeof s.href!="string"||s.href==="")break;return!0;case"link":if(typeof s.rel!="string"||typeof s.href!="string"||s.href===""||s.onLoad||s.onError)break;return s.rel==="stylesheet"?(n=s.disabled,typeof s.precedence=="string"&&n==null):!0;case"script":if(s.async&&typeof s.async!="function"&&typeof s.async!="symbol"&&!s.onLoad&&!s.onError&&s.src&&typeof s.src=="string")return!0}return!1}function Zg(n){return!(n.type==="stylesheet"&&(n.state.loading&3)===0)}function pS(n,s,i,l){if(i.type==="stylesheet"&&(typeof l.media!="string"||matchMedia(l.media).matches!==!1)&&(i.state.loading&4)===0){if(i.instance===null){var d=Ua(l.href),h=s.querySelector(qi(d));if(h){s=h._p,s!==null&&typeof s=="object"&&typeof s.then=="function"&&(n.count++,n=Ll.bind(n),s.then(n,n)),i.state.loading|=4,i.instance=h,St(h);return}h=s.ownerDocument||s,l=Fg(l),(d=En.get(d))&&Fd(l,d),h=h.createElement("link"),St
vendor: 1,155 bytes, line 10
10(h);var v=h;v._p=new Promise(function(S,O){v.onload=S,v.onerror=O}),Mt(h,"link",l),i.instance=h}n.stylesheets===null&&(n.stylesheets=new Map),n.stylesheets.set(i,s),(s=i.state.preload)&&(i.state.loading&3)===0&&(n.count++,i=Ll.bind(n),s.addEventListener("load",i),s.addEventListener("error",i))}}var Qd=0;function mS(n,s){return n.stylesheets&&n.count===0&&zl(n,n.stylesheets),0<n.count||0<n.imgCount?function(i){var l=setTimeout(function(){if(n.stylesheets&&zl(n,n.stylesheets),n.unsuspend){var h=n.unsuspend;n.unsuspend=null,h()}},6e4+s);0<n.imgBytes&&Qd===0&&(Qd=62500*J_());var d=setTimeout(function(){if(n.waitingForImages=!1,n.count===0&&(n.stylesheets&&zl(n,n.stylesheets),n.unsuspend)){var h=n.unsuspend;n.unsuspend=null,h()}},(n.imgBytes>Qd?50:800)+s);return n.unsuspend=i,function(){n.unsuspend=null,clearTimeout(l),clearTimeout(d)}}:null}function Ll(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)zl(this,this.stylesheets);else if(this.unsuspend){var n=this.unsuspend;this.unsuspend=null,n()}}}var Ul=null;function zl(n,s){n.stylesheets=null,n.unsuspend!==null&&(n.count++,Ul=new Map,s.forEac
vendor: 9,856 bytes, line 10
10h(gS,n),Ul=null,Ll.call(n))}function gS(n,s){if(!(s.state.loading&4)){var i=Ul.get(n);if(i)var l=i.get(null);else{i=new Map,Ul.set(n,i);for(var d=n.querySelectorAll("link[data-precedence],style[data-precedence]"),h=0;h<d.length;h++){var v=d[h];(v.nodeName==="LINK"||v.getAttribute("media")!=="not all")&&(i.set(v.dataset.precedence,v),l=v)}l&&i.set(null,l)}d=s.instance,v=d.getAttribute("data-precedence"),h=i.get(v)||l,h===l&&i.set(null,d),i.set(v,d),this.count++,l=Ll.bind(this),d.addEventListener("load",l),d.addEventListener("error",l),h?h.parentNode.insertBefore(d,h.nextSibling):(n=n.nodeType===9?n.head:n,n.insertBefore(d,n.firstChild)),s.state.loading|=4}}var Gi={$$typeof:j,Provider:null,Consumer:null,_currentValue:ae,_currentValue2:ae,_threadCount:0};function yS(n,s,i,l,d,h,v,S,O){this.tag=1,this.containerInfo=n,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=xr(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=xr(0),this.hiddenUpdates=xr(null),this.identifierPrefix=l,this.onUncaughtError=d,this.onCaughtError=h,this.onRecoverableError=v,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=O,this.incompleteTransitions=new Map}function Wg(n,s,i,l,d,h,v,S,O,P,q,Y){return n=new yS(n,s,i,v,O,P,q,Y,S),s=1,h===!0&&(s|=24),h=sn(3,null,null,s),n.current=h,h.stateNode=n,s=Cu(),s.refCount++,n.pooledCache=s,s.refCount++,h.memoizedState={element:l,isDehydrated:i,cache:s},Nu(h),n}function ey(n){return n?(n=pa,n):pa}function ty(n,s,i,l,d,h){d=ey(d),l.context===null?l.context=d:l.pendingContext=d,l=Dr(s),l.payload={element:i},h=h===void 0?null:h,h!==null&&(l.callback=h),i=Lr(n,l,s),i!==null&&(Qt(i,n,s),Si(i,n,s))}function ny(n,s){if(n=n.memoizedState,n!==null&&n.dehydrated!==null){var i=n.retryLane;n.retryLane=i!==0&&i<s?i:s}}function Xd(n,s){ny(n,s),(n=n.alternate)&&ny(n,s)}function ry(n){if(n.tag===13||n.tag===31){var s=Es(n,67108864);s!==null&&Qt(s,n,67108864),Xd(n,67108864)}}function sy(n){if(n.tag===13||n.tag===31){var s=un();s=ea(s);var i=Es(n,s);i!==null&&Qt(i,n,s),Xd(n,s)}}var Pl=!0;function vS(n,s,i,l){var d=D.T;D.T=null;var h=F.p;try{F.p=2,Zd(n,s,i,l)}finally{F.p=h,D.T=d}}function bS(n,s,i,l){var d=D.T;D.T=null;var h=F.p;try{F.p=8,Zd(n,s,i,l)}finally{F.p=h,D.T=d}}function Zd(n,s,i,l){if(Pl){var d=Wd(l);if(d===null)Pd(n,s,l,Bl,i),iy(n,l);else if(_S(d,n,s,i,l))l.stopPropagation();else if(iy(n,l),s&4&&-1<wS.indexOf(n)){for(;d!==null;){var h=ra(d);if(h!==null)switch(h.tag){case 3:if(h=h.stateNode,h.current.memoizedState.isDehydrated){var v=Pn(h.pendingLanes);if(v!==0){var S=h;for(S.pendingLanes|=2,S.entangledLanes|=2;v;){var O=1<<31-Dt(v);S.entanglements[1]|=O,v&=~O}qn(h),(Ue&6)===0&&(_l=wt()+500,Pi(0))}}break;case 31:case 13:S=Es(h,2),S!==null&&Qt(S,h,2),El(),Xd(h,2)}if(h=Wd(l),h===null&&Pd(n,s,l,Bl,i),h===d)break;d=h}d!==null&&l.stopPropagation()}else Pd(n,s,l,null,i)}}function Wd(n){return n=tu(n),ef(n)}var Bl=null;function ef(n){if(Bl=null,n=na(n),n!==null){var s=c(n);if(s===null)n=null;else{var i=s.tag;if(i===13){if(n=u(s),n!==null)return n;n=null}else if(i===31){if(n=f(s),n!==null)return n;n=null}else if(i===3){if(s.stateNode.current.memoizedState.isDehydrated)return s.tag===3?s.stateNode.containerInfo:null;n=null}else s!==n&&(n=null)}}return Bl=n,null}function ay(n){switch(n){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(Ie()){case We:return 2;case hn:return 8;case Qn:case ri:return 32;case Xn:return 268435456;default:return 32}default:return 32}}var tf=!1,Kr=null,Yr=null,Fr=null,Vi=new Map,Ki=new Map,Jr=[],wS="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 iy(n,s){switch(n){case"focusin":case"focusout":Kr=null;break;case"dragenter":case"dragleave":Yr=null;break;case"mouseover":case"mouseout":Fr=null;break;case"pointerover":case"pointerout":Vi.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ki.delete(s.pointerId)}}function Yi(n,s,i,l,d,h){return n===null||n.nativeEvent!==h?(n={blockedOn:s,domEventName:i,eventSystemFlags:l,nativeEvent:h,targetContainers:[d]},s!==null&&(s=ra(s),s!==null&&ry(s)),n):(n.eventSystemFlags|=l,s=n.targetContainers,d!==null&&s.indexOf(d)===-1&&s.push(d),n)}function _S(n,s,i,l,d){switch(s){case"focusin":return Kr=Yi(Kr,n,s,i,l,d),!0;case"dragenter":return Yr=Yi(Yr,n,s,i,l,d),!0;case"mouseover":return Fr=Yi(Fr,n,s,i,l,d),!0;case"pointerover":var h=d.pointerId;return Vi.set(h,Yi(Vi.get(h)||null,n,s,i,l,d)),!0;case"gotpointercapture":return h=d.pointerId,Ki.set(h,Yi(Ki.get(h)||null,n,s,i,l,d)),!0}return!1}function oy(n){var s=na(n.target);if(s!==null){var i=c(s);if(i!==null){if(s=i.tag,s===13){if(s=u(i),s!==null){n.blockedOn=s,_h(n.priority,function(){sy(i)});return}}else if(s===31){if(s=f(i),s!==null){n.blockedOn=s,_h(n.priority,function(){sy(i)});return}}else if(s===3&&i.stateNode.current.memoizedState.isDehydrated){n.blockedOn=i.tag===3?i.stateNode.containerInfo:null;return}}}n.blockedOn=null}function Il(n){if(n.blockedOn!==null)return!1;for(var s=n.targetContainers;0<s.length;){var i=Wd(n.nativeEvent);if(i===null){i=n.nativeEvent;var l=new i.constructor(i.type,i);eu=l,i.target.dispatchEvent(l),eu=null}else return s=ra(i),s!==null&&ry(s),n.blockedOn=i,!1;s.shift()}return!0}function ly(n,s,i){Il(n)&&i.delete(s)}function SS(){tf=!1,Kr!==null&&Il(Kr)&&(Kr=null),Yr!==null&&Il(Yr)&&(Yr=null),Fr!==null&&Il(Fr)&&(Fr=null),Vi.forEach(ly),Ki.forEach(ly)}function Hl(n,s){n.blockedOn===s&&(n.blockedOn=null,tf||(tf=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,SS)))}var ql=null;function cy(n){ql!==n&&(ql=n,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){ql===n&&(ql=null);for(var s=0;s<n.length;s+=3){var i=n[s],l=n[s+1],d=n[s+2];if(typeof l!="function"){if(ef(l||i)===null)continue;break}var h=ra(i);h!==null&&(n.splice(s,3),s-=3,Wu(h,{pending:!0,data:d,method:i.method,action:l},l,d))}}))}function Pa(n){function s(O){return Hl(O,n)}Kr!==null&&Hl(Kr,n),Yr!==null&&Hl(Yr,n),Fr!==null&&Hl(Fr,n),Vi.forEach(s),Ki.forEach(s);for(var i=0;i<Jr.length;i++){var l=Jr[i];l.blockedOn===n&&(l.blockedOn=null)}for(;0<Jr.length&&(i=Jr[0],i.blockedOn===null);)oy(i),i.blockedOn===null&&Jr.shift();if(i=(n.ownerDocument||n).$$reactFormReplay,i!=null)for(l=0;l<i.length;l+=3){var d=i[l],h=i[l+1],v=d[Gt]||null;if(typeof h=="function")v||cy(i);else if(v){var S=null;if(h&&h.hasAttribute("formAction")){if(d=h,v=h[Gt]||null)S=v.formAction;else if(ef(d)!==null)continue}else S=v.action;typeof S=="function"?i[l+1]=S:(i.splice(l,3),l-=3),cy(i)}}}function uy(){function n(h){h.canIntercept&&h.info==="react-transition"&&h.intercept({handler:function(){return new Promise(function(v){return d=v})},focusReset:"manual",scroll:"manual"})}function s(){d!==null&&(d(),d=null),l||setTimeout(i,20)}function i(){if(!l&&!navigation.transition){var h=navigation.currentEntry;h&&h.url!=null&&navigation.navigate(h.url,{state:h.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var l=!1,d=null;return navigation.addEventListener("navigate",n),navigation.addEventListener("navigatesuccess",s),navigation.addEventListener("navigateerror",s),setTimeout(i,100),function(){l=!0,navigation.removeEventListener("navigate",n),navigation.removeEventListener("navigatesuccess",s),navigation.removeEventListener("navigateerror",s),d!==null&&(d(),d=null)}}}function nf(n){this._internalRoot=n}$l.prototype.render=nf.prototype.render=function(n){var s=this._internalRoot;if(s===null)throw Error(a(409));var i=s.current,l=un();ty(i,l,n,s,null,null)},$l.prototype.unmount=nf.prototype.unmount=function(){var n=this._internalRoot;if(n!==null){this._internalRoot=null;var s=n.containerInfo;ty(n.current,2,null,n,null,null),El(),s[ta]=null}};function $l(n){this._internalRoot=n}$l.prototype.unstable_scheduleHydration=function(n){if(n){var s=Yc();n={blockedOn:null,target:n,priority:s};for(var i=0;i<Jr.length&&s!==0&&s<Jr[i].priority;i++);Jr.splice(i,0,n),i===0&&oy(n)}};var dy=t.version;if(dy!=="19.2.5")throw Error(a(527,dy,"19.2.5"));F.findDOMNode=function(n){var s=n._reactInternals;if(s===void 0)throw typeof n.render=="function"?Error(a(188)):(n=Object.keys(n).join(","),Error(a(268,n)));return n=m(s),n=n!==null?y(n):null,n=n===null?null:n.stateNode,n};var ES={bundleType:0,version:"19.2.5",rendererPackageName:"react-dom",currentDispatcherRef:D,reconcilerVersion:"19.2.5"};
10if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Gl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Gl.isDisabled&&Gl.supportsFiber)try{gs=Gl.inject(ES),Pt=Gl}catch{}}return Ji.createRoot=function(n,s){if(!o(n))throw Error(a(299));var i=!1,l="",d=vm,h=bm,v=wm;return s!=null&&(s.unstable_strictMode===!0&&(i=!0),s.identifierPrefix!==void 0&&(l=s.identifierPrefix),s.onUncaughtError!==void 0&&(d=s.onUncaughtError),s.onCaughtError!==void 0&&(h=s.onCaughtError),s.onRecoverableError!==void 0&&(v=s.onRecoverableError)),s=Wg(n,1,!1,null,null,i,l,null,d,h,v,uy),n[ta]=s.current,zd(n),new nf(s)},Ji.hydrateRoot=function(n,s,i){if(!o(n))throw Error(a(299));var l=!1,d="",h=vm,v=bm,S=wm,O=null;return i!=null&&(i.unstable_strictMode===!0&&(l=!0),i.identifierPrefix!==void 0&&(d=i.identifierPrefix),i.onUncaughtError!==void 0&&(h=i.onUncaughtError),i.onCaughtError!==void 0&&(v=i.onCaughtError),i.onRecoverableError!==void 0&&(S=i.onRecoverableError),i.formState!==void 0&&(O=i.formState)),s=Wg(n,1,!0,s,i??null,l,d,O,h,v,S,uy),s.context=ey(null),i=s.current,l=un(),l=ea(l),d=Dr(l),d.callback=null,Lr(i,d,l),i=l,s.current.lanes=i,Ze(s,i),qn(s),n[ta]=s.current,zd(n),new $l(s)},Ji.version="19.2.5",Ji}var _y;function DS(){if(_y)return af.exports;_y=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),af.exports=NS(),af.exports}var LS=DS(),US="__TSS_CONTEXT",Nf=Symbol.for("TSS_SERVER_FUNCTION"),zS="application/x-tss-framed",gr={JSON:0,CHUNK:1,END:2,ERROR:3},PS=/;\s*v=(\d+)/;function BS(e){const t=e.match(PS);return t?parseInt(t[1],10):void 0}function IS(e){const t=BS(e);if(t!==void 0&&t!==1)throw new Error(`Incompatible framed protocol version: server=${t}, client=1. Please ensure client and server are using compatible versions.`)}var db=()=>window.__TSS_START_OPTIONS__,fb=!1;function fo(e){return e[e.length-1]}function HS(e){return typeof e=="function"}function ss(e,t){return HS(e)?e(t):e}var qS=Object.prototype.hasOwnProperty,Sy=Object.prototype.propertyIsEnumerable,$S=()=>Object.create(null),Us=(e,t)=>Is(e,t,$S);function Is(e,t,r=()=>({}),a=0){if(e===t)return e;if(a>500)return t;const o=t,c=Ry(e)&&Ry(o);if(!c&&!(ti(e)&&ti(o)))return o;const u=c?e:Ey(e);if(!u)return o;const f=c?o:Ey(o);if(!f)return o;const p=u.length,m=f.length,y=c?new Array(m):r();let g=0;for(let b=0;b<m;b++){const w=c?b:f[b],_=e[w],x=o[w];if(_===x){y[w]=_,(c?b<p:qS.call(e,w))&&g++;continue}if(_===null||x===null||typeof _!="object"||typeof x!="object"){y[w]=x;continue}const E=Is(_,x,r,a+1);y[w]=E,E===_&&g++}return p===m&&g===p?e:y}function Ey(e){const t=Object.getOwnPropertyNames(e);for(const o of t)if(!Sy.call(e,o))return!1;const r=Object.getOwnPropertySymbols(e);if(r.length===0)return t;const a=t;for(const o of r){if(!Sy.call(e,o))return!1;a.push(o)}return a}function ti(e){if(!Ty(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const r=t.prototype;return!(!Ty(r)||!r.hasOwnProperty("isPrototypeOf"))}function Ty(e){return Object.prototype.toString.call(e)==="[object Object]"}function Ry(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Wt(e,t,r){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let a=0,o=e.length;a<o;a++)if(!Wt(e[a],t[a],r))return!1;return!0}if(ti(e)&&ti(t)){const a=r?.ignoreUndefined??!0;if(r?.partial){for(const u in t)if((!a||t[u]!==void 0)&&!Wt(e[u],t[u],r))return!1;return!0}let o=0;if(!a)o=Object.keys(e).length;else for(const u in e)e[u]!==void 0&&o++;let c=0;for(const u in t)if((!a||t[u]!==void 0)&&(c++,c>o||!Wt(e[u],t[u],r)))return!1;return o===c}return!1}function Ys(e){let t,r;const a=new Promise((o,c)=>{t=o,r=c});return a.status="pending",a.resolve=o=>{a.status="resolved",a.value=o,t(o),e?.(o)},a.reject=o=>{a.status="rejected",r(o)},a}function GS(e){return typeof e?.message!="string"?!1:e.message.startsWith("Failed to fetch dynamically imported module")||e.message.startsWith("error loading dynamically imported module")||e.message.startsWith("Importing a module script failed")}function ho(e){return!!(e&&typeof e=="object"&&typeof e.then=="function")}function VS(e){return e.replace(/[\x00-\x1f\x7f]/g,"")}function xy(e){let t;try{t=decodeURI(e)}catch{t=e.replaceAll(/%[0-9A-F]{2}/gi,r=>{try{return decodeURI(r)}catch{return r}})}return VS(t)}var KS=["http:","https:","mailto:","tel:"];function pc(e,t){if(!e)return!1;
10try{const r=new URL(e);return!t.has(r.protocol)}catch{return!1}}var YS={"&":"\\u0026",">":"\\u003e","<":"\\u003c","\u2028":"\\u2028","\u2029":"\\u2029"},FS=/[&><\u2028\u2029]/g;function JS(e){return e.replace(FS,t=>YS[t])}function Qi(e){if(!e)return{path:e,handledProtocolRelativeURL:!1};if(!/[%\\\x00-\x1f\x7f]/.test(e)&&!e.startsWith("//"))return{path:e,handledProtocolRelativeURL:!1};const t=/%25|%5C/gi;let r=0,a="",o;for(;(o=t.exec(e))!==null;)a+=xy(e.slice(r,o.index))+o[0],r=t.lastIndex;a=a+xy(r?e.slice(r):e);let c=!1;return a.startsWith("//")&&(c=!0,a="/"+a.replace(/^\/+/,"")),{path:a,handledProtocolRelativeURL:c}}function QS(e){return/\s|[^\u0000-\u007F]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function XS(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}function tn(){throw new Error("Invariant failed")}function po(e){const t=new Map;let r,a;const o=c=>{c.next&&(c.prev?(c.prev.next=c.next,c.next.prev=c.prev,c.next=void 0,a&&(a.next=c,c.prev=a)):(c.next.prev=void 0,r=c.next,c.next=void 0,a&&(c.prev=a,a.next=c)),a=c)};return{get(c){const u=t.get(c);if(u)return o(u),u.value},set(c,u){if(t.size>=e&&r){const p=r;t.delete(p.key),p.next&&(r=p.next,p.next.prev=void 0),p===a&&(a=void 0)}const f=t.get(c);if(f)f.value=u,o(f);else{const p={key:c,value:u,prev:a};a&&(a.next=p),a=p,r||(r=p),t.set(c,p)}},clear(){t.clear(),r=void 0,a=void 0}}}var as=4,hb=5;function ZS(e){const t=e.indexOf("{");if(t===-1)return null;const r=e.indexOf("}",t);return r===-1||t+1>=e.length?null:[t,r]}function ah(e,t,r=new Uint16Array(6)){const a=e.indexOf("/",t),o=a===-1?e.length:a,c=e.substring(t,o);if(!c||!c.includes("$"))return r[0]=0,r[1]=t,r[2]=t,r[3]=o,r[4]=o,r[5]=o,r;if(c==="$"){const f=e.length;return r[0]=2,r[1]=t,r[2]=t,r[3]=f,r[4]=f,r[5]=f,r}if(c.charCodeAt(0)===36)return r[0]=1,r[1]=t,r[2]=t+1,r[3]=o,r[4]=o,r[5]=o,r;const u=ZS(c);if(u){const[f,p]=u,m=c.charCodeAt(f+1);if(m===45){if(f+2<c.length&&c.charCodeAt(f+2)===36){const y=f+3,g=p;if(y<g)return r[0]=3,r[1]=t+f,r[2]=t+y,r[3]=t+g,r[4]=t+p+1,r[5]=o,r}}else if(m===36){const y=f+1,g=f+2;return g===p?(r[0]=2,r[1]=t+f,r[2]=t+y,r[3]=t+g,r[4]=t+p+1,r[5]=e.length,r):(r[0]=1,r[1]=t+f,r[2]=t+g,r[3]=t+p,r[4]=t+p+1,r[5]=o,r)}}return r[0]=0,r[1]=t,r[2]=t,r[3]=o,r[4]=o,r[5]=o,r}function Mc(e,t,r,a,o,c,u){u?.(r);let f=a;{const p=r.fullPath??r.from,m=p.length,y=r.options?.caseSensitive??e,g=!!(r.options?.params?.parse&&r.options?.skipRouteOnParseError?.params);for(;f<m;){const w=ah(p,f,t);let _;const x=f,E=w[5];switch(f=E+1,c++,w[0]){case 0:{const R=p.substring(w[2],w[3]);if(y){const M=o.static?.get(R);if(M)_=M;else{o.static??=new Map;const j=Hs(r.fullPath??r.from);j.parent=o,j.depth=c,_=j,o.static.set(R,j)}}else{const M=R.toLowerCase(),j=o.staticInsensitive?.get(M);if(j)_=j;else{o.staticInsensitive??=new Map;const L=Hs(r.fullPath??r.from);L.parent=o,L.depth=c,_=L,o.staticInsensitive.set(M,L)}}break}case 1:{const R=p.substring(x,w[1]),M=p.substring(w[4],E),j=y&&!!(R||M),L=R?j?R:R.toLowerCase():void 0,X=M?j?M:M.toLowerCase():void 0,G=!g&&o.dynamic?.find(H=>!H.skipOnParamError&&H.caseSensitive===j&&H.prefix===L&&H.suffix===X);if(G)_=G;else{const H=df(1,r.fullPath??r.from,j,L,X);_=H,H.depth=c,H.parent=o,o.dynamic??=[],o.dynamic.push(H)}break}case 3:{const R=p.substring(x,w[1]),M=p.substring(w[4],E),j=y&&!!(R||M),L=R?j?R:R.toLowerCase():void 0,X=M?j?M:M.toLowerCase():void 0,G=!g&&o.optional?.find(H=>!H.skipOnParamError&&H.caseSensitive===j&&H.prefix===L&&H.suffix===X);if(G)_=G;else{const H=df(3,r.fullPath??r.from,j,L,X);_=H,H.parent=o,H.depth=c,o.optional??=[],o.optional.push(H)}break}case 2:{const R=p.substring(x,w[1]),M=p.substring(w[4],E),j=y&&!!(R||M),L=R?j?R:R.toLowerCase():void 0,X=M?j?M:M.toLowerCase():void 0,G=df(2,r.fullPath??r.from,j,L,X);_=G,G.parent=o,G.depth=c,o.wildcard??=[],o.wildcard.push(G)}}o=_}if(g&&r.children&&!r.isRoot&&r.id&&r.id.charCodeAt(r.id.lastIndexOf("/")+1)===95){const w=Hs(r.fullPath??r.from);w.kind=hb,w.parent=o,c++,w.depth=c,o.pathless??=[],o.pathless.push(w),o=w}const b=(r.path||!r.children)&&!r.isRoot;if(b&&p.endsWith("/")){const w=Hs(r.fullPath??r.from);w.kind=as,w.parent=o,c++,w.depth=c,o.index=w,o=w}o.parse=r.options?.params?.parse??null,o.skipOnParamError=g,o.parsingPriority=r.options?.skipRouteOnParseError?.priority??0,b&&!o.route&&(o.route=r,o.fullPath=r.fullPath??r.from)}if(r.children)for(const p of r.children)Mc(e,t,p,f,o,c,u)}function uf(e,t){if(e.skipOnParamError&&!t.skipOnParamError)return-1;if(!e.skipOnParamError&&t.skipOnParamError)return 1;if(e.skipOnParamError&&t.skipOnParamError&&(e.parsingPriority||t.parsingPriority))return t.parsingPriority-e.parsingPriority;if(e.prefix&&t.prefix&&e.prefix!==t.prefix){if(e.prefix.startsWith(t.prefix))return-1;if(t.prefix.startsWith(e.prefix))return 1}if(e.suffix&&t.suffix&&e.suffix!==t.suffix){if(e.suffix.endsWith(t.suffix))return-1;if(t.suffix.endsWith(e.suffix))return 1}return e.prefix&&!t.prefix?-1:!e.prefix&&t.prefix?1:e.suffix&&!t.suffix?-1:!e.suffix&&t.suffix?1:e.caseSensitive&&!t.caseSensitive?-1:!e.caseSensitive&&t.caseSensitive?1:0}function es(e){if(e.pathless)for(const t of e.pathless)es(t);if(e.static)for(const t of e.static.values())es(t);if(e.staticInsensitive)for(const t of e.staticInsensitive.values())es(t);if(e.dynamic?.length){e.dynamic.sort(uf);for(const t of e.dynamic)es(t)}if(e.optional?.length){e.optional.sort(uf);for(const t of e.optional)es(t)}if(e.wildcard?.length){e.wildcard.sort(uf);for(const t of e.wildcard)es(t)}}function Hs(e){return{kind:0,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null,parse:null,skipOnParamError:!1,parsingPriority:0}}function df(e,t,r,a,o){return{kind:e,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,caseSensitive:r,prefix:a,suffix:o}}function WS(e,t){const r=Hs("/"),a=new Uint16Array(6);for(const o of e)Mc(!1,a,o,1,r,0);es(r),t.masksTree=r,t.flatCache=po(1e3)}function eE(e,t){e||="/";const r=t.flatCache.get(e);if(r)return r;const a=ih(e,t.masksTree);return t.flatCache.set(e,a),a}function tE(e,t,r,a,o){e||="/",a||="/";const c=t?`case\0${e}`:e;let u=o.singleCache.get(c);return u||(u=Hs("/"),Mc(t,new Uint16Array(6),{from:e},1,u,0),o.singleCache.set(c,u)),ih(a,u,r)}function nE(e,t,r=!1){const a=r?e:`nofuzz\0${e}`,o=t.matchCache.get(a);if(o!==void 0)return o;e||="/";
10let c;try{c=ih(e,t.segmentTree,r)}catch(u){if(u instanceof URIError)c=null;else throw u}return c&&(c.branch=aE(c.route)),t.matchCache.set(a,c),c}function rE(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function sE(e,t=!1,r){const a=Hs(e.fullPath),o=new Uint16Array(6),c={},u={};let f=0;return Mc(t,o,e,1,a,0,p=>{if(r?.(p,f),p.id in c&&tn(),c[p.id]=p,f!==0&&p.path){const m=rE(p.fullPath);(!u[m]||p.fullPath.endsWith("/"))&&(u[m]=p)}f++}),es(a),{processedTree:{segmentTree:a,singleCache:po(1e3),matchCache:po(1e3),flatCache:null,masksTree:null},routesById:c,routesByPath:u}}function ih(e,t,r=!1){const a=e.split("/"),o=oE(e,a,t,r);if(!o)return null;const[c]=pb(e,a,o);return{route:o.node.route,rawParams:c,parsedParams:o.parsedParams}}function pb(e,t,r){const a=iE(r.node);let o=null;const c=Object.create(null);let u=r.extract?.part??0,f=r.extract?.node??0,p=r.extract?.path??0,m=r.extract?.segment??0;for(;f<a.length;u++,f++,p++,m++){const y=a[f];if(y.kind===as)break;if(y.kind===hb){m--,u--,p--;continue}const g=t[u],b=p;if(g&&(p+=g.length),y.kind===1){o??=r.node.fullPath.split("/");const w=o[m],_=y.prefix?.length??0;if(w.charCodeAt(_)===123){const x=y.suffix?.length??0,E=w.substring(_+2,w.length-x-1),R=g.substring(_,g.length-x);c[E]=decodeURIComponent(R)}else{const x=w.substring(1);c[x]=decodeURIComponent(g)}}else if(y.kind===3){if(r.skipped&1<<f){u--,p=b-1;continue}o??=r.node.fullPath.split("/");const w=o[m],_=y.prefix?.length??0,x=y.suffix?.length??0,E=w.substring(_+3,w.length-x-1),R=y.suffix||y.prefix?g.substring(_,g.length-x):g;R&&(c[E]=decodeURIComponent(R))}else if(y.kind===2){const w=y,_=e.substring(b+(w.prefix?.length??0),e.length-(w.suffix?.length??0)),x=decodeURIComponent(_);c["*"]=x,c._splat=x;break}}return r.rawParams&&Object.assign(c,r.rawParams),[c,{part:u,node:f,path:p,segment:m}]}function aE(e){const t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function iE(e){const t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function oE(e,t,r,a){if(e==="/"&&r.index)return{node:r.index,skipped:0};const o=!fo(t),c=o&&e!=="/",u=t.length-(o?1:0),f=[{node:r,index:1,skipped:0,depth:1,statics:0,dynamics:0,optionals:0}];let p=null,m=null;for(;f.length;){const y=f.pop(),{node:g,index:b,skipped:w,depth:_,statics:x,dynamics:E,optionals:R}=y;let{extract:M,rawParams:j,parsedParams:L}=y;if(g.kind===2&&g.route&&!Kl(m,y))continue;if(g.skipOnParamError){if(!Ay(e,t,y))continue;j=y.rawParams,M=y.extract,L=y.parsedParams}a&&g.route&&g.kind!==as&&Kl(p,y)&&(p=y);const X=b===u;if(X&&(g.route&&(!c||g.kind===as||g.kind===2)&&Kl(m,y)&&(m=y),!g.optional&&!g.wildcard&&!g.index&&!g.pathless))continue;const G=X?void 0:t[b];let H;if(X&&g.index){const U={node:g.index,index:b,skipped:w,depth:_+1,statics:x,dynamics:E,optionals:R,extract:M,rawParams:j,parsedParams:L};let Q=!0;if(g.index.skipOnParamError&&(Ay(e,t,U)||(Q=!1)),Q){if(!E&&!R&&!w&&lE(x,u))return U;Kl(m,U)&&(m=U)}}if(g.wildcard)for(let U=g.wildcard.length-1;U>=0;U--){const Q=g.wildcard[U],{prefix:fe,suffix:ie}=Q;if(!(fe&&(X||!(Q.caseSensitive?G:H??=G.toLowerCase()).startsWith(fe)))){if(ie){if(X)continue;const ve=t.slice(b).join("/").slice(-ie.length);if((Q.caseSensitive?ve:ve.toLowerCase())!==ie)continue}f.push({node:Q,index:u,skipped:w,depth:_+1,statics:x,dynamics:E,optionals:R,extract:M,rawParams:j,parsedParams:L})}}if(g.optional){const U=w|1<<_,Q=_+1;for(let fe=g.optional.length-1;fe>=0;fe--){const ie=g.optional[fe];f.push({node:ie,index:b,skipped:U,depth:Q,statics:x,dynamics:E,optionals:R,extract:M,rawParams:j,parsedParams:L})}if(!X)for(let fe=g.optional.length-1;fe>=0;fe--){const ie=g.optional[fe],{prefix:ve,suffix:Se}=ie;if(ve||Se){const ze=ie.caseSensitive?G:H??=G.toLowerCase();if(ve&&!ze.startsWith(ve)||Se&&!ze.endsWith(Se))continue}f.push({node:ie,index:b+1,skipped:w,depth:Q,statics:x,dynamics:E,optionals:R+Vl(u,b),extract:M,rawParams:j,parsedParams:L})}}if(!X&&g.dynamic&&G)for(let U=g.dynamic.length-1;U>=0;U--){const Q=g.dynamic[U],{prefix:fe,suffix:ie}=Q;if(fe||ie){const ve=Q.caseSensitive?G:H??=G.toLowerCase();if(fe&&!ve.startsWith(fe)||ie&&!ve.endsWith(ie))continue}f.push({node:Q,index:b+1,skipped:w,depth:_+1,statics:x,dynamics:E+Vl(u,b),optionals:R,extract:M,rawParams:j,parsedParams:L})}if(!X&&g.staticInsensitive){const U=g.staticInsensitive.get(H??=G.toLowerCase());U&&f.push({node:U,index:b+1,skipped:w,depth:_+1,statics:x+Vl(u,b),dynamics:E,optionals:R,extract:M,rawParams:j,parsedParams:L})}if(!X&&g.static){const U=g.static.get(G);U&&f.push({node:U,index:b+1,skipped:w,depth:_+1,statics:x+Vl(u,b),dynamics:E,optionals:R,extract:M,rawParams:j,parsedParams:L})}if(g.pathless){const U=_+1;for(let Q=g.pathless.length-1;Q>=0;Q--){const fe=g.pathless[Q];f.push({node:fe,index:b,skipped:w,depth:U,statics:x,dynamics:E,optionals:R,extract:M,rawParams:j,parsedParams:L})}}}if(m)return m;if(a&&p){let y=p.index;for(let b=0;b<p.index;b++)y+=t[b].length;const g=y===e.length?"/":e.slice(y);return p.rawParams??=Object.create(null),p.rawParams["**"]=decodeURIComponent(g),p}return null}function Vl(e,t){return 2**(e-t-1)}function lE(e,t){return e===2**(t-1)-1}function Ay(e,t,r){try{const[a,o]=pb(e,t,r);r.rawParams=a,r.extract=o;const c=r.node.parse(a);return r.parsedParams=Object.assign(Object.create(null),r.parsedParams,c),!0}catch{return null}}function Kl(e,t){return e?t.statics>e.statics||t.statics===e.statics&&(t.dynamics>e.dynamics||t.dynamics===e.dynamics&&(t.optionals>e.optionals||t.optionals===e.optionals&&((t.node.kind===as)>(e.node.kind===as)||t.node.kind===as==(e.node.kind===as)&&t.depth>e.depth))):!0}function lc(e){return oh(e.filter(t=>t!==void 0).join("/"))}function oh(e){return e.replace(/\/{2,}/g,"/")}function mb(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function os(e){const t=e.length;return t>1&&e[t-1]==="/"?e.replace(/\/{1,}$/,""):e}function gb(e){return os(mb(e))}function mc(e,t){return e?.endsWith("/")&&e!=="/"&&e!==`${t}/`?e.slice(0,-1):e}function cE(e,t,r){return mc(e,r)===mc(t,r)}function uE({base:e,to:t,trailingSlash:r="never",cache:a}){const o=t.startsWith("/"),c=!o&&t===".";let u;if(a){u=o?t:c?e:e+"\0"+t;const g=a.get(u);if(g)return g}let f;if(c)f=e.split("/");else if(o)f=t.split("/");else{for(f=e.split("/");f.length>1&&fo(f)==="";)f.pop();const g=t.split("/");for(let b=0,w=g.length;b<w;b++){const _=g[b];_===""?b?b===w-1&&f.push(_):f=[_]:_===".."?f.pop():_==="."||f.push(_)}}f.length>
101&&(fo(f)===""?r==="never"&&f.pop():r==="always"&&f.push(""));let p,m="";for(let g=0;g<f.length;g++){g>0&&(m+="/");const b=f[g];if(!b)continue;p=ah(b,0,p);const w=p[0];if(w===0){m+=b;continue}const _=p[5],x=b.substring(0,p[1]),E=b.substring(p[4],_),R=b.substring(p[2],p[3]);w===1?m+=x||E?`${x}{$${R}}${E}`:`$${R}`:w===2?m+=x||E?`${x}{$}${E}`:"$":m+=`${x}{-$${R}}${E}`}m=oh(m);const y=m||"/";return u&&a&&a.set(u,y),y}function dE(e){const t=new Map(e.map(o=>[encodeURIComponent(o),o])),r=Array.from(t.keys()).map(o=>o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),a=new RegExp(r,"g");return o=>o.replace(a,c=>t.get(c)??c)}function ff(e,t,r){const a=t[e];return typeof a!="string"?a:e==="_splat"?/^[a-zA-Z0-9\-._~!/]*$/.test(a)?a:a.split("/").map(o=>Cy(o,r)).join("/"):Cy(a,r)}function Oy({path:e,params:t,decoder:r,...a}){let o=!1;const c=Object.create(null);if(!e||e==="/")return{interpolatedPath:"/",usedParams:c,isMissingParams:o};if(!e.includes("$"))return{interpolatedPath:e,usedParams:c,isMissingParams:o};const u=e.length;let f=0,p,m="";for(;f<u;){const y=f;p=ah(e,y,p);const g=p[5];if(f=g+1,y===g)continue;const b=p[0];if(b===0){m+="/"+e.substring(y,g);continue}if(b===2){const w=t._splat;c._splat=w,c["*"]=w;const _=e.substring(y,p[1]),x=e.substring(p[4],g);if(!w){o=!0,(_||x)&&(m+="/"+_+x);continue}const E=ff("_splat",t,r);m+="/"+_+E+x;continue}if(b===1){const w=e.substring(p[2],p[3]);!o&&!(w in t)&&(o=!0),c[w]=t[w];const _=e.substring(y,p[1]),x=e.substring(p[4],g),E=ff(w,t,r)??"undefined";m+="/"+_+E+x;continue}if(b===3){const w=e.substring(p[2],p[3]),_=t[w];if(_==null)continue;c[w]=_;const x=e.substring(y,p[1]),E=e.substring(p[4],g),R=ff(w,t,r)??"";m+="/"+x+R+E;continue}}return e.endsWith("/")&&(m+="/"),{usedParams:c,interpolatedPath:m||"/",isMissingParams:o}}function Cy(e,t){const r=encodeURIComponent(e);return t?.(r)??r}function Rt(e){return e?.isNotFound===!0}function fE(){try{return typeof window<"u"&&typeof window.sessionStorage=="object"?window.sessionStorage:void 0}catch{return}}var hE="tsr-scroll-restoration-v1_3";function pE(){const e=fE();if(!e)return null;let t={};try{const a=JSON.parse(e.getItem("tsr-scroll-restoration-v1_3")||"{}");ti(a)&&(t=a)}catch{}return{get state(){return t},set:a=>{t=ss(a,t)||t},persist:()=>{try{e.setItem(hE,JSON.stringify(t))}catch{}}}}var ky=pE(),mE=e=>e.state.__TSR_key||e.href;function gE(e){const t=[];let r;for(;r=e.parentNode;)t.push(`${e.tagName}:nth-child(${Array.prototype.indexOf.call(r.children,e)+1})`),e=r;return`${t.reverse().join(" > ")}`.toLowerCase()}var Yl=!1,Xi="window",jy="data-scroll-restoration-id";function yE(e,t){if(!ky)return;const r=ky;if((e.options.scrollRestoration??!1)&&(e.isScrollRestoring=!0),e.isScrollRestorationSetup||!r)return;e.isScrollRestorationSetup=!0,Yl=!1;const a=e.options.getScrollRestorationKey||mE,o=new Map;window.history.scrollRestoration="manual";const c=f=>{if(!(Yl||!e.isScrollRestoring))if(f.target===document||f.target===window)o.set(Xi,{scrollX:window.scrollX||0,scrollY:window.scrollY||0});else{const p=f.target;o.set(p,{scrollX:p.scrollLeft||0,scrollY:p.scrollTop||0})}},u=f=>{if(!e.isScrollRestoring||!f||o.size===0||!r)return;const p=r.state[f]||={};for(const[m,y]of o){let g;if(m===Xi)g=Xi;else if(m.isConnected){const b=m.getAttribute(jy);g=b?`[${jy}="${b}"]`:gE(m)}g&&(p[g]=y)}};document.addEventListener("scroll",c,!0),e.subscribe("onBeforeLoad",f=>{u(f.fromLocation?a(f.fromLocation):void 0),o.clear()}),window.addEventListener("pagehide",()=>{u(a(e.stores.resolvedLocation.get()??e.stores.location.get())),r.persist()}),e.subscribe("onRendered",f=>{const p=a(f.toLocation),m=e.options.scrollRestorationBehavior,y=e.options.scrollToTopSelectors;if(o.clear(),!e.resetNextScroll){e.resetNextScroll=!0;return}if(!(typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation}))){Yl=!0;try{const g=e.isScrollRestoring?r.state[p]:void 0;let b=!1;if(g)for(const w in g){const _=g[w];if(!ti(_))continue;const{scrollX:x,scrollY:E}=_;if(!(!Number.isFinite(x)||!Number.isFinite(E))){if(w===Xi)window.scrollTo({top:E,left:x,behavior:m}),b=!0;else if(w){let R;try{R=document.querySelector(w)}catch{continue}R&&(R.scrollLeft=x,R.scrollTop=E,b=!0)}}}if(!b){const w=e.history.location.hash.slice(1);if(w){const _=window.history.state?.__hashScrollIntoViewOptions??!0;if(_){const x=document.getElementById(w);x&&x.scrollIntoView(_)}}else{const _={top:0,left:0,behavior:m};if(window.scrollTo(_),y)for(const x of y){if(x===Xi)continue;const E=typeof x=="function"?x():document.querySelector(x);E&&E.scrollTo(_)}}}}finally{Yl=!1}e.isScrollRestoring&&r.set(g=>(g[p]||={},g))}})}
10function yb(e,t=String){const r=new URLSearchParams;for(const a in e){const o=e[a];o!==void 0&&r.set(a,t(o))}return r.toString()}function hf(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function vE(e){const t=new URLSearchParams(e),r=Object.create(null);for(const[a,o]of t.entries()){const c=r[a];c==null?r[a]=hf(o):Array.isArray(c)?c.push(hf(o)):r[a]=[c,hf(o)]}return r}var bE=_E(JSON.parse),wE=SE(JSON.stringify,JSON.parse);function _E(e){return t=>{t[0]==="?"&&(t=t.substring(1));const r=vE(t);for(const a in r){const o=r[a];if(typeof o=="string")try{r[a]=e(o)}catch{}}return r}}function SE(e,t){const r=typeof t=="function";function a(o){if(typeof o=="object"&&o!==null)try{return e(o)}catch{}else if(r&&typeof o=="string")try{return t(o),e(o)}catch{}return o}return o=>{const c=yb(o,a);return c?`?${c}`:""}}var Vs="__root__";function vb(e){if(e.statusCode=e.statusCode||e.code||307,!e._builtLocation&&!e.reloadDocument&&typeof e.href=="string")try{new URL(e.href),e.reloadDocument=!0}catch{}const t=new Headers(e.headers);e.href&&t.get("Location")===null&&t.set("Location",e.href);const r=new Response(null,{status:e.statusCode,headers:t});if(r.options=e,e.throw)throw r;return r}function en(e){return e instanceof Response&&!!e.options}function EE(e){if(e!==null&&typeof e=="object"&&e.isSerializedRedirect)return vb(e)}function TE(e){return{input:({url:t})=>{for(const r of e)t=Df(r,t);return t},output:({url:t})=>{for(let r=e.length-1;r>=0;r--)t=bb(e[r],t);return t}}}function RE(e){const t=gb(e.basepath),r=`/${t}`,a=`${r}/`,o=e.caseSensitive?r:r.toLowerCase(),c=e.caseSensitive?a:a.toLowerCase();return{input:({url:u})=>{const f=e.caseSensitive?u.pathname:u.pathname.toLowerCase();return f===o?u.pathname="/":f.startsWith(c)&&(u.pathname=u.pathname.slice(r.length)),u},output:({url:u})=>(u.pathname=lc(["/",t,u.pathname]),u)}}function Df(e,t){const r=e?.input?.({url:t});if(r){if(typeof r=="string")return new URL(r);if(r instanceof URL)return r}return t}function bb(e,t){const r=e?.output?.({url:t});if(r){if(typeof r=="string")return new URL(r);if(r instanceof URL)return r}return t}function xE(e,t){const{createMutableStore:r,createReadonlyStore:a,batch:o,init:c}=t,u=new Map,f=new Map,p=new Map,m=r(e.status),y=r(e.loadedAt),g=r(e.isLoading),b=r(e.isTransitioning),w=r(e.location),_=r(e.resolvedLocation),x=r(e.statusCode),E=r(e.redirect),R=r([]),M=r([]),j=r([]),L=a(()=>pf(u,R.get())),X=a(()=>pf(f,M.get())),G=a(()=>pf(p,j.get())),H=a(()=>R.get()[0]),U=a(()=>R.get().some(F=>u.get(F)?.get().status==="pending")),Q=a(()=>({locationHref:w.get().href,resolvedLocationHref:_.get()?.href,status:m.get()})),fe=a(()=>({status:m.get(),loadedAt:y.get(),isLoading:g.get(),isTransitioning:b.get(),matches:L.get(),location:w.get(),resolvedLocation:_.get(),statusCode:x.get(),redirect:E.get()})),ie=po(64);function ve(F){let ae=ie.get(F);return ae||(ae=a(()=>{const Ee=R.get();for(const ee of Ee){const C=u.get(ee);if(C&&C.routeId===F)return C.get()}}),ie.set(F,ae)),ae}const Se={status:m,loadedAt:y,isLoading:g,isTransitioning:b,location:w,resolvedLocation:_,statusCode:x,redirect:E,matchesId:R,pendingIds:M,cachedIds:j,matches:L,pendingMatches:X,cachedMatches:G,firstId:H,hasPending:U,matchRouteDeps:Q,matchStores:u,pendingMatchStores:f,cachedMatchStores:p,__store:fe,getRouteMatchStore:ve,setMatches:ze,setPending:Ae,setCached:D};ze(e.matches),c?.(Se);function ze(F){mf(F,u,R,r,o)}function Ae(F){mf(F,f,M,r,o)}function D(F){mf(F,p,j,r,o)}return Se}function pf(e,t){const r=[];for(const a of t){const o=e.get(a);o&&r.push(o.get())}return r}function mf(e,t,r,a,o){const c=e.map(f=>f.id),u=new Set(c);o(()=>{for(const f of t.keys())u.has(f)||t.delete(f);for(const f of e){const p=t.get(f.id);if(!p){const m=a(f);m.routeId=f.routeId,t.set(f.id,m);continue}p.routeId=f.routeId,p.get()!==f&&p.set(f)}XS(r.get(),c)||r.set(c)})}var Lf=e=>{if(!e.rendered)return e.rendered=!0,e.onReady?.()},AE=e=>e.stores.matchesId.get().some(t=>e.stores.matchStores.get(t)?.get()._forcePending),Nc=(e,t)=>!!(e.preload&&!e.router.stores.matchStores.has(t)),Ks=(e,t,r=!0)=>{const a={...e.router.options.context??{}},o=r?t:t-1;for(let c=0;c<=o;c++){const u=e.matches[c];if(!u)continue;const f=e.router.getMatch(u.id);
10f&&Object.assign(a,f.__routeContext,f.__beforeLoadContext)}return a},My=(e,t)=>{if(!e.matches.length)return;const r=t.routeId,a=e.matches.findIndex(u=>u.routeId===e.router.routeTree.id),o=a>=0?a:0;let c=r?e.matches.findIndex(u=>u.routeId===r):e.firstBadMatchIndex??e.matches.length-1;c<0&&(c=o);for(let u=c;u>=0;u--){const f=e.matches[u];if(e.router.looseRoutesById[f.routeId].options.notFoundComponent)return u}return r?c:o},is=(e,t,r)=>{if(!(!en(r)&&!Rt(r)))throw en(r)&&r.redirectHandled&&!r.options.reloadDocument||(t&&(t._nonReactive.beforeLoadPromise?.resolve(),t._nonReactive.loaderPromise?.resolve(),t._nonReactive.beforeLoadPromise=void 0,t._nonReactive.loaderPromise=void 0,t._nonReactive.error=r,e.updateMatch(t.id,a=>({...a,status:en(r)?"redirected":Rt(r)?"notFound":a.status==="pending"?"success":a.status,context:Ks(e,t.index),isFetching:!1,error:r})),Rt(r)&&!r.routeId&&(r.routeId=t.routeId),t._nonReactive.loadPromise?.resolve()),en(r)&&(e.rendered=!0,r.options._fromLocation=e.location,r.redirectHandled=!0,r=e.router.resolveRedirect(r))),r},wb=(e,t)=>{const r=e.router.getMatch(t);return!!(!r||r._nonReactive.dehydrated)},Ny=(e,t,r)=>{const a=Ks(e,r);e.updateMatch(t,o=>({...o,context:a}))},Zi=(e,t,r,a)=>{const{id:o,routeId:c}=e.matches[t],u=e.router.looseRoutesById[c];if(r instanceof Promise)throw r;r.routerCode=a,e.firstBadMatchIndex??=t,is(e,e.router.getMatch(o),r);try{u.options.onError?.(r)}catch(f){r=f,is(e,e.router.getMatch(o),r)}e.updateMatch(o,f=>(f._nonReactive.beforeLoadPromise?.resolve(),f._nonReactive.beforeLoadPromise=void 0,f._nonReactive.loadPromise?.resolve(),{...f,error:r,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController})),!e.preload&&!en(r)&&!Rt(r)&&(e.serialError??=r)},_b=(e,t,r,a)=>{if(a._nonReactive.pendingTimeout!==void 0)return;const o=r.options.pendingMs??e.router.options.defaultPendingMs;if(e.onReady&&!Nc(e,t)&&(r.options.loader||r.options.beforeLoad||Eb(r))&&typeof o=="number"&&o!==1/0&&(r.options.pendingComponent??e.router.options?.defaultPendingComponent)){const c=setTimeout(()=>{Lf(e)},o);a._nonReactive.pendingTimeout=c}},OE=(e,t,r)=>{const a=e.router.getMatch(t);if(!a._nonReactive.beforeLoadPromise&&!a._nonReactive.loaderPromise)return;_b(e,t,r,a);const o=()=>{const c=e.router.getMatch(t);c.preload&&(c.status==="redirected"||c.status==="notFound")&&is(e,c,c.error)};return a._nonReactive.beforeLoadPromise?a._nonReactive.beforeLoadPromise.then(o):o()},CE=(e,t,r,a)=>{const o=e.router.getMatch(t);let c=o._nonReactive.loadPromise;o._nonReactive.loadPromise=Ys(()=>{c?.resolve(),c=void 0});const{paramsError:u,searchError:f}=o;u&&Zi(e,r,u,"PARSE_PARAMS"),f&&Zi(e,r,f,"VALIDATE_SEARCH"),_b(e,t,a,o);const p=new AbortController;let m=!1;const y=()=>{m||(m=!0,e.updateMatch(t,L=>({...L,isFetching:"beforeLoad",fetchCount:L.fetchCount+1,abortController:p})))},g=()=>{o._nonReactive.beforeLoadPromise?.resolve(),o._nonReactive.beforeLoadPromise=void 0,e.updateMatch(t,L=>({...L,isFetching:!1}))};if(!a.options.beforeLoad){e.router.batch(()=>{y(),g()});return}o._nonReactive.beforeLoadPromise=Ys();const b={...Ks(e,r,!1),...o.__routeContext},{search:w,params:_,cause:x}=o,E=Nc(e,t),R={search:w,abortController:p,params:_,preload:E,context:b,location:e.location,navigate:L=>e.router.navigate({...L,_fromLocation:e.location}),buildLocation:e.router.buildLocation,cause:E?"preload":x,matches:e.matches,routeId:a.id,...e.router.options.additionalContext},M=L=>{if(L===void 0){e.router.batch(()=>{y(),g()});return}(en(L)||Rt(L))&&(y(),Zi(e,r,L,"BEFORE_LOAD")),e.router.batch(()=>{y(),e.updateMatch(t,X=>({...X,__beforeLoadContext:L})),g()})};let j;try{if(j=a.options.beforeLoad(R),ho(j))return y(),j.catch(L=>{Zi(e,r,L,"BEFORE_LOAD")}).then(M)}catch(L){y(),Zi(e,r,L,"BEFORE_LOAD")}M(j)},kE=(e,t)=>{const{id:r,routeId:a}=e.matches[t],o=e.router.looseRoutesById[a],c=()=>f(),u=()=>CE(e,r,t,o),f=()=>{if(wb(e,r))return;const p=OE(e,r,o);return ho(p)?p.then(u):u()};return c()},jE=(e,t,r)=>{const a=e.router.getMatch(t);if(!a||!r.options.head&&!r.options.scripts&&!r.options.headers)return;const o={ssr:e.router.options.ssr,matches:e.matches,match:a,params:a.params,loaderData:a.loaderData};return Promise.all([r.options.head?.(o),r.options.scripts?.(o),r.options.headers?.(o)]).then(([c,u,f])=>
10({meta:c?.meta,links:c?.links,headScripts:c?.scripts,headers:f,scripts:u,styles:c?.styles}))},Sb=(e,t,r,a,o)=>{const c=t[a-1],{params:u,loaderDeps:f,abortController:p,cause:m}=e.router.getMatch(r),y=Ks(e,a),g=Nc(e,r);return{params:u,deps:f,preload:!!g,parentMatchPromise:c,abortController:p,context:y,location:e.location,navigate:b=>e.router.navigate({...b,_fromLocation:e.location}),cause:g?"preload":m,route:o,...e.router.options.additionalContext}},Dy=async(e,t,r,a,o)=>{try{const c=e.router.getMatch(r);try{(!(fb??e.router.isServer)||c.ssr===!0)&&mo(o);const u=o.options.loader,f=typeof u=="function"?u:u?.handler,p=f?.(Sb(e,t,r,a,o)),m=!!f&&ho(p);if((m||o._lazyPromise||o._componentsPromise||o.options.head||o.options.scripts||o.options.headers||c._nonReactive.minPendingPromise)&&e.updateMatch(r,g=>({...g,isFetching:"loader"})),f){const g=m?await p:p;is(e,e.router.getMatch(r),g),g!==void 0&&e.updateMatch(r,b=>({...b,loaderData:g}))}o._lazyPromise&&await o._lazyPromise;const y=c._nonReactive.minPendingPromise;y&&await y,o._componentsPromise&&await o._componentsPromise,e.updateMatch(r,g=>({...g,error:void 0,context:Ks(e,a),status:"success",isFetching:!1,updatedAt:Date.now()}))}catch(u){let f=u;if(f?.name==="AbortError"){if(c.abortController.signal.aborted){c._nonReactive.loaderPromise?.resolve(),c._nonReactive.loaderPromise=void 0;return}e.updateMatch(r,m=>({...m,status:m.status==="pending"?"success":m.status,isFetching:!1,context:Ks(e,a)}));return}const p=c._nonReactive.minPendingPromise;p&&await p,Rt(u)&&await o.options.notFoundComponent?.preload?.(),is(e,e.router.getMatch(r),u);try{o.options.onError?.(u)}catch(m){f=m,is(e,e.router.getMatch(r),m)}!en(f)&&!Rt(f)&&await mo(o,["errorComponent"]),e.updateMatch(r,m=>({...m,error:f,context:Ks(e,a),status:"error",isFetching:!1}))}}catch(c){const u=e.router.getMatch(r);u&&(u._nonReactive.loaderPromise=void 0),is(e,u,c)}},ME=async(e,t,r)=>{async function a(w,_,x,E,R){const M=Date.now()-_.updatedAt,j=w?R.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:R.options.staleTime??e.router.options.defaultStaleTime??0,L=R.options.shouldReload,X=typeof L=="function"?L(Sb(e,t,o,r,R)):L,{status:G,invalid:H}=E,U=M>=j&&(!!e.forceStaleReload||E.cause==="enter"||x!==void 0&&x!==E.id);u=G==="success"&&(H||(X??U)),w&&R.options.preload===!1||(u&&!e.sync&&y?(f=!0,(async()=>{try{await Dy(e,t,o,r,R);const Q=e.router.getMatch(o);Q._nonReactive.loaderPromise?.resolve(),Q._nonReactive.loadPromise?.resolve(),Q._nonReactive.loaderPromise=void 0,Q._nonReactive.loadPromise=void 0}catch(Q){en(Q)&&await e.router.navigate(Q.options)}})()):G!=="success"||u?await Dy(e,t,o,r,R):Ny(e,o,r))}const{id:o,routeId:c}=e.matches[r];let u=!1,f=!1;const p=e.router.looseRoutesById[c],m=p.options.loader,y=((typeof m=="function"?void 0:m?.staleReloadMode)??e.router.options.defaultStaleReloadMode)!=="blocking";if(wb(e,o)){if(!e.router.getMatch(o))return e.matches[r];Ny(e,o,r)}else{const w=e.router.getMatch(o),_=e.router.stores.matchesId.get()[r],x=(_&&e.router.stores.matchStores.get(_)||null)?.routeId===c?_:e.router.stores.matches.get().find(R=>R.routeId===c)?.id,E=Nc(e,o);if(w._nonReactive.loaderPromise){if(w.status==="success"&&!e.sync&&!w.preload&&y)return w;await w._nonReactive.loaderPromise;const R=e.router.getMatch(o),M=R._nonReactive.error||R.error;M&&is(e,R,M),R.status==="pending"&&await a(E,w,x,R,p)}else{const R=E&&!e.router.stores.matchStores.has(o),M=e.router.getMatch(o);M._nonReactive.loaderPromise=Ys(),R!==M.preload&&e.updateMatch(o,j=>({...j,preload:R})),await a(E,w,x,M,p)}}const g=e.router.getMatch(o);f||(g._nonReactive.loaderPromise?.resolve(),g._nonReactive.loadPromise?.resolve(),g._nonReactive.loadPromise=void 0),clearTimeout(g._nonReactive.pendingTimeout),g._nonReactive.pendingTimeout=void 0,f||(g._nonReactive.loaderPromise=void 0),g._nonReactive.dehydrated=void 0;const b=f?g.isFetching:!1;return b!==g.isFetching||g.invalid!==!1?(e.updateMatch(o,w=>({...w,isFetching:b,invalid:!1})),e.router.getMatch(o)):g};async function Ly(e){const t=e,r=[];AE(t.router)&&Lf(t);let a;for(let b=0;b<t.matches.length;b++){try{const w=kE(t,b);ho(w)&&await w}catch(w){if(en(w))throw w;if(Rt(w))a=w;else if(!t.preload)throw w;break}if(t.serialError||t.firstBadMatchIndex!=null)break}const o=t.firstBadMatchIndex??t.matches.length,c=a&&!t.preload?My(t,a):void 0,u=a&&t.preload?0:c!==void 0?Math.min(c+1,o):o;let f,p;for(let b=0;b<u;b++)r.push(ME(t,r,b));try{await Promise.all(r)}catch{const b=await Promise.allSettled(r);for(const w of b){if(w.status!=="rejected")continue;const _=w.reason;if(en(_))throw _;Rt(_)?f??=_:p??=_}if(p!==void 0)throw p}const m=f??(a&&!t.preload?a:void 0);let y=t.firstBadMatchIndex!==void 0?t.firstBadMatchIndex:t.matches.length-1;if(!m&&a&&t.preload)return t.matches;if(m){const b=My(t,m);b===void 0&&tn();const w=t.matches[b],_=t.router.looseRoutesById[w.routeId],x=t.router.options?.defaultNotFoundComponent;!_.options.notFoundComponent&&x&&(_.options.notFoundComponent=x),m.routeId=w.routeId;const E=w.routeId===t.router.routeTree.id;t.updateMatch(w.id,R=>({...R,...E?{status:"success",globalNotFound:!0,error:void 0}:{status:"notFound",error:m},isFetching:!1})),y=b,await mo(_,["notFoundComponent"])}else if(!t.preload){const b=t.matches[0];b.globalNotFound||t.router.getMatch(b.id)?.globalNotFound&&t.updateMatch(b.id,w=>({...w,globalNotFound:!1,error:void 0}))}if(t.serialError&&t.firstBadMatchIndex!==void 0){const b=t.router.looseRoutesById[t.matches[t.firstBadMatchIndex].routeId];await mo(b,["errorComponent"])}for(let b=0;b<=y;b++){const{id:w,routeId:_}=t.matches[b],x=t.router.looseRoutesById[_];try{const E=jE(t,w,x);if(E){const R=await E;t.updateMatch(w,M=>({...M,...R}))}}catch(E){console.error(`Error executing head for route ${_}:`,E)}}const g=Lf(t);if(ho(g)&&await g,m)throw m;if(t.serialError&&!t.preload&&!t.onReady)throw t.serialError;return t.matches}function Uy(e,t){const r=t.map(a=>
10e.options[a]?.preload?.()).filter(Boolean);if(r.length!==0)return Promise.all(r)}function mo(e,t=cc){!e._lazyLoaded&&e._lazyPromise===void 0&&(e.lazyFn?e._lazyPromise=e.lazyFn().then(a=>{const{id:o,...c}=a.options;Object.assign(e.options,c),e._lazyLoaded=!0,e._lazyPromise=void 0}):e._lazyLoaded=!0);const r=()=>e._componentsLoaded?void 0:t===cc?(()=>{if(e._componentsPromise===void 0){const a=Uy(e,cc);a?e._componentsPromise=a.then(()=>{e._componentsLoaded=!0,e._componentsPromise=void 0}):e._componentsLoaded=!0}return e._componentsPromise})():Uy(e,t);return e._lazyPromise?e._lazyPromise.then(r):r()}function Eb(e){for(const t of cc)if(e.options[t]?.preload)return!0;return!1}var cc=["component","errorComponent","pendingComponent","notFoundComponent"],ls="__TSR_index",zy="popstate",Py="beforeunload";function NE(e){let t=e.getLocation();const r=new Set,a=u=>{t=e.getLocation(),r.forEach(f=>f({location:t,action:u}))},o=u=>{e.notifyOnIndexChange??!0?a(u):t=e.getLocation()},c=async({task:u,navigateOpts:f,...p})=>{if(f?.ignoreBlocker??!1){u();return}const m=e.getBlockers?.()??[],y=p.type==="PUSH"||p.type==="REPLACE";if(typeof document<"u"&&m.length&&y)for(const g of m){const b=gc(p.path,p.state);if(await g.blockerFn({currentLocation:t,nextLocation:b,action:p.type})){e.onBlocked?.();return}}u()};return{get location(){return t},get length(){return e.getLength()},subscribers:r,subscribe:u=>(r.add(u),()=>{r.delete(u)}),push:(u,f,p)=>{const m=t.state[ls];f=By(m+1,f),c({task:()=>{e.pushState(u,f),a({type:"PUSH"})},navigateOpts:p,type:"PUSH",path:u,state:f})},replace:(u,f,p)=>{const m=t.state[ls];f=By(m,f),c({task:()=>{e.replaceState(u,f),a({type:"REPLACE"})},navigateOpts:p,type:"REPLACE",path:u,state:f})},go:(u,f)=>{c({task:()=>{e.go(u),o({type:"GO",index:u})},navigateOpts:f,type:"GO"})},back:u=>{c({task:()=>{e.back(u?.ignoreBlocker??!1),o({type:"BACK"})},navigateOpts:u,type:"BACK"})},forward:u=>{c({task:()=>{e.forward(u?.ignoreBlocker??!1),o({type:"FORWARD"})},navigateOpts:u,type:"FORWARD"})},canGoBack:()=>t.state[ls]!==0,createHref:u=>e.createHref(u),block:u=>{if(!e.setBlockers)return()=>{};const f=e.getBlockers?.()??[];return e.setBlockers([...f,u]),()=>{const p=e.getBlockers?.()??[];e.setBlockers?.(p.filter(m=>m!==u))}},flush:()=>e.flush?.(),destroy:()=>e.destroy?.(),notify:a}}function By(e,t){t||(t={});const r=lh();return{...t,key:r,__TSR_key:r,[ls]:e}}function DE(e){const t=typeof document<"u"?window:void 0,r=t.history.pushState,a=t.history.replaceState;let o=[];const c=()=>o,u=U=>o=U,f=(U=>U),p=(()=>gc(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){const U=lh();t.history.replaceState({[ls]:0,key:U,__TSR_key:U},"")}let m=p(),y,g=!1,b=!1,w=!1,_=!1;const x=()=>m;let E,R;const M=()=>{E&&(H._ignoreSubscribers=!0,(E.isPush?t.history.pushState:t.history.replaceState)(E.state,"",E.href),H._ignoreSubscribers=!1,E=void 0,R=void 0,y=void 0)},j=(U,Q,fe)=>{const ie=f(Q);R||(y=m),m=gc(Q,fe),E={href:ie,state:fe,isPush:E?.isPush||U==="push"},R||(R=Promise.resolve().then(()=>M()))},L=U=>{m=p(),H.notify({type:U})},X=async()=>{if(b){b=!1;return}const U=p(),Q=U.state[ls]-m.state[ls],fe=Q===1,ie=Q===-1,ve=!fe&&!ie||g;g=!1;const Se=ve?"GO":ie?"BACK":"FORWARD",ze=ve?{type:"GO",index:Q}:{type:ie?"BACK":"FORWARD"};if(w)w=!1;else{const Ae=c();if(typeof document<"u"&&Ae.length){for(const D of Ae)if(await D.blockerFn({currentLocation:m,nextLocation:U,action:Se})){b=!0,t.history.go(1),H.notify(ze);return}}}m=p(),H.notify(ze)},G=U=>{if(_){_=!1;return}let Q=!1;const fe=c();if(typeof document<"u"&&fe.length)for(const ie of fe){const ve=ie.enableBeforeUnload??!0;if(ve===!0){Q=!0;break}if(typeof ve=="function"&&ve()===!0){Q=!0;break}}if(Q)return U.preventDefault(),U.returnValue=""},H=NE({getLocation:x,getLength:()=>t.history.length,pushState:(U,Q)=>j("push",U,Q),replaceState:(U,Q)=>j("replace",U,Q),back:U=>(U&&(w=!0),_=!0,t.history.back()),forward:U=>{U&&(w=!0),_=!0,t.history.forward()},go:U=>{g=!0,t.history.go(U)},createHref:U=>f(U),flush:M,destroy:()=>{t.history.pushState=r,t.history.replaceState=a,t.removeEventListener(Py,G,{capture:!0}),t.removeEventListener(zy,X)},onBlocked:()=>{y&&m!==y&&(m=y)},getBlockers:c,setBlockers:u,notifyOnIndexChange:!1});return t.addEventListener(Py,G,{capture:!0}),t.addEventListener(zy,X),t.history.pushState=function(...U){const Q=r.apply(t.history,U);return H._ignoreSubscribers||L("PUSH"),Q},t.history.replaceState=function(...U){const Q=a.apply(t.history,U);return H._ignoreSubscribers||L("REPLACE"),Q},H}function LE(e){let t=e.replace(/[\x00-\x1f\x7f]/g,"");return t.startsWith("//")&&(t="/"+t.replace(/^\/+/,"")),t}function gc(e,t){const r=LE(e),a=r.indexOf("#"),o=r.indexOf("?"),c=lh();return{href:r,pathname:r.substring(0,a>0?o>0?Math.min(a,o):a:o>0?o:r.length),hash:a>-1?r.substring(a):"",search:o>-1?r.slice(o,a===-1?void 0:a):"",state:t||{[ls]:0,key:c,__TSR_key:c}}}function lh(){return(Math.random()+1).toString(36).substring(7)}function UE(e){return e instanceof Error?{name:e.name,message:e.message}:{data:e}}function Xa(e,t){const r=t,a=e;return{fromLocation:r,toLocation:a,pathChanged:r?.pathname!==a.pathname,hrefChanged:r?.href!==a.href,hashChanged:r?.hash!==a.hash}}var zE=class{constructor(e,t){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=r=>r(),this.update=r=>{const a=this.options,o=this.basepath??a?.basepath??"/",c=this.basepath===void 0,u=a?.rewrite;if(this.options={...a,...r},this.isServer=this.options.isServer??typeof document>"u",this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=dE(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=DE()),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 y;this.resolvePathCache=po(1e3),y=this.buildRouteTree(),this.setRoutes(y)}if(!this.stores&&this.latestLocation){const y=this.getStoreConfig(this);this.batch=y.batch,this.stores=xE(BE(this.latestLocation),y),yE(this)}let f=!1;const p=this.options.basepath??"/",m=this.options.rewrite;if(c||o!==p||u!==m){this.basepath=p;const y=[],g=gb(p);g&&g!=="/"&&y.push(RE({basepath:p})),m&&y.push(m),this.rewrite=y.length===0?void 0:y.length===1?y[0]:TE(y),this.history&&this.updateLatestLocation(),f=!0}f&&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 r=sE(this.routeTree,this.options.caseSensitive,(a,o)=>{a.init({originalIndex:o})});return this.options.routeMasks&&WS(this.options.routeMasks,r.processedTree),r},this.subscribe=(r,a)=>{const o={eventType:r,fn:a};return this.subscribers.add(o),()=>{this.subscribers.delete(o)}},this.emit=r=>
10{this.subscribers.forEach(a=>{a.eventType===r.type&&a.fn(r)})},this.parseLocation=(r,a)=>{const o=({pathname:p,search:m,hash:y,href:g,state:b})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(p)){const R=this.options.parseSearch(m),M=this.options.stringifySearch(R);return{href:p+M+y,publicHref:p+M+y,pathname:Qi(p).path,external:!1,searchStr:M,search:Us(a?.search,R),hash:Qi(y.slice(1)).path,state:Is(a?.state,b)}}const w=new URL(g,this.origin),_=Df(this.rewrite,w),x=this.options.parseSearch(_.search),E=this.options.stringifySearch(x);return _.search=E,{href:_.href.replace(_.origin,""),publicHref:g,pathname:Qi(_.pathname).path,external:!!this.rewrite&&_.origin!==this.origin,searchStr:E,search:Us(a?.search,x),hash:Qi(_.hash.slice(1)).path,state:Is(a?.state,b)}},c=o(r),{__tempLocation:u,__tempKey:f}=c.state;if(u&&(!f||f===this.tempLocationKey)){const p=o(u);return p.state.key=c.state.key,p.state.__TSR_key=c.state.__TSR_key,delete p.state.__tempLocation,{...p,maskedLocation:c}}return c},this.resolvePathWithBase=(r,a)=>uE({base:r,to:oh(a),trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(r,a,o)=>typeof r=="string"?this.matchRoutesInternal({pathname:r,search:a},o):this.matchRoutesInternal(r,a),this.getMatchedRoutes=r=>IE({pathname:r,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=r=>{const a=this.getMatch(r);a&&(a.abortController.abort(),clearTimeout(a._nonReactive.pendingTimeout),a._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{this.stores.pendingIds.get().forEach(r=>{this.cancelMatch(r)}),this.stores.matchesId.get().forEach(r=>{if(this.stores.pendingMatchStores.has(r))return;const a=this.stores.matchStores.get(r)?.get();a&&(a.status==="pending"||a.isFetching==="loader")&&this.cancelMatch(r)})},this.buildLocation=r=>{const a=(c={})=>{const u=c._fromLocation||this.pendingBuiltLocation||this.latestLocation,f=this.matchRoutesLightweight(u);c.from;const p=c.unsafeRelative==="path"?u.pathname:c.from??f.fullPath,m=this.resolvePathWithBase(p,"."),y=f.search,g=Object.assign(Object.create(null),f.params),b=c.to?this.resolvePathWithBase(m,`${c.to}`):this.resolvePathWithBase(m,"."),w=c.params===!1||c.params===null?Object.create(null):(c.params??!0)===!0?g:Object.assign(g,ss(c.params,g)),_=this.getMatchedRoutes(b);let x=_.matchedRoutes;if((!_.foundRoute||_.foundRoute.path!=="/"&&_.routeParams["**"])&&this.options.notFoundRoute&&(x=[...x,this.options.notFoundRoute]),Object.keys(w).length>0)for(const fe of x){const ie=fe.options.params?.stringify??fe.options.stringifyParams;if(ie)try{Object.assign(w,ie(w))}catch{}}const E=r.leaveParams?b:Qi(Oy({path:b,params:w,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path;let R=y;if(r._includeValidateSearch&&this.options.search?.strict){const fe={};x.forEach(ie=>{if(ie.options.validateSearch)try{Object.assign(fe,uc(ie.options.validateSearch,{...fe,...R}))}catch{}}),R=fe}R=HE({search:R,dest:c,destRoutes:x,_includeValidateSearch:r._includeValidateSearch}),R=Us(y,R);const M=this.options.stringifySearch(R),j=c.hash===!0?u.hash:c.hash?ss(c.hash,u.hash):void 0,L=j?`#${j}`:"";let X=c.state===!0?u.state:c.state?ss(c.state,u.state):{};X=Is(u.state,X);const G=`${E}${M}${L}`;let H,U,Q=!1;if(this.rewrite){const fe=new URL(G,this.origin),ie=bb(this.rewrite,fe);H=fe.href.replace(fe.origin,""),ie.origin!==this.origin?(U=ie.href,Q=!0):U=ie.pathname+ie.search+ie.hash}else H=QS(G),U=H;return{publicHref:U,href:H,pathname:E,search:R,searchStr:M,state:X,hash:j??"",external:Q,unmaskOnReload:c.unmaskOnReload}},o=(c={},u)=>{const f=a(c);let p=u?a(u):void 0;if(!p){const m=Object.create(null);if(this.options.routeMasks){const y=eE(f.pathname,this.processedTree);if(y){Object.assign(m,y.rawParams);const{from:g,params:b,...w}=y.route,_=b===!1||b===null?Object.create(null):(b??!0)===!0?m:Object.assign(m,ss(b,m));u={from:r.from,...w,params:_},p=a(u)}}}return p&&(f.maskedLocation=p),f};return r.mask?o(r,{from:r.from,...r.mask}):o(r)},this.commitLocation=async({viewTransition:r,ignoreBlocker:a,...o})=>{const c=()=>{const p=["key","__TSR_key","__TSR_index","__hashScrollIntoViewOptions"];p.forEach(y=>{o.state[y]=this.latestLocation.state[y]});const m=Wt(o.state,this.latestLocation.state);return p.forEach(y=>{delete o.state[y]}),m},u=os(this.latestLocation.href)===os(o.href);let f=this.commitLocationPromise;if(this.commitLocationPromise=Ys(()=>{f?.resolve(),f=void 0}),u&&c())this.load();else{let{maskedLocation:p,hashScrollIntoView:m,...y}=o;p&&(y={...p,state:{...p.state,__tempKey:void 0,__tempLocation:{...y,search:y.searchStr,state:{...y.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(y.unmaskOnReload??this.options.unmaskOnReload??!1)&&(y.state.__tempKey=this.tempLocationKey)),y.state.__hashScrollIntoViewOptions=m??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=r,this.history[o.replace?"replace":"push"](y.publicHref,y.state,{ignoreBlocker:a})}return this.resetNextScroll=o.resetScroll??!0,this.history.subscribers.size||this.load(),this.commitLocationPromise},this.buildAndCommitLocation=({replace:r,resetScroll:a,hashScrollIntoView:o,viewTransition:c,ignoreBlocker:u,href:f,...p}={})=>
10{if(f){const g=this.history.location.state.__TSR_index,b=gc(f,{__TSR_index:r?g:g+1}),w=new URL(b.pathname,this.origin);p.to=Df(this.rewrite,w).pathname,p.search=this.options.parseSearch(b.search),p.hash=b.hash.slice(1)}const m=this.buildLocation({...p,_includeValidateSearch:!0});this.pendingBuiltLocation=m;const y=this.commitLocation({...m,viewTransition:c,replace:r,resetScroll:a,hashScrollIntoView:o,ignoreBlocker:u});return Promise.resolve().then(()=>{this.pendingBuiltLocation===m&&(this.pendingBuiltLocation=void 0)}),y},this.navigate=async({to:r,reloadDocument:a,href:o,publicHref:c,...u})=>{let f=!1;if(o)try{new URL(`${o}`),f=!0}catch{}if(f&&!a&&(a=!0),a){if(r!==void 0||!o){const m=this.buildLocation({to:r,...u});o=o??m.publicHref,c=c??m.publicHref}const p=!f&&c?c:o;if(pc(p,this.protocolAllowlist))return Promise.resolve();if(!u.ignoreBlocker){const m=this.history.getBlockers?.()??[];for(const y of m)if(y?.blockerFn&&await y.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return Promise.resolve()}return u.replace?window.location.replace(p):window.location.href=p,Promise.resolve()}return this.buildAndCommitLocation({...u,href:o,to:r,_isNavigate:!0})},this.beforeLoad=()=>{this.cancelMatches(),this.updateLatestLocation();const r=this.matchRoutes(this.latestLocation),a=this.stores.cachedMatches.get().filter(o=>!r.some(c=>c.id===o.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(r),this.stores.setCached(a)})},this.load=async r=>{let a,o,c;const u=this.stores.resolvedLocation.get()??this.stores.location.get();for(c=new Promise(p=>{this.startTransition(async()=>{try{this.beforeLoad();const m=this.latestLocation,y=Xa(m,this.stores.resolvedLocation.get());this.stores.redirect.get()||this.emit({type:"onBeforeNavigate",...y}),this.emit({type:"onBeforeLoad",...y}),await Ly({router:this,sync:r?.sync,forceStaleReload:u.href===m.href,matches:this.stores.pendingMatches.get(),location:m,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{let g=null,b=null,w=null,_=null;this.batch(()=>{const x=this.stores.pendingMatches.get(),E=x.length,R=this.stores.matches.get();g=E?R.filter(L=>!this.stores.pendingMatchStores.has(L.id)):null;const M=new Set;for(const L of this.stores.pendingMatchStores.values())L.routeId&&M.add(L.routeId);const j=new Set;for(const L of this.stores.matchStores.values())L.routeId&&j.add(L.routeId);b=E?R.filter(L=>!M.has(L.routeId)):null,w=E?x.filter(L=>!j.has(L.routeId)):null,_=E?x.filter(L=>j.has(L.routeId)):R,this.stores.isLoading.set(!1),this.stores.loadedAt.set(Date.now()),E&&(this.stores.setMatches(x),this.stores.setPending([]),this.stores.setCached([...this.stores.cachedMatches.get(),...g.filter(L=>L.status!=="error"&&L.status!=="notFound"&&L.status!=="redirected")]),this.clearExpiredCache())});for(const[x,E]of[[b,"onLeave"],[w,"onEnter"],[_,"onStay"]])if(x)for(const R of x)this.looseRoutesById[R.routeId].options[E]?.(R)})})}})}catch(m){en(m)?(a=m,this.navigate({...a.options,replace:!0,ignoreBlocker:!0})):Rt(m)&&(o=m);const y=a?a.status:o?404:this.stores.matches.get().some(g=>g.status==="error")?500:200;this.batch(()=>{this.stores.statusCode.set(y),this.stores.redirect.set(a)})}this.latestLoadPromise===c&&(this.commitLocationPromise?.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),p()})}),this.latestLoadPromise=c,await c;this.latestLoadPromise&&c!==this.latestLoadPromise;)await this.latestLoadPromise;let f;this.hasNotFoundMatch()?f=404:this.stores.matches.get().some(p=>p.status==="error")&&(f=500),f!==void 0&&this.stores.statusCode.set(f)},this.startViewTransition=r=>{const a=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,a&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let o;if(typeof a=="object"&&this.isViewTransitionTypesSupported){const c=this.latestLocation,u=this.stores.resolvedLocation.get(),f=typeof a.types=="function"?a.types(Xa(c,u)):a.types;if(f===!1){r();return}o={update:r,types:f}}else o=r;document.startViewTransition(o)}else r()},this.updateMatch=(r,a)=>{this.startTransition(()=>
10{const o=this.stores.pendingMatchStores.get(r);if(o){o.set(a);return}const c=this.stores.matchStores.get(r);if(c){c.set(a);return}const u=this.stores.cachedMatchStores.get(r);if(u){const f=a(u.get());f.status==="redirected"?this.stores.cachedMatchStores.delete(r)&&this.stores.cachedIds.set(p=>p.filter(m=>m!==r)):u.set(f)}})},this.getMatch=r=>this.stores.cachedMatchStores.get(r)?.get()??this.stores.pendingMatchStores.get(r)?.get()??this.stores.matchStores.get(r)?.get(),this.invalidate=r=>{const a=o=>r?.filter?.(o)??!0?{...o,invalid:!0,...r?.forcePending||o.status==="error"||o.status==="notFound"?{status:"pending",error:void 0}:void 0}:o;return this.batch(()=>{this.stores.setMatches(this.stores.matches.get().map(a)),this.stores.setCached(this.stores.cachedMatches.get().map(a)),this.stores.setPending(this.stores.pendingMatches.get().map(a))}),this.shouldViewTransition=!1,this.load({sync:r?.sync})},this.getParsedLocationHref=r=>r.publicHref||"/",this.resolveRedirect=r=>{const a=r.headers.get("Location");if(!r.options.href||r.options._builtLocation){const o=r.options._builtLocation??this.buildLocation(r.options),c=this.getParsedLocationHref(o);r.options.href=c,r.headers.set("Location",c)}else if(a)try{const o=new URL(a);if(this.origin&&o.origin===this.origin){const c=o.pathname+o.search+o.hash;r.options.href=c,r.headers.set("Location",c)}}catch{}if(r.options.href&&!r.options._builtLocation&&pc(r.options.href,this.protocolAllowlist))throw new Error("Redirect blocked: unsafe protocol");return r.headers.get("Location")||r.headers.set("Location",r.options.href),r},this.clearCache=r=>{const a=r?.filter;a!==void 0?this.stores.setCached(this.stores.cachedMatches.get().filter(o=>!a(o))):this.stores.setCached([])},this.clearExpiredCache=()=>{const r=Date.now(),a=o=>{const c=this.looseRoutesById[o.routeId];if(!c.options.loader)return!0;const u=(o.preload?c.options.preloadGcTime??this.options.defaultPreloadGcTime:c.options.gcTime??this.options.defaultGcTime)??300*1e3;return o.status==="error"?!0:r-o.updatedAt>=u};this.clearCache({filter:a})},this.loadRouteChunk=mo,this.preloadRoute=async r=>{const a=r._builtLocation??this.buildLocation(r);let o=this.matchRoutes(a,{throwOnError:!0,preload:!0,dest:r});const c=new Set([...this.stores.matchesId.get(),...this.stores.pendingIds.get()]),u=new Set([...c,...this.stores.cachedIds.get()]),f=o.filter(p=>!u.has(p.id));if(f.length){const p=this.stores.cachedMatches.get();this.stores.setCached([...p,...f])}try{return o=await Ly({router:this,matches:o,location:a,preload:!0,updateMatch:(p,m)=>{c.has(p)?o=o.map(y=>y.id===p?m(y):y):this.updateMatch(p,m)}}),o}catch(p){if(en(p))return p.options.reloadDocument?void 0:await this.preloadRoute({...p.options,_fromLocation:a});Rt(p)||console.error(p);return}},this.matchRoute=(r,a)=>{const o={...r,to:r.to?this.resolvePathWithBase(r.from||"",r.to):void 0,params:r.params||{},leaveParams:!0},c=this.buildLocation(o);if(a?.pending&&this.stores.status.get()!=="pending")return!1;const u=(a?.pending===void 0?!this.stores.isLoading.get():a.pending)?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),f=tE(c.pathname,a?.caseSensitive??!1,a?.fuzzy??!1,u.pathname,this.processedTree);return!f||r.params&&!Wt(f.rawParams,r.params,{partial:!0})?!1:a?.includeSearch??!0?Wt(u.search,c.search,{partial:!0})?f.rawParams:!1:f.rawParams},this.hasNotFoundMatch=()=>this.stores.matches.get().some(r=>r.status==="notFound"||r.globalNotFound),this.getStoreConfig=t,this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...e,caseSensitive:e.caseSensitive??!1,notFoundMode:e.notFoundMode??"fuzzy",stringifySearch:e.stringifySearch??wE,parseSearch:e.parseSearch??bE,protocolAllowlist:e.protocolAllowlist??KS}),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:e,routesByPath:t,processedTree:r}){this.routesById=e,this.routesByPath=t,this.processedTree=r;const a=this.options.notFoundRoute;a&&(a.init({originalIndex:99999999999}),this.routesById[a.id]=a)}get looseRoutesById(){return this.routesById}getParentContext(e){return e?.id?e.context??this.options.context??void 0:this.options.context??void 0}matchRoutesInternal(e,t){const r=this.getMatchedRoutes(e.pathname),{foundRoute:a,routeParam
10s:o,parsedParams:c}=r;let{matchedRoutes:u}=r,f=!1;(a?a.path!=="/"&&o["**"]:os(e.pathname))&&(this.options.notFoundRoute?u=[...u,this.options.notFoundRoute]:f=!0);const p=f?$E(this.options.notFoundMode,u):void 0,m=new Array(u.length),y=new Map;for(const g of this.stores.matchStores.values())g.routeId&&y.set(g.routeId,g.get());for(let g=0;g<u.length;g++){const b=u[g],w=m[g-1];let _,x,E;{const Se=w?.search??e.search,ze=w?._strictSearch??void 0;try{const Ae=uc(b.options.validateSearch,{...Se})??void 0;_={...Se,...Ae},x={...ze,...Ae},E=void 0}catch(Ae){let D=Ae;if(Ae instanceof yc||(D=new yc(Ae.message,{cause:Ae})),t?.throwOnError)throw D;_=Se,x={},E=D}}const R=b.options.loaderDeps?.({search:_})??"",M=R?JSON.stringify(R):"",{interpolatedPath:j,usedParams:L}=Oy({path:b.fullPath,params:o,decoder:this.pathParamsDecoder,server:this.isServer}),X=b.id+j+M,G=this.getMatch(X),H=y.get(b.id),U=G?._strictParams??L;let Q;if(!G)try{Iy(b,L,c,U)}catch(Se){if(Rt(Se)||en(Se)?Q=Se:Q=new PE(Se.message,{cause:Se}),t?.throwOnError)throw Q}Object.assign(o,U);const fe=H?"stay":"enter";let ie;if(G)ie={...G,cause:fe,params:H?.params??o,_strictParams:U,search:Us(H?H.search:G.search,_),_strictSearch:x};else{const Se=b.options.loader||b.options.beforeLoad||b.lazyFn||Eb(b)?"pending":"success";ie={id:X,ssr:b.options.ssr,index:g,routeId:b.id,params:H?.params??o,_strictParams:U,pathname:j,updatedAt:Date.now(),search:H?Us(H.search,_):_,_strictSearch:x,searchError:void 0,status:Se,isFetching:!1,error:void 0,paramsError:Q,__routeC
10ontext:void 0,_nonReactive:{loadPromise:Ys()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:fe,loaderDeps:H?Is(H.loaderDeps,R):R,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:b.options.staticData||{},fullPath:b.fullPath}}t?.preload||(ie.globalNotFound=p===b.id),ie.searchError=E;const ve=this.getParentContext(w);ie.context={...ve,...ie.__routeContext,...ie.__beforeLoadContext},m[g]=ie}for(let g=0;g<m.length;g++){const b=m[g],w=this.looseRoutesById[b.routeId],_=this.getMatch(b.id),x=y.get(b.routeId);if(b.params=x?Us(x.params,o):o,!_){const E=m[g-1],R=this.getParentContext(E);if(w.options.context){const M={deps:b.loaderDeps,params:b.params,context:R??{},location:e,navigate:j=>this.navigate({...j,_fromLocation:e}),buildLocation:this.buildLocation,cause:b.cause,abortController:b.abortController,preload:!!b.preload,matches:m,routeId:w.id};b.__routeContext=w.options.context(M)??void 0}b.context={...R,...b.__routeContext,...b.__beforeLoadContext}}}return m}matchRoutesLightweight(e){const{matchedRoutes:t,routeParams:r,parsedParams:a}=this.getMatchedRoutes(e.pathname),o=fo(t),c={...e.search};for(const y of t)try{Object.assign(c,uc(y.options.validateSearch,c))}catch{}const u=fo(this.stores.matchesId.get()),f=u&&this.stores.matchStores.get(u)?.get(),p=f&&f.routeId===o.id&&f.pathname===e.pathname;let m;if(p)m=f.params;else{const y=Object.assign(Object.create(null),r);for(const g of t)try{Iy(g,r,a??{},y)}catch{}m=y}return{matchedRoutes:t,fullPath:o.fullPath,search:c,params:m}}},yc=class extends Error{},PE=class extends Error{};function BE(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:e,matches:[],statusCode:200}}function uc(e,t){if(e==null)return{};if("~standard"in e){const r=e["~standard"].validate(t);if(r instanceof Promise)throw new yc("Async validation not supported");if(r.issues)throw new yc(JSON.stringify(r.issues,void 0,2),{cause:r});return r.value}return"parse"in e?e.parse(t):typeof e=="function"?e(t):{}}function IE({pathname:e,routesById:t,processedTree:r}){const a=Object.create(null),o=os(e);let c,u;const f=nE(o,r,!0);return f&&(c=f.route,Object.assign(a,f.rawParams),u=Object.assign(Object.create(null),f.parsedParams)),{matchedRoutes:f?.branch||[t.__root__],routeParams:a,foundRoute:c,parsedParams:u}}function HE({search:e,dest:t,destRoutes:r,_includeValidateSearch:a}){return qE(r)(e,t,a??!1)}function qE(e){const t={dest:null,_includeValidateSearch:!1,middlewares:[]};for(const o of e){if("search"in o.options)o.options.search?.middlewares&&t.middlewares.push(...o.options.search.middlewares);else if(o.options.preSearchFilters||o.options.postSearchFilters){const c=({search:u,next:f})=>{let p=u;"preSearchFilters"in o.options&&o.options.preSearchFilters&&(p=o.options.preSearchFilters.reduce((y,g)=>g(y),u));const m=f(p);return"postSearchFilters"in o.options&&o.options.postSearchFilters?o.options.postSearchFilters.reduce((y,g)=>g(y),m):m};t.middlewares.push(c)}if(o.options.validateSearch){const c=({search:u,next:f})=>{const p=f(u);if(!t._includeValidateSearch)return p;try{return{...p,...uc(o.options.validateSearch,p)??void 0}}catch{return p}};t.middlewares.push(c)}}const r=({search:o})=>{const c=t.dest;return c.search?c.search===!0?o:ss(c.search,o):{}};t.middlewares.push(r);const a=(o,c,u)=>{if(o>=u.length)return c;const f=u[o];return f({search:c,next:m=>a(o+1,m,u)})};return function(c,u,f){return t.dest=u,t._includeValidateSearch=f,a(0,c,t.middlewares)}}function $E(e,t){if(e!=="root")for(let r=t.length-1;r>=0;r--){const a=t[r];if(a.children)return a.id}return Vs}function Iy(e,t,r,a){const o=e.options.params?.parse??e.options.parseParams;if(o)if(e.options.skipRouteOnParseError)for(const c in t)c in r&&(a[c]=r[c]);else{const c=o(a);Object.assign(a,c)}}var Kn=Symbol.for("TSR_DEFERRED_PROMISE");function GE(e,t){const r=e;return r[Kn]||(r[Kn]={status:"pending"},r.then(a=>{r[Kn].status="success",r[Kn].data=a}).catch(a=>{r[Kn].status="error",r[Kn].error={data:UE(a),__isServerError:!0}})),r}var VE="Error preloading route! âï¸";function Hy(e,t){if(e)return typeof e=="string"?e:e[t]}function KE(e){return typeof e=="string"?{href:e,crossOrigin:void 0}:e}function YE(e){if(e.tag!=="link")return;const t=e.attrs?.rel,r=e.attrs?.href;if(typeof r=="string"&&(typeof t=="string"?t.split(/\s+/):[]).includes("stylesheet"))return r}function FE(e,t){const r=YE(t);return!!r&&e?.inlineCss?.styles[r]!==void 0}var Tb=class{get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(e){if(this.init=t=>{this.originalIndex=t.originalIndex;const r=this.options,a=!r?.path&&!r?.id;this.parentRoute=this.options.getParentRoute?.(),a?this._path=Vs:this.parentRoute||tn();let o=a?Vs:r?.path;o&&o!=="/"&&(o=mb(o));const c=r?.id||o;let u=a?Vs:lc([this.parentRoute.id==="__root__"?"":this.parentRoute.id,c]);o==="__root__"&&(o="/"),u!=="__root__"&&(u=lc(["/",u]));const f=u==="__root__"?"/":lc([this.parentRoute.fullPath,o]);this._path=o,this._id=u,this._fullPath=f,this._to=os(f)},this.addChildren=t=>this._addFileChildren(t),this._addFileChildren=t=>(Array.isArray(t)&&(this.children=t),typeof t=="object"&&t!==null&&(this.children=Object.values(t)),this),this._addFileTypes=()=>this,this.updateLoader=t=>(Object.assign(this.options,t),this),this.update=t=>(Object.assign(this.options,t),this),this.lazy=t=>(this.lazyFn=t,this),this.redirect=t=>vb({from:this.fullPath,...t}),this.options=e||{},this.isRoot=!e?.getParentRoute,e?.id&&e?.path)throw new Error("Route cannot have both an 'id' and a 'path' option.")}},JE=class extends Tb{constructor(e){super(e)}};function QE(e){if(typeof document<"u"&&document.querySelector){const t=e.stores.location.get(),r=t.state.__hashScrollIntoViewOptions??!0;if(r&&t.hash!==""){const a=document.getElementById(t.hash);a&&a.scrollIntoView(r)}}}var XE=(e=>(e[e.AggregateError=1]="AggregateError",e[e.ArrowFunction=2]="ArrowFunction",e[e.ErrorPrototypeStack=4]="ErrorPrototypeStack",e[e.ObjectAssign=8]="Ob
10jectAssign",e[e.BigIntTypedArray=16]="BigIntTypedArray",e[e.RegExp=32]="RegExp",e))(XE||{}),Sr=Symbol.asyncIterator,Rb=Symbol.hasInstance,Za=Symbol.isConcatSpreadable,Er=Symbol.iterator,xb=Symbol.match,Ab=Symbol.matchAll,Ob=Symbol.replace,Cb=Symbol.search,kb=Symbol.species,jb=Symbol.split,Mb=Symbol.toPrimitive,Wa=Symbol.toStringTag,Nb=Symbol.unscopables,Db={[Sr]:0,[Rb]:1,[Za]:2,[Er]:3,[xb]:4,[Ab]:5,[Ob]:6,[Cb]:7,[kb]:8,[jb]:9,[Mb]:10,[Wa]:11,[Nb]:12},ZE={0:Sr,1:Rb,2:Za,3:Er,4:xb,5:Ab,6:Ob,7:Cb,8:kb,9:jb,10:Mb,11:Wa,12:Nb},A=void 0,WE={2:!0,3:!1,1:A,0:null,4:-0,5:Number.POSITIVE_INFINITY,6:Number.NEGATIVE_INFINITY,7:Number.NaN},eT={0:"Error",1:"EvalError",2:"RangeError",3:"ReferenceError",4:"SyntaxError",5:"TypeError",6:"URIError"},tT={0:Error,1:EvalError,2:RangeError,3:ReferenceError,4:SyntaxError,5:TypeError,6:URIError};function Le(e,t,r,a,o,c,u,f,p,m,y,g){return{t:e,i:t,s:r,c:a,m:o,p:c,e:u,a:f,f:p,b:m,o:y,l:g}}function cs(e){return Le(2,A,e,A,A,A,A,A,A,A,A,A)}var Lb=cs(2),Ub=cs(3),nT=cs(1),rT=cs(0),sT=cs(4),aT=cs(5),iT=cs(6),oT=cs(7);function lT(e){switch(e){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 A}}function us(e){let t="",r=0,a;for(let o=0,c=e.length;o<c;o++)a=lT(e[o]),a&&(t+=e.slice(r,o)+a,r=o+1);return r===0?t=e:t+=e.slice(r),t}function cT(e){switch(e){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 e}}function ds(e){return e.replace(/(\\\\|\\"|\\n|\\r|\\b|\\t|\\f|\\u2028|\\u2029|\\x3C)/g,cT)}var Fl="__SEROVAL_REFS__",zb=new Map,Ja=new Map;function Pb(e){return zb.has(e)}function uT(e){return Ja.has(e)}function dT(e){if(Pb(e))return zb.get(e);throw new qT(e)}function fT(e){if(uT(e))return Ja.get(e);throw new $T(e)}typeof globalThis<"u"?Object.defineProperty(globalThis,Fl,{value:Ja,configurable:!0,writable:!1,enumerable:!1}):typeof window<"u"?Object.defineProperty(window,Fl,{value:Ja,configurable:!0,writable:!1,enumerable:!1}):typeof self<"u"?Object.defineProperty(self,Fl,{value:Ja,configurable:!0,writable:!1,enumerable:!1}):typeof global<"u"&&Object.defineProperty(global,Fl,{value:Ja,configurable:!0,writable:!1,enumerable:!1});function ch(e){return e instanceof EvalError?1:e instanceof RangeError?2:e instanceof ReferenceError?3:e instanceof SyntaxError?4:e instanceof TypeError?5:e instanceof URIError?6:0}function hT(e){let t=eT[ch(e)];return e.name!==t?{name:e.name}:e.constructor.name!==t?{name:e.constructor.name}:{}}function Bb(e,t){let r=hT(e),a=Object.getOwnPropertyNames(e);for(let o=0,c=a.length,u;o<c;o++)u=a[o],u!=="name"&&u!=="message"&&(u==="stack"?t&4&&(r=r||{},r[u]=e[u]):(r=r||{},r[u]=e[u]));return r}function Ib(e){return Object.isFrozen(e)?3:Object.isSealed(e)?2:Object.isExtensible(e)?0:1}function pT(e){switch(e){case Number.POSITIVE_INFINITY:return aT;case Number.NEGATIVE_INFINITY:return iT}return e!==e?oT:Object.is(e,-0)?sT:Le(0,A,e,A,A,A,A,A,A,A,A,A)}function Hb(e){return Le(1,A,us(e),A,A,A,A,A,A,A,A,A)}function mT(e){return Le(3,A,""+e,A,A,A,A,A,A,A,A,A)}function gT(e){return Le(4,e,A,A,A,A,A,A,A,A,A,A)}function yT(e,t){let r=t.valueOf();return Le(5,e,r!==r?"":t.toISOString(),A,A,A,A,A,A,A,A,A)}function vT(e,t){return Le(6,e,A,us(t.source),t.flags,A,A,A,A,A,A,A)}function bT(e,t){return Le(17,e,Db[t],A,A,A,A,A,A,A,A,A)}function wT(e,t){return Le(18,e,us(dT(t)),A,A,A,A,A,A,A,A,A)}function _T(e,t,r){return Le(25,e,r,us(t),A,A,A,A,A,A,A,A)}function ST(e,t,r){return Le(9,e,A,A,A,A,A,r,A,A,Ib(t),A)}function ET(e,t){return Le(21,e,A,A,A,A,A,A,t,A,A,A)}function TT(e,t,r){return Le(15,e,A,t.constructor.name,A,A,A,A,r,t.byteOffset,A,t.length)}function RT(e,t,r){return Le(16,e,A,t.constructor.name,A,A,A,A,r,t.byteOffset,A,t.byteLength)}function xT(e,t,r){return Le(20,e,A,A,A,A,A,A,r,t.byteOffset,A,t.byteLength)}function AT(e,t,r){return Le(13,e,ch(t),A,us(t.message),r,A,A,A,A,A,A)}function OT(e,t,r){return Le(14,e,ch(t),A,us(t.message),r,A,A,A,A,A,A)}function CT(e,t){return Le(7,e,A,A,A,A,A,t,A,A,A,A)}function kT(e,t){return Le(28,A,A,A,A,A,A,[e,t],A,A,A,A)}function jT(e,t){return Le(30,A,A,A,A,A,A,[e,t],A,A,A,A)}function MT(e,t,r){return Le(31,e,A,A,A,A,A,r,t,A,A,A)}function NT(e,t){return Le(32,e,A,A,A,A,A,A,t,A,A,A)}function DT(e,t){return Le(33,e,A,A,A,A,A,A,t,A,A,A)}function LT(e,t){return Le(34,e,A,A,A,A,A,A,t,A,A,A)}function UT(e,t,r,a){return Le(35,e,r,A,A,A,A,t,A,A,A,a)}
12var zT={parsing:1,serialization:2,deserialization:3};function PT(e){return`Seroval Error (step: ${zT[e]})`}var BT=(e,t)=>PT(e),qb=class extends Error{constructor(e,t){super(BT(e)),this.cause=t}},qy=class extends qb{constructor(e){super("parsing",e)}},IT=class extends qb{constructor(e){super("deserialization",e)}};function Tr(e){return`Seroval Error (specific: ${e})`}var Dc=class extends Error{constructor(t){super(Tr(1)),this.value=t}},$b=class extends Error{constructor(t){super(Tr(2))}},HT=class extends Error{constructor(e){super(Tr(3))}},Ao=class extends Error{constructor(e){super(Tr(4))}},qT=class extends Error{constructor(e){super(Tr(5)),this.value=e}},$T=class extends Error{constructor(e){super(Tr(6))}},GT=class extends Error{constructor(e){super(Tr(7))}},fs=class extends Error{constructor(e){super(Tr(8))}},VT=class extends Error{constructor(t){super(Tr(9))}},KT=class{constructor(e,t){this.value=e,this.replacement=t}},Lc=()=>{let e={p:0,s:0,f:0};return e.p=new Promise((t,r)=>{e.s=t,e.f=r}),e},YT=(e,t)=>{e.s(t),e.p.s=1,e.p.v=t},FT=(e,t)=>{e.f(t),e.p.s=2,e.p.v=t};Lc.toString();YT.toString();FT.toString();var JT=()=>{let e=[],t=[],r=!0,a=!1,o=0,c=(p,m,y)=>{for(y=0;y<o;y++)t[y]&&t[y][m](p)},u=(p,m,y,g)=>{for(m=0,y=e.length;m<y;m++)g=e[m],!r&&m===y-1?p[a?"return":"throw"](g):p.next(g)},f=(p,m)=>(r&&(m=o++,t[m]=p),u(p),()=>{r&&(t[m]=t[o],t[o--]=void 0)});return{__SEROVAL_STREAM__:!0,on:p=>f(p),next:p=>{r&&(e.push(p),c(p,"next"))},throw:p=>{r&&(e.push(p),c(p,"throw"),r=!1,a=!1,t.length=0)},return:p=>{r&&(e.push(p),c(p,"return"),r=!1,a=!0,t.length=0)}}},QT=e=>t=>()=>{let r=0,a={[e]:()=>a,next:()=>{if(r>t.d)return{done:!0,value:void 0};let o=r++,c=t.v[o];if(o===t.t)throw c;return{done:o===t.d,value:c}}};return a},XT=(e,t)=>r=>()=>{let a=0,o=-1,c=!1,u=[],f=[],p=(y=0,g=f.length)=>{for(;y<g;y++)f[y].s({done:!0,value:void 0})};r.on({next:y=>{let g=f.shift();g&&g.s({done:!1,value:y}),u.push(y)},throw:y=>{let g=f.shift();g&&g.f(y),p(),o=u.length,c=!0,u.push(y)},return:y=>{let g=f.shift();g&&g.s({done:!0,value:y}),p(),o=u.length,u.push(y)}});let m={[e]:()=>m,next:()=>{if(o===-1){let b=a++;if(b>=u.length){let w=t();return f.push(w),w.p}return{done:!1,value:u[b]}}if(a>o)return{done:!0,value:void 0};let y=a++,g=u[y];if(y!==o)return{done:!1,value:g};if(c)throw g;return{done:!0,value:g}}};return m},Gb=e=>{let t=atob(e),r=t.length,a=new Uint8Array(r);for(let o=0;o<r;o++)a[o]=t.charCodeAt(o);return a.buffer};Gb.toString();function ZT(e){return"__SEROVAL_SEQUENCE__"in e}function Vb(e,t,r){return{__SEROVAL_SEQUENCE__:!0,v:e,t,d:r}}function WT(e){let t=[],r=-1,a=-1,o=e[Er]();for(;;)try{let c=o.next();if(t.push(c.value),c.done){a=t.length-1;break}}catch(c){r=t.length,t.push(c)}return Vb(t,r,a)}var eR=QT(Er);function tR(e){return eR(e)}var nR={},rR={},sR={0:{},1:{},2:{},3:{},4:{},5:{}};function Uc(e){return"__SEROVAL_STREAM__"in e}function Fs(){return JT()}function aR(e){let t=Fs(),r=e[Sr]();async function a(){try{let o=await r.next();o.done?t.return(o.value):(t.next(o.value),await a())}catch(o){t.throw(o)}}return a().catch(()=>{}),t}var iR=XT(Sr,Lc);function oR(e){return iR(e)}async function lR(e){try{return[1,await e]}catch(t){return[0,t]}}function cR(e,t){return{plugins:t.plugins,mode:e,marked:new Set,features:63^(t.disabledFeatures||0),refs:t.refs||new Map,depthLimit:t.depthLimit||1e3}}function dc(e,t){e.marked.add(t)}function uR(e,t){let r=e.refs.size;return e.refs.set(t,r),r}function zc(e,t){let r=e.refs.get(t);return r!=null?(dc(e,r),{type:1,value:gT(r)}):{type:0,value:uR(e,t)}}function uh(e,t){let r=zc(e,t);return r.type===1?r:Pb(t)?{type:2,value:wT(r.value,t)}:r}function qs(e,t){let r=uh(e,t);if(r.type!==0)return r.value;if(t in Db)return bT(r.value,t);throw new Dc(t)}function Pc(e,t){let r=zc(e,sR[t]);return r.type===1?r.value:Le(26,r.value,t,A,A,A,A,A,A,A,A,A)}function dR(e){let t=zc(e,nR);return t.type===1?t.value:Le(27,t.value,A,A,A,A,A,A,qs(e,Er),A,A,A)}function fR(e){let t=zc(e,rR);return t.type===1?t.value:Le(29,t.value,A,A,A,A,A,[Pc(e,1),qs(e,Sr)],A,A,A,A)}function hR(e,t,r,a){return Le(r?11:10,e,A,A,A,a,A,A,A,A,Ib(t),A)}function pR(e,t,r,a){return Le(8,t,A,A,A,A,{k:r,v:a},A,Pc(e,0),A,A,A)}
12function mR(e,t,r){let a=new Uint8Array(r),o="";for(let c=0,u=a.length;c<u;c++)o+=String.fromCharCode(a[c]);return Le(19,t,us(btoa(o)),A,A,A,A,A,Pc(e,5),A,A,A)}function gR(e,t){return{base:cR(e,t),child:void 0}}var yR=class{constructor(e,t){this._p=e,this.depth=t}parse(e){return yt(this._p,this.depth,e)}};async function vR(e,t,r){let a=[];for(let o=0,c=r.length;o<c;o++)o in r?a[o]=await yt(e,t,r[o]):a[o]=0;return a}async function bR(e,t,r,a){return ST(r,a,await vR(e,t,a))}async function dh(e,t,r){let a=Object.entries(r),o=[],c=[];for(let u=0,f=a.length;u<f;u++)o.push(us(a[u][0])),c.push(await yt(e,t,a[u][1]));return Er in r&&(o.push(qs(e.base,Er)),c.push(kT(dR(e.base),await yt(e,t,WT(r))))),Sr in r&&(o.push(qs(e.base,Sr)),c.push(jT(fR(e.base),await yt(e,t,aR(r))))),Wa in r&&(o.push(qs(e.base,Wa)),c.push(Hb(r[Wa]))),Za in r&&(o.push(qs(e.base,Za)),c.push(r[Za]?Lb:Ub)),{k:o,v:c}}async function gf(e,t,r,a,o){return hR(r,a,o,await dh(e,t,a))}async function wR(e,t,r,a){return ET(r,await yt(e,t,a.valueOf()))}async function _R(e,t,r,a){return TT(r,a,await yt(e,t,a.buffer))}async function SR(e,t,r,a){return RT(r,a,await yt(e,t,a.buffer))}async function ER(e,t,r,a){return xT(r,a,await yt(e,t,a.buffer))}async function $y(e,t,r,a){let o=Bb(a,e.base.features);return AT(r,a,o?await dh(e,t,o):A)}async function TR(e,t,r,a){let o=Bb(a,e.base.features);return OT(r,a,o?await dh(e,t,o):A)}async function RR(e,t,r,a){let o=[],c=[];for(let[u,f]of a.entries())o.push(await yt(e,t,u)),c.push(await yt(e,t,f));return pR(e.base,r,o,c)}async function xR(e,t,r,a){let o=[];for(let c of a.keys())o.push(await yt(e,t,c));return CT(r,o)}async function Kb(e,t,r,a){let o=e.base.plugins;if(o)for(let c=0,u=o.length;c<u;c++){let f=o[c];if(f.parse.async&&f.test(a))return _T(r,f.tag,await f.parse.async(a,new yR(e,t),{id:r}))}return A}async function AR(e,t,r,a){let[o,c]=await lR(a);return Le(12,r,o,A,A,A,A,A,await yt(e,t,c),A,A,A)}function OR(e,t,r,a,o){let c=[],u=r.on({next:f=>{dc(this.base,t),yt(this,e,f).then(p=>{c.push(NT(t,p))},p=>{o(p),u()})},throw:f=>{dc(this.base,t),yt(this,e,f).then(p=>{c.push(DT(t,p)),a(c),u()},p=>{o(p),u()})},return:f=>{dc(this.base,t),yt(this,e,f).then(p=>{c.push(LT(t,p)),a(c),u()},p=>{o(p),u()})}})}async function CR(e,t,r,a){return MT(r,Pc(e.base,4),await new Promise(OR.bind(e,t,r,a)))}async function kR(e,t,r,a){let o=[];for(let c=0,u=a.v.length;c<u;c++)o[c]=await yt(e,t,a.v[c]);return UT(r,o,a.t,a.d)}async function jR(e,t,r,a){if(Array.isArray(a))return bR(e,t,r,a);if(Uc(a))return CR(e,t,r,a);if(ZT(a))return kR(e,t,r,a);let o=a.constructor;if(o===KT)return yt(e,t,a.replacement);let c=await Kb(e,t,r,a);if(c)return c;switch(o){case Object:return gf(e,t,r,a,!1);case A:return gf(e,t,r,a,!0);case Date:return yT(r,a);case Error:case EvalError:case RangeError:case ReferenceError:case SyntaxError:case TypeError:case URIError:return $y(e,t,r,a);case Number:case Boolean:case String:case BigInt:return wR(e,t,r,a);case ArrayBuffer:return mR(e.base,r,a);case Int8Array:case Int16Array:case Int32Array:case Uint8Array:case Uint16Array:case Uint32Array:case Uint8ClampedArray:case Float32Array:case Float64Array:return _R(e,t,r,a);case DataView:return ER(e,t,r,a);case Map:return RR(e,t,r,a);case Set:return xR(e,t,r,a)}if(o===Promise||a instanceof Promise)return AR(e,t,r,a);let u=e.base.features;if(u&32&&o===RegExp)return vT(r,a);if(u&16)switch(o){case BigInt64Array:case BigUint64Array:return SR(e,t,r,a)}if(u&1&&typeof AggregateError<"u"&&(o===AggregateError||a instanceof AggregateError))return TR(e,t,r,a);if(a instanceof Error)return $y(e,t,r,a);if(Er in a||Sr in a)return gf(e,t,r,a,!!o);throw new Dc(a)}async function MR(e,t,r){let a=uh(e.base,r);if(a.type!==0)return a.value;let o=await Kb(e,t,a.value,r);if(o)return o;throw new Dc(r)}async function yt(e,t,r){switch(typeof r){case"boolean":return r?Lb:Ub;case"undefined":return nT;case"string":return Hb(r);case"number":return pT(r);case"bigint":return mT(r);case"object":{if(r){let a=uh(e.base,r);return a.type===0?await jR(e,t+1,a.value,r):a.value}return rT}case"symbol":return qs(e.base,r);case"function":return MR(e,t,r);default:throw new Dc(r)}}async function NR(e,t){try{return await yt(e,0,t)}catch(r){throw r instanceof qy?r:new qy(r)}}var DR=(e=>(e[e.Vanilla=1]="Vanilla",e[e.Cross=2]="Cross",e))(DR||{});function Yb(e,t){for(let r=0,a=t.length;r<a;r++){let o=t[r];
12e.has(o)||(e.add(o),o.extends&&Yb(e,o.extends))}}function Fb(e){if(e){let t=new Set;return Yb(t,e),[...t]}}function LR(e){switch(e){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 GT(e)}}var UR=1e6,zR=1e4,PR=2e4;function Jb(e,t){switch(t){case 3:return Object.freeze(e);case 1:return Object.preventExtensions(e);case 2:return Object.seal(e);default:return e}}var BR=1e3;function IR(e,t){var r;return{mode:e,plugins:t.plugins,refs:t.refs||new Map,features:(r=t.features)!=null?r:63^(t.disabledFeatures||0),depthLimit:t.depthLimit||BR}}function HR(e){return{mode:2,base:IR(2,e),child:A}}var qR=class{constructor(e,t){this._p=e,this.depth=t}deserialize(e){return Ve(this._p,this.depth,e)}};function Qb(e,t){if(t<0||!Number.isFinite(t)||!Number.isInteger(t))throw new fs({t:4,i:t});if(e.refs.has(t))throw new Error("Conflicted ref id: "+t)}function $R(e,t,r){return Qb(e.base,t),e.state.marked.has(t)&&e.base.refs.set(t,r),r}function GR(e,t,r){return Qb(e.base,t),e.base.refs.set(t,r),r}function vt(e,t,r){return e.mode===1?$R(e,t,r):GR(e,t,r)}function Uf(e,t,r){if(Object.hasOwn(t,r))return t[r];throw new fs(e)}function VR(e,t){return vt(e,t.i,fT(ds(t.s)))}function KR(e,t,r){let a=r.a,o=a.length,c=vt(e,r.i,new Array(o));for(let u=0,f;u<o;u++)f=a[u],f&&(c[u]=Ve(e,t,f));return Jb(c,r.o),c}function YR(e){switch(e){case"constructor":case"__proto__":case"prototype":case"__defineGetter__":case"__defineSetter__":case"__lookupGetter__":case"__lookupSetter__":return!1;default:return!0}}function FR(e){switch(e){case Sr:case Za:case Wa:case Er:return!0;default:return!1}}function Gy(e,t,r){YR(t)?e[t]=r:Object.defineProperty(e,t,{value:r,configurable:!0,enumerable:!0,writable:!0})}function JR(e,t,r,a,o){if(typeof a=="string")Gy(r,ds(a),Ve(e,t,o));else{let c=Ve(e,t,a);switch(typeof c){case"string":Gy(r,c,Ve(e,t,o));break;case"symbol":FR(c)&&(r[c]=Ve(e,t,o));break;default:throw new fs(a)}}}function Xb(e,t,r,a){let o=r.k;if(o.length>0)for(let c=0,u=r.v,f=o.length;c<f;c++)JR(e,t,a,o[c],u[c]);return a}function QR(e,t,r){let a=vt(e,r.i,r.t===10?{}:Object.create(null));return Xb(e,t,r.p,a),Jb(a,r.o),a}function XR(e,t){return vt(e,t.i,new Date(t.s))}function ZR(e,t){if(e.base.features&32){let r=ds(t.c);if(r.length>PR)throw new fs(t);return vt(e,t.i,new RegExp(r,t.m))}throw new $b(t)}function WR(e,t,r){let a=vt(e,r.i,new Set);for(let o=0,c=r.a,u=c.length;o<u;o++)a.add(Ve(e,t,c[o]));return a}function e1(e,t,r){let a=vt(e,r.i,new Map);for(let o=0,c=r.e.k,u=r.e.v,f=c.length;o<f;o++)a.set(Ve(e,t,c[o]),Ve(e,t,u[o]));return a}function t1(e,t){if(t.s.length>UR)throw new fs(t);return vt(e,t.i,Gb(ds(t.s)))}function n1(e,t,r){var a;let o=LR(r.c),c=Ve(e,t,r.f),u=(a=r.b)!=null?a:0;if(u<0||u>c.byteLength)throw new fs(r);return vt(e,r.i,new o(c,u,r.l))}function r1(e,t,r){var a;let o=Ve(e,t,r.f),c=(a=r.b)!=null?a:0;if(c<0||c>o.byteLength)throw new fs(r);return vt(e,r.i,new DataView(o,c,r.l))}function Zb(e,t,r,a){if(r.p){let o=Xb(e,t,r.p,{});Object.defineProperties(a,Object.getOwnPropertyDescriptors(o))}return a}function s1(e,t,r){let a=vt(e,r.i,new AggregateError([],ds(r.m)));return Zb(e,t,r,a)}function a1(e,t,r){let a=Uf(r,tT,r.s),o=vt(e,r.i,new a(ds(r.m)));return Zb(e,t,r,o)}function i1(e,t,r){let a=Lc(),o=vt(e,r.i,a.p),c=Ve(e,t,r.f);return r.s?a.s(c):a.f(c),o}function o1(e,t,r){return vt(e,r.i,Object(Ve(e,t,r.f)))}function l1(e,t,r){let a=e.base.plugins;if(a){let o=ds(r.c);for(let c=0,u=a.length;c<u;c++){let f=a[c];if(f.tag===o)return vt(e,r.i,f.deserialize(r.s,new qR(e,t),{id:r.i}))}}throw new HT(r.c)}function c1(e,t){return vt(e,t.i,vt(e,t.s,Lc()).p)}function u1(e,t,r){let a=e.base.refs.get(r.i);if(a)return a.s(Ve(e,t,r.a[1])),A;throw new Ao("Promise")}function d1(e,t,r){let a=e.base.refs.get(r.i);if(a)return a.f(Ve(e,t,r.a[1])),A;throw new Ao("Promise")}function f1(e,t,r){Ve(e,t,r.a[0]);let a=Ve(e,t,r.a[1]);return tR(a)}function h1(e,t,r){Ve(e,t,r.a[0]);let a=Ve(e,t,r.a[1]);return oR(a)}function p1(e,t,r){let a=vt(e,r.i,Fs()),o=r.a,c=o.length;if(c)for(let u=0;u<c;u++)Ve(e,t,o[u]);return a}function m1(e,t,r){let a=e.base.refs.get(r.i);if(a&&Uc(a))return a.next(Ve(e,t,r.f)),A;throw new Ao("Stream")}function g1(e,t,r){let a=e.base.refs.get(r.i);if(a&&Uc(a))return a.throw(Ve(e,t,r.f)),A;throw new Ao("Stream")}function y1(e,t,r){let a=e.base.refs.get(r.i);if(a&&Uc(a))return a.return(Ve(e,t,r.f)),A;throw new Ao("Stream")}function v1(e,t,r){return Ve(e,t,r.f),A}function b1(e,t,r){return Ve(e,t,r.a[1]),A}function w1(e,t,r){let a=vt(e,r.i,Vb([],r.s,r.l));for(let o=0,c=r.a.length;o<c;o++)a.v[o]=Ve(e,t,r.a[o]);return a}function Ve(e,t,r){if(t>e.base.depthLimit)throw new VT(e.base.depthLimit);switch(t+=1,r.t){case 2:return Uf(r,WE,r.s);case 0:return Number(r.s);case 1:return ds(String(r.s));case 3:if(String(r.s).length>zR)throw new fs(r);return BigInt(r.s);case 4:return e.base.refs.get(r.i);case 18:return VR(e,r);case 9:return KR(e,t,r);case 10:case 11:return QR(e,t,r);case 5:return XR(e,r);case 6:return ZR(e,r);case 7:return WR(e,t,r);case 8:return e1(e,t,r);case 19:return t1(e,r);case 16:case 15:return n1(e,t,r);case 20:return r1(e,t,r);case 14:return s1(e,t,r);case 13:return a1(e,t,r);case 12:return i1(e,t,r);case 17:return Uf(r,ZE,r.s);case 21:return o1(e,t,r);case 25:return l1(e,t,r);case 22:return c1(e,r);case 23:return u1(e,t,r);case 24:return d1(e,t,r);case 28:return f1(e,t,r);case 30:return h1(e,t,r);case 31:return p1(e,t,r);case 32:return m1(e,t,r);case 33:return g1(e,t,r);case 34:return y1(e,t,r);case 27:return v1(e,t,r);case 29:return b1(e,t,r);case 35:return w1(e,t,r);default:throw new $b(r)}}function _1(e,t){try{return Ve(e,0,t)}catch(r){throw new IT(r)}}var S1=()=>T;S1.toString();function Vy(e,t){let r=Fb(t.plugins),a=HR({plugins:r,refs:t.refs,features:t.features,disabledFeatures:t.disabledFeatures,depthLimit:t.depthLimit});return _1(a,e)}async function E1(e,t={}){let r=Fb(t.plugins),a=gR(1,{plugins:r,disabledFeatures:t.disabledFeatures});return{t:await NR(a,e),f:a.base.features,m:Array.from(a.base.marked)}}function T1(e){return{tag:"$TSR/t/"+e.key,test:e.test,parse:{sync(t,r,a){return{v:r.parse(e.toSerializable(t))}},async async(t,r,a){return{v:await r.parse(e.toSerializable(t))}},stream(t,r,a){return{v:r.parse(e.toSerializable(t))}}},serialize:void 0,deserialize(t,r,a){return e.fromSerializable(r.deserialize(t.v))}}}var R1=class{constructor(e,t){this.stream=e,this.hint=t?.hint??"binary"}},vc=globalThis.Buffer,Wb=!!vc&&typeof vc.from=="function";function e0(e){if(e.length===0)return"";if(Wb)return vc.from(e).toString("base64");const t=32768,r=[];for(let a=0;a<e.length;a+=t){const o=e.subarray(a,a+t);r.push(String.fromCharCode.apply(null,o))}return btoa(r.join(""))}function t0(e){if(e.length===0)return new Uint8Array(0);if(Wb){const a=vc.from(e,"base64");return new Uint8Array(a.buffer,a.byteOffset,a.byteLength)}const t=atob(e),r=new Uint8Array(t.length);for(let a=0;a<t.length;a++)r[a]=t.charCodeAt(a);return r}var Wi=Object.create(null),eo=Object.create(null),x1=e=>new ReadableStream({start(t){e.on({next(r){try{t.enqueue(t0(r))}catch{}},throw(r){t.error(r)},return(){try{t.close()}catch{}}})}}),A1=new TextEncoder,O1=e=>new ReadableStream({start(t){e.on({next(r){try{typeof r=="string"?t.enqueue(A1.encode(r)):t.enqueue(t0(r.$b64))}catch{}},throw(r){t.error(r)},return(){try{t.close()}catch{}}})}}),C1="(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(_){}}})}}))",k1="(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 Ky(e){const t=Fs(),r=e.getReader();return(async()=>{try{for(;;){const{done:a,value:o}=await r.read();if(a){t.return(void 0);break}t.next(e0(o))}}catch(a){t.throw(a)}finally{r.releaseLock()}})(),t}function Yy(e){const t=Fs(),r=e.getReader(),a=new TextDecoder("utf-8",{fatal:!0});return(async()=>{try{for(;;){const{done:o,value:c}=await r.read();if(o){try{const u=a.decode();u.length>0&&t.next(u)}catch{}t.return(void 0);break}try{const u=a.decode(c,{stream:!0});u.length>0&&t.next(u)}catch{t.next({$b64:e0(c)})}}}catch(o){t.throw(o)}finally{r.releaseLock()}})(),t}var j1={tag:"tss/RawStream",extends:[{tag:"tss/RawStreamFactory",test(e){return e===Wi},parse:{sync(e,t,r){return{}},async async(e,t,r){return{}},stream(e,t,r){return{}}},serialize(e,t,r){return C1},deserialize(e,t,r){return Wi}},{tag:"tss/RawStreamFactoryText",test(e){return e===eo},parse:{sync(e,t,r){return{}},async async(e,t,r){return{}},stream(e,t,r){return{}}},serialize(e,t,r){return k1},deserialize(e,t,r){return eo}}],test(e){return e instanceof R1},parse:{sync(e,t,r){const a=e.hint==="text"?eo:Wi;return{hint:t.parse(e.hint),factory:t.parse(a),stream:t.parse(Fs())}},async async(e,t,r){const a=e.hint==="text"?eo:Wi,o=e.hint==="text"?Yy(e.stream):Ky(e.stream);return{hint:await t.parse(e.hint),factory:await t.parse(a),stream:await t.parse(o)}},stream(e,t,r){const a=e.hint==="text"?eo:Wi,o=e.hint==="text"?Yy(e.stream):Ky(e.stream);return{hint:t.parse(e.hint),factory:t.parse(a),stream:t.parse(o)}}},serialize(e,t,r){return"("+t.serialize(e.factory)+")("+t.serialize(e.stream)+")"},deserialize(e,t,r){const a=t.deserialize(e.stream);return t.deserialize(e.hint)==="text"?O1(a):x1(a)}};function M1(e){return{tag:"tss/RawStream",test:()=>!1,parse:{},serialize(){throw new Error("RawStreamDeserializePlugin.serialize should not be called. Client only deserializes.")},deserialize(t,r,a){return e(typeof r?.deserialize=="function"?r.deserialize(t.streamId):t.streamId)}}}var N1={tag:"$TSR/Error",test(e){return e instanceof Error},parse:{sync(e,t){return{message:t.parse(e.message)}},async async(e,t){return{message:await t.parse(e.message)}},stream(e,t){return{message:t.parse(e.message)}}},serialize(e,t){return"new Error("+t.serialize(e.message)+")"},deserialize(e,t){return new Error(t.deserialize(e.message))}},ts={},n0=e=>new ReadableStream({start:t=>{e.on({next:r=>{try{t.enqueue(r)}catch{}},throw:r=>{t.error(r)},return:()=>{try{t.close()}catch{}}})}}),D1={tag:"seroval-plugins/web/ReadableStreamFactory",test(e){return e===ts},parse:{sync(){return ts},async async(){return await Promise.resolve(ts)},stream(){return ts}},serialize(){return n0.toString()},deserialize(){return ts}};function Fy(e){let t=Fs(),r=e.getReader();async function a(){try{let o=await r.read();o.done?t.return(o.value):(t.next(o.value),await a())}catch(o){t.throw(o)}}return a().catch(()=>{}),t}var L1={tag:"seroval/plugins/web/ReadableStream",extends:[D1],test(e){return typeof ReadableStream>"u"?!1:e instanceof ReadableStream},parse:{sync(e,t){return{factory:t.parse(ts),stream:t.parse(Fs())}},async async(e,t){return{factory:await t.parse(ts),stream:await t.parse(Fy(e))}},stream(e,t){return{factory:t.parse(ts),stream:t.parse(Fy(e))}}},serialize(e,t){return"("+t.serialize(e.factory)+")("+t.serialize(e.stream)+")"},deserialize(e,t){let r=t.deserialize(e.stream);return n0(r)}},U1=L1,z1=[N1,j1,U1];function P1(){return[...db()?.serializationAdapters?.map(T1)??[],...z1]}var Jy=new TextDecoder,B1=new Uint8Array(0),Qy=16*1024*1024,Xy=32*1024*1024,Zy=1024,Wy=1e5;function I1(e){const t=new Map,r=new Map,a=new Set;let o=!1,c=null,u=0,f;const p=new ReadableStream({start(g){f=g},cancel(){o=!0;try{c?.cancel()}catch{}t.forEach(g=>{try{g.error(new Error("Framed response cancelled"))}catch{}}),t.clear(),r.clear(),a.clear()}});function m(g){const b=r.get(g);if(b)return b;if(a.has(g))return new ReadableStream({start(_){_.close()}});if(r.size>
12=Zy)throw new Error(`Too many raw streams in framed response (max ${Zy})`);const w=new ReadableStream({start(_){t.set(g,_)},cancel(){a.add(g),t.delete(g),r.delete(g)}});return r.set(g,w),w}function y(g){return m(g),t.get(g)}return(async()=>{const g=e.getReader();c=g;const b=[];let w=0;function _(){if(w<9)return null;const E=b[0];if(E.length>=9)return{type:E[0],streamId:(E[1]<<24|E[2]<<16|E[3]<<8|E[4])>>>0,length:(E[5]<<24|E[6]<<16|E[7]<<8|E[8])>>>0};const R=new Uint8Array(9);let M=0,j=9;for(let L=0;L<b.length&&j>0;L++){const X=b[L],G=Math.min(X.length,j);R.set(X.subarray(0,G),M),M+=G,j-=G}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}}function x(E){if(E===0)return B1;const R=new Uint8Array(E);let M=0,j=E;for(;j>0&&b.length>0;){const L=b[0];if(!L)break;const X=Math.min(L.length,j);R.set(L.subarray(0,X),M),M+=X,j-=X,X===L.length?b.shift():b[0]=L.subarray(X)}return w-=E,R}try{for(;;){const{done:E,value:R}=await g.read();if(o||E)break;if(R){if(w+R.length>Xy)throw new Error(`Framed response buffer exceeded ${Xy} bytes`);for(b.push(R),w+=R.length;;){const M=_();if(!M)break;const{type:j,streamId:L,length:X}=M;if(j!==gr.JSON&&j!==gr.CHUNK&&j!==gr.END&&j!==gr.ERROR)throw new Error(`Unknown frame type: ${j}`);if(j===gr.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(X>Qy)throw new Error(`Frame payload too large: ${X} bytes (max ${Qy})`);const G=9+X;if(w<G)break;if(++u>Wy)throw new Error(`Too many frames in framed response (max ${Wy})`);x(9);const H=x(X);switch(j){case gr.JSON:try{f.enqueue(Jy.decode(H))}catch{}break;case gr.CHUNK:{const U=y(L);U&&U.enqueue(H);break}case gr.END:{const U=y(L);if(a.add(L),U){try{U.close()}catch{}t.delete(L)}break}case gr.ERROR:{const U=y(L);if(a.add(L),U){const Q=Jy.decode(H);U.error(new Error(Q)),t.delete(L)}break}}}}}if(w!==0)throw new Error("Incomplete frame at end of framed response");try{f.close()}catch{}t.forEach(E=>{try{E.close()}catch{}}),t.clear()}catch(E){try{f.error(E)}catch{}t.forEach(R=>{try{R.error(E)}catch{}}),t.clear()}finally{try{g.releaseLock()}catch{}c=null}})(),{getOrCreateStream:m,jsonChunks:p}}var go=null;async function zf(e){e.length>0&&await Promise.allSettled(e)}var H1=Object.prototype.hasOwnProperty;function r0(e){for(const t in e)if(H1.call(e,t))return!0;return!1}async function q1(e,t,r){go||(go=P1());const a=t[0],o=a.fetch??r,c=a.data instanceof FormData?"formData":"payload",u=a.headers?new Headers(a.headers):new Headers;if(u.set("x-tsr-serverFn","true"),c==="payload"&&u.set("accept",`${zS}, application/x-ndjson, application/json`),a.method==="GET"){if(c==="formData")throw new Error("FormData is not supported with GET requests");const p=await s0(a);if(p!==void 0){const m=yb({payload:p});e.includes("?")?e+=`&${m}`:e+=`?${m}`}}let f;if(a.method==="POST"){const p=await $1(a);p?.contentType&&u.set("content-type",p.contentType),f=p?.body}return await G1(async()=>o(e,{method:a.method,headers:u,signal:a.signal,body:f}))}async function s0(e){let t=!1;const r={};if(e.data!==void 0&&(t=!0,r.data=e.data),e.context&&r0(e.context)&&(t=!0,r.context=e.context),t)return a0(r)}async function a0(e){return JSON.stringify(await Promise.resolve(E1(e,{plugins:go})))}async function $1(e){if(e.data instanceof FormData){let r;return e.context&&r0(e.context)&&(r=await a0(e.context)),r!==void 0&&e.data.set(US,r),{body:e.data}}const t=await s0(e);if(t)return{body:t,contentType:"application/json"}}async function G1(e){let t;try{t=await e()}catch(a){if(a instanceof Response)t=a;else throw console.log(a),a}if(t.headers.get("x-tss-raw")==="true")return t;const r=t.headers.get("content-type");if(r||tn(),t.headers.get("x-tss-serialized")){let a;if(r.includes("application/x-tss-framed")){if(IS(r),!t.body)throw new Error("No response body for framed response");const{getOrCreateStream:o,jsonChunks:c}=I1(t.body),u=[M1(o),...go||[]],f=new Map;a=await V1({jsonStream:c,onMessage:p=>Vy(p,{refs:f,plugins:u}),onError(p,m){console.error(p,m)}})}else if(r.includes("application/json")){const o=await t.json(),c=[];a=Vy(o,{plugins:go}),await zf(c)}if(a||tn(),a instanceof Error)throw a;return a}if(r.includes("application/json")){const a=await t.json(),o=EE(a);if(o)throw o;if(Rt(a))throw a;return a}if(!t.ok)throw new Error(await t.text());return t}async function V1({jsonStream:e,onMessage:t,onError:r}){const a=e.getReader(),{value:o,done:c}=await a.read();if(c||!o)throw new Error("Stream ended before first object");const u=JSON.parse(o);let f=!1;const p=(async()=>{try{for(;;){const{value:g,done:b}=await a.read();if(b)break;
12if(g)try{const w=[];try{t(JSON.parse(g))}finally{}await zf(w)}catch(w){r?.(`Invalid JSON: ${g}`,w)}}}catch(g){f||r?.("Stream processing error:",g)}})();let m;const y=[];try{m=t(u)}catch(g){throw f=!0,a.cancel().catch(()=>{}),g}return await zf(y),Promise.resolve(m).catch(()=>{f=!0,a.cancel().catch(()=>{})}),p.finally(()=>{try{a.releaseLock()}catch{}}),m}function K1(e){const t="/_serverFn/"+e;return Object.assign((...o)=>{const c=db()?.serverFns?.fetch;return q1(t,o,c??fetch)},{url:t,serverFnMeta:{id:e},[Nf]:!0})}var Y1={key:"$TSS/serverfn",test:e=>typeof e!="function"||!(Nf in e)?!1:!!e[Nf],toSerializable:({serverFnMeta:e})=>({functionId:e.id}),fromSerializable:({functionId:e})=>K1(e)};function ev(e){return e.replaceAll("\0","/").replaceAll("�","/")}function F1(e,t){e.id=t.i,e.__beforeLoadContext=t.b,e.loaderData=t.l,e.status=t.s,e.ssr=t.ssr,e.updatedAt=t.u,e.error=t.e,t.g!==void 0&&(e.globalNotFound=t.g)}async function J1(e){window.$_TSR||tn();const t=e.options.serializationAdapters;if(t?.length){const E=new Map;t.forEach(R=>{E.set(R.key,R.fromSerializable)}),window.$_TSR.t=E,window.$_TSR.buffer.forEach(R=>R())}window.$_TSR.initialized=!0,window.$_TSR.router||tn();const r=window.$_TSR.router;r.matches.forEach(E=>{E.i=ev(E.i)}),r.lastMatchId&&(r.lastMatchId=ev(r.lastMatchId));const{manifest:a,dehydratedData:o,lastMatchId:c}=r;e.ssr={manifest:a};const u=document.querySelector('meta[property="csp-nonce"]')?.content;e.options.ssr={nonce:u};const f=e.matchRoutes(e.stores.location.get()),p=Promise.all(f.map(E=>e.loadRouteChunk(e.looseRoutesById[E.routeId])));function m(E){const R=e.looseRoutesById[E.routeId].options.pendingMinMs??e.options.defaultPendingMinMs;if(R){const M=Ys();E._nonReactive.minPendingPromise=M,E._forcePending=!0,setTimeout(()=>{M.resolve(),e.updateMatch(E.id,j=>(j._nonReactive.minPendingPromise=void 0,{...j,_forcePending:void 0}))},R)}}function y(E){const R=e.looseRoutesById[E.routeId];R&&(R.options.ssr=E.ssr)}let g;f.forEach(E=>{const R=r.matches.find(M=>M.i===E.id);if(!R){E._nonReactive.dehydrated=!1,E.ssr=!1,y(E);return}F1(E,R),y(E),E._nonReactive.dehydrated=E.ssr!==!1,(E.ssr==="data-only"||E.ssr===!1)&&g===void 0&&(g=E.index,m(E))}),e.stores.setMatches(f),await e.options.hydrate?.(o);const b=e.stores.matches.get(),w=e.stores.location.get();await Promise.all(b.map(async E=>{try{const R=e.looseRoutesById[E.routeId],M=b[E.index-1]?.context??e.options.context;if(R.options.context){const G={deps:E.loaderDeps,params:E.params,context:M??{},location:w,navigate:H=>e.navigate({...H,_fromLocation:w}),buildLocation:e.buildLocation,cause:E.cause,abortController:E.abortController,preload:!1,matches:f,routeId:R.id};E.__routeContext=R.options.context(G)??void 0}E.context={...M,...E.__routeContext,...E.__beforeLoadContext};const j={ssr:e.options.ssr,matches:b,match:E,params:E.params,loaderData:E.loaderData},L=await R.options.head?.(j),X=await R.options.scripts?.(j);E.meta=L?.meta,E.links=L?.links,E.headScripts=L?.scripts,E.styles=L?.styles,E.scripts=X}catch(R){if(Rt(R))E.error={isNotFound:!0},console.error(`NotFound error during hydration for routeId: ${E.routeId}`,R);else throw E.error=R,console.error(`Error during hydration for route ${E.routeId}:`,R),R}}));const _=f[f.length-1].id!==c;if(!f.some(E=>E.ssr===!1)&&!_)return f.forEach(E=>{E._nonReactive.dehydrated=void 0}),e.stores.resolvedLocation.set(e.stores.location.get()),p;const x=Promise.resolve().then(()=>e.load()).catch(E=>{console.error("Error during router hydration:",E)});if(_){const E=f[1];E||tn(),m(E),E._displayPending=!0,E._nonReactive.displayPendingPromise=x,x.then(()=>{e.batch(()=>{e.stores.status.get()==="pending"&&(e.stores.status.set("idle"),e.stores.resolvedLocation.set(e.stores.location.get())),e.updateMatch(E.id,R=>({...R,_displayPending:void 0,displayPendingPromise:void 0}))})})}return p}var bc=ne.use,so=typeof window<"u"?ne.useLayoutEffect:ne.useEffect;function yf(e){const t=ne.useRef({value:e,prev:null}),r=t.current.value;return e!==r&&(t.current={value:e,prev:r}),t.current.prev}function Q1(e,t,r={},a={}){ne.useEffect(()=>{if(!e.current||a.disabled||typeof IntersectionObserver!="function")return;const o=new IntersectionObserver(([c])=>{t(c)},r);return o.observe(e.current),()=>{o.disconnect()}},[t,r,a.disabled,e])}function X1(e){const t=ne.useRef(null);return ne.useImperativeHandle(e,()=>t.current,[]),t}function Z1({promise:e}){if(bc)return bc(e);const t=GE(e);if(t[Kn].status==="pending")throw t;if(t[Kn].status==="error")throw t[Kn].error;return t[Kn].data}function W1(e){const t=J.jsx(ex,{...e});
12return e.fallback?J.jsx(ne.Suspense,{fallback:e.fallback,children:t}):t}function ex(e){const t=Z1(e);return e.children(t)}function fh(e){const t=e.errorComponent??hh;return J.jsx(tx,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:r,reset:a})=>r?ne.createElement(t,{error:r,reset:a}):e.children})}var tx=class extends ne.Component{constructor(...e){super(...e),this.state={error:null}}static getDerivedStateFromProps(e,t){const r=e.getResetKey();return t.error&&t.resetKey!==r?{resetKey:r,error:null}:{resetKey:r}}static getDerivedStateFromError(e){return{error:e}}reset(){this.setState({error:null})}componentDidCatch(e,t){this.props.onCatch&&this.props.onCatch(e,t)}render(){return this.props.children({error:this.state.error,reset:()=>{this.reset()}})}};function hh({error:e}){const[t,r]=ne.useState(!1);return J.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[J.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[J.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),J.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>r(a=>!a),children:t?"Hide Error":"Show Error"})]}),J.jsx("div",{style:{height:".25rem"}}),t?J.jsx("div",{children:J.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:e.message?J.jsx("code",{children:e.message}):null})}):null]})}function nx({children:e,fallback:t=null}){return ph()?J.jsx(te.Fragment,{children:e}):J.jsx(te.Fragment,{children:t})}function ph(){return te.useSyncExternalStore(rx,()=>!0,()=>!1)}function rx(){return()=>{}}var i0=ne.createContext(null);function Nt(e){return ne.useContext(i0)}var Bc=ne.createContext(void 0),sx=ne.createContext(void 0),Xe=(e=>(e[e.None=0]="None",e[e.Mutable=1]="Mutable",e[e.Watching=2]="Watching",e[e.RecursedCheck=4]="RecursedCheck",e[e.Recursed=8]="Recursed",e[e.Dirty=16]="Dirty",e[e.Pending=32]="Pending",e))(Xe||{});function ax({update:e,notify:t,unwatched:r}){return{link:a,unlink:o,propagate:c,checkDirty:u,shallowPropagate:f};function a(m,y,g){const b=y.depsTail;if(b!==void 0&&b.dep===m)return;const w=b!==void 0?b.nextDep:y.deps;if(w!==void 0&&w.dep===m){w.version=g,y.depsTail=w;return}const _=m.subsTail;if(_!==void 0&&_.version===g&&_.sub===y)return;const x=y.depsTail=m.subsTail={version:g,dep:m,sub:y,prevDep:b,nextDep:w,prevSub:_,nextSub:void 0};w!==void 0&&(w.prevDep=x),b!==void 0?b.nextDep=x:y.deps=x,_!==void 0?_.nextSub=x:m.subs=x}function o(m,y=m.sub){const g=m.dep,b=m.prevDep,w=m.nextDep,_=m.nextSub,x=m.prevSub;return w!==void 0?w.prevDep=b:y.depsTail=b,b!==void 0?b.nextDep=w:y.deps=w,_!==void 0?_.prevSub=x:g.subsTail=x,x!==void 0?x.nextSub=_:(g.subs=_)===void 0&&r(g),w}function c(m){let y=m.nextSub,g;e:do{const b=m.sub;let w=b.flags;if(w&60?w&12?w&4?!(w&48)&&p(m,b)?(b.flags=w|40,w&=1):w=0:b.flags=w&-9|32:w=0:b.flags=w|32,w&2&&t(b),w&1){const _=b.subs;if(_!==void 0){const x=(m=_).nextSub;x!==void 0&&(g={value:y,prev:g},y=x);continue}}if((m=y)!==void 0){y=m.nextSub;continue}for(;g!==void 0;)if(m=g.value,g=g.prev,m!==void 0){y=m.nextSub;continue e}break}while(!0)}function u(m,y){let g,b=0,w=!1;e:do{const _=m.dep,x=_.flags;if(y.flags&16)w=!0;else if((x&17)===17){if(e(_)){const E=_.subs;E.nextSub!==void 0&&f(E),w=!0}}else if((x&33)===33){(m.nextSub!==void 0||m.prevSub!==void 0)&&(g={value:m,prev:g}),m=_.deps,y=_,++b;continue}if(!w){const E=m.nextDep;if(E!==void 0){m=E;continue}}for(;b--;){const E=y.subs,R=E.nextSub!==void 0;if(R?(m=g.value,g=g.prev):m=E,w){if(e(y)){R&&f(E),y=m.sub;continue}w=!1}else y.flags&=-33;y=m.sub;const M=m.nextDep;if(M!==void 0){m=M;continue e}}return w}while(!0)}function f(m){do{const y=m.sub,g=y.flags;(g&48)===32&&(y.flags=g|16,(g&6)===2&&t(y))}while((m=m.nextSub)!==void 0)}function p(m,y){let g=y.depsTail;for(;g!==void 0;){if(g===m)return!0;g=g.prevDep}return!1}}function ix(e,t,r){const a=typeof e=="object",o=a?e:void 0;return{next:(a?e.next:e)?.bind(o),error:(a?e.error:t)?.bind(o),c
12omplete:(a?e.complete:r)?.bind(o)}}const Pf=[];let fc=0;const{link:tv,unlink:ox,propagate:lx,checkDirty:o0,shallowPropagate:nv}=ax({update(e){return e._update()},notify(e){Pf[Bf++]=e,e.flags&=~Xe.Watching},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=Xe.Mutable|Xe.Dirty,wc(e))}});let Jl=0,Bf=0,Gn,If=0;function l0(e){try{++If,e()}finally{--If||c0()}}function wc(e){const t=e.depsTail;let r=t!==void 0?t.nextDep:e.deps;for(;r!==void 0;)r=ox(r,e)}function c0(){if(!(If>0)){for(;Jl<Bf;){const e=Pf[Jl];Pf[Jl++]=void 0,e.notify()}Jl=0,Bf=0}}function rv(e,t){const r=typeof e=="function",a=e,o={_snapshot:r?void 0:e,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:r?Xe.None:Xe.Mutable,get(){return Gn!==void 0&&tv(o,Gn,fc),o._snapshot},subscribe(c){const u=ix(c),f={current:!1},p=cx(()=>{o.get(),f.current?u.next?.(o._snapshot):f.current=!0});return{unsubscribe:()=>{p.stop()}}},_update(c){const u=Gn,f=t?.compare??Object.is;if(r)Gn=o,++fc,o.depsTail=void 0;else if(c===void 0)return!1;r&&(o.flags=Xe.Mutable|Xe.RecursedCheck);try{const p=o._snapshot,m=typeof c=="function"?c(p):c===void 0&&r?a(p):c;return p===void 0||!f(p,m)?(o._snapshot=m,!0):!1}finally{Gn=u,r&&(o.flags&=~Xe.RecursedCheck),wc(o)}}};return r?(o.flags=Xe.Mutable|Xe.Dirty,o.get=function(){const c=o.flags;if(c&Xe.Dirty||c&Xe.Pending&&o0(o.deps,o)){if(o._update()){const u=o.subs;u!==void 0&&nv(u)}}else c&Xe.Pending&&(o.flags=c&~Xe.Pending);return Gn!==void 0&&tv(o,Gn,fc),o._snapshot}):o.set=function(c){if(o._update(c)){const u=o.subs;u!==void 0&&(lx(u),nv(u),c0())}},o}function cx(e){const t=()=>{const a=Gn;Gn=r,++fc,r.depsTail=void 0,r.flags=Xe.Watching|Xe.RecursedCheck;try{return e()}finally{Gn=a,r.flags&=~Xe.RecursedCheck,wc(r)}},r={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:Xe.Watching|Xe.RecursedCheck,notify(){const a=this.flags;a&Xe.Dirty||a&Xe.Pending&&o0(this.deps,this)?t():this.flags=Xe.Watching},stop(){this.flags=Xe.None,this.depsTail=void 0,wc(this)}};return t(),r}var vf={exports:{}},bf={},wf={exports:{}},_f={};var sv;function ux(){if(sv)return _f;sv=1;var e=xo();function t(g,b){return g===b&&(g!==0||1/g===1/b)||g!==g&&b!==b}var r=typeof Object.is=="function"?Object.is:t,a=e.useState,o=e.useEffect,c=e.useLayoutEffect,u=e.useDebugValue;function f(g,b){var w=b(),_=a({inst:{value:w,getSnapshot:b}}),x=_[0].inst,E=_[1];return c(function(){x.value=w,x.getSnapshot=b,p(x)&&E({inst:x})},[g,w,b]),o(function(){return p(x)&&E({inst:x}),g(function(){p(x)&&E({inst:x})})},[g]),u(w),w}function p(g){var b=g.getSnapshot;g=g.value;try{var w=b();return!r(g,w)}catch{return!0}}function m(g,b){return b()}var y=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?m:f;return _f.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:y,_f}var av;function dx(){return av||(av=1,wf.exports=ux()),wf.exports}var iv;function fx(){if(iv)return bf;iv=1;var e=xo(),t=dx();function r(m,y){return m===y&&(m!==0||1/m===1/y)||m!==m&&y!==y}var a=typeof Object.is=="function"?Object.is:r,o=t.useSyncExternalStore,c=e.useRef,u=e.useEffect,f=e.useMemo,p=e.useDebugValue;return bf.useSyncExternalStoreWithSelector=function(m,y,g,b,w){var _=c(null);if(_.current===null){var x={hasValue:!1,value:null};_.current=x}else x=_.current;_=f(function(){function R(G){if(!M){if(M=!0,j=G,G=b(G),w!==void 0&&x.hasValue){var H=x.value;if(w(H,G))return L=H}return L=G}if(H=L,a(j,G))return H;var U=b(G);return w!==void 0&&w(H,U)?(j=G,H):(j=G,L=U)}var M=!1,j,L,X=g===void 0?null:g;return[function(){return R(y())},X===null?void 0:function(){return R(X())}]},[y,g,b,w]);var E=o(m,_[0],_[1]);return u(function(){x.hasValue=!0,x.value=E},[E]),p(E),E},bf}var ov;function hx(){return ov||(ov=1,vf.exports=fx()),vf.exports}var px=hx();function mx(e,t){return e===t}function dt(e,t,r=mx){const a=ne.useCallback(u=>{if(!e)return()=>{};const{unsubscribe:f}=e.subscribe(u);return f},[e]),o=ne.useCallback(()=>e?.get(),[e]);return px.useSyncExternalStoreWithSelector(a,o,o,t,r)}var gx={get:()=>{},subscribe:()=>({unsubscribe:()=>{}})};function Js(e){const t=Nt(),r=ne.useContext(e.from?sx:Bc),a=e.from??r,o=a?e.from?t.stores.getRouteMatchStore(a):t.stores.matchStores.get(a):void 0,c=ne.useRef(void 0);return dt(o??gx,u=>{if((e.shouldThrow??!0)&&!u&&tn(),u===void 0)return;const f=e.select?e.select(u):u;if(e.structuralSharing??t.options.defaultStructuralSharing){const p=Is(c.current,f);return c.current=p,p}return f})}function u0(e){return Js({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function d0(e){const{select:t,...r}=e;return Js({...r,select:a=>t?t(a.loaderDeps):a.loaderDeps})}function f0(e){return Js({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:t=>{const r=e.strict===!1?t.params:t._strictParams;return e.select?e.select(r):r}})}function h0(e){return Js({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function p0(e){const t=Nt();return ne.useCallback(r=>t.navigate({...r,from:r.from??e?.from}),[e?.from,t])}function m0(e){return Js({...e,select:t=>e.select?e.select(t.context):t.context})}var g0=ub();const yx=cb(g0);function vx(e,t){const r=Nt(),a=X1(t),{activeProps:o,inactiveProps:c,activeOptions:u,to:f,preload:p,preloadDelay:m,preloadIntentProximity:y,hashScrollIntoView:g,replace:b,startTransition:w,resetScroll:_,viewTransition:x,children:E,target:R,disabled:M,style:j,className:L,onClick:X,onBlur:G,onFocus:H,onMouseEnter:U,onMouseLeave:Q,onTouchStart:fe,ignoreBlocker:ie,params:ve,search:Se,hash:ze,state:Ae,mask:D,reloadDocument:F,unsafeRelative:ae,from:Ee,_fromLocation:ee,...C}=e,$=ph(),K=ne.useMemo(()=>e,[r,e.from,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),W=dt(r.stores.location,Ie=>Ie,(Ie,We)=>Ie.href===We.href),Z=ne.useMemo(()=>{const Ie={_fromLocation:W,...K};return r.buildLocation(Ie)},[r,W,K]),se=Z.maskedLocation?Z.maskedLocation.publicHref:Z.publicHref,we=Z.maskedLocation?Z.maskedLocation.external:Z.external,ye=ne.useMemo(()=>Tx(se,we,r.history,M),[M,we,se,r.history]),pe=ne.useMemo(()=>
12{if(ye?.external)return pc(ye.href,r.protocolAllowlist)?void 0:ye.href;if(!Rx(f)&&!(typeof f!="string"||f.indexOf(":")===-1))try{return new URL(f),pc(f,r.protocolAllowlist)?void 0:f}catch{}},[f,ye,r.protocolAllowlist]),xt=ne.useMemo(()=>{if(pe)return!1;if(u?.exact){if(!cE(W.pathname,Z.pathname,r.basepath))return!1}else{const Ie=mc(W.pathname,r.basepath),We=mc(Z.pathname,r.basepath);if(!(Ie.startsWith(We)&&(Ie.length===We.length||Ie[We.length]==="/")))return!1}return(u?.includeSearch??!0)&&!Wt(W.search,Z.search,{partial:!u?.exact,ignoreUndefined:!u?.explicitUndefined})?!1:u?.includeHash?$&&W.hash===Z.hash:!0},[u?.exact,u?.explicitUndefined,u?.includeHash,u?.includeSearch,W,pe,$,Z.hash,Z.pathname,Z.search,r.basepath]),ft=xt?ss(o,{})??bx:Sf,at=xt?Sf:ss(c,{})??Sf,Rn=[L,ft.className,at.className].filter(Boolean).join(" "),ht=(j||ft.style||at.style)&&{...j,...ft.style,...at.style},[ps,Jn]=ne.useState(!1),Ln=ne.useRef(!1),fn=e.reloadDocument||pe?!1:p??r.options.defaultPreload,At=m??r.options.defaultPreloadDelay??0,nn=ne.useCallback(()=>{r.preloadRoute({...K,_builtLocation:Z}).catch(Ie=>{console.warn(Ie),console.warn(VE)})},[r,K,Z]);Q1(a,ne.useCallback(Ie=>{Ie?.isIntersecting&&nn()},[nn]),Ex,{disabled:!!M||fn!=="viewport"}),ne.useEffect(()=>{Ln.current||!M&&fn==="render"&&(nn(),Ln.current=!0)},[M,nn,fn]);const ms=Ie=>{const We=Ie.currentTarget.getAttribute("target"),hn=R!==void 0?R:We;if(!M&&!xx(Ie)&&!Ie.defaultPrevented&&(!hn||hn==="_self")&&Ie.button===0){Ie.preventDefault(),g0.flushSync(()=>{Jn(!0)});const Qn=r.subscribe("onResolved",()=>{Qn(),Jn(!1)});r.navigate({...K,replace:b,resetScroll:_,hashScrollIntoView:g,startTransition:w,viewTransition:x,ignoreBlocker:ie})}};if(pe)return{...C,ref:a,href:pe,...E&&{children:E},...R&&{target:R},...M&&{disabled:M},...j&&{style:j},...L&&{className:L},...X&&{onClick:X},...G&&{onBlur:G},...H&&{onFocus:H},...U&&{onMouseEnter:U},...Q&&{onMouseLeave:Q},...fe&&{onTouchStart:fe}};const bt=Ie=>{if(M||fn!=="intent")return;if(!At){nn();return}const We=Ie.currentTarget;if(to.has(We))return;const hn=setTimeout(()=>{to.delete(We),nn()},At);to.set(We,hn)},Un=Ie=>{M||fn!=="intent"||nn()},wt=Ie=>{if(M||!fn||!At)return;const We=Ie.currentTarget,hn=to.get(We);hn&&(clearTimeout(hn),to.delete(We))};return{...C,...ft,...at,href:ye?.href,ref:a,onClick:Ba([X,ms]),onBlur:Ba([G,wt]),onFocus:Ba([H,bt]),onMouseEnter:Ba([U,bt]),onMouseLeave:Ba([Q,wt]),onTouchStart:Ba([fe,Un]),disabled:!!M,target:R,...ht&&{style:ht},...Rn&&{className:Rn},...M&&wx,...xt&&_x,...$&&ps&&Sx}}var Sf={},bx={className:"active"},wx={role:"link","aria-disabled":!0},_x={"data-status":"active","aria-current":"page"},Sx={"data-transitioning":"transitioning"},to=new WeakMap,Ex={rootMargin:"100px"},Ba=e=>t=>{for(const r of e)if(r){if(t.defaultPrevented)return;r(t)}};function Tx(e,t,r,a){if(!a)return t?{href:e,external:!0}:{href:r.createHref(e)||"/",external:!1}}function Rx(e){if(typeof e!="string")return!1;const t=e.charCodeAt(0);return t===47?e.charCodeAt(1)!==47:t===46}var Ic=ne.forwardRef((e,t)=>{const{_asChild:r,...a}=e,{type:o,...c}=vx(a,t),u=typeof a.children=="function"?a.children({isActive:c["data-status"]==="active"}):a.children;if(!r){const{disabled:f,...p}=c;return ne.createElement("a",p,u)}return ne.createElement(r,c,u)});function xx(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}var Ax=class extends Tb{constructor(t){super(t),this.useMatch=r=>Js({select:r?.select,from:this.id,structuralSharing:r?.structuralSharing}),this.useRouteContext=r=>m0({...r,from:this.id}),this.useSearch=r=>h0({select:r?.select,structuralSharing:r?.structuralSharing,from:this.id}),this.useParams=r=>f0({select:r?.select,structuralSharing:r?.structuralSharing,from:this.id}),this.useLoaderDeps=r=>d0({...r,from:this.id}),this.useLoaderData=r=>u0({...r,from:this.id}),this.useNavigate=()=>p0({from:this.fullPath}),this.Link=te.forwardRef((r,a)=>J.jsx(Ic,{ref:a,from:this.fullPath,...r}))}};function Ox(e){return new Ax(e)}function Cx(){return e=>jx(e)}var kx=class extends JE{constructor(e){super(e),this.useMatch=t=>Js({select:t?.select,from:this.id,structuralSharing:t?.structuralSharing}),this.useRouteContext=t=>m0({...t,from:this.id}),this.useSearch=t=>h0({select:t?.select,structuralSharing:t?.structuralSharing,from:this.id}),this.useParams=t=>f0({select:t?.select,structuralSharing:t?.structuralSharing,from:this.id}),this.useLoaderDeps=t=>d0({...t,from:this.id}),this.useLoaderData=t=>u0({...t,from:this.id}),this.useNavigate=()=>p0({from:this.fullPath}),this.Link=te.forwardRef((t,r)=>J.jsx(Ic,{ref:r,from:this.fullPath,...t}))}};function jx(e){return new kx(e)}function Oo(e){return new Mx(e,{silent:!0}).createRoute}var Mx=class{constructor(e,t){this.path=e,this.createRoute=r=>{const a=Ox(r);return a.isRoot=!1,a},this.silent=t?.silent}};function Co(e,t){let r,a,o,c;const u=()=>(r||(r=e().then(p=>{r=void 0,a=p[t]}).catch(p=>{if(o=p,GS(o)&&o instanceof Error&&typeof window<"u"&&typeof sessionStorage<"u"){const m=`tanstack_router_reload:${o.message}`;sessionStorage.getItem(m)||(sessionStorage.setItem(m,"1"),c=!0)}})),r),f=function(m){if(c)throw window.location.reload(),new Promise(()=>{});if(o)throw o;if(!a)if(bc)bc(u());else throw u();return ne.createElement(a,m)};return f.preload=u,f}function Nx(e){const t=Nt(),r=`not-found-${dt(t.stores.location,a=>a.pathname)}-${dt(t.stores.status,a=>a)}`;
12return J.jsx(fh,{getResetKey:()=>r,onCatch:(a,o)=>{if(Rt(a))e.onCatch?.(a,o);else throw a},errorComponent:({error:a})=>{if(Rt(a))return e.fallback?.(a);throw a},children:e.children})}function Dx(){return J.jsx("p",{children:"Not Found"})}function Va(e){return J.jsx(J.Fragment,{children:e.children})}function y0(e,t,r){return t.options.notFoundComponent?J.jsx(t.options.notFoundComponent,{...r}):e.options.defaultNotFoundComponent?J.jsx(e.options.defaultNotFoundComponent,{...r}):J.jsx(Dx,{})}function Lx(e){return null}function Ux(){return Lx(Nt()),null}var v0=ne.memo(function({matchId:t}){const r=Nt(),a=r.stores.matchStores.get(t);a||tn();const o=dt(r.stores.loadedAt,u=>u),c=dt(a,u=>u);return J.jsx(zx,{router:r,matchId:t,resetKey:o,matchState:ne.useMemo(()=>{const u=c.routeId,f=r.routesById[u].parentRoute?.id;return{routeId:u,ssr:c.ssr,_displayPending:c._displayPending,parentRouteId:f}},[c._displayPending,c.routeId,c.ssr,r.routesById])})});function zx({router:e,matchId:t,resetKey:r,matchState:a}){const o=e.routesById[a.routeId],c=o.options.pendingComponent??e.options.defaultPendingComponent,u=c?J.jsx(c,{}):null,f=o.options.errorComponent??e.options.defaultErrorComponent,p=o.options.onCatch??e.options.defaultOnCatch,m=o.isRoot?o.options.notFoundComponent??e.options.notFoundRoute?.options.component:o.options.notFoundComponent,y=a.ssr===!1||a.ssr==="data-only",g=(!o.isRoot||o.options.wrapInSuspense||y)&&(o.options.wrapInSuspense??c??(o.options.errorComponent?.preload||y))?ne.Suspense:Va,b=f?fh:Va,w=m?Nx:Va;return J.jsxs(o.isRoot?o.options.shellComponent??Va:Va,{children:[J.jsx(Bc.Provider,{value:t,children:J.jsx(g,{fallback:u,children:J.jsx(b,{getResetKey:()=>r,errorComponent:f||hh,onCatch:(_,x)=>{if(Rt(_))throw _.routeId??=a.routeId,_;p?.(_,x)},children:J.jsx(w,{fallback:_=>{if(_.routeId??=a.routeId,!m||_.routeId&&_.routeId!==a.routeId||!_.routeId&&!o.isRoot)throw _;return ne.createElement(m,_)},children:y||a._displayPending?J.jsx(nx,{fallback:u,children:J.jsx(lv,{matchId:t})}):J.jsx(lv,{matchId:t})})})})}),a.parentRouteId===Vs?J.jsxs(J.Fragment,{children:[J.jsx(Px,{resetKey:r}),e.options.scrollRestoration&&fb?J.jsx(Ux,{}):null]}):null]})}function Px({resetKey:e}){const t=Nt(),r=ne.useRef(void 0);return so(()=>{const a=t.latestLocation.href;(r.current===void 0||r.current!==a)&&(t.emit({type:"onRendered",...Xa(t.stores.location.get(),t.stores.resolvedLocation.get())}),r.current=a)},[t.latestLocation.state.__TSR_key,e,t]),null}var lv=ne.memo(function({matchId:t}){const r=Nt(),a=(y,g)=>r.getMatch(y.id)?._nonReactive[g]??y._nonReactive[g],o=r.stores.matchStores.get(t);o||tn();const c=dt(o,y=>y),u=c.routeId,f=r.routesById[u],p=ne.useMemo(()=>{const y=(r.routesById[u].options.remountDeps??r.options.defaultRemountDeps)?.({routeId:u,loaderDeps:c.loaderDeps,params:c._strictParams,search:c._strictSearch});return y?JSON.stringify(y):void 0},[u,c.loaderDeps,c._strictParams,c._strictSearch,r.options.defaultRemountDeps,r.routesById]),m=ne.useMemo(()=>{const y=f.options.component??r.options.defaultComponent;return y?J.jsx(y,{},p):J.jsx(b0,{})},[p,f.options.component,r.options.defaultComponent]);if(c._displayPending)throw a(c,"displayPendingPromise");if(c._forcePending)throw a(c,"minPendingPromise");if(c.status==="pending"){const y=f.options.pendingMinMs??r.options.defaultPendingMinMs;if(y){const g=r.getMatch(c.id);if(g&&!g._nonReactive.minPendingPromise){const b=Ys();g._nonReactive.minPendingPromise=b,setTimeout(()=>{b.resolve(),g._nonReactive.minPendingPromise=void 0},y)}}throw a(c,"loadPromise")}if(c.status==="notFound")return Rt(c.error)||tn(),y0(r,f,c.error);if(c.status==="redirected")throw en(c.error)||tn(),a(c,"loadPromise");if(c.status==="error")throw c.error;return m}),b0=ne.memo(function(){const t=Nt(),r=ne.useContext(Bc);let a,o=!1,c;{const m=r?t.stores.matchStores.get(r):void 0;[a,o]=dt(m,y=>[y?.routeId,y?.globalNotFound??!1]),c=dt(t.stores.matchesId,y=>y[y.findIndex(g=>g===r)+1])}const u=a?t.routesById[a]:void 0,f=t.options.defaultPendingComponent?J.jsx(t.options.defaultPendingComponent,{}):null;if(o)return u||tn(),y0(t,u,void 0);if(!c)return null;const p=J.jsx(v0,{matchId:c});return a===Vs?J.jsx(ne.Suspense,{fallback:f,children:p}):p});function Bx(){const e=Nt(),t=ne.useRef({router:e,mounted:!1}),[r,a]=ne.useState(!1),o=dt(e.stores.isLoading,g=>g),c=dt(e.stores.hasPending,g=>g),u=yf(o),f=o||r||c,p=yf(f),m=o||c,y=yf(m);return e.startTransition=g=>{a(!0),ne.startTransition(()=>{g(),a(!1)})},ne.useEffect(()=>{const g=e.history.subscribe(e.load),b=e.buildLocation({to:e.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return os(e.latestLocation.publicHref)!==os(b.publicHref)&&e.commitLocation({...b,replace:!0}),()=>{g()}},[e,e.history]),so(()=>
12{if(typeof window<"u"&&e.ssr||t.current.router===e&&t.current.mounted)return;t.current={router:e,mounted:!0},(async()=>{try{await e.load()}catch(b){console.error(b)}})()},[e]),so(()=>{u&&!o&&e.emit({type:"onLoad",...Xa(e.stores.location.get(),e.stores.resolvedLocation.get())})},[u,e,o]),so(()=>{y&&!m&&e.emit({type:"onBeforeRouteMount",...Xa(e.stores.location.get(),e.stores.resolvedLocation.get())})},[m,y,e]),so(()=>{if(p&&!f){const g=Xa(e.stores.location.get(),e.stores.resolvedLocation.get());e.emit({type:"onResolved",...g}),l0(()=>{e.stores.status.set("idle"),e.stores.resolvedLocation.set(e.stores.location.get())}),g.hrefChanged&&QE(e)}},[f,p,e]),null}function Ix(){const e=Nt(),t=e.routesById[Vs].options.pendingComponent??e.options.defaultPendingComponent,r=t?J.jsx(t,{}):null,a=J.jsxs(typeof document<"u"&&e.ssr?Va:ne.Suspense,{fallback:r,children:[J.jsx(Bx,{}),J.jsx(Hx,{})]});return e.options.InnerWrap?J.jsx(e.options.InnerWrap,{children:a}):a}function Hx(){const e=Nt(),t=dt(e.stores.firstId,o=>o),r=dt(e.stores.loadedAt,o=>o),a=t?J.jsx(v0,{matchId:t}):null;return J.jsx(Bc.Provider,{value:t,children:e.options.disableGlobalCatchBoundary?a:J.jsx(fh,{getResetKey:()=>r,errorComponent:hh,onCatch:void 0,children:a})})}var qx=e=>({createMutableStore:rv,createReadonlyStore:rv,batch:l0}),$x=e=>new Gx(e),Gx=class extends zE{constructor(e){super(e,qx)}};function Vx({router:e,children:t,...r}){Object.keys(r).length>0&&e.update({...e.options,...r,context:{...e.options.context,...r.context}});const a=J.jsx(i0.Provider,{value:e,children:t});return e.options.Wrap?J.jsx(e.options.Wrap,{children:a}):a}function Kx({router:e,...t}){return J.jsx(Vx,{router:e,...t,children:J.jsx(Ix,{})})}function w0(e){const{attrs:t,children:r,nonce:a}=e;switch(e.tag){case"title":return J.jsx("title",{...t,suppressHydrationWarning:!0,children:r});
12case"meta":return J.jsx("meta",{...t,suppressHydrationWarning:!0});case"link":return J.jsx("link",{...t,precedence:t?.precedence??(t?.rel==="stylesheet"?"default":void 0),nonce:a,suppressHydrationWarning:!0});case"style":return e.inlineCss,J.jsx("style",{...t,dangerouslySetInnerHTML:{__html:r},nonce:a});case"script":return J.jsx(Yx,{attrs:t,children:r});default:return null}}function Yx({attrs:e,children:t}){Nt();const r=ph(),a=typeof e?.type=="string"&&e.type!==""&&e.type!=="text/javascript"&&e.type!=="module";if(ne.useEffect(()=>{if(!a){if(e?.src){const o=(()=>{try{const u=document.baseURI||window.location.href;return new URL(e.src,u).href}catch{return e.src}})();if(Array.from(document.querySelectorAll("script[src]")).find(u=>u.src===o))return;const c=document.createElement("script");for(const[u,f]of Object.entries(e))u!=="suppressHydrationWarning"&&f!==void 0&&f!==!1&&c.setAttribute(u,typeof f=="boolean"?"":String(f));return document.head.appendChild(c),()=>{c.parentNode&&c.parentNode.removeChild(c)}}if(typeof t=="string"){const o=typeof e?.type=="string"?e.type:"text/javascript",c=typeof e?.nonce=="string"?e.nonce:void 0;if(Array.from(document.querySelectorAll("script:not([src])")).find(f=>{if(!(f instanceof HTMLScriptElement))return!1;const p=f.getAttribute("type")??"text/javascript",m=f.getAttribute("nonce")??void 0;return f.textContent===t&&p===o&&m===c}))return;const u=document.createElement("script");if(u.textContent=t,e)for(const[f,p]of Object.entries(e))f!=="suppressHydrationWarning"&&p!==void 0&&p!==!1&&u.setAttribute(f,typeof p=="boolean"?"":String(p));return document.head.appendChild(u),()=>{u.parentNode&&u.parentNode.removeChild(u)}}}},[e,t,a]),a&&typeof t=="string")return J.jsx("script",{...e,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:t}});if(!r){if(e?.src)return J.jsx("script",{...e,suppressHydrationWarning:!0});if(typeof t=="string")return J.jsx("script",{...e,dangerouslySetInnerHTML:{__html:t},suppressHydrationWarning:!0})}return null}var Fx=e=>{const t=Nt(),r=t.options.ssr?.nonce,a=dt(t.stores.matches,m=>m.map(y=>y.meta).filter(Boolean),Wt),o=ne.useMemo(()=>{const m=[],y={};let g;for(let b=a.length-1;b>=0;b--){const w=a[b];for(let _=w.length-1;_>=0;_--){const x=w[_];if(x)if(x.title)g||(g={tag:"title",children:x.title});else if("script:ld+json"in x)try{const E=JSON.stringify(x["script:ld+json"]);m.push({tag:"script",attrs:{type:"application/ld+json"},children:JS(E)})}catch{}else{const E=x.name??x.property;if(E){if(y[E])continue;y[E]=!0}m.push({tag:"meta",attrs:{...x,nonce:r}})}}}return g&&m.push(g),r&&m.push({tag:"meta",attrs:{property:"csp-nonce",content:r}}),m.reverse(),m},[a,r]),c=dt(t.stores.matches,m=>{const y=m.map(w=>w.links).filter(Boolean).flat(1).map(w=>({tag:"link",attrs:{...w,nonce:r}})),g=t.ssr?.manifest,b=m.map(w=>g?.routes[w.routeId]?.assets??[]).filter(Boolean).flat(1).flatMap(w=>w.tag==="link"?FE(g,w)?[]:[{tag:"link",attrs:{...w.attrs,crossOrigin:Hy(e,"stylesheet")??w.attrs?.crossOrigin,suppressHydrationWarning:!0,nonce:r}}]:w.tag==="style"?[{tag:"style",attrs:{...w.attrs,nonce:r},children:w.children,...w.inlineCss?{inlineCss:!0}:{}}]:[]);return[...y,...b]},Wt),u=dt(t.stores.matches,m=>{const y=[];return m.map(g=>t.looseRoutesById[g.routeId]).forEach(g=>t.ssr?.manifest?.routes[g.id]?.preloads?.filter(Boolean).forEach(b=>{const w=KE(b);y.push({tag:"link",attrs:{rel:"modulepreload",href:w.href,crossOrigin:Hy(e,"modulepreload")??w.crossOrigin,nonce:r}})})),y},Wt),f=dt(t.stores.matches,m=>m.map(y=>y.styles).flat(1).filter(Boolean).map(({children:y,...g})=>({tag:"style",attrs:{...g,nonce:r},children:y})),Wt),p=dt(t.stores.matches,m=>m.map(y=>y.headScripts).flat(1).filter(Boolean).map(({children:y,...g})=>({tag:"script",attrs:{...g,nonce:r},children:y})),Wt);return Jx([...o,...u,...c,...f,...p],m=>JSON.stringify(m))};function Jx(e,t){const r=new Set;return e.filter(a=>{const o=t(a);return r.has(o)?!1:(r.add(o),!0)})}function Qx(e){const t=Fx(e.assetCrossOrigin),r=Nt().options.ssr?.nonce;return J.jsx(J.Fragment,{children:t.map(a=>ne.createElement(w0,{...a,key:`tsr-meta-${JSON.stringify(a)}`,nonce:r}))})}var Xx=()=>{const e=Nt(),t=e.options.ssr?.nonce,r=c=>{const u=[],f=e.ssr?.manifest;return f?(c.map(p=>
12e.looseRoutesById[p.routeId]).forEach(p=>f.routes[p.id]?.assets?.filter(m=>m.tag==="script").forEach(m=>{u.push({tag:"script",attrs:{...m.attrs,nonce:t},children:m.children})})),u):[]},a=c=>c.map(u=>u.scripts).flat(1).filter(Boolean).map(({children:u,...f})=>({tag:"script",attrs:{...f,suppressHydrationWarning:!0,nonce:t},children:u})),o=dt(e.stores.matches,r,Wt);return Zx(e,dt(e.stores.matches,a,Wt),o)};function Zx(e,t,r){let a;e.serverSsr&&(a=e.serverSsr.takeBufferedScripts());const o=[...t,...r];return a&&o.unshift(a),J.jsx(J.Fragment,{children:o.map((c,u)=>ne.createElement(w0,{...c,key:`tsr-scripts-${c.tag}-${u}`}))})}var $s=(e,t)=>{const r={type:"request",...t||e};return{options:r,middleware:a=>$s({},Object.assign(r,{middleware:a})),inputValidator:a=>$s({},Object.assign(r,{inputValidator:a})),client:a=>$s({},Object.assign(r,{client:a})),server:a=>$s({},Object.assign(r,{server:a}))}};function _0(e,t){for(let r=0,a=t.length;r<a;r++){const o=t[r];e.has(o)||(e.add(o),o.extends&&_0(e,o.extends))}}var Wx=e=>({getOptions:async()=>{const t=await e();if(t.serializationAdapters){const r=new Set;_0(r,t.serializationAdapters),t.serializationAdapters=Array.from(r)}return t},createMiddleware:$s});function Hc(e,t){var r={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(r[a]=e[a]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,a=Object.getOwnPropertySymbols(e);o<a.length;o++)t.indexOf(a[o])<0&&Object.prototype.propertyIsEnumerable.call(e,a[o])&&(r[a[o]]=e[a[o]]);return r}function eA(e,t,r,a){function o(c){return c instanceof r?c:new r(function(u){u(c)})}return new(r||(r=Promise))(function(c,u){function f(y){try{m(a.next(y))}catch(g){u(g)}}function p(y){try{m(a.throw(y))}catch(g){u(g)}}function m(y){y.done?c(y.value):o(y.value).then(f,p)}m((a=a.apply(e,t||[])).next())})}const tA=e=>e?(...t)=>e(...t):(...t)=>fetch(...t);class mh extends Error{constructor(t,r="FunctionsError",a){super(t),this.name=r,this.context=a}toJSON(){return{name:this.name,message:this.message,context:this.context}}}class nA extends mh{constructor(t){super("Failed to send a request to the Edge Function","FunctionsFetchError",t)}}class cv extends mh{constructor(t){super("Relay Error invoking the Edge Function","FunctionsRelayError",t)}}class uv extends mh{constructor(t){super("Edge Function returned a non-2xx status code","FunctionsHttpError",t)}}var Hf;(function(e){e.Any="any",e.ApNortheast1="ap-northeast-1",e.ApNortheast2="ap-northeast-2",e.ApSouth1="ap-south-1",e.ApSoutheast1="ap-southeast-1",e.ApSoutheast2="ap-southeast-2",e.CaCentral1="ca-central-1",e.EuCentral1="eu-central-1",e.EuWest1="eu-west-1",e.EuWest2="eu-west-2",e.EuWest3="eu-west-3",e.SaEast1="sa-east-1",e.UsEast1="us-east-1",e.UsWest1="us-west-1",e.UsWest2="us-west-2"})(Hf||(Hf={}));class rA{constructor(t,{headers:r={},customFetch:a,region:o=Hf.Any}={}){this.url=t,this.headers=r,this.region=o,this.fetch=tA(a)}setAuth(t){this.headers.Authorization=`Bearer ${t}`}invoke(t){return eA(this,arguments,void 0,function*(r,a={}){var o;let c,u;try{const{headers:f,method:p,body:m,signal:y,timeout:g}=a;let b={},{region:w}=a;w||(w=this.region);const _=new URL(`${this.url}/${r}`);w&&w!=="any"&&(b["x-region"]=w,_.searchParams.set("forceFunctionRegion",w));let x;m&&(f&&!Object.prototype.hasOwnProperty.call(f,"Content-Type")||!f)?typeof Blob<"u"&&m instanceof Blob||m instanceof ArrayBuffer?(b["Content-Type"]="application/octet-stream",x=m):typeof m=="string"?(b["Content-Type"]="text/plain",x=m):typeof FormData<"u"&&m instanceof FormData?x=m:(b["Content-Type"]="application/json",x=JSON.stringify(m)):m&&typeof m!="string"&&!(typeof Blob<"u"&&m instanceof Blob)&&!(m instanceof ArrayBuffer)&&!(typeof FormData<"u"&&m instanceof FormData)?x=JSON.stringify(m):x=m;let E=y;g&&(u=new AbortController,c=setTimeout(()=>u.abort(),g),y?(E=u.signal,y.addEventListener("abort",()=>u.abort())):E=u.signal);const R=yield this.fetch(_.toString(),{method:p||"POST",headers:Object.assign(Object.assign(Object.assign({},b),this.headers),f),body:x,signal:E}).catch(X=>{throw new nA(X)}),M=R.headers.get("x-relay-error");
12if(M&&M==="true")throw new cv(R);if(!R.ok)throw new uv(R);let j=((o=R.headers.get("Content-Type"))!==null&&o!==void 0?o:"text/plain").split(";")[0].trim(),L;return j==="application/json"?L=yield R.json():j==="application/octet-stream"||j==="application/pdf"?L=yield R.blob():j==="text/event-stream"?L=R:j==="multipart/form-data"?L=yield R.formData():L=yield R.text(),{data:L,error:null,response:R}}catch(f){return{data:null,error:f,response:f instanceof uv||f instanceof cv?f.context:void 0}}finally{c&&clearTimeout(c)}})}}const S0=3,dv=e=>Math.min(1e3*2**e,3e4),sA=[520,503],E0=["GET","HEAD","OPTIONS"];var fv=class extends Error{constructor(e){super(e.message),this.name="PostgrestError",this.details=e.details,this.hint=e.hint,this.code=e.code}toJSON(){return{name:this.name,message:this.message,details:this.details,hint:this.hint,code:this.code}}};function hv(e,t){return new Promise(r=>{if(t?.aborted){r();return}const a=setTimeout(()=>{t?.removeEventListener("abort",o),r()},e);function o(){clearTimeout(a),r()}t?.addEventListener("abort",o)})}function aA(e,t,r,a){return!(!a||r>=S0||!E0.includes(e)||!sA.includes(t))}var iA=class{constructor(e){var t,r,a,o,c;this.shouldThrowOnError=!1,this.retryEnabled=!0,this.method=e.method,this.url=e.url,this.headers=new Headers(e.headers),this.schema=e.schema,this.body=e.body,this.shouldThrowOnError=(t=e.shouldThrowOnError)!==null&&t!==void 0?t:!1,this.signal=e.signal,this.isMaybeSingle=(r=e.isMaybeSingle)!==null&&r!==void 0?r:!1,this.shouldStripNulls=(a=e.shouldStripNulls)!==null&&a!==void 0?a:!1,this.urlLengthLimit=(o=e.urlLengthLimit)!==null&&o!==void 0?o:8e3,this.retryEnabled=(c=e.retry)!==null&&c!==void 0?c:!0,e.fetch?this.fetch=e.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(e,t){return this.headers=new Headers(this.headers),this.headers.set(e,t),this}retry(e){return this.retryEnabled=e,this}then(e,t){var r=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 u=this.headers.get("Accept");u==="application/vnd.pgrst.object+json"?this.headers.set("Accept","application/vnd.pgrst.object+json;nulls=stripped"):(!u||u==="application/json")&&this.headers.set("Accept","application/vnd.pgrst.array+json;nulls=stripped")}const a=this.fetch;let c=(async()=>{let u=0;for(;;){const m=new Headers(r.headers);u>0&&m.set("X-Retry-Count",String(u));let y;try{y=await a(r.url.toString(),{method:r.method,headers:m,body:JSON.stringify(r.body,(g,b)=>typeof b=="bigint"?b.toString():b),signal:r.signal})}catch(g){if(g?.name==="AbortError"||g?.code==="ABORT_ERR"||!E0.includes(r.method))throw g;if(r.retryEnabled&&u<S0){const b=dv(u);u++,await hv(b,r.signal);continue}throw g}if(aA(r.method,y.status,u,r.retryEnabled)){var f,p;const g=(f=(p=y.headers)===null||p===void 0?void 0:p.get("Retry-After"))!==null&&f!==void 0?f:null,b=g!==null?Math.max(0,parseInt(g,10)||0)*1e3:dv(u);await y.text(),u++,await hv(b,r.signal);continue}return await r.processResponse(y)}})();return this.shouldThrowOnError||(c=c.catch(u=>{var f;let p="",m="",y="";const g=u?.cause;if(g){var b,w,_,x;const M=(b=g?.message)!==null&&b!==void 0?b:"",j=(w=g?.code)!==null&&w!==void 0?w:"";p=`${(_=u?.name)!==null&&_!==void 0?_:"FetchError"}: ${u?.message}`,p+=` 13 14Caused by: ${(x=g?.name)!==null&&x!==void 0?x:"Error"}: ${M}`,j&&(p+=` (${j})`),g?.stack&&(p+=` 15${g.stack}`)}else{var E;p=(E=u?.stack)!==null&&E!==void 0?E:""}const R=this.url.toString().length;return u?.name==="AbortError"||u?.code==="ABORT_ERR"?(y="",m="Request was aborted (timeout or manual cancellation)",R>this.urlLengthLimit&&(m+=`. Note: Your request URL is ${R} 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.`)):(g?.name==="HeadersOverflowError"||g?.code==="UND_ERR_HEADERS_OVERFLOW")&&(y="",m="HTTP headers exceeded server limits (typically 16KB)",R>this.urlLengthLimit&&(m+=`. Your request URL is ${R} 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:`${(f=u?.name)!==null&&f!==void 0?f:"FetchError"}: ${u?.message}`,details:p,hint:m,code:y},data:null,count:null,status:0,statusText:""}}
15)),c.then(e,t)}async processResponse(e){var t=this;let r=null,a=null,o=null,c=e.status,u=e.statusText;if(e.ok){var f,p;if(t.method!=="HEAD"){var m;const b=await e.text();if(b!=="")if(t.headers.get("Accept")==="text/csv")a=b;else if(t.headers.get("Accept")&&(!((m=t.headers.get("Accept"))===null||m===void 0)&&m.includes("application/vnd.pgrst.plan+text")))a=b;else try{a=JSON.parse(b)}catch{if(r={message:b},a=null,t.shouldThrowOnError)throw new fv({message:b,details:"",hint:"",code:""})}}const y=(f=t.headers.get("Prefer"))===null||f===void 0?void 0:f.match(/count=(exact|planned|estimated)/),g=(p=e.headers.get("content-range"))===null||p===void 0?void 0:p.split("/");y&&g&&g.length>1&&(o=parseInt(g[1])),t.isMaybeSingle&&Array.isArray(a)&&(a.length>1?(r={code:"PGRST116",details:`Results contain ${a.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},a=null,o=null,c=406,u="Not Acceptable"):a.length===1?a=a[0]:a=null)}else{const y=await e.text();try{r=JSON.parse(y),Array.isArray(r)&&e.status===404&&(a=[],r=null,c=200,u="OK")}catch{e.status===404&&y===""?(c=204,u="No Content"):r={message:y}}if(r&&t.shouldThrowOnError)throw new fv(r)}return{success:r===null,error:r,data:a,count:o,status:c,statusText:u}}returns(){return this}overrideTypes(){return this}},oA=class extends iA{select(e){let t=!1;const r=(e??"*").split("").map(a=>/\s/.test(a)&&!t?"":(a==='"'&&(t=!t),a)).join("");return this.url.searchParams.set("select",r),this.headers.append("Prefer","return=representation"),this}order(e,{ascending:t=!0,nullsFirst:r,foreignTable:a,referencedTable:o=a}={}){const c=o?`${o}.order`:"order",u=this.url.searchParams.get(c);return this.url.searchParams.set(c,`${u?`${u},`:""}${e}.${t?"asc":"desc"}${r===void 0?"":r?".nullsfirst":".nullslast"}`),this}limit(e,{foreignTable:t,referencedTable:r=t}={}){const a=typeof r>"u"?"limit":`${r}.limit`;return this.url.searchParams.set(a,`${e}`),this}range(e,t,{foreignTable:r,referencedTable:a=r}={}){const o=typeof a>"u"?"offset":`${a}.offset`,c=typeof a>"u"?"limit":`${a}.limit`;return this.url.searchParams.set(o,`${e}`),this.url.searchParams.set(c,`${t-e+1}`),this}abortSignal(e){return this.signal=e,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:e=!1,verbose:t=!1,settings:r=!1,buffers:a=!1,wal:o=!1,format:c="text"}={}){var u;const f=[e?"analyze":null,t?"verbose":null,r?"settings":null,a?"buffers":null,o?"wal":null].filter(Boolean).join("|"),p=(u=this.headers.get("Accept"))!==null&&u!==void 0?u:"application/json";return this.headers.set("Accept",`application/vnd.pgrst.plan+${c}; for="${p}"; options=${f};`),c==="json"?this:this}rollback(){return this.headers.append("Prefer","tx=rollback"),this}returns(){return this}maxAffected(e){return this.headers.append("Prefer","handling=strict"),this.headers.append("Prefer",`max-affected=${e}`),this}};const pv=new RegExp("[,()]");var Ka=class extends oA{eq(e,t){return this.url.searchParams.append(e,`eq.${t}`),this}neq(e,t){return this.url.searchParams.append(e,`neq.${t}`),this}gt(e,t){return this.url.searchParams.append(e,`gt.${t}`),this}gte(e,t){return this.url.searchParams.append(e,`gte.${t}`),this}lt(e,t){return this.url.searchParams.append(e,`lt.${t}`),this}lte(e,t){return this.url.searchParams.append(e,`lte.${t}`),this}like(e,t){return this.url.searchParams.append(e,`like.${t}`),this}likeAllOf(e,t){return this.url.searchParams.append(e,`like(all).{${t.join(",")}}`),this}likeAnyOf(e,t){return this.url.searchParams.append(e,`like(any).{${t.join(",")}}`),this}ilike(e,t){return this.url.searchParams.append(e,`ilike.${t}`),this}ilikeAllOf(e,t){return this.url.searchParams.append(e,`ilike(all).{${t.join(",")}}`),this}ilikeAnyOf(e,t){return this.url.searchParams.append(e,`ilike(any).{${t.join(",")}}`),this}regexMatch(e,t){return this.url.searchParams.append(e,`match.${t}`),this}regexIMatch(e,t){return this.url.searchParams.append(e,`imatch.${t}`),this}is(e,t){return this.url.searchParams.append(e,`is.${t}`),this}isDistinct(e,t){return this.url.searchParams.append(e,`isdistinct.${t}`),this}in(e,t){const r=Array.from(new Set(t)).map(a=>
15typeof a=="string"&&pv.test(a)?`"${a}"`:`${a}`).join(",");return this.url.searchParams.append(e,`in.(${r})`),this}notIn(e,t){const r=Array.from(new Set(t)).map(a=>typeof a=="string"&&pv.test(a)?`"${a}"`:`${a}`).join(",");return this.url.searchParams.append(e,`not.in.(${r})`),this}contains(e,t){return typeof t=="string"?this.url.searchParams.append(e,`cs.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cs.{${t.join(",")}}`):this.url.searchParams.append(e,`cs.${JSON.stringify(t)}`),this}containedBy(e,t){return typeof t=="string"?this.url.searchParams.append(e,`cd.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cd.{${t.join(",")}}`):this.url.searchParams.append(e,`cd.${JSON.stringify(t)}`),this}rangeGt(e,t){return this.url.searchParams.append(e,`sr.${t}`),this}rangeGte(e,t){return this.url.searchParams.append(e,`nxl.${t}`),this}rangeLt(e,t){return this.url.searchParams.append(e,`sl.${t}`),this}rangeLte(e,t){return this.url.searchParams.append(e,`nxr.${t}`),this}rangeAdjacent(e,t){return this.url.searchParams.append(e,`adj.${t}`),this}overlaps(e,t){return typeof t=="string"?this.url.searchParams.append(e,`ov.${t}`):this.url.searchParams.append(e,`ov.{${t.join(",")}}`),this}textSearch(e,t,{config:r,type:a}={}){let o="";a==="plain"?o="pl":a==="phrase"?o="ph":a==="websearch"&&(o="w");const c=r===void 0?"":`(${r})`;return this.url.searchParams.append(e,`${o}fts${c}.${t}`),this}match(e){return Object.entries(e).filter(([t,r])=>r!==void 0).forEach(([t,r])=>{this.url.searchParams.append(t,`eq.${r}`)}),this}not(e,t,r){return this.url.searchParams.append(e,`not.${t}.${r}`),this}or(e,{foreignTable:t,referencedTable:r=t}={}){const a=r?`${r}.or`:"or";return this.url.searchParams.append(a,`(${e})`),this}filter(e,t,r){return this.url.searchParams.append(e,`${t}.${r}`),this}},lA=class{constructor(e,{headers:t={},schema:r,fetch:a,urlLengthLimit:o=8e3,retry:c}){this.url=e,this.headers=new Headers(t),this.schema=r,this.fetch=a,this.urlLengthLimit=o,this.retry=c}cloneRequestState(){return{url:new URL(this.url.toString()),headers:new Headers(this.headers)}}select(e,t){const{head:r=!1,count:a}=t??{},o=r?"HEAD":"GET";let c=!1;const u=(e??"*").split("").map(m=>/\s/.test(m)&&!c?"":(m==='"'&&(c=!c),m)).join(""),{url:f,headers:p}=this.cloneRequestState();return f.searchParams.set("select",u),a&&p.append("Prefer",`count=${a}`),new Ka({method:o,url:f,headers:p,schema:this.schema,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}insert(e,{count:t,defaultToNull:r=!0}={}){var a;const o="POST",{url:c,headers:u}=this.cloneRequestState();
15if(t&&u.append("Prefer",`count=${t}`),r||u.append("Prefer","missing=default"),Array.isArray(e)){const f=e.reduce((p,m)=>p.concat(Object.keys(m)),[]);if(f.length>0){const p=[...new Set(f)].map(m=>`"${m}"`);c.searchParams.set("columns",p.join(","))}}return new Ka({method:o,url:c,headers:u,schema:this.schema,body:e,fetch:(a=this.fetch)!==null&&a!==void 0?a:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}upsert(e,{onConflict:t,ignoreDuplicates:r=!1,count:a,defaultToNull:o=!0}={}){var c;const u="POST",{url:f,headers:p}=this.cloneRequestState();if(p.append("Prefer",`resolution=${r?"ignore":"merge"}-duplicates`),t!==void 0&&f.searchParams.set("on_conflict",t),a&&p.append("Prefer",`count=${a}`),o||p.append("Prefer","missing=default"),Array.isArray(e)){const m=e.reduce((y,g)=>y.concat(Object.keys(g)),[]);if(m.length>0){const y=[...new Set(m)].map(g=>`"${g}"`);f.searchParams.set("columns",y.join(","))}}return new Ka({method:u,url:f,headers:p,schema:this.schema,body:e,fetch:(c=this.fetch)!==null&&c!==void 0?c:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}update(e,{count:t}={}){var r;const a="PATCH",{url:o,headers:c}=this.cloneRequestState();return t&&c.append("Prefer",`count=${t}`),new Ka({method:a,url:o,headers:c,schema:this.schema,body:e,fetch:(r=this.fetch)!==null&&r!==void 0?r:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}delete({count:e}={}){var t;const r="DELETE",{url:a,headers:o}=this.cloneRequestState();return e&&o.append("Prefer",`count=${e}`),new Ka({method:r,url:a,headers:o,schema:this.schema,fetch:(t=this.fetch)!==null&&t!==void 0?t:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};function yo(e){"@babel/helpers - typeof";return yo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},yo(e)}function cA(e,t){if(yo(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var a=r.call(e,t);if(yo(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function uA(e){var t=cA(e,"string");return yo(t)=="symbol"?t:t+""}function dA(e,t,r){return(t=uA(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function mv(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,a)}return r}function Ql(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?mv(Object(r),!0).forEach(function(a){dA(e,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):mv(Object(r)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(r,a))})}return e}var fA=class T0{constructor(t,{headers:r={},schema:a,fetch:o,timeout:c,urlLengthLimit:u=8e3,retry:f}={}){this.url=t,this.headers=new Headers(r),this.schemaName=a,this.urlLengthLimit=u;const p=o??globalThis.fetch;c!==void 0&&c>0?this.fetch=(m,y)=>{const g=new AbortController,b=setTimeout(()=>g.abort(),c),w=y?.signal;if(w){if(w.aborted)return clearTimeout(b),p(m,y);const _=()=>{clearTimeout(b),g.abort()};return w.addEventListener("abort",_,{once:!0}),p(m,Ql(Ql({},y),{},{signal:g.signal})).finally(()=>{clearTimeout(b),w.removeEventListener("abort",_)})}return p(m,Ql(Ql({},y),{},{signal:g.signal})).finally(()=>clearTimeout(b))}:this.fetch=p,this.retry=f}from(t){if(!t||typeof t!="string"||t.trim()==="")throw new Error("Invalid relation name: relation must be a non-empty string.");return new lA(new URL(`${this.url}/${t}`),{headers:new Headers(this.headers),schema:this.schemaName,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}schema(t){return new T0(this.url,{headers:this.headers,schema:t,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}rpc(t,r={},{head:a=!1,get:o=!1,count:c}={}){var u;let f;const p=new URL(`${this.url}/rpc/${t}`);let m;const y=w=>w!==null&&typeof w=="object"&&(!Array.isArray(w)||w.some(y)),g=a&&Object.values(r).some(y);g?(f="POST",m=r):a||o?(f=a?"HEAD":"GET",Object.entries(r).filter(([w,_])=>_!==void 0).map(([w,_])=>[w,Array.isArray(_)?`{${_.join(",")}}`:`${_}
15`]).forEach(([w,_])=>{p.searchParams.append(w,_)})):(f="POST",m=r);const b=new Headers(this.headers);return g?b.set("Prefer",c?`count=${c},return=minimal`:"return=minimal"):c&&b.set("Prefer",`count=${c}`),new Ka({method:f,url:p,headers:b,schema:this.schemaName,body:m,fetch:(u=this.fetch)!==null&&u!==void 0?u:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};class hA{constructor(){}static detectEnvironment(){var t;if(typeof WebSocket<"u")return{type:"native",wsConstructor:WebSocket};const r=globalThis;if(typeof globalThis<"u"&&typeof r.WebSocket<"u")return{type:"native",wsConstructor:r.WebSocket};const a=typeof global<"u"?global:void 0;if(a&&typeof a.WebSocket<"u")return{type:"native",wsConstructor:a.WebSocket};if(typeof globalThis<"u"&&typeof r.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"&&r.EdgeRuntime||typeof navigator<"u"&&(!((t=navigator.userAgent)===null||t===void 0)&&t.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 o=globalThis.process;if(o){const c=o.versions;if(c&&c.node){const u=c.node,f=parseInt(u.replace(/^v/,"").split(".")[0]);return f>=22?typeof globalThis.WebSocket<"u"?{type:"native",wsConstructor:globalThis.WebSocket}:{type:"unsupported",error:`Node.js ${f} detected but native WebSocket not found.`,workaround:"Provide a WebSocket implementation via the transport option."}:{type:"unsupported",error:`Node.js ${f} 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 t=this.detectEnvironment();if(t.wsConstructor)return t.wsConstructor;let r=t.error||"WebSocket not supported in this environment.";throw t.workaround&&(r+=` 18 19Suggested solution: ${t.workaround}`),new Error(r)}static isWebSocketSupported(){try{const t=this.detectEnvironment();return t.type==="native"||t.type==="ws"}catch{return!1}}}const pA="2.107.0",mA=`realtime-js/${pA}`,gA="1.0.0",R0="2.0.0",yA=R0,vA=1e4,bA=100,ns={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"},qf={connecting:"connecting",closing:"closing",closed:"closed"};class wA{constructor(t){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=t??[]}encode(t,r){if(t.event===this.BROADCAST_EVENT&&!(t.payload instanceof ArrayBuffer)&&typeof t.payload.event=="string")return r(this._binaryEncodeUserBroadcastPush(t));let a=[t.join_ref,t.ref,t.topic,t.event,t.payload];return r(JSON.stringify(a))}_binaryEncodeUserBroadcastPush(t){var r;return this._isArrayBuffer((r=t.payload)===null||r===void 0?void 0:r.payload)?this._encodeBinaryUserBroadcastPush(t):this._encodeJsonUserBroadcastPush(t)}_encodeBinaryUserBroadcastPush(t){var r,a;const o=(a=(r=t.payload)===null||r===void 0?void 0:r.payload)!==null&&a!==void 0?a:new ArrayBuffer(0);return this._encodeUserBroadcastPush(t,this.BINARY_ENCODING,o)}_encodeJsonUserBroadcastPush(t){var r,a;const o=(a=(r=t.payload)===null||r===void 0?void 0:r.payload)!==null&&a!==void 0?a:{},u=new TextEncoder().encode(JSON.stringify(o)).buffer;return this._encodeUserBroadcastPush(t,this.JSON_ENCODING,u)}_encodeUserBroadcastPush(t,r,a){var o,c;const u=t.topic,f=(o=t.ref)!==null&&o!==void 0?o:"",p=(c=t.join_ref)!==null&&c!==void 0?c:"",m=t.payload.event,y=this.allowedMetadataKeys?this._pick(t.payload,this.allowedMetadataKeys):{},g=Object.keys(y).length===0?"":JSON.stringify(y);if(p.length>255)throw new Error(`joinRef length ${p.length} exceeds maximum of 255`);if(f.length>255)throw new Error(`ref length ${f.length} exceeds maximum of 255`);if(u.length>255)throw new Error(`topic length ${u.length} exceeds maximum of 255`);if(m.length>255)throw new Error(`userEvent length ${m.length} exceeds maximum of 255`);if(g.length>255)throw new Error(`metadata length ${g.length} exceeds maximum of 255`);const b=this.USER_BROADCAST_PUSH_META_LENGTH+p.length+f.length+u.length+m.length+g.length,w=new ArrayBuffer(this.HEADER_LENGTH+b);let _=new DataView(w),x=0;_.setUint8(x++,this.KINDS.userBroadcastPush),_.setUint8(x++,p.length),_.setUint8(x++,f.length),_.setUint8(x++,u.length),_.setUint8(x++,m.length),_.setUint8(x++,g.length),_.setUint8(x++,r),Array.from(p,R=>_.setUint8(x++,R.charCodeAt(0))),Array.from(f,R=>_.setUint8(x++,R.charCodeAt(0))),Array.from(u,R=>_.setUint8(x++,R.charCodeAt(0))),Array.from(m,R=>_.setUint8(x++,R.charCodeAt(0))),Array.from(g,R=>_.setUint8(x++,R.charCodeAt(0)));var E=new Uint8Array(w.byteLength+a.byteLength);return E.set(new Uint8Array(w),0),E.set(new Uint8Array(a),w.byteLength),E.buffer}decode(t,r){if(this._isArrayBuffer(t)){let a=this._binaryDecode(t);return r(a)}if(typeof t=="string"){const a=JSON.parse(t),[o,c,u,f,p]=a;return r({join_ref:o,ref:c,topic:u,event:f,payload:p})}return r({})}_binaryDecode(t){const r=new DataView(t),a=r.getUint8(0),o=new TextDecoder;if(a===this.KINDS.userBroadcast)return this._decodeUserBroadcast(t,r,o)}_decodeUserBroadcast(t,r,a){const o=r.getUint8(1),c=r.getUint8(2),u=r.getUint8(3),f=r.getUint8(4);let p=this.HEADER_LENGTH+4;const m=a.decode(t.slice(p,p+o));p=p+o;const y=a.decode(t.slice(p,p+c));p=p+c;const g=a.decode(t.slice(p,p+u));p=p+u;const b=t.slice(p,t.byteLength),w=f===this.JSON_ENCODING?JSON.parse(a.decode(b)):b,_={type:this.BROADCAST_EVENT,event:y,payload:w};return u>0&&(_.meta=JSON.parse(g)),{join_ref:null,ref:null,topic:m,event:this.BROADCAST_EVENT,payload:_}}_isArrayBuffer(t){var r;return t instanceof ArrayBuffer||((r=t?.constructor)===null||r===void 0?void 0:r.name)==="ArrayBuffer"}_pick(t,r){return!t||typeof t!="object"?{}:Object.fromEntries(Object.entries(t).filter(([a])=>r.includes(a)))}}var Ke;(function(e){e.abstime="abstime",e.bool="bool",e.date="date",e.daterange="daterange",e.float4="float4",e.float8="float8",e.int2="int2",e.int4="int4",e.int4range="int4range",e.int8="int8",e.int8range="int8range",e.json="json",e.jsonb="jsonb",e.money="money",e.numeric="numeric",e.oid="oid",e.reltime="reltime",e.text="text",e.time="time",e.timestamp="timestamp",e.timestamptz="timestamptz",e.timetz="timetz",e.tsrange="tsrange",e.tstzrange="tstzrange"})(Ke||(Ke={}));const gv=(e,t,r={})=>{var a;const o=(a=r.skipTypes)!==null&&a!==void 0?a:[];return t?Object.keys(t).reduce((c,u)=>(c[u]=_A(u,e,t,o),c),{}):{}},_A=(e,t,r,a)=>{const o=t.find(f=>f.name===e),c=o?.type,u=r[e];return c&&!a.includes(c)?A0(c,u):$f(u)},A0=(e,t)=>{if(e.charAt(0)==="_"){const r=e.slice(1,e.length);return RA(t,r)}switch(e){case Ke.bool:return SA(t);case Ke.float4:case Ke.float8:case Ke.int2:case Ke.int4:case Ke.int8:case Ke.numeric:case Ke.oid:return EA(t);case Ke.json:case Ke.jsonb:return TA(t);case Ke.timestamp:return xA(t);case Ke.abstime:case Ke.date:case Ke.daterange:case Ke.int4range:case Ke.int8range:case Ke.money:case Ke.reltime:case Ke.text:case Ke.time:case Ke.timestamptz:case Ke.timetz:case Ke.tsrange:case Ke.tstzrange:return $f(t);default:return $f(t)}},$f=e=>e,SA=e=>{switch(e){case"t":return!0;case"f":return!1;default:return e}},EA=e=>{if(typeof e=="string"){const t=parseFloat(e);
vendor: 4,773 bytes, line 19
19if(!Number.isNaN(t))return t}return e},TA=e=>{if(typeof e=="string")try{return JSON.parse(e)}catch{return e}return e},RA=(e,t)=>{if(typeof e!="string")return e;const r=e.length-1,a=e[r];if(e[0]==="{"&&a==="}"){let c;const u=e.slice(1,r);try{c=JSON.parse("["+u+"]")}catch{c=u?u.split(","):[]}return c.map(f=>A0(t,f))}return e},xA=e=>typeof e=="string"?e.replace(" ","T"):e,O0=e=>{const t=new URL(e);return t.protocol=t.protocol.replace(/^ws/i,"http"),t.pathname=t.pathname.replace(/\/+$/,"").replace(/\/socket\/websocket$/i,"").replace(/\/socket$/i,"").replace(/\/websocket$/i,""),t.pathname===""||t.pathname==="/"?t.pathname="/api/broadcast":t.pathname=t.pathname+"/api/broadcast",t.href};var lo=e=>typeof e=="function"?e:function(){return e},AA=typeof self<"u"?self:null,Ya=typeof window<"u"?window:null,Vn=AA||Ya||globalThis,OA="2.0.0",CA=1e4,kA=1e3,Yn={connecting:0,open:1,closing:2,closed:3},Xt={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},wr={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave"},Gf={longpoll:"longpoll",websocket:"websocket"},jA={complete:4},Vf="base64url.bearer.phx.",Xl=class{constructor(e,t,r,a){this.channel=e,this.event=t,this.payload=r||function(){return{}},this.receivedResp=null,this.timeout=a,this.timeoutTimer=null,this.recHooks=[],this.sent=!1,this.ref=void 0}resend(e){this.timeout=e,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(e,t){return this.hasReceived(e)&&t(this.receivedResp.response),this.recHooks.push({status:e,callback:t}),this}reset(){this.cancelRefEvent(),this.ref=null,this.refEvent=null,this.receivedResp=null,this.sent=!1}destroy(){this.cancelRefEvent(),this.cancelTimeout()}matchReceive({status:e,response:t,_ref:r}){this.recHooks.filter(a=>a.status===e).forEach(a=>a.callback(t))}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,e=>{this.cancelRefEvent(),this.cancelTimeout(),this.receivedResp=e,this.matchReceive(e)}),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}hasReceived(e){return this.receivedResp&&this.receivedResp.status===e}trigger(e,t){this.channel.trigger(this.refEvent,{status:e,response:t})}},C0=class{constructor(e,t){this.callback=e,this.timerCalc=t,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))}},MA=class{constructor(e,t,r){this.state=Xt.closed,this.topic=e,this.params=lo(t||{}),this.socket=r,this.bindings=[],this.bindingRef=0,this.timeout=this.socket.timeout,this.joinedOnce=!1,this.joinPush=new Xl(this,wr.join,this.params,this.timeout),this.pushBuffer=[],this.stateChangeRefs=[],this.rejoinTimer=new C0(()=>{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=Xt.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(a=>a.send()),this.pushBuffer=[]}),this.joinPush.receive("error",a=>{this.state=Xt.errored,this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,a),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.onClose(()=>{this.rejoinTimer.reset(),this.socket.hasLogger()&&this.socket.log("channel",`close ${this.topic}`),this.state=Xt.closed,this.socket.remove(this)}),this.onError(a=>{this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,a),this.isJoining()&&this.joinPush.reset(),this.state=Xt.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 Xl(this,wr.leave,lo({}),this.timeout).send(),this.state=Xt.errored,this.joinPush.reset(),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.on(wr.reply,(a,o)=>{this.trigger(this.replyEventName(o),a)})}join(e=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=e,this.joinedOnce=!0,this.rejoin(),this.joinPush}
vendor: 5,263 bytes, line 19
19teardown(){this.pushBuffer.forEach(e=>e.destroy()),this.pushBuffer=[],this.rejoinTimer.reset(),this.joinPush.destroy(),this.state=Xt.closed,this.bindings=[]}onClose(e){this.on(wr.close,e)}onError(e){return this.on(wr.error,t=>e(t))}on(e,t){let r=this.bindingRef++;return this.bindings.push({event:e,ref:r,callback:t}),r}off(e,t){this.bindings=this.bindings.filter(r=>!(r.event===e&&(typeof t>"u"||t===r.ref)))}canPush(){return this.socket.isConnected()&&this.isJoined()}push(e,t,r=this.timeout){if(t=t||{},!this.joinedOnce)throw new Error(`tried to push '${e}' to '${this.topic}' before joining. Use channel.join() before pushing events`);let a=new Xl(this,e,function(){return t},r);return this.canPush()?a.send():(a.startTimeout(),this.pushBuffer.push(a)),a}leave(e=this.timeout){this.rejoinTimer.reset(),this.joinPush.cancelTimeout(),this.state=Xt.leaving;let t=()=>{this.socket.hasLogger()&&this.socket.log("channel",`leave ${this.topic}`),this.trigger(wr.close,"leave")},r=new Xl(this,wr.leave,lo({}),e);return r.receive("ok",()=>t()).receive("timeout",()=>t()),r.send(),this.canPush()||r.trigger("ok",{}),r}onMessage(e,t,r){return t}filterBindings(e,t,r){return!0}isMember(e,t,r,a){return this.topic!==e?!1:a&&a!==this.joinRef()?(this.socket.hasLogger()&&this.socket.log("channel","dropping outdated message",{topic:e,event:t,payload:r,joinRef:a}),!1):!0}joinRef(){return this.joinPush.ref}rejoin(e=this.timeout){this.isLeaving()||(this.socket.leaveOpenTopic(this.topic),this.state=Xt.joining,this.joinPush.resend(e))}trigger(e,t,r,a){let o=this.onMessage(e,t,r,a);if(t&&!o)throw new Error("channel onMessage callbacks must return the payload, modified or unmodified");let c=this.bindings.filter(u=>u.event===e&&this.filterBindings(u,t,r));for(let u=0;u<c.length;u++)c[u].callback(o,r,a||this.joinRef())}replyEventName(e){return`chan_reply_${e}`}isClosed(){return this.state===Xt.closed}isErrored(){return this.state===Xt.errored}isJoined(){return this.state===Xt.joined}isJoining(){return this.state===Xt.joining}isLeaving(){return this.state===Xt.leaving}},_c=class{static request(e,t,r,a,o,c,u){if(Vn.XDomainRequest){let f=new Vn.XDomainRequest;return this.xdomainRequest(f,e,t,a,o,c,u)}else if(Vn.XMLHttpRequest){let f=new Vn.XMLHttpRequest;return this.xhrRequest(f,e,t,r,a,o,c,u)}else{if(Vn.fetch&&Vn.AbortController)return this.fetchRequest(e,t,r,a,o,c,u);throw new Error("No suitable XMLHttpRequest implementation found")}}static fetchRequest(e,t,r,a,o,c,u){let f={method:e,headers:r,body:a},p=null;return o&&(p=new AbortController,setTimeout(()=>p.abort(),o),f.signal=p.signal),Vn.fetch(t,f).then(m=>m.text()).then(m=>this.parseJSON(m)).then(m=>u&&u(m)).catch(m=>{m.name==="AbortError"&&c?c():u&&u(null)}),p}static xdomainRequest(e,t,r,a,o,c,u){return e.timeout=o,e.open(t,r),e.onload=()=>{let f=this.parseJSON(e.responseText);u&&u(f)},c&&(e.ontimeout=c),e.onprogress=()=>{},e.send(a),e}static xhrRequest(e,t,r,a,o,c,u,f){e.open(t,r,!0),e.timeout=c;for(let[p,m]of Object.entries(a))e.setRequestHeader(p,m);return e.onerror=()=>f&&f(null),e.onreadystatechange=()=>{if(e.readyState===jA.complete&&f){let p=this.parseJSON(e.responseText);f(p)}},u&&(e.ontimeout=u),e.send(o),e}static parseJSON(e){if(!e||e==="")return null;try{return JSON.parse(e)}catch{return console&&console.log("failed to parse JSON response",e),null}}static serialize(e,t){let r=[];for(var a in e){if(!Object.prototype.hasOwnProperty.call(e,a))continue;let o=t?`${t}[${a}]`:a,c=e[a];typeof c=="object"?r.push(this.serialize(c,o)):r.push(encodeURIComponent(o)+"="+encodeURIComponent(c))}return r.join("&")}static appendParams(e,t){if(Object.keys(t).length===0)return e;let r=e.match(/\?/)?"&":"?";return`${e}${r}${this.serialize(t)}`}},NA=e=>{let t="",r=new Uint8Array(e),a=r.byteLength;for(let o=0;o<a;o++)t+=String.fromCharCode(r[o]);return btoa(t)},Ia=class{constructor(e,t){t&&t.length===2&&t[1].startsWith(Vf)&&(this.authToken=atob(t[1].slice(Vf.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(e),this.readyState=Yn.connecting,setTimeout(()=>this.poll(),0)}normalizeEndpoint(e){return e.replace("ws://","http://").replace("wss://","https://").replace(new RegExp("(.*)/"+Gf.websocket),"$1/"+Gf.longpoll)}endpointURL(){return _c.appendParams(this.pollEndpoint,{token:this.token})}closeAndRetry(e,t,r){this.close(e,t,r),this.readyState=Yn.connecting}ontimeout(){this.onerror("timeout"),this.closeAndRetry(1005,"timeout",!1)}isActive(){return this.readyState===Yn.open||this.readyState===Yn.connecting}poll(){const e={Accept:"application/json"};this.authToken&&(e["X-Phoenix-AuthToken"]=this.authToken),this.ajax("GET",e,null,()=>this.ontimeout(),t=>{if(t){var{status:r,token:a,messages:o}=t;if(r===410&&this.token!==null){this.onerror(410),this.closeAndRetry(3410,"session_gone",!1);return}this.token=a}else r=0;switch(r){case 200:o.forEach(c=>{setTimeout(()=>this.onmessage({data:c}),0)}),this.poll();break;case 204:this.poll();break;case 410:this.readyState=Yn.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 ${r}`)}})}send(e){typeof e!="string"&&(e=NA(e)),this.currentBatch?this.currentBatch.push(e):this.awaitingBatchAck?this.batchBuffer.push(e):(this.currentBatch=[e],this.currentBatchTimer=setTimeout(()=>{this.batchSend(this.currentBatch),this.currentBatch=null},0))}batchSend(e){this.awaitingBatchAck=!0,this.ajax("POST",{"Content-Type":"application/x-ndjson"},e.join(` 20`),()=>this.onerror("timeout"),t=>{this.awaitingBatchAck=!1,!t||t.status!==200?(this.onerror(t&&t.status),this.closeAndRetry(1011,"internal server error",!1)):this.batchBuffer.length>0&&(this.batchSend(this.batchBuffer),this.batchBuffer=[])})}close(e,t,r){for(let o of this.reqs)o.abort();this.readyState=Yn.closed;let a=Object.assign({code:1e3,reason:void 0,wasClean:!0},{code:e,reason:t,wasClean:r});this.batchBuffer=[],clearTimeout(this.currentBatchTimer),this.currentBatchTimer=null,typeof CloseEvent<"u"?this.onclose(new CloseEvent("close",a)):this.onclose(a)}ajax(e,t,r,a,o){let c,u=()=>{this.reqs.delete(c),a()};c=_c.request(e,this.endpointURL(),t,r,this.timeout,u,f=>{this.reqs.delete(c),this.isActive()&&o(f)}),this.reqs.add(c)}},DA=class ao{constructor(t,r={}){let a=r.events||{state:"presence_state",diff:"presence_diff"};this.state={},this.pendingDiffs=[],this.channel=t,this.joinRef=null,this.caller={onJoin:function(){},onLeave:function(){},onSync:function(){}},this.channel.on(a.state,o=>{let{onJoin:c,onLeave:u,onSync:f}=this.caller;this.joinRef=this.channel.joinRef(),this.state=ao.syncState(this.state,o,c,u),this.pendingDiffs.forEach(p=>{this.state=ao.syncDiff(this.state,p,c,u)}),this.pendingDiffs=[],f()}),this.channel.on(a.diff,o=>{let{onJoin:c,onLeave:u,onSync:f}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(o):(this.state=ao.syncDiff(this.state,o,c,u),f())})}onJoin(t){this.caller.onJoin=t}onLeave(t){this.caller.onLeave=t}onSync(t){this.caller.onSync=t}list(t){return ao.list(this.state,t)}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel.joinRef()}static syncState(t,r,a,o){let c=this.clone(t),u={},f={};return this.map(c,(p,m)=>{r[p]||(f[p]=m)}),this.map(r,(p,m)=>{let y=c[p];if(y){let g=m.metas.map(x=>x.phx_ref),b=y.metas.map(x=>x.phx_ref),w=m.metas.filter(x=>b.indexOf(x.phx_ref)<0),_=y.metas.filter(x=>g.indexOf(x.phx_ref)<0);w.length>0&&(u[p]=m,u[p].metas=w),_.length>0&&(f[p]=this.clone(y),f[p].metas=_)}else u[p]=m}),this.syncDiff(c,{joins:u,leaves:f},a,o)}static syncDiff(t,r,a,o){let{joins:c,leaves:u}=this.clone(r);return a||(a=function(){}),o||(o=function(){}),this.map(c,(f,p)=>{let m=t[f];if(t[f]=this.clone(p),m){let y=t[f].metas.map(b=>b.phx_ref),g=m.metas.filter(b=>y.indexOf(b.phx_ref)<0);t[f].metas.unshift(...g)}a(f,m,p)}),this.map(u,(f,p)=>{let m=t[f];if(!m)return;let y=p.metas.map(g=>g.phx_ref);m.metas=m.metas.filter(g=>y.indexOf(g.phx_ref)<0),o(f,m,p),m.metas.length===0&&delete t[f]}),t}static list(t,r){return r||(r=function(a,o){return o}),this.map(t,(a,o)=>r(a,o))}static map(t,r){return Object.getOwnPropertyNames(t).map(a=>r(a,t[a]))}static clone(t){return JSON.parse(JSON.stringify(t))}},Zl={HEADER_LENGTH:1,META_LENGTH:4,KINDS:{push:0,reply:1,broadcast:2},encode(e,t){if(e.payload.constructor===ArrayBuffer)return t(this.binaryEncode(e));{let r=[e.join_ref,e.ref,e.topic,e.event,e.payload];return t(JSON.stringify(r))}},decode(e,t){if(e.constructor===ArrayBuffer)return t(this.binaryDecode(e));{let[r,a,o,c,u]=JSON.parse(e);return t({join_ref:r,ref:a,topic:o,event:c,payload:u})}},binaryEncode(e){let{join_ref:t,ref:r,event:a,topic:o,payload:c}=e,u=this.META_LENGTH+t.length+r.length+o.length+a.length,f=new ArrayBuffer(this.HEADER_LENGTH+u),p=new DataView(f),m=0;p.setUint8(m++,this.KINDS.push),p.setUint8(m++,t.length),p.setUint8(m++,r.length),p.setUint8(m++,o.length),p.setUint8(m++,a.length),Array.from(t,g=>p.setUint8(m++,g.charCodeAt(0))),Array.from(r,g=>p.setUint8(m++,g.charCodeAt(0))),Array.from(o,g=>p.setUint8(m++,g.charCodeAt(0))),Array.from(a,g=>p.setUint8(m++,g.charCodeAt(0)));var y=new Uint8Array(f.byteLength+c.byteLength);return y.set(new Uint8Array(f),0),y.set(new Uint8Array(c),f.byteLength),y.buffer},binaryDecode(e){let t=new DataView(e),r=t.getUint8(0),a=new TextDecoder;switch(r){case this.KINDS.push:return this.decodePush(e,t,a);case this.KINDS.reply:return this.decodeReply(e,t,a);case this.KINDS.broadcast:return this.decodeBroadcast(e,t,a)}},decodePush(e,t,r){let a=t.getUint8(1),o=t.getUint8(2),c=t.getUint8(3),u=this.HEADER_LENGTH+this.META_LENGTH-1,f=r.decode(e.slice(u,u+a));u=u+a;let p=r.decode(e.slice(u,u+o));u=u+o;let m=r.decode(e.slice(u,u+c));u=u+c;let y=e.slice(u,e.byteLength);return{join_ref:f,ref:null,topic:p,event:m,payload:y}},decodeReply(e,t,r){let a=t.getUint8(1),o=t.getUint8(2),c=t.getUint8(3),u=t.getUint8(4),f=this.HEADER_LENGTH+this.META_LENGTH,p=r.decode(e.slice(f,f+a));f=f+a;let m=r.decode(e.slice(f,f+o));f=f+o;let y=r.decode(e.slice(f,f+c));f=f+c;let g=r.decode(e.slice(f,f+u));f=f+u;let b=e.slice(f,e.byteLength),w={status:g,response:b};return{join_ref:p,ref:m,topic:y,event:wr.reply,payload:w}},decodeBroadcast(e,t,r){let a=t.getUint8(1),o=t.getUint8(2),c=this.HEADER_LENGTH+2,u=r.decode(e.slice(c,c+a));c=c+a;
20let f=r.decode(e.slice(c,c+o));c=c+o;let p=e.slice(c,e.byteLength);return{join_ref:null,ref:null,topic:u,event:f,payload:p}}},LA=class{constructor(e,t={}){this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.channels=[],this.sendBuffer=[],this.ref=0,this.fallbackRef=null,this.timeout=t.timeout||CA,this.transport=t.transport||Vn.WebSocket||Ia,this.conn=void 0,this.primaryPassedHealthCheck=!1,this.longPollFallbackMs=t.longPollFallbackMs,this.fallbackTimer=null;let r=null;try{r=Vn&&Vn.sessionStorage}catch{}this.sessionStore=t.sessionStorage||r,this.establishedConnections=0,this.defaultEncoder=Zl.encode.bind(Zl),this.defaultDecoder=Zl.decode.bind(Zl),this.closeWasClean=!0,this.disconnecting=!1,this.binaryType=t.binaryType||"arraybuffer",this.connectClock=1,this.pageHidden=!1,this.encode=void 0,this.decode=void 0,this.transport!==Ia?(this.encode=t.encode||this.defaultEncoder,this.decode=t.decode||this.defaultDecoder):(this.encode=this.defaultEncoder,this.decode=this.defaultDecoder);let a=null;Ya&&Ya.addEventListener&&(Ya.addEventListener("pagehide",o=>{this.conn&&(this.disconnect(),a=this.connectClock)}),Ya.addEventListener("pageshow",o=>{a===this.connectClock&&(a=null,this.connect())}),Ya.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"?this.pageHidden=!0:(this.pageHidden=!1,!this.isConnected()&&!this.closeWasClean&&this.teardown(()=>this.connect()))})),this.heartbeatIntervalMs=t.heartbeatIntervalMs||3e4,this.autoSendHeartbeat=t.autoSendHeartbeat??!0,this.heartbeatCallback=t.heartbeatCallback??(()=>{}),this.rejoinAfterMs=o=>t.rejoinAfterMs?t.rejoinAfterMs(o):[1e3,2e3,5e3][o-1]||1e4,this.reconnectAfterMs=o=>t.reconnectAfterMs?t.reconnectAfterMs(o):[10,50,100,150,200,250,500,1e3,2e3][o-1]||5e3,this.logger=t.logger||null,!this.logger&&t.debug&&(this.logger=(o,c,u)=>{console.log(`${o}: ${c}`,u)}),this.longpollerTimeout=t.longpollerTimeout||2e4,this.params=lo(t.params||{}),this.endPoint=`${e}/${Gf.websocket}`,this.vsn=t.vsn||OA,this.heartbeatTimeoutTimer=null,this.heartbeatTimer=null,this.heartbeatSentAt=null,this.pendingHeartbeatRef=null,this.reconnectTimer=new C0(()=>{if(this.pageHidden){this.log("Not reconnecting as page is hidden!"),this.teardown();return}this.teardown(async()=>{t.beforeReconnect&&await t.beforeReconnect(),this.connect()})},this.reconnectAfterMs),this.authToken=t.authToken}getLongPollTransport(){return Ia}replaceTransport(e){this.connectClock++,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.conn&&(this.conn.close(),this.conn=null),this.transport=e}protocol(){return location.protocol.match(/^https/)?"wss":"ws"}endPointURL(){let e=_c.appendParams(_c.appendParams(this.endPoint,this.params()),{vsn:this.vsn});return e.charAt(0)!=="/"?e:e.charAt(1)==="/"?`${this.protocol()}:${e}`:`${this.protocol()}://${location.host}${e}`}disconnect(e,t,r){this.connectClock++,this.disconnecting=!0,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.teardown(()=>{this.disconnecting=!1,e&&e()},t,r)}connect(e){e&&(console&&console.log("passing params to connect is deprecated. Instead pass :params to the Socket constructor"),this.params=lo(e)),!(this.conn&&!this.disconnecting)&&(this.longPollFallbackMs&&this.transport!==Ia?this.connectWithF
vendor: 4,353 bytes, line 20
20allback(Ia,this.longPollFallbackMs):this.transportConnect())}log(e,t,r){this.logger&&this.logger(e,t,r)}hasLogger(){return this.logger!==null}onOpen(e){let t=this.makeRef();return this.stateChangeCallbacks.open.push([t,e]),t}onClose(e){let t=this.makeRef();return this.stateChangeCallbacks.close.push([t,e]),t}onError(e){let t=this.makeRef();return this.stateChangeCallbacks.error.push([t,e]),t}onMessage(e){let t=this.makeRef();return this.stateChangeCallbacks.message.push([t,e]),t}onHeartbeat(e){this.heartbeatCallback=e}ping(e){if(!this.isConnected())return!1;let t=this.makeRef(),r=Date.now();this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:t});let a=this.onMessage(o=>{o.ref===t&&(this.off([a]),e(Date.now()-r))});return!0}transportName(e){return e===Ia?"LongPoll":e.name}transportConnect(){this.connectClock++,this.closeWasClean=!1;let e;this.authToken&&(e=["phoenix",`${Vf}${btoa(this.authToken).replace(/=/g,"")}`]),this.conn=new this.transport(this.endPointURL(),e),this.conn.binaryType=this.binaryType,this.conn.timeout=this.longpollerTimeout,this.conn.onopen=()=>this.onConnOpen(),this.conn.onerror=t=>this.onConnError(t),this.conn.onmessage=t=>this.onConnMessage(t),this.conn.onclose=t=>this.onConnClose(t)}getSession(e){return this.sessionStore&&this.sessionStore.getItem(e)}storeSession(e,t){this.sessionStore&&this.sessionStore.setItem(e,t)}connectWithFallback(e,t=2500){clearTimeout(this.fallbackTimer);let r=!1,a=!0,o,c,u=this.transportName(e),f=p=>{this.log("transport",`falling back to ${u}...`,p),this.off([o,c]),a=!1,this.replaceTransport(e),this.transportConnect()};if(this.getSession(`phx:fallback:${u}`))return f("memorized");this.fallbackTimer=setTimeout(f,t),c=this.onError(p=>{this.log("transport","error",p),a&&!r&&(clearTimeout(this.fallbackTimer),f(p))}),this.fallbackRef&&this.off([this.fallbackRef]),this.fallbackRef=this.onOpen(()=>{if(r=!0,!a){let p=this.transportName(e);return this.primaryPassedHealthCheck||this.storeSession(`phx:fallback:${p}`,"true"),this.log("transport",`established ${p} fallback`)}clearTimeout(this.fallbackTimer),this.fallbackTimer=setTimeout(f,t),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(e){this.log("error","error in heartbeat callback",e)}this.triggerChanError(new Error("heartbeat timeout")),this.closeWasClean=!1,this.teardown(()=>this.reconnectTimer.scheduleTimeout(),kA,"heartbeat timeout")}}resetHeartbeat(){this.conn&&this.conn.skipHeartbeat||(this.pendingHeartbeatRef=null,this.clearHeartbeats(),this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}teardown(e,t,r){if(!this.conn)return e&&e();const a=this.conn;this.waitForBufferDone(a,()=>{t?a.close(t,r||""):a.close(),this.waitForSocketClosed(a,()=>{this.conn===a&&(this.conn.onopen=function(){},this.conn.onerror=function(){},this.conn.onmessage=function(){},this.conn.onclose=function(){},this.conn=null),e&&e()})})}waitForBufferDone(e,t,r=1){if(r===5||!e.bufferedAmount){t();return}setTimeout(()=>{this.waitForBufferDone(e,t,r+1)},150*r)}waitForSocketClosed(e,t,r=1){if(r===5||e.readyState===Yn.closed){t();return}setTimeout(()=>{this.waitForSocketClosed(e,t,r+1)},150*r)}onConnClose(e){this.conn&&(this.conn.onclose=()=>{}),this.hasLogger()&&this.log("transport","close",e),this.triggerChanError(e),this.clearHeartbeats(),this.closeWasClean||this.reconnectTimer.scheduleTimeout(),this.triggerStateCallbacks("close",e)}onConnError(e){this.hasLogger()&&this.log("transport","error",e);let t=this.transport,r=this.establishedConnections;this.triggerStateCallbacks("error",e,t,r),(t===this.transport||r>0)&&this.triggerChanError(e)}
20triggerChanError(e){this.channels.forEach(t=>{t.isErrored()||t.isLeaving()||t.isClosed()||t.trigger(wr.error,e)})}connectionState(){switch(this.conn&&this.conn.readyState){case Yn.connecting:return"connecting";case Yn.open:return"open";case Yn.closing:return"closing";default:return"closed"}}isConnected(){return this.connectionState()==="open"}remove(e){this.off(e.stateChangeRefs),this.channels=this.channels.filter(t=>t!==e)}off(e){for(let t in this.stateChangeCallbacks)this.stateChangeCallbacks[t]=this.stateChangeCallbacks[t].filter(([r])=>e.indexOf(r)===-1)}channel(e,t={}){let r=new MA(e,t,this);return this.channels.push(r),r}push(e){if(this.hasLogger()){let{topic:t,event:r,payload:a,ref:o,join_ref:c}=e;this.log("push",`${t} ${r} (${c}, ${o})`,a)}this.isConnected()?this.encode(e,t=>this.conn.send(t)):this.sendBuffer.push(()=>this.encode(e,t=>this.conn.send(t)))}makeRef(){let e=this.ref+1;return e===this.ref?this.ref=0:this.ref=e,this.ref.toString()}sendHeartbeat(){if(!this.isConnected()){try{this.heartbeatCallback("disconnected")}catch(e){this.log("error","error in heartbeat callback",e)}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(e){this.log("error","error in heartbeat callback",e)}this.heartbeatTimeoutTimer=setTimeout(()=>this.heartbeatTimeout(),this.heartbeatIntervalMs)}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(e=>e()),this.sendBuffer=[])}onConnMessage(e){this.decode(e.data,t=>{let{topic:r,event:a,payload:o,ref:c,join_ref:u}=t;if(c&&c===this.pendingHeartbeatRef){const f=this.heartbeatSentAt?Date.now()-this.heartbeatSentAt:void 0;this.clearHeartbeats();try{this.heartbeatCallback(o.status==="ok"?"ok":"error",f)}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",`${o.status||""} ${r} ${a} ${c&&"("+c+")"||""}`.trim(),o);for(let f=0;f<this.channels.length;f++){const p=this.channels[f];p.isMember(r,a,o,u)&&p.trigger(a,o,c,u)}this.triggerStateCallbacks("message",t)})}triggerStateCallbacks(e,...t){try{this.stateChangeCallbacks[e].forEach(([r,a])=>{try{a(...t)}catch(o){this.log("error",`error in ${e} callback`,o)}})}catch(r){this.log("error",`error triggering ${e} callbacks`,r)}}leaveOpenTopic(e){let t=this.channels.find(r=>r.topic===e&&(r.isJoined()||r.isJoining()));t&&(this.hasLogger()&&this.log("transport",`leaving duplicate topic "${e}"`),t.leave())}};class co{constructor(t,r){const a=zA(r);this.presence=new DA(t.getChannel(),a),this.presence.onJoin((o,c,u)=>{const f=co.onJoinPayload(o,c,u);t.getChannel().trigger("presence",f)}),this.presence.onLeave((o,c,u)=>{const f=co.onLeavePayload(o,c,u);t.getChannel().trigger("presence",f)}),this.presence.onSync(()=>{t.getChannel().trigger("presence",{event:"sync"})})}get state(){return co.transformState(this.presence.state)}static transformState(t){return t=UA(t),Object.getOwnPropertyNames(t).reduce((r,a)=>{const o=t[a];return r[a]=hc(o),r},{})}static onJoinPayload(t,r,a){const o=yv(r),c=hc(a);return{event:"join",key:t,currentPresences:o,newPresences:c}}static onLeavePayload(t,r,a){const o=yv(r),c=hc(a);return{event:"leave",key:t,currentPresences:o,leftPresences:c}}}function hc(e){return e.metas.map(t=>(t.presence_ref=t.phx_ref,delete t.phx_ref,delete t.phx_ref_prev,t))}function UA(e){return JSON.parse(JSON.stringify(e))}function zA(e){return e?.events&&{events:e.events}}function yv(e){return e?.metas?hc(e):[]}var vv;(function(e){e.SYNC="sync",e.JOIN="join",e.LEAVE="leave"})(vv||(vv={}));class PA{get state(){return this.presenceAdapter.state}constructor(t,r){this.channel=t,this.presenceAdapter=new co(this.channel.channelAdapter,r)}}function BA(e){if(e instanceof Error)return e;if(typeof e=="string")return new Error(e);
20if(e&&typeof e=="object"){const t=e;if(typeof t.code=="number"){const r=typeof t.reason=="string"&&t.reason?` (${t.reason})`:"";return new Error(`socket closed: ${t.code}${r}`,{cause:e})}return new Error("channel error: transport failure",{cause:e})}return new Error("channel error: connection lost")}class IA{constructor(t,r,a){const o=HA(a);this.channel=t.getSocket().channel(r,o),this.socket=t}get state(){return this.channel.state}set state(t){this.channel.state=t}get joinedOnce(){return this.channel.joinedOnce}get joinPush(){return this.channel.joinPush}get rejoinTimer(){return this.channel.rejoinTimer}on(t,r){return this.channel.on(t,r)}off(t,r){this.channel.off(t,r)}subscribe(t){return this.channel.join(t)}unsubscribe(t){return this.channel.leave(t)}teardown(){this.channel.teardown()}onClose(t){this.channel.onClose(t)}onError(t){return this.channel.onError(t)}push(t,r,a){let o;try{o=this.channel.push(t,r,a)}catch{throw new Error(`tried to push '${t}' to '${this.channel.topic}' before joining. Use channel.subscribe() before pushing events`)}if(this.channel.pushBuffer.length>bA){const c=this.channel.pushBuffer.shift();c.cancelTimeout(),this.socket.log("channel",`discarded push due to buffer overflow: ${c.event}`,c.payload())}return o}updateJoinPayload(t){const r=this.channel.joinPush.payload();this.channel.joinPush.payload=()=>Object.assign(Object.assign({},r),t)}canPush(){return this.socket.isConnected()&&this.state===ns.joined}isJoined(){return this.state===ns.joined}isJoining(){return this.state===ns.joining}isClosed(){return this.state===ns.closed}isLeaving(){return this.state===ns.leaving}updateFilterBindings(t){this.channel.filterBindings=t}updatePayloadTransform(t){this.channel.onMessage=t}getChannel(){return this.channel}}function HA(e){return{config:Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},e.config)}}var bv;(function(e){e.ALL="*",e.INSERT="INSERT",e.UPDATE="UPDATE",e.DELETE="DELETE"})(bv||(bv={}));var Qa;(function(e){e.BROADCAST="broadcast",e.PRESENCE="presence",e.POSTGRES_CHANGES="postgres_changes",e.SYSTEM="system"})(Qa||(Qa={}));var _r;(function(e){e.SUBSCRIBED="SUBSCRIBED",e.TIMED_OUT="TIMED_OUT",e.CLOSED="CLOSED",e.CHANNEL_ERROR="CHANNEL_ERROR"})(_r||(_r={}));class uo{get state(){return this.channelAdapter.state}set state(t){this.channelAdapter.state=t}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(t,r={config:{}},a){var o,c;if(this.topic=t,this.params=r,this.socket=a,this.bindings={},this.subTopic=t.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},r.config),this.channelAdapter=new IA(this.socket.socketAdapter,t,this.params),this.presence=new PA(this),this._onClose(()=>{this.socket._remove(this)}),this._updateFilterTransform(),this.broadcastEndpointURL=O0(this.socket.socketAdapter.endPointURL()),this.private=this.params.config.private||!1,!this.private&&(!((c=(o=this.params.config)===null||o===void 0?void 0:o.broadcast)===null||c===void 0)&&c.replay))throw new Error(`tried to use replay on public channel '${this.topic}'. It must be a private channel.`)}subscribe(t,r=this.timeout){var a,o,c;if(this.socket.isConnected()||this.socket.connect(),this.channelAdapter.isClosed()){const{config:{broadcast:u,presence:f,private:p}}=this.params,m=(o=(a=this.bindings.postgres_changes)===null||a===void 0?void 0:a.map(w=>w.filter))!==null&&o!==void 0?o:[],y=!!this.bindings[Qa.PRESENCE]&&this.bindings[Qa.PRESENCE].length>0||((c=this.params.config.presence)===null||c===void 0?void 0:c.enabled)===!0,g={},b={broadcast:u,presence:Object.assign(Object.assign({},f),{enabled:y}),postgres_changes:m,private:p};this.socket.accessTokenValue&&(g.access_token=this.socket.accessTokenValue),this._onError(w=>{t?.(_r.CHANNEL_ERROR,BA(w))}),this._onClose(()=>t?.(_r.CLOSED)),this.updateJoinPayload(Object.assign({config:b},g)),this._updateFilterMessage(),this.channelAdapter.subscribe(r).receive("ok",async({postgres_changes:w})=>{if(this.socket._isManualToken()||this.socket.setAuth(),w===void 0){t?.(_r.SUBSCRIBED);return}this._updatePostgresBindings(w,t)}).receive("error",w=>{this.state=ns.errored;const _=Object.values(w).join(", ")||"error";t?.(_r.CHANNEL_ERROR,new Error(_,{cause:w}))}).receive("timeout",()=>{t?.(_r.TIMED_OUT)})}return this}_updatePostgresBindings(t,r){var a;const o=this.bindings.postgres_changes,c=(a=o?.length)!==null&&a!==void 0?a:0,u=[];for(let f=0;f<c;f++){const p=o[f],{filter:{event:m,schema:y,table:g,filter:b}}=p,w=t&&t[f];if(w&&w.event===m&&uo.isFilterValueEqual(w.schema,y)&&uo.isFilterValueEqual(w.table,g)&&uo.isFilterValueEqual(w.filter,b))u.push(Object.assign(Object.assign({},p),{id:w.id}));else{this.unsubscribe(),this.state=ns.errored,r?.(_r.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=u,this.state!=ns.errored&&r&&r(_r.SUBSCRIBED)}presenceState(){return this.presence.state}async track(t,r={}){return await this.send({type:"presence",event:"track",payload:t},r.timeout||this.timeout)}async untrack(t={}){return await this.send({type:"presence",event:"untrack"},t)}on(t,r,a){const o=this.channelAdapter.isJoined()||this.channelAdapter.isJoining(),c=t===Qa.PRESENCE||t===Qa.POSTGRES_CHANGES;if(o&&c)throw this.socket.log("channel",`cannot add \`${t}\` callbacks for ${this.topic} after \`subscribe()\`.`),new Error(`cannot add \`${t}\` callbacks for ${this.topic} after \`subscribe()\`.`);return this._on(t,r,a)}async httpSend(t,r,a={}){var o;if(r==null)return Promise.reject(new Error("Payload is required for httpSend()"));const c=r instanceof ArrayBuffer||ArrayBuffer.isView(r),u={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":c?"application/octet-stream":"application/json"};this.socket.accessTokenValue&&(u.Authorization=`Bearer ${this.socket.accessTokenValue}`);const f=new URL(this.broadcastEndpointURL);f.pathname+=`/${encodeURIComponent(this.subTopic)}/events/${encodeURIComponent(t)}`,this.private&&f.searchParams.set("private","true");const p={method:"POST",headers:u,body:c?r:JSON.stringify(r)},m=await this._fetchWithTimeout(f.toString(),p,(o=a.timeout)!==null&&o!==void 0?o:this.timeout);if(m.status===202)return{success:!0};let y=m.statusText;
20try{const g=await m.json();y=g.error||g.message||y}catch{}return Promise.reject(new Error(y))}async send(t,r={}){var a,o;if(!this.channelAdapter.canPush()&&t.type==="broadcast"){console.warn("Realtime send() is automatically falling back to REST API. This behavior will be deprecated in the future. Please use httpSend() explicitly for REST delivery.");const{event:c,payload:u}=t,f={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(f.Authorization=`Bearer ${this.socket.accessTokenValue}`);const p={method:"POST",headers:f,body:JSON.stringify({messages:[{topic:this.subTopic,event:c,payload:u,private:this.private}]})};try{const m=await this._fetchWithTimeout(this.broadcastEndpointURL,p,(a=r.timeout)!==null&&a!==void 0?a:this.timeout);return await((o=m.body)===null||o===void 0?void 0:o.cancel()),m.ok?"ok":"error"}catch(m){return m instanceof Error&&m.name==="AbortError"?"timed out":"error"}}else return new Promise(c=>{var u,f,p;const m=this.channelAdapter.push(t.type,t,r.timeout||this.timeout);t.type==="broadcast"&&!(!((p=(f=(u=this.params)===null||u===void 0?void 0:u.config)===null||f===void 0?void 0:f.broadcast)===null||p===void 0)&&p.ack)&&c("ok"),m.receive("ok",()=>c("ok")),m.receive("error",()=>c("error")),m.receive("timeout",()=>c("timed out"))})}updateJoinPayload(t){this.channelAdapter.updateJoinPayload(t)}async unsubscribe(t=this.timeout){return new Promise(r=>{this.channelAdapter.unsubscribe(t).receive("ok",()=>r("ok")).receive("timeout",()=>r("timed out")).receive("error",()=>r("error"))})}teardown(){this.channelAdapter.teardown()}async _fetchWithTimeout(t,r,a){const o=new AbortController,c=setTimeout(()=>o.abort(),a),u=await this.socket.fetch(t,Object.assign(Object.assign({},r),{signal:o.signal}));return clearTimeout(c),u}_on(t,r,a){const o=t.toLocaleLowerCase(),c=this.channelAdapter.on(t,a),u={type:o,filter:r,callback:a,ref:c};return this.bindings[o]?this.bindings[o].push(u):this.bindings[o]=[u],this._updateFilterMessage(),this}_onClose(t){this.channelAdapter.onClose(t)}_onError(t){this.channelAdapter.onError(t)}_updateFilterMessage(){this.channelAdapter.updateFilterBindings((t,r,a)=>{var o,c,u,f,p,m,y;const g=t.event.toLocaleLowerCase();if(this._notThisChannelEvent(g,a))return!1;const b=(o=this.bindings[g])===null||o===void 0?void 0:o.find(w=>w.ref===t.ref);if(!b)return!0;if(["broadcast","presence","postgres_changes"].includes(g))if("id"in b){const w=b.id,_=(c=b.filter)===null||c===void 0?void 0:c.event;return w&&((u=r.ids)===null||u===void 0?void 0:u.includes(w))&&(_==="*"||_?.toLocaleLowerCase()===((f=r.data)===null||f===void 0?void 0:f.type.toLocaleLowerCase()))}else{const w=(m=(p=b?.filter)===null||p===void 0?void 0:p.event)===null||m===void 0?void 0:m.toLocaleLowerCase();return w==="*"||w===((y=r?.event)===null||y===void 0?void 0:y.toLocaleLowerCase())}else return b.type.toLocaleLowerCase()===g})}_notThisChannelEvent(t,r){const{close:a,error:o,leave:c,join:u}=x0;return r&&[a,o,c,u].includes(t)&&r!==this.joinPush.ref}_updateFilterTransform(){this.channelAdapter.updatePayloadTransform((t,r,a)=>{if(typeof r=="object"&&"ids"in r){const o=r.data,{schema:c,table:u,commit_timestamp:f,type:p,errors:m}=o;return Object.assign(Object.assign({},{schema:c,table:u,commit_timestamp:f,eventType:p,new:{},old:{},errors:m}),this._getPayloadRecords(o))}return r})}copyBindings(t){if(this.joinedOnce)throw new Error("cannot copy bindings into joined channel");for(const r in t.bindings)for(const a of t.bindings[r])this._on(a.type,a.filter,a.callback)}static isFilterValueEqual(t,r){return(t??void 0)===(r??void 0)}_getPayloadRecords(t){const r={new:{},old:{}};return(t.type==="INSERT"||t.type==="UPDATE")&&(r.new=gv(t.columns,t.record)),(t.type==="UPDATE"||t.type==="DELETE")&&(r.old=gv(t.columns,t.old_record)),r}}class qA{constructor(t,r){this.socket=new LA(t,r)}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(t){this.socket.heartbeatCallback=t}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(t,r,a,o=1e4){return new Promise(c=>{setTimeout(()=>c("timeout"),o),this.socket.disconnect(()=>{t(),c("ok")},r,a)})}push(t){this.socket.push(t)}log(t,r,a){this.socket.log(t,r,a)}makeRef(){return this.socket.makeRef()}onOpen(t){this.socket.onOpen(t)}onClose(t){this.socket.onClose(t)}onError(t){this.socket.onError(t)}onMessage(t){this.socket.onMessage(t)}isConnected(){return this.socket.isConnected()}isConnecting(){return this.socket.connectionState()==qf.connecting}isDisconnecting(){return this.socket.connectionState()==qf.closing}connectionState(){return this.socket.connectionState()}endPointURL(){return this.socket.endPointURL()}sendHeartbeat(){this.socket.sendHeartbeat()}getSocket(){return this.socket}}const wv={HEARTBEAT_INTERVAL:25e3},$A=[1e3,2e3,5e3,1e4],GA=1e4;function VA(){const e=new Map;return{get length(){return e.size},clear(){e.clear()},getItem(t){return e.has(t)?e.get(t):null},key(t){var r;return(r=Array.from(e.keys())[t])!==null&&r!==void 0?r:null},removeItem(t){e.delete(t)},setItem(t,r){e.set(t,String(r))}}}function KA(){try{if(typeof globalThis<"u"&&globalThis.sessionStorage)return globalThis.sessionStorage}catch{}return VA()}const YA=` 21 addEventListener("message", (e) => { 22 if (e.data.event === "start") { 23 setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval); 24 } 25 });`;class FA{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(t,r){var a;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 wA,this._manuallySetToken=!1,this._authPromise=null,this._workerHeartbeatTimer=void 0,this._pendingWorkerHeartbeatRef=null,this._pendingDisconnectTimer=null,this._disconnectOnEmptyChannelsAfterMs=0,this._resolveFetch=c=>c?(...u)=>c(...u):(...u)=>fetch(...u),!(!((a=r?.params)===null||a===void 0)&&a.apikey))throw new Error("API key is required to connect to Realtime");this.apiKey=r.params.apikey;const o=this._initializeOptions(r);this.socketAdapter=new qA(t,o),this.httpEndpoint=O0(t),this.fetch=this._resolveFetch(r?.fetch)}connect(){if(!(this.isConnecting()||this.isDisconnecting()||this.isConnected())){this.accessToken&&!this._authPromise&&this._setAuthSafely("connect"),this._setupConnectionHandlers();try{this.socketAdapter.connect()}catch(t){const r=t.message;throw r.includes("Node.js")?new Error(`${r} 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: ${r}`)}this._handleNodeJsRaceCondition()}}endpointURL(){return this.socketAdapter.endPointURL()}async disconnect(t,r){return this._cancelPendingDisconnect(),this.isDisconnecting()?"ok":await this.socketAdapter.disconnect(()=>{clearInterval(this._workerHeartbeatTimer),this._terminateWorker()},t,r)}getChannels(){return this.channels}async removeChannel(t){const r=await t.unsubscribe();return r==="ok"&&t.teardown(),r}async removeAllChannels(){const t=this.channels.map(async a=>{const o=await a.unsubscribe();return a.teardown(),o}),r=await Promise.all(t);return await this.disconnect(),r}log(t,r,a){this.socketAdapter.log(t,r,a)}connectionState(){return this.socketAdapter.connectionState()||qf.closed}isConnected(){return this.socketAdapter.isConnected()}isConnecting(){return this.socketAdapter.isConnecting()}isDisconnecting(){return this.socketAdapter.isDisconnecting()}channel(t,r={config:{}}){const a=`realtime:${t}`,o=this.getChannels().find(c=>c.topic===a);if(o)return o;{const c=new uo(`realtime:${t}`,r,this);return this._cancelPendingDisconnect(),this.channels.push(c),c}}push(t){this.socketAdapter.push(t)}async setAuth(t=null){this._authPromise=this._performAuth(t);try{await this._authPromise}finally{this._authPromise=null}}_isManualToken(){return this._manuallySetToken}async sendHeartbeat(){this.socketAdapter.sendHeartbeat()}onHeartbeat(t){this.socketAdapter.heartbeatCallback=this._wrapHeartbeatCallback(t)}_makeRef(){return this.socketAdapter.makeRef()}_remove(t){this.channels=this.channels.filter(r=>r.topic!==t.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(t=null){let r,a=!1;if(t)r=t,a=!0;else if(this.accessToken)try{r=await this.accessToken()}catch(o){this.log("error","Error fetching access token from callback",o),r=this.accessTokenValue}else r=this.accessTokenValue;a?this._manuallySetToken=!0:this.accessToken&&(this._manuallySetToken=!1),this.accessTokenValue!=r&&(this.accessTokenValue=r,this.channels.forEach(o=>{const c={access_token:r,version:mA};r&&o.updateJoinPayload(c),o.joinedOnce&&o.channelAdapter.isJoined()&&o.channelAdapter.push(x0.access_token,{access_token:r})}))}async _waitForAuthIfNeeded(){this._authPromise&&await this._authPromise}_setAuthSafely(t="general"){this._isManualToken()||this.setAuth().catch(r=>{this.log("error",`Error setting auth in ${t}`,r)})}_setupConnectionHandlers(){this.socketAdapter.onOpen(()=>{(this._authPromise||(this.accessToken&&!this.accessTokenValue?this.setAuth():Promise.resolve())).catch(r=>{this.log("error","error waiting for auth on connect",r)}),this.worker&&!this.workerRef&&this._startWorkerHeartbeat()}),this.socketAdapter.onClose(()=>{this.worker&&this.workerRef&&this._terminateWorker()}),this.socketAdapter.onMessage(t=>{t.ref&&t.ref===this._pendingWorkerHeartbeatRef&&(this._pendingWorkerHeartbeatRef=null)})}_handleNodeJsRaceCondition(){this.socketAdapter.isConnected()&&this.socketAdapter.getSocket().onConnOpen()}_wrapHeartbeatCallback(t){return(r,a)=>{r=="sent"&&this._setAuthSafely(),t&&t(r,a)}}_startWorkerHeartbeat(){this.workerUrl?this.log("worker",`starting worker for from ${this.workerUrl}`):this.log("worker","starting default worker");const t=this._workerObjectUrl(this.workerUrl);this.workerRef=new Worker(t),this.workerRef.onerror=r=>{this.log("worker","worker error",r.message),this._terminateWorker(),this.disconnect()},this.workerRef.onmessage=r=>{r.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(t){let r;if(t)r=t;else{const a=new Blob([YA],{type:"application/javascript"});r=URL.createObjectURL(a)}return r}_initializeOptions(t){var r,a,o,c,u,f,p,m,y,g,b,w;this.worker=(r=t?.worker)!==null&&r!==void 0?r:!1,this.accessToken=(a=t?.accessToken)!==null&&a!==void 0?a:null;const _={};_.timeout=(o=t?.timeout)!==null&&o!==void 0?o:vA,_.heartbeatIntervalMs=(c=t?.heartbeatIntervalMs)!==null&&c!==void 0?c:wv.HEARTBEAT_INTERVAL,this._disconnectOnEmptyChannelsAfterMs=(u=t?.disconnectOnEmptyChannelsAfterMs)!==null&&u!==void 0?u:2*((f=t?.heartbeatIntervalMs)!==null&&f!==void 0?f:wv.HEARTBEAT_INTERVAL),_.transport=(p=t?.transport)!==null&&p!==void 0?p:hA.getWebSocketConstructor(),_.params=t?.params,_.logger=t?.logger,_.heartbeatCallback=this._wrapHeartbeatCallback(t?.heartbeatCallback),_.sessionStorage=(m=t?.sessionStorage)!==null&&m!==void 0?m:KA(),_.reconnectAfterMs=(y=t?.reconnectAfterMs)!==null&&y!==void 0?y:(M=>$A[M-1]||GA);let x,E;const R=(g=t?.vsn)!==null&&g!==void 0?g:yA;switch(R){case gA:x=(M,j)=>j(JSON.stringify(M)),E=(M,j)=>j(JSON.parse(M));break;case R0:x=this.serializer.encode.bind(this.serializer),E=this.serializer.decode.bind(this.serializer);break;default:throw new Error(`Unsupported serializer version: ${_.vsn}`)}if(_.vsn=R,_.encode=(b=t?.encode)!==null&&b!==void 0?b:x,_.decode=(w=t?.decode)!==null&&w!==void 0?w:E,_.beforeReconnect=this._reconnectAuth.bind(this),(t?.logLevel||t?.log_level)&&(this.logLevel=t.logLevel||t.log_level,_.params=Object.assign(Object.assign({},_.params),{log_level:this.logLevel})),this.worker){if(typeof window<"u"&&!window.Worker)throw new Error("Web Worker is not supported");this.workerUrl=t?.workerUrl,_.autoSendHeartbeat=!this.worker}return _}async _reconnectAuth(){await this._waitForAuthIfNeeded(),this.isConnected()||this.connect()}}
38var vo=class extends Error{constructor(e,t){super(e),this.name="IcebergError",this.status=t.status,this.icebergType=t.icebergType,this.icebergCode=t.icebergCode,this.details=t.details,this.isCommitStateUnknown=t.icebergType==="CommitStateUnknownException"||[500,502,504].includes(t.status)&&t.icebergType?.includes("CommitState")===!0}isNotFound(){return this.status===404}isConflict(){return this.status===409}isAuthenticationTimeout(){return this.status===419}};function JA(e,t,r){const a=new URL(t,e);if(r)for(const[o,c]of Object.entries(r))c!==void 0&&a.searchParams.set(o,c);return a.toString()}async function QA(e){return!e||e.type==="none"?{}:e.type==="bearer"?{Authorization:`Bearer ${e.token}`}:e.type==="header"?{[e.name]:e.value}:e.type==="custom"?await e.getHeaders():{}}function XA(e){const t=e.fetchImpl??globalThis.fetch;return{async request({method:r,path:a,query:o,body:c,headers:u}){const f=JA(e.baseUrl,a,o),p=await QA(e.auth),m=await t(f,{method:r,headers:{...c?{"Content-Type":"application/json"}:{},...p,...u},body:c?JSON.stringify(c):void 0}),y=await m.text(),g=(m.headers.get("content-type")||"").includes("application/json"),b=g&&y?JSON.parse(y):y;if(!m.ok){const w=g?b:void 0,_=w?.error;throw new vo(_?.message??`Request failed with status ${m.status}`,{status:m.status,icebergType:_?.type,icebergCode:_?.code,details:w})}return{status:m.status,headers:m.headers,data:b}}}}function Wl(e){return e.join("�")}var ZA=class{constructor(e,t=""){this.client=e,this.prefix=t}async listNamespaces(e){const t=e?{parent:Wl(e.namespace)}:void 0;return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces`,query:t})).data.namespaces.map(a=>({namespace:a}))}async createNamespace(e,t){const r={namespace:e.namespace,properties:t?.properties};return(await this.client.request({method:"POST",path:`${this.prefix}/namespaces`,body:r})).data}async dropNamespace(e){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${Wl(e.namespace)}`})}async loadNamespaceMetadata(e){return{properties:(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${Wl(e.namespace)}`})).data.properties}}async namespaceExists(e){try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${Wl(e.namespace)}`}),!0}catch(t){if(t instanceof vo&&t.status===404)return!1;throw t}}async createNamespaceIfNotExists(e,t){try{return await this.createNamespace(e,t)}catch(r){if(r instanceof vo&&r.status===409)return;throw r}}};function Ha(e){return e.join("�")}var WA=class{constructor(e,t="",r){this.client=e,this.prefix=t,this.accessDelegation=r}async listTables(e){return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${Ha(e.namespace)}/tables`})).data.identifiers}async createTable(e,t){const r={};return this.accessDelegation&&(r["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${Ha(e.namespace)}/tables`,body:t,headers:r})).data.metadata}async updateTable(e,t){const r=await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${Ha(e.namespace)}/tables/${e.name}`,body:t});return{"metadata-location":r.data["metadata-location"],metadata:r.data.metadata}}async dropTable(e,t){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${Ha(e.namespace)}/tables/${e.name}`,query:{purgeRequested:String(t?.purge??!1)}})}async loadTable(e){const t={};return this.accessDelegation&&(t["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${Ha(e.namespace)}/tables/${e.name}`,headers:t})).data.metadata}async tableExists(e){const t={};this.accessDelegation&&(t["X-Iceberg-Access-Delegation"]=this.accessDelegation);try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${Ha(e.namespace)}/tables/${e.name}`,headers:t}),!0}catch(r){if(r instanceof vo&&r.status===404)return!1;throw r}}async createTableIfNotExists(e,t){try{return await this.createTable(e,t)}catch(r){if(r instanceof vo&&r.status===409)return await this.loadTable({namespace:e.namespace,name:t.name});throw r}}},eO=class{constructor(e){let t="v1";e.catalogName&&(t+=`/${e.catalogName}`);const r=e.baseUrl.endsWith("/")?e.baseUrl:`${e.baseUrl}/`;this.client=XA({baseUrl:r,auth:e.auth,fetchImpl:e.fetch}),this.accessDelegation=e.accessDelegation?.join(","),this.namespaceOps=new ZA(this.client,t),this.tableOps=new WA(this.client,t,this.accessDelegation)}async listNamespaces(e){return this.namespaceOps.listNamespaces(e)}async createNamespace(e,t){return this.namespaceOps.createNamespace(e,t)}async dropNamespace(e){await this.namespaceOps.dropNamespace(e)}async loadNamespaceMetadata(e){return this.namespaceOps.loadNamespaceMetadata(e)}async listTables(e){return this.tableOps.listTables(e)}
38async createTable(e,t){return this.tableOps.createTable(e,t)}async updateTable(e,t){return this.tableOps.updateTable(e,t)}async dropTable(e,t){await this.tableOps.dropTable(e,t)}async loadTable(e){return this.tableOps.loadTable(e)}async namespaceExists(e){return this.namespaceOps.namespaceExists(e)}async tableExists(e){return this.tableOps.tableExists(e)}async createNamespaceIfNotExists(e,t){return this.namespaceOps.createNamespaceIfNotExists(e,t)}async createTableIfNotExists(e,t){return this.tableOps.createTableIfNotExists(e,t)}};function bo(e){"@babel/helpers - typeof";return bo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},bo(e)}function tO(e,t){if(bo(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var a=r.call(e,t);if(bo(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function nO(e){var t=tO(e,"string");return bo(t)=="symbol"?t:t+""}function rO(e,t,r){return(t=nO(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _v(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,a)}return r}function ge(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?_v(Object(r),!0).forEach(function(a){rO(e,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_v(Object(r)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(r,a))})}return e}var qc=class extends Error{constructor(e,t="storage",r,a){super(e),this.__isStorageError=!0,this.namespace=t,this.name=t==="vectors"?"StorageVectorsError":"StorageError",this.status=r,this.statusCode=a}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}};function $c(e){return typeof e=="object"&&e!==null&&"__isStorageError"in e}var Kf=class extends qc{constructor(e,t,r,a="storage"){super(e,a,t,r),this.name=a==="vectors"?"StorageVectorsApiError":"StorageApiError",this.status=t,this.statusCode=r}toJSON(){return ge({},super.toJSON())}},k0=class extends qc{constructor(e,t,r="storage"){super(e,r),this.name=r==="vectors"?"StorageVectorsUnknownError":"StorageUnknownError",this.originalError=t}};function Sc(e,t,r){const a=ge({},e),o=t.toLowerCase();for(const c of Object.keys(a))c.toLowerCase()===o&&delete a[c];return a[o]=r,a}function sO(e){const t={};for(const[r,a]of Object.entries(e))t[r.toLowerCase()]=a;return t}const aO=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),iO=e=>{if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},Yf=e=>{if(Array.isArray(e))return e.map(r=>Yf(r));if(typeof e=="function"||e!==Object(e))return e;const t={};return Object.entries(e).forEach(([r,a])=>{const o=r.replace(/([-_][a-z])/gi,c=>c.toUpperCase().replace(/[-_]/g,""));t[o]=Yf(a)}),t},oO=e=>!e||typeof e!="string"||e.length===0||e.length>100||e.trim()!==e||e.includes("/")||e.includes("\\")?!1:/^[\w!.\*'() &$@=;:+,?-]+$/.test(e),Sv=e=>{if(typeof e=="object"&&e!==null){const t=e;if(typeof t.msg=="string")return t.msg;if(typeof t.message=="string")return t.message;if(typeof t.error_description=="string")return t.error_description;if(typeof t.error=="string")return t.error;if(typeof t.error=="object"&&t.error!==null){const r=t.error;if(typeof r.message=="string")return r.message}}return JSON.stringify(e)},lO=async(e,t,r,a)=>{if(e!==null&&typeof e=="object"&&"json"in e&&typeof e.json=="function"){const o=e;let c=parseInt(String(o.status),10);Number.isFinite(c)||(c=500),o.json().then(u=>{const f=u?.statusCode||u?.code||c+"";t(new Kf(Sv(u),c,f,a))}).catch(()=>{const u=c+"";t(new Kf(o.statusText||`HTTP ${c} error`,c,u,a))})}else t(new k0(Sv(e),e,a))},cO=(e,t,r,a)=>{const o={method:e,headers:t?.headers||{}};if(e==="GET"||e==="HEAD"||!a)return ge(ge({},o),r);if(iO(a)){var c;const u=t?.headers||{};let f;for(const[p,m]of Object.entries(u))p.toLowerCase()==="content-type"&&(f=m);o.headers=Sc(u,"Content-Type",(c=f)!==null&&c!==void 0?c:"application/json"),o.body=JSON.stringify(a)}else o.body=a;return t?.duplex&&(o.duplex=t.duplex),ge(ge({},o),r)};async function no(e,t,r,a,o,c,u){return new Promise((f,p)=>{e(r,cO(t,a,o,c)).then(m=>{if(!m.ok)throw m;if(a?.noResolveJson)return m;if(u==="vectors"){const y=m.headers.get("content-type");if(m.headers.get("content-length")==="0"||m.status===204)return{};if(!y||!y.includes("application/json"))return{}}return m.json()}).then(m=>f(m)).catch(m=>lO(m,p,a,u))})}function j0(e="storage"){return{get:async(t,r,a,o)=>no(t,"GET",r,a,o,void 0,e),post:async(t,r,a,o,c)=>no(t,"POST",r,o,c,a,e),put:async(t,r,a,o,c)=>no(t,"PUT",r,o,c,a,e),head:async(t,r,a,o)=>no(t,"HEAD",r,ge(ge({},a),{},{noResolveJson:!0}),o,void 0,e),remove:async(t,r,a,o,c)=>no(t,"DELETE",r,o,c,a,e)}}const uO=j0("storage"),{get:wo,post:Mn,put:Ff,head:dO,remove:gh}=uO,dn=j0("vectors");var ni=class{constructor(e,t={},r,a="storage"){this.shouldThrowOnError=!1,this.url=e,this.headers=sO(t),this.fetch=aO(r),this.namespace=a}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(e,t){return this.headers=Sc(this.headers,e,t),this}async handleOperation(e){var t=this;try{return{data:await e(),error:null}}catch(r){if(t.shouldThrowOnError)throw r;if($c(r))return{data:null,error:r};throw r}}};let M0;M0=Symbol.toStringTag;var fO=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t,this[M0]="StreamDownloadBuilder",this.promise=null}
38then(e,t){return this.getPromise().then(e,t)}catch(e){return this.getPromise().catch(e)}finally(e){return this.getPromise().finally(e)}getPromise(){return this.promise||(this.promise=this.execute()),this.promise}async execute(){var e=this;try{return{data:(await e.downloadFn()).body,error:null}}catch(t){if(e.shouldThrowOnError)throw t;if($c(t))return{data:null,error:t};throw t}}};let N0;N0=Symbol.toStringTag;var hO=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t,this[N0]="BlobDownloadBuilder",this.promise=null}asStream(){return new fO(this.downloadFn,this.shouldThrowOnError)}then(e,t){return this.getPromise().then(e,t)}catch(e){return this.getPromise().catch(e)}finally(e){return this.getPromise().finally(e)}getPromise(){return this.promise||(this.promise=this.execute()),this.promise}async execute(){var e=this;try{return{data:await(await e.downloadFn()).blob(),error:null}}catch(t){if(e.shouldThrowOnError)throw t;if($c(t))return{data:null,error:t};throw t}}};const pO={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},Ev={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};var mO=class extends ni{constructor(e,t={},r,a){super(e,t,a,"storage"),this.bucketId=r}async uploadOrUpdate(e,t,r,a){var o=this;return o.handleOperation(async()=>{let c;const u=ge(ge({},Ev),a);let f=ge(ge({},o.headers),e==="POST"&&{"x-upsert":String(u.upsert)});const p=u.metadata;if(typeof Blob<"u"&&r instanceof Blob?(c=new FormData,c.append("cacheControl",u.cacheControl),p&&c.append("metadata",o.encodeMetadata(p)),c.append("",r)):typeof FormData<"u"&&r instanceof FormData?(c=r,c.has("cacheControl")||c.append("cacheControl",u.cacheControl),p&&!c.has("metadata")&&c.append("metadata",o.encodeMetadata(p))):(c=r,f["cache-control"]=`max-age=${u.cacheControl}`,f["content-type"]=u.contentType,p&&(f["x-metadata"]=o.toBase64(o.encodeMetadata(p))),(typeof ReadableStream<"u"&&c instanceof ReadableStream||c&&typeof c=="object"&&"pipe"in c&&typeof c.pipe=="function")&&!u.duplex&&(u.duplex="half")),a?.headers)for(const[b,w]of Object.entries(a.headers))f=Sc(f,b,w);const m=o._removeEmptyFolders(t),y=o._getFinalPath(m),g=await(e=="PUT"?Ff:Mn)(o.fetch,`${o.url}/object/${y}`,c,ge({headers:f},u?.duplex?{duplex:u.duplex}:{}));return{path:m,id:g.Id,fullPath:g.Key}})}async upload(e,t,r){return this.uploadOrUpdate("POST",e,t,r)}async uploadToSignedUrl(e,t,r,a){var o=this;const c=o._removeEmptyFolders(e),u=o._getFinalPath(c),f=new URL(o.url+`/object/upload/sign/${u}`);return f.searchParams.set("token",t),o.handleOperation(async()=>{let p;const m=ge(ge({},Ev),a);let y=ge(ge({},o.headers),{"x-upsert":String(m.upsert)});const g=m.metadata;if(typeof Blob<"u"&&r instanceof Blob?(p=new FormData,p.append("cacheControl",m.cacheControl),g&&p.append("metadata",o.encodeMetadata(g)),p.append("",r)):typeof FormData<"u"&&r instanceof FormData?(p=r,p.has("cacheControl")||p.append("cacheControl",m.cacheControl),g&&!p.has("metadata")&&p.append("metadata",o.encodeMetadata(g))):(p=r,y["cache-control"]=`max-age=${m.cacheControl}`,y["content-type"]=m.contentType,g&&(y["x-metadata"]=o.toBase64(o.encodeMetadata(g))),(typeof ReadableStream<"u"&&p instanceof ReadableStream||p&&typeof p=="object"&&"pipe"in p&&typeof p.pipe=="function")&&!m.duplex&&(m.duplex="half")),a?.headers)for(const[b,w]of Object.entries(a.headers))y=Sc(y,b,w);return{path:c,fullPath:(await Ff(o.fetch,f.toString(),p,ge({headers:y},m?.duplex?{duplex:m.duplex}:{}))).Key}})}async createSignedUploadUrl(e,t){var r=this;return r.handleOperation(async()=>{let a=r._getFinalPath(e);const o=ge({},r.headers);t?.upsert&&(o["x-upsert"]="true");const c=await Mn(r.fetch,`${r.url}/object/upload/sign/${a}`,{},{headers:o}),u=new URL(r.url+c.url),f=u.searchParams.get("token");if(!f)throw new qc("No token returned by API");return{signedUrl:u.toString(),path:e,token:f}})}async update(e,t,r){return this.uploadOrUpdate("PUT",e,t,r)}async move(e,t,r){var a=this;return a.handleOperation(async()=>await Mn(a.fetch,`${a.url}/object/move`,{bucketId:a.bucketId,sourceKey:e,destinationKey:t,de
38stinationBucket:r?.destinationBucket},{headers:a.headers}))}async copy(e,t,r){var a=this;return a.handleOperation(async()=>({path:(await Mn(a.fetch,`${a.url}/object/copy`,{bucketId:a.bucketId,sourceKey:e,destinationKey:t,destinationBucket:r?.destinationBucket},{headers:a.headers})).Key}))}async createSignedUrl(e,t,r){var a=this;return a.handleOperation(async()=>{let o=a._getFinalPath(e);const c=typeof r?.transform=="object"&&r.transform!==null&&Object.keys(r.transform).length>0;let u=await Mn(a.fetch,`${a.url}/object/sign/${o}`,ge({expiresIn:t},c?{transform:r.transform}:{}),{headers:a.headers});const f=new URLSearchParams;r?.download&&f.set("download",r.download===!0?"":r.download),r?.cacheNonce!=null&&f.set("cacheNonce",String(r.cacheNonce));const p=f.toString();return{signedUrl:encodeURI(`${a.url}${u.signedURL}${p?`&${p}`:""}`)}})}async createSignedUrls(e,t,r){var a=this;return a.handleOperation(async()=>{const o=await Mn(a.fetch,`${a.url}/object/sign/${a.bucketId}`,{expiresIn:t,paths:e},{headers:a.headers}),c=new URLSearchParams;r?.download&&c.set("download",r.download===!0?"":r.download),r?.cacheNonce!=null&&c.set("cacheNonce",String(r.cacheNonce));const u=c.toString();return o.map(f=>ge(ge({},f),{},{signedUrl:f.signedURL?encodeURI(`${a.url}${f.signedURL}${u?`&${u}`:""}`):null}))})}download(e,t,r){const a=typeof t?.transform=="object"&&t.transform!==null&&Object.keys(t.transform).length>0?"render/image/authenticated":"object",o=new URLSearchParams;t?.transform&&this.applyTransformOptsToQuery(o,t.transform),t?.cacheNonce!=null&&o.set("cacheNonce",String(t.cacheNonce));const c=o.toString(),u=this._getFinalPath(e),f=()=>wo(this.fetch,`${this.url}/${a}/${u}${c?`?${c}`:""}`,{headers:this.headers,noResolveJson:!0},r);return new hO(f,this.shouldThrowOnError)}async info(e){var t=this;const r=t._getFinalPath(e);return t.handleOperation(async()=>Yf(await wo(t.fetch,`${t.url}/object/info/${r}`,{headers:t.headers})))}async exists(e){var t=this;const r=t._getFinalPath(e);try{return await dO(t.fetch,`${t.url}/object/${r}`,{headers:t.headers}),{data:!0,error:null}}catch(o){if(t.shouldThrowOnError)throw o;if($c(o)){var a;const c=o instanceof Kf?o.status:o instanceof k0?(a=o.originalError)===null||a===void 0?void 0:a.status:void 0;if(c!==void 0&&[400,404].includes(c))return{data:!1,error:o}}throw o}}getPublicUrl(e,t){const r=this._getFinalPath(e),a=new URLSearchParams;t?.download&&a.set("download",t.download===!0?"":t.download),t?.transform&&this.applyTransformOptsToQuery(a,t.transform),t?.cacheNonce!=null&&a.set("cacheNonce",String(t.cacheNonce));const o=a.toString(),c=typeof t?.transform=="object"&&t.transform!==null&&Object.keys(t.transform).length>0?"render/image":"object";return{data:{publicUrl:encodeURI(`${this.url}/${c}/public/${r}`)+(o?`?${o}`:"")}}}async remove(e){var t=this;return t.handleOperation(async()=>await gh(t.fetch,`${t.url}/object/${t.bucketId}`,{prefixes:e},{headers:t.headers}))}async list(e,t,r){var a=this;return a.handleOperation(async()=>{const o=ge(ge(ge({},pO),t),{},{prefix:e||""});return await Mn(a.fetch,`${a.url}/object/list/${a.bucketId}`,o,{headers:a.headers},r)})}async listV2(e,t){var r=this;return r.handleOperation(async()=>{const a=ge({},e);return await Mn(r.fetch,`${r.url}/object/list-v2/${r.bucketId}`,a,{headers:r.headers},t)})}encodeMetadata(e){return JSON.stringify(e)}toBase64(e){return typeof Buffer<"u"?Buffer.from(e).toString("base64"):btoa(e)}_getFinalPath(e){return`${this.bucketId}/${e.replace(/^\/+/,"")}`}_removeEmptyFolders(e){return e.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}applyTransformOptsToQuery(e,t){return t.width&&e.set("width",t.width.toString()),t.height&&e.set("height",t.height.toString()),t.resize&&e.set("resize",t.resize),t.format&&e.set("format",t.format),t.quality&&e.set("quality",t.quality.toString()),e}};const gO="2.107.0",ko={"X-Client-Info":`storage-js/${gO}`};var yO=class extends ni{constructor(e,t={},r,a){const o=new URL(e);a?.useNewHostname&&/supabase\.(co|in|red)$/.test(o.hostname)&&!o.hostname.includes("storage.supabase.")&&(o.hostname=o.hostname.replace("supabase.","storage.supabase."));const c=o.href.replace(/\/$/,""),u=ge(ge({},ko),t);super(c,u,r,"storage")}async listBuckets(e){var t=this;return t.handleOperation(async()=>{const r=t.listBucketOptionsToQueryString(e);return await wo(t.fetch,`${t.url}/bucket${r}`,{headers:t.headers})})}async getBucket(e){var t=this;return t.handleOperation(async()=>await wo(t.fetch,`${t.url}/bucket/${e}`,{headers:t.headers}))}async createBucket(e,t={public:!1}){var r=this;return r.handleOperation(async()=>await Mn(r.fetch,`${r.url}/bucket`,{id:e,name:e,type:t.type,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:r.headers}))}async updateBucket(e,t){var r=this;return r.handleOperation(async()=>await Ff(r.fetch,`${r.url}/bucket/${e}`,{id:e,name:e,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:r.headers}))}async emptyBucket(e){var t=this;return t.handleOperation(async()=>await Mn(t.fetch,`${t.url}/bucket/${e}/empty`,{},{headers:t.headers}))}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await gh(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}))}listBucketOptionsToQueryString(e){const t={};return e&&("limit"in e&&(t.limit=String(e.limit)),"offset"in e&&(t.offset=String(e.offset)),e.search&&(t.search=e.search),e.sortColumn&&(t.sortColumn=e.sortColumn),e.sortOrder&&(t.sortOrder=e.sortOrder)),Object.keys(t).length>0?"?"+new URLSearchParams(t).toString():""}},vO=class extends ni{constructor(e,t={},r){const a=e.replace(/\/$/,""),o=ge(ge({},ko),t);super(a,o,r,"storage")}async createBucket(e){var t=this;return t.handleOperation(async()=>await Mn(t.fetch,`${t.url}/bucket`,{name:e},{headers:t.headers}))}async listBuckets(e){var t=this;return t.handleOperation(async()=>
38{const r=new URLSearchParams;e?.limit!==void 0&&r.set("limit",e.limit.toString()),e?.offset!==void 0&&r.set("offset",e.offset.toString()),e?.sortColumn&&r.set("sortColumn",e.sortColumn),e?.sortOrder&&r.set("sortOrder",e.sortOrder),e?.search&&r.set("search",e.search);const a=r.toString(),o=a?`${t.url}/bucket?${a}`:`${t.url}/bucket`;return await wo(t.fetch,o,{headers:t.headers})})}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await gh(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}))}from(e){var t=this;if(!oO(e))throw new qc("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 r=new eO({baseUrl:this.url,catalogName:e,auth:{type:"custom",getHeaders:async()=>t.headers},fetch:this.fetch}),a=this.shouldThrowOnError;return new Proxy(r,{get(o,c){const u=o[c];return typeof u!="function"?u:async(...f)=>{try{return{data:await u.apply(o,f),error:null}}catch(p){if(a)throw p;return{data:null,error:p}}}}})}},bO=class extends ni{constructor(e,t={},r){const a=e.replace(/\/$/,""),o=ge(ge({},ko),{},{"Content-Type":"application/json"},t);super(a,o,r,"vectors")}async createIndex(e){var t=this;return t.handleOperation(async()=>await dn.post(t.fetch,`${t.url}/CreateIndex`,e,{headers:t.headers})||{})}async getIndex(e,t){var r=this;return r.handleOperation(async()=>await dn.post(r.fetch,`${r.url}/GetIndex`,{vectorBucketName:e,indexName:t},{headers:r.headers}))}async listIndexes(e){var t=this;return t.handleOperation(async()=>await dn.post(t.fetch,`${t.url}/ListIndexes`,e,{headers:t.headers}))}async deleteIndex(e,t){var r=this;return r.handleOperation(async()=>await dn.post(r.fetch,`${r.url}/DeleteIndex`,{vectorBucketName:e,indexName:t},{headers:r.headers})||{})}},wO=class extends ni{constructor(e,t={},r){const a=e.replace(/\/$/,""),o=ge(ge({},ko),{},{"Content-Type":"application/json"},t);super(a,o,r,"vectors")}async putVectors(e){var t=this;if(e.vectors.length<1||e.vectors.length>500)throw new Error("Vector batch size must be between 1 and 500 items");return t.handleOperation(async()=>await dn.post(t.fetch,`${t.url}/PutVectors`,e,{headers:t.headers})||{})}async getVectors(e){var t=this;return t.handleOperation(async()=>await dn.post(t.fetch,`${t.url}/GetVectors`,e,{headers:t.headers}))}async listVectors(e){var t=this;if(e.segmentCount!==void 0){if(e.segmentCount<1||e.segmentCount>16)throw new Error("segmentCount must be between 1 and 16");if(e.segmentIndex!==void 0&&(e.segmentIndex<0||e.segmentIndex>=e.segmentCount))throw new Error(`segmentIndex must be between 0 and ${e.segmentCount-1}`)}return t.handleOperation(async()=>await dn.post(t.fetch,`${t.url}/ListVectors`,e,{headers:t.headers}))}async queryVectors(e){var t=this;return t.handleOperation(async()=>await dn.post(t.fetch,`${t.url}/QueryVectors`,e,{headers:t.headers}))}async deleteVectors(e){var t=this;if(e.keys.length<1||e.keys.length>500)throw new Error("Keys batch size must be between 1 and 500 items");return t.handleOperation(async()=>await dn.post(t.fetch,`${t.url}/DeleteVectors`,e,{headers:t.headers})||{})}},_O=class extends ni{constructor(e,t={},r){const a=e.replace(/\/$/,""),o=ge(ge({},ko),{},{"Content-Type":"application/json"},t);super(a,o,r,"vectors")}async createBucket(e){var t=this;return t.handleOperation(async()=>await dn.post(t.fetch,`${t.url}/CreateVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{})}async getBucket(e){var t=this;return t.handleOperation(async()=>await dn.post(t.fetch,`${t.url}/GetVectorBucket`,{vectorBucketName:e},{headers:t.headers}))}async listBuckets(e={}){var t=this;return t.handleOperation(async()=>await dn.post(t.fetch,`${t.url}/ListVectorBuckets`,e,{headers:t.headers}))}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await dn.post(t.fetch,`${t.url}/DeleteVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{})}},SO=class extends _O{constructor(e,t={}){super(e,t.headers||{},t.fetch)}from(e){return new EO(this.url,this.headers,e,this.fetch)}async createBucket(e){var t=()=>super.createBucket,r=this;return t().call(r,e)}async getBucket(e){var t=()=>super.getBucket,r=this;return t().call(r,e)}async listBuckets(e={}){var t=()=>super.listBuckets,r=this;return t().call(r,e)}async deleteBucket(e){var t=()=>super.deleteBucket,r=this;return t().call(r,e)}},EO=class extends bO{constructor(e,t,r,a){super(e,t,a),this.vectorBucketName=r}async createIndex(e){var t=()=>super.createIndex,r=this;return t().call(r,ge(ge({},e),{},{vectorBucketName:r.vectorBucketName}))}
38async listIndexes(e={}){var t=()=>super.listIndexes,r=this;return t().call(r,ge(ge({},e),{},{vectorBucketName:r.vectorBucketName}))}async getIndex(e){var t=()=>super.getIndex,r=this;return t().call(r,r.vectorBucketName,e)}async deleteIndex(e){var t=()=>super.deleteIndex,r=this;return t().call(r,r.vectorBucketName,e)}index(e){return new TO(this.url,this.headers,this.vectorBucketName,e,this.fetch)}},TO=class extends wO{constructor(e,t,r,a,o){super(e,t,o),this.vectorBucketName=r,this.indexName=a}async putVectors(e){var t=()=>super.putVectors,r=this;return t().call(r,ge(ge({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async getVectors(e){var t=()=>super.getVectors,r=this;return t().call(r,ge(ge({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async listVectors(e={}){var t=()=>super.listVectors,r=this;return t().call(r,ge(ge({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async queryVectors(e){var t=()=>super.queryVectors,r=this;return t().call(r,ge(ge({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async deleteVectors(e){var t=()=>super.deleteVectors,r=this;return t().call(r,ge(ge({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}},RO=class extends yO{constructor(e,t={},r,a){super(e,t,r,a)}from(e){return new mO(this.url,this.headers,e,this.fetch)}get vectors(){return new SO(this.url+"/vector",{headers:this.headers,fetch:this.fetch})}get analytics(){return new vO(this.url+"/iceberg",this.headers,this.fetch)}};const D0="2.107.0",Wr=30*1e3,io=3,Ef=io*Wr,xO="http://localhost:9999",AO="supabase.auth.token",OO={"X-Client-Info":`gotrue-js/${D0}`},Jf="X-Supabase-Api-Version",L0={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},CO=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,kO=600*1e3;
38class _o extends Error{constructor(t,r,a){super(t),this.__isAuthError=!0,this.name="AuthError",this.status=r,this.code=a}toJSON(){return{name:this.name,message:this.message,status:this.status,code:this.code}}}function re(e){return typeof e=="object"&&e!==null&&"__isAuthError"in e}class jO extends _o{constructor(t,r,a){super(t,r,a),this.name="AuthApiError",this.status=r,this.code=a}}function MO(e){return re(e)&&e.name==="AuthApiError"}class Dn extends _o{constructor(t,r){super(t),this.name="AuthUnknownError",this.originalError=r}}class Fn extends _o{constructor(t,r,a,o){super(t,a,o),this.name=r,this.status=a}}class Tt extends Fn{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function ec(e){return re(e)&&e.name==="AuthSessionMissingError"}class qa extends Fn{constructor(){super("Auth session or user missing","AuthInvalidTokenResponseError",500,void 0)}}class tc extends Fn{constructor(t){super(t,"AuthInvalidCredentialsError",400,void 0)}}class nc extends Fn{constructor(t,r=null){super(t,"AuthImplicitGrantRedirectError",500,void 0),this.details=null,this.details=r}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{details:this.details})}}function NO(e){return re(e)&&e.name==="AuthImplicitGrantRedirectError"}class Tv extends Fn{constructor(t,r=null){super(t,"AuthPKCEGrantCodeExchangeError",500,void 0),this.details=null,this.details=r}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{details:this.details})}}class DO extends Fn{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 Qf extends Fn{constructor(t,r){super(t,"AuthRetryableFetchError",r,void 0)}}function Tf(e){return re(e)&&e.name==="AuthRetryableFetchError"}class Rv extends Fn{constructor(t="Refresh result discarded: session state changed mid-flight (e.g., concurrent signOut)"){super(t,"AuthRefreshDiscardedError",409,void 0)}}function LO(e){return re(e)&&e.name==="AuthRefreshDiscardedError"}class xv extends Fn{constructor(t,r,a){super(t,"AuthWeakPasswordError",r,"weak_password"),this.reasons=a}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{reasons:this.reasons})}}class Ec extends Fn{constructor(t){super(t,"AuthInvalidJwtError",400,"invalid_jwt")}}const Tc="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),Av=` 39\r=`.split(""),UO=(()=>{const e=new Array(128);for(let t=0;t<e.length;t+=1)e[t]=-1;for(let t=0;t<Av.length;t+=1)e[Av[t].charCodeAt(0)]=-2;for(let t=0;t<Tc.length;t+=1)e[Tc[t].charCodeAt(0)]=t;return e})();function Ov(e,t,r){if(e!==null)for(t.queue=t.queue<<8|e,t.queuedBits+=8;t.queuedBits>=6;){const a=t.queue>>t.queuedBits-6&63;r(Tc[a]),t.queuedBits-=6}else if(t.queuedBits>0)for(t.queue=t.queue<<6-t.queuedBits,t.queuedBits=6;t.queuedBits>=6;){const a=t.queue>>t.queuedBits-6&63;r(Tc[a]),t.queuedBits-=6}}function U0(e,t,r){const a=UO[e];if(a>-1)for(t.queue=t.queue<<6|a,t.queuedBits+=6;t.queuedBits>=8;)r(t.queue>>t.queuedBits-8&255),t.queuedBits-=8;else{if(a===-2)return;throw new Error(`Invalid Base64-URL character "${String.fromCharCode(e)}"`)}}function Cv(e){const t=[],r=u=>{t.push(String.fromCodePoint(u))},a={utf8seq:0,codepoint:0},o={queue:0,queuedBits:0},c=u=>{BO(u,a,r)};for(let u=0;u<e.length;u+=1)U0(e.charCodeAt(u),o,c);return t.join("")}function zO(e,t){if(e<=127){t(e);return}else if(e<=2047){t(192|e>>6),t(128|e&63);return}else if(e<=65535){t(224|e>>12),t(128|e>>6&63),t(128|e&63);return}else if(e<=1114111){t(240|e>>18),t(128|e>>12&63),t(128|e>>6&63),t(128|e&63);return}throw new Error(`Unrecognized Unicode codepoint: ${e.toString(16)}`)}function PO(e,t){for(let r=0;r<e.length;r+=1){let a=e.charCodeAt(r);if(a>55295&&a<=56319){const o=(a-55296)*1024&65535;a=(e.charCodeAt(r+1)-56320&65535|o)+65536,r+=1}zO(a,t)}}function BO(e,t,r){if(t.utf8seq===0){if(e<=127){r(e);return}for(let a=1;a<6;a+=1)if((e>>7-a&1)===0){t.utf8seq=a;break}if(t.utf8seq===2)t.codepoint=e&31;else if(t.utf8seq===3)t.codepoint=e&15;else if(t.utf8seq===4)t.codepoint=e&7;else throw new Error("Invalid UTF-8 sequence");t.utf8seq-=1}else if(t.utf8seq>0){if(e<=127)throw new Error("Invalid UTF-8 sequence");t.codepoint=t.codepoint<<6|e&63,t.utf8seq-=1,t.utf8seq===0&&r(t.codepoint)}}function ei(e){const t=[],r={queue:0,queuedBits:0},a=o=>{t.push(o)};for(let o=0;o<e.length;o+=1)U0(e.charCodeAt(o),r,a);return new Uint8Array(t)}function IO(e){const t=[];return PO(e,r=>t.push(r)),new Uint8Array(t)}function Gs(e){const t=[],r={queue:0,queuedBits:0},a=o=>{t.push(o)};return e.forEach(o=>
39Ov(o,r,a)),Ov(null,r,a),t.join("")}function HO(e){return Math.round(Date.now()/1e3)+e}function qO(){return Symbol("auth-callback")}const zt=()=>typeof window<"u"&&typeof document<"u",zs={tested:!1,writable:!1},z0=()=>{if(!zt())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(zs.tested)return zs.writable;const e=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(e,e),globalThis.localStorage.removeItem(e),zs.tested=!0,zs.writable=!0}catch{zs.tested=!0,zs.writable=!1}return zs.writable};function $O(e){const t={},r=new URL(e);if(r.hash&&r.hash[0]==="#")try{new URLSearchParams(r.hash.substring(1)).forEach((o,c)=>{t[c]=o})}catch{}return r.searchParams.forEach((a,o)=>{t[o]=a}),t}const P0=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),GO=e=>typeof e=="object"&&e!==null&&"status"in e&&"ok"in e&&"json"in e&&typeof e.json=="function",Fa=async(e,t,r)=>{await e.setItem(t,JSON.stringify(r))},yr=async(e,t)=>{const r=await e.getItem(t);if(!r)return null;try{return JSON.parse(r)}catch{return null}},mt=async(e,t)=>{await e.removeItem(t)};class Gc{constructor(){this.promise=new Gc.promiseConstructor((t,r)=>{this.resolve=t,this.reject=r})}}Gc.promiseConstructor=Promise;function rc(e){const t=e.split(".");if(t.length!==3)throw new Ec("Invalid JWT structure");for(let a=0;a<t.length;a++)if(!CO.test(t[a]))throw new Ec("JWT not in base64url format");return{header:JSON.parse(Cv(t[0])),payload:JSON.parse(Cv(t[1])),signature:ei(t[2]),raw:{header:t[0],payload:t[1]}}}async function VO(e){return await new Promise(t=>{setTimeout(()=>t(null),e)})}function KO(e,t){return new Promise((a,o)=>{(async()=>{for(let c=0;c<1/0;c++)try{const u=await e(c);if(!t(c,null,u)){a(u);return}}catch(u){if(!t(c,u)){o(u);return}}})()})}function YO(e){return("0"+e.toString(16)).substr(-2)}function FO(){const t=new Uint32Array(56);if(typeof crypto>"u"){const r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",a=r.length;let o="";for(let c=0;c<56;c++)o+=r.charAt(Math.floor(Math.random()*a));return o}return crypto.getRandomValues(t),Array.from(t,YO).join("")}async function JO(e){const r=new TextEncoder().encode(e),a=await crypto.subtle.digest("SHA-256",r),o=new Uint8Array(a);return Array.from(o).map(c=>String.fromCharCode(c)).join("")}async function QO(e){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."),e;const r=await JO(e);return btoa(r).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function $a(e,t,r=!1){const a=FO();let o=a;r&&(o+="/recovery"),await Fa(e,`${t}-code-verifier`,o);const c=await QO(a);return[c,a===c?"plain":"s256"]}const XO=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function ZO(e){const t=e.headers.get(Jf);if(!t||!t.match(XO))return null;try{return new Date(`${t}T00:00:00.0Z`)}catch{return null}}function WO(e){if(!e)throw new Error("Missing exp claim");const t=Math.floor(Date.now()/1e3);if(e<=t)throw new Error("JWT has expired")}function eC(e){switch(e){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 tC=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function vr(e){if(!tC.test(e))throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not")}function jn(e){if(!e.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 Rf(){const e={};return new Proxy(e,{get:(t,r)=>{if(r==="__isUserNotAvailableProxy")return!0;if(typeof r=="symbol"){const a=r.toString();if(a==="Symbol(Symbol.toPrimitive)"||a==="Symbol(Symbol.toStringTag)"||a==="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 "${r}" property of the session object is not supported. Please use getUser() instead.`)},set:(t,r)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Setting the "${r}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)},deleteProperty:(t,r)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Deleting the "${r}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)}})}function nC(e,t){return new Proxy(e,{get:(r,a,o)=>
39{if(a==="__isInsecureUserWarningProxy")return!0;if(typeof a=="symbol"){const c=a.toString();if(c==="Symbol(Symbol.toPrimitive)"||c==="Symbol(Symbol.toStringTag)"||c==="Symbol(util.inspect.custom)"||c==="Symbol(nodejs.util.inspect.custom)")return Reflect.get(r,a,o)}return!t.value&&typeof a=="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."),t.value=!0),Reflect.get(r,a,o)}})}function kv(e){return JSON.parse(JSON.stringify(e))}const Bs=e=>{if(typeof e=="object"&&e!==null){const t=e;if(typeof t.msg=="string")return t.msg;if(typeof t.message=="string")return t.message;if(typeof t.error_description=="string")return t.error_description;if(typeof t.error=="string")return t.error}return JSON.stringify(e)},rC=[502,503,504,520,521,522,523,524,530];async function jv(e){var t;if(!GO(e))throw new Qf(Bs(e),0);if(rC.includes(e.status))throw new Qf(Bs(e),e.status);let r;try{r=await e.json()}catch(c){throw new Dn(Bs(c),c)}let a;const o=ZO(e);if(o&&o.getTime()>=L0["2024-01-01"].timestamp&&typeof r=="object"&&r&&typeof r.code=="string"?a=r.code:typeof r=="object"&&r&&typeof r.error_code=="string"&&(a=r.error_code),a){if(a==="weak_password")throw new xv(Bs(r),e.status,((t=r.weak_password)===null||t===void 0?void 0:t.reasons)||[]);if(a==="session_not_found")throw new Tt}else if(typeof r=="object"&&r&&typeof r.weak_password=="object"&&r.weak_password&&Array.isArray(r.weak_password.reasons)&&r.weak_password.reasons.length&&r.weak_password.reasons.reduce((c,u)=>c&&typeof u=="string",!0))throw new xv(Bs(r),e.status,r.weak_password.reasons);throw new jO(Bs(r),e.status||500,a)}const sC=(e,t,r,a)=>{const o={method:e,headers:t?.headers||{}};return e==="GET"?o:(o.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},t?.headers),o.body=JSON.stringify(a),Object.assign(Object.assign({},o),r))};async function ce(e,t,r,a){var o;const c=Object.assign({},a?.headers);c[Jf]||(c[Jf]=L0["2024-01-01"].name),a?.jwt&&(c.Authorization=`Bearer ${a.jwt}`);const u=(o=a?.query)!==null&&o!==void 0?o:{};a?.redirectTo&&(u.redirect_to=a.redirectTo);const f=Object.keys(u).length?"?"+new URLSearchParams(u).toString():"",p=await aC(e,t,r+f,{headers:c,noResolveJson:a?.noResolveJson},{},a?.body);return a?.xform?a?.xform(p):{data:Object.assign({},p),error:null}}async function aC(e,t,r,a,o,c){const u=sC(t,a,o,c);let f;try{f=await e(r,Object.assign({},u))}catch(p){throw console.error(p),new Qf(Bs(p),0)}if(f.ok||await jv(f),a?.noResolveJson)return f;try{return await f.json()}catch(p){await jv(p)}}function Tn(e){var t;let r=null;lC(e)&&(r=Object.assign({},e),e.expires_at||(r.expires_at=HO(e.expires_in)));const a=(t=e.user)!==null&&t!==void 0?t:typeof e?.id=="string"?e:null;return{data:{session:r,user:a},error:null}}function Mv(e){const t=Tn(e);return!t.error&&e.weak_password&&typeof e.weak_password=="object"&&Array.isArray(e.weak_password.reasons)&&e.weak_password.reasons.length&&e.weak_password.message&&typeof e.weak_password.message=="string"&&e.weak_password.reasons.reduce((r,a)=>r&&typeof a=="string",!0)&&(t.data.weak_password=e.weak_password),t}function rs(e){var t;return{data:{user:(t=e.user)!==null&&t!==void 0?t:e},error:null}}function iC(e){return{data:e,error:null}}function oC(e){const{action_link:t,email_otp:r,hashed_token:a,redirect_to:o,verification_type:c}=e,u=Hc(e,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),f={action_link:t,email_otp:r,hashed_token:a,redirect_to:o,verification_type:c},p=Object.assign({},u);return{data:{properties:f,user:p},error:null}}function Nv(e){return e}function lC(e){return!!e.access_token&&!!e.refresh_token&&!!e.expires_in}const xf=["global","local","others"];class cC{constructor({url:t="",headers:r={},fetch:a,experimental:o}){this.url=t,this.headers=r,this.fetch=P0(a),this.experimental=o??{},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(t,r=xf[0]){if(xf.indexOf(r)<0)throw new Error(`@supabase/auth-js: Parameter scope must be one of ${xf.join(", ")}`);try{return await ce(this.fetch,"POST",`${this.url}/logout?scope=${r}`,{headers:this.headers,jwt:t,noResolveJson:!0}),{data:null,error:null}}catch(a){if(re(a))return{data:null,error:a};throw a}}async inviteUserByEmail(t,r={}){try{return await ce(this.fetch,"POST",`${this.url}/invite`,{body:{email:t,data:r.data},headers:this.headers,redirectTo:r.redirectTo,xform:rs})}catch(a){if(re(a))return{data:{user:null},error:a};throw a}}async generateLink(t){try{const{options:r}=t,a=Hc(t,["options"]),o=Object.assign(Object.assign({},a),r);return"newEmail"in a&&(o.new_email=a?.newEmail,delete o.newEmail),await ce(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:o,headers:this.headers,xform:oC,redirectTo:r?.redirectTo})}catch(r){if(re(r))return{data:{properties:null,user:null},error:r};throw r}}async createUser(t){try{return await ce(this.fetch,"POST",`${this.url}/admin/users`,{body:t,headers:this.headers,xform:rs})}catch(r){if(re(r))return{data:{user:null},error:r};throw r}}async listUsers(t){var r,a,o,c,u,f,p;try{const m={nextPage:null,lastPage:0,total:0},y=await ce(this.fetch,"GET",`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:(a=(r=t?.page)===null||r===void 0?void 0:r.toString())!==null&&a!==void 0?a:"",per_page:(c=(o=t?.perPage)===null||o===void 0?void 0:o.toString())!==null&&c!==void 0?c:""},xform:Nv});if(y.error)throw y.error;const g=await y.json(),b=(u=y.headers.get("x-total-count"))!==null&&u!==void 0?u:0,w=(p=(f=y.headers.get("link"))===null||f===void 0?void 0:f.split(","))!==null&&p!==void 0?p:[];return w.length>0&&(w.forEach(_=>{const x=parseInt(_.split(";")[0].split("=")[1].substring(0,1)),E=JSON.parse(_.split(";")[1].split("=")[1]);m[`${E}Page`]=x}),m.total=parseInt(b)),{data:Object.assign(Object.assign({},g),m),error:null}}catch(m){if(re(m))return{data:{users:[]},error:m};throw m}}async getUserById(t){vr(t);try{return await ce(this.fetch,"GET",`${this.url}/admin/users/${t}`,{headers:this.headers,xform:rs})}catch(r){if(re(r))return{data:{user:null},error:r};throw r}}async updateUserById(t,r){vr(t);try{return await ce(this.fetch,"PUT",`${this.url}/admin/users/${t}`,{body:r,headers:this.headers,xform:rs})}catch(a){if(re(a))return{data:{user:null},error:a};throw a}}async deleteUser(t,r=!1){vr(t);
39try{return await ce(this.fetch,"DELETE",`${this.url}/admin/users/${t}`,{headers:this.headers,body:{should_soft_delete:r},xform:rs})}catch(a){if(re(a))return{data:{user:null},error:a};throw a}}async _listFactors(t){vr(t.userId);try{const{data:r,error:a}=await ce(this.fetch,"GET",`${this.url}/admin/users/${t.userId}/factors`,{headers:this.headers,xform:o=>({data:{factors:o},error:null})});return{data:r,error:a}}catch(r){if(re(r))return{data:null,error:r};throw r}}async _deleteFactor(t){vr(t.userId),vr(t.id);try{return{data:await ce(this.fetch,"DELETE",`${this.url}/admin/users/${t.userId}/factors/${t.id}`,{headers:this.headers}),error:null}}catch(r){if(re(r))return{data:null,error:r};throw r}}async _listOAuthClients(t){var r,a,o,c,u,f,p;try{const m={nextPage:null,lastPage:0,total:0},y=await ce(this.fetch,"GET",`${this.url}/admin/oauth/clients`,{headers:this.headers,noResolveJson:!0,query:{page:(a=(r=t?.page)===null||r===void 0?void 0:r.toString())!==null&&a!==void 0?a:"",per_page:(c=(o=t?.perPage)===null||o===void 0?void 0:o.toString())!==null&&c!==void 0?c:""},xform:Nv});if(y.error)throw y.error;const g=await y.json(),b=(u=y.headers.get("x-total-count"))!==null&&u!==void 0?u:0,w=(p=(f=y.headers.get("link"))===null||f===void 0?void 0:f.split(","))!==null&&p!==void 0?p:[];return w.length>0&&(w.forEach(_=>{const x=parseInt(_.split(";")[0].split("=")[1].substring(0,1)),E=JSON.parse(_.split(";")[1].split("=")[1]);m[`${E}Page`]=x}),m.total=parseInt(b)),{data:Object.assign(Object.assign({},g),m),error:null}}catch(m){if(re(m))return{data:{clients:[]},error:m};throw m}}async _createOAuthClient(t){try{return await ce(this.fetch,"POST",`${this.url}/admin/oauth/clients`,{body:t,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(re(r))return{data:null,error:r};throw r}}async _getOAuthClient(t){try{return await ce(this.fetch,"GET",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(re(r))return{data:null,error:r};throw r}}async _updateOAuthClient(t,r){try{return await ce(this.fetch,"PUT",`${this.url}/admin/oauth/clients/${t}`,{body:r,headers:this.headers,xform:a=>({data:a,error:null})})}catch(a){if(re(a))return{data:null,error:a};throw a}}async _deleteOAuthClient(t){try{return await ce(this.fetch,"DELETE",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(r){if(re(r))return{data:null,error:r};throw r}}async _regenerateOAuthClientSecret(t){try{return await ce(this.fetch,"POST",`${this.url}/admin/oauth/clients/${t}/regenerate_secret`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(re(r))return{data:null,error:r};throw r}}async _listCustomProviders(t){try{const r={};return t?.type&&(r.type=t.type),await ce(this.fetch,"GET",`${this.url}/admin/custom-providers`,{headers:this.headers,query:r,xform:a=>{var o;return{data:{providers:(o=a?.providers)!==null&&o!==void 0?o:[]},error:null}}})}catch(r){if(re(r))return{data:{providers:[]},error:r};throw r}}async _createCustomProvider(t){try{return await ce(this.fetch,"POST",`${this.url}/admin/custom-providers`,{body:t,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(re(r))return{data:null,error:r};throw r}}async _getCustomProvider(t){try{return await ce(this.fetch,"GET",`${this.url}/admin/custom-providers/${t}`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(re(r))return{data:null,error:r};throw r}}async _updateCustomProvider(t,r){try{return await ce(this.fetch,"PUT",`${this.url}/admin/custom-providers/${t}`,{body:r,headers:this.headers,xform:a=>({data:a,error:null})})}catch(a){if(re(a))return{data:null,error:a};throw a}}async _deleteCustomProvider(t){try{return await ce(this.fetch,"DELETE",`${this.url}/admin/custom-providers/${t}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(r){if(re(r))return{data:null,error:r};throw r}}async _adminListPasskeys(t){jn(this.experimental),vr(t.userId);try{return await ce(this.fetch,"GET",`${this.url}/admin/users/${t.userId}/passkeys`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(re(r))return{data:null,error:r};throw r}}async _adminDeletePasskey(t){jn(this.experimental),vr(t.userId),vr(t.passkeyId);
39try{return await ce(this.fetch,"DELETE",`${this.url}/admin/users/${t.userId}/passkeys/${t.passkeyId}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(r){if(re(r))return{data:null,error:r};throw r}}}function Dv(e={}){return{getItem:t=>e[t]||null,setItem:(t,r)=>{e[t]=r},removeItem:t=>{delete e[t]}}}globalThis&&z0()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug");class uC extends Error{constructor(t){super(t),this.isAcquireTimeout=!0}}function dC(){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 B0(e){if(!/^0x[a-fA-F0-9]{40}$/.test(e))throw new Error(`@supabase/auth-js: Address "${e}" is invalid.`);return e.toLowerCase()}function fC(e){return parseInt(e,16)}function hC(e){const t=new TextEncoder().encode(e);return"0x"+Array.from(t,a=>a.toString(16).padStart(2,"0")).join("")}function pC(e){var t;const{chainId:r,domain:a,expirationTime:o,issuedAt:c=new Date,nonce:u,notBefore:f,requestId:p,resources:m,scheme:y,uri:g,version:b}=e;{if(!Number.isInteger(r))throw new Error(`@supabase/auth-js: Invalid SIWE message field "chainId". Chain ID must be a EIP-155 chain ID. Provided value: ${r}`);if(!a)throw new Error('@supabase/auth-js: Invalid SIWE message field "domain". Domain must be provided.');if(u&&u.length<8)throw new Error(`@supabase/auth-js: Invalid SIWE message field "nonce". Nonce must be at least 8 characters. Provided value: ${u}`);if(!g)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(!((t=e.statement)===null||t===void 0)&&t.includes(` 40`))throw new Error(`@supabase/auth-js: Invalid SIWE message field "statement". Statement must not include '\\n'. Provided value: ${e.statement}`)}const w=B0(e.address),_=y?`${y}://${a}`:a,x=e.statement?`${e.statement} 41`:"",E=`${_} wants you to sign in with your Ethereum account: 42${w} 43 44${x}`;let R=`URI: ${g} 45Version: ${b} 46Chain ID: ${r}${u?` 47Nonce: ${u}`:""} 48Issued At: ${c.toISOString()}`;if(o&&(R+=` 49Expiration Time: ${o.toISOString()}`),f&&(R+=` 50Not Before: ${f.toISOString()}`),p&&(R+=` 51Request ID: ${p}`),m){let M=` 52Resources:`;for(const j of m){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}`);M+=` 53- ${j}`}R+=M}return`${E} 54${R}`}class ut extends Error{constructor({message:t,code:r,cause:a,name:o}){var c;super(t,{cause:a}),this.__isWebAuthnError=!0,this.name=(c=o??(a instanceof Error?a.name:void 0))!==null&&c!==void 0?c:"Unknown Error",this.code=r}toJSON(){return{name:this.name,message:this.message,code:this.code}}}class Rc extends ut{constructor(t,r){super({code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:r,message:t}),this.name="WebAuthnUnknownError",this.originalError=r}}function mC({error:e,options:t}){var r,a,o;const{publicKey:c}=t;if(!c)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new ut({message:"Registration ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else if(e.name==="ConstraintError"){if(((r=c.authenticatorSelection)===null||r===void 0?void 0:r.requireResidentKey)===!0)return new ut({message:"Discoverable credentials were required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT",cause:e});if(t.mediation==="conditional"&&((a=c.authenticatorSelection)===null||a===void 0?void 0:a.userVerification)==="required")return new ut({message:"User verification was required during automatic registration but it could not be performed",code:"ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE",cause:e});if(((o=c.authenticatorSelection)===null||o===void 0?void 0:o.userVerification)==="required")return new ut({message:"User verification was required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT",cause:e})}else{if(e.name==="InvalidStateError")return new ut({message:"The authenticator was previously registered",code:"ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",cause:e});if(e.name==="NotAllowedError")return new ut({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="NotSupportedError")return c.pubKeyCredParams.filter(f=>f.type==="public-key").length===0?new ut({message:'No entry in pubKeyCredParams was of type "public-key"',code:"ERROR_MALFORMED_PUBKEYCREDPARAMS",cause:e}):new ut({message:"No available authenticator supported any of the specified pubKeyCredParams algorithms",code:"ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG",cause:e});if(e.name==="SecurityError"){const u=window.location.hostname;if(I0(u)){if(c.rp.id!==u)return new ut({message:`The RP ID "${c.rp.id}
54" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new ut({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="TypeError"){if(c.user.id.byteLength<1||c.user.id.byteLength>64)return new ut({message:"User ID was not between 1 and 64 characters",code:"ERROR_INVALID_USER_ID_LENGTH",cause:e})}else if(e.name==="UnknownError")return new ut({message:"The authenticator was unable to process the specified options, or could not create a new credential",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:e})}return new ut({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}function gC({error:e,options:t}){const{publicKey:r}=t;if(!r)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new ut({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else{if(e.name==="NotAllowedError")return new ut({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="SecurityError"){const a=window.location.hostname;if(I0(a)){if(r.rpId!==a)return new ut({message:`The RP ID "${r.rpId}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new ut({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="UnknownError")return new ut({message:"The authenticator was unable to process the specified options, or could not create a new assertion signature",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:e})}return new ut({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}class yC{createNewAbortSignal(){if(this.controller){const r=new Error("Cancelling existing WebAuthn API call for new one");r.name="AbortError",this.controller.abort(r)}const t=new AbortController;return this.controller=t,t.signal}cancelCeremony(){if(this.controller){const t=new Error("Manually cancelling existing WebAuthn API call");t.name="AbortError",this.controller.abort(t),this.controller=void 0}}}const Xf=new yC;function Lv(e){if(!e)throw new Error("Credential creation options are required");if(typeof PublicKeyCredential<"u"&&"parseCreationOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseCreationOptionsFromJSON=="function")return PublicKeyCredential.parseCreationOptionsFromJSON(e);const{challenge:t,user:r,excludeCredentials:a}=e,o=Hc(e,["challenge","user","excludeCredentials"]),c=ei(t).buffer,u=Object.assign(Object.assign({},r),{id:ei(r.id).buffer}),f=Object.assign(Object.assign({},o),{challenge:c,user:u});if(a&&a.length>0){f.excludeCredentials=new Array(a.length);for(let p=0;p<a.length;p++){const m=a[p];f.excludeCredentials[p]=Object.assign(Object.assign({},m),{id:ei(m.id).buffer,type:m.type||"public-key",transports:m.transports})}}return f}function Uv(e){if(!e)throw new Error("Credential request options are required");if(typeof PublicKeyCredential<"u"&&"parseRequestOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseRequestOptionsFromJSON=="function")return PublicKeyCredential.parseRequestOptionsFromJSON(e);const{challenge:t,allowCredentials:r}=e,a=Hc(e,["challenge","allowCredentials"]),o=ei(t).buffer,c=Object.assign(Object.assign({},a),{challenge:o});if(r&&r.length>0){c.allowCredentials=new Array(r.length);for(let u=0;u<r.length;u++){const f=r[u];c.allowCredentials[u]=Object.assign(Object.assign({},f),{id:ei(f.id).buffer,type:f.type||"public-key",transports:f.transports})}}return c}function zv(e){var t;if("toJSON"in e&&typeof e.toJSON=="function")return e.toJSON();const r=e;return{id:e.id,rawId:e.id,response:{attestationObject:Gs(new Uint8Array(e.response.attestationObject)),clientDataJSON:Gs(new Uint8Array(e.response.clientDataJSON))},type:"public-key",clientExtensionResults:e.getClientExtensionResults(),authenticatorAttachment:(t=r.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function Pv(e){var t;if("toJSON"in e&&typeof e.toJSON=="function")return e.toJSON();const r=e,a=e.getClientExtensionResults(),o=e.response;return{id:e.id,rawId:e.id,response:{authenticatorData:Gs(new Uint8Array(o.authenticatorData)),clientDataJSON:Gs(new Uint8Array(o.clientDataJSON)),signature:Gs(new Uint8Array(o.signature)),userHandle:o.userHandle?Gs(new Uint8Array(o.userHandle)):void 0},type:"public-key",clientExtensionResults:a,authenticatorAttachment:(t=r.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function I0(e){return e==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e)}function xc(){var e,t;return!!(zt()&&"PublicKeyCredential"in window&&window.PublicKeyCredential&&"credentials"in navigator&&typeof((e=navigator?.credentials)===null||e===void 0?void 0:e.create)=="function"&&typeof((t=navigator?.credentials)===null||t===void 0?void 0:t.get)=="function")}async function H0(e){try{const t=await navigator.credentials.create(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new Rc("Browser returned unexpected credential type",t)}:{data:null,error:new Rc("Empty credential response",t)}}
54catch(t){return{data:null,error:mC({error:t,options:e})}}}async function q0(e){try{const t=await navigator.credentials.get(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new Rc("Browser returned unexpected credential type",t)}:{data:null,error:new Rc("Empty credential response",t)}}catch(t){return{data:null,error:gC({error:t,options:e})}}}const vC={hints:["security-key"],authenticatorSelection:{authenticatorAttachment:"cross-platform",requireResidentKey:!1,userVerification:"preferred",residentKey:"discouraged"},attestation:"direct"},bC={userVerification:"preferred",hints:["security-key"],attestation:"direct"};function Ac(...e){const t=o=>o!==null&&typeof o=="object"&&!Array.isArray(o),r=o=>o instanceof ArrayBuffer||ArrayBuffer.isView(o),a={};for(const o of e)if(o)for(const c in o){const u=o[c];if(u!==void 0)if(Array.isArray(u))a[c]=u;else if(r(u))a[c]=u;else if(t(u)){const f=a[c];t(f)?a[c]=Ac(f,u):a[c]=Ac(u)}else a[c]=u}return a}function wC(e,t){return Ac(vC,e,t||{})}function _C(e,t){return Ac(bC,e,t||{})}class SC{constructor(t){this.client=t,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(t){return this.client.mfa.enroll(Object.assign(Object.assign({},t),{factorType:"webauthn"}))}async _challenge({factorId:t,webauthn:r,friendlyName:a,signal:o},c){var u;try{const{data:f,error:p}=await this.client.mfa.challenge({factorId:t,webauthn:r});if(!f)return{data:null,error:p};const m=o??Xf.createNewAbortSignal();if(f.webauthn.type==="create"){const{user:y}=f.webauthn.credential_options.publicKey;if(!y.name){const g=a;if(g)y.name=`${y.id}:${g}`;else{const w=(await this.client.getUser()).data.user,_=((u=w?.user_metadata)===null||u===void 0?void 0:u.name)||w?.email||w?.id||"User";y.name=`${y.id}:${_}`}}y.displayName||(y.displayName=y.name)}switch(f.webauthn.type){case"create":{const y=wC(f.webauthn.credential_options.publicKey,c?.create),{data:g,error:b}=await H0({publicKey:y,signal:m});return g?{data:{factorId:t,challengeId:f.id,webauthn:{type:f.webauthn.type,credential_response:g}},error:null}:{data:null,error:b}}case"request":{const y=_C(f.webauthn.credential_options.publicKey,c?.request),{data:g,error:b}=await q0(Object.assign(Object.assign({},f.webauthn.credential_options),{publicKey:y,signal:m}));return g?{data:{factorId:t,challengeId:f.id,webauthn:{type:f.webauthn.type,credential_response:g}},error:null}:{data:null,error:b}}}}catch(f){return re(f)?{data:null,error:f}:{data:null,error:new Dn("Unexpected error in challenge",f)}}}async _verify({challengeId:t,factorId:r,webauthn:a}){return this.client.mfa.verify({factorId:r,challengeId:t,webauthn:a})}async _authenticate({factorId:t,webauthn:{rpId:r=typeof window<"u"?window.location.hostname:void 0,rpOrigins:a=typeof window<"u"?[window.location.origin]:void 0,signal:o}={}},c){if(!r)return{data:null,error:new _o("rpId is required for WebAuthn authentication")};try{if(!xc())return{data:null,error:new Dn("Browser does not support WebAuthn",null)};const{data:u,error:f}=await this.challenge({factorId:t,webauthn:{rpId:r,rpOrigins:a},signal:o},{request:c});if(!u)return{data:null,error:f};const{webauthn:p}=u;return this._verify({factorId:t,challengeId:u.challengeId,webauthn:{type:p.type,rpId:r,rpOrigins:a,credential_response:p.credential_response}})}catch(u){return re(u)?{data:null,error:u}:{data:null,error:new Dn("Unexpected error in authenticate",u)}}}async _register({friendlyName:t,webauthn:{rpId:r=typeof window<"u"?window.location.hostname:void 0,rpOrigins:a=typeof window<"u"?[window.location.origin]:void 0,signal:o}={}},c){if(!r)return{data:null,error:new _o("rpId is required for WebAuthn registration")};try{if(!xc())return{data:null,error:new Dn("Browser does not support WebAuthn",null)};const{data:u,error:f}=await this._enroll({friendlyName:t});if(!u)return await this.client.mfa.listFactors().then(y=>{var g;return(g=y.data)===null||g===void 0?void 0:g.all.find(b=>b.factor_type==="webauthn"&&b.friendly_name===t&&b.status!=="unverified")}).then(y=>y?this.client.mfa.unenroll({factorId:y?.id}):void 0),{data:null,error:f};const{data:p,error:m}=await this._challenge({factorId:u.id,friendlyName:u.friendly_name,webauthn:{rpId:r,rpOrigins:a},signal:o},{create:c});return p?this._verify({factorId:u.id,challengeId:p.challengeId,webauthn:{rpId:r,rpOrigins:a,type:p.webauthn.type,credential_response:p.webauthn.credential_response}}):{data:null,error:m}}catch(u){return re(u)?{data:null,error:u}:{data:null,error:new Dn("Unexpected error in register",u)}}}}dC();const EC={url:xO,storageKey:AO,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:OO,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1,throwOnError:!1,lockAcquireTimeout:5e3,skipAutoInitialize:!1,experimental:{}},Ga={};class So{get jwks(){var t,r;return(r=(t=Ga[this.storageKey])===null||t===void 0?void 0:t.jwks)!==null&&r!==void 0?r:{keys:[]}}set jwks(t){Ga[this.storageKey]=Object.assign(Object.assign({},Ga[this.storageKey]),{jwks:t})}get jwks_cached_at(){var t,r;return(r=(t=Ga[this.storageKey])===null||t===void 0?void 0:t.cachedAt)!==null&&r!==void 0?r:Number.MIN_SAFE_INTEGER}set jwks_cached_at(t){Ga[this.storageKey]=Object.assign(Object.assign({},Ga[this.storageKey]),{cachedAt:t})}constructor(t){var r,a,o;this.userStorage=null,this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=null,this.autoRefreshTickTimeout=null,this.visibilityChangedCallback=null,this.refreshingDeferred=null,this._sessionRemovalEpoch=0,this.initializePromise=null,this.detectSessionInUrl=!0,this.hasCustomAuthorizationHeader=!1,this.suppressGetSessionWarning=!1,this.lock=null,this.lockAcquired=!1,this.pendingInLock=[],this.broadcastChannel=null,this.logger=console.log;const c=Object.assign(Object.assign({},EC),t);
54if(this.storageKey=c.storageKey,this.instanceID=(r=So.nextInstanceID[this.storageKey])!==null&&r!==void 0?r:0,So.nextInstanceID[this.storageKey]=this.instanceID+1,this.logDebugMessages=!!c.debug,typeof c.debug=="function"&&(this.logger=c.debug),this.instanceID>0&&zt()){const u=`${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(u),this.logDebugMessages&&console.trace(u)}if(this.persistSession=c.persistSession,this.autoRefreshToken=c.autoRefreshToken,this.experimental=(a=c.experimental)!==null&&a!==void 0?a:{},this.admin=new cC({url:c.url,headers:c.headers,fetch:c.fetch,experimental:this.experimental}),this.url=c.url,this.headers=c.headers,this.fetch=P0(c.fetch),this.detectSessionInUrl=c.detectSessionInUrl,this.flowType=c.flowType,this.hasCustomAuthorizationHeader=c.hasCustomAuthorizationHeader,this.throwOnError=c.throwOnError,this.lockAcquireTimeout=c.lockAcquireTimeout,c.lock!=null&&(this.lock=c.lock),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 SC(this)},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:z0()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=Dv(this.memoryStorage)),c.userStorage&&(this.userStorage=c.userStorage)):(this.memoryStorage={},this.storage=Dv(this.memoryStorage)),zt()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(u){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",u)}(o=this.broadcastChannel)===null||o===void 0||o.addEventListener("message",async u=>{this._debug("received broadcast notification from other tab or client",u);try{await this._notifyAllSubscribers(u.data.event,u.data.session,!1)}catch(f){this._debug("#broadcastChannel","error",f)}})}c.skipAutoInitialize||this.initialize().catch(u=>{this._debug("#initialize()","error",u)})}isThrowOnErrorEnabled(){return this.throwOnError}_returnResult(t){if(this.throwOnError&&t&&t.error)throw t.error;return t}_logPrefix(){return`GoTrueClient@${this.storageKey}:${this.instanceID} (${D0}) ${new Date().toISOString()}`}_debug(...t){return this.logDebugMessages&&this.logger(this._logPrefix(),...t),this}async initialize(){return this.initializePromise?await this.initializePromise:(this.initializePromise=(async()=>this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._initialize()):await this._initialize())(),await this.initializePromise)}async _initialize(){var t;try{let r={},a="none";if(zt()&&(r=$O(window.location.href),this._isImplicitGrantCallback(r)?a="implicit":await this._isPKCECallback(r)&&(a="pkce")),zt()&&this.detectSessionInUrl&&a!=="none"){const{data:o,error:c}=await this._getSessionFromURL(r,a);if(c){if(this._debug("#_initialize()","error detecting session from URL",c),NO(c)){const p=(t=c.details)===null||t===void 0?void 0:t.code;if(p==="identity_already_exists"||p==="identity_not_found"||p==="single_identity_not_deletable")return{error:c}}return{error:c}}const{session:u,redirectType:f}=o;return this._debug("#_initialize()","detected session in URL",u,"redirect type",f),await this._saveSession(u),setTimeout(async()=>
54{f==="recovery"?await this._notifyAllSubscribers("PASSWORD_RECOVERY",u):await this._notifyAllSubscribers("SIGNED_IN",u)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(r){return re(r)?this._returnResult({error:r}):this._returnResult({error:new Dn("Unexpected error during initialization",r)})}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(t){var r,a,o;try{const c=await ce(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:(a=(r=t?.options)===null||r===void 0?void 0:r.data)!==null&&a!==void 0?a:{},gotrue_meta_security:{captcha_token:(o=t?.options)===null||o===void 0?void 0:o.captchaToken}},xform:Tn}),{data:u,error:f}=c;if(f||!u)return this._returnResult({data:{user:null,session:null},error:f});const p=u.session,m=u.user;return u.session&&(await this._saveSession(u.session),await this._notifyAllSubscribers("SIGNED_IN",p)),this._returnResult({data:{user:m,session:p},error:null})}catch(c){if(re(c))return this._returnResult({data:{user:null,session:null},error:c});throw c}}async signUp(t){var r,a,o;try{let c;if("email"in t){const{email:y,password:g,options:b}=t;let w=null,_=null;this.flowType==="pkce"&&([w,_]=await $a(this.storage,this.storageKey)),c=await ce(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:b?.emailRedirectTo,body:{email:y,password:g,data:(r=b?.data)!==null&&r!==void 0?r:{},gotrue_meta_security:{captcha_token:b?.captchaToken},code_challenge:w,code_challenge_method:_},xform:Tn})}else if("phone"in t){const{phone:y,password:g,options:b}=t;c=await ce(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:y,password:g,data:(a=b?.data)!==null&&a!==void 0?a:{},channel:(o=b?.channel)!==null&&o!==void 0?o:"sms",gotrue_meta_security:{captcha_token:b?.captchaToken}},xform:Tn})}else throw new tc("You must provide either an email or phone number and a password");const{data:u,error:f}=c;if(f||!u)return await mt(this.storage,`${this.storageKey}-code-verifier`),this._returnResult({data:{user:null,session:null},error:f});const p=u.session,m=u.user;return u.session&&(await this._saveSession(u.session),await this._notifyAllSubscribers("SIGNED_IN",p)),this._returnResult({data:{user:m,session:p},error:null})}catch(c){if(await mt(this.storage,`${this.storageKey}-code-verifier`),re(c))return this._returnResult({data:{user:null,session:null},error:c});throw c}}async signInWithPassword(t){try{let r;if("email"in t){const{email:c,password:u,options:f}=t;r=await ce(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:c,password:u,gotrue_meta_security:{captcha_token:f?.captchaToken}},xform:Mv})}else if("phone"in t){const{phone:c,password:u,options:f}=t;r=await ce(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:c,password:u,gotrue_meta_security:{captcha_token:f?.captchaToken}},xform:Mv})}else throw new tc("You must provide either an email or phone number and a password");const{data:a,error:o}=r;if(o)return this._returnResult({data:{user:null,session:null},error:o});if(!a||!a.session||!a.user){const c=new qa;return this._returnResult({data:{user:null,session:null},error:c})}return a.session&&(await this._saveSession(a.session),await this._notifyAllSubscribers("SIGNED_IN",a.session)),this._returnResult({data:Object.assign({user:a.user,session:a.session},a.weak_password?{weakPassword:a.weak_password}:null),error:o})}catch(r){if(re(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async signInWithOAuth(t){var r,a,o,c;return await this._handleProviderSignIn(t.provider,{redirectTo:(r=t.options)===null||r===void 0?void 0:r.redirectTo,scopes:(a=t.options)===null||a===void 0?void 0:a.scopes,queryParams:(o=t.options)===null||o===void 0?void 0:o.queryParams,skipBrowserRedirect:(c=t.options)===null||c===void 0?void 0:c.skipBrowserRedirect})}async exchangeCodeForSession(t){return await this.initializePromise,this.lock!=null?this._acquireLock(this.lockAcquireTimeout,async()=>this._exchangeCodeForSession(t)):this._exchangeCodeForSession(t)}async signInWithWeb3(t){const{chain:r}=t;switch(r){case"ethereum":return await this.signInWithEthereum(t);case"solana":return await this.signInWithSolana(t);default:throw new Error(`@supabase/auth-js: Unsupported chain "${r}"`)}}async signInWithEthereum(t){var r,a,o,c,u,f,p,m,y,g,b;let w,_;if("message"in t)w=t.message,_=t.signature;else{const{chain:x,wallet:E,statement:R,options:M}=t;let j;if(zt())if(typeof E=="object")j=E;else{const Q=window;if("ethereum"in Q&&typeof Q.ethereum=="object"&&"request"in Q.ethereum&&typeof Q.ethereum.request=="function")j=Q.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 E!="object"||!M?.url)throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");j=E}const L=new URL((r=M?.url)!==null&&r!==void 0?r:window.location.href),X=await j.request({method:"eth_requestAccounts"}).then(Q=>Q).catch(()=>{throw new Error("@supabase/auth-js: Wallet method eth_requestAccounts is missing or invalid")});if(!X||X.length===0)throw new Error("@supabase/auth-js: No accounts available. Please ensure the wallet is connected.");const G=B0(X[0]);let H=(a=M?.signInWithEthereum)===null||a===void 0?void 0:a.chainId;if(!H){const Q=await j.request({method:"eth_chainId"});H=fC(Q)}const U={domain:L.host,address:G,statement:R,uri:L.href,version:"1",chainId:H,nonce:(o=M?.signInWithEthereum)===null||o===void 0?void 0:o.nonce,issuedAt:(u=(c=M?.signInWithEthereum)===null||c===void 0?void 0:c.issuedAt)!==null&&u!==void 0?u:new Date,expirationTime:(f=M?.signInWithEthereum)===null||f===void 0?void 0:f.expirationTime,notBefore:(p=M?.signInWithEthereum)===null||p===void 0?void 0:p.notBefore,requestId:(m=M?.signInWithEthereum)===null||m===void 0?void 0:m.requestId,resources:(y=M?.signInWithEthereum)===null||y===void 0?void 0:y.resources};w=pC(U),_=await j.request({method:"personal_sign",params:[hC(w),G]})}try{const{data:x,error:E}=await ce(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"ethereum",message:w,signature:_},!((g=t.options)===null||g===void 0)&&g.captchaToken?{gotrue_meta_security:{captcha_token:(b=t.options)===null||b===void 0?void 0:b.captchaToken}}:null),xform:Tn});if(E)throw E;if(!x||!x.session||!x.user){const R=new qa;return this._returnResult({data:{user:null,session:null},error:R})}return x.session&&(await this._saveSession(x.session),await this._notifyAllSubscribers("SIGNED_IN",x.session)),this._returnResult({data:Object.assign({},x),error:E})}
54catch(x){if(re(x))return this._returnResult({data:{user:null,session:null},error:x});throw x}}async signInWithSolana(t){var r,a,o,c,u,f,p,m,y,g,b,w;let _,x;if("message"in t)_=t.message,x=t.signature;else{const{chain:E,wallet:R,statement:M,options:j}=t;let L;if(zt())if(typeof R=="object")L=R;else{const G=window;if("solana"in G&&typeof G.solana=="object"&&("signIn"in G.solana&&typeof G.solana.signIn=="function"||"signMessage"in G.solana&&typeof G.solana.signMessage=="function"))L=G.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 R!="object"||!j?.url)throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");L=R}const X=new URL((r=j?.url)!==null&&r!==void 0?r:window.location.href);if("signIn"in L&&L.signIn){const G=await L.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},j?.signInWithSolana),{version:"1",domain:X.host,uri:X.href}),M?{statement:M}:null));let H;if(Array.isArray(G)&&G[0]&&typeof G[0]=="object")H=G[0];else if(G&&typeof G=="object"&&"signedMessage"in G&&"signature"in G)H=G;else throw new Error("@supabase/auth-js: Wallet method signIn() returned unrecognized value");if("signedMessage"in H&&"signature"in H&&(typeof H.signedMessage=="string"||H.signedMessage instanceof Uint8Array)&&H.signature instanceof Uint8Array)_=typeof H.signedMessage=="string"?H.signedMessage:new TextDecoder().decode(H.signedMessage),x=H.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");_=[`${X.host} wants you to sign in with your Solana account:`,L.publicKey.toBase58(),...M?["",M,""]:[""],"Version: 1",`URI: ${X.href}`,`Issued At: ${(o=(a=j?.signInWithSolana)===null||a===void 0?void 0:a.issuedAt)!==null&&o!==void 0?o:new Date().toISOString()}`,...!((c=j?.signInWithSolana)===null||c===void 0)&&c.notBefore?[`Not Before: ${j.signInWithSolana.notBefore}`]:[],...!((u=j?.signInWithSolana)===null||u===void 0)&&u.expirationTime?[`Expiration Time: ${j.signInWithSolana.expirationTime}`]:[],...!((f=j?.signInWithSolana)===null||f===void 0)&&f.chainId?[`Chain ID: ${j.signInWithSolana.chainId}`]:[],...!((p=j?.signInWithSolana)===null||p===void 0)&&p.nonce?[`Nonce: ${j.signInWithSolana.nonce}`]:[],...!((m=j?.signInWithSolana)===null||m===void 0)&&m.requestId?[`Request ID: ${j.signInWithSolana.requestId}`]:[],...!((g=(y=j?.signInWithSolana)===null||y===void 0?void 0:y.resources)===null||g===void 0)&&g.length?["Resources",...j.signInWithSolana.resources.map(H=>`- ${H}`)]:[]].join(` 55`);const G=await L.signMessage(new TextEncoder().encode(_),"utf8");if(!G||!(G instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");x=G}}try{const{data:E,error:R}=await ce(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:_,signature:Gs(x)},!((b=t.options)===null||b===void 0)&&b.captchaToken?{gotrue_meta_security:{captcha_token:(w=t.options)===null||w===void 0?void 0:w.captchaToken}}:null),xform:Tn});if(R)throw R;if(!E||!E.session||!E.user){const M=new qa;return this._returnResult({data:{user:null,session:null},error:M})}return E.session&&(await this._saveSession(E.session),await this._notifyAllSubscribers("SIGNED_IN",E.session)),this._returnResult({data:Object.assign({},E),error:R})}catch(E){if(re(E))return this._returnResult({data:{user:null,session:null},error:E});throw E}}async _exchangeCodeForSession(t){const r=await yr(this.storage,`${this.storageKey}-code-verifier`),[a,o]=(r??"").split("/");try{if(!a&&this.flowType==="pkce")throw new DO;const{data:c,error:u}=await ce(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:t,code_verifier:a},xform:Tn});if(await mt(this.storage,`${this.storageKey}-code-verifier`),u)throw u;if(!c||!c.session||!c.user){const f=new qa;return this._returnResult({data:{user:null,session:null,redirectType:null},error:f})}return c.session&&(await this._saveSession(c.session),await this._notifyAllSubscribers(o==="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",c.session)),this._returnResult({data:Object.assign(Object.assign({},c),{redirectType:o??null}),error:u})}catch(c){if(await mt(this.storage,`${this.storageKey}-code-verifier`),re(c))return this._returnResult({data:{user:null,session:null,redirectType:null},error:c});throw c}}async signInWithIdToken(t){try{const{options:r,provider:a,token:o,access_token:c,nonce:u}=t,f=await ce(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:a,id_token:o,access_token:c,nonce:u,gotrue_meta_security:{captcha_token:r?.captchaToken}},xform:Tn}),{data:p,error:m}=f;if(m)return this._returnResult({data:{user:null,session:null},error:m});if(!p||!p.session||!p.user){const y=new qa;return this._returnResult({data:{user:null,session:null},error:y})}return p.session&&(await this._saveSession(p.session),await this._notifyAllSubscribers("SIGNED_IN",p.session)),this._returnResult({data:p,error:m})}catch(r){if(re(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async signInWithOtp(t){var r,a,o,c,u;try{if("email"in t){const{email:f,options:p}=t;let m=null,y=null;this.flowType==="pkce"&&([m,y]=await $a(this.storage,this.storageKey));const{error:g}=await ce(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:f,data:(r=p?.data)!==null&&r!==void 0?r:{},create_user:(a=p?.shouldCreateUser)!==null&&a!==void 0?a:!0,gotrue_meta_security:{captcha_token:p?.captchaToken},code_challenge:m,code_challenge_method:y},redirectTo:p?.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:g})}if("phone"in t){const{phone:f,options:p}=t,{data:m,error:y}=await ce(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:f,data:(o=p?.data)!==null&&o!==void 0?o:{},create_user:(c=p?.shouldCreateUser)!==null&&c!==void 0?c:!0,gotrue_meta_security:{captcha_token:p?.captchaToken},channel:(u=p?.channel)!==null&&u!==void 0?u:"sms"}});return this._returnResult({data:{user:null,session:null,messageId:m?.message_id},error:y})}throw new tc("You must provide either an email or phone number.")}catch(f){if(await mt(this.storage,`${this.storageKey}-code-verifier`),re(f))return this._returnResult({data:{user:null,session:null},error:f});throw f}}async verifyOtp(t){var r,a;try{let o,c;"options"in t&&(o=(r=t.options)===null||r===void 0?void 0:r.redirectTo,c=(a=t.options)===null||a===void 0?void 0:a.captchaToken);const{data:u,error:f}=await ce(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},t),{gotrue_meta_security:{captcha_token:c}}),redirectTo:o,xform:Tn});if(f)throw f;if(!u)throw new Error("An error occurred on token verification.");const p=u.session,m=u.user;return p?.access_token&&(await this._saveSession(p),await this._notifyAllSubscribers(t.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",p)),this._returnResult({data:{user:m,session:p},error:null})}catch(o){if(re(o))return this._returnResult({data:{user:null,session:null},error:o});throw o}}async signInWithSSO(t){var r,a,o,c,u;try{let f=null,p=null;this.flowType==="pkce"&&([f,p]=await $a(this.storage,this.storageKey));const m=await ce(this.fetch,"POST",`${this.url}/sso`,{body:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},"providerId"in t?{provider_id:t.providerId}:null),"domain"in t?{domain:t.domain}:null),{redirect_to:(a=(r=t.options)===null||r===void 0?void 0:r.redirectTo)!==null&&a!==void 0?a:void 0}
55),!((o=t?.options)===null||o===void 0)&&o.captchaToken?{gotrue_meta_security:{captcha_token:t.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:f,code_challenge_method:p}),headers:this.headers,xform:iC});return!((c=m.data)===null||c===void 0)&&c.url&&zt()&&!(!((u=t.options)===null||u===void 0)&&u.skipBrowserRedirect)&&window.location.assign(m.data.url),this._returnResult(m)}catch(f){if(await mt(this.storage,`${this.storageKey}-code-verifier`),re(f))return this._returnResult({data:null,error:f});throw f}}async reauthenticate(){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._reauthenticate()):await this._reauthenticate()}async _reauthenticate(){try{return await this._useSession(async t=>{const{data:{session:r},error:a}=t;if(a)throw a;if(!r)throw new Tt;const{error:o}=await ce(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:r.access_token});return this._returnResult({data:{user:null,session:null},error:o})})}catch(t){if(re(t))return this._returnResult({data:{user:null,session:null},error:t});throw t}}async resend(t){try{const r=`${this.url}/resend`;if("email"in t){const{email:a,type:o,options:c}=t,{error:u}=await ce(this.fetch,"POST",r,{headers:this.headers,body:{email:a,type:o,gotrue_meta_security:{captcha_token:c?.captchaToken}},redirectTo:c?.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:u})}else if("phone"in t){const{phone:a,type:o,options:c}=t,{data:u,error:f}=await ce(this.fetch,"POST",r,{headers:this.headers,body:{phone:a,type:o,gotrue_meta_security:{captcha_token:c?.captchaToken}}});return this._returnResult({data:{user:null,session:null,messageId:u?.message_id},error:f})}throw new tc("You must provide either an email or phone number and a type")}catch(r){if(re(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async getSession(){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>this._useSession(async t=>t)):await this._useSession(async t=>t)}async _acquireLock(t,r){this._debug("#_acquireLock","begin",t);try{if(this.lockAcquired){const a=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),o=(async()=>(await a,await r()))();return this.pendingInLock.push((async()=>{try{await o}catch{}})()),o}return await this.lock(`lock:${this.storageKey}`,t,async()=>{this._debug("#_acquireLock","lock acquired for storage key",this.storageKey);try{this.lockAcquired=!0;const a=r();for(this.pendingInLock.push((async()=>{try{await a}catch{}})()),await a;this.pendingInLock.length;){const o=[...this.pendingInLock];await Promise.all(o),this.pendingInLock.splice(0,o.length)}return await a}finally{this._debug("#_acquireLock","lock released for storage key",this.storageKey),this.lockAcquired=!1}})}finally{this._debug("#_acquireLock","end")}}async _useSession(t){this._debug("#_useSession","begin");try{const r=await this.__loadSession();return await t(r)}finally{this._debug("#_useSession","end")}}async __loadSession(){this._debug("#__loadSession()","begin"),this.lock!=null&&!this.lockAcquired&&this._debug("#__loadSession()","used outside of an acquired lock!",new Error().stack);try{let t=null;const r=await yr(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",r),r!==null&&(this._isValidSession(r)?t=r:(this._debug("#getSession()","session from storage is not valid"),await this._removeSession())),!t)return{data:{session:null},error:null};const a=t.expires_at?t.expires_at*1e3-Date.now()<Ef:!1;if(this._debug("#__loadSession()",`session has${a?"":" not"} expired`,"expires_at",t.expires_at),!a){if(this.userStorage){const u=await yr(this.userStorage,this.storageKey+"-user");u?.user?t.user=u.user:t.user=Rf()}if(this.storage.isServer&&t.user&&!t.user.__isUserNotAvailableProxy){const u={value:this.suppressGetSessionWarning};t.user=nC(t.user,u),u.value&&(this.suppressGetSessionWarning=!0)}return{data:{session:t},error:null}}const{data:o,error:c}=await this._callRefreshToken(t.refresh_token);return c?this._returnResult({data:{session:null},error:c}):this._returnResult({data:{session:o},error:null})}finally{this._debug("#__loadSession()","end")}}async getUser(t){if(t)return await this._getUser(t);await this.initializePromise;let r;return this.lock!=null?r=await this._acquireLock(this.lockAcquireTimeout,async()=>await this._getUser()):r=await this._getUser(),r.data.user&&(this.suppressGetSessionWarning=!0),r}async _getUser(t){try{return t?await ce(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:t,xform:rs}):await this._useSession(async r=>{var a,o,c;const{data:u,error:f}=r;if(f)throw f;return!(!((a=u.session)===null||a===void 0)&&a.access_token)&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new Tt}:await ce(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:(c=(o=u.session)===null||o===void 0?void 0:o.access_token)!==null&&c!==void 0?c:void 0,xform:rs})})}catch(r){if(re(r))return ec(r)&&(await this._removeSession(),await mt(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({data:{user:null},error:r});throw r}}async updateUser(t,r={}){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._updateUser(t,r)):await this._updateUser(t,r)}async _updateUser(t,r={}){try{return await this._useSession(async a=>{const{data:o,error:c}=a;if(c)throw c;if(!o.session)throw new Tt;const u=o.session;let f=null,p=null;this.flowType==="pkce"&&t.email!=null&&([f,p]=await $a(this.storage,this.storageKey));const{data:m,error:y}=await ce(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:r?.emailRedirectTo,body:Object.assign(Object.assign({},t),{code_challenge:f,code_challenge_method:p}),jwt:u.access_token,xform:rs});if(y)throw y;return u.user=m.user,await this._saveSession(u),await this._notifyAllSubscribers("USER_UPDATED",u),this._returnResult({data:{user:u.user},error:null})})}catch(a){if(await mt(this.storage,`${this.storageKey}-code-verifier`),re(a))return this._returnResult({data:{user:null},error:a});throw a}}async setSession(t){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._setSession(t)):await this._setSession(t)}async _setSession(t){try{if(!t.access_token||!t.refresh_token)throw new Tt;const r=Date.now()/1e3;let a=r,o=!0,c=null;const{payload:u}=rc(t.access_token);if(u.exp&&(a=u.exp,o=a<=r),o){const{data:f,error:p}=await this._callRefreshToken(t.refresh_token);if(p)return this._returnResult({data:{user:null,session:null},error:p});if(!f)return{data:{user:null,session:null},error:null};c=f}else{const{data:f,error:p}=await this._getUser(t.access_token);if(p)return this._returnResult({data:{user:null,session:null},error:p});c={access_token:t.access_token,refresh_token:t.refresh_token,user:f.user,token_type:"bearer",expires_in:a-r,expires_at:a},await this._saveSession(c),await this._notifyAllSubscribers("SIGNED_IN",c)}return this._returnResult({data:{user:c.user,session:c},error:null})}catch(r){if(re(r))return this._returnResult({data:{session:null,user:null},error:r});throw r}}async refreshSession(t){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._refreshSession(t)):await this._refreshSession(t)}async _refreshSession(t){try{return await this._useSession(async r=>{var a;if(!t){const{data:u,error:f}=r;if(f)throw f;t=(a=u.session)!==null&&a!==void 0?a:void 0}if(!t?.refresh_token)throw new Tt;const{data:o,error:c}=await this._callRefreshToken(t.refresh_token);return c?this._returnResult({data:{user:null,session:null},error:c}):o?this._returnResult({data:{user:o.user,session:o},error:null}):this._returnResult({data:{user:null,session:null},error:null})})}catch(r){if(re(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async _getSessionFromURL(t,r){var a;try{if(!zt())throw new nc("No browser detected.");
55if(t.error||t.error_description||t.error_code)throw new nc(t.error_description||"Error in URL with unspecified error_description",{error:t.error||"unspecified_error",code:t.error_code||"unspecified_code"});switch(r){case"implicit":if(this.flowType==="pkce")throw new Tv("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new nc("Not a valid implicit grant flow url.");break;default:}if(r==="pkce"){if(this._debug("#_initialize()","begin","is PKCE flow",!0),!t.code)throw new Tv("No code detected.");const{data:j,error:L}=await this._exchangeCodeForSession(t.code);if(L)throw L;const X=new URL(window.location.href);return X.searchParams.delete("code"),window.history.replaceState(window.history.state,"",X.toString()),{data:{session:j.session,redirectType:(a=j.redirectType)!==null&&a!==void 0?a:null},error:null}}const{provider_token:o,provider_refresh_token:c,access_token:u,refresh_token:f,expires_in:p,expires_at:m,token_type:y}=t;if(!u||!p||!f||!y)throw new nc("No session defined in URL");const g=Math.round(Date.now()/1e3),b=parseInt(p);let w=g+b;m&&(w=parseInt(m));const _=w-g;_*1e3<=Wr&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${_}s, should have been closer to ${b}s`);const x=w-b;g-x>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",x,w,g):g-x<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",x,w,g);const{data:E,error:R}=await this._getUser(u);if(R)throw R;const M={provider_token:o,provider_refresh_token:c,access_token:u,expires_in:b,expires_at:w,refresh_token:f,token_type:y,user:E.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),this._returnResult({data:{session:M,redirectType:t.type},error:null})}catch(o){if(re(o))return this._returnResult({data:{session:null,redirectType:null},error:o});throw o}}_isImplicitGrantCallback(t){return typeof this.detectSessionInUrl=="function"?this.detectSessionInUrl(new URL(window.location.href),t):!!(t.access_token||t.error||t.error_description||t.error_code)}async _isPKCECallback(t){const r=await yr(this.storage,`${this.storageKey}-code-verifier`);return!!(t.code&&r)}async signOut(t={scope:"global"}){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._signOut(t)):await this._signOut(t)}async _signOut({scope:t}={scope:"global"}){return await this._useSession(async r=>{var a;const{data:o,error:c}=r;if(c&&!ec(c))return this._returnResult({error:c});const u=(a=o.session)===null||a===void 0?void 0:a.access_token;if(u){const{error:f}=await this.admin.signOut(u,t);if(f&&!(MO(f)&&(f.status===404||f.status===401||f.status===403)||ec(f)))return this._returnResult({error:f})}return t!=="others"&&(await this._removeSession(),await mt(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({error:null})})}onAuthStateChange(t){const r=qO(),a={id:r,callback:t,unsubscribe:()=>{this._debug("#unsubscribe()","state change callback with id removed",r),this.stateChangeEmitters.delete(r)}};return this._debug("#onAuthStateChange()","registered callback with id",r),this.stateChangeEmitters.set(r,a),(async()=>(await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>{this._emitInitialSession(r)}):await this._emitInitialSession(r)))(),{data:{subscription:a}}}async _emitInitialSession(t){return await this._useSession(async r=>{var a,o;try{const{data:{session:c},error:u}=r;if(u)throw u;await((a=this.stateChangeEmitters.get(t))===null||a===void 0?void 0:a.callback("INITIAL_SESSION",c)),this._debug("INITIAL_SESSION","callback id",t,"session",c)}catch(c){await((o=this.stateChangeEmitters.get(t))===null||o===void 0?void 0:o.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",t,"error",c),ec(c)?console.warn(c):console.error(c)}})}async resetPasswordForEmail(t,r={}){let a=null,o=null;this.flowType==="pkce"&&([a,o]=await $a(this.storage,this.storageKey,!0));try{return await ce(this.fetch,"POST",`${this.url}/recover`,{body:{email:t,code_challenge:a,code_challenge_method:o,gotrue_meta_security:{captcha_token:r.captchaToken}},headers:this.headers,redirectTo:r.redirectTo})}catch(c){if(await mt(this.storage,`${this.storageKey}-code-verifier`),re(c))return this._returnResult({data:null,error:c});throw c}}async getUserIdentities(){var t;try{const{data:r,error:a}=await this.getUser();if(a)throw a;return this._returnResult({data:{identities:(t=r.user.identities)!==null&&t!==void 0?t:[]},error:null})}catch(r){if(re(r))return this._returnResult({data:null,error:r});throw r}}async linkIdentity(t){return"token"in t?this.linkIdentityIdToken(t):this.linkIdentityOAuth(t)}async linkIdentityOAuth(t){var r;try{const{data:a,error:o}=await this._useSession(async c=>{var u,f,p,m,y;const{data:g,error:b}=c;if(b)throw b;const w=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,t.provider,{redirectTo:(u=t.options)===null||u===void 0?void 0:u.redirectTo,scopes:(f=t.options)===null||f===void 0?void 0:f.scopes,queryParams:(p=t.options)===null||p===void 0?void 0:p.queryParams,skipBrowserRedirect:!0});return await ce(this.fetch,"GET",w,{headers:this.headers,jwt:(y=(m=g.session)===null||m===void 0?void 0:m.access_token)!==null&&y!==void 0?y:void 0})});if(o)throw o;return zt()&&!(!((r=t.options)===null||r===void 0)&&r.skipBrowserRedirect)&&window.location.assign(a?.url),this._returnResult({data:{provider:t.provider,url:a?.url},error:null})}catch(a){if(re(a))return this._returnResult({data:{provider:t.provider,url:null},error:a});throw a}}async linkIdentityIdToken(t){return await this._useSession(async r=>{var a;try{const{error:o,data:{session:c}}=r;if(o)throw o;const{options:u,provider:f,token:p,access_token:m,nonce:y}=t,g=await ce(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,jwt:(a=c?.access_token)!==null&&a!==void 0?a:void 0,body:{provider:f,id_token:p,access_token:m,nonce:y,link_identity:!0,gotrue_meta_security:{captcha_token:u?.captchaToken}},xform:Tn}),{data:b,error:w}=g;return w?this._returnResult({data:{user:null,session:null},error:w}
55):!b||!b.session||!b.user?this._returnResult({data:{user:null,session:null},error:new qa}):(b.session&&(await this._saveSession(b.session),await this._notifyAllSubscribers("USER_UPDATED",b.session)),this._returnResult({data:b,error:w}))}catch(o){if(await mt(this.storage,`${this.storageKey}-code-verifier`),re(o))return this._returnResult({data:{user:null,session:null},error:o});throw o}})}async unlinkIdentity(t){try{return await this._useSession(async r=>{var a,o;const{data:c,error:u}=r;if(u)throw u;return await ce(this.fetch,"DELETE",`${this.url}/user/identities/${t.identity_id}`,{headers:this.headers,jwt:(o=(a=c.session)===null||a===void 0?void 0:a.access_token)!==null&&o!==void 0?o:void 0})})}catch(r){if(re(r))return this._returnResult({data:null,error:r});throw r}}async _refreshAccessToken(t){const r="#_refreshAccessToken()";this._debug(r,"begin");try{const a=Date.now();return await KO(async o=>(o>0&&await VO(200*Math.pow(2,o-1)),this._debug(r,"refreshing attempt",o),await ce(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:t},headers:this.headers,xform:Tn})),(o,c)=>{const u=200*Math.pow(2,o);return c&&Tf(c)&&Date.now()+u-a<Wr})}catch(a){if(this._debug(r,"error",a),re(a))return this._returnResult({data:{session:null,user:null},error:a});throw a}finally{this._debug(r,"end")}}_isValidSession(t){return typeof t=="object"&&t!==null&&"access_token"in t&&"refresh_token"in t&&"expires_at"in t}async _handleProviderSignIn(t,r){const a=await this._getUrlForProvider(`${this.url}/authorize`,t,{redirectTo:r.redirectTo,scopes:r.scopes,queryParams:r.queryParams});return this._debug("#_handleProviderSignIn()","provider",t,"options",r,"url",a),zt()&&!r.skipBrowserRedirect&&window.location.assign(a),{data:{provider:t,url:a},error:null}}async _recoverAndRefresh(){var t,r;const a="#_recoverAndRefresh()";this._debug(a,"begin");try{const o=await yr(this.storage,this.storageKey);if(o&&this.userStorage){let u=await yr(this.userStorage,this.storageKey+"-user");!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!u&&(u={user:o.user},await Fa(this.userStorage,this.storageKey+"-user",u)),o.user=(t=u?.user)!==null&&t!==void 0?t:Rf()}else if(o&&!o.user&&!o.user){const u=await yr(this.storage,this.storageKey+"-user");u&&u?.user?(o.user=u.user,await mt(this.storage,this.storageKey+"-user"),await Fa(this.storage,this.storageKey,o)):o.user=Rf()}if(this._debug(a,"session from storage",o),!this._isValidSession(o)){this._debug(a,"session is not valid"),o!==null&&await this._removeSession();return}const c=((r=o.expires_at)!==null&&r!==void 0?r:1/0)*1e3-Date.now()<Ef;if(this._debug(a,`session has${c?"":" not"} expired with margin of ${Ef}s`),c){if(this.autoRefreshToken&&o.refresh_token){const{error:u}=await this._callRefreshToken(o.refresh_token);u&&(LO(u)?this._debug(a,"refresh discarded by commit guard",u):(console.error(u),Tf(u)||(this._debug(a,"refresh failed with a non-retryable error, removing the session",u),await this._removeSession())))}}else if(o.user&&o.user.__isUserNotAvailableProxy===!0)try{const{data:u,error:f}=await this._getUser(o.access_token);!f&&u?.user?(o.user=u.user,await this._saveSession(o),await this._notifyAllSubscribers("SIGNED_IN",o)):this._debug(a,"could not get user data, skipping SIGNED_IN notification")}catch(u){console.error("Error getting user data:",u),this._debug(a,"error getting user data, skipping SIGNED_IN notification",u)}else await this._notifyAllSubscribers("SIGNED_IN",o)}catch(o){this._debug(a,"error",o),console.error(o);return}finally{this._debug(a,"end")}}async _callRefreshToken(t){var r,a;if(!t)throw new Tt;if(this.refreshingDeferred)return this.refreshingDeferred.promise;const o="#_callRefreshToken()";this._debug(o,"begin");try{this.refreshingDeferred=new Gc;const c=await yr(this.storage,this.storageKey),{data:u,error:f}=await this._refreshAccessToken(t);if(f)throw f;if(!u.session)throw new Tt;const p=await yr(this.storage,this.storageKey);if(c!==null&&(p===null||p.refresh_token!==c.refresh_token)){this._debug(o,"commit guard: storage changed since refresh started, discarding rotated tokens",{startedWith:"present",nowHolds:p?"replaced":"cleared"});const b={data:null,error:new Rv};return this.refreshingDeferred.resolve(b),b}const y=this._sessionRemovalEpoch;if(await this._saveSession(u.session),this._sessionRemovalEpoch!==y){this._debug(o,"commit guard (post-save): _removeSession ran during _saveSession, und
55oing write"),await mt(this.storage,this.storageKey),this.userStorage&&await mt(this.userStorage,this.storageKey+"-user");const b={data:null,error:new Rv};return this.refreshingDeferred.resolve(b),b}await this._notifyAllSubscribers("TOKEN_REFRESHED",u.session);const g={data:u.session,error:null};return this.refreshingDeferred.resolve(g),g}catch(c){if(this._debug(o,"error",c),re(c)){const u={data:null,error:c};return Tf(c)||await this._removeSession(),(r=this.refreshingDeferred)===null||r===void 0||r.resolve(u),u}throw(a=this.refreshingDeferred)===null||a===void 0||a.reject(c),c}finally{this.refreshingDeferred=null,this._debug(o,"end")}}async _notifyAllSubscribers(t,r,a=!0){const o=`#_notifyAllSubscribers(${t})`;this._debug(o,"begin",r,`broadcast = ${a}`);try{this.broadcastChannel&&a&&this.broadcastChannel.postMessage({event:t,session:r});const c=[],u=Array.from(this.stateChangeEmitters.values()).map(async f=>{try{await f.callback(t,r)}catch(p){c.push(p)}});if(await Promise.all(u),c.length>0){for(let f=0;f<c.length;f+=1)console.error(c[f]);throw c[0]}}finally{this._debug(o,"end")}}async _saveSession(t){this._debug("#_saveSession()",t),this.suppressGetSessionWarning=!0,await mt(this.storage,`${this.storageKey}-code-verifier`);const r=Object.assign({},t),a=r.user&&r.user.__isUserNotAvailableProxy===!0;if(this.userStorage){!a&&r.user&&await Fa(this.userStorage,this.storageKey+"-user",{user:r.user});const o=Object.assign({},r);delete o.user;const c=kv(o);await Fa(this.storage,this.storageKey,c)}else{const o=kv(r);await Fa(this.storage,this.storageKey,o)}}async _removeSession(){this._sessionRemovalEpoch+=1,this._debug("#_removeSession()"),this.suppressGetSessionWarning=!1,await mt(this.storage,this.storageKey),await mt(this.storage,this.storageKey+"-code-verifier"),await mt(this.storage,this.storageKey+"-user"),this.userStorage&&await mt(this.userStorage,this.storageKey+"-user"),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const t=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{t&&zt()&&window?.removeEventListener&&window.removeEventListener("visibilitychange",t)}catch(r){console.error("removing visibilitychange callback failed",r)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const t=setInterval(()=>this._autoRefreshTokenTick(),Wr);this.autoRefreshTicker=t,t&&typeof t=="object"&&typeof t.unref=="function"?t.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(t);const r=setTimeout(async()=>{await this.initializePromise,await this._autoRefreshTokenTick()},0);this.autoRefreshTickTimeout=r,r&&typeof r=="object"&&typeof r.unref=="function"?r.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(r)}async _stopAutoRefresh(){this._debug("#_stopAutoRefresh()");const t=this.autoRefreshTicker;this.autoRefreshTicker=null,t&&clearInterval(t);const r=this.autoRefreshTickTimeout;this.autoRefreshTickTimeout=null,r&&clearTimeout(r)}async startAutoRefresh(){this._removeVisibilityChangedCallback(),await this._startAutoRefresh()}async stopAutoRefresh(){this._removeVisibilityChangedCallback(),await this._stopAutoRefresh()}async dispose(){var t;this._removeVisibilityChangedCallback(),await this._stopAutoRefresh(),(t=this.broadcastChannel)===null||t===void 0||t.close(),this.broadcastChannel=null,this.stateChangeEmitters.clear()}async _autoRefreshTokenTick(){if(this._debug("#_autoRefreshTokenTick()","begin"),this.lock!=null){try{await this._acquireLock(0,async()=>{try{const t=Date.now();try{return await this._useSession(async r=>{const{data:{session:a}}=r;if(!a||!a.refresh_token||!a.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const o=Math.floor((a.expires_at*1e3-t)/Wr);this._debug("#_autoRefreshTokenTick()",`access token expires in ${o} ticks, a tick lasts ${Wr}ms, refresh threshold is ${io} ticks`),o<=io&&await this._callRefreshToken(a.refresh_token)})}catch(r){console.error("Auto refresh tick failed with error. This is likely a transient error.",r)}}finally{this._debug("#_autoRefreshTokenTick()","end")}})}catch(t){if(t instanceof uC)this._debug("auto refresh token tick lock not available");else throw t}return}if(this.refreshingDeferred!==null){this._debug("#_autoRefreshTokenTick()","refresh already in flight, skipping");return}try{const t=Date.now();try{await this._useSession(async r=>{const{data:{session:a}}=r;if(!a||!a.refresh_token||!a.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const o=Math.floor((a.expires_at*1e3-t)/Wr);this._debug("#_autoRefreshTokenTick()",`access token expires in ${o} ticks, a tick lasts ${Wr}ms, refresh threshold is ${io} ticks`),o<=io&&await this._callRefreshToken(a.refresh_token)})}catch(r){console.error("Auto refresh tick failed with error. This is likely a transient error.",r)}}finally{this._debug("#_autoRefreshTokenTick()","end")}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!zt()||!window?.addEventListener)return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=async()=>{try{await this._onVisibilityChanged(!1)}catch(t){this._debug("#visibilityChangedCallback","error",t)}},window?.addEventListener("visibilitychange",this.visibilityChangedCallback),await this._onVisibilityChanged(!0)}catch(t){console.error("_handleVisibilityChange",t)}}async _onVisibilityChanged(t){const r=`#_onVisibilityChanged(${t})`;if(this._debug(r,"visibilityState",document.visibilityState),document.visibilityState==="visible"){if(this.autoRefreshToken&&this._startAutoRefresh(),!t)if(await this.initializePromise,this.lock!=null)await this._acquireLock(this.lockAcquireTimeout,async()=>
55{if(document.visibilityState!=="visible"){this._debug(r,"acquired the lock to recover the session, but the browser visibilityState is no longer visible, aborting");return}await this._recoverAndRefresh()});else{if(document.visibilityState!=="visible"){this._debug(r,"visibilityState is no longer visible, skipping recovery");return}await this._recoverAndRefresh()}}else document.visibilityState==="hidden"&&this.autoRefreshToken&&this._stopAutoRefresh()}async _getUrlForProvider(t,r,a){const o=[`provider=${encodeURIComponent(r)}`];if(a?.redirectTo&&o.push(`redirect_to=${encodeURIComponent(a.redirectTo)}`),a?.scopes&&o.push(`scopes=${encodeURIComponent(a.scopes)}`),this.flowType==="pkce"){const[c,u]=await $a(this.storage,this.storageKey),f=new URLSearchParams({code_challenge:`${encodeURIComponent(c)}`,code_challenge_method:`${encodeURIComponent(u)}`});o.push(f.toString())}if(a?.queryParams){const c=new URLSearchParams(a.queryParams);o.push(c.toString())}return a?.skipBrowserRedirect&&o.push(`skip_http_redirect=${a.skipBrowserRedirect}`),`${t}?${o.join("&")}`}async _unenroll(t){try{return await this._useSession(async r=>{var a;const{data:o,error:c}=r;return c?this._returnResult({data:null,error:c}):await ce(this.fetch,"DELETE",`${this.url}/factors/${t.factorId}`,{headers:this.headers,jwt:(a=o?.session)===null||a===void 0?void 0:a.access_token})})}catch(r){if(re(r))return this._returnResult({data:null,error:r});throw r}}async _enroll(t){try{return await this._useSession(async r=>{var a,o;const{data:c,error:u}=r;if(u)return this._returnResult({data:null,error:u});const f=Object.assign({friendly_name:t.friendlyName,factor_type:t.factorType},t.factorType==="phone"?{phone:t.phone}:t.factorType==="totp"?{issuer:t.issuer}:{}),{data:p,error:m}=await ce(this.fetch,"POST",`${this.url}/factors`,{body:f,headers:this.headers,jwt:(a=c?.session)===null||a===void 0?void 0:a.access_token});return m?this._returnResult({data:null,error:m}):(t.factorType==="totp"&&p.type==="totp"&&(!((o=p?.totp)===null||o===void 0)&&o.qr_code)&&(p.totp.qr_code=`data:image/svg+xml;utf-8,${p.totp.qr_code}`),this._returnResult({data:p,error:null}))})}catch(r){if(re(r))return this._returnResult({data:null,error:r});throw r}}async _verify(t){const r=async()=>{try{return await this._useSession(async a=>{var o;const{data:c,error:u}=a;if(u)return this._returnResult({data:null,error:u});const f=Object.assign({challenge_id:t.challengeId},"webauthn"in t?{webauthn:Object.assign(Object.assign({},t.webauthn),{credential_response:t.webauthn.type==="create"?zv(t.webauthn.credential_response):Pv(t.webauthn.credential_response)})}:{code:t.code}),{data:p,error:m}=await ce(this.fetch,"POST",`${this.url}/factors/${t.factorId}/verify`,{body:f,headers:this.headers,jwt:(o=c?.session)===null||o===void 0?void 0:o.access_token});return m?this._returnResult({data:null,error:m}):(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+p.expires_in},p)),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",p),this._returnResult({data:p,error:m}))})}catch(a){if(re(a))return this._returnResult({data:null,error:a});throw a}};return this.lock!=null?this._acquireLock(this.lockAcquireTimeout,r):r()}async _challenge(t){const r=async()=>{try{return await this._useSession(async a=>{var o;const{data:c,error:u}=a;if(u)return this._returnResult({data:null,error:u});const f=await ce(this.fetch,"POST",`${this.url}/factors/${t.factorId}/challenge`,{body:t,headers:this.headers,jwt:(o=c?.session)===null||o===void 0?void 0:o.access_token});if(f.error)return f;const{data:p}=f;if(p.type!=="webauthn")return{data:p,error:null};switch(p.webauthn.type){case"create":return{data:Object.assign(Object.assign({},p),{webauthn:Object.assign(Object.assign({},p.webauthn),{credential_options:Object.assign(Object.assign({},p.webauthn.credential_options),{publicKey:Lv(p.webauthn.credential_options.publicKey)})})}),error:null};case"request":return{data:Object.assign(Object.assign({},p),{webauthn:Object.assign(Object.assign({},p.webauthn),{credential_options:Object.assign(Object.assign({},p.webauthn.credential_options),{publicKey:Uv(p.webauthn.credential_options.publicKey)})})}),error:null}}})}catch(a){if(re(a))return this._returnResult({data:null,error:a});throw a}};return this.lock!=null?this._acquireLock(this.lockAcquireTimeout,r):r()}async _challengeAndVerify(t){const{data:r,error:a}=await this._challenge({factorId:t.factorId});return a?this._returnResult({data:null,error:a}):await this._verify({factorId:t.factorId,challengeId:r.id,code:t.code})}async _listFactors(){var t;const{data:{user:r},error:a}=await this.getUser();if(a)return{data:null,error:a};const o={all:[],phone:[],totp:[],webauthn:[]};for(const c of(t=r?.factors)!==null&&t!==void 0?t:[])o.all.push(c),c.status==="verified"&&o[c.factor_type].push(c);return{data:o,error:null}}async _getAuthenticatorAssuranceLevel(t){var r,a,o,c;if(t)try{const{payload:w}=rc(t);let _=null;w.aal&&(_=w.aal);let x=_;const{data:{user:E},error:R}=await this.getUser(t);if(R)return this._returnResult({data:null,error:R});((a=(r=E?.factors)===null||r===void 0?void 0:r.filter(L=>L.status==="verified"))!==null&&a!==void 0?a:[]).length>0&&(x="aal2");const j=w.amr||[];return{data:{currentLevel:_,nextLevel:x,currentAuthenticationMethods:j},error:null}}catch(w){if(re(w))return this._returnResult({data:null,error:w});throw w}const{data:{session:u},error:f}
55=await this.getSession();if(f)return this._returnResult({data:null,error:f});if(!u)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const{payload:p}=rc(u.access_token);let m=null;p.aal&&(m=p.aal);let y=m;((c=(o=u.user.factors)===null||o===void 0?void 0:o.filter(w=>w.status==="verified"))!==null&&c!==void 0?c:[]).length>0&&(y="aal2");const b=p.amr||[];return{data:{currentLevel:m,nextLevel:y,currentAuthenticationMethods:b},error:null}}async _getAuthorizationDetails(t){try{return await this._useSession(async r=>{const{data:{session:a},error:o}=r;return o?this._returnResult({data:null,error:o}):a?await ce(this.fetch,"GET",`${this.url}/oauth/authorizations/${t}`,{headers:this.headers,jwt:a.access_token,xform:c=>({data:c,error:null})}):this._returnResult({data:null,error:new Tt})})}catch(r){if(re(r))return this._returnResult({data:null,error:r});throw r}}async _approveAuthorization(t,r){try{return await this._useSession(async a=>{const{data:{session:o},error:c}=a;if(c)return this._returnResult({data:null,error:c});if(!o)return this._returnResult({data:null,error:new Tt});const u=await ce(this.fetch,"POST",`${this.url}/oauth/authorizations/${t}/consent`,{headers:this.headers,jwt:o.access_token,body:{action:"approve"},xform:f=>({data:f,error:null})});return u.data&&u.data.redirect_url&&zt()&&!r?.skipBrowserRedirect&&window.location.assign(u.data.redirect_url),u})}catch(a){if(re(a))return this._returnResult({data:null,error:a});throw a}}async _denyAuthorization(t,r){try{return await this._useSession(async a=>{const{data:{session:o},error:c}=a;if(c)return this._returnResult({data:null,error:c});if(!o)return this._returnResult({data:null,error:new Tt});const u=await ce(this.fetch,"POST",`${this.url}/oauth/authorizations/${t}/consent`,{headers:this.headers,jwt:o.access_token,body:{action:"deny"},xform:f=>({data:f,error:null})});return u.data&&u.data.redirect_url&&zt()&&!r?.skipBrowserRedirect&&window.location.assign(u.data.redirect_url),u})}catch(a){if(re(a))return this._returnResult({data:null,error:a});throw a}}async _listOAuthGrants(){try{return await this._useSession(async t=>{const{data:{session:r},error:a}=t;return a?this._returnResult({data:null,error:a}):r?await ce(this.fetch,"GET",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:r.access_token,xform:o=>({data:o,error:null})}):this._returnResult({data:null,error:new Tt})})}catch(t){if(re(t))return this._returnResult({data:null,error:t});throw t}}async _revokeOAuthGrant(t){try{return await this._useSession(async r=>{const{data:{session:a},error:o}=r;return o?this._returnResult({data:null,error:o}):a?(await ce(this.fetch,"DELETE",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:a.access_token,query:{client_id:t.clientId},noResolveJson:!0}),{data:{},error:null}):this._returnResult({data:null,error:new Tt})})}catch(r){if(re(r))return this._returnResult({data:null,error:r});throw r}}async fetchJwk(t,r={keys:[]}){let a=r.keys.find(f=>f.kid===t);if(a)return a;const o=Date.now();if(a=this.jwks.keys.find(f=>f.kid===t),a&&this.jwks_cached_at+kO>o)return a;const{data:c,error:u}=await ce(this.fetch,"GET",`${this.url}/.well-known/jwks.json`,{headers:this.headers});if(u)throw u;return!c.keys||c.keys.length===0||(this.jwks=c,this.jwks_cached_at=o,a=c.keys.find(f=>f.kid===t),!a)?null:a}async getClaims(t,r={}){try{let a=t;if(!a){const{data:w,error:_}
55=await this.getSession();if(_||!w.session)return this._returnResult({data:null,error:_});a=w.session.access_token}const{header:o,payload:c,signature:u,raw:{header:f,payload:p}}=rc(a);if(!r?.allowExpired)try{WO(c.exp)}catch(w){throw new Ec(w instanceof Error?w.message:"JWT validation failed")}const m=!o.alg||o.alg.startsWith("HS")||!o.kid||!("crypto"in globalThis&&"subtle"in globalThis.crypto)?null:await this.fetchJwk(o.kid,r?.keys?{keys:r.keys}:r?.jwks);if(!m){const{error:w}=await this.getUser(a);if(w)throw w;return{data:{claims:c,header:o,signature:u},error:null}}const y=eC(o.alg),g=await crypto.subtle.importKey("jwk",m,y,!0,["verify"]);if(!await crypto.subtle.verify(y,g,u,IO(`${f}.${p}`)))throw new Ec("Invalid JWT signature");return{data:{claims:c,header:o,signature:u},error:null}}catch(a){if(re(a))return this._returnResult({data:null,error:a});throw a}}async signInWithPasskey(t){var r,a,o;jn(this.experimental);try{if(!xc())return this._returnResult({data:null,error:new Dn("Browser does not support WebAuthn",null)});const{data:c,error:u}=await this._startPasskeyAuthentication({options:{captchaToken:(r=t?.options)===null||r===void 0?void 0:r.captchaToken}});if(u||!c)return this._returnResult({data:null,error:u});const f=Uv(c.options),p=(o=(a=t?.options)===null||a===void 0?void 0:a.signal)!==null&&o!==void 0?o:Xf.createNewAbortSignal(),{data:m,error:y}=await q0({publicKey:f,signal:p});if(y||!m)return this._returnResult({data:null,error:y??new Dn("WebAuthn ceremony failed",null)});const g=Pv(m);return this._verifyPasskeyAuthentication({challengeId:c.challenge_id,credential:g})}catch(c){if(re(c))return this._returnResult({data:null,error:c});throw c}}async registerPasskey(t){var r,a;jn(this.experimental);try{if(!xc())return this._returnResult({data:null,error:new Dn("Browser does not support WebAuthn",null)});const{data:o,error:c}=await this._startPasskeyRegistration();if(c||!o)return this._returnResult({data:null,error:c});const u=Lv(o.options),f=(a=(r=t?.options)===null||r===void 0?void 0:r.signal)!==null&&a!==void 0?a:Xf.createNewAbortSignal(),{data:p,error:m}=await H0({publicKey:u,signal:f});if(m||!p)return this._returnResult({data:null,error:m??new Dn("WebAuthn ceremony failed",null)});const y=zv(p);return this._verifyPasskeyRegistration({challengeId:o.challenge_id,credential:y})}catch(o){if(re(o))return this._returnResult({data:null,error:o});throw o}}async _startPasskeyRegistration(){jn(this.experimental);try{return await this._useSession(async t=>{const{data:{session:r},error:a}=t;if(a)return this._returnResult({data:null,error:a});if(!r)return this._returnResult({data:null,error:new Tt});const{data:o,error:c}=await ce(this.fetch,"POST",`${this.url}/passkeys/registration/options`,{headers:this.headers,jwt:r.access_token,body:{}});return c?this._returnResult({data:null,error:c}):this._returnResult({data:o,error:null})})}catch(t){if(re(t))return this._returnResult({data:null,error:t});throw t}}async _verifyPasskeyRegistration(t){jn(this.experimental);try{return await this._useSession(async r=>{const{data:{session:a},error:o}=r;if(o)return this._returnResult({data:null,error:o});if(!a)return this._returnResult({data:null,error:new Tt});const{data:c,error:u}=await ce(this.fetch,"POST",`${this.url}/passkeys/registration/verify`,{headers:this.headers,jwt:a.access_token,body:{challenge_id:t.challengeId,credential:t.credential}});return u?this._returnResult({data:null,error:u}):this._returnResult({data:c,error:null})})}catch(r){if(re(r))return this._returnResult({data:null,error:r});throw r}}async _startPasskeyAuthentication(t){var r;jn(this.experimental);try{const{data:a,error:o}=await ce(this.fetch,"POST",`${this.url}/passkeys/authentication/options`,{headers:this.headers,body:{gotrue_meta_security:{captcha_token:(r=t?.options)===null||r===void 0?void 0:r.captchaToken}}});return o?this._returnResult({data:null,error:o}):this._returnResult({data:a,error:null})}catch(a){if(re(a))return this._returnResult({data:null,error:a});throw a}}async _verifyPasskeyAuthentication(t){jn(this.experimental);try{const{data:r,error:a}=await ce(this.fetch,"POST",`${this.url}/passkeys/authentication/verify`,{headers:this.headers,body:{challenge_id:t.challengeId,credential:t.credential},xform:Tn});return a?this._returnResult({data:null,error:a}):(r.session&&(await this._saveSession(r.session),await this._notifyAllSubscribers("SIGNED_IN",r.session)),this._returnResult({data:r,error:null}))}catch(r){if(re(r))return this._returnResult({data:null,error:r});throw r}}async _listPasskeys(){jn(this.experimental);try{return await this._useSession(async t=>{const{data:{session:r},error:a}=t;if(a)return this._returnResult({data:null,error:a});if(!r)return this._returnResult({data:null,error:new Tt});const{data:o,error:c}=await ce(this.fetch,"GET",`${this.url}/passkeys`,{headers:this.headers,jwt:r.access_token,xform:u=>({data:u,error:null})});return c?this._returnResult({data:null,error:c}):this._returnResult({data:o,error:null})})}catch(t){if(re(t))return this._returnResult({data:null,error:t});throw t}}async _updatePasskey(t){jn(this.experimental);try{return await this._useSession(async r=>{const{data:{session:a},error:o}=r;if(o)return this._returnResult({data:null,error:o});if(!a)return this._returnResult({data:null,error:new Tt});const{data:c,error:u}=await ce(this.fetch,"PATCH",`${this.url}/passkeys/${t.passkeyId}`,{headers:this.headers,jwt:a.access_token,body:{friendly_name:t.friendlyName}});return u?this._returnResult({data:null,error:u}):this._returnResult({data:c,error:null})})}catch(r){if(re(r))return this._returnResult({data:null,error:r});throw r}}async _deletePasskey(t){jn(this.experimental);try{return await this._useSession(async r=>{const{data:{session:a},error:o}=r;if(o)return this._returnResult({data:null,error:o});if(!a)return this._returnResult({data:null,error:new Tt});const{error:c}
55=await ce(this.fetch,"DELETE",`${this.url}/passkeys/${t.passkeyId}`,{headers:this.headers,jwt:a.access_token,noResolveJson:!0});return c?this._returnResult({data:null,error:c}):this._returnResult({data:null,error:null})})}catch(r){if(re(r))return this._returnResult({data:null,error:r});throw r}}}So.nextInstanceID={};const TC=So,RC="2.107.0";let oo="",Oc;if(typeof Deno<"u"){var Af;oo="deno",Oc=(Af=Deno.version)===null||Af===void 0?void 0:Af.deno}else if(typeof document<"u")oo="web";else if(typeof navigator<"u"&&navigator.product==="ReactNative")oo="react-native";else{var Of;oo="node",Oc=typeof process<"u"?(Of=process.version)===null||Of===void 0?void 0:Of.replace(/^v/,""):void 0}const $0=[`runtime=${oo}`];Oc&&$0.push(`runtime-version=${Oc}`);const xC={"X-Client-Info":`supabase-js/${RC}; ${$0.join("; ")}`},AC={headers:xC},OC={schema:"public"},CC={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},kC={},jC={enabled:!1,respectSamplingDecision:!0};function MC(e,t,r,a){function o(c){return c instanceof r?c:new r(function(u){u(c)})}return new(r||(r=Promise))(function(c,u){function f(y){try{m(a.next(y))}catch(g){u(g)}}function p(y){try{m(a.throw(y))}catch(g){u(g)}}function m(y){y.done?c(y.value):o(y.value).then(f,p)}m((a=a.apply(e,[])).next())})}let Cf=null;const NC="@opentelemetry/api";function DC(){return Cf===null&&(Cf=import(NC).catch(()=>null)),Cf}function LC(){return MC(this,void 0,void 0,function*(){try{const e=yield DC();if(!e||!e.propagation||!e.context)return null;const t={};e.propagation.inject(e.context.active(),t);const r=t.traceparent;return r?{traceparent:r,tracestate:t.tracestate,baggage:t.baggage}:null}catch{return null}})}function UC(e){if(!e||typeof e!="string")return null;const t=e.split("-");if(t.length!==4)return null;const[r,a,o,c]=t;if(r.length!==2||a.length!==32||o.length!==16||c.length!==2)return null;const u=/^[0-9a-f]+$/i;return!u.test(r)||!u.test(a)||!u.test(o)||!u.test(c)||a==="00000000000000000000000000000000"||o==="0000000000000000"?null:{version:r,traceId:a,parentId:o,traceFlags:c,isSampled:(parseInt(c,16)&1)===1}}function zC(e,t){if(!e||!t||t.length===0)return!1;let r;if(e instanceof URL)r=e;else try{r=new URL(e)}catch{return!1}for(const a of t)try{if(typeof a=="string"){if(PC(r.hostname,a))return!0}else if(a instanceof RegExp){if(a.test(r.hostname))return!0}else if(typeof a=="function"&&a(r))return!0}catch{continue}return!1}function PC(e,t){if(t===e)return!0;if(t.startsWith("*.")){const r=t.slice(2);if(e.endsWith(r)&&(e===r||e.endsWith("."+r)))return!0}return!1}function BC(e){const t=[];try{const r=new URL(e);t.push(r.hostname)}catch{}return t.push("*.supabase.co","*.supabase.in"),t.push("localhost","127.0.0.1","[::1]"),t}function Eo(e){"@babel/helpers - typeof";return Eo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Eo(e)}function IC(e,t){if(Eo(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var a=r.call(e,t);if(Eo(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function HC(e){var t=IC(e,"string");return Eo(t)=="symbol"?t:t+""}function qC(e,t,r){return(t=HC(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Bv(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,a)}return r}function nt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Bv(Object(r),!0).forEach(function(a){qC(e,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Bv(Object(r)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(r,a))})}return e}const $C=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),GC=()=>Headers,VC=(e,t,r,a,o)=>{const c=$C(a),u=GC(),f=o?.enabled===!0,p=o?.respectSamplingDecision!==!1,m=f?BC(t):null;return async(y,g)=>{var b;const w=(b=await r())!==null&&b!==void 0?b:e;let _=new u(g?.headers);if(_.has("apikey")||_.set("apikey",e),_.has("Authorization")||_.set("Authorization",`Bearer ${w}`),m){const x=await KC(y,m,p);x&&(x.traceparent&&!_.has("traceparent")&&_.set("traceparent",x.traceparent),x.tracestate&&!_.has("tracestate")&&_.set("tracestate",x.tracestate),x.baggage&&!_.has("baggage")&&_.set("baggage",x.baggage))}return c(y,nt(nt({},g),{},{headers:_}))}};async function KC(e,t,r){if(!zC(typeof e=="string"||e instanceof URL?e:e.url,t))return null;const a=await LC();if(!a||!a.traceparent)return null;if(r){const o=UC(a.traceparent);if(o&&!o.isSampled)return null}return a}function Iv(e){return typeof e=="boolean"?{enabled:e}:e}function YC(e){return e.endsWith("/")?e:e+"/"}function FC(e,t){var r,a,o,c,u,f;const{db:p,auth:m,realtime:y,global:g}=e,{db:b,auth:w,realtime:_,global:x}=t,E=Iv(e.tracePropagation),R=Iv(t.tracePropagation),M={db:nt(nt({},b),p),auth:nt(nt({},w),m),realtime:nt(nt({},_),y),storage:{},global:nt(nt(nt({},x),g),{},{headers:nt(nt({},(r=x?.headers)!==null&&r!==void 0?r:{}),(a=g?.headers)!==null&&a!==void 0?a:{})}),tracePropagation:{enabled:(o=(c=E?.enabled)!==null&&c!==void 0?c:R?.enabled)!==null&&o!==void 0?o:!1,respectSamplingDecision:(u=(f=E?.respectSamplingDecision)!==null&&f!==void 0?f:R?.respectSamplingDecision)!==null&&u!==void 0?u:!0},accessToken:async()=>""};return e.accessToken?M.accessToken=e.accessToken:delete M.accessToken,M}function JC(e){const t=e?.trim();if(!t)throw new Error("supabaseUrl is required.");
55if(!t.match(/^https?:\/\//i))throw new Error("Invalid supabaseUrl: Must be a valid HTTP or HTTPS URL.");try{return new URL(YC(t))}catch{throw Error("Invalid supabaseUrl: Provided URL is malformed.")}}var QC=class extends TC{constructor(e){super(e)}},XC=class{constructor(e,t,r){var a,o;this.supabaseUrl=e,this.supabaseKey=t;const c=JC(e);if(!t)throw new Error("supabaseKey is required.");this.realtimeUrl=new URL("realtime/v1",c),this.realtimeUrl.protocol=this.realtimeUrl.protocol.replace("http","ws"),this.authUrl=new URL("auth/v1",c),this.storageUrl=new URL("storage/v1",c),this.functionsUrl=new URL("functions/v1",c);const u=`sb-${c.hostname.split(".")[0]}-auth-token`,f={db:OC,realtime:kC,auth:nt(nt({},CC),{},{storageKey:u}),global:AC,tracePropagation:jC},p=FC(r??{},f);if(this.settings=p,this.storageKey=(a=p.auth.storageKey)!==null&&a!==void 0?a:"",this.headers=(o=p.global.headers)!==null&&o!==void 0?o:{},p.accessToken)this.accessToken=p.accessToken,this.auth=new Proxy({},{get:(y,g)=>{throw new Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(g)} is not possible`)}});else{var m;this.auth=this._initSupabaseAuthClient((m=p.auth)!==null&&m!==void 0?m:{},this.headers,p.global.fetch)}this.fetch=VC(t,e,this._getAccessToken.bind(this),p.global.fetch,p.tracePropagation),this.realtime=this._initRealtimeClient(nt({headers:this.headers,accessToken:this._getAccessToken.bind(this),fetch:this.fetch},p.realtime)),this.accessToken&&Promise.resolve(this.accessToken()).then(y=>this.realtime.setAuth(y)).catch(y=>console.warn("Failed to set initial Realtime auth token:",y)),this.rest=new fA(new URL("rest/v1",c).href,{headers:this.headers,schema:p.db.schema,fetch:this.fetch,timeout:p.db.timeout,urlLengthLimit:p.db.urlLengthLimit}),this.storage=new RO(this.storageUrl.href,this.headers,this.fetch,r?.storage),p.accessToken||this._listenForAuthEvents()}get functions(){return new rA(this.functionsUrl.href,{headers:this.headers,customFetch:this.fetch})}from(e){return this.rest.from(e)}schema(e){return this.rest.schema(e)}rpc(e,t={},r={head:!1,get:!1,count:void 0}){return this.rest.rpc(e,t,r)}channel(e,t={config:{}}){return this.realtime.channel(e,t)}getChannels(){return this.realtime.getChannels()}removeChannel(e){return this.realtime.removeChannel(e)}removeAllChannels(){return this.realtime.removeAllChannels()}async _getAccessToken(){var e=this,t,r;if(e.accessToken)return await e.accessToken();const{data:a}=await e.auth.getSession();return(t=(r=a.session)===null||r===void 0?void 0:r.access_token)!==null&&t!==void 0?t:e.supabaseKey}_initSupabaseAuthClient({autoRefreshToken:e,persistSession:t,detectSessionInUrl:r,storage:a,userStorage:o,storageKey:c,flowType:u,lock:f,debug:p,throwOnError:m,experimental:y,lockAcquireTimeout:g,skipAutoInitialize:b},w,_){const x={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new QC({url:this.authUrl.href,headers:nt(nt({},x),w),storageKey:c,autoRefreshToken:e,persistSession:t,detectSessionInUrl:r,storage:a,userStorage:o,flowType:u,lock:f,debug:p,throwOnError:m,experimental:y,fetch:_,lockAcquireTimeout:g,skipAutoInitialize:b,hasCustomAuthorizationHeader:Object.keys(this.headers).some(E=>E.toLowerCase()==="authorization")})}_initRealtimeClient(e){return new FA(this.realtimeUrl.href,nt(nt({},e),{},{params:nt(nt({},{apikey:this.supabaseKey}),e?.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((e,t)=>{this._handleTokenChanged(e,"CLIENT",t?.access_token)})}_handleTokenChanged(e,t,r){(e==="TOKEN_REFRESHED"||e==="SIGNED_IN")&&this.changedAccessToken!==r?(this.changedAccessToken=r,this.realtime.setAuth(r)):e==="SIGNED_OUT"&&(this.realtime.setAuth(),t=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}};const ZC=(e,t,r)=>new XC(e,t,r);function WC(){if(typeof window<"u")return!1;const e=globalThis.process;if(!e)return!1;const t=e.version;if(t==null)return!1;const r=t.match(/^v(\d+)\./);return r?parseInt(r[1],10)<=18:!1}WC()&&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 N
55ode.js 20 or later. For more information, visit: https://github.com/orgs/supabase/discussions/37217");function ek(){return ZC("https://rqtnsrcqvgdcufwmrbih.supabase.co","eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InJxdG5zcmNxdmdkY3Vmd21yYmloIiwicm9sZSI6ImFub24iLCJpYXQiOjE3ODA2NTM3OTYsImV4cCI6MjA5NjIyOTc5Nn0.b5F6gqS5C8tvS7MlHJRczOXfBfsywxP5E5Ruo0T3HEw",{auth:{storage:typeof window<"u"?localStorage:void 0,persistSession:!0,autoRefreshToken:!0}})}let kf;const tk=new Proxy({},{get(e,t,r){return kf||(kf=ek()),Reflect.get(kf,t,r)}}),nk=$s({type:"function"}).client(async({next:e})=>{const{data:t}=await tk.auth.getSession(),r=t.session?.access_token;return e({headers:r?{Authorization:`Bearer ${r}`}:{}})}),rk=$s(),Hv=Wx(()=>({functionMiddleware:[nk],requestMiddleware:[rk]}));var Vc=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},sk=class extends Vc{#e;#n;#t;constructor(){super(),this.#t=e=>{if(typeof window<"u"&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#n||this.setEventListener(this.#t)}onUnsubscribe(){this.hasListeners()||(this.#n?.(),this.#n=void 0)}setEventListener(e){this.#t=e,this.#n?.(),this.#n=e(t=>{typeof t=="boolean"?this.setFocused(t):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},G0=new sk,ak={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},ik=class{#e=ak;#n=!1;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}},Zf=new ik;function ok(e){setTimeout(e,0)}var lk=typeof window>"u"||"Deno"in globalThis;function Nn(){}function ck(e,t){return typeof e=="function"?e(t):e}function uk(e){return typeof e=="number"&&e>=0&&e!==1/0}function dk(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Wf(e,t){return typeof e=="function"?e(t):e}function fk(e,t){return typeof e=="function"?e(t):e}function qv(e,t){const{type:r="all",exact:a,fetchStatus:o,predicate:c,queryKey:u,stale:f}=e;if(u){if(a){if(t.queryHash!==yh(u,t.options))return!1}else if(!Ro(t.queryKey,u))return!1}if(r!=="all"){const p=t.isActive();if(r==="active"&&!p||r==="inactive"&&p)return!1}return!(typeof f=="boolean"&&t.isStale()!==f||o&&o!==t.state.fetchStatus||c&&!c(t))}function $v(e,t){const{exact:r,status:a,predicate:o,mutationKey:c}=e;if(c){if(!t.options.mutationKey)return!1;if(r){if(To(t.options.mutationKey)!==To(c))return!1}else if(!Ro(t.options.mutationKey,c))return!1}return!(a&&t.state.status!==a||o&&!o(t))}function yh(e,t){return(t?.queryKeyHashFn||To)(e)}function To(e){return JSON.stringify(e,(t,r)=>eh(r)?Object.keys(r).sort().reduce((a,o)=>(a[o]=r[o],a),{}):r)}function Ro(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>Ro(e[r],t[r])):!1}var hk=Object.prototype.hasOwnProperty;function V0(e,t,r=0){if(e===t)return e;if(r>500)return t;const a=Gv(e)&&Gv(t);if(!a&&!(eh(e)&&eh(t)))return t;const c=(a?e:Object.keys(e)).length,u=a?t:Object.keys(t),f=u.length,p=a?new Array(f):{};let m=0;for(let y=0;y<f;y++){const g=a?y:u[y],b=e[g],w=t[g];if(b===w){p[g]=b,(a?y<c:hk.call(e,g))&&m++;continue}if(b===null||w===null||typeof b!="object"||typeof w!="object"){p[g]=w;continue}const _=V0(b,w,r+1);p[g]=_,_===b&&m++}return c===f&&m===c?e:p}function Gv(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function eh(e){if(!Vv(e))return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(!Vv(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Vv(e){return Object.prototype.toString.call(e)==="[object Object]"}function pk(e){return new Promise(t=>{Zf.setTimeout(t,e)})}function mk(e,t,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?V0(e,t):t}function gk(e,t,r=0){const a=[...e,t];return r&&a.length>r?a.slice(1):a}function yk(e,t,r=0){const a=[t,...e];return r&&a.length>r?a.slice(0,-1):a}var vh=Symbol();function K0(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===vh?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function vk(e,t,r){let a=!1,o;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(o??=t(),a||(a=!0,o.aborted?r():o.addEventListener("abort",r,{once:!0})),o)}),e}var Y0=(()=>{let e=()=>lk;return{isServer(){return e()},setIsServer(t){e=t}}})();function bk(){let e,t;const r=new Promise((o,c)=>{e=o,t=c});r.status="pending",r.catch(()=>{});function a(o){Object.assign(r,o),delete r.resolve,delete r.reject}return r.resolve=o=>{a({status:"fulfilled",value:o}),e(o)},r.reject=o=>{a({status:"rejected",reason:o}),t(o)},r}var wk=ok;function _k(){let e=[],t=0,r=f=>{f()},a=f=>{f()},o=wk;const c=f=>{t?e.push(f):o(()=>{r(f)})},u=()=>{const f=e;e=[],f.length&&o(()=>{a(()=>{f.forEach(p=>{r(p)})})})};return{batch:f=>{let p;t++;try{p=f()}finally{t--,t||u()}return p},batchCalls:f=>(...p)=>{c(()=>{f(...p)})},schedule:c,setNotifyFunction:f=>{r=f},setBatchNotifyFunction:f=>{a=f},setScheduler:f=>{o=f}}}var It=_k(),Sk=class extends Vc{#e=!0;#n;#t;constructor(){super(),this.#t=e=>{if(typeof window<"u"&&window.addEventListener){const t=()=>e(!0),r=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",r)}}}}onSubscribe(){this.#n||this.setEventListener(this.#t)}onUnsubscribe(){this.hasListeners()||(this.#n?.(),this.#n=void 0)}setEventListener(e){this.#t=e,this.#n?.(),this.#n=e(this.setOnline.bind(this))}
vendor: 19,648 bytes, line 55
55setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(r=>{r(e)}))}isOnline(){return this.#e}},Cc=new Sk;function Ek(e){return Math.min(1e3*2**e,3e4)}function F0(e){return(e??"online")==="online"?Cc.isOnline():!0}var th=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function J0(e){let t=!1,r=0,a;const o=bk(),c=()=>o.status!=="pending",u=x=>{if(!c()){const E=new th(x);b(E),e.onCancel?.(E)}},f=()=>{t=!0},p=()=>{t=!1},m=()=>G0.isFocused()&&(e.networkMode==="always"||Cc.isOnline())&&e.canRun(),y=()=>F0(e.networkMode)&&e.canRun(),g=x=>{c()||(a?.(),o.resolve(x))},b=x=>{c()||(a?.(),o.reject(x))},w=()=>new Promise(x=>{a=E=>{(c()||m())&&x(E)},e.onPause?.()}).then(()=>{a=void 0,c()||e.onContinue?.()}),_=()=>{if(c())return;let x;const E=r===0?e.initialPromise:void 0;try{x=E??e.fn()}catch(R){x=Promise.reject(R)}Promise.resolve(x).then(g).catch(R=>{if(c())return;const M=e.retry??(Y0.isServer()?0:3),j=e.retryDelay??Ek,L=typeof j=="function"?j(r,R):j,X=M===!0||typeof M=="number"&&r<M||typeof M=="function"&&M(r,R);if(t||!X){b(R);return}r++,e.onFail?.(r,R),pk(L).then(()=>m()?void 0:w()).then(()=>{t?b(R):_()})})};return{promise:o,status:()=>o.status,cancel:u,continue:()=>(a?.(),o),cancelRetry:f,continueRetry:p,canStart:y,start:()=>(y()?_():w().then(_),o)}}var Q0=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),uk(this.gcTime)&&(this.#e=Zf.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Y0.isServer()?1/0:300*1e3))}clearGcTimeout(){this.#e!==void 0&&(Zf.clearTimeout(this.#e),this.#e=void 0)}},Tk=class extends Q0{#e;#n;#t;#s;#r;#a;#i;constructor(e){super(),this.#i=!1,this.#a=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#s=e.client,this.#t=this.#s.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=Yv(this.options),this.state=e.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#r?.promise}setOptions(e){if(this.options={...this.#a,...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const t=Yv(this.options);t.data!==void 0&&(this.setState(Kv(t.data,t.dataUpdatedAt)),this.#e=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#t.remove(this)}setData(e,t){const r=mk(this.state.data,e,this.options);return this.#o({data:r,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),r}setState(e,t){this.#o({type:"setState",state:e,setStateOptions:t})}cancel(e){const t=this.#r?.promise;return this.#r?.cancel(e),t?t.then(Nn).catch(Nn):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(e=>fk(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===vh||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>Wf(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!dk(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(t=>t.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#r?.continue()}onOnline(){this.observers.find(t=>t.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#r?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#t.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),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:e}))}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(e,t){if(this.state.fetchStatus!=="idle"&&this.#r?.status()!=="rejected"){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#r)return this.#r.continueRetry(),this.#r.promise}if(e&&this.setOptions(e),!this.options.queryFn){const f=this.observers.find(p=>p.options.queryFn);f&&this.setOptions(f.options)}const r=new AbortController,a=f=>{Object.defineProperty(f,"signal",{enumerable:!0,get:()=>(this.#i=!0,r.signal)})},o=()=>{const f=K0(this.options,t),m=(()=>{const y={client:this.#s,queryKey:this.queryKey,meta:this.meta};return a(y),y})();return this.#i=!1,this.options.persister?this.options.persister(f,m,this):f(m)},u=(()=>{const f={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#s,state:this.state,fetchFn:o};return a(f),f})();this.options.behavior?.onFetch(u,this),this.#n=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==u.fetchOptions?.meta)&&this.#o({type:"fetch",meta:u.fetchOptions?.meta}),this.#r=J0({initialPromise:t?.initialPromise,fn:u.fetchFn,onCancel:f=>{f instanceof th&&f.revert&&this.setState({...this.#n,fetchStatus:"idle"}),r.abort()},onFail:(f,p)=>{this.#o({type:"failed",failureCount:f,error:p})},onPause:()=>{this.#o({type:"pause"})},onContinue:()=>{this.#o({type:"continue"})},retry:u.options.retry,retryDelay:u.options.retryDelay,networkMode:u.options.networkMode,canRun:()=>!0});try{const f=await this.#r.start();if(f===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(f),this.#t.config.onSuccess?.(f,this),this.#t.config.onSettled?.(f,this.state.error,this),f}catch(f){if(f instanceof th){if(f.silent)return this.#r.promise;if(f.revert){if(this.state.data===void 0)throw f;return this.state.data}}throw this.#o({type:"error",error:f}),this.#t.config.onError?.(f,this),this.#t.config.onSettled?.(this.state.data,f,this),f}finally{this.scheduleGc()}}#o(e){const t=r=>{switch(e.type){case"failed":return{...r,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...Rk(r.data,this.options),fetchMeta:e.meta??null};case"success":const a={...r,...Kv(e.data,e.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#n=e.manual?a:void 0,a;case"error":const o=e.error;return{...r,error:o,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...e.state}}};this.state=t(this.state),It.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),this.#t.notify({query:this,type:"updated",action:e})})}};function Rk(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:F0(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Kv(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Yv(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,r=t!==void 0,a=r?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?a??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}function Fv(e){return{onFetch:(t,r)=>{const a=t.options,o=t.fetchOptions?.meta?.fetchMore?.direction,c=t.state.data?.pages||[],u=t.state.data?.pageParams||[];let f={pages:[],pageParams:[]},p=0;const m=async()=>{let y=!1;const g=_=>{vk(_,()=>t.signal,()=>y=!0)},b=K0(t.options,t.fetchOptions),w=async(_,x,E)=>{if(y)return Promise.reject();if(x==null&&_.pages.length)return Promise.resolve(_);const M=(()=>{const G={client:t.client,queryKey:t.queryKey,pageParam:x,direction:E?"backward":"forward",meta:t.options.meta};return g(G),G})(),j=await b(M),{maxPages:L}=t.options,X=E?yk:gk;return{pages:X(_.pages,j,L),pageParams:X(_.pageParams,x,L)}};if(o&&c.length){const _=o==="backward",x=_?xk:Jv,E={pages:c,pageParams:u},R=x(a,E);f=await w(E,R,_)}else{const _=e??c.length;do{const x=p===0?u[0]??a.initialPageParam:Jv(a,f);if(p>0&&x==null)break;f=await w(f,x),p++}while(p<_)}return f};t.options.persister?t.fetchFn=()=>t.options.persister?.(m,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r):t.fetchFn=m}}}function Jv(e,{pages:t,pageParams:r}){const a=t.length-1;return t.length>0?e.getNextPageParam(t[a],t,r[a],r):void 0}function xk(e,{pages:t,pageParams:r}){return t.length>0?e.getPreviousPageParam?.(t[0],t,r[0],r):void 0}var Ak=class extends Q0{#e;#n;#t;#s;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#t=e.mutationCache,this.#n=[],this.state=e.state||Ok(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#n.includes(e)||(this.#n.push(e),this.clearGcTimeout(),this.#t.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#n=this.#n.filter(t=>t!==e),this.scheduleGc(),this.#t.notify({type:"observerRemoved",mutation:this,observer:e})}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(e){const t=()=>{this.#r({type:"continue"})},r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#s=J0({fn:()=>this.options.mutationFn?this.options.mutationFn(e,r):Promise.reject(new Error("No mutationFn found")),onFail:(c,u)=>{this.#r({type:"failed",failureCount:c,error:u})},onPause:()=>{this.#r({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#t.canRun(this)});const a=this.state.status==="pending",o=!this.#s.canStart();try{if(a)t();else{this.#r({type:"pending",variables:e,isPaused:o}),this.#t.config.onMutate&&await this.#t.config.onMutate(e,this,r);const u=await this.options.onMutate?.(e,r);u!==this.state.context&&this.#r({type:"pending",context:u,variables:e,isPaused:o})}const c=await this.#s.start();return await this.#t.config.onSuccess?.(c,e,this.state.context,this,r),await this.options.onSuccess?.(c,e,this.state.context,r),await this.#t.config.onSettled?.(c,null,this.state.variables,this.state.context,this,r),await this.options.onSettled?.(c,null,e,this.state.context,r),this.#r({type:"success",data:c}),c}catch(c){try{await this.#t.config.onError?.(c,e,this.state.context,this,r)}catch(u){Promise.reject(u)}try{await this.options.onError?.(c,e,this.state.context,r)}catch(u){Promise.reject(u)}try{await this.#t.config.onSettled?.(void 0,c,this.state.variables,this.state.context,this,r)}catch(u){Promise.reject(u)}try{await this.options.onSettled?.(void 0,c,e,this.state.context,r)}catch(u){Promise.reject(u)}throw this.#r({type:"error",error:c}),c}finally{this.#t.runNext(this)}}#r(e){const t=r=>{switch(e.type){case"failed":return{...r,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...r,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:e.error,failureCount:r.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=t(this.state),It.batch(()=>{this.#n.forEach(r=>{r.onMutationUpdate(e)}),this.#t.notify({mutation:this,type:"updated",action:e})})}};function Ok(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Ck=class extends Vc{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#n=new Map,this.#t=0}#e;#n;#t;build(e,t,r){const a=new Ak({client:e,mutationCache:this,mutationId:++this.#t,options:e.defaultMutationOptions(t),state:r});return this.add(a),a}add(e){this.#e.add(e);const t=sc(e);if(typeof t=="string"){const r=this.#n.get(t);r?r.push(e):this.#n.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#e.delete(e)){const t=sc(e);if(typeof t=="string"){const r=this.#n.get(t);if(r)if(r.length>1){const a=r.indexOf(e);a!==-1&&r.splice(a,1)}else r[0]===e&&this.#n.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=sc(e);if(typeof t=="string"){const a=this.#n.get(t)?.find(o=>o.state.status==="pending");return!a||a===e}else return!0}runNext(e){const t=sc(e);return typeof t=="string"?this.#n.get(t)?.find(a=>a!==e&&a.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){It.batch(()=>{this.#e.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#e.clear(),this.#n.clear()})}getAll(){return Array.from(this.#e)}find(e){const t={exact:!0,...e};return this.getAll().find(r=>$v(t,r))}findAll(e={}){return this.getAll().filter(t=>$v(e,t))}notify(e){It.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return It.batch(()=>Promise.all(e.map(t=>t.continue().catch(Nn))))}};function sc(e){return e.options.scope?.id}var kk=class extends Vc{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,r){const a=t.queryKey,o=t.queryHash??yh(a,t);let c=this.get(o);return c||(c=new Tk({client:e,queryKey:a,queryHash:o,options:e.defaultQueryOptions(t),state:r,defaultOptions:e.getQueryDefaults(a)}),this.add(c)),c}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){It.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){const t={exact:!0,...e};return this.getAll().find(r=>qv(t,r))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(r=>qv(e,r)):t}notify(e){It.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){It.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){It.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},jk=class{#e;#n;#t;#s;#r;#a;#i;#l;constructor(e={}){this.#e=e.queryCache||new kk,this.#n=e.mutationCache||new Ck,this.#t=e.defaultOptions||{},this.#s=new Map,this.#r=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#i=G0.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#l=Cc.subscribe(async e=>{e&&(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(e){return this.#e.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#n.findAll({...e,status:"pending"}).length}getQueryData(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=this.#e.build(this,t),a=r.state.data;return a===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(Wf(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(a))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:t,state:r})=>{const a=r.data;return[t,a]})}setQueryData(e,t,r){const a=this.defaultQueryOptions({queryKey:e}),c=this.#e.get(a.queryHash)?.state.data,u=ck(t,c);if(u!==void 0)return this.#e.build(this,a).setData(u,{...r,manual:!0})}setQueriesData(e,t,r){return It.batch(()=>this.#e.findAll(e).map(({queryKey:a})=>[a,this.setQueryData(a,t,r)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){const t=this.#e;It.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=this.#e;return It.batch(()=>(r.findAll(e).forEach(a=>{a.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},a=It.batch(()=>this.#e.findAll(e).map(o=>o.cancel(r)));return Promise.all(a).then(Nn).catch(Nn)}invalidateQueries(e,t={}){return It.batch(()=>(this.#e.findAll(e).forEach(r=>{r.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t)))}refetchQueries(e,t={}){const r={...t,cancelRefetch:t.cancelRefetch??!0},a=It.batch(()=>this.#e.findAll(e).filter(o=>!o.isDisabled()&&!o.isStatic()).map(o=>{let c=o.fetch(void 0,r);return r.throwOnError||(c=c.catch(Nn)),o.state.fetchStatus==="paused"?Promise.resolve():c}));return Promise.all(a).then(Nn)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=this.#e.build(this,t);return r.isStaleByTime(Wf(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Nn).catch(Nn)}fetchInfiniteQuery(e){return e.behavior=Fv(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Nn).catch(Nn)}ensureInfiniteQueryData(e){return e.behavior=Fv(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Cc.isOnline()?this.#n.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#n}getDefaultOptions(){return this.#t}setDefaultOptions(e){this.#t=e}setQueryDefaults(e,t){this.#s.set(To(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#s.values()],r={};return t.forEach(a=>{Ro(e,a.queryKey)&&Object.assign(r,a.defaultOptions)}),r}setMutationDefaults(e,t){this.#r.set(To(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#r.values()],r={};return t.forEach(a=>{Ro(e,a.mutationKey)&&Object.assign(r,a.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...this.#t.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=yh(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===vh&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#t.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#n.clear()}},Mk=ne.createContext(void 0),Nk=({client:e,children:t})=>(ne.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),J.jsx(Mk.Provider,{value:e,children:t}));function Dk(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}const Lk=e=>{switch(e){case"success":return Pk;case"info":return Ik;case"warning":return Bk;case"error":return Hk;default:return null}},Uk=Array(12).fill(0),zk=({visible:e,className:t})=>te.createElement("div",{className:["sonner-loading-wrapper",t].filter(
vendor: 5,672 bytes, line 55
55Boolean).join(" "),"data-visible":e},te.createElement("div",{className:"sonner-spinner"},Uk.map((r,a)=>te.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${a}`})))),Pk=te.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},te.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),Bk=te.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},te.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),Ik=te.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},te.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),Hk=te.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},te.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),qk=te.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},te.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),te.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),$k=()=>{const[e,t]=te.useState(document.hidden);return te.useEffect(()=>{const r=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",r),()=>window.removeEventListener("visibilitychange",r)},[]),e};let nh=1;class Gk{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{const r=this.subscribers.indexOf(t);this.subscribers.splice(r,1)}),this.publish=t=>{this.subscribers.forEach(r=>r(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var r;const{message:a,...o}=t,c=typeof t?.id=="number"||((r=t.id)==null?void 0:r.length)>0?t.id:nh++,u=this.toasts.find(p=>p.id===c),f=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(c)&&this.dismissedToasts.delete(c),u?this.toasts=this.toasts.map(p=>p.id===c?(this.publish({...p,...t,id:c,title:a}),{...p,...t,id:c,dismissible:f,title:a}):p):this.addToast({title:a,...o,dismissible:f,id:c}),c},this.dismiss=t=>(t?(this.dismissedToasts.add(t),requestAnimationFrame(()=>this.subscribers.forEach(r=>r({id:t,dismiss:!0})))):this.toasts.forEach(r=>{this.subscribers.forEach(a=>a({id:r.id,dismiss:!0}))}),t),this.message=(t,r)=>this.create({...r,message:t}),this.error=(t,r)=>this.create({...r,message:t,type:"error"}),this.success=(t,r)=>this.create({...r,type:"success",message:t}),this.info=(t,r)=>this.create({...r,type:"info",message:t}),this.warning=(t,r)=>this.create({...r,type:"warning",message:t}),this.loading=(t,r)=>this.create({...r,type:"loading",message:t}),this.promise=(t,r)=>{if(!r)return;let a;r.loading!==void 0&&(a=this.create({...r,promise:t,type:"loading",message:r.loading,description:typeof r.description!="function"?r.description:void 0}));const o=Promise.resolve(t instanceof Function?t():t);let c=a!==void 0,u;const f=o.then(async m=>{if(u=["resolve",m],te.isValidElement(m))c=!1,this.create({id:a,type:"default",message:m});else if(Kk(m)&&!m.ok){c=!1;const g=typeof r.error=="function"?await r.error(`HTTP error! status: ${m.status}`):r.error,b=typeof r.description=="function"?await r.description(`HTTP error! status: ${m.status}`):r.description,_=typeof g=="object"&&!te.isValidElement(g)?g:{message:g};this.create({id:a,type:"error",description:b,..._})}else if(m instanceof Error){c=!1;const g=typeof r.error=="function"?await r.error(m):r.error,b=typeof r.description=="function"?await r.description(m):r.description,_=typeof g=="object"&&!te.isValidElement(g)?g:{message:g};this.create({id:a,type:"error",description:b,..._})}else if(r.success!==void 0){c=!1;const g=typeof r.success=="function"?await r.success(m):r.success,b=typeof r.description=="function"?await r.description(m):r.description,_=typeof g=="object"&&!te.isValidElement(g)?g:{message:g};this.create({id:a,type:"success",description:b,..._})}}).catch(async m=>{if(u=["reject",m],r.error!==void 0){c=!1;const y=typeof r.error=="function"?await r.error(m):r.error,g=typeof r.description=="function"?await r.description(m):r.description,w=typeof y=="object"&&!te.isValidElement(y)?y:{message:y};this.create({id:a,type:"error",description:g,...w})}}).finally(()=>{c&&(this.dismiss(a),a=void 0),r.finally==null||r.finally.call(r)}),p=()=>new Promise((m,y)=>f.then(()=>u[0]==="reject"?y(u[1]):m(u[1])).catch(y));return typeof a!="string"&&typeof a!="number"?{unwrap:p}:Object.assign(a,{unwrap:p})},this.custom=(t,r)=>{const a=r?.id||nh++;return this.create({jsx:t(a),id:a,...r}),a},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const Zt=new Gk,Vk=(e,t)=>{const r=t?.id||nh++;return Zt.addToast({title:e,...t,id:r}),r}
55,Kk=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",Yk=Vk,Fk=()=>Zt.toasts,Jk=()=>Zt.getActiveToasts(),Gj=Object.assign(Yk,{success:Zt.success,info:Zt.info,warning:Zt.warning,error:Zt.error,custom:Zt.custom,message:Zt.message,promise:Zt.promise,dismiss:Zt.dismiss,loading:Zt.loading},{getHistory:Fk,getToasts:Jk});Dk
vendor: 14,873 bytes, line 55
55("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function
vendor: 2,458 bytes, line 55
55ac(e){return e.label!==void 0}const Qk=3,Xk="24px",Zk="16px",Qv=4e3,Wk=356,e2=14,t2=45,n2=200;function $n(...e){return e.filter(Boolean).join(" ")}function r2(e){const[t,r]=e.split("-"),a=[];return t&&a.push(t),r&&a.push(r),a}const s2=e=>{var t,r,a,o,c,u,f,p,m;const{invert:y,toast:g,unstyled:b,interacting:w,setHeights:_,visibleToasts:x,heights:E,index:R,toasts:M,expanded:j,removeToast:L,defaultRichColors:X,closeButton:G,style:H,cancelButtonStyle:U,actionButtonStyle:Q,className:fe="",descriptionClassName:ie="",duration:ve,position:Se,gap:ze,expandByDefault:Ae,classNames:D,icons:F,closeButtonAriaLabel:ae="Close toast"}=e,[Ee,ee]=te.useState(null),[C,$]=te.useState(null),[K,W]=te.useState(!1),[Z,se]=te.useState(!1),[we,ye]=te.useState(!1),[pe,xt]=te.useState(!1),[ft,at]=te.useState(!1),[Rn,ht]=te.useState(0),[ps,Jn]=te.useState(0),Ln=te.useRef(g.duration||ve||Qv),fn=te.useRef(null),At=te.useRef(null),nn=R===0,ms=R+1<=x,bt=g.type,Un=g.dismissible!==!1,wt=g.className||"",Ie=g.descriptionClassName||"",We=te.useMemo(()=>E.findIndex(be=>be.toastId===g.id)||0,[E,g.id]),hn=te.useMemo(()=>{var be;return(be=g.closeButton)!=null?be:G},[g.closeButton,G]),Qn=te.useMemo(()=>g.duration||ve||Qv,[g.duration,ve]),ri=te.useRef(0),Xn=te.useRef(0),Mo=te.useRef(0),Rr=te.useRef(null),[gs,Pt]=Se.split("-"),xn=te.useMemo(()=>E.reduce((be,Je,_t)=>_t>=We?be:be+Je.height,0),[E,We]),Dt=$k(),Kc=g.invert||y,si=bt==="loading";Xn.current=te.useMemo(()=>We*ze+xn,[We,xn]),te.useEffect(()=>{Ln.current=Qn},[Qn]),te.useEffect(()=>{W(!0)},[]),te.useEffect(()=>{const be=At.current;if(be){const Je=be.getBoundingClientRect().height;return Jn(Je),_(_t=>[{toastId:g.id,height:Je,position:g.position},..._t]),()=>_(_t=>_t.filter(Lt=>Lt.toastId!==g.id))}},[_,g.id]),te.useLayoutEffect(()=>{if(!K)return;const be=At.current,Je=be.style.height;be.style.height="auto";const _t=be.getBoundingClientRect().height;be.style.height=Je,Jn(_t),_(Lt=>Lt.find(Ze=>Ze.toastId===g.id)?Lt.map(Ze=>Ze.toastId===g.id?{...Ze,height:_t}:Ze):[{toastId:g.id,height:_t,position:g.position},...Lt])},[K,g.title,g.description,_,g.id,g.jsx,g.action,g.cancel]);const zn=te.useCallback(()=>{se(!0),ht(Xn.current),_(be=>be.filter(Je=>Je.toastId!==g.id)),setTimeout(()=>{L(g)},n2)},[g,L,_,Xn]);te.useEffect(()=>{if(g.promise&&bt==="loading"||g.duration===1/0||g.type==="loading")return;let be;return j||w||Dt?(()=>{if(Mo.current<ri.current){const Lt=new Date().getTime()-ri.current;Ln.current=Ln.current-Lt}
vendor: 5,180 bytes, line 55
55Mo.current=new Date().getTime()})():Ln.current!==1/0&&(ri.current=new Date().getTime(),be=setTimeout(()=>{g.onAutoClose==null||g.onAutoClose.call(g,g),zn()},Ln.current)),()=>clearTimeout(be)},[j,w,g,bt,Dt,zn]),te.useEffect(()=>{g.delete&&(zn(),g.onDismiss==null||g.onDismiss.call(g,g))},[zn,g.delete]);function Zs(){var be;if(F?.loading){var Je;return te.createElement("div",{className:$n(D?.loader,g==null||(Je=g.classNames)==null?void 0:Je.loader,"sonner-loader"),"data-visible":bt==="loading"},F.loading)}return te.createElement(zk,{className:$n(D?.loader,g==null||(be=g.classNames)==null?void 0:be.loader),visible:bt==="loading"})}const Ws=g.icon||F?.[bt]||Lk(bt);var ys,Pn;return te.createElement("li",{tabIndex:0,ref:At,className:$n(fe,wt,D?.toast,g==null||(t=g.classNames)==null?void 0:t.toast,D?.default,D?.[bt],g==null||(r=g.classNames)==null?void 0:r[bt]),"data-sonner-toast":"","data-rich-colors":(ys=g.richColors)!=null?ys:X,"data-styled":!(g.jsx||g.unstyled||b),"data-mounted":K,"data-promise":!!g.promise,"data-swiped":ft,"data-removed":Z,"data-visible":ms,"data-y-position":gs,"data-x-position":Pt,"data-index":R,"data-front":nn,"data-swiping":we,"data-dismissible":Un,"data-type":bt,"data-invert":Kc,"data-swipe-out":pe,"data-swipe-direction":C,"data-expanded":!!(j||Ae&&K),"data-testid":g.testId,style:{"--index":R,"--toasts-before":R,"--z-index":M.length-R,"--offset":`${Z?Rn:Xn.current}px`,"--initial-height":Ae?"auto":`${ps}px`,...H,...g.style},onDragEnd:()=>{ye(!1),ee(null),Rr.current=null},onPointerDown:be=>{be.button!==2&&(si||!Un||(fn.current=new Date,ht(Xn.current),be.target.setPointerCapture(be.pointerId),be.target.tagName!=="BUTTON"&&(ye(!0),Rr.current={x:be.clientX,y:be.clientY})))},onPointerUp:()=>{var be,Je,_t;if(pe||!Un)return;Rr.current=null;const Lt=Number(((be=At.current)==null?void 0:be.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),xr=Number(((Je=At.current)==null?void 0:Je.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Ze=new Date().getTime()-((_t=fn.current)==null?void 0:_t.getTime()),Ht=Ee==="x"?Lt:xr,vs=Math.abs(Ht)/Ze;if(Math.abs(Ht)>=t2||vs>.11){ht(Xn.current),g.onDismiss==null||g.onDismiss.call(g,g),$(Ee==="x"?Lt>0?"right":"left":xr>0?"down":"up"),zn(),xt(!0);return}else{var qt,$t;(qt=At.current)==null||qt.style.setProperty("--swipe-amount-x","0px"),($t=At.current)==null||$t.style.setProperty("--swipe-amount-y","0px")}at(!1),ye(!1),ee(null)},onPointerMove:be=>{var Je,_t,Lt;if(!Rr.current||!Un||((Je=window.getSelection())==null?void 0:Je.toString().length)>0)return;const Ze=be.clientY-Rr.current.y,Ht=be.clientX-Rr.current.x;var vs;const qt=(vs=e.swipeDirections)!=null?vs:r2(Se);!Ee&&(Math.abs(Ht)>1||Math.abs(Ze)>1)&&ee(Math.abs(Ht)>Math.abs(Ze)?"x":"y");let $t={x:0,y:0};const ea=An=>1/(1.5+Math.abs(An)/20);if(Ee==="y"){if(qt.includes("top")||qt.includes("bottom"))if(qt.includes("top")&&Ze<0||qt.includes("bottom")&&Ze>0)$t.y=Ze;else{const An=Ze*ea(Ze);$t.y=Math.abs(An)<Math.abs(Ze)?An:Ze}}else if(Ee==="x"&&(qt.includes("left")||qt.includes("right")))if(qt.includes("left")&&Ht<0||qt.includes("right")&&Ht>0)$t.x=Ht;else{const An=Ht*ea(Ht);$t.x=Math.abs(An)<Math.abs(Ht)?An:Ht}(Math.abs($t.x)>0||Math.abs($t.y)>0)&&at(!0),(_t=At.current)==null||_t.style.setProperty("--swipe-amount-x",`${$t.x}px`),(Lt=At.current)==null||Lt.style.setProperty("--swipe-amount-y",`${$t.y}px`)}},hn&&!g.jsx&&bt!=="loading"?te.createElement("button",{"aria-label":ae,"data-disabled":si,"data-close-button":!0,onClick:si||!Un?()=>{}:()=>{zn(),g.onDismiss==null||g.onDismiss.call(g,g)},className:$n(D?.closeButton,g==null||(a=g.classNames)==null?void 0:a.closeButton)},(Pn=F?.close)!=null?Pn:qk):null,(bt||g.icon||g.promise)&&g.icon!==null&&(F?.[bt]!==null||g.icon)?te.createElement("div",{"data-icon":"",className:$n(D?.icon,g==null||(o=g.classNames)==null?void 0:o.icon)},g.promise||g.type==="loading"&&!g.icon?g.icon||Zs():null,g.type!=="loading"?Ws:null):null,te.createElement("div",{"data-content":"",className:$n(D?.content,g==null||(c=g.classNames)==null?void 0:c.content)},te.createElement("div",{"data-title":"",className:$n(D?.title,g==null||(u=g.classNames)==null?void 0:u.title)},g.jsx?g.jsx:typeof g.title=="function"?g.title():g.title),g.description?te.createElement("div",{"data-description":"",className:$n(ie,Ie,D?.description,g==null||(f=g.classNames)==null?void 0:f.description)},typeof g.description=="function"?g.description():g.description):null),te.isValidElement(g.cancel)?g.cancel:g.cancel&&ac(g.cancel)?te.createElement("button",{"data-button":!0,"data-cancel":!0,style:g.cancelButtonStyle||U,onClick:be=>{ac(g.cancel)&&Un&&(g.cancel.onClick==null||g.cancel.onClick.call(g.cancel,be),zn())},className:$n(D?.cancelButton,g==null||(p=g.classNames)==null?void 0:p.cancelButton)},g.cancel.label):null,te.isValidElement(g.action)?g.action:g.action&&ac(g.action)?te.createElement("button",{"data-button":!0,"data-action":!0,style:g.actionButtonStyle||Q,onClick:be=>{ac(g.action)&&(g.action.onClick==null||g.action.onClick.call(g.action,be),!be.defaultPrevented&&zn())},className:$n(D?.actionButton,g==null||(m=g.classNames)==null?void 0:m.actionButton)},g.action.label):null)};
vendor: 5,147 bytes, line 55
55function Xv(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function a2(e,t){const r={};return[e,t].forEach((a,o)=>{const c=o===1,u=c?"--mobile-offset":"--offset",f=c?Zk:Xk;function p(m){["top","right","bottom","left"].forEach(y=>{r[`${u}-${y}`]=typeof m=="number"?`${m}px`:m})}typeof a=="number"||typeof a=="string"?p(a):typeof a=="object"?["top","right","bottom","left"].forEach(m=>{a[m]===void 0?r[`${u}-${m}`]=f:r[`${u}-${m}`]=typeof a[m]=="number"?`${a[m]}px`:a[m]}):p(f)}),r}const i2=te.forwardRef(function(t,r){const{id:a,invert:o,position:c="bottom-right",hotkey:u=["altKey","KeyT"],expand:f,closeButton:p,className:m,offset:y,mobileOffset:g,theme:b="light",richColors:w,duration:_,style:x,visibleToasts:E=Qk,toastOptions:R,dir:M=Xv(),gap:j=e2,icons:L,containerAriaLabel:X="Notifications"}=t,[G,H]=te.useState([]),U=te.useMemo(()=>a?G.filter(K=>K.toasterId===a):G.filter(K=>!K.toasterId),[G,a]),Q=te.useMemo(()=>Array.from(new Set([c].concat(U.filter(K=>K.position).map(K=>K.position)))),[U,c]),[fe,ie]=te.useState([]),[ve,Se]=te.useState(!1),[ze,Ae]=te.useState(!1),[D,F]=te.useState(b!=="system"?b:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),ae=te.useRef(null),Ee=u.join("+").replace(/Key/g,"").replace(/Digit/g,""),ee=te.useRef(null),C=te.useRef(!1),$=te.useCallback(K=>{H(W=>{var Z;return(Z=W.find(se=>se.id===K.id))!=null&&Z.delete||Zt.dismiss(K.id),W.filter(({id:se})=>se!==K.id)})},[]);return te.useEffect(()=>Zt.subscribe(K=>{if(K.dismiss){requestAnimationFrame(()=>{H(W=>W.map(Z=>Z.id===K.id?{...Z,delete:!0}:Z))});return}setTimeout(()=>{yx.flushSync(()=>{H(W=>{const Z=W.findIndex(se=>se.id===K.id);return Z!==-1?[...W.slice(0,Z),{...W[Z],...K},...W.slice(Z+1)]:[K,...W]})})})}),[G]),te.useEffect(()=>{if(b!=="system"){F(b);return}if(b==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?F("dark"):F("light")),typeof window>"u")return;const K=window.matchMedia("(prefers-color-scheme: dark)");try{K.addEventListener("change",({matches:W})=>{F(W?"dark":"light")})}catch{K.addListener(({matches:Z})=>{try{F(Z?"dark":"light")}catch(se){console.error(se)}})}},[b]),te.useEffect(()=>{G.length<=1&&Se(!1)},[G]),te.useEffect(()=>{const K=W=>{var Z;if(u.every(ye=>W[ye]||W.code===ye)){var we;Se(!0),(we=ae.current)==null||we.focus()}W.code==="Escape"&&(document.activeElement===ae.current||(Z=ae.current)!=null&&Z.contains(document.activeElement))&&Se(!1)};return document.addEventListener("keydown",K),()=>document.removeEventListener("keydown",K)},[u]),te.useEffect(()=>{if(ae.current)return()=>{ee.current&&(ee.current.focus({preventScroll:!0}),ee.current=null,C.current=!1)}},[ae.current]),te.createElement("section",{ref:r,"aria-label":`${X} ${Ee}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},Q.map((K,W)=>{var Z;const[se,we]=K.split("-");return U.length?te.createElement("ol",{key:K,dir:M==="auto"?Xv():M,tabIndex:-1,ref:ae,className:m,"data-sonner-toaster":!0,"data-sonner-theme":D,"data-y-position":se,"data-x-position":we,style:{"--front-toast-height":`${((Z=fe[0])==null?void 0:Z.height)||0}px`,"--width":`${Wk}px`,"--gap":`${j}px`,...x,...a2(y,g)},onBlur:ye=>{C.current&&!ye.currentTarget.contains(ye.relatedTarget)&&(C.current=!1,ee.current&&(ee.current.focus({preventScroll:!0}),ee.current=null))},onFocus:ye=>{ye.target instanceof HTMLElement&&ye.target.dataset.dismissible==="false"||C.current||(C.current=!0,ee.current=ye.relatedTarget)},onMouseEnter:()=>Se(!0),onMouseMove:()=>Se(!0),onMouseLeave:()=>{ze||Se(!1)},onDragEnd:()=>Se(!1),onPointerDown:ye=>{ye.target instanceof HTMLElement&&ye.target.dataset.dismissible==="false"||Ae(!0)},onPointerUp:()=>Ae(!1)},U.filter(ye=>!ye.position&&W===0||ye.position===K).map((ye,pe)=>{var xt,ft;return te.createElement(s2,{key:ye.id,icons:L,index:pe,toast:ye,defaultRichColors:w,duration:(xt=R?.duration)!=null?xt:_,className:R?.className,descriptionClassName:R?.descriptionClassName,invert:o,visibleToasts:E,closeButton:(ft=R?.closeButton)!=null?ft:p,interacting:ze,position:K,style:R?.style,unstyled:R?.unstyled,classNames:R?.classNames,cancelButtonStyle:R?.cancelButtonStyle,actionButtonStyle:R?.actionButtonStyle,closeButtonAriaLabel:R?.closeButtonAriaLabel,removeToast:$,toasts:U.filter(at=>at.position==ye.position),heights:fe.filter(at=>at.position==ye.position),setHeights:ie,expandByDefault:f,gap:j,expanded:ve,swipeDirections:t.swipeDirections})})):null}))}),o2=({...e})=>J.jsx(i2,{className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...e});function Zv(e,t){if(typeof e=="function")return e(t);
vendor: 8,749 bytes, line 55
55e!=null&&(e.current=t)}function l2(...e){return t=>{let r=!1;const a=e.map(o=>{const c=Zv(o,t);return!r&&typeof c=="function"&&(r=!0),c});if(r)return()=>{for(let o=0;o<a.length;o++){const c=a[o];typeof c=="function"?c():Zv(e[o],null)}}}}var c2=Symbol.for("react.lazy"),kc=CS[" use ".trim().toString()];function u2(e){return typeof e=="object"&&e!==null&&"then"in e}function X0(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===c2&&"_payload"in e&&u2(e._payload)}function d2(e){const t=h2(e),r=ne.forwardRef((a,o)=>{let{children:c,...u}=a;X0(c)&&typeof kc=="function"&&(c=kc(c._payload));const f=ne.Children.toArray(c),p=f.find(m2);if(p){const m=p.props.children,y=f.map(g=>g===p?ne.Children.count(m)>1?ne.Children.only(null):ne.isValidElement(m)?m.props.children:null:g);return J.jsx(t,{...u,ref:o,children:ne.isValidElement(m)?ne.cloneElement(m,void 0,y):null})}return J.jsx(t,{...u,ref:o,children:c})});return r.displayName=`${e}.Slot`,r}var f2=d2("Slot");function h2(e){const t=ne.forwardRef((r,a)=>{let{children:o,...c}=r;if(X0(o)&&typeof kc=="function"&&(o=kc(o._payload)),ne.isValidElement(o)){const u=y2(o),f=g2(c,o.props);return o.type!==ne.Fragment&&(f.ref=a?l2(a,u):u),ne.cloneElement(o,f)}return ne.Children.count(o)>1?ne.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var p2=Symbol("radix.slottable");function m2(e){return ne.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===p2}function g2(e,t){const r={...t};for(const a in t){const o=e[a],c=t[a];/^on[A-Z]/.test(a)?o&&c?r[a]=(...f)=>{const p=c(...f);return o(...f),p}:o&&(r[a]=o):a==="style"?r[a]={...o,...c}:a==="className"&&(r[a]=[o,c].filter(Boolean).join(" "))}return{...e,...r}}function y2(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function Z0(e){var t,r,a="";if(typeof e=="string"||typeof e=="number")a+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(r=Z0(e[t]))&&(a&&(a+=" "),a+=r)}else for(r in e)e[r]&&(a&&(a+=" "),a+=r);return a}function W0(){for(var e,t,r=0,a="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=Z0(e))&&(a&&(a+=" "),a+=t);return a}const Wv=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,eb=W0,v2=(e,t)=>r=>{var a;if(t?.variants==null)return eb(e,r?.class,r?.className);const{variants:o,defaultVariants:c}=t,u=Object.keys(o).map(m=>{const y=r?.[m],g=c?.[m];if(y===null)return null;const b=Wv(y)||Wv(g);return o[m][b]}),f=r&&Object.entries(r).reduce((m,y)=>{let[g,b]=y;return b===void 0||(m[g]=b),m},{}),p=t==null||(a=t.compoundVariants)===null||a===void 0?void 0:a.reduce((m,y)=>{let{class:g,className:b,...w}=y;return Object.entries(w).every(_=>{let[x,E]=_;return Array.isArray(E)?E.includes({...c,...f}[x]):{...c,...f}[x]===E})?[...m,g,b]:m},[]);return eb(e,u,p,r?.class,r?.className)},b2=(e,t)=>{const r=new Array(e.length+t.length);for(let a=0;a<e.length;a++)r[a]=e[a];for(let a=0;a<t.length;a++)r[e.length+a]=t[a];return r},w2=(e,t)=>({classGroupId:e,validator:t}),ew=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),jc="-",tb=[],_2="arbitrary..",S2=e=>{const t=T2(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:a}=e;return{getClassGroupId:u=>{if(u.startsWith("[")&&u.endsWith("]"))return E2(u);const f=u.split(jc),p=f[0]===""&&f.length>1?1:0;return tw(f,p,t)},getConflictingClassGroupIds:(u,f)=>{if(f){const p=a[u],m=r[u];return p?m?b2(m,p):p:m||tb}return r[u]||tb}}},tw=(e,t,r)=>{if(e.length-t===0)return r.classGroupId;const o=e[t],c=r.nextPart.get(o);if(c){const m=tw(e,t+1,c);if(m)return m}const u=r.validators;if(u===null)return;const f=t===0?e.join(jc):e.slice(t).join(jc),p=u.length;for(let m=0;m<p;m++){const y=u[m];if(y.validator(f))return y.classGroupId}},E2=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),r=t.indexOf(":"),a=t.slice(0,r);return a?_2+a:void 0})(),T2=e=>{const{theme:t,classGroups:r}=e;return R2(r,t)},R2=(e,t)=>{const r=ew();for(const a in e){const o=e[a];bh(o,r,a,t)}return r},bh=(e,t,r,a)=>{const o=e.length;for(let c=0;c<o;c++){const u=e[c];x2(u,t,r,a)}},x2=(e,t,r,a)=>{if(typeof e=="string"){A2(e,t,r);return}if(typeof e=="function"){O2(e,t,r,a);return}C2(e,t,r,a)},A2=(e,t,r)=>{const a=e===""?t:nw(t,e);a.classGroupId=r},O2=(e,t,r,a)=>{if(k2(e)){bh(e(a),t,r,a);return}t.validators===null&&(t.validators=[]),t.validators.push(w2(r,e))},C2=(e,t,r,a)=>{const o=Object.entries(e),c=o.length;for(let u=0;u<c;u++){const[f,p]=o[u];bh(p,nw(t,f),r,a)}},nw=(e,t)=>{let r=e;const a=t.split(jc),o=a.length;for(let c=0;c<o;c++){const u=a[c];let f=r.nextPart.get(u);f||(f=ew(),r.nextPart.set(u,f)),r=f}return r},k2=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,j2=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=Object.create(null),a=Object.create(null);const o=(c,u)=>{r[c]=u,t++,t>e&&(t=0,a=r,r=Object.create(null))};return{get(c){let u=r[c];if(u!==void 0)return u;if((u=a[c])!==void 0)return o(c,u),u},set(c,u){c in r?r[c]=u:o(c,u)}}},rh="!",nb=":",M2=[],rb=(e,t,r,a,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:a,isExternal:o}),N2=e=>{const{prefix:t,experimentalParseClassName:r}=e;let a=o=>{const c=[];let u=0,f=0,p=0,m;const y=o.length;for(let x=0;x<y;x++){const E=o[x];if(u===0&&f===0){if(E===nb){c.push(o.slice(p,x)),p=x+1;continue}if(E==="/"){m=x;continue}}E==="["?u++:E==="]"?u--:E==="("?f++:E===")"&&f--}const g=c.length===0?o:o.slice(p);let b=g,w=!1;g.endsWith(rh)?(b=g.slice(0,-1),w=!0):g.startsWith(rh)&&(b=g.slice(1),w=!0);const _=m&&m>p?m-p:void 0;return rb(c,w,b,_)};if(t){const o=t+nb,c=a;a=u=>u.startsWith(o)?c(u.slice(o.length)):rb(M2,!1,u,void 0,!0)}if(r){const o=a;a=c=>r({className:c,parseClassName:o})}return a},D2=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((r,a)=>{t.set(r,1e6+a)}),r=>{const a=[];let o=[];for(let c=0;c<r.length;c++){const u=r[c],f=u[0]==="[",p=t.has(u);f||p?(o.length>0&&(o.sort(),a.push(...o),o=[]),a.push(u)):o.push(u)}return o.length>0&&(o.sort(),a.push(...o)),a}},L2=e=>({cache:j2(e.cacheSize),parseClassName:N2(e),sortModifiers:D2(e),...S2(e)}),U2=/\s+/,z2=(e,t)=>{const{parseClassName:r,getClassGroupId:a,getConflictingClassGroupIds:o,sortModifiers:c}=t,u=[],f=e.trim().split(U2);let p="";for(let m=f.length-1;m>=0;m-=1){const y=f[m],{isExternal:g,modifiers:b,hasImportantModifier:w,baseClassName:_,maybePostfixModifierPosition:x}=r(y);if(g){p=y+(p.length>0?" "+p:p);continue}let E=!!x,R=a(E?_.substring(0,x):_);if(!R){if(!E){p=y+(p.length>0?" "+p:p);continue}if(R=a(_),!R){p=y+(p.length>0?" "+p:p);continue}E=!1}const M=b.length===0?"":b.length===1?b[0]:c(b).join(":"),j=w?M+rh:M,L=j+R;if(u.indexOf(L)>-1)continue;u.push(L);const X=o(R,E);for(let G=0;G<X.length;++G){const H=X[G];u.push(j+H)}p=y+(p.length>0?" "+p:p)}return p},P2=(...e)=>{let t=0,r,a,o="";for(;t<e.length;)(r=e[t++])&&(a=rw(r))&&(o&&(o+=" "),o+=a);return o},rw=e=>{if(typeof e=="string")return e;let t,r="";for(let a=0;a<e.length;a++)e[a]&&(t=rw(e[a]))&&(r&&(r+=" "),r+=t);return r},B2=(e,...t)=>{let r,a,o,c;const u=p=>{const m=t.reduce((y,g)=>g(y),e());return r=L2(m),a=r.cache.get,o=r.cache.set,c=f,f(p)},f=p=>{const m=a(p);if(m)return m;const y=z2(p,r);return o(p,y),y};return c=u,(...p)=>c(P2(...p))},I2=[],gt=e=>{const t=r=>r[e]||I2;return t.isThemeGetter=!0,t},sw=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,aw=/^\((?:(\w[\w-]*):)?(.+)\)$/i,H2=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,q2=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,$2=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,G2=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,V2=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,K2=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Xr=e=>H2.test(e),xe=e=>!!e&&!Number.isNaN(Number(e)),Zr=e=>!!e&&Number.isInteger(Number(e)),jf=e=>e.endsWith("%")&&xe(e.slice(0,-1)),br=e=>q2.test(e),iw=()=>!0,Y2=e=>$2.test(e)&&!G2.test(e),wh=()=>!1,F2=e=>V2.test(e),J2=e=>K2.test(e),Q2=e=>!le(e)&&!ue(e),X2=e=>hs(e,cw,wh),le=e=>sw.test(e),Ps=e=>hs(e,uw,Y2),sb=e=>hs(e,aj,xe),Z2=e=>hs(e,fw,iw),W2=e=>hs(e,dw,wh),ab=e=>hs(e,ow,wh),ej=e=>hs(e,lw,J2),ic=e=>hs(e,hw,F2),ue=e=>aw.test(e),ro=e=>Qs(e,uw),tj=e=>Qs(e,dw),ib=e=>Qs(e,ow),nj=e=>Qs(e,cw),rj=e=>Qs(e,lw),oc=e=>Qs(e,hw,!0),sj=e=>Qs(e,fw,!0),hs=(e,t,r)=>{const a=sw.exec(e);return a?a[1]?t(a[1]):r(a[2]):!1},Qs=(e,t,r=!1)=>{const a=aw.exec(e);return a?a[1]?t(a[1]):r:!1},ow=e=>e==="position"||e==="percentage",lw=e=>e==="image"||e==="url",cw=e=>e==="length"||e==="size"||e==="bg-size",uw=e=>e==="length",aj=e=>e==="number",dw=e=>
vendor: 4,495 bytes, line 55
55e==="family-name",fw=e=>e==="number"||e==="weight",hw=e=>e==="shadow",ij=()=>{const e=gt("color"),t=gt("font"),r=gt("text"),a=gt("font-weight"),o=gt("tracking"),c=gt("leading"),u=gt("breakpoint"),f=gt("container"),p=gt("spacing"),m=gt("radius"),y=gt("shadow"),g=gt("inset-shadow"),b=gt("text-shadow"),w=gt("drop-shadow"),_=gt("blur"),x=gt("perspective"),E=gt("aspect"),R=gt("ease"),M=gt("animate"),j=()=>["auto","avoid","all","avoid-page","page","left","right","column"],L=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],X=()=>[...L(),ue,le],G=()=>["auto","hidden","clip","visible","scroll"],H=()=>["auto","contain","none"],U=()=>[ue,le,p],Q=()=>[Xr,"full","auto",...U()],fe=()=>[Zr,"none","subgrid",ue,le],ie=()=>["auto",{span:["full",Zr,ue,le]},Zr,ue,le],ve=()=>[Zr,"auto",ue,le],Se=()=>["auto","min","max","fr",ue,le],ze=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],Ae=()=>["start","end","center","stretch","center-safe","end-safe"],D=()=>["auto",...U()],F=()=>[Xr,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...U()],ae=()=>[Xr,"screen","full","dvw","lvw","svw","min","max","fit",...U()],Ee=()=>[Xr,"screen","full","lh","dvh","lvh","svh","min","max","fit",...U()],ee=()=>[e,ue,le],C=()=>[...L(),ib,ab,{position:[ue,le]}],$=()=>["no-repeat",{repeat:["","x","y","space","round"]}],K=()=>["auto","cover","contain",nj,X2,{size:[ue,le]}],W=()=>[jf,ro,Ps],Z=()=>["","none","full",m,ue,le],se=()=>["",xe,ro,Ps],we=()=>["solid","dashed","dotted","double"],ye=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],pe=()=>[xe,jf,ib,ab],xt=()=>["","none",_,ue,le],ft=()=>["none",xe,ue,le],at=()=>["none",xe,ue,le],Rn=()=>[xe,ue,le],ht=()=>[Xr,"full",...U()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[br],breakpoint:[br],color:[iw],container:[br],"drop-shadow":[br],ease:["in","out","in-out"],font:[Q2],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[br],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[br],shadow:[br],spacing:["px",xe],text:[br],"text-shadow":[br],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Xr,le,ue,E]}],container:["container"],columns:[{columns:[xe,le,ue,f]}],"break-after":[{"break-after":j()}],"break-before":[{"break-before":j()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:X()}],overflow:[{overflow:G()}],"overflow-x":[{"overflow-x":G()}],"overflow-y":[{"overflow-y":G()}],overscroll:[{overscroll:H()}],"overscroll-x":[{"overscroll-x":H()}],"overscroll-y":[{"overscroll-y":H()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:Q()}],"inset-x":[{"inset-x":Q()}],"inset-y":[{"inset-y":Q()}],start:[{"inset-s":Q(),start:Q()}],end:[{"inset-e":Q(),end:Q()}],"inset-bs":[{"inset-bs":Q()}],"inset-be":[{"inset-be":Q()}],top:[{top:Q()}],right:[{right:Q()}],bottom:[{bottom:Q()}],left:[{left:Q()}],visibility:["visible","invisible","collapse"],z:[{z:[Zr,"auto",ue,le]}],basis:[{basis:[Xr,"full","auto",f,...U()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[xe,Xr,"auto","initial","none",le]}],grow:[{grow:["",xe,ue,le]}],shrink:[{shrink:["",xe,ue,le]}],order:[{order:[Zr,"first","last","none",ue,le]}],"grid-cols":[{"grid-cols":fe()}],"col-start-end":[{col:ie()}],"col-start":[{"col-start":ve()}
vendor: 4,220 bytes, line 55
55],"col-end":[{"col-end":ve()}],"grid-rows":[{"grid-rows":fe()}],"row-start-end":[{row:ie()}],"row-start":[{"row-start":ve()}],"row-end":[{"row-end":ve()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":Se()}],"auto-rows":[{"auto-rows":Se()}],gap:[{gap:U()}],"gap-x":[{"gap-x":U()}],"gap-y":[{"gap-y":U()}],"justify-content":[{justify:[...ze(),"normal"]}],"justify-items":[{"justify-items":[...Ae(),"normal"]}],"justify-self":[{"justify-self":["auto",...Ae()]}],"align-content":[{content:["normal",...ze()]}],"align-items":[{items:[...Ae(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...Ae(),{baseline:["","last"]}]}],"place-content":[{"place-content":ze()}],"place-items":[{"place-items":[...Ae(),"baseline"]}],"place-self":[{"place-self":["auto",...Ae()]}],p:[{p:U()}],px:[{px:U()}],py:[{py:U()}],ps:[{ps:U()}],pe:[{pe:U()}],pbs:[{pbs:U()}],pbe:[{pbe:U()}],pt:[{pt:U()}],pr:[{pr:U()}],pb:[{pb:U()}],pl:[{pl:U()}],m:[{m:D()}],mx:[{mx:D()}],my:[{my:D()}],ms:[{ms:D()}],me:[{me:D()}],mbs:[{mbs:D()}],mbe:[{mbe:D()}],mt:[{mt:D()}],mr:[{mr:D()}],mb:[{mb:D()}],ml:[{ml:D()}],"space-x":[{"space-x":U()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":U()}],"space-y-reverse":["space-y-reverse"],size:[{size:F()}],"inline-size":[{inline:["auto",...ae()]}],"min-inline-size":[{"min-inline":["auto",...ae()]}],"max-inline-size":[{"max-inline":["none",...ae()]}],"block-size":[{block:["auto",...Ee()]}],"min-block-size":[{"min-block":["auto",...Ee()]}],"max-block-size":[{"max-block":["none",...Ee()]}],w:[{w:[f,"screen",...F()]}],"min-w":[{"min-w":[f,"screen","none",...F()]}],"max-w":[{"max-w":[f,"screen","none","prose",{screen:[u]},...F()]}],h:[{h:["screen","lh",...F()]}],"min-h":[{"min-h":["screen","lh","none",...F()]}],"max-h":[{"max-h":["screen","lh",...F()]}],"font-size":[{text:["base",r,ro,Ps]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[a,sj,Z2]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",jf,le]}],"font-family":[{font:[tj,W2,t]}],"font-features":[{"font-features":[le]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,ue,le]}],"line-clamp":[{"line-clamp":[xe,"none",ue,sb]}],leading:[{leading:[c,...U()]}],"list-image":[{"list-image":["none",ue,le]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ue,le]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:ee()}],"text-color":[{text:ee()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...we(),"wavy"]}],"text-decoration-thickness":[{decoration:[xe,"from-font","auto",ue,Ps]}],"text-decoration-color":[{decoration:ee()}],"underline-offset":[{"underline-offset":[xe,"auto",ue,le]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:U()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ue,le]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ue,le]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:C()}],"bg-repeat":[{bg:$()}],"bg-size":[{bg:K()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Zr,ue,le],radial:["",ue,le],conic:[Zr,ue,le]},rj,ej]}],"bg-color":[{bg:ee()}],"gradient-from-pos":[{from:W()}
vendor: 7,428 bytes, line 55
55],"gradient-via-pos":[{via:W()}],"gradient-to-pos":[{to:W()}],"gradient-from":[{from:ee()}],"gradient-via":[{via:ee()}],"gradient-to":[{to:ee()}],rounded:[{rounded:Z()}],"rounded-s":[{"rounded-s":Z()}],"rounded-e":[{"rounded-e":Z()}],"rounded-t":[{"rounded-t":Z()}],"rounded-r":[{"rounded-r":Z()}],"rounded-b":[{"rounded-b":Z()}],"rounded-l":[{"rounded-l":Z()}],"rounded-ss":[{"rounded-ss":Z()}],"rounded-se":[{"rounded-se":Z()}],"rounded-ee":[{"rounded-ee":Z()}],"rounded-es":[{"rounded-es":Z()}],"rounded-tl":[{"rounded-tl":Z()}],"rounded-tr":[{"rounded-tr":Z()}],"rounded-br":[{"rounded-br":Z()}],"rounded-bl":[{"rounded-bl":Z()}],"border-w":[{border:se()}],"border-w-x":[{"border-x":se()}],"border-w-y":[{"border-y":se()}],"border-w-s":[{"border-s":se()}],"border-w-e":[{"border-e":se()}],"border-w-bs":[{"border-bs":se()}],"border-w-be":[{"border-be":se()}],"border-w-t":[{"border-t":se()}],"border-w-r":[{"border-r":se()}],"border-w-b":[{"border-b":se()}],"border-w-l":[{"border-l":se()}],"divide-x":[{"divide-x":se()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":se()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...we(),"hidden","none"]}],"divide-style":[{divide:[...we(),"hidden","none"]}],"border-color":[{border:ee()}],"border-color-x":[{"border-x":ee()}],"border-color-y":[{"border-y":ee()}],"border-color-s":[{"border-s":ee()}],"border-color-e":[{"border-e":ee()}],"border-color-bs":[{"border-bs":ee()}],"border-color-be":[{"border-be":ee()}],"border-color-t":[{"border-t":ee()}],"border-color-r":[{"border-r":ee()}],"border-color-b":[{"border-b":ee()}],"border-color-l":[{"border-l":ee()}],"divide-color":[{divide:ee()}],"outline-style":[{outline:[...we(),"none","hidden"]}],"outline-offset":[{"outline-offset":[xe,ue,le]}],"outline-w":[{outline:["",xe,ro,Ps]}],"outline-color":[{outline:ee()}],shadow:[{shadow:["","none",y,oc,ic]}],"shadow-color":[{shadow:ee()}],"inset-shadow":[{"inset-shadow":["none",g,oc,ic]}],"inset-shadow-color":[{"inset-shadow":ee()}],"ring-w":[{ring:se()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:ee()}],"ring-offset-w":[{"ring-offset":[xe,Ps]}],"ring-offset-color":[{"ring-offset":ee()}],"inset-ring-w":[{"inset-ring":se()}],"inset-ring-color":[{"inset-ring":ee()}],"text-shadow":[{"text-shadow":["none",b,oc,ic]}],"text-shadow-color":[{"text-shadow":ee()}],opacity:[{opacity:[xe,ue,le]}],"mix-blend":[{"mix-blend":[...ye(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ye()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[xe]}],"mask-image-linear-from-pos":[{"mask-linear-from":pe()}],"mask-image-linear-to-pos":[{"mask-linear-to":pe()}],"mask-image-linear-from-color":[{"mask-linear-from":ee()}],"mask-image-linear-to-color":[{"mask-linear-to":ee()}],"mask-image-t-from-pos":[{"mask-t-from":pe()}],"mask-image-t-to-pos":[{"mask-t-to":pe()}],"mask-image-t-from-color":[{"mask-t-from":ee()}],"mask-image-t-to-color":[{"mask-t-to":ee()}],"mask-image-r-from-pos":[{"mask-r-from":pe()}],"mask-image-r-to-pos":[{"mask-r-to":pe()}],"mask-image-r-from-color":[{"mask-r-from":ee()}],"mask-image-r-to-color":[{"mask-r-to":ee()}],"mask-image-b-from-pos":[{"mask-b-from":pe()}],"mask-image-b-to-pos":[{"mask-b-to":pe()}],"mask-image-b-from-color":[{"mask-b-from":ee()}],"mask-image-b-to-color":[{"mask-b-to":ee()}],"mask-image-l-from-pos":[{"mask-l-from":pe()}],"mask-image-l-to-pos":[{"mask-l-to":pe()}],"mask-image-l-from-color":[{"mask-l-from":ee()}],"mask-image-l-to-color":[{"mask-l-to":ee()}],"mask-image-x-from-pos":[{"mask-x-from":pe()}],"mask-image-x-to-pos":[{"mask-x-to":pe()}],"mask-image-x-from-color":[{"mask-x-from":ee()}],"mask-image-x-to-color":[{"mask-x-to":ee()}],"mask-image-y-from-pos":[{"mask-y-from":pe()}],"mask-image-y-to-pos":[{"mask-y-to":pe()}],"mask-image-y-from-color":[{"mask-y-from":ee()}],"mask-image-y-to-color":[{"mask-y-to":ee()}],"mask-image-radial":[{"mask-radial":[ue,le]}],"mask-image-radial-from-pos":[{"mask-radial-from":pe()}],"mask-image-radial-to-pos":[{"mask-radial-to":pe()}],"mask-image-radial-from-color":[{"mask-radial-from":ee()}],"mask-image-radial-to-color":[{"mask-radial-to":ee()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":L()}],"mask-image-conic-pos":[{"mask-conic":[xe]}],"mask-image-conic-from-pos":[{"mask-conic-from":pe()}],"mask-image-conic-to-pos":[{"mask-conic-to":pe()}],"mask-image-conic-from-color":[{"mask-conic-from":ee()}],"mask-image-conic-to-color":[{"mask-conic-to":ee()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:C()}],"mask-repeat":[{mask:$()}],"mask-size":[{mask:K()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ue,le]}],filter:[{filter:["","none",ue,le]}],blur:[{blur:xt()}],brightness:[{brightness:[xe,ue,le]}],contrast:[{contrast:[xe,ue,le]}],"drop-shadow":[{"drop-shadow":["","none",w,oc,ic]}],"drop-shadow-color":[{"drop-shadow":ee()}],grayscale:[{grayscale:["",xe,ue,le]}],"hue-rotate":[{"hue-rotate":[xe,ue,le]}],invert:[{invert:["",xe,ue,le]}],saturate:[{saturate:[xe,ue,le]}],sepia:[{sepia:["",xe,ue,le]}],"backdrop-filter":[{"backdrop-filter":["","none",ue,le]}],"backdrop-blur":[{"backdrop-blur":xt()}],"backdrop-brightness":[{"backdrop-brightness":[xe,ue,le]}],"backdrop-contrast":[{"backdrop-contrast":[xe,ue,le]}],"backdrop-grayscale":[{"backdrop-grayscale":["",xe,ue,le]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[xe,ue,le]}],"backdrop-invert":[{"backdrop-invert":["",xe,ue,le]}],"backdrop-opacity":[{"backdrop-opacity":[xe,ue,le]}],"backdrop-saturate":[{"backdrop-saturate":[xe,ue,le]}],"backdrop-sepia":[{"backdrop-sepia":["",xe,ue,le]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":U()}],"border-spacing-x":[{"border-spacing-x":U()}],"border-spacing-y":[{"border-spacing-y":U()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ue,le]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[xe,"initial",ue,le]}],ease:[{ease:["linear","initial",R,ue,le]}],delay:[{delay:[xe,ue,le]}],animate:[{animate:["none",M,ue,le]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[x,ue,le]}],"perspective-origin":[{"perspective-origin":X()}],rotate:[{rotate:ft()}],"rotate-x":[{"rotate-x":ft()}],"rotate-y":[{"rotate-y":ft()}],"rotate-z":[{"rotate-z":ft()}],scale:[{scale:at()}],"scale-x":[{"scale-x":at()}],"scale-y":[{"scale-y":at()}],"scale-z":[{"scale-z":at()}],"scale-3d":["scale-3d"],skew:[{skew:Rn()}],"skew-x":[{"skew-x":Rn()}],"skew-y":[{"skew-y":Rn()}],transform:[{transform:[ue,le,"","none","gpu","cpu"]}],"transform-origin":[{origin:X()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ht()}],"translate-x":[{"translate-x":ht()}],"translate-y":[{"translate-y":ht()}],"translate-z":[{"translate-z":ht()}],"translate-none":["translate-none"],accent:[{accent:ee()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:ee()}
vendor: 4,770 bytes, line 55
55],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ue,le]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":U()}],"scroll-mx":[{"scroll-mx":U()}],"scroll-my":[{"scroll-my":U()}],"scroll-ms":[{"scroll-ms":U()}],"scroll-me":[{"scroll-me":U()}],"scroll-mbs":[{"scroll-mbs":U()}],"scroll-mbe":[{"scroll-mbe":U()}],"scroll-mt":[{"scroll-mt":U()}],"scroll-mr":[{"scroll-mr":U()}],"scroll-mb":[{"scroll-mb":U()}],"scroll-ml":[{"scroll-ml":U()}],"scroll-p":[{"scroll-p":U()}],"scroll-px":[{"scroll-px":U()}],"scroll-py":[{"scroll-py":U()}],"scroll-ps":[{"scroll-ps":U()}],"scroll-pe":[{"scroll-pe":U()}],"scroll-pbs":[{"scroll-pbs":U()}],"scroll-pbe":[{"scroll-pbe":U()}],"scroll-pt":[{"scroll-pt":U()}],"scroll-pr":[{"scroll-pr":U()}],"scroll-pb":[{"scroll-pb":U()}],"scroll-pl":[{"scroll-pl":U()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ue,le]}],fill:[{fill:["none",...ee()]}],"stroke-w":[{stroke:[xe,ro,Ps,sb]}],stroke:[{stroke:["none",...ee()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},oj=B2(ij);function lj(...e){return oj(W0(e))}
55const cj=v2("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium cursor-pointer transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 disabled:cursor-not-allowed [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),sh=ne.forwardRef(({className:e,variant:t,size:r,asChild:a=!1,...o},c)=>{const u=a?f2:"button";return J.jsx(u,{className:lj(cj({variant:t,size:r,className:e})),ref:c,...o})});sh.displayName="Button";const ob="goald-cookie-consent",uj=1e3*60*60*24*180;function dj(){const[e,t]=ne.useState(!1),[r,a]=ne.useState(!1);ne.useEffect(()=>{try{const c=window.localStorage.getItem(ob);if(!c)return t(!0);const u=JSON.parse(c);Date.now()-u.ts>uj&&t(!0)}catch{t(!0)}},[]);const o=c=>{try{window.localStorage.setItem(ob,JSON.stringify({value:c,ts:Date.now()}))}catch{}a(!0),setTimeout(()=>t(!1),200)};return e?J.jsx("div",{role:"dialog","aria-live":"polite","aria-label":"Cookie consent",className:`fixed inset-x-0 bottom-0 z-[100] px-4 pb-4 transition-opacity duration-200 ${r?"opacity-0":"opacity-100"}`,children:J.jsx("div",{className:"mx-auto max-w-5xl rounded-xl border border-white/10 bg-black/95 p-5 shadow-2xl backdrop-blur sm:p-6",children:J.jsxs("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",children:[J.jsxs("p",{className:"text-sm text-white/80 sm:max-w-2xl",children:["We use cookies to make Goald work and to understand how it's used. You can accept or decline non-essential cookies. See our"," ",J.jsx(Ic,{to:"/cookie-policy",className:"underline text-accent hover:text-accent/80",children:"Cookie Policy"}),"."]}),J.jsxs("div",{className:"flex gap-2 sm:flex-shrink-0",children:[J.jsx(sh,{variant:"outline",onClick:()=>o("declined"),className:"flex-1 sm:flex-none border-white/30 text-white hover:bg-white/10 hover:text-white",children:"Decline"}),J.jsx(sh,{onClick:()=>o("accepted"),className:"flex-1 sm:flex-none bg-accent text-black hover:bg-accent/90",children:"Accept"})]})]})})}):null}const fj="/assets/styles-M3pm0rT8.css";function hj(){return J.jsx("div",{className:"flex min-h-screen items-center justify-center bg-background px-4",children:J.jsxs("div",{className:"max-w-md text-center",children:[J.jsx("h1",{className:"text-7xl font-bold text-foreground",children:"404"}),J.jsx("h2",{className:"mt-4 text-xl font-semibold text-foreground",children:"Page not found"}),J.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:"The page you're looking for doesn't exist."}),J.jsx("div",{className:"mt-6",children:J.jsx(Ic,{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 pj({error:e,reset:t}){console.error(e);const r=Nt();return J.jsx("div",{className:"flex min-h-screen items-center justify-center bg-background px-4",children:J.jsxs("div",{className:"max-w-md text-center",children:[J.jsx("h1",{className:"text-xl font-semibold text-foreground",children:"This page didn't load"}),J.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:"Try again or head home."}),J.jsx("div",{className:"mt-6 flex flex-wrap justify-center gap-2",children:J.jsx("button",{onClick:()=>{r.invalidate(),t()},className:"rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground hover:bg-primary/90",children:"Try again"})})]})})}const Xs=Cx()({head:()=>({meta:[{charSet:"utf-8"},{name:"viewport",content:"width=device-width, initial-scale=1"},{title:"Goald â The Home of Challenges"},{name:"description",content:"Goald is the challenge app. Challenge anyone, anywhere, anytime â at anything â whilst raising funds for your chosen cause."},{property:"og:title",content:"Goald â The Home of Challenges"},{property:"og:description",content:"Goald is the challenge app. Challenge anyone, anywhere, anytime â at anything â whilst raising funds for your chosen cause."},{property:"og:type",content:"website"},{name:"twitter:card",content:"summary_large_image"},{name:"twitter:title",content:"Goald â The Home of Challenges"},{name:"twitter:description",content:"Goald is the challenge app. Challenge anyone, anywhere, anytime â at anything â whilst raising funds for your chosen cause."},{property:"og:image",content:"https://storage.googleapis.com/gpt-engineer-file-uploads/jX4OxmIttEb6ZY7ycPGtmM9kB9i2/social-images/social-1780662159600-Screenshot_2026-06-05_at_13.21.56.webp"},{name:"twitter:image",content:"https://storage.googleapis.com/gpt-engineer-file-uploads/jX4OxmIttEb6ZY7ycPGtmM9kB9i2/social-images/social-1780662159600-Screenshot_2026-06-05_at_13.21.56.webp"}],links:[{rel:"icon",type:"image/png",href:"/favicon.png"},{rel:"apple-touch-icon",href:"/favicon.png"},{rel:"stylesheet",href:fj}
55,{rel:"preconnect",href:"https://fonts.googleapis.com"},{rel:"preconnect",href:"https://fonts.gstatic.com",crossOrigin:"anonymous"},{rel:"stylesheet",href:"https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Anton&family=Inter:wght@400;500;600;700;800&display=swap"}]}),shellComponent:mj,component:gj,notFoundComponent:hj,errorComponent:pj});function mj({children:e}){return J.jsxs("html",{lang:"en",children:[J.jsx("head",{children:J.jsx(Qx,{})}),J.jsxs("body",{className:"dark",children:[e,J.jsx(Xx,{})]})]})}function gj(){const{queryClient:e}=Xs.useRouteContext();return J.jsxs(Nk,{client:e,children:[J.jsx(b0,{}),J.jsx(o2,{theme:"dark"}),J.jsx(dj,{})]})}const yj="modulepreload",vj=function(e){return"/"+e},lb={},jo=function(t,r,a){let o=Promise.resolve();if(r&&r.length>0){let p=function(m){return Promise.all(m.map(y=>Promise.resolve(y).then(g=>({status:"fulfilled",value:g}),g=>({status:"rejected",reason:g}))))};document.getElementsByTagName("link");const u=document.querySelector("meta[property=csp-nonce]"),f=u?.nonce||u?.getAttribute("nonce");o=p(r.map(m=>{if(m=vj(m),m in lb)return;lb[m]=!0;const y=m.endsWith(".css"),g=y?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${m}"]${g}`))return;const b=document.createElement("link");if(b.rel=y?"stylesheet":yj,y||(b.as="script"),b.crossOrigin="",b.href=m,f&&b.setAttribute("nonce",f),document.head.appendChild(b),y)return new Promise((w,_)=>{b.addEventListener("load",w),b.addEventListener("error",()=>_(new Error(`Unable to preload CSS for ${m}`)))})}))}function c(u){const f=new Event("vite:preloadError",{cancelable:!0});if(f.payload=u,window.dispatchEvent(f),!f.defaultPrevented)throw u}return o.then(u=>{for(const f of u||[])f.status==="rejected"&&c(f.reason);return t().catch(c)})},bj=()=>jo(()=>import("./terms-9YI56DPk.js"),__vite__mapDeps([0,1])),wj=Oo("/terms")({head:()=>({meta:[{title:"Terms & Conditions â Goald Challenges"},{name:"description",content:"The terms and conditions governing access to and use of the Goald platform and services."},{property:"og:title",content:"Terms & Conditions â Goald Challenges"},{property:"og:description",content:"Read the terms governing access to and use of the Goald platform."},{property:"og:url",content:"https://goaldchallenges.com/terms"}],links:[{rel:"canonical",href:"https://goaldchallenges.com/terms"}]}),component:Co(bj,"component")}),_j=()=>jo(()=>import("./privacy-CSYxPMp6.js"),__vite__mapDeps([2,1])),Sj=Oo("/privacy")({head:()=>({meta:[{title:"Privacy Policy â Goald Challenges"},{name:"description",content:"Privacy Policy for Goald Challenges. Find out how we collect, use, store, share and protect your personal information in accordance with the UK GDPR."},{property:"og:title",content:"Privacy Policy â Goald Challenges"},{property:"og:description",content:"Learn how we protect and manage your personal data at Goald."}]}),component:Co(_j,"component")}),Ej=()=>jo(()=>import("./delete-data-BWbLSmnd.js"),__vite__mapDeps([3,1])),Tj=Oo("/delete-data")({head:()=>({meta:[{title:"Delete Your Account â Goald Challenges"},{name:"description",content:"Instructions on how to permanently delete your Goald account and all associated data in the app or by email."},{property:"og:title",content:"Delete Your Account â Goald Challenges"},{property:"og:description",content:"Learn how to permanently delete your Goald account and your personal data."}]}),component:Co(Ej,"component")}),Rj=()=>jo(()=>import("./cookie-policy-B1dXX5k1.js"),__vite__mapDeps([4,1])),xj=Oo("/cookie-policy")({head:()=>({meta:[{title:"Cookie Policy â Goald Challenges"},{name:"description",content:"How Goald Challenges uses cookies and similar technologies, and how you can manage your consent under UK PECR and GDPR."},{property:"og:title",content:"Cookie Policy â Goald Challenges"},{property:"og:description",content:"How Goald uses cookies and how to manage your consent."}]}),component:Co(Rj,"component")}),Aj=()=>jo(()=>import("./index-BX1PG1So.js"),__vite__mapDeps([5,1])),Oj=Oo("/")({component:Co(Aj,"component")}),Cj=wj.update({id:"/terms",path:"/terms",getParentRoute:()=>Xs}),kj=Sj.update({id:"/privacy",path:"/privacy",getParentRoute:()=>Xs}),jj=Tj.update({id:"/delete-data",path:"/delete-data",getParentRoute:()=>Xs}),Mj=xj.update({id:"/cookie-policy",path:"/cookie-policy",getParentRoute:()=>Xs}),Nj=Oj.update({id:"/",path:"/",getParentRoute:()=>Xs}),Dj={IndexRoute:Nj,CookiePolicyRoute:Mj,DeleteDataRoute:jj,PrivacyRoute:kj,TermsRoute:Cj},Lj=Xs._addFileChildren(Dj),Uj=()=>{const e=new jk;return $x({routeTree:Lj,context:{queryClient:e},scrollRestoration:!0,defaultPreloadStaleTime:0})};async function zj(){const e=await Uj();let t;if(Hv){const r=await Hv.getOptions();r.serializationAdapters=r.serializationAdapters??[],window.__TSS_START_OPTIONS__=r,t=r.serializationAdapters,e.options.defaultSsr=r.defaultSsr}else t=[],window.__TSS_START_OPTIONS__={serializationAdapters:t};
55return t.push(Y1),e.options.serializationAdapters&&t.push(...e.options.serializationAdapters),e.update({basepath:"",serializationAdapters:t}),e.stores.matchesId.get().length||await J1(e),e}async function Pj(){const e=await zj();return window.$_TSR?.h(),e}var Mf;function Bj(){return Mf||(Mf=Pj()),J.jsx(W1,{promise:Mf,children:e=>J.jsx(Kx,{router:e})})}ne.startTransition(()=>{LS.hydrateRoot(document,J.jsx(ne.StrictMode,{children:J.jsx(Bj,{})}))});export{Ic as L,J as j,ne as r,Gj as t};
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.