1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-D-Py775U.js","assets/useMutation-DEdvLAA1.js","assets/useServerFn-CMDgmExJ.js","assets/PublicFooter-aFdR2Ien.js","assets/Reveal-DgDpQEXP.js","assets/arrow-right-BxhT0ouX.js","assets/check-BuZkGVc-.js","assets/copy-B0Ugr18C.js","assets/loader-circle-Dlv0jp39.js","assets/dashboard-B048tn2t.js","assets/useQuery-BCf6HE_L.js","assets/index-Cr-JLUFV.js","assets/help.functions-A34lJKjx.js","assets/dashboard.functions-CL0ucq71.js","assets/onboarding.functions-Cygow-ns.js","assets/StripeEmbeddedCheckout-D_NfSBmP.js","assets/index-D15KV2YT.js","assets/dialog-BY2Lu-x_.js","assets/index-CH-svivy.js","assets/index-xTl8YqXy.js","assets/button-DxQeiVWz.js","assets/index-Dl8nWlVX.js","assets/x-XCScJ7Vu.js","assets/input-CGR4Vx6u.js","assets/label-O93Qfv9X.js","assets/textarea-DhYqTgIM.js","assets/sheet-DduVs163.js","assets/select-B4hGeKgH.js","assets/index-BU3slTLi.js","assets/index-DJJwtfh0.js","assets/recorder.functions-n8lqy8nm.js","assets/settings-Qnt2zJVS.js","assets/book-open-CzzatgoE.js","assets/credit-card-BsnheMPJ.js","assets/file-text--lK4tWGd.js","assets/circle-check-CkC9l_uW.js","assets/LineChart-B8yIdcQ1.js","assets/external-link-CDPBgRWX.js","assets/plus-8KZGBO7p.js","assets/search-BMzHLcME.js","assets/demo-host-DB1NnP2a.js","assets/sparkles-Drrz0v-E.js","assets/trash-2-hxq3yuEa.js","assets/docs-B4pWbs1V.js","assets/extension-CvSw7qah.js","assets/arrow-left-COGdiGEQ.js","assets/mouse-pointer-click-OR9PL_Tx.js","assets/video-NcaCBALA.js","assets/help-center-CpHI_-41.js","assets/login-DNl3Y-dF.js","assets/index-BQQOKNM3.js","assets/onboarding-B8iO7Pm-.js","assets/playground-BEn2Dxft.js","assets/reset-password-dIbQNSqm.js","assets/signup-D_dYA41Q.js","assets/apps._id-DndtPNSf.js","assets/switch-DhYnoqcn.js","assets/checkout.return-Blxi2o8T.js","assets/help-center_._articleId-BWOiyImU.js","assets/ArticleEditor-CyuUlW-u.js","assets/legal.privacy-CxuyaTRO.js","assets/legal.terms-DAPrjmvW.js","assets/recorder.index-D47lCKc0.js","assets/recorder.app-CXw0LCWG.js","assets/recorder.guide-DOH7NBq6.js","assets/shield-check-_rgFtEP1.js","assets/_._lovable.oauth.consent-nXHAWn0L.js","assets/help._handle.index-CX8_AUjR.js","assets/help._handle.index-tlGBBnzc.js","assets/help._handle.index-Dy0qxX5z.js","assets/help._handle.index-DpOk180z.js","assets/help._handle._slug-CrSXs45B.js","assets/help._handle._slug-CXrTst23.js","assets/help._handle._slug-D3tLMyv-.js","assets/help._handle._slug-28wkoFaM.js","assets/recorder.app.index-Bd556grm.js","assets/HandlePicker-BMPF86ka.js","assets/refresh-cw-CFY_I6eH.js","assets/recorder.app.help-center-r9yFW85N.js","assets/recorder.app.onboarding-C3olEz_B.js","assets/recorder.app.settings-CpKb6ZEz.js","assets/recorder.app.articles._articleId-B-hRPM4Z.js"])))=>i.map(i=>d[i]); 2function LE(e,t){for(var r=0;r<t.length;r++){const s=t[r];if(typeof s!="string"&&!Array.isArray(s)){for(const o in s)if(o!=="default"&&!(o in e)){const c=Object.getOwnPropertyDescriptor(s,o);c&&Object.defineProperty(e,o,c.get?c:{enumerable:!0,get:()=>s[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var wD=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function L0(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var uh={exports:{}},qa={};var Cy;function UE(){if(Cy)return qa;Cy=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function r(s,o,c){var u=null;if(c!==void 0&&(u=""+c),o.key!==void 0&&(u=""+o.key),"key"in o){c={};for(var d in o)d!=="key"&&(c[d]=o[d])}else c=o;return o=c.ref,{$$typeof:e,type:s,key:u,ref:o!==void 0?o:null,props:c}}return qa.Fragment=t,qa.jsx=r,qa.jsxs=r,qa}var ky;function zE(){return ky||(ky=1,uh.exports=UE()),uh.exports}var $=zE(),dh={exports:{}},ye={};var xy;function IE(){if(xy)return ye;xy=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),c=Symbol.for("react.consumer"),u=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),g=Symbol.for("react.activity"),b=Symbol.iterator;function _(C){return C===null||typeof C!="object"?null:(C=b&&C[b]||C["@@iterator"],typeof C=="function"?C:null)}var S={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w=Object.assign,A={};function T(C,V,Z){this.props=C,this.context=V,this.refs=A,this.updater=Z||S}T.prototype.isReactComponent={},T.prototype.setState=function(C,V){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,V,"setState")},T.prototype.forceUpdate=function(C){this.updater.enqueueForceUpdate(this,C,"forceUpdate")};function k(){}k.prototype=T.prototype;function x(C,V,Z){this.props=C,this.context=V,this.refs=A,this.updater=Z||S}var z=x.prototype=new k;z.constructor=x,w(z,T.prototype),z.isPureReactComponent=!0;var F=Array.isArray;function U(){}var N={H:null,A:null,T:null,S:null},I=Object.prototype.hasOwnProperty;function K(C,V,Z){var ee=Z.ref;return{$$typeof:e,type:C,key:V,ref:ee!==void 0?ee:null,props:Z}}function ue(C,V){return K(C.type,V,C.props)}function G(C){return typeof C=="object"&&C!==null&&C.$$typeof===e}function J(C){var V={"=":"=0",":":"=2"};return"$"+C.replace(/[=:]/g,function(Z){return V[Z]})}var ae=/\/+/g;function ze(C,V){return typeof C=="object"&&C!==null&&C.key!=null?J(""+C.key):V.toString(36)}function me(C){switch(C.status){case"fulfilled":return C.value;case"rejected":throw C.reason;default:switch(typeof C.status=="string"?C.then(U,U):(C.status="pending",C.then(function(V){C.status==="pending"&&(C.status="fulfilled",C.value=V)},function(V){C.status==="pending"&&(C.status="rejected",C.reason=V)})),C.status){case"fulfilled":return C.value;case"rejected":throw C.reason}}throw C}function P(C,V,Z,ee,oe){var ce=typeof C;(ce==="undefined"||ce==="boolean")&&(C=null);var we=!1;if(C===null)we=!0;else switch(ce){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,P(we(C._payload),V,Z,ee,oe)}}if(we)return oe=oe(C),we=ee===""?"."+ze(C,0):ee,F(oe)?(Z="",we!=null&&(Z=we.replace(ae,"$&/")+"/"),P(oe,V,Z,"",function(Xt){return Xt})):oe!=null&&(G(oe)&&(oe=ue(oe,Z+(oe.key==null||C&&C.key===oe.key?"":(""+oe.key).replace(ae,"$&/")+"/")+we)),V.push(oe)),1;we=0;var et=ee===""?".":ee+":";if(F(C))for(var ge=0;ge<C.length;ge++)ee=C[ge],ce=et+ze(ee,ge),we+=P(ee,V,Z,ce,oe);else if(ge=_(C),typeof ge=="function")for(C=ge.call(C),ge=0;!(ee=C.next()).done;)ee=ee.value,ce=et+ze(ee,ge++),we+=P(ee,V,Z,ce,oe);else if(ce==="object"){if(typeof C.then=="function")return P(me(C),V,Z,ee,oe);throw V=String(C),Error("Objects are not valid as a React child (found: "+(V==="[object Object]"?"object with keys {"+Object.keys(C).join(", ")+"}":V)+"). If you meant to render a collection of children, use an array instead.")}return we}function Q(C,V,Z){if(C==null)return C;var ee=[],oe=0;return P(C,ee,"","",function(ce){return V.call(Z,ce,oe++)}),ee}function he(C){if(C._status===-1){var V=C._result;V=V(),V.then(function(Z){(C._status===0||C._status===-1)&&(C._status=1,C._result=Z)},function(Z){(C._status===0||C._status===-1)&&(C._status=2,C._result=Z)}),C._status===-1&&(C._status=0,C._result=V)}if(C._status===1)return C._result.default;throw C._result}var Ce=typeof reportError=="function"?reportError:function(C){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var V=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(V))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",C);return}console.error(C)}
2,X={map:Q,forEach:function(C,V,Z){Q(C,function(){V.apply(this,arguments)},Z)},count:function(C){var V=0;return Q(C,function(){V++}),V},toArray:function(C){return Q(C,function(V){return V})||[]},only:function(C){if(!G(C))throw Error("React.Children.only expected to receive a single React element child.");return C}};return ye.Activity=g,ye.Children=X,ye.Component=T,ye.Fragment=r,ye.Profiler=o,ye.PureComponent=x,ye.StrictMode=s,ye.Suspense=f,ye.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=N,ye.__COMPILER_RUNTIME={__proto__:null,c:function(C){return N.H.useMemoCache(C)}},ye.cache=function(C){return function(){return C.apply(null,arguments)}},ye.cacheSignal=function(){return null},ye.cloneElement=function(C,V,Z){if(C==null)throw Error("The argument must be a React element, but you passed "+C+".");var ee=w({},C.props),oe=C.key;if(V!=null)for(ce in V.key!==void 0&&(oe=""+V.key),V)!I.call(V,ce)||ce==="key"||ce==="__self"||ce==="__source"||ce==="ref"&&V.ref===void 0||(ee[ce]=V[ce]);var ce=arguments.length-2;if(ce===1)ee.children=Z;else if(1<ce){for(var we=Array(ce),et=0;et<ce;et++)we[et]=arguments[et+2];ee.children=we}return K(C.type,oe,ee)},ye.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},ye.createElement=function(C,V,Z){var ee,oe={},ce=null;if(V!=null)for(ee in V.key!==void 0&&(ce=""+V.key),V)I.call(V,ee)&&ee!=="key"&&ee!=="__self"&&ee!=="__source"&&(oe[ee]=V[ee]);var we=arguments.length-2;if(we===1)oe.children=Z;else if(1<we){for(var et=Array(we),ge=0;ge<we;ge++)et[ge]=arguments[ge+2];oe.children=et}if(C&&C.defaultProps)for(ee in we=C.defaultProps,we)oe[ee]===void 0&&(oe[ee]=we[ee]);return K(C,ce,oe)},ye.createRef=function(){return{current:null}},ye.forwardRef=function(C){return{$$typeof:d,render:C}},ye.isValidElement=G,ye.lazy=function(C){return{$$typeof:y,_payload:{_status:-1,_result:C},_init:he}},ye.memo=function(C,V){return{$$typeof:m,type:C,compare:V===void 0?null:V}},ye.startTransition=function(C){var V=N.T,Z={};N.T=Z;try{var ee=C(),oe=N.S;oe!==null&&oe(Z,ee),typeof ee=="object"&&ee!==null&&typeof ee.then=="function"&&ee.then(U,Ce)}catch(ce){Ce(ce)}finally{V!==null&&Z.types!==null&&(V.types=Z.types),N.T=V}},ye.unstable_useCacheRefresh=function(){return N.H.useCacheRefresh()},ye.use=function(C){return N.H.use(C)},ye.useActionState=function(C,V,Z){return N.H.useActionState(C,V,Z)},ye.useCallback=function(C,V){return N.H.useCallback(C,V)},ye.useContext=function(C){return N.H.useContext(C)},ye.useDebugValue=function(){},ye.useDeferredValue=function(C,V){return N.H.useDeferredValue(C,V)},ye.useEffect=function(C,V){return N.H.useEffect(C,V)},ye.useEffectEvent=function(C){return N.H.useEffectEvent(C)},ye.useId=function(){return N.H.useId()},ye.useImperativeHandle=function(C,V,Z){return N.H.useImperativeHandle(C,V,Z)},ye.useInsertionEffect=function(C,V){return N.H.useInsertionEffect(C,V)},ye.useLayoutEffect=function(C,V){return N.H.useLayoutEffect(C,V)},ye.useMemo=function(C,V){return N.H.useMemo(C,V)},ye.useOptimistic=function(C,V){return N.H.useOptimistic(C,V)},ye.useReducer=function(C,V,Z){return N.H.useReducer(C,V,Z)},ye.useRef=function(C){return N.H.useRef(C)},ye.useState=function(C){return N.H.useState(C)},ye.useSyncExternalStore=function(C,V,Z){return N.H.useSyncExternalStore(C,V,Z)},ye.useTransition=function(){return N.H.useTransition()},ye.version="19.2.5",ye}var jy;function Eo(){return jy||(jy=1,dh.exports=IE()),dh.exports}var se=Eo();const Ao=L0(se),SD=LE({__proto__:null,default:Ao},[se]);var hh={exports:{}},Va={},fh={exports:{}},ph={};var Ny;function PE(){return Ny||(Ny=1,(function(e){function t(P,Q){var he=P.length;P.push(Q);e:for(;0<he;){var Ce=he-1>>>1,X=P[Ce];if(0<o(X,Q))P[Ce]=Q,P[he]=X,he=Ce;else break e}}function r(P){return P.length===0?null:P[0]}function s(P){if(P.length===0)return null;var Q=P[0],he=P.pop();if(he!==Q){P[0]=he;e:for(var Ce=0,X=P.length,C=X>>>1;Ce<C;){var V=2*(Ce+1)-1,Z=P[V],ee=V+1,oe=P[ee];if(0>o(Z,he))ee<X&&0>o(oe,Z)?(P[Ce]=oe,P[ee]=he,Ce=ee):(P[Ce]=Z,P[V]=he,Ce=V);else if(ee<X&&0>o(oe,he))P[Ce]=oe,P[ee]=he,Ce=ee;else break e}}return Q}function o(P,Q){var he=P.sortIndex-Q.sortIndex;return he!==0?he:P.id-Q.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,d=u.now();e.unstable_now=function(){return u.now()-d}}var f=[],m=[],y=1,g=null,b=3,_=!1,S=!1,w=!1,A=!1,T=typeof setTimeout=="function"?setTimeout:null,k=typeof clearTimeout=="function"?clearTimeout:null,x=typeof setImmediate<"u"?setImmediate:null;function z(P){for(var Q=r(m);Q!==null;){if(Q.callback===null)s(m);else if(Q.startTime<=P)s(m),Q.sortIndex=Q.expirationTime,t(f,Q);else break;Q=r(m)}}function F(P){if(w=!1,z(P),!S)if(r(f)!==null)S=!0,U||(U=!0,J());else{var Q=r(m);Q!==null&&me(F,Q.startTime-P)}}var U=!1,N=-1,I=5,K=-1;function ue(){return A?!0:!(e.unstable_now()-K<I)}function G(){if(A=!1,U){var P=e.unstable_now();K=P;var Q=!0;try{e:{S=!1,w&&(w=!1,k(N),N=-1),_=!0;var he=b;try{t:{for(z(P),g=r(f);g!==null&&!(g.expirationTime>P&&ue());){var Ce=g.callback;if(typeof Ce=="function"){g.callback=null,b=g.priorityLevel;var X=Ce(g.expirationTime<=P);if(P=e.unstable_now(),typeof X=="function"){g.callback=X,z(P),Q=!0;break t}g===r(f)&&s(f),z(P)}else s(f);g=r(f)}if(g!==null)Q=!0;else{var C=r(m);C!==null&&me(F,C.startTime-P),Q=!1}}break e}finally{g=null,b=he,_=!1}Q=void 0}}finally{Q?J():U=!1}}}var J;if(typeof x=="function")J=function(){x(G)};else if(typeof MessageChannel<"u"){var ae=new MessageChannel,ze=ae.port2;ae.port1.onmessage=G,J=function(){ze.postMessage(null)}}else J=function(){T(G,0)};function me(P,Q){N=T(function(){P(e.unstable_now())},Q)}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(P){P.callback=null},e.unstable_forceFrameRate=function(P){0>P||125<P?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):I=0<P?Math.floor(1e3/P):5},e.unstable_getCurrentPriorityLevel=function(){return b},e.unstable_next=function(P){switch(b){case 1:case 2:case 3:var Q=3;break;default:Q=b}var he=b;b=Q;try{return P()}finally{b=he}},e.unstable_requestPaint=function(){A=!0},e.unstable_runWithPriority=function(P,Q){switch(P){case 1:case 2:case 3:case 4:case 5:break;default:P=3}var he=b;b=P;try{return Q()}finally{b=he}}
vendor: 22,533 bytes, lines 2-9
2,e.unstable_scheduleCallback=function(P,Q,he){var Ce=e.unstable_now();switch(typeof he=="object"&&he!==null?(he=he.delay,he=typeof he=="number"&&0<he?Ce+he:Ce):he=Ce,P){case 1:var X=-1;break;case 2:X=250;break;case 5:X=1073741823;break;case 4:X=1e4;break;default:X=5e3}return X=he+X,P={id:y++,callback:Q,priorityLevel:P,startTime:he,expirationTime:X,sortIndex:-1},he>Ce?(P.sortIndex=he,t(m,P),r(f)===null&&P===r(m)&&(w?(k(N),N=-1):w=!0,me(F,he-Ce))):(P.sortIndex=X,t(f,P),S||_||(S=!0,U||(U=!0,J()))),P},e.unstable_shouldYield=ue,e.unstable_wrapCallback=function(P){var Q=b;return function(){var he=b;b=Q;try{return P.apply(this,arguments)}finally{b=he}}}})(ph)),ph}var My;function BE(){return My||(My=1,fh.exports=PE()),fh.exports}var mh={exports:{}},St={};var Dy;function $E(){if(Dy)return St;Dy=1;var e=Eo();function t(f){var m="https://react.dev/errors/"+f;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 #"+f+"; visit "+m+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(){}var s={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(f,m,y){var g=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:g==null?null:""+g,children:f,containerInfo:m,implementation:y}}var u=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function d(f,m){if(f==="font")return"";if(typeof m=="string")return m==="use-credentials"?m:""}return St.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=s,St.createPortal=function(f,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(f,m,null,y)},St.flushSync=function(f){var m=u.T,y=s.p;try{if(u.T=null,s.p=2,f)return f()}finally{u.T=m,s.p=y,s.d.f()}},St.preconnect=function(f,m){typeof f=="string"&&(m?(m=m.crossOrigin,m=typeof m=="string"?m==="use-credentials"?m:"":void 0):m=null,s.d.C(f,m))},St.prefetchDNS=function(f){typeof f=="string"&&s.d.D(f)},St.preinit=function(f,m){if(typeof f=="string"&&m&&typeof m.as=="string"){var y=m.as,g=d(y,m.crossOrigin),b=typeof m.integrity=="string"?m.integrity:void 0,_=typeof m.fetchPriority=="string"?m.fetchPriority:void 0;y==="style"?s.d.S(f,typeof m.precedence=="string"?m.precedence:void 0,{crossOrigin:g,integrity:b,fetchPriority:_}):y==="script"&&s.d.X(f,{crossOrigin:g,integrity:b,fetchPriority:_,nonce:typeof m.nonce=="string"?m.nonce:void 0})}},St.preinitModule=function(f,m){if(typeof f=="string")if(typeof m=="object"&&m!==null){if(m.as==null||m.as==="script"){var y=d(m.as,m.crossOrigin);s.d.M(f,{crossOrigin:y,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0})}}else m==null&&s.d.M(f)},St.preload=function(f,m){if(typeof f=="string"&&typeof m=="object"&&m!==null&&typeof m.as=="string"){var y=m.as,g=d(y,m.crossOrigin);s.d.L(f,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})}},St.preloadModule=function(f,m){if(typeof f=="string")if(m){var y=d(m.as,m.crossOrigin);s.d.m(f,{as:typeof m.as=="string"&&m.as!=="script"?m.as:void 0,crossOrigin:y,integrity:typeof m.integrity=="string"?m.integrity:void 0})}else s.d.m(f)},St.requestFormReset=function(f){s.d.r(f)},St.unstable_batchedUpdates=function(f,m){return f(m)},St.useFormState=function(f,m,y){return u.H.useFormState(f,m,y)},St.useFormStatus=function(){return u.H.useHostTransitionStatus()},St.version="19.2.5",St}var Ly;function U0(){if(Ly)return mh.exports;Ly=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(),mh.exports=$E(),mh.exports}var Uy;function HE(){if(Uy)return Va;Uy=1;var e=BE(),t=Eo(),r=U0();function s(n){var i="https://react.dev/errors/"+n;if(1<arguments.length){i+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)i+="&args[]="+encodeURIComponent(arguments[a])}return"Minified React error #"+n+"; visit "+i+" 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 i=n,a=n;if(n.alternate)for(;i.return;)i=i.return;else{n=i;do i=n,(i.flags&4098)!==0&&(a=i.return),n=i.return;while(n)}return i.tag===3?a:null}function u(n){if(n.tag===13){var i=n.memoizedState;if(i===null&&(n=n.alternate,n!==null&&(i=n.memoizedState)),i!==null)return i.dehydrated}return null}function d(n){if(n.tag===31){var i=n.memoizedState;if(i===null&&(n=n.alternate,n!==null&&(i=n.memoizedState)),i!==null)return i.dehydrated}return null}function f(n){if(c(n)!==n)throw Error(s(188))}function m(n){var i=n.alternate;if(!i){if(i=c(n),i===null)throw Error(s(188));return i!==n?null:n}for(var a=n,l=i;;){var h=a.return;if(h===null)break;var p=h.alternate;if(p===null){if(l=h.return,l!==null){a=l;continue}break}if(h.child===p.child){for(p=h.child;p;){if(p===a)return f(h),n;if(p===l)return f(h),i;p=p.sibling}throw Error(s(188))}if(a.return!==l.return)a=h,l=p;else{for(var v=!1,E=h.child;E;){if(E===a){v=!0,a=h,l=p;break}if(E===l){v=!0,l=h,a=p;break}E=E.sibling}if(!v){for(E=p.child;E;){if(E===a){v=!0,a=p,l=h;break}if(E===l){v=!0,l=p,a=h;break}E=E.sibling}if(!v)throw Error(s(189))}}if(a.alternate!==l)throw Error(s(190))}if(a.tag!==3)throw Error(s(188));return a.stateNode.current===a?n:i}function y(n){var i=n.tag;if(i===5||i===26||i===27||i===6)return n;for(n=n.child;n!==null;){if(i=y(n),i!==null)return i;n=n.sibling}return null}var g=Object.assign,b=Symbol.for("react.element"),_=Symbol.for("react.transitional.element"),S=Symbol.for("react.portal"),w=Symbol.for("react.fragment"),A=Symbol.for("react.strict_mode"),T=Symbol.for("react.profiler"),k=Symbol.for("react.consumer"),x=Symbol.for("react.context"),z=Symbol.for("react.forward_ref"),F=Symbol.for("react.suspense"),U=Symbol.for("react.suspense_list"),N=Symbol.for("react.memo"),I=Symbol.for("react.lazy"),K=Symbol.for("react.activity"),ue=Symbol.for("react.memo_cache_sentinel"),G=Symbol.iterator;function J(n){return n===null||typeof n!="object"?null:(n=G&&n[G]||n["@@iterator"],typeof n=="function"?n:null)}var ae=Symbol.for("react.client.reference");function ze(n){if(n==null)return null;if(typeof n=="function")return n.$$typeof===ae?null:n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case w:return"Fragment";case T:return"Profiler";case A:return"StrictMode";case F:return"Suspense";case U:return"SuspenseList";case K:return"Activity"}if(typeof n=="object")switch(n.$$typeof){case S:return"Portal";case x:return n.displayName||"Context";case k:return(n._context.displayName||"Context")+".Consumer";case z:var i=n.render;return n=n.displayName,n||(n=i.displayName||i.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case N:return i=n.displayName||null,i!==null?i:ze(n.type)||"Memo";case I:i=n._payload,n=n._init;try{return ze(n(i))}catch{}}return null}var me=Array.isArray,P=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Q=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,he={pending:!1,data:null,method:null,action:null},Ce=[],X=-1;function C(n){return{current:n}}function V(n){0>X||(n.current=Ce[X],Ce[X]=null,X--)}function Z(n,i){X++,Ce[X]=n.current,n.current=i}var ee=C(null),oe=C(null),ce=C(null),we=C(null);function et(n,i){switch(Z(ce,i),Z(oe,n),Z(ee,null),i.nodeType){case 9:case 11:n=(n=i.documentElement)&&(n=n.namespaceURI)?Xg(n):0;break;default:if(n=i.tagName,i=i.namespaceURI)i=Xg(i),n=Zg(i,n);else switch(n){case"svg":n=1;break;case"math":n=2;break;default:n=0}}V(ee),Z(ee,n)}function ge(){V(ee),V(oe),V(ce)}function Xt(n){n.memoizedState!==null&&Z(we,n);var i=ee.current,a=Zg(i,n.type);i!==a&&(Z(oe,n),Z(ee,a))}function kt(n){oe.current===n&&(V(ee),V(oe)),we.current===n&&(V(we),Pa._currentValue=he)}var Pt,In;function Rt(n){if(Pt===void 0)try{throw Error()}catch(a){var i=a.stack.trim().match(/\n( *(at )?)/);Pt=i&&i[1]||"",In=-1<a.stack.indexOf(` 3 at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return` 4`+Pt+n+In}var Js=!1;function $i(n,i){if(!n||Js)return"";Js=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(i){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(B){var L=B}Reflect.construct(n,[],Y)}else{try{Y.call()}catch(B){L=B}n.call(Y.prototype)}}else{try{throw Error()}catch(B){L=B}(Y=n())&&typeof Y.catch=="function"&&Y.catch(function(){})}}catch(B){if(B&&L&&typeof B.stack=="string")return[B.stack,L.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var h=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");h&&h.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var p=l.DetermineComponentFrameRoot(),v=p[0],E=p[1];if(v&&E){var R=v.split(` 5`),D=E.split(` 6`);for(h=l=0;l<R.length&&!R[l].includes("DetermineComponentFrameRoot");)l++;for(;h<D.length&&!D[h].includes("DetermineComponentFrameRoot");)h++;if(l===R.length||h===D.length)for(l=R.length-1,h=D.length-1;1<=l&&0<=h&&R[l]!==D[h];)h--;for(;1<=l&&0<=h;l--,h--)if(R[l]!==D[h]){if(l!==1||h!==1)do if(l--,h--,0>h||R[l]!==D[h]){var H=` 7`+R[l].replace(" at new "," at ");return n.displayName&&H.includes("<anonymous>")&&(H=H.replace("<anonymous>",n.displayName)),H}while(1<=l&&0<=h);break}}}finally{Js=!1,Error.prepareStackTrace=a}return(a=n?n.displayName||n.name:"")?Rt(a):""}function Ro(n,i){switch(n.tag){case 26:case 27:case 5:return Rt(n.type);case 16:return Rt("Lazy");case 13:return n.child!==i&&i!==null?Rt("Suspense Fallback"):Rt("Suspense");case 19:return Rt("SuspenseList");case 0:case 15:return $i(n.type,!1);case 11:return $i(n.type.render,!1);case 1:return $i(n.type,!0);case 31:return Rt("Activity");default:return""}}function Pn(n){try{var i="",a=null;do i+=Ro(n,a),a=n,n=n.return;while(n);return i}catch(l){return` 8Error generating stack: `+l.message+` 9`+l.stack}}var oi=Object.prototype.hasOwnProperty,fn=e.unstable_scheduleCallback,Qs=e.unstable_cancelCallback,Oo=e.unstable_shouldYield,Xc=e.unstable_requestPaint,wt=e.unstable_now,ot=e.unstable_getCurrentPriorityLevel,lt=e.unstable_ImmediatePriority,Bt=e.unstable_UserBlockingPriority,Bn=e.unstable_NormalPriority,gw=e.unstable_LowPriority,jf=e.unstable_IdlePriority,yw=e.log,vw=e.unstable_setDisableYieldValue,Xs=null,$t=null;function wr(n){if(typeof yw=="function"&&vw(n),$t&&typeof $t.setStrictMode=="function")try{$t.setStrictMode(Xs,n)}catch{}}var Ht=Math.clz32?Math.clz32:ww,bw=Math.log,_w=Math.LN2;function ww(n){return n>>>=0,n===0?32:31-(bw(n)/_w|0)|0}var Co=256,ko=262144,xo=4194304;function li(n){var i=n&42;if(i!==0)return i;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 jo(n,i,a){var l=n.pendingLanes;if(l===0)return 0;var h=0,p=n.suspendedLanes,v=n.pingedLanes;n=n.warmLanes;var E=l&134217727;return E!==0?(l=E&~p,l!==0?h=li(l):(v&=E,v!==0?h=li(v):a||(a=E&~n,a!==0&&(h=li(a))))):(E=l&~p,E!==0?h=li(E):v!==0?h=li(v):a||(a=l&~n,a!==0&&(h=li(a)))),h===0?0:i!==0&&i!==h&&(i&p)===0&&(p=h&-h,a=i&-i,p>=a||p===32&&(a&4194048)!==0)?i:h}function Zs(n,i){return(n.pendingLanes&~(n.suspendedLanes&~n.pingedLanes)&i)===0}function Sw(n,i){switch(n){case 1:case 2:case 4:case 8:case 64:return i+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return i+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Nf(){var n=xo;return xo<<=1,(xo&62914560)===0&&(xo=4194304),n}function Zc(n){for(var i=[],a=0;31>a;a++)i.push(n);return i}function Ws(n,i){n.pendingLanes|=i,i!==268435456&&(n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0)}function Ew(n,i,a,l,h,p){var v=n.pendingLanes;n.pendingLanes=a,n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0,n.expiredLanes&=a,n.entangledLanes&=a,n.errorRecoveryDisabledLanes&=a,n.shellSuspendCounter=0;var E=n.entanglements,R=n.expirationTimes,D=n.hiddenUpdates;for(a=v&~a;0<a;){var H=31-Ht(a),Y=1<<H;E[H]=0,R[H]=-1;var L=D[H];if(L!==null)for(D[H]=null,H=0;H<L.length;H++){var B=L[H];B!==null&&(B.lane&=-536870913)}a&=~Y}l!==0&&Mf(n,l,0),p!==0&&h===0&&n.tag!==0&&(n.suspendedLanes|=p&~(v&~i))}function Mf(n,i,a){n.pendingLanes|=i,n.suspendedLanes&=~i;var l=31-Ht(i);n.entangledLanes|=i,n.entanglements[l]=n.entanglements[l]|1073741824|a&261930}function Df(n,i){var a=n.entangledLanes|=i;for(n=n.entanglements;a;){var l=31-Ht(a),h=1<<l;h&i|n[l]&i&&(n[l]|=i),a&=~h}}function Lf(n,i){var a=i&-i;return a=(a&42)!==0?1:Wc(a),(a&(n.suspendedLanes|i))!==0?0:a}function Wc(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 eu(n){return n&=-n,2<n?8<n?(n&134217727)!==0?32:268435456:8:2}function Uf(){var n=Q.p;return n!==0?n:(n=window.event,n===void 0?32:wy(n.type))}function zf(n,i){var a=Q.p;try{return Q.p=n,i()}finally{Q.p=a}}var Sr=Math.random().toString(36).slice(2),mt="__reactFiber$"+Sr,xt="__reactProps$"+Sr,Hi="__reactContainer$"+Sr,tu="__reactEvents$"+Sr,Aw="__reactListeners$"+Sr,Tw="__reactHandles$"+Sr,If="__reactResources$"+Sr,ea="__reactMarker$"+Sr;function nu(n){delete n[mt],delete n[xt],delete n[tu],delete n[Aw],delete n[Tw]}function qi(n){var i=n[mt];if(i)return i;for(var a=n.parentNode;a;){if(i=a[Hi]||a[mt]){if(a=i.alternate,i.child!==null||a!==null&&a.child!==null)for(n=sy(n);n!==null;){if(a=n[mt])return a;n=sy(n)}return i}n=a,a=n.parentNode}return null}function Vi(n){if(n=n[mt]||n[Hi]){var i=n.tag;if(i===5||i===6||i===13||i===31||i===26||i===27||i===3)return n}return null}function ta(n){var i=n.tag;if(i===5||i===26||i===27||i===6)return n.stateNode;throw Error(s(33))}function Gi(n){var i=n[If];return i||(i=n[If]={hoistableStyles:new Map,hoistableScripts:new Map}),i}function ht(n){n[ea]=!0}var Pf=new Set,Bf={};function ci(n,i){Yi(n,i),Yi(n+"Capture",i)}function Yi(n,i){for(Bf[n]=i,n=0;n<i.length;n++)Pf.add(i[n])}var Rw=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),$f={},Hf={};function Ow(n){return oi.call(Hf,n)?!0:oi.call($f,n)?!1:Rw.test(n)?Hf[n]=!0:($f[n]=!0,!1)}function No(n,i,a){if(Ow(i))if(a===null)n.removeAttribute(i);else{switch(typeof a){case"undefined":case"function":case"symbol":n.removeAttribute(i);return;case"boolean":var l=i.toLowerCase().slice(0,5);if(l!=="data-"&&l!=="aria-"){n.removeAttribute(i);return}}n.setAttribute(i,""+a)}}function Mo(n,i,a){if(a===null)n.removeAttribute(i);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(i);return}n.setAttribute(i,""+a)}}function $n(n,i,a,l){if(l===null)n.removeAttribute(a);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(a);return}n.setAttributeNS(i,a,""+l)}}function Zt(n){switch(typeof n){case"bigint":case"boolean":case"number":case"string":case"undefined":return n;case"object":return n;default:return""}}function qf(n){var i=n.type;return(n=n.nodeName)&&n.toLowerCase()==="input"&&(i==="checkbox"||i==="radio")}function Cw(n,i,a){var l=Object.getOwnPropertyDescriptor(n.constructor.prototype,i);if(!n.hasOwnProperty(i)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var h=l.get,p=l.set;return Object.defineProperty(n,i,{configurable:!0,get:function(){return h.call(this)},set:function(v){a=""+v,p.call(this,v)}}),Object.defineProperty(n,i,{enumerable:l.enumerable}),{getValue:function(){return a},setValue:function(v){a=""+v},stopTracking:function(){n._valueTracker=null,delete n[i]}}}}function ru(n){if(!n._valueTracker){var i=qf(n)?"checked":"value";n._valueTracker=Cw(n,i,""+n[i])}}function Vf(n){if(!n)return!1;var i=n._valueTracker;if(!i)return!0;var a=i.getValue(),l="";return n&&(l=qf(n)?n.checked?"true":"false":n.value),n=l,n!==a?(i.setValue(n),!0):!1}function Do(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 kw=/[\n"\\]/g;function Wt(n){return n.replace(kw,function(i){return"\\"+i.charCodeAt(0).toString(16)+" "})}function iu(n,i,a,l,h,p,v,E){n.name="",v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"?n.type=v:n.removeAttribute("type"),i!=null?v==="number"?(i===0&&n.value===""||n.value!=i)&&(n.value=""+Zt(i)):n.value!==""+Zt(i)&&(n.value=""+Zt(i)):v!=="submit"&&v!=="reset"||n.removeAttribute("value"),i!=null?su(n,v,Zt(i)):a!=null?su(n,v,Zt(a)):l!=null&&n.removeAttribute("value"),h==null&&p!=null&&(n.defaultChecked=!!p),h!=null&&(n.checked=h&&typeof h!="function"&&typeof h!="symbol"),E!=null&&typeof E!="function"&&typeof E!="symbol"&&typeof E!="boolean"?n.name=""+Zt(E):n.removeAttribute("name")}function Gf(n,i,a,l,h,p,v,E){if(p!=null&&typeof p!="function"&&typeof p!="symbol"&&typeof p!="boolean"&&(n.type=p),i!=null||a!=null){if(!(p!=="submit"&&p!=="reset"||i!=null)){ru(n);return}a=a!=null?""+Zt(a):"",i=i!=null?""+Zt(i):a,E||i===n.value||(n.value=i),n.defaultValue=i}l=l??h,l=typeof l!="function"&&typeof l!="symbol"&&!!l,n.checked=E?n.checked:!!l,n.defaultChecked=!!l,v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"&&(n.name=v),ru(n)}function su(n,i,a){i==="number"&&Do(n.ownerDocument)===n||n.defaultValue===""+a||(n.defaultValue=""+a)}function Fi(n,i,a,l){if(n=n.options,i){i={};for(var h=0;h<a.length;h++)i["$"+a[h]]=!0;for(a=0;a<n.length;a++)h=i.hasOwnProperty("$"+n[a].value),n[a].selected!==h&&(n[a].selected=h),h&&l&&(n[a].defaultSelected=!0)}else{for(a=""+Zt(a),i=null,h=0;h<n.length;h++){if(n[h].value===a){n[h].selected=!0,l&&(n[h].defaultSelected=!0);return}i!==null||n[h].disabled||(i=n[h])}i!==null&&(i.selected=!0)}}function Yf(n,i,a){if(i!=null&&(i=""+Zt(i),i!==n.value&&(n.value=i),a==null)){n.defaultValue!==i&&(n.defaultValue=i);return}n.defaultValue=a!=null?""+Zt(a):""}function Ff(n,i,a,l){if(i==null){if(l!=null){if(a!=null)throw Error(s(92));if(me(l)){if(1<l.length)throw Error(s(93));l=l[0]}a=l}a==null&&(a=""),i=a}a=Zt(i),n.defaultValue=a,l=n.textContent,l===a&&l!==""&&l!==null&&(n.value=l),ru(n)}function Ki(n,i){if(i){var a=n.firstChild;if(a&&a===n.lastChild&&a.nodeType===3){a.nodeValue=i;return}}n.textContent=i}var xw=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 Kf(n,i,a){var l=i.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?l?n.setProperty(i,""):i==="float"?n.cssFloat="":n[i]="":l?n.setProperty(i,a):typeof a!="number"||a===0||xw.has(i)?i==="float"?n.cssFloat=a:n[i]=(""+a).trim():n[i]=a+"px"}function Jf(n,i,a){if(i!=null&&typeof i!="object")throw Error(s(62));if(n=n.style,a!=null){for(var l in a)!a.hasOwnProperty(l)||i!=null&&i.hasOwnProperty(l)||(l.indexOf("--")===0?n.setProperty(l,""):l==="float"?n.cssFloat="":n[l]="");for(var h in i)l=i[h],i.hasOwnProperty(h)&&a[h]!==l&&Kf(n,h,l)}else for(var p in i)i.hasOwnProperty(p)&&Kf(n,p,i[p])}function au(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 jw=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"]]),Nw=/^[\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 Lo(n){return Nw.test(""+n)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":n}function Hn(){}var ou=null;function lu(n){return n=n.target||n.srcElement||window,n.correspondingUseElement&&(n=n.correspondingUseElement),n.nodeType===3?n.parentNode:n}var Ji=null,Qi=null;function Qf(n){var i=Vi(n);if(i&&(n=i.stateNode)){var a=n[xt]||null;e:switch(n=i.stateNode,i.type){case"input":if(iu(n,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),i=a.name,a.type==="radio"&&i!=null){for(a=n;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+Wt(""+i)+'"][type="radio"]'),i=0;i<a.length;i++){var l=a[i];if(l!==n&&l.form===n.form){var h=l[xt]||null;if(!h)throw Error(s(90));iu(l,h.value,h.defaultValue,h.defaultValue,h.checked,h.defaultChecked,h.type,h.name)}}for(i=0;i<a.length;i++)l=a[i],l.form===n.form&&Vf(l)}break e;case"textarea":Yf(n,a.value,a.defaultValue);break e;case"select":i=a.value,i!=null&&Fi(n,!!a.multiple,i,!1)}}}var cu=!1;function Xf(n,i,a){if(cu)return n(i,a);cu=!0;try{var l=n(i);return l}finally{if(cu=!1,(Ji!==null||Qi!==null)&&(Sl(),Ji&&(i=Ji,n=Qi,Qi=Ji=null,Qf(i),n)))for(i=0;i<n.length;i++)Qf(n[i])}}function na(n,i){var a=n.stateNode;if(a===null)return null;var l=a[xt]||null;if(l===null)return null;a=l[i];e:switch(i){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(l=!l.disabled)||(n=n.type,l=!(n==="button"||n==="input"||n==="select"||n==="textarea")),n=!l;break e;default:n=!1}if(n)return null;if(a&&typeof a!="function")throw Error(s(231,i,typeof a));return a}var qn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),uu=!1;if(qn)try{var ra={};Object.defineProperty(ra,"passive",{get:function(){uu=!0}}),window.addEventListener("test",ra,ra),window.removeEventListener("test",ra,ra)}catch{uu=!1}var Er=null,du=null,Uo=null;function Zf(){if(Uo)return Uo;var n,i=du,a=i.length,l,h="value"in Er?Er.value:Er.textContent,p=h.length;for(n=0;n<a&&i[n]===h[n];n++);var v=a-n;for(l=1;l<=v&&i[a-l]===h[p-l];l++);return Uo=h.slice(n,1<l?1-l:void 0)}function zo(n){var i=n.keyCode;return"charCode"in n?(n=n.charCode,n===0&&i===13&&(n=13)):n=i,n===10&&(n=13),32<=n||n===13?n:0}function Io(){return!0}function Wf(){return!1}function jt(n){function i(a,l,h,p,v){this._reactName=a,this._targetInst=h,this.type=l,this.nativeEvent=p,this.target=v,this.currentTarget=null;for(var E in n)n.hasOwnProperty(E)&&(a=n[E],this[E]=a?a(p):p[E]);return this.isDefaultPrevented=(p.defaultPrevented!=null?p.defaultPrevented:p.returnValue===!1)?Io:Wf,this.isPropagationStopped=Wf,this}return g(i.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=Io)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=Io)},persist:function(){},isPersistent:Io}),i}var ui={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(n){return n.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Po=jt(ui),ia=g({},ui,{view:0,detail:0}),Mw=jt(ia),hu,fu,sa,Bo=g({},ia,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:mu,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!==sa&&(sa&&n.type==="mousemove"?(hu=n.screenX-sa.screenX,fu=n.screenY-sa.screenY):fu=hu=0,sa=n),hu)},movementY:function(n){return"movementY"in n?n.movementY:fu}}),ep=jt(Bo),Dw=g({},Bo,{dataTransfer:0}),Lw=jt(Dw),Uw=g({},ia,{relatedTarget:0}),pu=jt(Uw),zw=g({},ui,{animationName:0,elapsedTime:0,pseudoElement:0}),Iw=jt(zw),Pw=g({},ui,{clipboardData:function(n){return"clipboardData"in n?n.clipboardData:window.clipboardData}}),Bw=jt(Pw),$w=g({},ui,{data:0}),tp=jt($w),Hw={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},qw={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"},Vw={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Gw(n){var i=this.nativeEvent;return i.getModifierState?i.getModifierState(n):(n=Vw[n])?!!i[n]:!1}function mu(){return Gw}var Yw=g({},ia,{key:function(n){if(n.key){var i=Hw[n.key]||n.key;if(i!=="Unidentified")return i}
vendor: 3,506 bytes, line 9
9return n.type==="keypress"?(n=zo(n),n===13?"Enter":String.fromCharCode(n)):n.type==="keydown"||n.type==="keyup"?qw[n.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:mu,charCode:function(n){return n.type==="keypress"?zo(n):0},keyCode:function(n){return n.type==="keydown"||n.type==="keyup"?n.keyCode:0},which:function(n){return n.type==="keypress"?zo(n):n.type==="keydown"||n.type==="keyup"?n.keyCode:0}}),Fw=jt(Yw),Kw=g({},Bo,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),np=jt(Kw),Jw=g({},ia,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:mu}),Qw=jt(Jw),Xw=g({},ui,{propertyName:0,elapsedTime:0,pseudoElement:0}),Zw=jt(Xw),Ww=g({},Bo,{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}),eS=jt(Ww),tS=g({},ui,{newState:0,oldState:0}),nS=jt(tS),rS=[9,13,27,32],gu=qn&&"CompositionEvent"in window,aa=null;qn&&"documentMode"in document&&(aa=document.documentMode);var iS=qn&&"TextEvent"in window&&!aa,rp=qn&&(!gu||aa&&8<aa&&11>=aa),ip=" ",sp=!1;function ap(n,i){switch(n){case"keyup":return rS.indexOf(i.keyCode)!==-1;case"keydown":return i.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function op(n){return n=n.detail,typeof n=="object"&&"data"in n?n.data:null}var Xi=!1;function sS(n,i){switch(n){case"compositionend":return op(i);case"keypress":return i.which!==32?null:(sp=!0,ip);case"textInput":return n=i.data,n===ip&&sp?null:n;default:return null}}function aS(n,i){if(Xi)return n==="compositionend"||!gu&&ap(n,i)?(n=Zf(),Uo=du=Er=null,Xi=!1,n):null;switch(n){case"paste":return null;case"keypress":if(!(i.ctrlKey||i.altKey||i.metaKey)||i.ctrlKey&&i.altKey){if(i.char&&1<i.char.length)return i.char;if(i.which)return String.fromCharCode(i.which)}return null;case"compositionend":return rp&&i.locale!=="ko"?null:i.data;default:return null}}var oS={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 lp(n){var i=n&&n.nodeName&&n.nodeName.toLowerCase();return i==="input"?!!oS[n.type]:i==="textarea"}function cp(n,i,a,l){Ji?Qi?Qi.push(l):Qi=[l]:Ji=l,i=kl(i,"onChange"),0<i.length&&(a=new Po("onChange","change",null,a,l),n.push({event:a,listeners:i}))}var oa=null,la=null;function lS(n){Gg(n,0)}function $o(n){var i=ta(n);if(Vf(i))return n}function up(n,i){if(n==="change")return i}var dp=!1;if(qn){var yu;if(qn){var vu="oninput"in document;if(!vu){var hp=document.createElement("div");hp.setAttribute("oninput","return;"),vu=typeof hp.oninput=="function"}yu=vu}else yu=!1;dp=yu&&(!document.documentMode||9<document.documentMode)}function fp(){oa&&(oa.detachEvent("onpropertychange",pp),la=oa=null)}function pp(n){if(n.propertyName==="value"&&$o(la)){var i=[];cp(i,la,n,lu(n)),Xf(lS,i)}}function cS(n,i,a){n==="focusin"?(fp(),oa=i,la=a,oa.attachEvent("onpropertychange",pp)):n==="focusout"&&fp()}function uS(n){if(n==="selectionchange"||n==="keyup"||n==="keydown")return $o(la)}function dS(n,i){if(n==="click")return $o(i)}function hS(n,i){if(n==="input"||n==="change")return $o(i)}function fS(n,i){return n===i&&(n!==0||1/n===1/i)||n!==n&&i!==i}var qt=typeof Object.is=="function"?Object.is:fS;
vendor: 113,685 bytes, lines 9-10
9function ca(n,i){if(qt(n,i))return!0;if(typeof n!="object"||n===null||typeof i!="object"||i===null)return!1;var a=Object.keys(n),l=Object.keys(i);if(a.length!==l.length)return!1;for(l=0;l<a.length;l++){var h=a[l];if(!oi.call(i,h)||!qt(n[h],i[h]))return!1}return!0}function mp(n){for(;n&&n.firstChild;)n=n.firstChild;return n}function gp(n,i){var a=mp(n);n=0;for(var l;a;){if(a.nodeType===3){if(l=n+a.textContent.length,n<=i&&l>=i)return{node:a,offset:i-n};n=l}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=mp(a)}}function yp(n,i){return n&&i?n===i?!0:n&&n.nodeType===3?!1:i&&i.nodeType===3?yp(n,i.parentNode):"contains"in n?n.contains(i):n.compareDocumentPosition?!!(n.compareDocumentPosition(i)&16):!1:!1}function vp(n){n=n!=null&&n.ownerDocument!=null&&n.ownerDocument.defaultView!=null?n.ownerDocument.defaultView:window;for(var i=Do(n.document);i instanceof n.HTMLIFrameElement;){try{var a=typeof i.contentWindow.location.href=="string"}catch{a=!1}if(a)n=i.contentWindow;else break;i=Do(n.document)}return i}function bu(n){var i=n&&n.nodeName&&n.nodeName.toLowerCase();return i&&(i==="input"&&(n.type==="text"||n.type==="search"||n.type==="tel"||n.type==="url"||n.type==="password")||i==="textarea"||n.contentEditable==="true")}var pS=qn&&"documentMode"in document&&11>=document.documentMode,Zi=null,_u=null,ua=null,wu=!1;function bp(n,i,a){var l=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;wu||Zi==null||Zi!==Do(l)||(l=Zi,"selectionStart"in l&&bu(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}),ua&&ca(ua,l)||(ua=l,l=kl(_u,"onSelect"),0<l.length&&(i=new Po("onSelect","select",null,i,a),n.push({event:i,listeners:l}),i.target=Zi)))}function di(n,i){var a={};return a[n.toLowerCase()]=i.toLowerCase(),a["Webkit"+n]="webkit"+i,a["Moz"+n]="moz"+i,a}var Wi={animationend:di("Animation","AnimationEnd"),animationiteration:di("Animation","AnimationIteration"),animationstart:di("Animation","AnimationStart"),transitionrun:di("Transition","TransitionRun"),transitionstart:di("Transition","TransitionStart"),transitioncancel:di("Transition","TransitionCancel"),transitionend:di("Transition","TransitionEnd")},Su={},_p={};qn&&(_p=document.createElement("div").style,"AnimationEvent"in window||(delete Wi.animationend.animation,delete Wi.animationiteration.animation,delete Wi.animationstart.animation),"TransitionEvent"in window||delete Wi.transitionend.transition);function hi(n){if(Su[n])return Su[n];if(!Wi[n])return n;var i=Wi[n],a;for(a in i)if(i.hasOwnProperty(a)&&a in _p)return Su[n]=i[a];return n}var wp=hi("animationend"),Sp=hi("animationiteration"),Ep=hi("animationstart"),mS=hi("transitionrun"),gS=hi("transitionstart"),yS=hi("transitioncancel"),Ap=hi("transitionend"),Tp=new Map,Eu="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(" ");Eu.push("scrollEnd");function pn(n,i){Tp.set(n,i),ci(i,[n])}var Ho=typeof reportError=="function"?reportError:function(n){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var i=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(i))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",n);return}console.error(n)},en=[],es=0,Au=0;function qo(){for(var n=es,i=Au=es=0;i<n;){var a=en[i];en[i++]=null;var l=en[i];en[i++]=null;var h=en[i];en[i++]=null;var p=en[i];if(en[i++]=null,l!==null&&h!==null){var v=l.pending;v===null?h.next=h:(h.next=v.next,v.next=h),l.pending=h}p!==0&&Rp(a,h,p)}}function Vo(n,i,a,l){en[es++]=n,en[es++]=i,en[es++]=a,en[es++]=l,Au|=l,n.lanes|=l,n=n.alternate,n!==null&&(n.lanes|=l)}function Tu(n,i,a,l){return Vo(n,i,a,l),Go(n)}function fi(n,i){return Vo(n,null,null,i),Go(n)}function Rp(n,i,a){n.lanes|=a;var l=n.alternate;l!==null&&(l.lanes|=a);for(var h=!1,p=n.return;p!==null;)p.childLanes|=a,l=p.alternate,l!==null&&(l.childLanes|=a),p.tag===22&&(n=p.stateNode,n===null||n._visibility&1||(h=!0)),n=p,p=p.return;return n.tag===3?(p=n.stateNode,h&&i!==null&&(h=31-Ht(a),n=p.hiddenUpdates,l=n[h],l===null?n[h]=[i]:l.push(i),i.lane=a|536870912),p):null}function Go(n){if(50<Na)throw Na=0,Dd=null,Error(s(185));for(var i=n.return;i!==null;)n=i,i=n.return;return n.tag===3?n.stateNode:null}var ts={};function vS(n,i,a,l){this.tag=n,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=i,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Vt(n,i,a,l){return new vS(n,i,a,l)}function Ru(n){return n=n.prototype,!(!n||!n.isReactComponent)}function Vn(n,i){var a=n.alternate;return a===null?(a=Vt(n.tag,i,n.key,n.mode),a.elementType=n.elementType,a.type=n.type,a.stateNode=n.stateNode,a.alternate=n,n.alternate=a):(a.pendingProps=i,a.type=n.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=n.flags&65011712,a.childLanes=n.childLanes,a.lanes=n.lanes,a.child=n.child,a.memoizedProps=n.memoizedProps,a.memoizedState=n.memoizedState,a.updateQueue=n.updateQueue,i=n.dependencies,a.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext},a.sibling=n.sibling,a.index=n.index,a.ref=n.ref,a.refCleanup=n.refCleanup,a}function Op(n,i){n.flags&=65011714;var a=n.alternate;return a===null?(n.childLanes=0,n.lanes=i,n.child=null,n.subtreeFlags=0,n.memoizedProps=null,n.memoizedState=null,n.updateQueue=null,n.dependencies=null,n.stateNode=null):(n.childLanes=a.childLanes,n.lanes=a.lanes,n.child=a.child,n.subtreeFlags=0,n.deletions=null,n.memoizedProps=a.memoizedProps,n.memoizedState=a.memoizedState,n.updateQueue=a.updateQueue,n.type=a.type,i=a.dependencies,n.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext}),n}function Yo(n,i,a,l,h,p){var v=0;if(l=n,typeof n=="function")Ru(n)&&(v=1);else if(typeof n=="string")v=EE(n,a,ee.current)?26:n==="html"||n==="head"||n==="body"?27:5;else e:switch(n){case K:return n=Vt(31,a,i,h),n.elementType=K,n.lanes=p,n;case w:return pi(a.children,h,p,i);case A:v=8,h|=24;break;case T:return n=Vt(12,a,i,h|2),n.elementType=T,n.lanes=p,n;case F:return n=Vt(13,a,i,h),n.elementType=F,n.lanes=p,n;case U:return n=Vt(19,a,i,h),n.elementType=U,n.lanes=p,n;default:if(typeof n=="object"&&n!==null)switch(n.$$typeof){case x:v=10;break e;case k:v=9;break e;case z:v=11;break e;case N:v=14;break e;case I:v=16,l=null;break e}v=29,a=Error(s(130,n===null?"null":typeof n,"")),l=null}return i=Vt(v,a,i,h),i.elementType=n,i.type=l,i.lanes=p,i}function pi(n,i,a,l){return n=Vt(7,n,l,i),n.lanes=a,n}function Ou(n,i,a){return n=Vt(6,n,null,i),n.lanes=a,n}function Cp(n){var i=Vt(18,null,null,0);return i.stateNode=n,i}function Cu(n,i,a){return i=Vt(4,n.children!==null?n.children:[],n.key,i),i.lanes=a,i.stateNode={containerInfo:n.containerInfo,pendingChildren:null,implementation:n.implementation},i}var kp=new WeakMap;function tn(n,i){if(typeof n=="object"&&n!==null){var a=kp.get(n);return a!==void 0?a:(i={value:n,source:i,stack:Pn(i)},kp.set(n,i),i)}return{value:n,source:i,stack:Pn(i)}}var ns=[],rs=0,Fo=null,da=0,nn=[],rn=0,Ar=null,An=1,Tn="";function Gn(n,i){ns[rs++]=da,ns[rs++]=Fo,Fo=n,da=i}function xp(n,i,a){nn[rn++]=An,nn[rn++]=Tn,nn[rn++]=Ar,Ar=n;var l=An;n=Tn;var h=32-Ht(l)-1;l&=~(1<<h),a+=1;var p=32-Ht(i)+h;if(30<p){var v=h-h%5;p=(l&(1<<v)-1).toString(32),l>>=v,h-=v,An=1<<32-Ht(i)+h|a<<h|l,Tn=p+n}else An=1<<p|a<<h|l,Tn=n}function ku(n){n.return!==null&&(Gn(n,1),xp(n,1,0))}function xu(n){for(;n===Fo;)Fo=ns[--rs],ns[rs]=null,da=ns[--rs],ns[rs]=null;for(;n===Ar;)Ar=nn[--rn],nn[rn]=null,Tn=nn[--rn],nn[rn]=null,An=nn[--rn],nn[rn]=null}function jp(n,i){nn[rn++]=An,nn[rn++]=Tn,nn[rn++]=Ar,An=i.id,Tn=i.overflow,Ar=n}var gt=null,Ge=null,Re=!1,Tr=null,sn=!1,ju=Error(s(519));function Rr(n){var i=Error(s(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw ha(tn(i,n)),ju}function Np(n){var i=n.stateNode,a=n.type,l=n.memoizedProps;switch(i[mt]=n,i[xt]=l,a){case"dialog":Ee("cancel",i),Ee("close",i);break;case"iframe":case"object":case"embed":Ee("load",i);break;case"video":case"audio":for(a=0;a<Da.length;a++)Ee(Da[a],i);break;case"source":Ee("error",i);break;case"img":case"image":case"link":Ee("error",i),Ee("load",i);break;case"details":Ee("toggle",i);break;case"input":Ee("invalid",i),Gf(i,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0);break;case"select":Ee("invalid",i);break;case"textarea":Ee("invalid",i),Ff(i,l.value,l.defaultValue,l.children)}a=l.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||i.textContent===""+a||l.suppressHydrationWarning===!0||Jg(i.textContent,a)?(l.popover!=null&&(Ee("beforetoggle",i),Ee("toggle",i)),l.onScroll!=null&&Ee("scroll",i),l.onScrollEnd!=null&&Ee("scrollend",i),l.onClick!=null&&(i.onclick=Hn),i=!0):i=!1,i||Rr(n,!0)}function Mp(n){for(gt=n.return;gt;)switch(gt.tag){case 5:case 31:case 13:sn=!1;return;case 27:case 3:sn=!0;return;default:gt=gt.return}}function is(n){if(n!==gt)return!1;if(!Re)return Mp(n),Re=!0,!1;var i=n.tag,a;if((a=i!==3&&i!==27)&&((a=i===5)&&(a=n.type,a=!(a!=="form"&&a!=="button")||Jd(n.type,n.memoizedProps)),a=!a),a&&Ge&&Rr(n),Mp(n),i===13){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(s(317));Ge=iy(n)}else if(i===31){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(s(317));Ge=iy(n)}else i===27?(i=Ge,Br(n.type)?(n=eh,eh=null,Ge=n):Ge=i):Ge=gt?on(n.stateNode.nextSibling):null;return!0}function mi(){Ge=gt=null,Re=!1}function Nu(){var n=Tr;return n!==null&&(Lt===null?Lt=n:Lt.push.apply(Lt,n),Tr=null),n}function ha(n){Tr===null?Tr=[n]:Tr.push(n)}var Mu=C(null),gi=null,Yn=null;function Or(n,i,a){Z(Mu,i._currentValue),i._currentValue=a}function Fn(n){n._currentValue=Mu.current,V(Mu)}function Du(n,i,a){for(;n!==null;){var l=n.alternate;if((n.childLanes&i)!==i?(n.childLanes|=i,l!==null&&(l.childLanes|=i)):l!==null&&(l.childLanes&i)!==i&&(l.childLanes|=i),n===a)break;n=n.return}}function Lu(n,i,a,l){var h=n.child;for(h!==null&&(h.return=n);h!==null;){var p=h.dependencies;if(p!==null){var v=h.child;p=p.firstContext;e:for(;p!==null;){var E=p;p=h;for(var R=0;R<i.length;R++)if(E.context===i[R]){p.lanes|=a,E=p.alternate,E!==null&&(E.lanes|=a),Du(p.return,a,n),l||(v=null);break e}p=E.next}}else if(h.tag===18){if(v=h.return,v===null)throw Error(s(341));v.lanes|=a,p=v.alternate,p!==null&&(p.lanes|=a),Du(v,a,n),v=null}else v=h.child;if(v!==null)v.return=h;else for(v=h;v!==null;){if(v===n){v=null;break}if(h=v.sibling,h!==null){h.return=v.return,v=h;break}v=v.return}h=v}}function ss(n,i,a,l){n=null;for(var h=i,p=!1;h!==null;){if(!p){if((h.flags&524288)!==0)p=!0;else if((h.flags&262144)!==0)break}if(h.tag===10){var v=h.alternate;if(v===null)throw Error(s(387));if(v=v.memoizedProps,v!==null){var E=h.type;qt(h.pendingProps.value,v.value)||(n!==null?n.push(E):n=[E])}}else if(h===we.current){if(v=h.alternate,v===null)throw Error(s(387));v.memoizedState.memoizedState!==h.memoizedState.memoizedState&&(n!==null?n.push(Pa):n=[Pa])}h=h.return}n!==null&&Lu(i,n,a,l),i.flags|=262144}function Ko(n){for(n=n.firstContext;n!==null;){if(!qt(n.context._currentValue,n.memoizedValue))return!0;n=n.next}return!1}function yi(n){gi=n,Yn=null,n=n.dependencies,n!==null&&(n.firstContext=null)}function yt(n){return Dp(gi,n)}function Jo(n,i){return gi===null&&yi(n),Dp(n,i)}function Dp(n,i){var a=i._currentValue;if(i={context:i,memoizedValue:a,next:null},Yn===null){if(n===null)throw Error(s(308));Yn=i,n.dependencies={lanes:0,firstContext:i},n.flags|=524288}else Yn=Yn.next=i;return a}var bS=typeof AbortController<"u"?AbortController:function(){var n=[],i=this.signal={aborted:!1,addEventListener:function(a,l){n.push(l)}};this.abort=function(){i.aborted=!0,n.forEach(function(a){return a()})}},_S=e.unstable_scheduleCallback,wS=e.unstable_NormalPriority,tt={$$typeof:x,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Uu(){return{controller:new bS,data:new Map,refCount:0}}function fa(n){n.refCount--,n.refCount===0&&_S(wS,function(){n.controller.abort()})}var pa=null,zu=0,as=0,os=null;function SS(n,i){if(pa===null){var a=pa=[];zu=0,as=Bd(),os={status:"pending",value:void 0,then:function(l){a.push(l)}}}return zu++,i.then(Lp,Lp),i}function Lp(){if(--zu===0&&pa!==null){os!==null&&(os.status="fulfilled");var n=pa;pa=null,as=0,os=null;for(var i=0;i<n.length;i++)(0,n[i])()}}function ES(n,i){var a=[],l={status:"pending",value:null,reason:null,then:function(h){a.push(h)}};return n.then(function(){l.status="fulfilled",l.value=i;for(var h=0;h<a.length;h++)(0,a[h])(i)},function(h){for(l.status="rejected",l.reason=h,h=0;h<a.length;h++)(0,a[h])(void 0)}),l}var Up=P.S;P.S=function(n,i){bg=wt(),typeof i=="object"&&i!==null&&typeof i.then=="function"&&SS(n,i),Up!==null&&Up(n,i)};var vi=C(null);function Iu(){var n=vi.current;return n!==null?n:$e.pooledCache}function Qo(n,i){i===null?Z(vi,vi.current):Z(vi,i.pool)}function zp(){var n=Iu();return n===null?null:{parent:tt._currentValue,pool:n}}var ls=Error(s(460)),Pu=Error(s(474)),Xo=Error(s(542)),Zo={then:function(){}};function Ip(n){return n=n.status,n==="fulfilled"||n==="rejected"}function Pp(n,i,a){switch(a=n[a],a===void 0?n.push(i):a!==i&&(i.then(Hn,Hn),i=a),i.status){case"fulfilled":return i.value;case"rejected":throw n=i.reason,$p(n),n;default:if(typeof i.status=="string")i.then(Hn,Hn);else{if(n=$e,n!==null&&100<n.shellSuspendCounter)throw Error(s(482));n=i,n.status="pending",n.then(function(l){if(i.status==="pending"){var h=i;h.status="fulfilled",h.value=l}},function(l){if(i.status==="pending"){var h=i;h.status="rejected",h.reason=l}})}switch(i.status){case"fulfilled":return i.value;case"rejected":throw n=i.reason,$p(n),n}throw _i=i,ls}}function bi(n){try{var i=n._init;return i(n._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(_i=a,ls):a}}var _i=null;function Bp(){if(_i===null)throw Error(s(459));var n=_i;return _i=null,n}function $p(n){if(n===ls||n===Xo)throw Error(s(483))}var cs=null,ma=0;function Wo(n){var i=ma;return ma+=1,cs===null&&(cs=[]),Pp(cs,n,i)}function ga(n,i){i=i.props.ref,n.ref=i!==void 0?i:null}function el(n,i){throw i.$$typeof===b?Error(s(525)):(n=Object.prototype.toString.call(i),Error(s(31,n==="[object Object]"?"object with keys {"+Object.keys(i).join(", ")+"}":n)))}function Hp(n){function i(j,O){if(n){var M=j.deletions;M===null?(j.deletions=[O],j.flags|=16):M.push(O)}}function a(j,O){if(!n)return null;for(;O!==null;)i(j,O),O=O.sibling;return null}function l(j){for(var O=new Map;j!==null;)j.key!==null?O.set(j.key,j):O.set(j.index,j),j=j.sibling;return O}function h(j,O){return j=Vn(j,O),j.index=0,j.sibling=null,j}function p(j,O,M){return j.index=M,n?(M=j.alternate,M!==null?(M=M.index,M<O?(j.flags|=67108866,O):M):(j.flags|=67108866,O)):(j.flags|=1048576,O)}function v(j){return n&&j.alternate===null&&(j.flags|=67108866),j}function E(j,O,M,q){return O===null||O.tag!==6?(O=Ou(M,j.mode,q),O.return=j,O):(O=h(O,M),O.return=j,O)}function R(j,O,M,q){var de=M.type;return de===w?H(j,O,M.props.children,q,M.key):O!==null&&(O.elementType===de||typeof de=="object"&&de!==null&&de.$$typeof===I&&bi(de)===O.type)?(O=h(O,M.props),ga(O,M),O.return=j,O):(O=Yo(M.type,M.key,M.props,null,j.mode,q),ga(O,M),O.return=j,O)}function D(j,O,M,q){return O===null||O.tag!==4||O.stateNode.containerInfo!==M.containerInfo||O.stateNode.implementation!==M.implementation?(O=Cu(M,j.mode,q),O.return=j,O):(O=h(O,M.children||[]),O.return=j,O)}function H(j,O,M,q,de){return O===null||O.tag!==7?(O=pi(M,j.mode,q,de),O.return=j,O):(O=h(O,M),O.return=j,O)}function Y(j,O,M){if(typeof O=="string"&&O!==""||typeof O=="number"||typeof O=="bigint")return O=Ou(""+O,j.mode,M),O.return=j,O;if(typeof O=="object"&&O!==null){switch(O.$$typeof){case _:return M=Yo(O.type,O.key,O.props,null,j.mode,M),ga(M,O),M.return=j,M;case S:return O=Cu(O,j.mode,M),O.return=j,O;case I:return O=bi(O),Y(j,O,M)}if(me(O)||J(O))return O=pi(O,j.mode,M,null),O.return=j,O;if(typeof O.then=="function")return Y(j,Wo(O),M);if(O.$$typeof===x)return Y(j,Jo(j,O),M);el(j,O)}return null}function L(j,O,M,q){var de=O!==null?O.key:null;if(typeof M=="string"&&M!==""||typeof M=="number"||typeof M=="bigint")return de!==null?null:E(j,O,""+M,q);if(typeof M=="object"&&M!==null){switch(M.$$typeof){case _:return M.key===de?R(j,O,M,q):null;case S:return M.key===de?D(j,O,M,q):null;case I:return M=bi(M),L(j,O,M,q)}if(me(M)||J(M))return de!==null?null:H(j,O,M,q,null);if(typeof M.then=="function")return L(j,O,Wo(M),q);if(M.$$typeof===x)return L(j,O,Jo(j,M),q);el(j,M)}return null}function B(j,O,M,q,de){if(typeof q=="string"&&q!==""||typeof q=="number"||typeof q=="bigint")return j=j.get(M)||null,E(O,j,""+q,de);if(typeof q=="object"&&q!==null){switch(q.$$typeof){case _:return j=j.get(q.key===null?M:q.key)||null,R(O,j,q,de);case S:return j=j.get(q.key===null?M:q.key)||null,D(O,j,q,de);case I:return q=bi(q),B(j,O,M,q,de)}if(me(q)||J(q))return j=j.get(M)||null,H(O,j,q,de,null);if(typeof q.then=="function")return B(j,O,M,Wo(q),de);if(q.$$typeof===x)return B(j,O,M,Jo(O,q),de);el(O,q)}return null}function te(j,O,M,q){for(var de=null,xe=null,le=O,be=O=0,Te=null;le!==null&&be<M.length;be++){le.index>be?(Te=le,le=null):Te=le.sibling;var je=L(j,le,M[be],q);if(je===null){le===null&&(le=Te);break}n&&le&&je.alternate===null&&i(j,le),O=p(je,O,be),xe===null?de=je:xe.sibling=je,xe=je,le=Te}if(be===M.length)return a(j,le),Re&&Gn(j,be),de;if(le===null){for(;be<M.length;be++)le=Y(j,M[be],q),le!==null&&(O=p(le,O,be),xe===null?de=le:xe.sibling=le,xe=le);return Re&&Gn(j,be),de}for(le=l(le);be<M.length;be++)Te=B(le,j,be,M[be],q),Te!==null&&(n&&Te.alternate!==null&&le.delete(Te.key===null?be:Te.key),O=p(Te,O,be),xe===null?de=Te:xe.sibling=Te,xe=Te);return n&&le.forEach(function(Gr){return i(j,Gr)}),Re&&Gn(j,be),de}function pe(j,O,M,q){if(M==null)throw Error(s(151));for(var de=null,xe=null,le=O,be=O=0,Te=null,je=M.next();le!==null&&!je.done;be++,je=M.next()){le.index>be?(Te=le,le=null):Te=le.sibling;var Gr=L(j,le,je.value,q);if(Gr===null){le===null&&(le=Te);break}n&&le&&Gr.alternate===null&&i(j,le),O=p(Gr,O,be),xe===null?de=Gr:xe.sibling=Gr,xe=Gr,le=Te}if(je.done)return a(j,le),Re&&Gn(j,be),de;if(le===null){for(;!je.done;be++,je=M.next())je=Y(j,je.value,q),je!==null&&(O=p(je,O,be),xe===null?de=je:xe.sibling=je,xe=je);return Re&&Gn(j,be),de}for(le=l(le);!je.done;be++,je=M.next())je=B(le,j,be,je.value,q),je!==null&&(n&&je.alternate!==null&&le.delete(je.key===null?be:je.key),O=p(je,O,be),xe===null?de=je:xe.sibling=je,xe=je);return n&&le.forEach(function(DE){return i(j,DE)}),Re&&Gn(j,be),de}function Be(j,O,M,q){if(typeof M=="object"&&M!==null&&M.type===w&&M.key===null&&(M=M.props.children),typeof M=="object"&&M!==null){switch(M.$$typeof){case _:e:{for(var de=M.key;O!==null;){if(O.key===de){if(de=M.type,de===w){if(O.tag===7){a(j,O.sibling),q=h(O,M.props.children),q.return=j,j=q;break e}}else if(O.elementType===de||typeof de=="object"&&de!==null&&de.$$typeof===I&&bi(de)===O.type){a(j,O.sibling),q=h(O,M.props),ga(q,M),q.return=j,j=q;break e}a(j,O);break}else i(j,O);O=O.sibling}M.type===w?(q=pi(M.props.children,j.mode,q,M.key),q.return=j,j=q):(q=Yo(M.type,M.key,M.props,null,j.mode,q),ga(q,M),q.return=j,j=q)}return v(j);case S:e:{for(de=M.key;O!==null;){if(O.key===de)if(O.tag===4&&O.stateNode.containerInfo===M.containerInfo&&O.stateNode.implementation===M.implementation){a(j,O.sibling),q=h(O,M.children||[]),q.return=j,j=q;break e}else{a(j,O);break}else i(j,O);O=O.sibling}q=Cu(M,j.mode,q),q.return=j,j=q}return v(j);case I:return M=bi(M),Be(j,O,M,q)}if(me(M))return te(j,O,M,q);if(J(M)){if(de=J(M),typeof de!="function")throw Error(s(150));return M=de.call(M),pe(j,O,M,q)}if(typeof M.then=="function")return Be(j,O,Wo(M),q);if(M.$$typeof===x)return Be(j,O,Jo(j,M),q);el(j,M)}return typeof M=="string"&&M!==""||typeof M=="number"||typeof M=="bigint"?(M=""+M,O!==null&&O.tag===6?(a(j,O.sibling),q=h(O,M),q.return=j,j=q):(a(j,O),q=Ou(M,j.mode,q),q.return=j,j=q),v(j)):a(j,O)}return function(j,O,M,q){try{ma=0;var de=Be(j,O,M,q);return cs=null,de}catch(le){if(le===ls||le===Xo)throw le;var xe=Vt(29,le,null,j.mode);return xe.lanes=q,xe.return=j,xe}}}var wi=Hp(!0),qp=Hp(!1),Cr=!1;function Bu(n){n.updateQueue={baseState:n.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function $u(n,i){n=n.updateQueue,i.updateQueue===n&&(i.updateQueue={baseState:n.baseState,firstBaseUpdate:n.firstBaseUpdate,lastBaseUpdate:n.lastBaseUpdate,shared:n.shared,callbacks:null})}function kr(n){return{lane:n,tag:0,payload:null,callback:null,next:null}}function xr(n,i,a){var l=n.updateQueue;if(l===null)return null;if(l=l.shared,(Me&2)!==0){var h=l.pending;return h===null?i.next=i:(i.next=h.next,h.next=i),l.pending=i,i=Go(n),Rp(n,null,a),i}return Vo(n,l,i,a),Go(n)}function ya(n,i,a){if(i=i.updateQueue,i!==null&&(i=i.shared,(a&4194048)!==0)){var l=i.lanes;l&=n.pendingLanes,a|=l,i.lanes=a,Df(n,a)}}function Hu(n,i){var a=n.updateQueue,l=n.alternate;if(l!==null&&(l=l.updateQueue,a===l)){var h=null,p=null;if(a=a.firstBaseUpdate,a!==null){do{var v={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};p===null?h=p=v:p=p.next=v,a=a.next}while(a!==null);p===null?h=p=i:p=p.next=i}else h=p=i;a={baseState:l.baseState,firstBaseUpdate:h,lastBaseUpdate:p,shared:l.shared,callbacks:l.callbacks},n.updateQueue=a;return}n=a.lastBaseUpdate,n===null?a.firstBaseUpdate=i:n.next=i,a.lastBaseUpdate=i}var qu=!1;function va(){if(qu){var n=os;if(n!==null)throw n}}function ba(n,i,a,l){qu=!1;var h=n.updateQueue;Cr=!1;var p=h.firstBaseUpdate,v=h.lastBaseUpdate,E=h.shared.pending;if(E!==null){h.shared.pending=null;var R=E,D=R.next;R.next=null,v===null?p=D:v.next=D,v=R;var H=n.alternate;H!==null&&(H=H.updateQueue,E=H.lastBaseUpdate,E!==v&&(E===null?H.firstBaseUpdate=D:E.next=D,H.lastBaseUpdate=R))}if(p!==null){var Y=h.baseState;v=0,H=D=R=null,E=p;do{var L=E.lane&-536870913,B=L!==E.lane;if(B?(Ae&L)===L:(l&L)===L){L!==0&&L===as&&(qu=!0),H!==null&&(H=H.next={lane:0,tag:E.tag,payload:E.payload,callback:null,next:null});e:{var te=n,pe=E;L=i;var Be=a;switch(pe.tag){case 1:if(te=pe.payload,typeof te=="function"){Y=te.call(Be,Y,L);break e}Y=te;break e;case 3:te.flags=te.flags&-65537|128;case 0:if(te=pe.payload,L=typeof te=="function"?te.call(Be,Y,L):te,L==null)break e;Y=g({},Y,L);break e;case 2:Cr=!0}}L=E.callback,L!==null&&(n.flags|=64,B&&(n.flags|=8192),B=h.callbacks,B===null?h.callbacks=[L]:B.push(L))}else B={lane:L,tag:E.tag,payload:E.payload,callback:E.callback,next:null},H===null?(D=H=B,R=Y):H=H.next=B,v|=L;if(E=E.next,E===null){if(E=h.shared.pending,E===null)break;B=E,E=B.next,B.next=null,h.lastBaseUpdate=B,h.shared.pending=null}}while(!0);H===null&&(R=Y),h.baseState=R,h.firstBaseUpdate=D,h.lastBaseUpdate=H,p===null&&(h.shared.lanes=0),Lr|=v,n.lanes=v,n.memoizedState=Y}}function Vp(n,i){if(typeof n!="function")throw Error(s(191,n));n.call(i)}function Gp(n,i){var a=n.callbacks;if(a!==null)for(n.callbacks=null,n=0;n<a.length;n++)Vp(a[n],i)}var us=C(null),tl=C(0);function Yp(n,i){n=nr,Z(tl,n),Z(us,i),nr=n|i.baseLanes}function Vu(){Z(tl,nr),Z(us,us.current)}function Gu(){nr=tl.current,V(us),V(tl)}var Gt=C(null),an=null;function jr(n){var i=n.alternate;Z(Ze,Ze.current&1),Z(Gt,n),an===null&&(i===null||us.current!==null||i.memoizedState!==null)&&(an=n)}function Yu(n){Z(Ze,Ze.current),Z(Gt,n),an===null&&(an=n)}function Fp(n){n.tag===22?(Z(Ze,Ze.current),Z(Gt,n),an===null&&(an=n)):Nr()}function Nr(){Z(Ze,Ze.current),Z(Gt,Gt.current)}function Yt(n){V(Gt),an===n&&(an=null),V(Ze)}var Ze=C(0);function nl(n){for(var i=n;i!==null;){if(i.tag===13){var a=i.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||Zd(a)||Wd(a)))return i}else if(i.tag===19&&(i.memoizedProps.revealOrder==="forwards"||i.memoizedProps.revealOrder==="backwards"||i.memoizedProps.revealOrder==="unstable_legacy-backwards"||i.memoizedProps.revealOrder==="together")){if((i.flags&128)!==0)return i}else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===n)break;for(;i.sibling===null;){if(i.return===null||i.return===n)return null;i=i.return}i.sibling.return=i.return,i=i.sibling}return null}var Kn=0,ve=null,Ie=null,nt=null,rl=!1,ds=!1,Si=!1,il=0,_a=0,hs=null,AS=0;function Je(){throw Error(s(321))}function Fu(n,i){if(i===null)return!1;for(var a=0;a<i.length&&a<n.length;a++)if(!qt(n[a],i[a]))return!1;return!0}function Ku(n,i,a,l,h,p){return Kn=p,ve=i,i.memoizedState=null,i.updateQueue=null,i.lanes=0,P.H=n===null||n.memoizedState===null?xm:cd,Si=!1,p=a(l,h),Si=!1,ds&&(p=Jp(i,a,l,h)),Kp(n),p}function Kp(n){P.H=Ea;var i=Ie!==null&&Ie.next!==null;if(Kn=0,nt=Ie=ve=null,rl=!1,_a=0,hs=null,i)throw Error(s(300));n===null||rt||(n=n.dependencies,n!==null&&Ko(n)&&(rt=!0))}function Jp(n,i,a,l){ve=n;var h=0;do{if(ds&&(hs=null),_a=0,ds=!1,25<=h)throw Error(s(301));if(h+=1,nt=Ie=null,n.updateQueue!=null){var p=n.updateQueue;p.lastEffect=null,p.events=null,p.stores=null,p.memoCache!=null&&(p.memoCache.index=0)}P.H=jm,p=i(a,l)}while(ds);return p}function TS(){var n=P.H,i=n.useState()[0];return i=typeof i.then=="function"?wa(i):i,n=n.useState()[0],(Ie!==null?Ie.memoizedState:null)!==n&&(ve.flags|=1024),i}function Ju(){var n=il!==0;return il=0,n}function Qu(n,i,a){i.updateQueue=n.updateQueue,i.flags&=-2053,n.lanes&=~a}function Xu(n){if(rl){for(n=n.memoizedState;n!==null;){var i=n.queue;i!==null&&(i.pending=null),n=n.next}rl=!1}Kn=0,nt=Ie=ve=null,ds=!1,_a=il=0,hs=null}function Ot(){var n={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return nt===null?ve.memoizedState=nt=n:nt=nt.next=n,nt}function We(){if(Ie===null){var n=ve.alternate;n=n!==null?n.memoizedState:null}else n=Ie.next;var i=nt===null?ve.memoizedState:nt.next;if(i!==null)nt=i,Ie=n;else{if(n===null)throw ve.alternate===null?Error(s(467)):Error(s(310));Ie=n,n={memoizedState:Ie.memoizedState,baseState:Ie.baseState,baseQueue:Ie.baseQueue,queue:Ie.queue,next:null},nt===null?ve.memoizedState=nt=n:nt=nt.next=n}return nt}function sl(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function wa(n){var i=_a;return _a+=1,hs===null&&(hs=[]),n=Pp(hs,n,i),i=ve,(nt===null?i.memoizedState:nt.next)===null&&(i=i.alternate,P.H=i===null||i.memoizedState===null?xm:cd),n}function al(n){if(n!==null&&typeof n=="object"){if(typeof n.then=="function")return wa(n);if(n.$$typeof===x)return yt(n)}throw Error(s(438,String(n)))}function Zu(n){var i=null,a=ve.updateQueue;if(a!==null&&(i=a.memoCache),i==null){var l=ve.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(i={data:l.data.map(function(h){return h.slice()}),index:0})))}if(i==null&&(i={data:[],index:0}),a===null&&(a=sl(),ve.updateQueue=a),a.memoCache=i,a=i.data[i.index],a===void 0)for(a=i.data[i.index]=Array(n),l=0;l<n;l++)a[l]=ue;return i.index++,a}function Jn(n,i){return typeof i=="function"?i(n):i}function ol(n){var i=We();return Wu(i,Ie,n)}function Wu(n,i,a){var l=n.queue;if(l===null)throw Error(s(311));l.lastRenderedReducer=a;var h=n.baseQueue,p=l.pending;if(p!==null){if(h!==null){var v=h.next;h.next=p.next,p.next=v}i.baseQueue=h=p,l.pending=null}if(p=n.baseState,h===null)n.memoizedState=p;else{i=h.next;var E=v=null,R=null,D=i,H=!1;do{var Y=D.lane&-536870913;if(Y!==D.lane?(Ae&Y)===Y:(Kn&Y)===Y){var L=D.revertLane;if(L===0)R!==null&&(R=R.next={lane:0,revertLane:0,gesture:null,action:D.action,hasEagerState:D.hasEagerState,eagerState:D.eagerState,next:null}),Y===as&&(H=!0);else if((Kn&L)===L){D=D.next,L===as&&(H=!0);continue}else Y={lane:0,revertLane:D.revertLane,gesture:null,action:D.action,hasEagerState:D.hasEagerState,eagerState:D.eagerState,next:null},R===null?(E=R=Y,v=p):R=R.next=Y,ve.lanes|=L,Lr|=L;Y=D.action,Si&&a(p,Y),p=D.hasEagerState?D.eagerState:a(p,Y)}else L={lane:Y,revertLane:D.revertLane,gesture:D.gesture,action:D.action,hasEagerState:D.hasEagerState,eagerState:D.eagerState,next:null},R===null?(E=R=L,v=p):R=R.next=L,ve.lanes|=Y,Lr|=Y;D=D.next}while(D!==null&&D!==i);if(R===null?v=p:R.next=E,!qt(p,n.memoizedState)&&(rt=!0,H&&(a=os,a!==null)))throw a;n.memoizedState=p,n.baseState=v,n.baseQueue=R,l.lastRenderedState=p}return h===null&&(l.lanes=0),[n.memoizedState,l.dispatch]}function ed(n){var i=We(),a=i.queue;if(a===null)throw Error(s(311));a.lastRenderedReducer=n;var l=a.dispatch,h=a.pending,p=i.memoizedState;if(h!==null){a.pending=null;var v=h=h.next;do p=n(p,v.action),v=v.next;while(v!==h);qt(p,i.memoizedState)||(rt=!0),i.memoizedState=p,i.baseQueue===null&&(i.baseState=p),a.lastRenderedState=p}return[p,l]}function Qp(n,i,a){var l=ve,h=We(),p=Re;if(p){if(a===void 0)throw Error(s(407));a=a()}else a=i();var v=!qt((Ie||h).memoizedState,a);if(v&&(h.memoizedState=a,rt=!0),h=h.queue,rd(Wp.bind(null,l,h,n),[n]),h.getSnapshot!==i||v||nt!==null&&nt.memoizedState.tag&1){if(l.flags|=2048,fs(9,{destroy:void 0},Zp.bind(null,l,h,a,i),null),$e===null)throw Error(s(349));p||(Kn&127)!==0||Xp(l,i,a)}return a}function Xp(n,i,a){n.flags|=16384,n={getSnapshot:i,value:a},i=ve.updateQueue,i===null?(i=sl(),ve.updateQueue=i,i.stores=[n]):(a=i.stores,a===null?i.stores=[n]:a.push(n))}function Zp(n,i,a,l){i.value=a,i.getSnapshot=l,em(i)&&tm(n)}function Wp(n,i,a){return a(function(){em(i)&&tm(n)})}function em(n){var i=n.getSnapshot;n=n.value;try{var a=i();return!qt(n,a)}catch{return!0}}function tm(n){var i=fi(n,2);i!==null&&Ut(i,n,2)}function td(n){var i=Ot();if(typeof n=="function"){var a=n;if(n=a(),Si){wr(!0);try{a()}finally{wr(!1)}}}return i.memoizedState=i.baseState=n,i.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Jn,lastRenderedState:n},i}function nm(n,i,a,l){return n.baseState=a,Wu(n,Ie,typeof l=="function"?l:Jn)}function RS(n,i,a,l,h){if(ul(n))throw Error(s(485));if(n=i.action,n!==null){var p={payload:h,action:n,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(v){p.listeners.push(v)}};P.T!==null?a(!0):p.isTransition=!1,l(p),a=i.pending,a===null?(p.next=i.pending=p,rm(i,p)):(p.next=a.next,i.pending=a.next=p)}}function rm(n,i){var a=i.action,l=i.payload,h=n.state;if(i.isTransition){var p=P.T,v={};P.T=v;try{var E=a(h,l),R=P.S;R!==null&&R(v,E),im(n,i,E)}catch(D){nd(n,i,D)}finally{p!==null&&v.types!==null&&(p.types=v.types),P.T=p}}else try{p=a(h,l),im(n,i,p)}catch(D){nd(n,i,D)}}function im(n,i,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(l){sm(n,i,l)},function(l){return nd(n,i,l)}):sm(n,i,a)}function sm(n,i,a){i.status="fulfilled",i.value=a,am(i),n.state=a,i=n.pending,i!==null&&(a=i.next,a===i?n.pending=null:(a=a.next,i.next=a,rm(n,a)))}function nd(n,i,a){var l=n.pending;if(n.pending=null,l!==null){l=l.next;do i.status="rejected",i.reason=a,am(i),i=i.next;while(i!==l)}n.action=null}function am(n){n=n.listeners;for(var i=0;i<n.length;i++)(0,n[i])()}function om(n,i){return i}function lm(n,i){if(Re){var a=$e.formState;if(a!==null){e:{var l=ve;if(Re){if(Ge){t:{for(var h=Ge,p=sn;h.nodeType!==8;){if(!p){h=null;break t}if(h=on(h.nextSibling),h===null){h=null;break t}}p=h.data,h=p==="F!"||p==="F"?h:null}if(h){Ge=on(h.nextSibling),l=h.data==="F!";break e}}Rr(l)}l=!1}l&&(i=a[0])}}return a=Ot(),a.memoizedState=a.baseState=i,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:om,lastRenderedState:i},a.queue=l,a=Om.bind(null,ve,l),l.dispatch=a,l=td(!1),p=ld.bind(null,ve,!1,l.queue),l=Ot(),h={state:i,dispatch:null,action:n,pending:null},l.queue=h,a=RS.bind(null,ve,h,p,a),h.dispatch=a,l.memoizedState=n,[i,a,!1]}function cm(n){var i=We();return um(i,Ie,n)}function um(n,i,a){if(i=Wu(n,i,om)[0],n=ol(Jn)[0],typeof i=="object"&&i!==null&&typeof i.then=="function")try{var l=wa(i)}catch(v){throw v===ls?Xo:v}else l=i;i=We();var h=i.queue,p=h.dispatch;return a!==i.memoizedState&&(ve.flags|=2048,fs(9,{destroy:void 0},OS.bind(null,h,a),null)),[l,p,n]}function OS(n,i){n.action=i}function dm(n){var i=We(),a=Ie;if(a!==null)return um(i,a,n);We(),i=i.memoizedState,a=We();var l=a.queue.dispatch;return a.memoizedState=n,[i,l,!1]}function fs(n,i,a,l){return n={tag:n,create:a,deps:l,inst:i,next:null},i=ve.updateQueue,i===null&&(i=sl(),ve.updateQueue=i),a=i.lastEffect,a===null?i.lastEffect=n.next=n:(l=a.next,a.next=n,n.next=l,i.lastEffect=n),n}function hm(){return We().memoizedState}function ll(n,i,a,l){var h=Ot();ve.flags|=n,h.memoizedState=fs(1|i,{destroy:void 0},a,l===void 0?null:l)}function cl(n,i,a,l){var h=We();l=l===void 0?null:l;var p=h.memoizedState.inst;Ie!==null&&l!==null&&Fu(l,Ie.memoizedState.deps)?h.memoizedState=fs(i,p,a,l):(ve.flags|=n,h.memoizedState=fs(1|i,p,a,l))}function fm(n,i){ll(8390656,8,n,i)}function rd(n,i){cl(2048,8,n,i)}function CS(n){ve.flags|=4;var i=ve.updateQueue;if(i===null)i=sl(),ve.updateQueue=i,i.events=[n];else{var a=i.events;a===null?i.events=[n]:a.push(n)}}function pm(n){var i=We().memoizedState;return CS({ref:i,nextImpl:n}),function(){if((Me&2)!==0)throw Error(s(440));return i.impl.apply(void 0,arguments)}}function mm(n,i){return cl(4,2,n,i)}function gm(n,i){return cl(4,4,n,i)}function ym(n,i){if(typeof i=="function"){n=n();var a=i(n);return function(){typeof a=="function"?a():i(null)}}if(i!=null)return n=n(),i.current=n,function(){i.current=null}}function vm(n,i,a){a=a!=null?a.concat([n]):null,cl(4,4,ym.bind(null,i,n),a)}function id(){}function bm(n,i){var a=We();i=i===void 0?null:i;var l=a.memoizedState;return i!==null&&Fu(i,l[1])?l[0]:(a.memoizedState=[n,i],n)}function _m(n,i){var a=We();i=i===void 0?null:i;var l=a.memoizedState;if(i!==null&&Fu(i,l[1]))return l[0];if(l=n(),Si){wr(!0);try{n()}finally{wr(!1)}}return a.memoizedState=[l,i],l}function sd(n,i,a){return a===void 0||(Kn&1073741824)!==0&&(Ae&261930)===0?n.memoizedState=i:(n.memoizedState=a,n=wg(),ve.lanes|=n,Lr|=n,a)}function wm(n,i,a,l){return qt(a,i)?a:us.current!==null?(n=sd(n,a,l),qt(n,i)||(rt=!0),n):(Kn&42)===0||(Kn&1073741824)!==0&&(Ae&261930)===0?(rt=!0,n.memoizedState=a):(n=wg(),ve.lanes|=n,Lr|=n,i)}function Sm(n,i,a,l,h){var p=Q.p;Q.p=p!==0&&8>p?p:8;var v=P.T,E={};P.T=E,ld(n,!1,i,a);try{var R=h(),D=P.S;if(D!==null&&D(E,R),R!==null&&typeof R=="object"&&typeof R.then=="function"){var H=ES(R,l);Sa(n,i,H,Jt(n))}else Sa(n,i,l,Jt(n))}catch(Y){Sa(n,i,{then:function(){},status:"rejected",reason:Y},Jt())}finally{Q.p=p,v!==null&&E.types!==null&&(v.types=E.types),P.T=v}}function kS(){}function ad(n,i,a,l){if(n.tag!==5)throw Error(s(476));var h=Em(n).queue;Sm(n,h,i,he,a===null?kS:function(){return Am(n),a(l)})}function Em(n){var i=n.memoizedState;if(i!==null)return i;i={memoizedState:he,baseState:he,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Jn,lastRenderedState:he},next:null};var a={};return i.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Jn,lastRenderedState:a},next:null},n.memoizedState=i,n=n.alternate,n!==null&&(n.memoizedState=i),i}function Am(n){var i=Em(n);i.next===null&&(i=n.alternate.memoizedState),Sa(n,i.next.queue,{},Jt())}function od(){return yt(Pa)}function Tm(){return We().memoizedState}function Rm(){return We().memoizedState}function xS(n){for(var i=n.return;i!==null;){switch(i.tag){case 24:case 3:var a=Jt();n=kr(a);var l=xr(i,n,a);l!==null&&(Ut(l,i,a),ya(l,i,a)),i={cache:Uu()},n.payload=i;return}i=i.return}}function jS(n,i,a){var l=Jt();a={lane:l,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},ul(n)?Cm(i,a):(a=Tu(n,i,a,l),a!==null&&(Ut(a,n,l),km(a,i,l)))}function Om(n,i,a){var l=Jt();Sa(n,i,a,l)}function Sa(n,i,a,l){var h={lane:l,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(ul(n))Cm(i,h);else{var p=n.alternate;if(n.lanes===0&&(p===null||p.lanes===0)&&(p=i.lastRenderedReducer,p!==null))try{var v=i.lastRenderedState,E=p(v,a);if(h.hasEagerState=!0,h.eagerState=E,qt(E,v))return Vo(n,i,h,0),$e===null&&qo(),!1}catch{}if(a=Tu(n,i,h,l),a!==null)return Ut(a,n,l),km(a,i,l),!0}return!1}function ld(n,i,a,l){if(l={lane:2,revertLane:Bd(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},ul(n)){if(i)throw Error(s(479))}else i=Tu(n,a,l,2),i!==null&&Ut(i,n,2)}function ul(n){var i=n.alternate;return n===ve||i!==null&&i===ve}function Cm(n,i){ds=rl=!0;var a=n.pending;a===null?i.next=i:(i.next=a.next,a.next=i),n.pending=i}function km(n,i,a){if((a&4194048)!==0){var l=i.lanes;l&=n.pendingLanes,a|=l,i.lanes=a,Df(n,a)}}var Ea={readContext:yt,use:al,useCallback:Je,useContext:Je,useEffect:Je,useImperativeHandle:Je,useLayoutEffect:Je,useInsertionEffect:Je,useMemo:Je,useReducer:Je,useRef:Je,useState:Je,useDebugValue:Je,useDeferredValue:Je,useTransition:Je,useSyncExternalStore:Je,useId:Je,useHostTransitionStatus:Je,useFormState:Je,useActionState:Je,useOptimistic:Je,useMemoCache:Je,useCacheRefresh:Je};Ea.useEffectEvent=Je;var xm={readContext:yt,use:al,useCallback:function(n,i){return Ot().memoizedState=[n,i===void 0?null:i],n},useContext:yt,useEffect:fm,useImperativeHandle:function(n,i,a){a=a!=null?a.concat([n]):null,ll(4194308,4,ym.bind(null,i,n),a)},useLayoutEffect:function(n,i){return ll(4194308,4,n,i)},useInsertionEffect:function(n,i){ll(4,2,n,i)},useMemo:function(n,i){var a=Ot();i=i===void 0?null:i;var l=n();if(Si){wr(!0);try{n()}finally{wr(!1)}}return a.memoizedState=[l,i],l},useReducer:function(n,i,a){var l=Ot();if(a!==void 0){var h=a(i);if(Si){wr(!0);try{a(i)}finally{wr(!1)}}}else h=i;return l.memoizedState=l.baseState=h,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:n,lastRenderedState:h},l.queue=n,n=n.dispatch=jS.bind(null,ve,n),[l.memoizedState,n]},useRef:function(n){var i=Ot();return n={current:n},i.memoizedState=n},useState:function(n){n=td(n);var i=n.queue,a=Om.bind(null,ve,i);return i.dispatch=a,[n.memoizedState,a]},useDebugValue:id,useDeferredValue:function(n,i){var a=Ot();return sd(a,n,i)},useTransition:function(){var n=td(!1);return n=Sm.bind(null,ve,n.queue,!0,!1),Ot().memoizedState=n,[!1,n]},useSyncExternalStore:function(n,i,a){var l=ve,h=Ot();if(Re){if(a===void 0)throw Error(s(407));a=a()}else{if(a=i(),$e===null)throw Error(s(349));(Ae&127)!==0||Xp(l,i,a)}h.memoizedState=a;var p={value:a,getSnapshot:i};return h.queue=p,fm(Wp.bind(null,l,p,n),[n]),l.flags|=2048,fs(9,{destroy:void 0},Zp.bind(null,l,p,a,i),null),a},useId:function(){var n=Ot(),i=$e.identifierPrefix;if(Re){var a=Tn,l=An;a=(l&~(1<<32-Ht(l)-1)).toString(32)+a,i="_"+i+"R_"+a,a=il++,0<a&&(i+="H"+a.toString(32)),i+="_"}else a=AS++,i="_"+i+"r_"+a.toString(32)+"_";return n.memoizedState=i},useHostTransitionStatus:od,useFormState:lm,useActionState:lm,useOptimistic:function(n){var i=Ot();i.memoizedState=i.baseState=n;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return i.queue=a,i=ld.bind(null,ve,!0,a),a.dispatch=i,[n,i]},useMemoCache:Zu,useCacheRefresh:function(){return Ot().memoizedState=xS.bind(null,ve)},useEffectEvent:function(n){var i=Ot(),a={impl:n};return i.memoizedState=a,function(){if((Me&2)!==0)throw Error(s(440));return a.impl.apply(void 0,arguments)}}},cd={readContext:yt,use:al,useCallback:bm,useContext:yt,useEffect:rd,useImperativeHandle:vm,useInsertionEffect:mm,useLayoutEffect:gm,useMemo:_m,useReducer:ol,useRef:hm,useState:function(){return ol(Jn)},useDebugValue:id,useDeferredValue:function(n,i){var a=We();return wm(a,Ie.memoizedState,n,i)},useTransition:function(){var n=ol(Jn)[0],i=We().memoizedState;return[typeof n=="boolean"?n:wa(n),i]},useSyncExternalStore:Qp,useId:Tm,useHostTransitionStatus:od,useFormState:cm,useActionState:cm,useOptimistic:function(n,i){var a=We();return nm(a,Ie,n,i)},useMemoCache:Zu,useCacheRefresh:Rm};cd.useEffectEvent=pm;var jm={readContext:yt,use:al,useCallback:bm,useContext:yt,useEffect:rd,useImperativeHandle:vm,useInsertionEffect:mm,useLayoutEffect:gm,useMemo:_m,useReducer:ed,useRef:hm,useState:function(){return ed(Jn)},useDebugValue:id,useDeferredValue:function(n,i){var a=We();return Ie===null?sd(a,n,i):wm(a,Ie.memoizedState,n,i)},useTransition:function(){var n=ed(Jn)[0],i=We().memoizedState;return[typeof n=="boolean"?n:wa(n),i]},useSyncExternalStore:Qp,useId:Tm,useHostTransitionStatus:od,useFormState:dm,useActionState:dm,useOptimistic:function(n,i){var a=We();return Ie!==null?nm(a,Ie,n,i):(a.baseState=n,[n,a.queue.dispatch])},useMemoCache:Zu,useCacheRefresh:Rm};jm.useEffectEvent=pm;function ud(n,i,a,l){i=n.memoizedState,a=a(l,i),a=a==null?i:g({},i,a),n.memoizedState=a,n.lanes===0&&(n.updateQueue.baseState=a)}var dd={enqueueSetState:function(n,i,a){n=n._reactInternals;var l=Jt(),h=kr(l);h.payload=i,a!=null&&(h.callback=a),i=xr(n,h,l),i!==null&&(Ut(i,n,l),ya(i,n,l))},enqueueReplaceState:function(n,i,a){n=n._reactInternals;var l=Jt(),h=kr(l);h.tag=1,h.payload=i,a!=null&&(h.callback=a),i=xr(n,h,l),i!==null&&(Ut(i,n,l),ya(i,n,l))},enqueueForceUpdate:function(n,i){n=n._reactInternals;var a=Jt(),l=kr(a);l.tag=2,i!=null&&(l.callback=i),i=xr(n,l,a),i!==null&&(Ut(i,n,a),ya(i,n,a))}};function Nm(n,i,a,l,h,p,v){return n=n.stateNode,typeof n.shouldComponentUpdate=="function"?n.shouldComponentUpdate(l,p,v):i.prototype&&i.prototype.isPureReactComponent?!ca(a,l)||!ca(h,p):!0}function Mm(n,i,a,l){n=i.state,typeof i.componentWillReceiveProps=="function"&&i.componentWillReceiveProps(a,l),typeof i.UNSAFE_componentWillReceiveProps=="function"&&i.UNSAFE_componentWillReceiveProps(a,l),i.state!==n&&dd.enqueueReplaceState(i,i.state,null)}function Ei(n,i){var a=i;if("ref"in i){a={};for(var l in i)l!=="ref"&&(a[l]=i[l])}if(n=n.defaultProps){a===i&&(a=g({},a));for(var h in n)a[h]===void 0&&(a[h]=n[h])}return a}function Dm(n){Ho(n)}function Lm(n){console.error(n)}function Um(n){Ho(n)}function dl(n,i){try{var a=n.onUncaughtError;a(i.value,{componentStack:i.stack})}catch(l){setTimeout(function(){throw l})}}function zm(n,i,a){try{var l=n.onCaughtError;l(a.value,{componentStack:a.stack,errorBoundary:i.tag===1?i.stateNode:null})}catch(h){setTimeout(function(){throw h})}}function hd(n,i,a){return a=kr(a),a.tag=3,a.payload={element:null},a.callback=function(){dl(n,i)},a}function Im(n){return n=kr(n),n.tag=3,n}function Pm(n,i,a,l){var h=a.type.getDerivedStateFromError;if(typeof h=="function"){var p=l.value;n.payload=function(){return h(p)},n.callback=function(){zm(i,a,l)}}var v=a.stateNode;v!==null&&typeof v.componentDidCatch=="function"&&(n.callback=function(){zm(i,a,l),typeof h!="function"&&(Ur===null?Ur=new Set([this]):Ur.add(this));var E=l.stack;this.componentDidCatch(l.value,{componentStack:E!==null?E:""})})}function NS(n,i,a,l,h){if(a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(i=a.alternate,i!==null&&ss(i,a,h,!0),a=Gt.current,a!==null){switch(a.tag){case 31:case 13:return an===null?El():a.alternate===null&&Qe===0&&(Qe=3),a.flags&=-257,a.flags|=65536,a.lanes=h,l===Zo?a.flags|=16384:(i=a.updateQueue,i===null?a.updateQueue=new Set([l]):i.add(l),zd(n,l,h)),!1;case 22:return a.flags|=65536,l===Zo?a.flags|=16384:(i=a.updateQueue,i===null?(i={transitions:null,markerInstances:null,retryQueue:new Set([l])},a.updateQueue=i):(a=i.retryQueue,a===null?i.retryQueue=new Set([l]):a.add(l)),zd(n,l,h)),!1}throw Error(s(435,a.tag))}return zd(n,l,h),El(),!1}if(Re)return i=Gt.current,i!==null?((i.flags&65536)===0&&(i.flags|=256),i.flags|=65536,i.lanes=h,l!==ju&&(n=Error(s(422),{cause:l}),ha(tn(n,a)))):(l!==ju&&(i=Error(s(423),{cause:l}),ha(tn(i,a))),n=n.current.alternate,n.flags|=65536,h&=-h,n.lanes|=h,l=tn(l,a),h=hd(n.stateNode,l,h),Hu(n,h),Qe!==4&&(Qe=2)),!1;var p=Error(s(520),{cause:l});if(p=tn(p,a),ja===null?ja=[p]:ja.push(p),Qe!==4&&(Qe=2),i===null)return!0;l=tn(l,a),a=i;do{switch(a.tag){case 3:return a.flags|=65536,n=h&-h,a.lanes|=n,n=hd(a.stateNode,l,n),Hu(a,n),!1;case 1:if(i=a.type,p=a.stateNode,(a.flags&128)===0&&(typeof i.getDerivedStateFromError=="function"||p!==null&&typeof p.componentDidCatch=="function"&&(Ur===null||!Ur.has(p))))return a.flags|=65536,h&=-h,a.lanes|=h,h=Im(h),Pm(h,n,a,l),Hu(a,h),!1}a=a.return}while(a!==null);return!1}var fd=Error(s(461)),rt=!1;function vt(n,i,a,l){i.child=n===null?qp(i,null,a,l):wi(i,n.child,a,l)}function Bm(n,i,a,l,h){a=a.render;var p=i.ref;if("ref"in l){var v={};for(var E in l)E!=="ref"&&(v[E]=l[E])}else v=l;return yi(i),l=Ku(n,i,a,v,p,h),E=Ju(),n!==null&&!rt?(Qu(n,i,h),Qn(n,i,h)):(Re&&E&&ku(i),i.flags|=1,vt(n,i,l,h),i.child)}function $m(n,i,a,l,h){if(n===null){var p=a.type;return typeof p=="function"&&!Ru(p)&&p.defaultProps===void 0&&a.compare===null?(i.tag=15,i.type=p,Hm(n,i,p,l,h)):(n=Yo(a.type,null,l,i,i.mode,h),n.ref=i.ref,n.return=i,i.child=n)}if(p=n.child,!wd(n,h)){var v=p.memoizedProps;if(a=a.compare,a=a!==null?a:ca,a(v,l)&&n.ref===i.ref)return Qn(n,i,h)}return i.flags|=1,n=Vn(p,l),n.ref=i.ref,n.return=i,i.child=n}function Hm(n,i,a,l,h){if(n!==null){var p=n.memoizedProps;if(ca(p,l)&&n.ref===i.ref)if(rt=!1,i.pendingProps=l=p,wd(n,h))(n.flags&131072)!==0&&(rt=!0);else return i.lanes=n.lanes,Qn(n,i,h)}return pd(n,i,a,l,h)}function qm(n,i,a,l){var h=l.children,p=n!==null?n.memoizedState:null;if(n===null&&i.stateNode===null&&(i.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.mode==="hidden"){if((i.flags&128)!==0){if(p=p!==null?p.baseLanes|a:a,n!==null){for(l=i.child=n.child,h=0;l!==null;)h=h|l.lanes|l.childLanes,l=l.sibling;l=h&~p}else l=0,i.child=null;return Vm(n,i,p,a,l)}if((a&536870912)!==0)i.memoizedState={baseLanes:0,cachePool:null},n!==null&&Qo(i,p!==null?p.cachePool:null),p!==null?Yp(i,p):Vu(),Fp(i);else return l=i.lanes=536870912,Vm(n,i,p!==null?p.baseLanes|a:a,a,l)}else p!==null?(Qo(i,p.cachePool),Yp(i,p),Nr(),i.memoizedState=null):(n!==null&&Qo(i,null),Vu(),Nr());return vt(n,i,h,a),i.child}function Aa(n,i){return n!==null&&n.tag===22||i.stateNode!==null||(i.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),i.sibling}function Vm(n,i,a,l,h){var p=Iu();return p=p===null?null:{parent:tt._currentValue,pool:p},i.memoizedState={baseLanes:a,cachePool:p},n!==null&&Qo(i,null),Vu(),Fp(i),n!==null&&ss(n,i,l,!0),i.childLanes=h,null}function hl(n,i){return i=pl({mode:i.mode,children:i.children},n.mode),i.ref=n.ref,n.child=i,i.return=n,i}function Gm(n,i,a){return wi(i,n.child,null,a),n=hl(i,i.pendingProps),n.flags|=2,Yt(i),i.memoizedState=null,n}function MS(n,i,a){var l=i.pendingProps,h=(i.flags&128)!==0;if(i.flags&=-129,n===null){if(Re){if(l.mode==="hidden")return n=hl(i,l),i.lanes=536870912,Aa(null,n);if(Yu(i),(n=Ge)?(n=ry(n,sn),n=n!==null&&n.data==="&"?n:null,n!==null&&(i.memoizedState={dehydrated:n,treeContext:Ar!==null?{id:An,overflow:Tn}:null,retryLane:536870912,hydrationErrors:null},a=Cp(n),a.return=i,i.child=a,gt=i,Ge=null)):n=null,n===null)throw Rr(i);return i.lanes=536870912,null}return hl(i,l)}var p=n.memoizedState;if(p!==null){var v=p.dehydrated;if(Yu(i),h)if(i.flags&256)i.flags&=-257,i=Gm(n,i,a);else if(i.memoizedState!==null)i.child=n.child,i.flags|=128,i=null;else throw Error(s(558));else if(rt||ss(n,i,a,!1),h=(a&n.childLanes)!==0,rt||h){if(l=$e,l!==null&&(v=Lf(l,a),v!==0&&v!==p.retryLane))throw p.retryLane=v,fi(n,v),Ut(l,n,v),fd;El(),i=Gm(n,i,a)}else n=p.treeContext,Ge=on(v.nextSibling),gt=i,Re=!0,Tr=null,sn=!1,n!==null&&jp(i,n),i=hl(i,l),i.flags|=4096;return i}return n=Vn(n.child,{mode:l.mode,children:l.children}),n.ref=i.ref,i.child=n,n.return=i,n}function fl(n,i){var a=i.ref;if(a===null)n!==null&&n.ref!==null&&(i.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(s(284));(n===null||n.ref!==a)&&(i.flags|=4194816)}}function pd(n,i,a,l,h){return yi(i),a=Ku(n,i,a,l,void 0,h),l=Ju(),n!==null&&!rt?(Qu(n,i,h),Qn(n,i,h)):(Re&&l&&ku(i),i.flags|=1,vt(n,i,a,h),i.child)}function Ym(n,i,a,l,h,p){return yi(i),i.updateQueue=null,a=Jp(i,l,a,h),Kp(n),l=Ju(),n!==null&&!rt?(Qu(n,i,p),Qn(n,i,p)):(Re&&l&&ku(i),i.flags|=1,vt(n,i,a,p),i.child)}function Fm(n,i,a,l,h){if(yi(i),i.stateNode===null){var p=ts,v=a.contextType;typeof v=="object"&&v!==null&&(p=yt(v)),p=new a(l,p),i.memoizedState=p.state!==null&&p.state!==void 0?p.state:null,p.updater=dd,i.stateNode=p,p._reactInternals=i,p=i.stateNode,p.props=l,p.state=i.memoizedState,p.refs={},Bu(i),v=a.contextType,p.context=typeof v=="object"&&v!==null?yt(v):ts,p.state=i.memoizedState,v=a.getDerivedStateFromProps,typeof v=="function"&&(ud(i,a,v,l),p.state=i.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof p.getSnapshotBeforeUpdate=="function"||typeof p.UNSAFE_componentWillMount!="function"&&typeof p.componentWillMount!="function"||(v=p.state,typeof p.componentWillMount=="function"&&p.componentWillMount(),typeof p.UNSAFE_componentWillMount=="function"&&p.UNSAFE_componentWillMount(),v!==p.state&&dd.enqueueReplaceState(p,p.state,null),ba(i,l,p,h),va(),p.state=i.memoizedState),typeof p.componentDidMount=="function"&&(i.flags|=4194308),l=!0}else if(n===null){p=i.stateNode;var E=i.memoizedProps,R=Ei(a,E);p.props=R;var D=p.context,H=a.contextType;v=ts,typeof H=="object"&&H!==null&&(v=yt(H));var Y=a.getDerivedStateFromProps;H=typeof Y=="function"||typeof p.getSnapshotBeforeUpdate=="function",E=i.pendingProps!==E,H||typeof p.UNSAFE_componentWillReceiveProps!="function"&&typeof p.componentWillReceiveProps!="function"||(E||D!==v)&&Mm(i,p,l,v),Cr=!1;var L=i.memoizedState;p.state=L,ba(i,l,p,h),va(),D=i.memoizedState,E||L!==D||Cr?(typeof Y=="function"&&(ud(i,a,Y,l),D=i.memoizedState),(R=Cr||Nm(i,a,R,l,L,D,v))?(H||typeof p.UNSAFE_componentWillMount!="function"&&typeof p.componentWillMount!="function"||(typeof p.componentWillMount=="function"&&p.componentWillMount(),typeof p.UNSAFE_componentWillMount=="function"&&p.UNSAFE_componentWillMount()),typeof p.componentDidMount=="function"&&(i.flags|=4194308)):(typeof p.componentDidMount=="function"&&(i.flags|=4194308),i.memoizedProps=l,i.memoizedState=D),p.props=l,p.state=D,p.context=v,l=R):(typeof p.componentDidMount=="function"&&(i.flags|=4194308),l=!1)}else{p=i.stateNode,$u(n,i),v=i.memoizedProps,H=Ei(a,v),p.props=H,Y=i.pendingProps,L=p.context,D=a.contextType,R=ts,typeof D=="object"&&D!==null&&(R=yt(D)),E=a.getDerivedStateFromProps,(D=typeof E=="function"||typeof p.getSnapshotBeforeUpdate=="function")||typeof p.UNSAFE_componentWillReceiveProps!="function"&&typeof p.componentWillReceiveProps!="function"||(v!==Y||L!==R)&&Mm(i,p,l,R),Cr=!1,L=i.memoizedState,p.state=L,ba(i,l,p,h),va();var B=i.memoizedState;v!==Y||L!==B||Cr||n!==null&&n.dependencies!==null&&Ko(n.dependencies)?(typeof E=="function"&&(ud(i,a,E,l),B=i.memoizedState),(H=Cr||Nm(i,a,H,l,L,B,R)||n!==null&&n.dependencies!==null&&Ko(n.dependencies))?(D||typeof p.UNSAFE_componentWillUpdate!="function"&&typeof p.componentWillUpdate!="function"||(typeof p.componentWillUpdate=="function"&&p.componentWillUpdate(l,B,R),typeof p.UNSAFE_componentWillUpdate=="function"&&p.UNSAFE_componentWillUpdate(l,B,R)),typeof p.componentDidUpdate=="function"&&(i.flags|=4),typeof p.getSnapshotBeforeUpdate=="function"&&(i.flags|=1024)):(typeof p.componentDidUpdate!="function"||v===n.memoizedProps&&L===n.memoizedState||(i.flags|=4),typeof p.getSnapshotBeforeUpdate!="function"||v===n.memoizedProps&&L===n.memoizedState||(i.flags|=1024),i.memoizedProps=l,i.memoizedState=B),p.props=l,p.state=B,p.context=R,l=H):(typeof p.componentDidUpdate!="function"||v===n.memoizedProps&&L===n.memoizedState||(i.flags|=4),typeof p.getSnapshotBeforeUpdate!="function"||v===n.memoizedProps&&L===n.memoizedState||(i.flags|=1024),l=!1)}return p=l,fl(n,i),l=(i.flags&128)!==0,p||l?(p=i.stateNode,a=l&&typeof a.getDerivedStateFromError!="function"?null:p.render(),i.flags|=1,n!==null&&l?(i.child=wi(i,n.child,null,h),i.child=wi(i,null,a,h)):vt(n,i,a,h),i.memoizedState=p.state,n=i.child):n=Qn(n,i,h),n}function Km(n,i,a,l){return mi(),i.flags|=256,vt(n,i,a,l),i.child}var md={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function gd(n){return{baseLanes:n,cachePool:zp()}}function yd(n,i,a){return n=n!==null?n.childLanes&~a:0,i&&(n|=Kt),n}function Jm(n,i,a){var l=i.pendingProps,h=!1,p=(i.flags&128)!==0,v;if((v=p)||(v=n!==null&&n.memoizedState===null?!1:(Ze.current&2)!==0),v&&(h=!0,i.flags&=-129),v=(i.flags&32)!==0,i.flags&=-33,n===null){if(Re){if(h?jr(i):Nr(),(n=Ge)?(n=ry(n,sn),n=n!==null&&n.data!=="&"?n:null,n!==null&&(i.memoizedState={dehydrated:n,treeContext:Ar!==null?{id:An,overflow:Tn}:null,retryLane:536870912,hydrationErrors:null},a=Cp(n),a.return=i,i.child=a,gt=i,Ge=null)):n=null,n===null)throw Rr(i);return Wd(n)?i.lanes=32:i.lanes=536870912,null}var E=l.children;return l=l.fallback,h?(Nr(),h=i.mode,E=pl({mode:"hidden",children:E},h),l=pi(l,h,a,null),E.return=i,l.return=i,E.sibling=l,i.child=E,l=i.child,l.memoizedState=gd(a),l.childLanes=yd(n,v,a),i.memoizedState=md,Aa(null,l)):(jr(i),vd(i,E))}var R=n.memoizedState;if(R!==null&&(E=R.dehydrated,E!==null)){if(p)i.flags&256?(jr(i),i.flags&=-257,i=bd(n,i,a)):i.memoizedState!==null?(Nr(),i.child=n.child,i.flags|=128,i=null):(Nr(),E=l.fallback,h=i.mode,l=pl({mode:"visible",children:l.children},h),E=pi(E,h,a,null),E.flags|=2,l.return=i,E.return=i,l.sibling=E,i.child=l,wi(i,n.child,null,a),l=i.child,l.memoizedState=gd(a),l.childLanes=yd(n,v,a),i.memoizedState=md,i=Aa(null,l));else if(jr(i),Wd(E)){if(v=E.nextSibling&&E.nextSibling.dataset,v)var D=v.dgst;v=D,l=Error(s(419)),l.stack="",l.digest=v,ha({value:l,source:null,stack:null}),i=bd(n,i,a)}else if(rt||ss(n,i,a,!1),v=(a&n.childLanes)!==0,rt||v){if(v=$e,v!==null&&(l=Lf(v,a),l!==0&&l!==R.retryLane))throw R.retryLane=l,fi(n,l),Ut(v,n,l),fd;Zd(E)||El(),i=bd(n,i,a)}else Zd(E)?(i.flags|=192,i.child=n.child,i=null):(n=R.treeContext,Ge=on(E.nextSibling),gt=i,Re=!0,Tr=null,sn=!1,n!==null&&jp(i,n),i=vd(i,l.children),i.flags|=4096);return i}return h?(Nr(),E=l.fallback,h=i.mode,R=n.child,D=R.sibling,l=Vn(R,{mode:"hidden",children:l.children}),l.subtreeFlags=R.subtreeFlags&65011712,D!==null?E=Vn(D,E):(E=pi(E,h,a,null),E.flags|=2),E.return=i,l.return=i,l.sibling=E,i.child=l,Aa(null,l),l=i.child,E=n.child.memoizedState,E===null?E=gd(a):(h=E.cachePool,h!==null?(R=tt._currentValue,h=h.parent!==R?{parent:R,pool:R}:h):h=zp(),E={baseLanes:E.baseLanes|a,cachePool:h}),l.memoizedState=E,l.childLanes=yd(n,v,a),i.memoizedState=md,Aa(n.child,l)):(jr(i),a=n.child,n=a.sibling,a=Vn(a,{mode:"visible",children:l.children}),a.return=i,a.sibling=null,n!==null&&(v=i.deletions,v===null?(i.deletions=[n],i.flags|=16):v.push(n)),i.child=a,i.memoizedState=null,a)}function vd(n,i){return i=pl({mode:"visible",children:i},n.mode),i.return=n,n.child=i}function pl(n,i){return n=Vt(22,n,null,i),n.lanes=0,n}function bd(n,i,a){return wi(i,n.child,null,a),n=vd(i,i.pendingProps.children),n.flags|=2,i.memoizedState=null,n}function Qm(n,i,a){n.lanes|=i;var l=n.alternate;l!==null&&(l.lanes|=i),Du(n.return,i,a)}function _d(n,i,a,l,h,p){var v=n.memoizedState;v===null?n.memoizedState={isBackwards:i,rendering:null,renderingStartTime:0,last:l,tail:a,tailMode:h,treeForkCount:p}:(v.isBackwards=i,v.rendering=null,v.renderingStartTime=0,v.last=l,v.tail=a,v.tailMode=h,v.treeForkCount=p)}function Xm(n,i,a){var l=i.pendingProps,h=l.revealOrder,p=l.tail;l=l.children;var v=Ze.current,E=(v&2)!==0;if(E?(v=v&1|2,i.flags|=128):v&=1,Z(Ze,v),vt(n,i,l,a),l=Re?da:0,!E&&n!==null&&(n.flags&128)!==0)e:for(n=i.child;n!==null;){if(n.tag===13)n.memoizedState!==null&&Qm(n,a,i);else if(n.tag===19)Qm(n,a,i);else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===i)break e;for(;n.sibling===null;){if(n.return===null||n.return===i)break e;n=n.return}n.sibling.return=n.return,n=n.sibling}switch(h){case"forwards":for(a=i.child,h=null;a!==null;)n=a.alternate,n!==null&&nl(n)===null&&(h=a),a=a.sibling;a=h,a===null?(h=i.child,i.child=null):(h=a.sibling,a.sibling=null),_d(i,!1,h,a,p,l);break;case"backwards":case"unstable_legacy-backwards":for(a=null,h=i.child,i.child=null;h!==null;){if(n=h.alternate,n!==null&&nl(n)===null){i.child=h;break}n=h.sibling,h.sibling=a,a=h,h=n}_d(i,!0,a,null,p,l);break;case"together":_d(i,!1,null,null,void 0,l);break;default:i.memoizedState=null}return i.child}function Qn(n,i,a){if(n!==null&&(i.dependencies=n.dependencies),Lr|=i.lanes,(a&i.childLanes)===0)if(n!==null){if(ss(n,i,a,!1),(a&i.childLanes)===0)return null}else return null;if(n!==null&&i.child!==n.child)throw Error(s(153));if(i.child!==null){for(n=i.child,a=Vn(n,n.pendingProps),i.child=a,a.return=i;n.sibling!==null;)n=n.sibling,a=a.sibling=Vn(n,n.pendingProps),a.return=i;a.sibling=null}return i.child}function wd(n,i){return(n.lanes&i)!==0?!0:(n=n.dependencies,!!(n!==null&&Ko(n)))}function DS(n,i,a){switch(i.tag){case 3:et(i,i.stateNode.containerInfo),Or(i,tt,n.memoizedState.cache),mi();break;case 27:case 5:Xt(i);break;case 4:et(i,i.stateNode.containerInfo);break;case 10:Or(i,i.type,i.memoizedProps.value);break;case 31:if(i.memoizedState!==null)return i.flags|=128,Yu(i),null;break;case 13:var l=i.memoizedState;if(l!==null)return l.dehydrated!==null?(jr(i),i.flags|=128,null):(a&i.child.childLanes)!==0?Jm(n,i,a):(jr(i),n=Qn(n,i,a),n!==null?n.sibling:null);jr(i);break;case 19:var h=(n.flags&128)!==0;if(l=(a&i.childLanes)!==0,l||(ss(n,i,a,!1),l=(a&i.childLanes)!==0),h){if(l)return Xm(n,i,a);i.flags|=128}if(h=i.memoizedState,h!==null&&(h.rendering=null,h.tail=null,h.lastEffect=null),Z(Ze,Ze.current),l)break;return null;case 22:return i.lanes=0,qm(n,i,a,i.pendingProps);case 24:Or(i,tt,n.memoizedState.cache)}return Qn(n,i,a)}function Zm(n,i,a){if(n!==null)if(n.memoizedProps!==i.pendingProps)rt=!0;else{if(!wd(n,a)&&(i.flags&128)===0)return rt=!1,DS(n,i,a);rt=(n.flags&131072)!==0}else rt=!1,Re&&(i.flags&1048576)!==0&&xp(i,da,i.index);switch(i.lanes=0,i.tag){case 16:e:{var l=i.pendingProps;if(n=bi(i.elementType),i.type=n,typeof n=="function")Ru(n)?(l=Ei(n,l),i.tag=1,i=Fm(null,i,n,l,a)):(i.tag=0,i=pd(null,i,n,l,a));else{if(n!=null){var h=n.$$typeof;if(h===z){i.tag=11,i=Bm(null,i,n,l,a);break e}else if(h===N){i.tag=14,i=$m(null,i,n,l,a);break e}}throw i=ze(n)||n,Error(s(306,i,""))}}return i;case 0:return pd(n,i,i.type,i.pendingProps,a);case 1:return l=i.type,h=Ei(l,i.pendingProps),Fm(n,i,l,h,a);case 3:e:{if(et(i,i.stateNode.containerInfo),n===null)throw Error(s(387));l=i.pendingProps;var p=i.memoizedState;h=p.element,$u(n,i),ba(i,l,null,a);var v=i.memoizedState;if(l=v.cache,Or(i,tt,l),l!==p.cache&&Lu(i,[tt],a,!0),va(),l=v.element,p.isDehydrated)if(p={element:l,isDehydrated:!1,cache:v.cache},i.updateQueue.baseState=p,i.memoizedState=p,i.flags&256){i=Km(n,i,l,a);break e}else if(l!==h){h=tn(Error(s(424)),i),ha(h),i=Km(n,i,l,a);break e}else for(n=i.stateNode.containerInfo,n.nodeType===9?n=n.body:n=n.nodeName==="HTML"?n.ownerDocument.body:n,Ge=on(n.firstChild),gt=i,Re=!0,Tr=null,sn=!0,a=qp(i,null,l,a),i.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling;else{if(mi(),l===h){i=Qn(n,i,a);break e}vt(n,i,l,a)}i=i.child}return i;case 26:return fl(n,i),n===null?(a=cy(i.type,null,i.pendingProps,null))?i.memoizedState=a:Re||(a=i.type,n=i.pendingProps,l=xl(ce.current).createElement(a),l[mt]=i,l[xt]=n,bt(l,a,n),ht(l),i.stateNode=l):i.memoizedState=cy(i.type,n.memoizedProps,i.pendingProps,n.memoizedState),null;case 27:return Xt(i),n===null&&Re&&(l=i.stateNode=ay(i.type,i.pendingProps,ce.current),gt=i,sn=!0,h=Ge,Br(i.type)?(eh=h,Ge=on(l.firstChild)):Ge=h),vt(n,i,i.pendingProps.children,a),fl(n,i),n===null&&(i.flags|=4194304),i.child;case 5:return n===null&&Re&&((h=l=Ge)&&(l=uE(l,i.type,i.pendingProps,sn),l!==null?(i.stateNode=l,gt=i,Ge=on(l.firstChild),sn=!1,h=!0):h=!1),h||Rr(i)),Xt(i),h=i.type,p=i.pendingProps,v=n!==null?n.memoizedProps:null,l=p.children,Jd(h,p)?l=null:v!==null&&Jd(h,v)&&(i.flags|=32),i.memoizedState!==null&&(h=Ku(n,i,TS,null,null,a),Pa._currentValue=h),fl(n,i),vt(n,i,l,a),i.child;case 6:return n===null&&Re&&((n=a=Ge)&&(a=dE(a,i.pendingProps,sn),a!==null?(i.stateNode=a,gt=i,Ge=null,n=!0):n=!1),n||Rr(i)),null;case 13:return Jm(n,i,a);case 4:return et(i,i.stateNode.containerInfo),l=i.pendingProps,n===null?i.child=wi(i,null,l,a):vt(n,i,l,a),i.child;case 11:return Bm(n,i,i.type,i.pendingProps,a);case 7:return vt(n,i,i.pendingProps,a),i.child;case 8:return vt(n,i,i.pendingProps.children,a),i.child;case 12:return vt(n,i,i.pendingProps.children,a),i.child;case 10:return l=i.pendingProps,Or(i,i.type,l.value),vt(n,i,l.children,a),i.child;case 9:return h=i.type._context,l=i.pendingProps.children,yi(i),h=yt(h),l=l(h),i.flags|=1,vt(n,i,l,a),i.child;case 14:return $m(n,i,i.type,i.pendingProps,a);case 15:return Hm(n,i,i.type,i.pendingProps,a);case 19:return Xm(n,i,a);case 31:return MS(n,i,a);case 22:return qm(n,i,a,i.pendingProps);case 24:return yi(i),l=yt(tt),n===null?(h=Iu(),h===null&&(h=$e,p=Uu(),h.pooledCache=p,p.refCount++,p!==null&&(h.pooledCacheLanes|=a),h=p),i.memoizedState={parent:l,cache:h},Bu(i),Or(i,tt,h)):((n.lanes&a)!==0&&($u(n,i),ba(i,null,null,a),va()),h=n.memoizedState,p=i.memoizedState,h.parent!==l?(h={parent:l,cache:l},i.memoizedState=h,i.lanes===0&&(i.memoizedState=i.updateQueue.baseState=h),Or(i,tt,l)):(l=p.cache,Or(i,tt,l),l!==h.cache&&Lu(i,[tt],a,!0))),vt(n,i,i.pendingProps.children,a),i.child;case 29:throw i.pendingProps}throw Error(s(156,i.tag))}function Xn(n){n.flags|=4}function Sd(n,i,a,l,h){if((i=(n.mode&32)!==0)&&(i=!1),i){if(n.flags|=16777216,(h&335544128)===h)if(n.stateNode.complete)n.flags|=8192;else if(Tg())n.flags|=8192;else throw _i=Zo,Pu}else n.flags&=-16777217}function Wm(n,i){if(i.type!=="stylesheet"||(i.state.loading&4)!==0)n.flags&=-16777217;else if(n.flags|=16777216,!py(i))if(Tg())n.flags|=8192;else throw _i=Zo,Pu}function ml(n,i){i!==null&&(n.flags|=4),n.flags&16384&&(i=n.tag!==22?Nf():536870912,n.lanes|=i,ys|=i)}function Ta(n,i){if(!Re)switch(n.tailMode){case"hidden":i=n.tail;for(var a=null;i!==null;)i.alternate!==null&&(a=i),i=i.sibling;a===null?n.tail=null:a.sibling=null;break;case"collapsed":a=n.tail;for(var l=null;a!==null;)a.alternate!==null&&(l=a),a=a.sibling;l===null?i||n.tail===null?n.tail=null:n.tail.sibling=null:l.sibling=null}}function Ye(n){var i=n.alternate!==null&&n.alternate.child===n.child,a=0,l=0;if(i)for(var h=n.child;h!==null;)a|=h.lanes|h.childLanes,l|=h.subtreeFlags&65011712,l|=h.flags&65011712,h.return=n,h=h.sibling;else for(h=n.child;h!==null;)a|=h.lanes|h.childLanes,l|=h.subtreeFlags,l|=h.flags,h.return=n,h=h.sibling;return n.subtreeFlags|=l,n.childLanes=a,i}function LS(n,i,a){var l=i.pendingProps;switch(xu(i),i.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ye(i),null;case 1:return Ye(i),null;case 3:return a=i.stateNode,l=null,n!==null&&(l=n.memoizedState.cache),i.memoizedState.cache!==l&&(i.flags|=2048),Fn(tt),ge(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(n===null||n.child===null)&&(is(i)?Xn(i):n===null||n.memoizedState.isDehydrated&&(i.flags&256)===0||(i.flags|=1024,Nu())),Ye(i),null;case 26:var h=i.type,p=i.memoizedState;return n===null?(Xn(i),p!==null?(Ye(i),Wm(i,p)):(Ye(i),Sd(i,h,null,l,a))):p?p!==n.memoizedState?(Xn(i),Ye(i),Wm(i,p)):(Ye(i),i.flags&=-16777217):(n=n.memoizedProps,n!==l&&Xn(i),Ye(i),Sd(i,h,n,l,a)),null;case 27:if(kt(i),a=ce.current,h=i.type,n!==null&&i.stateNode!=null)n.memoizedProps!==l&&Xn(i);else{if(!l){if(i.stateNode===null)throw Error(s(166));return Ye(i),null}n=ee.current,is(i)?Np(i):(n=ay(h,l,a),i.stateNode=n,Xn(i))}return Ye(i),null;case 5:if(kt(i),h=i.type,n!==null&&i.stateNode!=null)n.memoizedProps!==l&&Xn(i);else{if(!l){if(i.stateNode===null)throw Error(s(166));return Ye(i),null}if(p=ee.current,is(i))Np(i);else{var v=xl(ce.current);switch(p){case 1:p=v.createElementNS("http://www.w3.org/2000/svg",h);break;case 2:p=v.createElementNS("http://www.w3.org/1998/Math/MathML",h);break;default:switch(h){case"svg":p=v.createElementNS("http://www.w3.org/2000/svg",h);break;case"math":p=v.createElementNS("http://www.w3.org/1998/Math/MathML",h);break;case"script":p=v.createElement("div"),p.innerHTML="<script><\/script>",p=p.removeChild(p.firstChild);break;case"select":p=typeof l.is=="string"?v.createElement("select",{is:l.is}):v.createElement("select"),l.multiple?p.multiple=!0:l.size&&(p.size=l.size);break;default:p=typeof l.is=="string"?v.createElement(h,{is:l.is}):v.createElement(h)}}p[mt]=i,p[xt]=l;e:for(v=i.child;v!==null;){if(v.tag===5||v.tag===6)p.appendChild(v.stateNode);else if(v.tag!==4&&v.tag!==27&&v.child!==null){v.child.return=v,v=v.child;continue}if(v===i)break e;for(;v.sibling===null;){if(v.return===null||v.return===i)break e;v=v.return}v.sibling.return=v.return,v=v.sibling}i.stateNode=p;e:switch(bt(p,h,l),h){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break e;case"img":l=!0;break e;default:l=!1}l&&Xn(i)}}return Ye(i),Sd(i,i.type,n===null?null:n.memoizedProps,i.pendingProps,a),null;case 6:if(n&&i.stateNode!=null)n.memoizedProps!==l&&Xn(i);else{if(typeof l!="string"&&i.stateNode===null)throw Error(s(166));if(n=ce.current,is(i)){if(n=i.stateNode,a=i.memoizedProps,l=null,h=gt,h!==null)switch(h.tag){case 27:case 5:l=h.memoizedProps}n[mt]=i,n=!!(n.nodeValue===a||l!==null&&l.suppressHydrationWarning===!0||Jg(n.nodeValue,a)),n||Rr(i,!0)}else n=xl(n).createTextNode(l),n[mt]=i,i.stateNode=n}return Ye(i),null;case 31:if(a=i.memoizedState,n===null||n.memoizedState!==null){if(l=is(i),a!==null){if(n===null){if(!l)throw Error(s(318));if(n=i.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(s(557));n[mt]=i}else mi(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;Ye(i),n=!1}else a=Nu(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=a),n=!0;if(!n)return i.flags&256?(Yt(i),i):(Yt(i),null);if((i.flags&128)!==0)throw Error(s(558))}return Ye(i),null;case 13:if(l=i.memoizedState,n===null||n.memoizedState!==null&&n.memoizedState.dehydrated!==null){if(h=is(i),l!==null&&l.dehydrated!==null){if(n===null){if(!h)throw Error(s(318));if(h=i.memoizedState,h=h!==null?h.dehydrated:null,!h)throw Error(s(317));h[mt]=i}else mi(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;Ye(i),h=!1}else h=Nu(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=h),h=!0;if(!h)return i.flags&256?(Yt(i),i):(Yt(i),null)}return Yt(i),(i.flags&128)!==0?(i.lanes=a,i):(a=l!==null,n=n!==null&&n.memoizedState!==null,a&&(l=i.child,h=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(h=l.alternate.memoizedState.cachePool.pool),p=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(p=l.memoizedState.cachePool.pool),p!==h&&(l.flags|=2048)),a!==n&&a&&(i.child.flags|=8192),ml(i,i.updateQueue),Ye(i),null);case 4:return ge(),n===null&&Vd(i.stateNode.containerInfo),Ye(i),null;case 10:return Fn(i.type),Ye(i),null;case 19:if(V(Ze),l=i.memoizedState,l===null)return Ye(i),null;if(h=(i.flags&128)!==0,p=l.rendering,p===null)if(h)Ta(l,!1);else{if(Qe!==0||n!==null&&(n.flags&128)!==0)for(n=i.child;n!==null;){if(p=nl(n),p!==null){for(i.flags|=128,Ta(l,!1),n=p.updateQueue,i.updateQueue=n,ml(i,n),i.subtreeFlags=0,n=a,a=i.child;a!==null;)Op(a,n),a=a.sibling;return Z(Ze,Ze.current&1|2),Re&&Gn(i,l.treeForkCount),i.child}n=n.sibling}l.tail!==null&&wt()>_l&&(i.flags|=128,h=!0,Ta(l,!1),i.lanes=4194304)}else{if(!h)if(n=nl(p),n!==null){if(i.flags|=128,h=!0,n=n.updateQueue,i.updateQueue=n,ml(i,n),Ta(l,!0),l.tail===null&&l.tailMode==="hidden"&&!p.alternate&&!Re)return Ye(i),null}else 2*wt()-l.renderingStartTime>_l&&a!==536870912&&(i.flags|=128,h=!0,Ta(l,!1),i.lanes=4194304);l.isBackwards?(p.sibling=i.child,i.child=p):(n=l.last,n!==null?n.sibling=p:i.child=p,l.last=p)}return l.tail!==null?(n=l.tail,l.rendering=n,l.tail=n.sibling,l.renderingStartTime=wt(),n.sibling=null,a=Ze.current,Z(Ze,h?a&1|2:a&1),Re&&Gn(i,l.treeForkCount),n):(Ye(i),null);case 22:case 23:return Yt(i),Gu(),l=i.memoizedState!==null,n!==null?n.memoizedState!==null!==l&&(i.flags|=8192):l&&(i.flags|=8192),l?(a&536870912)!==0&&(i.flags&128)===0&&(Ye(i),i.subtreeFlags&6&&(i.flags|=8192)):Ye(i),a=i.updateQueue,a!==null&&ml(i,a.retryQueue),a=null,n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(a=n.memoizedState.cachePool.pool),l=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(l=i.memoizedState.cachePool.pool),l!==a&&(i.flags|=2048),n!==null&&V(vi),null;case 24:return a=null,n!==null&&(a=n.memoizedState.cache),i.memoizedState.cache!==a&&(i.flags|=2048),Fn(tt),Ye(i),null;case 25:return null;case 30:return null}throw Error(s(156,i.tag))}function US(n,i){switch(xu(i),i.tag){case 1:return n=i.flags,n&65536?(i.flags=n&-65537|128,i):null;case 3:return Fn(tt),ge(),n=i.flags,(n&65536)!==0&&(n&128)===0?(i.flags=n&-65537|128,i):null;case 26:case 27:case 5:return kt(i),null;case 31:if(i.memoizedState!==null){if(Yt(i),i.alternate===null)throw Error(s(340));mi()}return n=i.flags,n&65536?(i.flags=n&-65537|128,i):null;case 13:if(Yt(i),n=i.memoizedState,n!==null&&n.dehydrated!==null){if(i.alternate===null)throw Error(s(340));mi()}return n=i.flags,n&65536?(i.flags=n&-65537|128,i):null;case 19:return V(Ze),null;case 4:return ge(),null;case 10:return Fn(i.type),null;case 22:case 23:return Yt(i),Gu(),n!==null&&V(vi),n=i.flags,n&65536?(i.flags=n&-65537|128,i):null;case 24:return Fn(tt),null;case 25:return null;default:return null}}function eg(n,i){switch(xu(i),i.tag){case 3:Fn(tt),ge();break;case 26:case 27:case 5:kt(i);break;case 4:ge();break;case 31:i.memoizedState!==null&&Yt(i);break;case 13:Yt(i);break;case 19:V(Ze);break;case 10:Fn(i.type);break;case 22:case 23:Yt(i),Gu(),n!==null&&V(vi);break;case 24:Fn(tt)}}function Ra(n,i){try{var a=i.updateQueue,l=a!==null?a.lastEffect:null;if(l!==null){var h=l.next;a=h;do{if((a.tag&n)===n){l=void 0;var p=a.create,v=a.inst;l=p(),v.destroy=l}a=a.next}while(a!==h)}}catch(E){Le(i,i.return,E)}}function Mr(n,i,a){try{var l=i.updateQueue,h=l!==null?l.lastEffect:null;if(h!==null){var p=h.next;l=p;do{if((l.tag&n)===n){var v=l.inst,E=v.destroy;if(E!==void 0){v.destroy=void 0,h=i;var R=a,D=E;try{D()}catch(H){Le(h,R,H)}}}l=l.next}while(l!==p)}}catch(H){Le(i,i.return,H)}}function tg(n){var i=n.updateQueue;if(i!==null){var a=n.stateNode;try{Gp(i,a)}catch(l){Le(n,n.return,l)}}}function ng(n,i,a){a.props=Ei(n.type,n.memoizedProps),a.state=n.memoizedState;try{a.componentWillUnmount()}catch(l){Le(n,i,l)}}function Oa(n,i){try{var a=n.ref;if(a!==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 a=="function"?n.refCleanup=a(l):a.current=l}}catch(h){Le(n,i,h)}}function Rn(n,i){var a=n.ref,l=n.refCleanup;if(a!==null)if(typeof l=="function")try{l()}catch(h){Le(n,i,h)}finally{n.refCleanup=null,n=n.alternate,n!=null&&(n.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(h){Le(n,i,h)}else a.current=null}function rg(n){var i=n.type,a=n.memoizedProps,l=n.stateNode;try{e:switch(i){case"button":case"input":case"select":case"textarea":a.autoFocus&&l.focus();break e;case"img":a.src?l.src=a.src:a.srcSet&&(l.srcset=a.srcSet)}}catch(h){Le(n,n.return,h)}}function Ed(n,i,a){try{var l=n.stateNode;iE(l,n.type,a,i),l[xt]=i}catch(h){Le(n,n.return,h)}}function ig(n){return n.tag===5||n.tag===3||n.tag===26||n.tag===27&&Br(n.type)||n.tag===4}function Ad(n){e:for(;;){for(;n.sibling===null;){if(n.return===null||ig(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&&Br(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 Td(n,i,a){var l=n.tag;if(l===5||l===6)n=n.stateNode,i?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(n,i):(i=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,i.appendChild(n),a=a._reactRootContainer,a!=null||i.onclick!==null||(i.onclick=Hn));else if(l!==4&&(l===27&&Br(n.type)&&(a=n.stateNode,i=null),n=n.child,n!==null))for(Td(n,i,a),n=n.sibling;n!==null;)Td(n,i,a),n=n.sibling}function gl(n,i,a){var l=n.tag;if(l===5||l===6)n=n.stateNode,i?a.insertBefore(n,i):a.appendChild(n);else if(l!==4&&(l===27&&Br(n.type)&&(a=n.stateNode),n=n.child,n!==null))for(gl(n,i,a),n=n.sibling;n!==null;)gl(n,i,a),n=n.sibling}function sg(n){var i=n.stateNode,a=n.memoizedProps;try{for(var l=n.type,h=i.attributes;h.length;)i.removeAttributeNode(h[0]);bt(i,l,a),i[mt]=n,i[xt]=a}catch(p){Le(n,n.return,p)}}var Zn=!1,it=!1,Rd=!1,ag=typeof WeakSet=="function"?WeakSet:Set,ft=null;function zS(n,i){if(n=n.containerInfo,Fd=zl,n=vp(n),bu(n)){if("selectionStart"in n)var a={start:n.selectionStart,end:n.selectionEnd};else e:{a=(a=n.ownerDocument)&&a.defaultView||window;var l=a.getSelection&&a.getSelection();if(l&&l.rangeCount!==0){a=l.anchorNode;var h=l.anchorOffset,p=l.focusNode;l=l.focusOffset;try{a.nodeType,p.nodeType}catch{a=null;break e}var v=0,E=-1,R=-1,D=0,H=0,Y=n,L=null;t:for(;;){for(var B;Y!==a||h!==0&&Y.nodeType!==3||(E=v+h),Y!==p||l!==0&&Y.nodeType!==3||(R=v+l),Y.nodeType===3&&(v+=Y.nodeValue.length),(B=Y.firstChild)!==null;)L=Y,Y=B;for(;;){if(Y===n)break t;if(L===a&&++D===h&&(E=v),L===p&&++H===l&&(R=v),(B=Y.nextSibling)!==null)break;Y=L,L=Y.parentNode}Y=B}a=E===-1||R===-1?null:{start:E,end:R}}else a=null}a=a||{start:0,end:0}}else a=null;for(Kd={focusedElem:n,selectionRange:a},zl=!1,ft=i;ft!==null;)if(i=ft,n=i.child,(i.subtreeFlags&1028)!==0&&n!==null)n.return=i,ft=n;else for(;ft!==null;){switch(i=ft,p=i.alternate,n=i.flags,i.tag){case 0:if((n&4)!==0&&(n=i.updateQueue,n=n!==null?n.events:null,n!==null))for(a=0;a<n.length;a++)h=n[a],h.ref.impl=h.nextImpl;break;case 11:case 15:break;case 1:if((n&1024)!==0&&p!==null){n=void 0,a=i,h=p.memoizedProps,p=p.memoizedState,l=a.stateNode;try{var te=Ei(a.type,h);n=l.getSnapshotBeforeUpdate(te,p),l.__reactInternalSnapshotBeforeUpdate=n}catch(pe){Le(a,a.return,pe)}}break;case 3:if((n&1024)!==0){if(n=i.stateNode.containerInfo,a=n.nodeType,a===9)Xd(n);else if(a===1)switch(n.nodeName){case"HEAD":case"HTML":case"BODY":Xd(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(s(163))}if(n=i.sibling,n!==null){n.return=i.return,ft=n;break}ft=i.return}}function og(n,i,a){var l=a.flags;switch(a.tag){case 0:case 11:case 15:er(n,a),l&4&&Ra(5,a);break;case 1:if(er(n,a),l&4)if(n=a.stateNode,i===null)try{n.componentDidMount()}catch(v){Le(a,a.return,v)}else{var h=Ei(a.type,i.memoizedProps);i=i.memoizedState;try{n.componentDidUpdate(h,i,n.__reactInternalSnapshotBeforeUpdate)}catch(v){Le(a,a.return,v)}}l&64&&tg(a),l&512&&Oa(a,a.return);break;case 3:if(er(n,a),l&64&&(n=a.updateQueue,n!==null)){if(i=null,a.child!==null)switch(a.child.tag){case 27:case 5:i=a.child.stateNode;break;case 1:i=a.child.stateNode}try{Gp(n,i)}catch(v){Le(a,a.return,v)}}break;case 27:i===null&&l&4&&sg(a);case 26:case 5:er(n,a),i===null&&l&4&&rg(a),l&512&&Oa(a,a.return);break;case 12:er(n,a);break;case 31:er(n,a),l&4&&ug(n,a);break;case 13:er(n,a),l&4&&dg(n,a),l&64&&(n=a.memoizedState,n!==null&&(n=n.dehydrated,n!==null&&(a=YS.bind(null,a),hE(n,a))));break;case 22:if(l=a.memoizedState!==null||Zn,!l){i=i!==null&&i.memoizedState!==null||it,h=Zn;var p=it;Zn=l,(it=i)&&!p?tr(n,a,(a.subtreeFlags&8772)!==0):er(n,a),Zn=h,it=p}break;case 30:break;default:er(n,a)}}function lg(n){var i=n.alternate;i!==null&&(n.alternate=null,lg(i)),n.child=null,n.deletions=null,n.sibling=null,n.tag===5&&(i=n.stateNode,i!==null&&nu(i)),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 Fe=null,Nt=!1;function Wn(n,i,a){for(a=a.child;a!==null;)cg(n,i,a),a=a.sibling}function cg(n,i,a){if($t&&typeof $t.onCommitFiberUnmount=="function")try{$t.onCommitFiberUnmount(Xs,a)}catch{}switch(a.tag){case 26:it||Rn(a,i),Wn(n,i,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:it||Rn(a,i);var l=Fe,h=Nt;Br(a.type)&&(Fe=a.stateNode,Nt=!1),Wn(n,i,a),Ua(a.stateNode),Fe=l,Nt=h;break;case 5:it||Rn(a,i);case 6:if(l=Fe,h=Nt,Fe=null,Wn(n,i,a),Fe=l,Nt=h,Fe!==null)if(Nt)try{(Fe.nodeType===9?Fe.body:Fe.nodeName==="HTML"?Fe.ownerDocument.body:Fe).removeChild(a.stateNode)}catch(p){Le(a,i,p)}else try{Fe.removeChild(a.stateNode)}catch(p){Le(a,i,p)}break;case 18:Fe!==null&&(Nt?(n=Fe,ty(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,a.stateNode),Ts(n)):ty(Fe,a.stateNode));break;case 4:l=Fe,h=Nt,Fe=a.stateNode.containerInfo,Nt=!0,Wn(n,i,a),Fe=l,Nt=h;break;case 0:case 11:case 14:case 15:Mr(2,a,i),it||Mr(4,a,i),Wn(n,i,a);break;case 1:it||(Rn(a,i),l=a.stateNode,typeof l.componentWillUnmount=="function"&&ng(a,i,l)),Wn(n,i,a);break;case 21:Wn(n,i,a);break;case 22:it=(l=it)||a.memoizedState!==null,Wn(n,i,a),it=l;break;default:Wn(n,i,a)}}function ug(n,i){if(i.memoizedState===null&&(n=i.alternate,n!==null&&(n=n.memoizedState,n!==null))){n=n.dehydrated;try{Ts(n)}catch(a){Le(i,i.return,a)}}}function dg(n,i){if(i.memoizedState===null&&(n=i.alternate,n!==null&&(n=n.memoizedState,n!==null&&(n=n.dehydrated,n!==null))))try{Ts(n)}catch(a){Le(i,i.return,a)}}function IS(n){switch(n.tag){case 31:case 13:case 19:var i=n.stateNode;return i===null&&(i=n.stateNode=new ag),i;case 22:return n=n.stateNode,i=n._retryCache,i===null&&(i=n._retryCache=new ag),i;default:throw Error(s(435,n.tag))}}function yl(n,i){var a=IS(n);i.forEach(function(l){if(!a.has(l)){a.add(l);var h=FS.bind(null,n,l);l.then(h,h)}})}function Mt(n,i){var a=i.deletions;if(a!==null)for(var l=0;l<a.length;l++){var h=a[l],p=n,v=i,E=v;e:for(;E!==null;){switch(E.tag){case 27:if(Br(E.type)){Fe=E.stateNode,Nt=!1;break e}break;case 5:Fe=E.stateNode,Nt=!1;break e;case 3:case 4:Fe=E.stateNode.containerInfo,Nt=!0;break e}E=E.return}if(Fe===null)throw Error(s(160));cg(p,v,h),Fe=null,Nt=!1,p=h.alternate,p!==null&&(p.return=null),h.return=null}if(i.subtreeFlags&13886)for(i=i.child;i!==null;)hg(i,n),i=i.sibling}var mn=null;function hg(n,i){var a=n.alternate,l=n.flags;switch(n.tag){case 0:case 11:case 14:case 15:Mt(i,n),Dt(n),l&4&&(Mr(3,n,n.return),Ra(3,n),Mr(5,n,n.return));break;case 1:Mt(i,n),Dt(n),l&512&&(it||a===null||Rn(a,a.return)),l&64&&Zn&&(n=n.updateQueue,n!==null&&(l=n.callbacks,l!==null&&(a=n.shared.hiddenCallbacks,n.shared.hiddenCallbacks=a===null?l:a.concat(l))));break;case 26:var h=mn;if(Mt(i,n),Dt(n),l&512&&(it||a===null||Rn(a,a.return)),l&4){var p=a!==null?a.memoizedState:null;if(l=n.memoizedState,a===null)if(l===null)if(n.stateNode===null){e:{l=n.type,a=n.memoizedProps,h=h.ownerDocument||h;t:switch(l){case"title":p=h.getElementsByTagName("title")[0],(!p||p[ea]||p[mt]||p.namespaceURI==="http://www.w3.org/2000/svg"||p.hasAttribute("itemprop"))&&(p=h.createElement(l),h.head.insertBefore(p,h.querySelector("head > title"))),bt(p,l,a),p[mt]=n,ht(p),l=p;break e;case"link":var v=hy("link","href",h).get(l+(a.href||""));if(v){for(var E=0;E<v.length;E++)if(p=v[E],p.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&p.getAttribute("rel")===(a.rel==null?null:a.rel)&&p.getAttribute("title")===(a.title==null?null:a.title)&&p.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){v.splice(E,1);break t}}p=h.createElement(l),bt(p,l,a),h.head.appendChild(p);break;case"meta":if(v=hy("meta","content",h).get(l+(a.content||""))){for(E=0;E<v.length;E++)if(p=v[E],p.getAttribute("content")===(a.content==null?null:""+a.content)&&p.getAttribute("name")===(a.name==null?null:a.name)&&p.getAttribute("property")===(a.property==null?null:a.property)&&p.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&p.getAttribute("charset")===(a.charSet==null?null:a.charSet)){v.splice(E,1);break t}}p=h.createElement(l),bt(p,l,a),h.head.appendChild(p);break;default:throw Error(s(468,l))}p[mt]=n,ht(p),l=p}n.stateNode=l}else fy(h,n.type,n.stateNode);else n.stateNode=dy(h,l,n.memoizedProps);else p!==l?(p===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):p.count--,l===null?fy(h,n.type,n.stateNode):dy(h,l,n.memoizedProps)):l===null&&n.stateNode!==null&&Ed(n,n.memoizedProps,a.memoizedProps)}break;case 27:Mt(i,n),Dt(n),l&512&&(it||a===null||Rn(a,a.return)),a!==null&&l&4&&Ed(n,n.memoizedProps,a.memoizedProps);break;case 5:if(Mt(i,n),Dt(n),l&512&&(it||a===null||Rn(a,a.return)),n.flags&32){h=n.stateNode;try{Ki(h,"")}catch(te){Le(n,n.return,te)}}l&4&&n.stateNode!=null&&(h=n.memoizedProps,Ed(n,h,a!==null?a.memoizedProps:h)),l&1024&&(Rd=!0);break;case 6:if(Mt(i,n),Dt(n),l&4){if(n.stateNode===null)throw Error(s(162));l=n.memoizedProps,a=n.stateNode;try{a.nodeValue=l}catch(te){Le(n,n.return,te)}}break;case 3:if(Ml=null,h=mn,mn=jl(i.containerInfo),Mt(i,n),mn=h,Dt(n),l&4&&a!==null&&a.memoizedState.isDehydrated)try{Ts(i.containerInfo)}catch(te){Le(n,n.return,te)}Rd&&(Rd=!1,fg(n));break;case 4:l=mn,mn=jl(n.stateNode.containerInfo),Mt(i,n),Dt(n),mn=l;break;case 12:Mt(i,n),Dt(n);break;case 31:Mt(i,n),Dt(n),l&4&&(l=n.updateQueue,l!==null&&(n.updateQueue=null,yl(n,l)));break;case 13:Mt(i,n),Dt(n),n.child.flags&8192&&n.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(bl=wt()),l&4&&(l=n.updateQueue,l!==null&&(n.updateQueue=null,yl(n,l)));break;case 22:h=n.memoizedState!==null;var R=a!==null&&a.memoizedState!==null,D=Zn,H=it;if(Zn=D||h,it=H||R,Mt(i,n),it=H,Zn=D,Dt(n),l&8192)e:for(i=n.stateNode,i._visibility=h?i._visibility&-2:i._visibility|1,h&&(a===null||R||Zn||it||Ai(n)),a=null,i=n;;){if(i.tag===5||i.tag===26){if(a===null){R=a=i;try{if(p=R.stateNode,h)v=p.style,typeof v.setProperty=="function"?v.setProperty("display","none","important"):v.display="none";else{E=R.stateNode;var Y=R.memoizedProps.style,L=Y!=null&&Y.hasOwnProperty("display")?Y.display:null;E.style.display=L==null||typeof L=="boolean"?"":(""+L).trim()}}catch(te){Le(R,R.return,te)}}}else if(i.tag===6){if(a===null){R=i;try{R.stateNode.nodeValue=h?"":R.memoizedProps}catch(te){Le(R,R.return,te)}}}else if(i.tag===18){if(a===null){R=i;try{var B=R.stateNode;h?ny(B,!0):ny(R.stateNode,!1)}catch(te){Le(R,R.return,te)}}}else if((i.tag!==22&&i.tag!==23||i.memoizedState===null||i===n)&&i.child!==null){i.child.return=i,i=i.child;continue}if(i===n)break e;for(;i.sibling===null;){if(i.return===null||i.return===n)break e;a===i&&(a=null),i=i.return}a===i&&(a=null),i.sibling.return=i.return,i=i.sibling}l&4&&(l=n.updateQueue,l!==null&&(a=l.retryQueue,a!==null&&(l.retryQueue=null,yl(n,a))));break;case 19:Mt(i,n),Dt(n),l&4&&(l=n.updateQueue,l!==null&&(n.updateQueue=null,yl(n,l)));break;case 30:break;case 21:break;default:Mt(i,n),Dt(n)}}function Dt(n){var i=n.flags;if(i&2){try{for(var a,l=n.return;l!==null;){if(ig(l)){a=l;break}l=l.return}if(a==null)throw Error(s(160));switch(a.tag){case 27:var h=a.stateNode,p=Ad(n);gl(n,p,h);break;case 5:var v=a.stateNode;a.flags&32&&(Ki(v,""),a.flags&=-33);var E=Ad(n);gl(n,E,v);break;case 3:case 4:var R=a.stateNode.containerInfo,D=Ad(n);Td(n,D,R);break;default:throw Error(s(161))}}catch(H){Le(n,n.return,H)}n.flags&=-3}i&4096&&(n.flags&=-4097)}function fg(n){if(n.subtreeFlags&1024)for(n=n.child;n!==null;){var i=n;fg(i),i.tag===5&&i.flags&1024&&i.stateNode.reset(),n=n.sibling}}function er(n,i){if(i.subtreeFlags&8772)for(i=i.child;i!==null;)og(n,i.alternate,i),i=i.sibling}function Ai(n){for(n=n.child;n!==null;){var i=n;switch(i.tag){case 0:case 11:case 14:case 15:Mr(4,i,i.return),Ai(i);break;case 1:Rn(i,i.return);var a=i.stateNode;typeof a.componentWillUnmount=="function"&&ng(i,i.return,a),Ai(i);break;case 27:Ua(i.stateNode);case 26:case 5:Rn(i,i.return),Ai(i);break;case 22:i.memoizedState===null&&Ai(i);break;case 30:Ai(i);break;default:Ai(i)}n=n.sibling}}function tr(n,i,a){for(a=a&&(i.subtreeFlags&8772)!==0,i=i.child;i!==null;){var l=i.alternate,h=n,p=i,v=p.flags;switch(p.tag){case 0:case 11:case 15:tr(h,p,a),Ra(4,p);break;case 1:if(tr(h,p,a),l=p,h=l.stateNode,typeof h.componentDidMount=="function")try{h.componentDidMount()}catch(D){Le(l,l.return,D)}if(l=p,h=l.updateQueue,h!==null){var E=l.stateNode;try{var R=h.shared.hiddenCallbacks;if(R!==null)for(h.shared.hiddenCallbacks=null,h=0;h<R.length;h++)Vp(R[h],E)}catch(D){Le(l,l.return,D)}}a&&v&64&&tg(p),Oa(p,p.return);break;case 27:sg(p);case 26:case 5:tr(h,p,a),a&&l===null&&v&4&&rg(p),Oa(p,p.return);break;case 12:tr(h,p,a);break;case 31:tr(h,p,a),a&&v&4&&ug(h,p);break;case 13:tr(h,p,a),a&&v&4&&dg(h,p);break;case 22:p.memoizedState===null&&tr(h,p,a),Oa(p,p.return);break;case 30:break;default:tr(h,p,a)}i=i.sibling}}function Od(n,i){var a=null;n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(a=n.memoizedState.cachePool.pool),n=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(n=i.memoizedState.cachePool.pool),n!==a&&(n!=null&&n.refCount++,a!=null&&fa(a))}function Cd(n,i){n=null,i.alternate!==null&&(n=i.alternate.memoizedState.cache),i=i.memoizedState.cache,i!==n&&(i.refCount++,n!=null&&fa(n))}function gn(n,i,a,l){if(i.subtreeFlags&10256)for(i=i.child;i!==null;)pg(n,i,a,l),i=i.sibling}function pg(n,i,a,l){var h=i.flags;switch(i.tag){case 0:case 11:case 15:gn(n,i,a,l),h&2048&&Ra(9,i);break;case 1:gn(n,i,a,l);break;case 3:gn(n,i,a,l),h&2048&&(n=null,i.alternate!==null&&(n=i.alternate.memoizedState.cache),i=i.memoizedState.cache,i!==n&&(i.refCount++,n!=null&&fa(n)));break;case 12:if(h&2048){gn(n,i,a,l),n=i.stateNode;try{var p=i.memoizedProps,v=p.id,E=p.onPostCommit;typeof E=="function"&&E(v,i.alternate===null?"mount":"update",n.passiveEffectDuration,-0)}catch(R){Le(i,i.return,R)}}else gn(n,i,a,l);break;case 31:gn(n,i,a,l);break;case 13:gn(n,i,a,l);break;case 23:break;case 22:p=i.stateNode,v=i.alternate,i.memoizedState!==null?p._visibility&2?gn(n,i,a,l):Ca(n,i):p._visibility&2?gn(n,i,a,l):(p._visibility|=2,ps(n,i,a,l,(i.subtreeFlags&10256)!==0||!1)),h&2048&&Od(v,i);break;case 24:gn(n,i,a,l),h&2048&&Cd(i.alternate,i);break;default:gn(n,i,a,l)}}function ps(n,i,a,l,h){for(h=h&&((i.subtreeFlags&10256)!==0||!1),i=i.child;i!==null;){var p=n,v=i,E=a,R=l,D=v.flags;switch(v.tag){case 0:case 11:case 15:ps(p,v,E,R,h),Ra(8,v);break;case 23:break;case 22:var H=v.stateNode;v.memoizedState!==null?H._visibility&2?ps(p,v,E,R,h):Ca(p,v):(H._visibility|=2,ps(p,v,E,R,h)),h&&D&2048&&Od(v.alternate,v);break;case 24:ps(p,v,E,R,h),h&&D&2048&&Cd(v.alternate,v);break;default:ps(p,v,E,R,h)}i=i.sibling}}function Ca(n,i){if(i.subtreeFlags&10256)for(i=i.child;i!==null;){var a=n,l=i,h=l.flags;switch(l.tag){case 22:Ca(a,l),h&2048&&Od(l.alternate,l);break;case 24:Ca(a,l),h&2048&&Cd(l.alternate,l);break;default:Ca(a,l)}i=i.sibling}}var ka=8192;function ms(n,i,a){if(n.subtreeFlags&ka)for(n=n.child;n!==null;)mg(n,i,a),n=n.sibling}function mg(n,i,a){switch(n.tag){case 26:ms(n,i,a),n.flags&ka&&n.memoizedState!==null&&AE(a,mn,n.memoizedState,n.memoizedProps);break;case 5:ms(n,i,a);break;case 3:case 4:var l=mn;mn=jl(n.stateNode.containerInfo),ms(n,i,a),mn=l;break;case 22:n.memoizedState===null&&(l=n.alternate,l!==null&&l.memoizedState!==null?(l=ka,ka=16777216,ms(n,i,a),ka=l):ms(n,i,a));break;default:ms(n,i,a)}}function gg(n){var i=n.alternate;if(i!==null&&(n=i.child,n!==null)){i.child=null;do i=n.sibling,n.sibling=null,n=i;while(n!==null)}}function xa(n){var i=n.deletions;if((n.flags&16)!==0){if(i!==null)for(var a=0;a<i.length;a++){var l=i[a];ft=l,vg(l,n)}gg(n)}if(n.subtreeFlags&10256)for(n=n.child;n!==null;)yg(n),n=n.sibling}function yg(n){switch(n.tag){case 0:case 11:case 15:xa(n),n.flags&2048&&Mr(9,n,n.return);break;case 3:xa(n);break;case 12:xa(n);break;case 22:var i=n.stateNode;n.memoizedState!==null&&i._visibility&2&&(n.return===null||n.return.tag!==13)?(i._visibility&=-3,vl(n)):xa(n);break;default:xa(n)}}function vl(n){var i=n.deletions;if((n.flags&16)!==0){if(i!==null)for(var a=0;a<i.length;a++){var l=i[a];ft=l,vg(l,n)}gg(n)}for(n=n.child;n!==null;){switch(i=n,i.tag){case 0:case 11:case 15:Mr(8,i,i.return),vl(i);break;case 22:a=i.stateNode,a._visibility&2&&(a._visibility&=-3,vl(i));break;default:vl(i)}n=n.sibling}}function vg(n,i){for(;ft!==null;){var a=ft;switch(a.tag){case 0:case 11:case 15:Mr(8,a,i);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var l=a.memoizedState.cachePool.pool;l!=null&&l.refCount++}break;case 24:fa(a.memoizedState.cache)}if(l=a.child,l!==null)l.return=a,ft=l;else e:for(a=n;ft!==null;){l=ft;var h=l.sibling,p=l.return;if(lg(l),l===a){ft=null;break e}if(h!==null){h.return=p,ft=h;break e}ft=p}}}var PS={getCacheForType:function(n){var i=yt(tt),a=i.data.get(n);return a===void 0&&(a=n(),i.data.set(n,a)),a},cacheSignal:function(){return yt(tt).controller.signal}},BS=typeof WeakMap=="function"?WeakMap:Map,Me=0,$e=null,Se=null,Ae=0,De=0,Ft=null,Dr=!1,gs=!1,kd=!1,nr=0,Qe=0,Lr=0,Ti=0,xd=0,Kt=0,ys=0,ja=null,Lt=null,jd=!1,bl=0,bg=0,_l=1/0,wl=null,Ur=null,ct=0,zr=null,vs=null,rr=0,Nd=0,Md=null,_g=null,Na=0,Dd=null;function Jt(){return(Me&2)!==0&&Ae!==0?Ae&-Ae:P.T!==null?Bd():Uf()}function wg(){if(Kt===0)if((Ae&536870912)===0||Re){var n=ko;ko<<=1,(ko&3932160)===0&&(ko=262144),Kt=n}else Kt=536870912;return n=Gt.current,n!==null&&(n.flags|=32),Kt}function Ut(n,i,a){(n===$e&&(De===2||De===9)||n.cancelPendingCommit!==null)&&(bs(n,0),Ir(n,Ae,Kt,!1)),Ws(n,a),((Me&2)===0||n!==$e)&&(n===$e&&((Me&2)===0&&(Ti|=a),Qe===4&&Ir(n,Ae,Kt,!1)),On(n))}function Sg(n,i,a){if((Me&6)!==0)throw Error(s(327));var l=!a&&(i&127)===0&&(i&n.expiredLanes)===0||Zs(n,i),h=l?qS(n,i):Ud(n,i,!0),p=l;do{if(h===0){gs&&!l&&Ir(n,i,0,!1);break}else{if(a=n.current.alternate,p&&!$S(a)){h=Ud(n,i,!1),p=!1;continue}if(h===2){if(p=i,n.errorRecoveryDisabledLanes&p)var v=0;else v=n.pendingLanes&-536870913,v=v!==0?v:v&536870912?536870912:0;if(v!==0){i=v;e:{var E=n;h=ja;var R=E.current.memoizedState.isDehydrated;if(R&&(bs(E,v).flags|=256),v=Ud(E,v,!1),v!==2){if(kd&&!R){E.errorRecoveryDisabledLanes|=p,Ti|=p,h=4;break e}p=Lt,Lt=h,p!==null&&(Lt===null?Lt=p:Lt.push.apply(Lt,p))}h=v}if(p=!1,h!==2)continue}}if(h===1){bs(n,0),Ir(n,i,0,!0);break}e:{switch(l=n,p=h,p){case 0:case 1:throw Error(s(345));case 4:if((i&4194048)!==i)break;case 6:Ir(l,i,Kt,!Dr);break e;case 2:Lt=null;break;case 3:case 5:break;default:throw Error(s(329))}if((i&62914560)===i&&(h=bl+300-wt(),10<h)){if(Ir(l,i,Kt,!Dr),jo(l,0,!0)!==0)break e;rr=i,l.timeoutHandle=Wg(Eg.bind(null,l,a,Lt,wl,jd,i,Kt,Ti,ys,Dr,p,"Throttled",-0,0),h);break e}Eg(l,a,Lt,wl,jd,i,Kt,Ti,ys,Dr,p,null,-0,0)}}break}while(!0);On(n)}function Eg(n,i,a,l,h,p,v,E,R,D,H,Y,L,B){if(n.timeoutHandle=-1,Y=i.subtreeFlags,Y&8192||(Y&16785408)===16785408){Y={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Hn},mg(i,p,Y);var te=(p&62914560)===p?bl-wt():(p&4194048)===p?bg-wt():0;if(te=TE(Y,te),te!==null){rr=p,n.cancelPendingCommit=te(jg.bind(null,n,i,p,a,l,h,v,E,R,H,Y,null,L,B)),Ir(n,p,v,!D);return}}jg(n,i,p,a,l,h,v,E,R)}function $S(n){for(var i=n;;){var a=i.tag;if((a===0||a===11||a===15)&&i.flags&16384&&(a=i.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var l=0;l<a.length;l++){var h=a[l],p=h.getSnapshot;h=h.value;try{if(!qt(p(),h))return!1}catch{return!1}}if(a=i.child,i.subtreeFlags&16384&&a!==null)a.return=i,i=a;else{if(i===n)break;for(;i.sibling===null;){if(i.return===null||i.return===n)return!0;i=i.return}i.sibling.return=i.return,i=i.sibling}}return!0}function Ir(n,i,a,l){i&=~xd,i&=~Ti,n.suspendedLanes|=i,n.pingedLanes&=~i,l&&(n.warmLanes|=i),l=n.expirationTimes;for(var h=i;0<h;){var p=31-Ht(h),v=1<<p;l[p]=-1,h&=~v}a!==0&&Mf(n,a,i)}function Sl(){return(Me&6)===0?(Ma(0),!1):!0}function Ld(){if(Se!==null){if(De===0)var n=Se.return;else n=Se,Yn=gi=null,Xu(n),cs=null,ma=0,n=Se;for(;n!==null;)eg(n.alternate,n),n=n.return;Se=null}}function bs(n,i){var a=n.timeoutHandle;a!==-1&&(n.timeoutHandle=-1,oE(a)),a=n.cancelPendingCommit,a!==null&&(n.cancelPendingCommit=null,a()),rr=0,Ld(),$e=n,Se=a=Vn(n.current,null),Ae=i,De=0,Ft=null,Dr=!1,gs=Zs(n,i),kd=!1,ys=Kt=xd=Ti=Lr=Qe=0,Lt=ja=null,jd=!1,(i&8)!==0&&(i|=i&32);var l=n.entangledLanes;if(l!==0)for(n=n.entanglements,l&=i;0<l;){var h=31-Ht(l),p=1<<h;i|=n[h],l&=~p}return nr=i,qo(),a}function Ag(n,i){ve=null,P.H=Ea,i===ls||i===Xo?(i=Bp(),De=3):i===Pu?(i=Bp(),De=4):De=i===fd?8:i!==null&&typeof i=="object"&&typeof i.then=="function"?6:1,Ft=i,Se===null&&(Qe=1,dl(n,tn(i,n.current)))}function Tg(){var n=Gt.current;return n===null?!0:(Ae&4194048)===Ae?an===null:(Ae&62914560)===Ae||(Ae&536870912)!==0?n===an:!1}function Rg(){var n=P.H;return P.H=Ea,n===null?Ea:n}function Og(){var n=P.A;return P.A=PS,n}function El(){Qe=4,Dr||(Ae&4194048)!==Ae&&Gt.current!==null||(gs=!0),(Lr&134217727)===0&&(Ti&134217727)===0||$e===null||Ir($e,Ae,Kt,!1)}function Ud(n,i,a){var l=Me;Me|=2;var h=Rg(),p=Og();($e!==n||Ae!==i)&&(wl=null,bs(n,i)),i=!1;var v=Qe;e:do try{if(De!==0&&Se!==null){var E=Se,R=Ft;switch(De){case 8:Ld(),v=6;break e;case 3:case 2:case 9:case 6:Gt.current===null&&(i=!0);var D=De;if(De=0,Ft=null,_s(n,E,R,D),a&&gs){v=0;break e}break;default:D=De,De=0,Ft=null,_s(n,E,R,D)}}HS(),v=Qe;break}catch(H){Ag(n,H)}while(!0);return i&&n.shellSuspendCounter++,Yn=gi=null,Me=l,P.H=h,P.A=p,Se===null&&($e=null,Ae=0,qo()),v}function HS(){for(;Se!==null;)Cg(Se)}function qS(n,i){var a=Me;Me|=2;var l=Rg(),h=Og();$e!==n||Ae!==i?(wl=null,_l=wt()+500,bs(n,i)):gs=Zs(n,i);e:do try{if(De!==0&&Se!==null){i=Se;var p=Ft;t:switch(De){case 1:De=0,Ft=null,_s(n,i,p,1);break;case 2:case 9:if(Ip(p)){De=0,Ft=null,kg(i);break}i=function(){De!==2&&De!==9||$e!==n||(De=7),On(n)},p.then(i,i);break e;case 3:De=7;break e;case 4:De=5;break e;case 7:Ip(p)?(De=0,Ft=null,kg(i)):(De=0,Ft=null,_s(n,i,p,7));break;case 5:var v=null;switch(Se.tag){case 26:v=Se.memoizedState;case 5:case 27:var E=Se;if(v?py(v):E.stateNode.complete){De=0,Ft=null;var R=E.sibling;if(R!==null)Se=R;else{var D=E.return;D!==null?(Se=D,Al(D)):Se=null}break t}}De=0,Ft=null,_s(n,i,p,5);break;case 6:De=0,Ft=null,_s(n,i,p,6);break;case 8:Ld(),Qe=6;break e;default:throw Error(s(462))}}VS();break}catch(H){Ag(n,H)}while(!0);return Yn=gi=null,P.H=l,P.A=h,Me=a,Se!==null?0:($e=null,Ae=0,qo(),Qe)}function VS(){for(;Se!==null&&!Oo();)Cg(Se)}function Cg(n){var i=Zm(n.alternate,n,nr);n.memoizedProps=n.pendingProps,i===null?Al(n):Se=i}function kg(n){var i=n,a=i.alternate;switch(i.tag){case 15:case 0:i=Ym(a,i,i.pendingProps,i.type,void 0,Ae);break;case 11:i=Ym(a,i,i.pendingProps,i.type.render,i.ref,Ae);break;case 5:Xu(i);default:eg(a,i),i=Se=Op(i,nr),i=Zm(a,i,nr)}n.memoizedProps=n.pendingProps,i===null?Al(n):Se=i}function _s(n,i,a,l){Yn=gi=null,Xu(i),cs=null,ma=0;var h=i.return;try{if(NS(n,h,i,a,Ae)){Qe=1,dl(n,tn(a,n.current)),Se=null;return}}catch(p){if(h!==null)throw Se=h,p;Qe=1,dl(n,tn(a,n.current)),Se=null;return}i.flags&32768?(Re||l===1?n=!0:gs||(Ae&536870912)!==0?n=!1:(Dr=n=!0,(l===2||l===9||l===3||l===6)&&(l=Gt.current,l!==null&&l.tag===13&&(l.flags|=16384))),xg(i,n)):Al(i)}function Al(n){var i=n;do{if((i.flags&32768)!==0){xg(i,Dr);return}n=i.return;var a=LS(i.alternate,i,nr);if(a!==null){Se=a;return}if(i=i.sibling,i!==null){Se=i;return}Se=i=n}while(i!==null);Qe===0&&(Qe=5)}function xg(n,i){do{var a=US(n.alternate,n);if(a!==null){a.flags&=32767,Se=a;return}if(a=n.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!i&&(n=n.sibling,n!==null)){Se=n;return}Se=n=a}while(n!==null);Qe=6,Se=null}function jg(n,i,a,l,h,p,v,E,R){n.cancelPendingCommit=null;do Tl();while(ct!==0);if((Me&6)!==0)throw Error(s(327));if(i!==null){if(i===n.current)throw Error(s(177));if(p=i.lanes|i.childLanes,p|=Au,Ew(n,a,p,v,E,R),n===$e&&(Se=$e=null,Ae=0),vs=i,zr=n,rr=a,Nd=p,Md=h,_g=l,(i.subtreeFlags&10256)!==0||(i.flags&10256)!==0?(n.callbackNode=null,n.callbackPriority=0,KS(Bn,function(){return Ug(),null})):(n.callbackNode=null,n.callbackPriority=0),l=(i.flags&13878)!==0,(i.subtreeFlags&13878)!==0||l){l=P.T,P.T=null,h=Q.p,Q.p=2,v=Me,Me|=4;try{zS(n,i,a)}finally{Me=v,Q.p=h,P.T=l}}ct=1,Ng(),Mg(),Dg()}}function Ng(){if(ct===1){ct=0;var n=zr,i=vs,a=(i.flags&13878)!==0;if((i.subtreeFlags&13878)!==0||a){a=P.T,P.T=null;var l=Q.p;Q.p=2;var h=Me;Me|=4;try{hg(i,n);var p=Kd,v=vp(n.containerInfo),E=p.focusedElem,R=p.selectionRange;if(v!==E&&E&&E.ownerDocument&&yp(E.ownerDocument.documentElement,E)){if(R!==null&&bu(E)){var D=R.start,H=R.end;if(H===void 0&&(H=D),"selectionStart"in E)E.selectionStart=D,E.selectionEnd=Math.min(H,E.value.length);else{var Y=E.ownerDocument||document,L=Y&&Y.defaultView||window;if(L.getSelection){var B=L.getSelection(),te=E.textContent.length,pe=Math.min(R.start,te),Be=R.end===void 0?pe:Math.min(R.end,te);!B.extend&&pe>Be&&(v=Be,Be=pe,pe=v);var j=gp(E,pe),O=gp(E,Be);if(j&&O&&(B.rangeCount!==1||B.anchorNode!==j.node||B.anchorOffset!==j.offset||B.focusNode!==O.node||B.focusOffset!==O.offset)){var M=Y.createRange();M.setStart(j.node,j.offset),B.removeAllRanges(),pe>Be?(B.addRange(M),B.extend(O.node,O.offset)):(M.setEnd(O.node,O.offset),B.addRange(M))}}}}for(Y=[],B=E;B=B.parentNode;)B.nodeType===1&&Y.push({element:B,left:B.scrollLeft,top:B.scrollTop});for(typeof E.focus=="function"&&E.focus(),E=0;E<Y.length;E++){var q=Y[E];q.element.scrollLeft=q.left,q.element.scrollTop=q.top}}zl=!!Fd,Kd=Fd=null}finally{Me=h,Q.p=l,P.T=a}}n.current=i,ct=2}}function Mg(){if(ct===2){ct=0;var n=zr,i=vs,a=(i.flags&8772)!==0;if((i.subtreeFlags&8772)!==0||a){a=P.T,P.T=null;var l=Q.p;Q.p=2;var h=Me;Me|=4;try{og(n,i.alternate,i)}finally{Me=h,Q.p=l,P.T=a}}ct=3}}function Dg(){if(ct===4||ct===3){ct=0,Xc();var n=zr,i=vs,a=rr,l=_g;(i.subtreeFlags&10256)!==0||(i.flags&10256)!==0?ct=5:(ct=0,vs=zr=null,Lg(n,n.pendingLanes));var h=n.pendingLanes;if(h===0&&(Ur=null),eu(a),i=i.stateNode,$t&&typeof $t.onCommitFiberRoot=="function")try{$t.onCommitFiberRoot(Xs,i,void 0,(i.current.flags&128)===128)}catch{}if(l!==null){i=P.T,h=Q.p,Q.p=2,P.T=null;try{for(var p=n.onRecoverableError,v=0;v<l.length;v++){var E=l[v];p(E.value,{componentStack:E.stack})}}finally{P.T=i,Q.p=h}}(rr&3)!==0&&Tl(),On(n),h=n.pendingLanes,(a&261930)!==0&&(h&42)!==0?n===Dd?Na++:(Na=0,Dd=n):Na=0,Ma(0)}}function Lg(n,i){(n.pooledCacheLanes&=i)===0&&(i=n.pooledCache,i!=null&&(n.pooledCache=null,fa(i)))}function Tl(){return Ng(),Mg(),Dg(),Ug()}function Ug(){if(ct!==5)return!1;var n=zr,i=Nd;Nd=0;var a=eu(rr),l=P.T,h=Q.p;try{Q.p=32>a?32:a,P.T=null,a=Md,Md=null;var p=zr,v=rr;if(ct=0,vs=zr=null,rr=0,(Me&6)!==0)throw Error(s(331));var E=Me;if(Me|=4,yg(p.current),pg(p,p.current,v,a),Me=E,Ma(0,!1),$t&&typeof $t.onPostCommitFiberRoot=="function")try{$t.onPostCommitFiberRoot(Xs,p)}catch{}return!0}finally{Q.p=h,P.T=l,Lg(n,i)}}function zg(n,i,a){i=tn(a,i),i=hd(n.stateNode,i,2),n=xr(n,i,2),n!==null&&(Ws(n,2),On(n))}function Le(n,i,a){if(n.tag===3)zg(n,n,a);else for(;i!==null;){if(i.tag===3){zg(i,n,a);break}else if(i.tag===1){var l=i.stateNode;if(typeof i.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(Ur===null||!Ur.has(l))){n=tn(a,n),a=Im(2),l=xr(i,a,2),l!==null&&(Pm(a,l,i,n),Ws(l,2),On(l));break}}i=i.return}}function zd(n,i,a){var l=n.pingCache;if(l===null){l=n.pingCache=new BS;var h=new Set;l.set(i,h)}else h=l.get(i),h===void 0&&(h=new Set,l.set(i,h));h.has(a)||(kd=!0,h.add(a),n=GS.bind(null,n,i,a),i.then(n,n))}function GS(n,i,a){var l=n.pingCache;l!==null&&l.delete(i),n.pingedLanes|=n.suspendedLanes&a,n.warmLanes&=~a,$e===n&&(Ae&a)===a&&(Qe===4||Qe===3&&(Ae&62914560)===Ae&&300>wt()-bl?(Me&2)===0&&bs(n,0):xd|=a,ys===Ae&&(ys=0)),On(n)}function Ig(n,i){i===0&&(i=Nf()),n=fi(n,i),n!==null&&(Ws(n,i),On(n))}function YS(n){var i=n.memoizedState,a=0;i!==null&&(a=i.retryLane),Ig(n,a)}function FS(n,i){var a=0;switch(n.tag){case 31:case 13:var l=n.stateNode,h=n.memoizedState;h!==null&&(a=h.retryLane);break;case 19:l=n.stateNode;break;case 22:l=n.stateNode._retryCache;break;default:throw Error(s(314))}l!==null&&l.delete(i),Ig(n,a)}function KS(n,i){return fn(n,i)}var Rl=null,ws=null,Id=!1,Ol=!1,Pd=!1,Pr=0;function On(n){n!==ws&&n.next===null&&(ws===null?Rl=ws=n:ws=ws.next=n),Ol=!0,Id||(Id=!0,QS())}function Ma(n,i){if(!Pd&&Ol){Pd=!0;do for(var a=!1,l=Rl;l!==null;){if(n!==0){var h=l.pendingLanes;if(h===0)var p=0;else{var v=l.suspendedLanes,E=l.pingedLanes;p=(1<<31-Ht(42|n)+1)-1,p&=h&~(v&~E),p=p&201326741?p&201326741|1:p?p|2:0}p!==0&&(a=!0,Hg(l,p))}else p=Ae,p=jo(l,l===$e?p:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(p&3)===0||Zs(l,p)||(a=!0,Hg(l,p));l=l.next}while(a);Pd=!1}}function JS(){Pg()}function Pg(){Ol=Id=!1;var n=0;Pr!==0&&aE()&&(n=Pr);for(var i=wt(),a=null,l=Rl;l!==null;){var h=l.next,p=Bg(l,i);p===0?(l.next=null,a===null?Rl=h:a.next=h,h===null&&(ws=a)):(a=l,(n!==0||(p&3)!==0)&&(Ol=!0)),l=h}ct!==0&&ct!==5||Ma(n),Pr!==0&&(Pr=0)}function Bg(n,i){for(var a=n.suspendedLanes,l=n.pingedLanes,h=n.expirationTimes,p=n.pendingLanes&-62914561;0<p;){var v=31-Ht(p),E=1<<v,R=h[v];R===-1?((E&a)===0||(E&l)!==0)&&(h[v]=Sw(E,i)):R<=i&&(n.expiredLanes|=E),p&=~E}if(i=$e,a=Ae,a=jo(n,n===i?a:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),l=n.callbackNode,a===0||n===i&&(De===2||De===9)||n.cancelPendingCommit!==null)return l!==null&&l!==null&&Qs(l),n.callbackNode=null,n.callbackPriority=0;if((a&3)===0||Zs(n,a)){if(i=a&-a,i===n.callbackPriority)return i;switch(l!==null&&Qs(l),eu(a)){case 2:case 8:a=Bt;break;case 32:a=Bn;break;case 268435456:a=jf;break;default:a=Bn}return l=$g.bind(null,n),a=fn(a,l),n.callbackPriority=i,n.callbackNode=a,i}return l!==null&&l!==null&&Qs(l),n.callbackPriority=2,n.callbackNode=null,2}function $g(n,i){if(ct!==0&&ct!==5)return n.callbackNode=null,n.callbackPriority=0,null;var a=n.callbackNode;if(Tl()&&n.callbackNode!==a)return null;var l=Ae;return l=jo(n,n===$e?l:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),l===0?null:(Sg(n,l,i),Bg(n,wt()),n.callbackNode!=null&&n.callbackNode===a?$g.bind(null,n):null)}function Hg(n,i){if(Tl())return null;Sg(n,i,!0)}function QS(){lE(function(){(Me&6)!==0?fn(lt,JS):Pg()})}function Bd(){if(Pr===0){var n=as;n===0&&(n=Co,Co<<=1,(Co&261888)===0&&(Co=256)),Pr=n}return Pr}function qg(n){return n==null||typeof n=="symbol"||typeof n=="boolean"?null:typeof n=="function"?n:Lo(""+n)}function Vg(n,i){var a=i.ownerDocument.createElement("input");return a.name=i.name,a.value=i.value,n.id&&a.setAttribute("form",n.id),i.parentNode.insertBefore(a,i),n=new FormData(n),a.parentNode.removeChild(a),n}function XS(n,i,a,l,h){if(i==="submit"&&a&&a.stateNode===h){var p=qg((h[xt]||null).action),v=l.submitter;v&&(i=(i=v[xt]||null)?qg(i.formAction):v.getAttribute("formAction"),i!==null&&(p=i,v=null));var E=new Po("action","action",null,l,h);n.push({event:E,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(Pr!==0){var R=v?Vg(h,v):new FormData(h);ad(a,{pending:!0,data:R,method:h.method,action:p},null,R)}}else typeof p=="function"&&(E.preventDefault(),R=v?Vg(h,v):new FormData(h),ad(a,{pending:!0,data:R,method:h.method,action:p},p,R))},currentTarget:h}]})}}for(var $d=0;$d<Eu.length;$d++){var Hd=Eu[$d],ZS=Hd.toLowerCase(),WS=Hd[0].toUpperCase()+Hd.slice(1);pn(ZS,"on"+WS)}pn(wp,"onAnimationEnd"),pn(Sp,"onAnimationIteration"),pn(Ep,"onAnimationStart"),pn("dblclick","onDoubleClick"),pn("focusin","onFocus"),pn("focusout","onBlur"),pn(mS,"onTransitionRun"),pn(gS,"onTransitionStart"),pn(yS,"onTransitionCancel"),pn(Ap,"onTransitionEnd"),Yi("onMouseEnter",["mouseout","mouseover"]),Yi("onMouseLeave",["mouseout","mouseover"]),Yi("onPointerEnter",["pointerout","pointerover"]),Yi("onPointerLeave",["pointerout","pointerover"]),ci("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ci("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),ci("onBeforeInput",["compositionend","keypress","textInput","paste"]),ci("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ci("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ci("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Da="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(" "),eE=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Da));function Gg(n,i){i=(i&4)!==0;for(var a=0;a<n.length;a++){var l=n[a],h=l.event;l=l.listeners;e:{var p=void 0;if(i)for(var v=l.length-1;0<=v;v--){var E=l[v],R=E.instance,D=E.currentTarget;if(E=E.listener,R!==p&&h.isPropagationStopped())break e;p=E,h.currentTarget=D;try{p(h)}catch(H){Ho(H)}h.currentTarget=null,p=R}else for(v=0;v<l.length;v++){if(E=l[v],R=E.instance,D=E.currentTarget,E=E.listener,R!==p&&h.isPropagationStopped())break e;p=E,h.currentTarget=D;try{p(h)}catch(H){Ho(H)}h.currentTarget=null,p=R}}}}function Ee(n,i){var a=i[tu];a===void 0&&(a=i[tu]=new Set);var l=n+"__bubble";a.has(l)||(Yg(i,n,2,!1),a.add(l))}function qd(n,i,a){var l=0;i&&(l|=4),Yg(a,n,l,i)}var Cl="_reactListening"+Math.random().toString(36).slice(2);function Vd(n){if(!n[Cl]){n[Cl]=!0,Pf.forEach(function(a){a!=="selectionchange"&&(eE.has(a)||qd(a,!1,n),qd(a,!0,n))});var i=n.nodeType===9?n:n.ownerDocument;i===null||i[Cl]||(i[Cl]=!0,qd("selectionchange",!1,i))}}function Yg(n,i,a,l){switch(wy(i)){case 2:var h=CE;break;case 8:h=kE;break;default:h=sh}a=h.bind(null,i,a,n),h=void 0,!uu||i!=="touchstart"&&i!=="touchmove"&&i!=="wheel"||(h=!0),l?h!==void 0?n.addEventListener(i,a,{capture:!0,passive:h}):n.addEventListener(i,a,!0):h!==void 0?n.addEventListener(i,a,{passive:h}):n.addEventListener(i,a,!1)}function Gd(n,i,a,l,h){var p=l;if((i&1)===0&&(i&2)===0&&l!==null)e:for(;;){if(l===null)return;var v=l.tag;if(v===3||v===4){var E=l.stateNode.containerInfo;if(E===h)break;if(v===4)for(v=l.return;v!==null;){var R=v.tag;if((R===3||R===4)&&v.stateNode.containerInfo===h)return;v=v.return}for(;E!==null;){if(v=qi(E),v===null)return;if(R=v.tag,R===5||R===6||R===26||R===27){l=p=v;continue e}E=E.parentNode}}l=l.return}Xf(function(){var D=p,H=lu(a),Y=[];e:{var L=Tp.get(n);if(L!==void 0){var B=Po,te=n;switch(n){case"keypress":if(zo(a)===0)break e;case"keydown":case"keyup":B=Fw;break;case"focusin":te="focus",B=pu;break;case"focusout":te="blur",B=pu;break;case"beforeblur":case"afterblur":B=pu;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":B=ep;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":B=Lw;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":B=Qw;break;case wp:case Sp:case Ep:B=Iw;break;case Ap:B=Zw;break;case"scroll":case"scrollend":B=Mw;break;case"wheel":B=eS;break;case"copy":case"cut":case"paste":B=Bw;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":B=np;break;case"toggle":case"beforetoggle":B=nS}var pe=(i&4)!==0,Be=!pe&&(n==="scroll"||n==="scrollend"),j=pe?L!==null?L+"Capture":null:L;pe=[];for(var O=D,M;O!==null;){var q=O;if(M=q.stateNode,q=q.tag,q!==5&&q!==26&&q!==27||M===null||j===null||(q=na(O,j),q!=null&&pe.push(La(O,q,M))),Be)break;O=O.return}0<pe.length&&(L=new B(L,te,null,a,H),Y.push({event:L,listeners:pe}))}}if((i&7)===0){e:{if(L=n==="mouseover"||n==="pointerover",B=n==="mouseout"||n==="pointerout",L&&a!==ou&&(te=a.relatedTarget||a.fromElement)&&(qi(te)||te[Hi]))break e;if((B||L)&&(L=H.window===H?H:(L=H.ownerDocument)?L.defaultView||L.parentWindow:window,B?(te=a.relatedTarget||a.toElement,B=D,te=te?qi(te):null,te!==null&&(Be=c(te),pe=te.tag,te!==Be||pe!==5&&pe!==27&&pe!==6)&&(te=null)):(B=null,te=D),B!==te)){if(pe=ep,q="onMouseLeave",j="onMouseEnter",O="mouse",(n==="pointerout"||n==="pointerover")&&(pe=np,q="onPointerLeave",j="onPointerEnter",O="pointer"),Be=B==null?L:ta(B),M=te==null?L:ta(te),L=new pe(q,O+"leave",B,a,H),L.target=Be,L.relatedTarget=M,q=null,qi(H)===D&&(pe=new pe(j,O+"enter",te,a,H),pe.target=M,pe.relatedTarget=Be,q=pe),Be=q,B&&te)t:{for(pe=tE,j=B,O=te,M=0,q=j;q;q=pe(q))M++;q=0;for(var de=O;de;de=pe(de))q++;for(;0<M-q;)j=pe(j),M--;for(;0<q-M;)O=pe(O),q--;for(;M--;){if(j===O||O!==null&&j===O.alternate){pe=j;break t}j=pe(j),O=pe(O)}pe=null}else pe=null;B!==null&&Fg(Y,L,B,pe,!1),te!==null&&Be!==null&&Fg(Y,Be,te,pe,!0)}}e:{if(L=D?ta(D):window,B=L.nodeName&&L.nodeName.toLowerCase(),B==="select"||B==="input"&&L.type==="file")var xe=up;else if(lp(L))if(dp)xe=hS;else{xe=uS;var le=cS}else B=L.nodeName,!B||B.toLowerCase()!=="input"||L.type!=="checkbox"&&L.type!=="radio"?D&&au(D.elementType)&&(xe=up):xe=dS;if(xe&&(xe=xe(n,D))){cp(Y,xe,a,H);break e}le&&le(n,L,D),n==="focusout"&&D&&L.type==="number"&&D.memoizedProps.value!=null&&su(L,"number",L.value)}switch(le=D?ta(D):window,n){case"focusin":(lp(le)||le.contentEditable==="true")&&(Zi=le,_u=D,ua=null);break;case"focusout":ua=_u=Zi=null;break;case"mousedown":wu=!0;break;case"contextmenu":case"mouseup":case"dragend":wu=!1,bp(Y,a,H);break;case"selectionchange":if(pS)break;case"keydown":case"keyup":bp(Y,a,H)}var be;if(gu)e:{switch(n){case"compositionstart":var Te="onCompositionStart";break e;case"compositionend":Te="onCompositionEnd";break e;case"compositionupdate":Te="onCompositionUpdate";break e}Te=void 0}else Xi?ap(n,a)&&(Te="onCompositionEnd"):n==="keydown"&&a.keyCode===229&&(Te="onCompositionStart");Te&&(rp&&a.locale!=="ko"&&(Xi||Te!=="onCompositionStart"?Te==="onCompositionEnd"&&Xi&&(be=Zf()):(Er=H,du="value"in Er?Er.value:Er.textContent,Xi=!0)),le=kl(D,Te),0<le.length&&(Te=new tp(Te,n,null,a,H),Y.push({event:Te,listeners:le}),be?Te.data=be:(be=op(a),be!==null&&(Te.data=be)))),(be=iS?sS(n,a):aS(n,a))&&(Te=kl(D,"onBeforeInput"),0<Te.length&&(le=new tp("onBeforeInput","beforeinput",null,a,H),Y.push({event:le,listeners:Te}),le.data=be)),XS(Y,n,D,a,H)}Gg(Y,i)})}function La(n,i,a){return{instance:n,listener:i,currentTarget:a}}function kl(n,i){for(var a=i+"Capture",l=[];n!==null;){var h=n,p=h.stateNode;if(h=h.tag,h!==5&&h!==26&&h!==27||p===null||(h=na(n,a),h!=null&&l.unshift(La(n,h,p)),h=na(n,i),h!=null&&l.push(La(n,h,p))),n.tag===3)return l;n=n.return}return[]}function tE(n){if(n===null)return null;do n=n.return;while(n&&n.tag!==5&&n.tag!==27);return n||null}function Fg(n,i,a,l,h){for(var p=i._reactName,v=[];a!==null&&a!==l;){var E=a,R=E.alternate,D=E.stateNode;if(E=E.tag,R!==null&&R===l)break;E!==5&&E!==26&&E!==27||D===null||(R=D,h?(D=na(a,p),D!=null&&v.unshift(La(a,D,R))):h||(D=na(a,p),D!=null&&v.push(La(a,D,R)))),a=a.return}v.length!==0&&n.push({event:i,listeners:v})}var nE=/\r\n?/g,rE=/\u0000|\uFFFD/g;function Kg(n){return(typeof n=="string"?n:""+n).replace(nE,` 10`).replace(rE,"")}function Jg(n,i){return i=Kg(i),Kg(n)===i}function Pe(n,i,a,l,h,p){switch(a){case"children":typeof l=="string"?i==="body"||i==="textarea"&&l===""||Ki(n,l):(typeof l=="number"||typeof l=="bigint")&&i!=="body"&&Ki(n,""+l);break;case"className":Mo(n,"class",l);break;case"tabIndex":Mo(n,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":Mo(n,a,l);break;case"style":Jf(n,l,p);break;case"data":if(i!=="object"){Mo(n,"data",l);break}case"src":case"href":if(l===""&&(i!=="a"||a!=="href")){n.removeAttribute(a);break}if(l==null||typeof l=="function"||typeof l=="symbol"||typeof l=="boolean"){n.removeAttribute(a);break}l=Lo(""+l),n.setAttribute(a,l);break;case"action":case"formAction":if(typeof l=="function"){n.setAttribute(a,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof p=="function"&&(a==="formAction"?(i!=="input"&&Pe(n,i,"name",h.name,h,null),Pe(n,i,"formEncType",h.formEncType,h,null),Pe(n,i,"formMethod",h.formMethod,h,null),Pe(n,i,"formTarget",h.formTarget,h,null)):(Pe(n,i,"encType",h.encType,h,null),Pe(n,i,"method",h.method,h,null),Pe(n,i,"target",h.target,h,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){n.removeAttribute(a);break}l=Lo(""+l),n.setAttribute(a,l);break;case"onClick":l!=null&&(n.onclick=Hn);break;case"onScroll":l!=null&&Ee("scroll",n);break;case"onScrollEnd":l!=null&&Ee("scrollend",n);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(s(61));if(a=l.__html,a!=null){if(h.children!=null)throw Error(s(60));n.innerHTML=a}}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}a=Lo(""+l),n.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":l!=null&&typeof l!="function"&&typeof l!="symbol"?n.setAttribute(a,""+l):n.removeAttribute(a);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInl
10ine":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":l&&typeof l!="function"&&typeof l!="symbol"?n.setAttribute(a,""):n.removeAttribute(a);break;case"capture":case"download":l===!0?n.setAttribute(a,""):l!==!1&&l!=null&&typeof l!="function"&&typeof l!="symbol"?n.setAttribute(a,l):n.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!="function"&&typeof l!="symbol"&&!isNaN(l)&&1<=l?n.setAttribute(a,l):n.removeAttribute(a);break;case"rowSpan":case"start":l==null||typeof l=="function"||typeof l=="symbol"||isNaN(l)?n.removeAttribute(a):n.setAttribute(a,l);break;case"popover":Ee("beforetoggle",n),Ee("toggle",n),No(n,"popover",l);break;case"xlinkActuate":$n(n,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":$n(n,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":$n(n,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":$n(n,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":$n(n,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":$n(n,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":$n(n,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":$n(n,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":$n(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<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=jw.get(a)||a,No(n,a,l))}}function Yd(n,i,a,l,h,p){switch(a){case"style":Jf(n,l,p);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(s(61));if(a=l.__html,a!=null){if(h.children!=null)throw Error(s(60));n.innerHTML=a}}break;case"children":typeof l=="string"?Ki(n,l):(typeof l=="number"||typeof l=="bigint")&&Ki(n,""+l);break;case"onScroll":l!=null&&Ee("scroll",n);break;case"onScrollEnd":l!=null&&Ee("scrollend",n);break;case"onClick":l!=null&&(n.onclick=Hn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Bf.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(h=a.endsWith("Capture"),i=a.slice(2,h?a.length-7:void 0),p=n[xt]||null,p=p!=null?p[a]:null,typeof p=="function"&&n.removeEventListener(i,p,h),typeof l=="function")){typeof p!="function"&&p!==null&&(a in n?n[a]=null:n.hasAttribute(a)&&n.removeAttribute(a)),n.addEventListener(i,l,h);break e}a in n?n[a]=l:l===!0?n.setAttribute(a,""):No(n,a,l)}}}function bt(n,i,a){switch(i){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ee("error",n),Ee("load",n);var l=!1,h=!1,p;for(p in a)if(a.hasOwnProperty(p)){var v=a[p];if(v!=null)switch(p){case"src":l=!0;break;case"srcSet":h=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(s(137,i));default:Pe(n,i,p,v,a,null)}}h&&Pe(n,i,"srcSet",a.srcSet,a,null),l&&Pe(n,i,"src",a.src,a,null);return;case"input":Ee("invalid",n);var E=p=v=h=null,R=null,D=null;for(l in a)if(a.hasOwnProperty(l)){var H=a[l];if(H!=null)switch(l){case"name":h=H;break;case"type":v=H;break;case"checked":R=H;break;case"defaultChecked":D=H;break;case"value":p=H;break;case"defaultValue":E=H;break;case"children":case"dangerouslySetInnerHTML":if(H!=null)throw Error(s(137,i));break;default:Pe(n,i,l,H,a,null)}}Gf(n,p,E,R,D,v,h,!1);return;case"select":Ee("invalid",n),l=v=p=null;for(h in a)if(a.hasOwnProperty(h)&&(E=a[h],E!=null))switch(h){case"value":p=E;break;case"defaultValue":v=E;break;case"multiple":l=E;default:Pe(n,i,h,E,a,null)}i=p,a=v,n.multiple=!!l,i!=null?Fi(n,!!l,i,!1):a!=null&&Fi(n,!!l,a,!0);return;case"textarea":Ee("invalid",n),p=h=l=null;for(v in a)if(a.hasOwnProperty(v)&&(E=a[v],E!=null))switch(v){case"value":l=E;break;case"defaultValue":h=E;break;case"children":p=E;break;case"dangerouslySetInnerHTML":if(E!=null)throw Error(s(91));break;default:Pe(n,i,v,E,a,null)}Ff(n,l,h,p);return;case"option":for(R in a)a.hasOwnProperty(R)&&(l=a[R],l!=null)&&(R==="selected"?n.selected=l&&typeof l!="function"&&typeof l!="symbol":Pe(n,i,R,l,a,null));return;case"dialog":Ee("beforetoggle",n),Ee("toggle",n),Ee("cancel",n),Ee("close",n);break;case"iframe":case"object":Ee("load",n);break;case"video":case"audio":for(l=0;l<Da.length;l++)Ee(Da[l],n);break;case"image":Ee("error",n),Ee("load",n);break;case"details":Ee("toggle",n);break;case"embed":case"source":case"link":Ee("error",n),Ee("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(D in a)if(a.hasOwnProperty(D)&&(l=a[D],l!=null))switch(D){case"children":case"dangerouslySetInnerHTML":throw Error(s(137,i));default:Pe(n,i,D,l,a,null)}return;default:if(au(i)){for(H in a)a.hasOwnProperty(H)&&(l=a[H],l!==void 0&&Yd(n,i,H,l,a,void 0));return}}for(E in a)a.hasOwnProperty(E)&&(l=a[E],l!=null&&Pe(n,i,E,l,a,null))}function iE(n,i,a,l){switch(i){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var h=null,p=null,v=null,E=null,R=null,D=null,H=null;for(B in a){var Y=a[B];if(a.hasOwnProperty(B)&&Y!=null)switch(B){case"checked":break;case"value":break;case"defaultValue":R=Y;default:l.hasOwnProperty(B)||Pe(n,i,B,null,l,Y)}}for(var L in l){var B=l[L];if(Y=a[L],l.hasOwnProperty(L)&&(B!=null||Y!=null))switch(L){case"type":p=B;break;case"name":h=B;break;case"checked":D=B;break;case"defaultChecked":H=B;break;case"value":v=B;break;case"defaultValue":E=B;break;case"children":case"dangerouslySetInnerHTML":if(B!=null)throw Error(s(137,i));break;default:B!==Y&&Pe(n,i,L,B,l,Y)}}iu(n,v,E,R,D,H,p,h);return;case"select":B=v=E=L=null;for(p in a)if(R=a[p],a.hasOwnProperty(p)&&R!=null)switch(p){case"value":break;case"multiple":B=R;default:l.hasOwnProperty(p)||Pe(n,i,p,null,l,R)}for(h in l)if(p=l[h],R=a[h],l.hasOwnProperty(h)&&(p!=null||R!=null))switch(h){case"value":L=p;break;case"defaultValue":E=p;break;case"multiple":v=p;default:p!==R&&Pe(n,i,h,p,l,R)}i=E,a=v,l=B,L!=null?Fi(n,!!a,L,!1):!!l!=!!a&&(i!=null?Fi(n,!!a,i,!0):Fi(n,!!a,a?[]:"",!1));return;case"textarea":B=L=null;for(E in a)if(h=a[E],a.hasOwnProperty(E)&&h!=null&&!l.hasOwnProperty(E))switch(E){case"value":break;case"children":break;default:Pe(n,i,E,null,l,h)}for(v in l)if(h=l[v],p=a[v],l.hasOwnProperty(v)&&(h!=null||p!=null))switch(v){case"value":L=h;break;case"defaultValue":B=h;break;case"children":break;case"dangerouslySetInnerHTML":if(h!=null)throw Error(s(91));break;default:h!==p&&Pe(n,i,v,h,l,p)}Yf(n,L,B);return;case"option":for(var te in a)L=a[te],a.hasOwnProperty(te)&&L!=null&&!l.hasOwnProperty(te)&&(te==="selected"?n.selected=!1:Pe(n,i,te,null,l,L));for(R in l)L=l[R],B=a[R],l.hasOwnProperty(R)&&L!==B&&(L!=null||B!=null)&&(R==="selected"?n.selected=L&&typeof L!="function"&&typeof L!="symbol":Pe(n,i,R,L,l,B));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 pe in a)L=a[pe],a.hasOwnProperty(pe)&&L!=null&&!l.hasOwnProperty(pe)&&Pe(n,i,pe,null,l,L);for(D in l)if(L=l[D],B=a[D],l.hasOwnProperty(D)&&L!==B&&(L!=null||B!=null))switch(D){case"children":case"dangerouslySetInnerHTML":if(L!=null)throw Error(s(137,i));break;default:Pe(n,i,D,L,l,B)}return;default:if(au(i)){for(var Be in a)L=a[Be],a.hasOwnProperty(Be)&&L!==void 0&&!l.hasOwnProperty(Be)&&Yd(n,i,Be,void 0,l,L);for(H in l)L=l[H],B=a[H],!l.hasOwnProperty(H)||L===B||L===void 0&&B===void 0||Yd(n,i,H,L,l,B);return}}for(var j in a)L=a[j],a.hasOwnProperty(j)&&L!=null&&!l.hasOwnProperty(j)&&Pe(n,i,j,null,l,L);for(Y in l)L=l[Y],B=a[Y],!l.hasOwnProperty(Y)||L===B||L==null&&B==null||Pe(n,i,Y,L,l,B)}function Qg(n){switch(n){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function sE(){if(typeof performance.getEntriesByType=="function"){for(var n=0,i=0,a=performance.getEntriesByType("resource"),l=0;l<a.length;l++){var h=a[l],p=h.transferSize,v=h.initiatorType,E=h.duration;if(p&&E&&Qg(v)){for(v=0,E=h.responseEnd,l+=1;l<a.length;l++){var R=a[l],D=R.startTime;if(D>E)break;var H=R.transferSize,Y=R.initiatorType;H&&Qg(Y)&&(R=R.responseEnd,v+=H*(R<E?1:(E-D)/(R-D)))}if(--l,i+=8*(p+v)/(h.duration/1e3),n++,10<n)break}}if(0<n)return i/n/1e6}return navigator.connection&&(n=navigator.connection.downlink,typeof n=="number")?
vendor: 21,575 bytes, line 10
10n:5}var Fd=null,Kd=null;function xl(n){return n.nodeType===9?n:n.ownerDocument}function Xg(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 Zg(n,i){if(n===0)switch(i){case"svg":return 1;case"math":return 2;default:return 0}return n===1&&i==="foreignObject"?0:n}function Jd(n,i){return n==="textarea"||n==="noscript"||typeof i.children=="string"||typeof i.children=="number"||typeof i.children=="bigint"||typeof i.dangerouslySetInnerHTML=="object"&&i.dangerouslySetInnerHTML!==null&&i.dangerouslySetInnerHTML.__html!=null}var Qd=null;function aE(){var n=window.event;return n&&n.type==="popstate"?n===Qd?!1:(Qd=n,!0):(Qd=null,!1)}var Wg=typeof setTimeout=="function"?setTimeout:void 0,oE=typeof clearTimeout=="function"?clearTimeout:void 0,ey=typeof Promise=="function"?Promise:void 0,lE=typeof queueMicrotask=="function"?queueMicrotask:typeof ey<"u"?function(n){return ey.resolve(null).then(n).catch(cE)}:Wg;function cE(n){setTimeout(function(){throw n})}function Br(n){return n==="head"}function ty(n,i){var a=i,l=0;do{var h=a.nextSibling;if(n.removeChild(a),h&&h.nodeType===8)if(a=h.data,a==="/$"||a==="/&"){if(l===0){n.removeChild(h),Ts(i);return}l--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")l++;else if(a==="html")Ua(n.ownerDocument.documentElement);else if(a==="head"){a=n.ownerDocument.head,Ua(a);for(var p=a.firstChild;p;){var v=p.nextSibling,E=p.nodeName;p[ea]||E==="SCRIPT"||E==="STYLE"||E==="LINK"&&p.rel.toLowerCase()==="stylesheet"||a.removeChild(p),p=v}}else a==="body"&&Ua(n.ownerDocument.body);a=h}while(a);Ts(i)}function ny(n,i){var a=n;n=0;do{var l=a.nextSibling;if(a.nodeType===1?i?(a._stashedDisplay=a.style.display,a.style.display="none"):(a.style.display=a._stashedDisplay||"",a.getAttribute("style")===""&&a.removeAttribute("style")):a.nodeType===3&&(i?(a._stashedText=a.nodeValue,a.nodeValue=""):a.nodeValue=a._stashedText||""),l&&l.nodeType===8)if(a=l.data,a==="/$"){if(n===0)break;n--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||n++;a=l}while(a)}function Xd(n){var i=n.firstChild;for(i&&i.nodeType===10&&(i=i.nextSibling);i;){var a=i;switch(i=i.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":Xd(a),nu(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}n.removeChild(a)}}function uE(n,i,a,l){for(;n.nodeType===1;){var h=a;if(n.nodeName.toLowerCase()!==i.toLowerCase()){if(!l&&(n.nodeName!=="INPUT"||n.type!=="hidden"))break}else if(l){if(!n[ea])switch(i){case"meta":if(!n.hasAttribute("itemprop"))break;return n;case"link":if(p=n.getAttribute("rel"),p==="stylesheet"&&n.hasAttribute("data-precedence"))break;if(p!==h.rel||n.getAttribute("href")!==(h.href==null||h.href===""?null:h.href)||n.getAttribute("crossorigin")!==(h.crossOrigin==null?null:h.crossOrigin)||n.getAttribute("title")!==(h.title==null?null:h.title))break;return n;case"style":if(n.hasAttribute("data-precedence"))break;return n;case"script":if(p=n.getAttribute("src"),(p!==(h.src==null?null:h.src)||n.getAttribute("type")!==(h.type==null?null:h.type)||n.getAttribute("crossorigin")!==(h.crossOrigin==null?null:h.crossOrigin))&&p&&n.hasAttribute("async")&&!n.hasAttribute("itemprop"))break;return n;default:return n}}else if(i==="input"&&n.type==="hidden"){var p=h.name==null?null:""+h.name;if(h.type==="hidden"&&n.getAttribute("name")===p)return n}else return n;if(n=on(n.nextSibling),n===null)break}return null}function dE(n,i,a){if(i==="")return null;for(;n.nodeType!==3;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!a||(n=on(n.nextSibling),n===null))return null;return n}function ry(n,i){for(;n.nodeType!==8;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!i||(n=on(n.nextSibling),n===null))return null;return n}function Zd(n){return n.data==="$?"||n.data==="$~"}function Wd(n){return n.data==="$!"||n.data==="$?"&&n.ownerDocument.readyState!=="loading"}function hE(n,i){var a=n.ownerDocument;if(n.data==="$~")n._reactRetry=i;else if(n.data!=="$?"||a.readyState!=="loading")i();else{var l=function(){i(),a.removeEventListener("DOMContentLoaded",l)};a.addEventListener("DOMContentLoaded",l),n._reactRetry=l}}function on(n){for(;n!=null;n=n.nextSibling){var i=n.nodeType;if(i===1||i===3)break;if(i===8){if(i=n.data,i==="$"||i==="$!"||i==="$?"||i==="$~"||i==="&"||i==="F!"||i==="F")break;if(i==="/$"||i==="/&")return null}}return n}var eh=null;function iy(n){n=n.nextSibling;for(var i=0;n;){if(n.nodeType===8){var a=n.data;if(a==="/$"||a==="/&"){if(i===0)return on(n.nextSibling);i--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||i++}n=n.nextSibling}return null}function sy(n){n=n.previousSibling;for(var i=0;n;){if(n.nodeType===8){var a=n.data;if(a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"){if(i===0)return n;i--}else a!=="/$"&&a!=="/&"||i++}n=n.previousSibling}return null}function ay(n,i,a){switch(i=xl(a),n){case"html":if(n=i.documentElement,!n)throw Error(s(452));return n;case"head":if(n=i.head,!n)throw Error(s(453));return n;case"body":if(n=i.body,!n)throw Error(s(454));return n;default:throw Error(s(451))}}function Ua(n){for(var i=n.attributes;i.length;)n.removeAttributeNode(i[0]);nu(n)}var ln=new Map,oy=new Set;function jl(n){return typeof n.getRootNode=="function"?n.getRootNode():n.nodeType===9?n:n.ownerDocument}var ir=Q.d;Q.d={f:fE,r:pE,D:mE,C:gE,L:yE,m:vE,X:_E,S:bE,M:wE};function fE(){var n=ir.f(),i=Sl();return n||i}function pE(n){var i=Vi(n);i!==null&&i.tag===5&&i.type==="form"?Am(i):ir.r(n)}var Ss=typeof document>"u"?null:document;function ly(n,i,a){var l=Ss;if(l&&typeof i=="string"&&i){var h=Wt(i);h='link[rel="'+n+'"][href="'+h+'"]',typeof a=="string"&&(h+='[crossorigin="'+a+'"]'),oy.has(h)||(oy.add(h),n={rel:n,crossOrigin:a,href:i},l.querySelector(h)===null&&(i=l.createElement("link"),bt(i,"link",n),ht(i),l.head.appendChild(i)))}}function mE(n){ir.D(n),ly("dns-prefetch",n,null)}function gE(n,i){ir.C(n,i),ly("preconnect",n,i)}function yE(n,i,a){ir.L(n,i,a);var l=Ss;if(l&&n&&i){var h='link[rel="preload"][as="'+Wt(i)+'"]';i==="image"&&a&&a.imageSrcSet?(h+='[imagesrcset="'+Wt(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(h+='[imagesizes="'+Wt(a.imageSizes)+'"]')):h+='[href="'+Wt(n)+'"]';var p=h;switch(i){case"style":p=Es(n);break;case"script":p=As(n)}ln.has(p)||(n=g({rel:"preload",href:i==="image"&&a&&a.imageSrcSet?void 0:n,as:i},a),ln.set(p,n),l.querySelector(h)!==null||i==="style"&&l.querySelector(za(p))||i==="script"&&l.querySelector(Ia(p))||(i=l.createElement("link"),bt(i,"link",n),ht(i),l.head.appendChild(i)))}}function vE(n,i){ir.m(n,i);var a=Ss;if(a&&n){var l=i&&typeof i.as=="string"?i.as:"script",h='link[rel="modulepreload"][as="'+Wt(l)+'"][href="'+Wt(n)+'"]',p=h;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":p=As(n)}if(!ln.has(p)&&(n=g({rel:"modulepreload",href:n},i),ln.set(p,n),a.querySelector(h)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(Ia(p)))return}l=a.createElement("link"),bt(l,"link",n),ht(l),a.head.appendChild(l)}}}function bE(n,i,a){ir.S(n,i,a);var l=Ss;if(l&&n){var h=Gi(l).hoistableStyles,p=Es(n);i=i||"default";var v=h.get(p);if(!v){var E={loading:0,preload:null};if(v=l.querySelector(za(p)))E.loading=5;else{n=g({rel:"stylesheet",href:n,"data-precedence":i},a),(a=ln.get(p))&&th(n,a);var R=v=l.createElement("link");ht(R),bt(R,"link",n),R._p=new Promise(function(D,H){R.onload=D,R.onerror=H}),R.addEventListener("load",function(){E.loading|=1}),R.addEventListener("error",function(){E.loading|=2}),E.loading|=4,Nl(v,i,l)}v={type:"stylesheet",instance:v,count:1,state:E},h.set(p,v)}}}function _E(n,i){ir.X(n,i);var a=Ss;if(a&&n){var l=Gi(a).hoistableScripts,h=As(n),p=l.get(h);p||(p=a.querySelector(Ia(h)),p||(n=g({src:n,async:!0},i),(i=ln.get(h))&&nh(n,i),p=a.createElement("script"),ht(p),bt(p,"link",n),a.head.appendChild(p)),p={type:"script",instance:p,count:1,state:null},l.set(h,p))}}function wE(n,i){ir.M(n,i);var a=Ss;if(a&&n){var l=Gi(a).hoistableScripts,h=As(n),p=l.get(h);p||(p=a.querySelector(Ia(h)),p||(n=g({src:n,async:!0,type:"module"},i),(i=ln.get(h))&&nh(n,i),p=a.createElement("script"),ht(p),bt(p,"link",n),a.head.appendChild(p)),p={type:"script",instance:p,count:1,state:null},l.set(h,p))}}function cy(n,i,a,l){var h=(h=ce.current)?jl(h):null;if(!h)throw Error(s(446));switch(n){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(i=Es(a.href),a=Gi(h).hoistableStyles,l=a.get(i),l||(l={type:"style",instance:null,count:0,state:null},a.set(i,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){n=Es(a.href);var p=Gi(h).hoistableStyles,v=p.get(n);if(v||(h=h.ownerDocument||h,v={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},p.set(n,v),(p=h.querySelector(za(n)))&&!p._p&&(v.instance=p,v.state.loading=5),ln.has(n)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},ln.set(n,a),p||SE(h,n,a,v.state))),i&&l===null)throw Error(s(528,""));return v}if(i&&l!==null)throw Error(s(529,""));return null;case"script":return i=a.async,a=a.src,typeof a=="string"&&i&&typeof i!="function"&&typeof i!="symbol"?(i=As(a),a=Gi(h).hoistableScripts,l=a.get(i),l||(l={type:"script",instance:null,count:0,state:null},a.set(i,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(s(444,n))}}function Es(n){return'href="'+Wt(n)+'"'}function za(n){return'link[rel="stylesheet"]['+n+"]"}function uy(n){return g({},n,{"data-precedence":n.precedence,precedence:null})}function SE(n,i,a,l){n.querySelector('link[rel="preload"][as="style"]['+i+"]")?l.loading=1:(i=n.createElement("link"),l.preload=i,i.addEventListener("load",function(){return l.loading|=1}),i.addEventListener("error",function(){return l.loading|=2}),bt(i,"link",a),ht(i),n.head.appendChild(i))}function As(n){return'[src="'+Wt(n)+'"]'}function Ia(n){return"script[async]"+n}function dy(n,i,a){if(i.count++,i.instance===null)switch(i.type){case"style":var l=n.querySelector('style[data-href~="'+Wt(a.href)+'"]');if(l)return i.instance=l,ht(l),l;var h=g({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return l=(n.ownerDocument||n).createElement("style"),ht(l),bt(l,"style",h),Nl(l,a.precedence,n),i.instance=l;case"stylesheet":h=Es(a.href);var p=n.querySelector(za(h));if(p)return i.state.loading|=4,i.instance=p,ht(p),p;l=uy(a),(h=ln.get(h))&&th(l,h),p=(n.ownerDocument||n).createElement("link"),ht(p);var v=p;return v._p=new Promise(function(E,R){v.onload=E,v.onerror=R}),bt(p,"link",l),i.state.loading|=4,Nl(p,a.precedence,n),i.instance=p;case"script":return p=As(a.src),(h=n.querySelector(Ia(p)))?(i.instance=h,ht(h),h):(l=a,(h=ln.get(p))&&(l=g({},a),nh(l,h)),n=n.ownerDocument||n,h=n.createElement("script"),ht(h),bt(h,"link",l),n.head.appendChild(h),i.instance=h);case"void":return null;default:throw Error(s(443,i.type))}else i.type==="stylesheet"&&(i.state.loading&4)===0&&(l=i.instance,i.state.loading|=4,Nl(l,a.precedence,n));return i.instance}function Nl(n,i,a){for(var l=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),h=l.length?l[l.length-1]:null,p=h,v=0;v<l.length;v++){var E=l[v];if(E.dataset.precedence===i)p=E;else if(p!==h)break}p?p.parentNode.insertBefore(n,p.nextSibling):(i=a.nodeType===9?a.head:a,i.insertBefore(n,i.firstChild))}function th(n,i){n.crossOrigin==null&&(n.crossOrigin=i.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=i.referrerPolicy),n.title==null&&(n.title=i.title)}function nh(n,i){n.crossOrigin==null&&(n.crossOrigin=i.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=i.referrerPolicy),n.integrity==null&&(n.integrity=i.integrity)}var Ml=null;function hy(n,i,a){if(Ml===null){var l=new Map,h=Ml=new Map;h.set(a,l)}else h=Ml,l=h.get(a),l||(l=new Map,h.set(a,l));if(l.has(n))return l;for(l.set(n,null),a=a.getElementsByTagName(n),h=0;h<a.length;h++){var p=a[h];if(!(p[ea]||p[mt]||n==="link"&&p.getAttribute("rel")==="stylesheet")&&p.namespaceURI!=="http://www.w3.org/2000/svg"){var v=p.getAttribute(i)||"";v=n+v;var E=l.get(v);E?E.push(p):l.set(v,[p])}}return l}function fy(n,i,a){n=n.ownerDocument||n,n.head.insertBefore(a,i==="title"?n.querySelector("head > title"):null)}function EE(n,i,a){if(a===1||i.itemProp!=null)return!1;switch(n){case"meta":case"title":return!0;case"style":if(typeof i.precedence!="string"||typeof i.href!="string"||i.href==="")break;return!0;case"link":if(typeof i.rel!="string"||typeof i.href!="string"||i.href===""||i.onLoad||i.onError)break;return i.rel==="stylesheet"?(n=i.disabled,typeof i.precedence=="string"&&n==null):!0;case"script":if(i.async&&typeof i.async!="function"&&typeof i.async!="symbol"&&!i.onLoad&&!i.onError&&i.src&&typeof i.src=="string")return!0}return!1}function py(n){return!(n.type==="stylesheet"&&(n.state.loading&3)===0)}function AE(n,i,a,l){if(a.type==="stylesheet"&&(typeof l.media!="string"||matchMedia(l.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var h=Es(l.href),p=i.querySelector(za(h));if(p){i=p._p,i!==null&&typeof i=="object"&&typeof i.then=="function"&&(n.count++,n=Dl.bind(n),i.then(n,n)),a.state.loading|=4,a.instance=p,ht(p);return}p=i.ownerDocument||i,l=uy(l),(h=ln.get(h))&&th(l,h),p=p.createElement("link"),ht(p);var v=p;v._p=new Promise(function(E,R){v.onload=E,v.onerror=R}),bt(p,"link",l),a.instance=p}n.stylesheets===null&&(n.stylesheets=new Map),n.stylesheets.set(a,i),(i=a.state.preload)&&(a.state.loading&3)===0&&(n.count++,a=Dl.bind(n),i.addEventListener("load",a),i.addEventListener("error",a))}}var rh=0;function TE(n,i){return n.stylesheets&&n.count===0&&Ul(n,n.stylesheets),0<n.count||0<n.imgCount?function(a){var l=setTimeout(function(){if(n.stylesheets&&Ul(n,n.stylesheets),n.unsuspend){var p=n.unsuspend;n.unsuspend=null,p()}},6e4+i);0<n.imgBytes&&rh===0&&(rh=62500*sE());var h=setTimeout(function(){if(n.waitingForImages=!1,n.count===0&&(n.stylesheets&&Ul(n,n.stylesheets),n.unsuspend)){var p=n.unsuspend;n.unsuspend=null,p()}},(n.imgBytes>rh?50:800)+i);return n.unsuspend=a,function(){n.unsuspend=null,clearTimeout(l),clearTimeout(h)}}:null}function Dl(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Ul(this,this.stylesheets);else if(this.unsuspend){var n=this.unsuspend;this.unsuspend=null,n()}}}var Ll=null;function Ul(n,i){n.stylesheets=null,n.unsuspend!==null&&(n.count++,Ll=new Map,i.forEach(RE,n),Ll=null,Dl.call(n))}function RE(n,i){if(!(i.state.loading&4)){var a=Ll.get(n);if(a)var l=a.get(null);else{a=new Map,Ll.set(n,a);for(var h=n.querySelectorAll("link[data-precedence],style[data-precedence]"),p=0;p<h.length;p++){var v=h[p];(v.nodeName==="LINK"||v.getAttribute("media")!=="not all")&&(a.set(v.dataset.precedence,v),l=v)}l&&a.set(null,l)}h=i.instance,v=h.getAttribute("data-precedence"),p=a.get(v)||l,p===l&&a.set(null,h),a.set(v,h),this.count++,l=Dl.bind(this),h.addEventListener("load",l),h.addEventListener("error",l),p?p.parentNode.insertBefore(h,p.nextSibling):(n=n.nodeType===9?n.head:n,n.insertBefore(h,n.firstChild)),i.state.loading|=4}}var Pa={$$typeof:x,Provider:null,Consumer:null,_currentValue:he,_currentValue2:he,_threadCount:0};function OE(n,i,a,l,h,p,v,E,R){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=Zc(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Zc(0),this.hiddenUpdates=Zc(null),this.identifierPrefix=l,this.onUncaughtError=h,this.onCaughtError=p,this.onRecoverableError=v,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=R,this.incompleteTransitions=new Map}function my(n,i,a,l,h,p,v,E,R,D,H,Y){return n=new OE(n,i,a,v,R,D,H,Y,E),i=1,p===!0&&(i|=24),p=Vt(3,null,null,i),n.current=p,p.stateNode=n,i=Uu(),i.refCount++,n.pooledCache=i,i.refCount++,p.memoizedState={element:l,isDehydrated:a,cache:i},Bu(p),n}function gy(n){return n?(n=ts,n):ts}function yy(n,i,a,l,h,p){h=gy(h),l.context===null?l.context=h:l.pendingContext=h,l=kr(i),l.payload={element:a},p=p===void 0?null:p,p!==null&&(l.callback=p),a=xr(n,l,i),a!==null&&(Ut(a,n,i),ya(a,n,i))}function vy(n,i){if(n=n.memoizedState,n!==null&&n.dehydrated!==null){var a=n.retryLane;n.retryLane=a!==0&&a<i?a:i}}function ih(n,i){vy(n,i),(n=n.alternate)&&vy(n,i)}function by(n){if(n.tag===13||n.tag===31){var i=fi(n,67108864);i!==null&&Ut(i,n,67108864),ih(n,67108864)}}function _y(n){if(n.tag===13||n.tag===31){var i=Jt();i=Wc(i);var a=fi(n,i);a!==null&&Ut(a,n,i),ih(n,i)}}var zl=!0;function CE(n,i,a,l){var h=P.T;P.T=null;var p=Q.p;try{Q.p=2,sh(n,i,a,l)}finally{Q.p=p,P.T=h}}function kE(n,i,a,l){var h=P.T;P.T=null;var p=Q.p;try{Q.p=8,sh(n,i,a,l)}finally{Q.p=p,P.T=h}}function sh(n,i,a,l){if(zl){var h=ah(l);if(h===null)Gd(n,i,l,Il,a),Sy(n,l);else if(jE(h,n,i,a,l))l.stopPropagation();else if(Sy(n,l),i&4&&-1<xE.indexOf(n)){for(;h!==null;){var p=Vi(h);if(p!==null)switch(p.tag){case 3:if(p=p.stateNode,p.current.memoizedState.isDehydrated){var v=li(p.pendingLanes);if(v!==0){var E=p;for(E.pendingLanes|=2,E.entangledLanes|=2;v;){var R=1<<31-Ht(v);E.entanglements[1]|=R,v&=~R}On(p),(Me&6)===0&&(_l=wt()+500,Ma(0))}}break;case 31:case 13:E=fi(p,2),E!==null&&Ut(E,p,2),Sl(),ih(p,2)}if(p=ah(l),p===null&&Gd(n,i,l,Il,a),p===h)break;h=p}h!==null&&l.stopPropagation()}else Gd(n,i,l,null,a)}}function ah(n){return n=lu(n),oh(n)}var Il=null;function oh(n){if(Il=null,n=qi(n),n!==null){var i=c(n);if(i===null)n=null;else{var a=i.tag;if(a===13){if(n=u(i),n!==null)return n;n=null}else if(a===31){if(n=d(i),n!==null)return n;n=null}else if(a===3){if(i.stateNode.current.memoizedState.isDehydrated)return i.tag===3?i.stateNode.containerInfo:null;n=null}else i!==n&&(n=null)}}return Il=n,null}function wy(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(ot()){case lt:return 2;case Bt:return 8;case Bn:case gw:return 32;case jf:return 268435456;default:return 32}default:return 32}}var lh=!1,$r=null,Hr=null,qr=null,Ba=new Map,$a=new Map,Vr=[],xE="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 Sy(n,i){switch(n){case"focusin":case"focusout":$r=null;break;case"dragenter":case"dragleave":Hr=null;break;case"mouseover":case"mouseout":qr=null;break;case"pointerover":case"pointerout":Ba.delete(i.pointerId);break;case"gotpointercapture":case"lostpointercapture":$a.delete(i.pointerId)}}function Ha(n,i,a,l,h,p){return n===null||n.nativeEvent!==p?(n={blockedOn:i,domEventName:a,eventSystemFlags:l,nativeEvent:p,targetContainers:[h]},i!==null&&(i=Vi(i),i!==null&&by(i)),n):(n.eventSystemFlags|=l,i=n.targetContainers,h!==null&&i.indexOf(h)===-1&&i.push(h),n)}function jE(n,i,a,l,h){switch(i){case"focusin":return $r=Ha($r,n,i,a,l,h),!0;case"dragenter":return Hr=Ha(Hr,n,i,a,l,h),!0;case"mouseover":return qr=Ha(qr,n,i,a,l,h),!0;case"pointerover":var p=h.pointerId;return Ba.set(p,Ha(Ba.get(p)||null,n,i,a,l,h)),!0;case"gotpointercapture":return p=h.pointerId,$a.set(p,Ha($a.get(p)||null,n,i,a,l,h)),!0}return!1}function Ey(n){var i=qi(n.target);if(i!==null){var a=c(i);if(a!==null){if(i=a.tag,i===13){if(i=u(a),i!==null){n.blockedOn=i,zf(n.priority,function(){_y(a)});return}}else if(i===31){if(i=d(a),i!==null){n.blockedOn=i,zf(n.priority,function(){_y(a)});return}}else if(i===3&&a.stateNode.current.memoizedState.isDehydrated){n.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}n.blockedOn=null}function Pl(n){if(n.blockedOn!==null)return!1;for(var i=n.targetContainers;0<i.length;){var a=ah(n.nativeEvent);if(a===null){a=n.nativeEvent;var l=new a.constructor(a.type,a);ou=l,a.target.dispatchEvent(l),ou=null}else return i=Vi(a),i!==null&&by(i),n.blockedOn=a,!1;i.shift()}return!0}function Ay(n,i,a){Pl(n)&&a.delete(i)}function NE(){lh=!1,$r!==null&&Pl($r)&&($r=null),Hr!==null&&Pl(Hr)&&(Hr=null),qr!==null&&Pl(qr)&&(qr=null),Ba.forEac
10h(Ay),$a.forEach(Ay)}function Bl(n,i){n.blockedOn===i&&(n.blockedOn=null,lh||(lh=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,NE)))}var $l=null;function Ty(n){$l!==n&&($l=n,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){$l===n&&($l=null);for(var i=0;i<n.length;i+=3){var a=n[i],l=n[i+1],h=n[i+2];if(typeof l!="function"){if(oh(l||a)===null)continue;break}var p=Vi(a);p!==null&&(n.splice(i,3),i-=3,ad(p,{pending:!0,data:h,method:a.method,action:l},l,h))}}))}function Ts(n){function i(R){return Bl(R,n)}$r!==null&&Bl($r,n),Hr!==null&&Bl(Hr,n),qr!==null&&Bl(qr,n),Ba.forEach(i),$a.forEach(i);for(var a=0;a<Vr.length;a++){var l=Vr[a];l.blockedOn===n&&(l.blockedOn=null)}for(;0<Vr.length&&(a=Vr[0],a.blockedOn===null);)Ey(a),a.blockedOn===null&&Vr.shift();if(a=(n.ownerDocument||n).$$reactFormReplay,a!=null)for(l=0;l<a.length;l+=3){var h=a[l],p=a[l+1],v=h[xt]||null;if(typeof p=="function")v||Ty(a);else if(v){var E=null;if(p&&p.hasAttribute("formAction")){if(h=p,v=p[xt]||null)E=v.formAction;else if(oh(h)!==null)continue}else E=v.action;typeof E=="function"?a[l+1]=E:(a.splice(l,3),l-=3),Ty(a)}}}function Ry(){function n(p){p.canIntercept&&p.info==="react-transition"&&p.intercept({handler:function(){return new Promise(function(v){return h=v})},focusReset:"manual",scroll:"manual"})}function i(){h!==null&&(h(),h=null),l||setTimeout(a,20)}function a(){if(!l&&!navigation.transition){var p=navigation.currentEntry;p&&p.url!=null&&navigation.navigate(p.url,{state:p.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var l=!1,h=null;return navigation.addEventListener("navigate",n),navigation.addEventListener("navigatesuccess",i),navigation.addEventListener("navigateerror",i),setTimeout(a,100),function(){l=!0,navigation.removeEventListener("navigate",n),navigation.removeEventListener("navigatesuccess",i),navigation.removeEventListener("navigateerror",i),h!==null&&(h(),h=null)}}}function ch(n){this._internalRoot=n}Hl.prototype.render=ch.prototype.render=function(n){var i=this._internalRoot;if(i===null)throw Error(s(409));var a=i.current,l=Jt();yy(a,l,n,i,null,null)},Hl.prototype.unmount=ch.prototype.unmount=function(){var n=this._internalRoot;if(n!==null){this._internalRoot=null;var i=n.containerInfo;yy(n.current,2,null,n,null,null),Sl(),i[Hi]=null}};function Hl(n){this._internalRoot=n}Hl.prototype.unstable_scheduleHydration=function(n){if(n){var i=Uf();n={blockedOn:null,target:n,priority:i};for(var a=0;a<Vr.length&&i!==0&&i<Vr[a].priority;a++);Vr.splice(a,0,n),a===0&&Ey(n)}};var Oy=t.version;if(Oy!=="19.2.5")throw Error(s(527,Oy,"19.2.5"));Q.findDOMNode=function(n){var i=n._reactInternals;if(i===void 0)throw typeof n.render=="function"?Error(s(188)):(n=Object.keys(n).join(","),Error(s(268,n)));return n=m(i),n=n!==null?y(n):null,n=n===null?null:n.stateNode,n};var ME={bundleType:0,version:"19.2.5",rendererPackageName:"react-dom",currentDispatcherRef:P,reconcilerVersion:"19.2.5"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var ql=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ql.isDisabled&&ql.supportsFiber)try{Xs=ql.inject(ME),$t=ql}catch{}}return Va.createRoot=function(n,i){if(!o(n))throw Error(s(299));var a=!1,l="",h=Dm,p=Lm,v=Um;return i!=null&&(i.unstable_strictMode===!0&&(a=!0),i.identifierPrefix!==void 0&&(l=i.identifierPrefix),i.onUncaughtError!==void 0&&(h=i.onUncaughtError),i.onCaughtError!==void 0&&(p=i.onCaughtError),i.onRecoverableError!==void 0&&(v=i.onRecoverableError)),i=my(n,1,!1,null,null,a,l,null,h,p,v,Ry),n[Hi]=i.current,Vd(n),new ch(i)},Va.hydrateRoot=function(n,i,a){if(!o(n))throw Error(s(299));var l=!1,h="",p=Dm,v=Lm,E=Um,R=null;return a!=null&&(a.unstable_strictMode===!0&&(l=!0),a.identifierPrefix!==void 0&&(h=a.identifierPrefix),a.onUncaughtError!==void 0&&(p=a.onUncaughtError),a.onCaughtError!==void 0&&(v=a.onCaughtError),a.onRecoverableError!==void 0&&(E=a.onRecoverableError),a.formState!==void 0&&(R=a.formState)),i=my(n,1,!0,i,a??null,l,h,R,p,v,E,Ry),i.context=gy(null),a=i.current,l=Jt(),l=Wc(l),h=kr(l),h.callback=null,xr(a,h,l),a=l,i.current.lanes=a,Ws(i,a),On(i),n[Hi]=i.current,Vd(n),new Hl(i)},Va.version="19.2.5",Va}var zy;function qE(){if(zy)return hh.exports;zy=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(),hh.exports=HE(),hh.exports}var VE=qE(),GE="__TSS_CONTEXT",Uh=Symbol.for("TSS_SERVER_FUNCTION"),Iy=Symbol.for("TSS_SERVER_FUNCTION_FACTORY"),YE="application/x-tss-framed",sr={JSON:0,CHUNK:1,END:2,ERROR:3},FE=/;\s*v=(\d+)/;function KE(e){const t=e.match(FE);return t?parseInt(t[1],10):void 0}function JE(e){const t=KE(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 uf=()=>window.__TSS_START_OPTIONS__;const QE=!1;function io(e){return e[e.length-1]}function XE(e){return typeof e=="function"}function Vs(e,t){return XE(e)?e(t):e}const z0=Object.prototype.hasOwnProperty,Py=Object.prototype.propertyIsEnumerable;function I0(e){for(const t in e)if(z0.call(e,t))return!0;return!1}const ZE=()=>Object.create(null),Ri=(e,t)=>Ni(e,t,ZE);function Ni(e,t,r=()=>({}),s=0){if(e===t)return e;if(s>500)return t;const o=t,c=Hy(e)&&Hy(o);
10if(!c&&!(gc(e)&&gc(o)))return o;const u=c?e:By(e);if(!u)return o;const d=c?o:By(o);if(!d)return o;const f=u.length,m=d.length,y=c?new Array(m):r();let g=0;for(let b=0;b<m;b++){const _=c?b:d[b],S=e[_],w=o[_];if(S===w){y[_]=S,(c?b<f:z0.call(e,_))&&g++;continue}if(S===null||w===null||typeof S!="object"||typeof w!="object"){y[_]=w;continue}const A=Ni(S,w,r,s+1);y[_]=A,A===S&&g++}return f===m&&g===f?e:y}function By(e){const t=Object.getOwnPropertyNames(e);for(const o of t)if(!Py.call(e,o))return!1;const r=Object.getOwnPropertySymbols(e);if(r.length===0)return t;const s=t;for(const o of r){if(!Py.call(e,o))return!1;s.push(o)}return s}function gc(e){if(!$y(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const r=t.prototype;return!(!$y(r)||!r.hasOwnProperty("isPrototypeOf"))}function $y(e){return Object.prototype.toString.call(e)==="[object Object]"}function Hy(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Mn(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 s=0,o=e.length;s<o;s++)if(!Mn(e[s],t[s],r))return!1;return!0}if(gc(e)&&gc(t)){const s=r?.ignoreUndefined??!0;if(r?.partial){for(const u in t)if((!s||t[u]!==void 0)&&!Mn(e[u],t[u],r))return!1;return!0}let o=0;if(!s)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((!s||t[u]!==void 0)&&(c++,c>o||!Mn(e[u],t[u],r)))return!1;return o===c}return!1}function WE(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")}const eA=/[\x00-\x1f\x7f"<>`{}]/g;function tA(e){return e.replace(eA,t=>"%"+t.charCodeAt(0).toString(16).toUpperCase().padStart(2,"0"))}function qy(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 tA(t)}const nA=["http:","https:","mailto:","tel:"];function yc(e,t){if(!e)return!1;try{const r=new URL(e);return!t.has(r.protocol)}catch{return!1}}const rA={"&":"\\u0026",">":"\\u003e","<":"\\u003c","\u2028":"\\u2028","\u2029":"\\u2029"},iA=/[&><\u2028\u2029]/g;function sA(e){return e.replace(iA,t=>rA[t])}function Ga(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,s="",o;for(;(o=t.exec(e))!==null;)s+=qy(e.slice(r,o.index))+o[0],r=t.lastIndex;s=s+qy(r?e.slice(r):e);let c=!1;return s.startsWith("//")&&(c=!0,s="/"+s.replace(/^\/+/,"")),{path:s,handledProtocolRelativeURL:c}}function aA(e){return/\s|[^\u0000-\u007F]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function oA(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 so(){throw new Error("Invariant failed")}function vc(e){const t=new Map;let r,s;const o=c=>{c.next&&(c.prev?(c.prev.next=c.next,c.next.prev=c.prev,c.next=void 0,s&&(s.next=c,c.prev=s)):(c.next.prev=void 0,r=c.next,c.next=void 0,s&&(c.prev=s,s.next=c)),s=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 f=r;t.delete(f.key),f.next&&(r=f.next,f.next.prev=void 0),f===s&&(s=void 0)}const d=t.get(c);if(d)d.value=u,o(d);else{const f={key:c,value:u,prev:s};s&&(s.next=f),s=f,r||(r=f),t.set(c,f)}},clear(){t.clear(),r=void 0,s=void 0}}}const Zr=4,P0=5;function lA(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 B0(e,t,r=new Uint16Array(6)){const s=e.indexOf("/",t),o=s===-1?e.length:s,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 d=e.length;return r[0]=2,r[1]=t,r[2]=t,r[3]=d,r[4]=d,r[5]=d,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=lA(c);if(u){const[d,f]=u,m=c.charCodeAt(d+1);if(m===45){if(d+2<c.length&&c.charCodeAt(d+2)===36){const y=d+3,g=f;if(y<g)return r[0]=3,r[1]=t+d,r[2]=t+y,r[3]=t+g,r[4]=t+f+1,r[5]=o,r}}else if(m===36){const y=d+1,g=d+2;return g===f?(r[0]=2,r[1]=t+d,r[2]=t+y,r[3]=t+g,r[4]=t+f+1,r[5]=e.length,r):(r[0]=1,r[1]=t+d,r[2]=t+g,r[3]=t+f,r[4]=t+f+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 Lc(e,t,r,s,o,c,u,d){d?.(r);let f=s;{const m=r.fullPath??r.from,y=r.options,g=m.length,b=y?.caseSensitive??e,_=y?.params?.parse??y?.parseParams;for(;f<g;){const w=B0(m,f,t);let A;const T=f,k=w[5];f=k+1,c++;const x=w[0];switch(x){case 0:{const z=m.substring(w[2],w[3]);let F=z,U;b?U=o.static??=new Map:(F=z.toLowerCase(),U=o.staticInsensitive??=new Map);const N=U.get(F);if(N)A=N;else{const I=zs(m);I.parent=o,I.depth=c,A=I,U.set(F,I)}break}case 1:case 3:case 2:{const z=m.substring(T,w[1]),F=m.substring(w[4],k),U=b&&!!(z||F),N=z?U?z:z.toLowerCase():void 0,I=F?U?F:F.toLowerCase():void 0,K=x===1?o.dynamic:x===3?o.optional:o.wildcard,ue=x!==2&&!_&&K?.find(G=>!G.parse&&G.caseSensitive===U&&G.prefix===N&&G.suffix===I);if(ue)A=ue;else{const G=cA(x,m,U,N,I);A=G,G.parent=o,G.depth=c;let J;x===1?J=o.dynamic??=[]:x===3?J=o.optional??=[]:J=o.wildcard??=[],J.push(G),J.length===2&&u?.push(J)}break}}o=A}
10if(_&&r.children&&!r.isRoot&&r.id&&r.id.charCodeAt(r.id.lastIndexOf("/")+1)===95){const w=zs(m);w.kind=P0,w.parent=o,c++,w.depth=c,o.pathless??=[],o.pathless.push(w),o=w}const S=(r.path||!r.children)&&!r.isRoot;if(S&&m.endsWith("/")){const w=zs(m);w.kind=Zr,w.parent=o,c++,w.depth=c,o.index=w,o=w}o.parse=_??null,o.priority=y?.params?.priority??0,S&&!o.route&&(o.route=r,o.fullPath=m)}if(r.children)for(const m of r.children)Lc(e,t,m,f,o,c,u,d)}function $0(e,t){if(e.parse&&!t.parse)return-1;if(!e.parse&&t.parse)return 1;if(e.parse&&t.parse&&(e.priority||t.priority))return t.priority-e.priority;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 zs(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,priority:0}}function cA(e,t,r,s,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,priority:0,caseSensitive:r,prefix:s,suffix:o}}function uA(e,t){const r=zs("/"),s=new Uint16Array(6),o=[];for(const c of e)Lc(!1,s,c,1,r,0,o);for(const c of o)c.sort($0);t.masksTree=r,t.flatCache=vc(1e3)}function dA(e,t){e||="/";const r=t.flatCache.get(e);if(r)return r;const s=df(e,t.masksTree);return t.flatCache.set(e,s),s}function hA(e,t,r,s,o){e||="/",s||="/";const c=t?`case\0${e}`:e;let u=o.singleCache.get(c);return u||(u=zs("/"),Lc(t,new Uint16Array(6),{from:e},1,u,0),o.singleCache.set(c,u)),df(s,u,r)}function fA(e,t,r=!1){const s=r?e:`nofuzz\0${e}`,o=t.matchCache.get(s);if(o!==void 0)return o;e||="/";let c;try{c=df(e,t.segmentTree,r)}catch(u){if(u instanceof URIError)c=null;else throw u}return c&&(c.branch=q0(c.route)),t.matchCache.set(s,c),c}function pA(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function mA(e,t=!1,r){const s=zs(e.fullPath),o=new Uint16Array(6),c=[],u={},d={};let f=0;Lc(t,o,e,1,s,0,c,m=>{if(r?.(m,f),m.id in u&&so(),u[m.id]=m,f!==0&&m.path){const y=pA(m.fullPath);(!d[y]||m.fullPath.endsWith("/"))&&(d[y]=m)}f++});for(const m of c)m.sort($0);return{processedTree:{segmentTree:s,singleCache:vc(1e3),matchCache:vc(1e3),flatCache:null,masksTree:null},routesById:u,routesByPath:d}}function df(e,t,r=!1){const s=e.split("/"),o=yA(e,s,t,r);if(!o)return null;const[c]=H0(e,s,o);return{route:o.node.route,rawParams:c}}function H0(e,t,r){const s=gA(r.node);let o=null;const c=Object.create(null);let u=r.extract?.part??0,d=r.extract?.node??0,f=r.extract?.path??0,m=r.extract?.segment??0;for(;d<s.length;u++,d++,f++,m++){const y=s[d];if(y.kind===Zr)break;if(y.kind===P0){m--,u--,f--;continue}const g=t[u],b=f;if(g&&(f+=g.length),y.kind===1){o??=r.node.fullPath.split("/");const _=o[m],S=y.prefix?.length??0;if(_.charCodeAt(S)===123){const w=y.suffix?.length??0,A=_.substring(S+2,_.length-w-1),T=g.substring(S,g.length-w);c[A]=decodeURIComponent(T)}else{const w=_.substring(1);c[w]=decodeURIComponent(g)}}else if(y.kind===3){if(r.skipped&1<<d){u--,f=b-1;continue}o??=r.node.fullPath.split("/");const _=o[m],S=y.prefix?.length??0,w=y.suffix?.length??0,A=_.substring(S+3,_.length-w-1),T=y.suffix||y.prefix?g.substring(S,g.length-w):g;T&&(c[A]=decodeURIComponent(T))}else if(y.kind===2){const _=y,S=e.substring(b+(_.prefix?.length??0),e.length-(_.suffix?.length??0)),w=decodeURIComponent(S);c["*"]=w,c._splat=w;break}}return r.rawParams&&Object.assign(c,r.rawParams),[c,{part:u,node:d,path:f,segment:m}]}function q0(e){const t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function gA(e){const t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function yA(e,t,r,s){if(e==="/"&&r.index)return{node:r.index,skipped:0};const o=!io(t),c=o&&e!=="/",u=t.length-(o?1:0),d=[{node:r,index:1,skipped:0,statics:0,dynamics:0,optionals:0}];let f=null,m=null;for(;d.length;){const y=d.pop(),{node:g,index:b,skipped:_,statics:S,dynamics:w,optionals:A}=y;let{extract:T,rawParams:k}=y;if(g.kind===2&&g.route&&!Gl(m,y))continue;if(g.parse){if(!Vy(e,t,y))continue;k=y.rawParams,T=y.extract}s&&g.route&&g.kind!==Zr&&Gl(f,y)&&(f=y);const x=b===u;if(x&&(g.route&&(!c||g.kind===Zr||g.kind===2)&&Gl(m,y)&&(m=y),!g.optional&&!g.wildcard&&!g.index&&!g.pathless))continue;const z=x?void 0:t[b];let F;if(x&&g.index){const U={node:g.index,index:b,skipped:_,statics:S,dynamics:w,optionals:A,extract:T,rawParams:k};let N=!0;if(g.index.parse&&(Vy(e,t,U)||(N=!1)),N){if(!w&&!A&&!_&&vA(S,u))return U;Gl(m,U)&&(m=U)}}if(g.wildcard)for(let U=g.wildcard.length-1;U>=0;U--){const N=g.wildcard[U],{prefix:I,suffix:K}=N;if(!(I&&(x||!(N.caseSensitive?z:F??=z.toLowerCase()).startsWith(I)))){if(K){if(x)continue;const ue=t.slice(b).join("/").slice(-K.length);if((N.caseSensitive?ue:ue.toLowerCase())!==K)continue}d.push({node:N,index:u,skipped:_,statics:S,dynamics:w,optionals:A,extract:T,rawParams:k})}}if(g.optional){const U=_|1<<g.depth+1;for(let N=g.optional.length-1;N>=0;N--){const I=g.optional[N];d.push({node:I,index:b,skipped:U,statics:S,dynamics:w,optionals:A,extract:T,rawParams:k})}if(!x)for(let N=g.optional.length-1;N>=0;N--){const I=g.optional[N],{prefix:K,suffix:ue}=I;if(K||ue){const G=I.caseSensitive?z:F??=z.toLowerCase();if(K&&!G.startsWith(K)||ue&&!G.endsWith(ue))continue}d.push({node:I,index:b+1,skipped:_,statics:S,dynamics:w,optionals:A+Vl(u,b),extract:T,rawParams:k})}}if(!x&&g.dynamic&&z)for(let U=g.dynamic.length-1;U>=0;U--){const N=g.dynamic[U],{prefix:I,suffix:K}=N;if(I||K){const ue=N.caseSensitive?z:F??=z.toLowerCase();if(I&&!ue.startsWith(I)||K&&!ue.endsWith(K))continue}d.push({node:N,index:b+1,skipped:_,statics:S,dynamics:w+Vl(u,b),optionals:A,extract:T,rawParams:k})}if(!x&&g.staticInsensitive){const U=g.staticInsensitive.get(F??=z.toLowerCase());U&&d.push({node:U,index:b+1,skipped:_,statics:S+Vl(u,b),dynamics:w,optionals:A,extract:T,rawParams:k})}if(!x&&g.static){const U=g.static.get(z);U&&d.push({node:U,index:b+1,skipped:_,statics:S+Vl(u,b),dynamics:w,optionals:A,extract:T,rawParams:k})}if(g.pathless)for(let U=g.pathless.length-1;U>=0;U--){const N=g.pathless[U];d.push({node:N,index:b,skipped:_,statics:S,dynamics:w,optionals:A,extract:T,rawParams:k})}}if(m)return m;if(s&&f){let y=f.index;for(let b=0;b<f.index;b++)y+=t[b].length;const g=y===e.length?"/":e.slice(y);return f.rawParams??=Object.create(null),f.rawParams["**"]=decodeURIComponent(g),f}return null}function Vl(e,t){return 2**(e-t-1)}function vA(e,t){return e===2**(t-1)-1}function Vy(e,t,r){let s,o;try{[s,o]=H0(e,t,r)}catch{return null}if(r.rawParams=s,r.extract=o,!r.node.parse)return!0;try{if(r.node.parse(s)===!1)return null}catch{}return!0}function Gl(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===Zr)>(e.node.kind===Zr)||t.node.kind===Zr==(e.node.kind===Zr)&&t.node.depth>e.node.depth))):!0}function oc(e){return hf(e.filter(t=>t!==void 0).join("/"))}function hf(e){return e.replace(/\/{2,}/g,"/")}function V0(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function hr(e){const t=e.length;return t>1&&e[t-1]==="/"?e.replace(/\/{1,}$/,""):e}function G0(e){return hr(V0(e))}function bc(e,t){return e?.endsWith("/")&&e!=="/"&&e!==`${t}/`?e.slice(0,-1):e}function bA(e,t,r){return bc(e,r)===bc(t,r)}function _A({base:e,to:t,trailingSlash:r="never",cache:s}){const o=t.startsWith("/"),c=!o&&t===".";let u;if(s){u=o?t:c?e:e+"\0"+t;const m=s.get(u);if(m)return m}let d;if(c)d=e.split("/");else if(o)d=t.split("/");else{for(d=e.split("/");d.length>1&&io(d)==="";)d.pop();const m=t.split("/");for(let y=0,g=m.length;y<g;y++){const b=m[y];
10b===""?y?y===g-1&&d.push(b):d=[b]:b===".."?d.pop():b==="."||d.push(b)}}d.length>1&&(io(d)===""?r==="never"&&d.pop():r==="always"&&d.push(""));const f=hf(d.join("/"))||"/";return u&&s&&s.set(u,f),f}function wA(e){const t=new Map(e.map(o=>[encodeURIComponent(o),o])),r=Array.from(t.keys()).map(o=>o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),s=new RegExp(r,"g");return o=>o.replace(s,c=>t.get(c)??c)}function gh(e,t,r){const s=t[e];return typeof s!="string"?s:e==="_splat"?/^[a-zA-Z0-9\-._~!/]*$/.test(s)?s:s.split("/").map(o=>Yy(o,r)).join("/"):Yy(s,r)}function Gy({path:e,params:t,decoder:r,...s}){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 d=0,f,m="";for(;d<u;){const y=d;f=B0(e,y,f);const g=f[5];if(d=g+1,y===g)continue;const b=f[0];if(b===0){m+="/"+e.substring(y,g);continue}if(b===2){const _=t._splat;c._splat=_,c["*"]=_;const S=e.substring(y,f[1]),w=e.substring(f[4],g);if(!_){o=!0,(S||w)&&(m+="/"+S+w);continue}const A=gh("_splat",t,r);m+="/"+S+A+w;continue}if(b===1){const _=e.substring(f[2],f[3]);!o&&!(_ in t)&&(o=!0),c[_]=t[_];const S=e.substring(y,f[1]),w=e.substring(f[4],g),A=gh(_,t,r)??"undefined";m+="/"+S+A+w;continue}if(b===3){const _=e.substring(f[2],f[3]),S=t[_];if(S==null)continue;c[_]=S;const w=e.substring(y,f[1]),A=e.substring(f[4],g),T=gh(_,t,r)??"";m+="/"+w+T+A;continue}}return e.endsWith("/")&&(m+="/"),{usedParams:c,interpolatedPath:m||"/",isMissingParams:o}}function Yy(e,t){const r=encodeURIComponent(e);return t?.(r)??r}function Y0(e={}){if(e.isNotFound=!0,e.throw)throw e;return e}function ni(e){return e?.isNotFound===!0}function SA(){try{return sessionStorage}catch{return}}const EA="tsr-scroll-restoration-v1_3",F0=SA();function AA(){try{return JSON.parse(F0?.getItem("tsr-scroll-restoration-v1_3")||"{}")}catch{return{}}}function TA(){try{F0?.setItem(EA,JSON.stringify(js))}catch{}}const js=AA(),Fy="data-scroll-restoration-id",RA=e=>e.state.__TSR_key||e.href;function OA(e){const t=e.getAttribute(Fy);if(t)return`[${Fy}="${t}"]`;let r="",s=e,o;for(;o=s.parentNode;){let c=1,u=s;for(;u=u.previousElementSibling;)c++;const d=`${s.localName}:nth-child(${c})`;r=r?`${d} > ${r}`:d,s=o}return r}let Yl=!1;const lc="window";function zh(e){try{return typeof e=="function"?e():document.querySelector(e)}catch{}}function Ky(e){const t=new Set;for(const r of e){if(r===lc)continue;const s=zh(r);s&&t.add(s)}return t}function CA(e,t){const r=e.options.scrollRestoration,s=e._scroll;r&&(s.restoring=!0);const o=e.options.getScrollRestorationKey||RA,c=new Set,u=d=>{const f=js[d]||={};for(const m of c)m===document?f[lc]={scrollX,scrollY}:m.isConnected&&(f[OA(m)]={scrollX:m.scrollLeft,scrollY:m.scrollTop})};r&&!s.restoration&&(s.restoration=!0,Yl=!1,history.scrollRestoration="manual",document.addEventListener("scroll",d=>{Yl||c.add(d.target)},!0),e.subscribe("onBeforeLoad",d=>{d.fromLocation&&u(o(d.fromLocation)),c.clear()}),addEventListener("pagehide",()=>{u(o(e.stores.resolvedLocation.get()??e.stores.location.get())),TA()})),!s.reset&&(s.reset=!0,e.subscribe("onRendered",d=>{const f=e.options.scrollRestorationBehavior,m=e.options.scrollToTopSelectors,y=s.next,g=s.hash;let b;if(c.clear(),s.next=!0,s.hash=!1,typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation}))return;const _=o(d.toLocation),S=d.fromLocation&&o(d.fromLocation);if(s.restoring&&S&&S!==_){const w=js[S];if(w){let A=js[_];for(const T in w){if(T===lc){if(y)continue}else{const k=zh(T);if(!k||y&&m&&(b??=Ky(m),b.has(k)))continue}A||(A=js[_]={}),A[T]??=w[T]}}}Yl=!0;try{const w=d.toLocation.hash,A=d.toLocation.state.__hashScrollIntoViewOptions??!0;let T=!1;if(y){!w&&m&&(b??=Ky(m));const k=w&&A&&g,x=s.restoring?js[_]:void 0;if(x)for(const z in x){const{scrollX:F,scrollY:U}=x[z];if(z===lc){if(k)continue;scrollTo({top:U,left:F,behavior:f}),T=!0}else{const N=zh(z);N&&(N.scrollLeft=F,N.scrollTop=U,b?.delete(N))}}if(!w){const z={top:0,left:0,behavior:f};if(T||scrollTo(z),b)for(const F of b)F.scrollTo(z)}}!T&&w&&A&&document.getElementById(w)?.scrollIntoView(A)}finally{Yl=!1}}))}
10function K0(e,t=String){const r=new URLSearchParams;for(const s in e){const o=e[s];o!==void 0&&r.set(s,t(o))}return r.toString()}function yh(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function kA(e){const t=new URLSearchParams(e),r=Object.create(null);for(const[s,o]of t.entries()){const c=r[s];c==null?r[s]=yh(o):Array.isArray(c)?c.push(yh(o)):r[s]=[c,yh(o)]}return r}const xA=NA(JSON.parse),jA=MA(JSON.stringify,JSON.parse);function NA(e){return t=>{t[0]==="?"&&(t=t.substring(1));const r=kA(t);for(const s in r){const o=r[s];if(typeof o=="string")try{r[s]=e(o)}catch{}}return r}}function MA(e,t){const r=typeof t=="function";function s(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=K0(o,s);return c?`?${c}`:""}}const Is="__root__";function gr(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 Uc(e){return e instanceof Response&&!!e.options}function J0(e){if(e!==null&&typeof e=="object"&&e.isSerializedRedirect)return gr(e)}function DA(e){return e.replaceAll("\0","/").replaceAll("�","/").replace(/~([~0r])/g,(t,r)=>r==="0"?"\0":r==="r"?"�":r)}function LA(e){return{input:({url:t})=>{for(const r of e)t=Ih(r,t);return t},output:({url:t})=>{for(let r=e.length-1;r>=0;r--)t=Q0(e[r],t);return t}}}function UA(e){const t=G0(e.basepath),r=`/${t}`,s=e.caseSensitive?r:r.toLowerCase(),o=`${s}/`;return{input:({url:c})=>{const u=e.caseSensitive?c.pathname:c.pathname.toLowerCase();return u===s?c.pathname="/":u.startsWith(o)&&(c.pathname=c.pathname.slice(r.length)),c},output:({url:c})=>(c.pathname=oc(["/",t,c.pathname]),c)}}function Ih(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 Q0(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 zA(e,t){const{createMutableStore:r,createReadonlyStore:s,batch:o}=t,c=new Map,u=r("idle"),d=r(e),f=r(void 0),m=r([]),y=s(()=>m.get().map(w=>c.get(w).get())),g=s(()=>({status:u.get(),isLoading:u.get()==="pending",matches:y.get(),location:d.get(),resolvedLocation:f.get()}));function b(w){let A=c.get(w);return A||(A=r(void 0),c.set(w,A)),A}const _={status:u,location:d,resolvedLocation:f,ids:m,matches:y,byRoute:c,__store:g,getMatchStore:b,setMatches:S};function S(w){const A=m.get(),T=w.map(k=>k.routeId);o(()=>{oA(A,T)||m.set(T);for(const k of A)T.includes(k)||c.get(k).set(()=>{});for(const k of w){const x=b(k.routeId);x.get()!==k&&x.set(k)}})}return _}var ei="__TSR_index",Jy="popstate",Qy="beforeunload";function IA(e){let t=e.getLocation();const r=new Set,s=u=>{t=e.getLocation(),r.forEach(d=>d({location:t,action:u}))},o=u=>{e.notifyOnIndexChange??!0?s(u):t=e.getLocation()},c=async({task:u,navigateOpts:d,...f})=>{if(d?.ignoreBlocker??!1){u();return}const m=e.getBlockers?.()??[],y=f.type==="PUSH"||f.type==="REPLACE";if(typeof document<"u"&&m.length&&y)for(const g of m){const b=_c(f.path,f.state);if(await g.blockerFn({currentLocation:t,nextLocation:b,action:f.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,d,f)=>{const m=t.state[ei];d=Xy(m+1,d),c({task:()=>{e.pushState(u,d),s({type:"PUSH"})},navigateOpts:f,type:"PUSH",path:u,state:d})},replace:(u,d,f)=>{const m=t.state[ei];d=Xy(m,d),c({task:()=>{e.replaceState(u,d),s({type:"REPLACE"})},navigateOpts:f,type:"REPLACE",path:u,state:d})},go:(u,d)=>{c({task:()=>{e.go(u),o({type:"GO",index:u})},navigateOpts:d,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[ei]!==0,createHref:u=>e.createHref(u),block:u=>{if(!e.setBlockers)return()=>{};const d=e.getBlockers?.()??[];return e.setBlockers([...d,u]),()=>{const f=e.getBlockers?.()??[];e.setBlockers?.(f.filter(m=>m!==u))}},flush:()=>e.flush?.(),destroy:()=>e.destroy?.(),notify:s}}function Xy(e,t){t||(t={});const r=ff();return{...t,key:r,__TSR_key:r,[ei]:e}}function PA(e){const t=typeof document<"u"?window:void 0,r=t.history.pushState,s=t.history.replaceState;let o=[];const c=()=>o,u=N=>o=N,d=(N=>N),f=(()=>_c(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){const N=ff();t.history.replaceState({[ei]:0,key:N,__TSR_key:N},"")}let m=f(),y,g=!1,b=!1,_=!1,S=!1;const w=()=>m;let A;const T=()=>{A&&(U._ignoreSubscribers=!0,(A[2]?t.history.pushState:t.history.replaceState)(A[1],"",A[0]),U._ignoreSubscribers=!1,A=void 0,y=void 0)},k=(N,I,K)=>{const ue=d(I),G=!!A;G||(y=m),m=_c(I,K),A=[ue,K,A?.[2]||N],G||queueMicrotask(()=>T())},x=N=>{m=f(),U.notify({type:N})},z=async()=>
10{if(b){b=!1;return}const N=f(),I=N.state[ei]-m.state[ei],K=I===1,ue=I===-1,G=!K&&!ue||g;g=!1;const J=G?"GO":ue?"BACK":"FORWARD",ae=G?{type:"GO",index:I}:{type:ue?"BACK":"FORWARD"};if(_)_=!1;else{const ze=c();if(typeof document<"u"&&ze.length){for(const me of ze)if(await me.blockerFn({currentLocation:m,nextLocation:N,action:J})){b=!0,t.history.go(1),U.notify(ae);return}}}m=f(),U.notify(ae)},F=N=>{if(S){S=!1;return}let I=!1;const K=c();if(typeof document<"u"&&K.length)for(const ue of K){const G=ue.enableBeforeUnload??!0;if(G===!0){I=!0;break}if(typeof G=="function"&&G()===!0){I=!0;break}}if(I)return N.preventDefault(),N.returnValue=""},U=IA({getLocation:w,getLength:()=>t.history.length,pushState:(N,I)=>k(!0,N,I),replaceState:(N,I)=>k(!1,N,I),back:N=>(N&&(_=!0),S=!0,t.history.back()),forward:N=>{N&&(_=!0),S=!0,t.history.forward()},go:N=>{g=!0,t.history.go(N)},createHref:N=>d(N),flush:T,destroy:()=>{t.history.pushState=r,t.history.replaceState=s,t.removeEventListener(Qy,F,{capture:!0}),t.removeEventListener(Jy,z)},onBlocked:()=>{y&&m!==y&&(m=y)},getBlockers:c,setBlockers:u,notifyOnIndexChange:!1});return t.addEventListener(Qy,F,{capture:!0}),t.addEventListener(Jy,z),t.history.pushState=function(...N){const I=r.apply(t.history,N);return U._ignoreSubscribers||x("PUSH"),I},t.history.replaceState=function(...N){const I=s.apply(t.history,N);return U._ignoreSubscribers||x("REPLACE"),I},U}function BA(e){let t=e.replace(/[\x00-\x1f\x7f]/g,"");return t.startsWith("//")&&(t="/"+t.replace(/^\/+/,"")),t}function _c(e,t){const r=BA(e),s=r.indexOf("#"),o=r.indexOf("?"),c=ff();return{href:r,pathname:r.substring(0,s>0?o>0?Math.min(s,o):s:o>0?o:r.length),hash:s>-1?r.substring(s):"",search:o>-1?r.slice(o,s===-1?void 0:s):"",state:t||{[ei]:0,key:c,__TSR_key:c}}}function ff(){return(Math.random()+1).toString(36).substring(7)}function Zy(e){return e.options.loader||e.options.beforeLoad||e.lazyFn||e.options.component?.preload||e.options.pendingComponent?.preload}function $A(e){return e instanceof Error?{name:e.name,message:e.message}:{data:e}}function zc(e,t){return{fromLocation:t,toLocation:e,pathChanged:t?.pathname!==e.pathname,hrefChanged:t?.href!==e.href,hashChanged:t?.hash!==e.hash}}function Wy({key:e,__TSR_key:t,__TSR_index:r,__hashScrollIntoViewOptions:s,...o}){return o}function HA(e,t,r,s){for(const o of t){if(s?.()===!1)return;r.some(c=>c.routeId===o.routeId)||e.routesById[o.routeId].options.onLeave?.(o)}for(const o of r){if(s?.()===!1)return;e.routesById[o.routeId].options[t.some(c=>c.routeId===o.routeId)?"onStay":"onEnter"]?.(o)}}var qA=class{constructor(e,t){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this._scroll={next:!0},this.subscribers=new Set,this._cache=new Map,this._committed=[],this.routeBranchCache=new WeakMap,this.lightweightCache=new WeakMap,this.startTransition=async r=>(r(),!1),this.update=r=>{const s=this.options,o=this.basepath??s?.basepath??"/",c=this.basepath===void 0,u=s?.rewrite;if(this.options={...s,...r},this.isServer=this.options.isServer??QE??typeof document>"u",this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=wA(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=PA()),this.origin=this.options.origin,this.origin||(window?.origin&&window.origin!=="null"?this.origin=window.origin:this.origin="http://localhost"),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree){this.routeTree=this.options.routeTree;let m;this.resolvePathCache=vc(1e3),m=this.buildRouteTree(),this.setRoutes(m)}if(!this.stores&&this.latestLocation){const m=this.getStoreConfig(this);this.batch=m.batch,this.stores=zA(this.latestLocation,m),CA(this)}const d=this.options.basepath??"/",f=this.options.rewrite;if(c||o!==d||u!==f){this.basepath=d;const m=[],y=G0(d);y&&y!=="/"&&m.push(UA({basepath:d})),f&&m.push(f),this.rewrite=m.length===0?void 0:m.length===1?m[0]:LA(m),this.history&&this.updateLatestLocation(),this.stores&&this.stores.location.set(this.latestLocation)}},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{const r=mA(this.routeTree,this.options.caseSensitive,(s,o)=>{s.init({originalIndex:o})});return this.options.routeMasks&&uA(this.options.routeMasks,r.processedTree),r},this.subscribe=(r,s)=>{const o={eventType:r,fn:s};return this.subscribers.add(o),()=>{this.subscribers.delete(o)}},this.emit=r=>{for(const s of this.subscribers)if(s.eventType===r.type)try{s.fn(r)}catch(o){console.error(o)}},this.parseLocation=(r,s)=>{const o=({pathname:f,search:m,hash:y,href:g,state:b})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(f)){const T=this.options.parseSearch(m),k=this.options.stringifySearch(T);return{href:f+k+y,publicHref:f+k+y,pathname:Ga(f).path,external:!1,searchStr:k,search:Ri(s?.search,T),hash:Ga(y.slice(1)).path,state:Ni(s?.state,b)}}const _=new URL(g,this.origin),S=Ih(this.rewrite,_),w=this.options.parseSearch(S.search),A=this.options.stringifySearch(w);return S.search=A,{href:S.href.replace(S.origin,""),publicHref:g,pathname:Ga(S.pathname).path,external:!!this.rewrite&&S.origin!==this.origin,searchStr:A,search:Ri(s?.search,w),hash:Ga(S.hash.slice(1)).path,state:Ni(s?.state,b)}},c=o(r),{__tempLocation:u,__tempKey:d}=c.state;if(u&&(!d||d===this.tempLocationKey)){const f=o(u);return f.state.key=c.state.key,f.state.__TSR_key=c.state.__TSR_key,delete f.state.__tempLocation,{...f,maskedLocation:c}}return c},this.resolvePathWithBase=(r,s)=>_A({base:r,to:s.includes("//")?hf(s):s,trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(r,s,o)=>typeof r=="string"?this.matchRoutesInternal({pathname:r,search:s},o):this.matchRoutesInternal(r,s),this.getMatchedRoutes=r=>{const s=Object.create(null),o=fA(hr(r),this.processedTree,!0);return o&&Object.assign(s,o.rawParams),[o?.branch||[this.routesById.__root__],s,o?.route]},this.buildLocation=r=>{const s=(c={})=>{const u=c._fromLocation||this._pendingLocation||this.latestLocation,d=this.matchRoutesLightweight(u);c.from;const f=c.unsafeRelative==="path"?u.pathname:c.from??d[1],m=c.to?`${c.to}`:void 0,y=d[2],g=Object.assign(Object.create(null),d[3]),b=m?.charCodeAt(0)===47?"/":this.resolvePathWithBase(f,"."),_=m?this.resolvePathWithBase(b,m):b,S=ev(c.params,g),w=this.routesByPath[hr(_)];let A;if(w)A=this.getRouteBranch(w);else if(_.includes("$"))A=[];else{const[G,J,ae]=this.getMatchedRoutes(_);A=G,this.options.notFoundRoute&&(!ae||ae.path!=="/"&&J["**"])&&(A=[...A,this.options.notFoundRoute])}if(A.length&&I0(S))for(const G of A){const J=G.options.params?.stringify??G.options.stringifyParams;if(J)try{Object.assign(S,J(S))}catch{}}
10const T=r.leaveParams?_:Ga(Gy({path:_,params:S,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path;let k=y;if(r._includeValidateSearch&&this.options.search?.strict){const G={};A.forEach(J=>{if(J.options.validateSearch)try{Object.assign(G,cc(J.options.validateSearch,{...G,...k}))}catch{}}),k=G}k=GA(k,c,A,r._includeValidateSearch),k=Ri(y,k);const x=this.options.stringifySearch(k),z=c.hash===!0?u.hash:c.hash?Vs(c.hash,u.hash):void 0,F=z?`#${z}`:"";let U=c.state===!0?u.state:c.state?Vs(c.state,u.state):{};U=Ni(u.state,U);const N=`${T}${x}${F}`;let I,K,ue=!1;if(this.rewrite){const G=new URL(N,this.origin),J=Q0(this.rewrite,G);I=G.href.replace(G.origin,""),J.origin!==this.origin?(K=J.href,ue=!0):K=J.pathname+J.search+J.hash}else I=aA(N),K=I;return{publicHref:K,href:I,pathname:T,search:k,searchStr:x,state:U,hash:z??"",external:ue,unmaskOnReload:c.unmaskOnReload}},o=(c={},u)=>{const d=s(c);let f=u?s(u):void 0;if(!f){const m=Object.create(null);if(this.options.routeMasks){const y=dA(d.pathname,this.processedTree);if(y){Object.assign(m,y.rawParams);const{from:g,params:b,..._}=y.route,S=ev(b,m);u={from:r.from,..._,params:S},f=s(u)}}}return f&&(d.maskedLocation=f),d};return r.mask?o(r,{from:r.from,...r.mask}):o(r)},this.commitLocation=async({viewTransition:r,ignoreBlocker:s,...o})=>{let c;const u=hr(this.latestLocation.href)===hr(o.href)&&Mn(Wy(o.state),Wy(this.latestLocation.state)),d=this._commitPromise;let f;const m=new Promise(y=>{f=y});if(m.resolve=()=>{f(),d?.resolve()},this._commitPromise=m,u)this.load();else{let{maskedLocation:y,hashScrollIntoView:g,...b}=o;y&&(b={...y,state:{...y.state,__tempKey:void 0,__tempLocation:{...b,search:b.searchStr,state:{...b.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(b.unmaskOnReload??this.options.unmaskOnReload??!1)&&(b.state.__tempKey=this.tempLocationKey)),b.state.__hashScrollIntoViewOptions=g??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=r,c=o.replace?"REPLACE":"PUSH",this.history[c==="REPLACE"?"replace":"push"](b.publicHref,b.state,{ignoreBlocker:s}),this.history.subscribers.size||this.load({action:{type:c}})}return this._scroll.next=o.resetScroll??!0,this._commitPromise},this.buildAndCommitLocation=({replace:r,resetScroll:s,hashScrollIntoView:o,viewTransition:c,ignoreBlocker:u,_redirects:d,href:f,...m}={})=>
10{if(f){const b=this.history.location.state.__TSR_index,_=_c(f,{__TSR_index:r?b:b+1}),S=new URL(_.pathname,this.origin);m.to=Ih(this.rewrite,S).pathname,m.search=this.options.parseSearch(_.search),m.hash=_.hash.slice(1)}const y=this.buildLocation({...m,_includeValidateSearch:!0});d&&(y._redirects=d),this._pendingLocation=y;const g=this.commitLocation({...y,viewTransition:c,replace:r,resetScroll:s,hashScrollIntoView:o,ignoreBlocker:u});return queueMicrotask(()=>{this._pendingLocation===y&&(this._pendingLocation=void 0)}),g},this.navigate=async({to:r,reloadDocument:s,href:o,publicHref:c,...u})=>{let d=!1;if(o)try{new URL(`${o}`),d=!0}catch{}if(d&&!s&&(s=!0),s){if(r!==void 0||!o){const m=this.buildLocation({to:r,...u});o=o??m.publicHref,c=c??m.publicHref}const f=!d&&c?c:o;if(yc(f,this.protocolAllowlist))return;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}u.replace?window.location.replace(f):window.location.href=f;return}return this.buildAndCommitLocation({...u,href:o,to:r,_isNavigate:!0})},this.load=async r=>{this.updateLatestLocation(),r?.action&&(this._scroll.hash=r.action.type==="PUSH"||r.action.type==="REPLACE"),await WA(this,r)},this.startViewTransition=r=>{const s=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,s&&typeof document.startViewTransition=="function"){let o;if(typeof s=="object"&&window.CSS?.supports?.("selector(:active-view-transition-type(a))")){const c=this.latestLocation,u=this.stores.resolvedLocation.get(),d=typeof s.types=="function"?s.types(zc(c,u)):s.types;if(d===!1)return r();o={update:r,types:d}}else o=r;return document.startViewTransition(o).updateCallbackDone}return r()},this.invalidate=r=>{const s=this._committed,o=r?.filter,c=this._preloads,u=new Set([...s,...this._cache.values(),...[...c?.values()??[]].flat(),...this._tx?.[3]??[]].filter(m=>!o||o(m)).map(m=>m.id)),d=[];for(const[m,y]of c??[])y.some(g=>u.has(g.id))&&(c.delete(m),d.push(m));const f=m=>{if(u.has(m.id)){const y=this.routesById[m.routeId],g={...m,invalid:!0,...(r?.forcePending||m.status==="error"||m.status==="notFound")&&Zy(y)?{status:"pending",error:void 0}:void 0};return m._flight=void 0,g}return m};this._committed=s.map(f);for(const[m,y]of this._cache)u.has(m)&&(y.invalid=!0,r?.forcePending&&(y.status="pending"));for(const m of u)this._flights?.delete(m);for(const m of d)m.abort();return this.shouldViewTransition=!1,this.load({sync:r?.sync})},this.resolveRedirect=r=>{const s=r.headers.get("Location");if(!r.options.href||r.options._builtLocation){const o=(r.options._builtLocation??this.buildLocation(r.options)).publicHref||"/";r.options.href=o,r.headers.set("Location",o)}else if(s)try{const o=new URL(s);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&&yc(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 s=this._cache,o=this._preloads,c=r?.filter,u=[],d=[];for(const[m,y]of s)(!c||c(y))&&(d.push(m),u.push(y));const f=[];for(const[m,y]of o??[])(!c||y.some(c))&&(f.push(m),u.push(...y));for(const m of d)s.delete(m);for(const m of f)o.delete(m);for(const m of u){const y=m._flight;m._flight=void 0,y&&!--y[2]&&(this._flights?.get(m.id)===y&&this._flights.delete(m.id),f.push(y[1]))}for(const m of f)m.abort()},this.loadRouteChunk=mr,this.preloadRoute=r=>ob(this,r),this.matchRoute=(r,s)=>{const o={...r,to:r.to?this.resolvePathWithBase(r.from||"",r.to):void 0,params:r.params||{},leaveParams:!0},c=this.buildLocation(o),u=this.stores.status.get()==="pending";if(s?.pending&&!u)return!1;const d=s?.pending??!u?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),f=hA(c.pathname,s?.caseSensitive??!1,s?.fuzzy??!1,d.pathname,this.processedTree);return!f||r.params&&!Mn(f.rawParams,r.params,{partial:!0})?!1:s?.includeSearch??!0?Mn(d.search,c.search,{partial:!0})?f.rawParams:!1:f.rawParams}
10,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??jA,parseSearch:e.parseSearch??xA,protocolAllowlist:e.protocolAllowlist??nA}),self.__TSR_ROUTER__=this}isShell(){return!!this.options.isShell}get state(){return this.stores.__store.get()}setRoutes({routesById:e,routesByPath:t,processedTree:r}){this.routesById=e,this.routesByPath=t,this.processedTree=r;const s=this.options.notFoundRoute;s&&(s.init({originalIndex:99999999999}),this.routesById[s.id]=s)}getRouteBranch(e){let t=this.routeBranchCache.get(e);return t||(t=q0(e),this.routeBranchCache.set(e,t)),t}matchRoutesInternal(e,t){const[r,s,o]=this.getMatchedRoutes(e.pathname);let c=r,u=!1;(o?o.path!=="/"&&s["**"]:hr(e.pathname))&&(this.options.notFoundRoute?c=[...c,this.options.notFoundRoute]:u=!0);const d=u?YA(this.options.notFoundMode,c):void 0,f=new Array(c.length),m=this._committed,y=(b,_)=>{const S=m[_];return S?.routeId===b.id?S:b===this.options.notFoundRoute?m.find(w=>w.routeId===b.id):void 0};let g;for(let b=0;b<c.length;b++){const _=c[b],S=f[b-1];let w,A,T;{const ae=S?.search??e.search,ze=S?._strictSearch??void 0;try{const me=cc(_.options.validateSearch,{...ae})??void 0;w={...ae,...me},A={...ze,...me}}catch(me){let P=me;if(me instanceof wc||(P=new wc(me.message,{cause:me})),t?.throwOnError)throw P;w=ae,A={},T=P}}let k="",x="";try{k=_.options.loaderDeps?.({search:w})??"",x=k&&JSON.stringify(k)||""}catch(ae){if(t?.throwOnError)throw ae;T??=ae}const{interpolatedPath:z,usedParams:F}=Gy({path:_.fullPath,params:s,decoder:this.pathParamsDecoder,server:this.isServer}),U=_.id+z+x,N=y(_,b),I=this._cache.get(U)??(N?.id===U?N:void 0);g=I?._strictParams??Object.assign(F,g);let K;if(!I)try{tv(_,g)}catch(ae){if(ni(ae)||Uc(ae)?K=ae:K=new VA(ae.message,{cause:ae}),t?.throwOnError)throw K}const ue=N?"stay":"enter";let G;if(I)G={...I,cause:ue,search:Ri(N?N.search:I.search,w),_strictSearch:A,searchError:T};else{const ae=Zy(_)?"pending":"success";G={id:U,ssr:_.options.ssr,index:b,routeId:_.id,params:N?.params??g,_strictParams:g,pathname:z,updatedAt:Date.now(),search:N?Ri(N.search,w):w,_strictSearch:A,searchError:T,status:ae,isFetching:!1,error:void 0,paramsError:K,context:{},abortController:t?._controller??new AbortController,cause:ue,loaderDeps:N?Ni(N.loaderDeps,k):k,invalid:!1,preload:!1,staticData:_.options.staticData||{},fullPath:_.fullPath}}const J=d===_.id;G._notFound&&!J&&(G.error=void 0),G._notFound=J,f[b]=G}for(let b=0;b<f.length;b++){const _=f[b];_.params=_.cause==="stay"?Ri(_.params,g):g,t?._controller&&(_.context={})}return f}matchRoutesLightweight(e){const t=io(this.stores.ids.get()),r=t?this.stores.byRoute.get(t).get():void 0,s=r?.id,o=this.lightweightCache.get(e);if(o&&o[0]===s)return o[1];const[c,u]=this.getMatchedRoutes(e.pathname),d=io(c),f={...e.search};for(const b of c)try{Object.assign(f,cc(b.options.validateSearch,f))}catch{}const m=r&&r.routeId===d.id&&r.pathname===e.pathname;let y;if(m)y=r.params;else{const b=Object.assign(Object.create(null),u);for(const _ of c)try{tv(_,b)}catch{}y=b}const g=[c,d.fullPath,f,y];return this.lightweightCache.set(e,[s,g]),g}},wc=class extends Error{},VA=class extends Error{};function cc(e,t){if(e==null)return{};if("~standard"in e){const r=e["~standard"].validate(t);if(r instanceof Promise)throw new wc("Async validation not supported");if(r.issues)throw new wc(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 GA(e,t,r,s){const o=[];for(const u of r){const d=u.options;if("search"in d)d.search?.middlewares&&o.push(...d.search.middlewares);else if(d.preSearchFilters||d.postSearchFilters){const m=({search:y,next:g})=>{const b=g(d.preSearchFilters?d.preSearchFilters.reduce((_,S)=>S(_),y):y);return d.postSearchFilters?d.postSearchFilters.reduce((_,S)=>S(_),b):b};o.push(m)}const f=d.validateSearch;if(f){const m=({search:y,next:g,meta:b})=>{const _=g(y);if(s)try{const S=cc(f,_);if(b&&S)for(const w in S)w in _||(b.defaulted||=new Map).set(w,S[w]);return{..._,...S}}catch{}return _};o.push(m)}}const c=(u,d,f)=>{if(u>=o.length){if(!t.search)return{};if(t.search===!0)return d;const y=Vs(t.search,d);return f&&(f.explicit=y),y}const m=(y,g)=>{if(g){const b=f||{};return{search:c(u+1,y,b),meta:b}}return c(u+1,y,f)};return o[u]({search:d,next:m,meta:f})};return c(0,e)}function YA(e,t){if(e!=="root"){let r;for(let s=t.length-1;s>=0;s--){const o=t[s];if(o.options.notFoundComponent)return o.id;r||=o.children&&o.id}if(r)return r}return Is}
10function ev(e,t){return e===!1||e===null?Object.create(null):(e??!0)===!0?t:Object.assign(t,Vs(e,t))}function tv(e,t){const r=e.options.params?.parse??e.options.parseParams;r&&Object.assign(t,r(t))}function Ph(e,t){return e.options[t]?.preload?.()}function FA(e,t){const r=Ph(e,"component"),s=Ph(e,"pendingComponent"),o=t&&s?s.then(t):s;return t&&!s&&t(),r&&o?Promise.all([r,o]).then(()=>{}):r??o}function mr(e,t,r){const s=()=>t===!1?void 0:t?Ph(e,t):FA(e,r),o=e._lazy;if(o)return o===!0?s():o.then(s);if(!e.lazyFn)return s();const c=e.lazyFn().then(u=>{{const{id:d,...f}=u.options;Object.assign(e.options,f),e._lazy=!0}},u=>{throw e._lazy=void 0,u});return e._lazy=c,c.then(s)}function X0(e){const t=e.findIndex(r=>r.status!=="success"||r._notFound)+1;return t&&t<e.length?e.slice(0,t):e}function Z0(e){let t=e.length;for(let r=0;r<t;r++){const s=e[r];if(s._assetEnd!==void 0){t=Math.min(t,Math.max(r+1,s._assetEnd));continue}if(s.status!=="success"||s._notFound){t=r+1;break}}return t<e.length?e.slice(0,t):e}const Dn=0,ti=1,Ic=2,un=3,Ui=4;function ao(e){return typeof e[0]=="number"}function Ln(e,t){return t.aborted?Promise.race([Promise.reject(t),e]):new Promise((r,s)=>{const o=()=>s(t);t.addEventListener("abort",o,{once:!0}),Promise.resolve(e).then(r,s).finally(()=>t.removeEventListener("abort",o))})}function Sn(e,t){return e.routesById[t.routeId]}function oo(e,t,r){return Uc(e)?[un,e]:ni(e)?(e.routeId||=r,[Ic,e]):(t&&typeof e?.then=="function"&&(e=new Error("A Promise was thrown",{cause:e})),t?[ti,e]:[Dn,e])}function W0(e,t){let r=oo(t,!0,e.id);if(r[0]!==ti)return r;try{e.options.onError?.(r[1])}catch(s){r=oo(s,!0,e.id)}return r}function no(e,t,r){return r[0].signal.aborted||!r[2]()?(r[0].abort(),[Ui]):W0(e,t)}function pf(e,t){return r=>e.navigate({...r,_fromLocation:t})}async function KA(e,t,r,s,o,c){const[u,d]=t,f=r[0].signal,m=!!r[4];for(let y=r[7]??0;y<s;y++){const g=d[y],b=Sn(e,g);g.abortController=r[0];const _=d[y-1]?.context??e.options.context??{},S={params:g.params,location:u,navigate:pf(e,u),buildLocation:e.buildLocation,cause:m?"preload":g.cause,abortController:r[0],preload:m,matches:d,routeId:b.id};let w=_;try{let z=g._ctx;!z&&b.options.context&&(z=g._ctx=b.options.context({...S,deps:g.loaderDeps,context:_})||{}),w={..._,...z},g.context=w}catch(z){return pr(e,g),[y,no(b,z,r)]}if(f.aborted||!r[2]())return r[0].abort(),[y,[Ui]];const A=g.paramsError??g.searchError;if(A!==void 0)return pr(e,g),[y,no(b,A,r)];const T=b.options.beforeLoad;if(!T)continue;const k={...S,search:g.search,context:w,...e.options.additionalContext},x=g.status;x==="success"&&y>=c&&(g.status="pending"),r[8]?.();try{lo(e,g,"beforeLoad",r[0]);const z=await Ln(T(k),f);if(!r[2]())return r[0].abort(),[y,[Ui]];const F=oo(z,!1,b.id);if(F[0]!==Dn)return pr(e,g),[y,F];g.context={...w,...z}}catch(z){return pr(e,g),[y,no(b,z,r)]}finally{x==="success"&&g.status==="pending"&&(g.status="success"),lo(e,g,!1,r[0])}}o()}function mf(e,t,r){if(!(!r||--r[2])){if(e._flights?.get(t.id)===r){const s=e._tx;if(s&&!s[0].signal.aborted&&!s[3].includes(t)&&s[3].some(o=>o.id===t.id)&&s[3].some(o=>o.isFetching==="beforeLoad"))return;e._flights.delete(t.id)}return r[1]}}function pr(e,t){const r=t._flight;t._flight=void 0,mf(e,t,r)?.abort()}function At(e,t,r,s){const o=[];for(const c of t)if(!r?.includes(c)){const u=c._flight;if(c._flight=void 0,s&&u?.[2]===1&&e._flights?.get(c.id)===u&&r?.some(d=>d.id===c.id))u[2]=0;else{const d=mf(e,c,u);d&&o.push(d)}}for(const c of o)c.abort()}function gf(e){for(const t of e){const r=t._flight;r&&r[2]++}}function lo(e,t,r,s){if(t.isFetching=r,s&&e._tx?.[0]!==s)return;const o=e.stores.byRoute.get(t.routeId),c=o?.get();c?.id===t.id&&o.set({...c,isFetching:r})}function eb(e,t,r,s,o,c,u){const d=t[0];return{params:r.params,location:d,navigate:pf(e,d),cause:u?"preload":r.cause,abortController:o,preload:u,deps:r.loaderDeps,parentMatchPromise:c,context:r.context,route:s,...e.options.additionalContext}}async function nv(e,t,r,s,o,c,u,d){const f=d.signal;if(f.aborted)return[Ui];if(!o)return[Dn,void 0];let m=r._flight;lo(e,r,"loader",d);try{if(!m){const y=new AbortController;m=[Promise.resolve().then(()=>o(eb(e,t,r,s,y,c,u))).then(g=>oo(g,!1,s.id),g=>oo(g,!0,s.id)).then(g=>(g[0]!==Dn&&e._flights?.get(r.id)===m&&(e._flights.delete(r.id),m[2]||y.abort()),g[0]===ti&&m[2]?W0(s,g[1]):g)),y,1],(e._flights??=new Map).set(r.id,m)}return r._flight=m,r.abortController=m[1],await Ln(m[0],f)}catch(y){if(y!==f)throw y;return pr(e,r),[Ui]}finally{lo(e,r,!1,d)}}function rv(e,t,r){t[0]===Dn?(e.loaderData=t[1],e.error=void 0,e.status="success",e.invali
10d=!1,e.updatedAt=Date.now(),e.preload=r):t[0]!==un&&(e.status="success",e.error=void 0,e.invalid=!0)}function tb(e,t,r){const s=e._cache.get(t.id);if(s!==r||e._committed.some(c=>c.id===t.id&&c._flight===t._flight))return;const o={...t,_notFound:void 0,context:{}};o._flight&&o._flight[2]++,e._cache.set(t.id,o),s&&pr(e,s)}function iv(e,t){return t[0]===ti||t[0]===Ic?{...e,status:t[0]===ti?"error":"notFound",error:t[1],_flight:void 0}:e}function JA(e,t,r,s,o,c,u){const d=t[1][r],f=Sn(e,d),m=!!c[4],y=m?e._cache.get(d.id):void 0;let g,b=!1,_;try{if(d.status==="success"&&(g=f.options.shouldReload,typeof g=="function"&&(g=g(eb(e,t,d,f,c[0],o,m))),c[2]()||(c[0].abort(),_=[Ui])),!_)if(d.status!=="success")b=!0;else{const K=c[4]||d.preload?f.options.preloadStaleTime??e.options.defaultPreloadStaleTime??3e4:f.options.staleTime??e.options.defaultStaleTime??0;b=!!(d.invalid||g||g===void 0&&Date.now()-d.updatedAt>=K&&(c[6]||d.cause==="enter"||c[3].some(ue=>ue.routeId===d.routeId&&ue.id!==d.id)))}}catch(K){d.invalid=!0,pr(e,d),_=no(f,K,c)}const S=f.options.loader,w=typeof S=="function"?S:S?.handler;let A=(!m||f.options.preload!==!1)&&S?e._flights?.get(d.id):void 0;A===d._flight||_?A=void 0:A&&!b&&!m&&g===void 0?b=!0:b||(A=void 0);const T=!!(S&&b&&d.status==="success"&&!m&&!c[5]&&((typeof S=="function"?void 0:S?.staleReloadMode)??e.options.defaultStaleReloadMode)!=="blocking"),k=b&&(!m||f.options.preload!==!1),x=k&&!T&&(d.status!=="success"||!!S),z=f.lazyFn&&f._lazy!==!0?c[8]:void 0;if(k&&!S&&(d.invalid=!1,d.updatedAt=Date.now()),A&&A[2]++,x){const K=d._flight;d._flight=A,mf(e,d,K)?.abort(),d.status==="success"&&r>=u&&(d.status="pending"),c[8]?.()}k||(d.isFetching=!1);const F=(_?Promise.resolve(_):x?nv(e,t,d,f,w,o,m,c[0]):Promise.resolve([Dn,d.loaderData])).then(K=>(x&&(rv(d,K,m),K[0]===Dn&&(m&&S&&!c[0].signal.aborted&&tb(e,d,y),d.status="pending")),K)),U=Ln(Promise.resolve().then(()=>mr(f,void 0,z)),c[0].signal).then(()=>{},K=>[r,no(f,K,c)]).then(K=>F.then(ue=>(x&&!K&&ue[0]===Dn&&d.status==="pending"&&c[2]()&&(d.status="success",c[8]?.()),K)));if(s.push([r,F,U]),!T)return F.then(K=>iv(d,K));const N={...d,status:"pending",preload:!1,_flight:A};d.invalid=!1,d.isFetching="loader";const I=nv(e,t,N,f,w,o,!1,c[0]).then(K=>(d.isFetching=!1,rv(N,K,!1),K));return(t[2]??=[]).push([r,I,U,N]),I.then(K=>iv(N,K))}async function Bh(e,t,r,s,o=0){const c=r?.[1][1];let u=c?.routeId?t.findIndex(d=>d.routeId===c.routeId):r?.[0]??t.length-1;u<0&&(u=0);for(let d=u;d>=0;d--){const f=Sn(e,t[d]),m=mr(f,!1);if(m)try{await Ln(m,s)}catch(y){if(y===s)throw y}if(f.options.notFoundComponent)return d}return c?.routeId?u:o}function Ps(e,t){t[2]&&(At(e,t[2].map(r=>r[3])),t[2]=void 0)}async function sv(e,t,r,s){let o;try{await Promise.all(e.map(c=>c[1].then(async u=>{const d=c[0];if(!(s&&d>=await s)){if(u[0]>=un)throw[d,u];!o&&u[0]!==Dn&&(o=[d,u],await Promise.all((r??[]).map(f=>{if(!(f[0]<=d))return f[1].then(m=>{if(m[0]===un)throw[f[0],m]})})))}})))}catch(c){return c}return t??o}async function nb(e,t,r,s,o,c,u){const d=t[1];let f=await c,m=!1;const y=d.findIndex(S=>S._notFound),g=S=>S[1][0]===Ic?Bh(e,d,S,s.signal):S[0];let b=y<0?d.length:y;if((f?.[1][0]??0)>=un)b=0;else if(f){b=f[2]??=await g(f);for(const S of r){if(S[0]>=b)break;const w=await S[1];if(w[0]!==Dn&&w[0]<un&&!("loaderData"in d[S[0]])){f=[S[0],w],b=f[2]=await g(f);break}}}for(const S of r){if(S[0]>=b)break;const w=await S[2];if(w){f=w;break}}if((f?.[1][0]??0)>=un){const S=f[1];if(S[0]!==un||S[1].options.reloadDocument||o<20)return Ps(e,t),S;m=!0,f=[0,[ti,new Error("Too many redirects")]]}const _=f?f[2]??await g(f):y;if(_>=0){const S=f?.[1],w=S?.[0],A=d[_],T=S?.[1],k=()=>{S&&(A._notFound=void 0,w===ti?A.status="error":(T.routeId=A.routeId,A.routeId===e.routeTree.id?(A.status="success",A._notFound=!0):A.status="notFound"),A.error=T,A.isFetching=!1)};k();const x=Sn(e,A);try{await Ln(S?Promise.resolve().then(()=>mr(x,w===ti?"errorComponent":"notFoundComponent")):Promise.all([mr(x),mr(x,"notFoundComponent")]),s.signal)}catch(z){if(z===s.signal)return Ps(e,t),[Ui]}S?m&&(s.abort(),await Promise.all([...r.map(z=>z[1]),...r.map(z=>z[2]),...(t[2]??[]).map(z=>z[1])]),Ps(e,t),At(e,d),k()):(A.status="success",u?.())}return t}async function yf(e,t,r,s=0,o=t[1].length){const c=t[1];for(let u=s;u<o;u++){const d=c[u],f=Sn(e,d).options;if(f.head||f.scripts)try{const m={ssr:e.options.ssr,matches:c,match:d,params:d.params,loaderData:d.loaderData},[y,g]=await Ln(Promise.all([f.head?.(m),f.scripts?.(m)]),r);d.meta=y?.meta,d.links=y?.links,d.headScripts=y?.scripts,d.styles=y?.styles,d.scripts=g}catch(m){if(m===r)break;console.error(m)}if(d.status!=="success"||d._notFound)break}return t}async function rb(e,t,r,s){const o=[t,r],c=e.stores.matches.get();let u=r.findIndex(w=>w._notFound);if(e.options.notFoundMode!=="root"&&u>=0){const w=await Bh(e,o[1],void 0,s[0].signal,u);w!==u&&(r[u]._notFound=void 0,r[w]._notFound=!0),u=w}let d=u<0?r.length:u+1,f=0;for(;f<d&&f!==u;){const w=r[f],A=s[3][f],T=c[f];if(A?.id!==w.id||A.status!=="success"||A._notFound||w.preload||T?.id!==w.id||T.status!=="success"||T._notFound)break;f++}const m=[],y=s[7]??0;let g=y?Promise.resolve(o[1][y-1]):void 0;const b=()=>{for(let w=y;w<d&&!s[0].signal.aborted;w++)g=JA(e,o,w,m,g,s,f)},_=await KA(e,o,s,d,b,f);if(_&&(s[5]=!0,d=_[0],_[1][0]===Ic?(_[2]=await Bh(e,o[1],_,s[0].signal),d=Math.min(d,_[2]+1)):_[1][0]>
10=un&&(d=0),b()),s[2]()&&!s[4]){const w=[];for(const[A,T]of e._flights??[])T[2]||(e._flights.delete(A),w.push(T[1]));for(const A of w)A.abort()}let S;try{const w=nb(e,o,m,s[0],s[1],sv(m,_,o[2]),s[8]);o[2]?.length&&(o[3]=sv(o[2],void 0,void 0,w.then(A=>ao(A)?0:X0(A[1]).length,()=>0))),S=await w}catch(w){throw Ps(e,o),w}return ao(S)?S:yf(e,S,s[0].signal,s[7]===S[1].length?s[7]:0)}function $h(e,t){if(e._tx!==t)return;let r=e._pending,s=!1;const o=r?.[0][3][r[1]]?.id;r?.[0]!==t&&(r&&t[3][r[1]]?.id===o?(r[0]=t,s=!0):(clearTimeout(r?.[3]),e._pending=r=void 0));const c=t[3],u=e.stores.matches.get();let d=-1,f,m,y,g=!1;for(let w=0;w<c.length;w++){const A=c[w],T=A.status==="success";if(g=u[w]?.id===A.id&&u[w]?.status==="pending",T&&!g)continue;const k=Sn(e,A);if(f=T&&g||A.invalid?0:k.options.pendingMs??e.options.defaultPendingMs,y=k.options.pendingComponent??e.options.defaultPendingComponent,!y||typeof f!="number"||f===1/0)return;d=w,m=k.options.pendingMinMs??e.options.defaultPendingMinMs??0;break}if(d<0)return;const b=c[d].id;if((!r||r[1]!==d||o!==b)&&(clearTimeout(r?.[3]),e._pending=r=[t,d,g?Date.now()+m:t[4]+f,void 0,g?Promise.resolve(!0):void 0,y]),r[4]&&!s&&r[5]===y)return;
10if(r[5]=y,!r[4]){clearTimeout(r[3]);const w=r[2]-Date.now();if(w>0){r[3]=setTimeout(()=>$h(e,t),w);return}r[2]=0}const _=c.map(w=>({...w,_flight:void 0}));_[d].status="pending";const S=e.startTransition(()=>e.stores.setMatches(_),_).then(w=>(w&&e._pending===r&&r[4]===S&&!r[2]&&(r[2]=Date.now()+m),w));r[4]=S}function uc(e,t){const r=e._pending;r?.[0]===t&&(clearTimeout(r[3]),e._pending=void 0)}function ib(e,t){e._committed=t,e.stores.setMatches(t)}function av(e,t){At(e,t[1]),Ps(e,t)}function QA(e,t,r,s){const o=e._committed,c=e._cache;for(const m of r)m.preload=!1,s&&(m._assetEnd=void 0);const u=X0(r).length,d=new Map,f=Date.now();for(const m of[...o,...c.values()]){if(m.status!=="success"||r.some((g,b)=>g.id===m.id&&(b<u||g.status==="success")))continue;const y=Sn(e,m);!y.options.loader||f-m.updatedAt>=(m.preload?y.options.preloadGcTime??e.options.defaultPreloadGcTime??3e5:y.options.gcTime??e.options.defaultGcTime??3e5)||d.set(m.id,c.get(m.id)===m?m:{...m,_flight:void 0,isFetching:!1,context:{}})}t[3]=[],e._cache=d,ib(e,r),At(e,[...c.values(),...o],[...r,...d.values()]),HA(e,o,r,()=>e._tx===t)}async function Oi(e,t){let r=e._tx;for(;r&&r!==t;){if(await r[5],e._tx===r)return;r=e._tx}}async function sb(e,t,r){await e.navigate({...r.options,replace:!0,ignoreBlocker:!0,_redirects:t[1]+1})}function ab(e,t){uc(e,t),t[0].abort(),At(e,t[3]),t[3]=[],e._tx===t&&(e.batch(()=>{e.stores.status.set("idle"),e.stores.setMatches(e._committed)}),e._tx===t&&(e._commitPromise?.resolve(),e._commitPromise=void 0))}async function XA(e,t,r,s,o){const c=r.map(m=>({...m}));gf(c);for(const m of s)pr(e,c[m[0]]),c[m[0]]=m[3];const u=[t[2],c];let d;try{d=await nb(e,u,s,t[0],t[1],o)}catch(m){throw At(e,c),m}if(ao(d)){At(e,c),d[0]===un&&e._tx===t&&e._committed===r&&await sb(e,t,d[1]);return}const f=await yf(e,d,t[0].signal);if(e._tx!==t||e._committed!==r){At(e,f[1]);return}for(const m of f[1]){const y=e._cache.get(m.id);y?._flight&&y._flight===m._flight&&(e._cache.delete(m.id),pr(e,y))}ib(e,f[1]),At(e,r,f[1])}async function ZA(e,t,r,s,o,c){const u=[t[0],t[1],()=>e._tx===t&&!!t[3].length,e._committed,void 0,o,r,c,s],d=await rb(e,t[2],t[3],u);if(ao(d)){d[0]===un&&e._tx===t?(uc(e,t),At(e,t[3]),t[3]=[],e._tx===t&&await sb(e,t,d[1])):ab(e,t);return}const f=e._pending;if(f?.[0]===t&&(clearTimeout(f[3]),f[4])){const b=t[0].signal;let _=!1;try{_=await Ln(f[4],b)}catch(S){if(S!==b)throw S}if(_&&e._pending===f&&f[0]===t){const S=f[2]-Date.now();if(S>0){try{await Ln(new Promise(w=>{f[3]=setTimeout(w,S)}),b)}catch{}clearTimeout(f[3])}}}if(e._tx!==t){uc(e,t),av(e,d);return}const m=t[2],y=zc(m,e.stores.resolvedLocation.get()),g=d[2];await e.startViewTransition(async()=>{if(e._tx!==t){av(e,d);return}const b=()=>{uc(e,t),QA(e,t,d[1],c),e._tx===t&&(e.emit({type:"onLoad",...y}),e._tx===t&&e.emit({type:"onBeforeRouteMount",...y}))},_=await e.startTransition(b,d[1]);if(e._tx!==t){Ps(e,d);return}g?.length&&XA(e,t,d[1],g,d[3]).catch(console.error),e.batch(()=>{e.stores.resolvedLocation.set(m),e.stores.status.set("idle"),e._tx===t&&e.emit({type:"onResolved",...y}),_&&e._tx===t&&e.emit({type:"onRendered",...y})}),e._tx===t&&(e._commitPromise?.resolve(),e._commitPromise=void 0)})}async function WA(e,t){const r=e._tx,s=e.stores.resolvedLocation.get(),o=s??e.stores.location.get(),c=e.latestLocation,u=e._pendingLocation,d=u?.href===c.href?u._redirects??0:0,f=e._handoff,m=f?.[0](),y=new AbortController,g=e._preflight;if(e._preflight=y,m||f?.[1](),g?.abort(),y.signal.aborted){await Oi(e,r);return}const b=zc(c,s);if(e.emit({type:"onBeforeNavigate",...b}),y.signal.aborted||e.emit({type:"onBeforeLoad",...b}),y.signal.aborted){await Oi(e,r);return}const _=o.href===c.href;let S,w=y;try{S=e.matchRoutes(c,{_controller:y}),gf(S)}catch(k){if(y.abort(),!Uc(k)){await Oi(e),e._commitPromise?.resolve(),e._commitPromise=void 0;return}await e.navigate({...k.options,replace:!0,ignoreBlocker:!0}),await Oi(e,r);return}const A=m?f[1](S):void 0;if(A?w=m:m?.abort(),y.signal.aborted){At(e,S),await Oi(e,r);return}e._preflight=void 0;const T=[w,d,c,S,Date.now(),Promise.resolve().then(()=>ZA(e,T,_,()=>$h(e,T),t?.sync,A)).catch(()=>{e._tx===T&&ab(e,T)})];if(e._tx=T,r){for(const k of e.stores.matches.get()){if(e._tx!==T)break;k.isFetching&&lo(e,k,!1)}r[0].abort(),At(e,r[3],T[3],!0)}if(e._tx!==T){At(e,T[3]),T[3]=[],await Oi(e,T);return}e.batch(()=>{e.stores.status.set("pending"),e.stores.location.set(c)}),!s&&!S.some(k=>k._notFound)&&$h(e,T);try{await T[5]}finally{await Oi(e,T)}}async function ob(e,t,r=0){if(r>20)return;const s=t._builtLocation??e.buildLocation(t),o=e._committed,c=new AbortController;let u;
10try{u=e.matchRoutes(s,{_controller:c}),gf(u)}catch(f){c.abort(),ni(f)||console.error(f);return}(e._preloads??=new Map).set(c,u);let d;try{let f;try{f=await rb(e,s,u,[c,r,()=>!0,o,!0])}finally{d=e._preloads.delete(c),At(e,u),c.abort()}if(!ao(f))return f[1];if(d&&f[0]===un&&!f[1].options.reloadDocument)return ob(e,{...f[1].options,_fromLocation:s},r+1)}catch(f){ni(f)||console.error(f)}}async function eT(e){const t=window.$_TSR,r=e.options.serializationAdapters;r?.length&&(t.t=new Map(r.map(G=>[G.key,G.fromSerializable])),t.buffer.forEach(G=>G())),t.initialized=!0;const s=t.router;e.ssr={manifest:s.manifest},e.options.ssr={nonce:document.querySelector('meta[property="csp-nonce"]')?.content};const o=s.matches,c=new AbortController,u=e._preflight;e._preflight=c,u?.abort();const d=()=>e._preflight===c;let f,m,y,g;try{if(await Ln(e.options.hydrate?.(s.dehydratedData),c.signal),!d())return;const G=e.history.location;y=G.href,g=G.state,e.updateLatestLocation(),f=e.latestLocation,e.stores.location.set(f),m=e.matchRoutes(f,{_controller:c})}catch(G){if(d()&&(e._preflight=void 0),c.abort(G),G!==c.signal)throw G}if(!d())return;const b=[];let _,S=0;const w=G=>{S=Math.min(S,G+1);const J=b.splice(G);for(const ae of J)Sn(e,ae).options.loader&&(ae.status==="success"||!ae.invalid&&"loaderData"in ae)&&tb(e,{...ae,status:"success",error:void 0,preload:!0},e._cache.get(ae.id));At(e,J)},A=o.length>m.length?m.findIndex(G=>G._notFound)+1:o.length;let T=!1;for(let G=0;G<A;G++){const J=m[G],ae=o[G];if(typeof ae.i!="string"||DA(ae.i)!==J.id){_??=G;break}S=G+1;const ze=Sn(e,J);if(("l"in ae||ae.s==="success"&&ae.e===void 0&&ze.options.loader)&&(J.loaderData=ae.l),J.status=ae.s,J.ssr=ae.ssr,ze.options.ssr=J.ssr,J.updatedAt=ae.u,J.error=ae.e,J._notFound||=ae.g,J.status==="error"||J.status==="notFound"||J._notFound){T=!0,b.push(J),(J.ssr===!1||J.ssr==="data-only")&&(_??=G);break}if(J.status==="pending"){_??=G;break}b.push(J),J.ssr==="data-only"&&(_??=G)}!T&&b.length===A&&A<m.length&&(_=A);const k=b.map(async G=>{try{const J=Sn(e,G);return G._notFound?await Promise.all([mr(J),mr(J,"notFoundComponent")]):await mr(J,G.status==="error"?"errorComponent":G.status==="notFound"?"notFoundComponent":void 0),!0}catch{return!1}});let x=0;try{for(;x<k.length&&await Ln(k[x],c.signal);)x++}catch{return}if(!d())return;x<b.length&&w(x);const z=Math.max(_===b.length?b.length+1:b.length,x<k.length?x:S);for(let G=0;G<z;G++){const J=m[G],ae=Sn(e,J),ze=m[G-1]?.context??e.options.context??{};let me;if(ae.options.context){try{me=J._ctx=ae.options.context({deps:J.loaderDeps,params:J.params,context:ze,location:f,navigate:pf(e,f),buildLocation:e.buildLocation,cause:J.cause,abortController:c,preload:!1,matches:m,routeId:ae.id})||{}}catch{if(!d())return;if(J.status!=="error"&&J.status!=="notFound"&&!J._notFound){w(G);break}}if(!d())return}J.context={...ze,...me,...b[G]&&o[G].b}}if(await yf(e,[f,m],c.signal,0,S),!d())return;const F=_!==void 0||b.length<A,U=T&&b.length===A?m:b;let N=F?m:U,I;if(F&&_!==void 0){const G=N[_];I=G.ssr==="data-only"&&S>_+1?S:void 0,N=N.slice(),N[_]={...G,status:"pending",ssr:G.ssr==="data-only"?"data-only":!1,_assetEnd:I}}const K=()=>{const G=e.history.location;return F&&!e._tx&&G.href===y&&G.state===g&&e._committed===U&&U.length&&!c.signal.aborted?c:void 0},ue=[K,G=>{if(e._handoff!==ue)return;e._handoff=void 0;const J=U.length;if(!G||!K()||U.some((me,P)=>me.id!==G[P]?.id)){c.abort();return}let ae=I;if(ae!==void 0){for(let me=J;me<ae;me++)if(m[me]?.id!==G[me]?.id){ae=me>_+1?me:void 0;break}}const ze=U.map(me=>({...me}));ae!==void 0&&(ze[_]._assetEnd=ae),At(e,G.splice(0,J,...ze));for(let me=J;me<G.length;me++){const P=G[me],Q=m[me];Q?.id===P.id&&Q._ctx&&(P._ctx=Q._ctx),P.abortController=c}return J}];e._committed=U,e._handoff=ue,e._preflight=void 0,e.batch(()=>{e.stores.setMatches(N),e.stores.status.set("idle"),F||e.stores.resolvedLocation.set(e.stores.location.get())})}const xn=Symbol.for("TSR_DEFERRED_PROMISE");function tT(e,t){const r=e;return r[xn]||(r[xn]={status:"pending"},r.then(s=>{r[xn].status="success",r[xn].data=s}).catch(s=>{r[xn].status="error",r[xn].error={data:$A(s),__isServerError:!0}})),r}const nT="Error preloading route! âï¸";function lb(e,t){if(e)return typeof e=="string"?e:e[t]}function rT(e){return e?.scriptFormat??"module"}function iT(e,t,r){const s=sT(t),o=lb(r,"script")??s.crossOrigin;return{...rT(e)==="iife"?{rel:"preload",as:"script"}:{rel:"modulepreload"},href:s.href,...o?{crossOrigin:o}:{}}}function sT(e){return typeof e=="string"?{href:e,crossOrigin:void 0}:e}function Fl(e,t){if(t.length===0)return;if(t.length===1){e.push(t[0]);return}const r=new Set;for(const s of t){const o=JSON.stringify(s);
10r.has(o)||(r.add(o),e.push(s))}}function aT(e){return typeof e=="string"?{href:e,crossOrigin:void 0}:e}var cb=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,s=!r?.path&&!r?.id;this.parentRoute=this.options.getParentRoute?.(),s?this._path=Is:this.parentRoute||so();let o=s?Is:r?.path;o&&o!=="/"&&(o=V0(o));const c=r?.id||o;let u=s?Is:oc([this.parentRoute.id==="__root__"?"":this.parentRoute.id,c]);o==="__root__"&&(o="/"),u!=="__root__"&&(u=oc(["/",u]));const d=u==="__root__"?"/":oc([this.parentRoute.fullPath,o]);this._path=o,this._id=u,this._fullPath=d,this._to=hr(d)},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=>gr({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.")}},oT=class extends cb{constructor(e){super(e)}};const yr=Symbol.asyncIterator,ub=Symbol.hasInstance,Bs=Symbol.isConcatSpreadable,vr=Symbol.iterator,db=Symbol.match,hb=Symbol.matchAll,fb=Symbol.replace,pb=Symbol.search,mb=Symbol.species,gb=Symbol.split,yb=Symbol.toPrimitive,$s=Symbol.toStringTag,vb=Symbol.unscopables,bb={[yr]:0,[ub]:1,[Bs]:2,[vr]:3,[db]:4,[hb]:5,[fb]:6,[pb]:7,[mb]:8,[gb]:9,[yb]:10,[$s]:11,[vb]:12},lT={0:yr,1:ub,2:Bs,3:vr,4:db,5:hb,6:fb,7:pb,8:mb,9:gb,10:yb,11:$s,12:vb},cT={2:!0,3:!1,1:void 0,0:null,4:-0,5:Number.POSITIVE_INFINITY,6:Number.NEGATIVE_INFINITY,7:NaN},uT={0:"Error",1:"EvalError",2:"RangeError",3:"ReferenceError",4:"SyntaxError",5:"TypeError",6:"URIError"},dT={0:Error,1:EvalError,2:RangeError,3:ReferenceError,4:SyntaxError,5:TypeError,6:URIError};function ke(e,t,r,s,o,c,u,d,f,m,y,g){return{t:e,i:t,s:r,c:s,m:o,p:c,e:u,a:d,f,b:m,o:y,l:g}}function ri(e){return ke(2,void 0,e,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}const _b=ri(2),wb=ri(3),hT=ri(1),fT=ri(0),pT=ri(4),mT=ri(5),gT=ri(6),yT=ri(7);function vT(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}}function ii(e){let t="",r=0,s;for(let o=0,c=e.length;o<c;o++)s=vT(e[o]),s&&(t+=e.slice(r,o)+s,r=o+1);return r===0?t=e:t+=e.slice(r),t}function bT(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 si(e){return e.replace(/(\\\\|\\"|\\n|\\r|\\b|\\t|\\f|\\u2028|\\u2029|\\x3C)/g,bT)}const Kl="__SEROVAL_REFS__",Sb=new Map,Ls=new Map;function Eb(e){return Sb.has(e)}function _T(e){return Ls.has(e)}function wT(e){if(Eb(e))return Sb.get(e);throw new ZT(e)}function ST(e){if(_T(e))return Ls.get(e);throw new WT(e)}typeof globalThis<"u"?Object.defineProperty(globalThis,Kl,{value:Ls,configurable:!0,writable:!1,enumerable:!1}):typeof window<"u"?Object.defineProperty(window,Kl,{value:Ls,configurable:!0,writable:!1,enumerable:!1}):typeof self<"u"?Object.defineProperty(self,Kl,{value:Ls,configurable:!0,writable:!1,enumerable:!1}):typeof global<"u"&&Object.defineProperty(global,Kl,{value:Ls,configurable:!0,writable:!1,enumerable:!1});function vf(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 ET(e){const t=uT[vf(e)];return e.name!==t?{name:e.name}:e.constructor.name!==t?{name:e.constructor.name}:{}}function Ab(e,t){let r=ET(e);const s=Object.getOwnPropertyNames(e);for(let o=0,c=s.length,u;o<c;o++)u=s[o],u!=="name"&&u!=="message"&&(u==="stack"?t&4&&(r=r||{},r[u]=e[u]):(r=r||{},r[u]=e[u]));return r}function Tb(e){return Object.isFrozen(e)?3:Object.isSealed(e)?2:Object.isExtensible(e)?0:1}
12function AT(e){switch(e){case Number.POSITIVE_INFINITY:return mT;case Number.NEGATIVE_INFINITY:return gT}return e!==e?yT:Object.is(e,-0)?pT:ke(0,void 0,e,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}function Rb(e){return ke(1,void 0,ii(e),void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}function TT(e){return ke(3,void 0,""+e,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}function RT(e){return ke(4,e,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}function OT(e,t){const r=t.valueOf();return ke(5,e,r!==r?"":t.toISOString(),void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}function Yr(e,t,r){return ke(36,e,r.toString(),t,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}function CT(e,t){return ke(6,e,void 0,ii(t.source),t.flags,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}function kT(e,t){return ke(17,e,bb[t],void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}function xT(e,t){return ke(18,e,ii(wT(t)),void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}function jT(e,t,r){return ke(25,e,r,ii(t),void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}function NT(e,t,r){return ke(9,e,void 0,void 0,void 0,void 0,void 0,r,void 0,void 0,Tb(t),void 0)}function MT(e,t){return ke(21,e,void 0,void 0,void 0,void 0,void 0,void 0,t,void 0,void 0,void 0)}function DT(e,t,r){return ke(15,e,void 0,t.constructor.name,void 0,void 0,void 0,void 0,r,t.byteOffset,void 0,t.length)}function LT(e,t,r){return ke(16,e,void 0,t.constructor.name,void 0,void 0,void 0,void 0,r,t.byteOffset,void 0,t.length)}function UT(e,t,r){return ke(20,e,void 0,void 0,void 0,void 0,void 0,void 0,r,t.byteOffset,void 0,t.byteLength)}function zT(e,t,r){return ke(13,e,vf(t),void 0,ii(t.message),r,void 0,void 0,void 0,void 0,void 0,void 0)}function IT(e,t,r){return ke(14,e,vf(t),void 0,ii(t.message),r,void 0,void 0,void 0,void 0,void 0,void 0)}function PT(e,t){return ke(7,e,void 0,void 0,void 0,void 0,void 0,t,void 0,void 0,void 0,void 0)}function BT(e,t){return ke(28,void 0,void 0,void 0,void 0,void 0,void 0,[e,t],void 0,void 0,void 0,void 0)}function $T(e,t){return ke(30,void 0,void 0,void 0,void 0,void 0,void 0,[e,t],void 0,void 0,void 0,void 0)}function HT(e,t,r){return ke(31,e,void 0,void 0,void 0,void 0,void 0,r,t,void 0,void 0,void 0)}function qT(e,t){return ke(32,e,void 0,void 0,void 0,void 0,void 0,void 0,t,void 0,void 0,void 0)}function VT(e,t){return ke(33,e,void 0,void 0,void 0,void 0,void 0,void 0,t,void 0,void 0,void 0)}function GT(e,t){return ke(34,e,void 0,void 0,void 0,void 0,void 0,void 0,t,void 0,void 0,void 0)}function YT(e,t,r,s){return ke(35,e,r,void 0,void 0,void 0,void 0,t,void 0,void 0,void 0,s)}const FT={parsing:1,serialization:2,deserialization:3};function KT(e){return`Seroval Error (step: ${FT[e]})`}const JT=(e,t)=>KT(e);var Ob=class extends Error{constructor(e,t){super(JT(e)),this.cause=t}},ov=class extends Ob{constructor(e){super("parsing",e)}},QT=class extends Ob{constructor(e){super("deserialization",e)}};function br(e){return`Seroval Error (specific: ${e})`}var Pc=class extends Error{constructor(e){super(br(1)),this.value=e}},bf=class extends Error{constructor(e){super(br(2))}},XT=class extends Error{constructor(e){super(br(3))}},Bc=class extends Error{constructor(e){super(br(4))}},ZT=class extends Error{constructor(e){super(br(5)),this.value=e}},WT=class extends Error{constructor(e){super(br(6))}},eR=class extends Error{constructor(e){super(br(7))}},hn=class extends Error{constructor(e){super(br(8))}},Cb=class extends Error{constructor(e){super(br(9))}},tR=class{constructor(e,t){this.value=e,this.replacement=t}};const _f=()=>{const e={p:0,s:0,f:0};return e.p=new Promise((t,r)=>{e.s=t,e.f=r}),e},nR=()=>{const e=[],t=[];let r=!0,s=!1,o=0;const c={flush(u,d,f){for(f=0;f<o;f++)t[f]&&t[f][d](u)},up(u,d,f,m){for(d=0,f=e.length;d<f;d++)m=e[d],!r&&d===f-1?u[s?"return":"throw"](m):u.next(m)},on(u,d){return r&&(d=o++,t[d]=u),c.up(u),()=>{r&&(t[d]=t[o],t[o--]=void 0)}}};return{__SEROVAL_STREAM__:!0,on(u){return c.on(u)},next(u){r&&(e.push(u),c.flush(u,"next"))},throw(u){r&&(e.push(u),c.flush(u,"throw"),r=!1,s=!1,t.length=0)},return(u){r&&(e.push(u),c.flush(u,"return"),r=!1,s=!0,t.length=0)}}}
12,rR=e=>t=>()=>{let r=0;const s={[e](){return s},next(){if(r>t.d)return{done:!0,value:void 0};const o=r++,c=t.v[o];if(o===t.t)throw c;return{done:o===t.d,value:c}}};return s},iR=(e,t)=>r=>()=>{let s=0,o=-1,c=!1;const u=[],d=[],f={finalize(y=0,g=d.length){for(;y<g;y++)d[y].s({done:!0,value:void 0})}};r.on({next(y){const g=d.shift();g&&g.s({done:!1,value:y}),u.push(y)},throw(y){const g=d.shift();g&&g.f(y),f.finalize(),o=u.length,c=!0,u.push(y)},return(y){const g=d.shift();g&&g.s({done:!0,value:y}),f.finalize(),o=u.length,u.push(y)}});const m={[e](){return m},next(){if(o===-1){const b=s++;if(b>=u.length){const _=t();return d.push(_),_.p}return{done:!1,value:u[b]}}if(s>o)return{done:!0,value:void 0};const y=s++,g=u[y];if(y!==o)return{done:!1,value:g};if(c)throw g;return{done:!0,value:g}}};return m},sR=e=>{const t=atob(e),r=t.length,s=new Uint8Array(r);for(let o=0;o<r;o++)s[o]=t.charCodeAt(o);return s.buffer};function aR(e){return"__SEROVAL_SEQUENCE__"in e}function kb(e,t,r){return{__SEROVAL_SEQUENCE__:!0,v:e,t,d:r}}function oR(e){const t=[];let r=-1,s=-1;const o=e[vr]();for(;;)try{const c=o.next();if(t.push(c.value),c.done){s=t.length-1;break}}catch(c){r=t.length,t.push(c)}return kb(t,r,s)}const lR=rR(vr);function cR(e){return lR(e)}const uR={},dR={},hR={0:{},1:{},2:{},3:{},4:{},5:{}};function fR(e){return"__SEROVAL_STREAM__"in e}function Ii(){return nR()}function pR(e){const t=Ii(),r=e[yr]();async function s(){try{const o=await r.next();o.done?t.return(o.value):(t.next(o.value),await s())}catch(o){t.throw(o)}}return s().catch(()=>{}),t}const mR=iR(yr,_f);function gR(e){return mR(e)}async function yR(e){try{return[1,await e]}catch(t){return[0,t]}}function vR(e,t){return{plugins:t.plugins,mode:e,marked:new Set,features:127^(t.disabledFeatures||0),refs:t.refs||new Map,depthLimit:t.depthLimit||1e3}}function dc(e,t){e.marked.add(t)}function bR(e,t){const r=e.refs.size;return e.refs.set(t,r),r}function $c(e,t){const r=e.refs.get(t);return r!=null?(dc(e,r),{type:1,value:RT(r)}):{type:0,value:bR(e,t)}}function wf(e,t){const r=$c(e,t);return r.type===1?r:Eb(t)?{type:2,value:xT(r.value,t)}:r}function Mi(e,t){const r=wf(e,t);if(r.type!==0)return r.value;if(t in bb)return kT(r.value,t);throw new Pc(t)}function Hc(e,t){const r=$c(e,hR[t]);return r.type===1?r.value:ke(26,r.value,t,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}function _R(e){const t=$c(e,uR);return t.type===1?t.value:ke(27,t.value,void 0,void 0,void 0,void 0,void 0,void 0,Mi(e,vr),void 0,void 0,void 0)}function wR(e){const t=$c(e,dR);return t.type===1?t.value:ke(29,t.value,void 0,void 0,void 0,void 0,void 0,[Hc(e,1),Mi(e,yr)],void 0,void 0,void 0,void 0)}function SR(e,t,r,s){return ke(r?11:10,e,void 0,void 0,void 0,s,void 0,void 0,void 0,void 0,Tb(t),void 0)}function ER(e,t,r,s){return ke(8,t,void 0,void 0,void 0,void 0,{k:r,v:s},void 0,Hc(e,0),void 0,void 0,void 0)}function AR(e,t,r){const s=new Uint8Array(r);let o="";for(let c=0,u=s.length;c<u;c++)o+=String.fromCharCode(s[c]);return ke(19,t,ii(btoa(o)),void 0,void 0,void 0,void 0,void 0,Hc(e,5),void 0,void 0,void 0)}function TR(e,t){return{base:vR(e,t),child:void 0}}var RR=class{constructor(e,t){this._p=e,this.depth=t}parse(e){return dt(this._p,this.depth,e)}};async function OR(e,t,r){const s=[];for(let o=0,c=r.length;o<c;o++)o in r?s[o]=await dt(e,t,r[o]):s[o]=0;return s}async function CR(e,t,r,s){return NT(r,s,await OR(e,t,s))}async function Sf(e,t,r){const s=Object.entries(r),o=[],c=[];for(let u=0,d=s.length;u<d;u++)o.push(ii(s[u][0])),c.push(await dt(e,t,s[u][1]));return vr in r&&(o.push(Mi(e.base,vr)),c.push(BT(_R(e.base),await dt(e,t,oR(r))))),yr in r&&(o.push(Mi(e.base,yr)),c.push($T(wR(e.base),await dt(e,t,pR(r))))),$s in r&&(o.push(Mi(e.base,$s)),c.push(Rb(r[$s]))),Bs in r&&(o.push(Mi(e.base,Bs)),c.push(r[Bs]?_b:wb)),{k:o,v:c}}async function vh(e,t,r,s,o){return SR(r,s,o,await Sf(e,t,s))}async function kR(e,t,r,s){return MT(r,await dt(e,t,s.valueOf()))}async function xR(e,t,r,s){return DT(r,s,await dt(e,t,s.buffer))}async function jR(e,t,r,s){return LT(r,s,await dt(e,t,s.buffer))}async function NR(e,t,r,s){return UT(r,s,await dt(e,t,s.buffer))}async function lv(e,t,r,s){const o=Ab(s,e.base.features);return zT(r,s,o?await Sf(e,t,o):void 0)}async function MR(e,t,r,s){const o=Ab(s,e.base.features);return IT(r,s,o?await Sf(e,t,o):void 0)}async function DR(e,t,r,s){const o=[],c=[];for(const[u,d]of s.entries())o.push(await dt(e,t,u)),c.push(await dt(e,t,d));return ER(e.base,r,o,c)}async function LR(e,t,r,s){const o=[];for(const c of s.keys())o.push(await dt(e,t,c));return PT(r,o)}async function xb(e,t,r,s){const o=e.base.plugins;if(o)for(let c=0,u=o.length;c<u;c++){const d=o[c];if(d.parse.async&&d.test(s))return jT(r,d.tag,await d.parse.async(s,new RR(e,t),{id:r}))}}async function UR(e,t,r,s){const[o,c]=await yR(s);return ke(12,r,o,void 0,void 0,void 0,void 0,void 0,await dt(e,t,c),void 0,void 0,void 0)}function zR(e,t,r,s,o){const c=[],u=r.on({next:d=>{dc(this.base,t),dt(this,e,d).then(f=>{c.push(qT(t,f))},f=>{o(f),u()})},throw:d=>{dc(this.base,t),dt(this,e,d).then(f=>{c.push(VT(t,f)),s(c),u()},f=>{o(f),u()})},return:d=>{dc(this.base,t),dt(this,e,d).then(f=>{c.push(GT(t,f)),s(c),u()},f=>{o(f),u()})}})}async function IR(e,t,r,s){return HT(r,Hc(e.base,4),await new Promise(zR.bind(e,t,r,s)))}async function PR(e,t,r,s){const o=[];for(let c=0,u=s.v.length;c<u;c++)o[c]=await dt(e,t,s.v[c]);return YT(r,o,s.t,s.d)}async function BR(e,t,r,s){if(Array.isArray(s))return CR(e,t,r,s);if(fR(s))return IR(e,t,r,s);if(aR(s))return PR(e,t,r,s);let o=s.constructor;if(o!==void 0&&typeof o!="function"){const d=Object.getPrototypeOf(s);o=d===null?void 0:d.constructor}if(o===tR)return dt(e,t,s.replacement);const c=await xb(e,t,r,s);if(c)return c;switch(o){case Object:return vh(e,t,r,s,!1);case void 0:return vh(e,t,r,s,!0);
12case Date:return OT(r,s);case Error:case EvalError:case RangeError:case ReferenceError:case SyntaxError:case TypeError:case URIError:return lv(e,t,r,s);case Number:case Boolean:case String:case BigInt:return kR(e,t,r,s);case ArrayBuffer:return AR(e.base,r,s);case Int8Array:case Int16Array:case Int32Array:case Uint8Array:case Uint16Array:case Uint32Array:case Uint8ClampedArray:case Float32Array:case Float64Array:return xR(e,t,r,s);case DataView:return NR(e,t,r,s);case Map:return DR(e,t,r,s);case Set:return LR(e,t,r,s)}if(o===Promise||s instanceof Promise)return UR(e,t,r,s);const u=e.base.features;if(u&32&&o===RegExp)return CT(r,s);if(u&16)switch(o){case BigInt64Array:case BigUint64Array:return jR(e,t,r,s)}if(u&1&&typeof AggregateError<"u"&&(o===AggregateError||s instanceof AggregateError))return MR(e,t,r,s);if(u&64&&typeof Temporal<"u")switch(o){case Temporal.Instant:return Yr(r,0,s);case Temporal.Duration:return Yr(r,1,s);case Temporal.PlainDate:return Yr(r,2,s);case Temporal.PlainDateTime:return Yr(r,3,s);case Temporal.PlainMonthDay:return Yr(r,4,s);case Temporal.PlainTime:return Yr(r,5,s);case Temporal.PlainYearMonth:return Yr(r,6,s);case Temporal.ZonedDateTime:return Yr(r,7,s)}if(s instanceof Error)return lv(e,t,r,s);if(vr in s||yr in s)return vh(e,t,r,s,!!o);throw new Pc(s)}async function $R(e,t,r){const s=wf(e.base,r);if(s.type!==0)return s.value;const o=await xb(e,t,s.value,r);if(o)return o;throw new Pc(r)}async function dt(e,t,r){if(t>=e.base.depthLimit)throw new Cb(e.base.depthLimit);switch(typeof r){case"boolean":return r?_b:wb;case"undefined":return hT;case"string":return Rb(r);case"number":return AT(r);case"bigint":return TT(r);case"object":if(r){const s=wf(e.base,r);return s.type===0?await BR(e,t+1,s.value,r):s.value}return fT;case"symbol":return Mi(e.base,r);case"function":return $R(e,t,r);default:throw new Pc(r)}}async function HR(e,t){try{return await dt(e,0,t)}catch(r){throw r instanceof ov?r:new ov(r)}}function jb(e,t){for(let r=0,s=t.length;r<s;r++){const o=t[r];e.has(o)||(e.add(o),o.extends&&jb(e,o.extends))}}function Nb(e){if(e){const t=new Set;return jb(t,e),[...t]}}function qR(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 eR(e)}}function VR(e){switch(e){case"constructor":case"__proto__":case"prototype":case"__defineGetter__":case"__defineSetter__":case"__lookupGetter__":case"__lookupSetter__":return!1;default:return!0}}function GR(e){switch(e){case yr:case Bs:case $s:case vr:return!0;default:return!1}}const YR=1e6,FR=1e4,KR=2e4;function Mb(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}}const JR=1e3;function QR(e,t){var r;const s=t.refs||new Map;return"types"in s||Object.assign(s,{types:new Map}),{mode:e,plugins:t.plugins,refs:s,features:(r=t.features)!==null&&r!==void 0?r:127^(t.disabledFeatures||0),depthLimit:t.depthLimit||JR}}function XR(e){return{mode:2,base:QR(2,e),child:void 0}}var ZR=class{constructor(e,t){this._p=e,this.depth=t}deserialize(e){return qe(this._p,this.depth,e)}};function Db(e,t){if(t<0||!Number.isFinite(t)||!Number.isInteger(t))throw new hn({t:4,i:t});if(e.refs.has(t))throw new Error("Conflicted ref id: "+t)}function Lb(e){return!!e&&typeof e=="object"&&"then"in e&&typeof e.then=="function"}function WR(e,t,r){return Db(e.base,t),e.state.marked.has(t)&&e.base.refs.set(t,r),r}function e1(e,t,r){return Db(e.base,t),e.base.refs.set(t,r),r}function at(e,t,r){return e.mode===1?WR(e,t,r):e1(e,t,r)}function Hh(e,t,r){if(Object.hasOwn(t,r))return t[r];throw new hn(e)}function t1(e,t){return at(e,t.i,ST(si(t.s)))}function n1(e,t,r){const s=r.a,o=s.length,c=at(e,r.i,new Array(o));for(let u=0,d;u<o;u++)d=s[u],d&&(c[u]=qe(e,t,d));return Mb(c,r.o),c}function cv(e,t,r){VR(t)?e[t]=r:Object.defineProperty(e,t,{value:r,configurable:!0,enumerable:!0,writable:!0})}function r1(e,t,r,s,o){if(typeof s=="string")cv(r,si(s),qe(e,t,o));else{const c=qe(e,t,s);switch(typeof c){case"string":cv(r,c,qe(e,t,o));break;case"symbol":GR(c)&&(r[c]=qe(e,t,o));break;default:throw new hn(s)}}}function Ub(e,t,r){e.base.refs.types.set(t,r)}function qc(e,t,r,s){if(e.base.refs.types.get(r)!==s)throw new hn(t)}function zb(e,t,r,s){const o=r.k;if(o.length>0)for(let c=0,u=r.v,d=o.length;c<d;c++)r1(e,t,s,o[c],u[c]);return s}function i1(e,t,r){const s=at(e,r.i,r.t===10?{}:Object.create(null));return zb(e,t,r.p,s),Mb(s,r.o),s}function s1(e,t){return at(e,t.i,new Date(t.s))}function a1(e,t){if(!(e.base.features&64))throw new bf(t);let r;switch(t.c){case 0:r=Temporal.Instant.from(t.s);break;case 1:r=Temporal.Duration.from(t.s);break;case 2:r=Temporal.PlainDate.from(t.s);break;case 3:r=Temporal.PlainDateTime.from(t.s);break;case 4:r=Temporal.PlainMonthDay.from(t.s);break;case 5:r=Temporal.PlainTime.from(t.s);break;case 6:r=Temporal.PlainYearMonth.from(t.s);break;case 7:r=Temporal.ZonedDateTime.from(t.s);break;default:throw new hn(t)}return at(e,t.i,r)}function o1(e,t){if(e.base.features&32){const r=si(t.c);if(r.length>KR)throw new hn(t);return at(e,t.i,new RegExp(r,t.m))}throw new bf(t)}function l1(e,t,r){const s=at(e,r.i,new Set);for(let o=0,c=r.a,u=c.length;o<u;o++)s.add(qe(e,t,c[o]));return s}function c1(e,t,r){const s=at(e,r.i,new Map);for(let o=0,c=r.e.k,u=r.e.v,d=c.length;o<d;o++)s.set(qe(e,t,c[o]),qe(e,t,u[o]));return s}function u1(e,t){if(t.s.length>YR)throw new hn(t);return at(e,t.i,sR(si(t.s)))}function d1(e,t,r){var s;const o=qR(r.c),c=qe(e,t,r.f),u=(s=r.b)!==null&&s!==void 0?s:0;if(u<0||u>c.byteLength)throw new hn(r);return at(e,r.i,new o(c,u,r.l))}function h1(e,t,r){var s;const o=qe(e,t,r.f),c=(s=r.b)!==null&&s!==void 0?s:0;if(c<0||c>o.byteLength)throw new hn(r);return at(e,r.i,new DataView(o,c,r.l))}function Ib(e,t,r,s){if(r.p){const o=zb(e,t,r.p,{});Object.defineProperties(s,Object.getOwnPropertyDescriptors(o))}return s}function f1(e,t,r){return Ib(e,t,r,at(e,r.i,new AggregateError([],si(r.m))))}function p1(e,t,r){const s=Hh(r,dT,r.s);return Ib(e,t,r,at(e,r.i,new s(si(r.m))))}function m1(e,t,r){const s=_f(),o=at(e,r.i,s.p),c=qe(e,t,r.f);if(Lb(c))throw new hn(r.f);return r.s?s.s(c):s.f(c),o}function g1(e,t,r){return at(e,r.i,Object(qe(e,t,r.f)))}function y1(e,t,r){const s=e.base.plugins;if(s){const o=si(r.c);for(let c=0,u=s.length;c<u;c++){const d=s[c];if(d.tag===o)return at(e,r.i,d.deserialize(r.s,new ZR(e,t),{id:r.i}))}}throw new XT(r.c)}function v1(e,t){const r=at(e,t.i,at(e,t.s,_f()).p);return Ub(e,t.s,22),r}function b1(e,t,r){const s=e.base.refs.get(r.i);if(s){qc(e,r,r.i,22);const o=qe(e,t,r.a[1]);if(Lb(o))throw new hn(r.a[1]);r.t===23?s.s(o):s.f(o);return}throw new Bc("Promise")}function _1(e,t,r){return qe(e,t,r.a[0]),cR(qe(e,t,r.a[1]))}function w1(e,t,r){return qe(e,t,r.a[0]),gR(qe(e,t,r.a[1]))}function S1(e,t,r){const s=at(e,r.i,Ii());Ub(e,r.i,31);const o=r.a,c=o.length;if(c)for(let u=0;u<c;u++)qe(e,t,o[u]);return s}function E1(e,t,r){const s=e.base.refs.get(r.i);if(s){qc(e,r,r.i,31),s.next(qe(e,t,r.f));return}throw new Bc("Stream")}function A1(e,t,r){const s=e.base.refs.get(r.i);if(s){qc(e,r,r.i,31),s.throw(qe(e,t,r.f));return}throw new Bc("Stream")}function T1(e,t,r){const s=e.base.refs.get(r.i);if(s){qc(e,r,r.i,31),s.return(qe(e,t,r.f));return}throw new Bc("Stream")}function R1(e,t,r){qe(e,t,r.f)}function O1(e,t,r){qe(e,t,r.a[1])}function C1(e,t,r){const s=at(e,r.i,kb([],r.s,r.l));for(let o=0,c=r.a.length;o<c;o++)s.v[o]=qe(e,t,r.a[o]);return s}function qe(e,t,r){if(t>e.base.depthLimit)throw new Cb(e.base.depthLimit);
12switch(t+=1,r.t){case 2:return Hh(r,cT,r.s);case 0:return Number(r.s);case 1:return si(String(r.s));case 3:if(String(r.s).length>FR)throw new hn(r);return BigInt(r.s);case 4:return e.base.refs.get(r.i);case 18:return t1(e,r);case 9:return n1(e,t,r);case 10:case 11:return i1(e,t,r);case 5:return s1(e,r);case 6:return o1(e,r);case 7:return l1(e,t,r);case 8:return c1(e,t,r);case 19:return u1(e,r);case 16:case 15:return d1(e,t,r);case 20:return h1(e,t,r);case 14:return f1(e,t,r);case 13:return p1(e,t,r);case 12:return m1(e,t,r);case 17:return Hh(r,lT,r.s);case 21:return g1(e,t,r);case 25:return y1(e,t,r);case 22:return v1(e,r);case 23:case 24:return b1(e,t,r);case 28:return _1(e,t,r);case 30:return w1(e,t,r);case 31:return S1(e,t,r);case 32:return E1(e,t,r);case 33:return A1(e,t,r);case 34:return T1(e,t,r);case 27:return R1(e,t,r);case 29:return O1(e,t,r);case 35:return C1(e,t,r);case 36:return a1(e,r);default:throw new bf(r)}}function k1(e,t){try{return qe(e,0,t)}catch(r){throw new QT(r)}}function uv(e,t){return k1(XR({plugins:Nb(t.plugins),refs:t.refs,features:t.features,disabledFeatures:t.disabledFeatures,depthLimit:t.depthLimit}),e)}async function x1(e,t={}){const r=TR(1,{plugins:Nb(t.plugins),disabledFeatures:t.disabledFeatures});return{t:await HR(r,e),f:r.base.features,m:Array.from(r.base.marked)}}function j1(e){return{tag:"$TSR/t/"+e.key,test:e.test,parse:{sync(t,r,s){return{v:r.parse(e.toSerializable(t))}},async async(t,r,s){return{v:await r.parse(e.toSerializable(t))}},stream(t,r,s){return{v:r.parse(e.toSerializable(t))}}},serialize:void 0,deserialize(t,r,s){return e.fromSerializable(r.deserialize(t.v))}}}var N1=class{constructor(e,t){this.stream=e,this.hint=t?.hint??"binary"}};const Sc=globalThis.Buffer,Pb=!!Sc&&typeof Sc.from=="function";function Bb(e){if(e.length===0)return"";if(Pb)return Sc.from(e).toString("base64");const t=32768,r=[];for(let s=0;s<e.length;s+=t){const o=e.subarray(s,s+t);r.push(String.fromCharCode.apply(null,o))}return btoa(r.join(""))}function $b(e){if(e.length===0)return new Uint8Array(0);if(Pb){const s=Sc.from(e,"base64");return new Uint8Array(s.buffer,s.byteOffset,s.byteLength)}const t=atob(e),r=new Uint8Array(t.length);for(let s=0;s<t.length;s++)r[s]=t.charCodeAt(s);return r}const Ya=Object.create(null),Fa=Object.create(null),M1=e=>new ReadableStream({start(t){e.on({next(r){try{t.enqueue($b(r))}catch{}},throw(r){t.error(r)},return(){try{t.close()}catch{}}})}}),D1=new TextEncoder,L1=e=>new ReadableStream({start(t){e.on({next(r){try{typeof r=="string"?t.enqueue(D1.encode(r)):t.enqueue($b(r.$b64))}catch{}},throw(r){t.error(r)},return(){try{t.close()}catch{}}})}}),U1="(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;i++)a[i]=d.charCodeAt(i);c.enqueue(a)}catch(_){}},throw(e){c.error(e)},return(){try{c.close()}catch(_){}}})}}))",z1="(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 dv(e){const t=Ii(),r=e.getReader();return(async()=>{try{for(;;){const{done:s,value:o}=await r.read();if(s){t.return(void 0);break}t.next(Bb(o))}}catch(s){t.throw(s)}finally{r.releaseLock()}})(),t}function hv(e){const t=Ii(),r=e.getReader(),s=new TextDecoder("utf-8",{fatal:!0});return(async()=>{try{for(;;){const{done:o,value:c}=await r.read();if(o){try{const u=s.decode();u.length>0&&t.next(u)}catch{}t.return(void 0);break}try{const u=s.decode(c,{stream:!0});u.length>0&&t.next(u)}catch{t.next({$b64:Bb(c)})}}}catch(o){t.throw(o)}finally{r.releaseLock()}})(),t}const I1={tag:"tss/RawStream",extends:[{tag:"tss/RawStreamFactory",test(e){return e===Ya},parse:{sync(e,t,r){return{}},async async(e,t,r){return{}},stream(e,t,r){return{}}},serialize(e,t,r){return U1},deserialize(e,t,r){return Ya}},{tag:"tss/RawStreamFactoryText",test(e){return e===Fa},parse:{sync(e,t,r){return{}},async async(e,t,r){return{}},stream(e,t,r){return{}}},serialize(e,t,r){return z1},deserialize(e,t,r){return Fa}}],test(e){return e instanceof N1},parse:{sync(e,t,r){const s=e.hint==="text"?Fa:Ya;return{hint:t.parse(e.hint),factory:t.parse(s),stream:t.parse(Ii())}},async async(e,t,r){const s=e.hint==="text"?Fa:Ya,o=e.hint==="text"?hv(e.stream):dv(e.stream);return{hint:await t.parse(e.hint),factory:await t.parse(s),stream:await t.parse(o)}},stream(e,t,r){const s=e.hint==="text"?Fa:Ya,o=e.hint==="text"?hv(e.stream):dv(e.stream);return{hint:t.parse(e.hint),factory:t.parse(s),stream:t.parse(o)}}},serialize(e,t,r){return"("+t.serialize(e.factory)+")("+t.serialize(e.stream)+")"},deserialize(e,t,r){const s=t.deserialize(e.stream);return t.deserialize(e.hint)==="text"?L1(s):M1(s)}};function P1(e){return{tag:"tss/RawStream",test:()=>!1,parse:{}
12,serialize(){throw new Error("RawStreamDeserializePlugin.serialize should not be called. Client only deserializes.")},deserialize(t,r,s){return e(typeof r?.deserialize=="function"?r.deserialize(t.streamId):t.streamId)}}}const B1={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))}},Jr={},Hb=e=>new ReadableStream({start(t){e.on({next(r){try{t.enqueue(r)}catch{}},throw(r){t.error(r)},return(){try{t.close()}catch{}}})}}),$1={tag:"seroval-plugins/web/ReadableStreamFactory",test(e){return e===Jr},parse:{sync(){return Jr},async async(){return await Promise.resolve(Jr)},stream(){return Jr}},serialize(){return Hb.toString()},deserialize(){return Jr}};async function qb(e,t){try{const r=await t.read();r.done?(e.return(r.value),t.releaseLock()):(e.next(r.value),await qb(e,t))}catch(r){e.throw(r)}}function H1(e){e.cancel().catch(()=>{}),e.releaseLock()}function fv(e){const t=Ii(),r=e.getReader(),s=H1.bind(null,r);return qb(t,r).catch(s),[t,s]}const q1={tag:"seroval/plugins/web/ReadableStream",extends:[$1],test(e){return typeof ReadableStream>"u"?!1:e instanceof ReadableStream},parse:{sync(e,t){return{factory:t.parse(Jr),stream:t.parse(Ii())}},async async(e,t){return{factory:await t.parse(Jr),stream:await t.parse(fv(e)[0])}},stream(e,t){const[r,s]=fv(e);return t.addCleanup(s),{factory:t.parse(Jr),stream:t.parse(r)}}},serialize(e,t){return"("+t.serialize(e.factory)+")("+t.serialize(e.stream)+")"},deserialize(e,t){const r=t.deserialize(e.stream);return Hb(r)}},V1=[B1,I1,q1];function G1(){return[...uf()?.serializationAdapters?.map(j1)??[],...V1]}var pv=new TextDecoder,Y1=new Uint8Array(0),mv=16*1024*1024,gv=32*1024*1024,yv=1024,vv=1e5;function F1(e){const t=new Map,r=new Map,s=new Set;let o=!1,c=null,u=0,d;const f=new ReadableStream({start(g){d=g},cancel(){o=!0;try{c?.cancel()}catch{}t.forEach(g=>{try{g.error(new Error("Framed response cancelled"))}catch{}}),t.clear(),r.clear(),s.clear()}});function m(g){const b=r.get(g);if(b)return b;if(s.has(g))return new ReadableStream({start(S){S.close()}});if(r.size>=yv)throw new Error(`Too many raw streams in framed response (max ${yv})`);const _=new ReadableStream({start(S){t.set(g,S)},cancel(){s.add(g),t.delete(g),r.delete(g)}});return r.set(g,_),_}function y(g){return m(g),t.get(g)}return(async()=>{const g=e.getReader();c=g;const b=[];let _=0;function S(){if(_<9)return null;const A=b[0];if(A.length>=9)return{type:A[0],streamId:(A[1]<<24|A[2]<<16|A[3]<<8|A[4])>>>0,length:(A[5]<<24|A[6]<<16|A[7]<<8|A[8])>>>0};const T=new Uint8Array(9);let k=0,x=9;for(let z=0;z<b.length&&x>0;z++){const F=b[z],U=Math.min(F.length,x);T.set(F.subarray(0,U),k),k+=U,x-=U}return{type:T[0],streamId:(T[1]<<24|T[2]<<16|T[3]<<8|T[4])>>>0,length:(T[5]<<24|T[6]<<16|T[7]<<8|T[8])>>>0}}function w(A){if(A===0)return Y1;const T=b[0];if(T&&T.length>=A){const F=T.subarray(0,A);return T.length===A?b.shift():b[0]=T.subarray(A),_-=A,F}const k=new Uint8Array(A);let x=0,z=A;for(;z>0&&b.length>0;){const F=b[0];if(!F)break;const U=Math.min(F.length,z);k.set(F.subarray(0,U),x),x+=U,z-=U,U===F.length?b.shift():b[0]=F.subarray(U)}return _-=A,k}try{for(;;){const{done:A,value:T}=await g.read();if(o||A)break;if(T){if(_+T.length>gv)throw new Error(`Framed response buffer exceeded ${gv} bytes`);for(b.push(T),_+=T.length;;){const k=S();if(!k)break;const{type:x,streamId:z,length:F}=k;if(x!==sr.JSON&&x!==sr.CHUNK&&x!==sr.END&&x!==sr.ERROR)throw new Error(`Unknown frame type: ${x}`);if(x===sr.JSON){if(z!==0)throw new Error("Invalid JSON frame streamId (expected 0)")}else if(z===0)throw new Error("Invalid raw frame streamId (expected non-zero)");if(F>mv)throw new Error(`Frame payload too large: ${F} bytes (max ${mv})`);const U=9+F;if(_<U)break;if(++u>vv)throw new Error(`Too many frames in framed response (max ${vv})`);w(9);const N=w(F);switch(x){case sr.JSON:try{d.enqueue(pv.decode(N))}catch{}break;case sr.CHUNK:{const I=y(z);I&&I.enqueue(N);break}case sr.END:{const I=y(z);if(s.add(z),I){try{I.close()}catch{}t.delete(z)}break}case sr.ERROR:{const I=y(z);if(s.add(z),I){const K=pv.decode(N);I.error(new Error(K)),t.delete(z)}break}}}}}if(_!==0)throw new Error("Incomplete frame at end of framed response");try{d.close()}catch{}t.forEach(A=>{try{A.close()}catch{}}),t.clear()}catch(A){try{d.error(A)}catch{}t.forEach(T=>{try{T.error(A)}catch{}}),t.clear()}finally{try{g.releaseLock()}catch{}c=null}}
12)(),{getStream:m,chunks:f}}var co=null;async function qh(e){e.length>0&&await Promise.allSettled(e)}var K1=Object.prototype.hasOwnProperty;function Vb(e){for(const t in e)if(K1.call(e,t))return!0;return!1}async function J1(e,t,r){co||(co=G1());const s=t[0],o=s.fetch??r,c=s.data instanceof FormData?"formData":"payload",u=s.headers?new Headers(s.headers):new Headers;if(u.set("x-tsr-serverFn","true"),c==="payload"&&u.set("accept",`${YE}, application/x-ndjson, application/json`),s.method==="GET"){if(c==="formData")throw new Error("FormData is not supported with GET requests");const f=await Gb(s);if(f!==void 0){const m=K0({payload:f});e.includes("?")?e+=`&${m}`:e+=`?${m}`}}let d;return s.method==="POST"&&(d=await Q1(s),typeof d=="string"&&u.set("content-type","application/json")),await X1(async()=>o(e,{method:s.method,headers:u,signal:s.signal,body:d}))}async function Gb(e){let t=!1;const r={};if(e.data!==void 0&&(t=!0,r.data=e.data),e.context&&Vb(e.context)&&(t=!0,r.context=e.context),t)return Yb(r)}async function Yb(e){return JSON.stringify(await Promise.resolve(x1(e,{plugins:co})))}async function Q1(e){if(e.data instanceof FormData){let r;return e.context&&Vb(e.context)&&(r=await Yb(e.context)),r!==void 0&&e.data.set(GE,r),e.data}const t=await Gb(e);if(t)return t}async function X1(e){let t;try{t=await e()}catch(s){if(s instanceof Response)t=s;else throw console.log(s),s}if(t.headers.get("x-tss-raw")==="true")return t;const r=t.headers.get("content-type");if(r||so(),t.headers.get("x-tss-serialized")){let s;if(r.includes("application/x-tss-framed")){if(JE(r),!t.body)throw new Error("No response body for framed response");const{getStream:o,chunks:c}=F1(t.body),u=[P1(o),...co||[]],d=new Map;s=await Z1({jsonStream:c,onMessage:f=>uv(f,{refs:d,plugins:u}),onError(f,m){console.error(f,m)}})}else if(r.includes("application/json")){const o=await t.json(),c=[];s=uv(o,{plugins:co}),await qh(c)}if(s||so(),s instanceof Error)throw s;return s}if(r.includes("application/json")){const s=await t.json(),o=J0(s);if(o)throw o;if(ni(s))throw s;return s}if(!t.ok)throw new Error(await t.text());return t}async function Z1({jsonStream:e,onMessage:t,onError:r}){const s=e.getReader(),{value:o,done:c}=await s.read();if(c||!o)throw new Error("Stream ended before first object");const u=JSON.parse(o);let d=!1;const f=(async()=>{try{for(;;){const{value:g,done:b}=await s.read();if(b)break;
12if(g)try{const _=[];try{t(JSON.parse(g))}finally{}await qh(_)}catch(_){r?.(`Invalid JSON: ${g}`,_)}}}catch(g){d||r?.("Stream processing error:",g)}})();let m;const y=[];try{m=t(u)}catch(g){throw d=!0,s.cancel().catch(()=>{}),g}return await qh(y),Promise.resolve(m).catch(()=>{d=!0,s.cancel().catch(()=>{})}),f.finally(()=>{try{s.releaseLock()}catch{}}),m}function Un(e){const t="/_serverFn/"+e;return Object.assign((...o)=>{const c=uf()?.serverFns?.fetch;return J1(t,o,c??fetch)},{url:t,serverFnMeta:{id:e},[Uh]:!0})}var W1={key:"$TSS/serverfn",test:e=>typeof e!="function"||!(Uh in e)?!1:!!e[Uh],toSerializable:({serverFnMeta:e})=>({functionId:e.id}),fromSerializable:({functionId:e})=>Un(e)};function Fb(e){if(Array.isArray(e))return e.flatMap(y=>Fb(y));if(typeof e!="string")return[];const t=[];let r=0,s,o,c,u,d;const f=()=>{for(;r<e.length&&/\s/.test(e.charAt(r));)r+=1;return r<e.length},m=()=>(o=e.charAt(r),o!=="="&&o!==";"&&o!==",");for(;r<e.length;){for(s=r,d=!1;f();)if(o=e.charAt(r),o===","){for(c=r,r+=1,f(),u=r;r<e.length&&m();)r+=1;r<e.length&&e.charAt(r)==="="?(d=!0,r=u,t.push(e.slice(s,c)),s=r):r=c+1}else r+=1;(!d||r>=e.length)&&t.push(e.slice(s))}return t}function eO(e){return e instanceof Headers?e:Array.isArray(e)?new Headers(e):typeof e=="object"?new Headers(e):null}function tO(...e){return e.reduce((t,r)=>{const s=eO(r);if(!s)return t;for(const[o,c]of s.entries())o==="set-cookie"?Fb(c).forEach(u=>t.append("set-cookie",u)):t.set(o,c);return t},new Headers)}var Ec=se.use,Kb=se.useLayoutEffect;function nO(e,t,r={},s){se.useEffect(()=>{if(!e.current||s||typeof IntersectionObserver!="function")return;const o=new IntersectionObserver(([c])=>{t(c)},r);return o.observe(e.current),()=>{o.disconnect()}},[t,s,r,e])}function rO(e){const t=se.useRef(null);return se.useImperativeHandle(e,()=>t.current,[]),t}function iO({promise:e}){if(Ec)return Ec(e);const t=tT(e);if(t[xn].status==="pending")throw t;if(t[xn].status==="error")throw t[xn].error;return t[xn].data}function sO(e){const t=$.jsx(aO,{...e});return e.fallback?$.jsx(se.Suspense,{fallback:e.fallback,children:t}):t}function aO(e){const t=iO(e);return e.children(t)}function Ef(e){return $.jsx(oO,{...e})}var oO=class extends se.Component{constructor(...e){super(...e),this.state={error:null},this.reset=()=>{this.setState({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}}componentDidCatch(e,t){this.props.onCatch?.(e,t)}render(){const e=this.state.error;return e?se.createElement(this.props.errorComponent??lO,{error:e,reset:this.reset}):this.props.children}};function lO({error:e}){const[t,r]=se.useState(!1);return $.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[$.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[$.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),$.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>r(s=>!s),children:t?"Hide Error":"Show Error"})]}),$.jsx("div",{style:{height:".25rem"}}),t?$.jsx("div",{children:$.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:e.message?$.jsx("code",{children:e.message}):null})}):null]})}function cO({children:e,fallback:t=null}){return $.jsx(Ao.Fragment,{children:Af()?e:t})}function Af(){return Ao.useSyncExternalStore(uO,()=>!0,()=>!1)}function uO(){return()=>{}}var Jb=se.createContext(null);function Tt(e){return se.useContext(Jb)}var Vc=se.createContext(void 0),dO=se.createContext(void 0),Ke=(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))(Ke||{});function hO({update:e,notify:t,unwatched:r}){return{link:s,unlink:o,propagate:c,checkDirty:u,shallowPropagate:d};function s(m,y,g){const b=y.depsTail;if(b!==void 0&&b.dep===m)return;const _=b!==void 0?b.nextDep:y.deps;if(_!==void 0&&_.dep===m){_.version=g,y.depsTail=_;return}const S=m.subsTail;if(S!==void 0&&S.version===g&&S.sub===y)return;const w=y.depsTail=m.subsTail={version:g,dep:m,sub:y,prevDep:b,nextDep:_,prevSub:S,nextSub:void 0};_!==void 0&&(_.prevDep=w),b!==void 0?b.nextDep=w:y.deps=w,S!==void 0?S.nextSub=w:m.subs=w}function o(m,y=m.sub){const g=m.dep,b=m.prevDep,_=m.nextDep,S=m.nextSub,w=m.prevSub;return _!==void 0?_.prevDep=b:y.depsTail=b,b!==void 0?b.nextDep=_:y.deps=_,S!==void 0?S.prevSub=w:g.subsTail=w,w!==void 0?w.nextSub=S:(g.subs=S)===void 0&&r(g),_}function c(m){let y=m.nextSub,g;e:do{const b=m.sub;let _=b.flags;if(_&60?_&12?_&4?!(_&48)&&f(m,b)?(b.flags=_|40,_&=1):_=0:b.flags=_&-9|32:_=0:b.flags=_|32,_&2&&t(b),_&1){const S=b.subs;
12if(S!==void 0){const w=(m=S).nextSub;w!==void 0&&(g={value:y,prev:g},y=w);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,_=!1;e:do{const S=m.dep,w=S.flags;if(y.flags&16)_=!0;else if((w&17)===17){if(e(S)){const A=S.subs;A.nextSub!==void 0&&d(A),_=!0}}else if((w&33)===33){(m.nextSub!==void 0||m.prevSub!==void 0)&&(g={value:m,prev:g}),m=S.deps,y=S,++b;continue}if(!_){const A=m.nextDep;if(A!==void 0){m=A;continue}}for(;b--;){const A=y.subs,T=A.nextSub!==void 0;if(T?(m=g.value,g=g.prev):m=A,_){if(e(y)){T&&d(A),y=m.sub;continue}_=!1}else y.flags&=-33;y=m.sub;const k=m.nextDep;if(k!==void 0){m=k;continue e}}return _}while(!0)}function d(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 f(m,y){let g=y.depsTail;for(;g!==void 0;){if(g===m)return!0;g=g.prevDep}return!1}}function fO(e,t,r){const s=typeof e=="object",o=s?e:void 0;return{next:(s?e.next:e)?.bind(o),error:(s?e.error:t)?.bind(o),complete:(s?e.complete:r)?.bind(o)}}const Vh=[];let hc=0;const{link:bv,unlink:pO,propagate:mO,checkDirty:Qb,shallowPropagate:_v}=hO({update(e){return e._update()},notify(e){Vh[Gh++]=e,e.flags&=~Ke.Watching},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=Ke.Mutable|Ke.Dirty,Ac(e))}});let Jl=0,Gh=0,Cn,Yh=0;function gO(e){try{++Yh,e()}finally{--Yh||Xb()}}function Ac(e){const t=e.depsTail;let r=t!==void 0?t.nextDep:e.deps;for(;r!==void 0;)r=pO(r,e)}function Xb(){if(!(Yh>0)){for(;Jl<Gh;){const e=Vh[Jl];Vh[Jl++]=void 0,e.notify()}Jl=0,Gh=0}}function wv(e,t){const r=typeof e=="function",s=e,o={_snapshot:r?void 0:e,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:r?Ke.None:Ke.Mutable,get(){return Cn!==void 0&&bv(o,Cn,hc),o._snapshot},subscribe(c){const u=fO(c),d={current:!1},f=yO(()=>{o.get(),d.current?u.next?.(o._snapshot):d.current=!0});return{unsubscribe:()=>{f.stop()}}},_update(c){const u=Cn,d=t?.compare??Object.is;if(r)Cn=o,++hc,o.depsTail=void 0;else if(c===void 0)return!1;r&&(o.flags=Ke.Mutable|Ke.RecursedCheck);try{const f=o._snapshot,m=typeof c=="function"?c(f):c===void 0&&r?s(f):c;return f===void 0||!d(f,m)?(o._snapshot=m,!0):!1}finally{Cn=u,r&&(o.flags&=~Ke.RecursedCheck),Ac(o)}}};return r?(o.flags=Ke.Mutable|Ke.Dirty,o.get=function(){const c=o.flags;if(c&Ke.Dirty||c&Ke.Pending&&Qb(o.deps,o)){if(o._update()){const u=o.subs;u!==void 0&&_v(u)}}else c&Ke.Pending&&(o.flags=c&~Ke.Pending);return Cn!==void 0&&bv(o,Cn,hc),o._snapshot}):o.set=function(c){if(o._update(c)){const u=o.subs;u!==void 0&&(mO(u),_v(u),Xb())}},o}function yO(e){const t=()=>{const s=Cn;Cn=r,++hc,r.depsTail=void 0,r.flags=Ke.Watching|Ke.RecursedCheck;try{return e()}finally{Cn=s,r.flags&=~Ke.RecursedCheck,Ac(r)}},r={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:Ke.Watching|Ke.RecursedCheck,notify(){const s=this.flags;s&Ke.Dirty||s&Ke.Pending&&Qb(this.deps,this)?t():this.flags=Ke.Watching},stop(){this.flags=Ke.None,this.depsTail=void 0,Ac(this)}};return t(),r}var bh={exports:{}},_h={},wh={exports:{}},Sh={};var Sv;function vO(){if(Sv)return Sh;Sv=1;var e=Eo();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,s=e.useState,o=e.useEffect,c=e.useLayoutEffect,u=e.useDebugValue;function d(g,b){var _=b(),S=s({inst:{value:_,getSnapshot:b}}),w=S[0].inst,A=S[1];return c(function(){w.value=_,w.getSnapshot=b,f(w)&&A({inst:w})},[g,_,b]),o(function(){return f(w)&&A({inst:w}),g(function(){f(w)&&A({inst:w})})},[g]),u(_),_}function f(g){var b=g.getSnapshot;g=g.value;try{var _=b();return!r(g,_)}catch{return!0}}function m(g,b){return b()}var y=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?m:d;return Sh.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:y,Sh}var Ev;function bO(){return Ev||(Ev=1,wh.exports=vO()),wh.exports}var Av;function _O(){if(Av)return _h;Av=1;var e=Eo(),t=bO();function r(m,y){return m===y&&(m!==0||1/m===1/y)||m!==m&&y!==y}var s=typeof Object.is=="function"?Object.is:r,o=t.useSyncExternalStore,c=e.useRef,u=e.useEffect,d=e.useMemo,f=e.useDebugValue;return _h.useSyncExternalStoreWithSelector=function(m,y,g,b,_){var S=c(null);if(S.current===null){var w={hasValue:!1,value:null};S.current=w}else w=S.current;S=d(function(){function T(U){if(!k){if(k=!0,x=U,U=b(U),_!==void 0&&w.hasValue){var N=w.value;if(_(N,U))return z=N}return z=U}if(N=z,s(x,U))return N;var I=b(U);return _!==void 0&&_(N,I)?(x=U,N):(x=U,z=I)}var k=!1,x,z,F=g===void 0?null:g;return[function(){return T(y())},F===null?void 0:function(){return T(F())}]},[y,g,b,_]);var A=o(m,S[0],S[1]);return u(function(){w.hasValue=!0,w.value=A},[A]),f(A),A},_h}var Tv;function wO(){return Tv||(Tv=1,bh.exports=_O()),bh.exports}var SO=wO();function EO(e,t){return e===t}function En(e,t,r=EO){const s=se.useCallback(u=>{if(!e)return()=>{};const{unsubscribe:d}=e.subscribe(u);return d},[e]),o=se.useCallback(()=>e?.get(),[e]);return SO.useSyncExternalStoreWithSelector(s,o,o,t,r)}var Rv={};function Zb(e,t){const r=se.useRef();return s=>{const o=e?.select?e.select(s):s;return e?.structuralSharing??t.options.defaultStructuralSharing?r.current=Ni(r.current,o):o}}function Pi(e){const t=Tt(),r=se.useContext(e.from?dO:Vc),s=e.from??r,o=t.stores.getMatchStore(s),c=Zb(e,t),u=En(o,d=>d?c(d):Rv);if(u!==Rv)return u;(e.shouldThrow??!0)&&so()}function Wb(e){return Pi({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function e_(e){const{select:t,...r}=e;return Pi({...r,select:s=>t?t(s.loaderDeps):s.loaderDeps})}function t_(e){return Pi({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 n_(e){return Pi({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function r_(e){const t=Tt();return se.useCallback(r=>t.navigate({...r,from:r.from??e?.from}),[e?.from,t])}function i_(e){return Pi({...e,select:t=>e.select?e.select(t.context):t.context})}var s_=U0();const ED=L0(s_);function Eh(e){const t=se.useRef(e);return Mn(t.current,e,{ignoreUndefined:!1})||(t.current=e),t.current}function AO(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]}function TO(e,t,r){if(e?.external)return yc(e.href,r)?void 0:e.href;if(!DO(t)&&!(typeof t!="string"||t.indexOf(":")===-1))try{return new URL(t),yc(t,r)?void 0:t}catch{}}function RO(e,t,r,s,o,c){if(c)return!1;if(r?.exact){if(!bA(e.pathname,t.pathname,s))return!1}else{const u=bc(e.pathname,s),d=bc(t.pathname,s);if(!(u.startsWith(d)&&(u.length===d.length||u[d.length]==="/")))return!1}return(r?.includeSearch??!0)&&!Mn(e.search,t.search,{partial:!r?.exact,ignoreUndefined:!r?.explicitUndef
12ined})?!1:r?.includeHash?o&&e.hash===t.hash:!0}function OO(e,t){const r=Tt(),s=rO(t),{activeProps:o,inactiveProps:c,activeOptions:u,to:d,preload:f,preloadDelay:m,preloadIntentProximity:y,hashScrollIntoView:g,replace:b,startTransition:_,resetScroll:S,viewTransition:w,children:A,target:T,disabled:k,style:x,className:z,onClick:F,onBlur:U,onFocus:N,onMouseEnter:I,onMouseLeave:K,onTouchStart:ue,ignoreBlocker:G,params:J,search:ae,hash:ze,state:me,mask:P,reloadDocument:Q,unsafeRelative:he,from:Ce,_fromLocation:X,...C}=e,V=Af(),Z=Eh(e.search),ee=Eh(e.params),oe=Eh(u),ce=se.useMemo(()=>e,[r,e.from,e._fromLocation,e.hash,e.to,Z,ee,e.state,e.mask,e.unsafeRelative]),we=se.useCallback(ot=>{const lt=r.buildLocation({_fromLocation:ot,...ce}),Bt=MO(lt.maskedLocation?lt.maskedLocation.publicHref:lt.publicHref,lt.maskedLocation?lt.maskedLocation.external:lt.external,r.history,k),Bn=TO(Bt,d,r.protocolAllowlist);return[Bt?.href,Bn,RO(ot,lt,oe,r.basepath,V,Bn!==void 0)]},[oe,k,V,ce,r,d]),[et,ge,Xt]=En(r.stores.location,we,AO),kt=Xt?Vs(o,{})??CO:Ah,Pt=Xt?Ah:Vs(c,{})??Ah,In=[z,kt.className,Pt.className].filter(Boolean).join(" "),Rt=(x||kt.style||Pt.style)&&{...x,...kt.style,...Pt.style},[Js,$i]=se.useState(!1),Ro=se.useRef(!1),Pn=e.reloadDocument||ge?!1:f??r.options.defaultPreload,oi=m??r.options.defaultPreloadDelay??0,fn=se.useCallback(()=>{r.preloadRoute(ce).catch(ot=>{console.warn(ot),console.warn(nT)})},[r,ce]);nO(s,se.useCallback(ot=>{ot?.isIntersecting&&fn()},[fn]),NO,!!k||Pn!=="viewport"),se.useEffect(()=>{Ro.current||!k&&Pn==="render"&&(fn(),Ro.current=!0)},[k,fn,Pn]);const Qs=ot=>{const lt=ot.currentTarget.getAttribute("target"),Bt=T!==void 0?T:lt;if(!k&&!LO(ot)&&!ot.defaultPrevented&&(!Bt||Bt==="_self")&&ot.button===0){ot.preventDefault(),s_.flushSync(()=>{$i(!0)});const Bn=r.subscribe("onResolved",()=>{Bn(),$i(!1)});r.navigate({...ce,replace:b,resetScroll:S,hashScrollIntoView:g,startTransition:_,viewTransition:w,ignoreBlocker:G})}};if(ge)return{...C,ref:s,href:ge,...A&&{children:A},...T&&{target:T},...k&&{disabled:k},...x&&{style:x},...z&&{className:z},...F&&{onClick:F},...U&&{onBlur:U},...N&&{onFocus:N},...I&&{onMouseEnter:I},...K&&{onMouseLeave:K},...ue&&{onTouchStart:ue}};const Oo=ot=>{if(k||Pn!=="intent")return;if(!oi){fn();return}const lt=ot.currentTarget;if(Ka.has(lt))return;const Bt=setTimeout(()=>{Ka.delete(lt),fn()},oi);Ka.set(lt,Bt)},Xc=ot=>{k||Pn!=="intent"||fn()},wt=ot=>{if(k||!Pn||!oi)return;const lt=ot.currentTarget,Bt=Ka.get(lt);Bt&&(clearTimeout(Bt),Ka.delete(lt))};return{...C,...kt,...Pt,href:et,ref:s,onClick:Rs([F,Qs]),onBlur:Rs([U,wt]),onFocus:Rs([N,Oo]),onMouseEnter:Rs([I,Oo]),onMouseLeave:Rs([K,wt]),onTouchStart:Rs([ue,Xc]),disabled:!!k,target:T,...Rt&&{style:Rt},...In&&{className:In},...k&&kO,...Xt&&xO,...V&&Js&&jO}}var Ah={},CO={className:"active"},kO={role:"link","aria-disabled":!0},xO={"data-status":"active","aria-current":"page"},jO={"data-transitioning":"transitioning"},Ka=new WeakMap,NO={rootMargin:"100px"},Rs=e=>t=>{for(const r of e)if(r){if(t.defaultPrevented)return;r(t)}};function MO(e,t,r,s){if(!s)return t?{href:e,external:!0}:{href:r.createHref(e)||"/",external:!1}}function DO(e){if(typeof e!="string")return!1;const t=e.charCodeAt(0);return t===47?e.charCodeAt(1)!==47:t===46}var Nn=se.forwardRef((e,t)=>{const{_asChild:r,...s}=e,{type:o,...c}=OO(s,t),u=typeof s.children=="function"?s.children({isActive:c["data-status"]==="active"}):s.children;if(!r){const{disabled:d,...f}=c;return se.createElement("a",f,u)}return se.createElement(r,c,u)});function LO(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}var UO=class extends cb{constructor(t){super(t),this.useMatch=r=>Pi({select:r?.select,from:this.id,structuralSharing:r?.structuralSharing}),this.useRouteContext=r=>i_({...r,from:this.id}),this.useSearch=r=>n_({select:r?.select,structuralSharing:r?.structuralSharing,from:this.id}),this.useParams=r=>t_({select:r?.select,structuralSharing:r?.structuralSharing,from:this.id}),this.useLoaderDeps=r=>e_({...r,from:this.id}),this.useLoaderData=r=>Wb({...r,from:this.id}),this.useNavigate=()=>r_({from:this.fullPath}),this.Link=Ao.forwardRef((r,s)=>$.jsx(Nn,{ref:s,from:this.fullPath,...r}))}};function zO(e){return new UO(e)}function IO(){return e=>BO(e)}var PO=class extends oT{constructor(e){super(e),this.useMatch=t=>Pi({select:t?.select,from:this.id,structuralSharing:t?.structuralSharing}),this.useRouteContext=t=>i_({...t,from:this.id}),this.useSearch=t=>n_({select:t?.select,structuralSharing:t?.structuralSharing,from:this.id}),this.useParams=t=>t_({select:t?.select,structuralSharing:t?.structuralSharing,from:this.id}),this.useLoaderDeps=t=>e_({...t,from:this.id}),this.useLoaderData=t=>Wb({...t,from:this.id}),this.useNavigate=()=>r_({from:this.fullPath}),this.Link=Ao.forwardRef((t,r)=>$.jsx(Nn,{ref:r,from:this.fullPath,...t}))}};function BO(e){return new PO(e)}function Ue(e){return t=>{const r=zO(t);return r.isRoot=!1,r}}function Ne(e,t){let r,s,o;const c=()=>(r||(o=void 0,r=e().then(d=>{r=void 0,s=d[t??"default"]}).catch(d=>{r=void 0,o=d})),r),u=function(f){if(o){if(WE(o)&&typeof sessionStorage<"u"){const m=`tanstack_router_reload:${o.message}`;
12if(!sessionStorage.getItem(m))throw sessionStorage.setItem(m,"1"),window.location.reload(),new Promise(()=>{})}throw o}if(!s)if(Ec)Ec(c());else throw c();return se.createElement(s,f)};return u.preload=c,u}function $O(e){const t=Tt(),r=`not-found-${En(t.stores.location,s=>s.pathname)}-${En(t.stores.status,s=>s)}`;return $.jsx(Ef,{getResetKey:()=>r,onCatch:(s,o)=>{if(ni(s))e.onCatch?.(s,o);else throw s},errorComponent:({error:s})=>{if(ni(s))return e.fallback?.(s);throw s},children:e.children})}function HO(){return $.jsx("p",{children:"Not Found"})}function Ns(e){return $.jsx($.Fragment,{children:e.children})}function a_(e,t,r){return t.options.notFoundComponent?$.jsx(t.options.notFoundComponent,{...r}):e.options.defaultNotFoundComponent?$.jsx(e.options.defaultNotFoundComponent,{...r}):$.jsx(HO,{})}function Gc(e,t){const r=t?.options.pendingComponent??e.options.defaultPendingComponent;return r?$.jsx(r,{}):null}var qO=(e,t)=>e[0]===t[0]&&e[1]===t[1],o_=se.memo(function({routeId:t}){const r=Tt();return $.jsx(VO,{router:r,match:En(r.stores.getMatchStore(t),s=>s)})});function VO({router:e,match:t}){const r=e.routesById[t.routeId],s=Gc(e,r),o=r.options.errorComponent??e.options.defaultErrorComponent,c=r.options.onCatch??e.options.defaultOnCatch,u=r.isRoot?r.options.notFoundComponent??e.options.notFoundRoute?.options.component:r.options.notFoundComponent,d=t.ssr===!1||t.ssr==="data-only",f=r.options.wrapInSuspense??s??(r.options.errorComponent?.preload||d)?se.Suspense:Ns,m=o?Ef:Ns,y=u?$O:Ns;return $.jsxs(r.isRoot?r.options.shellComponent??Ns:Ns,{children:[$.jsx(Vc.Provider,{value:t.routeId,children:$.jsx(f,{fallback:s,children:$.jsx(m,{getResetKey:()=>t,errorComponent:o,onCatch:(g,b)=>{if(ni(g))throw g.routeId??=t.routeId,g;c?.(g,b)},children:$.jsx(y,{fallback:g=>{if(g.routeId??=t.routeId,g.routeId!==t.routeId)throw g;return se.createElement(u,g)},children:d?$.jsx(cO,{fallback:s,children:$.jsx(Ov,{match:t})}):$.jsx(Ov,{match:t})})})})}),null]})}var Ov=se.memo(function({match:t}){const r=Tt(),s=t.routeId,o=r.routesById[s],c=se.useMemo(()=>{const d=(o.options.remountDeps??r.options.defaultRemountDeps)?.({routeId:s,loaderDeps:t.loaderDeps,params:t._strictParams,search:t._strictSearch});return d?JSON.stringify(d):void 0},[s,t.loaderDeps,t._strictParams,t._strictSearch,o.options.remountDeps,r.options.defaultRemountDeps]),u=se.useMemo(()=>{const d=o.options.component??r.options.defaultComponent;return d?$.jsx(d,{},c):$.jsx(l_,{})},[c,o.options.component,r.options.defaultComponent]);if(t.status==="pending"){if(r._tx)throw r._tx[5];return Gc(r,o)}if(t.status==="notFound")return a_(r,o,t.error);if(t.status==="error")throw t.error;return u}),l_=se.memo(function(){const t=Tt(),r=se.useContext(Vc);let s,o,c;{const d=t.stores.getMatchStore(r);[s,o]=En(d,f=>[!!f._notFound,f.error],qO),c=En(t.stores.ids,f=>f[f.indexOf(r)+1])}if(s)return a_(t,t.routesById[r],o);if(!c)return null;const u=$.jsx(o_,{routeId:c});return r===Is?$.jsx(se.Suspense,{fallback:Gc(t),children:u}):u});function c_(e,t){const r=e[1];e.length=0,r?.(t)}function GO({t:e}){const t=Tt(),r=t._rendered??=[];return t.startTransition=(s,o)=>new Promise((c,u)=>{c_(r,!1),r.push(o,c),e(t),se.startTransition(()=>{try{s()}catch(d){r[1]===c&&(r.length=0),u(d)}})}),Kb(()=>{const s=t.history.subscribe(t.load);t.updateLatestLocation();const o=t.latestLocation,c=t.buildLocation({to:o.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});if(hr(o.publicHref)!==hr(c.publicHref))return t.commitLocation({...c,replace:!0,ignoreBlocker:!0}),s;const u=t.stores.resolvedLocation.get();return u?.href===o.href&&u.state.__TSR_key===o.state.__TSR_key?r.push(t.stores.matches.get(),d=>{d&&t.emit({type:"onRendered",...zc(u,u)})}):t._tx||t.load().catch(console.error),s},[t,t.history]),null}function YO(){const e=Tt(),t=e.routesById[Is],r=Gc(e,t),s=e.ssr?Ns:se.Suspense,o=$.jsxs($.Fragment,{children:[$.jsx(GO,{t:se.useState()[1]}),$.jsx(s,{fallback:r,children:$.jsx(FO,{})})]});return e.options.InnerWrap?$.jsx(e.options.InnerWrap,{children:o}):o}function FO(){const e=Tt(),t=e._rendered,r=En(e.stores.matches,u=>t[0]??u),s=r[0],o=s?.routeId;Kb(()=>{t[0]===r&&c_(t,!0)},[t,r]);const c=o?$.jsx(o_,{routeId:o}):null;return $.jsx(Vc.Provider,{value:o,children:e.options.disableGlobalCatchBoundary?c:$.jsx(Ef,{getResetKey:()=>s,onCatch:void 0,children:c})})}var KO=e=>({createMutableStore:wv,createReadonlyStore:wv,batch:gO}),JO=e=>new QO(e),QO=class extends qA{constructor(e){super(e,KO)}};function XO({router:e,children:t,...r}){I0(r)&&e.update({...e.options,...r,context:{...e.options.context,...r.context}});const s=$.jsx(Jb.Provider,{value:e,children:t});return e.options.Wrap?$.jsx(e.options.Wrap,{children:s}):s}function ZO({router:e,...t}){return $.jsx(XO,{router:e,...t,children:$.jsx(YO,{})})}function WO(e){const t=Tt({warn:e?.router===void 0}),r=e?.router||t;return En(r.stores.__store,Zb(e,r))}function Cv(e,t){if(t)for(const[r,s]of Object.entries(t))r!=="suppressHydrationWarning"&&s!==void 0&&s!==!1&&e.setAttribute(r,typeof s=="boolean"?"":String(s))}function u_(e){const{attrs:t,children:r,nonce:s,preventScriptHoist:o}=e;switch(e.tag){case"title":return $.jsx("title",{...t,suppressHydrationWarning:!0,children:r});case"meta":return $.jsx("meta",{...t,suppressHydrationWarning:!0});case"link":return $.jsx("link",{...t,precedence:t?.precedence??(t?.rel==="stylesheet"?"default":void 0),nonce:s,suppressHydrationWarning:!0});case"style":return e.inlineCss,$.jsx("style",{...t,dangerouslySetInnerHTML:{__html:r},nonce:s});case"script":return $.jsx(eC,{attrs:t,preventScriptHoist:o,children:r});default:return null}}function eC({attrs:e,children:t,preventScriptHoist:r}){Tt();const s=Af(),o=typeof e?.type=="string"&&e.type!==""&&e.type!=="text/javascript"&&e.type!=="module";if(se.useEffect(()=>{if(!o){if(e?.src){const c=(()=>{try{const d=document.baseURI||window.location.href;return new URL(e.src,d).href}catch{return e.src}})();for(const d of document.querySelectorAll("script[src]"))if(d.src===c)return;const u=document.createElement("script");return Cv(u,e),document.head.appendChild(u),()=>u.remove()}if(typeof t=="string"){const c=typeof e?.type=="string"?e.type:"text/javascript",u=typeof e?.nonce=="string"?e.nonce:void 0;for(const f of document.querySelectorAll("script:not([src])")){if(!(f instanceof HTMLScriptElement))continue;const m=f.getAttribute("type")??"text/javascript",y=f.getAttribute("nonce")??void 0;if(f.textContent===t&&m===c&&y===u)return}const d=document.createElement("script");return d.textContent=t,Cv(d,e),document.head.appendChild(d),()=>d.remove()}}},[e,t,o]),o&&typeof t=="string")return $.jsx("script",{...e,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:t}});if(!s){if(e?.src)return $.jsx("script",{...e,suppressHydrationWarning:!0});if(typeof t=="string")return $.jsx("script",{...e,dangerouslySetInnerHTML:{__html:t},suppressHydrationWarning:!0})}return null}function tC(e,t,r,s){r=Z0(r);const o=r.map(w=>w.meta).filter(w=>w!==void 0),c=[],u={};let d;for(let w=o.length-1;w>=0;w--){const A=o[w];for(let T=A.length-1;T>=0;T--){const k=A[T];if(k)if(k.title)d||(d={tag:"title",children:k.title});else if("script:ld+json"in k)try{const x=JSON.stringify(k["script:ld+json"]);c.push({tag:"script",attrs:{type:"application/ld+json"},children:sA(x)})}catch{}else{const x=k.name??k.property;if(x){if(u[x])continue;u[x]=!0}c.push({tag:"meta",attrs:{...k,nonce:t}})}}}d&&c.push(d),t&&c.push({tag:"meta",attrs:{property:"csp-nonce",content:t}}),c.reverse();const f=r.flatMap(w=>w.links??[]).filter(w=>w!==void 0).map(w=>({tag:"link",attrs:{...w,nonce:t}})),m=e.ssr?.manifest,y=[];m&&(r.forEach(w=>{m.routes[w.routeId]?.css?.forEach(A=>{const T=aT(A);y.push({tag:"link",attrs:{rel:"stylesheet",...T,crossOrigin:lb(s,"stylesheet")??T.crossOrigin,suppressHydrationWarning:!0,nonce:t}})})}),m.inlineStyle&&y.push({tag:"style",attrs:{...m.inlineStyle.attrs,nonce:t},children:m.inlineStyle.children,inlineCss:!0}));const g=[];m&&r.forEach(w=>{m.routes[w.routeId]?.preloads?.forEach(A=>{g.push({tag:"link",attrs:{...iT(m,A,s),nonce:t}})})});const b=r.flatMap(w=>w.styles??[]).filter(w=>w!==void 0).map(({children:w,...A})=>({tag:"style",attrs:{...A,nonce:t},children:w})),_=r.flatMap(w=>w.headScripts??[]).filter(w=>w!==void 0).map(({children:w,...A})=>({tag:"script",attrs:{...A,nonce:t},children:w})),S=[];return Fl(S,c),S.push(...g),Fl(S,f),S.push(...y),Fl(S,b),Fl(S,_),S}var nC=e=>{const t=Tt(),r=t.options.ssr?.nonce,s=se.useCallback(o=>tC(t,r,o,e),[e,r,t]);return En(t.stores.matches,s,Mn)};function rC(e){const t=nC(e.assetCrossOrigin),r=Tt().options.ssr?.nonce;return $.jsx($.Fragment,{children:t.map(s=>se.createElement(u_,{...s,key:`tsr-meta-${JSON.stringify(s)}`,nonce:r}))})}var iC=()=>{const e=Tt(),t=e.options.ssr?.nonce,r=s=>{s=Z0(s);const o=s.flatMap(u=>
12u.scripts??[]).filter(Boolean).map(({children:u,...d})=>({tag:"script",attrs:{...d,suppressHydrationWarning:!0,nonce:t},children:u})),c=e.ssr?.manifest;if(!c)return o;for(const u of s){const d=c.routes[u.routeId]?.scripts;if(d)for(const f of d)o.push({tag:"script",attrs:{...f.attrs,nonce:t},children:f.children,...typeof f.attrs?.src=="string"?{preventScriptHoist:!0}:{}})}return o};return sC(e,En(e.stores.matches,r,Mn))};function sC(e,t){return $.jsx($.Fragment,{children:t.map((r,s)=>se.createElement(u_,{...r,key:`tsr-scripts-${r.tag}-${s}`}))})}function kv(e){return e!=="__proto__"&&e!=="constructor"&&e!=="prototype"}function Fh(e,t){const r=Object.create(null);if(e)for(const s of Object.keys(e))kv(s)&&(r[s]=e[s]);if(t&&typeof t=="object")for(const s of Object.keys(t))kv(s)&&(r[s]=t[s]);return r}function d_(e){return Object.create(null)}var h_=()=>{throw new Error("createServerOnlyFn() functions can only be called on the server!")},dn=(e,t)=>{const r=t||e||{};typeof r.method>"u"&&(r.method="GET");const s=u=>dn(void 0,{...r,validator:u,inputValidator:u});return Object.assign(u=>dn(void 0,{...r,...u}),{options:r,middleware:u=>{const d=[...r.middleware||[]];u.map(m=>{Iy in m?m.options.middleware&&d.push(...m.options.middleware):d.push(m)});const f=dn(void 0,{...r,middleware:d});return f[Iy]=!0,f},validator:s,inputValidator:s,handler:(...u)=>{const[d,f]=u,m={...r,extractedFn:d,serverFn:f},y=[...m.middleware||[],lC(m)];return d.method=r.method,Object.assign(async g=>{const b=await xv(y,"client",{...d,...m,data:g?.data,headers:g?.headers,signal:g?.signal,fetch:g?.fetch,context:d_()}),_=J0(b.error);if(_)throw _;if(b.error)throw b.error;return b.result},{...d,method:r.method,__executeServer:async g=>{const b=h_(),_=b.contextAfterGlobalMiddlewares;return await xv(y,"server",{...d,...g,serverFnMeta:d.serverFnMeta,context:Fh(g.context,_),request:b.request}).then(S=>({result:S.result,error:S.error,context:S.sendContext}))}})}})};async function xv(e,t,r){let s=aC([...uf()?.functionMiddleware||[],...e]);if(t==="server"){const c=h_();c?.executedRequestMiddlewares&&(s=s.filter(u=>!c.executedRequestMiddlewares.has(u)))}const o=async c=>{const u=s.shift();if(!u)return c;try{let d="validator"in u.options?u.options.validator:void 0;!d&&"inputValidator"in u.options&&(d=u.options.inputValidator),d&&t==="server"&&(c.data=await oC(d,c.data));let f;if(t==="client"?"client"in u.options&&(f=u.options.client):"server"in u.options&&(f=u.options.server),f){const y=await f({...c,next:async(g={})=>{const b=await o({...c,...g,context:Fh(c.context,g.context),sendContext:Fh(c.sendContext,g.sendContext),headers:tO(c.headers,g.headers),_callSiteFetch:c._callSiteFetch,fetch:c._callSiteFetch??g.fetch??c.fetch,result:g.result!==void 0?g.result:g instanceof Response?g:c.result,error:g.error??c.error});if(b.error)throw b.error;return b}});if(Uc(y))return{...c,error:y};if(y instanceof Response)return{...c,result:y};if(!y)throw new Error("User middleware returned undefined. You must call next() or return a result in your middlewares.");return y}return o(c)}catch(d){return{...c,error:d}}};return o({...r,headers:r.headers||{},sendContext:r.sendContext||{},context:r.context||d_(),_callSiteFetch:r.fetch})}function aC(e,t=100){const r=new Set,s=[],o=(c,u)=>{if(u>t)throw new Error(`Middleware nesting depth exceeded maximum of ${t}. Check for circular references.`);
12c.forEach(d=>{d.options.middleware&&o(d.options.middleware,u+1),r.has(d)||(r.add(d),s.push(d))})};return o(e,0),s}async function oC(e,t){if(e==null)return{};if("~standard"in e){const r=await e["~standard"].validate(t);if(r.issues)throw new Error(JSON.stringify(r.issues,void 0,2));return r.value}if("parse"in e)return e.parse(t);if(typeof e=="function")return e(t);throw new Error("Invalid validator type!")}function lC(e){return{"~types":void 0,options:{inputValidator:e.validator??e.inputValidator,client:async({next:t,sendContext:r,fetch:s,...o})=>{const c={...o,context:r,fetch:s};return t(await e.extractedFn?.(c))},server:async({next:t,...r})=>{const s=await e.serverFn?.(r);return t({...r,result:s})}}}}var Wr=(e,t)=>{const r={type:"request",...t||e},s=o=>Wr({},Object.assign(r,{validator:o,inputValidator:o}));return{options:r,middleware:o=>Wr({},Object.assign(r,{middleware:o})),validator:s,inputValidator:s,client:o=>Wr({},Object.assign(r,{client:o})),server:o=>Wr({},Object.assign(r,{server:o}))}};function f_(e,t){for(let r=0,s=t.length;r<s;r++){const o=t[r];e.has(o)||(e.add(o),o.extends&&f_(e,o.extends))}}var cC=e=>({getOptions:async()=>{const t=await e();if(t.serializationAdapters){const r=new Set;f_(r,t.serializationAdapters),t.serializationAdapters=Array.from(r)}return t},createMiddleware:Wr});const uC=Symbol.for("@supabase/supabase-js.traceContextExtractor");function dC(){return globalThis[uC]}var jv=function(){return jv=Object.assign||function(t){for(var r,s=1,o=arguments.length;s<o;s++){r=arguments[s];for(var c in r)Object.prototype.hasOwnProperty.call(r,c)&&(t[c]=r[c])}return t},jv.apply(this,arguments)};function Yc(e,t){var r={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&t.indexOf(s)<0&&(r[s]=e[s]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,s=Object.getOwnPropertySymbols(e);o<s.length;o++)t.indexOf(s[o])<0&&Object.prototype.propertyIsEnumerable.call(e,s[o])&&(r[s[o]]=e[s[o]]);return r}function hC(e,t,r,s){function o(c){return c instanceof r?c:new r(function(u){u(c)})}return new(r||(r=Promise))(function(c,u){function d(y){try{m(s.next(y))}catch(g){u(g)}}function f(y){try{m(s.throw(y))}catch(g){u(g)}}function m(y){y.done?c(y.value):o(y.value).then(d,f)}m((s=s.apply(e,t||[])).next())})}function TD(e,t,r){if(r||arguments.length===2)for(var s=0,o=t.length,c;s<o;s++)(c||!(s in t))&&(c||(c=Array.prototype.slice.call(t,0,s)),c[s]=t[s]);return e.concat(c||Array.prototype.slice.call(t))}const fC=e=>e?(...t)=>e(...t):(...t)=>fetch(...t);class Tf extends Error{constructor(t,r="FunctionsError",s){super(t),this.name=r,this.context=s}toJSON(){return{name:this.name,message:this.message,context:this.context}}}class pC extends Tf{constructor(t){super("Failed to send a request to the Edge Function","FunctionsFetchError",t)}}class Nv extends Tf{constructor(t){super("Relay Error invoking the Edge Function","FunctionsRelayError",t)}}class Mv extends Tf{constructor(t){super("Edge Function returned a non-2xx status code","FunctionsHttpError",t)}}var Kh;(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"})(Kh||(Kh={}));class mC{constructor(t,{headers:r={},customFetch:s,region:o=Kh.Any}={}){this.url=t,this.headers=r,this.region=o,this.fetch=fC(s)}setAuth(t){this.headers.Authorization=`Bearer ${t}`}invoke(t){return hC(this,arguments,void 0,function*(r,s={}){var o,c;let u,d,f;try{const{headers:m,method:y,body:g,signal:b,timeout:_}=s;let S={},{region:w}=s;w||(w=this.region);const A=new URL(`${this.url}/${r}`);w&&w!=="any"&&(S["x-region"]=w,A.searchParams.set("forceFunctionRegion",w));let T;const k=!!m&&Object.keys(m).some(I=>I.toLowerCase()==="content-type");g&&!k?typeof Blob<"u"&&g instanceof Blob||g instanceof ArrayBuffer?(S["Content-Type"]="application/octet-stream",T=g):typeof g=="string"?(S["Content-Type"]="text/plain",T=g):typeof FormData<"u"&&g instanceof FormData?T=g:(S["Content-Type"]="application/json",T=JSON.stringify(g)):g&&typeof g!="string"&&!(typeof Blob<"u"&&g instanceof Blob)&&!(g instanceof ArrayBuffer)&&!(typeof FormData<"u"&&g instanceof FormData)?T=JSON.stringify(g):T=g;let x=b;_&&(d=new AbortController,u=setTimeout(()=>d.abort(),_),b?(x=d.signal,f=()=>d.abort(),b.addEventListener("abort",f)):x=d.signal);const z=yield this.fetch(A.toString(),{method:y||"POST",headers:Object.assign(Object.assign(Object.assign({},S),this.headers),m),body:T,signal:x}).catch(I=>{throw new pC(I)}),F=z.headers.get("x-relay-error");
12if(F&&F==="true")throw new Nv(z);if(!z.ok)throw new Mv(z);let U=((o=z.headers.get("Content-Type"))!==null&&o!==void 0?o:"text/plain").split(";")[0].trim().toLowerCase(),N;return U==="application/json"?N=yield z.json():U==="application/octet-stream"||U==="application/pdf"?N=yield z.blob():U==="text/event-stream"?N=z:U==="multipart/form-data"?N=yield z.formData():N=yield z.text(),{data:N,error:null,response:z}}catch(m){return{data:null,error:m,response:m instanceof Mv||m instanceof Nv?m.context:void 0}}finally{u&&clearTimeout(u),f&&((c=s.signal)===null||c===void 0||c.removeEventListener("abort",f))}})}}const p_=3,Dv=e=>Math.min(1e3*2**e,3e4),gC=[520,503],m_=["GET","HEAD","OPTIONS"];var Th=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 uo(e){"@babel/helpers - typeof";return uo=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},uo(e)}function yC(e,t){if(uo(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var s=r.call(e,t);if(uo(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function vC(e){var t=yC(e,"string");return uo(t)=="symbol"?t:t+""}function bC(e,t,r){return(t=vC(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Lv(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,s)}return r}function Us(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Lv(Object(r),!0).forEach(function(s){bC(e,s,r[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Lv(Object(r)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(r,s))})}return e}function Uv(e,t){return new Promise(r=>{if(t?.aborted){r();return}const s=setTimeout(()=>{t?.removeEventListener("abort",o),r()},e);function o(){clearTimeout(s),r()}t?.addEventListener("abort",o)})}function _C(e,t,r,s){return!(!s||r>=p_||!m_.includes(e)||!gC.includes(t))}var wC=class{constructor(e){var t,r,s,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=(s=e.shouldStripNulls)!==null&&s!==void 0?s:!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 s=this.fetch;let c=(async()=>{let u=0;for(;;){const m={};r.headers.forEach((g,b)=>{m[b]=g}),u>0&&(m["X-Retry-Count"]=String(u));let y;try{y=await s(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"||!m_.includes(r.method))throw g;if(r.retryEnabled&&u<p_){const b=Dv(u);u++,await Uv(b,r.signal);continue}throw g}if(_C(r.method,y.status,u,r.retryEnabled)){var d,f;const g=(d=(f=y.headers)===null||f===void 0?void 0:f.get("Retry-After"))!==null&&d!==void 0?d:null,b=g!==null?Math.max(0,parseInt(g,10)||0)*1e3:Dv(u);await y.text(),u++,await Uv(b,r.signal);continue}return await r.processResponse(y)}})();return this.shouldThrowOnError||(c=c.catch(u=>{var d;let f="",m="",y="";const g=u?.cause;if(g){var b,_,S,w;const k=(b=g?.message)!==null&&b!==void 0?b:"",x=(_=g?.code)!==null&&_!==void 0?_:"";f=`${(S=u?.name)!==null&&S!==void 0?S:"FetchError"}: ${u?.message}`,f+=` 13 14Caused by: ${(w=g?.name)!==null&&w!==void 0?w:"Error"}: ${k}`,x&&(f+=` (${x})`),g?.stack&&(f+=` 15${g.stack}`)}else{var A;f=(A=u?.stack)!==null&&A!==void 0?A:""}const T=this.url.toString().length;return u?.name==="AbortError"||u?.code==="ABORT_ERR"?(y="",m="Request was aborted (timeout or manual cancellation)",T>this.urlLengthLimit&&(m+=`. Note: Your request URL is ${T} 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)",T>this.urlLengthLimit&&(m+=`. Your request URL is ${T} characters. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [200+ IDs])), consider using an RPC function instead.`)),{success:!1,error:{message:`${(d=u?.
15name)!==null&&d!==void 0?d:"FetchError"}: ${u?.message}`,details:f,hint:m,code:y},data:null,count:null,status:0,statusText:""}})),c.then(e,t)}async processResponse(e){var t=this;let r=null,s=null,o=null,c=e.status,u=e.statusText;if(e.ok){var d,f;if(t.method!=="HEAD"){var m;const _=await e.text();if(_!=="")if(t.headers.get("Accept")==="text/csv")s=_;else if(t.headers.get("Accept")&&(!((m=t.headers.get("Accept"))===null||m===void 0)&&m.includes("application/vnd.pgrst.plan+text")))s=_;else try{s=JSON.parse(_)}catch{if(r={message:_},s=null,t.shouldThrowOnError)throw new Th({message:_,details:"",hint:"",code:""})}}const g=(d=t.headers.get("Prefer"))===null||d===void 0?void 0:d.match(/count=(exact|planned|estimated)/),b=(f=e.headers.get("content-range"))===null||f===void 0?void 0:f.split("/");if(g&&b&&b.length>1&&(o=parseInt(b[1])),t.isMaybeSingle&&Array.isArray(s))if(s.length>1){if(r={code:"PGRST116",details:`Results contain ${s.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},s=null,o=null,c=406,u="Not Acceptable",t.shouldThrowOnError){var y;throw new Th(Us(Us({},r),{},{hint:(y=r.hint)!==null&&y!==void 0?y:""}))}}else s.length===1?s=s[0]:s=null}else{const g=await e.text();try{r=JSON.parse(g),Array.isArray(r)&&e.status===404&&(s=[],r=null,c=200,u="OK")}catch{e.status===404&&g===""?(c=204,u="No Content"):r={message:g}}if(r&&t.shouldThrowOnError)throw new Th(r)}return{success:r===null,error:r,data:s,count:o,status:c,statusText:u}}returns(){return this}overrideTypes(){return this}},SC=class extends wC{throwOnError(){return super.throwOnError()}select(e){let t=!1;const r=(e??"*").split("").map(s=>/\s/.test(s)&&!t?"":(s==='"'&&(t=!t),s)).join("");return this.url.searchParams.set("select",r),this.headers.append("Prefer","return=representation"),this}order(e,{ascending:t=!0,nullsFirst:r,foreignTable:s,referencedTable:o=s}={}){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 s=typeof r>"u"?"limit":`${r}.limit`;return this.url.searchParams.set(s,`${e}`),this}range(e,t,{foreignTable:r,referencedTable:s=r}={}){const o=typeof s>"u"?"offset":`${s}.offset`,c=typeof s>"u"?"limit":`${s}.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:s=!1,wal:o=!1,format:c="text"}={}){var u;const d=[e?"analyze":null,t?"verbose":null,r?"settings":null,s?"buffers":null,o?"wal":null].filter(Boolean).join("|"),f=(u=this.headers.get("Accept"))!==null&&u!==void 0?u:"application/json";return this.headers.set("Accept",`application/vnd.pgrst.plan+${c}; for="${f}"; options=${d};`),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 zv=new RegExp("[,()]");var Ms=class extends SC{throwOnError(){return super.throwOnError()}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(s=>typeof s=="string"&&zv.test(s)?`"${s}"`:`${s}`).join(",");return this.url.searchParams.append(e,`in.(${r})`),this}notIn(e,t){const r=Array.from(new Set(t)).map(s=>typeof s=="string"&&zv.test(s)?`"${s}"`:`${s}`).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:s}={}){let o="";s==="plain"?o="pl":s==="phrase"?o="ph":s==="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])=>
15r!==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 s=r?`${r}.or`:"or";return this.url.searchParams.append(s,`(${e})`),this}filter(e,t,r){return this.url.searchParams.append(e,`${t}.${r}`),this}},EC=class{constructor(e,{headers:t={},schema:r,fetch:s,urlLengthLimit:o=8e3,retry:c}){this.url=e,this.headers=new Headers(t),this.schema=r,this.fetch=s,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:s}=t??{},o=r?"HEAD":"GET";let c=!1;const u=(e??"*").split("").map(m=>/\s/.test(m)&&!c?"":(m==='"'&&(c=!c),m)).join(""),{url:d,headers:f}=this.cloneRequestState();return d.searchParams.set("select",u),s&&f.append("Prefer",`count=${s}`),new Ms({method:o,url:d,headers:f,schema:this.schema,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}insert(e,{count:t,defaultToNull:r=!0}={}){var s;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 d=e.reduce((f,m)=>f.concat(Object.keys(m)),[]);if(d.length>0){const f=[...new Set(d)].map(m=>`"${m}"`);c.searchParams.set("columns",f.join(","))}}return new Ms({method:o,url:c,headers:u,schema:this.schema,body:e,fetch:(s=this.fetch)!==null&&s!==void 0?s:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}upsert(e,{onConflict:t,ignoreDuplicates:r=!1,count:s,defaultToNull:o=!0}={}){var c;const u="POST",{url:d,headers:f}=this.cloneRequestState();if(f.append("Prefer",`resolution=${r?"ignore":"merge"}-duplicates`),t!==void 0&&d.searchParams.set("on_conflict",t),s&&f.append("Prefer",`count=${s}`),o||f.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}"`);d.searchParams.set("columns",y.join(","))}}return new Ms({method:u,url:d,headers:f,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 s="PATCH",{url:o,headers:c}=this.cloneRequestState();return t&&c.append("Prefer",`count=${t}`),new Ms({method:s,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:s,headers:o}=this.cloneRequestState();return e&&o.append("Prefer",`count=${e}`),new Ms({method:r,url:s,headers:o,schema:this.schema,fetch:(t=this.fetch)!==null&&t!==void 0?t:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}},AC=class g_{constructor(t,{headers:r={},schema:s,fetch:o,timeout:c,urlLengthLimit:u=8e3,retry:d}={}){this.url=t,this.headers=new Headers(r),this.schemaName=s,this.urlLengthLimit=u;const f=o??globalThis.fetch;c!==void 0&&c>0?this.fetch=(m,y)=>{const g=new AbortController,b=setTimeout(()=>g.abort(),c),_=y?.signal;if(_){if(_.aborted)return clearTimeout(b),f(m,y);const S=()=>{clearTimeout(b),g.abort()};return _.addEventListener("abort",S,{once:!0}),f(m,Us(Us({},y),{},{signal:g.signal})).finally(()=>{clearTimeout(b),_.removeEventListener("abort",S)})}return f(m,Us(Us({},y),{},{signal:g.signal})).finally(()=>clearTimeout(b))}:this.fetch=f,this.retry=d}from(t){if(!t||typeof t!="string"||t.trim()==="")throw new Error("Invalid relation name: relation must be a non-empty string.");return new EC(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 g_(this.url,{headers:this.headers,schema:t,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}rpc(t,r={},{head:s=!1,get:o=!1,count:c}={}){var u;let d;const f=new URL(`${this.url}/rpc/${t}`);let m;const y=_=>_!==null&&typeof _=="object"&&(!Array.isArray(_)||_.some(y)),g=s&&Object.values(r).some(y);g?(d="POST",m=r):s||o?(d=s?"HEAD":"GET",Object.entries(r).filter(([_,S])=>S!==void 0).map(([_,S])=>[_,Array.isArray(S)?`{${S.join(",")}}`:`${S}`]).forEach(([_,S])=>{f.searchParams.append(_,S)})):(d="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 Ms({method:d,url:f,headers:b,schema:this.schemaName,body:m,fetch:(u=this.fetch)!==null&&u!==void 0?u:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};class TC{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 s=typeof global<"u"?global:void 0;if(s&&typeof s.WebSocket<"u")return{type:"native",wsConstructor:s.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)return{type:"unsupported",error:"Node.js detected but native WebSocket not found.",workaround:"Ensure you are running Node.js 22+ or provide a WebSocket implementation via the transport option."}}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+=` 16 17Suggested solution: ${t.workaround}`),new Error(r)}static isWebSocketSupported(){try{return this.detectEnvironment().type==="native"}catch{return!1}}}const RC="2.112.2",OC=`realtime-js/${RC}`,CC="1.0.0",y_="2.0.0",kC=y_,xC=1e4,jC=100,Qr={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},v_={close:"phx_close",error:"phx_error",join:"phx_join",leave:"phx_leave",access_token:"access_token"},Jh={connecting:"connecting",closing:"closing",closed:"closed"};class NC{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 s=[t.join_ref,t.ref,t.topic,t.event,t.payload];return r(JSON.stringify(s))}_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,s;const o=(s=(r=t.payload)===null||r===void 0?void 0:r.payload)!==null&&s!==void 0?s:new ArrayBuffer(0);return this._encodeUserBroadcastPush(t,this.BINARY_ENCODING,o)}_encodeJsonUserBroadcastPush(t){var r,s;const o=(s=(r=t.payload)===null||r===void 0?void 0:r.payload)!==null&&s!==void 0?s:{},u=new TextEncoder().encode(JSON.stringify(o)).buffer;return this._encodeUserBroadcastPush(t,this.JSON_ENCODING,u)}_encodeUserBroadcastPush(t,r,s){var o,c;const u=new TextEncoder,d=u.encode(t.topic),f=u.encode((o=t.ref)!==null&&o!==void 0?o:""),m=u.encode((c=t.join_ref)!==null&&c!==void 0?c:""),y=u.encode(t.payload.event),g=this.allowedMetadataKeys?this._pick(t.payload,this.allowedMetadataKeys):{},b=u.encode(Object.keys(g).length===0?"":JSON.stringify(g));if(m.length>255)throw new Error(`joinRef length ${m.length} exceeds maximum of 255`);if(f.length>255)throw new Error(`ref length ${f.length} exceeds maximum of 255`);if(d.length>255)throw new Error(`topic length ${d.length} exceeds maximum of 255`);if(y.length>255)throw new Error(`userEvent length ${y.length} exceeds maximum of 255`);if(b.length>255)throw new Error(`metadata length ${b.length} exceeds maximum of 255`);const _=this.USER_BROADCAST_PUSH_META_LENGTH+m.length+f.length+d.length+y.length+b.length,S=new ArrayBuffer(this.HEADER_LENGTH+_),w=new DataView(S),A=new Uint8Array(S);let T=0;w.setUint8(T++,this.KINDS.userBroadcastPush),w.setUint8(T++,m.length),w.setUint8(T++,f.length),w.setUint8(T++,d.length),w.setUint8(T++,y.length),w.setUint8(T++,b.length),w.setUint8(T++,r),A.set(m,T),T+=m.length,A.set(f,T),T+=f.length,A.set(d,T),T+=d.length,A.set(y,T),T+=y.length,A.set(b,T),T+=b.length;var k=new Uint8Array(S.byteLength+s.byteLength);return k.set(new Uint8Array(S),0),k.set(new Uint8Array(s),S.byteLength),k.buffer}decode(t,r){if(this._isArrayBuffer(t)){let s=this._binaryDecode(t);return r(s)}if(typeof t=="string"){const s=JSON.parse(t),[o,c,u,d,f]=s;return r({join_ref:o,ref:c,topic:u,event:d,payload:f})}return r({})}_binaryDecode(t){const r=new DataView(t),s=r.getUint8(0),o=new TextDecoder;if(s===this.KINDS.userBroadcast)return this._decodeUserBroadcast(t,r,o)}_decodeUserBroadcast(t,r,s){const o=r.getUint8(1),c=r.getUint8(2),u=r.getUint8(3),d=r.getUint8(4);let f=this.HEADER_LENGTH+4;const m=s.decode(t.slice(f,f+o));f=f+o;const y=s.decode(t.slice(f,f+c));f=f+c;const g=s.decode(t.slice(f,f+u));f=f+u;const b=t.slice(f,t.byteLength),_=d===this.JSON_ENCODING?JSON.parse(s.decode(b)):b,S={type:this.BROADCAST_EVENT,event:y,payload:_};return u>0&&(S.meta=JSON.parse(g)),{join_ref:null,ref:null,topic:m,event:this.BROADCAST_EVENT,payload:S}}_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(([s])=>r.includes(s)))}}var He;(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"})(He||(He={}));const Iv=(e,t,r={})=>{var s;const o=(s=r.skipTypes)!==null&&s!==void 0?s:[];return t?Object.keys(t).reduce((c,u)=>(c[u]=MC(u,e,t,o),c),{}):{}},MC=(e,t,r,s)=>{const o=t.find(d=>d.name===e),c=o?.type,u=r[e];return c&&!s.includes(c)?b_(c,u):Qh(u)},b_=(e,t)=>
17{if(e.charAt(0)==="_"){const r=e.slice(1,e.length);return zC(t,r)}switch(e){case He.bool:return DC(t);case He.float4:case He.float8:case He.int2:case He.int4:case He.int8:case He.numeric:case He.oid:return LC(t);case He.json:case He.jsonb:return UC(t);case He.timestamp:return IC(t);case He.abstime:case He.date:case He.daterange:case He.int4range:case He.int8range:case He.money:case He.reltime:case He.text:case He.time:case He.timestamptz:case He.timetz:case He.tsrange:case He.tstzrange:return Qh(t);default:return Qh(t)}},Qh=e=>e,DC=e=>{switch(e){case"t":return!0;case"f":return!1;default:return e}},LC=e=>{if(typeof e=="string"){const t=parseFloat(e);if(!Number.isNaN(t))return t}return e},UC=e=>{if(typeof e=="string")try{return JSON.parse(e)}catch{return e}return e},zC=(e,t)=>{if(typeof e!="string")return e;const r=e.length-1,s=e[r];if(e[0]==="{"&&s==="}"){let c;const u=e.slice(1,r);try{c=JSON.parse("["+u+"]")}catch{c=u?u.split(","):[]}return c.map(d=>b_(t,d))}return e},IC=e=>typeof e=="string"?e.replace(" ","T"):e,__=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 Hs=e=>typeof e=="function"?e:function(){return e},PC=typeof self<"u"?self:null,Ds=typeof window<"u"?window:null,kn=PC||Ds||globalThis,BC="2.0.0",$C=1e4,HC=1e3,qC=100,jn={connecting:0,open:1,closing:2,closed:3},zt={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},lr={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave"},Xh={longpoll:"longpoll",websocket:"websocket"},VC={complete:4},Zh="base64url.bearer.phx.",Ql=class{constructor(e,t,r,s){this.channel=e,this.event=t,this.payload=r||function(){return{}},this.receivedResp=null,this.timeout=s,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(s=>s.status===e).forEach(s=>s.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})}},w_=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))}},GC=class{constructor(e,t,r){this.state=zt.closed,this.topic=e,this.params=Hs(t||{}),this.socket=r,this.bindings=[],this.bindingRef=0,this.timeout=this.socket.timeout,this.joinedOnce=!1,this.joinPush=new Ql(this,lr.join,this.params,this.timeout),this.pushBuffer=[],this.stateChangeRefs=[],this.rejoinTimer=new w_(()=>{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=zt.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(s=>s.send()),this.pushBuffer=[]}),this.joinPush.receive("error",s=>{this.state=zt.errored,this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,s),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.onClose(()=>{this.rejoinTimer.reset(),this.socket.hasLogger()&&this.socket.log("channel",`close ${this.topic}`),this.state=zt.closed,this.socket.remove(this)}),this.onError(s=>{this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,s),this.isJoining()&&this.joinPush.reset(),this.state=zt.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 Ql(this,lr.leave,Hs({}),this.timeout).send(),this.state=zt.errored,this.joinPush.reset(),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.on(lr.reply,(s,o)=>{this.trigger(this.replyEventName(o),s)})}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: 18,993 bytes, lines 17-18
17teardown(){this.pushBuffer.forEach(e=>e.destroy()),this.pushBuffer=[],this.rejoinTimer.reset(),this.joinPush.destroy(),this.state=zt.closed,this.bindings=[]}onClose(e){this.on(lr.close,e)}onError(e){return this.on(lr.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 s=new Ql(this,e,function(){return t},r);return this.canPush()?s.send():(s.startTimeout(),this.pushBuffer.push(s)),s}leave(e=this.timeout){this.rejoinTimer.reset(),this.joinPush.cancelTimeout(),this.state=zt.leaving;let t=()=>{this.socket.hasLogger()&&this.socket.log("channel",`leave ${this.topic}`),this.trigger(lr.close,"leave")},r=new Ql(this,lr.leave,Hs({}),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,s){return this.topic!==e?!1:s&&s!==this.joinRef()?(this.socket.hasLogger()&&this.socket.log("channel","dropping outdated message",{topic:e,event:t,payload:r,joinRef:s}),!1):!0}joinRef(){return this.joinPush.ref}rejoin(e=this.timeout){this.isLeaving()||(this.socket.leaveOpenTopic(this.topic),this.state=zt.joining,this.joinPush.resend(e))}trigger(e,t,r,s){let o=this.onMessage(e,t,r,s);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,s||this.joinRef())}replyEventName(e){return`chan_reply_${e}`}isClosed(){return this.state===zt.closed}isErrored(){return this.state===zt.errored}isJoined(){return this.state===zt.joined}isJoining(){return this.state===zt.joining}isLeaving(){return this.state===zt.leaving}},Tc=class{static request(e,t,r,s,o,c,u){if(kn.XDomainRequest){let d=new kn.XDomainRequest;return this.xdomainRequest(d,e,t,s,o,c,u)}else if(kn.XMLHttpRequest){let d=new kn.XMLHttpRequest;return this.xhrRequest(d,e,t,r,s,o,c,u)}else{if(kn.fetch&&kn.AbortController)return this.fetchRequest(e,t,r,s,o,c,u);throw new Error("No suitable XMLHttpRequest implementation found")}}static fetchRequest(e,t,r,s,o,c,u){let d={method:e,headers:r,body:s},f=null;return o&&(f=new AbortController,setTimeout(()=>f.abort(),o),d.signal=f.signal),kn.fetch(t,d).then(m=>m.text()).then(m=>this.parseJSON(m)).then(m=>u&&u(m)).catch(m=>{m.name==="AbortError"&&c?c():u&&u(null)}),f}static xdomainRequest(e,t,r,s,o,c,u){return e.timeout=o,e.open(t,r),e.onload=()=>{let d=this.parseJSON(e.responseText);u&&u(d)},c&&(e.ontimeout=c),e.onprogress=()=>{},e.send(s),e}static xhrRequest(e,t,r,s,o,c,u,d){e.open(t,r,!0),e.timeout=c;for(let[f,m]of Object.entries(s))e.setRequestHeader(f,m);return e.onerror=()=>d&&d(null),e.onreadystatechange=()=>{if(e.readyState===VC.complete&&d){let f=this.parseJSON(e.responseText);d(f)}},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 s in e){if(!Object.prototype.hasOwnProperty.call(e,s))continue;let o=t?`${t}[${s}]`:s,c=e[s];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)}`}},YC=e=>{let t="",r=new Uint8Array(e),s=r.byteLength;for(let o=0;o<s;o++)t+=String.fromCharCode(r[o]);return btoa(t)},Os=class{constructor(e,t){t&&t.length===2&&t[1].startsWith(Zh)&&(this.authToken=atob(t[1].slice(Zh.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=jn.connecting,setTimeout(()=>this.poll(),0)}normalizeEndpoint(e){return e.replace("ws://","http://").replace("wss://","https://").replace(new RegExp("(.*)/"+Xh.websocket),"$1/"+Xh.longpoll)}endpointURL(){return Tc.appendParams(this.pollEndpoint,{token:this.token})}closeAndRetry(e,t,r){this.close(e,t,r),this.readyState=jn.connecting}ontimeout(){this.onerror("timeout"),this.closeAndRetry(1005,"timeout",!1)}isActive(){return this.readyState===jn.open||this.readyState===jn.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:s,messages:o}=t;if(r===410&&this.token!==null){this.onerror(410),this.closeAndRetry(3410,"session_gone",!1);return}this.token=s}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=jn.open,this.onopen({}),this.poll();break;case 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=YC(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,t=0){this.awaitingBatchAck=!0;const r=t+qC,s=e.slice(t,r);this.ajax("POST",{"Content-Type":"application/x-ndjson"},s.join(` 18`),()=>this.onerror("timeout"),o=>{!o||o.status!==200?(this.awaitingBatchAck=!1,this.onerror(o&&o.status),this.closeAndRetry(1011,"internal server error",!1)):r<e.length?this.batchSend(e,r):this.batchBuffer.length>0?(this.batchSend(this.batchBuffer),this.batchBuffer=[]):this.awaitingBatchAck=!1})}close(e,t,r){for(let o of this.reqs)o.abort();this.readyState=jn.closed;let s=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",s)):this.onclose(s)}ajax(e,t,r,s,o){let c,u=()=>{this.reqs.delete(c),s()};c=Tc.request(e,this.endpointURL(),t,r,this.timeout,u,d=>{this.reqs.delete(c),this.isActive()&&o(d)}),this.reqs.add(c)}},FC=class Wa{constructor(t,r={}){let s=r.events||{state:"presence_state",diff:"presence_diff"};this.state=Object.create(null),this.pendingDiffs=[],this.channel=t,this.joinRef=null,this.caller={onJoin:function(){},onLeave:function(){},onSync:function(){}},this.channel.on(s.state,o=>{let{onJoin:c,onLeave:u,onSync:d}=this.caller;this.joinRef=this.channel.joinRef(),this.state=Wa.syncState(this.state,o,c,u),this.pendingDiffs.forEach(f=>{this.state=Wa.syncDiff(this.state,f,c,u)}),this.pendingDiffs=[],d()}),this.channel.on(s.diff,o=>{let{onJoin:c,onLeave:u,onSync:d}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(o):(this.state=Wa.syncDiff(this.state,o,c,u),d())})}onJoin(t){this.caller.onJoin=t}onLeave(t){this.caller.onLeave=t}onSync(t){this.caller.onSync=t}list(t){return Wa.list(this.state,t)}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel.joinRef()}static syncState(t,r,s,o){let c=this.toNullProtoObj(this.clone(t));r=this.toNullProtoObj(r);let u=Object.create(null),d=Object.create(null);return this.map(c,(f,m)=>{r[f]||(d[f]=m)}),this.map(r,(f,m)=>{let y=c[f];if(y){let g=m.metas.map(w=>w.phx_ref),b=y.metas.map(w=>w.phx_ref),_=m.metas.filter(w=>b.indexOf(w.phx_ref)<0),S=y.metas.filter(w=>g.indexOf(w.phx_ref)<0);_.length>0&&(u[f]=m,u[f].metas=_),S.length>0&&(d[f]=this.clone(y),d[f].metas=S)}else u[f]=m}),this.syncDiff(c,{joins:u,leaves:d},s,o)}static syncDiff(t,r,s,o){t=this.toNullProtoObj(t);let{joins:c,leaves:u}=this.clone(r);return s||(s=function(){}),o||(o=function(){}),this.map(c,(d,f)=>{let m=t[d];if(t[d]=this.clone(f),m){let y=t[d].metas.map(b=>b.phx_ref),g=m.metas.filter(b=>y.indexOf(b.phx_ref)<0);t[d].metas.unshift(...g)}s(d,m,f)}),this.map(u,(d,f)=>{let m=t[d];if(!m)return;let y=f.metas.map(g=>g.phx_ref);m.metas=m.metas.filter(g=>y.indexOf(g.phx_ref)<0),o(d,m,f),m.metas.length===0&&delete t[d]}),t}static list(t,r){return r||(r=function(s,o){return o}),this.map(t,(s,o)=>r(s,o))}static map(t,r){return Object.getOwnPropertyNames(t).map(s=>r(s,t[s]))}static toNullProtoObj(t){if(Object.getPrototypeOf(t)===null)return t;let r=Object.create(null);return Object.getOwnPropertyNames(t).forEach(s=>{r[s]=t[s]}),r}static clone(t){return JSON.parse(JSON.stringify(t))}},Xl={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,s,o,c,u]=JSON.parse(e);return t({join_ref:r,ref:s,topic:o,event:c,payload:u})}},binaryEncode(e){let{join_ref:t,ref:r,event:s,topic:o,payload:c}=e,u=new TextEncoder,d=u.encode(t),f=u.encode(r),m=u.encode(o),y=u.encode(s);this.assertFieldSize(d.byteLength,"join_ref"),this.assertFieldSize(f.byteLength,"ref"),this.assertFieldSize(m.byteLength,"topic"),this.assertFieldSize(y.byteLength,"event");let g=this.META_LENGTH+d.byteLength+f.byteLength+m.byteLength+y.byteLength,b=new ArrayBuffer(this.HEADER_LENGTH+g),_=new Uint8Array(b),S=new DataView(b),w=0;S.setUint8(w++,this.KINDS.push),S.setUint8(w++,d.byteLength),S.setUint8(w++,f.byteLength),S.setUint8(w++,m.byteLength),S.setUint8(w++,y.byteLength),_.set(d,w),w+=d.byteLength,_.set(f,w),w+=f.byteLength,_.set(m,w),w+=m.byteLength,_.set(y,w),w+=y.byteLength;var A=new Uint8Array(b.byteLength+c.byteLength);return A.set(_,0),A.set(new Uint8Array(c),b.byteLength),A.buffer},assertFieldSize(e,t){if(e>255)throw new Error(`unable to convert ${t} to binary: must be less than or equal to 255 bytes, but is ${e} bytes`)},binaryDecode(e){let t=new DataView(e),r=t.getUint8(0),s=new TextDecoder;switch(r){case this.KINDS.push:return this.decodePush(e,t,s);case this.KINDS.reply:return this.decodeReply(e,t,s);case this.KINDS.broadcast:return this.decodeBroadcast(e,t,s)}},decodePush(e,t,r){let s=t.getUint8(1),o=t.getUint8(2),c=t.getUint8(3),u=this.HEADER_LENGTH+this.META_LENGTH-1,d=r.decode(e.slice(u,u+s));u=u+s;let f=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:d,ref:null,topic:f,event:m,payload:y}},decodeReply(e,t,r){let s=t.getUint8(1),o=t.getUint8(2),c=t.getUint8(3),u=t.getUint8(4),d=this.HEADER_LENGTH+this.META_LENGTH,f=r.decode(e.slice(d,d+s));d=d+s;let m=r.decode(e.slice(d,d+o));d=d+o;let y=r.decode(e.slice(d,d+c));d=d+c;let g=r.decode(e.slice(d,d+u));d=d+u;let b=e.slice(d,e.byteLength),_={status:g,response:b};return{join_ref:f,ref:m,topic:y,event:lr.reply,payload:_}},decodeBroadcast(e,t,r){let s=t.getUint8(1),o=t.getUint8(2),c=this.HEADER_LENGTH+2,u=r.decode(e.slice(c,c+s));c=c+s;let d=r.decode(e.slice(c,c+o));c=c+o;let f=e.slice(c,e.byteLength);return{join_ref:null,ref:null,topic:u,event:d,payload:f}}},KC=class{constructor(e,t={}){this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.channels=[],this.sendBuffer=[],this.ref=0,this.fallbackRef=null,this.timeout=t.timeout||$C,this.transport=t.transport||kn.WebSocket||Os,this.conn=void 0,this.primaryPassedHealthCheck=!1,this.longPollFallbackMs=t.longPollFallbackMs,this.fallbackTimer=null;let r=null;try{r=kn&&kn.sessionStorage}catch{}this.sessionStore=t.sessionStorage||r,this.establishedConnections=0,this.defaultEncoder=Xl.encode.bind(Xl),this.defaultDecoder=Xl.decode.bind(Xl),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!==Os?(this.encode=t.encode||this.defaultEncoder,this.decode=t.decode||this.defaultDecoder):(this.encode=this.defaultEncoder,this.decode=this.defaultDecoder);let s=null;Ds&&Ds.addEventListener&&(Ds.addEventListener("pagehide",o=>{this.conn&&(this.disconnect(),s=this.connectClock)}),Ds.addEventListener("pageshow",o=>{s===this.connectClock&&(s=null,this.connect())}),Ds.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=Hs(t.params||{}),this.endPoint=`${e}/${Xh.websocket}`,this.vsn=t.vsn||BC,this.heartbeatTimeoutTimer=null,this.heartbeatTimer=null,this.heartbeatSentAt=null,this.pendingHeartbeatRef=null,this.reconnectTimer=new w_(()=>{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&&Hs(t.authToken)}getLongPollTransport(){return Os}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=Tc.appendParams(Tc.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=Hs(e)),!(this.conn&&!this.disconnecting)&&(this.longPollFallbackMs&&this.transport!==Os?this.connectWithFallback(Os,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 s=this.onMessage(o=>{o.ref===t&&(this.off([s]),e(Date.now()-r))});return!0}transportName(e){return e===Os?"LongPoll":e.name}transportConnect(){this.connectClock++,this.closeWasClean=!1;let e;this.authToken&&(e=["phoenix",`${Zh}${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,s=!0,o,c,u=this.transportName(e),d=f=>{this.log("transport",`falling back to ${u}...`,f),this.off([o,c]),s=!1,this.replaceTransport(e),this.transportConnect()};if(this.getSession(`phx:fallback:${u}`))return d("memorized");this.fallbackTimer=setTimeout(d,t),c=this.onError(f=>{this.log("transport","error",f),s&&!r&&(clearTimeout(this.fallbackTimer),d(f))}),this.fallbackRef&&this.off([this.fallbackRef]),this.fallbackRef=this.onOpen(()=>{if(r=!0,!s){let f=this.transportName(e);return this.primaryPassedHealthCheck||this.storeSession(`phx:fallback:${f}`,"true"),this.log("transport",`established ${f} fallback`)}clearTimeout(this.fallbackTimer),this.fallbackTimer=setTimeout(d,t),this.ping(f=>{this.log("transport","connected to primary after",f),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(),HC,"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 s=this.conn;this.waitForBufferDone(s,()=>{t?s.close(t,r||""):s.close(),this.waitForSocketClosed(s,()=>{this.conn===s&&(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===jn.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)}
18triggerChanError(e){this.channels.forEach(t=>{t.isErrored()||t.isLeaving()||t.isClosed()||t.trigger(lr.error,e)})}connectionState(){switch(this.conn&&this.conn.readyState){case jn.connecting:return"connecting";case jn.open:return"open";case jn.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 GC(e,t,this);return this.channels.push(r),r}push(e){if(this.hasLogger()){let{topic:t,event:r,payload:s,ref:o,join_ref:c}=e;this.log("push",`${t} ${r} (${c}, ${o})`,s)}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:s,payload:o,ref:c,join_ref:u}=t;if(c&&c===this.pendingHeartbeatRef){const d=this.heartbeatSentAt?Date.now()-this.heartbeatSentAt:void 0;this.clearHeartbeats();try{this.heartbeatCallback(o.status==="ok"?"ok":"error",d)}catch(f){this.log("error","error in heartbeat callback",f)}this.pendingHeartbeatRef=null,this.heartbeatSentAt=null,this.autoSendHeartbeat&&(this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}this.hasLogger()&&this.log("receive",`${o.status||""} ${r} ${s} ${c&&"("+c+")"||""}`.trim(),o);for(let d=0;d<this.channels.length;d++){const f=this.channels[d];f.isMember(r,s,o,u)&&f.trigger(s,o,c,u)}this.triggerStateCallbacks("message",t)})}triggerStateCallbacks(e,...t){try{this.stateChangeCallbacks[e].forEach(([r,s])=>{try{s(...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 ro{constructor(t,r){const s=QC(r);this.presence=new FC(t.getChannel(),s),this.presence.onJoin((o,c,u)=>{const d=ro.onJoinPayload(o,c,u);t.getChannel().trigger("presence",d)}),this.presence.onLeave((o,c,u)=>{const d=ro.onLeavePayload(o,c,u);t.getChannel().trigger("presence",d)}),this.presence.onSync(()=>{t.getChannel().trigger("presence",{event:"sync"})})}get state(){return ro.transformState(this.presence.state)}static transformState(t){return t=JC(t),Object.getOwnPropertyNames(t).reduce((r,s)=>{const o=t[s];return r[s]=fc(o),r},{})}static onJoinPayload(t,r,s){const o=Pv(r),c=fc(s);return{event:"join",key:t,currentPresences:o,newPresences:c}}static onLeavePayload(t,r,s){const o=Pv(r),c=fc(s);return{event:"leave",key:t,currentPresences:o,leftPresences:c}}}function fc(e){return e.metas.map(t=>{const r=Object.getOwnPropertyDescriptors(t),s=Object.defineProperties({},r);return s.presence_ref=s.phx_ref,delete s.phx_ref,delete s.phx_ref_prev,s})}function JC(e){return JSON.parse(JSON.stringify(e))}function QC(e){return e?.events&&{events:e.events}}function Pv(e){return e?.metas?fc(e):[]}var Bv;(function(e){e.SYNC="sync",e.JOIN="join",e.LEAVE="leave"})(Bv||(Bv={}));class XC{get state(){return this.presenceAdapter.state}constructor(t,r){this.channel=t,this.presenceAdapter=new ro(this.channel.channelAdapter,r)}}function ZC(e){if(e instanceof Error)return e;if(typeof e=="string")return new Error(e);
18if(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 WC{constructor(t,r,s){const o=ek(s);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,s){let o;try{o=this.channel.push(t,r,s)}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>jC){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===Qr.joined}isJoined(){return this.state===Qr.joined}isJoining(){return this.state===Qr.joining}isClosed(){return this.state===Qr.closed}isLeaving(){return this.state===Qr.leaving}updateFilterBindings(t){this.channel.filterBindings=t}updatePayloadTransform(t){this.channel.onMessage=t}getChannel(){return this.channel}}function ek(e){return{config:Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},e.config)}}const tk=/[,()"\\]/,nk=e=>tk.test(e)||e!==e.trim(),rk=e=>`"${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`,$v=e=>{const t=e===null?"null":String(e);return nk(t)?rk(t):t},ik=e=>e===null?"null":String(e),sk=(e,t)=>{if(e==="in"){const r=Array.isArray(t)?t:[t];if(r.length===0)throw new Error("Realtime `in` filter requires at least one value.");return`in.(${Array.from(new Set(r)).map(o=>$v(o)).join(",")})`}return e==="is"?`is.${ik(t)}`:`${e}.${$v(t)}`};class ak{constructor(){this.filters=[]}add(t,r,s,o=!1){const c=o?"not.":"";return this.filters.push(`${t}=${c}${sk(r,s)}`),this}eq(t,r){return this.add(t,"eq",r)}neq(t,r){return this.add(t,"neq",r)}gt(t,r){return this.add(t,"gt",r)}gte(t,r){return this.add(t,"gte",r)}lt(t,r){return this.add(t,"lt",r)}lte(t,r){return this.add(t,"lte",r)}in(t,r){return this.add(t,"in",r)}like(t,r){return this.add(t,"like",r)}ilike(t,r){return this.add(t,"ilike",r)}match(t,r){return this.add(t,"match",r)}imatch(t,r){return this.add(t,"imatch",r)}is(t,r){return this.add(t,"is",r)}isDistinct(t,r){return this.add(t,"isdistinct",r)}not(t,r,s){return this.add(t,r,s,!0)}build(){return this.filters.join(",")}toString(){return this.build()}}var Hv;(function(e){e.ALL="*",e.INSERT="INSERT",e.UPDATE="UPDATE",e.DELETE="DELETE"})(Hv||(Hv={}));var ji;(function(e){e.BROADCAST="broadcast",e.PRESENCE="presence",e.POSTGRES_CHANGES="postgres_changes",e.SYSTEM="system"})(ji||(ji={}));var cr;(function(e){e.SUBSCRIBED="SUBSCRIBED",e.TIMED_OUT="TIMED_OUT",e.CLOSED="CLOSED",e.CHANNEL_ERROR="CHANNEL_ERROR"})(cr||(cr={}));class ur{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:{}},s){var o,c;if(this.topic=t,this.params=r,this.socket=s,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 WC(this.socket.socketAdapter,t,this.params),this.presence=new XC(this),this._onClose(()=>{this.socket._remove(this)}),this._updateFilterTransform(),this.broadcastEndpointURL=__(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 s,o,c;if(this.socket.isConnected()||this.socket.connect(),this.channelAdapter.isClosed()){const{config:{broadcast:u,presence:d,private:f}}=this.params,m=(o=(s=this.bindings.postgres_changes)===null||s===void 0?void 0:s.map(_=>_.filter))!==null&&o!==void 0?o:[],y=!!this.bindings[ji.PRESENCE]&&this.bindings[ji.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({},d),{enabled:y}),postgres_changes:m,private:f};this.socket.accessTokenValue&&(g.access_token=this.socket.accessTokenValue),this._onError(_=>{t?.(cr.CHANNEL_ERROR,ZC(_))}),this._onClose(()=>t?.(cr.CLOSED)),this.updateJoinPayload(Object.assign({config:b},g)),this._updateFilterMessage(),this.channelAdapter.subscribe(r).receive("ok",async({postgres_changes:_})=>
18{if(this.socket._isManualToken()||this.socket.setAuth(),_===void 0){t?.(cr.SUBSCRIBED);return}this._updatePostgresBindings(_,t)}).receive("error",_=>{this.state=Qr.errored;const S=Object.values(_).join(", ")||"error";t?.(cr.CHANNEL_ERROR,new Error(S,{cause:_}))}).receive("timeout",()=>{t?.(cr.TIMED_OUT)})}return this}_updatePostgresBindings(t,r){var s;const o=this.bindings.postgres_changes,c=(s=o?.length)!==null&&s!==void 0?s:0,u=[];for(let d=0;d<c;d++){const f=o[d],{filter:{event:m,schema:y,table:g,filter:b}}=f,_=t&&t[d];if(_&&_.event===m&&ur.isFilterValueEqual(_.schema,y)&&ur.isFilterValueEqual(_.table,g)&&ur.isFilterValueEqual(_.filter,b))u.push(Object.assign(Object.assign({},f),{id:_.id}));else{this.unsubscribe(),this.state=Qr.errored,r?.(cr.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=u,this.state!=Qr.errored&&r&&r(cr.SUBSCRIBED)}presenceState(){return this.presence.state}async track(t,r={}){return await this.send({type:"presence",event:"track",payload:t},r)}async untrack(t={}){return await this.send({type:"presence",event:"untrack"},t)}on(t,r,s){const o=this.channelAdapter.isJoined()||this.channelAdapter.isJoining(),c=t===ji.PRESENCE||t===ji.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,s)}async httpSend(t,r,s={}){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 d=new URL(this.broadcastEndpointURL);d.pathname+=`/${encodeURIComponent(this.subTopic)}/events/${encodeURIComponent(t)}`,this.private&&d.searchParams.set("private","true");const f={method:"POST",headers:u,body:c?r:JSON.stringify(r)},m=await this._fetchWithTimeout(d.toString(),f,(o=s.timeout)!==null&&o!==void 0?o:this.timeout);if(m.status===202)return{success:!0};if(m.status===404)return Promise.reject(new Error("httpSend() requires Realtime server v2.97.0 or newer; the endpoint returned 404. Update your Supabase CLI to a recent version, or upgrade the Realtime server in your self-hosted setup. See https://github.com/supabase/supabase-js/blob/master/packages/core/realtime-js/migrations/httpsend-server-version.md"));let y=m.statusText;try{const g=await m.json();y=g.error||g.message||y}catch{}return Promise.reject(new Error(y))}async send(t,r={}){var s,o;if(!this.channelAdapter.canPush()&&t.type==="broadcast"){console.warn("Realtime send() is automatically falling back to REST API. This behavior will be deprecated
18in the future. Please use httpSend() explicitly for REST delivery.");const{event:c,payload:u}=t,d={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(d.Authorization=`Bearer ${this.socket.accessTokenValue}`);const f={method:"POST",headers:d,body:JSON.stringify({messages:[{topic:this.subTopic,event:c,payload:u,private:this.private}]})};try{const m=await this._fetchWithTimeout(this.broadcastEndpointURL,f,(s=r.timeout)!==null&&s!==void 0?s: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,d,f;const m=this.channelAdapter.push(t.type,t,r.timeout||this.timeout);t.type==="broadcast"&&!(!((f=(d=(u=this.params)===null||u===void 0?void 0:u.config)===null||d===void 0?void 0:d.broadcast)===null||f===void 0)&&f.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,s){const o=new AbortController,c=setTimeout(()=>o.abort(),s),u=await this.socket.fetch(t,Object.assign(Object.assign({},r),{signal:o.signal}));return clearTimeout(c),u}_on(t,r,s){var o;const c=t.toLocaleLowerCase(),u=r?.filter;if((u instanceof ak||typeof u=="object"&&u!==null&&typeof u.build=="function")&&(r=Object.assign(Object.assign({},r),{filter:u.build()})),c===ji.POSTGRES_CHANGES&&((o=this.bindings[c])===null||o===void 0?void 0:o.find(y=>ur.isSamePostgresFilter(y.filter,r))))return this.socket.log("error",`duplicate \`postgres_changes\` binding for ${this.topic} ignored`,r),this;const d=this.channelAdapter.on(t,s),f={type:c,filter:r,callback:s,ref:d};return this.bindings[c]?this.bindings[c].push(f):this.bindings[c]=[f],this._updateFilterMessage(),this}_onClose(t){this.channelAdapter.onClose(t)}_onError(t){this.channelAdapter.onError(t)}_updateFilterMessage(){this.channelAdapter.updateFilterBindings((t,r,s)=>{var o,c,u,d,f,m,y;const g=t.event.toLocaleLowerCase();if(this._notThisChannelEvent(g,s))return!1;const b=(o=this.bindings[g])===null||o===void 0?void 0:o.find(_=>_.ref===t.ref);if(!b)return!0;if(["broadcast","presence","postgres_changes"].includes(g))if("id"in b){const _=b.id,S=(c=b.filter)===null||c===void 0?void 0:c.event;return _&&((u=r.ids)===null||u===void 0?void 0:u.includes(_))&&(S==="*"||S?.toLocaleLowerCase()===((d=r.data)===null||d===void 0?void 0:d.type.toLocaleLowerCase()))}else{const _=(m=(f=b?.filter)===null||f===void 0?void 0:f.event)===null||m===void 0?void 0:m.toLocaleLowerCase();return _==="*"||_===((y=r?.event)===null||y===void 0?void 0:y.toLocaleLowerCase())}else return b.type.toLocaleLowerCase()===g})}_notThisChannelEvent(t,r){const{close:s,error:o,leave:c,join:u}=v_;return r&&[s,o,c,u].includes(t)&&r!==this.joinPush.ref}_updateFilterTransform(){this.channelAdapter.updatePayloadTransform((t,r,s)=>{if(typeof r=="object"&&"ids"in r){const o=r.data,{schema:c,table:u,commit_timestamp:d,type:f,errors:m}=o;return Object.assign(Object.assign({},{schema:c,table:u,commit_timestamp:d,eventType:f,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 s of t.bindings[r])this._on(s.type,s.filter,s.callback)}static isFilterValueEqual(t,r){return(t??void 0)===(r??void 0)}static isSamePostgresFilter(t,r){var s,o,c,u;const d=(o=(s=t?.select)===null||s===void 0?void 0:s.join())!==null&&o!==void 0?o:void 0,f=(u=(c=r?.select)===null||c===void 0?void 0:c.join())!==null&&u!==void 0?u:void 0;return t?.event===r?.event&&ur.isFilterValueEqual(t?.schema,r?.schema)&&ur.isFilterValueEqual(t?.table,r?.table)&&ur.isFilterValueEqual(t?.filter,r?.filter)&&d===f}_getPayloadRecords(t){const r={new:{},old:{}};return(t.type==="INSERT"||t.type==="UPDATE")&&(r.new=Iv(t.columns,t.record)),(t.type==="UPDATE"||t.type==="DELETE")&&(r.old=Iv(t.columns,t.old_record)),r}}class ok{constructor(t,r){this.socket=new KC(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,s,o=1e4){return new Promise(c=>{setTimeout(()=>c("timeout"),o),this.socket.disconnect(()=>{t(),c("ok")},r,s)})}push(t){this.socket.push(t)}log(t,r,s){this.socket.log(t,r,s)}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()==Jh.connecting}isDisconnecting(){return this.socket.connectionState()==Jh.closing}connectionState(){return this.socket.connectionState()}endPointURL(){return this.socket.endPointURL()}sendHeartbeat(){this.socket.sendHeartbeat()}getSocket(){return this.socket}}const qv={HEARTBEAT_INTERVAL:25e3},lk=[1e3,2e3,5e3,1e4],ck=1e4;function uk(){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 dk(){try{if(typeof globalThis<"u"&&globalThis.sessionStorage)return globalThis.sessionStorage}catch{}return uk()}const hk=` 19 addEventListener("message", (e) => { 20 if (e.data.event === "start") { 21 setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval); 22 } 23 });`;class fk{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 s;if(this.channels=new Array,this.accessTokenValue=null,this.accessToken=null,this.apiKey=null,this.httpEndpoint="",this.headers={},this.params={}
23,this.ref=0,this.serializer=new NC,this._manuallySetToken=!1,this._authPromise=null,this._authGeneration=0,this._workerHeartbeatTimer=void 0,this._pendingWorkerHeartbeatRef=null,this._pendingDisconnectTimer=null,this._disconnectOnEmptyChannelsAfterMs=0,this._resolveFetch=c=>c?(...u)=>c(...u):(...u)=>fetch(...u),!(!((s=r?.params)===null||s===void 0)&&s.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 ok(t,o),this.httpEndpoint=__(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 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 s=>{const o=await s.unsubscribe();return s.teardown(),o}),r=await Promise.all(t);return await this.disconnect(),r}log(t,r,s){this.socketAdapter.log(t,r,s)}connectionState(){return this.socketAdapter.connectionState()||Jh.closed}isConnected(){return this.socketAdapter.isConnected()}isConnecting(){return this.socketAdapter.isConnecting()}isDisconnecting(){return this.socketAdapter.isDisconnecting()}channel(t,r={config:{}}){const s=`realtime:${t}`,o=this.getChannels().find(c=>c.topic===s);if(o)return o;{const c=new ur(`realtime:${t}`,r,this);return this._cancelPendingDisconnect(),this.channels.push(c),c}}push(t){this.socketAdapter.push(t)}async setAuth(t=null){const r=++this._authGeneration,s=this._performAuth(t,r);r===this._authGeneration&&(this._authPromise=s);try{await s}finally{this._authPromise===s&&(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}
23this._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,r){let s,o=!1;if(t)s=t,o=!0;else if(this.accessToken)try{s=await this.accessToken()}catch(c){this.log("error","Error fetching access token from callback",c),s=this.accessTokenValue}else s=this.accessTokenValue;r===this._authGeneration&&(this.accessToken?this._manuallySetToken=!1:o&&(this._manuallySetToken=!0),this.accessTokenValue!=s&&(this.accessTokenValue=s,this.channels.forEach(c=>{const u={access_token:s,version:OC};c.updateJoinPayload(u),c.joinedOnce&&c.channelAdapter.isJoined()&&c.channelAdapter.push(v_.access_token,{access_token:s})})))}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,s)=>{r!=="disconnected"&&(r=="sent"&&this._setAuthSafely(),t&&t(r,s))}}_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 s=new Blob([hk],{type:"application/javascript"});r=URL.createObjectURL(s)}return r}_initializeOptions(t){var r,s,o,c,u,d,f,m,y,g,b,_;this.worker=(r=t?.worker)!==null&&r!==void 0?r:!1,this.accessToken=(s=t?.accessToken)!==null&&s!==void 0?s:null;const S={};S.timeout=(o=t?.timeout)!==null&&o!==void 0?o:xC,S.heartbeatIntervalMs=(c=t?.heartbeatIntervalMs)!==null&&c!==void 0?c:qv.HEARTBEAT_INTERVAL,this._disconnectOnEmptyChannelsAfterMs=(u=t?.disconnectOnEmptyChannelsAfterMs)!==null&&u!==void 0?u:2*((d=t?.heartbeatIntervalMs)!==null&&d!==void 0?d:qv.HEARTBEAT_INTERVAL),S.transport=(f=t?.transport)!==null&&f!==void 0?f:TC.getWebSocketConstructor(),S.params=t?.params,S.logger=t?.logger,S.heartbeatCallback=this._wrapHeartbeatCallback(t?.heartbeatCallback),S.sessionStorage=(m=t?.sessionStorage)!==null&&m!==void 0?m:dk(),S.reconnectAfterMs=(y=t?.reconnectAfterMs)!==null&&y!==void 0?y:(k=>lk[k-1]||ck);let w,A;const T=(g=t?.vsn)!==null&&g!==void 0?g:kC;switch(T){case CC:w=(k,x)=>x(JSON.stringify(k)),A=(k,x)=>x(JSON.parse(k));break;case y_:w=this.serializer.encode.bind(this.serializer),A=this.serializer.decode.bind(this.serializer);break;default:throw new Error(`Unsupported serializer version: ${S.vsn}`)}if(S.vsn=T,S.encode=(b=t?.encode)!==null&&b!==void 0?b:w,S.decode=(_=t?.decode)!==null&&_!==void 0?_:A,S.beforeReconnect=this._reconnectAuth.bind(this),(t?.logLevel||t?.log_level)&&(this.logLevel=t.logLevel||t.log_level,S.params=Object.assign(Object.assign({},S.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,S.autoSendHeartbeat=!this.worker}return S}async _reconnectAuth(){await this._waitForAuthIfNeeded(),this.isConnected()||this.connect()}}
23var ho=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 pk(e,t,r){const s=new URL(t,e);if(r)for(const[o,c]of Object.entries(r))c!==void 0&&s.searchParams.set(o,c);return s.toString()}async function mk(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 gk(e){const t=e.fetchImpl??globalThis.fetch;return{async request({method:r,path:s,query:o,body:c,headers:u}){const d=pk(e.baseUrl,s,o),f=await mk(e.auth),m=await t(d,{method:r,headers:{...c?{"Content-Type":"application/json"}:{},...f,...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 _=g?b:void 0,S=_?.error;throw new ho(S?.message??`Request failed with status ${m.status}`,{status:m.status,icebergType:S?.type,icebergCode:S?.code,details:_})}return{status:m.status,headers:m.headers,data:b}}}}function Zl(e){return e.join("�")}var yk=class{constructor(e,t=""){this.client=e,this.prefix=t}async listNamespaces(e){const t=e?{parent:Zl(e.namespace)}:void 0;return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces`,query:t})).data.namespaces.map(s=>({namespace:s}))}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/${Zl(e.namespace)}`})}async loadNamespaceMetadata(e){return{properties:(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${Zl(e.namespace)}`})).data.properties}}async namespaceExists(e){try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${Zl(e.namespace)}`}),!0}catch(t){if(t instanceof ho&&t.status===404)return!1;throw t}}async createNamespaceIfNotExists(e,t){try{return await this.createNamespace(e,t)}catch(r){if(r instanceof ho&&r.status===409)return;throw r}}};function Cs(e){return e.join("�")}var vk=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/${Cs(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/${Cs(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/${Cs(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/${Cs(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/${Cs(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/${Cs(e.namespace)}/tables/${e.name}`,headers:t}),!0}catch(r){if(r instanceof ho&&r.status===404)return!1;throw r}}async createTableIfNotExists(e,t){try{return await this.createTable(e,t)}catch(r){if(r instanceof ho&&r.status===409)return await this.loadTable({namespace:e.namespace,name:t.name});throw r}}},bk=class{constructor(e){let t="v1";e.catalogName&&(t+=`/${e.catalogName}`);const r=e.baseUrl.endsWith("/")?e.baseUrl:`${e.baseUrl}/`;this.client=gk({baseUrl:r,auth:e.auth,fetchImpl:e.fetch}),this.accessDelegation=e.accessDelegation?.join(","),this.namespaceOps=new yk(this.client,t),this.tableOps=new vk(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)}
23async 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 fo(e){"@babel/helpers - typeof";return fo=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},fo(e)}function _k(e,t){if(fo(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var s=r.call(e,t);if(fo(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function wk(e){var t=_k(e,"string");return fo(t)=="symbol"?t:t+""}function Sk(e,t,r){return(t=wk(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Vv(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,s)}return r}function fe(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Vv(Object(r),!0).forEach(function(s){Sk(e,s,r[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Vv(Object(r)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(r,s))})}return e}var Fc=class extends Error{constructor(e,t="storage",r,s){super(e),this.__isStorageError=!0,this.namespace=t,this.name=t==="vectors"?"StorageVectorsError":"StorageError",this.status=r,this.statusCode=s}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}};function Kc(e){return typeof e=="object"&&e!==null&&"__isStorageError"in e}var Wh=class extends Fc{constructor(e,t,r,s="storage",o){super(e,s,t,r),this.name=s==="vectors"?"StorageVectorsApiError":"StorageApiError",this.status=t,this.statusCode=r,this.co
23de=o}toJSON(){return fe(fe({},super.toJSON()),{},{code:this.code})}},S_=class extends Fc{constructor(e,t,r="storage"){super(e,r),this.name=r==="vectors"?"StorageVectorsUnknownError":"StorageUnknownError",this.originalError=t}};function Rc(e,t,r){const s=fe({},e),o=t.toLowerCase();for(const c of Object.keys(s))c.toLowerCase()===o&&delete s[c];return s[o]=r,s}function Ek(e){const t={};for(const[r,s]of Object.entries(e))t[r.toLowerCase()]=s;return t}const Ak=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),Tk=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)},ef=e=>{if(Array.isArray(e))return e.map(r=>ef(r));if(typeof e=="function"||e!==Object(e))return e;const t={};return Object.entries(e).forEach(([r,s])=>{const o=r.replace(/([-_][a-z])/gi,c=>c.toUpperCase().replace(/[-_]/g,""));t[o]=ef(s)}),t},Rk=e=>!e||typeof e!="string"||e.length===0||e.length>100||e.trim()!==e||e.includes("/")||e.includes("\\")?!1:/^[\w!.\*'() &$@=;:+,?-]+$/.test(e),E_=e=>e.split("/").map(encodeURIComponent).join("/"),Gv=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)},Ok=async(e,t,r,s)=>{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 d=u?.statusCode||u?.code||c+"";t(new Wh(Gv(u),c,d,s,u?.code))}).catch(()=>{const u=c+"";t(new Wh(o.statusText||`HTTP ${c} error`,c,u,s))})}else t(new S_(Gv(e),e,s))},Ck=(e,t,r,s)=>{const o={method:e,headers:t?.headers||{}};if(e==="GET"||e==="HEAD"||!s)return fe(fe({},o),r);if(Tk(s)){var c;const u=t?.headers||{};let d;for(const[f,m]of Object.entries(u))f.toLowerCase()==="content-type"&&(d=m);o.headers=Rc(u,"Content-Type",(c=d)!==null&&c!==void 0?c:"application/json"),o.body=JSON.stringify(s)}else o.body=s;return t?.duplex&&(o.duplex=t.duplex),fe(fe({},o),r)};async function Ja(e,t,r,s,o,c,u){return new Promise((d,f)=>{e(r,Ck(t,s,o,c)).then(m=>{if(!m.ok)throw m;if(s?.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=>d(m)).catch(m=>Ok(m,f,s,u))})}function A_(e="storage"){return{get:async(t,r,s,o)=>Ja(t,"GET",r,s,o,void 0,e),post:async(t,r,s,o,c)=>Ja(t,"POST",r,o,c,s,e),put:async(t,r,s,o,c)=>Ja(t,"PUT",r,o,c,s,e),head:async(t,r,s,o)=>Ja(t,"HEAD",r,fe(fe({},s),{},{noResolveJson:!0}),o,void 0,e),remove:async(t,r,s,o,c)=>Ja(t,"DELETE",r,o,c,s,e)}}const kk=A_("storage"),{get:po,post:bn,put:tf,head:xk,remove:mo}=kk,Qt=A_("vectors");var Ys=class{constructor(e,t={},r,s="storage"){this.shouldThrowOnError=!1,this.url=e,this.headers=Ek(t),this.fetch=Ak(r),this.namespace=s}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(e,t){return this.headers=Rc(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(Kc(r))return{data:null,error:r};throw r}}};let T_;T_=Symbol.toStringTag;var jk=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t,this[T_]="StreamDownloadBuilder",this.promise=null}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 e.downloadFn()).body,error:null}}catch(t){if(e.shouldThrowOnError)throw t;if(Kc(t))return{data:null,error:t};throw t}}};let R_;R_=Symbol.toStringTag;var Nk=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t,this[R_]="BlobDownloadBuilder",this.promise=null}asStream(){return new jk(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(Kc(t))return{data:null,error:t};throw t}}};const Rh={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},Yv={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};var Mk=class extends Ys{constructor(e,t={},r,s){super(e,t,s,"storage"),this.bucketId=r}async uploadOrUpdate(e,t,r,s){var o=this;return o.handleOperation(async()=>{let c;const u=fe(fe({},Yv),s);let d=fe(fe({},o.headers),e==="POST"&&{"x-upsert":String(u.upsert)});const f=u.metadata;if(typeof Blob<"u"&&r instanceof Blob?(c=new FormData,c.append("cacheControl",u.cacheControl),f&&c.append("metadata",o.encodeMetadata(f)),c.append("",r)):typeof FormData<"u"&&r instanceof FormData?(c=r,c.has("cacheControl")||c.append("cacheControl",u.cacheControl),f&&!c.has("metadata")&&c.append("metadata",o.encodeMetadata(f))):(c=r,d["cache-control"]=`max-age=${u.cacheControl}`,d["content-type"]=u.contentType,f&&(d["x-metadata"]=o.toBase64(o.encodeMetadata(f))),(typeof ReadableStream<"u"&&c instanceof ReadableStream||c&&typeof c=="object"&&"pipe"in c&&typeof c.pipe=="function")&&!u.duplex&&(u.duplex="half")),s?.headers)for(const[b,_]of Object.entries(s.headers))d=Rc(d,b,_);const m=o._removeEmptyFolders(t),y=o._getFinalPath(m),g=await(e=="PUT"?tf:bn)(o.fetch,`${o.url}/object/${y}`,c,fe({headers:d},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,s){var o=this;const c=o._removeEmptyFolders(e),u=o._getFinalPath(c),d=new URL(o.url+`/object/upload/sign/${u}`);return d.searchParams.set("token",t),o.handleOperation(async()=>{let f;const m=fe(fe({},Yv),s);let y=fe(fe({},o.headers),{"x-upsert":String(m.upsert)});const g=m.metadata;if(typeof Blob<"u"&&r instanceof Blob?(f=new FormData,f.append("cacheControl",m.cacheControl),g&&f.append("metadata",o.encodeMetadata(g)),f.append("",r)):typeof FormData<"u"&&r instanceof FormData?(f=r,f.has("cacheControl")||f.append("cacheControl",m.cacheControl),g&&!f.has("metadata")&&f.append("metadata",o.encodeMetadata(g))):(f=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"&&f instanceof ReadableStream||f&&typeof f=="object"&&"pipe"in f&&typeof f.pipe=="function")&&!m.duplex&&(m.duplex="half")),s?.headers)for(const[b,_]of Object.entries(s.headers))y=Rc(y,b,_);return{path:c,fullPath:(await tf(o.fetch,d.toString(),f,fe({headers:y},m?.duplex?{duplex:m.duplex}:{}))).Key}})}async createSignedUploadUrl(e,t){var r=this;return r.handleOperation(async()=>{let s=r._getFinalPath(e);const o=fe({},r.headers);t?.upsert&&(o["x-upsert"]="true");const c=await bn(r.fetch,`${r.url}/object/upload/sign/${s}`,{},{headers:o}),u=new URL(r.url+c.url),d=u.searchParams.get("token");if(!d)throw new Fc("No token returned by API");return{signedUrl:u.toString(),path:e,token:d}})}async update(e,t,r){return this.uploadOrUpdate("PUT",e,t,r)}async move(e,t,r){var s=this;return s.handleOperation(async()=>await bn(s.fetch,`${s.url}/object/move`,{bucketId:s.bucketId,sourceKey:e,destinationKey:t,de
23stinationBucket:r?.destinationBucket},{headers:s.headers}))}async copy(e,t,r){var s=this;return s.handleOperation(async()=>({path:(await bn(s.fetch,`${s.url}/object/copy`,{bucketId:s.bucketId,sourceKey:e,destinationKey:t,destinationBucket:r?.destinationBucket},{headers:s.headers})).Key}))}async createSignedUrl(e,t,r){var s=this;return s.handleOperation(async()=>{let o=s._getFinalPath(e);const c=typeof r?.transform=="object"&&r.transform!==null&&Object.keys(r.transform).length>0;let u=await bn(s.fetch,`${s.url}/object/sign/${o}`,fe({expiresIn:t},c?{transform:r.transform}:{}),{headers:s.headers});const d=new URLSearchParams;r?.download&&d.set("download",r.download===!0?"":r.download),r?.cacheNonce!=null&&d.set("cacheNonce",String(r.cacheNonce));const f=d.toString();return{signedUrl:encodeURI(`${s.url}${u.signedURL}${f?`&${f}`:""}`)}})}async createSignedUrls(e,t,r){var s=this;return s.handleOperation(async()=>{const o=await bn(s.fetch,`${s.url}/object/sign/${s.bucketId}`,{expiresIn:t,paths:e},{headers:s.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(d=>fe(fe({},d),{},{signedUrl:d.signedURL?encodeURI(`${s.url}${d.signedURL}${u?`&${u}`:""}`):null}))})}download(e,t,r){const s=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),d=()=>po(this.fetch,`${this.url}/${s}/${u}${c?`?${c}`:""}`,{headers:this.headers,noResolveJson:!0},r);return new Nk(d,this.shouldThrowOnError)}async info(e){var t=this;const r=t._getFinalPath(e);return t.handleOperation(async()=>ef(await po(t.fetch,`${t.url}/object/info/${r}`,{headers:t.headers})))}async exists(e){var t=this;const r=t._getFinalPath(e);try{return await xk(t.fetch,`${t.url}/object/${r}`,{headers:t.headers}),{data:!0,error:null}}catch(o){if(t.shouldThrowOnError)throw o;if(Kc(o)){var s;const c=o instanceof Wh?o.status:o instanceof S_?(s=o.originalError)===null||s===void 0?void 0:s.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),s=new URLSearchParams;t?.download&&s.set("download",t.download===!0?"":t.download),t?.transform&&this.applyTransformOptsToQuery(s,t.transform),t?.cacheNonce!=null&&s.set("cacheNonce",String(t.cacheNonce));const o=s.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 mo(t.fetch,`${t.url}/object/${t.bucketId}`,{prefixes:e},{headers:t.headers}))}async purgeCache(e,t,r){var s=this;return s.handleOperation(async()=>{const o=E_(s._getFinalPath(e)),c=new URLSearchParams;t?.transformations&&c.set("transformations","true");const u=c.toString();return await mo(s.fetch,`${s.url}/cdn/${o}${u?`?${u}`:""}`,{},{headers:s.headers},r)})}async list(e,t,r){var s=this;return s.handleOperation(async()=>{const o=t?.sortBy?fe(fe({},Rh.sortBy),t.sortBy):Rh.sortBy,c=fe(fe(fe({},Rh),t),{},{sortBy:o,prefix:e||""});return await bn(s.fetch,`${s.url}/object/list/${s.bucketId}`,c,{headers:s.headers},r)})}async listV2(e,t){var r=this;return r.handleOperation(async()=>{const s=fe({},e);return await bn(r.fetch,`${r.url}/object/list-v2/${r.bucketId}`,s,{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("qual
23ity",t.quality.toString()),e}};const Dk="2.112.2",To={"X-Client-Info":`storage-js/${Dk}`};var Lk=class extends Ys{constructor(e,t={},r,s){const o=new URL(e);s?.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=fe(fe({},To),t);super(c,u,r,"storage")}async listBuckets(e){var t=this;return t.handleOperation(async()=>{const r=t.listBucketOptionsToQueryString(e);return await po(t.fetch,`${t.url}/bucket${r}`,{headers:t.headers})})}async getBucket(e){var t=this;return t.handleOperation(async()=>await po(t.fetch,`${t.url}/bucket/${e}`,{headers:t.headers}))}async createBucket(e,t={public:!1}){var r=this;return r.handleOperation(async()=>await bn(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 tf(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 bn(t.fetch,`${t.url}/bucket/${e}/empty`,{},{headers:t.headers}))}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await mo(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}))}async purgeBucketCache(e,t,r){var s=this;return s.handleOperation(async()=>{const o=new URLSearchParams;t?.transformations&&o.set("transformations","true");const c=o.toString();return await mo(s.fetch,`${s.url}/cdn/${E_(e)}${c?`?${c}`:""}`,{},{headers:s.headers},r)})}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():""}},Uk=class extends Ys{constructor(e,t={},r){const s=e.replace(/\/$/,""),o=fe(fe({},To),t);super(s,o,r,"storage")}async createBucket(e){var t=this;return t.handleOperation(async()=>await bn(t.fetch,`${t.url}/bucket`,{name:e},{headers:t.headers}))}async listBuckets(e){var t=this;return t.handleOperation(async()=>{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 s=r.toString(),o=s?`${t.url}/bucket?${s}`:`${t.url}/bucket`;return await po(t.fetch,o,{headers:t.headers})})}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await mo(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}))}from(e){var t=this;if(!Rk(e))throw new Fc("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 bk({baseUrl:this.url,catalogName:e,auth:{type:"custom",getHeaders:async()=>t.headers},fetch:this.fetch}),s=this.shouldThrowOnError;return new Proxy(r,{get(o,c){const u=o[c];return typeof u!="function"?u:async(...d)=>{try{return{data:await u.apply(o,d),error:null}}catch(f){if(s)throw f;return{data:null,error:f}}}}})}},zk=class extends Ys{constructor(e,t={},r){const s=e.replace(/\/$/,""),o=fe(fe({},To),{},{"Content-Type":"application/json"},t);super(s,o,r,"vectors")}async createIndex(e){var t=this;return t.handleOperation(async()=>await Qt.post(t.fetch,`${t.url}/CreateIndex`,e,{headers:t.headers})||{})}async getIndex(e,t){var r=this;return r.handleOperation(async()=>await Qt.post(r.fetch,`${r.url}/GetIndex`,{vectorBucketName:e,indexName:t},{headers:r.headers}))}async listIndexes(e){var t=this;return t.handleOperation(async()=>await Qt.post(t.fetch,`${t.url}/ListIndexes`,e,{headers:t.headers}))}async deleteIndex(e,t){var r=this;return r.handleOperation(async()=>await Qt.post(r.fetch,`${r.url}/DeleteIndex`,{vectorBucketName:e,indexName:t},{headers:r.headers})||{})}},Ik=class extends Ys{constructor(e,t={},r){const s=e.replace(/\/$/,""),o=fe(fe({},To),{},{"Content-Type":"application/json"},t);super(s,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 Qt.post(t.fetch,`${t.url}/PutVectors`,e,{headers:t.headers})||{})}async getVectors(e){var t=this;return t.handleOperation(async()=>await Qt.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");
23if(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 Qt.post(t.fetch,`${t.url}/ListVectors`,e,{headers:t.headers}))}async queryVectors(e){var t=this;return t.handleOperation(async()=>await Qt.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 Qt.post(t.fetch,`${t.url}/DeleteVectors`,e,{headers:t.headers})||{})}},Pk=class extends Ys{constructor(e,t={},r){const s=e.replace(/\/$/,""),o=fe(fe({},To),{},{"Content-Type":"application/json"},t);super(s,o,r,"vectors")}async createBucket(e){var t=this;return t.handleOperation(async()=>await Qt.post(t.fetch,`${t.url}/CreateVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{})}async getBucket(e){var t=this;return t.handleOperation(async()=>await Qt.post(t.fetch,`${t.url}/GetVectorBucket`,{vectorBucketName:e},{headers:t.headers}))}async listBuckets(e={}){var t=this;return t.handleOperation(async()=>await Qt.post(t.fetch,`${t.url}/ListVectorBuckets`,e,{headers:t.headers}))}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await Qt.post(t.fetch,`${t.url}/DeleteVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{})}},Bk=class extends Pk{constructor(e,t={}){super(e,t.headers||{},t.fetch)}from(e){return new $k(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)}},$k=class extends zk{constructor(e,t,r,s){super(e,t,s),this.vectorBucketName=r}async createIndex(e){var t=()=>super.createIndex,r=this;return t().call(r,fe(fe({},e),{},{vectorBucketName:r.vectorBucketName}))}async listIndexes(e={}){var t=()=>super.listIndexes,r=this;return t().call(r,fe(fe({},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 Hk(this.url,this.headers,this.vectorBucketName,e,this.fetch)}},Hk=class extends Ik{constructor(e,t,r,s,o){super(e,t,o),this.vectorBucketName=r,this.indexName=s}async putVectors(e){var t=()=>super.putVectors,r=this;return t().call(r,fe(fe({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async getVectors(e){var t=()=>super.getVectors,r=this;return t().call(r,fe(fe({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async listVectors(e={}){var t=()=>super.listVectors,r=this;return t().call(r,fe(fe({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async queryVectors(e){var t=()=>super.queryVectors,r=this;return t().call(r,fe(fe({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async deleteVectors(e){var t=()=>super.deleteVectors,r=this;return t().call(r,fe(fe({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}},qk=class extends Lk{constructor(e,t={},r,s){super(e,t,r,s)}from(e){return new Mk(this.url,this.headers,e,this.fetch)}get vectors(){return new Bk(this.url+"/vector",{headers:this.headers,fetch:this.fetch})}get analytics(){return new Uk(this.url+"/iceberg",this.headers,this.fetch)}};const O_="2.112.2",dr=30*1e3,eo=3,Oh=eo*dr,Vk=2*dr,Gk="http://localhost:9999",Yk="supabase.auth.token",Fk={"X-Client-Info":`gotrue-js/${O_}`},nf="X-Supabase-Api-Version",C_={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},Kk=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,Di="sb_flow_id",Jk=5,Qk=600*1e3;class go extends Error{constructor(t,r,s){super(t),this.__isAuthError=!0,this.name="AuthError",this.status=r,this.code=s}toJSON(){return{name:this.name,message:this.message,status:this.status,code:this.code}}}function W(e){return typeof e=="object"&&e!==null&&"__isAuthError"in e}class Xk extends go{constructor(t,r,s){super(t,r,s),this.name="AuthApiError",this.status=r,this.co
23de=s}}function Fv(e){return W(e)&&e.name==="AuthApiError"}class wn extends go{constructor(t,r){super(t),this.name="AuthUnknownError",this.originalError=r}}class zn extends go{constructor(t,r,s,o){super(t,s,o),this.name=r,this.status=s}}class pt extends zn{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function Wl(e){return W(e)&&e.name==="AuthSessionMissingError"}class ks extends zn{constructor(){super("Auth session or user missing","AuthInvalidTokenResponseError",500,void 0)}}class ec extends zn{constructor(t){super(t,"AuthInvalidCredentialsError",400,void 0)}}class tc extends zn{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 Zk(e){return W(e)&&e.name==="AuthImplicitGrantRedirectError"}class Kv extends zn{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 Wk extends zn{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 pc extends zn{constructor(t,r){super(t,"AuthRetryableFetchError",r,void 0)}}function nc(e){return W(e)&&e.name==="AuthRetryableFetchError"}class Jv extends zn{constructor(t="Refresh result discarded: session state changed mid-flight (e.g., concurrent signOut)"){super(t,"AuthRefreshDiscardedError",409,void 0)}}function ex(e){return W(e)&&e.name==="AuthRefreshDiscardedError"}class Qv extends zn{constructor(t,r,s){super(t,"AuthWeakPasswordError",r,"weak_password"),this.reasons=s}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{reasons:this.reasons})}}class Oc extends zn{constructor(t){super(t,"AuthInvalidJwtError",400,"invalid_jwt")}}const Cc="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),Xv=` 24\r=`.split(""),tx=(()=>{const e=new Array(128);for(let t=0;t<e.length;t+=1)e[t]=-1;for(let t=0;t<Xv.length;t+=1)e[Xv[t].charCodeAt(0)]=-2;for(let t=0;t<Cc.length;t+=1)e[Cc[t].charCodeAt(0)]=t;return e})();function Zv(e,t,r){if(e!==null)for(t.queue=t.queue<<8|e,t.queuedBits+=8;t.queuedBits>=6;){const s=t.queue>>t.queuedBits-6&63;r(Cc[s]),t.queuedBits-=6}else if(t.queuedBits>0)for(t.queue=t.queue<<6-t.queuedBits,t.queuedBits=6;t.queuedBits>=6;){const s=t.queue>>t.queuedBits-6&63;r(Cc[s]),t.queuedBits-=6}}function k_(e,t,r){const s=tx[e];if(s>-1)for(t.queue=t.queue<<6|s,t.queuedBits+=6;t.queuedBits>=8;)r(t.queue>>t.queuedBits-8&255),t.queuedBits-=8;else{if(s===-2)return;throw new Error(`Invalid Base64-URL character "${String.fromCharCode(e)}"`)}}function Wv(e){const t=[],r=u=>{t.push(String.fromCodePoint(u))},s={utf8seq:0,codepoint:0},o={queue:0,queuedBits:0},c=u=>{ix(u,s,r)};for(let u=0;u<e.length;u+=1)k_(e.charCodeAt(u),o,c);return t.join("")}function nx(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 rx(e,t){for(let r=0;r<e.length;r+=1){let s=e.charCodeAt(r);if(s>55295&&s<=56319){const o=(s-55296)*1024&65535;s=(e.charCodeAt(r+1)-56320&65535|o)+65536,r+=1}nx(s,t)}}function ix(e,t,r){if(t.utf8seq===0){if(e<=127){r(e);return}for(let s=1;s<6;s+=1)if((e>>7-s&1)===0){t.utf8seq=s;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 qs(e){const t=[],r={queue:0,queuedBits:0},s=o=>{t.push(o)};for(let o=0;o<e.length;o+=1)k_(e.charCodeAt(o),r,s);return new Uint8Array(t)}function sx(e){const t=[];return rx(e,r=>t.push(r)),new Uint8Array(t)}function Li(e){const t=[],r={queue:0,queuedBits:0},s=o=>{t.push(o)};return e.forEach(o=>Zv(o,r,s)),Zv(null,r,s),t.join("")}function ax(e){return Math.round(Date.now()/1e3)+e}function ox(){return Symbol("auth-callback")}const _t=()=>typeof window<"u"&&typeof document<"u",Ci={tested:!1,writable:!1},x_=()=>{if(!_t())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(Ci.tested)return Ci.writable;const e=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(e,e),globalThis.localStorage.removeItem(e),Ci.tested=!0,Ci.writable=!0}catch{Ci.tested=!0,Ci.writable=!1}return Ci.writable};function e0(e){const t={},r=new URL(e);if(r.hash&&r.hash[0]==="#")try{new URLSearchParams(r.hash.substring(1)).forEac
24h((o,c)=>{t[c]=o})}catch{}return r.searchParams.forEach((s,o)=>{t[o]=s}),t}const j_=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),lx=e=>typeof e=="object"&&e!==null&&"status"in e&&"ok"in e&&"json"in e&&typeof e.json=="function",fr=async(e,t,r)=>{await e.setItem(t,JSON.stringify(r))},Et=async(e,t)=>{const r=await e.getItem(t);if(!r)return null;try{return JSON.parse(r)}catch{return null}},It=async(e,t)=>{await e.removeItem(t)};class Jc{constructor(){this.promise=new Jc.promiseConstructor((t,r)=>{this.resolve=t,this.reject=r})}}Jc.promiseConstructor=Promise;function rc(e){const t=e.split(".");if(t.length!==3)throw new Oc("Invalid JWT structure");for(let s=0;s<t.length;s++)if(!Kk.test(t[s]))throw new Oc("JWT not in base64url format");return{header:JSON.parse(Wv(t[0])),payload:JSON.parse(Wv(t[1])),signature:qs(t[2]),raw:{header:t[0],payload:t[1]}}}async function cx(e){return await new Promise(t=>{setTimeout(()=>t(null),e)})}function ux(e,t){return new Promise((s,o)=>{(async()=>{for(let c=0;c<1/0;c++)try{const u=await e(c);if(!t(c,null,u)){s(u);return}}catch(u){if(!t(c,u)){o(u);return}}})()})}function N_(e){return("0"+e.toString(16)).substr(-2)}function dx(){const t=new Uint32Array(56);if(typeof crypto>"u"){const r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",s=r.length;let o="";for(let c=0;c<56;c++)o+=r.charAt(Math.floor(Math.random()*s));return o}return crypto.getRandomValues(t),Array.from(t,N_).join("")}async function hx(e){const r=new TextEncoder().encode(e),s=await crypto.subtle.digest("SHA-256",r),o=new Uint8Array(s);return Array.from(o).map(c=>String.fromCharCode(c)).join("")}async function fx(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 hx(e);return btoa(r).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}const px=/^[a-zA-Z0-9_-]{8,64}$/;function mc(e){return typeof e=="string"&&px.test(e)?e:null}function mx(){if(typeof crypto<"u"&&typeof crypto.getRandomValues=="function"){const t=new Uint8Array(16);return crypto.getRandomValues(t),Array.from(t,N_).join("")}let e="";for(let t=0;t<32;t++)e+=Math.floor(Math.random()*16).toString(16);return e}const Gs=(e,t)=>`${e}-flow-${t}-code-verifier`,yo=e=>`${e}-flows-code-verifier`;async function Rf(e,t){const r=await Et(e,yo(t));return Array.isArray(r)?r.filter(s=>mc(s)!==null):[]}async function gx(e,t,r,s,o){await fr(e,Gs(t,r),s);const c=(await Rf(e,t)).filter(u=>u!==r);for(c.push(r);c.length>Jk;){const u=c.shift();await It(e,Gs(t,u)),o?.(u)}await fr(e,yo(t),c),await fr(e,`${t}-code-verifier`,s)}async function yx(e,t,r){if(r){const o=await Et(e,Gs(t,r));return{verifier:typeof o=="string"?o:null,flowId:r}}const s=await Et(e,`${t}-code-verifier`);return{verifier:typeof s=="string"?s:null,flowId:null}}async function yn(e,t,r){const s=`${t}-code-verifier`;if(!r){await It(e,s);return}const o=Gs(t,r),c=await Et(e,o);await It(e,o);const u=await Rf(e,t),d=u.filter(f=>f!==r);d.length!==u.length&&(d.length>0?await fr(e,yo(t),d):await It(e,yo(t))),c!=null&&c===await Et(e,s)&&await It(e,s)}async function vx(e,t){const r=await Rf(e,t);for(const s of r)await It(e,Gs(t,s));await It(e,yo(t)),await It(e,`${t}-code-verifier`)}function bx(e,t){const r=e.indexOf("#");let s=r===-1?e:e.slice(0,r);const o=r===-1?"":e.slice(r),c=s.indexOf("?");if(c!==-1){const d=s.slice(0,c),f=s.slice(c+1).split("&").filter(m=>m!==""&&m!==Di&&!m.startsWith(`${Di}=`));s=f.length>0?`${d}?${f.join("&")}`:d}const u=s.includes("?")?"&":"?";return`${s}${u}${Di}=${encodeURIComponent(t)}${o}`}async function _x(e,t,r=!1,s){const o=dx();let c=o;r&&(c+="/recovery");const u=mx();await gx(e,t,u,c,s);const d=await fx(o);return[d,o===d?"plain":"s256",u]}const wx=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function Sx(e){const t=e.headers.get(nf);if(!t||!t.match(wx))return null;try{return new Date(`${t}T00:00:00.0Z`)}catch{return null}}function Ex(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 Ax(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 Tx=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function ar(e){if(!Tx.test(e))throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not")}function vn(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 Ch(){const e={};return new Proxy(e,{get:(t,r)=>{if(r==="__isUserNotAvailableProxy")return!0;
24if(typeof r=="symbol"){const s=r.toString();if(s==="Symbol(Symbol.toPrimitive)"||s==="Symbol(Symbol.toStringTag)"||s==="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 Rx(e,t){return new Proxy(e,{get:(r,s,o)=>{if(s==="__isInsecureUserWarningProxy")return!0;if(typeof s=="symbol"){const c=s.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,s,o)}return!t.value&&typeof s=="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,s,o)}})}function t0(e){return JSON.parse(JSON.stringify(e))}const xi=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)},n0=[500,501,502,503,504,520,521,522,523,524,525,526,527,528,529,530];async function r0(e){var t;if(!lx(e))throw new pc(xi(e),0);let r;try{r=await e.json()}catch(c){throw n0.includes(e.status)?new pc(e.statusText||`HTTP ${e.status}`,e.status):new wn(xi(c),c)}if(n0.includes(e.status))throw new pc(xi(r),e.status);let s;const o=Sx(e);if(o&&o.getTime()>=C_["2024-01-01"].timestamp&&typeof r=="object"&&r&&typeof r.code=="string"?s=r.code:typeof r=="object"&&r&&typeof r.error_code=="string"&&(s=r.error_code),s){if(s==="weak_password")throw new Qv(xi(r),e.status,((t=r.weak_password)===null||t===void 0?void 0:t.reasons)||[]);if(s==="session_not_found")throw new pt}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 Qv(xi(r),e.status,r.weak_password.reasons);throw new Xk(xi(r),e.status||500,s)}const Ox=(e,t,r,s)=>{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(s),Object.assign(Object.assign({},o),r))};async function re(e,t,r,s){var o;const c=Object.assign({},s?.headers);c[nf]||(c[nf]=C_["2024-01-01"].name),s?.jwt&&(c.Authorization=`Bearer ${s.jwt}`);const u=(o=s?.query)!==null&&o!==void 0?o:{};s?.redirectTo&&(u.redirect_to=s.redirectTo);const d=Object.keys(u).length?"?"+new URLSearchParams(u).toString():"",f=await Cx(e,t,r+d,{headers:c,noResolveJson:s?.noResolveJson},{},s?.body);return s?.xform?s?.xform(f):{data:Object.assign({},f),error:null}}async function Cx(e,t,r,s,o,c){const u=Ox(t,s,o,c);let d;try{d=await e(r,Object.assign({},u))}catch(f){throw new pc(xi(f),0)}if(d.ok||await r0(d),s?.noResolveJson)return d;try{return await d.json()}catch(f){await r0(f)}}function cn(e){var t;let r=null;jx(e)&&(r=Object.assign({},e),e.expires_at||(r.expires_at=ax(e.expires_in)));const s=(t=e.user)!==null&&t!==void 0?t:typeof e?.id=="string"?e:null;return{data:{session:r,user:s},error:null}}function i0(e){const t=cn(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,s)=>r&&typeof s=="string",!0)&&(t.data.weak_password=e.weak_password),t}function Xr(e){var t;return{data:{user:(t=e.user)!==null&&t!==void 0?t:e},error:null}}function kx(e){return{data:e,error:null}}function xx(e){const{action_link:t,email_otp:r,hashed_token:s,redirect_to:o,verification_type:c}=e,u=Yc(e,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),d={action_link:t,email_otp:r,hashed_token:s,redirect_to:o,verification_type:c},f=Object.assign({},u);return{data:{properties:d,user:f},error:null}}function s0(e){return e}function jx(e){return!!e.access_token&&!!e.refresh_token&&!!e.expires_in}const kh=["global","local","others"];class Nx{constructor({url:t="",headers:r={},fetch:s,experimental:o}){this.url=t,this.headers=r,this.fetch=j_(s),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)}}
24async signOut(t,r=kh[0]){if(kh.indexOf(r)<0)throw new Error(`@supabase/auth-js: Parameter scope must be one of ${kh.join(", ")}`);try{return await re(this.fetch,"POST",`${this.url}/logout?scope=${r}`,{headers:this.headers,jwt:t,noResolveJson:!0}),{data:null,error:null}}catch(s){if(W(s))return{data:null,error:s};throw s}}async inviteUserByEmail(t,r={}){try{return await re(this.fetch,"POST",`${this.url}/invite`,{body:{email:t,data:r.data},headers:this.headers,redirectTo:r.redirectTo,xform:Xr})}catch(s){if(W(s))return{data:{user:null},error:s};throw s}}async generateLink(t){try{const{options:r}=t,s=Yc(t,["options"]),o=Object.assign(Object.assign({},s),r);return"newEmail"in s&&(o.new_email=s?.newEmail,delete o.newEmail),await re(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:o,headers:this.headers,xform:xx,redirectTo:r?.redirectTo})}catch(r){if(W(r))return{data:{properties:null,user:null},error:r};throw r}}async createUser(t){try{return await re(this.fetch,"POST",`${this.url}/admin/users`,{body:t,headers:this.headers,xform:Xr})}catch(r){if(W(r))return{data:{user:null},error:r};throw r}}async listUsers(t){var r,s,o,c,u,d,f;try{const m={nextPage:null,lastPage:0,total:0},y=await re(this.fetch,"GET",`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:(s=(r=t?.page)===null||r===void 0?void 0:r.toString())!==null&&s!==void 0?s:"",per_page:(c=(o=t?.perPage)===null||o===void 0?void 0:o.toString())!==null&&c!==void 0?c:""},xform:s0});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,_=(f=(d=y.headers.get("link"))===null||d===void 0?void 0:d.split(","))!==null&&f!==void 0?f:[];return _.length>0&&(_.forEach(S=>{const w=parseInt(S.split(";")[0].split("=")[1].substring(0,1)),A=JSON.parse(S.split(";")[1].split("=")[1]);m[`${A}Page`]=w}),m.total=parseInt(b)),{data:Object.assign(Object.assign({},g),m),error:null}}catch(m){if(W(m))return{data:{users:[]},error:m};throw m}}async getUserById(t){ar(t);try{return await re(this.fetch,"GET",`${this.url}/admin/users/${t}`,{headers:this.headers,xform:Xr})}catch(r){if(W(r))return{data:{user:null},error:r};throw r}}async updateUserById(t,r){ar(t);try{return await re(this.fetch,"PUT",`${this.url}/admin/users/${t}`,{body:r,headers:this.headers,xform:Xr})}catch(s){if(W(s))return{data:{user:null},error:s};throw s}}async deleteUser(t,r=!1){ar(t);try{return await re(this.fetch,"DELETE",`${this.url}/admin/users/${t}`,{headers:this.headers,body:{should_soft_delete:r},xform:Xr})}catch(s){if(W(s))return{data:{user:null},error:s};throw s}}async _listFactors(t){ar(t.userId);try{const{data:r,error:s}=await re(this.fetch,"GET",`${this.url}/admin/users/${t.userId}/factors`,{headers:this.headers,xform:o=>({data:{factors:o},error:null})});return{data:r,error:s}}catch(r){if(W(r))return{data:null,error:r};throw r}}async _deleteFactor(t){ar(t.userId),ar(t.id);try{return{data:await re(this.fetch,"DELETE",`${this.url}/admin/users/${t.userId}/factors/${t.id}`,{headers:this.headers}),error:null}}catch(r){if(W(r))return{data:null,error:r};throw r}}async _listOAuthClients(t){var r,s,o,c,u,d,f;try{const m={nextPage:null,lastPage:0,total:0},y=await re(this.fetch,"GET",`${this.url}/admin/oauth/clients`,{headers:this.headers,noResolveJson:!0,query:{page:(s=(r=t?.page)===null||r===void 0?void 0:r.toString())!==null&&s!==void 0?s:"",per_page:(c=(o=t?.perPage)===null||o===void 0?void 0:o.toString())!==null&&c!==void 0?c:""},xform:s0});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,_=(f=(d=y.headers.get("link"))===null||d===void 0?void 0:d.split(","))!==null&&f!==void 0?f:[];return _.length>0&&(_.forEach(S=>{const w=parseInt(S.split(";")[0].split("=")[1].substring(0,1)),A=JSON.parse(S.split(";")[1].split("=")[1]);m[`${A}Page`]=w}),m.total=parseInt(b)),{data:Object.assign(Object.assign({},g),m),error:null}}catch(m){if(W(m))return{data:{clients:[]},error:m};throw m}}async _createOAuthClient(t){try{return await re(this.fetch,"POST",`${this.url}/admin/oauth/clients`,{body:t,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(W(r))return{data:null,error:r};throw r}}async _getOAuthClient(t){try{return await re(this.fetch,"GET",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(W(r))return{data:null,error:r};throw r}}async _updateOAuthClient(t,r){try{return await re(this.fetch,"PUT",`${this.url}/admin/oauth/clients/${t}`,{body:r,headers:this.headers,xform:s=>({data:s,error:null})})}catch(s){if(W(s))return{data:null,error:s};throw s}}async _deleteOAuthClient(t){try{return await re(this.fetch,"DELET
24E",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(r){if(W(r))return{data:null,error:r};throw r}}async _regenerateOAuthClientSecret(t){try{return await re(this.fetch,"POST",`${this.url}/admin/oauth/clients/${t}/regenerate_secret`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(W(r))return{data:null,error:r};throw r}}async _listCustomProviders(t){try{const r={};return t?.type&&(r.type=t.type),await re(this.fetch,"GET",`${this.url}/admin/custom-providers`,{headers:this.headers,query:r,xform:s=>{var o;return{data:{providers:(o=s?.providers)!==null&&o!==void 0?o:[]},error:null}}})}catch(r){if(W(r))return{data:{providers:[]},error:r};throw r}}async _createCustomProvider(t){try{return await re(this.fetch,"POST",`${this.url}/admin/custom-providers`,{body:t,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(W(r))return{data:null,error:r};throw r}}async _getCustomProvider(t){try{return await re(this.fetch,"GET",`${this.url}/admin/custom-providers/${t}`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(W(r))return{data:null,error:r};throw r}}async _updateCustomProvider(t,r){try{return await re(this.fetch,"PUT",`${this.url}/admin/custom-providers/${t}`,{body:r,headers:this.headers,xform:s=>({data:s,error:null})})}catch(s){if(W(s))return{data:null,error:s};throw s}}async _deleteCustomProvider(t){try{return await re(this.fetch,"DELETE",`${this.url}/admin/custom-providers/${t}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(r){if(W(r))return{data:null,error:r};throw r}}async _adminListPasskeys(t){vn(this.experimental),ar(t.userId);try{return await re(this.fetch,"GET",`${this.url}/admin/users/${t.userId}/passkeys`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(W(r))return{data:null,error:r};throw r}}async _adminDeletePasskey(t){vn(this.experimental),ar(t.userId),ar(t.passkeyId);try{return await re(this.fetch,"DELETE",`${this.url}/admin/users/${t.userId}/passkeys/${t.passkeyId}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(r){if(W(r))return{data:null,error:r};throw r}}}function a0(e={}){return{getItem:t=>e[t]||null,setItem:(t,r)=>{e[t]=r},removeItem:t=>{delete e[t]}}}globalThis&&x_()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug");class Mx extends Error{constructor(t){super(t),this.isAcquireTimeout=!0}}function Dx(){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 M_(e){if(!/^0x[a-fA-F0-9]{40}$/.test(e))throw new Error(`@supabase/auth-js: Address "${e}" is invalid.`);return e.toLowerCase()}function Lx(e){return parseInt(e,16)}function Ux(e){const t=new TextEncoder().encode(e);return"0x"+Array.from(t,s=>s.toString(16).padStart(2,"0")).join("")}function zx(e){var t;const{chainId:r,domain:s,expirationTime:o,issuedAt:c=new Date,nonce:u,notBefore:d,requestId:f,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(!s)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(` 25`))throw new Error(`@supabase/auth-js: Invalid SIWE message field "statement". Statement must not include '\\n'. Provided value: ${e.statement}`)}const _=M_(e.address),S=y?`${y}://${s}`:s,w=e.statement?`${e.statement} 26`:"",A=`${S} wants you to sign in with your Ethereum account: 27${_} 28 29${w}`;
29let T=`URI: ${g} 30Version: ${b} 31Chain ID: ${r}${u?` 32Nonce: ${u}`:""} 33Issued At: ${c.toISOString()}`;if(o&&(T+=` 34Expiration Time: ${o.toISOString()}`),d&&(T+=` 35Not Before: ${d.toISOString()}`),f&&(T+=` 36Request ID: ${f}`),m){let k=` 37Resources:`;for(const x of m){if(!x||typeof x!="string")throw new Error(`@supabase/auth-js: Invalid SIWE message field "resources". Every resource must be a valid string. Provided value: ${x}`);k+=` 38- ${x}`}T+=k}return`${A} 39${T}`}class st extends Error{constructor({message:t,code:r,cause:s,name:o}){var c;super(t,{cause:s}),this.__isWebAuthnError=!0,this.name=(c=o??(s instanceof Error?s.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 kc extends st{constructor(t,r){super({code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:r,message:t}),this.name="WebAuthnUnknownError",this.originalError=r}}function Ix({error:e,options:t}){var r,s,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 st({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 st({message:"Discoverable credentials were required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT",cause:e});if(t.mediation==="conditional"&&((s=c.authenticatorSelection)===null||s===void 0?void 0:s.userVerification)==="required")return new st({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 st({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 st({message:"The authenticator was previously registered",code:"ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",cause:e});if(e.name==="NotAllowedError")return new st({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="NotSupportedError")return c.pubKeyCredParams.filter(d=>d.type==="public-key").length===0?new st({message:'No entry in pubKeyCredParams was of type "public-key"',code:"ERROR_MALFORMED_PUBKEYCREDPARAMS",cause:e}):new st({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(D_(u)){if(c.rp.id!==u)return new st({message:`The RP ID "${c.rp.id}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new st({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 st({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 st({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 st({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}function Px({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 st({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else{if(e.name==="NotAllowedError")return new st({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="SecurityError"){const s=window.location.hostname;if(D_(s)){if(r.rpId!==s)return new st({message:`The RP ID "${r.rpId}
39" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new st({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="UnknownError")return new st({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 st({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}class Bx{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 rf=new Bx;function o0(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:s}=e,o=Yc(e,["challenge","user","excludeCredentials"]),c=qs(t).buffer,u=Object.assign(Object.assign({},r),{id:qs(r.id).buffer}),d=Object.assign(Object.assign({},o),{challenge:c,user:u});if(s&&s.length>0){d.excludeCredentials=new Array(s.length);for(let f=0;f<s.length;f++){const m=s[f];d.excludeCredentials[f]=Object.assign(Object.assign({},m),{id:qs(m.id).buffer,type:m.type||"public-key",transports:m.transports})}}return d}function l0(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,s=Yc(e,["challenge","allowCredentials"]),o=qs(t).buffer,c=Object.assign(Object.assign({},s),{challenge:o});if(r&&r.length>0){c.allowCredentials=new Array(r.length);for(let u=0;u<r.length;u++){const d=r[u];c.allowCredentials[u]=Object.assign(Object.assign({},d),{id:qs(d.id).buffer,type:d.type||"public-key",transports:d.transports})}}return c}function c0(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:Li(new Uint8Array(e.response.attestationObject)),clientDataJSON:Li(new Uint8Array(e.response.clientDataJSON))},type:"public-key",clientExtensionResults:e.getClientExtensionResults(),authenticatorAttachment:(t=r.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function u0(e){var t;if("toJSON"in e&&typeof e.toJSON=="function")return e.toJSON();const r=e,s=e.getClientExtensionResults(),o=e.response;return{id:e.id,rawId:e.id,response:{authenticatorData:Li(new Uint8Array(o.authenticatorData)),clientDataJSON:Li(new Uint8Array(o.clientDataJSON)),signature:Li(new Uint8Array(o.signature)),userHandle:o.userHandle?Li(new Uint8Array(o.userHandle)):void 0},type:"public-key",clientExtensionResults:s,authenticatorAttachment:(t=r.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function D_(e){return e==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e)}function xc(){var e,t;return!!(_t()&&"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 L_(e){try{const t=await navigator.credentials.create(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new kc("Browser returned unexpected credential type",t)}:{data:null,error:new kc("Empty credential response",t)}}catch(t){return{data:null,error:Ix({error:t,options:e})}}}async function U_(e){try{const t=await navigator.credentials.get(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new kc("Browser returned unexpected credential type",t)}:{data:null,error:new kc("Empty credential response",t)}}
39catch(t){return{data:null,error:Px({error:t,options:e})}}}const $x={hints:["security-key"],authenticatorSelection:{authenticatorAttachment:"cross-platform",requireResidentKey:!1,userVerification:"preferred",residentKey:"discouraged"},attestation:"direct"},Hx={userVerification:"preferred",hints:["security-key"],attestation:"direct"};function jc(...e){const t=o=>o!==null&&typeof o=="object"&&!Array.isArray(o),r=o=>o instanceof ArrayBuffer||ArrayBuffer.isView(o),s={};for(const o of e)if(o)for(const c in o){const u=o[c];if(u!==void 0)if(Array.isArray(u))s[c]=u;else if(r(u))s[c]=u;else if(t(u)){const d=s[c];t(d)?s[c]=jc(d,u):s[c]=jc(u)}else s[c]=u}return s}function qx(e,t){return jc($x,e,t||{})}function Vx(e,t){return jc(Hx,e,t||{})}class Gx{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:s,signal:o},c){var u;try{const{data:d,error:f}=await this.client.mfa.challenge({factorId:t,webauthn:r});if(!d)return{data:null,error:f};const m=o??rf.createNewAbortSignal();if(d.webauthn.type==="create"){const{user:y}=d.webauthn.credential_options.publicKey;if(!y.name){const g=s;if(g)y.name=`${y.id}:${g}`;else{const _=(await this.client.getUser()).data.user,S=((u=_?.user_metadata)===null||u===void 0?void 0:u.name)||_?.email||_?.id||"User";y.name=`${y.id}:${S}`}}y.displayName||(y.displayName=y.name)}switch(d.webauthn.type){case"create":{const y=qx(d.webauthn.credential_options.publicKey,c?.create),{data:g,error:b}=await L_({publicKey:y,signal:m});return g?{data:{factorId:t,challengeId:d.id,webauthn:{type:d.webauthn.type,credential_response:g}},error:null}:{data:null,error:b}}case"request":{const y=Vx(d.webauthn.credential_options.publicKey,c?.request),{data:g,error:b}=await U_(Object.assign(Object.assign({},d.webauthn.credential_options),{publicKey:y,signal:m}));return g?{data:{factorId:t,challengeId:d.id,webauthn:{type:d.webauthn.type,credential_response:g}},error:null}:{data:null,error:b}}}}catch(d){return W(d)?{data:null,error:d}:{data:null,error:new wn("Unexpected error in challenge",d)}}}async _verify({challengeId:t,factorId:r,webauthn:s}){return this.client.mfa.verify({factorId:r,challengeId:t,webauthn:s})}async _authenticate({factorId:t,webauthn:{rpId:r=typeof window<"u"?window.location.hostname:void 0,rpOrigins:s=typeof window<"u"?[window.location.origin]:void 0,signal:o}={}},c){if(!r)return{data:null,error:new go("rpId is required for WebAuthn authentication")};try{if(!xc())return{data:null,error:new wn("Browser does not support WebAuthn",null)};const{data:u,error:d}=await this.challenge({factorId:t,webauthn:{rpId:r,rpOrigins:s},signal:o},{request:c});if(!u)return{data:null,error:d};const{webauthn:f}=u;return this._verify({factorId:t,challengeId:u.challengeId,webauthn:{type:f.type,rpId:r,rpOrigins:s,credential_response:f.credential_response}})}catch(u){return W(u)?{data:null,error:u}:{data:null,error:new wn("Unexpected error in authenticate",u)}}}async _register({friendlyName:t,webauthn:{rpId:r=typeof window<"u"?window.location.hostname:void 0,rpOrigins:s=typeof window<"u"?[window.location.origin]:void 0,signal:o}={}},c){if(!r)return{data:null,error:new go("rpId is required for WebAuthn registration")};try{if(!xc())return{data:null,error:new wn("Browser does not support WebAuthn",null)};const{data:u,error:d}=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:d};const{data:f,error:m}=await this._challenge({factorId:u.id,friendlyName:u.friendly_name,webauthn:{rpId:r,rpOrigins:s},signal:o},{create:c});return f?this._verify({factorId:u.id,challengeId:f.challengeId,webauthn:{rpId:r,rpOrigins:s,type:f.webauthn.type,credential_response:f.webauthn.credential_response}}):{data:null,error:m}}catch(u){return W(u)?{data:null,error:u}:{data:null,error:new wn("Unexpected error in register",u)}}}}Dx();const Yx={url:Gk,storageKey:Yk,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:Fk,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1,throwOnError:!1,lockAcquireTimeout:5e3,skipAutoInitialize:!1,experimental:{}},xs={};class vo{get jwks(){var t,r;return(r=(t=xs[this.storageKey])===null||t===void 0?void 0:t.jwks)!==null&&r!==void 0?r:{keys:[]}}set jwks(t){xs[this.storageKey]=Object.assign(Object.assign({},xs[this.storageKey]),{jwks:t})}get jwks_cached_at(){var t,r;return(r=(t=xs[this.storageKey])===null||t===void 0?void 0:t.cachedAt)!==null&&r!==void 0?r:Number.MIN_SAFE_INTEGER}set jwks_cached_at(t){xs[this.storageKey]=Object.assign(Object.assign({},xs[this.storageKey]),{cachedAt:t})}constructor(t){var r,s,o;this.userStorage=null,this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=null,this.autoRefreshTickTimeout=null,this.visibilityChangedCallback=null,this.refreshingDeferred=null,this.lastRefreshFailure=null,this._sessionRemovalEpoch=0,this.initializePromise=null,this._pendingInitNotifications=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({},Yx),t);
39if(this.storageKey=c.storageKey,this.instanceID=(r=vo.nextInstanceID[this.storageKey])!==null&&r!==void 0?r:0,vo.nextInstanceID[this.storageKey]=this.instanceID+1,this.logDebugMessages=!!c.debug,typeof c.debug=="function"&&(this.logger=c.debug),this.instanceID>0&&_t()){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=(s=c.experimental)!==null&&s!==void 0?s:{},this.admin=new Nx({url:c.url,headers:c.headers,fetch:c.fetch,experimental:this.experimental}),this.url=c.url,this.headers=c.headers,this.fetch=j_(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 Gx(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:x_()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=a0(this.memoryStorage)),c.userStorage&&(this.userStorage=c.userStorage)):(this.memoryStorage={},this.storage=a0(this.memoryStorage)),_t()&&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),(u.data.event==="TOKEN_REFRESHED"||u.data.event==="SIGNED_IN")&&(this.lastRefreshFailure=null);try{await this._notifyAllSubscribers(u.data.event,u.data.session,!1)}catch(d){this._debug("#broadcastChannel","error",d)}})}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} (${O_}) ${new Date().toISOString()}`}_debug(...t){return this.logDebugMessages&&this.logger(this._logPrefix(),...t),this}async initialize(){var t;if(this.initializePromise)return await this.initializePromise;this._pendingInitNotifications=[],this.initializePromise=(async()=>this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._initialize()):await this._initialize())();
39const r=await this.initializePromise,s=(t=this._pendingInitNotifications)!==null&&t!==void 0?t:[];this._pendingInitNotifications=null;for(const o of s)await this._notifyAllSubscribers(o.event,o.session,o.broadcast);return r}async _initialize(){var t;try{let r={},s="none";if(_t()&&(r=e0(window.location.href),this._isImplicitGrantCallback(r)?s="implicit":await this._isPKCECallback(r)&&(s="pkce")),_t()&&this.detectSessionInUrl&&s!=="none"){const{data:o,error:c}=await this._getSessionFromURL(r,s);if(c){if(this._debug("#_initialize()","error detecting session from URL",c),Zk(c)){const f=(t=c.details)===null||t===void 0?void 0:t.code;if(f==="identity_already_exists"||f==="identity_not_found"||f==="single_identity_not_deletable")return{error:c}}return{error:c}}const{session:u,redirectType:d}=o;return this._debug("#_initialize()","detected session in URL",u,"redirect type",d),await this._saveSession(u),setTimeout(async()=>{d==="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 W(r)?this._returnResult({error:r}):this._returnResult({error:new wn("Unexpected error during initialization",r)})}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(t){var r,s,o;try{const c=await re(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:(s=(r=t?.options)===null||r===void 0?void 0:r.data)!==null&&s!==void 0?s:{},gotrue_meta_security:{captcha_token:(o=t?.options)===null||o===void 0?void 0:o.captchaToken}},xform:cn}),{data:u,error:d}=c;if(d||!u)return this._returnResult({data:{user:null,session:null},error:d});const f=u.session,m=u.user;return u.session&&(await this._saveSession(u.session),await this._notifyAllSubscribers("SIGNED_IN",f)),this._returnResult({data:{user:m,session:f},error:null})}catch(c){if(W(c))return this._returnResult({data:{user:null,session:null},error:c});throw c}}async signUp(t){var r,s,o;let c=null;try{let u;if("email"in t){const{email:g,password:b,options:_}=t;let S=null,w=null;this.flowType==="pkce"&&([S,w,c]=await this._getCodeChallengeAndMethod()),u=await re(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:this._maybeAppendFlowIdToRedirect(_?.emailRedirectTo,c),body:{email:g,password:b,data:(r=_?.data)!==null&&r!==void 0?r:{},gotrue_meta_security:{captcha_token:_?.captchaToken},code_challenge:S,code_challenge_method:w},xform:cn})}else if("phone"in t){const{phone:g,password:b,options:_}=t;u=await re(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:g,password:b,data:(s=_?.data)!==null&&s!==void 0?s:{},channel:(o=_?.channel)!==null&&o!==void 0?o:"sms",gotrue_meta_security:{captcha_token:_?.captchaToken}},xform:cn})}else throw new ec("You must provide either an email or phone number and a password");const{data:d,error:f}=u;if(f||!d)return await yn(this.storage,this.storageKey,c),this._returnResult({data:{user:null,session:null},error:f});const m=d.session,y=d.user;return d.session&&(await this._saveSession(d.session),await this._notifyAllSubscribers("SIGNED_IN",m)),this._returnResult({data:{user:y,session:m},error:null})}catch(u){if(await yn(this.storage,this.storageKey,c),W(u))return this._returnResult({data:{user:null,session:null},error:u});throw u}}async signInWithPassword(t){try{let r;if("email"in t){const{email:c,password:u,options:d}=t;r=await re(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:c,password:u,gotrue_meta_security:{captcha_token:d?.captchaToken}},xform:i0})}else if("phone"in t){const{phone:c,password:u,options:d}=t;r=await re(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:c,password:u,gotrue_meta_security:{captcha_token:d?.captchaToken}},xform:i0})}else throw new ec("You must provide either an email or phone number and a password");const{data:s,error:o}=r;if(o)return this._returnResult({data:{user:null,session:null},error:o});if(!s||!s.session||!s.user){const c=new ks;return this._returnResult({data:{user:null,session:null},error:c})}return s.session&&(await this._saveSession(s.session),await this._notifyAllSubscribers("SIGNED_IN",s.session)),this._returnResult({data:Object.assign({user:s.user,session:s.session},s.weak_password?{weakPassword:s.weak_password}:null),error:o})}catch(r){if(W(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async signInWithOAuth(t){var r,s,o,c;return await this._handleProviderSignIn(t.provider,{redirectTo:(r=t.options)===null||r===void 0?void 0:r.redirectTo,scopes:(s=t.options)===null||s===void 0?void 0:s.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,r){return await this.initializePromise,this.lock!=null?this._acquireLock(this.lockAcquireTimeout,async()=>this._exchangeCodeForSession(t,r)):this._exchangeCodeForSession(t,r)}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,s,o,c,u,d,f,m,y,g,b;let _,S;if("message"in t)_=t.message,S=t.signature;else{const{chain:w,wallet:A,statement:T,options:k}=t;let x;if(_t())if(typeof A=="object")x=A;else{const K=window;if("ethereum"in K&&typeof K.ethereum=="object"&&"request"in K.ethereum&&typeof K.ethereum.request=="function")x=K.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 A!="object"||!k?.url)throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");x=A}const z=new URL((r=k?.url)!==null&&r!==void 0?r:window.location.href),F=await x.request({method:"eth_requestAccounts"}).then(K=>K).catch(()=>{throw new Error("@supabase/auth-js: Wallet method eth_requestAccounts is missing or invalid")});if(!F||F.length===0)throw new Error("@supabase/auth-js: No accounts available. Please ensure the wallet is connected.");const U=M_(F[0]);let N=(s=k?.signInWithEthereum)===null||s===void 0?void 0:s.chainId;if(!N){const K=await x.request({method:"eth_chainId"});N=Lx(K)}const I={domain:z.host,address:U,statement:T,uri:z.href,version:"1",chainId:N,nonce:(o=k?.signInWithEthereum)===null||o===void 0?void 0:o.nonce,issuedAt:(u=(c=k?.signInWithEthereum)===null||c===void 0?void 0:c.issuedAt)!==null&&u!==void 0?u:new Date,expirationTime:(d=k?.signInWithEthereum)===null||d===void 0?void 0:d.expirationTime,notBefore:(f=k?.signInWithEthereum)===null||f===void 0?void 0:f.notBefore,requestId:(m=k?.signInWithEthereum)===null||m===void 0?void 0:m.requestId,resources:(y=k?.signInWithEthereum)===null||y===void 0?void 0:y.resources};_=zx(I),S=await x.request({method:"personal_sign",params:[Ux(_),U]})}try{const{data:w,error:A}=await re(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"ethereum",message:_,signature:S},!((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:cn});if(A)throw A;if(!w||!w.session||!w.user){const T=new ks;return this._returnResult({data:{user:null,session:null},error:T})}return w.session&&(await this._saveSession(w.session),await this._notifyAllSubscribers("SIGNED_IN",w.session)),this._returnResult({data:Object.assign({},w),error:A})}catch(w){if(W(w))return this._returnResult({data:{user:null,session:null},error:w});throw w}}async signInWithSolana(t){var r,s,o,c,u,d,f,m,y,g,b,_;let S,w;if("message"in t)S=t.message,w=t.signature;else{const{chain:A,wallet:T,statement:k,options:x}=t;let z;if(_t())if(typeof T=="object")z=T;else{const U=window;if("solana"in U&&typeof U.solana=="object"&&("signIn"in U.solana&&typeof U.solana.signIn=="function"||"signMessage"in U.solana&&typeof U.solana.signMessage=="function"))z=U.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 T!="object"||!x?.url)throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");z=T}const F=new URL((r=x?.url)!==null&&r!==void 0?r:window.location.href);if("signIn"in z&&z.signIn){const U=await z.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},x?.signInWithSolana),{version:"1",domain:F.host,uri:F.href}),k?{statement:k}:null));let N;if(Array.isArray(U)&&U[0]&&typeof U[0]=="object")N=U[0];else if(U&&typeof U=="object"&&"signedMessage"in U&&"signature"in U)N=U;else throw new Error("@supabase/auth-js: Wallet method signIn() returned unrecognized value");if("signedMessage"in N&&"signature"in N&&(typeof N.signedMessage=="string"||N.signedMessage instanceof Uint8Array)&&N.signature instanceof Uint8Array)S=typeof N.signedMessage=="string"?N.signedMessage:new TextDecoder().decode(N.signedMessage),w=N.signature;else throw new Error("@supabase/auth-js: Wallet method signIn() API returned object without signedMessage and signature fields")}
39else{if(!("signMessage"in z)||typeof z.signMessage!="function"||!("publicKey"in z)||typeof z!="object"||!z.publicKey||!("toBase58"in z.publicKey)||typeof z.publicKey.toBase58!="function")throw new Error("@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API");S=[`${F.host} wants you to sign in with your Solana account:`,z.publicKey.toBase58(),...k?["",k,""]:[""],"Version: 1",`URI: ${F.href}`,`Issued At: ${(o=(s=x?.signInWithSolana)===null||s===void 0?void 0:s.issuedAt)!==null&&o!==void 0?o:new Date().toISOString()}`,...!((c=x?.signInWithSolana)===null||c===void 0)&&c.notBefore?[`Not Before: ${x.signInWithSolana.notBefore}`]:[],...!((u=x?.signInWithSolana)===null||u===void 0)&&u.expirationTime?[`Expiration Time: ${x.signInWithSolana.expirationTime}`]:[],...!((d=x?.signInWithSolana)===null||d===void 0)&&d.chainId?[`Chain ID: ${x.signInWithSolana.chainId}`]:[],...!((f=x?.signInWithSolana)===null||f===void 0)&&f.nonce?[`Nonce: ${x.signInWithSolana.nonce}`]:[],...!((m=x?.signInWithSolana)===null||m===void 0)&&m.requestId?[`Request ID: ${x.signInWithSolana.requestId}`]:[],...!((g=(y=x?.signInWithSolana)===null||y===void 0?void 0:y.resources)===null||g===void 0)&&g.length?["Resources",...x.signInWithSolana.resources.map(N=>`- ${N}`)]:[]].join(` 40`);const U=await z.signMessage(new TextEncoder().encode(S),"utf8");if(!U||!(U instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");w=U}}try{const{data:A,error:T}=await re(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:S,signature:Li(w)},!((b=t.options)===null||b===void 0)&&b.captchaToken?{gotrue_meta_security:{captcha_token:(_=t.options)===null||_===void 0?void 0:_.captchaToken}}:null),xform:cn});if(T)throw T;if(!A||!A.session||!A.user){const k=new ks;return this._returnResult({data:{user:null,session:null},error:k})}return A.session&&(await this._saveSession(A.session),await this._notifyAllSubscribers("SIGNED_IN",A.session)),this._returnResult({data:Object.assign({},A),error:T})}catch(A){if(W(A))return this._returnResult({data:{user:null,session:null},error:A});throw A}}async _exchangeCodeForSession(t,r){const s=r?.flowId!=null,o=s?mc(r?.flowId):_t()?mc(e0(window.location.href)[Di]):null;s&&!o&&this._debug("#_exchangeCodeForSession()","provided flowId is not a valid flow id",r?.flowId);const{verifier:c,flowId:u}=s&&!o?{verifier:null,flowId:null}:await yx(this.storage,this.storageKey,o),[d,f]=(c??"").split("/");try{if(!d&&this.flowType==="pkce")throw new Wk;const{data:m,error:y}=await re(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:t,code_verifier:d},xform:cn});if(await yn(this.storage,this.storageKey,u),y)throw y;if(!m||!m.session||!m.user){const g=new ks;return this._returnResult({data:{user:null,session:null,redirectType:null},error:g})}return m.session&&(await this._saveSession(m.session),await this._notifyAllSubscribers(f==="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",m.session)),this._returnResult({data:Object.assign(Object.assign({},m),{redirectType:f??null}),error:y})}catch(m){if(await yn(this.storage,this.storageKey,u),W(m))return this._returnResult({data:{user:null,session:null,redirectType:null},error:m});throw m}}async signInWithIdToken(t){try{const{options:r,provider:s,token:o,access_token:c,nonce:u}=t,d=await re(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:s,id_token:o,access_token:c,nonce:u,gotrue_meta_security:{captcha_token:r?.captchaToken}},xform:cn}),{data:f,error:m}=d;if(m)return this._returnResult({data:{user:null,session:null},error:m});if(!f||!f.session||!f.user){const y=new ks;return this._returnResult({data:{user:null,session:null},error:y})}return f.session&&(await this._saveSession(f.session),await this._notifyAllSubscribers("SIGNED_IN",f.session)),this._returnResult({data:f,error:m})}catch(r){if(W(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async signInWithOtp(t){var r,s,o,c,u;let d=null;try{if("email"in t){const{email:f,options:m}=t;let y=null,g=null;
40this.flowType==="pkce"&&([y,g,d]=await this._getCodeChallengeAndMethod());const{error:b}=await re(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:f,data:(r=m?.data)!==null&&r!==void 0?r:{},create_user:(s=m?.shouldCreateUser)!==null&&s!==void 0?s:!0,gotrue_meta_security:{captcha_token:m?.captchaToken},code_challenge:y,code_challenge_method:g},redirectTo:this._maybeAppendFlowIdToRedirect(m?.emailRedirectTo,d)});return this._returnResult({data:{user:null,session:null},error:b})}if("phone"in t){const{phone:f,options:m}=t,{data:y,error:g}=await re(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:f,data:(o=m?.data)!==null&&o!==void 0?o:{},create_user:(c=m?.shouldCreateUser)!==null&&c!==void 0?c:!0,gotrue_meta_security:{captcha_token:m?.captchaToken},channel:(u=m?.channel)!==null&&u!==void 0?u:"sms"}});return this._returnResult({data:{user:null,session:null,messageId:y?.message_id},error:g})}throw new ec("You must provide either an email or phone number.")}catch(f){if(await yn(this.storage,this.storageKey,d),W(f))return this._returnResult({data:{user:null,session:null},error:f});throw f}}async verifyOtp(t){var r,s;try{let o,c;"options"in t&&(o=(r=t.options)===null||r===void 0?void 0:r.redirectTo,c=(s=t.options)===null||s===void 0?void 0:s.captchaToken);const{data:u,error:d}=await re(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},t),{gotrue_meta_security:{captcha_token:c}}),redirectTo:o,xform:cn});if(d)throw d;if(!u)throw new Error("An error occurred on token verification.");const f=u.session,m=u.user;return f?.access_token&&(await this._saveSession(f),await this._notifyAllSubscribers(t.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",f)),this._returnResult({data:{user:m,session:f},error:null})}catch(o){if(W(o))return this._returnResult({data:{user:null,session:null},error:o});throw o}}async signInWithSSO(t){var r,s,o,c;let u=null;try{let d=null,f=null;this.flowType==="pkce"&&([d,f,u]=await this._getCodeChallengeAndMethod());const m=await re(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:this._maybeAppendFlowIdToRedirect((r=t.options)===null||r===void 0?void 0:r.redirectTo,u)}),!((s=t?.options)===null||s===void 0)&&s.captchaToken?{gotrue_meta_security:{captcha_token:t.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:d,code_challenge_method:f}),headers:this.headers,xform:kx});return!((o=m.data)===null||o===void 0)&&o.url&&_t()&&!(!((c=t.options)===null||c===void 0)&&c.skipBrowserRedirect)&&window.location.assign(m.data.url),this._returnResult(m)}catch(d){if(await yn(this.storage,this.storageKey,u),W(d))return this._returnResult({data:null,error:d});throw d}}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:s}=t;if(s)throw s;if(!r)throw new pt;const{error:o}=await re(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(W(t))return this._returnResult({data:{user:null,session:null},error:t});throw t}}async resend(t){let r=null;try{const s=`${this.url}/resend`;if("email"in t){const{email:o,type:c,options:u}=t;let d=null,f=null;this.flowType==="pkce"&&([d,f,r]=await this._getCodeChallengeAndMethod());const{error:m}=await re(this.fetch,"POST",s,{headers:this.headers,body:{email:o,type:c,gotrue_meta_security:{captcha_token:u?.captchaToken},code_challenge:d,code_challenge_method:f},redirectTo:this._maybeAppendFlowIdToRedirect(u?.emailRedirectTo,r)});return m&&await yn(this.storage,this.storageKey,r),this._returnResult({data:{user:null,session:null},error:m})}else if("phone"in t){const{phone:o,type:c,options:u}=t,{data:d,error:f}=await re(this.fetch,"POST",s,{headers:this.headers,body:{phone:o,type:c,gotrue_meta_security:{captcha_token:u?.captchaToken}}});return this._returnResult({data:{user:null,session:null,messageId:d?.message_id},error:f})}
40throw new ec("You must provide either an email or phone number and a type")}catch(s){if(await yn(this.storage,this.storageKey,r),W(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}}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 s=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),o=(async()=>(await s,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 s=r();for(this.pendingInLock.push((async()=>{try{await s}catch{}})()),await s;this.pendingInLock.length;){const o=[...this.pendingInLock];await Promise.all(o),this.pendingInLock.splice(0,o.length)}return await s}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 Et(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 s=t.expires_at?t.expires_at*1e3-Date.now()<Oh:!1;if(this._debug("#__loadSession()",`session has${s?"":" not"} expired`,"expires_at",t.expires_at),!s){if(this.userStorage){const u=await Et(this.userStorage,this.storageKey+"-user");u?.user?t.user=u.user:t.user=Ch()}if(this.storage.isServer&&t.user&&!t.user.__isUserNotAvailableProxy){const u={value:this.suppressGetSessionWarning};t.user=Rx(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);if(c){if(!!(t.expires_at&&t.expires_at*1e3>Date.now())){const d=await Et(this.storage,this.storageKey);if(d&&d.refresh_token===t.refresh_token)return this._returnResult({data:{session:t},error:null})}return this._returnResult({data:{session:null},error:c})}return 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 re(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:t,xform:Xr}):await this._useSession(async r=>{var s,o,c;const{data:u,error:d}=r;if(d)throw d;return!(!((s=u.session)===null||s===void 0)&&s.access_token)&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new pt}:await re(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:Xr})})}catch(r){if(W(r))return Wl(r)&&await this._removeSession(),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={}){let s=null;try{return await this._useSession(async o=>{const{data:c,error:u}=o;if(u)throw u;if(!c.session)throw new pt;const d=c.session;let f=null,m=null;this.flowType==="pkce"&&t.email!=null&&([f,m,s]=await this._getCodeChallengeAndMethod());const{data:y,error:g}=await re(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:this._maybeAppendFlowIdToRedirect(r?.emailRedirectTo,s),body:Object.assign(Object.assign({},t),{code_challenge:f,code_challenge_method:m}),jwt:d.access_token,xform:Xr});if(g)throw g;return d.user=y.user,await this._saveSession(d),await this._notifyAllSubscribers("USER_UPDATED",d),this._returnResult({data:{user:d.user},error:null})})}catch(o){if(await yn(this.storage,this.storageKey,s),W(o))return this._returnResult({data:{user:null},error:o});throw o}}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 pt;const r=Date.now()/1e3;let s=r,o=!0,c=null;const{payload:u}=rc(t.access_token);if(u.exp&&(s=u.exp,o=s<=r),o){const{data:d,error:f}=await this._callRefreshToken(t.refresh_token);if(f)return this._returnResult({data:{user:null,session:null},error:f});if(!d)return{data:{user:null,session:null},error:null};c=d}else{const{data:d,error:f}=await this._getUser(t.access_token);if(f)return this._returnResult({data:{user:null,session:null},error:f});c={access_token:t.access_token,refresh_token:t.refresh_token,user:d.user,token_type:"bearer",expires_in:s-r,expires_at:s},await this._saveSession(c),await this._notifyAllSubscribers("SIGNED_IN",c)}return this._returnResult({data:{user:c.user,session:c},error:null})}catch(r){if(W(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 s;if(!t){const{data:u,error:d}=r;if(d)throw d;t=(s=u.session)!==null&&s!==void 0?s:void 0}if(!t?.refresh_token)throw new pt;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(W(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async _getSessionFromURL(t,r){var s;try{if(!_t())throw new tc("No browser detected.");
40if(t.error||t.error_description||t.error_code)throw new tc(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 Kv("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new tc("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 Kv("No code detected.");const{data:x,error:z}=await this._exchangeCodeForSession(t.code,{flowId:t[Di]});if(z)throw z;const F=new URL(window.location.href);return F.searchParams.delete("code"),F.searchParams.delete(Di),window.history.replaceState(window.history.state,"",F.toString()),{data:{session:x.session,redirectType:(s=x.redirectType)!==null&&s!==void 0?s:null},error:null}}const{provider_token:o,provider_refresh_token:c,access_token:u,refresh_token:d,expires_in:f,expires_at:m,token_type:y}=t;if(!u||!f||!d||!y)throw new tc("No session defined in URL");const g=Math.round(Date.now()/1e3),b=parseInt(f);let _=g+b;m&&(_=parseInt(m));const S=_-g;S*1e3<=dr&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${S}s, should have been closer to ${b}s`);const w=_-b;g-w>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",w,_,g):g-w<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",w,_,g);const{data:A,error:T}=await this._getUser(u);if(T)throw T;const k={provider_token:o,provider_refresh_token:c,access_token:u,expires_in:b,expires_at:_,refresh_token:d,token_type:y,user:A.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),this._returnResult({data:{session:k,redirectType:t.type},error:null})}catch(o){if(W(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){if(!t.code)return!1;const r=mc(t[Di]);return r&&await Et(this.storage,Gs(this.storageKey,r))?!0:!!await Et(this.storage,`${this.storageKey}-code-verifier`)}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 s;const o=async()=>{await this._removeSession()},{data:c,error:u}=r;if(u&&!Wl(u))return this._returnResult({error:u});const d=(s=c.session)===null||s===void 0?void 0:s.access_token;if(d){const{error:f}=await this.admin.signOut(d,t);if(f&&!(Fv(f)&&(f.status===404||f.status===401||f.status===403)||Wl(f)))return t!=="others"&&await o(),this._returnResult({error:f})}return t!=="others"&&await o(),this._returnResult({error:null})})}onAuthStateChange(t){const r=ox(),s={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,s),(async()=>(await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>{this._emitInitialSession(r)}):await this._emitInitialSession(r)))(),{data:{subscription:s}}}async _emitInitialSession(t){return await this._useSession(async r=>{var s,o;try{const{data:{session:c},error:u}=r;if(u)throw u;await((s=this.stateChangeEmitters.get(t))===null||s===void 0?void 0:s.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),Wl(c)||nc(c)||Fv(c)&&(c.code==="refresh_token_not_found"||c.code==="refresh_token_already_used"||c.code==="session_expired")?console.warn(c):console.error(c)}})}async resetPasswordForEmail(t,r={}){let s=null,o=null,c=null;this.flowType==="pkce"&&([s,o,c]=await this._getCodeChallengeAndMethod(!0));try{return await re(this.fetch,"POST",`${this.url}/recover`,{body:{email:t,code_challenge:s,code_challenge_method:o,gotrue_meta_security:{captcha_token:r.captchaToken}},headers:this.headers,redirectTo:this._maybeAppendFlowIdToRedirect(r.redirectTo,c)})}catch(u){if(await yn(this.storage,this.storageKey,c),W(u))return this._returnResult({data:null,error:u});throw u}}async getUserIdentities(){var t;try{const{data:r,error:s}=await this.getUser();if(s)throw s;return this._returnResult({data:{identities:(t=r.user.identities)!==null&&t!==void 0?t:[]},error:null})}catch(r){if(W(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;let s=null;try{const{data:o,error:c}=await this._useSession(async u=>{var d,f,m,y,g;const{data:b,error:_}=u;if(_)throw _;const{url:S,flowId:w}=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,t.provider,{redirectTo:(d=t.options)===null||d===void 0?void 0:d.redirectTo,scopes:(f=t.options)===null||f===void 0?void 0:f.scopes,queryParams:(m=t.options)===null||m===void 0?void 0:m.queryParams,skipBrowserRedirect:!0});return s=w,await re(this.fetch,"GET",S,{headers:this.headers,jwt:(g=(y=b.session)===null||y===void 0?void 0:y.access_token)!==null&&g!==void 0?g:void 0})});if(c)throw c;return _t()&&!(!((r=t.options)===null||r===void 0)&&r.skipBrowserRedirect)&&window.location.assign(o?.url),this._returnResult({data:{provider:t.provider,url:o?.url,flowId:s},error:null})}catch(o){if(W(o))return this._returnResult({data:{provider:t.provider,url:null,flowId:s},error:o});throw o}}async linkIdentityIdToken(t){return await this._useSession(async r=>{var s;try{const{error:o,data:{session:c}}=r;if(o)throw o;const{options:u,provider:d,token:f,access_token:m,nonce:y}=t,g=await re(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,jwt:(s=c?.access_token)!==null&&s!==void 0?s:void 0,body:{provider:d,id_token:f,access_token:m,nonce:y,link_identity:!0,gotrue_meta_security:{captcha_token:u?.captchaToken}},xform:cn}),{data:b,error:_}=g;return _?this._returnResult({data:{user:null,session:null},error:_}
40):!b||!b.session||!b.user?this._returnResult({data:{user:null,session:null},error:new ks}):(b.session&&(await this._saveSession(b.session),await this._notifyAllSubscribers("USER_UPDATED",b.session)),this._returnResult({data:b,error:_}))}catch(o){if(await yn(this.storage,this.storageKey,null),W(o))return this._returnResult({data:{user:null,session:null},error:o});throw o}})}async unlinkIdentity(t){try{return await this._useSession(async r=>{var s,o;const{data:c,error:u}=r;if(u)throw u;return await re(this.fetch,"DELETE",`${this.url}/user/identities/${t.identity_id}`,{headers:this.headers,jwt:(o=(s=c.session)===null||s===void 0?void 0:s.access_token)!==null&&o!==void 0?o:void 0})})}catch(r){if(W(r))return this._returnResult({data:null,error:r});throw r}}async _refreshAccessToken(t){const r="#_refreshAccessToken()";this._debug(r,"begin");try{const s=Date.now();return await ux(async o=>(o>0&&await cx(200*Math.pow(2,o-1)),this._debug(r,"refreshing attempt",o),await re(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:t},headers:this.headers,xform:cn})),(o,c)=>{const u=200*Math.pow(2,o);return c&&nc(c)&&Date.now()+u-s<dr})}catch(s){if(this._debug(r,"error",s),W(s))return this._returnResult({data:{session:null,user:null},error:s});throw s}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{url:s,flowId:o}=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",s),_t()&&!r.skipBrowserRedirect&&window.location.assign(s),{data:{provider:t,url:s,flowId:o},error:null}}async _recoverAndRefresh(){var t,r;const s="#_recoverAndRefresh()";this._debug(s,"begin");try{const o=await Et(this.storage,this.storageKey);if(o&&this.userStorage){let u=await Et(this.userStorage,this.storageKey+"-user");!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!u&&(u={user:o.user},await fr(this.userStorage,this.storageKey+"-user",u)),o.user=(t=u?.user)!==null&&t!==void 0?t:Ch()}else if(o&&!o.user&&!o.user){const u=await Et(this.storage,this.storageKey+"-user");u&&u?.user?(o.user=u.user,await It(this.storage,this.storageKey+"-user"),await fr(this.storage,this.storageKey,o)):o.user=Ch()}if(this._debug(s,"session from storage",o),!this._isValidSession(o)){this._debug(s,"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()<Oh;if(this._debug(s,`session has${c?"":" not"} expired with margin of ${Oh}s`),c){if(this.autoRefreshToken&&o.refresh_token){const{error:u}=await this._callRefreshToken(o.refresh_token);u&&(ex(u)?this._debug(s,"refresh discarded by commit guard",u):this._debug(s,"refresh failed",u))}}else if(o.user&&o.user.__isUserNotAvailableProxy===!0)try{const{data:u,error:d}=await this._getUser(o.access_token);!d&&u?.user?(o.user=u.user,await this._saveSession(o),await this._notifyAllSubscribers("SIGNED_IN",o)):this._debug(s,"could not get user data, skipping SIGNED_IN notification")}catch(u){console.error("Error getting user data:",u),this._debug(s,"error getting user data, skipping SIGNED_IN notification",u)}else await this._notifyAllSubscribers("SIGNED_IN",o)}catch(o){this._debug(s,"error",o),nc(o)?console.warn(o):console.error(o);return}finally{this._debug(s,"end")}}async _callRefreshToken(t){var r,s;if(!t)throw new pt;if(this.refreshingDeferred)return this.refreshingDeferred.promise;if(this.lastRefreshFailure&&this.lastRefreshFailure.refreshToken===t&&Date.now()<this.lastRefreshFailure.expiresAt)return this._debug("#_callRefreshToken()","returning cached failure (cooldown active)"),this.lastRefreshFailure.result;const o="#_callRefreshToken()";this._debug(o,"begin");try{this.refreshingDeferred=new Jc;const c=await Et(this.storage,this.storageKey),{data:u,error:d}=await this._refreshAccessToken(t);if(d)throw d;if(!u.session)throw new pt;const f=await Et(this.storage,this.storageKey);if(c!==null&&(f===null||f.refresh_token!==c.refresh_token)){this._debug(o,"commit guard: storage changed since refresh started, discarding rotated tokens",{startedWith:"present",nowHolds:f?"replaced":"cleared"});const b={data:null,error:new Jv};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
40oing write"),await It(this.storage,this.storageKey),this.userStorage&&await It(this.userStorage,this.storageKey+"-user");const b={data:null,error:new Jv};return this.refreshingDeferred.resolve(b),b}await this._notifyAllSubscribers("TOKEN_REFRESHED",u.session);const g={data:u.session,error:null};return this.lastRefreshFailure=null,this.refreshingDeferred.resolve(g),g}catch(c){if(this._debug(o,"error",c),W(c)){const u={data:null,error:c};if(!nc(c)){const d=await Et(this.storage,this.storageKey);!!(d?.expires_at&&d.expires_at*1e3>Date.now())?this._debug(o,"proactive refresh failed, access token still valid â preserving session"):await this._removeSession()}return this.lastRefreshFailure={refreshToken:t,result:u,expiresAt:Date.now()+Vk},(r=this.refreshingDeferred)===null||r===void 0||r.resolve(u),u}throw(s=this.refreshingDeferred)===null||s===void 0||s.reject(c),c}finally{this.refreshingDeferred=null,this._debug(o,"end")}}async _notifyAllSubscribers(t,r,s=!0){if(this._pendingInitNotifications!==null&&s){this._pendingInitNotifications.push({event:t,session:r,broadcast:s});return}const o=`#_notifyAllSubscribers(${t})`;this._debug(o,"begin",r,`broadcast = ${s}`);try{this.broadcastChannel&&s&&this.broadcastChannel.postMessage({event:t,session:r});const c=[],u=Array.from(this.stateChangeEmitters.values()).map(async d=>{try{await d.callback(t,r)}catch(f){c.push(f)}});if(await Promise.all(u),c.length>0){for(let d=0;d<c.length;d+=1)console.error(c[d]);throw c[0]}}finally{this._debug(o,"end")}}async _saveSession(t){this._debug("#_saveSession()",t),this.suppressGetSessionWarning=!0;const r=Object.assign({},t),s=r.user&&r.user.__isUserNotAvailableProxy===!0;if(this.userStorage){!s&&r.user&&await fr(this.userStorage,this.storageKey+"-user",{user:r.user});const o=Object.assign({},r);delete o.user;const c=t0(o);await fr(this.storage,this.storageKey,c)}else{const o=t0(r);await fr(this.storage,this.storageKey,o)}}async _removeSession(){this._sessionRemovalEpoch+=1,this._debug("#_removeSession()"),this.lastRefreshFailure=null,this.suppressGetSessionWarning=!1,await It(this.storage,this.storageKey),await vx(this.storage,this.storageKey),await It(this.storage,this.storageKey+"-user"),this.userStorage&&await It(this.userStorage,this.storageKey+"-user"),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const t=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{t&&_t()&&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(),dr);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:s}}=r;if(!s||!s.refresh_token||!s.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const o=Math.floor((s.expires_at*1e3-t)/dr);this._debug("#_autoRefreshTokenTick()",`access token expires in ${o} ticks, a tick lasts ${dr}ms, refresh threshold is ${eo} ticks`),o<=eo&&await this._callRefreshToken(s.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 Mx)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:s}}=r;if(!s||!s.refresh_token||!s.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const o=Math.floor((s.expires_at*1e3-t)/dr);this._debug("#_autoRefreshTokenTick()",`access token expires in ${o} ticks, a tick lasts ${dr}ms, refresh threshold is ${eo} ticks`),o<=eo&&await this._callRefreshToken(s.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()"),!_t()||!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()=>
40{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,s){let o=s?.redirectTo,c=null,u=null,d=null;this.flowType==="pkce"&&([c,u,d]=await this._getCodeChallengeAndMethod(),o=this._maybeAppendFlowIdToRedirect(o,d));const f=[`provider=${encodeURIComponent(r)}`];if(o&&f.push(`redirect_to=${encodeURIComponent(o)}`),s?.scopes&&f.push(`scopes=${encodeURIComponent(s.scopes)}`),c!=null&&u!=null){const m=new URLSearchParams({code_challenge:`${encodeURIComponent(c)}`,code_challenge_method:`${encodeURIComponent(u)}`});f.push(m.toString())}if(s?.queryParams){const m=new URLSearchParams(s.queryParams);f.push(m.toString())}return s?.skipBrowserRedirect&&f.push(`skip_http_redirect=${s.skipBrowserRedirect}`),{url:`${t}?${f.join("&")}`,flowId:d}}_maybeAppendFlowIdToRedirect(t,r){return!t||!r||!this.experimental.appendPkceFlowIdToRedirects?t??void 0:bx(t,r)}async _getCodeChallengeAndMethod(t=!1){return _x(this.storage,this.storageKey,t,r=>this._debug("#_getCodeChallengeAndMethod()","evicted oldest pending PKCE verifier slot",r))}async _unenroll(t){try{return await this._useSession(async r=>{var s;const{data:o,error:c}=r;return c?this._returnResult({data:null,error:c}):await re(this.fetch,"DELETE",`${this.url}/factors/${t.factorId}`,{headers:this.headers,jwt:(s=o?.session)===null||s===void 0?void 0:s.access_token})})}catch(r){if(W(r))return this._returnResult({data:null,error:r});throw r}}async _enroll(t){try{return await this._useSession(async r=>{var s,o;const{data:c,error:u}=r;if(u)return this._returnResult({data:null,error:u});const d=Object.assign({friendly_name:t.friendlyName,factor_type:t.factorType},t.factorType==="phone"?{phone:t.phone}:t.factorType==="totp"?{issuer:t.issuer}:{}),{data:f,error:m}=await re(this.fetch,"POST",`${this.url}/factors`,{body:d,headers:this.headers,jwt:(s=c?.session)===null||s===void 0?void 0:s.access_token});return m?this._returnResult({data:null,error:m}):(t.factorType==="totp"&&f.type==="totp"&&(!((o=f?.totp)===null||o===void 0)&&o.qr_code)&&(f.totp.qr_code=`data:image/svg+xml;utf-8,${f.totp.qr_code}`),this._returnResult({data:f,error:null}))})}catch(r){if(W(r))return this._returnResult({data:null,error:r});throw r}}async _verify(t){const r=async()=>{try{return await this._useSession(async s=>{var o;const{data:c,error:u}=s;if(u)return this._returnResult({data:null,error:u});const d=Object.assign({challenge_id:t.challengeId},"webauthn"in t?{webauthn:Object.assign(Object.assign({},t.webauthn),{credential_response:t.webauthn.type==="create"?c0(t.webauthn.credential_response):u0(t.webauthn.credential_response)})}:{code:t.code}),{data:f,error:m}=await re(this.fetch,"POST",`${this.url}/factors/${t.factorId}/verify`,{body:d,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)+f.expires_in},f)),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",f),this._returnResult({data:f,error:m}))})}catch(s){if(W(s))return this._returnResult({data:null,error:s});throw s}};return this.lock!=null?this._acquireLock(this.lockAcquireTimeout,r):r()}async _challenge(t){const r=async()=>{try{return await this._useSession(async s=>{var o;const{data:c,error:u}=s;if(u)return this._returnResult({data:null,error:u});const d=await re(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(d.error)return d;const{data:f}=d;if(f.type!=="webauthn")return{data:f,error:null};switch(f.webauthn.type){case"create":return{data:Object.assign(Object.assign({},f),{webauthn:Object.assign(Object.assign({},f.webauthn),{credential_options:Object.assign(Object.assign({},f.webauthn.credential_options),{publicKey:o0(f.webauthn.credential_options.publicKey)})})}),error:null};case"request":return{data:Object.assign(Object.assign({},f),{webauthn:Object.assign(Object.assign({},f.webauthn),{credential_options:Object.assign(Object.assign({},f.webauthn.credential_options),{publicKey:l0(f.webauthn.credential_options.publicKey)})})}),error:null}}})}catch(s){if(W(s))return this._returnResult({data:null,error:s});throw s}};return this.lock!=null?this._acquireLock(this.lockAcquireTimeout,r):r()}async _challengeAndVerify(t){const{data:r,error:s}=await this._challenge({factorId:t.factorId});return s?this._returnResult({data:null,error:s}):await this._verify({factorId:t.factorId,challengeId:r.id,code:t.code})}async _listFactors(){var t;const{data:{user:r},error:s}=await this.getUser();if(s)return{data:null,error:s};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,s,o,c;if(t)try{const{payload:_}=rc(t);let S=null;_.aal&&(S=_.aal);let w=S;const{data:{user:A},error:T}=await this.getUser(t);if(T)return this._returnResult({data:null,error:T});((s=(r=A?.factors)===null||r===void 0?void 0:r.filter(z=>z.status==="verified"))!==null&&s!==void 0?s:[]).length>0&&(w="aal2");const x=_.amr||[];return{data:{currentLevel:S,nextLevel:w,currentAuthenticationMethods:x},error:null}}catch(_){if(W(_))return this._returnResult({data:null,error:_});throw _}const{data:{session:u},error:d}
40=await this.getSession();if(d)return this._returnResult({data:null,error:d});if(!u)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const{payload:f}=rc(u.access_token);let m=null;f.aal&&(m=f.aal);let y=m;((c=(o=u.user.factors)===null||o===void 0?void 0:o.filter(_=>_.status==="verified"))!==null&&c!==void 0?c:[]).length>0&&(y="aal2");const b=f.amr||[];return{data:{currentLevel:m,nextLevel:y,currentAuthenticationMethods:b},error:null}}async _getAuthorizationDetails(t){try{return await this._useSession(async r=>{const{data:{session:s},error:o}=r;return o?this._returnResult({data:null,error:o}):s?await re(this.fetch,"GET",`${this.url}/oauth/authorizations/${t}`,{headers:this.headers,jwt:s.access_token,xform:c=>({data:c,error:null})}):this._returnResult({data:null,error:new pt})})}catch(r){if(W(r))return this._returnResult({data:null,error:r});throw r}}async _approveAuthorization(t,r){try{return await this._useSession(async s=>{const{data:{session:o},error:c}=s;if(c)return this._returnResult({data:null,error:c});if(!o)return this._returnResult({data:null,error:new pt});const u=await re(this.fetch,"POST",`${this.url}/oauth/authorizations/${t}/consent`,{headers:this.headers,jwt:o.access_token,body:{action:"approve"},xform:d=>({data:d,error:null})});return u.data&&u.data.redirect_url&&_t()&&!r?.skipBrowserRedirect&&window.location.assign(u.data.redirect_url),u})}catch(s){if(W(s))return this._returnResult({data:null,error:s});throw s}}async _denyAuthorization(t,r){try{return await this._useSession(async s=>{const{data:{session:o},error:c}=s;if(c)return this._returnResult({data:null,error:c});if(!o)return this._returnResult({data:null,error:new pt});const u=await re(this.fetch,"POST",`${this.url}/oauth/authorizations/${t}/consent`,{headers:this.headers,jwt:o.access_token,body:{action:"deny"},xform:d=>({data:d,error:null})});return u.data&&u.data.redirect_url&&_t()&&!r?.skipBrowserRedirect&&window.location.assign(u.data.redirect_url),u})}catch(s){if(W(s))return this._returnResult({data:null,error:s});throw s}}async _listOAuthGrants(){try{return await this._useSession(async t=>{const{data:{session:r},error:s}=t;return s?this._returnResult({data:null,error:s}):r?await re(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 pt})})}catch(t){if(W(t))return this._returnResult({data:null,error:t});throw t}}async _revokeOAuthGrant(t){try{return await this._useSession(async r=>{const{data:{session:s},error:o}=r;return o?this._returnResult({data:null,error:o}):s?(await re(this.fetch,"DELETE",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:s.access_token,query:{client_id:t.clientId},noResolveJson:!0}),{data:{},error:null}):this._returnResult({data:null,error:new pt})})}catch(r){if(W(r))return this._returnResult({data:null,error:r});throw r}}async fetchJwk(t,r={keys:[]}){let s=r.keys.find(d=>d.kid===t);if(s)return s;const o=Date.now();if(s=this.jwks.keys.find(d=>d.kid===t),s&&this.jwks_cached_at+Qk>o)return s;const{data:c,error:u}=await re(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,s=c.keys.find(d=>d.kid===t),!s)?null:s}async getClaims(t,r={}){try{let s=t;if(!s){const{data:_,error:S}
40=await this.getSession();if(S||!_.session)return this._returnResult({data:null,error:S});s=_.session.access_token}const{header:o,payload:c,signature:u,raw:{header:d,payload:f}}=rc(s);if(!r?.allowExpired)try{Ex(c.exp)}catch(_){throw new Oc(_ instanceof Error?_.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:_}=await this.getUser(s);if(_)throw _;return{data:{claims:c,header:o,signature:u},error:null}}const y=Ax(o.alg),g=await crypto.subtle.importKey("jwk",m,y,!0,["verify"]);if(!await crypto.subtle.verify(y,g,u,sx(`${d}.${f}`)))throw new Oc("Invalid JWT signature");return{data:{claims:c,header:o,signature:u},error:null}}catch(s){if(W(s))return this._returnResult({data:null,error:s});throw s}}async signInWithPasskey(t){var r,s,o;vn(this.experimental);try{if(!xc())return this._returnResult({data:null,error:new wn("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 d=l0(c.options),f=(o=(s=t?.options)===null||s===void 0?void 0:s.signal)!==null&&o!==void 0?o:rf.createNewAbortSignal(),{data:m,error:y}=await U_({publicKey:d,signal:f});if(y||!m)return this._returnResult({data:null,error:y??new wn("WebAuthn ceremony failed",null)});const g=u0(m);return this._verifyPasskeyAuthentication({challengeId:c.challenge_id,credential:g})}catch(c){if(W(c))return this._returnResult({data:null,error:c});throw c}}async registerPasskey(t){var r,s;vn(this.experimental);try{if(!xc())return this._returnResult({data:null,error:new wn("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=o0(o.options),d=(s=(r=t?.options)===null||r===void 0?void 0:r.signal)!==null&&s!==void 0?s:rf.createNewAbortSignal(),{data:f,error:m}=await L_({publicKey:u,signal:d});if(m||!f)return this._returnResult({data:null,error:m??new wn("WebAuthn ceremony failed",null)});const y=c0(f);return this._verifyPasskeyRegistration({challengeId:o.challenge_id,credential:y})}catch(o){if(W(o))return this._returnResult({data:null,error:o});throw o}}async _startPasskeyRegistration(){vn(this.experimental);try{return await this._useSession(async t=>{const{data:{session:r},error:s}=t;if(s)return this._returnResult({data:null,error:s});if(!r)return this._returnResult({data:null,error:new pt});const{data:o,error:c}=await re(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(W(t))return this._returnResult({data:null,error:t});throw t}}async _verifyPasskeyRegistration(t){vn(this.experimental);try{return await this._useSession(async r=>{const{data:{session:s},error:o}=r;if(o)return this._returnResult({data:null,error:o});if(!s)return this._returnResult({data:null,error:new pt});const{data:c,error:u}=await re(this.fetch,"POST",`${this.url}/passkeys/registration/verify`,{headers:this.headers,jwt:s.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(W(r))return this._returnResult({data:null,error:r});throw r}}async _startPasskeyAuthentication(t){var r;vn(this.experimental);try{const{data:s,error:o}=await re(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:s,error:null})}catch(s){if(W(s))return this._returnResult({data:null,error:s});throw s}}async _verifyPasskeyAuthentication(t){vn(this.experimental);try{const{data:r,error:s}=await re(this.fetch,"POST",`${this.url}/passkeys/authentication/verify`,{headers:this.headers,body:{challenge_id:t.challengeId,credential:t.credential},xform:cn});return s?this._returnResult({data:null,error:s}):(r.session&&(await this._saveSession(r.session),await this._notifyAllSubscribers("SIGNED_IN",r.session)),this._returnResult({data:r,error:null}))}catch(r){if(W(r))return this._returnResult({data:null,error:r});throw r}}async _listPasskeys(){vn(this.experimental);try{return await this._useSession(async t=>{const{data:{session:r},error:s}=t;if(s)return this._returnResult({data:null,error:s});if(!r)return this._returnResult({data:null,error:new pt});const{data:o,error:c}=await re(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(W(t))return this._returnResult({data:null,error:t});throw t}}async _updatePasskey(t){vn(this.experimental);try{return await this._useSession(async r=>{const{data:{session:s},error:o}=r;if(o)return this._returnResult({data:null,error:o});if(!s)return this._returnResult({data:null,error:new pt});const{data:c,error:u}=await re(this.fetch,"PATCH",`${this.url}/passkeys/${t.passkeyId}`,{headers:this.headers,jwt:s.access_token,body:{friendly_name:t.friendlyName}});return u?this._returnResult({data:null,error:u}):this._returnResult({data:c,error:null})})}catch(r){if(W(r))return this._returnResult({data:null,error:r});throw r}}async _deletePasskey(t){vn(this.experimental);try{return await this._useSession(async r=>{const{data:{session:s},error:o}=r;if(o)return this._returnResult({data:null,error:o});if(!s)return this._returnResult({data:null,error:new pt});const{error:c}
40=await re(this.fetch,"DELETE",`${this.url}/passkeys/${t.passkeyId}`,{headers:this.headers,jwt:s.access_token,noResolveJson:!0});return c?this._returnResult({data:null,error:c}):this._returnResult({data:null,error:null})})}catch(r){if(W(r))return this._returnResult({data:null,error:r});throw r}}}vo.nextInstanceID={};const Fx=vo,Kx="2.112.2";let to="",Nc;if(typeof Deno<"u"){var xh;to="deno",Nc=(xh=Deno.version)===null||xh===void 0?void 0:xh.deno}else if(typeof document<"u")to="web";else if(typeof navigator<"u"&&navigator.product==="ReactNative")to="react-native";else{var jh;to="node";const e=globalThis.process;Nc=e==null||(jh=e.version)===null||jh===void 0?void 0:jh.replace(/^v/,"")}const z_=[`runtime=${to}`];Nc&&z_.push(`runtime-version=${Nc}`);const Jx={"X-Client-Info":`supabase-js/${Kx}; ${z_.join("; ")}`},Qx={headers:Jx},Xx={schema:"public"},Zx={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},Wx={},e2={enabled:!1,respectSamplingDecision:!0};function t2(e){if(!e||typeof e!="string")return null;const t=e.split("-");if(t.length!==4)return null;const[r,s,o,c]=t;if(r.length!==2||s.length!==32||o.length!==16||c.length!==2)return null;const u=/^[0-9a-f]+$/i;return!u.test(r)||!u.test(s)||!u.test(o)||!u.test(c)||s==="00000000000000000000000000000000"||o==="0000000000000000"?null:{version:r,traceId:s,parentId:o,traceFlags:c,isSampled:(parseInt(c,16)&1)===1}}function n2(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 s of t)try{if(typeof s=="string"){if(r2(r.hostname,s))return!0}else if(s instanceof RegExp){if(s.test(r.hostname))return!0}else if(typeof s=="function"&&s(r))return!0}catch{continue}return!1}function r2(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 i2(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 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 s2(e,t){if(bo(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var s=r.call(e,t);if(bo(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function a2(e){var t=s2(e,"string");return bo(t)=="symbol"?t:t+""}function o2(e,t,r){return(t=a2(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function d0(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,s)}return r}function Xe(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?d0(Object(r),!0).forEach(function(s){o2(e,s,r[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):d0(Object(r)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(r,s))})}return e}const l2=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),c2=()=>Headers,I_=e=>e.startsWith("sb_publishable_")||e.startsWith("sb_secret_"),u2="sb_temp_",h0=new Set,d2=e=>{var t,r;if(!e.startsWith("sb_")||I_(e)||e.startsWith(u2))return;const s=(t=(r=e.match(/^sb_[a-zA-Z0-9]+_/))===null||r===void 0?void 0:r[0])!==null&&t!==void 0?t:"unknown";h0.has(s)||(h0.add(s),console.warn("@supabase/supabase-js: Unrecognized Supabase API key format. The client will proceed and send this key as-is; if you see authentication errors you may need to upgrade @supabase/supabase-js to a version that recognizes this key type."))},f0=(e,t,r,s,o,c)=>{const u=l2(s),d=c2(),f=o?.enabled===!0,m=o?.respectSamplingDecision!==!1,y=f?i2(t):null,g=!(c?.omitApiKeyAsBearer&&I_(e));return async(b,_)=>{const S=await r();let w=new d(_?.headers);if(w.has("apikey")||w.set("apikey",e),!w.has("Authorization")){const A=S??(g?e:null);A&&w.set("Authorization",`Bearer ${A}`)}if(y){const A=h2(b,y,m);A&&(A.traceparent&&!w.has("traceparent")&&w.set("traceparent",A.traceparent),A.tracestate&&!w.has("tracestate")&&w.set("tracestate",A.tracestate),A.baggage&&!w.has("baggage")&&w.set("baggage",A.baggage))}return u(b,Xe(Xe({},_),{},{headers:w}))}};let p0=!1;function h2(e,t,r){const s=dC();if(!s)return p0||(p0=!0,console.warn("@supabase/supabase-js: tracePropagation is enabled but the tracing runtime is not loaded, so trace headers will not be attached. Add `import '@supabase/supabase-js/tracing'` at your application entry point (requires the OpenTelemetry API package to be installed). The CDN/UMD build does not support trace propagation.")),null;if(!n2(typeof e=="string"||e instanceof URL?e:e.url,t))return null;const o=s();if(!o||!o.traceparent)return null;if(r){const c=t2(o.traceparent);if(c&&!c.isSampled)return null}return o}function m0(e){return typeof e=="boolean"?{enabled:e}:e}function f2(e){return e.endsWith("/")?e:e+"/"}function p2(e,t){var r,s,o,c,u,d;const{db:f,auth:m,realtime:y,global:g}=e,{db:b,auth:_,realtime:S,global:w}=t,A=m0(e.tracePropagation),T=m0(t.tracePropagation),k={db:Xe(Xe({},b),f),auth:Xe(Xe({},_),m),realtime:Xe(Xe({},S),y),storage:{},global:Xe(Xe(Xe({},w),g),{},{headers:Xe(Xe({},(r=w?.headers)!==null&&r!==void 0?r:{}),(s=g?.headers)!==null&&s!==void 0?s:{})}),tracePropagation:{enabled:(o=(c=A?.enabled)!==null&&c!==void 0?c:T?.enabled)!==null&&o!==void 0?o:!1,respectSamplingDecision:(u=(d=A?.respectSamplingDecision)!==null&&d!==void 0?d:T?.respectSamplingDecision)!==null&&u!==void 0?u:!0},accessToken:async()=>""};return e.accessToken?k.accessToken=e.accessToken:delete k.accessToken,k}function m2(e){const t=e?.trim();if(!t)throw new Error("supabaseUrl is required.");
40if(!t.match(/^https?:\/\//i))throw new Error("Invalid supabaseUrl: Must be a valid HTTP or HTTPS URL.");try{return new URL(f2(t))}catch{throw Error("Invalid supabaseUrl: Provided URL is malformed.")}}var g2=class extends Fx{constructor(e){super(e)}},y2=class{constructor(e,t,r){var s,o;this.supabaseUrl=e,this.supabaseKey=t;const c=m2(e);if(!t)throw new Error("supabaseKey is required.");d2(t),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`,d={db:Xx,realtime:Wx,auth:Xe(Xe({},Zx),{},{storageKey:u}),global:Qx,tracePropagation:e2},f=p2(r??{},d);if(this.settings=f,this.storageKey=(s=f.auth.storageKey)!==null&&s!==void 0?s:"",this.headers=(o=f.global.headers)!==null&&o!==void 0?o:{},f.accessToken)this.accessToken=f.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=f.auth)!==null&&m!==void 0?m:{},this.headers,f.global.fetch)}this.fetch=f0(t,e,this._getSessionToken.bind(this),f.global.fetch,f.tracePropagation),this.functionsFetch=f0(t,e,this._getSessionToken.bind(this),f.global.fetch,f.tracePropagation,{omitApiKeyAsBearer:!0}),this.realtime=this._initRealtimeClient(Xe({headers:this.headers,accessToken:this._getAccessToken.bind(this),fetch:this.fetch},f.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 AC(new URL("rest/v1",c).href,{headers:this.headers,schema:f.db.schema,fetch:this.fetch,timeout:f.db.timeout,urlLengthLimit:f.db.urlLengthLimit,retry:f.db.retry}),this.storage=new qk(this.storageUrl.href,this.headers,this.fetch,r?.storage),f.accessToken||this._listenForAuthEvents()}get functions(){return new mC(this.functionsUrl.href,{headers:this.headers,customFetch:this.functionsFetch})}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 _getSessionToken(){var e=this,t,r;if(e.accessToken)return await e.accessToken();const{data:s}=await e.auth.getSession();return(t=(r=s.session)===null||r===void 0?void 0:r.access_token)!==null&&t!==void 0?t:null}async _getAccessToken(){var e=this,t;return(t=await e._getSessionToken())!==null&&t!==void 0?t:e.supabaseKey}_initSupabaseAuthClient({autoRefreshToken:e,persistSession:t,detectSessionInUrl:r,storage:s,userStorage:o,storageKey:c,flowType:u,lock:d,debug:f,throwOnError:m,experimental:y,lockAcquireTimeout:g,skipAutoInitialize:b},_,S){const w={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new g2({url:this.authUrl.href,headers:Xe(Xe({},w),_),storageKey:c,autoRefreshToken:e,persistSession:t,detectSessionInUrl:r,storage:s,userStorage:o,flowType:u,lock:d,debug:f,throwOnError:m,experimental:y,fetch:S,lockAcquireTimeout:g,skipAutoInitialize:b,hasCustomAuthorizationHeader:Object.keys(this.headers).some(A=>A.toLowerCase()==="authorization")})}_initRealtimeClient(e){return new fk(this.realtimeUrl.href,Xe(Xe({},e),{},{params:Xe(Xe({},{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"||e==="INITIAL_SESSION")&&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 v2=(e,t,r)=>new y2(e,t,r);function b2(){if(typeof window<"u"||globalThis.Deno!==void 0)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)<=20:!1}b2()&&console.warn("â ï¸ Node.js 20 and below are deprecated and will no longer be supported in future versions of @supabase/supabase-js. Please upgrade to N
40ode.js 22 or later. For more information, visit: https://github.com/orgs/supabase/discussions/45715");function _2(){if(typeof window>"u")return;const e=location.hostname,r=["lovableproject.com","lovableproject-dev.com","lovable.app","gpt-eng.com","gptengineer.run"].some(A=>e===A||e.endsWith("."+A)),s="[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}",o=r?e.match(new RegExp("^(?:id-preview(?:-[a-z0-9]+)?|project)--("+s+")(?:-dev)?(?=\\.|$)","i"))?.[1]??e.match(new RegExp("^("+s+")(?=[.-])","i"))?.[1]:void 0,c=window.parent&&window.parent!==window;if(!o||!c)return localStorage;const u=e.endsWith(".lovableproject-dev.com")||e.endsWith(".gpt-eng.com"),d=u?/^https:\/\/([a-z0-9-]+\.)*(lovable\.dev|gptengineer\.app)$|^http:\/\/localhost:3000$/:/^https:\/\/([a-z0-9-]+\.)*(lovable\.dev|gptengineer\.app)$/,f=location.ancestorOrigins&&location.ancestorOrigins[0]||(document.referrer?new URL(document.referrer).origin:""),m=f&&d.test(f)?[f]:u?["https://lovable.dev","http://localhost:3000"]:["https://lovable.dev"],y="lovable-preview-auth:result",g=2e3,b=()=>Math.random().toString(36).slice(2)+Date.now().toString(36),_=(A,T,k)=>new Promise(x=>{const z=b();let F=!1,U;const N=ue=>{F||(F=!0,clearTimeout(U),window.removeEventListener("message",I),x(ue))},I=ue=>{if(m.indexOf(ue.origin)<0)return;const G=ue.data;G&&G.type===y&&G.requestId===z&&N(G)};window.addEventListener("message",I);const K={type:A,requestId:z,projectId:o,key:T};k!==void 0&&(K.value=k);for(const ue of m)window.parent.postMessage(K,ue);U=setTimeout(()=>N(null),g)});let S=!0;const w=250;return{getItem:async A=>{let T=await _("lovable-preview-auth:get",A);return!T&&S&&(await new Promise(k=>setTimeout(k,w)),T=await _("lovable-preview-auth:get",A)),S=!1,T&&T.ok&&typeof T.value=="string"?T.value===""?(localStorage.removeItem(A),null):T.value:localStorage.getItem(A)},setItem:(A,T)=>(localStorage.setItem(A,T),_("lovable-preview-auth:set",A,T).then(()=>{})),removeItem:A=>(localStorage.removeItem(A),_("lovable-preview-auth:remove",A).then(()=>{}))}}function w2(){return v2("https://ajqogrosfqihuswpsavu.supabase.co","eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImFqcW9ncm9zZnFpaHVzd3BzYXZ1Iiwicm9sZSI6ImFub24iLCJpYXQiOjE3ODAzMzYwMjMsImV4cCI6MjA5NTkxMjAyM30.8wc7S_VSxHowbO6PRcC6V-ccqLq0EFK9M5AhJFL5nJ4",{auth:{storage:_2(),persistSession:!0,autoRefreshToken:!0}})}let Nh;const zi=new Proxy({},{get(e,t,r){return Nh||(Nh=w2()),Reflect.get(Nh,t,r)}}),S2=Wr({type:"function"}).client(async({next:e})=>{const{data:t}=await zi.auth.getSession(),r=t.session?.access_token;return e({headers:r?{Authorization:`Bearer ${r}`}:{}})}),E2=Wr(),g0=cC(()=>({requestMiddleware:[E2],functionMiddleware:[S2]}));var Qc=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(){}},A2=class extends Qc{#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"}},P_=new A2,T2={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},R2=class{#e=T2;#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)}},sf=new R2;function O2(e){setTimeout(e,0)}var C2=typeof window>"u"||"Deno"in globalThis;function _n(){}function k2(e,t){return typeof e=="function"?e(t):e}function x2(e){return typeof e=="number"&&e>=0&&e!==1/0}function j2(e,t){return Math.max(e+(t||0)-Date.now(),0)}function af(e,t){return typeof e=="function"?e(t):e}function N2(e,t){return typeof e=="function"?e(t):e}function y0(e,t){const{type:r="all",exact:s,fetchStatus:o,predicate:c,queryKey:u,stale:d}=e;if(u){if(s){if(t.queryHash!==Of(u,t.options))return!1}else if(!wo(t.queryKey,u))return!1}if(r!=="all"){const f=t.isActive();
40if(r==="active"&&!f||r==="inactive"&&f)return!1}return!(typeof d=="boolean"&&t.isStale()!==d||o&&o!==t.state.fetchStatus||c&&!c(t))}function v0(e,t){const{exact:r,status:s,predicate:o,mutationKey:c}=e;if(c){if(!t.options.mutationKey)return!1;if(r){if(_o(t.options.mutationKey)!==_o(c))return!1}else if(!wo(t.options.mutationKey,c))return!1}return!(s&&t.state.status!==s||o&&!o(t))}function Of(e,t){return(t?.queryKeyHashFn||_o)(e)}function _o(e){return JSON.stringify(e,(t,r)=>of(r)?Object.keys(r).sort().reduce((s,o)=>(s[o]=r[o],s),{}):r)}function wo(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>wo(e[r],t[r])):!1}var M2=Object.prototype.hasOwnProperty;function B_(e,t,r=0){if(e===t)return e;if(r>500)return t;const s=b0(e)&&b0(t);if(!s&&!(of(e)&&of(t)))return t;const c=(s?e:Object.keys(e)).length,u=s?t:Object.keys(t),d=u.length,f=s?new Array(d):{};let m=0;for(let y=0;y<d;y++){const g=s?y:u[y],b=e[g],_=t[g];if(b===_){f[g]=b,(s?y<c:M2.call(e,g))&&m++;continue}if(b===null||_===null||typeof b!="object"||typeof _!="object"){f[g]=_;continue}const S=B_(b,_,r+1);f[g]=S,S===b&&m++}return c===d&&m===c?e:f}function RD(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const r in e)if(e[r]!==t[r])return!1;return!0}function b0(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function of(e){if(!_0(e))return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(!_0(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function _0(e){return Object.prototype.toString.call(e)==="[object Object]"}function D2(e){return new Promise(t=>{sf.setTimeout(t,e)})}function L2(e,t,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?B_(e,t):t}function U2(e,t,r=0){const s=[...e,t];return r&&s.length>r?s.slice(1):s}function z2(e,t,r=0){const s=[t,...e];return r&&s.length>r?s.slice(0,-1):s}var Cf=Symbol();function $_(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===Cf?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function OD(e,t){return typeof e=="function"?e(...t):!!e}function I2(e,t,r){let s=!1,o;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(o??=t(),s||(s=!0,o.aborted?r():o.addEventListener("abort",r,{once:!0})),o)}),e}var H_=(()=>{let e=()=>C2;return{isServer(){return e()},setIsServer(t){e=t}}})();function P2(){let e,t;const r=new Promise((o,c)=>{e=o,t=c});r.status="pending",r.catch(()=>{});function s(o){Object.assign(r,o),delete r.resolve,delete r.reject}return r.resolve=o=>{s({status:"fulfilled",value:o}),e(o)},r.reject=o=>{s({status:"rejected",reason:o}),t(o)},r}var B2=O2;function $2(){let e=[],t=0,r=d=>{d()},s=d=>{d()},o=B2;const c=d=>{t?e.push(d):o(()=>{r(d)})},u=()=>{const d=e;e=[],d.length&&o(()=>{s(()=>{d.forEach(f=>{r(f)})})})};return{batch:d=>{let f;t++;try{f=d()}finally{t--,t||u()}return f},batchCalls:d=>(...f)=>{c(()=>{d(...f)})},schedule:c,setNotifyFunction:d=>{r=d},setBatchNotifyFunction:d=>{s=d},setScheduler:d=>{o=d}}}var Ct=$2(),H2=class extends Qc{#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))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(r=>{r(e)}))}isOnline(){return this.#e}},Mc=new H2;function q2(e){return Math.min(1e3*2**e,3e4)}function q_(e){return(e??"online")==="online"?Mc.isOnline():!0}var lf=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function V_(e){let t=!1,r=0,s;const o=P2(),c=()=>o.status!=="pending",u=w=>{if(!c()){const A=new lf(w);b(A),e.onCancel?.(A)}},d=()=>{t=!0},f=()=>{t=!1},m=()=>P_.isFocused()&&(e.networkMode==="always"||Mc.isOnline())&&e.canRun(),y=()=>q_(e.networkMode)&&e.canRun(),g=w=>{c()||(s?.(),o.resolve(w))},b=w=>{c()||(s?.(),o.reject(w))},_=()=>new Promise(w=>{s=A=>{(c()||m())&&w(A)},e.onPause?.()}).then(()=>{s=void 0,c()||e.onContinue?.()}),S=()=>
40{if(c())return;let w;const A=r===0?e.initialPromise:void 0;try{w=A??e.fn()}catch(T){w=Promise.reject(T)}Promise.resolve(w).then(g).catch(T=>{if(c())return;const k=e.retry??(H_.isServer()?0:3),x=e.retryDelay??q2,z=typeof x=="function"?x(r,T):x,F=k===!0||typeof k=="number"&&r<k||typeof k=="function"&&k(r,T);if(t||!F){b(T);return}r++,e.onFail?.(r,T),D2(z).then(()=>m()?void 0:_()).then(()=>{t?b(T):S()})})};return{promise:o,status:()=>o.status,cancel:u,continue:()=>(s?.(),o),cancelRetry:d,continueRetry:f,canStart:y,start:()=>(y()?S():_().then(S),o)}}var G_=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),x2(this.gcTime)&&(this.#e=sf.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(H_.isServer()?1/0:300*1e3))}clearGcTimeout(){this.#e!==void 0&&(sf.clearTimeout(this.#e),this.#e=void 0)}},V2=class extends G_{#e;#n;#t;#i;#r;#s;#a;constructor(e){super(),this.#a=!1,this.#s=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#i=e.client,this.#t=this.#i.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=S0(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.#s,...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const t=S0(this.options);t.data!==void 0&&(this.setState(w0(t.data,t.dataUpdatedAt)),this.#e=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#t.remove(this)}setData(e,t){const r=L2(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(_n).catch(_n):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=>N2(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Cf||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>af(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:!j2(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.#a||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 d=this.observers.find(f=>f.options.queryFn);d&&this.setOptions(d.options)}const r=new AbortController,s=d=>{Object.defineProperty(d,"signal",{enumerable:!0,get:()=>(this.#a=!0,r.signal)})},o=()=>{const d=$_(this.options,t),m=(()=>{const y={client:this.#i,queryKey:this.queryKey,meta:this.meta};return s(y),y})();return this.#a=!1,this.options.persister?this.options.persister(d,m,this):d(m)},u=(()=>{const d={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:o};return s(d),d})();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=V_({initialPromise:t?.initialPromise,fn:u.fetchFn,onCancel:d=>{d instanceof lf&&d.revert&&this.setState({...this.#n,fetchStatus:"idle"}),r.abort()},onFail:(d,f)=>{this.#o({type:"failed",failureCount:d,error:f})},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 d=await this.#r.start();if(d===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(d),this.#t.config.onSuccess?.(d,this),this.#t.config.onSettled?.(d,this.state.error,this),d}catch(d){if(d instanceof lf){if(d.silent)return this.#r.promise;if(d.revert){if(this.state.data===void 0)throw d;return this.state.data}}throw this.#o({type:"error",error:d}),this.#t.config.onError?.(d,this),this.#t.config.onSettled?.(this.state.data,d,this),d}finally{this.scheduleGc()}}#o(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,...G2(r.data,this.options),fetchMeta:e.meta??null};case"success":const s={...r,...w0(e.data,e.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#n=e.manual?s:void 0,s;case"error":const o=e.error;
40return{...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),Ct.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),this.#t.notify({query:this,type:"updated",action:e})})}};function G2(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:q_(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function w0(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function S0(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,r=t!==void 0,s=r?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?s??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}function E0(e){return{onFetch:(t,r)=>{const s=t.options,o=t.fetchOptions?.meta?.fetchMore?.direction,c=t.state.data?.pages||[],u=t.state.data?.pageParams||[];let d={pages:[],pageParams:[]},f=0;const m=async()=>{let y=!1;const g=S=>{I2(S,()=>t.signal,()=>y=!0)},b=$_(t.options,t.fetchOptions),_=async(S,w,A)=>{if(y)return Promise.reject();if(w==null&&S.pages.length)return Promise.resolve(S);const k=(()=>{const U={client:t.client,queryKey:t.queryKey,pageParam:w,direction:A?"backward":"forward",meta:t.options.meta};return g(U),U})(),x=await b(k),{maxPages:z}=t.options,F=A?z2:U2;return{pages:F(S.pages,x,z),pageParams:F(S.pageParams,w,z)}};if(o&&c.length){const S=o==="backward",w=S?Y2:A0,A={pages:c,pageParams:u},T=w(s,A);d=await _(A,T,S)}else{const S=e??c.length;do{const w=f===0?u[0]??s.initialPageParam:A0(s,d);if(f>0&&w==null)break;d=await _(d,w),f++}while(f<S)}return d};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 A0(e,{pages:t,pageParams:r}){const s=t.length-1;return t.length>0?e.getNextPageParam(t[s],t,r[s],r):void 0}function Y2(e,{pages:t,pageParams:r}){return t.length>0?e.getPreviousPageParam?.(t[0],t,r[0],r):void 0}var F2=class extends G_{#e;#n;#t;#i;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#t=e.mutationCache,this.#n=[],this.state=e.state||K2(),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.#i?.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.#i=V_({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 s=this.state.status==="pending",o=!this.#i.canStart();try{if(s)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.#i.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};
40case"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),Ct.batch(()=>{this.#n.forEach(r=>{r.onMutationUpdate(e)}),this.#t.notify({mutation:this,type:"updated",action:e})})}};function K2(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var J2=class extends Qc{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 s=new F2({client:e,mutationCache:this,mutationId:++this.#t,options:e.defaultMutationOptions(t),state:r});return this.add(s),s}add(e){this.#e.add(e);const t=ic(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=ic(e);if(typeof t=="string"){const r=this.#n.get(t);if(r)if(r.length>1){const s=r.indexOf(e);s!==-1&&r.splice(s,1)}else r[0]===e&&this.#n.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=ic(e);if(typeof t=="string"){const s=this.#n.get(t)?.find(o=>o.state.status==="pending");return!s||s===e}else return!0}runNext(e){const t=ic(e);return typeof t=="string"?this.#n.get(t)?.find(s=>s!==e&&s.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){Ct.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=>v0(t,r))}findAll(e={}){return this.getAll().filter(t=>v0(e,t))}notify(e){Ct.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>
40t.state.isPaused);return Ct.batch(()=>Promise.all(e.map(t=>t.continue().catch(_n))))}};function ic(e){return e.options.scope?.id}var Q2=class extends Qc{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,r){const s=t.queryKey,o=t.queryHash??Of(s,t);let c=this.get(o);return c||(c=new V2({client:e,queryKey:s,queryHash:o,options:e.defaultQueryOptions(t),state:r,defaultOptions:e.getQueryDefaults(s)}),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(){Ct.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=>y0(t,r))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(r=>y0(e,r)):t}notify(e){Ct.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){Ct.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Ct.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},X2=class{#e;#n;#t;#i;#r;#s;#a;#l;constructor(e={}){this.#e=e.queryCache||new Q2,this.#n=e.mutationCache||new J2,this.#t=e.defaultOptions||{},this.#i=new Map,this.#r=new Map,this.#s=0}mount(){this.#s++,this.#s===1&&(this.#a=P_.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#l=Mc.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#s--,this.#s===0&&(this.#a?.(),this.#a=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),s=r.state.data;return s===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(af(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(s))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:t,state:r})=>{const s=r.data;return[t,s]})}setQueryData(e,t,r){const s=this.defaultQueryOptions({queryKey:e}),c=this.#e.get(s.queryHash)?.state.data,u=k2(t,c);if(u!==void 0)return this.#e.build(this,s).setData(u,{...r,manual:!0})}setQueriesData(e,t,r){return Ct.batch(()=>this.#e.findAll(e).map(({queryKey:s})=>[s,this.setQueryData(s,t,r)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){const t=this.#e;Ct.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=this.#e;return Ct.batch(()=>(r.findAll(e).forEach(s=>{s.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},s=Ct.batch(()=>this.#e.findAll(e).map(o=>o.cancel(r)));return Promise.all(s).then(_n).catch(_n)}invalidateQueries(e,t={}){return Ct.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},s=Ct.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(_n)),o.state.fetchStatus==="paused"?Promise.resolve():c}));return Promise.all(s).then(_n)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=this.#e.build(this,t);return r.isStaleByTime(af(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(_n).catch(_n)}fetchInfiniteQuery(e){return e.behavior=E0(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(_n).catch(_n)}ensureInfiniteQueryData(e){return e.behavior=E0(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Mc.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.#i.set(_o(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#i.values()],r={};return t.forEach(s=>{wo(e,s.queryKey)&&Object.assign(r,s.defaultOptions)}),r}setMutationDefaults(e,t){this.#r.set(_o(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#r.values()],r={};return t.forEach(s=>{wo(e,s.mutationKey)&&Object.assign(r,s.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=Of(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===Cf&&(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()}},Y_=se.createContext(void 0),CD=e=>{const t=se.useContext(Y_);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Z2=({client:e,children:t})=>(se.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),$.jsx(Y_.Provider,{value:e,children:t}));const W2="/assets/styles-Cb2B9ulb.css";function ej(e,t={}){typeof window>"u"||window.__lovableEvents?.captureException?.(e,{source:"react_error_boundary",route:window.location.pathname,...t},{mechanism:"react_error_boundary",handled:!1,severity:"error"})}const tj="modulepreload",nj=function(e){return"/"+e},T0={}
40,Oe=function(t,r,s){let o=Promise.resolve();if(r&&r.length>0){let f=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]"),d=u?.nonce||u?.getAttribute("nonce");o=f(r.map(m=>{if(m=nj(m),m in T0)return;T0[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":tj,y||(b.as="script"),b.crossOrigin="",b.href=m,d&&b.setAttribute("nonce",d),document.head.appendChild(b),y)return new Promise((_,S)=>{b.addEventListener("load",_),b.addEventListener("error",()=>S(new Error(`Unable to preload CSS for ${m}`)))})}))}function c(u){const d=new Event("vite:preloadError",{cancelable:!0});if(d.payload=u,window.dispatchEvent(d),!d.defaultPrevented)throw u}return o.then(u=>{for(const d of u||[])d.status==="rejected"&&c(d.reason);return t().catch(c)})},_r=Wr({type:"function"}),rj=dn({method:"GET"}).middleware([_r]).handler(Un("1d4091154310717179a937420695e825f04549b6da31d12d0fa57d1ea821e7d8")),kD=dn({method:"GET"}).middleware([_r]).handler(Un("6fdb2805caddef9bcb9d01762abc1f335147be26b84c79f1d5d8cae209cf357a")),xD=dn({method:"POST"}).middleware([_r]).handler(Un("20536e62054e42f8df9296c084b65577ce3eb1b32672c015231901b04da50911")),jD=dn({method:"POST"}).middleware([_r]).handler(Un("71793388d65c51c1aeae7c109c165f9ceb5d8f89b81f37cbd68d85a566759191")),ND=dn({method:"POST"}).middleware([_r]).handler(Un("45cb5856593c3c430875a3c2963032185e35a5256fad42543c9b5189e787addd")),MD=dn({method:"POST"}).middleware([_r]).handler(Un("c5aaf12037eaa5aaacd27dfcc7da7dfc7a80e8bf2b0739e51fda52aabdf70338")),DD=dn({method:"POST"}).middleware([_r]).handler(Un("8d37bddedc110502367c45530f4496d0a70cf129bed2203eab877fde0cd92b14")),ij=dn({method:"POST"}).middleware([_r]).handler(Un("87d0462de7edaa3c1b73692278a7dd6ae701345998869bcfb6fc680907b77f90")),sj=dn({method:"POST"}).middleware([_r]).handler(Un("aaf643bce39fb1e292e6117cc9c3b94d5a4d65d040b2024993db201d9c0bd10c")),F_="mysia_self_key",R0="mysia_self_app";function K_(){if(!(typeof document>"u")){try{window.MYSIA?.destroy?.()}catch{}document.querySelectorAll('script[data-mysia-self="1"]').forEach(e=>e.remove()),document.querySelectorAll("[data-mysia-widget-root]").forEach(e=>e.remove()),document.getElementById("mysia-rec-pill")?.remove()}}function J_(e){try{localStorage.setItem(F_,e)}catch{}}function aj(e){if(document.querySelector('script[data-mysia-self="1"]'))return;const r=document.createElement("script");r.src="/api/public/widget.js",r.async=!0,r.setAttribute("data-key",e),r.setAttribute("data-mysia-self","1"),document.body.appendChild(r)}async function oj(){let e=[];try{e=((await rj()).apps??[]).map(s=>({id:s.id,name:s.name}))}catch{return}let t="";try{t=localStorage.getItem(R0)??""}catch{}window.MYSIA?.configure?.({apps:e,currentAppId:t,onSelect:async r=>{const s=await sj({data:{id:r,host:window.location.host}});J_(s.apiKey);try{localStorage.setItem(R0,s.appId)}catch{}return{apiKey:s.apiKey}}})}function lj(){return se.useEffect(()=>{if(typeof window>"u")return;let e=!1;return(async()=>{let t=null;try{t=localStorage.getItem(F_)}catch{}const{data:r}=await zi.auth.getUser();if(e)return;if(r.user)try{const{getProductScope:o}=await Oe(async()=>{const{getProductScope:u}=await import("./recorder.functions-n8lqy8nm.js");return{getProductScope:u}},[]),c=await o();if(e||c.scope==="recorder")return}catch{}if(!t){if(!r.user)return;try{t=(await ij({data:{host:window.location.host}})).apiKey,J_(t)}
40catch{return}}if(e||!t)return;const s=()=>{e||oj()};window.addEventListener("mysia:ready",s,{once:!0}),aj(t),window.MYSIA?.configure&&s()})(),()=>{e=!0,K_()}},[]),null}function cj(){return $.jsx("div",{className:"flex min-h-screen items-center justify-center bg-background px-4",children:$.jsxs("div",{className:"max-w-md text-center",children:[$.jsx("h1",{className:"text-7xl font-bold text-foreground",children:"404"}),$.jsx("h2",{className:"mt-4 text-xl font-semibold text-foreground",children:"Page not found"}),$.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:"The page you're looking for doesn't exist or has been moved."}),$.jsx("div",{className:"mt-6",children:$.jsx(Nn,{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 uj({error:e,reset:t}){console.error(e);const r=Tt();return se.useEffect(()=>{ej(e,{boundary:"tanstack_root_error_component"})},[e]),$.jsx("div",{className:"flex min-h-screen items-center justify-center bg-background px-4",children:$.jsxs("div",{className:"max-w-md text-center",children:[$.jsx("h1",{className:"text-xl font-semibold tracking-tight text-foreground",children:"This page didn't load"}),$.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:"Something went wrong on our end. You can try refreshing or head back home."}),$.jsxs("div",{className:"mt-6 flex flex-wrap justify-center gap-2",children:[$.jsx("button",{onClick:()=>{r.invalidate(),t()},className:"inline-flex items-center justify-center rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground transition-colors hover:bg-primary/90",children:"Try again"}),$.jsx("a",{href:"/",className:"inline-flex items-center justify-center rounded-md border border-input bg-background px-4 py-2 text-sm font-medium text-foreground transition-colors hover:bg-accent",children:"Go home"})]})]})})}const Ve=IO()({head:()=>({meta:[{charSet:"utf-8"},{name:"viewport",content:"width=device-width, initial-scale=1"},{title:"MYSIA"},{name:"description",content:"MYSIA embeds contextual AI tutorials inside any web app with one script tag."},{name:"author",content:"MYSIA"},{property:"og:title",content:"MYSIA"},{property:"og:description",content:"MYSIA embeds contextual AI tutorials inside any web app with one script tag."},{property:"og:type",content:"website"},{name:"twitter:card",content:"summary"},{name:"twitter:site",content:"@MYSIA"},{name:"twitter:title",content:"MYSIA"},{name:"twitter:description",content:"MYSIA embeds contextual AI tutorials inside any web app with one script tag."},{property:"og:image",content:"https://getmysia.com/getmysia-og.jpg"},{name:"twitter:image",content:"https://getmysia.com/getmysia-og.jpg"}],links:[{rel:"stylesheet",href:W2},{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=Space+Grotesk:wght@400;500;600;700&family=DM+Sans:opsz,[email protected],400;9..40,500;9..40,600&family=IBM+Plex+Mono:wght@400;500&display=swap"},{rel:"icon",type:"image/png",href:"/favicon.png"}]}),shellComponent:dj,component:hj,notFoundComponent:cj,errorComponent:uj});function dj({children:e}){return $.jsxs("html",{lang:"en",children:[$.jsx("head",{children:$.jsx(rC,{})}),$.jsxs("body",{children:[e,$.jsx(iC,{})]})]})}function hj(){const{queryClient:e}=Ve.useRouteContext(),t=WO({select:c=>c.location}),r=t.pathname,s=t.search?.product,o=r==="/recorder"||r.startsWith("/recorder/")||r.startsWith("/extension")||s==="recorder";return se.useEffect(()=>{o&&K_()},[o,r]),$.jsxs(Z2,{client:e,children:[$.jsx(l_,{}),!o&&$.jsx(lj,{})]})}const fj=()=>Oe(()=>import("./index-D-Py775U.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8])),pj=Ue()({head:()=>({meta:[{title:"MYSIA â Join the waitlist for AI tutorials in your app"},{name:"description",content:"MYSIA embeds contextual AI tutorials in your product with one script tag, and turns recorded workflows into finished help center articles. Join the waitlist."},{property:"og:title",content:"MYSIA â Join the waitlist"},{property:"og:description",content:"Embedded AI tutorials for any web app, plus help center articles generated from real recordings. Join the waitlist."},{property:"og:url",content:"https://getmysia.com/"},{property:"og:type",content:"website"},{name:"twitter:card",content:"summary_large_image"}],links:[{rel:"canonical",href:"https://getmysia.com/"}],scripts:[{type:"application/ld+json",children:JSON.stringify({"@context":"https://schema.org","@type":"SoftwareApplication",name:"MYSIA",applicationCategory:"BusinessApplication",operatingSystem:"Web",description:"Embed contextual AI tutorials inside any web app with a single script tag."})}]}),component:Ne(fj,"component")}),mj=()=>Oe(()=>import("./dashboard-B048tn2t.js"),__vite__mapDeps([9,2,10,1,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,6,30,31,32,33,34,35,36,37,38,8,7,39])),gj=Ue()({head:()=>({meta:[{title:"Dashboard â MYSIA"},{name:"description",content:"Manage MYSIA apps, tutorials, help-center drafts, and usage metrics."},{property:"og:title",content:"Dashboard â MYSIA"},{property:"og:description",content:"Manage MYSIA apps, tutorials, help-center drafts, and usage metrics."},{property:"og:type",content:"website"},{name:"twitter:card",content:"summary"}]}
40),component:Ne(mj,"component")}),yj=()=>Oe(()=>import("./demo-host-DB1NnP2a.js"),__vite__mapDeps([40,39,41,37,36,16,38,42,6,31,33])),vj=Ue()({head:()=>({meta:[{title:"Demo host â test the MYSIA widget"},{name:"description",content:"Paste your API key to test the embeddable MYSIA widget on a realistic mock SaaS app."}]}),component:Ne(yj,"component")}),bj=()=>Oe(()=>import("./docs-B4pWbs1V.js"),__vite__mapDeps([43,3])),_j=Ue()({head:()=>({meta:[{title:"Documentation â MYSIA"},{name:"description",content:"How to install and customize MYSIA in any web app."},{property:"og:title",content:"MYSIA Documentation"},{property:"og:description",content:"Install and customize MYSIA in any web app."},{property:"og:url",content:"https://getmysia.com/docs"}],links:[{rel:"canonical",href:"https://getmysia.com/docs"}]}),component:Ne(bj,"component")}),wj=()=>Oe(()=>import("./extension-CvSw7qah.js"),__vite__mapDeps([44,20,23,45,46,47,41])),Sj=Ue()({component:Ne(wj,"component"),head:()=>({meta:[{title:"MYSIA Recorder â Chrome extension"},{name:"description",content:"Record any web page and turn it into a MYSIA help center article with AI."},{property:"og:title",content:"MYSIA Recorder â Chrome extension"},{property:"og:description",content:"Record any web page and turn it into a MYSIA help center article with AI."},{property:"og:type",content:"website"},{name:"twitter:card",content:"summary_large_image"}]})}),Ej=()=>Oe(()=>import("./help-center-CpHI_-41.js"),__vite__mapDeps([48,2,10,1,11,12,20,23,24,25,27,19,28,21,29,6,17,18,22,45,32,38,8,37,42])),Aj=Ue()({head:()=>({meta:[{title:"Help Center â MYSIA"},{name:"description",content:"Create, edit, publish, and manage AI-generated help-center articles in MYSIA."},{property:"og:title",content:"Help Center â MYSIA"},{property:"og:description",content:"Manage MYSIA help-center articles and workflow recordings."},{property:"og:type",content:"website"},{name:"twitter:card",content:"summary"}]}),component:Ne(Ej,"component")});function Q_(e){var t,r,s="";if(typeof e=="string"||typeof e=="number")s+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(r=Q_(e[t]))&&(s&&(s+=" "),s+=r)}else for(r in e)e[r]&&(s&&(s+=" "),s+=r);return s}function Tj(){for(var e,t,r=0,s="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=Q_(e))&&(s&&(s+=" "),s+=t);return s}const Rj=(e,t)=>{const r=new Array(e.length+t.length);for(let s=0;s<e.length;s++)r[s]=e[s];for(let s=0;s<t.length;s++)r[e.length+s]=t[s];return r},Oj=(e,t)=>({classGroupId:e,validator:t}),X_=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),Dc="-",O0=[],Cj="arbitrary..",kj=e=>{const t=jj(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:s}=e;return{getClassGroupId:u=>{if(u.startsWith("[")&&u.endsWith("]"))return xj(u);const d=u.split(Dc),f=d[0]===""&&d.length>1?1:0;return Z_(d,f,t)},getConflictingClassGroupIds:(u,d)=>{if(d){const f=s[u],m=r[u];return f?m?Rj(m,f):f:m||O0}return r[u]||O0}}},Z_=(e,t,r)=>{if(e.length-t===0)return r.classGroupId;const o=e[t],c=r.nextPart.get(o);if(c){const m=Z_(e,t+1,c);if(m)return m}const u=r.validators;if(u===null)return;const d=t===0?e.join(Dc):e.slice(t).join(Dc),f=u.length;for(let m=0;m<f;m++){const y=u[m];if(y.validator(d))return y.classGroupId}},xj=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),r=t.indexOf(":"),s=t.slice(0,r);return s?Cj+s:void 0})(),jj=e=>{const{theme:t,classGroups:r}=e;return Nj(r,t)},Nj=(e,t)=>{const r=X_();for(const s in e){const o=e[s];kf(o,r,s,t)}return r},kf=(e,t,r,s)=>{const o=e.length;for(let c=0;c<o;c++){const u=e[c];Mj(u,t,r,s)}},Mj=(e,t,r,s)=>{if(typeof e=="string"){Dj(e,t,r);return}if(typeof e=="function"){Lj(e,t,r,s);return}Uj(e,t,r,s)},Dj=(e,t,r)=>{const s=e===""?t:W_(t,e);s.classGroupId=r},Lj=(e,t,r,s)=>{if(zj(e)){kf(e(s),t,r,s);return}t.validators===null&&(t.validators=[]),t.validators.push(Oj(r,e))},Uj=(e,t,r,s)=>{const o=Object.entries(e),c=o.length;for(let u=0;u<c;u++){const[d,f]=o[u];kf(f,W_(t,d),r,s)}},W_=(e,t)=>{let r=e;const s=t.split(Dc),o=s.length;for(let c=0;c<o;c++){const u=s[c];let d=r.nextPart.get(u);d||(d=X_(),r.nextPart.set(u,d)),r=d}return r},zj=e=>
vendor: 6,543 bytes, line 40
40"isThemeGetter"in e&&e.isThemeGetter===!0,Ij=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=Object.create(null),s=Object.create(null);const o=(c,u)=>{r[c]=u,t++,t>e&&(t=0,s=r,r=Object.create(null))};return{get(c){let u=r[c];if(u!==void 0)return u;if((u=s[c])!==void 0)return o(c,u),u},set(c,u){c in r?r[c]=u:o(c,u)}}},cf="!",C0=":",Pj=[],k0=(e,t,r,s,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:s,isExternal:o}),Bj=e=>{const{prefix:t,experimentalParseClassName:r}=e;let s=o=>{const c=[];let u=0,d=0,f=0,m;const y=o.length;for(let w=0;w<y;w++){const A=o[w];if(u===0&&d===0){if(A===C0){c.push(o.slice(f,w)),f=w+1;continue}if(A==="/"){m=w;continue}}A==="["?u++:A==="]"?u--:A==="("?d++:A===")"&&d--}const g=c.length===0?o:o.slice(f);let b=g,_=!1;g.endsWith(cf)?(b=g.slice(0,-1),_=!0):g.startsWith(cf)&&(b=g.slice(1),_=!0);const S=m&&m>f?m-f:void 0;return k0(c,_,b,S)};if(t){const o=t+C0,c=s;s=u=>u.startsWith(o)?c(u.slice(o.length)):k0(Pj,!1,u,void 0,!0)}if(r){const o=s;s=c=>r({className:c,parseClassName:o})}return s},$j=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((r,s)=>{t.set(r,1e6+s)}),r=>{const s=[];let o=[];for(let c=0;c<r.length;c++){const u=r[c],d=u[0]==="[",f=t.has(u);d||f?(o.length>0&&(o.sort(),s.push(...o),o=[]),s.push(u)):o.push(u)}return o.length>0&&(o.sort(),s.push(...o)),s}},Hj=e=>({cache:Ij(e.cacheSize),parseClassName:Bj(e),sortModifiers:$j(e),...kj(e)}),qj=/\s+/,Vj=(e,t)=>{const{parseClassName:r,getClassGroupId:s,getConflictingClassGroupIds:o,sortModifiers:c}=t,u=[],d=e.trim().split(qj);let f="";for(let m=d.length-1;m>=0;m-=1){const y=d[m],{isExternal:g,modifiers:b,hasImportantModifier:_,baseClassName:S,maybePostfixModifierPosition:w}=r(y);if(g){f=y+(f.length>0?" "+f:f);continue}let A=!!w,T=s(A?S.substring(0,w):S);if(!T){if(!A){f=y+(f.length>0?" "+f:f);continue}if(T=s(S),!T){f=y+(f.length>0?" "+f:f);continue}A=!1}const k=b.length===0?"":b.length===1?b[0]:c(b).join(":"),x=_?k+cf:k,z=x+T;if(u.indexOf(z)>-1)continue;u.push(z);const F=o(T,A);for(let U=0;U<F.length;++U){const N=F[U];u.push(x+N)}f=y+(f.length>0?" "+f:f)}return f},Gj=(...e)=>{let t=0,r,s,o="";for(;t<e.length;)(r=e[t++])&&(s=ew(r))&&(o&&(o+=" "),o+=s);return o},ew=e=>{if(typeof e=="string")return e;let t,r="";for(let s=0;s<e.length;s++)e[s]&&(t=ew(e[s]))&&(r&&(r+=" "),r+=t);return r},Yj=(e,...t)=>{let r,s,o,c;const u=f=>{const m=t.reduce((y,g)=>g(y),e());return r=Hj(m),s=r.cache.get,o=r.cache.set,c=d,d(f)},d=f=>{const m=s(f);if(m)return m;const y=Vj(f,r);return o(f,y),y};return c=u,(...f)=>c(Gj(...f))},Fj=[],ut=e=>{const t=r=>r[e]||Fj;return t.isThemeGetter=!0,t},tw=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,nw=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Kj=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Jj=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Qj=/\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$/,Xj=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Zj=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Wj=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Fr=e=>Kj.test(e),_e=e=>!!e&&!Number.isNaN(Number(e)),Kr=e=>!!e&&Number.isInteger(Number(e)),Mh=e=>e.endsWith("%")&&_e(e.slice(0,-1)),or=e=>Jj.test(e),rw=()=>!0,eN=e=>Qj.test(e)&&!Xj.test(e),xf=()=>!1,tN=e=>Zj.test(e),nN=e=>Wj.test(e),rN=e=>!ne(e)&&!ie(e),iN=e=>ai(e,aw,xf),ne=e=>tw.test(e),ki=e=>ai(e,ow,eN),x0=e=>ai(e,hN,_e),sN=e=>ai(e,cw,rw),aN=e=>ai(e,lw,xf),j0=e=>ai(e,iw,xf),oN=e=>ai(e,sw,nN),sc=e=>ai(e,uw,tN),ie=e=>nw.test(e),Qa=e=>Bi(e,ow),lN=e=>Bi(e,lw),N0=e=>Bi(e,iw),cN=e=>Bi(e,aw),uN=e=>Bi(e,sw),ac=e=>Bi(e,uw,!0),dN=e=>Bi(e,cw,!0),ai=(e,t,r)=>{const s=tw.exec(e);return s?s[1]?t(s[1]):r(s[2]):!1},Bi=(e,t,r=!1)=>{const s=nw.exec(e);return s?s[1]?t(s[1]):r:!1},iw=e=>e==="position"||e==="percentage",sw=e=>e==="image"||e==="url",aw=e=>e==="length"||e==="size"||e==="bg-size",ow=e=>e==="length",hN=e=>e==="number",lw=e=>e==="family-name",cw=e=>e==="number"||e==="weight",uw=e=>e==="shadow",fN=()=>{const e=ut("color"),t=ut("font"),r=ut("text"),s=ut("font-weight"),o=ut("tracking"),c=ut("leading"),u=ut("breakpoint"),d=ut("container"),f=ut("spacing"),m=ut("radius"),y=ut("shadow"),g=ut("inset-shadow"),b=ut("text-shadow"),_=ut("drop-shadow"),S=ut("blur"),w=ut("perspective"),A=ut("aspect"),T=ut("ease"),k=ut("animate"),x=()=>["auto","avoid","all","avoid-page","page","left","right","column"],z=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],F=()=>[...z(),ie,ne],U=()=>["auto","hidden","clip","visible","scroll"],N=()=>["auto","contain","none"],I=()=>[ie,ne,f],K=()=>[Fr,"full","auto",...I()],ue=()=>[Kr,"none","subgrid",ie,ne],G=()=>["auto",{span:["full",Kr,ie,ne]},Kr,ie,ne],J=()=>[Kr,"auto",ie,ne],ae=()=>["auto","min","max","fr",ie,ne],ze=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],me=()=>["start","end","center","stretch","center-safe","end-safe"],P=()=>["auto",...I()],Q=()=>[Fr,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...I()],he=()=>[Fr,"screen","full","dvw","lvw","svw","min","max","fit",...I()],Ce=()=>[Fr,"screen","full","lh","dvh","lvh","svh","min","max","fit",...I()],X=()=>[e,ie,ne],C=()=>[...z(),N0,j0,{position:[ie,ne]}],V=()=>["no-repeat",{repeat:["","x","y","space","round"]}],Z=()=>["auto","cover","contain",cN,iN,{size:[ie,ne]}],ee=()=>[Mh,Qa,ki],oe=()=>["","none","full",m,ie,ne],ce=()=>["",_e,Qa,ki],we=()=>["solid","dashed","dotted","double"],et=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ge=()=>[_e,Mh,N0,j0],Xt=()=>["","none",S,ie,ne],kt=()=>["none",_e,ie,ne],Pt=()=>["none",_e,ie,ne],In=()=>[_e,ie,ne],Rt=()=>[Fr,"full",...I()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[or],breakpoint:[or],color:[rw],container:[or],"drop-shadow":[or],ease:["in","out","in-out"],font:[rN],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[or],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[or],shadow:[or],spacing:["px",_e],text:[or],"text-shadow":[or],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Fr,ne,ie,A]}
vendor: 6,111 bytes, line 40
40],container:["container"],columns:[{columns:[_e,ne,ie,d]}],"break-after":[{"break-after":x()}],"break-before":[{"break-before":x()}],"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:F()}],overflow:[{overflow:U()}],"overflow-x":[{"overflow-x":U()}],"overflow-y":[{"overflow-y":U()}],overscroll:[{overscroll:N()}],"overscroll-x":[{"overscroll-x":N()}],"overscroll-y":[{"overscroll-y":N()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:K()}],"inset-x":[{"inset-x":K()}],"inset-y":[{"inset-y":K()}],start:[{"inset-s":K(),start:K()}],end:[{"inset-e":K(),end:K()}],"inset-bs":[{"inset-bs":K()}],"inset-be":[{"inset-be":K()}],top:[{top:K()}],right:[{right:K()}],bottom:[{bottom:K()}],left:[{left:K()}],visibility:["visible","invisible","collapse"],z:[{z:[Kr,"auto",ie,ne]}],basis:[{basis:[Fr,"full","auto",d,...I()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[_e,Fr,"auto","initial","none",ne]}],grow:[{grow:["",_e,ie,ne]}],shrink:[{shrink:["",_e,ie,ne]}],order:[{order:[Kr,"first","last","none",ie,ne]}],"grid-cols":[{"grid-cols":ue()}],"col-start-end":[{col:G()}],"col-start":[{"col-start":J()}],"col-end":[{"col-end":J()}],"grid-rows":[{"grid-rows":ue()}],"row-start-end":[{row:G()}],"row-start":[{"row-start":J()}],"row-end":[{"row-end":J()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":ae()}],"auto-rows":[{"auto-rows":ae()}],gap:[{gap:I()}],"gap-x":[{"gap-x":I()}],"gap-y":[{"gap-y":I()}],"justify-content":[{justify:[...ze(),"normal"]}],"justify-items":[{"justify-items":[...me(),"normal"]}],"justify-self":[{"justify-self":["auto",...me()]}],"align-content":[{content:["normal",...ze()]}],"align-items":[{items:[...me(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...me(),{baseline:["","last"]}]}],"place-content":[{"place-content":ze()}],"place-items":[{"place-items":[...me(),"baseline"]}],"place-self":[{"place-self":["auto",...me()]}],p:[{p:I()}],px:[{px:I()}],py:[{py:I()}],ps:[{ps:I()}],pe:[{pe:I()}],pbs:[{pbs:I()}],pbe:[{pbe:I()}],pt:[{pt:I()}],pr:[{pr:I()}],pb:[{pb:I()}],pl:[{pl:I()}],m:[{m:P()}],mx:[{mx:P()}],my:[{my:P()}],ms:[{ms:P()}],me:[{me:P()}],mbs:[{mbs:P()}],mbe:[{mbe:P()}],mt:[{mt:P()}],mr:[{mr:P()}],mb:[{mb:P()}],ml:[{ml:P()}],"space-x":[{"space-x":I()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":I()}],"space-y-reverse":["space-y-reverse"],size:[{size:Q()}],"inline-size":[{inline:["auto",...he()]}],"min-inline-size":[{"min-inline":["auto",...he()]}],"max-inline-size":[{"max-inline":["none",...he()]}],"block-size":[{block:["auto",...Ce()]}],"min-block-size":[{"min-block":["auto",...Ce()]}],"max-block-size":[{"max-block":["none",...Ce()]}],w:[{w:[d,"screen",...Q()]}],"min-w":[{"min-w":[d,"screen","none",...Q()]}],"max-w":[{"max-w":[d,"screen","none","prose",{screen:[u]},...Q()]}],h:[{h:["screen","lh",...Q()]}],"min-h":[{"min-h":["screen","lh","none",...Q()]}],"max-h":[{"max-h":["screen","lh",...Q()]}],"font-size":[{text:["base",r,Qa,ki]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[s,dN,sN]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Mh,ne]}],"font-family":[{font:[lN,aN,t]}],"font-features":[{"font-features":[ne]}],"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,ie,ne]}],"line-clamp":[{"line-clamp":[_e,"none",ie,x0]}],leading:[{leading:[c,...I()]}],"list-image":[{"list-image":["none",ie,ne]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ie,ne]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:X()}],"text-color":[{text:X()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...we(),"wavy"]}],"text-decoration-thickness":[{decoration:[_e,"from-font","auto",ie,ki]}],"text-decoration-color":[{decoration:X()}],"underline-offset":[{"underline-offset":[_e,"auto",ie,ne]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:I()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ie,ne]}],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",ie,ne]}],"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:V()}],"bg-size":[{bg:Z()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Kr,ie,ne],radial:["",ie,ne],conic:[Kr,ie,ne]},uN,oN]}],"bg-color":[{bg:X()}],"gradient-from-pos":[{from:ee()}
vendor: 9,002 bytes, line 40
40],"gradient-via-pos":[{via:ee()}],"gradient-to-pos":[{to:ee()}],"gradient-from":[{from:X()}],"gradient-via":[{via:X()}],"gradient-to":[{to:X()}],rounded:[{rounded:oe()}],"rounded-s":[{"rounded-s":oe()}],"rounded-e":[{"rounded-e":oe()}],"rounded-t":[{"rounded-t":oe()}],"rounded-r":[{"rounded-r":oe()}],"rounded-b":[{"rounded-b":oe()}],"rounded-l":[{"rounded-l":oe()}],"rounded-ss":[{"rounded-ss":oe()}],"rounded-se":[{"rounded-se":oe()}],"rounded-ee":[{"rounded-ee":oe()}],"rounded-es":[{"rounded-es":oe()}],"rounded-tl":[{"rounded-tl":oe()}],"rounded-tr":[{"rounded-tr":oe()}],"rounded-br":[{"rounded-br":oe()}],"rounded-bl":[{"rounded-bl":oe()}],"border-w":[{border:ce()}],"border-w-x":[{"border-x":ce()}],"border-w-y":[{"border-y":ce()}],"border-w-s":[{"border-s":ce()}],"border-w-e":[{"border-e":ce()}],"border-w-bs":[{"border-bs":ce()}],"border-w-be":[{"border-be":ce()}],"border-w-t":[{"border-t":ce()}],"border-w-r":[{"border-r":ce()}],"border-w-b":[{"border-b":ce()}],"border-w-l":[{"border-l":ce()}],"divide-x":[{"divide-x":ce()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ce()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...we(),"hidden","none"]}],"divide-style":[{divide:[...we(),"hidden","none"]}],"border-color":[{border:X()}],"border-color-x":[{"border-x":X()}],"border-color-y":[{"border-y":X()}],"border-color-s":[{"border-s":X()}],"border-color-e":[{"border-e":X()}],"border-color-bs":[{"border-bs":X()}],"border-color-be":[{"border-be":X()}],"border-color-t":[{"border-t":X()}],"border-color-r":[{"border-r":X()}],"border-color-b":[{"border-b":X()}],"border-color-l":[{"border-l":X()}],"divide-color":[{divide:X()}],"outline-style":[{outline:[...we(),"none","hidden"]}],"outline-offset":[{"outline-offset":[_e,ie,ne]}],"outline-w":[{outline:["",_e,Qa,ki]}],"outline-color":[{outline:X()}],shadow:[{shadow:["","none",y,ac,sc]}],"shadow-color":[{shadow:X()}],"inset-shadow":[{"inset-shadow":["none",g,ac,sc]}],"inset-shadow-color":[{"inset-shadow":X()}],"ring-w":[{ring:ce()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:X()}],"ring-offset-w":[{"ring-offset":[_e,ki]}],"ring-offset-color":[{"ring-offset":X()}],"inset-ring-w":[{"inset-ring":ce()}],"inset-ring-color":[{"inset-ring":X()}],"text-shadow":[{"text-shadow":["none",b,ac,sc]}],"text-shadow-color":[{"text-shadow":X()}],opacity:[{opacity:[_e,ie,ne]}],"mix-blend":[{"mix-blend":[...et(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":et()}],"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":[_e]}],"mask-image-linear-from-pos":[{"mask-linear-from":ge()}],"mask-image-linear-to-pos":[{"mask-linear-to":ge()}],"mask-image-linear-from-color":[{"mask-linear-from":X()}],"mask-image-linear-to-color":[{"mask-linear-to":X()}],"mask-image-t-from-pos":[{"mask-t-from":ge()}],"mask-image-t-to-pos":[{"mask-t-to":ge()}],"mask-image-t-from-color":[{"mask-t-from":X()}],"mask-image-t-to-color":[{"mask-t-to":X()}],"mask-image-r-from-pos":[{"mask-r-from":ge()}],"mask-image-r-to-pos":[{"mask-r-to":ge()}],"mask-image-r-from-color":[{"mask-r-from":X()}],"mask-image-r-to-color":[{"mask-r-to":X()}],"mask-image-b-from-pos":[{"mask-b-from":ge()}],"mask-image-b-to-pos":[{"mask-b-to":ge()}],"mask-image-b-from-color":[{"mask-b-from":X()}],"mask-image-b-to-color":[{"mask-b-to":X()}],"mask-image-l-from-pos":[{"mask-l-from":ge()}],"mask-image-l-to-pos":[{"mask-l-to":ge()}],"mask-image-l-from-color":[{"mask-l-from":X()}],"mask-image-l-to-color":[{"mask-l-to":X()}],"mask-image-x-from-pos":[{"mask-x-from":ge()}],"mask-image-x-to-pos":[{"mask-x-to":ge()}],"mask-image-x-from-color":[{"mask-x-from":X()}],"mask-image-x-to-color":[{"mask-x-to":X()}],"mask-image-y-from-pos":[{"mask-y-from":ge()}],"mask-image-y-to-pos":[{"mask-y-to":ge()}],"mask-image-y-from-color":[{"mask-y-from":X()}],"mask-image-y-to-color":[{"mask-y-to":X()}],"mask-image-radial":[{"mask-radial":[ie,ne]}],"mask-image-radial-from-pos":[{"mask-radial-from":ge()}],"mask-image-radial-to-pos":[{"mask-radial-to":ge()}],"mask-image-radial-from-color":[{"mask-radial-from":X()}],"mask-image-radial-to-color":[{"mask-radial-to":X()}],"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":z()}],"mask-image-conic-pos":[{"mask-conic":[_e]}],"mask-image-conic-from-pos":[{"mask-conic-from":ge()}],"mask-image-conic-to-pos":[{"mask-conic-to":ge()}],"mask-image-conic-from-color":[{"mask-conic-from":X()}],"mask-image-conic-to-color":[{"mask-conic-to":X()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:C()}],"mask-repeat":[{mask:V()}],"mask-size":[{mask:Z()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ie,ne]}],filter:[{filter:["","none",ie,ne]}],blur:[{blur:Xt()}],brightness:[{brightness:[_e,ie,ne]}],contrast:[{contrast:[_e,ie,ne]}],"drop-shadow":[{"drop-shadow":["","none",_,ac,sc]}],"drop-shadow-color":[{"drop-shadow":X()}],grayscale:[{grayscale:["",_e,ie,ne]}],"hue-rotate":[{"hue-rotate":[_e,ie,ne]}],invert:[{invert:["",_e,ie,ne]}],saturate:[{saturate:[_e,ie,ne]}],sepia:[{sepia:["",_e,ie,ne]}],"backdrop-filter":[{"backdrop-filter":["","none",ie,ne]}],"backdrop-blur":[{"backdrop-blur":Xt()}],"backdrop-brightness":[{"backdrop-brightness":[_e,ie,ne]}],"backdrop-contrast":[{"backdrop-contrast":[_e,ie,ne]}],"backdrop-grayscale":[{"backdrop-grayscale":["",_e,ie,ne]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[_e,ie,ne]}],"backdrop-invert":[{"backdrop-invert":["",_e,ie,ne]}],"backdrop-opacity":[{"backdrop-opacity":[_e,ie,ne]}],"backdrop-saturate":[{"backdrop-saturate":[_e,ie,ne]}],"backdrop-sepia":[{"backdrop-sepia":["",_e,ie,ne]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":I()}],"border-spacing-x":[{"border-spacing-x":I()}],"border-spacing-y":[{"border-spacing-y":I()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ie,ne]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[_e,"initial",ie,ne]}],ease:[{ease:["linear","initial",T,ie,ne]}],delay:[{delay:[_e,ie,ne]}],animate:[{animate:["none",k,ie,ne]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[w,ie,ne]}],"perspective-origin":[{"perspective-origin":F()}],rotate:[{rotate:kt()}],"rotate-x":[{"rotate-x":kt()}],"rotate-y":[{"rotate-y":kt()}],"rotate-z":[{"rotate-z":kt()}],scale:[{scale:Pt()}],"scale-x":[{"scale-x":Pt()}],"scale-y":[{"scale-y":Pt()}],"scale-z":[{"scale-z":Pt()}],"scale-3d":["scale-3d"],skew:[{skew:In()}],"skew-x":[{"skew-x":In()}],"skew-y":[{"skew-y":In()}],transform:[{transform:[ie,ne,"","none","gpu","cpu"]}],"transform-origin":[{origin:F()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Rt()}],"translate-x":[{"translate-x":Rt()}],"translate-y":[{"translate-y":Rt()}],"translate-z":[{"translate-z":Rt()}],"translate-none":["translate-none"],accent:[{accent:X()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:X()}],"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",ie,ne]}],"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":I()}],"scroll-mx":[{"scroll-mx":I()}],"scroll-my":[{"scroll-my":I()}],"scroll-ms":[{"scroll-ms":I()}],"scroll-me":[{"scroll-me":I()}],"scroll-mbs":[{"scroll-mbs":I()}],"scroll-mbe":[{"scroll-mbe":I()}],"scroll-mt":[{"scroll-mt":I()}],"scroll-mr":[{"scroll-mr":I()}],"scroll-mb":[{"scroll-mb":I()}],"scroll-ml":[{"scroll-ml":I()}],"scroll-p":[{"scroll-p":I()}],"scroll-px":[{"scroll-px":I()}],"scroll-py":[{"scroll-py":I()}],"scroll-ps":[{"scroll-ps":I()}],"scroll-pe":[{"scroll-pe":I()}],"scroll-pbs":[{"scroll-pbs":I()}],"scroll-pbe":[{"scroll-pbe":I()}],"scroll-pt":[{"scroll-pt":I()}],"scroll-pr":[{"scroll-pr":I()}],"scroll-pb":[{"scroll-pb":I()}],"scroll-pl":[{"scroll-pl":I()}],"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"]}
40],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",ie,ne]}],fill:[{fill:["none",...X()]}],"stroke-w":[{stroke:[_e,Qa,ki,x0]}],stroke:[{stroke:["none",...X()]}],"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"]}},pN=Yj(fN);function dw(...e){return pN(Tj(e))}function hw({className:e}){return $.jsxs("svg",{viewBox:"-1 -1 26 26",role:"img","aria-label":"MYSIA logo",className:dw("h-9 w-9 text-[#253ceb]",e),fill:"none",stroke:"currentColor",strokeWidth:"1.1",children:[$.jsx("circle",{cx:"7",cy:"7",r:"7.07"}),$.jsx("circle",{cx:"17",cy:"7",r:"7.07"}),$.jsx("circle",{cx:"7",cy:"17",r:"7.07"}),$.jsx("circle",{cx:"17",cy:"17",r:"7.07"})]})}function mN({cta:e="waitlist",variant:t="platform"}){const[r,s]=se.useState(!1);return se.useEffect(()=>{const o=()=>s(window.scrollY>8);return o(),window.addEventListener("scroll",o,{passive:!0}),()=>window.removeEventListener("scroll",o)},[]),$.jsx("header",{className:dw("sticky top-0 z-40 border-b transition-colors duration-300",r?"border-border bg-background/85 backdrop-blur-md":"border-transparent bg-background"),children:$.jsxs("div",{className:"mx-auto flex h-16 max-w-[1200px] items-center justify-between px-6",children:[$.jsxs(Nn,{to:t==="recorder"?"/recorder":"/",className:"flex items-center gap-2.5",children:[$.jsx(hw,{className:"h-7 w-7"}),$.jsx("span",{className:"font-display text-[15px] font-semibold tracking-tight",children:t==="recorder"?"MYSIA Recorder":"MYSIA"})]}),t==="recorder"?$.jsxs("nav",{className:"flex items-center gap-1 text-sm",children:[$.jsx("a",{href:"/recorder#how",className:"hidden rounded-md px-3 py-2 text-muted-foreground transition-colors hover:text-foreground sm:block",children:"How it works"}),$.jsx("a",{href:"/recorder/guide",className:"hidden rounded-md px-3 py-2 text-muted-foreground transition-colors hover:text-foreground sm:block",children:"Setup guide"}),$.jsx("a",{href:"/recorder#pricing",className:"hidden rounded-md px-3 py-2 text-muted-foreground transition-colors hover:text-foreground sm:block",children:"Pricing"}),$.jsx(Nn,{to:"/login",search:{redirect:"/recorder/app"},className:"rounded-md px-3 py-2 text-muted-foreground transition-colors hover:text-foreground",children:"Sign in"}),$.jsx(Nn,{to:"/signup",search:{product:"recorder"}
40,className:"ml-2 rounded-full bg-foreground px-4 py-2 text-[13px] font-medium text-background transition-opacity hover:opacity-85",children:"Start free"})]}):$.jsxs("nav",{className:"flex items-center gap-1 text-sm",children:[$.jsx("a",{href:"/#recorder",className:"hidden rounded-md px-3 py-2 text-muted-foreground transition-colors hover:text-foreground sm:block",children:"Recorder"}),$.jsx(Nn,{to:"/docs",className:"hidden rounded-md px-3 py-2 text-muted-foreground transition-colors hover:text-foreground sm:block",children:"Docs"}),e==="waitlist"?$.jsx("a",{href:"/#waitlist",className:"ml-2 rounded-full bg-foreground px-4 py-2 text-[13px] font-medium text-background transition-opacity hover:opacity-85",children:"Join waitlist"}):$.jsx(Nn,{to:"/signup",className:"ml-2 rounded-full bg-foreground px-4 py-2 text-[13px] font-medium text-background transition-opacity hover:opacity-85",children:"Get started"})]})]})})}const gN=()=>Oe(()=>import("./login-DNl3Y-dF.js"),__vite__mapDeps([49,11,50,20,23,24])),yN=Ue()({head:()=>({meta:[{title:"Sign in â MYSIA"},{name:"description",content:"Sign in to manage MYSIA apps, help-center articles, and in-product tutorials."},{property:"og:title",content:"Sign in â MYSIA"},{property:"og:description",content:"Access your MYSIA dashboard and help-center drafts."},{property:"og:type",content:"website"},{name:"twitter:card",content:"summary"}]}),validateSearch:e=>({redirect:typeof e.redirect=="string"?e.redirect:void 0}),component:Ne(gN,"component")});function LD({title:e,subtitle:t,children:r}){return $.jsxs("div",{className:"min-h-screen bg-background text-foreground",children:[$.jsx(mN,{cta:"signup"}),$.jsx("main",{className:"mx-auto max-w-[1200px] px-6 pb-28",children:$.jsxs("section",{className:"mx-auto mt-16 max-w-md",children:[$.jsx("h1",{className:"font-display text-3xl font-medium tracking-tight",children:e}),$.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:t}),$.jsx("div",{className:"mt-8 rounded-xl border border-border p-6 sm:p-7",children:r})]})})]})}const vN=()=>Oe(()=>import("./onboarding-B8iO7Pm-.js"),__vite__mapDeps([51,2,10,1,11,14,20,23,24,8,6,5,41,7])),bN=Ue()({head:()=>({meta:[{title:"Get started â MYSIA"}]}),component:Ne(vN,"component")}),_N=()=>Oe(()=>import("./playground-BEn2Dxft.js"),__vite__mapDeps([52,2,1,11,20,23,25,24,27,19,28,21,29,6,8,41])),wN=Ue()({head:()=>({meta:[{title:"Playground â MYSIA"},{name:"description",content:"Try the MYSIA generator on any tool."}]}),component:Ne(_N,"component")}),SN=Ue()({beforeLoad:()=>{throw gr({to:"/"})}}),EN=()=>Oe(()=>import("./reset-password-dIbQNSqm.js"),__vite__mapDeps([53,11,20,23,24])),AN=Ue()({head:()=>({meta:[{title:"Reset your password â MYSIA"},{name:"description",content:"Choose a new password for your MYSIA account."},{property:"og:title",content:"Reset your password â MYSIA"},{property:"og:description",content:"Set a new password for your MYSIA account."},{property:"og:type",content:"website"},{name:"twitter:card",content:"summary"}]}),component:Ne(EN,"component")}),TN=()=>Oe(()=>import("./signup-D_dYA41Q.js"),__vite__mapDeps([54,11,50,20,23,24,2,30])),RN=Ue()({head:()=>({meta:[{title:"Sign up â MYSIA"}]}),validateSearch:e=>({product:e.product==="recorder"?"recorder":void 0}),component:Ne(TN,"component")}),ON=Ue()({beforeLoad:()=>{throw gr({to:"/"})}}),CN=()=>Oe(()=>import("./apps._id-DndtPNSf.js"),__vite__mapDeps([55,2,10,1,11,12,13,20,23,24,25,19,28,21,18,56,29,26,22,45,35,36,16,7,8,42])),kN=Ue()({head:()=>({meta:[{title:"App â MYSIA"},{name:"description",content:"Manage a MYSIA app, its help-center articles, widget key, and tutorial metrics."},{property:"og:title",content:"App â MYSIA"},{property:"og:description",content:"Manage a MYSIA app, its help-center articles, widget key, and tutorial metrics."},{property:"og:type",content:"website"},{name:"twitter:card",content:"summary"}]}),component:Ne(CN,"component")}),xN=()=>Oe(()=>import("./checkout.return-Blxi2o8T.js"),__vite__mapDeps([57,20,35])),jN=Ue()({validateSearch:e=>({session_id:typeof e.session_id=="string"?e.session_id:void 0}),component:Ne(xN,"component")}),NN=()=>Oe(()=>
40import("./help-center_._articleId-BWOiyImU.js"),__vite__mapDeps([58,59,2,10,1,11,12,20,23,24,25,26,18,19,21,22,8,37,32,45,47,38,41,42]));async function MN(e){if(typeof window>"u")return;const{data:t}=await zi.auth.getUser();if(!t.user)throw gr({to:"/login",search:{redirect:e},replace:!0})}const DN=Ue()({head:()=>({meta:[{title:"Edit article â MYSIA"},{name:"description",content:"Edit a MYSIA help-center article draft with recorded screenshots and precise steps."},{property:"og:title",content:"Edit article â MYSIA"},{property:"og:description",content:"Review, edit, and publish a MYSIA help-center article."},{property:"og:type",content:"website"},{name:"twitter:card",content:"summary"}]}),beforeLoad:({location:e})=>MN(e.href),component:Ne(NN,"component")}),LN=()=>Oe(()=>import("./legal.privacy-CxuyaTRO.js"),__vite__mapDeps([60,3])),UN=Ue()({head:()=>({meta:[{title:"Privacy Policy â MYSIA"},{name:"description",content:"Privacy Policy for MYSIA."}],links:[{rel:"canonical",href:"https://getmysia.com/legal/privacy"}]}),component:Ne(LN,"component")}),zN=()=>Oe(()=>import("./legal.terms-DAPrjmvW.js"),__vite__mapDeps([61,3])),IN=Ue()({head:()=>({meta:[{title:"Terms of Service â MYSIA"},{name:"description",content:"Terms of Service for MYSIA."}],links:[{rel:"canonical",href:"https://getmysia.com/legal/terms"}]}),component:Ne(zN,"component")}),UD="MYSIA.AI Recorder",zD="recorder_monthly",PN="$15 / month",BN="STARTFREE",fw=3,ID=5,pw=1e3,$N=[{q:"What does MYSIA.AI Recorder do?",a:"It turns a screen workflow into a finished help-center article. You record yourself doing the task once in Chrome; MYSIA writes a description for every click and attaches a screenshot with the target element highlighted. Documentation that normally takes half a day of writing and cropping takes a few minutes of recording."},{q:"How much time does it actually save?",a:"Writing a step-by-step guide by hand means doing the task, screenshotting each step, cropping, annotating and wording every instruction â typically 30 to 60 minutes per article. Recording the same workflow takes as long as the workflow itself, usually two to five minutes, and the draft is ready to edit. The saving repeats every time a screen changes and the guide has to be redone."},{q:"Does it make people faster at the task itself?",a:"That is the point of the highlighted screenshots. Each step names the exact control and rings it in amber, so the reader does not hunt through the interface or guess which button was meant. Tasks get completed on the first attempt instead of turning into a support ticket or a walkthrough call."},{q:"Which browsers does it work with?",a:"MYSIA.AI Recorder is a Chrome extension and works in Chrome and other Chromium browsers such as Edge, Brave and Arc. There is nothing to install on your servers and no code change in the app you are documenting."},{q:"What does it cost?",a:`Start free with ${fw} articles, then ${PN} for unlimited recordings and ${pw.toLocaleString()} recorded steps a month. No credit card is needed to start, and the code ${BN} gives you the first month free.`},{q:"Is the recorded data safe?",a:"Passwords, card numbers and one-time codes are masked in the page before anything is uploaded, so sensitive fields never leave the browser. Articles stay private until you publish them."},{q:"Can I edit the article before publishing?",a:"Yes. Every recording arrives as a draft: reword any step, delete steps you do not need, have MYSIA rewrite the whole article, or restore an earlier version from history. Then publish."},{q:"Where does the finished article live?",a:"On your own hosted help center with its own address, name, logo and colour. You can share a single article link or the whole help center, and export any article as a PDF."}],HN=()=>Oe(()=>import("./recorder.index-D47lCKc0.js"),__vite__mapDeps([62,3,4,46,34,6])),Xa="https://getmysia.com/recorder",M0="Record a workflow in Chrome and MYSIA writes the help-center article for you â every step described, every click screenshotted and highlighted. Hours of documentation become minutes, and the people following it finish the task first try.",qN=Ue()({head:()=>({meta:[{title:"MYSIA.AI Recorder â record a workflow, get the help article"},{name:"description",content:M0},{property:"og:title",content:"MYSIA.AI Recorder â record a workflow, get the help article"},{property:"og:description",content:"Cut documentation from hours to minutes: record once and get a publish-ready help article with AI-written steps and highlighted screenshots â so readers finish the task first try."},{property:"og:type",content:"website"},{property:"og:url",content:Xa}
40,{property:"og:image",content:"https://getmysia.com/recorder-og.jpg"},{name:"twitter:card",content:"summary_large_image"},{name:"twitter:title",content:"MYSIA.AI Recorder â record a workflow, get the help article"},{name:"twitter:description",content:"Cut documentation from hours to minutes: record once and get a publish-ready help article with AI-written steps and highlighted screenshots."},{name:"twitter:image",content:"https://getmysia.com/recorder-og.jpg"}],links:[{rel:"canonical",href:Xa}],scripts:[{type:"application/ld+json",children:JSON.stringify({"@context":"https://schema.org","@type":"SoftwareApplication",name:"MYSIA.AI Recorder",applicationCategory:"BusinessApplication",applicationSubCategory:"Documentation",operatingSystem:"Chrome, Edge, Brave, Arc (Chromium browsers)",url:Xa,image:"https://getmysia.com/recorder-og.jpg",description:M0,featureList:["Records any browser workflow across pages and tabs","AI-written description for every step","Screenshots with the clicked element highlighted","Passwords and card numbers redacted before upload","Editable drafts and a hosted help center"],offers:{"@type":"Offer",price:"15",priceCurrency:"USD",category:"subscription",url:Xa},publisher:{"@type":"Organization",name:"MYSIA",url:"https://getmysia.com/"}})},{type:"application/ld+json",children:JSON.stringify({"@context":"https://schema.org","@type":"BreadcrumbList",itemListElement:[{"@type":"ListItem",position:1,name:"MYSIA",item:"https://getmysia.com/"},{"@type":"ListItem",position:2,name:"Recorder",item:Xa}]})},{type:"application/ld+json",children:JSON.stringify({"@context":"https://schema.org","@type":"FAQPage",mainEntity:$N.map(e=>({"@type":"Question",name:e.q,acceptedAnswer:{"@type":"Answer",text:e.a}}))})}]}),component:Ne(HN,"component")}),So=["code","token_hash","type","access_token","refresh_token","expires_in","expires_at","provider_token","provider_refresh_token","token_type","error","error_code","error_description"];function VN(){if(typeof window>"u")return!1;const e=new URLSearchParams(window.location.search),t=new URLSearchParams(window.location.hash.replace(/^#/,""));return So.some(r=>e.has(r)||t.has(r))}function GN(){if(typeof window>"u")return;const e=new URL(window.location.href);let t=!1;for(const r of So)e.searchParams.has(r)&&(e.searchParams.delete(r),t=!0);e.hash&&So.some(r=>e.hash.includes(`${r}=`))&&(e.hash="",t=!0),t&&window.history.replaceState({},"",`${e.pathname}${e.search}${e.hash}`)}function PD(e,t="/"){if(!e)return t;try{const r=typeof window<"u"?window.location.origin:"https://getmysia.com",s=new URL(e,r);if(s.origin!==r)return t;for(const u of So)s.searchParams.delete(u);const o=So.some(u=>s.hash.includes(`${u}=`))?"":s.hash,c=`${s.pathname}${s.search}${o}`;return c.startsWith("/")&&!c.startsWith("//")?c:t}catch{return e.startsWith("/")&&!e.startsWith("//")?e:t}}function BD(e,t){if(/^\/[^?#]*$/.test(t)){e({to:t,replace:!0});return}typeof window<"u"&&window.location.replace(t)}const YN=()=>Oe(()=>import("./recorder.app-CXw0LCWG.js"),__vite__mapDeps([63,11]));async function FN(e=8e3){const{data:t}=await zi.auth.getSession();return t.session?t.session:VN()?new Promise(r=>{const s=setTimeout(()=>{o.data.subscription.unsubscribe(),r(null)},e),o=zi.auth.onAuthStateChange((c,u)=>{u&&(clearTimeout(s),o.data.subscription.unsubscribe(),r(u))})}):null}const KN=Ue()({beforeLoad:async({location:e})=>{if(typeof window>"u")return;if(!await FN())throw gr({to:"/login",search:{redirect:e.pathname},replace:!0});GN()},component:Ne(YN,"component")});const mw=(...e)=>e.filter((t,r,s)=>!!t&&t.trim()!==""&&s.indexOf(t)===r).join(" ").trim();const JN=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const QN=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,r,s)=>s?s.toUpperCase():r.toLowerCase());const D0=e=>{const t=QN(e);return t.charAt(0).toUpperCase()+t.slice(1)};var XN={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const ZN=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};const WN=se.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:s,className:o="",children:c,iconNode:u,...d},f)=>se.createElement("svg",{ref:f,...XN,width:t,height:t,stroke:e,strokeWidth:s?Number(r)*24/Number(t):r,className:mw("lucide",o),...!c&&!ZN(d)&&{"aria-hidden":"true"},...d},[...u.map(([m,y])=>
40se.createElement(m,y)),...Array.isArray(c)?c:[c]]));const Fs=(e,t)=>{const r=se.forwardRef(({className:s,...o},c)=>se.createElement(WN,{ref:c,iconNode:t,className:mw(`lucide-${JN(D0(e))}`,`lucide-${e}`,s),...o}));return r.displayName=D0(e),r};const eM=[["path",{d:"M10.88 21.94 15.46 14",key:"xkve6t"}],["path",{d:"M21.17 8H12",key:"19dcdn"}],["path",{d:"M3.95 6.06 8.54 14",key:"g8jz9m"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}]],tM=Fs("chromium",eM);const nM=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],rM=Fs("download",nM);const iM=[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]],sM=Fs("key-round",iM);const aM=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],oM=Fs("play",aM);const lM=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],cM=Fs("square",lM);const uM=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]],dM=Fs("upload",uM),hM=[{n:"01",icon:tM,title:"Create your account",body:"Sign up for the Recorder. You get a workspace with your own help center and a key that links the extension to it.",detail:["Go to Start free and sign up with email or Google.","You land in the Recorder app â this is where your recordings arrive."]},{n:"02",icon:rM,title:"Install the Chrome extension",body:"Add MYSIA.AI Recorder from the Chrome Web Store, then pin it so the icon is always visible.",detail:["Open the Chrome Web Store listing and press Add to Chrome.","Click the puzzle icon in the toolbar and pin MYSIA.AI Recorder."]},{n:"03",icon:sM,title:"Connect your key",body:"Copy the key from Settings in the Recorder app and paste it into the extension once.",detail:["In the Recorder app, open Settings and copy your workspace key.","Click the extension icon, paste the key and press Save.","Lost the key? Issue a new one in Settings â the old one stops working."]},{n:"04",icon:oM,title:"Record a workflow",body:"Open the page where the workflow starts, press Start and do the task exactly as you would explain it.",detail:["Allow access to all sites when Chrome asks â recording follows you across pages and tabs.","A small bar shows the step counter; it is hidden from every screenshot.","Click slowly and let each page finish loading before the next click."]},{n:"05",icon:cM,title:"Stop and send it to MYSIA",body:"Press Stop from any tab. The recording is uploaded and MYSIA writes a description for every step.",detail:["You are taken straight to the draft article in the Recorder app.","Every step comes with a screenshot where the clicked element is ringed in amber."]},{n:"06",icon:dM,title:"Edit and publish",body:"Fix the wording, drop steps you don't need, then publish to get a shareable page.",detail:["Use Fix the workflow to have MYSIA rewrite the whole article, and History to restore an earlier version.","Export as PDF if you need the article offline."]}],fM=[{q:"The extension says the key is invalid.",a:"The key was rotated or copied with extra spaces. Open Settings in the Recorder app, copy the key again and paste it into the extension."},{q:"Recording stopped when I changed page.",a:"Chrome needs access to all sites for that. Right-click the extension icon, choose Manage extension and set site access to On all sites."},{q:"Some steps have no screenshot.",a:"Screenshots are skipped when a tab is inactive or a page blocks capture. Re-record that part with the tab in the foreground."},{q:"How many steps can I record?",a:`Free accounts get ${fw} articles. On the paid plan you get ${pw.toLocaleString()} recorded steps a month.`}],pM=()=>Oe(()=>import("./recorder.guide-DOH7NBq6.js"),__vite__mapDeps([64,3,4,65,41])),Za="https://getmysia.com/rec
40order/guide",Dh="Set up MYSIA.AI Recorder in a few minutes: install the Chrome extension, connect your workspace key, record a workflow and publish the article. After setup, a guide that took an hour to write takes one recording â and readers finish the task first try.",mM=Ue()({head:()=>({meta:[{title:"Setup guide â MYSIA.AI Recorder"},{name:"description",content:Dh},{property:"og:title",content:"Setup guide â MYSIA.AI Recorder"},{property:"og:description",content:"Install, connect your key, record and publish your first help-center article in a few minutes â then stop writing documentation by hand."},{property:"og:type",content:"article"},{property:"og:url",content:Za},{property:"og:image",content:"https://getmysia.com/recorder-guide-og.jpg"},{name:"twitter:card",content:"summary_large_image"},{name:"twitter:title",content:"Setup guide â MYSIA.AI Recorder"},{name:"twitter:description",content:Dh},{name:"twitter:image",content:"https://getmysia.com/recorder-guide-og.jpg"}],links:[{rel:"canonical",href:Za}],scripts:[{type:"application/ld+json",children:JSON.stringify({"@context":"https://schema.org","@type":"HowTo",name:"How to set up and use MYSIA.AI Recorder",description:Dh,url:Za,image:"https://getmysia.com/recorder-guide-og.jpg",totalTime:"PT10M",tool:[{"@type":"HowToTool",name:"Google Chrome"}],step:hM.map((e,t)=>({"@type":"HowToStep",position:t+1,name:e.title,text:[e.body,...e.detail].join(" "),url:`${Za}#step-${t+1}`}))})},{type:"application/ld+json",children:JSON.stringify({"@context":"https://schema.org","@type":"FAQPage",mainEntity:fM.map(e=>({"@type":"Question",name:e.q,acceptedAnswer:{"@type":"Answer",text:e.a}}))})},{type:"application/ld+json",children:JSON.stringify({"@context":"https://schema.org","@type":"BreadcrumbList",itemListElement:[{"@type":"ListItem",position:1,name:"MYSIA",item:"https://getmysia.com/"},{"@type":"ListItem",position:2,name:"Recorder",item:"https://getmysia.com/recorder"},{"@type":"ListItem",position:3,name:"Setup guide",item:Za}]})}]}),component:Ne(pM,"component")});function gM(){return zi.auth.oauth}function $D({children:e}){return $.jsx("main",{className:"flex min-h-screen items-center justify-center bg-background px-6",children:$.jsxs("div",{className:"w-full max-w-md rounded-xl border bg-card p-8 shadow-sm",children:[$.jsx(hw,{className:"mb-6 h-8 w-8"}),e]})})}const yM=()=>Oe(()=>import("./_._lovable.oauth.consent-D-226FfS.js"),[]),vM=()=>Oe(()=>import("./_._lovable.oauth.consent-nXHAWn0L.js"),__vite__mapDeps([66,20])),bM=Ue()({validateSearch:e=>({authorization_id:typeof e.authorization_id=="string"?e.authorization_id:""}),beforeLoad:async({search:e,location:t})=>{if(!e.authorization_id)throw new Error("Missing authorization_id");const{data:r}=await zi.auth.getSession(),s=t.pathname+t.searchStr;if(!r.session)throw gr({to:"/login",search:{redirect:s}})},loader:async({location:e})=>{const t=new URLSearchParams(e.search).get("authorization_id"),{data:r,error:s}=await gM().getAuthorizationDetails(t);if(s)throw s;const o=r?.redirect_url??r?.redirect_to;if(o&&!r?.client)throw gr({href:o});return r},component:Ne(vM,"component"),errorComponent:Ne(yM,"errorComponent")}),_M=()=>Oe(()=>import("./help._handle.index-CX8_AUjR.js"),__vite__mapDeps([67,68])),wM=()=>Oe(()=>import("./help._handle.index-Dy0qxX5z.js"),__vite__mapDeps([69,68])),SM=()=>Oe(()=>import("./help._handle.index-DpOk180z.js"),__vite__mapDeps([70,39])),EM=Ue()({head:({loaderData:e})=>{const t=e?.app?.help_center_name||e?.app?.name;if(!t)return{meta:[{title:"Help center unavailable"},{name:"robots",content:"noindex"}]};const r=`${t} Help Center`,s=`Step-by-step guides and answers for ${t}, with screenshots for every step.`;return{meta:[{title:r},{name:"description",content:s},...e?.isPublic===!1?[{name:"robots",content:"noindex"}]:[],{property:"og:title",content:r},{property:"og:description",content:s},{property:"og:type",content:"website"},{name:"twitter:card",content:"summary"}]}},loader:async({params:e})=>{try{const{getHelpCenter:t}=await Oe(async()=>{const{getHelpCenter:r}=await import("./help.functions-A34lJKjx.js");return{getHelpCenter:r}},[]);return await t({data:{handle:e.handle}})}catch{throw Y0()}},component:Ne(SM,"component"),errorComponent:Ne(wM,"errorComponent"),notFoundComponent:Ne(_M,"notFoundComponent")});function HD({app:e}){const t=e.help_center_name||e.name;return $.jsx("header",{className:"border-b bg-card",style:{borderBottomColor:`${e.brand_color}33`},children:$.jsxs("div",{className:"mx-auto flex h-16 max-w-4xl items-center justify-between px-6",children:[$.jsxs(Nn,{to:"/help/$handle",params:{handle:e.handle},className:"flex items-center gap-2.5",children:[e.brand_logo_url?$.jsx("img",{src:e.brand_logo_url,alt:`${t} logo`,className:"h-7 w-7 rounded object-contain"}):$.jsx("span",{className:"flex h-7 w-7 items-center justify-center rounded text-xs font-semibold text-white",style:{backgroundColor:e.brand_color},children:t.slice(0,1).toUpperCase()}),$.jsx("span",{className:"font-display text-[15px] font-semibold tracking-tight",children:t})]}),e.site_url&&$.jsxs("a",{href:e.site_url,className:"text-sm transition-opacity hover:opacity-80",style:{color:e.brand_color},children:["Back to ",t]})]})})}function qD(){return $.jsxs("footer",{className:"border-t py-8 text-center text-xs text-muted-foreground",children:["Powered by"," ",$.jsx(Nn,{to:"/recorder",className:"underline underline-offset-2 hover:text-foreground",children:"MYSIA.AI Recorder"})]})}const AM=()=>Oe(()=>
40import("./help._handle._slug-CrSXs45B.js"),__vite__mapDeps([71,72])),TM=()=>Oe(()=>import("./help._handle._slug-D3tLMyv-.js"),__vite__mapDeps([73,72])),RM=()=>Oe(()=>import("./help._handle._slug-28wkoFaM.js"),__vite__mapDeps([74,11,12])),OM=Ue()({head:({loaderData:e})=>{const t=e?.article,r=e?.app;if(!t||!r)return{meta:[{title:"Article unavailable"},{name:"robots",content:"noindex"}]};const s=`${t.title} â ${r.help_center_name||r.name} Help`,o=(t.intro||`Step-by-step guide: ${t.title}`).slice(0,155),c=`https://getmysia.com/help/${r.handle}/${t.slug}`,u=t.cover_image_url&&/^https?:\/\//.test(t.cover_image_url)?t.cover_image_url:null;return{meta:[{title:s},{name:"description",content:o},{property:"og:title",content:s},{property:"og:description",content:o},{property:"og:type",content:"article"},{name:"twitter:card",content:u?"summary_large_image":"summary"},...u?[{property:"og:image",content:u}]:[],...u?[{name:"twitter:image",content:u}]:[]],links:[{rel:"canonical",href:c}],scripts:[{type:"application/ld+json",children:JSON.stringify({"@context":"https://schema.org","@type":"HowTo",name:t.title,description:o,publisher:{"@type":"Organization",name:r.help_center_name||r.name},...u?{image:u}:{},step:(e?.steps??[]).map((d,f)=>({"@type":"HowToStep",position:f+1,name:d.title,text:d.body||d.title,...d.screenshot_url&&/^https?:\/\//.test(d.screenshot_url)?{image:d.screenshot_url}:{}}))})}]}},loader:async({params:e})=>{let t;try{const{getHelpArticle:r}=await Oe(async()=>{const{getHelpArticle:s}=await import("./help.functions-A34lJKjx.js");return{getHelpArticle:s}},[]);t=await r({data:{handle:e.handle,slug:e.slug}})}catch{throw Y0()}if(t.redirectTo)throw gr({href:t.redirectTo,replace:!0});return t},component:Ne(RM,"component"),errorComponent:Ne(TM,"errorComponent"),notFoundComponent:Ne(AM,"notFoundComponent")}),CM=()=>Oe(()=>import("./recorder.app.index-Bd556grm.js"),__vite__mapDeps([75,2,10,1,11,20,30,76,23,12,8,6,22,15,16,17,18,19,21,41,7,77,34])),kM=Ue()({head:()=>({meta:[{title:"Recorder workspace â MYSIA"},{name:"description",content:"Manage your MYSIA Recorder key and edit the help-center articles you recorded."},{property:"og:title",content:"Recorder workspace â MYSIA"},{property:"og:description",content:"Your recorder key and recorded articles in one place."},{property:"og:type",content:"website"},{name:"twitter:card",content:"summary"}]}),component:Ne(CM,"component")}),xM=()=>Oe(()=>import("./recorder.app.help-center-r9yFW85N.js"),__vite__mapDeps([78,10,1,2,11,12,76,20,23,8,6,22,24,56,19,29,37])),jM=Ue()({head:()=>({meta:[{title:"Help center settings â MYSIA.AI Recorder"},{name:"description",content:"Choose your help center address, logo, and accent colour for published articles."},{property:"og:title",content:"Help center settings â MYSIA.AI Recorder"},{property:"og:description",content:"Brand and publish your hosted MYSIA help center."},{property:"og:type",content:"website"},{name:"twitter:card",content:"summary"}]}),component:Ne(xM,"component")}),NM=()=>Oe(()=>import("./recorder.app.onboarding-C3olEz_B.js"),__vite__mapDeps([79,2,10,11,20,30,12,8,6,5,7,77,45,46])),MM=Ue()({head:()=>({meta:[{title:"Welcome â MYSIA.AI Recorder"},{name:"robots",content:"noindex"}]}),component:Ne(NM,"component")}),DM=()=>Oe(()=>import("./recorder.app.settings-CpKb6ZEz.js"),__vite__mapDeps([80,2,10,1,11,20,23,17,18,19,21,22,15,16,8,45,33,37,41,34,65,42])),LM=Ue()({head:()=>({meta:[{title:"Account settings â MYSIA.AI Recorder"},{name:"description",content:"Manage your MYSIA.AI Recorder subscription, review usage, and control your account data."},{property:"og:title",content:"Account settings â MYSIA.AI Recorder"},{property:"og:description",content:"Subscription status, usage and privacy controls for your recorder account."},{property:"og:type",content:"website"},{name:"twitter:card",content:"summary"}]}),component:Ne(DM,"component")}),UM=()=>Oe(()=>import("./recorder.app.articles._articleId-B-hRPM4Z.js"),__vite__mapDeps([81,59,2,10,1,11,12,20,23,24,25,26,18,19,21,22,8,37,32,45,47,38,41,42])),zM=Ue()({head:()=>({meta:[{title:"Edit recorded article â MYSIA.AI Recorder"},{name:"description",content:"Edit the copy and screenshots of a workflow you recorded, then publish it."},{property:"og:title",content:"Edit recorded article â MYSIA.AI Recorder"},{property:"og:description",content:"Polish the steps and screenshots of your recording before publishing."},{property:"og:type",content:"website"},{name:"twitter:card",content:"summary"}]}
40),component:Ne(UM,"component")}),IM=pj.update({id:"/",path:"/",getParentRoute:()=>Ve}),PM=gj.update({id:"/dashboard",path:"/dashboard",getParentRoute:()=>Ve}),BM=vj.update({id:"/demo-host",path:"/demo-host",getParentRoute:()=>Ve}),$M=_j.update({id:"/docs",path:"/docs",getParentRoute:()=>Ve}),HM=Sj.update({id:"/extension",path:"/extension",getParentRoute:()=>Ve}),qM=Aj.update({id:"/help-center",path:"/help-center",getParentRoute:()=>Ve}),VM=yN.update({id:"/login",path:"/login",getParentRoute:()=>Ve}),GM=bN.update({id:"/onboarding",path:"/onboarding",getParentRoute:()=>Ve}),YM=wN.update({id:"/playground",path:"/playground",getParentRoute:()=>Ve}),FM=SN.update({id:"/pricing",path:"/pricing",getParentRoute:()=>Ve}),KM=AN.update({id:"/reset-password",path:"/reset-password",getParentRoute:()=>Ve}),JM=RN.update({id:"/signup",path:"/signup",getParentRoute:()=>Ve}),QM=ON.update({id:"/welcome",path:"/welcome",getParentRoute:()=>Ve}),XM=kN.update({id:"/apps/$id",path:"/apps/$id",getParentRoute:()=>Ve}),ZM=jN.update({id:"/checkout/return",path:"/checkout/return",getParentRoute:()=>Ve}),WM=DN.update({id:"/help-center_/$articleId",path:"/help-center/$articleId",getParentRoute:()=>Ve}),eD=UN.update({id:"/legal/privacy",path:"/legal/privacy",getParentRoute:()=>Ve}),tD=IN.update({id:"/legal/terms",path:"/legal/terms",getParentRoute:()=>Ve}),nD=qN.update({id:"/recorder/",path:"/recorder/",getParentRoute:()=>Ve}),Ks=KN.update({id:"/recorder/app",path:"/recorder/app",getParentRoute:()=>Ve}),rD=mM.update({id:"/recorder/guide",path:"/recorder/guide",getParentRoute:()=>Ve}),iD=bM.update({id:"/.lovable/oauth/consent",path:"/.lovable/oauth/consent",getParentRoute:()=>Ve}),sD=EM.update({id:"/help/$handle/",path:"/help/$handle/",getParentRoute:()=>Ve}),aD=OM.update({id:"/help/$handle/$slug",path:"/help/$handle/$slug",getParentRoute:()=>Ve}),oD=kM.update({id:"/",path:"/",getParentRoute:()=>Ks}),lD=jM.update({id:"/help-center",path:"/help-center",getParentRoute:()=>Ks}),cD=MM.update({id:"/onboarding",path:"/onboarding",getParentRoute:()=>Ks}),uD=LM.update({id:"/settings",path:"/settings",getParentRoute:()=>Ks}),dD=zM.update({id:"/articles/$articleId",path:"/articles/$articleId",getParentRoute:()=>Ks}),hD={RecorderAppHelpCenterRoute:lD,RecorderAppOnboardingRoute:cD,RecorderAppSettingsRoute:uD,RecorderAppIndexRoute:oD,RecorderAppArticlesArticleIdRoute:dD},fD=Ks._addFileChildren(hD),pD={IndexRoute:IM,DashboardRoute:PM,DemoHostRoute:BM,DocsRoute:$M,ExtensionRoute:HM,HelpCenterRoute:qM,LoginRoute:VM,OnboardingRoute:GM,PlaygroundRoute:YM,PricingRoute:FM,ResetPasswordRoute:KM,SignupRoute:JM,WelcomeRoute:QM,AppsIdRoute:XM,CheckoutReturnRoute:ZM,HelpCenterArticleIdRoute:WM,LegalPrivacyRoute:eD,LegalTermsRoute:tD,RecorderAppRoute:fD,RecorderGuideRoute:rD,RecorderIndexRoute:nD,DotlovableOauthConsentRoute:iD,HelpHandleSlugRoute:aD,HelpHandleIndexRoute:sD},mD=Ve._addFileChildren(pD),gD=()=>{const e=new X2;return JO({routeTree:mD,context:{queryClient:e},scrollRestoration:!0,defaultPreloadStaleTime:0})};async function yD(){const e=await gD();let t;if(g0){const r=await g0.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};return t.push(W1),e.options.serializationAdapters&&t.push(...e.options.serializationAdapters),e.update({basepath:"",serializationAdapters:t}),e.stores.ids.get().length||await eT(e),e}var vD=yD;function bD(){return vD().finally(()=>window.$_TSR?.h())}var Lh;function _D(){return Lh||(Lh=bD()),$.jsx(sO,{promise:Lh,children:e=>$.jsx(ZO,{router:e})})}se.startTransition(()=>{VE.hydrateRoot(document,$.jsx(se.StrictMode,{children:$.jsx(_D,{})}))});export{HD as $,LD as A,wD as B,Tj as C,rM as D,Ao as E,jN as F,DN as G,PN as H,BN as I,pw as J,sM as K,Nn as L,hw as M,tM as N,$N as O,mN as P,l_ as Q,yN as R,hM as S,fw as T,dM as U,fM as V,$D as W,bM as X,gM as Y,EM as Z,OM as _,Un as a,qD as a0,UD as a1,ID as a2,zD as a3,oM as a4,cM as a5,Qc as a6,RD as a7,_o as a8,K2 as a9,Ct as aa,_n as ab,OD as ac,Tt as ad,Uc as ae,P2 as af,N2 as ag,af as ah,H_ as ai,x2 as aj,j2 as ak,sf as al,P_ as am,G2 as an,L2 as ao,ED as ap,SD as aq,jv as ar,Yc as as,TD as at,Oe as au,zM as av,Fs as b,dn as c,CD as d,jD as e,PD as f,BD as g,J_ as h,_r as i,$ as j,L0 as k,rj as l,s_ as m,dw as n,RN as o,GN as p,kN as q,se as r,zi as s,kD as t,r_ as u,ND as v,MD as w,DD as x,xD as y,sj as z};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.