PageSourceSearch

https://scatteredsaver.com/assets/main-uPQenPng.js

js scatteredsaver.com collected 2026-10-02 01:42:44 UTC 630,899 bytes, 61 lines download raw bytes

vendor: 5,448 bytes, lines 1-2
1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/signup-Dx7VddoS.js","assets/index-B8zHHcXO.js","assets/privacy-C1i5h23y.js","assets/shield-DlSgg5Tr.js","assets/pricing-CQkjhJbd.js","assets/useSubscription-DkEBq48-.js","assets/file-spreadsheet-9N5i4qe-.js","assets/login-x-zbIE8M.js","assets/features-DRqwBK9u.js","assets/wallet-lEhZwY71.js","assets/download-Dny8JojZ.js","assets/download-cRGj2qBh.js","assets/arrow-right-DWNibLSs.js","assets/account-DWrqtlAE.js","assets/triangle-alert-Bq07glxf.js","assets/index-CclpEpro.js","assets/account.billing-events-DwVwhb-o.js"])))=>i.map(i=>d[i]);
2function y0(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var yf={exports:{}},po={};var xy;function hS(){if(xy)return po;xy=1;var n=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function r(s,o,u){var c=null;if(u!==void 0&&(c=""+u),o.key!==void 0&&(c=""+o.key),"key"in o){u={};for(var f in o)f!=="key"&&(u[f]=o[f])}else u=o;return o=u.ref,{$$typeof:n,type:s,key:c,ref:o!==void 0?o:null,props:u}}return po.Fragment=e,po.jsx=r,po.jsxs=r,po}var Ry;function pS(){return Ry||(Ry=1,yf.exports=hS()),yf.exports}var H=pS(),vf={exports:{}},Se={};var Ay;function mS(){if(Ay)return Se;Ay=1;var n=Symbol.for("react.transitional.element"),e=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),u=Symbol.for("react.consumer"),c=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),g=Symbol.for("react.activity"),b=Symbol.iterator;function _(k){return k===null||typeof k!="object"?null:(k=b&&k[b]||k["@@iterator"],typeof k=="function"?k:null)}var S={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},A=Object.assign,R={};function x(k,q,G){this.props=k,this.context=q,this.refs=R,this.updater=G||S}x.prototype.isReactComponent={},x.prototype.setState=function(k,q){if(typeof k!="object"&&typeof k!="function"&&k!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,k,q,"setState")},x.prototype.forceUpdate=function(k){this.updater.enqueueForceUpdate(this,k,"forceUpdate")};function M(){}M.prototype=x.prototype;function N(k,q,G){this.props=k,this.context=q,this.refs=R,this.updater=G||S}var B=N.prototype=new M;B.constructor=N,A(B,x.prototype),B.isPureReactComponent=!0;var J=Array.isArray;function K(){}var I={H:null,A:null,T:null,S:null},F=Object.prototype.hasOwnProperty;function Q(k,q,G){var X=G.ref;return{$$typeof:n,type:k,key:q,ref:X!==void 0?X:null,props:G}}function he(k,q){return Q(k.type,q,k.props)}function se(k){return typeof k=="object"&&k!==null&&k.$$typeof===n}function _e(k){var q={"=":"=0",":":"=2"};return"$"+k.replace(/[=:]/g,function(G){return q[G]})}var ye=/\/+/g;function Je(k,q){return typeof k=="object"&&k!==null&&k.key!=null?_e(""+k.key):q.toString(36)}function Ue(k){switch(k.status){case"fulfilled":return k.value;case"rejected":throw k.reason;default:switch(typeof k.status=="string"?k.then(K,K):(k.status="pending",k.then(function(q){k.status==="pending"&&(k.status="fulfilled",k.value=q)},function(q){k.status==="pending"&&(k.status="rejected",k.reason=q)})),k.status){case"fulfilled":return k.value;case"rejected":throw k.reason}}throw k}function L(k,q,G,X,re){var pe=typeof k;(pe==="undefined"||pe==="boolean")&&(k=null);var xe=!1;if(k===null)xe=!0;else switch(pe){case"bigint":case"string":case"number":xe=!0;break;case"object":switch(k.$$typeof){case n:case e:xe=!0;break;case y:return xe=k._init,L(xe(k._payload),q,G,X,re)}}if(xe)return re=re(k),xe=X===""?"."+Je(k,0):X,J(re)?(G="",xe!=null&&(G=xe.replace(ye,"$&/")+"/"),L(re,q,G,"",function(Pt){return Pt})):re!=null&&(se(re)&&(re=he(re,G+(re.key==null||k&&k.key===re.key?"":(""+re.key).replace(ye,"$&/")+"/")+xe)),q.push(re)),1;xe=0;var ve=X===""?".":X+":";if(J(k))for(var Be=0;Be<k.length;Be++)X=k[Be],pe=ve+Je(X,Be),xe+=L(X,q,G,pe,re);else if(Be=_(k),typeof Be=="function")for(k=Be.call(k),Be=0;!(X=k.next()).done;)X=X.value,pe=ve+Je(X,Be++),xe+=L(X,q,G,pe,re);else if(pe==="object"){if(typeof k.then=="function")return L(Ue(k),q,G,X,re);throw q=String(k),Error("Objects are not valid as a React child (found: "+(q==="[object Object]"?"object with keys {"+Object.keys(k).join(", ")+"}":q)+"). If you meant to render a collection of children, use an array instead.")}return xe}function Z(k,q,G){if(k==null)return k;var X=[],re=0;return L(k,X,"","",function(pe){return q.call(G,pe,re++)}),X}function le(k){if(k._status===-1){var q=k._result;q=q(),q.then(function(G){(k._status===0||k._status===-1)&&(k._status=1,k._result=G)},function(G){(k._status===0||k._status===-1)&&(k._status=2,k._result=G)}),k._status===-1&&(k._status=0,k._result=q)}if(k._status===1)return k._result.default;throw k._result}var ke=typeof reportError=="function"?reportError:function(k){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var q=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof k=="object"&&k!==null&&typeof k.message=="string"?String(k.message):String(k),error:k});if(!window.dispatchEvent(q))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",k);return}console.error(k)}
vendor: 15,868 bytes, lines 2-4
2,we={map:Z,forEach:function(k,q,G){Z(k,function(){q.apply(this,arguments)},G)},count:function(k){var q=0;return Z(k,function(){q++}),q},toArray:function(k){return Z(k,function(q){return q})||[]},only:function(k){if(!se(k))throw Error("React.Children.only expected to receive a single React element child.");return k}};return Se.Activity=g,Se.Children=we,Se.Component=x,Se.Fragment=r,Se.Profiler=o,Se.PureComponent=N,Se.StrictMode=s,Se.Suspense=p,Se.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=I,Se.__COMPILER_RUNTIME={__proto__:null,c:function(k){return I.H.useMemoCache(k)}},Se.cache=function(k){return function(){return k.apply(null,arguments)}},Se.cacheSignal=function(){return null},Se.cloneElement=function(k,q,G){if(k==null)throw Error("The argument must be a React element, but you passed "+k+".");var X=A({},k.props),re=k.key;if(q!=null)for(pe in q.key!==void 0&&(re=""+q.key),q)!F.call(q,pe)||pe==="key"||pe==="__self"||pe==="__source"||pe==="ref"&&q.ref===void 0||(X[pe]=q[pe]);var pe=arguments.length-2;if(pe===1)X.children=G;else if(1<pe){for(var xe=Array(pe),ve=0;ve<pe;ve++)xe[ve]=arguments[ve+2];X.children=xe}return Q(k.type,re,X)},Se.createContext=function(k){return k={$$typeof:c,_currentValue:k,_currentValue2:k,_threadCount:0,Provider:null,Consumer:null},k.Provider=k,k.Consumer={$$typeof:u,_context:k},k},Se.createElement=function(k,q,G){var X,re={},pe=null;if(q!=null)for(X in q.key!==void 0&&(pe=""+q.key),q)F.call(q,X)&&X!=="key"&&X!=="__self"&&X!=="__source"&&(re[X]=q[X]);var xe=arguments.length-2;if(xe===1)re.children=G;else if(1<xe){for(var ve=Array(xe),Be=0;Be<xe;Be++)ve[Be]=arguments[Be+2];re.children=ve}if(k&&k.defaultProps)for(X in xe=k.defaultProps,xe)re[X]===void 0&&(re[X]=xe[X]);return Q(k,pe,re)},Se.createRef=function(){return{current:null}},Se.forwardRef=function(k){return{$$typeof:f,render:k}},Se.isValidElement=se,Se.lazy=function(k){return{$$typeof:y,_payload:{_status:-1,_result:k},_init:le}},Se.memo=function(k,q){return{$$typeof:m,type:k,compare:q===void 0?null:q}},Se.startTransition=function(k){var q=I.T,G={};I.T=G;try{var X=k(),re=I.S;re!==null&&re(G,X),typeof X=="object"&&X!==null&&typeof X.then=="function"&&X.then(K,ke)}catch(pe){ke(pe)}finally{q!==null&&G.types!==null&&(q.types=G.types),I.T=q}},Se.unstable_useCacheRefresh=function(){return I.H.useCacheRefresh()},Se.use=function(k){return I.H.use(k)},Se.useActionState=function(k,q,G){return I.H.useActionState(k,q,G)},Se.useCallback=function(k,q){return I.H.useCallback(k,q)},Se.useContext=function(k){return I.H.useContext(k)},Se.useDebugValue=function(){},Se.useDeferredValue=function(k,q){return I.H.useDeferredValue(k,q)},Se.useEffect=function(k,q){return I.H.useEffect(k,q)},Se.useEffectEvent=function(k){return I.H.useEffectEvent(k)},Se.useId=function(){return I.H.useId()},Se.useImperativeHandle=function(k,q,G){return I.H.useImperativeHandle(k,q,G)},Se.useInsertionEffect=function(k,q){return I.H.useInsertionEffect(k,q)},Se.useLayoutEffect=function(k,q){return I.H.useLayoutEffect(k,q)},Se.useMemo=function(k,q){return I.H.useMemo(k,q)},Se.useOptimistic=function(k,q){return I.H.useOptimistic(k,q)},Se.useReducer=function(k,q,G){return I.H.useReducer(k,q,G)},Se.useRef=function(k){return I.H.useRef(k)},Se.useState=function(k){return I.H.useState(k)},Se.useSyncExternalStore=function(k,q,G){return I.H.useSyncExternalStore(k,q,G)},Se.useTransition=function(){return I.H.useTransition()},Se.version="19.2.4",Se}var Oy;function Go(){return Oy||(Oy=1,vf.exports=mS()),vf.exports}var ae=Go();const ee=y0(ae);var bf={exports:{}},mo={},_f={exports:{}},wf={};var ky;function gS(){return ky||(ky=1,(function(n){function e(L,Z){var le=L.length;L.push(Z);e:for(;0<le;){var ke=le-1>>>1,we=L[ke];if(0<o(we,Z))L[ke]=Z,L[le]=we,le=ke;else break e}}function r(L){return L.length===0?null:L[0]}function s(L){if(L.length===0)return null;var Z=L[0],le=L.pop();if(le!==Z){L[0]=le;e:for(var ke=0,we=L.length,k=we>>>1;ke<k;){var q=2*(ke+1)-1,G=L[q],X=q+1,re=L[X];if(0>o(G,le))X<we&&0>o(re,G)?(L[ke]=re,L[X]=le,ke=X):(L[ke]=G,L[q]=le,ke=q);else if(X<we&&0>o(re,le))L[ke]=re,L[X]=le,ke=X;else break e}}return Z}function o(L,Z){var le=L.sortIndex-Z.sortIndex;return le!==0?le:L.id-Z.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var u=performance;n.unstable_now=function(){return u.now()}}else{var c=Date,f=c.now();n.unstable_now=function(){return c.now()-f}}var p=[],m=[],y=1,g=null,b=3,_=!1,S=!1,A=!1,R=!1,x=typeof setTimeout=="function"?setTimeout:null,M=typeof clearTimeout=="function"?clearTimeout:null,N=typeof setImmediate<"u"?setImmediate:null;function B(L){for(var Z=r(m);Z!==null;){if(Z.callback===null)s(m);else if(Z.startTime<=L)s(m),Z.sortIndex=Z.expirationTime,e(p,Z);else break;Z=r(m)}}function J(L){if(A=!1,B(L),!S)if(r(p)!==null)S=!0,K||(K=!0,_e());else{var Z=r(m);Z!==null&&Ue(J,Z.startTime-L)}}var K=!1,I=-1,F=5,Q=-1;function he(){return R?!0:!(n.unstable_now()-Q<F)}function se(){if(R=!1,K){var L=n.unstable_now();Q=L;var Z=!0;try{e:{S=!1,A&&(A=!1,M(I),I=-1),_=!0;var le=b;try{t:{for(B(L),g=r(p);g!==null&&!(g.expirationTime>L&&he());){var ke=g.callback;if(typeof ke=="function"){g.callback=null,b=g.priorityLevel;var we=ke(g.expirationTime<=L);if(L=n.unstable_now(),typeof we=="function"){g.callback=we,B(L),Z=!0;break t}g===r(p)&&s(p),B(L)}else s(p);g=r(p)}if(g!==null)Z=!0;else{var k=r(m);k!==null&&Ue(J,k.startTime-L),Z=!1}}break e}finally{g=null,b=le,_=!1}Z=void 0}}finally{Z?_e():K=!1}}}var _e;if(typeof N=="function")_e=function(){N(se)};else if(typeof MessageChannel<"u"){var ye=new MessageChannel,Je=ye.port2;ye.port1.onmessage=se,_e=function(){Je.postMessage(null)}}else _e=function(){x(se,0)};function Ue(L,Z){I=x(function(){L(n.unstable_now())},Z)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(L){L.callback=null},n.unstable_forceFrameRate=function(L){0>L||125<L?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):F=0<L?Math.floor(1e3/L):5},n.unstable_getCurrentPriorityLevel=function(){return b},n.unstable_next=function(L){switch(b){case 1:case 2:case 3:var Z=3;break;default:Z=b}var le=b;b=Z;try{return L()}finally{b=le}},n.unstable_requestPaint=function(){R=!0},n.unstable_runWithPriority=function(L,Z){switch(L){case 1:case 2:case 3:case 4:case 5:break;default:L=3}var le=b;b=L;try{return Z()}finally{b=le}},n.unstable_scheduleCallback=function(L,Z,le){var ke=n.unstable_now();switch(typeof le=="object"&&le!==null?(le=le.delay,le=typeof le=="number"&&0<le?ke+le:ke):le=ke,L){case 1:var we=-1;break;case 2:we=250;break;case 5:we=1073741823;break;case 4:we=1e4;break;default:we=5e3}return we=le+we,L={id:y++,callback:Z,priorityLevel:L,startTime:le,expirationTime:we,sortIndex:-1},le>ke?(L.sortIndex=le,e(m,L),r(p)===null&&L===r(m)&&(A?(M(I),I=-1):A=!0,Ue(J,le-ke))):(L.sortIndex=we,e(p,L),S||_||(S=!0,K||(K=!0,_e()))),L},n.unstable_shouldYield=he,n.unstable_wrapCallback=function(L){var Z=b;return function(){var le=b;b=Z;try{return L.apply(this,arguments)}finally{b=le}}}})(wf)),wf}var Cy;function yS(){return Cy||(Cy=1,_f.exports=gS()),_f.exports}var Sf={exports:{}},Bt={};var jy;function vS(){if(jy)return Bt;jy=1;var n=Go();function e(p){var m="https://react.dev/errors/"+p;if(1<arguments.length){m+="?args[]="+encodeURIComponent(arguments[1]);for(var y=2;y<arguments.length;y++)m+="&args[]="+encodeURIComponent(arguments[y])}return"Minified React error #"+p+"; visit "+m+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(){}var s={d:{f:r,r:function(){throw Error(e(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 u(p,m,y){var g=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:g==null?null:""+g,children:p,containerInfo:m,implementation:y}}var c=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function f(p,m){if(p==="font")return"";if(typeof m=="string")return m==="use-credentials"?m:""}return Bt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=s,Bt.createPortal=function(p,m){var y=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!m||m.nodeType!==1&&m.nodeType!==9&&m.nodeType!==11)throw Error(e(299));return u(p,m,null,y)},Bt.flushSync=function(p){var m=c.T,y=s.p;try{if(c.T=null,s.p=2,p)return p()}finally{c.T=m,s.p=y,s.d.f()}},Bt.preconnect=function(p,m){typeof p=="string"&&(m?(m=m.crossOrigin,m=typeof m=="string"?m==="use-credentials"?m:"":void 0):m=null,s.d.C(p,m))},Bt.prefetchDNS=function(p){typeof p=="string"&&s.d.D(p)},Bt.preinit=function(p,m){if(typeof p=="string"&&m&&typeof m.as=="string"){var y=m.as,g=f(y,m.crossOrigin),b=typeof m.integrity=="string"?m.integrity:void 0,_=typeof m.fetchPriority=="string"?m.fetchPriority:void 0;y==="style"?s.d.S(p,typeof m.precedence=="string"?m.precedence:void 0,{crossOrigin:g,integrity:b,fetchPriority:_}):y==="script"&&s.d.X(p,{crossOrigin:g,integrity:b,fetchPriority:_,nonce:typeof m.nonce=="string"?m.nonce:void 0})}},Bt.preinitModule=function(p,m){if(typeof p=="string")if(typeof m=="object"&&m!==null){if(m.as==null||m.as==="script"){var y=f(m.as,m.crossOrigin);s.d.M(p,{crossOrigin:y,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0})}}else m==null&&s.d.M(p)},Bt.preload=function(p,m){if(typeof p=="string"&&typeof m=="object"&&m!==null&&typeof m.as=="string"){var y=m.as,g=f(y,m.crossOrigin);s.d.L(p,y,{crossOrigin:g,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0,type:typeof m.type=="string"?m.type:void 0,fetchPriority:typeof m.fetchPriority=="string"?m.fetchPriority:void 0,referrerPolicy:typeof m.referrerPolicy=="string"?m.referrerPolicy:void 0,imageSrcSet:typeof m.imageSrcSet=="string"?m.imageSrcSet:void 0,imageSizes:typeof m.imageSizes=="string"?m.imageSizes:void 0,media:typeof m.media=="string"?m.media:void 0})}},Bt.preloadModule=function(p,m){if(typeof p=="string")if(m){var y=f(m.as,m.crossOrigin);s.d.m(p,{as:typeof m.as=="string"&&m.as!=="script"?m.as:void 0,crossOrigin:y,integrity:typeof m.integrity=="string"?m.integrity:void 0})}else s.d.m(p)},Bt.requestFormReset=function(p){s.d.r(p)},Bt.unstable_batchedUpdates=function(p,m){return p(m)},Bt.useFormState=function(p,m,y){return c.H.useFormState(p,m,y)},Bt.useFormStatus=function(){return c.H.useHostTransitionStatus()},Bt.version="19.2.4",Bt}var Ny;function v0(){if(Ny)return Sf.exports;Ny=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}return n(),Sf.exports=vS(),Sf.exports}var My;function bS(){if(My)return mo;My=1;var n=yS(),e=Go(),r=v0();function s(t){var a="https://react.dev/errors/"+t;if(1<arguments.length){a+="?args[]="+encodeURIComponent(arguments[1]);for(var i=2;i<arguments.length;i++)a+="&args[]="+encodeURIComponent(arguments[i])}return"Minified React error #"+t+"; visit "+a+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function u(t){var a=t,i=t;if(t.alternate)for(;a.return;)a=a.return;else{t=a;do a=t,(a.flags&4098)!==0&&(i=a.return),t=a.return;while(t)}return a.tag===3?i:null}function c(t){if(t.tag===13){var a=t.memoizedState;if(a===null&&(t=t.alternate,t!==null&&(a=t.memoizedState)),a!==null)return a.dehydrated}return null}function f(t){if(t.tag===31){var a=t.memoizedState;if(a===null&&(t=t.alternate,t!==null&&(a=t.memoizedState)),a!==null)return a.dehydrated}return null}function p(t){if(u(t)!==t)throw Error(s(188))}function m(t){var a=t.alternate;if(!a){if(a=u(t),a===null)throw Error(s(188));return a!==t?null:t}for(var i=t,l=a;;){var d=i.return;if(d===null)break;var h=d.alternate;if(h===null){if(l=d.return,l!==null){i=l;continue}break}if(d.child===h.child){for(h=d.child;h;){if(h===i)return p(d),t;if(h===l)return p(d),a;h=h.sibling}throw Error(s(188))}if(i.return!==l.return)i=d,l=h;else{for(var v=!1,w=d.child;w;){if(w===i){v=!0,i=d,l=h;break}if(w===l){v=!0,l=d,i=h;break}w=w.sibling}if(!v){for(w=h.child;w;){if(w===i){v=!0,i=h,l=d;break}if(w===l){v=!0,l=h,i=d;break}w=w.sibling}if(!v)throw Error(s(189))}}if(i.alternate!==l)throw Error(s(190))}if(i.tag!==3)throw Error(s(188));return i.stateNode.current===i?t:a}function y(t){var a=t.tag;if(a===5||a===26||a===27||a===6)return t;for(t=t.child;t!==null;){if(a=y(t),a!==null)return a;t=t.sibling}return null}var g=Object.assign,b=Symbol.for("react.element"),_=Symbol.for("react.transitional.element"),S=Symbol.for("react.portal"),A=Symbol.for("react.fragment"),R=Symbol.for("react.strict_mode"),x=Symbol.for("react.profiler"),M=Symbol.for("react.consumer"),N=Symbol.for("react.context"),B=Symbol.for("react.forward_ref"),J=Symbol.for("react.suspense"),K=Symbol.for("react.suspense_list"),I=Symbol.for("react.memo"),F=Symbol.for("react.lazy"),Q=Symbol.for("react.activity"),he=Symbol.for("react.memo_cache_sentinel"),se=Symbol.iterator;function _e(t){return t===null||typeof t!="object"?null:(t=se&&t[se]||t["@@iterator"],typeof t=="function"?t:null)}var ye=Symbol.for("react.client.reference");function Je(t){if(t==null)return null;if(typeof t=="function")return t.$$typeof===ye?null:t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case A:return"Fragment";case x:return"Profiler";case R:return"StrictMode";case J:return"Suspense";case K:return"SuspenseList";case Q:return"Activity"}if(typeof t=="object")switch(t.$$typeof){case S:return"Portal";case N:return t.displayName||"Context";case M:return(t._context.displayName||"Context")+".Consumer";case B:var a=t.render;return t=t.displayName,t||(t=a.displayName||a.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case I:return a=t.displayName||null,a!==null?a:Je(t.type)||"Memo";case F:a=t._payload,t=t._init;try{return Je(t(a))}catch{}}return null}var Ue=Array.isArray,L=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Z=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,le={pending:!1,data:null,method:null,action:null},ke=[],we=-1;function k(t){return{current:t}}function q(t){0>we||(t.current=ke[we],ke[we]=null,we--)}function G(t,a){we++,ke[we]=t.current,t.current=a}var X=k(null),re=k(null),pe=k(null),xe=k(null);function ve(t,a){switch(G(pe,a),G(re,t),G(X,null),a.nodeType){case 9:case 11:t=(t=a.documentElement)&&(t=t.namespaceURI)?Zg(t):0;break;default:if(t=a.tagName,a=a.namespaceURI)a=Zg(a),t=Jg(a,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}q(X),G(X,t)}function Be(){q(X),q(re),q(pe)}function Pt(t){t.memoizedState!==null&&G(xe,t);var a=X.current,i=Jg(a,t.type);a!==i&&(G(re,t),G(X,i))}function Vt(t){re.current===t&&(q(X),q(re)),xe.current===t&&(q(xe),uo._currentValue=le)}var cn,Ea;function dn(t){if(cn===void 0)try{throw Error()}catch(i){var a=i.stack.trim().match(/\n( *(at )?)/);cn=a&&a[1]||"",Ea=-1<i.stack.indexOf(`
3    at`)?" (<anonymous>)":-1<i.stack.indexOf("@")?"@unknown:0:0":""}return`
4`+cn+t+Ea}var Mr=!1;function rr(t,a){if(!t||Mr)return"";Mr=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(a){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(P){var z=P}Reflect.construct(t,[],Y)}else{try{Y.call()}catch(P){z=P}t.call(Y.prototype)}}else{try{throw Error()}catch(P){z=P}(Y=t())&&typeof Y.catch=="function"&&Y.catch(function(){})}}
vendor: 12,136 bytes, lines 4-9
4catch(P){if(P&&z&&typeof P.stack=="string")return[P.stack,z.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var d=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");d&&d.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var h=l.DetermineComponentFrameRoot(),v=h[0],w=h[1];if(v&&w){var O=v.split(`
5`),U=w.split(`
6`);for(d=l=0;l<O.length&&!O[l].includes("DetermineComponentFrameRoot");)l++;for(;d<U.length&&!U[d].includes("DetermineComponentFrameRoot");)d++;if(l===O.length||d===U.length)for(l=O.length-1,d=U.length-1;1<=l&&0<=d&&O[l]!==U[d];)d--;for(;1<=l&&0<=d;l--,d--)if(O[l]!==U[d]){if(l!==1||d!==1)do if(l--,d--,0>d||O[l]!==U[d]){var $=`
7`+O[l].replace(" at new "," at ");return t.displayName&&$.includes("<anonymous>")&&($=$.replace("<anonymous>",t.displayName)),$}while(1<=l&&0<=d);break}}}finally{Mr=!1,Error.prepareStackTrace=i}return(i=t?t.displayName||t.name:"")?dn(i):""}function Gt(t,a){switch(t.tag){case 26:case 27:case 5:return dn(t.type);case 16:return dn("Lazy");case 13:return t.child!==a&&a!==null?dn("Suspense Fallback"):dn("Suspense");case 19:return dn("SuspenseList");case 0:case 15:return rr(t.type,!1);case 11:return rr(t.type.render,!1);case 1:return rr(t.type,!0);case 31:return dn("Activity");default:return""}}function ar(t){try{var a="",i=null;do a+=Gt(t,i),i=t,t=t.return;while(t);return a}catch(l){return`
8Error generating stack: `+l.message+`
9`+l.stack}}var lt=Object.prototype.hasOwnProperty,Ta=n.unstable_scheduleCallback,Dr=n.unstable_cancelCallback,Rt=n.unstable_shouldYield,Dn=n.unstable_requestPaint,Oe=n.unstable_now,wt=n.unstable_getCurrentPriorityLevel,It=n.unstable_ImmediatePriority,ls=n.unstable_UserBlockingPriority,xa=n.unstable_NormalPriority,Si=n.unstable_LowPriority,sr=n.unstable_IdlePriority,Zo=n.log,Lr=n.unstable_setDisableYieldValue,Ra=null,Ht=null;function Ln(t){if(typeof Zo=="function"&&Lr(t),Ht&&typeof Ht.setStrictMode=="function")try{Ht.setStrictMode(Ra,t)}catch{}}var Ut=Math.clz32?Math.clz32:Vn,sc=Math.log,Ei=Math.LN2;function Vn(t){return t>>>=0,t===0?32:31-(sc(t)/Ei|0)|0}var us=256,cs=262144,Aa=4194304;function Gn(t){var a=t&42;if(a!==0)return a;switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return t&261888;case 262144:case 524288:case 1048576:case 2097152:return t&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function be(t,a,i){var l=t.pendingLanes;if(l===0)return 0;var d=0,h=t.suspendedLanes,v=t.pingedLanes;t=t.warmLanes;var w=l&134217727;return w!==0?(l=w&~h,l!==0?d=Gn(l):(v&=w,v!==0?d=Gn(v):i||(i=w&~t,i!==0&&(d=Gn(i))))):(w=l&~h,w!==0?d=Gn(w):v!==0?d=Gn(v):i||(i=l&~t,i!==0&&(d=Gn(i)))),d===0?0:a!==0&&a!==d&&(a&h)===0&&(h=d&-d,i=a&-a,h>=i||h===32&&(i&4194048)!==0)?a:d}function tt(t,a){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&a)===0}function St(t,a){switch(t){case 1:case 2:case 4:case 8:case 64:return a+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 a+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 zt(){var t=Aa;return Aa<<=1,(Aa&62914560)===0&&(Aa=4194304),t}function Ur(t){for(var a=[],i=0;31>i;i++)a.push(t);return a}function at(t,a){t.pendingLanes|=a,a!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function Yt(t,a,i,l,d,h){var v=t.pendingLanes;t.pendingLanes=i,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=i,t.entangledLanes&=i,t.errorRecoveryDisabledLanes&=i,t.shellSuspendCounter=0;var w=t.entanglements,O=t.expirationTimes,U=t.hiddenUpdates;for(i=v&~i;0<i;){var $=31-Ut(i),Y=1<<$;w[$]=0,O[$]=-1;var z=U[$];if(z!==null)for(U[$]=null,$=0;$<z.length;$++){var P=z[$];P!==null&&(P.lane&=-536870913)}i&=~Y}l!==0&&Oa(t,l,0),h!==0&&d===0&&t.tag!==0&&(t.suspendedLanes|=h&~(v&~a))}function Oa(t,a,i){t.pendingLanes|=a,t.suspendedLanes&=~a;var l=31-Ut(a);t.entangledLanes|=a,t.entanglements[l]=t.entanglements[l]|1073741824|i&261930}function Kt(t,a){var i=t.entangledLanes|=a;for(t=t.entanglements;i;){var l=31-Ut(i),d=1<<l;d&a|t[l]&a&&(t[l]|=a),i&=~d}}function Zt(t,a){var i=a&-a;return i=(i&42)!==0?1:ds(i),(i&(t.suspendedLanes|a))!==0?0:i}function ds(t){switch(t){case 2:t=1;break;case 8:t=4;break;case 32:t=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:t=128;break;case 268435456:t=134217728;break;default:t=0}return t}function Un(t){return t&=-t,2<t?8<t?(t&134217727)!==0?32:268435456:8:2}function ic(){var t=Z.p;return t!==0?t:(t=window.event,t===void 0?32:vy(t.type))}function Dh(t,a){var i=Z.p;try{return Z.p=t,a()}finally{Z.p=i}}var zr=Math.random().toString(36).slice(2),At="__reactFiber$"+zr,Jt="__reactProps$"+zr,fs="__reactContainer$"+zr,oc="__reactEvents$"+zr,n_="__reactListeners$"+zr,r_="__reactHandles$"+zr,Lh="__reactResources$"+zr,Ti="__reactMarker$"+zr;function lc(t){delete t[At],delete t[Jt],delete t[oc],delete t[n_],delete t[r_]}function hs(t){var a=t[At];if(a)return a;for(var i=t.parentNode;i;){if(a=i[fs]||i[At]){if(i=a.alternate,a.child!==null||i!==null&&i.child!==null)for(t=ny(t);t!==null;){if(i=t[At])return i;t=ny(t)}return a}t=i,i=t.parentNode}return null}function ps(t){if(t=t[At]||t[fs]){var a=t.tag;if(a===5||a===6||a===13||a===31||a===26||a===27||a===3)return t}return null}function xi(t){var a=t.tag;if(a===5||a===26||a===27||a===6)return t.stateNode;throw Error(s(33))}function ms(t){var a=t[Lh];return a||(a=t[Lh]={hoistableStyles:new Map,hoistableScripts:new Map}),a}function Et(t){t[Ti]=!0}var Uh=new Set,zh={};function ka(t,a){gs(t,a),gs(t+"Capture",a)}function gs(t,a){for(zh[t]=a,t=0;t<a.length;t++)Uh.add(a[t])}var a_=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]*$"),Bh={},Ph={};function s_(t){return lt.call(Ph,t)?!0:lt.call(Bh,t)?!1:a_.test(t)?Ph[t]=!0:(Bh[t]=!0,!1)}function Jo(t,a,i){if(s_(a))if(i===null)t.removeAttribute(a);else{switch(typeof i){case"undefined":case"function":case"symbol":t.removeAttribute(a);return;case"boolean":var l=a.toLowerCase().slice(0,5);if(l!=="data-"&&l!=="aria-"){t.removeAttribute(a);return}}t.setAttribute(a,""+i)}}function Xo(t,a,i){if(i===null)t.removeAttribute(a);else{switch(typeof i){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(a);return}t.setAttribute(a,""+i)}}function ir(t,a,i,l){if(l===null)t.removeAttribute(i);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(i);return}t.setAttributeNS(a,i,""+l)}}function wn(t){switch(typeof t){case"bigint":case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function Ih(t){var a=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(a==="checkbox"||a==="radio")}function i_(t,a,i){var l=Object.getOwnPropertyDescriptor(t.constructor.prototype,a);if(!t.hasOwnProperty(a)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var d=l.get,h=l.set;return Object.defineProperty(t,a,{configurable:!0,get:function(){return d.call(this)},set:function(v){i=""+v,h.call(this,v)}}),Object.defineProperty(t,a,{enumerable:l.enumerable}),{getValue:function(){return i},setValue:function(v){i=""+v},stopTracking:function(){t._valueTracker=null,delete t[a]}}}}function uc(t){if(!t._valueTracker){var a=Ih(t)?"checked":"value";t._valueTracker=i_(t,a,""+t[a])}}function Hh(t){if(!t)return!1;var a=t._valueTracker;if(!a)return!0;var i=a.getValue(),l="";return t&&(l=Ih(t)?t.checked?"true":"false":t.value),t=l,t!==i?(a.setValue(t),!0):!1}function Fo(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}var o_=/[\n"\\]/g;function Sn(t){return t.replace(o_,function(a){return"\\"+a.charCodeAt(0).toString(16)+" "})}function cc(t,a,i,l,d,h,v,w){t.name="",v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"?t.type=v:t.removeAttribute("type"),a!=null?v==="number"?(a===0&&t.value===""||t.value!=a)&&(t.value=""+wn(a)):t.value!==""+wn(a)&&(t.value=""+wn(a)):v!=="submit"&&v!=="reset"||t.removeAttribute("value"),a!=null?dc(t,v,wn(a)):i!=null?dc(t,v,wn(i)):l!=null&&t.removeAttribute("value"),d==null&&h!=null&&(t.defaultChecked=!!h),d!=null&&(t.checked=d&&typeof d!="function"&&typeof d!="symbol"),w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"?t.name=""+wn(w):t.removeAttribute("name")}function $h(t,a,i,l,d,h,v,w){if(h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"&&(t.type=h),a!=null||i!=null){if(!(h!=="submit"&&h!=="reset"||a!=null)){uc(t);return}i=i!=null?""+wn(i):"",a=a!=null?""+wn(a):i,w||a===t.value||(t.value=a),t.defaultValue=a}l=l??d,l=typeof l!="function"&&typeof l!="symbol"&&!!l,t.checked=w?t.checked:!!l,t.defaultChecked=!!l,v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"&&(t.name=v),uc(t)}function dc(t,a,i){a==="number"&&Fo(t.ownerDocument)===t||t.defaultValue===""+i||(t.defaultValue=""+i)}function ys(t,a,i,l){if(t=t.options,a){a={};for(var d=0;d<i.length;d++)a["$"+i[d]]=!0;for(i=0;i<t.length;i++)d=a.hasOwnProperty("$"+t[i].value),t[i].selected!==d&&(t[i].selected=d),d&&l&&(t[i].defaultSelected=!0)}else{for(i=""+wn(i),a=null,d=0;d<t.length;d++){if(t[d].value===i){t[d].selected=!0,l&&(t[d].defaultSelected=!0);return}a!==null||t[d].disabled||(a=t[d])}a!==null&&(a.selected=!0)}}function qh(t,a,i){if(a!=null&&(a=""+wn(a),a!==t.value&&(t.value=a),i==null)){t.defaultValue!==a&&(t.defaultValue=a);return}t.defaultValue=i!=null?""+wn(i):""}function Vh(t,a,i,l){if(a==null){if(l!=null){if(i!=null)throw Error(s(92));if(Ue(l)){if(1<l.length)throw Error(s(93));l=l[0]}i=l}i==null&&(i=""),a=i}i=wn(a),t.defaultValue=i,l=t.textContent,l===i&&l!==""&&l!==null&&(t.value=l),uc(t)}function vs(t,a){if(a){var i=t.firstChild;if(i&&i===t.lastChild&&i.nodeType===3){i.nodeValue=a;return}}t.textContent=a}var l_=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 Gh(t,a,i){var l=a.indexOf("--")===0;i==null||typeof i=="boolean"||i===""?l?t.setProperty(a,""):a==="float"?t.cssFloat="":t[a]="":l?t.setProperty(a,i):typeof i!="number"||i===0||l_.has(a)?a==="float"?t.cssFloat=i:t[a]=(""+i).trim():t[a]=i+"px"}
vendor: 4,435 bytes, line 9
9function Yh(t,a,i){if(a!=null&&typeof a!="object")throw Error(s(62));if(t=t.style,i!=null){for(var l in i)!i.hasOwnProperty(l)||a!=null&&a.hasOwnProperty(l)||(l.indexOf("--")===0?t.setProperty(l,""):l==="float"?t.cssFloat="":t[l]="");for(var d in a)l=a[d],a.hasOwnProperty(d)&&i[d]!==l&&Gh(t,d,l)}else for(var h in a)a.hasOwnProperty(h)&&Gh(t,h,a[h])}function fc(t){if(t.indexOf("-")===-1)return!1;switch(t){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var u_=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),c_=/^[\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 Qo(t){return c_.test(""+t)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":t}function or(){}var hc=null;function pc(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var bs=null,_s=null;function Kh(t){var a=ps(t);if(a&&(t=a.stateNode)){var i=t[Jt]||null;e:switch(t=a.stateNode,a.type){case"input":if(cc(t,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name),a=i.name,i.type==="radio"&&a!=null){for(i=t;i.parentNode;)i=i.parentNode;for(i=i.querySelectorAll('input[name="'+Sn(""+a)+'"][type="radio"]'),a=0;a<i.length;a++){var l=i[a];if(l!==t&&l.form===t.form){var d=l[Jt]||null;if(!d)throw Error(s(90));cc(l,d.value,d.defaultValue,d.defaultValue,d.checked,d.defaultChecked,d.type,d.name)}}for(a=0;a<i.length;a++)l=i[a],l.form===t.form&&Hh(l)}break e;case"textarea":qh(t,i.value,i.defaultValue);break e;case"select":a=i.value,a!=null&&ys(t,!!i.multiple,a,!1)}}}var mc=!1;
vendor: 1,563 bytes, line 9
9function Zh(t,a,i){if(mc)return t(a,i);mc=!0;try{var l=t(a);return l}finally{if(mc=!1,(bs!==null||_s!==null)&&(Pl(),bs&&(a=bs,t=_s,_s=bs=null,Kh(a),t)))for(a=0;a<t.length;a++)Kh(t[a])}}function Ri(t,a){var i=t.stateNode;if(i===null)return null;var l=i[Jt]||null;if(l===null)return null;i=l[a];e:switch(a){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(l=!l.disabled)||(t=t.type,l=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!l;break e;default:t=!1}if(t)return null;if(i&&typeof i!="function")throw Error(s(231,a,typeof i));return i}var lr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),gc=!1;if(lr)try{var Ai={};Object.defineProperty(Ai,"passive",{get:function(){gc=!0}}),window.addEventListener("test",Ai,Ai),window.removeEventListener("test",Ai,Ai)}catch{gc=!1}var Br=null,yc=null,Wo=null;function Jh(){if(Wo)return Wo;var t,a=yc,i=a.length,l,d="value"in Br?Br.value:Br.textContent,h=d.length;for(t=0;t<i&&a[t]===d[t];t++);var v=i-t;for(l=1;l<=v&&a[i-l]===d[h-l];l++);return Wo=d.slice(t,1<l?1-l:void 0)}function el(t){var a=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&a===13&&(t=13)):t=a,t===10&&(t=13),32<=t||t===13?t:0}function tl(){return!0}function Xh(){return!1}function Xt(t){function a(i,l,d,h,v){this._reactName=i,this._targetInst=d,this.type=l,this.nativeEvent=h,this.target=v,this.currentTarget=null;
vendor: 4,948 bytes, line 9
9for(var w in t)t.hasOwnProperty(w)&&(i=t[w],this[w]=i?i(h):h[w]);return this.isDefaultPrevented=(h.defaultPrevented!=null?h.defaultPrevented:h.returnValue===!1)?tl:Xh,this.isPropagationStopped=Xh,this}return g(a.prototype,{preventDefault:function(){this.defaultPrevented=!0;var i=this.nativeEvent;i&&(i.preventDefault?i.preventDefault():typeof i.returnValue!="unknown"&&(i.returnValue=!1),this.isDefaultPrevented=tl)},stopPropagation:function(){var i=this.nativeEvent;i&&(i.stopPropagation?i.stopPropagation():typeof i.cancelBubble!="unknown"&&(i.cancelBubble=!0),this.isPropagationStopped=tl)},persist:function(){},isPersistent:tl}),a}var Ca={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},nl=Xt(Ca),Oi=g({},Ca,{view:0,detail:0}),d_=Xt(Oi),vc,bc,ki,rl=g({},Oi,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:wc,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==ki&&(ki&&t.type==="mousemove"?(vc=t.screenX-ki.screenX,bc=t.screenY-ki.screenY):bc=vc=0,ki=t),vc)},movementY:function(t){return"movementY"in t?t.movementY:bc}}),Fh=Xt(rl),f_=g({},rl,{dataTransfer:0}),h_=Xt(f_),p_=g({},Oi,{relatedTarget:0}),_c=Xt(p_),m_=g({},Ca,{animationName:0,elapsedTime:0,pseudoElement:0}),g_=Xt(m_),y_=g({},Ca,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),v_=Xt(y_),b_=g({},Ca,{data:0}),Qh=Xt(b_),__={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},w_={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"},S_={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function E_(t){var a=this.nativeEvent;return a.getModifierState?a.getModifierState(t):(t=S_[t])?!!a[t]:!1}function wc(){return E_}var T_=g({},Oi,{key:function(t){if(t.key){var a=__[t.key]||t.key;if(a!=="Unidentified")return a}return t.type==="keypress"?(t=el(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?w_[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:wc,charCode:function(t){return t.type==="keypress"?el(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?el(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),x_=Xt(T_),R_=g({},rl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Wh=Xt(R_),A_=g({},Oi,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:wc}),O_=Xt(A_),k_=g({},Ca,{propertyName:0,elapsedTime:0,pseudoElement:0}),C_=Xt(k_),j_=g({},rl,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),N_=Xt(j_),M_=g({},Ca,{newState:0,oldState:0}),D_=Xt(M_),L_=[9,13,27,32],Sc=lr&&"CompositionEvent"in window,Ci=null;lr&&"documentMode"in document&&(Ci=document.documentMode);var U_=lr&&"TextEvent"in window&&!Ci,ep=lr&&(!Sc||Ci&&8<Ci&&11>=Ci),tp=" ",np=!1;function rp(t,a){switch(t){case"keyup":return L_.indexOf(a.keyCode)!==-1;case"keydown":return a.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ap(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var ws=!1;function z_(t,a){switch(t){case"compositionend":return ap(a);case"keypress":return a.which!==32?null:(np=!0,tp);case"textInput":return t=a.data,t===tp&&np?null:t;default:return null}}function B_(t,a){if(ws)return t==="compositionend"||!Sc&&rp(t,a)?(t=Jh(),Wo=yc=Br=null,ws=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(a.ctrlKey||a.altKey||a.metaKey)||a.ctrlKey&&a.altKey){if(a.char&&1<a.char.length)return a.char;if(a.which)return String.fromCharCode(a.which)}return null;case"compositionend":return ep&&a.locale!=="ko"?null:a.data;default:return null}}var P_={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 sp(t){var a=t&&t.nodeName&&t.nodeName.toLowerCase();return a==="input"?!!P_[t.type]:a==="textarea"}
vendor: 5,364 bytes, line 9
9function ip(t,a,i,l){bs?_s?_s.push(l):_s=[l]:bs=l,a=Yl(a,"onChange"),0<a.length&&(i=new nl("onChange","change",null,i,l),t.push({event:i,listeners:a}))}var ji=null,Ni=null;function I_(t){$g(t,0)}function al(t){var a=xi(t);if(Hh(a))return t}function op(t,a){if(t==="change")return a}var lp=!1;if(lr){var Ec;if(lr){var Tc="oninput"in document;if(!Tc){var up=document.createElement("div");up.setAttribute("oninput","return;"),Tc=typeof up.oninput=="function"}Ec=Tc}else Ec=!1;lp=Ec&&(!document.documentMode||9<document.documentMode)}function cp(){ji&&(ji.detachEvent("onpropertychange",dp),Ni=ji=null)}function dp(t){if(t.propertyName==="value"&&al(Ni)){var a=[];ip(a,Ni,t,pc(t)),Zh(I_,a)}}function H_(t,a,i){t==="focusin"?(cp(),ji=a,Ni=i,ji.attachEvent("onpropertychange",dp)):t==="focusout"&&cp()}function $_(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return al(Ni)}function q_(t,a){if(t==="click")return al(a)}function V_(t,a){if(t==="input"||t==="change")return al(a)}function G_(t,a){return t===a&&(t!==0||1/t===1/a)||t!==t&&a!==a}var fn=typeof Object.is=="function"?Object.is:G_;function Mi(t,a){if(fn(t,a))return!0;if(typeof t!="object"||t===null||typeof a!="object"||a===null)return!1;var i=Object.keys(t),l=Object.keys(a);if(i.length!==l.length)return!1;for(l=0;l<i.length;l++){var d=i[l];if(!lt.call(a,d)||!fn(t[d],a[d]))return!1}return!0}function fp(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function hp(t,a){var i=fp(t);t=0;for(var l;i;){if(i.nodeType===3){if(l=t+i.textContent.length,t<=a&&l>=a)return{node:i,offset:a-t};t=l}e:{for(;i;){if(i.nextSibling){i=i.nextSibling;break e}i=i.parentNode}i=void 0}i=fp(i)}}function pp(t,a){return t&&a?t===a?!0:t&&t.nodeType===3?!1:a&&a.nodeType===3?pp(t,a.parentNode):"contains"in t?t.contains(a):t.compareDocumentPosition?!!(t.compareDocumentPosition(a)&16):!1:!1}function mp(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var a=Fo(t.document);a instanceof t.HTMLIFrameElement;){try{var i=typeof a.contentWindow.location.href=="string"}catch{i=!1}if(i)t=a.contentWindow;else break;a=Fo(t.document)}return a}function xc(t){var a=t&&t.nodeName&&t.nodeName.toLowerCase();return a&&(a==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||a==="textarea"||t.contentEditable==="true")}var Y_=lr&&"documentMode"in document&&11>=document.documentMode,Ss=null,Rc=null,Di=null,Ac=!1;function gp(t,a,i){var l=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;Ac||Ss==null||Ss!==Fo(l)||(l=Ss,"selectionStart"in l&&xc(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}),Di&&Mi(Di,l)||(Di=l,l=Yl(Rc,"onSelect"),0<l.length&&(a=new nl("onSelect","select",null,a,i),t.push({event:a,listeners:l}),a.target=Ss)))}function ja(t,a){var i={};return i[t.toLowerCase()]=a.toLowerCase(),i["Webkit"+t]="webkit"+a,i["Moz"+t]="moz"+a,i}var Es={animationend:ja("Animation","AnimationEnd"),animationiteration:ja("Animation","AnimationIteration"),animationstart:ja("Animation","AnimationStart"),transitionrun:ja("Transition","TransitionRun"),transitionstart:ja("Transition","TransitionStart"),transitioncancel:ja("Transition","TransitionCancel"),transitionend:ja("Transition","TransitionEnd")},Oc={},yp={};lr&&(yp=document.createElement("div").style,"AnimationEvent"in window||(delete Es.animationend.animation,delete Es.animationiteration.animation,delete Es.animationstart.animation),"TransitionEvent"in window||delete Es.transitionend.transition);function Na(t){if(Oc[t])return Oc[t];if(!Es[t])return t;var a=Es[t],i;for(i in a)if(a.hasOwnProperty(i)&&i in yp)return Oc[t]=a[i];return t}var vp=Na("animationend"),bp=Na("animationiteration"),_p=Na("animationstart"),K_=Na("transitionrun"),Z_=Na("transitionstart"),J_=Na("transitioncancel"),wp=Na("transitionend"),Sp=new Map,kc="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(" ");kc.push("scrollEnd");function zn(t,a){Sp.set(t,a),ka(a,[t])}var sl=typeof reportError=="function"?reportError:function(t){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var a=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof t=="object"&&t!==null&&typeof t.message=="string"?String(t.message):String(t),error:t});if(!window.dispatchEvent(a))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",t);return}console.error(t)},En=[],Ts=0,Cc=0;function il(){for(var t=Ts,a=Cc=Ts=0;a<t;){var i=En[a];En[a++]=null;var l=En[a];En[a++]=null;var d=En[a];En[a++]=null;var h=En[a];if(En[a++]=null,l!==null&&d!==null){var v=l.pending;
vendor: 16,410 bytes, line 9
9v===null?d.next=d:(d.next=v.next,v.next=d),l.pending=d}h!==0&&Ep(i,d,h)}}function ol(t,a,i,l){En[Ts++]=t,En[Ts++]=a,En[Ts++]=i,En[Ts++]=l,Cc|=l,t.lanes|=l,t=t.alternate,t!==null&&(t.lanes|=l)}function jc(t,a,i,l){return ol(t,a,i,l),ll(t)}function Ma(t,a){return ol(t,null,null,a),ll(t)}function Ep(t,a,i){t.lanes|=i;var l=t.alternate;l!==null&&(l.lanes|=i);for(var d=!1,h=t.return;h!==null;)h.childLanes|=i,l=h.alternate,l!==null&&(l.childLanes|=i),h.tag===22&&(t=h.stateNode,t===null||t._visibility&1||(d=!0)),t=h,h=h.return;return t.tag===3?(h=t.stateNode,d&&a!==null&&(d=31-Ut(i),t=h.hiddenUpdates,l=t[d],l===null?t[d]=[a]:l.push(a),a.lane=i|536870912),h):null}function ll(t){if(50<no)throw no=0,Id=null,Error(s(185));for(var a=t.return;a!==null;)t=a,a=t.return;return t.tag===3?t.stateNode:null}var xs={};function X_(t,a,i,l){this.tag=t,this.key=i,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=a,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 hn(t,a,i,l){return new X_(t,a,i,l)}function Nc(t){return t=t.prototype,!(!t||!t.isReactComponent)}function ur(t,a){var i=t.alternate;return i===null?(i=hn(t.tag,a,t.key,t.mode),i.elementType=t.elementType,i.type=t.type,i.stateNode=t.stateNode,i.alternate=t,t.alternate=i):(i.pendingProps=a,i.type=t.type,i.flags=0,i.subtreeFlags=0,i.deletions=null),i.flags=t.flags&65011712,i.childLanes=t.childLanes,i.lanes=t.lanes,i.child=t.child,i.memoizedProps=t.memoizedProps,i.memoizedState=t.memoizedState,i.updateQueue=t.updateQueue,a=t.dependencies,i.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext},i.sibling=t.sibling,i.index=t.index,i.ref=t.ref,i.refCleanup=t.refCleanup,i}function Tp(t,a){t.flags&=65011714;var i=t.alternate;return i===null?(t.childLanes=0,t.lanes=a,t.child=null,t.subtreeFlags=0,t.memoizedProps=null,t.memoizedState=null,t.updateQueue=null,t.dependencies=null,t.stateNode=null):(t.childLanes=i.childLanes,t.lanes=i.lanes,t.child=i.child,t.subtreeFlags=0,t.deletions=null,t.memoizedProps=i.memoizedProps,t.memoizedState=i.memoizedState,t.updateQueue=i.updateQueue,t.type=i.type,a=i.dependencies,t.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext}),t}function ul(t,a,i,l,d,h){var v=0;if(l=t,typeof t=="function")Nc(t)&&(v=1);else if(typeof t=="string")v=tS(t,i,X.current)?26:t==="html"||t==="head"||t==="body"?27:5;else e:switch(t){case Q:return t=hn(31,i,a,d),t.elementType=Q,t.lanes=h,t;case A:return Da(i.children,d,h,a);case R:v=8,d|=24;break;case x:return t=hn(12,i,a,d|2),t.elementType=x,t.lanes=h,t;case J:return t=hn(13,i,a,d),t.elementType=J,t.lanes=h,t;case K:return t=hn(19,i,a,d),t.elementType=K,t.lanes=h,t;default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case N:v=10;break e;case M:v=9;break e;case B:v=11;break e;case I:v=14;break e;case F:v=16,l=null;break e}v=29,i=Error(s(130,t===null?"null":typeof t,"")),l=null}return a=hn(v,i,a,d),a.elementType=t,a.type=l,a.lanes=h,a}function Da(t,a,i,l){return t=hn(7,t,l,a),t.lanes=i,t}function Mc(t,a,i){return t=hn(6,t,null,a),t.lanes=i,t}function xp(t){var a=hn(18,null,null,0);return a.stateNode=t,a}function Dc(t,a,i){return a=hn(4,t.children!==null?t.children:[],t.key,a),a.lanes=i,a.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},a}var Rp=new WeakMap;function Tn(t,a){if(typeof t=="object"&&t!==null){var i=Rp.get(t);return i!==void 0?i:(a={value:t,source:a,stack:ar(a)},Rp.set(t,a),a)}return{value:t,source:a,stack:ar(a)}}var Rs=[],As=0,cl=null,Li=0,xn=[],Rn=0,Pr=null,Yn=1,Kn="";function cr(t,a){Rs[As++]=Li,Rs[As++]=cl,cl=t,Li=a}function Ap(t,a,i){xn[Rn++]=Yn,xn[Rn++]=Kn,xn[Rn++]=Pr,Pr=t;var l=Yn;t=Kn;var d=32-Ut(l)-1;l&=~(1<<d),i+=1;var h=32-Ut(a)+d;if(30<h){var v=d-d%5;h=(l&(1<<v)-1).toString(32),l>>=v,d-=v,Yn=1<<32-Ut(a)+d|i<<d|l,Kn=h+t}else Yn=1<<h|i<<d|l,Kn=t}function Lc(t){t.return!==null&&(cr(t,1),Ap(t,1,0))}function Uc(t){for(;t===cl;)cl=Rs[--As],Rs[As]=null,Li=Rs[--As],Rs[As]=null;for(;t===Pr;)Pr=xn[--Rn],xn[Rn]=null,Kn=xn[--Rn],xn[Rn]=null,Yn=xn[--Rn],xn[Rn]=null}function Op(t,a){xn[Rn++]=Yn,xn[Rn++]=Kn,xn[Rn++]=Pr,Yn=a.id,Kn=a.overflow,Pr=t}var Ot=null,We=null,Le=!1,Ir=null,An=!1,zc=Error(s(519));function Hr(t){var a=Error(s(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Ui(Tn(a,t)),zc}function kp(t){var a=t.stateNode,i=t.type,l=t.memoizedProps;switch(a[At]=t,a[Jt]=l,i){case"dialog":Ne("cancel",a),Ne("close",a);break;case"iframe":case"object":case"embed":Ne("load",a);break;case"video":case"audio":for(i=0;i<ao.length;i++)Ne(ao[i],a);break;case"source":Ne("error",a);break;case"img":case"image":case"link":Ne("error",a),Ne("load",a);break;case"details":Ne("toggle",a);break;case"input":Ne("invalid",a),$h(a,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0);break;case"select":Ne("invalid",a);break;case"textarea":Ne("invalid",a),Vh(a,l.value,l.defaultValue,l.children)}i=l.children,typeof i!="string"&&typeof i!="number"&&typeof i!="bigint"||a.textContent===""+i||l.suppressHydrationWarning===!0||Yg(a.textContent,i)?(l.popover!=null&&(Ne("beforetoggle",a),Ne("toggle",a)),l.onScroll!=null&&Ne("scroll",a),l.onScrollEnd!=null&&Ne("scrollend",a),l.onClick!=null&&(a.onclick=or),a=!0):a=!1,a||Hr(t,!0)}function Cp(t){for(Ot=t.return;Ot;)switch(Ot.tag){case 5:case 31:case 13:An=!1;return;case 27:case 3:An=!0;return;default:Ot=Ot.return}}function Os(t){if(t!==Ot)return!1;if(!Le)return Cp(t),Le=!0,!1;var a=t.tag,i;if((i=a!==3&&a!==27)&&((i=a===5)&&(i=t.type,i=!(i!=="form"&&i!=="button")||tf(t.type,t.memoizedProps)),i=!i),i&&We&&Hr(t),Cp(t),a===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(s(317));We=ty(t)}else if(a===31){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(s(317));We=ty(t)}else a===27?(a=We,ta(t.type)?(t=of,of=null,We=t):We=a):We=Ot?kn(t.stateNode.nextSibling):null;return!0}function La(){We=Ot=null,Le=!1}function Bc(){var t=Ir;return t!==null&&(en===null?en=t:en.push.apply(en,t),Ir=null),t}function Ui(t){Ir===null?Ir=[t]:Ir.push(t)}var Pc=k(null),Ua=null,dr=null;function $r(t,a,i){G(Pc,a._currentValue),a._currentValue=i}function fr(t){t._currentValue=Pc.current,q(Pc)}function Ic(t,a,i){for(;t!==null;){var l=t.alternate;if((t.childLanes&a)!==a?(t.childLanes|=a,l!==null&&(l.childLanes|=a)):l!==null&&(l.childLanes&a)!==a&&(l.childLanes|=a),t===i)break;t=t.return}}function Hc(t,a,i,l){var d=t.child;for(d!==null&&(d.return=t);d!==null;){var h=d.dependencies;if(h!==null){var v=d.child;h=h.firstContext;e:for(;h!==null;){var w=h;h=d;for(var O=0;O<a.length;O++)if(w.context===a[O]){h.lanes|=i,w=h.alternate,w!==null&&(w.lanes|=i),Ic(h.return,i,t),l||(v=null);break e}h=w.next}}else if(d.tag===18){if(v=d.return,v===null)throw Error(s(341));v.lanes|=i,h=v.alternate,h!==null&&(h.lanes|=i),Ic(v,i,t),v=null}else v=d.child;if(v!==null)v.return=d;else for(v=d;v!==null;){if(v===t){v=null;break}if(d=v.sibling,d!==null){d.return=v.return,v=d;break}v=v.return}d=v}}function ks(t,a,i,l){t=null;for(var d=a,h=!1;d!==null;){if(!h){if((d.flags&524288)!==0)h=!0;else if((d.flags&262144)!==0)break}if(d.tag===10){var v=d.alternate;if(v===null)throw Error(s(387));if(v=v.memoizedProps,v!==null){var w=d.type;fn(d.pendingProps.value,v.value)||(t!==null?t.push(w):t=[w])}}else if(d===xe.current){if(v=d.alternate,v===null)throw Error(s(387));v.memoizedState.memoizedState!==d.memoizedState.memoizedState&&(t!==null?t.push(uo):t=[uo])}d=d.return}t!==null&&Hc(a,t,i,l),a.flags|=262144}function dl(t){for(t=t.firstContext;t!==null;){if(!fn(t.context._currentValue,t.memoizedValue))return!0;t=t.next}return!1}function za(t){Ua=t,dr=null,t=t.dependencies,t!==null&&(t.firstContext=null)}function kt(t){return jp(Ua,t)}function fl(t,a){return Ua===null&&za(t),jp(t,a)}function jp(t,a){var i=a._currentValue;if(a={context:a,memoizedValue:i,next:null},dr===null){if(t===null)throw Error(s(308));dr=a,t.dependencies={lanes:0,firstContext:a},t.flags|=524288}else dr=dr.next=a;return i}var F_=typeof AbortController<"u"?AbortController:function(){var t=[],a=this.signal={aborted:!1,addEventListener:function(i,l){t.push(l)}};this.abort=function(){a.aborted=!0,t.forEach(function(i){return i()})}},Q_=n.unstable_scheduleCallback,W_=n.unstable_NormalPriority,dt={$$typeof:N,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function $c(){return{controller:new F_,data:new Map,refCount:0}}function zi(t){t.refCount--,t.refCount===0&&Q_(W_,function(){t.controller.abort()})}var Bi=null,qc=0,Cs=0,js=null;function ew(t,a){if(Bi===null){var i=Bi=[];qc=0,Cs=Yd(),js={status:"pending",value:void 0,then:function(l){i.push(l)}}}return qc++,a.then(Np,Np),a}function Np(){if(--qc===0&&Bi!==null){js!==null&&(js.status="fulfilled");var t=Bi;Bi=null,Cs=0,js=null;for(var a=0;a<t.length;a++)(0,t[a])()}}function tw(t,a){var i=[],l={status:"pending",value:null,reason:null,then:function(d){i.push(d)}};return t.then(function(){l.status="fulfilled",l.value=a;for(var d=0;d<i.length;d++)(0,i[d])(a)},function(d){for(l.status="rejected",l.reason=d,d=0;d<i.length;d++)(0,i[d])(void 0)}),l}var Mp=L.S;L.S=function(t,a){gg=Oe(),typeof a=="object"&&a!==null&&typeof a.then=="function"&&ew(t,a),Mp!==null&&Mp(t,a)};var Ba=k(null);function Vc(){var t=Ba.current;return t!==null?t:Xe.pooledCache}function hl(t,a){a===null?G(Ba,Ba.current):G(Ba,a.pool)}function Dp(){var t=Vc();return t===null?null:{parent:dt._currentValue,pool:t}}var Ns=Error(s(460)),Gc=Error(s(474)),pl=Error(s(542)),ml={then:function(){}};function Lp(t){return t=t.status,t==="fulfilled"||t==="rejected"}function Up(t,a,i){switch(i=t[i],i===void 0?t.push(a):i!==a&&(a.then(or,or),a=i),a.status){case"fulfilled":return a.value;case"rejected":throw t=a.reason,Bp(t),t;default:if(typeof a.status=="string")a.then(or,or);else{if(t=Xe,t!==null&&100<t.shellSuspendCounter)throw Error(s(482));t=a,t.status="pending",t.then(function(l){if(a.status==="pending"){var d=a;d.status="fulfilled",d.value=l}},function(l){if(a.status==="pending"){var d=a;d.status="rejected",d.reason=l}})}switch(a.status){case"fulfilled":return a.value;case"rejected":throw t=a.reason,Bp(t),t}throw Ia=a,Ns}}function Pa(t){try{var a=t._init;return a(t._payload)}catch(i){throw i!==null&&typeof i=="object"&&typeof i.then=="function"?(Ia=i,Ns):i}}var Ia=null;function zp(){if(Ia===null)throw Error(s(459));var t=Ia;return Ia=null,t}function Bp(t){if(t===Ns||t===pl)throw Error(s(483))}var Ms=null,Pi=0;function gl(t){var a=Pi;return Pi+=1,Ms===null&&(Ms=[]),Up(Ms,t,a)}function Ii(t,a){a=a.props.ref,t.ref=a!==void 0?a:null}function yl(t,a){throw a.$$typeof===b?Error(s(525)):(t=Object.prototype.toString.call(a),Error(s(31,t==="[object Object]"?"object with keys {"+Object.keys(a).join(", ")+"}":t)))}function Pp(t){function a(j,C){if(t){var D=j.deletions;D===null?(j.deletions=[C],j.flags|=16):D.push(C)}}function i(j,C){if(!t)return null;for(;C!==null;)a(j,C),C=C.sibling;return null}function l(j){for(var C=new Map;j!==null;)j.key!==null?C.set(j.key,j):C.set(j.index,j),j=j.sibling;return C}function d(j,C){return j=ur(j,C),j.index=0,j.sibling=null,j}function h(j,C,D){return j.index=D,t?(D=j.alternate,D!==null?(D=D.index,D<C?(j.flags|=67108866,C):D):(j.flags|=67108866,C)):(j.flags|=1048576,C)}function v(j){return t&&j.alternate===null&&(j.flags|=67108866),j}function w(j,C,D,V){return C===null||C.tag!==6?(C=Mc(D,j.mode,V),C.return=j,C):(C=d(C,D),C.return=j,C)}function O(j,C,D,V){var fe=D.type;return fe===A?$(j,C,D.props.children,V,D.key):C!==null&&(C.elementType===fe||typeof fe=="object"&&fe!==null&&fe.$$typeof===F&&Pa(fe)===C.type)?(C=d(C,D.props),Ii(C,D),C.return=j,C):(C=ul(D.type,D.key,D.props,null,j.mode,V),Ii(C,D),C.return=j,C)}function U(j,C,D,V){return C===null||C.tag!==4||C.stateNode.containerInfo!==D.containerInfo||C.stateNode.implementation!==D.implementation?(C=Dc(D,j.mode,V),C.return=j,C):(C=d(C,D.children||[]),C.return=j,C)}function $(j,C,D,V,fe){return C===null||C.tag!==7?(C=Da(D,j.mode,V,fe),C.return=j,C):(C=d(C,D),C.return=j,C)}function Y(j,C,D){if(typeof C=="string"&&C!==""||typeof C=="number"||typeof C=="bigint")return C=Mc(""+C,j.mode,D),C.return=j,C;if(typeof C=="object"&&C!==null){switch(C.$$typeof){case _:return D=ul(C.type,C.key,C.props,null,j.mode,D),Ii(D,C),D.return=j,D;case S:return C=Dc(C,j.mode,D),C.return=j,C;case F:return C=Pa(C),Y(j,C,D)}if(Ue(C)||_e(C))return C=Da(C,j.mode,D,null),C.return=j,C;if(typeof C.then=="function")return Y(j,gl(C),D);if(C.$$typeof===N)return Y(j,fl(j,C),D);yl(j,C)}return null}function z(j,C,D,V){var fe=C!==null?C.key:null;if(typeof D=="string"&&D!==""||typeof D=="number"||typeof D=="bigint")return fe!==null?null:w(j,C,""+D,V);if(typeof D=="object"&&D!==null){switch(D.$$typeof){case _:return D.key===fe?O(j,C,D,V):null;case S:return D.key===fe?U(j,C,D,V):null;case F:return D=Pa(D),z(j,C,D,V)}if(Ue(D)||_e(D))return fe!==null?null:$(j,C,D,V,null);if(typeof D.then=="function")return z(j,C,gl(D),V);if(D.$$typeof===N)return z(j,C,fl(j,D),V);yl(j,D)}return null}function P(j,C,D,V,fe){if(typeof V=="string"&&V!==""||typeof V=="number"||typeof V=="bigint")return j=j.get(D)||null,w(C,j,""+V,fe);if(typeof V=="object"&&V!==null){switch(V.$$typeof){case _:return j=j.get(V.key===null?D:V.key)||null,O(C,j,V,fe);case S:return j=j.get(V.key===null?D:V.key)||null,U(C,j,V,fe);case F:return V=Pa(V),P(j,C,D,V,fe)}if(Ue(V)||_e(V))return j=j.get(D)||null,$(C,j,V,fe,null);if(typeof V.then=="function")return P(j,C,D,gl(V),fe);if(V.$$typeof===N)return P(j,C,D,fl(C,V),fe);yl(C,V)}return null}function ie(j,C,D,V){for(var fe=null,Pe=null,ce=C,Ae=C=0,De=null;ce!==null&&Ae<D.length;Ae++){ce.index>Ae?(De=ce,ce=null):De=ce.sibling;var Ie=z(j,ce,D[Ae],V);if(Ie===null){ce===null&&(ce=De);break}t&&ce&&Ie.alternate===null&&a(j,ce),C=h(Ie,C,Ae),Pe===null?fe=Ie:Pe.sibling=Ie,Pe=Ie,ce=De}if(Ae===D.length)return i(j,ce),Le&&cr(j,Ae),fe;if(ce===null){for(;Ae<D.length;Ae++)ce=Y(j,D[Ae],V),ce!==null&&(C=h(ce,C,Ae),Pe===null?fe=ce:Pe.sibling=ce,Pe=ce);return Le&&cr(j,Ae),fe}for(ce=l(ce);Ae<D.length;Ae++)De=P(ce,j,Ae,D[Ae],V),De!==null&&(t&&De.alternate!==null&&ce.delete(De.key===null?Ae:De.key),C=h(De,C,Ae),Pe===null?fe=De:Pe.sibling=De,Pe=De);return t&&ce.forEach(function(ia){return a(j,ia)}),Le&&cr(j,Ae),fe}function me(j,C,D,V){if(D==null)throw Error(s(151));for(var fe=null,Pe=null,ce=C,Ae=C=0,De=null,Ie=D.next();ce!==null&&!Ie.done;Ae++,Ie=D.next()){ce.index>Ae?(De=ce,ce=null):De=ce.sibling;var ia=z(j,ce,Ie.value,V);if(ia===null){ce===null&&(ce=De);break}t&&ce&&ia.alternate===null&&a(j,ce),C=h(ia,C,Ae),Pe===null?fe=ia:Pe.sibling=ia,Pe=ia,ce=De}if(Ie.done)return i(j,ce),Le&&cr(j,Ae),fe;if(ce===null){for(;!Ie.done;Ae++,Ie=D.next())Ie=Y(j,Ie.value,V),Ie!==null&&(C=h(Ie,C,Ae),Pe===null?fe=Ie:Pe.sibling=Ie,Pe=Ie);return Le&&cr(j,Ae),fe}for(ce=l(ce);!Ie.done;Ae++,Ie=D.next())Ie=P(ce,j,Ae,Ie.value,V),Ie!==null&&(t&&Ie.alternate!==null&&ce.delete(Ie.key===null?Ae:Ie.key),C=h(Ie,C,Ae),Pe===null?fe=Ie:Pe.sibling=Ie,Pe=Ie);return t&&ce.forEach(function(fS){return a(j,fS)}),Le&&cr(j,Ae),fe}function Ze(j,C,D,V){if(typeof D=="object"&&D!==null&&D.type===A&&D.key===null&&(D=D.props.children),typeof D=="object"&&D!==null){switch(D.$$typeof){case _:e:{for(var fe=D.key;C!==null;){if(C.key===fe){if(fe=D.type,fe===A){if(C.tag===7){i(j,C.sibling),V=d(C,D.props.children),V.return=j,j=V;break e}}else if(C.elementType===fe||typeof fe=="object"&&fe!==null&&fe.$$typeof===F&&Pa(fe)===C.type){i(j,C.sibling),V=d(C,D.props),Ii(V,D),V.return=j,j=V;break e}i(j,C);break}else a(j,C);C=C.sibling}D.type===A?(V=Da(D.props.children,j.mode,V,D.key),V.return=j,j=V):(V=ul(D.type,D.key,D.props,null,j.mode,V),Ii(V,D),V.return=j,j=V)}return v(j);case S:e:{for(fe=D.key;C!==null;){if(C.key===fe)if(C.tag===4&&C.stateNode.containerInfo===D.containerInfo&&C.stateNode.implementation===D.implementation){i(j,C.sibling),V=d(C,D.children||[]),V.return=j,j=V;break e}else{i(j,C);break}else a(j,C);C=C.sibling}V=Dc(D,j.mode,V),V.return=j,j=V}return v(j);case F:return D=Pa(D),Ze(j,C,D,V)}if(Ue(D))return ie(j,C,D,V);if(_e(D)){if(fe=_e(D),typeof fe!="function")throw Error(s(150));return D=fe.call(D),me(j,C,D,V)}if(typeof D.then=="function")return Ze(j,C,gl(D),V);if(D.$$typeof===N)return Ze(j,C,fl(j,D),V);yl(j,D)}
vendor: 5,328 bytes, line 9
9return typeof D=="string"&&D!==""||typeof D=="number"||typeof D=="bigint"?(D=""+D,C!==null&&C.tag===6?(i(j,C.sibling),V=d(C,D),V.return=j,j=V):(i(j,C),V=Mc(D,j.mode,V),V.return=j,j=V),v(j)):i(j,C)}return function(j,C,D,V){try{Pi=0;var fe=Ze(j,C,D,V);return Ms=null,fe}catch(ce){if(ce===Ns||ce===pl)throw ce;var Pe=hn(29,ce,null,j.mode);return Pe.lanes=V,Pe.return=j,Pe}}}var Ha=Pp(!0),Ip=Pp(!1),qr=!1;function Yc(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Kc(t,a){t=t.updateQueue,a.updateQueue===t&&(a.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,callbacks:null})}function Vr(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function Gr(t,a,i){var l=t.updateQueue;if(l===null)return null;if(l=l.shared,(qe&2)!==0){var d=l.pending;return d===null?a.next=a:(a.next=d.next,d.next=a),l.pending=a,a=ll(t),Ep(t,null,i),a}return ol(t,l,a,i),ll(t)}function Hi(t,a,i){if(a=a.updateQueue,a!==null&&(a=a.shared,(i&4194048)!==0)){var l=a.lanes;l&=t.pendingLanes,i|=l,a.lanes=i,Kt(t,i)}}function Zc(t,a){var i=t.updateQueue,l=t.alternate;if(l!==null&&(l=l.updateQueue,i===l)){var d=null,h=null;if(i=i.firstBaseUpdate,i!==null){do{var v={lane:i.lane,tag:i.tag,payload:i.payload,callback:null,next:null};h===null?d=h=v:h=h.next=v,i=i.next}while(i!==null);h===null?d=h=a:h=h.next=a}else d=h=a;i={baseState:l.baseState,firstBaseUpdate:d,lastBaseUpdate:h,shared:l.shared,callbacks:l.callbacks},t.updateQueue=i;return}t=i.lastBaseUpdate,t===null?i.firstBaseUpdate=a:t.next=a,i.lastBaseUpdate=a}var Jc=!1;function $i(){if(Jc){var t=js;if(t!==null)throw t}}function qi(t,a,i,l){Jc=!1;var d=t.updateQueue;qr=!1;var h=d.firstBaseUpdate,v=d.lastBaseUpdate,w=d.shared.pending;if(w!==null){d.shared.pending=null;var O=w,U=O.next;O.next=null,v===null?h=U:v.next=U,v=O;var $=t.alternate;$!==null&&($=$.updateQueue,w=$.lastBaseUpdate,w!==v&&(w===null?$.firstBaseUpdate=U:w.next=U,$.lastBaseUpdate=O))}if(h!==null){var Y=d.baseState;v=0,$=U=O=null,w=h;do{var z=w.lane&-536870913,P=z!==w.lane;if(P?(Me&z)===z:(l&z)===z){z!==0&&z===Cs&&(Jc=!0),$!==null&&($=$.next={lane:0,tag:w.tag,payload:w.payload,callback:null,next:null});e:{var ie=t,me=w;z=a;var Ze=i;switch(me.tag){case 1:if(ie=me.payload,typeof ie=="function"){Y=ie.call(Ze,Y,z);break e}Y=ie;break e;case 3:ie.flags=ie.flags&-65537|128;case 0:if(ie=me.payload,z=typeof ie=="function"?ie.call(Ze,Y,z):ie,z==null)break e;Y=g({},Y,z);break e;case 2:qr=!0}}z=w.callback,z!==null&&(t.flags|=64,P&&(t.flags|=8192),P=d.callbacks,P===null?d.callbacks=[z]:P.push(z))}else P={lane:z,tag:w.tag,payload:w.payload,callback:w.callback,next:null},$===null?(U=$=P,O=Y):$=$.next=P,v|=z;if(w=w.next,w===null){if(w=d.shared.pending,w===null)break;P=w,w=P.next,P.next=null,d.lastBaseUpdate=P,d.shared.pending=null}}while(!0);$===null&&(O=Y),d.baseState=O,d.firstBaseUpdate=U,d.lastBaseUpdate=$,h===null&&(d.shared.lanes=0),Xr|=v,t.lanes=v,t.memoizedState=Y}}function Hp(t,a){if(typeof t!="function")throw Error(s(191,t));t.call(a)}function $p(t,a){var i=t.callbacks;if(i!==null)for(t.callbacks=null,t=0;t<i.length;t++)Hp(i[t],a)}var Ds=k(null),vl=k(0);function qp(t,a){t=wr,G(vl,t),G(Ds,a),wr=t|a.baseLanes}function Xc(){G(vl,wr),G(Ds,Ds.current)}function Fc(){wr=vl.current,q(Ds),q(vl)}var pn=k(null),On=null;function Yr(t){var a=t.alternate;G(ut,ut.current&1),G(pn,t),On===null&&(a===null||Ds.current!==null||a.memoizedState!==null)&&(On=t)}function Qc(t){G(ut,ut.current),G(pn,t),On===null&&(On=t)}function Vp(t){t.tag===22?(G(ut,ut.current),G(pn,t),On===null&&(On=t)):Kr()}function Kr(){G(ut,ut.current),G(pn,pn.current)}function mn(t){q(pn),On===t&&(On=null),q(ut)}var ut=k(0);function bl(t){for(var a=t;a!==null;){if(a.tag===13){var i=a.memoizedState;if(i!==null&&(i=i.dehydrated,i===null||af(i)||sf(i)))return a}else if(a.tag===19&&(a.memoizedProps.revealOrder==="forwards"||a.memoizedProps.revealOrder==="backwards"||a.memoizedProps.revealOrder==="unstable_legacy-backwards"||a.memoizedProps.revealOrder==="together")){if((a.flags&128)!==0)return a}else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===t)break;for(;a.sibling===null;){if(a.return===null||a.return===t)return null;a=a.return}a.sibling.return=a.return,a=a.sibling}return null}var hr=0,Re=null,Ye=null,ft=null,_l=!1,Ls=!1,$a=!1,wl=0,Vi=0,Us=null,nw=0;function st(){throw Error(s(321))}function Wc(t,a){if(a===null)return!1;for(var i=0;i<a.length&&i<t.length;i++)if(!fn(t[i],a[i]))return!1;return!0}function ed(t,a,i,l,d,h){return hr=h,Re=a,a.memoizedState=null,a.updateQueue=null,a.lanes=0,L.H=t===null||t.memoizedState===null?Am:md,$a=!1,h=i(l,d),$a=!1,Ls&&(h=Yp(a,i,l,d)),Gp(t),h}function Gp(t){L.H=Ki;var a=Ye!==null&&Ye.next!==null;if(hr=0,ft=Ye=Re=null,_l=!1,Vi=0,Us=null,a)throw Error(s(300));t===null||ht||(t=t.dependencies,t!==null&&dl(t)&&(ht=!0))}function Yp(t,a,i,l){Re=t;var d=0;do{if(Ls&&(Us=null),Vi=0,Ls=!1,25<=d)throw Error(s(301));if(d+=1,ft=Ye=null,t.updateQueue!=null){var h=t.updateQueue;h.lastEffect=null,h.events=null,h.stores=null,h.memoCache!=null&&(h.memoCache.index=0)}L.H=Om,h=a(i,l)}while(Ls);return h}function rw(){var t=L.H,a=t.useState()[0];return a=typeof a.then=="function"?Gi(a):a,t=t.useState()[0],(Ye
vendor: 4,810 bytes, line 9
9!==null?Ye.memoizedState:null)!==t&&(Re.flags|=1024),a}function td(){var t=wl!==0;return wl=0,t}function nd(t,a,i){a.updateQueue=t.updateQueue,a.flags&=-2053,t.lanes&=~i}function rd(t){if(_l){for(t=t.memoizedState;t!==null;){var a=t.queue;a!==null&&(a.pending=null),t=t.next}_l=!1}hr=0,ft=Ye=Re=null,Ls=!1,Vi=wl=0,Us=null}function $t(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ft===null?Re.memoizedState=ft=t:ft=ft.next=t,ft}function ct(){if(Ye===null){var t=Re.alternate;t=t!==null?t.memoizedState:null}else t=Ye.next;var a=ft===null?Re.memoizedState:ft.next;if(a!==null)ft=a,Ye=t;else{if(t===null)throw Re.alternate===null?Error(s(467)):Error(s(310));Ye=t,t={memoizedState:Ye.memoizedState,baseState:Ye.baseState,baseQueue:Ye.baseQueue,queue:Ye.queue,next:null},ft===null?Re.memoizedState=ft=t:ft=ft.next=t}return ft}function Sl(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Gi(t){var a=Vi;return Vi+=1,Us===null&&(Us=[]),t=Up(Us,t,a),a=Re,(ft===null?a.memoizedState:ft.next)===null&&(a=a.alternate,L.H=a===null||a.memoizedState===null?Am:md),t}function El(t){if(t!==null&&typeof t=="object"){if(typeof t.then=="function")return Gi(t);if(t.$$typeof===N)return kt(t)}throw Error(s(438,String(t)))}function ad(t){var a=null,i=Re.updateQueue;if(i!==null&&(a=i.memoCache),a==null){var l=Re.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(a={data:l.data.map(function(d){return d.slice()}),index:0})))}if(a==null&&(a={data:[],index:0}),i===null&&(i=Sl(),Re.updateQueue=i),i.memoCache=a,i=a.data[a.index],i===void 0)for(i=a.data[a.index]=Array(t),l=0;l<t;l++)i[l]=he;return a.index++,i}function pr(t,a){return typeof a=="function"?a(t):a}function Tl(t){var a=ct();return sd(a,Ye,t)}function sd(t,a,i){var l=t.queue;if(l===null)throw Error(s(311));l.lastRenderedReducer=i;var d=t.baseQueue,h=l.pending;if(h!==null){if(d!==null){var v=d.next;d.next=h.next,h.next=v}a.baseQueue=d=h,l.pending=null}if(h=t.baseState,d===null)t.memoizedState=h;else{a=d.next;var w=v=null,O=null,U=a,$=!1;do{var Y=U.lane&-536870913;if(Y!==U.lane?(Me&Y)===Y:(hr&Y)===Y){var z=U.revertLane;if(z===0)O!==null&&(O=O.next={lane:0,revertLane:0,gesture:null,action:U.action,hasEagerState:U.hasEagerState,eagerState:U.eagerState,next:null}),Y===Cs&&($=!0);else if((hr&z)===z){U=U.next,z===Cs&&($=!0);continue}else Y={lane:0,revertLane:U.revertLane,gesture:null,action:U.action,hasEagerState:U.hasEagerState,eagerState:U.eagerState,next:null},O===null?(w=O=Y,v=h):O=O.next=Y,Re.lanes|=z,Xr|=z;Y=U.action,$a&&i(h,Y),h=U.hasEagerState?U.eagerState:i(h,Y)}else z={lane:Y,revertLane:U.revertLane,gesture:U.gesture,action:U.action,hasEagerState:U.hasEagerState,eagerState:U.eagerState,next:null},O===null?(w=O=z,v=h):O=O.next=z,Re.lanes|=Y,Xr|=Y;U=U.next}while(U!==null&&U!==a);if(O===null?v=h:O.next=w,!fn(h,t.memoizedState)&&(ht=!0,$&&(i=js,i!==null)))throw i;t.memoizedState=h,t.baseState=v,t.baseQueue=O,l.lastRenderedState=h}return d===null&&(l.lanes=0),[t.memoizedState,l.dispatch]}function id(t){var a=ct(),i=a.queue;if(i===null)throw Error(s(311));i.lastRenderedReducer=t;var l=i.dispatch,d=i.pending,h=a.memoizedState;if(d!==null){i.pending=null;var v=d=d.next;do h=t(h,v.action),v=v.next;while(v!==d);fn(h,a.memoizedState)||(ht=!0),a.memoizedState=h,a.baseQueue===null&&(a.baseState=h),i.lastRenderedState=h}return[h,l]}function Kp(t,a,i){var l=Re,d=ct(),h=Le;if(h){if(i===void 0)throw Error(s(407));i=i()}else i=a();var v=!fn((Ye||d).memoizedState,i);if(v&&(d.memoizedState=i,ht=!0),d=d.queue,ud(Xp.bind(null,l,d,t),[t]),d.getSnapshot!==a||v||ft!==null&&ft.memoizedState.tag&1){if(l.flags|=2048,zs(9,{destroy:void 0},Jp.bind(null,l,d,i,a),null),Xe===null)throw Error(s(349));h||(hr&127)!==0||Zp(l,a,i)}return i}function Zp(t,a,i){t.flags|=16384,t={getSnapshot:a,value:i},a=Re.updateQueue,a===null?(a=Sl(),Re.updateQueue=a,a.stores=[t]):(i=a.stores,i===null?a.stores=[t]:i.push(t))}function Jp(t,a,i,l){a.value=i,a.getSnapshot=l,Fp(a)&&Qp(t)}function Xp(t,a,i){return i(function(){Fp(a)&&Qp(t)})}function Fp(t){var a=t.getSnapshot;t=t.value;try{var i=a();return!fn(t,i)}catch{return!0}}function Qp(t){var a=Ma(t,2);a!==null&&tn(a,t,2)}function od(t){var a=$t();if(typeof t=="function"){var i=t;if(t=i(),$a){Ln(!0);try{i()}finally{Ln(!1)}}}return a.memoizedState=a.baseState=t,a.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:pr,lastRenderedState:t},a}function Wp(t,a,i,l){return t.baseState=i,sd(t,Ye,typeof l=="function"?l:pr)}function aw(t,a,i,l,d){if(Al(t))throw Error(s(485));if(t=a.action,t!==null){var h={payload:d,action:t,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(v){h.listeners.push(v)}};L.T!==null?i(!0):h.isTransition=!1,l(h),i=a.pending,i===null?(h.next=a.pending=h,em(
vendor: 6,244 bytes, line 9
9a,h)):(h.next=i.next,a.pending=i.next=h)}}function em(t,a){var i=a.action,l=a.payload,d=t.state;if(a.isTransition){var h=L.T,v={};L.T=v;try{var w=i(d,l),O=L.S;O!==null&&O(v,w),tm(t,a,w)}catch(U){ld(t,a,U)}finally{h!==null&&v.types!==null&&(h.types=v.types),L.T=h}}else try{h=i(d,l),tm(t,a,h)}catch(U){ld(t,a,U)}}function tm(t,a,i){i!==null&&typeof i=="object"&&typeof i.then=="function"?i.then(function(l){nm(t,a,l)},function(l){return ld(t,a,l)}):nm(t,a,i)}function nm(t,a,i){a.status="fulfilled",a.value=i,rm(a),t.state=i,a=t.pending,a!==null&&(i=a.next,i===a?t.pending=null:(i=i.next,a.next=i,em(t,i)))}function ld(t,a,i){var l=t.pending;if(t.pending=null,l!==null){l=l.next;do a.status="rejected",a.reason=i,rm(a),a=a.next;while(a!==l)}t.action=null}function rm(t){t=t.listeners;for(var a=0;a<t.length;a++)(0,t[a])()}function am(t,a){return a}function sm(t,a){if(Le){var i=Xe.formState;if(i!==null){e:{var l=Re;if(Le){if(We){t:{for(var d=We,h=An;d.nodeType!==8;){if(!h){d=null;break t}if(d=kn(d.nextSibling),d===null){d=null;break t}}h=d.data,d=h==="F!"||h==="F"?d:null}if(d){We=kn(d.nextSibling),l=d.data==="F!";break e}}Hr(l)}l=!1}l&&(a=i[0])}}return i=$t(),i.memoizedState=i.baseState=a,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:am,lastRenderedState:a},i.queue=l,i=Tm.bind(null,Re,l),l.dispatch=i,l=od(!1),h=pd.bind(null,Re,!1,l.queue),l=$t(),d={state:a,dispatch:null,action:t,pending:null},l.queue=d,i=aw.bind(null,Re,d,h,i),d.dispatch=i,l.memoizedState=t,[a,i,!1]}function im(t){var a=ct();return om(a,Ye,t)}function om(t,a,i){if(a=sd(t,a,am)[0],t=Tl(pr)[0],typeof a=="object"&&a!==null&&typeof a.then=="function")try{var l=Gi(a)}catch(v){throw v===Ns?pl:v}else l=a;a=ct();var d=a.queue,h=d.dispatch;return i!==a.memoizedState&&(Re.flags|=2048,zs(9,{destroy:void 0},sw.bind(null,d,i),null)),[l,h,t]}function sw(t,a){t.action=a}function lm(t){var a=ct(),i=Ye;if(i!==null)return om(a,i,t);ct(),a=a.memoizedState,i=ct();var l=i.queue.dispatch;return i.memoizedState=t,[a,l,!1]}function zs(t,a,i,l){return t={tag:t,create:i,deps:l,inst:a,next:null},a=Re.updateQueue,a===null&&(a=Sl(),Re.updateQueue=a),i=a.lastEffect,i===null?a.lastEffect=t.next=t:(l=i.next,i.next=t,t.next=l,a.lastEffect=t),t}function um(){return ct().memoizedState}function xl(t,a,i,l){var d=$t();Re.flags|=t,d.memoizedState=zs(1|a,{destroy:void 0},i,l===void 0?null:l)}function Rl(t,a,i,l){var d=ct();l=l===void 0?null:l;var h=d.memoizedState.inst;Ye!==null&&l!==null&&Wc(l,Ye.memoizedState.deps)?d.memoizedState=zs(a,h,i,l):(Re.flags|=t,d.memoizedState=zs(1|a,h,i,l))}function cm(t,a){xl(8390656,8,t,a)}function ud(t,a){Rl(2048,8,t,a)}function iw(t){Re.flags|=4;var a=Re.updateQueue;if(a===null)a=Sl(),Re.updateQueue=a,a.events=[t];else{var i=a.events;i===null?a.events=[t]:i.push(t)}}function dm(t){var a=ct().memoizedState;return iw({ref:a,nextImpl:t}),function(){if((qe&2)!==0)throw Error(s(440));return a.impl.apply(void 0,arguments)}}function fm(t,a){return Rl(4,2,t,a)}function hm(t,a){return Rl(4,4,t,a)}function pm(t,a){if(typeof a=="function"){t=t();var i=a(t);return function(){typeof i=="function"?i():a(null)}}if(a!=null)return t=t(),a.current=t,function(){a.current=null}}function mm(t,a,i){i=i!=null?i.concat([t]):null,Rl(4,4,pm.bind(null,a,t),i)}function cd(){}function gm(t,a){var i=ct();a=a===void 0?null:a;var l=i.memoizedState;return a!==null&&Wc(a,l[1])?l[0]:(i.memoizedState=[t,a],t)}function ym(t,a){var i=ct();a=a===void 0?null:a;var l=i.memoizedState;if(a!==null&&Wc(a,l[1]))return l[0];if(l=t(),$a){Ln(!0);try{t()}finally{Ln(!1)}}return i.memoizedState=[l,a],l}function dd(t,a,i){return i===void 0||(hr&1073741824)!==0&&(Me&261930)===0?t.memoizedState=a:(t.memoizedState=i,t=vg(),Re.lanes|=t,Xr|=t,i)}function vm(t,a,i,l){return fn(i,a)?i:Ds.current!==null?(t=dd(t,i,l),fn(t,a)||(ht=!0),t):(hr&42)===0||(hr&1073741824)!==0&&(Me&261930)===0?(ht=!0,t.memoizedState=i):(t=vg(),Re.lanes|=t,Xr|=t,a)}function bm(t,a,i,l,d){var h=Z.p;Z.p=h!==0&&8>h?h:8;var v=L.T,w={};L.T=w,pd(t,!1,a,i);try{var O=d(),U=L.S;if(U!==null&&U(w,O),O!==null&&typeof O=="object"&&typeof O.then=="function"){var $=tw(O,l);Yi(t,a,$,vn(t))}else Yi(t,a,l,vn(t))}catch(Y){Yi(t,a,{then:function(){},status:"rejected",reason:Y},vn())}finally{Z.p=h,v!==null&&w.types!==null&&(v.types=w.types),L.T=v}}function ow(){}function fd(t,a,i,l){if(t.tag!==5)throw Error(s(476));var d=_m(t).queue;bm(t,d,a,le,i===null?ow:function(){return wm(t),i(l)})}function _m(t){var a=t.memoizedState;if(a!==null)return a;a={memoizedState:le,baseState:le,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:pr,lastRenderedState:le},next:null};var i={};return a.next={memoizedState:i,baseState:i,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:pr,lastRenderedState:i},next:null},t.memoizedState=a,t=t.alternate,t!==null&&(t.memoizedState=a),a}function wm(t){var a=_m(t);a.next===null&&(a=t.alternate.memoizedState),Yi(t,a.next.queue,{},vn())}function hd(){return kt(uo)}function Sm(){return ct().memoizedState}function Em(){return ct().memoizedState}function lw(t){for(var a=t.return;a!==null;){switch(a.tag){case 24:case 3:var i=vn();t=Vr(i);var l=Gr(a,t,i);l!==null&&(tn(l,a,i),Hi(l,a,i)),a={cache:$c()},t.payload=a;return}a=a.return}}function uw(t,a,i){var l=vn();i={lane:l,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},Al(t)?xm(a,i):(i=jc(t,a,i,l),i!==null&&(tn(i,t,l),Rm(i,a,l)))}function Tm(t,a,i){var l=vn();Yi(t,a,i,l)}function Yi(t,a,i,l){var d={lane:l,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null};if(Al(t))xm(a,d);else{var h=t.alternate;if(t.lanes===0&&(h===null||h.lanes===0)&&(h=a.lastRenderedReducer,h!==null))try{var v=a.lastRenderedState,w=h(v,i);if(d.hasEagerState=!0,d.eagerState=w,fn(w,v))return ol(t,a,d,0),Xe===null&&il(),!1}catch{}if(i=jc(t,a,d,l),i!==null)return tn(i,t,l),Rm(i,a,l),!0}return!1}function pd(t,a,i,l){if(l={lane:2,revertLane:Yd(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Al(t)){if(a)throw Error(s(479))}else a=jc(t,i,l,2),a!==null&&tn(a,t,2)}function Al(t){var a=t.alternate;return t===Re||a!==null&&a===Re}function xm(t,a){Ls=_l=!0;var i=t.pending;i===null?a.next=a:(a.next=i.next,i.next=a),t.pending=a}
vendor: 5,078 bytes, line 9
9function Rm(t,a,i){if((i&4194048)!==0){var l=a.lanes;l&=t.pendingLanes,i|=l,a.lanes=i,Kt(t,i)}}var Ki={readContext:kt,use:El,useCallback:st,useContext:st,useEffect:st,useImperativeHandle:st,useLayoutEffect:st,useInsertionEffect:st,useMemo:st,useReducer:st,useRef:st,useState:st,useDebugValue:st,useDeferredValue:st,useTransition:st,useSyncExternalStore:st,useId:st,useHostTransitionStatus:st,useFormState:st,useActionState:st,useOptimistic:st,useMemoCache:st,useCacheRefresh:st};Ki.useEffectEvent=st;var Am={readContext:kt,use:El,useCallback:function(t,a){return $t().memoizedState=[t,a===void 0?null:a],t},useContext:kt,useEffect:cm,useImperativeHandle:function(t,a,i){i=i!=null?i.concat([t]):null,xl(4194308,4,pm.bind(null,a,t),i)},useLayoutEffect:function(t,a){return xl(4194308,4,t,a)},useInsertionEffect:function(t,a){xl(4,2,t,a)},useMemo:function(t,a){var i=$t();a=a===void 0?null:a;var l=t();if($a){Ln(!0);try{t()}finally{Ln(!1)}}return i.memoizedState=[l,a],l},useReducer:function(t,a,i){var l=$t();if(i!==void 0){var d=i(a);if($a){Ln(!0);try{i(a)}finally{Ln(!1)}}}else d=a;return l.memoizedState=l.baseState=d,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:d},l.queue=t,t=t.dispatch=uw.bind(null,Re,t),[l.memoizedState,t]},useRef:function(t){var a=$t();return t={current:t},a.memoizedState=t},useState:function(t){t=od(t);var a=t.queue,i=Tm.bind(null,Re,a);return a.dispatch=i,[t.memoizedState,i]},useDebugValue:cd,useDeferredValue:function(t,a){var i=$t();return dd(i,t,a)},useTransition:function(){var t=od(!1);return t=bm.bind(null,Re,t.queue,!0,!1),$t().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,a,i){var l=Re,d=$t();if(Le){if(i===void 0)throw Error(s(407));i=i()}else{if(i=a(),Xe===null)throw Error(s(349));(Me&127)!==0||Zp(l,a,i)}d.memoizedState=i;var h={value:i,getSnapshot:a};return d.queue=h,cm(Xp.bind(null,l,h,t),[t]),l.flags|=2048,zs(9,{destroy:void 0},Jp.bind(null,l,h,i,a),null),i},useId:function(){var t=$t(),a=Xe.identifierPrefix;if(Le){var i=Kn,l=Yn;i=(l&~(1<<32-Ut(l)-1)).toString(32)+i,a="_"+a+"R_"+i,i=wl++,0<i&&(a+="H"+i.toString(32)),a+="_"}else i=nw++,a="_"+a+"r_"+i.toString(32)+"_";return t.memoizedState=a},useHostTransitionStatus:hd,useFormState:sm,useActionState:sm,useOptimistic:function(t){var a=$t();a.memoizedState=a.baseState=t;var i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return a.queue=i,a=pd.bind(null,Re,!0,i),i.dispatch=a,[t,a]},useMemoCache:ad,useCacheRefresh:function(){return $t().memoizedState=lw.bind(null,Re)},useEffectEvent:function(t){var a=$t(),i={impl:t};return a.memoizedState=i,function(){if((qe&2)!==0)throw Error(s(440));return i.impl.apply(void 0,arguments)}}},md={readContext:kt,use:El,useCallback:gm,useContext:kt,useEffect:ud,useImperativeHandle:mm,useInsertionEffect:fm,useLayoutEffect:hm,useMemo:ym,useReducer:Tl,useRef:um,useState:function(){return Tl(pr)},useDebugValue:cd,useDeferredValue:function(t,a){var i=ct();return vm(i,Ye.memoizedState,t,a)},useTransition:function(){var t=Tl(pr)[0],a=ct().memoizedState;return[typeof t=="boolean"?t:Gi(t),a]},useSyncExternalStore:Kp,useId:Sm,useHostTransitionStatus:hd,useFormState:im,useActionState:im,useOptimistic:function(t,a){var i=ct();return Wp(i,Ye,t,a)},useMemoCache:ad,useCacheRefresh:Em};md.useEffectEvent=dm;var Om={readContext:kt,use:El,useCallback:gm,useContext:kt,useEffect:ud,useImperativeHandle:mm,useInsertionEffect:fm,useLayoutEffect:hm,useMemo:ym,useReducer:id,useRef:um,useState:function(){return id(pr)},useDebugValue:cd,useDeferredValue:function(t,a){var i=ct();return Ye===null?dd(i,t,a):vm(i,Ye.memoizedState,t,a)},useTransition:function(){var t=id(pr)[0],a=ct().memoizedState;return[typeof t=="boolean"?t:Gi(t),a]},useSyncExternalStore:Kp,useId:Sm,useHostTransitionStatus:hd,useFormState:lm,useActionState:lm,useOptimistic:function(t,a){var i=ct();return Ye!==null?Wp(i,Ye,t,a):(i.baseState=t,[t,i.queue.dispatch])},useMemoCache:ad,useCacheRefresh:Em};Om.useEffectEvent=dm;function gd(t,a,i,l){a=t.memoizedState,i=i(l,a),i=i==null?a:g({},a,i),t.memoizedState=i,t.lanes===0&&(t.updateQueue.baseState=i)}var yd={enqueueSetState:function(t,a,i){t=t._reactInternals;var l=vn(),d=Vr(l);d.payload=a,i!=null&&(d.callback=i),a=Gr(t,d,l),a!==null&&(tn(a,t,l),Hi(a,t,l))},enqueueReplaceState:function(t,a,i){t=t._reactInternals;var l=vn(),d=Vr(l);d.tag=1,d.payload=a,i!=null&&(d.callback=i),a=Gr(t,d,l),a!==null&&(tn(a,t,l),Hi(a,t,l))},enqueueForceUpdate:function(t,a){t=t._reactInternals;var i=vn(),l=Vr(i);l.tag=2,a!=null&&(l.callback=a),a=Gr(t,l,i),a!==null&&(tn(a,t,i),Hi(a,t,i))}};function km(t,a,i,l,d,h,v){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(l,h,v):a.prototype&&a.prototype.isPureReactComponent?!Mi(i,l)||!Mi(d,h):!0}function Cm(t,a,i,l){t=a.state,typeof a.componentWillReceiveProps=="function"&&a.componentWillReceiveProps(i,l),typeof a.UNSAFE_componentWillReceiveProps=="function"&&a.UNSAFE_componentWillReceiveProps(i,l),a.state!==t&&yd.enqueueReplaceState(a,a.state,null)}function qa(t,a){var i=a;
vendor: 12,793 bytes, line 9
9if("ref"in a){i={};for(var l in a)l!=="ref"&&(i[l]=a[l])}if(t=t.defaultProps){i===a&&(i=g({},i));for(var d in t)i[d]===void 0&&(i[d]=t[d])}return i}function jm(t){sl(t)}function Nm(t){console.error(t)}function Mm(t){sl(t)}function Ol(t,a){try{var i=t.onUncaughtError;i(a.value,{componentStack:a.stack})}catch(l){setTimeout(function(){throw l})}}function Dm(t,a,i){try{var l=t.onCaughtError;l(i.value,{componentStack:i.stack,errorBoundary:a.tag===1?a.stateNode:null})}catch(d){setTimeout(function(){throw d})}}function vd(t,a,i){return i=Vr(i),i.tag=3,i.payload={element:null},i.callback=function(){Ol(t,a)},i}function Lm(t){return t=Vr(t),t.tag=3,t}function Um(t,a,i,l){var d=i.type.getDerivedStateFromError;if(typeof d=="function"){var h=l.value;t.payload=function(){return d(h)},t.callback=function(){Dm(a,i,l)}}var v=i.stateNode;v!==null&&typeof v.componentDidCatch=="function"&&(t.callback=function(){Dm(a,i,l),typeof d!="function"&&(Fr===null?Fr=new Set([this]):Fr.add(this));var w=l.stack;this.componentDidCatch(l.value,{componentStack:w!==null?w:""})})}function cw(t,a,i,l,d){if(i.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(a=i.alternate,a!==null&&ks(a,i,d,!0),i=pn.current,i!==null){switch(i.tag){case 31:case 13:return On===null?Il():i.alternate===null&&it===0&&(it=3),i.flags&=-257,i.flags|=65536,i.lanes=d,l===ml?i.flags|=16384:(a=i.updateQueue,a===null?i.updateQueue=new Set([l]):a.add(l),qd(t,l,d)),!1;case 22:return i.flags|=65536,l===ml?i.flags|=16384:(a=i.updateQueue,a===null?(a={transitions:null,markerInstances:null,retryQueue:new Set([l])},i.updateQueue=a):(i=a.retryQueue,i===null?a.retryQueue=new Set([l]):i.add(l)),qd(t,l,d)),!1}throw Error(s(435,i.tag))}return qd(t,l,d),Il(),!1}if(Le)return a=pn.current,a!==null?((a.flags&65536)===0&&(a.flags|=256),a.flags|=65536,a.lanes=d,l!==zc&&(t=Error(s(422),{cause:l}),Ui(Tn(t,i)))):(l!==zc&&(a=Error(s(423),{cause:l}),Ui(Tn(a,i))),t=t.current.alternate,t.flags|=65536,d&=-d,t.lanes|=d,l=Tn(l,i),d=vd(t.stateNode,l,d),Zc(t,d),it!==4&&(it=2)),!1;var h=Error(s(520),{cause:l});if(h=Tn(h,i),to===null?to=[h]:to.push(h),it!==4&&(it=2),a===null)return!0;l=Tn(l,i),i=a;do{switch(i.tag){case 3:return i.flags|=65536,t=d&-d,i.lanes|=t,t=vd(i.stateNode,l,t),Zc(i,t),!1;case 1:if(a=i.type,h=i.stateNode,(i.flags&128)===0&&(typeof a.getDerivedStateFromError=="function"||h!==null&&typeof h.componentDidCatch=="function"&&(Fr===null||!Fr.has(h))))return i.flags|=65536,d&=-d,i.lanes|=d,d=Lm(d),Um(d,t,i,l),Zc(i,d),!1}i=i.return}while(i!==null);return!1}var bd=Error(s(461)),ht=!1;function Ct(t,a,i,l){a.child=t===null?Ip(a,null,i,l):Ha(a,t.child,i,l)}function zm(t,a,i,l,d){i=i.render;var h=a.ref;if("ref"in l){var v={};for(var w in l)w!=="ref"&&(v[w]=l[w])}else v=l;return za(a),l=ed(t,a,i,v,h,d),w=td(),t!==null&&!ht?(nd(t,a,d),mr(t,a,d)):(Le&&w&&Lc(a),a.flags|=1,Ct(t,a,l,d),a.child)}function Bm(t,a,i,l,d){if(t===null){var h=i.type;return typeof h=="function"&&!Nc(h)&&h.defaultProps===void 0&&i.compare===null?(a.tag=15,a.type=h,Pm(t,a,h,l,d)):(t=ul(i.type,null,l,a,a.mode,d),t.ref=a.ref,t.return=a,a.child=t)}if(h=t.child,!Ad(t,d)){var v=h.memoizedProps;if(i=i.compare,i=i!==null?i:Mi,i(v,l)&&t.ref===a.ref)return mr(t,a,d)}return a.flags|=1,t=ur(h,l),t.ref=a.ref,t.return=a,a.child=t}function Pm(t,a,i,l,d){if(t!==null){var h=t.memoizedProps;if(Mi(h,l)&&t.ref===a.ref)if(ht=!1,a.pendingProps=l=h,Ad(t,d))(t.flags&131072)!==0&&(ht=!0);else return a.lanes=t.lanes,mr(t,a,d)}return _d(t,a,i,l,d)}function Im(t,a,i,l){var d=l.children,h=t!==null?t.memoizedState:null;if(t===null&&a.stateNode===null&&(a.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.mode==="hidden"){if((a.flags&128)!==0){if(h=h!==null?h.baseLanes|i:i,t!==null){for(l=a.child=t.child,d=0;l!==null;)d=d|l.lanes|l.childLanes,l=l.sibling;l=d&~h}else l=0,a.child=null;return Hm(t,a,h,i,l)}if((i&536870912)!==0)a.memoizedState={baseLanes:0,cachePool:null},t!==null&&hl(a,h!==null?h.cachePool:null),h!==null?qp(a,h):Xc(),Vp(a);else return l=a.lanes=536870912,Hm(t,a,h!==null?h.baseLanes|i:i,i,l)}else h!==null?(hl(a,h.cachePool),qp(a,h),Kr(),a.memoizedState=null):(t!==null&&hl(a,null),Xc(),Kr());return Ct(t,a,d,i),a.child}function Zi(t,a){return t!==null&&t.tag===22||a.stateNode!==null||(a.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.sibling}function Hm(t,a,i,l,d){var h=Vc();return h=h===null?null:{parent:dt._currentValue,pool:h},a.memoizedState={baseLanes:i,cachePool:h},t!==null&&hl(a,null),Xc(),Vp(a),t!==null&&ks(t,a,l,!0),a.childLanes=d,null}function kl(t,a){return a=jl({mode:a.mode,children:a.children},t.mode),a.ref=t.ref,t.child=a,a.return=t,a}function $m(t,a,i){return Ha(a,t.child,null,i),t=kl(a,a.pendingProps),t.flags|=2,mn(a),a.memoizedState=null,t}function dw(t,a,i){var l=a.pendingProps,d=(a.flags&128)!==0;if(a.flags&=-129,t===null){if(Le){if(l.mode==="hidden")return t=kl(a,l),a.lanes=536870912,Zi(null,t);if(Qc(a),(t=We)?(t=ey(t,An),t=t!==null&&t.data==="&"?t:null,t!==null&&(a.memoizedState={dehydrated:t,treeContext:Pr!==null?{id:Yn,overflow:Kn}:null,retryLane:536870912,hydrationErrors:null},i=xp(t),i.return=a,a.child=i,Ot=a,We=null)):t=null,t===null)throw Hr(a);return a.lanes=536870912,null}return kl(a,l)}var h=t.memoizedState;if(h!==null){var v=h.dehydrated;if(Qc(a),d)if(a.flags&256)a.flags&=-257,a=$m(t,a,i);else if(a.memoizedState!==null)a.child=t.child,a.flags|=128,a=null;else throw Error(s(558));else if(ht||ks(t,a,i,!1),d=(i&t.childLanes)!==0,ht||d){if(l=Xe,l!==null&&(v=Zt(l,i),v!==0&&v!==h.retryLane))throw h.retryLane=v,Ma(t,v),tn(l,t,v),bd;Il(),a=$m(t,a,i)}else t=h.treeContext,We=kn(v.nextSibling),Ot=a,Le=!0,Ir=null,An=!1,t!==null&&Op(a,t),a=kl(a,l),a.flags|=4096;return a}return t=ur(t.child,{mode:l.mode,children:l.children}),t.ref=a.ref,a.child=t,t.return=a,t}function Cl(t,a){var i=a.ref;if(i===null)t!==null&&t.ref!==null&&(a.flags|=4194816);else{if(typeof i!="function"&&typeof i!="object")throw Error(s(284));(t===null||t.ref!==i)&&(a.flags|=4194816)}}function _d(t,a,i,l,d){return za(a),i=ed(t,a,i,l,void 0,d),l=td(),t!==null&&!ht?(nd(t,a,d),mr(t,a,d)):(Le&&l&&Lc(a),a.flags|=1,Ct(t,a,i,d),a.child)}function qm(t,a,i,l,d,h){return za(a),a.updateQueue=null,i=Yp(a,l,i,d),Gp(t),l=td(),t!==null&&!ht?(nd(t,a,h),mr(t,a,h)):(Le&&l&&Lc(a),a.flags|=1,Ct(t,a,i,h),a.child)}function Vm(t,a,i,l,d){if(za(a),a.stateNode===null){var h=xs,v=i.contextType;typeof v=="object"&&v!==null&&(h=kt(v)),h=new i(l,h),a.memoizedState=h.state!==null&&h.state!==void 0?h.state:null,h.updater=yd,a.stateNode=h,h._reactInternals=a,h=a.stateNode,h.props=l,h.state=a.memoizedState,h.refs={},Yc(a),v=i.contextType,h.context=typeof v=="object"&&v!==null?kt(v):xs,h.state=a.memoizedState,v=i.getDerivedStateFromProps,typeof v=="function"&&(gd(a,i,v,l),h.state=a.memoizedState),typeof i.getDerivedStateFromProps=="function"||typeof h.getSnapshotBeforeUpdate=="function"||typeof h.UNSAFE_componentWillMount!="function"&&typeof h.componentWillMount!="function"||(v=h.state,typeof h.componentWillMount=="function"&&h.componentWillMount(),typeof h.UNSAFE_componentWillMount=="function"&&h.UNSAFE_componentWillMount(),v!==h.state&&yd.enqueueReplaceState(h,h.state,null),qi(a,l,h,d),$i(),h.state=a.memoizedState),typeof h.componentDidMount=="function"&&(a.flags|=4194308),l=!0}else if(t===null){h=a.stateNode;var w=a.memoizedProps,O=qa(i,w);h.props=O;var U=h.context,$=i.contextType;v=xs,typeof $=="object"&&$!==null&&(v=kt($));var Y=i.getDerivedStateFromProps;$=typeof Y=="function"||typeof h.getSnapshotBeforeUpdate=="function",w=a.pendingProps!==w,$||typeof h.UNSAFE_componentWillReceiveProps!="function"&&typeof h.componentWillReceiveProps!="function"||(w||U!==v)&&Cm(a,h,l,v),qr=!1;var z=a.memoizedState;h.state=z,qi(a,l,h,d),$i(),U=a.memoizedState,w||z!==U||qr?(typeof Y=="function"&&(gd(a,i,Y,l),U=a.memoizedState),(O=qr||km(a,i,O,l,z,U,v))?($||typeof h.UNSAFE_componentWillMount!="function"&&typeof h.componentWillMount!="function"||(typeof h.componentWillMount=="function"&&h.componentWillMount(),typeof h.UNSAFE_componentWillMount=="function"&&h.UNSAFE_componentWillMount()),typeof h.componentDidMount=="function"&&(a.flags|=4194308)):(typeof h.componentDidMount=="function"&&(a.flags|=4194308),a.memoizedProps=l,a.memoizedState=U),h.props=l,h.state=U,h.context=v,l=O):(typeof h.componentDidMount=="function"&&(a.flags|=4194308),l=!1)}else{h=a.stateNode,Kc(t,a),v=a.memoizedProps,$=qa(i,v),h.props=$,Y=a.pendingProps,z=h.context,U=i.contextType,O=xs,typeof U=="object"&&U!==null&&(O=kt(U)),w=i.getDerivedStateFromProps,(U=typeof w=="function"||typeof h.getSnapshotBeforeUpdate=="function")||typeof h.UNSAFE_componentWillReceiveProps!="function"&&typeof h.componentWillReceiveProps!="function"||(v!==Y||z!==O)&&Cm(a,h,l,O),qr=!1,z=a.memoizedState,h.state=z,qi(a,l,h,d),$i();var P=a.memoizedState;v!==Y||z!==P||qr||t!==null&&t.dependencies!==null&&dl(t.dependencies)?(typeof w=="function"&&(gd(a,i,w,l),P=a.memoizedState),($=qr||km(a,i,$,l,z,P,O)||t!==null&&t.dependencies!==null&&dl(t.dependencies))?(U||typeof h.UNSAFE_componentWillUpdate!="function"&&typeof h.componentWillUpdate!="function"||(typeof h.componentWillUpdate=="function"&&h.componentWillUpdate(l,P,O),typeof h.UNSAFE_componentWillUpdate=="function"&&h.UNSAFE_componentWillUpdate(l,P,O)),typeof h.componentDidUpdate=="function"&&(a.flags|=4),typeof h.getSnapshotBeforeUpdate=="function"&&(a.flags|=1024)):(typeof h.componentDidUpdate!="function"||v===t.memoizedProps&&z===t.memoizedState||(a.flags|=4),typeof h.getSnapshotBeforeUpdate!="function"||v===t.memoizedProps&&z===t.memoizedState||(a.flags|=1024),a.memoizedProps=l,a.memoizedState=P),h.props=l,h.state=P,h.context=O,l=$):(typeof h.componentDidUpdate!="function"||v===t.memoizedProps&&z===t.memoizedState||(a.flags|=4),typeof h.getSnapshotBeforeUpdate!="function"||v===t.memoizedProps&&z===t.memoizedState||(a.flags|=1024),l=!1)}return h=l,Cl(t,a),l=(a.flags&128)!==0,h||l?(h=a.stateNode,i=l&&typeof i.getDerivedStateFromError!="function"?null:h.render(),a.flags|=1,t!==null&&l?(a.child=Ha(a,t.child,null,d),a.child=Ha(a,null,i,d)):Ct(t,a,i,d),a.memoizedState=h.state,t=a.child):t=mr(t,a,d),t}function Gm(t,a,i,l){return La(),a.flags|=256,Ct(t,a,i,l),a.child}var wd={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Sd(t){return{baseLanes:t,cachePool:Dp()}}function Ed(t,a,i){return t=t!==null?t.childLanes&~i:0,a&&(t|=yn),t}function Ym(t,a,i){var l=a.pendingProps,d=!1,h=(a.flags&128)!==0,v;if((v=h)||(v=t!==null&&t.memoizedState===null?!1:(ut.current&2)!==0),v&&(d=!0,a.flags&=-129),v=(a.flags&32)!==0,a.flags&=-33,t===null){if(Le){if(d?Yr(a):Kr(),(t=We)?(t=ey(t,An),t=t!==null&&t.data!=="&"?t:null,t!==null&&(a.memoizedState={dehydrated:t,treeContext:Pr!==null?{id:Yn,overflow:Kn}:null,retryLane:536870912,hydrationErrors:null},i=xp(t),i.return=a,a.child=i,Ot=a,We=null)):t=null,t===null)throw Hr(a);return sf(t)?a.lanes=32:a.lanes=536870912,null}var w=l.children;return l=l.fallback,d?(Kr(),d=a.mode,w=jl({mode:"hidden",children:w},d),l=Da(l,d,i,null),w.return=a,l.return=a,w.sibling=l,a.child=w,l=a.child,l.memoizedState=Sd(i),l.childLanes=Ed(t,v,i),a.memoizedState=wd,Zi(null,l)):(Yr(a),Td(a,w))}var O=t.memoizedState;if(O!==null&&(w=O.dehydrated,w!==null)){if(h)a.flags&256?(Yr(a),a.flags&=-257,a=xd(t,a,i)):a.memoizedState!==null?(Kr(),a.child=t.child,a.flags|=128,a=null):(Kr(),w=l.fallback,d=a.mode,l=jl({mode:"visible",children:l.children},d),w=Da(w,d,i,null),w.flags|=2,l.return=a,w.return=a,l.sibling=w,a.child=l,Ha(a,t.child,null,i),l=a.child,l.memoizedState=Sd(i),l.childLanes=Ed(t,v,i),a.memoizedState=wd,a=Zi(null,l));else if(Yr(a),sf(w)){if(v=w.nextSibling&&w.nextSibling.dataset,v)var U=v.dgst;v=U,l=Error(s(419)),l.stack="",l.digest=v,Ui({value:l,source:null,stack:null}),a=xd(t,a,i)}else if(ht||ks(t,a,i,!1),v=(i&t.childLanes)!==0,ht||v){if(v=Xe,v!==null&&(l=Zt(v,i),l!==0&&l!==O.retryLane))throw O.retryLane=l,Ma(t,l),tn(v,t,l),bd;af(w)||Il(),a=xd(t,a,i)}else af(w)?(a.flags|=192,a.child=t.child,a=null):(t=O.treeContext,We=kn(w.nextSibling),Ot=a,Le=!0,Ir=null,An=!1,t!==null&&Op(a,t),a=Td(a,l.children),a.flags|=4096);return a}return d?(Kr(),w=l.fallback,d=a.mode,O=t.child,U=O.sibling,l=ur(O,{mode:"hidden",children:l.children}),l.subtreeFlags=O.subtreeFlags&65011712,U!==null?w=ur(U,w):(w=Da(w,d,i,null),w.flags|=2),w.return=a,l.return=a,l.sibling=w,a.child=l,Zi(null,l),l=a.child,w=t.child.memoizedState,w===null?w=Sd(i):(d=w.cachePool,d!==null?(O=dt._currentValue,d=d.parent!==O?{parent:O,pool:O}:d):d=Dp(),w={baseLanes:w.baseLanes|i,cachePool:d}),l.memoizedState=w,l.childLanes=Ed(t,v,i),a.memoizedState=wd,Zi(t.child,l)):(Yr(a),i=t.child,t=i.sibling,i=ur(i,{mode:"visible",children:l.children}),i.return=a,i.sibling=null,t!==null&&(v=a.deletions,v===null?(a.deleti
vendor: 4,605 bytes, line 9
9ons=[t],a.flags|=16):v.push(t)),a.child=i,a.memoizedState=null,i)}function Td(t,a){return a=jl({mode:"visible",children:a},t.mode),a.return=t,t.child=a}function jl(t,a){return t=hn(22,t,null,a),t.lanes=0,t}function xd(t,a,i){return Ha(a,t.child,null,i),t=Td(a,a.pendingProps.children),t.flags|=2,a.memoizedState=null,t}function Km(t,a,i){t.lanes|=a;var l=t.alternate;l!==null&&(l.lanes|=a),Ic(t.return,a,i)}function Rd(t,a,i,l,d,h){var v=t.memoizedState;v===null?t.memoizedState={isBackwards:a,rendering:null,renderingStartTime:0,last:l,tail:i,tailMode:d,treeForkCount:h}:(v.isBackwards=a,v.rendering=null,v.renderingStartTime=0,v.last=l,v.tail=i,v.tailMode=d,v.treeForkCount=h)}function Zm(t,a,i){var l=a.pendingProps,d=l.revealOrder,h=l.tail;l=l.children;var v=ut.current,w=(v&2)!==0;if(w?(v=v&1|2,a.flags|=128):v&=1,G(ut,v),Ct(t,a,l,i),l=Le?Li:0,!w&&t!==null&&(t.flags&128)!==0)e:for(t=a.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&Km(t,i,a);else if(t.tag===19)Km(t,i,a);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===a)break e;for(;t.sibling===null;){if(t.return===null||t.return===a)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}switch(d){case"forwards":for(i=a.child,d=null;i!==null;)t=i.alternate,t!==null&&bl(t)===null&&(d=i),i=i.sibling;i=d,i===null?(d=a.child,a.child=null):(d=i.sibling,i.sibling=null),Rd(a,!1,d,i,h,l);break;case"backwards":case"unstable_legacy-backwards":for(i=null,d=a.child,a.child=null;d!==null;){if(t=d.alternate,t!==null&&bl(t)===null){a.child=d;break}t=d.sibling,d.sibling=i,i=d,d=t}Rd(a,!0,i,null,h,l);break;case"together":Rd(a,!1,null,null,void 0,l);break;default:a.memoizedState=null}return a.child}function mr(t,a,i){if(t!==null&&(a.dependencies=t.dependencies),Xr|=a.lanes,(i&a.childLanes)===0)if(t!==null){if(ks(t,a,i,!1),(i&a.childLanes)===0)return null}else return null;if(t!==null&&a.child!==t.child)throw Error(s(153));if(a.child!==null){for(t=a.child,i=ur(t,t.pendingProps),a.child=i,i.return=a;t.sibling!==null;)t=t.sibling,i=i.sibling=ur(t,t.pendingProps),i.return=a;i.sibling=null}return a.child}function Ad(t,a){return(t.lanes&a)!==0?!0:(t=t.dependencies,!!(t!==null&&dl(t)))}function fw(t,a,i){switch(a.tag){case 3:ve(a,a.stateNode.containerInfo),$r(a,dt,t.memoizedState.cache),La();break;case 27:case 5:Pt(a);break;case 4:ve(a,a.stateNode.containerInfo);break;case 10:$r(a,a.type,a.memoizedProps.value);break;case 31:if(a.memoizedState!==null)return a.flags|=128,Qc(a),null;break;case 13:var l=a.memoizedState;if(l!==null)return l.dehydrated!==null?(Yr(a),a.flags|=128,null):(i&a.child.childLanes)!==0?Ym(t,a,i):(Yr(a),t=mr(t,a,i),t!==null?t.sibling:null);Yr(a);break;case 19:var d=(t.flags&128)!==0;if(l=(i&a.childLanes)!==0,l||(ks(t,a,i,!1),l=(i&a.childLanes)!==0),d){if(l)return Zm(t,a,i);a.flags|=128}if(d=a.memoizedState,d!==null&&(d.rendering=null,d.tail=null,d.lastEffect=null),G(ut,ut.current),l)break;return null;case 22:return a.lanes=0,Im(t,a,i,a.pendingProps);case 24:$r(a,dt,t.memoizedState.cache)}return mr(t,a,i)}function Jm(t,a,i){if(t!==null)if(t.memoizedProps!==a.pendingProps)ht=!0;else{if(!Ad(t,i)&&(a.flags&128)===0)return ht=!1,fw(t,a,i);ht=(t.flags&131072)!==0}else ht=!1,Le&&(a.flags&1048576)!==0&&Ap(a,Li,a.index);switch(a.lanes=0,a.tag){case 16:e:{var l=a.pendingProps;if(t=Pa(a.elementType),a.type=t,typeof t=="function")Nc(t)?(l=qa(t,l),a.tag=1,a=Vm(null,a,t,l,i)):(a.tag=0,a=_d(null,a,t,l,i));else{if(t!=null){var d=t.$$typeof;if(d===B){a.tag=11,a=zm(null,a,t,l,i);break e}else if(d===I){a.tag=14,a=Bm(null,a,t,l,i);break e}}throw a=Je(t)||t,Error(s(306,a,""))}}return a;case 0:return _d(t,a,a.type,a.pendingProps,i);case 1:return l=a.type,d=qa(l,a.pendingProps),Vm(t,a,l,d,i);case 3:e:{if(ve(a,a.stateNode.containerInfo),t===null)throw Error(s(387));l=a.pendingProps;var h=a.memoizedState;d=h.element,Kc(t,a),qi(a,l,null,i);var v=a.memoizedState;if(l=v.cache,$r(a,dt,l),l!==h.cache&&Hc(a,[dt],i,!0),$i(),l=v.element,h.isDehydrated)if(h={element:l,isDehydrated:!1,cache:v.cache},a.updateQueue.baseState=h,a.memoizedState=h,a.flags&256){a=Gm(t,a,l,i);break e}else if(l!==d){d=Tn(Error(s(424)),a),Ui(d),a=Gm(t,a,l,i);break e}else for(t=a.stateNode.containerInfo,t.nodeType===9?t=t.body:t=t.nodeName==="HTML"?t.ownerDocument.body:t,We=kn(t.firstChild),Ot=a,Le=!0,Ir=null,An=!0,i=Ip(a,null,l,i),a.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling;else{if(La(),l===d){a=mr(t,a,i);break e}Ct(t,a,l,i)}a=a.child}return a;case 26:return Cl(t,a),t===null?(i=iy(a.type,null,a.pendingProps,null))?a.memoizedState=i:Le||(i=a.type,t=a.pendingProps,l=Kl(pe.current).createElement(i),l[At]=a,l[Jt]=t,
vendor: 4,895 bytes, line 9
9jt(l,i,t),Et(l),a.stateNode=l):a.memoizedState=iy(a.type,t.memoizedProps,a.pendingProps,t.memoizedState),null;case 27:return Pt(a),t===null&&Le&&(l=a.stateNode=ry(a.type,a.pendingProps,pe.current),Ot=a,An=!0,d=We,ta(a.type)?(of=d,We=kn(l.firstChild)):We=d),Ct(t,a,a.pendingProps.children,i),Cl(t,a),t===null&&(a.flags|=4194304),a.child;case 5:return t===null&&Le&&((d=l=We)&&(l=$w(l,a.type,a.pendingProps,An),l!==null?(a.stateNode=l,Ot=a,We=kn(l.firstChild),An=!1,d=!0):d=!1),d||Hr(a)),Pt(a),d=a.type,h=a.pendingProps,v=t!==null?t.memoizedProps:null,l=h.children,tf(d,h)?l=null:v!==null&&tf(d,v)&&(a.flags|=32),a.memoizedState!==null&&(d=ed(t,a,rw,null,null,i),uo._currentValue=d),Cl(t,a),Ct(t,a,l,i),a.child;case 6:return t===null&&Le&&((t=i=We)&&(i=qw(i,a.pendingProps,An),i!==null?(a.stateNode=i,Ot=a,We=null,t=!0):t=!1),t||Hr(a)),null;case 13:return Ym(t,a,i);case 4:return ve(a,a.stateNode.containerInfo),l=a.pendingProps,t===null?a.child=Ha(a,null,l,i):Ct(t,a,l,i),a.child;case 11:return zm(t,a,a.type,a.pendingProps,i);case 7:return Ct(t,a,a.pendingProps,i),a.child;case 8:return Ct(t,a,a.pendingProps.children,i),a.child;case 12:return Ct(t,a,a.pendingProps.children,i),a.child;case 10:return l=a.pendingProps,$r(a,a.type,l.value),Ct(t,a,l.children,i),a.child;case 9:return d=a.type._context,l=a.pendingProps.children,za(a),d=kt(d),l=l(d),a.flags|=1,Ct(t,a,l,i),a.child;case 14:return Bm(t,a,a.type,a.pendingProps,i);case 15:return Pm(t,a,a.type,a.pendingProps,i);case 19:return Zm(t,a,i);case 31:return dw(t,a,i);case 22:return Im(t,a,i,a.pendingProps);case 24:return za(a),l=kt(dt),t===null?(d=Vc(),d===null&&(d=Xe,h=$c(),d.pooledCache=h,h.refCount++,h!==null&&(d.pooledCacheLanes|=i),d=h),a.memoizedState={parent:l,cache:d},Yc(a),$r(a,dt,d)):((t.lanes&i)!==0&&(Kc(t,a),qi(a,null,null,i),$i()),d=t.memoizedState,h=a.memoizedState,d.parent!==l?(d={parent:l,cache:l},a.memoizedState=d,a.lanes===0&&(a.memoizedState=a.updateQueue.baseState=d),$r(a,dt,l)):(l=h.cache,$r(a,dt,l),l!==d.cache&&Hc(a,[dt],i,!0))),Ct(t,a,a.pendingProps.children,i),a.child;case 29:throw a.pendingProps}throw Error(s(156,a.tag))}function gr(t){t.flags|=4}function Od(t,a,i,l,d){if((a=(t.mode&32)!==0)&&(a=!1),a){if(t.flags|=16777216,(d&335544128)===d)if(t.stateNode.complete)t.flags|=8192;else if(Sg())t.flags|=8192;else throw Ia=ml,Gc}else t.flags&=-16777217}function Xm(t,a){if(a.type!=="stylesheet"||(a.state.loading&4)!==0)t.flags&=-16777217;else if(t.flags|=16777216,!dy(a))if(Sg())t.flags|=8192;else throw Ia=ml,Gc}function Nl(t,a){a!==null&&(t.flags|=4),t.flags&16384&&(a=t.tag!==22?zt():536870912,t.lanes|=a,Hs|=a)}function Ji(t,a){if(!Le)switch(t.tailMode){case"hidden":a=t.tail;for(var i=null;a!==null;)a.alternate!==null&&(i=a),a=a.sibling;i===null?t.tail=null:i.sibling=null;break;case"collapsed":i=t.tail;for(var l=null;i!==null;)i.alternate!==null&&(l=i),i=i.sibling;l===null?a||t.tail===null?t.tail=null:t.tail.sibling=null:l.sibling=null}}function et(t){var a=t.alternate!==null&&t.alternate.child===t.child,i=0,l=0;if(a)for(var d=t.child;d!==null;)i|=d.lanes|d.childLanes,l|=d.subtreeFlags&65011712,l|=d.flags&65011712,d.return=t,d=d.sibling;else for(d=t.child;d!==null;)i|=d.lanes|d.childLanes,l|=d.subtreeFlags,l|=d.flags,d.return=t,d=d.sibling;return t.subtreeFlags|=l,t.childLanes=i,a}function hw(t,a,i){var l=a.pendingProps;switch(Uc(a),a.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return et(a),null;case 1:return et(a),null;case 3:return i=a.stateNode,l=null,t!==null&&(l=t.memoizedState.cache),a.memoizedState.cache!==l&&(a.flags|=2048),fr(dt),Be(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(t===null||t.child===null)&&(Os(a)?gr(a):t===null||t.memoizedState.isDehydrated&&(a.flags&256)===0||(a.flags|=1024,Bc())),et(a),null;case 26:var d=a.type,h=a.memoizedState;return t===null?(gr(a),h!==null?(et(a),Xm(a,h)):(et(a),Od(a,d,null,l,i))):h?h!==t.memoizedState?(gr(a),et(a),Xm(a,h)):(et(a),a.flags&=-16777217):(t=t.memoizedProps,t!==l&&gr(a),et(a),Od(a,d,t,l,i)),null;case 27:if(Vt(a),i=pe.current,d=a.type,t!==null&&a.stateNode!=null)t.memoizedProps!==l&&gr(a);else{if(!l){if(a.stateNode===null)throw Error(s(166));return et(a),null}t=X.current,Os(a)?kp(a):(t=ry(d,l,i),a.stateNode=t,gr(a))}return et(a),null;case 5:if(Vt(a),d=a.type,t!==null&&a.stateNode!=null)t.memoizedProps!==l&&gr(a);else{if(!l){if(a.stateNode===null)throw Error(s(166));return et(a),null}if(h=X.current,Os(a))kp(a);else{var v=Kl(pe.current);switch(h){case 1:h=v.createElementNS("http://www.w3.org/2000/svg",d);break;case 2:h=v.createElementNS("http://www.w3.org/1998/Math/MathML",d);break;default:switch(d){case"svg":h=v.createElementNS("http://www.w3.org/2000/svg",d);break;case"math":h=v.createElementNS("http://www.w3.org/1998/Math/MathML",d);break;case"script":h=v.createElement("div"),h.innerHTML="<script><\/script>",h=h.removeChild(h.firstChild);break;
vendor: 22,367 bytes, line 9
9case"select":h=typeof l.is=="string"?v.createElement("select",{is:l.is}):v.createElement("select"),l.multiple?h.multiple=!0:l.size&&(h.size=l.size);break;default:h=typeof l.is=="string"?v.createElement(d,{is:l.is}):v.createElement(d)}}h[At]=a,h[Jt]=l;e:for(v=a.child;v!==null;){if(v.tag===5||v.tag===6)h.appendChild(v.stateNode);else if(v.tag!==4&&v.tag!==27&&v.child!==null){v.child.return=v,v=v.child;continue}if(v===a)break e;for(;v.sibling===null;){if(v.return===null||v.return===a)break e;v=v.return}v.sibling.return=v.return,v=v.sibling}a.stateNode=h;e:switch(jt(h,d,l),d){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break e;case"img":l=!0;break e;default:l=!1}l&&gr(a)}}return et(a),Od(a,a.type,t===null?null:t.memoizedProps,a.pendingProps,i),null;case 6:if(t&&a.stateNode!=null)t.memoizedProps!==l&&gr(a);else{if(typeof l!="string"&&a.stateNode===null)throw Error(s(166));if(t=pe.current,Os(a)){if(t=a.stateNode,i=a.memoizedProps,l=null,d=Ot,d!==null)switch(d.tag){case 27:case 5:l=d.memoizedProps}t[At]=a,t=!!(t.nodeValue===i||l!==null&&l.suppressHydrationWarning===!0||Yg(t.nodeValue,i)),t||Hr(a,!0)}else t=Kl(t).createTextNode(l),t[At]=a,a.stateNode=t}return et(a),null;case 31:if(i=a.memoizedState,t===null||t.memoizedState!==null){if(l=Os(a),i!==null){if(t===null){if(!l)throw Error(s(318));if(t=a.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(s(557));t[At]=a}else La(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;et(a),t=!1}else i=Bc(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=i),t=!0;if(!t)return a.flags&256?(mn(a),a):(mn(a),null);if((a.flags&128)!==0)throw Error(s(558))}return et(a),null;case 13:if(l=a.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(d=Os(a),l!==null&&l.dehydrated!==null){if(t===null){if(!d)throw Error(s(318));if(d=a.memoizedState,d=d!==null?d.dehydrated:null,!d)throw Error(s(317));d[At]=a}else La(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;et(a),d=!1}else d=Bc(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=d),d=!0;if(!d)return a.flags&256?(mn(a),a):(mn(a),null)}return mn(a),(a.flags&128)!==0?(a.lanes=i,a):(i=l!==null,t=t!==null&&t.memoizedState!==null,i&&(l=a.child,d=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(d=l.alternate.memoizedState.cachePool.pool),h=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(h=l.memoizedState.cachePool.pool),h!==d&&(l.flags|=2048)),i!==t&&i&&(a.child.flags|=8192),Nl(a,a.updateQueue),et(a),null);case 4:return Be(),t===null&&Xd(a.stateNode.containerInfo),et(a),null;case 10:return fr(a.type),et(a),null;case 19:if(q(ut),l=a.memoizedState,l===null)return et(a),null;if(d=(a.flags&128)!==0,h=l.rendering,h===null)if(d)Ji(l,!1);else{if(it!==0||t!==null&&(t.flags&128)!==0)for(t=a.child;t!==null;){if(h=bl(t),h!==null){for(a.flags|=128,Ji(l,!1),t=h.updateQueue,a.updateQueue=t,Nl(a,t),a.subtreeFlags=0,t=i,i=a.child;i!==null;)Tp(i,t),i=i.sibling;return G(ut,ut.current&1|2),Le&&cr(a,l.treeForkCount),a.child}t=t.sibling}l.tail!==null&&Oe()>zl&&(a.flags|=128,d=!0,Ji(l,!1),a.lanes=4194304)}else{if(!d)if(t=bl(h),t!==null){if(a.flags|=128,d=!0,t=t.updateQueue,a.updateQueue=t,Nl(a,t),Ji(l,!0),l.tail===null&&l.tailMode==="hidden"&&!h.alternate&&!Le)return et(a),null}else 2*Oe()-l.renderingStartTime>zl&&i!==536870912&&(a.flags|=128,d=!0,Ji(l,!1),a.lanes=4194304);l.isBackwards?(h.sibling=a.child,a.child=h):(t=l.last,t!==null?t.sibling=h:a.child=h,l.last=h)}return l.tail!==null?(t=l.tail,l.rendering=t,l.tail=t.sibling,l.renderingStartTime=Oe(),t.sibling=null,i=ut.current,G(ut,d?i&1|2:i&1),Le&&cr(a,l.treeForkCount),t):(et(a),null);case 22:case 23:return mn(a),Fc(),l=a.memoizedState!==null,t!==null?t.memoizedState!==null!==l&&(a.flags|=8192):l&&(a.flags|=8192),l?(i&536870912)!==0&&(a.flags&128)===0&&(et(a),a.subtreeFlags&6&&(a.flags|=8192)):et(a),i=a.updateQueue,i!==null&&Nl(a,i.retryQueue),i=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(i=t.memoizedState.cachePool.pool),l=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(l=a.memoizedState.cachePool.pool),l!==i&&(a.flags|=2048),t!==null&&q(Ba),null;case 24:return i=null,t!==null&&(i=t.memoizedState.cache),a.memoizedState.cache!==i&&(a.flags|=2048),fr(dt),et(a),null;case 25:return null;case 30:return null}throw Error(s(156,a.tag))}function pw(t,a){switch(Uc(a),a.tag){case 1:return t=a.flags,t&65536?(a.flags=t&-65537|128,a):null;case 3:return fr(dt),Be(),t=a.flags,(t&65536)!==0&&(t&128)===0?(a.flags=t&-65537|128,a):null;case 26:case 27:case 5:return Vt(a),null;case 31:if(a.memoizedState!==null){if(mn(a),a.alternate===null)throw Error(s(340));La()}return t=a.flags,t&65536?(a.flags=t&-65537|128,a):null;case 13:if(mn(a),t=a.memoizedState,t!==null&&t.dehydrated!==null){if(a.alternate===null)throw Error(s(340));La()}return t=a.flags,t&65536?(a.flags=t&-65537|128,a):null;case 19:return q(ut),null;case 4:return Be(),null;case 10:return fr(a.type),null;case 22:case 23:return mn(a),Fc(),t!==null&&q(Ba),t=a.flags,t&65536?(a.flags=t&-65537|128,a):null;case 24:return fr(dt),null;case 25:return null;default:return null}}function Fm(t,a){switch(Uc(a),a.tag){case 3:fr(dt),Be();break;case 26:case 27:case 5:Vt(a);break;case 4:Be();break;case 31:a.memoizedState!==null&&mn(a);break;case 13:mn(a);break;case 19:q(ut);break;case 10:fr(a.type);break;case 22:case 23:mn(a),Fc(),t!==null&&q(Ba);break;case 24:fr(dt)}}function Xi(t,a){try{var i=a.updateQueue,l=i!==null?i.lastEffect:null;if(l!==null){var d=l.next;i=d;do{if((i.tag&t)===t){l=void 0;var h=i.create,v=i.inst;l=h(),v.destroy=l}i=i.next}while(i!==d)}}catch(w){Ge(a,a.return,w)}}function Zr(t,a,i){try{var l=a.updateQueue,d=l!==null?l.lastEffect:null;if(d!==null){var h=d.next;l=h;do{if((l.tag&t)===t){var v=l.inst,w=v.destroy;if(w!==void 0){v.destroy=void 0,d=a;var O=i,U=w;try{U()}catch($){Ge(d,O,$)}}}l=l.next}while(l!==h)}}catch($){Ge(a,a.return,$)}}function Qm(t){var a=t.updateQueue;if(a!==null){var i=t.stateNode;try{$p(a,i)}catch(l){Ge(t,t.return,l)}}}function Wm(t,a,i){i.props=qa(t.type,t.memoizedProps),i.state=t.memoizedState;try{i.componentWillUnmount()}catch(l){Ge(t,a,l)}}function Fi(t,a){try{var i=t.ref;if(i!==null){switch(t.tag){case 26:case 27:case 5:var l=t.stateNode;break;case 30:l=t.stateNode;break;default:l=t.stateNode}typeof i=="function"?t.refCleanup=i(l):i.current=l}}catch(d){Ge(t,a,d)}}function Zn(t,a){var i=t.ref,l=t.refCleanup;if(i!==null)if(typeof l=="function")try{l()}catch(d){Ge(t,a,d)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof i=="function")try{i(null)}catch(d){Ge(t,a,d)}else i.current=null}function eg(t){var a=t.type,i=t.memoizedProps,l=t.stateNode;try{e:switch(a){case"button":case"input":case"select":case"textarea":i.autoFocus&&l.focus();break e;case"img":i.src?l.src=i.src:i.srcSet&&(l.srcset=i.srcSet)}}catch(d){Ge(t,t.return,d)}}function kd(t,a,i){try{var l=t.stateNode;Uw(l,t.type,i,a),l[Jt]=a}catch(d){Ge(t,t.return,d)}}function tg(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&ta(t.type)||t.tag===4}function Cd(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||tg(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.tag===27&&ta(t.type)||t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function jd(t,a,i){var l=t.tag;if(l===5||l===6)t=t.stateNode,a?(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i).insertBefore(t,a):(a=i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,a.appendChild(t),i=i._reactRootContainer,i!=null||a.onclick!==null||(a.onclick=or));else if(l!==4&&(l===27&&ta(t.type)&&(i=t.stateNode,a=null),t=t.child,t!==null))for(jd(t,a,i),t=t.sibling;t!==null;)jd(t,a,i),t=t.sibling}function Ml(t,a,i){var l=t.tag;if(l===5||l===6)t=t.stateNode,a?i.insertBefore(t,a):i.appendChild(t);else if(l!==4&&(l===27&&ta(t.type)&&(i=t.stateNode),t=t.child,t!==null))for(Ml(t,a,i),t=t.sibling;t!==null;)Ml(t,a,i),t=t.sibling}function ng(t){var a=t.stateNode,i=t.memoizedProps;try{for(var l=t.type,d=a.attributes;d.length;)a.removeAttributeNode(d[0]);jt(a,l,i),a[At]=t,a[Jt]=i}catch(h){Ge(t,t.return,h)}}var yr=!1,pt=!1,Nd=!1,rg=typeof WeakSet=="function"?WeakSet:Set,Tt=null;function mw(t,a){if(t=t.containerInfo,Wd=eu,t=mp(t),xc(t)){if("selectionStart"in t)var i={start:t.selectionStart,end:t.selectionEnd};else e:{i=(i=t.ownerDocument)&&i.defaultView||window;var l=i.getSelection&&i.getSelection();if(l&&l.rangeCount!==0){i=l.anchorNode;var d=l.anchorOffset,h=l.focusNode;l=l.focusOffset;try{i.nodeType,h.nodeType}catch{i=null;break e}var v=0,w=-1,O=-1,U=0,$=0,Y=t,z=null;t:for(;;){for(var P;Y!==i||d!==0&&Y.nodeType!==3||(w=v+d),Y!==h||l!==0&&Y.nodeType!==3||(O=v+l),Y.nodeType===3&&(v+=Y.nodeValue.length),(P=Y.firstChild)!==null;)z=Y,Y=P;for(;;){if(Y===t)break t;if(z===i&&++U===d&&(w=v),z===h&&++$===l&&(O=v),(P=Y.nextSibling)!==null)break;Y=z,z=Y.parentNode}Y=P}i=w===-1||O===-1?null:{start:w,end:O}}else i=null}i=i||{start:0,end:0}}else i=null;for(ef={focusedElem:t,selectionRange:i},eu=!1,Tt=a;Tt!==null;)if(a=Tt,t=a.child,(a.subtreeFlags&1028)!==0&&t!==null)t.return=a,Tt=t;else for(;Tt!==null;){switch(a=Tt,h=a.alternate,t=a.flags,a.tag){case 0:if((t&4)!==0&&(t=a.updateQueue,t=t!==null?t.events:null,t!==null))for(i=0;i<t.length;i++)d=t[i],d.ref.impl=d.nextImpl;break;case 11:case 15:break;case 1:if((t&1024)!==0&&h!==null){t=void 0,i=a,d=h.memoizedProps,h=h.memoizedState,l=i.stateNode;try{var ie=qa(i.type,d);t=l.getSnapshotBeforeUpdate(ie,h),l.__reactInternalSnapshotBeforeUpdate=t}catch(me){Ge(i,i.return,me)}}break;case 3:if((t&1024)!==0){if(t=a.stateNode.containerInfo,i=t.nodeType,i===9)rf(t);else if(i===1)switch(t.nodeName){case"HEAD":case"HTML":case"BODY":rf(t);break;default:t.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((t&1024)!==0)throw Error(s(163))}if(t=a.sibling,t!==null){t.return=a.return,Tt=t;break}Tt=a.return}}function ag(t,a,i){var l=i.flags;switch(i.tag){case 0:case 11:case 15:br(t,i),l&4&&Xi(5,i);break;case 1:if(br(t,i),l&4)if(t=i.stateNode,a===null)try{t.componentDidMount()}catch(v){Ge(i,i.return,v)}else{var d=qa(i.type,a.memoizedProps);a=a.memoizedState;try{t.componentDidUpdate(d,a,t.__reactInternalSnapshotBeforeUpdate)}catch(v){Ge(i,i.return,v)}}l&64&&Qm(i),l&512&&Fi(i,i.return);break;case 3:if(br(t,i),l&64&&(t=i.updateQueue,t!==null)){if(a=null,i.child!==null)switch(i.child.tag){case 27:case 5:a=i.child.stateNode;break;case 1:a=i.child.stateNode}try{$p(t,a)}catch(v){Ge(i,i.return,v)}}break;case 27:a===null&&l&4&&ng(i);case 26:case 5:br(t,i),a===null&&l&4&&eg(i),l&512&&Fi(i,i.return);break;case 12:br(t,i);break;case 31:br(t,i),l&4&&og(t,i);break;case 13:br(t,i),l&4&&lg(t,i),l&64&&(t=i.memoizedState,t!==null&&(t=t.dehydrated,t!==null&&(i=Tw.bind(null,i),Vw(t,i))));break;case 22:if(l=i.memoizedState!==null||yr,!l){a=a!==null&&a.memoizedState!==null||pt,d=yr;var h=pt;yr=l,(pt=a)&&!h?_r(t,i,(i.subtreeFlags&8772)!==0):br(t,i),yr=d,pt=h}break;case 30:break;default:br(t,i)}}function sg(t){var a=t.alternate;a!==null&&(t.alternate=null,sg(a)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(a=t.stateNode,a!==null&&lc(a)),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}var nt=null,Ft=!1;function vr(t,a,i){for(i=i.child;i!==null;)ig(t,a,i),i=i.sibling}function ig(t,a,i){if(Ht&&typeof Ht.onCommitFiberUnmount=="function")try{Ht.onCommitFiberUnmount(Ra,i)}catch{}switch(i.tag){case 26:pt||Zn(i,a),vr(t,a,i),i.memoizedState?i.memoizedState.count--:i.stateNode&&(i=i.stateNode,i.parentNode.removeChild(i));break;case 27:pt||Zn(i,a);var l=nt,d=Ft;ta(i.type)&&(nt=i.stateNode,Ft=!1),vr(t,a,i),io(i.stateNode),nt=l,Ft=d;break;case 5:pt||Zn(i,a);case 6:if(l=nt,d=Ft,nt=null,vr(t,a,i),nt=l,Ft=d,nt!==null)if(Ft)try{(nt.nodeType===9?nt.body:nt.nodeName==="HTML"?nt.ownerDocument.body:nt).removeChild(i.stateNode)}catch(h){Ge(i,a,h)}else try{nt.removeChild(i.stateNode)}catch(h){Ge(i,a,h)}break;case 18:nt!==null&&(Ft?(t=nt,Qg(t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,i.stateNode),Js(t)):Qg(nt,i.stateNode));break;case 4:l=nt,d=Ft,nt=i.stateNode.containerInfo,Ft=!0,vr(t,a,i),nt=l,Ft=d;break;case 0:case 11:case 14:case 15:Zr(2,i,a),pt||Zr(4,i,a),vr(t,a,i);break;case 1:pt||(Zn(i,a),l=i.stateNode,typeof l.componentWillUnmount=="function"&&Wm(i,a,l)),vr(t,a,i);break;case 21:vr(t,a,i);break;case 22:pt=(l=pt)||i.memoizedState!==null,vr(t,a,i),pt=l;break;default:vr(t,a,i)}}function og(t,a){if(a.memoizedState===null&&(t=a.alternate,t!==null&&(t=t.memoizedState,t!==null))){t=t.dehydrated;try{Js(t)}catch(i){Ge(a,a.return,i)}}}function lg(t,a){if(a.memoizedState===null&&(t=a.alternate,t!==null&&(t=t.memoizedState,t!==null&&(t=t.dehydrated,t!==null))))try{Js(t)}catch(i){Ge(a,a.return,i)}}function gw(t){switch(t.tag){case 31:case 13:case 19:var a=t.stateNode;return a===null&&(a=t.stateNode=new rg),a;case 22:return t=t.stateNode,a=t._retryCache,a===null&&(a=t._retryCache=new rg),a;default:throw Error(s(435,t.tag))}}function Dl(t,a){var i=gw(t);a.forEach(function(l){if(!i.has(l)){i.add(l);var d=xw.bind(null,t,l);l.then(d,d)}})}function Qt(t,a){var i=a.deletions;if(i!==null)for(var l=0;l<i.length;l++){var d=i[l],h=t,v=a,w=v;e:for(;w!==null;){switch(w.tag){case 27:if(ta(w.type)){nt=w.stateNode,Ft=!1;break e}break;case 5:nt=w.stateNode,Ft=!1;break e;case 3:case 4:nt=w.stateNode.containerInfo,Ft=!0;break e}w=w.return}if(nt===null)throw Error(s(160));ig(h,v,d),nt=null,Ft=!1,h=d.alternate,h!==null&&(h.return=null),d.return=null}if(a.subtreeFlags&13886)for(a=a.child;a!==null;)ug(a,t),a=a.sibling}var Bn=null;function ug(t,a){var i=t.alternate,l=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:Qt(a,t),Wt(t),l&4&&(Zr(3,t,t.return),Xi(3,t),Zr(5,t,t.return));break;case 1:Qt(a,t),Wt(t),l&512&&(pt||i===null||Zn(i,i.return)),l&64&&yr&&(t=t.updateQueue,t!==null&&(l=t.callbacks,l!==null&&(i=t.shared.hiddenCallbacks,t.shared.hiddenCallbacks=i===null?l:i.concat(l))));break;case 26:var d=Bn;if(Qt(a,t),Wt(t),l&512&&(pt||i===null||Zn(i,i.return)),l&4){var h=i!==null?i.memoizedState:null;if(l=t.memoizedState,i===null)if(l===null)if(t.stateNode===null){e:{l=t.type,i=t.memoizedProps,d=d.ownerDocument||d;t:switch(l){case"title":h=d.getElementsByTagName("title")[0],(!h||h[Ti]||h[At]||h.namespaceURI==="http://www.w3.org/2000/svg"||h.hasAttribute("itemprop"))&&(h=d.createElement(l),d.head.insertBefore(h,d.querySelector("head > title"))),jt(h,l,i),h[At]=t,Et(h),l=h;break e;case"link":var v=uy("link","href",d).get(l+(i.href||""));if(v){for(var w=0;w<v.length;w++)if(h=v[w],h.getAttribute("href")===(i.href==null||i.href===""?null:i.href)&&h.getAttribute("rel")===(i.rel==null?null:i.rel)&&h.getAttribute("title")===(i.title==null?null:i.title)&&h.getAttribute("crossorigin")===(i.crossOrigin==null?null:i.crossOrigin)){v.splice(w,1);break t}}h=d.createElement(l),jt(h,l,i),d.head.appendChild(h);break;case"meta":if(v=uy("meta","content",d).get(l+(i.content||""))){for(w=0;w<v.length;w++)if(h=v[w],h.getAttribute("content")===(i.content==null?null:""+i.content)&&h.getAttribute("name")===(i.name==null?null:i.name)&&h.getAttribute("property")===(i.property==null?null:i.property)&&h.getAttribute("http-equiv")===(i.httpEquiv==null?null:i.httpEquiv)&&h.getAttribute("charset")===(i.charSet==null?null:i.charSet)){v.splice(w,1);break t}}h=d.createElement(l),jt(h,l,i),d.head.appendChild(h);break;default:throw Error(s(468,l))}h[At]=t,Et(h),l=h}t.stateNode=l}else cy(d,t.type,t.stateNode);else t.stateNode=ly(d,l,t.memoizedProps);else h!==l?(h===null?i.stateNode!==null&&(i=i.stateNode,i.parentNode.removeChild(i)):h.count--,l===null?cy(d,t.type,t.stateNode):ly(d,l,t.memoizedProps)):l===null&&t.stateNode!==null&&kd(t,t.memoizedProps,i.memoizedProps)}break;case 27:Qt(a,t),Wt(t),l&512&&(pt||i===null||Zn(i,i.return)),i!==null&&l&4&&kd(t,t.memoizedProps,i.memoizedProps);break;case 5:if(Qt(a,t),Wt(t),l&512&&(pt||i===null||Zn(i,i.return)),t.flags&32){d=t.stateNode;try{vs(d,"")}catch(ie){Ge(t,t.return,ie)}}l&4&&t.stateNode!=null&&(d=t.memoizedProps,kd(t,d,i!==null?i.memoizedProps:d)),l&1024&&(Nd=!0);break;case 6:if(Qt(a,t),Wt(t),l&4){if(t.stateNode===null)throw Error(s(162));l=t.memoizedProps,i=t.stateNode;try{i.nodeValue=l}catch(ie){Ge(t,t.return,ie)}}break;case 3:if(Xl=null,d=Bn,Bn=Zl(a.containerInfo),Qt(a,t),Bn=d,Wt(t),l&4&&i!==null&&i.memoizedState.isDehydrated)try{Js(a.containerInfo)}catch(ie){Ge(t,t.return,ie)}Nd&&(Nd=!1,cg(t));break;case 4:l=Bn,Bn=Zl(t.stateNode.containerInfo),Qt(a,t),Wt(t),Bn=l;break;case 12:Qt(a,t),Wt(t);break;case 31:Qt(a,t),Wt(t),l&4&&(l=t.updateQueue,l!==null&&(t.updateQueue=null,Dl(t,l)));break;case 13:Qt(a,t),Wt(t),t.child.flags&8192&&t.memoizedState!==null!=(i!==null&&i.memoizedState!==null)&&(Ul=Oe()),l&4&&(l=t.updateQueue,l!==null&&(t.updateQueue=null,Dl(t,l)));break;case 22:d=t.memoizedState!==null;var O=i!==null&&i.memoizedState!==null,U=yr,$=pt;if(yr=U||d,pt=$||O,Qt(a,t),pt=$,yr=U,Wt(t),l&8192)e:for(a=t.stateNode,a._visibility=d?a._visibility&-2:a._visibility|1,d&&(i===null||O||yr||pt||Va(t)),i=null,a=t;;){if(a.tag===5||a.tag===26){if(i===null){O=i=a;try{if(h=O.stateNode,d)v=h.style,typeof v.setProperty=="function"?v.setProperty("display","none","important"):v.display="none";else{w=O.stateNode;var Y=O.memoizedProps.style,z=Y!=null&&Y.hasOwnProperty("display")?Y.display:null;w.style.display=z==null||typeof z=="boolean"?"":(""+z).trim()}}catch(ie){Ge(O,O.return,ie)}}}else if(a.tag===6){if(i===null){O=a;try{O.stateNode.nodeValue=d?"":O.memoizedProps}catch(ie){Ge(O,O.return,ie)}}}else if(a.tag===18){if(i===null){O=a;try{var P=O.stateNode;d?Wg(P,!0):Wg(O.stateNode,!1)}catch(ie){Ge(O,O.return,ie)}}}else if((a.tag!==22&&a.tag!==23||a.memoizedState===null||a===t)&&a.child!==null){a.child.return=a,a=a.child;continue}if(a===t)break e;for(;a.sibling===null;){if(a.return===null||a.return===t)break e;i===a&&(i=null),a=a.return}i===a&&(i=null),a.sibling.return=a.return,a=a.sibling}l&4&&(l=t.updateQueue,l!==null&&(i=l.retryQueue,i!==null&&(l.retryQueue=null,Dl(t,i))));break;case 19:Qt(a,t),Wt(t),l&4&&(l=t.updateQueue,l!==null&&(t.updateQueue=null,Dl(t,l)));break;case 30:break;case 21:break;default:Qt(a,t),Wt(t)}}function Wt(t){var a=t.flags;if(a&2){try{for(var i,l=t.return;l!==null;){if(tg(l)){i=l;break}l=l.return}if(i==null)throw Error(s(160));switch(i.tag){case 27:var d=i.stateNode,h=Cd(t);Ml(t,h,d);break;case 5:var v=i.stateNode;i.flags&32&&(vs(v,""),i.flags&=-33);var w=Cd(t);Ml(t,w,v);break;case 3:case 4:var O=i.stateNode.containerInfo,U=Cd(t);jd(t,U,O);break;default:throw Error(s(161))}}catch($){Ge(t,t.return,$)}t.flags&=-3}a&4096&&(t.flags&=-4097)}function cg(t){if(t.subtreeFlags&1024)for(t=t.child;t!==null;){var a=t;cg(a),a.tag===5&&a.flags&1024&&a.stateNode.reset(),t=t.sibling}}function br(t,a){if(a.subtreeFlags&8772)for(a=a.child;a!==null;)ag(t,a.alternate,a),a=a.sibling}function Va(t){for(t=t.child;t!==null;){var a=t;switch(a.tag){case 0:case 11:case 14:case 15:Zr(4,a,a.return),Va(a);break;case 1:Zn(a,a.return);var i=a.stateNode;typeof i.componentWillUnmount=="function"&&Wm(a,a.return,i),Va(a);break;case 27:io(a.stateNode);case 26:case 5:Zn(a,a.return),Va(a);break;case 22:a.memoizedState===null&&Va(a);break;case 30:Va(a);break;default:Va(a)}t=t.sibling}}function _r(t,a,i){for(i=i&&(a.subtreeFlags&8772)!==0,a=a.child;a!==null;){var l=a.alternate,d=t,h=a,v=h.flags;switch(h.tag){case 0:case 11:case 15:_r(d,h,i),Xi(4,h);break;case 1:if(_r(d,h,i),l=h,d=l.stateNode,typeof d.componentDidMount=="function")try{d.componentDidMount()}catch(U){Ge(l,l.return,U)}if(l=h,d=l.updateQueue,d!==null){var w=l.stateNode;try{var O=d.shared.hiddenCallbacks;if(O!==null)for(d.shared.hiddenCallbacks=null,d=0;d<O.length;d++)Hp(O[d],w)}catch(U){Ge(l,l.return,U)}}i&&v&64&&Qm(h),Fi(h,h.return);break;case 27:ng(h);case 26:case 5:_r(d,h,i),i&&l===null&&v&4&&eg(h),Fi(h,h.return);break;case 12:_r(d,h,i);break;case 31:_r(d,h,i),i&&v&4&&og(d,h);break;case 13:_r(d,h,i),i&&v&4&&lg(d,h);break;case 22:h.memoizedState===null&&_r(d,h,i),Fi(h,h.return);break;case 30:break;default:_r(d,h,i)}a=a.sibling}}function Md(t,a){var i=null;t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(i=t.memoizedState.cachePool.pool),t=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(t=a.memoizedState.cachePool.pool),t!==i&&(t!=null&&t.refCount++,i!=null&&zi(i))}function Dd(t,a){t=null,a.alternate!==null&&(t=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==t&&(a.refCount++,t!=null&&zi(t))}function Pn(t,a,i,l){if(a.subtreeFlags&10256)for(a=a.child;a!==null;)dg(t,a,i,l),a=a.sibling}function dg(t,a,i,l){var d=a.flags;switch(a.tag){case 0:case 11:case 15:Pn(t,a,i,l),d&2048&&Xi(9,a);break;case 1:Pn(t,a,i,l);break;case 3:Pn(t,a,i,l),d&2048&&(t=null,a.alternate!==null&&(t=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==t&&(a.refCount++,t!=null&&zi(t)));break;case 12:if(d&2048){Pn(t,a,i,l),t=a.stateNode;try{var h=a.memoizedProps,v=h.id,w=h.onPostCommit;typeof w=="function"&&w(v,a.alternate===null?"mount":"update",t.passiveEffectDuration,-0)}catch(O){Ge(a,a.return,O)}}else Pn(t,a,i,l);break;case 31:Pn(t,a,i,l);break;case 13:Pn(t,a,i,l);break;case 23:break;case 22:h=a.stateNode,v=a.alternate,a.memoizedState!==null?h._visibility&2?Pn(t,a,i,l):Qi(t,a):h._visibility&2?Pn(t,a,i,l):(h._visibility|=2,Bs(t,a,i,l,(a.subtreeFlags&10256)!==0||!1)),d&2048&&Md(v,a);break;case 24:Pn(t,a,i,l),d&2048&&Dd(a.alternate,a);break;default:Pn(t,a,i,l)}}function Bs(t,a,i,l,d){for(d=d&&((a.subtreeFlags&10256)!==0||!1),a=a.child;a!==null;){var h=t,v=a,w=i,O=l,U=v.flags;switch(v.tag){case 0:case 11:case 15:Bs(h,v,w,O,d),Xi(8,v);break;case 23:break;case 22:var $=v.stateNode;v.memoizedState!==null?$._visibility&2?Bs(h,v,w,O,d):Qi(h,v):($._visibility|=2,Bs(h,v,w,O,d)),d&&U&2048&&Md(v.alternate,v);break;case 24:Bs(h,v,w,O,d),d&&U&2048&&Dd(v.alternate,v);break;default:Bs(h,v,w,O,d)}a=a.sibling}}function Qi(t,a){if(a.subtreeFlags&10256)for(a=a.child;a!==null;){var i=t,l=a,d=l.flags;switch(l.tag){case 22:Qi(i,l),d&2048&&Md(l.alternate,l);break;case 24:Qi(i,l),d&2048&&Dd(l.alternate,l);break;default:Qi(i,l)}a=a.sibling}}var Wi=8192;
vendor: 22,868 bytes, line 9
9function Ps(t,a,i){if(t.subtreeFlags&Wi)for(t=t.child;t!==null;)fg(t,a,i),t=t.sibling}function fg(t,a,i){switch(t.tag){case 26:Ps(t,a,i),t.flags&Wi&&t.memoizedState!==null&&nS(i,Bn,t.memoizedState,t.memoizedProps);break;case 5:Ps(t,a,i);break;case 3:case 4:var l=Bn;Bn=Zl(t.stateNode.containerInfo),Ps(t,a,i),Bn=l;break;case 22:t.memoizedState===null&&(l=t.alternate,l!==null&&l.memoizedState!==null?(l=Wi,Wi=16777216,Ps(t,a,i),Wi=l):Ps(t,a,i));break;default:Ps(t,a,i)}}function hg(t){var a=t.alternate;if(a!==null&&(t=a.child,t!==null)){a.child=null;do a=t.sibling,t.sibling=null,t=a;while(t!==null)}}function eo(t){var a=t.deletions;if((t.flags&16)!==0){if(a!==null)for(var i=0;i<a.length;i++){var l=a[i];Tt=l,mg(l,t)}hg(t)}if(t.subtreeFlags&10256)for(t=t.child;t!==null;)pg(t),t=t.sibling}function pg(t){switch(t.tag){case 0:case 11:case 15:eo(t),t.flags&2048&&Zr(9,t,t.return);break;case 3:eo(t);break;case 12:eo(t);break;case 22:var a=t.stateNode;t.memoizedState!==null&&a._visibility&2&&(t.return===null||t.return.tag!==13)?(a._visibility&=-3,Ll(t)):eo(t);break;default:eo(t)}}function Ll(t){var a=t.deletions;if((t.flags&16)!==0){if(a!==null)for(var i=0;i<a.length;i++){var l=a[i];Tt=l,mg(l,t)}hg(t)}for(t=t.child;t!==null;){switch(a=t,a.tag){case 0:case 11:case 15:Zr(8,a,a.return),Ll(a);break;case 22:i=a.stateNode,i._visibility&2&&(i._visibility&=-3,Ll(a));break;default:Ll(a)}t=t.sibling}}function mg(t,a){for(;Tt!==null;){var i=Tt;switch(i.tag){case 0:case 11:case 15:Zr(8,i,a);break;case 23:case 22:if(i.memoizedState!==null&&i.memoizedState.cachePool!==null){var l=i.memoizedState.cachePool.pool;l!=null&&l.refCount++}break;case 24:zi(i.memoizedState.cache)}if(l=i.child,l!==null)l.return=i,Tt=l;else e:for(i=t;Tt!==null;){l=Tt;var d=l.sibling,h=l.return;if(sg(l),l===i){Tt=null;break e}if(d!==null){d.return=h,Tt=d;break e}Tt=h}}}var yw={getCacheForType:function(t){var a=kt(dt),i=a.data.get(t);return i===void 0&&(i=t(),a.data.set(t,i)),i},cacheSignal:function(){return kt(dt).controller.signal}},vw=typeof WeakMap=="function"?WeakMap:Map,qe=0,Xe=null,je=null,Me=0,Ve=0,gn=null,Jr=!1,Is=!1,Ld=!1,wr=0,it=0,Xr=0,Ga=0,Ud=0,yn=0,Hs=0,to=null,en=null,zd=!1,Ul=0,gg=0,zl=1/0,Bl=null,Fr=null,vt=0,Qr=null,$s=null,Sr=0,Bd=0,Pd=null,yg=null,no=0,Id=null;function vn(){return(qe&2)!==0&&Me!==0?Me&-Me:L.T!==null?Yd():ic()}function vg(){if(yn===0)if((Me&536870912)===0||Le){var t=cs;cs<<=1,(cs&3932160)===0&&(cs=262144),yn=t}else yn=536870912;return t=pn.current,t!==null&&(t.flags|=32),yn}function tn(t,a,i){(t===Xe&&(Ve===2||Ve===9)||t.cancelPendingCommit!==null)&&(qs(t,0),Wr(t,Me,yn,!1)),at(t,i),((qe&2)===0||t!==Xe)&&(t===Xe&&((qe&2)===0&&(Ga|=i),it===4&&Wr(t,Me,yn,!1)),Jn(t))}function bg(t,a,i){if((qe&6)!==0)throw Error(s(327));var l=!i&&(a&127)===0&&(a&t.expiredLanes)===0||tt(t,a),d=l?ww(t,a):$d(t,a,!0),h=l;do{if(d===0){Is&&!l&&Wr(t,a,0,!1);break}else{if(i=t.current.alternate,h&&!bw(i)){d=$d(t,a,!1),h=!1;continue}if(d===2){if(h=a,t.errorRecoveryDisabledLanes&h)var v=0;else v=t.pendingLanes&-536870913,v=v!==0?v:v&536870912?536870912:0;if(v!==0){a=v;e:{var w=t;d=to;var O=w.current.memoizedState.isDehydrated;if(O&&(qs(w,v).flags|=256),v=$d(w,v,!1),v!==2){if(Ld&&!O){w.errorRecoveryDisabledLanes|=h,Ga|=h,d=4;break e}h=en,en=d,h!==null&&(en===null?en=h:en.push.apply(en,h))}d=v}if(h=!1,d!==2)continue}}if(d===1){qs(t,0),Wr(t,a,0,!0);break}e:{switch(l=t,h=d,h){case 0:case 1:throw Error(s(345));case 4:if((a&4194048)!==a)break;case 6:Wr(l,a,yn,!Jr);break e;case 2:en=null;break;case 3:case 5:break;default:throw Error(s(329))}if((a&62914560)===a&&(d=Ul+300-Oe(),10<d)){if(Wr(l,a,yn,!Jr),be(l,0,!0)!==0)break e;Sr=a,l.timeoutHandle=Xg(_g.bind(null,l,i,en,Bl,zd,a,yn,Ga,Hs,Jr,h,"Throttled",-0,0),d);break e}_g(l,i,en,Bl,zd,a,yn,Ga,Hs,Jr,h,null,-0,0)}}break}while(!0);Jn(t)}function _g(t,a,i,l,d,h,v,w,O,U,$,Y,z,P){if(t.timeoutHandle=-1,Y=a.subtreeFlags,Y&8192||(Y&16785408)===16785408){Y={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:or},fg(a,h,Y);var ie=(h&62914560)===h?Ul-Oe():(h&4194048)===h?gg-Oe():0;if(ie=rS(Y,ie),ie!==null){Sr=h,t.cancelPendingCommit=ie(Og.bind(null,t,a,h,i,l,d,v,w,O,$,Y,null,z,P)),Wr(t,h,v,!U);return}}Og(t,a,h,i,l,d,v,w,O)}function bw(t){for(var a=t;;){var i=a.tag;if((i===0||i===11||i===15)&&a.flags&16384&&(i=a.updateQueue,i!==null&&(i=i.stores,i!==null)))for(var l=0;l<i.length;l++){var d=i[l],h=d.getSnapshot;d=d.value;try{if(!fn(h(),d))return!1}catch{return!1}}if(i=a.child,a.subtreeFlags&16384&&i!==null)i.return=a,a=i;else{if(a===t)break;for(;a.sibling===null;){if(a.return===null||a.return===t)return!0;a=a.return}a.sibling.return=a.return,a=a.sibling}}return!0}function Wr(t,a,i,l){a&=~Ud,a&=~Ga,t.suspendedLanes|=a,t.pingedLanes&=~a,l&&(t.warmLanes|=a),l=t.expirationTimes;for(var d=a;0<d;){var h=31-Ut(d),v=1<<h;l[h]=-1,d&=~v}i!==0&&Oa(t,i,a)}function Pl(){return(qe&6)===0?(ro(0),!1):!0}function Hd(){if(je!==null){if(Ve===0)var t=je.return;else t=je,dr=Ua=null,rd(t),Ms=null,Pi=0,t=je;for(;t!==null;)Fm(t.alternate,t),t=t.return;je=null}}function qs(t,a){var i=t.timeoutHandle;i!==-1&&(t.timeoutHandle=-1,Pw(i)),i=t.cancelPendingCommit,i!==null&&(t.cancelPendingCommit=null,i()),Sr=0,Hd(),Xe=t,je=i=ur(t.current,null),Me=a,Ve=0,gn=null,Jr=!1,Is=tt(t,a),Ld=!1,Hs=yn=Ud=Ga=Xr=it=0,en=to=null,zd=!1,(a&8)!==0&&(a|=a&32);var l=t.entangledLanes;if(l!==0)for(t=t.entanglements,l&=a;0<l;){var d=31-Ut(l),h=1<<d;a|=t[d],l&=~h}return wr=a,il(),i}function wg(t,a){Re=null,L.H=Ki,a===Ns||a===pl?(a=zp(),Ve=3):a===Gc?(a=zp(),Ve=4):Ve=a===bd?8:a!==null&&typeof a=="object"&&typeof a.then=="function"?6:1,gn=a,je===null&&(it=1,Ol(t,Tn(a,t.current)))}function Sg(){var t=pn.current;return t===null?!0:(Me&4194048)===Me?On===null:(Me&62914560)===Me||(Me&536870912)!==0?t===On:!1}function Eg(){var t=L.H;return L.H=Ki,t===null?Ki:t}function Tg(){var t=L.A;return L.A=yw,t}function Il(){it=4,Jr||(Me&4194048)!==Me&&pn.current!==null||(Is=!0),(Xr&134217727)===0&&(Ga&134217727)===0||Xe===null||Wr(Xe,Me,yn,!1)}function $d(t,a,i){var l=qe;qe|=2;var d=Eg(),h=Tg();(Xe!==t||Me!==a)&&(Bl=null,qs(t,a)),a=!1;var v=it;e:do try{if(Ve!==0&&je!==null){var w=je,O=gn;switch(Ve){case 8:Hd(),v=6;break e;case 3:case 2:case 9:case 6:pn.current===null&&(a=!0);var U=Ve;if(Ve=0,gn=null,Vs(t,w,O,U),i&&Is){v=0;break e}break;default:U=Ve,Ve=0,gn=null,Vs(t,w,O,U)}}_w(),v=it;break}catch($){wg(t,$)}while(!0);return a&&t.shellSuspendCounter++,dr=Ua=null,qe=l,L.H=d,L.A=h,je===null&&(Xe=null,Me=0,il()),v}function _w(){for(;je!==null;)xg(je)}function ww(t,a){var i=qe;qe|=2;var l=Eg(),d=Tg();Xe!==t||Me!==a?(Bl=null,zl=Oe()+500,qs(t,a)):Is=tt(t,a);e:do try{if(Ve!==0&&je!==null){a=je;var h=gn;t:switch(Ve){case 1:Ve=0,gn=null,Vs(t,a,h,1);break;case 2:case 9:if(Lp(h)){Ve=0,gn=null,Rg(a);break}a=function(){Ve!==2&&Ve!==9||Xe!==t||(Ve=7),Jn(t)},h.then(a,a);break e;case 3:Ve=7;break e;case 4:Ve=5;break e;case 7:Lp(h)?(Ve=0,gn=null,Rg(a)):(Ve=0,gn=null,Vs(t,a,h,7));break;case 5:var v=null;switch(je.tag){case 26:v=je.memoizedState;case 5:case 27:var w=je;if(v?dy(v):w.stateNode.complete){Ve=0,gn=null;var O=w.sibling;if(O!==null)je=O;else{var U=w.return;U!==null?(je=U,Hl(U)):je=null}break t}}Ve=0,gn=null,Vs(t,a,h,5);break;case 6:Ve=0,gn=null,Vs(t,a,h,6);break;case 8:Hd(),it=6;break e;default:throw Error(s(462))}}Sw();break}catch($){wg(t,$)}while(!0);return dr=Ua=null,L.H=l,L.A=d,qe=i,je!==null?0:(Xe=null,Me=0,il(),it)}function Sw(){for(;je!==null&&!Rt();)xg(je)}function xg(t){var a=Jm(t.alternate,t,wr);t.memoizedProps=t.pendingProps,a===null?Hl(t):je=a}function Rg(t){var a=t,i=a.alternate;switch(a.tag){case 15:case 0:a=qm(i,a,a.pendingProps,a.type,void 0,Me);break;case 11:a=qm(i,a,a.pendingProps,a.type.render,a.ref,Me);break;case 5:rd(a);default:Fm(i,a),a=je=Tp(a,wr),a=Jm(i,a,wr)}t.memoizedProps=t.pendingProps,a===null?Hl(t):je=a}function Vs(t,a,i,l){dr=Ua=null,rd(a),Ms=null,Pi=0;var d=a.return;try{if(cw(t,d,a,i,Me)){it=1,Ol(t,Tn(i,t.current)),je=null;return}}catch(h){if(d!==null)throw je=d,h;it=1,Ol(t,Tn(i,t.current)),je=null;return}a.flags&32768?(Le||l===1?t=!0:Is||(Me&536870912)!==0?t=!1:(Jr=t=!0,(l===2||l===9||l===3||l===6)&&(l=pn.current,l!==null&&l.tag===13&&(l.flags|=16384))),Ag(a,t)):Hl(a)}function Hl(t){var a=t;do{if((a.flags&32768)!==0){Ag(a,Jr);return}t=a.return;var i=hw(a.alternate,a,wr);if(i!==null){je=i;return}if(a=a.sibling,a!==null){je=a;return}je=a=t}while(a!==null);it===0&&(it=5)}function Ag(t,a){do{var i=pw(t.alternate,t);if(i!==null){i.flags&=32767,je=i;return}if(i=t.return,i!==null&&(i.flags|=32768,i.subtreeFlags=0,i.deletions=null),!a&&(t=t.sibling,t!==null)){je=t;return}je=t=i}while(t!==null);it=6,je=null}function Og(t,a,i,l,d,h,v,w,O){t.cancelPendingCommit=null;do $l();while(vt!==0);if((qe&6)!==0)throw Error(s(327));if(a!==null){if(a===t.current)throw Error(s(177));if(h=a.lanes|a.childLanes,h|=Cc,Yt(t,i,h,v,w,O),t===Xe&&(je=Xe=null,Me=0),$s=a,Qr=t,Sr=i,Bd=h,Pd=d,yg=l,(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?(t.callbackNode=null,t.callbackPriority=0,Rw(xa,function(){return Mg(),null})):(t.callbackNode=null,t.callbackPriority=0),l=(a.flags&13878)!==0,(a.subtreeFlags&13878)!==0||l){l=L.T,L.T=null,d=Z.p,Z.p=2,v=qe,qe|=4;try{mw(t,a,i)}finally{qe=v,Z.p=d,L.T=l}}vt=1,kg(),Cg(),jg()}}function kg(){if(vt===1){vt=0;var t=Qr,a=$s,i=(a.flags&13878)!==0;if((a.subtreeFlags&13878)!==0||i){i=L.T,L.T=null;var l=Z.p;Z.p=2;var d=qe;qe|=4;try{ug(a,t);var h=ef,v=mp(t.containerInfo),w=h.focusedElem,O=h.selectionRange;if(v!==w&&w&&w.ownerDocument&&pp(w.ownerDocument.documentElement,w)){if(O!==null&&xc(w)){var U=O.start,$=O.end;if($===void 0&&($=U),"selectionStart"in w)w.selectionStart=U,w.selectionEnd=Math.min($,w.value.length);else{var Y=w.ownerDocument||document,z=Y&&Y.defaultView||window;if(z.getSelection){var P=z.getSelection(),ie=w.textContent.length,me=Math.min(O.start,ie),Ze=O.end===void 0?me:Math.min(O.end,ie);!P.extend&&me>Ze&&(v=Ze,Ze=me,me=v);var j=hp(w,me),C=hp(w,Ze);if(j&&C&&(P.rangeCount!==1||P.anchorNode!==j.node||P.anchorOffset!==j.offset||P.focusNode!==C.node||P.focusOffset!==C.offset)){var D=Y.createRange();D.setStart(j.node,j.offset),P.removeAllRanges(),me>Ze?(P.addRange(D),P.extend(C.node,C.offset)):(D.setEnd(C.node,C.offset),P.addRange(D))}}}}for(Y=[],P=w;P=P.parentNode;)P.nodeType===1&&Y.push({element:P,left:P.scrollLeft,top:P.scrollTop});for(typeof w.focus=="function"&&w.focus(),w=0;w<Y.length;w++){var V=Y[w];V.element.scrollLeft=V.left,V.element.scrollTop=V.top}}eu=!!Wd,ef=Wd=null}finally{qe=d,Z.p=l,L.T=i}}t.current=a,vt=2}}function Cg(){if(vt===2){vt=0;var t=Qr,a=$s,i=(a.flags&8772)!==0;if((a.subtreeFlags&8772)!==0||i){i=L.T,L.T=null;var l=Z.p;Z.p=2;var d=qe;qe|=4;try{ag(t,a.alternate,a)}finally{qe=d,Z.p=l,L.T=i}}vt=3}}function jg(){if(vt===4||vt===3){vt=0,Dn();var t=Qr,a=$s,i=Sr,l=yg;(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?vt=5:(vt=0,$s=Qr=null,Ng(t,t.pendingLanes));var d=t.pendingLanes;if(d===0&&(Fr=null),Un(i),a=a.stateNode,Ht&&typeof Ht.onCommitFiberRoot=="function")try{Ht.onCommitFiberRoot(Ra,a,void 0,(a.current.flags&128)===128)}catch{}if(l!==null){a=L.T,d=Z.p,Z.p=2,L.T=null;try{for(var h=t.onRecoverableError,v=0;v<l.length;v++){var w=l[v];h(w.value,{componentStack:w.stack})}}finally{L.T=a,Z.p=d}}(Sr&3)!==0&&$l(),Jn(t),d=t.pendingLanes,(i&261930)!==0&&(d&42)!==0?t===Id?no++:(no=0,Id=t):no=0,ro(0)}}function Ng(t,a){(t.pooledCacheLanes&=a)===0&&(a=t.pooledCache,a!=null&&(t.pooledCache=null,zi(a)))}function $l(){return kg(),Cg(),jg(),Mg()}function Mg(){if(vt!==5)return!1;var t=Qr,a=Bd;Bd=0;var i=Un(Sr),l=L.T,d=Z.p;try{Z.p=32>i?32:i,L.T=null,i=Pd,Pd=null;var h=Qr,v=Sr;if(vt=0,$s=Qr=null,Sr=0,(qe&6)!==0)throw Error(s(331));var w=qe;if(qe|=4,pg(h.current),dg(h,h.current,v,i),qe=w,ro(0,!1),Ht&&typeof Ht.onPostCommitFiberRoot=="function")try{Ht.onPostCommitFiberRoot(Ra,h)}catch{}return!0}finally{Z.p=d,L.T=l,Ng(t,a)}}function Dg(t,a,i){a=Tn(i,a),a=vd(t.stateNode,a,2),t=Gr(t,a,2),t!==null&&(at(t,2),Jn(t))}function Ge(t,a,i){if(t.tag===3)Dg(t,t,i);else for(;a!==null;){if(a.tag===3){Dg(a,t,i);break}else if(a.tag===1){var l=a.stateNode;if(typeof a.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(Fr===null||!Fr.has(l))){t=Tn(i,t),i=Lm(2),l=Gr(a,i,2),l!==null&&(Um(i,l,a,t),at(l,2),Jn(l));break}}a=a.return}}function qd(t,a,i){var l=t.pingCache;if(l===null){l=t.pingCache=new vw;var d=new Set;l.set(a,d)}else d=l.get(a),d===void 0&&(d=new Set,l.set(a,d));d.has(i)||(Ld=!0,d.add(i),t=Ew.bind(null,t,a,i),a.then(t,t))}function Ew(t,a,i){var l=t.pingCache;l!==null&&l.delete(a),t.pingedLanes|=t.suspendedLanes&i,t.warmLanes&=~i,Xe===t&&(Me&i)===i&&(it===4||it===3&&(Me&62914560)===Me&&300>Oe()-Ul?(qe&2)===0&&qs(t,0):Ud|=i,Hs===Me&&(Hs=0)),Jn(t)}function Lg(t,a){a===0&&(a=zt()),t=Ma(t,a),t!==null&&(at(t,a),Jn(t))}function Tw(t){var a=t.memoizedState,i=0;a!==null&&(i=a.retryLane),Lg(t,i)}function xw(t,a){var i=0;switch(t.tag){case 31:case 13:var l=t.stateNode,d=t.memoizedState;d!==null&&(i=d.retryLane);break;case 19:l=t.stateNode;break;case 22:l=t.stateNode._retryCache;break;default:throw Error(s(314))}l!==null&&l.delete(a),Lg(t,i)}function Rw(t,a){return Ta(t,a)}var ql=null,Gs=null,Vd=!1,Vl=!1,Gd=!1,ea=0;function Jn(t){t!==Gs&&t.next===null&&(Gs===null?ql=Gs=t:Gs=Gs.next=t),Vl=!0,Vd||(Vd=!0,Ow())}function ro(t,a){if(!Gd&&Vl){Gd=!0;do for(var i=!1,l=ql;l!==null;){if(t!==0){var d=l.pendingLanes;if(d===0)var h=0;else{var v=l.suspendedLanes,w=l.pingedLanes;h=(1<<31-Ut(42|t)+1)-1,h&=d&~(v&~w),h=h&201326741?h&201326741|1:h?h|2:0}h!==0&&(i=!0,Pg(l,h))}else h=Me,h=be(l,l===Xe?h:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(h&3)===0||tt(l,h)||(i=!0,Pg(l,h));l=l.next}while(i);Gd=!1}}function Aw(){Ug()}function Ug(){Vl=Vd=!1;var t=0;ea!==0&&Bw()&&(t=ea);for(var a=Oe(),i=null,l=ql;l!==null;){var d=l.next,h=zg(l,a);h===0?(l.next=null,i===null?ql=d:i.next=d,d===null&&(Gs=i)):(i=l,(t!==0||(h&3)!==0)&&(Vl=!0)),l=d}vt!==0&&vt!==5||ro(t),ea!==0&&(ea=0)}function zg(t,a){for(var i=t.suspendedLanes,l=t.pingedLanes,d=t.expirationTimes,h=t.pendingLanes&-62914561;0<h;){var v=31-Ut(h),w=1<<v,O=d[v];O===-1?((w&i)===0||(w&l)!==0)&&(d[v]=St(w,a)):O<=a&&(t.expiredLanes|=w),h&=~w}if(a=Xe,i=Me,i=be(t,t===a?i:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),l=t.callbackNode,i===0||t===a&&(Ve===2||Ve===9)||t.cancelPendingCommit!==null)return l!==null&&l!==null&&Dr(l),t.callbackNode=null,t.callbackPriority=0;if((i&3)===0||tt(t,i)){if(a=i&-i,a===t.callbackPriority)return a;switch(l!==null&&Dr(l),Un(i)){case 2:case 8:i=ls;break;case 32:i=xa;break;case 268435456:i=sr;break;default:i=xa}return l=Bg.bind(null,t),i=Ta(i,l),t.callbackPriority=a,t.callbackNode=i,a}return l!==null&&l!==null&&Dr(l),t.callbackPriority=2,t.callbackNode=null,2}function Bg(t,a){if(vt!==0&&vt!==5)return t.callbackNode=null,t.callbackPriority=0,null;var i=t.callbackNode;if($l()&&t.callbackNode!==i)return null;var l=Me;return l=be(t,t===Xe?l:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),l===0?null:(bg(t,l,a),zg(t,Oe()),t.callbackNode!=null&&t.callbackNode===i?Bg.bind(null,t):null)}function Pg(t,a){if($l())return null;bg(t,a,!0)}function Ow(){Iw(function(){(qe&6)!==0?Ta(It,Aw):Ug()})}function Yd(){if(ea===0){var t=Cs;t===0&&(t=us,us<<=1,(us&261888)===0&&(us=256)),ea=t}return ea}function Ig(t){return t==null||typeof t=="symbol"||typeof t=="boolean"?null:typeof t=="function"?t:Qo(""+t)}function Hg(t,a){var i=a.ownerDocument.createElement("input");return i.name=a.name,i.value=a.value,t.id&&i.setAttribute("form",t.id),a.parentNode.insertBefore(i,a),t=new FormData(t),i.parentNode.removeChild(i),t}function kw(t,a,i,l,d){if(a==="submit"&&i&&i.stateNode===d){var h=Ig((d[Jt]||null).action),v=l.submitter;v&&(a=(a=v[Jt]||null)?Ig(a.formAction):v.getAttribute("formAction"),a!==null&&(h=a,v=null));var w=new nl("action","action",null,l,d);t.push({event:w,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(ea!==0){var O=v?Hg(d,v):new FormData(d);fd(i,{pending:!0,data:O,method:d.method,action:h},null,O)}}else typeof h=="function"&&(w.preventDefault(),O=v?Hg(d,v):new FormData(d),fd(i,{pending:!0,data:O,method:d.method,action:h},h,O))},currentTarget:d}]})}}for(var Kd=0;Kd<kc.length;Kd++){var Zd=kc[Kd],Cw=Zd.toLowerCase(),jw=Zd[0].toUpperCase()+Zd.slice(1);zn(Cw,"on"+jw)}zn(vp,"onAnimationEnd"),zn(bp,"onAnimationIteration"),zn(_p,"onAnimationStart"),zn("dblclick","onDoubleClick"),zn("focusin","onFocus"),zn("focusout","onBlur"),zn(K_,"onTransitionRun"),zn(Z_,"onTransitionStart"),zn(J_,"onTransitionCancel"),zn(wp,"onTransitionEnd"),gs("onMouseEnter",["mouseout","mouseover"]),gs("onMouseLeave",["mouseout","mouseover"]),gs("onPointerEnter",["pointerout","pointerover"]),gs("onPointerLeave",["pointerout","pointerover"]),ka("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ka("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),ka("onBeforeInput",["compositionend","keypress","textInput","paste"]),ka("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ka("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ka("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ao="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(" "),Nw=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ao));function $g(t,a){a=(a&4)!==0;for(var i=0;i<t.length;i++){var l=t[i],d=l.event;l=l.listeners;e:{var h=void 0;if(a)for(var v=l.length-1;0<=v;v--){var w=l[v],O=w.instance,U=w.currentTarget;if(w=w.listener,O!==h&&d.isPropagationStopped())break e;h=w,d.currentTarget=U;try{h(d)}catch($){sl($)}d.currentTarget=null,h=O}else for(v=0;v<l.length;v++){if(w=l[v],O=w.instance,U=w.currentTarget,w=w.listener,O!==h&&d.isPropagationStopped())break e;h=w,d.currentTarget=U;try{h(d)}catch($){sl($)}d.currentTarget=null,h=O}}}}function Ne(t,a){var i=a[oc];i===void 0&&(i=a[oc]=new Set);var l=t+"__bubble";i.has(l)||(qg(a,t,2,!1),i.add(l))}function Jd(t,a,i){var l=0;a&&(l|=4),qg(i,t,l,a)}var Gl="_reactListening"+Math.random().toString(36).slice(2);function Xd(t){if(!t[Gl]){t[Gl]=!0,Uh.forEach(function(i){i!=="selectionchange"&&(Nw.has(i)||Jd(i,!1,t),Jd(i,!0,t))});var a=t.nodeType===9?t:t.ownerDocument;a===null||a[Gl]||(a[Gl]=!0,Jd("selectionchange",!1,a))}}function qg(t,a,i,l){switch(vy(a)){case 2:var d=iS;break;case 8:d=oS;break;default:d=ff}i=d.bind(null,a,i,t),d=void 0,!gc||a!=="touchstart"&&a!=="touchmove"&&a!=="wheel"||(d=!0),l?d!==void 0?t.addEventListener(a,i,{capture:!0,passive:d}):t.addEventListener(a,i,!0):d!==void 0?t.addEventListener(a,i,{passive:d}):t.addEventListener(a,i,!1)}function Fd(t,a,i,l,d){var h=l;if((a&1)===0&&(a&2)===0&&l!==null)e:for(;;){if(l===null)return;var v=l.tag;if(v===3||v===4){var w=l.stateNode.containerInfo;if(w===d)break;if(v===4)for(v=l.return;v!==null;){var O=v.tag;if((O===3||O===4)&&v.stateNode.containerInfo===d)return;v=v.return}for(;w!==null;){if(v=hs(w),v===null)return;if(O=v.tag,O===5||O===6||O===26||O===27){l=h=v;continue e}w=w.parentNode}}l=l.return}Zh(function(){var U=h,$=pc(i),Y=[];e:{var z=Sp.get(t);if(z!==void 0){var P=nl,ie=t;switch(t){case"keypress":if(el(i)===0)break e;case"keydown":case"keyup":P=x_;break;case"focusin":ie="focus",P=_c;break;case"focusout":ie="blur",P=_c;break;case"beforeblur":case"afterblur":P=_c;break;case"click":if(i.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":P=Fh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":P=h_;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":P=O_;break;case vp:case bp:case _p:P=g_;break;case wp:P=C_;break;case"scroll":case"scrollend":P=d_;break;case"wheel":P=N_;break;case"copy":case"cut":case"paste":P=v_;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":P=Wh;break;case"toggle":case"beforetoggle":P=D_}var me=(a&4)!==0,Ze=!me&&(t==="scroll"||t==="scrollend"),j=me?z!==null?z+"Capture":null:z;me=[];for(var C=U,D;C!==null;){var V=C;if(D=V.stateNode,V=V.tag,V!==5&&V!==26&&V!==27||D===null||j===null||(V=Ri(C,j),V!=null&&me.push(so(C,V,D))),Ze)break;C=C.return}0<me.length&&(z=new P(z,ie,null,i,$),Y.push({event:z,listeners:me}))}}if((a&7)===0){e:{if(z=t==="mouseover"||t==="pointerover",P=t==="mouseout"||t==="pointerout",z&&i!==hc&&(ie=i.relatedTarget||i.fromElement)&&(hs(ie)||ie[fs]))break e;if((P||z)&&(z=$.window===$?$:(z=$.ownerDocument)?z.defaultView||z.parentWindow:window,P?(ie=i.relatedTarget||i.toElement,P=U,ie=ie?hs(ie):null,ie!==null&&(Ze=u(ie),me=ie.tag,ie!==Ze||me!==5&&me!==27&&me!==6)&&(ie=null)):(P=null,ie=U),P!==ie)){if(me=Fh,V="onMouseLeave",j="onMouseEnter",C="mouse",(t==="pointerout"||t==="pointerover")&&(me=Wh,V="onPointerLeave",j="onPointerEnter",C="pointer"),Ze=P==null?z:xi(P),D=ie==null?z:xi(ie),z=new me(V,C+"leave",P,i,$),z.target=Ze,z.relatedTarget=D,V=null,hs($)===U&&(me=new me(j,C+"enter",ie,i,$),me.target=D,me.relatedTarget=Ze,V=me),Ze=V,P&&ie)t:{for(me=Mw,j=P,C=ie,D=0,V=j;V;V=me(V))D++;V=0;for(var fe=C;fe;fe=me(fe))V++;for(;0<D-V;)j=me(j),D--;for(;0<V-D;)C=me(C),V--;for(;D--;){if(j===C||C!==null&&j===C.alternate){me=j;break t}j=me(j),C=me(C)}me=null}else me=null;P!==null&&Vg(Y,z,P,me,!1),ie!==null&&Ze!==null&&Vg(Y,Ze,ie,me,!0)}}e:{if(z=U?xi(U):window,P=z.nodeName&&z.nodeName.toLowerCase(),P==="select"||P==="input"&&z.type==="file")var Pe=op;else if(sp(z))if(lp)Pe=V_;else{Pe=$_;var ce=H_}else P=z.nodeName,!P||P.toLowerCase()!=="input"||z.type!=="checkbox"&&z.type!=="radio"?U&&fc(U.elementType)&&(Pe=op):Pe=q_;if(Pe&&(Pe=Pe(t,U))){ip(Y,Pe,i,$);break e}ce&&ce(t,z,U),t==="focusout"&&U&&z.type==="number"&&U.memoizedProps.value!=null&&dc(z,"number",z.value)}switch(ce=U?xi(U):window,t){case"focusin":(sp(ce)||ce.contentEditable==="true")&&(Ss=ce,Rc=U,Di=null);break;case"focusout":Di=Rc=Ss=null;break;case"mousedown":Ac=!0;break;case"contextmenu":case"mouseup":case"dragend":Ac=!1,gp(Y,i,$);break;case"selectionchange":if(Y_)break;case"keydown":case"keyup":gp(Y,i,$)}var Ae;if(Sc)e:{switch(t){case"compositionstart":var De="onCompositionStart";break e;case"compositionend":De="onCompositionEnd";break e;case"compositionupdate":De="onCompositionUpdate";break e}De=void 0}else ws?rp(t,i)&&(De="onCompositionEnd"):t==="keydown"&&i.keyCode===229&&(De="onCompositionStart");De&&(ep&&i.locale!=="ko"&&(ws||De!=="onCompositionStart"?De==="onCompositionEnd"&&ws&&(Ae=Jh()):(Br=$,yc="value"in Br?Br.value:
vendor: 14,893 bytes, lines 9-10
9Br.textContent,ws=!0)),ce=Yl(U,De),0<ce.length&&(De=new Qh(De,t,null,i,$),Y.push({event:De,listeners:ce}),Ae?De.data=Ae:(Ae=ap(i),Ae!==null&&(De.data=Ae)))),(Ae=U_?z_(t,i):B_(t,i))&&(De=Yl(U,"onBeforeInput"),0<De.length&&(ce=new Qh("onBeforeInput","beforeinput",null,i,$),Y.push({event:ce,listeners:De}),ce.data=Ae)),kw(Y,t,U,i,$)}$g(Y,a)})}function so(t,a,i){return{instance:t,listener:a,currentTarget:i}}function Yl(t,a){for(var i=a+"Capture",l=[];t!==null;){var d=t,h=d.stateNode;if(d=d.tag,d!==5&&d!==26&&d!==27||h===null||(d=Ri(t,i),d!=null&&l.unshift(so(t,d,h)),d=Ri(t,a),d!=null&&l.push(so(t,d,h))),t.tag===3)return l;t=t.return}return[]}function Mw(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5&&t.tag!==27);return t||null}function Vg(t,a,i,l,d){for(var h=a._reactName,v=[];i!==null&&i!==l;){var w=i,O=w.alternate,U=w.stateNode;if(w=w.tag,O!==null&&O===l)break;w!==5&&w!==26&&w!==27||U===null||(O=U,d?(U=Ri(i,h),U!=null&&v.unshift(so(i,U,O))):d||(U=Ri(i,h),U!=null&&v.push(so(i,U,O)))),i=i.return}v.length!==0&&t.push({event:a,listeners:v})}var Dw=/\r\n?/g,Lw=/\u0000|\uFFFD/g;function Gg(t){return(typeof t=="string"?t:""+t).replace(Dw,`
10`).replace(Lw,"")}function Yg(t,a){return a=Gg(a),Gg(t)===a}function Ke(t,a,i,l,d,h){switch(i){case"children":typeof l=="string"?a==="body"||a==="textarea"&&l===""||vs(t,l):(typeof l=="number"||typeof l=="bigint")&&a!=="body"&&vs(t,""+l);break;case"className":Xo(t,"class",l);break;case"tabIndex":Xo(t,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":Xo(t,i,l);break;case"style":Yh(t,l,h);break;case"data":if(a!=="object"){Xo(t,"data",l);break}case"src":case"href":if(l===""&&(a!=="a"||i!=="href")){t.removeAttribute(i);break}if(l==null||typeof l=="function"||typeof l=="symbol"||typeof l=="boolean"){t.removeAttribute(i);break}l=Qo(""+l),t.setAttribute(i,l);break;case"action":case"formAction":if(typeof l=="function"){t.setAttribute(i,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof h=="function"&&(i==="formAction"?(a!=="input"&&Ke(t,a,"name",d.name,d,null),Ke(t,a,"formEncType",d.formEncType,d,null),Ke(t,a,"formMethod",d.formMethod,d,null),Ke(t,a,"formTarget",d.formTarget,d,null)):(Ke(t,a,"encType",d.encType,d,null),Ke(t,a,"method",d.method,d,null),Ke(t,a,"target",d.target,d,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){t.removeAttribute(i);break}l=Qo(""+l),t.setAttribute(i,l);break;case"onClick":l!=null&&(t.onclick=or);break;case"onScroll":l!=null&&Ne("scroll",t);break;case"onScrollEnd":l!=null&&Ne("scrollend",t);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(s(61));if(i=l.__html,i!=null){if(d.children!=null)throw Error(s(60));t.innerHTML=i}}break;case"multiple":t.multiple=l&&typeof l!="function"&&typeof l!="symbol";break;case"muted":t.muted=l&&typeof l!="function"&&typeof l!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(l==null||typeof l=="function"||typeof l=="boolean"||typeof l=="symbol"){t.removeAttribute("xlink:href");break}i=Qo(""+l),t.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",i);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":l!=null&&typeof l!="function"&&typeof l!="symbol"?t.setAttribute(i,""+l):t.removeAttribute(i);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":l&&typeof l!="function"&&typeof l!="symbol"?t.setAttribute(i,""):t.removeAttribute(i);break;case"capture":case"download":l===!0?t.setAttribute(i,""):l!==!1&&l!=null&&typeof l!="function"&&typeof l!="symbol"?t.setAttribute(i,l):t.removeAttribute(i);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!="function"&&typeof l!="symbol"&&!isNaN(l)&&1<=l?t.setAttribute(i,l):t.removeAttribute(i);break;case"rowSpan":case"start":l==null||typeof l=="function"||typeof l=="symbol"||isNaN(l)?t.removeAttribute(i):t.setAttribute(i,l);break;case"popover":Ne("beforetoggle",t),Ne("toggle",t),Jo(t,"popover",l);break;case"xlinkActuate":ir(t,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":ir(t,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":ir(t,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":ir(t,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":ir(t,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":ir(t,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":ir(t,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":ir(t,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":ir(t,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":Jo(t,"is",l);break;case"innerText":case"textContent":break;default:(!(2<i.length)||i[0]!=="o"&&i[0]!=="O"||i[1]!=="n"&&i[1]!=="N")&&(i=u_.get(i)||i,Jo(t,i,l))}}function Qd(t,a,i,l,d,h){switch(i){case"style":Yh(t,l,h);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(s(61));if(i=l.__html,i!=null){if(d.children!=null)throw Error(s(60));t.innerHTML=i}}break;case"children":typeof l=="string"?vs(t,l):(typeof l=="number"||typeof l=="bigint")&&vs(t,""+l);break;case"onScroll":l!=null&&Ne("scroll",t);break;case"onScrollEnd":l!=null&&Ne("scrollend",t);break;case"onClick":l!=null&&(t.onclick=or);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!zh.hasOwnProperty(i))e:{if(i[0]==="o"&&i[1]==="n"&&(d=i.endsWith("Capture"),a=i.slice(2,d?i.length-7:void 0),h=t[Jt]||null,h=h!=null?h[i]:null,typeof h=="function"&&t.removeEventListener(a,h,d),typeof l=="function")){typeof h!="function"&&h!==null&&(i in t?t[i]=null:t.hasAttribute(i)&&t.removeAttribute(i)),t.addEventListener(a,l,d);break e}i in t?t[i]=l:l===!0?t.setAttribute(i,""):Jo(t,i,l)}}}function jt(t,a,i){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ne("error",t),Ne("load",t);var l=!1,d=!1,h;for(h in i)if(i.hasOwnProperty(h)){var v=i[h];if(v!=null)switch(h){case"src":l=!0;break;case"srcSet":d=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(s(137,a));default:Ke(t,a,h,v,i,null)}}d&&Ke(t,a,"srcSet",i.srcSet,i,null),l&&Ke(t,a,"src",i.src,i,null);return;case"input":Ne("invalid",t);var w=h=v=d=null,O=null,U=null;for(l in i)if(i.hasOwnProperty(l)){var $=i[l];if($!=null)switch(l){case"name":d=$;break;case"type":v=$;break;case"checked":O=$;break;case"defaultChecked":U=$;break;case"value":h=$;break;case"defaultValue":w=$;break;case"children":case"dangerouslySetInnerHTML":if($!=null)throw Error(s(137,a));break;default:Ke(t,a,l,$,i,null)}}$h(t,h,w,O,U,v,d,!1);return;case"select":Ne("invalid",t),l=v=h=null;for(d in i)if(i.hasOwnProperty(d)&&(w=i[d],w!=null))switch(d){case"value":h=w;break;case"defaultValue":v=w;break;case"multiple":l=w;default:Ke(t,a,d,w,i,null)}a=h,i=v,t.multiple=!!l,a!=null?ys(t,!!l,a,!1):i!=null&&ys(t,!!l,i,!0);return;case"textarea":Ne("invalid",t),h=d=l=null;for(v in i)if(i.hasOwnProperty(v)&&(w=i[v],w!=null))switch(v){case"value":l=w;break;case"defaultValue":d=w;break;case"children":h=w;break;case"dangerouslySetInnerHTML":if(w!=null)throw Error(s(91));break;default:Ke(t,a,v,w,i,null)}Vh(t,l,d,h);return;case"option":for(O in i)i.hasOwnProperty(O)&&(l=i[O],l!=null)&&(O==="selected"?t.selected=l&&typeof l!="function"&&typeof l!="symbol":Ke(t,a,O,l,i,null));return;case"dialog":Ne("beforetoggle",t),Ne("toggle",t),Ne("cancel",t),Ne("close",t);break;case"iframe":case"object":Ne("load",t);break;case"video":case"audio":for(l=0;l<ao.length;l++)Ne(ao[l],t);break;case"image":Ne("error",t),Ne("load",t);break;case"details":Ne("toggle",t);break;case"embed":case"source":case"link":Ne("error",t),Ne("load",t);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(U in i)if(i.hasOwnProperty(U)&&(l=i[U],l!=null))switch(U){case"children":case"dangerouslySetInnerHTML":throw Error(s(137,a));default:Ke(t,a,U,l,i,null)}return;default:if(fc(a)){for($ in i)i.hasOwnProperty($)&&(l=i[$],l!==void 0&&Qd(t,a,$,l,i,void 0));return}}for(w in i)i.hasOwnProperty(w)&&(l=i[w],l!=null&&Ke(t,a,w,l,i,null))}function Uw(t,a,i,l){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var d=null,h=null,v=null,w=null,O=null,U=null,$=null;for(P in i){var Y=i[P];if(i.hasOwnProperty(P)&&Y!=null)switch(P){case"checked":break;case"value":break;case"defaultValue":O=Y;default:l.hasOwnProperty(P)||Ke(t,a,P,null,l,Y)}}for(var z in l){var P=l[z];if(Y=i[z],l.hasOwnProperty(z)&&(P!=null||Y!=null))switch(z){case"type":h=P;break;case"name":d=P;break;case"checked":U=P;break;case"defaultChecked":$=P;break;case"value":v=P;break;case"defaultValue":w=P;break;case"children":case"dangerouslySetInnerHTML":if(P!=null)throw Error(s(137,a));break;default:P!==Y&&Ke(t,a,z,P,l,Y)}}cc(t,v,w,O,U,$,h,d);return;case"select":P=v=w=z=null;for(h in i)if(O=i[h],i.hasOwnProperty(h)&&O!=null)switch(h){case"value":break;case"multiple":P=O;default:l.hasOwnProperty(h)||Ke(t,a,h,null,l,O)}for(d in l)if(h=l[d],O=i[d],l.hasOwnProperty(d)&&(h!=null||O!=null))switch(d){case"value":z=h;break;case"defaultValue":w=h;break;case"multiple":v=h;default:h!==O&&Ke(t,a,d,h,l,O)}a=w,i=v,l=P,z!=null?ys(t,!!i,z,!1):!!l!=!!i&&(a!=null?ys(t,!!i,a,!0):ys(t,!!i,i?[]:"",!1));return;case"textarea":P=z=null;for(w in i)if(d=i[w],i.hasOwnProperty(w)&&d!=null&&!l.hasOwnProperty(w))switch(w){case"value":break;case"children":break;default:Ke(t,a,w,null,l,d)}for(v in l)if(d=l[v],h=i[v],l.hasOwnProperty(v)&&(d!=null||h!=null))switch(v){case"value":z=d;break;case"defaultValue":P=d;break;case"children":break;case"dangerouslySetInnerHTML":if(d!=null)throw Error(s(91));break;default:d!==h&&Ke(t,a,v,d,l,h)}qh(t,z,P);return;case"option":for(var ie in i)z=i[ie],i.hasOwnProperty(ie)&&z!=null&&!l.hasOwnProperty(ie)&&(ie==="selected"?t.selected=!1:Ke(t,a,ie,null,l,z));for(O in l)z=l[O],P=i[O],l.hasOwnProperty(O)&&z!==P&&(z!=null||P!=null)&&(O==="selected"?t.selected=z&&typeof z!="function"&&typeof z!="symbol":Ke(t,a,O,z,l,P));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var me in i)z=i[me],i.hasOwnProperty(me)&&z!=null&&!l.hasOwnProperty(me)&&Ke(t,a,me,null,l,z);for(U in l)if(z=l[U],P=i[U],l.hasOwnProperty(U)&&z!==P&&(z!=null||P!=null))switch(U){case"children":case"dangerouslySetInnerHTML":if(z!=null)throw Error(s(137,a));break;default:Ke(t,a,U,z,l,P)}return;default:if(fc(a)){for(var Ze in i)z=i[Ze],i.hasOwnProperty(Ze)&&z!==void 0&&!l.hasOwnProperty(Ze)&&Qd(t,a,Ze,void 0,l,z);for($ in l)z=l[$],P=i[$],!l.hasOwnProperty($)||z===P||z===void 0&&P===void 0||Qd(t,a,$,z,l,P);return}}for(var j in i)z=i[j],i.hasOwnProperty(j)&&z!=null&&!l.hasOwnProperty(j)&&Ke(t,a,j,null,l,z);for(Y in l)z=l[Y],P=i[Y],!l.hasOwnProperty(Y)||z===P||z==null&&P==null||Ke(t,a,Y,z,l,P)}function Kg(t){switch(t){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function zw(){if(typeof performance.getEntriesByType=="function"){for(var t=0,a=0,i=performance.getEntriesByType("resource"),l=0;l<i.length;l++){var d=i[l],h=d.transferSize,v=d.initiatorType,w=d.duration;if(h&&w&&Kg(v)){for(v=0,w=d.responseEnd,l+=1;l<i.length;l++){var O=i[l],U=O.startTime;if(U>w)break;var $=O.transferSize,Y=O.initiatorType;$&&Kg(Y)&&(O=O.responseEnd,v+=$*(O<w?1:(w-U)/(O-U)))}if(--l,a+=8*(h+v)/(d.duration/1e3),t++,10<t)break}}if(0<t)return a/t/1e6}return navigator.connection&&(t=navigator.connection.downlink,typeof t=="number")?t:5}var Wd=null,ef=null;function Kl(t){return t.nodeType===9?t:t.ownerDocument}function Zg(t){switch(t){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Jg(t,a){if(t===0)switch(a){case"svg":return 1;case"math":return 2;default:return 0}return t===1&&a==="foreignObject"?0:t}function tf(t,a){return t==="textarea"||t==="noscript"||typeof a.children=="string"||typeof a.children=="number"||typeof a.children=="bigint"||typeof a.dangerouslySetInnerHTML=="object"&&a.dangerouslySetInnerHTML!==null&&a.dangerouslySetInnerHTML.__html!=null}var nf=null;function Bw(){var t=window.event;return t&&t.type==="popstate"?t===nf?!1:(nf=t,!0):(nf=null,!1)}var Xg=typeof setTimeout=="function"?setTimeout:void 0,Pw=typeof clearTimeout=="function"?clearTimeout:void 0,Fg=typeof Promise=="function"?Promise:void 0,Iw=typeof queueMicrotask=="function"?queueMicrotask:typeof Fg<"u"?function(t){return Fg.resolve(null).then(t).catch(Hw)}:Xg;function Hw(t){setTimeout(function(){throw t})}function ta(t){return t==="head"}function Qg(t,a){var i=a,l=0;do{var d=i.nextSibling;if(t.removeChild(i),d&&d.nodeType===8)if(i=d.data,i==="/$"||i==="/&"){if(l===0){t.removeChild(d),Js(a);return}l--}else if(i==="$"||i==="$?"||i==="$~"||i==="$!"||i==="&")l++;else if(i==="html")io(t.ownerDocument.documentElement);else if(i==="head"){i=t.ownerDocument.head,io(i);for(var h=i.firstChild;h;){var v=h.nextSibling,w=h.nodeName;h[Ti]||w==="SCRIPT"||w==="STYLE"||w==="LINK"&&h.rel.toLowerCase()==="stylesheet"||i.removeChild(h),h=v}}else i==="body"&&io(t.ownerDocument.body);i=d}while(i);Js(a)}function Wg(t,a){var i=t;t=0;do{var l=i.nextSibling;if(i.nodeType===1?a?(i._stashedDisplay=i.style.display,i.style.display="none"):(i.style.display=i._stashedDisplay||"",i.getAttribute("style")===""&&i.removeAttribute("style")):i.nodeType===3&&(a?(i._stashedText=i.nodeValue,i.nodeValue=""):i.nodeValue=i._stashedText||""),l&&l.nodeType===8)if(i=l.data,i==="/$"){if(t===0)break;t--}else i!=="$"&&i!=="$?"&&i!=="$~"&&i!=="$!"||t++;i=l}while(i)}function rf(t){var a=t.firstChild;for(a&&a.nodeType===10&&(a=a.nextSibling);a;){var i=a;switch(a=a.nextSibling,i.nodeName){case"HTML":case"HEAD":case"BODY":rf(i),lc(i);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(i.rel.toLowerCase()==="stylesheet")continue}t.removeChild(i)}}function $w(t,a,i,l){for(;t.nodeType===1;){var d=i;
vendor: 9,061 bytes, line 10
10if(t.nodeName.toLowerCase()!==a.toLowerCase()){if(!l&&(t.nodeName!=="INPUT"||t.type!=="hidden"))break}else if(l){if(!t[Ti])switch(a){case"meta":if(!t.hasAttribute("itemprop"))break;return t;case"link":if(h=t.getAttribute("rel"),h==="stylesheet"&&t.hasAttribute("data-precedence"))break;if(h!==d.rel||t.getAttribute("href")!==(d.href==null||d.href===""?null:d.href)||t.getAttribute("crossorigin")!==(d.crossOrigin==null?null:d.crossOrigin)||t.getAttribute("title")!==(d.title==null?null:d.title))break;return t;case"style":if(t.hasAttribute("data-precedence"))break;return t;case"script":if(h=t.getAttribute("src"),(h!==(d.src==null?null:d.src)||t.getAttribute("type")!==(d.type==null?null:d.type)||t.getAttribute("crossorigin")!==(d.crossOrigin==null?null:d.crossOrigin))&&h&&t.hasAttribute("async")&&!t.hasAttribute("itemprop"))break;return t;default:return t}}else if(a==="input"&&t.type==="hidden"){var h=d.name==null?null:""+d.name;if(d.type==="hidden"&&t.getAttribute("name")===h)return t}else return t;if(t=kn(t.nextSibling),t===null)break}return null}function qw(t,a,i){if(a==="")return null;for(;t.nodeType!==3;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!i||(t=kn(t.nextSibling),t===null))return null;return t}function ey(t,a){for(;t.nodeType!==8;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!a||(t=kn(t.nextSibling),t===null))return null;return t}function af(t){return t.data==="$?"||t.data==="$~"}function sf(t){return t.data==="$!"||t.data==="$?"&&t.ownerDocument.readyState!=="loading"}function Vw(t,a){var i=t.ownerDocument;if(t.data==="$~")t._reactRetry=a;else if(t.data!=="$?"||i.readyState!=="loading")a();else{var l=function(){a(),i.removeEventListener("DOMContentLoaded",l)};i.addEventListener("DOMContentLoaded",l),t._reactRetry=l}}function kn(t){for(;t!=null;t=t.nextSibling){var a=t.nodeType;if(a===1||a===3)break;if(a===8){if(a=t.data,a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"||a==="F!"||a==="F")break;if(a==="/$"||a==="/&")return null}}return t}var of=null;function ty(t){t=t.nextSibling;for(var a=0;t;){if(t.nodeType===8){var i=t.data;if(i==="/$"||i==="/&"){if(a===0)return kn(t.nextSibling);a--}else i!=="$"&&i!=="$!"&&i!=="$?"&&i!=="$~"&&i!=="&"||a++}t=t.nextSibling}return null}function ny(t){t=t.previousSibling;for(var a=0;t;){if(t.nodeType===8){var i=t.data;if(i==="$"||i==="$!"||i==="$?"||i==="$~"||i==="&"){if(a===0)return t;a--}else i!=="/$"&&i!=="/&"||a++}t=t.previousSibling}return null}function ry(t,a,i){switch(a=Kl(i),t){case"html":if(t=a.documentElement,!t)throw Error(s(452));return t;case"head":if(t=a.head,!t)throw Error(s(453));return t;case"body":if(t=a.body,!t)throw Error(s(454));return t;default:throw Error(s(451))}}function io(t){for(var a=t.attributes;a.length;)t.removeAttributeNode(a[0]);lc(t)}var Cn=new Map,ay=new Set;function Zl(t){return typeof t.getRootNode=="function"?t.getRootNode():t.nodeType===9?t:t.ownerDocument}var Er=Z.d;Z.d={f:Gw,r:Yw,D:Kw,C:Zw,L:Jw,m:Xw,X:Qw,S:Fw,M:Ww};function Gw(){var t=Er.f(),a=Pl();return t||a}function Yw(t){var a=ps(t);a!==null&&a.tag===5&&a.type==="form"?wm(a):Er.r(t)}var Ys=typeof document>"u"?null:document;function sy(t,a,i){var l=Ys;if(l&&typeof a=="string"&&a){var d=Sn(a);d='link[rel="'+t+'"][href="'+d+'"]',typeof i=="string"&&(d+='[crossorigin="'+i+'"]'),ay.has(d)||(ay.add(d),t={rel:t,crossOrigin:i,href:a},l.querySelector(d)===null&&(a=l.createElement("link"),jt(a,"link",t),Et(a),l.head.appendChild(a)))}}function Kw(t){Er.D(t),sy("dns-prefetch",t,null)}function Zw(t,a){Er.C(t,a),sy("preconnect",t,a)}function Jw(t,a,i){Er.L(t,a,i);var l=Ys;if(l&&t&&a){var d='link[rel="preload"][as="'+Sn(a)+'"]';a==="image"&&i&&i.imageSrcSet?(d+='[imagesrcset="'+Sn(i.imageSrcSet)+'"]',typeof i.imageSizes=="string"&&(d+='[imagesizes="'+Sn(i.imageSizes)+'"]')):d+='[href="'+Sn(t)+'"]';var h=d;switch(a){case"style":h=Ks(t);break;case"script":h=Zs(t)}Cn.has(h)||(t=g({rel:"preload",href:a==="image"&&i&&i.imageSrcSet?void 0:t,as:a},i),Cn.set(h,t),l.querySelector(d)!==null||a==="style"&&l.querySelector(oo(h))||a==="script"&&l.querySelector(lo(h))||(a=l.createElement("link"),jt(a,"link",t),Et(a),l.head.appendChild(a)))}}function Xw(t,a){Er.m(t,a);var i=Ys;if(i&&t){var l=a&&typeof a.as=="string"?a.as:"script",d='link[rel="modulepreload"][as="'+Sn(l)+'"][href="'+Sn(t)+'"]',h=d;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":h=Zs(t)}if(!Cn.has(h)&&(t=g({rel:"modulepreload",href:t},a),Cn.set(h,t),i.querySelector(d)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(i.querySelector(lo(h)))return}l=i.createElement("link"),jt(l,"link",t),Et(l),i.head.appendChild(l)}}}function Fw(t,a,i){Er.S(t,a,i);var l=Ys;if(l&&t){var d=ms(l).hoistableStyles,h=Ks(t);a=a||"default";var v=d.get(h);if(!v){var w={loading:0,preload:null};if(v=l.querySelector(oo(h)))w.loading=5;else{t=g({rel:"stylesheet",href:t,"data-precedence":a},i),(i=Cn.get(h))&&lf(t,i);var O=v=l.createElement("link");Et(O),jt(O,"link",t),O._p=new Promise(function(U,$){O.onload=U,O.onerror=$}),O.addEventListener("load",function(){w.loading|=1}),O.addEventListener("error",function(){w.loading|=2}),w.loading|=4,Jl(v,a,l)}v={type:"stylesheet",instance:v,count:1,state:w},d.set(h,v)}}}function Qw(t,a){Er.X(t,a);var i=Ys;if(i&&t){var l=ms(i).hoistableScripts,d=Zs(t),h=l.get(d);h||(h=i.querySelector(lo(d)),h||(t=g({src:t,async:!0},a),(a=Cn.get(d))&&uf(t,a),h=i.createElement("script"),Et(h),jt(h,"link",t),i.head.appendChild(h)),h={type:"script",instance:h,count:1,state:null},l.set(d,h))}}function Ww(t,a){Er.M(t,a);var i=Ys;if(i&&t){var l=ms(i).hoistableScripts,d=Zs(t),h=l.get(d);h||(h=i.querySelector(lo(d)),h||(t=g({src:t,async:!0,type:"module"},a),(a=Cn.get(d))&&uf(t,a),h=i.createElement("script"),Et(h),jt(h,"link",t),i.head.appendChild(h)),h={type:"script",instance:h,count:1,state:null},l.set(d,h))}}function iy(t,a,i,l){var d=(d=pe.current)?Zl(d):null;if(!d)throw Error(s(446));switch(t){case"meta":case"title":return null;case"style":return typeof i.precedence=="string"&&typeof i.href=="string"?(a=Ks(i.href),i=ms(d).hoistableStyles,l=i.get(a),l||(l={type:"style",instance:null,count:0,state:null},i.set(a,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(i.rel==="stylesheet"&&typeof i.href=="string"&&typeof i.precedence=="string"){t=Ks(i.href);var h=ms(d).hoistableStyles,v=h.get(t);if(v||(d=d.ownerDocument||d,v={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},h.set(t,v),(h=d.querySelector(oo(t)))&&!h._p&&(v.instance=h,v.state.loading=5),Cn.has(t)||(i={rel:"preload",as:"style",href:i.href,crossOrigin:i.crossOrigin,integrity:i.integrity,media:i.media,hrefLang:i.hrefLang,referrerPolicy:i.referrerPolicy},Cn.set(t,i),h||eS(d,t,i,v.state))),a&&l===null)throw Error(s(528,""));return v}if(a&&l!==null)throw Error(s(529,""));return null;case"script":return a=i.async,i=i.src,typeof i=="string"&&a&&typeof a!="function"&&typeof a!="symbol"?(a=Zs(i),i=ms(d).hoistableScripts,l=i.get(a),l||(l={type:"script",instance:null,count:0,state:null},i.set(a,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(s(444,t))}}function Ks(t){return'href="'+Sn(t)+'"'}function oo(t){return'link[rel="stylesheet"]['+t+"]"}function oy(t){return g({},t,{"data-precedence":t.precedence,precedence:null})}function eS(t,a,i,l){t.querySelector('link[rel="preload"][as="style"]['+a+"]")?l.loading=1:(a=t.createElement("link"),l.preload=a,a.addEventListener("load",function(){return l.loading|=1}),a.addEventListener("error",function(){return l.loading|=2}),jt(a,"link",i),Et(a),t.head.appendChild(a))}function Zs(t){return'[src="'+Sn(t)+'"]'}function lo(t){return"script[async]"+t}function ly(t,a,i){if(a.count++,a.instance===null)switch(a.type){case"style":var l=t.querySelector('style[data-href~="'+Sn(i.href)+'"]');if(l)return a.instance=l,Et(l),l;var d=g({},i,{"data-href":i.href,"data-precedence":i.precedence,href:null,precedence:null});return l=(t.ownerDocument||t).createElement("style"),Et(l),jt(l,"style",d),Jl(l,i.precedence,t),a.instance=l;case"stylesheet":d=Ks(i.href);var h=t.querySelector(oo(d));if(h)return a.state.loading|=4,a.instance=h,Et(h),h;l=oy(i),(d=Cn.get(d))&&lf(l,d),h=(t.ownerDocument||t).createElement("link"),Et(h);var v=h;return v._p=new Promise(function(w,O){v.onload=w,v.onerror=O}),jt(h,"link",l),a.state.loading|=4,Jl(h,i.precedence,t),a.instance=h;case"script":return h=Zs(i.src),(d=t.querySelector(lo(h)))?(a.instance=d,Et(d),d):(l=i,(d=Cn.get(h))&&(l=g({},i),uf(l,d)),t=t.ownerDocument||t,d=t.createElement("script"),Et(d),jt(d,"link",l),t.head.appendChild(d),a.instance=d);case"void":return null;default:throw Error(s(443,a.type))}else a.type==="stylesheet"&&(a.state.loading&4)===0&&(l=a.instance,a.state.loading|=4,Jl(l,i.precedence,t));return a.instance}function Jl(t,a,i){for(var l=i.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),d=l.length?l[l.length-1]:null,h=d,v=0;v<l.length;v++){var w=l[v];
vendor: 5,067 bytes, line 10
10if(w.dataset.precedence===a)h=w;else if(h!==d)break}h?h.parentNode.insertBefore(t,h.nextSibling):(a=i.nodeType===9?i.head:i,a.insertBefore(t,a.firstChild))}function lf(t,a){t.crossOrigin==null&&(t.crossOrigin=a.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=a.referrerPolicy),t.title==null&&(t.title=a.title)}function uf(t,a){t.crossOrigin==null&&(t.crossOrigin=a.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=a.referrerPolicy),t.integrity==null&&(t.integrity=a.integrity)}var Xl=null;function uy(t,a,i){if(Xl===null){var l=new Map,d=Xl=new Map;d.set(i,l)}else d=Xl,l=d.get(i),l||(l=new Map,d.set(i,l));if(l.has(t))return l;for(l.set(t,null),i=i.getElementsByTagName(t),d=0;d<i.length;d++){var h=i[d];if(!(h[Ti]||h[At]||t==="link"&&h.getAttribute("rel")==="stylesheet")&&h.namespaceURI!=="http://www.w3.org/2000/svg"){var v=h.getAttribute(a)||"";v=t+v;var w=l.get(v);w?w.push(h):l.set(v,[h])}}return l}function cy(t,a,i){t=t.ownerDocument||t,t.head.insertBefore(i,a==="title"?t.querySelector("head > title"):null)}function tS(t,a,i){if(i===1||a.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof a.precedence!="string"||typeof a.href!="string"||a.href==="")break;return!0;case"link":if(typeof a.rel!="string"||typeof a.href!="string"||a.href===""||a.onLoad||a.onError)break;return a.rel==="stylesheet"?(t=a.disabled,typeof a.precedence=="string"&&t==null):!0;case"script":if(a.async&&typeof a.async!="function"&&typeof a.async!="symbol"&&!a.onLoad&&!a.onError&&a.src&&typeof a.src=="string")return!0}return!1}function dy(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}function nS(t,a,i,l){if(i.type==="stylesheet"&&(typeof l.media!="string"||matchMedia(l.media).matches!==!1)&&(i.state.loading&4)===0){if(i.instance===null){var d=Ks(l.href),h=a.querySelector(oo(d));if(h){a=h._p,a!==null&&typeof a=="object"&&typeof a.then=="function"&&(t.count++,t=Fl.bind(t),a.then(t,t)),i.state.loading|=4,i.instance=h,Et(h);return}h=a.ownerDocument||a,l=oy(l),(d=Cn.get(d))&&lf(l,d),h=h.createElement("link"),Et(h);var v=h;v._p=new Promise(function(w,O){v.onload=w,v.onerror=O}),jt(h,"link",l),i.instance=h}t.stylesheets===null&&(t.stylesheets=new Map),t.stylesheets.set(i,a),(a=i.state.preload)&&(i.state.loading&3)===0&&(t.count++,i=Fl.bind(t),a.addEventListener("load",i),a.addEventListener("error",i))}}var cf=0;function rS(t,a){return t.stylesheets&&t.count===0&&Wl(t,t.stylesheets),0<t.count||0<t.imgCount?function(i){var l=setTimeout(function(){if(t.stylesheets&&Wl(t,t.stylesheets),t.unsuspend){var h=t.unsuspend;t.unsuspend=null,h()}},6e4+a);0<t.imgBytes&&cf===0&&(cf=62500*zw());var d=setTimeout(function(){if(t.waitingForImages=!1,t.count===0&&(t.stylesheets&&Wl(t,t.stylesheets),t.unsuspend)){var h=t.unsuspend;t.unsuspend=null,h()}},(t.imgBytes>cf?50:800)+a);return t.unsuspend=i,function(){t.unsuspend=null,clearTimeout(l),clearTimeout(d)}}:null}function Fl(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Wl(this,this.stylesheets);else if(this.unsuspend){var t=this.unsuspend;this.unsuspend=null,t()}}}var Ql=null;function Wl(t,a){t.stylesheets=null,t.unsuspend!==null&&(t.count++,Ql=new Map,a.forEach(aS,t),Ql=null,Fl.call(t))}function aS(t,a){if(!(a.state.loading&4)){var i=Ql.get(t);if(i)var l=i.get(null);else{i=new Map,Ql.set(t,i);for(var d=t.querySelectorAll("link[data-precedence],style[data-precedence]"),h=0;h<d.length;h++){var v=d[h];(v.nodeName==="LINK"||v.getAttribute("media")!=="not all")&&(i.set(v.dataset.precedence,v),l=v)}l&&i.set(null,l)}d=a.instance,v=d.getAttribute("data-precedence"),h=i.get(v)||l,h===l&&i.set(null,d),i.set(v,d),this.count++,l=Fl.bind(this),d.addEventListener("load",l),d.addEventListener("error",l),h?h.parentNode.insertBefore(d,h.nextSibling):(t=t.nodeType===9?t.head:t,t.insertBefore(d,t.firstChild)),a.state.loading|=4}}var uo={$$typeof:N,Provider:null,Consumer:null,_currentValue:le,_currentValue2:le,_threadCount:0};function sS(t,a,i,l,d,h,v,w,O){this.tag=1,this.containerInfo=t,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Ur(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ur(0),this.hiddenUpdates=Ur(null),this.identifierPrefix=l,this.onUncaughtError=d,this.onCaughtError=h,this.onRecoverableError=v,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=O,this.incompleteTransitions=new Map}function fy(t,a,i,l,d,h,v,w,O,U,$,Y){return t=new sS(t,a,i,v,O,U,$,Y,w),a=1,h===!0&&(a|=24),h=hn(3,null,null,a),t.current=h,h.stateNode=t,a=$c(),a.refCount++,t.pooledCache=a,a.refCount++,h.memoizedState={element:l,isDehydrated:i,cache:a},Yc(h),t}function hy(t){return t?(t=xs,t):xs}function py(t,a,i,l,d,h){d=hy(d),l.context===null?l.context=d:l.pendingContext=d,l=Vr(a),l.payload={element:i}
vendor: 5,041 bytes, line 10
10,h=h===void 0?null:h,h!==null&&(l.callback=h),i=Gr(t,l,a),i!==null&&(tn(i,t,a),Hi(i,t,a))}function my(t,a){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var i=t.retryLane;t.retryLane=i!==0&&i<a?i:a}}function df(t,a){my(t,a),(t=t.alternate)&&my(t,a)}function gy(t){if(t.tag===13||t.tag===31){var a=Ma(t,67108864);a!==null&&tn(a,t,67108864),df(t,67108864)}}function yy(t){if(t.tag===13||t.tag===31){var a=vn();a=ds(a);var i=Ma(t,a);i!==null&&tn(i,t,a),df(t,a)}}var eu=!0;function iS(t,a,i,l){var d=L.T;L.T=null;var h=Z.p;try{Z.p=2,ff(t,a,i,l)}finally{Z.p=h,L.T=d}}function oS(t,a,i,l){var d=L.T;L.T=null;var h=Z.p;try{Z.p=8,ff(t,a,i,l)}finally{Z.p=h,L.T=d}}function ff(t,a,i,l){if(eu){var d=hf(l);if(d===null)Fd(t,a,l,tu,i),by(t,l);else if(uS(d,t,a,i,l))l.stopPropagation();else if(by(t,l),a&4&&-1<lS.indexOf(t)){for(;d!==null;){var h=ps(d);if(h!==null)switch(h.tag){case 3:if(h=h.stateNode,h.current.memoizedState.isDehydrated){var v=Gn(h.pendingLanes);if(v!==0){var w=h;for(w.pendingLanes|=2,w.entangledLanes|=2;v;){var O=1<<31-Ut(v);w.entanglements[1]|=O,v&=~O}Jn(h),(qe&6)===0&&(zl=Oe()+500,ro(0))}}break;case 31:case 13:w=Ma(h,2),w!==null&&tn(w,h,2),Pl(),df(h,2)}if(h=hf(l),h===null&&Fd(t,a,l,tu,i),h===d)break;d=h}d!==null&&l.stopPropagation()}else Fd(t,a,l,null,i)}}function hf(t){return t=pc(t),pf(t)}var tu=null;function pf(t){if(tu=null,t=hs(t),t!==null){var a=u(t);if(a===null)t=null;else{var i=a.tag;if(i===13){if(t=c(a),t!==null)return t;t=null}else if(i===31){if(t=f(a),t!==null)return t;t=null}else if(i===3){if(a.stateNode.current.memoizedState.isDehydrated)return a.tag===3?a.stateNode.containerInfo:null;t=null}else a!==t&&(t=null)}}return tu=t,null}function vy(t){switch(t){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(wt()){case It:return 2;case ls:return 8;case xa:case Si:return 32;case sr:return 268435456;default:return 32}default:return 32}}var mf=!1,na=null,ra=null,aa=null,co=new Map,fo=new Map,sa=[],lS="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 by(t,a){switch(t){case"focusin":case"focusout":na=null;break;case"dragenter":case"dragleave":ra=null;break;case"mouseover":case"mouseout":aa=null;break;case"pointerover":case"pointerout":co.delete(a.pointerId);break;case"gotpointercapture":case"lostpointercapture":fo.delete(a.pointerId)}}function ho(t,a,i,l,d,h){return t===null||t.nativeEvent!==h?(t={blockedOn:a,domEventName:i,eventSystemFlags:l,nativeEvent:h,targetContainers:[d]},a!==null&&(a=ps(a),a!==null&&gy(a)),t):(t.eventSystemFlags|=l,a=t.targetContainers,d!==null&&a.indexOf(d)===-1&&a.push(d),t)}function uS(t,a,i,l,d){switch(a){case"focusin":return na=ho(na,t,a,i,l,d),!0;case"dragenter":return ra=ho(ra,t,a,i,l,d),!0;case"mouseover":return aa=ho(aa,t,a,i,l,d),!0;case"pointerover":var h=d.pointerId;return co.set(h,ho(co.get(h)||null,t,a,i,l,d)),!0;case"gotpointercapture":return h=d.pointerId,fo.set(h,ho(fo.get(h)||null,t,a,i,l,d)),!0}return!1}function _y(t){var a=hs(t.target);if(a!==null){var i=u(a);if(i!==null){if(a=i.tag,a===13){if(a=c(i),a!==null){t.blockedOn=a,Dh(t.priority,function(){yy(i)});return}}else if(a===31){if(a=f(i),a!==null){t.blockedOn=a,Dh(t.priority,function(){yy(i)});return}}else if(a===3&&i.stateNode.current.memoizedState.isDehydrated){t.blockedOn=i.tag===3?i.stateNode.containerInfo:null;return}}}t.blockedOn=null}function nu(t){if(t.blockedOn!==null)return!1;for(var a=t.targetContainers;0<a.length;){var i=hf(t.nativeEvent);if(i===null){i=t.nativeEvent;var l=new i.constructor(i.type,i);hc=l,i.target.dispatchEvent(l),hc=null}else return a=ps(i),a!==null&&gy(a),t.blockedOn=i,!1;a.shift()}return!0}function wy(t,a,i){nu(t)&&i.delete(a)}function cS(){mf=!1,na!==null&&nu(na)&&(na=null),ra!==null&&nu(ra)&&(ra=null),aa!==null&&nu(aa)&&(aa=null),co.forEac
10h(wy),fo.forEach(wy)}function ru(t,a){t.blockedOn===a&&(t.blockedOn=null,mf||(mf=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,cS)))}var au=null;function Sy(t){au!==t&&(au=t,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){au===t&&(au=null);for(var a=0;a<t.length;a+=3){var i=t[a],l=t[a+1],d=t[a+2];if(typeof l!="function"){if(pf(l||i)===null)continue;break}var h=ps(i);h!==null&&(t.splice(a,3),a-=3,fd(h,{pending:!0,data:d,method:i.method,action:l},l,d))}}))}function Js(t){function a(O){return ru(O,t)}na!==null&&ru(na,t),ra!==null&&ru(ra,t),aa!==null&&ru(aa,t),co.forEach(a),fo.forEach(a);for(var i=0;i<sa.length;i++){var l=sa[i];l.blockedOn===t&&(l.blockedOn=null)}for(;0<sa.length&&(i=sa[0],i.blockedOn===null);)_y(i),i.blockedOn===null&&sa.shift();if(i=(t.ownerDocument||t).$$reactFormReplay,i!=null)for(l=0;l<i.length;l+=3){var d=i[l],h=i[l+1],v=d[Jt]||null;if(typeof h=="function")v||Sy(i);else if(v){var w=null;if(h&&h.hasAttribute("formAction")){if(d=h,v=h[Jt]||null)w=v.formAction;else if(pf(d)!==null)continue}else w=v.action;typeof w=="function"?i[l+1]=w:(i.splice(l,3),l-=3),Sy(i)}}}function Ey(){function t(h){h.canIntercept&&h.info==="react-transition"&&h.intercept({handler:function(){return new Promise(function(v){return d=v})},focusReset:"manual",scroll:"manual"})}function a(){d!==null&&(d(),d=null),l||setTimeout(i,20)}function i(){if(!l&&!navigation.transition){var h=navigation.currentEntry;h&&h.url!=null&&navigation.navigate(h.url,{state:h.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var l=!1,d=null;return navigation.addEventListener("navigate",t),navigation.addEventListener("navigatesuccess",a),navigation.addEventListener("navigateerror",a),setTimeout(i,100),function(){l=!0,navigation.removeEventListener("navigate",t),navigation.removeEventListener("navigatesuccess",a),navigation.removeEventListener("navigateerror",a),d!==null&&(d(),d=null)}}}function gf(t){this._internalRoot=t}su.prototype.render=gf.prototype.render=function(t){var a=this._internalRoot;if(a===null)throw Error(s(409));var i=a.current,l=vn();py(i,l,t,a,null,null)},su.prototype.unmount=gf.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var a=t.containerInfo;py(t.current,2,null,t,null,null),Pl(),a[fs]=null}};function su(t){this._internalRoot=t}su.prototype.unstable_scheduleHydration=function(t){if(t){var a=ic();t={blockedOn:null,target:t,priority:a};for(var i=0;i<sa.length&&a!==0&&a<sa[i].priority;i++);sa.splice(i,0,t),i===0&&_y(t)}};var Ty=e.version;if(Ty!=="19.2.4")throw Error(s(527,Ty,"19.2.4"));Z.findDOMNode=function(t){var a=t._reactInternals;if(a===void 0)throw typeof t.render=="function"?Error(s(188)):(t=Object.keys(t).join(","),Error(s(268,t)));return t=m(a),t=t!==null?y(t):null,t=t===null?null:t.stateNode,t};var dS={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:L,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var iu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!iu.isDisabled&&iu.supportsFiber)try{Ra=iu.inject(dS),Ht=iu}catch{}}return mo.createRoot=function(t,a){if(!o(t))throw Error(s(299));var i=!1,l="",d=jm,h=Nm,v=Mm;return a!=null&&(a.unstable_strictMode===!0&&(i=!0),a.identifierPrefix!==void 0&&(l=a.identifierPrefix),a.onUncaughtError!==void 0&&(d=a.onUncaughtError),a.onCaughtError!==void 0&&(h=a.onCaughtError),a.onRecoverableError!==void 0&&(v=a.onRecoverableError)),a=fy(t,1,!1,null,null,i,l,null,d,h,v,Ey),t[fs]=a.current,Xd(t),new gf(a)},mo.hydrateRoot=function(t,a,i){if(!o(t))throw Error(s(299));var l=!1,d="",h=jm,v=Nm,w=Mm,O=null;return i!=null&&(i.unstable_strictMode===!0&&(l=!0),i.identifierPrefix!==void 0&&(d=i.identifierPrefix),i.onUncaughtError!==void 0&&(h=i.onUncaughtError),i.onCaughtError!==void 0&&(v=i.onCaughtError),i.onRecoverableError!==void 0&&(w=i.onRecoverableError),i.formState!==void 0&&(O=i.formState)),a=fy(t,1,!0,a,i??null,l,d,O,h,v,w,Ey),a.context=hy(null),i=a.current,l=vn(),l=ds(l),d=Vr(l),d.callback=null,Gr(i,d,l),i=l,a.current.lanes=i,at(a,i),Jn(a),t[fs]=a.current,Xd(t),new su(a)},mo.version="19.2.4",mo}var Dy;function _S(){if(Dy)return bf.exports;Dy=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}return n(),bf.exports=bS(),bf.exports}var wS=_S(),SS="__TSS_CONTEXT",Yf=Symbol.for("TSS_SERVER_FUNCTION"),I2=Symbol.for("TSS_SERVER_FUNCTION_FACTORY"),ES="application/x-tss-framed",Tr={JSON:0,CHUNK:1,END:2,ERROR:3},TS=/;\s*v=(\d+)/;function xS(n){const e=n.match(TS);return e?parseInt(e[1],10):void 0}function RS(n){const e=xS(n);if(e!==void 0&&e!==1)throw new Error(`Incompatible framed protocol version: server=${e}, client=1. Please ensure client and server are using compatible versions.`)}var b0=()=>window.__TSS_START_OPTIONS__,_0=!1;function No(n){return n[n.length-1]}function AS(n){return typeof n=="function"}function fa(n,e){return AS(n)?n(e):n}var OS=Object.prototype.hasOwnProperty,Ly=Object.prototype.propertyIsEnumerable,kS=()=>Object.create(null),Ya=(n,e)=>Xa(n,e,kS);function Xa(n,e,r=()=>({}),s=0){if(n===e)return n;if(s>500)return e;const o=e,u=By(n)&&By(o);if(!u&&!(mi(n)&&mi(o)))return o;const c=u?n:Uy(n);if(!c)return o;const f=u?o:Uy(o);if(!f)return o;const p=c.length,m=f.length,y=u?new Array(m):r();let g=0;for(let b=0;b<m;b++){const _=u?b:f[b],S=n[_],A=o[_];if(S===A){y[_]=S,(u?b<p:OS.call(n,_))&&g++;continue}if(S===null||A===null||typeof S!="object"||typeof A!="object"){y[_]=A;continue}const R=Xa(S,A,r,s+1);y[_]=R,R===S&&g++}return p===m&&g===p?n:y}function Uy(n){const e=Object.getOwnPropertyNames(n);for(const o of e)if(!Ly.call(n,o))return!1;const r=Object.getOwnPropertySymbols(n);if(r.length===0)return e;const s=e;
10for(const o of r){if(!Ly.call(n,o))return!1;s.push(o)}return s}function mi(n){if(!zy(n))return!1;const e=n.constructor;if(typeof e>"u")return!0;const r=e.prototype;return!(!zy(r)||!r.hasOwnProperty("isPrototypeOf"))}function zy(n){return Object.prototype.toString.call(n)==="[object Object]"}function By(n){return Array.isArray(n)&&n.length===Object.keys(n).length}function an(n,e,r){if(n===e)return!0;if(typeof n!=typeof e)return!1;if(Array.isArray(n)&&Array.isArray(e)){if(n.length!==e.length)return!1;for(let s=0,o=n.length;s<o;s++)if(!an(n[s],e[s],r))return!1;return!0}if(mi(n)&&mi(e)){const s=r?.ignoreUndefined??!0;if(r?.partial){for(const c in e)if((!s||e[c]!==void 0)&&!an(n[c],e[c],r))return!1;return!0}let o=0;if(!s)o=Object.keys(n).length;else for(const c in n)n[c]!==void 0&&o++;let u=0;for(const c in e)if((!s||e[c]!==void 0)&&(u++,u>o||!an(n[c],e[c],r)))return!1;return o===u}return!1}function rs(n){let e,r;const s=new Promise((o,u)=>{e=o,r=u});return s.status="pending",s.resolve=o=>{s.status="resolved",s.value=o,e(o),n?.(o)},s.reject=o=>{s.status="rejected",r(o)},s}function CS(n){return typeof n?.message!="string"?!1:n.message.startsWith("Failed to fetch dynamically imported module")||n.message.startsWith("error loading dynamically imported module")||n.message.startsWith("Importing a module script failed")}function Mo(n){return!!(n&&typeof n=="object"&&typeof n.then=="function")}function jS(n){return n.replace(/[\x00-\x1f\x7f]/g,"")}function Py(n){let e;try{e=decodeURI(n)}catch{e=n.replaceAll(/%[0-9A-F]{2}/gi,r=>{try{return decodeURI(r)}catch{return r}})}return jS(e)}var NS=["http:","https:","mailto:","tel:"];function Au(n,e){if(!n)return!1;try{const r=new URL(n);return!e.has(r.protocol)}catch{return!1}}var MS={"&":"\\u0026",">":"\\u003e","<":"\\u003c","\u2028":"\\u2028","\u2029":"\\u2029"},DS=/[&><\u2028\u2029]/g;function LS(n){return n.replace(DS,e=>MS[e])}function go(n){if(!n)return{path:n,handledProtocolRelativeURL:!1};if(!/[%\\\x00-\x1f\x7f]/.test(n)&&!n.startsWith("//"))return{path:n,handledProtocolRelativeURL:!1};const e=/%25|%5C/gi;let r=0,s="",o;for(;(o=e.exec(n))!==null;)s+=Py(n.slice(r,o.index))+o[0],r=e.lastIndex;s=s+Py(r?n.slice(r):n);let u=!1;return s.startsWith("//")&&(u=!0,s="/"+s.replace(/^\/+/,"")),{path:s,handledProtocolRelativeURL:u}}function US(n){return/\s|[^\u0000-\u007F]/.test(n)?n.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):n}function zS(n,e){if(n===e)return!0;if(n.length!==e.length)return!1;for(let r=0;r<n.length;r++)if(n[r]!==e[r])return!1;return!0}function on(){throw new Error("Invariant failed")}function Do(n){const e=new Map;let r,s;const o=u=>{u.next&&(u.prev?(u.prev.next=u.next,u.next.prev=u.prev,u.next=void 0,s&&(s.next=u,u.prev=s)):(u.next.prev=void 0,r=u.next,u.next=void 0,s&&(u.prev=s,s.next=u)),s=u)};return{get(u){const c=e.get(u);if(c)return o(c),c.value},set(u,c){if(e.size>=n&&r){const p=r;e.delete(p.key),p.next&&(r=p.next,p.next.prev=void 0),p===s&&(s=void 0)}const f=e.get(u);if(f)f.value=c,o(f);else{const p={key:u,value:c,prev:s};s&&(s.next=p),s=p,r||(r=p),e.set(u,p)}},clear(){e.clear(),r=void 0,s=void 0}}}var Fa=4,w0=5;function BS(n){const e=n.indexOf("{");if(e===-1)return null;const r=n.indexOf("}",e);return r===-1||e+1>=n.length?null:[e,r]}function bh(n,e,r=new Uint16Array(6)){const s=n.indexOf("/",e),o=s===-1?n.length:s,u=n.substring(e,o);if(!u||!u.includes("$"))return r[0]=0,r[1]=e,r[2]=e,r[3]=o,r[4]=o,r[5]=o,r;if(u==="$"){const f=n.length;return r[0]=2,r[1]=e,r[2]=e,r[3]=f,r[4]=f,r[5]=f,r}if(u.charCodeAt(0)===36)return r[0]=1,r[1]=e,r[2]=e+1,r[3]=o,r[4]=o,r[5]=o,r;const c=BS(u);if(c){const[f,p]=c,m=u.charCodeAt(f+1);if(m===45){if(f+2<u.length&&u.charCodeAt(f+2)===36){const y=f+3,g=p;if(y<g)return r[0]=3,r[1]=e+f,r[2]=e+y,r[3]=e+g,r[4]=e+p+1,r[5]=o,r}}else if(m===36){const y=f+1,g=f+2;return g===p?(r[0]=2,r[1]=e+f,r[2]=e+y,r[3]=e+g,r[4]=e+p+1,r[5]=n.length,r):(r[0]=1,r[1]=e+f,r[2]=e+g,r[3]=e+p,r[4]=e+p+1,r[5]=o,r)}}return r[0]=0,r[1]=e,r[2]=e,r[3]=o,r[4]=o,r[5]=o,r}function Ku(n,e,r,s,o,u,c){c?.(r);let f=s;{const p=r.fullPath??r.from,m=p.length,y=r.options?.caseSensitive??n,g=!!(r.options?.params?.parse&&r.options?.skipRouteOnParseError?.params);for(;f<m;){const _=bh(p,f,e);let S;const A=f,R=_[5];switch(f=R+1,u++,_[0]){case 0:{const x=p.substring(_[2],_[3]);if(y){const M=o.static?.get(x);if(M)S=M;else{o.static??=new Map;const N=Qa(r.fullPath??r.from);N.parent=o,N.depth=u,S=N,o.static.set(x,N)}}else{const M=x.toLowerCase(),N=o.staticInsensitive?.get(M);if(N)S=N;else{o.staticInsensitive??=new Map;const B=Qa(r.fullPath??r.from);B.parent=o,B.depth=u,S=B,o.staticInsensitive.set(M,B)}}break}case 1:{const x=p.substring(A,_[1]),M=p.substring(_[4],R),N=y&&!!(x||M),B=x?N?x:x.toLowerCase():void 0,J=M?N?M:M.toLowerCase():void 0,K=!g&&o.dynamic?.find(I=>!I.skipOnParamError&&I.caseSensitive===N&&I.prefix===B&&I.suffix===J);if(K)S=K;else{const I=Tf(1,r.fullPath??r.from,N,B,J);S=I,I.depth=u,I.parent=o,o.dynamic??=[],o.dynamic.push(I)}break}case 3:{const x=p.substring(A,_[1]),M=p.substring(_[4],R),N=y&&!!(x||M),B=x?N?x:x.toLowerCase():void 0,J=M?N?M:M.toLowerCase():void 0,K=!g&&o.optional?.find(I=>!I.skipOnParamError&&I.caseSensitive===N&&I.prefix===B&&I.suffix===J);if(K)S=K;else{const I=Tf(3,r.fullPath??r.from,N,B,J);
10S=I,I.parent=o,I.depth=u,o.optional??=[],o.optional.push(I)}break}case 2:{const x=p.substring(A,_[1]),M=p.substring(_[4],R),N=y&&!!(x||M),B=x?N?x:x.toLowerCase():void 0,J=M?N?M:M.toLowerCase():void 0,K=Tf(2,r.fullPath??r.from,N,B,J);S=K,K.parent=o,K.depth=u,o.wildcard??=[],o.wildcard.push(K)}}o=S}if(g&&r.children&&!r.isRoot&&r.id&&r.id.charCodeAt(r.id.lastIndexOf("/")+1)===95){const _=Qa(r.fullPath??r.from);_.kind=w0,_.parent=o,u++,_.depth=u,o.pathless??=[],o.pathless.push(_),o=_}const b=(r.path||!r.children)&&!r.isRoot;if(b&&p.endsWith("/")){const _=Qa(r.fullPath??r.from);_.kind=Fa,_.parent=o,u++,_.depth=u,o.index=_,o=_}o.parse=r.options?.params?.parse??null,o.skipOnParamError=g,o.parsingPriority=r.options?.skipRouteOnParseError?.priority??0,b&&!o.route&&(o.route=r,o.fullPath=r.fullPath??r.from)}if(r.children)for(const p of r.children)Ku(n,e,p,f,o,u,c)}function Ef(n,e){if(n.skipOnParamError&&!e.skipOnParamError)return-1;if(!n.skipOnParamError&&e.skipOnParamError)return 1;if(n.skipOnParamError&&e.skipOnParamError&&(n.parsingPriority||e.parsingPriority))return e.parsingPriority-n.parsingPriority;if(n.prefix&&e.prefix&&n.prefix!==e.prefix){if(n.prefix.startsWith(e.prefix))return-1;if(e.prefix.startsWith(n.prefix))return 1}if(n.suffix&&e.suffix&&n.suffix!==e.suffix){if(n.suffix.endsWith(e.suffix))return-1;if(e.suffix.endsWith(n.suffix))return 1}return n.prefix&&!e.prefix?-1:!n.prefix&&e.prefix?1:n.suffix&&!e.suffix?-1:!n.suffix&&e.suffix?1:n.caseSensitive&&!e.caseSensitive?-1:!n.caseSensitive&&e.caseSensitive?1:0}function oa(n){if(n.pathless)for(const e of n.pathless)oa(e);if(n.static)for(const e of n.static.values())oa(e);if(n.staticInsensitive)for(const e of n.staticInsensitive.values())oa(e);if(n.dynamic?.length){n.dynamic.sort(Ef);for(const e of n.dynamic)oa(e)}if(n.optional?.length){n.optional.sort(Ef);for(const e of n.optional)oa(e)}if(n.wildcard?.length){n.wildcard.sort(Ef);for(const e of n.wildcard)oa(e)}}function Qa(n){return{kind:0,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:n,parent:null,parse:null,skipOnParamError:!1,parsingPriority:0}}function Tf(n,e,r,s,o){return{kind:n,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null,parse:null,skipOnParamError:!1,parsingPriority:0,caseSensitive:r,prefix:s,suffix:o}}function PS(n,e){const r=Qa("/"),s=new Uint16Array(6);for(const o of n)Ku(!1,s,o,1,r,0);oa(r),e.masksTree=r,e.flatCache=Do(1e3)}function IS(n,e){n||="/";const r=e.flatCache.get(n);if(r)return r;const s=_h(n,e.masksTree);return e.flatCache.set(n,s),s}function HS(n,e,r,s,o){n||="/",s||="/";const u=e?`case\0${n}`:n;let c=o.singleCache.get(u);return c||(c=Qa("/"),Ku(e,new Uint16Array(6),{from:n},1,c,0),o.singleCache.set(u,c)),_h(s,c,r)}function $S(n,e,r=!1){const s=r?n:`nofuzz\0${n}`,o=e.matchCache.get(s);if(o!==void 0)return o;n||="/";let u;try{u=_h(n,e.segmentTree,r)}catch(c){if(c instanceof URIError)u=null;else throw c}return u&&(u.branch=GS(u.route)),e.matchCache.set(s,u),u}function qS(n){return n==="/"?n:n.replace(/\/{1,}$/,"")}function VS(n,e=!1,r){const s=Qa(n.fullPath),o=new Uint16Array(6),u={},c={};let f=0;return Ku(e,o,n,1,s,0,p=>{if(r?.(p,f),p.id in u&&on(),u[p.id]=p,f!==0&&p.path){const m=qS(p.fullPath);(!c[m]||p.fullPath.endsWith("/"))&&(c[m]=p)}f++}),oa(s),{processedTree:{segmentTree:s,singleCache:Do(1e3),matchCache:Do(1e3),flatCache:null,masksTree:null},routesById:u,routesByPath:c}}function _h(n,e,r=!1){const s=n.split("/"),o=KS(n,s,e,r);if(!o)return null;const[u]=S0(n,s,o);return{route:o.node.route,rawParams:u,parsedParams:o.parsedParams}}function S0(n,e,r){const s=YS(r.node);let o=null;const u=Object.create(null);let c=r.extract?.part??0,f=r.extract?.node??0,p=r.extract?.path??0,m=r.extract?.segment??0;for(;f<s.length;c++,f++,p++,m++){const y=s[f];if(y.kind===Fa)break;if(y.kind===w0){m--,c--,p--;continue}const g=e[c],b=p;if(g&&(p+=g.length),y.kind===1){o??=r.node.fullPath.split("/");const _=o[m],S=y.prefix?.length??0;if(_.charCodeAt(S)===123){const A=y.suffix?.length??0,R=_.substring(S+2,_.length-A-1),x=g.substring(S,g.length-A);u[R]=decodeURIComponent(x)}else{const A=_.substring(1);u[A]=decodeURIComponent(g)}}else if(y.kind===3){if(r.skipped&1<<f){c--,p=b-1;continue}o??=r.node.fullPath.split("/");const _=o[m],S=y.prefix?.length??0,A=y.suffix?.length??0,R=_.substring(S+3,_.length-A-1),x=y.suffix||y.prefix?g.substring(S,g.length-A):g;x&&(u[R]=decodeURIComponent(x))}else if(y.kind===2){const _=y,S=n.substring(b+(_.prefix?.length??0),n.length-(_.suffix?.length??0)),A=decodeURIComponent(S);u["*"]=A,u._splat=A;break}}return r.rawParams&&Object.assign(u,r.rawParams),[u,{part:c,node:f,path:p,segment:m}]}function GS(n){const e=[n];for(;n.parentRoute;)n=n.parentRoute,e.push(n);return e.reverse(),e}function YS(n){const e=Array(n.depth+1);do e[n.depth]=n,n=n.parent;while(n);return e}function KS(n,e,r,s){if(n==="/"&&r.index)return{node:r.index,skipped:0};const o=!No(e),u=o&&n!=="/",c=e.length-(o?1:0),f=[{node:r,index:1,skipped:0,depth:1,statics:1,dynamics:0,optionals:0}];let p=null,m=null,y=null;for(;f.length;){const g=f.pop(),{node:b,index:_,skipped:S,depth:A,statics:R,dynamics:x,optionals:M}=g;let{extract:N,rawParams:B,parsedParams:J}=g;if(b.skipOnParamError){if(!xf(n,e,g))continue;B=g.rawParams,N=g.extract,J=g.parsedParams}s&&b.route&&b.kind!==Fa&&yo(m,g)&&(m=g);const K=_===c;if(K&&(b.route&&!u&&yo(y,g)&&(y=g),!b.optional&&!b.wildcard&&!b.index&&!b.pathless))continue;const I=K?void 0:e[_];let F;if(K&&b.index){const Q={node:b.index,index:_,skipped:S,depth:A+1,statics:R,dynamics:x,optionals:M,extract:N,rawParams:B,parsedParams:J};let he=!0;if(b.index.skipOnParamError&&(xf(n,e,Q)||(he=!1)),he){if(R===c&&!x&&!M&&!S)return Q;yo(y,Q)&&(y=Q)}}if(b.wildcard&&yo(p,g))for(const Q of b.wildcard){const{prefix:he,suffix:se}=Q;if(he&&(K||!(Q.caseSensitive?I:F??=I.toLowerCase()).startsWith(he)))continue;if(se){if(K)continue;const ye=e.slice(_).join("/").slice(-se.length);if((Q.caseSensitive?ye:ye.toLowerCase())!==se)continue}const _e={node:Q,index:c,skipped:S,depth:A,statics:R,dynamics:x,optionals:M,extract:N,rawParams:B,parsedParams:J};if(!(Q.skipOnParamError&&!xf(n,e,_e))){p=_e;break}}if(b.optional){const Q=S|1<<A,he=A+1;for(let se=b.optional.length-1;se>=0;se--){const _e=b.optional[se];f.push({node:_e,index:_,skipped:Q,depth:he,statics:R,dynamics:x,optionals:M,extract:N,rawParams:B,parsedParams:J})}if(!K)for(let se=b.optional.length-1;se>=0;se--){const _e=b.optional[se],{prefix:ye,suffix:Je}=_e;if(ye||Je){const Ue=_e.caseSensitive?I:F??=I.toLowerCase();if(ye&&!Ue.startsWith(ye)||Je&&!Ue.endsWith(Je))continue}f.push({node:_e,index:_+1,skipped:S,depth:he,statics:R,dynamics:x,optionals:M+1,extract:N,rawParams:B,parsedParams:J})}}if(!K&&b.dynamic&&I)for(let Q=b.dynamic.length-1;Q>=0;Q--){const he=b.dynamic[Q],{prefix:se,suffix:_e}=he;if(se||_e){const ye=he.caseSensitive?I:F??=I.toLowerCase();if(se&&!ye.startsWith(se)||_e&&!ye.endsWith(_e))continue}f.push({node:he,index:_+1,skipped:S,depth:A+1,statics:R,dynamics:x+1,optionals:M,extract:N,rawParams:B,parsedParams:J})}if(!K&&b.staticInsensitive){const Q=b.staticInsensitive.get(F??=I.toLowerCase());Q&&f.push({node:Q,index:_+1,skipped:S,depth:A+1,statics:R+1,dynamics:x,optionals:M,extract:N,rawParams:B,parsedParams:J})}if(!K&&b.static){const Q=b.static.get(I);Q&&f.push({node:Q,index:_+1,skipped:S,depth:A+1,statics:R+1,dynamics:x,optionals:M,extract:N,rawParams:B,parsedParams:J})}if(b.pathless){const Q=A+1;for(let he=b.pathless.length-1;he>=0;he--){const se=b.pathless[he];f.push({node:se,index:_,skipped:S,depth:Q,statics:R,dynamics:x,optionals:M,extract:N,rawParams:B,parsedParams:J})}}}if(y&&p)return yo(p,y)?y:p;if(y)return y;if(p)return p;if(s&&m){let g=m.index;for(let _=0;_<m.index;_++)g+=e[_].length;const b=g===n.length?"/":n.slice(g);return m.rawParams??=Object.create(null),m.rawParams["**"]=decodeURIComponent(b),m}return null}function xf(n,e,r){try{const[s,o]=S0(n,e,r);r.rawParams=s,r.extract=o;const u=r.node.parse(s);return r.parsedParams=Object.assign(Object.create(null),r.parsedParams,u),!0}catch{return null}}function yo(n,e){return n?e.statics>n.statics||e.statics===n.statics&&(e.dynamics>n.dynamics||e.dynamics===n.dynamics&&(e.optionals>n.optionals||e.optionals===n.optionals&&((e.node.kind===Fa)>(n.node.kind===Fa)||e.node.kind===Fa==(n.node.kind===Fa)&&e.depth>n.depth))):!0}function _u(n){return wh(n.filter(e=>e!==void 0).join("/"))}function wh(n){return n.replace(/\/{2,}/g,"/")}function E0(n){return n==="/"?n:n.replace(/^\/{1,}/,"")}function ma(n){const e=n.length;return e>
101&&n[e-1]==="/"?n.replace(/\/{1,}$/,""):n}function T0(n){return ma(E0(n))}function Ou(n,e){return n?.endsWith("/")&&n!=="/"&&n!==`${e}/`?n.slice(0,-1):n}function ZS(n,e,r){return Ou(n,r)===Ou(e,r)}function JS({base:n,to:e,trailingSlash:r="never",cache:s}){const o=e.startsWith("/"),u=!o&&e===".";let c;if(s){c=o?e:u?n:n+"\0"+e;const g=s.get(c);if(g)return g}let f;if(u)f=n.split("/");else if(o)f=e.split("/");else{for(f=n.split("/");f.length>1&&No(f)==="";)f.pop();const g=e.split("/");for(let b=0,_=g.length;b<_;b++){const S=g[b];S===""?b?b===_-1&&f.push(S):f=[S]:S===".."?f.pop():S==="."||f.push(S)}}f.length>1&&(No(f)===""?r==="never"&&f.pop():r==="always"&&f.push(""));let p,m="";for(let g=0;g<f.length;g++){g>0&&(m+="/");const b=f[g];if(!b)continue;p=bh(b,0,p);const _=p[0];if(_===0){m+=b;continue}const S=p[5],A=b.substring(0,p[1]),R=b.substring(p[4],S),x=b.substring(p[2],p[3]);_===1?m+=A||R?`${A}{$${x}}${R}`:`$${x}`:_===2?m+=A||R?`${A}{$}${R}`:"$":m+=`${A}{-$${x}}${R}`}m=wh(m);const y=m||"/";return c&&s&&s.set(c,y),y}function XS(n){const e=new Map(n.map(o=>[encodeURIComponent(o),o])),r=Array.from(e.keys()).map(o=>o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),s=new RegExp(r,"g");return o=>o.replace(s,u=>e.get(u)??u)}function Rf(n,e,r){const s=e[n];return typeof s!="string"?s:n==="_splat"?/^[a-zA-Z0-9\-._~!/]*$/.test(s)?s:s.split("/").map(o=>Hy(o,r)).join("/"):Hy(s,r)}function Iy({path:n,params:e,decoder:r,...s}){let o=!1;const u=Object.create(null);if(!n||n==="/")return{interpolatedPath:"/",usedParams:u,isMissingParams:o};if(!n.includes("$"))return{interpolatedPath:n,usedParams:u,isMissingParams:o};const c=n.length;let f=0,p,m="";for(;f<c;){const y=f;p=bh(n,y,p);const g=p[5];if(f=g+1,y===g)continue;const b=p[0];if(b===0){m+="/"+n.substring(y,g);continue}if(b===2){const _=e._splat;u._splat=_,u["*"]=_;const S=n.substring(y,p[1]),A=n.substring(p[4],g);if(!_){o=!0,(S||A)&&(m+="/"+S+A);continue}const R=Rf("_splat",e,r);m+="/"+S+R+A;continue}if(b===1){const _=n.substring(p[2],p[3]);!o&&!(_ in e)&&(o=!0),u[_]=e[_];const S=n.substring(y,p[1]),A=n.substring(p[4],g),R=Rf(_,e,r)??"undefined";m+="/"+S+R+A;continue}if(b===3){const _=n.substring(p[2],p[3]),S=e[_];if(S==null)continue;u[_]=S;const A=n.substring(y,p[1]),R=n.substring(p[4],g),x=Rf(_,e,r)??"";m+="/"+A+x+R;continue}}return n.endsWith("/")&&(m+="/"),{usedParams:u,interpolatedPath:m||"/",isMissingParams:o}}function Hy(n,e){const r=encodeURIComponent(n);return e?.(r)??r}function Dt(n){return!!n?.isNotFound}function FS(){try{return typeof window<"u"&&typeof window.sessionStorage=="object"?window.sessionStorage:void 0}catch{return}}var QS="tsr-scroll-restoration-v1_3";function WS(){const n=FS();if(!n)return null;let e={};try{const s=JSON.parse(n.getItem("tsr-scroll-restoration-v1_3")||"{}");mi(s)&&(e=s)}catch{}return{get state(){return e},set:s=>{e=fa(s,e)||e},persist:()=>{try{n.setItem(QS,JSON.stringify(e))}catch{}}}}var $y=WS(),eE=n=>n.state.__TSR_key||n.href;function tE(n){const e=[];let r;for(;r=n.parentNode;)e.push(`${n.tagName}:nth-child(${Array.prototype.indexOf.call(r.children,n)+1})`),n=r;return`${e.reverse().join(" > ")}`.toLowerCase()}var ou=!1,vo="window",qy="data-scroll-restoration-id";function nE(n,e){if(!$y)return;const r=$y;if((n.options.scrollRestoration??!1)&&(n.isScrollRestoring=!0),n.isScrollRestorationSetup||!r)return;n.isScrollRestorationSetup=!0,ou=!1;const s=n.options.getScrollRestorationKey||eE,o=new Map;window.history.scrollRestoration="manual";const u=f=>{if(!(ou||!n.isScrollRestoring))if(f.target===document||f.target===window)o.set(vo,{scrollX:window.scrollX||0,scrollY:window.scrollY||0});else{const p=f.target;o.set(p,{scrollX:p.scrollLeft||0,scrollY:p.scrollTop||0})}},c=f=>{if(!n.isScrollRestoring||!f||o.size===0||!r)return;const p=r.state[f]||={};for(const[m,y]of o){let g;if(m===vo)g=vo;else if(m.isConnected){const b=m.getAttribute(qy);g=b?`[${qy}="${b}"]`:tE(m)}g&&(p[g]=y)}};document.addEventListener("scroll",u,!0),n.subscribe("onBeforeLoad",f=>{c(f.fromLocation?s(f.fromLocation):void 0),o.clear()}),window.addEventListener("pagehide",()=>{c(s(n.stores.resolvedLocation.state??n.stores.location.state)),r.persist()}),n.subscribe("onRendered",f=>{const p=s(f.toLocation),m=n.options.scrollRestorationBehavior,y=n.options.scrollToTopSelectors;if(o.clear(),!n.resetNextScroll){n.resetNextScroll=!0;return}if(!(typeof n.options.scrollRestoration=="function"&&!n.options.scrollRestoration({location:n.latestLocation}))){ou=!0;try{const g=n.isScrollRestoring?r.state[p]:void 0;let b=!1;if(g)for(const _ in g){const S=g[_];if(!mi(S))continue;const{scrollX:A,scrollY:R}=S;if(!(!Number.isFinite(A)||!Number.isFinite(R))){if(_===vo)window.scrollTo({top:R,left:A,behavior:m}),b=!0;else if(_){let x;try{x=document.querySelector(_)}catch{continue}x&&(x.scrollLeft=A,x.scrollTop=R,b=!0)}}}if(!b){const _=n.history.location.hash.slice(1);if(_){const S=window.history.state?.__hashScrollIntoViewOptions??!0;if(S){const A=document.getElementById(_);A&&A.scrollIntoView(S)}}else{const S={top:0,left:0,behavior:m};if(window.scrollTo(S),y)for(const A of y){if(A===vo)continue;const R=typeof A=="function"?A():document.querySelector(A);R&&R.scrollTo(S)}}}}finally{ou=!1}n.isScrollRestoring&&r.set(g=>(g[p]||={},g))}})}
10function x0(n,e=String){const r=new URLSearchParams;for(const s in n){const o=n[s];o!==void 0&&r.set(s,e(o))}return r.toString()}function Af(n){return n?n==="false"?!1:n==="true"?!0:+n*0===0&&+n+""===n?+n:n:""}function rE(n){const e=new URLSearchParams(n),r=Object.create(null);for(const[s,o]of e.entries()){const u=r[s];u==null?r[s]=Af(o):Array.isArray(u)?u.push(Af(o)):r[s]=[u,Af(o)]}return r}var aE=iE(JSON.parse),sE=oE(JSON.stringify,JSON.parse);function iE(n){return e=>{e[0]==="?"&&(e=e.substring(1));const r=rE(e);for(const s in r){const o=r[s];if(typeof o=="string")try{r[s]=n(o)}catch{}}return r}}function oE(n,e){const r=typeof e=="function";function s(o){if(typeof o=="object"&&o!==null)try{return n(o)}catch{}else if(r&&typeof o=="string")try{return e(o),n(o)}catch{}return o}return o=>{const u=x0(o,s);return u?`?${u}`:""}}var ts="__root__";function R0(n){if(n.statusCode=n.statusCode||n.code||307,!n._builtLocation&&!n.reloadDocument&&typeof n.href=="string")try{new URL(n.href),n.reloadDocument=!0}catch{}const e=new Headers(n.headers);n.href&&e.get("Location")===null&&e.set("Location",n.href);const r=new Response(null,{status:n.statusCode,headers:e});if(r.options=n,n.throw)throw r;return r}function sn(n){return n instanceof Response&&!!n.options}function lE(n){if(n!==null&&typeof n=="object"&&n.isSerializedRedirect)return R0(n)}function uE(n){return{input:({url:e})=>{for(const r of n)e=Kf(r,e);return e},output:({url:e})=>{for(let r=n.length-1;r>=0;r--)e=A0(n[r],e);return e}}}function cE(n){const e=T0(n.basepath),r=`/${e}`,s=`${r}/`,o=n.caseSensitive?r:r.toLowerCase(),u=n.caseSensitive?s:s.toLowerCase();return{input:({url:c})=>{const f=n.caseSensitive?c.pathname:c.pathname.toLowerCase();return f===o?c.pathname="/":f.startsWith(u)&&(c.pathname=c.pathname.slice(r.length)),c},output:({url:c})=>(c.pathname=_u(["/",e,c.pathname]),c)}}function Kf(n,e){const r=n?.input?.({url:e});if(r){if(typeof r=="string")return new URL(r);if(r instanceof URL)return r}return e}function A0(n,e){const r=n?.output?.({url:e});if(r){if(typeof r=="string")return new URL(r);if(r instanceof URL)return r}return e}function dE(n,e){const{createMutableStore:r,createReadonlyStore:s,batch:o,init:u}=e,c=new Map,f=new Map,p=new Map,m=r(n.status),y=r(n.loadedAt),g=r(n.isLoading),b=r(n.isTransitioning),_=r(n.location),S=r(n.resolvedLocation),A=r(n.statusCode),R=r(n.redirect),x=r([]),M=r([]),N=r([]),B=s(()=>Of(c,x.state)),J=s(()=>Of(f,M.state)),K=s(()=>Of(p,N.state)),I=s(()=>x.state[0]),F=s(()=>x.state.some(Z=>c.get(Z)?.state.status==="pending")),Q=s(()=>({locationHref:_.state.href,resolvedLocationHref:S.state?.href,status:m.state})),he=s(()=>({status:m.state,loadedAt:y.state,isLoading:g.state,isTransitioning:b.state,matches:B.state,location:_.state,resolvedLocation:S.state,statusCode:A.state,redirect:R.state})),se=Do(64);function _e(Z){let le=se.get(Z);return le||(le=s(()=>{const ke=x.state;for(const we of ke){const k=c.get(we);if(k&&k.routeId===Z)return k.state}}),se.set(Z,le)),le}const ye={status:m,loadedAt:y,isLoading:g,isTransitioning:b,location:_,resolvedLocation:S,statusCode:A,redirect:R,matchesId:x,pendingMatchesId:M,cachedMatchesId:N,activeMatchesSnapshot:B,pendingMatchesSnapshot:J,cachedMatchesSnapshot:K,firstMatchId:I,hasPendingMatches:F,matchRouteReactivity:Q,activeMatchStoresById:c,pendingMatchStoresById:f,cachedMatchStoresById:p,__store:he,getMatchStoreByRouteId:_e,setActiveMatches:Je,setPendingMatches:Ue,setCachedMatches:L};Je(n.matches),u?.(ye);function Je(Z){kf(Z,c,x,r,o)}function Ue(Z){kf(Z,f,M,r,o)}function L(Z){kf(Z,p,N,r,o)}return ye}function Of(n,e){const r=[];for(const s of e){const o=n.get(s);o&&r.push(o.state)}return r}function kf(n,e,r,s,o){const u=n.map(f=>f.id),c=new Set(u);o(()=>{for(const f of e.keys())c.has(f)||e.delete(f);for(const f of n){const p=e.get(f.id);if(!p){const m=s(f);m.routeId=f.routeId,e.set(f.id,m);continue}p.routeId=f.routeId,p.state!==f&&p.setState(()=>f)}zS(r.state,u)||r.setState(()=>u)})}var Zf=n=>{if(!n.rendered)return n.rendered=!0,n.onReady?.()},fE=n=>n.stores.matchesId.state.some(e=>n.stores.activeMatchStoresById.get(e)?.state._forcePending),Zu=(n,e)=>!!(n.preload&&!n.router.stores.activeMatchStoresById.has(e)),ns=(n,e,r=!0)=>{const s={...n.router.options.context??{}},o=r?e:e-1;for(let u=0;u<=o;u++){const c=n.matches[u];if(!c)continue;const f=n.router.getMatch(c.id);
10f&&Object.assign(s,f.__routeContext,f.__beforeLoadContext)}return s},Vy=(n,e)=>{if(!n.matches.length)return;const r=e.routeId,s=n.matches.findIndex(c=>c.routeId===n.router.routeTree.id),o=s>=0?s:0;let u=r?n.matches.findIndex(c=>c.routeId===r):n.firstBadMatchIndex??n.matches.length-1;u<0&&(u=o);for(let c=u;c>=0;c--){const f=n.matches[c];if(n.router.looseRoutesById[f.routeId].options.notFoundComponent)return c}return r?u:o},ha=(n,e,r)=>{if(!(!sn(r)&&!Dt(r)))throw sn(r)&&r.redirectHandled&&!r.options.reloadDocument||(e&&(e._nonReactive.beforeLoadPromise?.resolve(),e._nonReactive.loaderPromise?.resolve(),e._nonReactive.beforeLoadPromise=void 0,e._nonReactive.loaderPromise=void 0,e._nonReactive.error=r,n.updateMatch(e.id,s=>({...s,status:sn(r)?"redirected":s.status==="pending"?"success":s.status,context:ns(n,e.index),isFetching:!1,error:r})),Dt(r)&&!r.routeId&&(r.routeId=e.routeId),e._nonReactive.loadPromise?.resolve()),sn(r)&&(n.rendered=!0,r.options._fromLocation=n.location,r.redirectHandled=!0,r=n.router.resolveRedirect(r))),r},O0=(n,e)=>{const r=n.router.getMatch(e);return!!(!r||r._nonReactive.dehydrated)},Gy=(n,e,r)=>{const s=ns(n,r);n.updateMatch(e,o=>({...o,context:s}))},bo=(n,e,r,s)=>{const{id:o,routeId:u}=n.matches[e],c=n.router.looseRoutesById[u];if(r instanceof Promise)throw r;r.routerCode=s,n.firstBadMatchIndex??=e,ha(n,n.router.getMatch(o),r);try{c.options.onError?.(r)}catch(f){r=f,ha(n,n.router.getMatch(o),r)}n.updateMatch(o,f=>(f._nonReactive.beforeLoadPromise?.resolve(),f._nonReactive.beforeLoadPromise=void 0,f._nonReactive.loadPromise?.resolve(),{...f,error:r,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController})),!n.preload&&!sn(r)&&!Dt(r)&&(n.serialError??=r)},k0=(n,e,r,s)=>{if(s._nonReactive.pendingTimeout!==void 0)return;const o=r.options.pendingMs??n.router.options.defaultPendingMs;if(n.onReady&&!Zu(n,e)&&(r.options.loader||r.options.beforeLoad||j0(r))&&typeof o=="number"&&o!==1/0&&(r.options.pendingComponent??n.router.options?.defaultPendingComponent)){const u=setTimeout(()=>{Zf(n)},o);s._nonReactive.pendingTimeout=u}},hE=(n,e,r)=>{const s=n.router.getMatch(e);if(!s._nonReactive.beforeLoadPromise&&!s._nonReactive.loaderPromise)return;k0(n,e,r,s);const o=()=>{const u=n.router.getMatch(e);u.preload&&(u.status==="redirected"||u.status==="notFound")&&ha(n,u,u.error)};return s._nonReactive.beforeLoadPromise?s._nonReactive.beforeLoadPromise.then(o):o()},pE=(n,e,r,s)=>{const o=n.router.getMatch(e);let u=o._nonReactive.loadPromise;o._nonReactive.loadPromise=rs(()=>{u?.resolve(),u=void 0});const{paramsError:c,searchError:f}=o;c&&bo(n,r,c,"PARSE_PARAMS"),f&&bo(n,r,f,"VALIDATE_SEARCH"),k0(n,e,s,o);const p=new AbortController;let m=!1;const y=()=>{m||(m=!0,n.updateMatch(e,B=>({...B,isFetching:"beforeLoad",fetchCount:B.fetchCount+1,abortController:p})))},g=()=>{o._nonReactive.beforeLoadPromise?.resolve(),o._nonReactive.beforeLoadPromise=void 0,n.updateMatch(e,B=>({...B,isFetching:!1}))};if(!s.options.beforeLoad){n.router.batch(()=>{y(),g()});return}o._nonReactive.beforeLoadPromise=rs();const b={...ns(n,r,!1),...o.__routeContext},{search:_,params:S,cause:A}=o,R=Zu(n,e),x={search:_,abortController:p,params:S,preload:R,context:b,location:n.location,navigate:B=>n.router.navigate({...B,_fromLocation:n.location}),buildLocation:n.router.buildLocation,cause:R?"preload":A,matches:n.matches,routeId:s.id,...n.router.options.additionalContext},M=B=>{if(B===void 0){n.router.batch(()=>{y(),g()});return}(sn(B)||Dt(B))&&(y(),bo(n,r,B,"BEFORE_LOAD")),n.router.batch(()=>{y(),n.updateMatch(e,J=>({...J,__beforeLoadContext:B})),g()})};let N;try{if(N=s.options.beforeLoad(x),Mo(N))return y(),N.catch(B=>{bo(n,r,B,"BEFORE_LOAD")}).then(M)}catch(B){y(),bo(n,r,B,"BEFORE_LOAD")}M(N)},mE=(n,e)=>{const{id:r,routeId:s}=n.matches[e],o=n.router.looseRoutesById[s],u=()=>f(),c=()=>pE(n,r,e,o),f=()=>{if(O0(n,r))return;const p=hE(n,r,o);return Mo(p)?p.then(c):c()};return u()},gE=(n,e,r)=>{const s=n.router.getMatch(e);if(!s||!r.options.head&&!r.options.scripts&&!r.options.headers)return;const o={ssr:n.router.options.ssr,matches:n.matches,match:s,params:s.params,loaderData:s.loaderData};return Promise.all([r.options.head?.(o),r.options.scripts?.(o),r.options.headers?.(o)]).then(([u,c,f])=>
10({meta:u?.meta,links:u?.links,headScripts:u?.scripts,headers:f,scripts:c,styles:u?.styles}))},C0=(n,e,r,s,o)=>{const u=e[s-1],{params:c,loaderDeps:f,abortController:p,cause:m}=n.router.getMatch(r),y=ns(n,s),g=Zu(n,r);return{params:c,deps:f,preload:!!g,parentMatchPromise:u,abortController:p,context:y,location:n.location,navigate:b=>n.router.navigate({...b,_fromLocation:n.location}),cause:g?"preload":m,route:o,...n.router.options.additionalContext}},Yy=async(n,e,r,s,o)=>{try{const u=n.router.getMatch(r);try{(!(_0??n.router.isServer)||u.ssr===!0)&&Lo(o);const c=o.options.loader,f=typeof c=="function"?c:c?.handler,p=f?.(C0(n,e,r,s,o)),m=!!f&&Mo(p);if((m||o._lazyPromise||o._componentsPromise||o.options.head||o.options.scripts||o.options.headers||u._nonReactive.minPendingPromise)&&n.updateMatch(r,g=>({...g,isFetching:"loader"})),f){const g=m?await p:p;ha(n,n.router.getMatch(r),g),g!==void 0&&n.updateMatch(r,b=>({...b,loaderData:g}))}o._lazyPromise&&await o._lazyPromise;const y=u._nonReactive.minPendingPromise;y&&await y,o._componentsPromise&&await o._componentsPromise,n.updateMatch(r,g=>({...g,error:void 0,context:ns(n,s),status:"success",isFetching:!1,updatedAt:Date.now()}))}catch(c){let f=c;if(f?.name==="AbortError"){if(u.abortController.signal.aborted){u._nonReactive.loaderPromise?.resolve(),u._nonReactive.loaderPromise=void 0;return}n.updateMatch(r,m=>({...m,status:m.status==="pending"?"success":m.status,isFetching:!1,context:ns(n,s)}));return}const p=u._nonReactive.minPendingPromise;p&&await p,Dt(c)&&await o.options.notFoundComponent?.preload?.(),ha(n,n.router.getMatch(r),c);try{o.options.onError?.(c)}catch(m){f=m,ha(n,n.router.getMatch(r),m)}!sn(f)&&!Dt(f)&&await Lo(o,["errorComponent"]),n.updateMatch(r,m=>({...m,error:f,context:ns(n,s),status:"error",isFetching:!1}))}}catch(u){const c=n.router.getMatch(r);c&&(c._nonReactive.loaderPromise=void 0),ha(n,c,u)}},yE=async(n,e,r)=>{async function s(_,S,A,R,x){const M=Date.now()-S.updatedAt,N=_?x.options.preloadStaleTime??n.router.options.defaultPreloadStaleTime??3e4:x.options.staleTime??n.router.options.defaultStaleTime??0,B=x.options.shouldReload,J=typeof B=="function"?B(C0(n,e,o,r,x)):B,{status:K,invalid:I}=R,F=M>=N&&(!!n.forceStaleReload||R.cause==="enter"||A!==void 0&&A!==R.id);c=K==="success"&&(I||(J??F)),_&&x.options.preload===!1||(c&&!n.sync&&y?(f=!0,(async()=>{try{await Yy(n,e,o,r,x);const Q=n.router.getMatch(o);Q._nonReactive.loaderPromise?.resolve(),Q._nonReactive.loadPromise?.resolve(),Q._nonReactive.loaderPromise=void 0,Q._nonReactive.loadPromise=void 0}catch(Q){sn(Q)&&await n.router.navigate(Q.options)}})()):K!=="success"||c?await Yy(n,e,o,r,x):Gy(n,o,r))}const{id:o,routeId:u}=n.matches[r];let c=!1,f=!1;const p=n.router.looseRoutesById[u],m=p.options.loader,y=((typeof m=="function"?void 0:m?.staleReloadMode)??n.router.options.defaultStaleReloadMode)!=="blocking";if(O0(n,o)){if(!n.router.getMatch(o))return n.matches[r];Gy(n,o,r)}else{const _=n.router.getMatch(o),S=n.router.stores.matchesId.state[r],A=(S&&n.router.stores.activeMatchStoresById.get(S)||null)?.routeId===u?S:n.router.stores.activeMatchesSnapshot.state.find(x=>x.routeId===u)?.id,R=Zu(n,o);if(_._nonReactive.loaderPromise){if(_.status==="success"&&!n.sync&&!_.preload&&y)return _;await _._nonReactive.loaderPromise;const x=n.router.getMatch(o),M=x._nonReactive.error||x.error;M&&ha(n,x,M),x.status==="pending"&&await s(R,_,A,x,p)}else{const x=R&&!n.router.stores.activeMatchStoresById.has(o),M=n.router.getMatch(o);M._nonReactive.loaderPromise=rs(),x!==M.preload&&n.updateMatch(o,N=>({...N,preload:x})),await s(R,_,A,M,p)}}const g=n.router.getMatch(o);f||(g._nonReactive.loaderPromise?.resolve(),g._nonReactive.loadPromise?.resolve(),g._nonReactive.loadPromise=void 0),clearTimeout(g._nonReactive.pendingTimeout),g._nonReactive.pendingTimeout=void 0,f||(g._nonReactive.loaderPromise=void 0),g._nonReactive.dehydrated=void 0;const b=f?g.isFetching:!1;return b!==g.isFetching||g.invalid!==!1?(n.updateMatch(o,_=>({..._,isFetching:b,invalid:!1})),n.router.getMatch(o)):g};async function Ky(n){const e=n,r=[];fE(e.router)&&Zf(e);let s;for(let b=0;b<e.matches.length;b++){try{const _=mE(e,b);Mo(_)&&await _}catch(_){if(sn(_))throw _;if(Dt(_))s=_;else if(!e.preload)throw _;break}if(e.serialError||e.firstBadMatchIndex!=null)break}const o=e.firstBadMatchIndex??e.matches.length,u=s&&!e.preload?Vy(e,s):void 0,c=s&&e.preload?0:u!==void 0?Math.min(u+1,o):o;let f,p;for(let b=0;b<c;b++)r.push(yE(e,r,b));try{await Promise.all(r)}catch{const b=await Promise.allSettled(r);for(const _ of b){if(_.status!=="rejected")continue;const S=_.reason;if(sn(S))throw S;Dt(S)?f??=S:p??=S}if(p!==void 0)throw p}const m=f??(s&&!e.preload?s:void 0);let y=e.firstBadMatchIndex!==void 0?e.firstBadMatchIndex:e.matches.length-1;if(!m&&s&&e.preload)return e.matches;if(m){const b=Vy(e,m);b===void 0&&on();const _=e.matches[b],S=e.router.looseRoutesById[_.routeId],A=e.router.options?.defaultNotFoundComponent;!S.options.notFoundComponent&&A&&(S.options.notFoundComponent=A),m.routeId=_.routeId;const R=_.routeId===e.router.routeTree.id;e.updateMatch(_.id,x=>({...x,...R?{status:"success",globalNotFound:!0,error:void 0}:{status:"notFound",error:m},isFetching:!1})),y=b,await Lo(S,["notFoundComponent"])}else if(!e.preload){const b=e.matches[0];b.globalNotFound||e.router.getMatch(b.id)?.globalNotFound&&e.updateMatch(b.id,_=>({..._,globalNotFound:!1,error:void 0}))}if(e.serialError&&e.firstBadMatchIndex!==void 0){const b=e.router.looseRoutesById[e.matches[e.firstBadMatchIndex].routeId];await Lo(b,["errorComponent"])}for(let b=0;b<=y;b++){const{id:_,routeId:S}=e.matches[b],A=e.router.looseRoutesById[S];try{const R=gE(e,_,A);if(R){const x=await R;e.updateMatch(_,M=>
10({...M,...x}))}}catch(R){console.error(`Error executing head for route ${S}:`,R)}}const g=Zf(e);if(Mo(g)&&await g,m)throw m;if(e.serialError&&!e.preload&&!e.onReady)throw e.serialError;return e.matches}function Zy(n,e){const r=e.map(s=>n.options[s]?.preload?.()).filter(Boolean);if(r.length!==0)return Promise.all(r)}function Lo(n,e=wu){!n._lazyLoaded&&n._lazyPromise===void 0&&(n.lazyFn?n._lazyPromise=n.lazyFn().then(s=>{const{id:o,...u}=s.options;Object.assign(n.options,u),n._lazyLoaded=!0,n._lazyPromise=void 0}):n._lazyLoaded=!0);const r=()=>n._componentsLoaded?void 0:e===wu?(()=>{if(n._componentsPromise===void 0){const s=Zy(n,wu);s?n._componentsPromise=s.then(()=>{n._componentsLoaded=!0,n._componentsPromise=void 0}):n._componentsLoaded=!0}return n._componentsPromise})():Zy(n,e);return n._lazyPromise?n._lazyPromise.then(r):r()}function j0(n){for(const e of wu)if(n.options[e]?.preload)return!0;return!1}var wu=["component","errorComponent","pendingComponent","notFoundComponent"],ga="__TSR_index",Jy="popstate",Xy="beforeunload";function vE(n){let e=n.getLocation();const r=new Set,s=c=>{e=n.getLocation(),r.forEach(f=>f({location:e,action:c}))},o=c=>{n.notifyOnIndexChange??!0?s(c):e=n.getLocation()},u=async({task:c,navigateOpts:f,...p})=>{if(f?.ignoreBlocker??!1){c();return}const m=n.getBlockers?.()??[],y=p.type==="PUSH"||p.type==="REPLACE";if(typeof document<"u"&&m.length&&y)for(const g of m){const b=ku(p.path,p.state);if(await g.blockerFn({currentLocation:e,nextLocation:b,action:p.type})){n.onBlocked?.();return}}c()};return{get location(){return e},get length(){return n.getLength()},subscribers:r,subscribe:c=>(r.add(c),()=>{r.delete(c)}),push:(c,f,p)=>{const m=e.state[ga];f=Fy(m+1,f),u({task:()=>{n.pushState(c,f),s({type:"PUSH"})},navigateOpts:p,type:"PUSH",path:c,state:f})},replace:(c,f,p)=>{const m=e.state[ga];f=Fy(m,f),u({task:()=>{n.replaceState(c,f),s({type:"REPLACE"})},navigateOpts:p,type:"REPLACE",path:c,state:f})},go:(c,f)=>{u({task:()=>{n.go(c),o({type:"GO",index:c})},navigateOpts:f,type:"GO"})},back:c=>{u({task:()=>{n.back(c?.ignoreBlocker??!1),o({type:"BACK"})},navigateOpts:c,type:"BACK"})},forward:c=>{u({task:()=>{n.forward(c?.ignoreBlocker??!1),o({type:"FORWARD"})},navigateOpts:c,type:"FORWARD"})},canGoBack:()=>e.state[ga]!==0,createHref:c=>n.createHref(c),block:c=>{if(!n.setBlockers)return()=>{};const f=n.getBlockers?.()??[];return n.setBlockers([...f,c]),()=>{const p=n.getBlockers?.()??[];n.setBlockers?.(p.filter(m=>m!==c))}},flush:()=>n.flush?.(),destroy:()=>n.destroy?.(),notify:s}}function Fy(n,e){e||(e={});const r=Sh();return{...e,key:r,__TSR_key:r,[ga]:n}}function bE(n){const e=typeof document<"u"?window:void 0,r=e.history.pushState,s=e.history.replaceState;let o=[];const u=()=>o,c=F=>o=F,f=(F=>F),p=(()=>ku(`${e.location.pathname}${e.location.search}${e.location.hash}`,e.history.state));if(!e.history.state?.__TSR_key&&!e.history.state?.key){const F=Sh();e.history.replaceState({[ga]:0,key:F,__TSR_key:F},"")}let m=p(),y,g=!1,b=!1,_=!1,S=!1;const A=()=>m;let R,x;const M=()=>{R&&(I._ignoreSubscribers=!0,(R.isPush?e.history.pushState:e.history.replaceState)(R.state,"",R.href),I._ignoreSubscribers=!1,R=void 0,x=void 0,y=void 0)},N=(F,Q,he)=>{const se=f(Q);x||(y=m),m=ku(Q,he),R={href:se,state:he,isPush:R?.isPush||F==="push"},x||(x=Promise.resolve().then(()=>M()))},B=F=>{m=p(),I.notify({type:F})},J=async()=>{if(b){b=!1;return}const F=p(),Q=F.state[ga]-m.state[ga],he=Q===1,se=Q===-1,_e=!he&&!se||g;g=!1;const ye=_e?"GO":se?"BACK":"FORWARD",Je=_e?{type:"GO",index:Q}:{type:se?"BACK":"FORWARD"};if(_)_=!1;else{const Ue=u();if(typeof document<"u"&&Ue.length){for(const L of Ue)if(await L.blockerFn({currentLocation:m,nextLocation:F,action:ye})){b=!0,e.history.go(1),I.notify(Je);return}}}m=p(),I.notify(Je)},K=F=>{if(S){S=!1;return}let Q=!1;const he=u();if(typeof document<"u"&&he.length)for(const se of he){const _e=se.enableBeforeUnload??!0;if(_e===!0){Q=!0;break}if(typeof _e=="function"&&_e()===!0){Q=!0;break}}if(Q)return F.preventDefault(),F.returnValue=""},I=vE({getLocation:A,getLength:()=>e.history.length,pushState:(F,Q)=>N("push",F,Q),replaceState:(F,Q)=>N("replace",F,Q),back:F=>(F&&(_=!0),S=!0,e.history.back()),forward:F=>{F&&(_=!0),S=!0,e.history.forward()},go:F=>{g=!0,e.history.go(F)},createHref:F=>f(F),flush:M,destroy:()=>{e.history.pushState=r,e.history.replaceState=s,e.removeEventListener(Xy,K,{capture:!0}),e.removeEventListener(Jy,J)},onBlocked:()=>{y&&m!==y&&(m=y)},getBlockers:u,setBlockers:c,notifyOnIndexChange:!1});return e.addEventListener(Xy,K,{capture:!0}),e.addEventListener(Jy,J),e.history.pushState=function(...F){const Q=r.apply(e.history,F);return I._ignoreSubscribers||B("PUSH"),Q},e.history.replaceState=function(...F){const Q=s.apply(e.history,F);return I._ignoreSubscribers||B("REPLACE"),Q},I}function _E(n){let e=n.replace(/[\x00-\x1f\x7f]/g,"");return e.startsWith("//")&&(e="/"+e.replace(/^\/+/,"")),e}function ku(n,e){const r=_E(n),s=r.indexOf("#"),o=r.indexOf("?"),u=Sh();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:e||{[ga]:0,key:u,__TSR_key:u}}}function Sh(){return(Math.random()+1).toString(36).substring(7)}function wE(n){return n instanceof Error?{name:n.name,message:n.message}:{data:n}}function ci(n,e){const r=e,s=n;return{fromLocation:r,toLocation:s,pathChanged:r?.pathname!==s.pathname,hrefChanged:r?.href!==s.href,hashChanged:r?.hash!==s.hash}}var SE=class{constructor(n,e){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this.resetNextScroll=!0,this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.isScrollRestoring=!1,this.isScrollRestorationSetup=!1,this.startTransition=r=>r(),this.update=r=>{const s=this.options,o=this.basepath??s?.basepath??"/",u=this.basepath===void 0,c=s?.rewrite;if(this.options={...s,...r},this.isServer=this.options.isServer??typeof document>"u",this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=XS(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=bE()),this.origin=this.options.origin,this.origin||(window?.origin&&window.origin!=="null"?this.origin=window.origin:this.origin="http://localhost"),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree){this.routeTree=this.options.routeTree;let y;this.resolvePathCache=Do(1e3),y=this.buildRouteTree(),this.setRoutes(y)}if(!this.stores&&this.latestLocation){const y=this.getStoreConfig(this);this.batch=y.batch,this.stores=dE(TE(this.latestLocation),y),nE(this)}let f=!1;const p=this.options.basepath??"/",m=this.options.rewrite;if(u||o!==p||c!==m){this.basepath=p;const y=[],g=T0(p);g&&g!=="/"&&y.push(cE({basepath:p})),m&&y.push(m),this.rewrite=y.length===0?void 0:y.length===1?y[0]:uE(y),this.history&&this.updateLatestLocation(),f=!0}f&&this.stores&&this.stores.location.setState(()=>this.latestLocation),typeof window<"u"&&"CSS"in window&&typeof window.CSS?.supports=="function"&&(this.isViewTransitionTypesSupported=window.CSS.supports("selector(:active-view-transition-type(a)"))},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{const r=VS(this.routeTree,this.options.caseSensitive,(s,o)=>{s.init({originalIndex:o})});return this.options.routeMasks&&PS(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=>
10{this.subscribers.forEach(s=>{s.eventType===r.type&&s.fn(r)})},this.parseLocation=(r,s)=>{const o=({pathname:p,search:m,hash:y,href:g,state:b})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(p)){const x=this.options.parseSearch(m),M=this.options.stringifySearch(x);return{href:p+M+y,publicHref:p+M+y,pathname:go(p).path,external:!1,searchStr:M,search:Ya(s?.search,x),hash:go(y.slice(1)).path,state:Xa(s?.state,b)}}const _=new URL(g,this.origin),S=Kf(this.rewrite,_),A=this.options.parseSearch(S.search),R=this.options.stringifySearch(A);return S.search=R,{href:S.href.replace(S.origin,""),publicHref:g,pathname:go(S.pathname).path,external:!!this.rewrite&&S.origin!==this.origin,searchStr:R,search:Ya(s?.search,A),hash:go(S.hash.slice(1)).path,state:Xa(s?.state,b)}},u=o(r),{__tempLocation:c,__tempKey:f}=u.state;if(c&&(!f||f===this.tempLocationKey)){const p=o(c);return p.state.key=u.state.key,p.state.__TSR_key=u.state.__TSR_key,delete p.state.__tempLocation,{...p,maskedLocation:u}}return u},this.resolvePathWithBase=(r,s)=>JS({base:r,to:wh(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=>xE({pathname:r,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=r=>{const s=this.getMatch(r);s&&(s.abortController.abort(),clearTimeout(s._nonReactive.pendingTimeout),s._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{this.stores.pendingMatchesId.state.forEach(r=>{this.cancelMatch(r)}),this.stores.matchesId.state.forEach(r=>{if(this.stores.pendingMatchStoresById.has(r))return;const s=this.stores.activeMatchStoresById.get(r)?.state;s&&(s.status==="pending"||s.isFetching==="loader")&&this.cancelMatch(r)})},this.buildLocation=r=>{const s=(u={})=>{const c=u._fromLocation||this.pendingBuiltLocation||this.latestLocation,f=this.matchRoutesLightweight(c);u.from;const p=u.unsafeRelative==="path"?c.pathname:u.from??f.fullPath,m=this.resolvePathWithBase(p,"."),y=f.search,g=Object.assign(Object.create(null),f.params),b=u.to?this.resolvePathWithBase(m,`${u.to}`):this.resolvePathWithBase(m,"."),_=u.params===!1||u.params===null?Object.create(null):(u.params??!0)===!0?g:Object.assign(g,fa(u.params,g)),S=this.getMatchedRoutes(b);let A=S.matchedRoutes;if((!S.foundRoute||S.foundRoute.path!=="/"&&S.routeParams["**"])&&this.options.notFoundRoute&&(A=[...A,this.options.notFoundRoute]),Object.keys(_).length>0)for(const he of A){const se=he.options.params?.stringify??he.options.stringifyParams;if(se)try{Object.assign(_,se(_))}catch{}}const R=r.leaveParams?b:go(Iy({path:b,params:_,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path;let x=y;if(r._includeValidateSearch&&this.options.search?.strict){const he={};A.forEach(se=>{if(se.options.validateSearch)try{Object.assign(he,Su(se.options.validateSearch,{...he,...x}))}catch{}}),x=he}x=RE({search:x,dest:u,destRoutes:A,_includeValidateSearch:r._includeValidateSearch}),x=Ya(y,x);const M=this.options.stringifySearch(x),N=u.hash===!0?c.hash:u.hash?fa(u.hash,c.hash):void 0,B=N?`#${N}`:"";let J=u.state===!0?c.state:u.state?fa(u.state,c.state):{};J=Xa(c.state,J);const K=`${R}${M}${B}`;let I,F,Q=!1;if(this.rewrite){const he=new URL(K,this.origin),se=A0(this.rewrite,he);I=he.href.replace(he.origin,""),se.origin!==this.origin?(F=se.href,Q=!0):F=se.pathname+se.search+se.hash}else I=US(K),F=I;return{publicHref:F,href:I,pathname:R,search:x,searchStr:M,state:J,hash:N??"",external:Q,unmaskOnReload:u.unmaskOnReload}},o=(u={},c)=>{const f=s(u);let p=c?s(c):void 0;if(!p){const m=Object.create(null);if(this.options.routeMasks){const y=IS(f.pathname,this.processedTree);if(y){Object.assign(m,y.rawParams);const{from:g,params:b,..._}=y.route,S=b===!1||b===null?Object.create(null):(b??!0)===!0?m:Object.assign(m,fa(b,m));c={from:r.from,..._,params:S},p=s(c)}}}return p&&(f.maskedLocation=p),f};return r.mask?o(r,{from:r.from,...r.mask}):o(r)},this.commitLocation=async({viewTransition:r,ignoreBlocker:s,...o})=>{const u=()=>{const p=["key","__TSR_key","__TSR_index","__hashScrollIntoViewOptions"];p.forEach(y=>{o.state[y]=this.latestLocation.state[y]});const m=an(o.state,this.latestLocation.state);return p.forEach(y=>{delete o.state[y]}),m},c=ma(this.latestLocation.href)===ma(o.href);let f=this.commitLocationPromise;if(this.commitLocationPromise=rs(()=>{f?.resolve(),f=void 0}),c&&u())this.load();else{let{maskedLocation:p,hashScrollIntoView:m,...y}=o;p&&(y={...p,state:{...p.state,__tempKey:void 0,__tempLocation:{...y,search:y.searchStr,state:{...y.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(y.unmaskOnReload??this.options.unmaskOnReload??!1)&&(y.state.__tempKey=this.tempLocationKey)),y.state.__hashScrollIntoViewOptions=m??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=r,this.history[o.replace?"replace":"push"](y.publicHref,y.state,{ignoreBlocker:s})}return this.resetNextScroll=o.resetScroll??!0,this.history.subscribers.size||this.load(),this.commitLocationPromise},this.buildAndCommitLocation=({replace:r,resetScroll:s,hashScrollIntoView:o,viewTransition:u,ignoreBlocker:c,href:f,...p}={})=>
10{if(f){const g=this.history.location.state.__TSR_index,b=ku(f,{__TSR_index:r?g:g+1}),_=new URL(b.pathname,this.origin);p.to=Kf(this.rewrite,_).pathname,p.search=this.options.parseSearch(b.search),p.hash=b.hash.slice(1)}const m=this.buildLocation({...p,_includeValidateSearch:!0});this.pendingBuiltLocation=m;const y=this.commitLocation({...m,viewTransition:u,replace:r,resetScroll:s,hashScrollIntoView:o,ignoreBlocker:c});return Promise.resolve().then(()=>{this.pendingBuiltLocation===m&&(this.pendingBuiltLocation=void 0)}),y},this.navigate=async({to:r,reloadDocument:s,href:o,publicHref:u,...c})=>{let f=!1;if(o)try{new URL(`${o}`),f=!0}catch{}if(f&&!s&&(s=!0),s){if(r!==void 0||!o){const m=this.buildLocation({to:r,...c});o=o??m.publicHref,u=u??m.publicHref}const p=!f&&u?u:o;if(Au(p,this.protocolAllowlist))return Promise.resolve();if(!c.ignoreBlocker){const m=this.history.getBlockers?.()??[];for(const y of m)if(y?.blockerFn&&await y.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return Promise.resolve()}return c.replace?window.location.replace(p):window.location.href=p,Promise.resolve()}return this.buildAndCommitLocation({...c,href:o,to:r,_isNavigate:!0})},this.beforeLoad=()=>{this.cancelMatches(),this.updateLatestLocation();const r=this.matchRoutes(this.latestLocation),s=this.stores.cachedMatchesSnapshot.state.filter(o=>!r.some(u=>u.id===o.id));this.batch(()=>{this.stores.status.setState(()=>"pending"),this.stores.statusCode.setState(()=>200),this.stores.isLoading.setState(()=>!0),this.stores.location.setState(()=>this.latestLocation),this.stores.setPendingMatches(r),this.stores.setCachedMatches(s)})},this.load=async r=>{let s,o,u;const c=this.stores.resolvedLocation.state??this.stores.location.state;for(u=new Promise(p=>{this.startTransition(async()=>{try{this.beforeLoad();const m=this.latestLocation,y=this.stores.resolvedLocation.state,g=ci(m,y);this.stores.redirect.state||this.emit({type:"onBeforeNavigate",...g}),this.emit({type:"onBeforeLoad",...g}),await Ky({router:this,sync:r?.sync,forceStaleReload:c.href===m.href,matches:this.stores.pendingMatchesSnapshot.state,location:m,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{let b=null,_=null,S=null,A=null;this.batch(()=>{const R=this.stores.pendingMatchesSnapshot.state,x=R.length,M=this.stores.activeMatchesSnapshot.state;b=x?M.filter(J=>!this.stores.pendingMatchStoresById.has(J.id)):null;const N=new Set;for(const J of this.stores.pendingMatchStoresById.values())J.routeId&&N.add(J.routeId);const B=new Set;for(const J of this.stores.activeMatchStoresById.values())J.routeId&&B.add(J.routeId);_=x?M.filter(J=>!N.has(J.routeId)):null,S=x?R.filter(J=>!B.has(J.routeId)):null,A=x?R.filter(J=>B.has(J.routeId)):M,this.stores.isLoading.setState(()=>!1),this.stores.loadedAt.setState(()=>Date.now()),x&&(this.stores.setActiveMatches(R),this.stores.setPendingMatches([]),this.stores.setCachedMatches([...this.stores.cachedMatchesSnapshot.state,...b.filter(J=>J.status!=="error"&&J.status!=="notFound"&&J.status!=="redirected")]),this.clearExpiredCache())});for(const[R,x]of[[_,"onLeave"],[S,"onEnter"],[A,"onStay"]])if(R)for(const M of R)this.looseRoutesById[M.routeId].options[x]?.(M)})})}})}catch(m){sn(m)?(s=m,this.navigate({...s.options,replace:!0,ignoreBlocker:!0})):Dt(m)&&(o=m);const y=s?s.status:o?404:this.stores.activeMatchesSnapshot.state.some(g=>g.status==="error")?500:200;this.batch(()=>{this.stores.statusCode.setState(()=>y),this.stores.redirect.setState(()=>s)})}this.latestLoadPromise===u&&(this.commitLocationPromise?.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),p()})}),this.latestLoadPromise=u,await u;this.latestLoadPromise&&u!==this.latestLoadPromise;)await this.latestLoadPromise;let f;this.hasNotFoundMatch()?f=404:this.stores.activeMatchesSnapshot.state.some(p=>p.status==="error")&&(f=500),f!==void 0&&this.stores.statusCode.setState(()=>f)},this.startViewTransition=r=>{const s=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,s&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let o;if(typeof s=="object"&&this.isViewTransitionTypesSupported){const u=this.latestLocation,c=this.stores.resolvedLocation.state,f=typeof s.types=="function"?s.types(ci(u,c)):s.types;if(f===!1){r();return}o={update:r,types:f}}else o=r;document.startViewTransition(o)}else r()},this.updateMatch=(r,s)=>{this.startTransition(()=>
10{const o=this.stores.pendingMatchStoresById.get(r);if(o){o.setState(s);return}const u=this.stores.activeMatchStoresById.get(r);if(u){u.setState(s);return}const c=this.stores.cachedMatchStoresById.get(r);if(c){const f=s(c.state);f.status==="redirected"?this.stores.cachedMatchStoresById.delete(r)&&this.stores.cachedMatchesId.setState(p=>p.filter(m=>m!==r)):c.setState(()=>f)}})},this.getMatch=r=>this.stores.cachedMatchStoresById.get(r)?.state??this.stores.pendingMatchStoresById.get(r)?.state??this.stores.activeMatchStoresById.get(r)?.state,this.invalidate=r=>{const s=o=>r?.filter?.(o)??!0?{...o,invalid:!0,...r?.forcePending||o.status==="error"||o.status==="notFound"?{status:"pending",error:void 0}:void 0}:o;return this.batch(()=>{this.stores.setActiveMatches(this.stores.activeMatchesSnapshot.state.map(s)),this.stores.setCachedMatches(this.stores.cachedMatchesSnapshot.state.map(s)),this.stores.setPendingMatches(this.stores.pendingMatchesSnapshot.state.map(s))}),this.shouldViewTransition=!1,this.load({sync:r?.sync})},this.getParsedLocationHref=r=>r.publicHref||"/",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),u=this.getParsedLocationHref(o);r.options.href=u,r.headers.set("Location",u)}else if(s)try{const o=new URL(s);if(this.origin&&o.origin===this.origin){const u=o.pathname+o.search+o.hash;r.options.href=u,r.headers.set("Location",u)}}catch{}if(r.options.href&&!r.options._builtLocation&&Au(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=r?.filter;s!==void 0?this.stores.setCachedMatches(this.stores.cachedMatchesSnapshot.state.filter(o=>!s(o))):this.stores.setCachedMatches([])},this.clearExpiredCache=()=>{const r=Date.now(),s=o=>{const u=this.looseRoutesById[o.routeId];if(!u.options.loader)return!0;const c=(o.preload?u.options.preloadGcTime??this.options.defaultPreloadGcTime:u.options.gcTime??this.options.defaultGcTime)??300*1e3;return o.status==="error"?!0:r-o.updatedAt>=c};this.clearCache({filter:s})},this.loadRouteChunk=Lo,this.preloadRoute=async r=>{const s=r._builtLocation??this.buildLocation(r);let o=this.matchRoutes(s,{throwOnError:!0,preload:!0,dest:r});const u=new Set([...this.stores.matchesId.state,...this.stores.pendingMatchesId.state]),c=new Set([...u,...this.stores.cachedMatchesId.state]),f=o.filter(p=>!c.has(p.id));if(f.length){const p=this.stores.cachedMatchesSnapshot.state;this.stores.setCachedMatches([...p,...f])}try{return o=await Ky({router:this,matches:o,location:s,preload:!0,updateMatch:(p,m)=>{u.has(p)?o=o.map(y=>y.id===p?m(y):y):this.updateMatch(p,m)}}),o}catch(p){if(sn(p))return p.options.reloadDocument?void 0:await this.preloadRoute({...p.options,_fromLocation:s});Dt(p)||console.error(p);return}},this.matchRoute=(r,s)=>{const o={...r,to:r.to?this.resolvePathWithBase(r.from||"",r.to):void 0,params:r.params||{},leaveParams:!0},u=this.buildLocation(o);if(s?.pending&&this.stores.status.state!=="pending")return!1;const c=(s?.pending===void 0?!this.stores.isLoading.state:s.pending)?this.latestLocation:this.stores.resolvedLocation.state||this.stores.location.state,f=HS(u.pathname,s?.caseSensitive??!1,s?.fuzzy??!1,c.pathname,this.processedTree);return!f||r.params&&!an(f.rawParams,r.params,{partial:!0})?!1:s?.includeSearch??!0?an(c.search,u.search,{partial:!0})?f.rawParams:!1:f.rawParams},this.hasNotFoundMatch=()=>this.stores.activeMatchesSnapshot.state.some(r=>r.status==="notFound"||r.globalNotFound),this.getStoreConfig=e,this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...n,caseSensitive:n.caseSensitive??!1,notFoundMode:n.notFoundMode??"fuzzy",stringifySearch:n.stringifySearch??sE,parseSearch:n.parseSearch??aE,protocolAllowlist:n.protocolAllowlist??NS}),typeof document<"u"&&(self.__TSR_ROUTER__=this)}isShell(){return!!this.options.isShell}isPrerendering(){return!!this.options.isPrerendering}get state(){return this.stores.__store.state}setRoutes({routesById:n,routesByPath:e,processedTree:r}){this.routesById=n,this.routesByPath=e,this.processedTree=r;const s=this.options.notFoundRoute;s&&(s.init({originalIndex:99999999999}),this.routesById[s.id]=s)}get looseRoutesById(){return this.routesById}getParentContext(n){return n?.id?n.context??this.options.context??void 0:this.options.context??void 0}matchRoutesInternal(n,e){const r=this.getMatchedRoutes(n.pathname),{foundRoute:s,routeParam
10s:o,parsedParams:u}=r;let{matchedRoutes:c}=r,f=!1;(s?s.path!=="/"&&o["**"]:ma(n.pathname))&&(this.options.notFoundRoute?c=[...c,this.options.notFoundRoute]:f=!0);const p=f?OE(this.options.notFoundMode,c):void 0,m=new Array(c.length),y=new Map;for(const g of this.stores.activeMatchStoresById.values())g.routeId&&y.set(g.routeId,g.state);for(let g=0;g<c.length;g++){const b=c[g],_=m[g-1];let S,A,R;{const ye=_?.search??n.search,Je=_?._strictSearch??void 0;try{const Ue=Su(b.options.validateSearch,{...ye})??void 0;S={...ye,...Ue},A={...Je,...Ue},R=void 0}catch(Ue){let L=Ue;if(Ue instanceof Cu||(L=new Cu(Ue.message,{cause:Ue})),e?.throwOnError)throw L;S=ye,A={},R=L}}const x=b.options.loaderDeps?.({search:S})??"",M=x?JSON.stringify(x):"",{interpolatedPath:N,usedParams:B}=Iy({path:b.fullPath,params:o,decoder:this.pathParamsDecoder,server:this.isServer}),J=b.id+N+M,K=this.getMatch(J),I=y.get(b.id),F=K?._strictParams??B;let Q;if(!K)try{Qy(b,B,u,F)}catch(ye){if(Dt(ye)||sn(ye)?Q=ye:Q=new EE(ye.message,{cause:ye}),e?.throwOnError)throw Q}Object.assign(o,F);const he=I?"stay":"enter";let se;if(K)se={...K,cause:he,params:I?.params??o,_strictParams:F,search:Ya(I?I.search:K.search,S),_strictSearch:A};else{const ye=b.options.loader||b.options.beforeLoad||b.lazyFn||j0(b)?"pending":"success";se={id:J,ssr:b.options.ssr,index:g,routeId:b.id,params:I?.params??o,_strictParams:F,pathname:N,updatedAt:Date.now(),search:I?Ya(I.search,S):S,_strictSearch:A,searchError:void 0,status:ye,isFetching:!1,error:void 0,paramsError:Q,__routeC
10ontext:void 0,_nonReactive:{loadPromise:rs()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:he,loaderDeps:I?Xa(I.loaderDeps,x):x,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:b.options.staticData||{},fullPath:b.fullPath}}e?.preload||(se.globalNotFound=p===b.id),se.searchError=R;const _e=this.getParentContext(_);se.context={..._e,...se.__routeContext,...se.__beforeLoadContext},m[g]=se}for(let g=0;g<m.length;g++){const b=m[g],_=this.looseRoutesById[b.routeId],S=this.getMatch(b.id),A=y.get(b.routeId);if(b.params=A?Ya(A.params,o):o,!S){const R=m[g-1],x=this.getParentContext(R);if(_.options.context){const M={deps:b.loaderDeps,params:b.params,context:x??{},location:n,navigate:N=>this.navigate({...N,_fromLocation:n}),buildLocation:this.buildLocation,cause:b.cause,abortController:b.abortController,preload:!!b.preload,matches:m,routeId:_.id};b.__routeContext=_.options.context(M)??void 0}b.context={...x,...b.__routeContext,...b.__beforeLoadContext}}}return m}matchRoutesLightweight(n){const{matchedRoutes:e,routeParams:r,parsedParams:s}=this.getMatchedRoutes(n.pathname),o=No(e),u={...n.search};for(const y of e)try{Object.assign(u,Su(y.options.validateSearch,u))}catch{}const c=No(this.stores.matchesId.state),f=c&&this.stores.activeMatchStoresById.get(c)?.state,p=f&&f.routeId===o.id&&f.pathname===n.pathname;let m;if(p)m=f.params;else{const y=Object.assign(Object.create(null),r);for(const g of e)try{Qy(g,r,s??{},y)}catch{}m=y}return{matchedRoutes:e,fullPath:o.fullPath,search:u,params:m}}},Cu=class extends Error{},EE=class extends Error{};function TE(n){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:n,matches:[],statusCode:200}}function Su(n,e){if(n==null)return{};if("~standard"in n){const r=n["~standard"].validate(e);if(r instanceof Promise)throw new Cu("Async validation not supported");if(r.issues)throw new Cu(JSON.stringify(r.issues,void 0,2),{cause:r});return r.value}return"parse"in n?n.parse(e):typeof n=="function"?n(e):{}}function xE({pathname:n,routesById:e,processedTree:r}){const s=Object.create(null),o=ma(n);let u,c;const f=$S(o,r,!0);return f&&(u=f.route,Object.assign(s,f.rawParams),c=Object.assign(Object.create(null),f.parsedParams)),{matchedRoutes:f?.branch||[e.__root__],routeParams:s,foundRoute:u,parsedParams:c}}function RE({search:n,dest:e,destRoutes:r,_includeValidateSearch:s}){return AE(r)(n,e,s??!1)}function AE(n){const e={dest:null,_includeValidateSearch:!1,middlewares:[]};for(const o of n){if("search"in o.options)o.options.search?.middlewares&&e.middlewares.push(...o.options.search.middlewares);else if(o.options.preSearchFilters||o.options.postSearchFilters){const u=({search:c,next:f})=>{let p=c;"preSearchFilters"in o.options&&o.options.preSearchFilters&&(p=o.options.preSearchFilters.reduce((y,g)=>g(y),c));const m=f(p);return"postSearchFilters"in o.options&&o.options.postSearchFilters?o.options.postSearchFilters.reduce((y,g)=>g(y),m):m};e.middlewares.push(u)}if(o.options.validateSearch){const u=({search:c,next:f})=>{const p=f(c);if(!e._includeValidateSearch)return p;try{return{...p,...Su(o.options.validateSearch,p)??void 0}}catch{return p}};e.middlewares.push(u)}}const r=({search:o})=>{const u=e.dest;return u.search?u.search===!0?o:fa(u.search,o):{}};e.middlewares.push(r);const s=(o,u,c)=>{if(o>=c.length)return u;const f=c[o];return f({search:u,next:m=>s(o+1,m,c)})};return function(u,c,f){return e.dest=c,e._includeValidateSearch=f,s(0,u,e.middlewares)}}function OE(n,e){if(n!=="root")for(let r=e.length-1;r>=0;r--){const s=e[r];if(s.children)return s.id}return ts}function Qy(n,e,r,s){const o=n.options.params?.parse??n.options.parseParams;if(o)if(n.options.skipRouteOnParseError)for(const u in e)u in r&&(s[u]=r[u]);else{const u=o(s);Object.assign(s,u)}}var er=Symbol.for("TSR_DEFERRED_PROMISE");function kE(n,e){const r=n;return r[er]||(r[er]={status:"pending"},r.then(s=>{r[er].status="success",r[er].data=s}).catch(s=>{r[er].status="error",r[er].error={data:wE(s),__isServerError:!0}})),r}var CE="Error preloading route! ☝️";function Wy(n,e){if(n)return typeof n=="string"?n:n[e]}function jE(n){return typeof n=="string"?{href:n,crossOrigin:void 0}:n}var N0=class{get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(n){if(this.init=e=>{this.originalIndex=e.originalIndex;const r=this.options,s=!r?.path&&!r?.id;this.parentRoute=this.options.getParentRoute?.(),s?this._path=ts:this.parentRoute||on();let o=s?ts:r?.path;o&&o!=="/"&&(o=E0(o));const u=r?.id||o;let c=s?ts:_u([this.parentRoute.id==="__root__"?"":this.parentRoute.id,u]);o==="__root__"&&(o="/"),c!=="__root__"&&(c=_u(["/",c]));const f=c==="__root__"?"/":_u([this.parentRoute.fullPath,o]);this._path=o,this._id=c,this._fullPath=f,this._to=ma(f)},this.addChildren=e=>this._addFileChildren(e),this._addFileChildren=e=>(Array.isArray(e)&&(this.children=e),typeof e=="object"&&e!==null&&(this.children=Object.values(e)),this),this._addFileTypes=()=>this,this.updateLoader=e=>(Object.assign(this.options,e),this),this.update=e=>(Object.assign(this.options,e),this),this.lazy=e=>(this.lazyFn=e,this),this.redirect=e=>R0({from:this.fullPath,...e}),this.options=n||{},this.isRoot=!n?.getParentRoute,n?.id&&n?.path)throw new Error("Route cannot have both an 'id' and a 'path' option.")}},NE=class extends N0{constructor(n){super(n)}};function ME(n){if(typeof document<"u"&&document.querySelector){const e=n.stores.location.state,r=e.state.__hashScrollIntoViewOptions??!0;if(r&&e.hash!==""){const s=document.getElementById(e.hash);s&&s.scrollIntoView(r)}}}var DE=(n=>(n[n.AggregateError=1]="AggregateError",n[n.ArrowFunction=2]="ArrowFunction",n[n.ErrorPrototypeStack=4]="ErrorPrototypeStack",n[n.ObjectAssign=8]="Ob
10jectAssign",n[n.BigIntTypedArray=16]="BigIntTypedArray",n[n.RegExp=32]="RegExp",n))(DE||{}),Or=Symbol.asyncIterator,M0=Symbol.hasInstance,di=Symbol.isConcatSpreadable,kr=Symbol.iterator,D0=Symbol.match,L0=Symbol.matchAll,U0=Symbol.replace,z0=Symbol.search,B0=Symbol.species,P0=Symbol.split,I0=Symbol.toPrimitive,fi=Symbol.toStringTag,H0=Symbol.unscopables,$0={[Or]:0,[M0]:1,[di]:2,[kr]:3,[D0]:4,[L0]:5,[U0]:6,[z0]:7,[B0]:8,[P0]:9,[I0]:10,[fi]:11,[H0]:12},LE={0:Or,1:M0,2:di,3:kr,4:D0,5:L0,6:U0,7:z0,8:B0,9:P0,10:I0,11:fi,12:H0},E=void 0,UE={2:!0,3:!1,1:E,0:null,4:-0,5:Number.POSITIVE_INFINITY,6:Number.NEGATIVE_INFINITY,7:Number.NaN},zE={0:"Error",1:"EvalError",2:"RangeError",3:"ReferenceError",4:"SyntaxError",5:"TypeError",6:"URIError"},BE={0:Error,1:EvalError,2:RangeError,3:ReferenceError,4:SyntaxError,5:TypeError,6:URIError};function $e(n,e,r,s,o,u,c,f,p,m,y,g){return{t:n,i:e,s:r,c:s,m:o,p:u,e:c,a:f,f:p,b:m,o:y,l:g}}function _a(n){return $e(2,E,n,E,E,E,E,E,E,E,E,E)}var q0=_a(2),V0=_a(3),PE=_a(1),IE=_a(0),HE=_a(4),$E=_a(5),qE=_a(6),VE=_a(7);function GE(n){switch(n){case'"':return'\\"';case"\\":return"\\\\";case`
11`:return"\\n";case"\r":return"\\r";case"\b":return"\\b";case"	":return"\\t";case"\f":return"\\f";case"<":return"\\x3C";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:return E}}function wa(n){let e="",r=0,s;for(let o=0,u=n.length;o<u;o++)s=GE(n[o]),s&&(e+=n.slice(r,o)+s,r=o+1);return r===0?e=n:e+=n.slice(r),e}function YE(n){switch(n){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 n}}function ss(n){return n.replace(/(\\\\|\\"|\\n|\\r|\\b|\\t|\\f|\\u2028|\\u2029|\\x3C)/g,YE)}var lu="__SEROVAL_REFS__",G0=new Map,li=new Map;function Y0(n){return G0.has(n)}function KE(n){return li.has(n)}function ZE(n){if(Y0(n))return G0.get(n);throw new x1(n)}function JE(n){if(KE(n))return li.get(n);throw new R1(n)}typeof globalThis<"u"?Object.defineProperty(globalThis,lu,{value:li,configurable:!0,writable:!1,enumerable:!1}):typeof window<"u"?Object.defineProperty(window,lu,{value:li,configurable:!0,writable:!1,enumerable:!1}):typeof self<"u"?Object.defineProperty(self,lu,{value:li,configurable:!0,writable:!1,enumerable:!1}):typeof global<"u"&&Object.defineProperty(global,lu,{value:li,configurable:!0,writable:!1,enumerable:!1});function Eh(n){return n instanceof EvalError?1:n instanceof RangeError?2:n instanceof ReferenceError?3:n instanceof SyntaxError?4:n instanceof TypeError?5:n instanceof URIError?6:0}function XE(n){let e=zE[Eh(n)];return n.name!==e?{name:n.name}:n.constructor.name!==e?{name:n.constructor.name}:{}}function K0(n,e){let r=XE(n),s=Object.getOwnPropertyNames(n);for(let o=0,u=s.length,c;o<u;o++)c=s[o],c!=="name"&&c!=="message"&&(c==="stack"?e&4&&(r=r||{},r[c]=n[c]):(r=r||{},r[c]=n[c]));return r}function Z0(n){return Object.isFrozen(n)?3:Object.isSealed(n)?2:Object.isExtensible(n)?0:1}function FE(n){switch(n){case Number.POSITIVE_INFINITY:return $E;case Number.NEGATIVE_INFINITY:return qE}return n!==n?VE:Object.is(n,-0)?HE:$e(0,E,n,E,E,E,E,E,E,E,E,E)}function J0(n){return $e(1,E,wa(n),E,E,E,E,E,E,E,E,E)}function QE(n){return $e(3,E,""+n,E,E,E,E,E,E,E,E,E)}function WE(n){return $e(4,n,E,E,E,E,E,E,E,E,E,E)}function e1(n,e){let r=e.valueOf();return $e(5,n,r!==r?"":e.toISOString(),E,E,E,E,E,E,E,E,E)}function t1(n,e){return $e(6,n,E,wa(e.source),e.flags,E,E,E,E,E,E,E)}function n1(n,e){return $e(17,n,$0[e],E,E,E,E,E,E,E,E,E)}function r1(n,e){return $e(18,n,wa(ZE(e)),E,E,E,E,E,E,E,E,E)}function a1(n,e,r){return $e(25,n,r,wa(e),E,E,E,E,E,E,E,E)}function s1(n,e,r){return $e(9,n,E,E,E,E,E,r,E,E,Z0(e),E)}function i1(n,e){return $e(21,n,E,E,E,E,E,E,e,E,E,E)}function o1(n,e,r){return $e(15,n,E,e.constructor.name,E,E,E,E,r,e.byteOffset,E,e.length)}function l1(n,e,r){return $e(16,n,E,e.constructor.name,E,E,E,E,r,e.byteOffset,E,e.byteLength)}function u1(n,e,r){return $e(20,n,E,E,E,E,E,E,r,e.byteOffset,E,e.byteLength)}function c1(n,e,r){return $e(13,n,Eh(e),E,wa(e.message),r,E,E,E,E,E,E)}function d1(n,e,r){return $e(14,n,Eh(e),E,wa(e.message),r,E,E,E,E,E,E)}function f1(n,e){return $e(7,n,E,E,E,E,E,e,E,E,E,E)}function h1(n,e){return $e(28,E,E,E,E,E,E,[n,e],E,E,E,E)}function p1(n,e){return $e(30,E,E,E,E,E,E,[n,e],E,E,E,E)}function m1(n,e,r){return $e(31,n,E,E,E,E,E,r,e,E,E,E)}function g1(n,e){return $e(32,n,E,E,E,E,E,E,e,E,E,E)}function y1(n,e){return $e(33,n,E,E,E,E,E,E,e,E,E,E)}function v1(n,e){return $e(34,n,E,E,E,E,E,E,e,E,E,E)}function b1(n,e,r,s){return $e(35,n,r,E,E,E,E,e,E,E,E,s)}
12var _1={parsing:1,serialization:2,deserialization:3};function w1(n){return`Seroval Error (step: ${_1[n]})`}var S1=(n,e)=>w1(n),X0=class extends Error{constructor(n,e){super(S1(n)),this.cause=e}},ev=class extends X0{constructor(n){super("parsing",n)}},E1=class extends X0{constructor(n){super("deserialization",n)}};function jr(n){return`Seroval Error (specific: ${n})`}var Ju=class extends Error{constructor(e){super(jr(1)),this.value=e}},F0=class extends Error{constructor(e){super(jr(2))}},T1=class extends Error{constructor(n){super(jr(3))}},Yo=class extends Error{constructor(n){super(jr(4))}},x1=class extends Error{constructor(n){super(jr(5)),this.value=n}},R1=class extends Error{constructor(n){super(jr(6))}},A1=class extends Error{constructor(n){super(jr(7))}},Sa=class extends Error{constructor(n){super(jr(8))}},O1=class extends Error{constructor(e){super(jr(9))}},k1=class{constructor(n,e){this.value=n,this.replacement=e}},Xu=()=>{let n={p:0,s:0,f:0};return n.p=new Promise((e,r)=>{n.s=e,n.f=r}),n},C1=(n,e)=>{n.s(e),n.p.s=1,n.p.v=e},j1=(n,e)=>{n.f(e),n.p.s=2,n.p.v=e};Xu.toString();C1.toString();j1.toString();var N1=()=>{let n=[],e=[],r=!0,s=!1,o=0,u=(p,m,y)=>{for(y=0;y<o;y++)e[y]&&e[y][m](p)},c=(p,m,y,g)=>{for(m=0,y=n.length;m<y;m++)g=n[m],!r&&m===y-1?p[s?"return":"throw"](g):p.next(g)},f=(p,m)=>(r&&(m=o++,e[m]=p),c(p),()=>{r&&(e[m]=e[o],e[o--]=void 0)});return{__SEROVAL_STREAM__:!0,on:p=>f(p),next:p=>{r&&(n.push(p),u(p,"next"))},throw:p=>{r&&(n.push(p),u(p,"throw"),r=!1,s=!1,e.length=0)},return:p=>{r&&(n.push(p),u(p,"return"),r=!1,s=!0,e.length=0)}}},M1=n=>e=>()=>{let r=0,s={[n]:()=>s,next:()=>{if(r>e.d)return{done:!0,value:void 0};let o=r++,u=e.v[o];if(o===e.t)throw u;return{done:o===e.d,value:u}}};return s},D1=(n,e)=>r=>()=>{let s=0,o=-1,u=!1,c=[],f=[],p=(y=0,g=f.length)=>{for(;y<g;y++)f[y].s({done:!0,value:void 0})};r.on({next:y=>{let g=f.shift();g&&g.s({done:!1,value:y}),c.push(y)},throw:y=>{let g=f.shift();g&&g.f(y),p(),o=c.length,u=!0,c.push(y)},return:y=>{let g=f.shift();g&&g.s({done:!0,value:y}),p(),o=c.length,c.push(y)}});let m={[n]:()=>m,next:()=>{if(o===-1){let b=s++;if(b>=c.length){let _=e();return f.push(_),_.p}return{done:!1,value:c[b]}}if(s>o)return{done:!0,value:void 0};let y=s++,g=c[y];if(y!==o)return{done:!1,value:g};if(u)throw g;return{done:!0,value:g}}};return m},Q0=n=>{let e=atob(n),r=e.length,s=new Uint8Array(r);for(let o=0;o<r;o++)s[o]=e.charCodeAt(o);return s.buffer};Q0.toString();function L1(n){return"__SEROVAL_SEQUENCE__"in n}function W0(n,e,r){return{__SEROVAL_SEQUENCE__:!0,v:n,t:e,d:r}}function U1(n){let e=[],r=-1,s=-1,o=n[kr]();for(;;)try{let u=o.next();if(e.push(u.value),u.done){s=e.length-1;break}}catch(u){r=e.length,e.push(u)}return W0(e,r,s)}var z1=M1(kr);function B1(n){return z1(n)}var P1={},I1={},H1={0:{},1:{},2:{},3:{},4:{},5:{}};function Fu(n){return"__SEROVAL_STREAM__"in n}function is(){return N1()}function $1(n){let e=is(),r=n[Or]();async function s(){try{let o=await r.next();o.done?e.return(o.value):(e.next(o.value),await s())}catch(o){e.throw(o)}}return s().catch(()=>{}),e}var q1=D1(Or,Xu);function V1(n){return q1(n)}async function G1(n){try{return[1,await n]}catch(e){return[0,e]}}function Y1(n,e){return{plugins:e.plugins,mode:n,marked:new Set,features:63^(e.disabledFeatures||0),refs:e.refs||new Map,depthLimit:e.depthLimit||1e3}}function Eu(n,e){n.marked.add(e)}function K1(n,e){let r=n.refs.size;return n.refs.set(e,r),r}function Qu(n,e){let r=n.refs.get(e);return r!=null?(Eu(n,r),{type:1,value:WE(r)}):{type:0,value:K1(n,e)}}function Th(n,e){let r=Qu(n,e);return r.type===1?r:Y0(e)?{type:2,value:r1(r.value,e)}:r}function Wa(n,e){let r=Th(n,e);if(r.type!==0)return r.value;if(e in $0)return n1(r.value,e);throw new Ju(e)}function Wu(n,e){let r=Qu(n,H1[e]);return r.type===1?r.value:$e(26,r.value,e,E,E,E,E,E,E,E,E,E)}function Z1(n){let e=Qu(n,P1);return e.type===1?e.value:$e(27,e.value,E,E,E,E,E,E,Wa(n,kr),E,E,E)}function J1(n){let e=Qu(n,I1);return e.type===1?e.value:$e(29,e.value,E,E,E,E,E,[Wu(n,1),Wa(n,Or)],E,E,E,E)}function X1(n,e,r,s){return $e(r?11:10,n,E,E,E,s,E,E,E,E,Z0(e),E)}function F1(n,e,r,s){return $e(8,e,E,E,E,E,{k:r,v:s},E,Wu(n,0),E,E,E)}function Q1(n,e,r){let s=new Uint8Array(r),o="";for(let u=0,c=s.length;u<c;u++)o+=String.fromCharCode(s[u]);return $e(19,e,wa(btoa(o)),E,E,E,E,E,Wu(n,5),E,E,E)}function W1(n,e){return{base:Y1(n,e),child:void 0}}var eT=class{constructor(n,e){this._p=n,this.depth=e}parse(n){return bt(this._p,this.depth,n)}};async function tT(n,e,r){let s=[];for(let o=0,u=r.length;o<u;o++)o in r?s[o]=await bt(n,e,r[o]):s[o]=0;return s}async function nT(n,e,r,s){return s1(r,s,await tT(n,e,s))}async function xh(n,e,r){let s=Object.entries(r),o=[],u=[];for(let c=0,f=s.length;c<f;c++)o.push(wa(s[c][0])),u.push(await bt(n,e,s[c][1]));return kr in r&&(o.push(Wa(n.base,kr)),u.push(h1(Z1(n.base),await bt(n,e,U1(r))))),Or in r&&(o.push(Wa(n.base,Or)),u.push(p1(J1(n.base),await bt(n,e,$1(r))))),fi in r&&(o.push(Wa(n.base,fi)),u.push(J0(r[fi]))),di in r&&(o.push(Wa(n.base,di)),u.push(r[di]?q0:V0)),{k:o,v:u}}async function Cf(n,e,r,s,o){return X1(r,s,o,await xh(n,e,s))}async function rT(n,e,r,s){return i1(r,await bt(n,e,s.valueOf()))}async function aT(n,e,r,s){return o1(r,s,await bt(n,e,s.buffer))}async function sT(n,e,r,s){return l1(r,s,await bt(n,e,s.buffer))}async function iT(n,e,r,s){return u1(r,s,await bt(n,e,s.buffer))}async function tv(n,e,r,s){let o=K0(s,n.base.features);return c1(r,s,o?await xh(n,e,o):E)}async function oT(n,e,r,s){let o=K0(s,n.base.features);return d1(r,s,o?await xh(n,e,o):E)}async function lT(n,e,r,s){let o=[],u=[];for(let[c,f]of s.entries())o.push(await bt(n,e,c)),u.push(await bt(n,e,f));return F1(n.base,r,o,u)}async function uT(n,e,r,s){let o=[];for(let u of s.keys())o.push(await bt(n,e,u));return f1(r,o)}async function eb(n,e,r,s){let o=n.base.plugins;if(o)for(let u=0,c=o.length;u<c;u++){let f=o[u];if(f.parse.async&&f.test(s))return a1(r,f.tag,await f.parse.async(s,new eT(n,e),{id:r}))}return E}async function cT(n,e,r,s){let[o,u]=await G1(s);return $e(12,r,o,E,E,E,E,E,await bt(n,e,u),E,E,E)}function dT(n,e,r,s,o){let u=[],c=r.on({next:f=>{Eu(this.base,e),bt(this,n,f).then(p=>{u.push(g1(e,p))},p=>{o(p),c()})},throw:f=>{Eu(this.base,e),bt(this,n,f).then(p=>{u.push(y1(e,p)),s(u),c()},p=>{o(p),c()})},return:f=>{Eu(this.base,e),bt(this,n,f).then(p=>{u.push(v1(e,p)),s(u),c()},p=>{o(p),c()})}})}async function fT(n,e,r,s){return m1(r,Wu(n.base,4),await new Promise(dT.bind(n,e,r,s)))}async function hT(n,e,r,s){let o=[];for(let u=0,c=s.v.length;u<c;u++)o[u]=await bt(n,e,s.v[u]);return b1(r,o,s.t,s.d)}async function pT(n,e,r,s){if(Array.isArray(s))return nT(n,e,r,s);if(Fu(s))return fT(n,e,r,s);if(L1(s))return hT(n,e,r,s);let o=s.constructor;if(o===k1)return bt(n,e,s.replacement);let u=await eb(n,e,r,s);if(u)return u;switch(o){case Object:return Cf(n,e,r,s,!1);case E:return Cf(n,e,r,s,!0);case Date:return e1(r,s);case Error:case EvalError:case RangeError:case ReferenceError:case SyntaxError:case TypeError:case URIError:return tv(n,e,r,s);case Number:case Boolean:case String:case BigInt:return rT(n,e,r,s);case ArrayBuffer:return Q1(n.base,r,s);case Int8Array:case Int16Array:case Int32Array:case Uint8Array:case Uint16Array:case Uint32Array:case Uint8ClampedArray:case Float32Array:case Float64Array:return aT(n,e,r,s);case DataView:return iT(n,e,r,s);case Map:return lT(n,e,r,s);case Set:return uT(n,e,r,s)}if(o===Promise||s instanceof Promise)return cT(n,e,r,s);let c=n.base.features;if(c&32&&o===RegExp)return t1(r,s);if(c&16)switch(o){case BigInt64Array:case BigUint64Array:return sT(n,e,r,s)}if(c&1&&typeof AggregateError<"u"&&(o===AggregateError||s instanceof AggregateError))return oT(n,e,r,s);if(s instanceof Error)return tv(n,e,r,s);if(kr in s||Or in s)return Cf(n,e,r,s,!!o);throw new Ju(s)}async function mT(n,e,r){let s=Th(n.base,r);if(s.type!==0)return s.value;let o=await eb(n,e,s.value,r);if(o)return o;throw new Ju(r)}async function bt(n,e,r){switch(typeof r){case"boolean":return r?q0:V0;case"undefined":return PE;case"string":return J0(r);case"number":return FE(r);case"bigint":return QE(r);case"object":{if(r){let s=Th(n.base,r);return s.type===0?await pT(n,e+1,s.value,r):s.value}return IE}case"symbol":return Wa(n.base,r);case"function":return mT(n,e,r);default:throw new Ju(r)}}async function gT(n,e){try{return await bt(n,0,e)}catch(r){throw r instanceof ev?r:new ev(r)}}var yT=(n=>(n[n.Vanilla=1]="Vanilla",n[n.Cross=2]="Cross",n))(yT||{});function tb(n,e){for(let r=0,s=e.length;r<s;r++){let o=e[r];
12n.has(o)||(n.add(o),o.extends&&tb(n,o.extends))}}function nb(n){if(n){let e=new Set;return tb(e,n),[...e]}}function vT(n){switch(n){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 A1(n)}}var bT=1e6,_T=1e4,wT=2e4;function rb(n,e){switch(e){case 3:return Object.freeze(n);case 1:return Object.preventExtensions(n);case 2:return Object.seal(n);default:return n}}var ST=1e3;function ET(n,e){var r;return{mode:n,plugins:e.plugins,refs:e.refs||new Map,features:(r=e.features)!=null?r:63^(e.disabledFeatures||0),depthLimit:e.depthLimit||ST}}function TT(n){return{mode:2,base:ET(2,n),child:E}}var xT=class{constructor(n,e){this._p=n,this.depth=e}deserialize(n){return Fe(this._p,this.depth,n)}};function ab(n,e){if(e<0||!Number.isFinite(e)||!Number.isInteger(e))throw new Sa({t:4,i:e});if(n.refs.has(e))throw new Error("Conflicted ref id: "+e)}function RT(n,e,r){return ab(n.base,e),n.state.marked.has(e)&&n.base.refs.set(e,r),r}function AT(n,e,r){return ab(n.base,e),n.base.refs.set(e,r),r}function _t(n,e,r){return n.mode===1?RT(n,e,r):AT(n,e,r)}function Jf(n,e,r){if(Object.hasOwn(e,r))return e[r];throw new Sa(n)}function OT(n,e){return _t(n,e.i,JE(ss(e.s)))}function kT(n,e,r){let s=r.a,o=s.length,u=_t(n,r.i,new Array(o));for(let c=0,f;c<o;c++)f=s[c],f&&(u[c]=Fe(n,e,f));return rb(u,r.o),u}function CT(n){switch(n){case"constructor":case"__proto__":case"prototype":case"__defineGetter__":case"__defineSetter__":case"__lookupGetter__":case"__lookupSetter__":return!1;default:return!0}}function jT(n){switch(n){case Or:case di:case fi:case kr:return!0;default:return!1}}function nv(n,e,r){CT(e)?n[e]=r:Object.defineProperty(n,e,{value:r,configurable:!0,enumerable:!0,writable:!0})}function NT(n,e,r,s,o){if(typeof s=="string")nv(r,s,Fe(n,e,o));else{let u=Fe(n,e,s);switch(typeof u){case"string":nv(r,u,Fe(n,e,o));break;case"symbol":jT(u)&&(r[u]=Fe(n,e,o));break;default:throw new Sa(s)}}}function sb(n,e,r,s){let o=r.k;if(o.length>0)for(let u=0,c=r.v,f=o.length;u<f;u++)NT(n,e,s,o[u],c[u]);return s}function MT(n,e,r){let s=_t(n,r.i,r.t===10?{}:Object.create(null));return sb(n,e,r.p,s),rb(s,r.o),s}function DT(n,e){return _t(n,e.i,new Date(e.s))}function LT(n,e){if(n.base.features&32){let r=ss(e.c);if(r.length>wT)throw new Sa(e);return _t(n,e.i,new RegExp(r,e.m))}throw new F0(e)}function UT(n,e,r){let s=_t(n,r.i,new Set);for(let o=0,u=r.a,c=u.length;o<c;o++)s.add(Fe(n,e,u[o]));return s}function zT(n,e,r){let s=_t(n,r.i,new Map);for(let o=0,u=r.e.k,c=r.e.v,f=u.length;o<f;o++)s.set(Fe(n,e,u[o]),Fe(n,e,c[o]));return s}function BT(n,e){if(e.s.length>bT)throw new Sa(e);return _t(n,e.i,Q0(ss(e.s)))}function PT(n,e,r){var s;let o=vT(r.c),u=Fe(n,e,r.f),c=(s=r.b)!=null?s:0;if(c<0||c>u.byteLength)throw new Sa(r);return _t(n,r.i,new o(u,c,r.l))}function IT(n,e,r){var s;let o=Fe(n,e,r.f),u=(s=r.b)!=null?s:0;if(u<0||u>o.byteLength)throw new Sa(r);return _t(n,r.i,new DataView(o,u,r.l))}function ib(n,e,r,s){if(r.p){let o=sb(n,e,r.p,{});Object.defineProperties(s,Object.getOwnPropertyDescriptors(o))}return s}function HT(n,e,r){let s=_t(n,r.i,new AggregateError([],ss(r.m)));return ib(n,e,r,s)}function $T(n,e,r){let s=Jf(r,BE,r.s),o=_t(n,r.i,new s(ss(r.m)));return ib(n,e,r,o)}function qT(n,e,r){let s=Xu(),o=_t(n,r.i,s.p),u=Fe(n,e,r.f);return r.s?s.s(u):s.f(u),o}function VT(n,e,r){return _t(n,r.i,Object(Fe(n,e,r.f)))}function GT(n,e,r){let s=n.base.plugins;if(s){let o=ss(r.c);for(let u=0,c=s.length;u<c;u++){let f=s[u];if(f.tag===o)return _t(n,r.i,f.deserialize(r.s,new xT(n,e),{id:r.i}))}}throw new T1(r.c)}function YT(n,e){return _t(n,e.i,_t(n,e.s,Xu()).p)}function KT(n,e,r){let s=n.base.refs.get(r.i);if(s)return s.s(Fe(n,e,r.a[1])),E;throw new Yo("Promise")}function ZT(n,e,r){let s=n.base.refs.get(r.i);if(s)return s.f(Fe(n,e,r.a[1])),E;throw new Yo("Promise")}function JT(n,e,r){Fe(n,e,r.a[0]);let s=Fe(n,e,r.a[1]);return B1(s)}function XT(n,e,r){Fe(n,e,r.a[0]);let s=Fe(n,e,r.a[1]);return V1(s)}function FT(n,e,r){let s=_t(n,r.i,is()),o=r.a,u=o.length;if(u)for(let c=0;c<u;c++)Fe(n,e,o[c]);return s}function QT(n,e,r){let s=n.base.refs.get(r.i);if(s&&Fu(s))return s.next(Fe(n,e,r.f)),E;throw new Yo("Stream")}function WT(n,e,r){let s=n.base.refs.get(r.i);if(s&&Fu(s))return s.throw(Fe(n,e,r.f)),E;throw new Yo("Stream")}function ex(n,e,r){let s=n.base.refs.get(r.i);if(s&&Fu(s))return s.return(Fe(n,e,r.f)),E;throw new Yo("Stream")}function tx(n,e,r){return Fe(n,e,r.f),E}function nx(n,e,r){return Fe(n,e,r.a[1]),E}function rx(n,e,r){let s=_t(n,r.i,W0([],r.s,r.l));for(let o=0,u=r.a.length;o<u;o++)s.v[o]=Fe(n,e,r.a[o]);return s}function Fe(n,e,r){if(e>n.base.depthLimit)throw new O1(n.base.depthLimit);switch(e+=1,r.t){case 2:return Jf(r,UE,r.s);case 0:return Number(r.s);case 1:return ss(String(r.s));case 3:if(String(r.s).length>_T)throw new Sa(r);return BigInt(r.s);case 4:return n.base.refs.get(r.i);
12case 18:return OT(n,r);case 9:return kT(n,e,r);case 10:case 11:return MT(n,e,r);case 5:return DT(n,r);case 6:return LT(n,r);case 7:return UT(n,e,r);case 8:return zT(n,e,r);case 19:return BT(n,r);case 16:case 15:return PT(n,e,r);case 20:return IT(n,e,r);case 14:return HT(n,e,r);case 13:return $T(n,e,r);case 12:return qT(n,e,r);case 17:return Jf(r,LE,r.s);case 21:return VT(n,e,r);case 25:return GT(n,e,r);case 22:return YT(n,r);case 23:return KT(n,e,r);case 24:return ZT(n,e,r);case 28:return JT(n,e,r);case 30:return XT(n,e,r);case 31:return FT(n,e,r);case 32:return QT(n,e,r);case 33:return WT(n,e,r);case 34:return ex(n,e,r);case 27:return tx(n,e,r);case 29:return nx(n,e,r);case 35:return rx(n,e,r);default:throw new F0(r)}}function ax(n,e){try{return Fe(n,0,e)}catch(r){throw new E1(r)}}var sx=()=>T;sx.toString();function jf(n,e){let r=nb(e.plugins),s=TT({plugins:r,refs:e.refs,features:e.features,disabledFeatures:e.disabledFeatures,depthLimit:e.depthLimit});return ax(s,n)}async function ix(n,e={}){let r=nb(e.plugins),s=W1(1,{plugins:r,disabledFeatures:e.disabledFeatures});return{t:await gT(s,n),f:s.base.features,m:Array.from(s.base.marked)}}function ox(n){return{tag:"$TSR/t/"+n.key,test:n.test,parse:{sync(e,r){return r.parse(n.toSerializable(e))},async async(e,r){return await r.parse(n.toSerializable(e))},stream(e,r){return r.parse(n.toSerializable(e))}},serialize:void 0,deserialize(e,r){return n.fromSerializable(r.deserialize(e))}}}var lx=class{constructor(n,e){this.stream=n,this.hint=e?.hint??"binary"}},ju=globalThis.Buffer,ob=!!ju&&typeof ju.from=="function";function lb(n){if(n.length===0)return"";if(ob)return ju.from(n).toString("base64");const e=32768,r=[];for(let s=0;s<n.length;s+=e){const o=n.subarray(s,s+e);r.push(String.fromCharCode.apply(null,o))}return btoa(r.join(""))}function ub(n){if(n.length===0)return new Uint8Array(0);if(ob){const s=ju.from(n,"base64");return new Uint8Array(s.buffer,s.byteOffset,s.byteLength)}const e=atob(n),r=new Uint8Array(e.length);for(let s=0;s<e.length;s++)r[s]=e.charCodeAt(s);return r}var _o=Object.create(null),wo=Object.create(null),ux=n=>new ReadableStream({start(e){n.on({next(r){try{e.enqueue(ub(r))}catch{}},throw(r){e.error(r)},return(){try{e.close()}catch{}}})}}),cx=new TextEncoder,dx=n=>new ReadableStream({start(e){n.on({next(r){try{typeof r=="string"?e.enqueue(cx.encode(r)):e.enqueue(ub(r.$b64))}catch{}},throw(r){e.error(r)},return(){try{e.close()}catch{}}})}}),fx="(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(_){}}})}}))",hx="(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 rv(n){const e=is(),r=n.getReader();return(async()=>{try{for(;;){const{done:s,value:o}=await r.read();if(s){e.return(void 0);break}e.next(lb(o))}}catch(s){e.throw(s)}finally{r.releaseLock()}})(),e}function av(n){const e=is(),r=n.getReader(),s=new TextDecoder("utf-8",{fatal:!0});return(async()=>{try{for(;;){const{done:o,value:u}=await r.read();if(o){try{const c=s.decode();c.length>0&&e.next(c)}catch{}e.return(void 0);break}try{const c=s.decode(u,{stream:!0});c.length>0&&e.next(c)}catch{e.next({$b64:lb(u)})}}}catch(o){e.throw(o)}finally{r.releaseLock()}})(),e}var px={tag:"tss/RawStream",extends:[{tag:"tss/RawStreamFactory",test(n){return n===_o},parse:{sync(){},async(){return Promise.resolve(void 0)},stream(){}},serialize(){return fx},deserialize(){return _o}},{tag:"tss/RawStreamFactoryText",test(n){return n===wo},parse:{sync(){},async(){return Promise.resolve(void 0)},stream(){}},serialize(){return hx},deserialize(){return wo}}],test(n){return n instanceof lx},parse:{sync(n,e){const r=n.hint==="text"?wo:_o;return{hint:n.hint,factory:e.parse(r),stream:e.parse(is())}},async async(n,e){const r=n.hint==="text"?wo:_o,s=n.hint==="text"?av(n.stream):rv(n.stream);return{hint:n.hint,factory:await e.parse(r),stream:await e.parse(s)}},stream(n,e){const r=n.hint==="text"?wo:_o,s=n.hint==="text"?av(n.stream):rv(n.stream);return{hint:n.hint,factory:e.parse(r),stream:e.parse(s)}}},serialize(n,e){return"("+e.serialize(n.factory)+")("+e.serialize(n.stream)+")"},deserialize(n,e){const r=e.deserialize(n.stream);return n.hint==="text"?dx(r):ux(r)}};function mx(n){return{tag:"tss/RawStream",test:()=>!1,parse:{}
12,serialize(){throw new Error("RawStreamDeserializePlugin.serialize should not be called. Client only deserializes.")},deserialize(e){return n(e.streamId)}}}var gx={tag:"$TSR/Error",test(n){return n instanceof Error},parse:{sync(n,e){return{message:e.parse(n.message)}},async async(n,e){return{message:await e.parse(n.message)}},stream(n,e){return{message:e.parse(n.message)}}},serialize(n,e){return"new Error("+e.serialize(n.message)+")"},deserialize(n,e){return new Error(e.deserialize(n.message))}},ua={},cb=n=>new ReadableStream({start:e=>{n.on({next:r=>{try{e.enqueue(r)}catch{}},throw:r=>{e.error(r)},return:()=>{try{e.close()}catch{}}})}}),yx={tag:"seroval-plugins/web/ReadableStreamFactory",test(n){return n===ua},parse:{sync(){return ua},async async(){return await Promise.resolve(ua)},stream(){return ua}},serialize(){return cb.toString()},deserialize(){return ua}};function sv(n){let e=is(),r=n.getReader();async function s(){try{let o=await r.read();o.done?e.return(o.value):(e.next(o.value),await s())}catch(o){e.throw(o)}}return s().catch(()=>{}),e}var vx={tag:"seroval/plugins/web/ReadableStream",extends:[yx],test(n){return typeof ReadableStream>"u"?!1:n instanceof ReadableStream},parse:{sync(n,e){return{factory:e.parse(ua),stream:e.parse(is())}},async async(n,e){return{factory:await e.parse(ua),stream:await e.parse(sv(n))}},stream(n,e){return{factory:e.parse(ua),stream:e.parse(sv(n))}}},serialize(n,e){return"("+e.serialize(n.factory)+")("+e.serialize(n.stream)+")"},deserialize(n,e){let r=e.deserialize(n.stream);return cb(r)}},bx=vx,_x=[gx,px,bx];function wx(){return[...b0()?.serializationAdapters?.map(ox)??[],..._x]}var iv=new TextDecoder,Sx=new Uint8Array(0),ov=16*1024*1024,lv=32*1024*1024,uv=1024,cv=1e5;function Ex(n){const e=new Map,r=new Map,s=new Set;let o=!1,u=null,c=0,f;const p=new ReadableStream({start(g){f=g},cancel(){o=!0;try{u?.cancel()}catch{}e.forEach(g=>{try{g.error(new Error("Framed response cancelled"))}catch{}}),e.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>=uv)throw new Error(`Too many raw streams in framed response (max ${uv})`);const _=new ReadableStream({start(S){e.set(g,S)},cancel(){s.add(g),e.delete(g),r.delete(g)}});return r.set(g,_),_}function y(g){return m(g),e.get(g)}return(async()=>{const g=n.getReader();u=g;const b=[];let _=0;function S(){if(_<9)return null;const R=b[0];if(R.length>=9)return{type:R[0],streamId:(R[1]<<24|R[2]<<16|R[3]<<8|R[4])>>>0,length:(R[5]<<24|R[6]<<16|R[7]<<8|R[8])>>>0};const x=new Uint8Array(9);let M=0,N=9;for(let B=0;B<b.length&&N>0;B++){const J=b[B],K=Math.min(J.length,N);x.set(J.subarray(0,K),M),M+=K,N-=K}return{type:x[0],streamId:(x[1]<<24|x[2]<<16|x[3]<<8|x[4])>>>0,length:(x[5]<<24|x[6]<<16|x[7]<<8|x[8])>>>0}}function A(R){if(R===0)return Sx;const x=new Uint8Array(R);let M=0,N=R;for(;N>0&&b.length>0;){const B=b[0];if(!B)break;const J=Math.min(B.length,N);x.set(B.subarray(0,J),M),M+=J,N-=J,J===B.length?b.shift():b[0]=B.subarray(J)}return _-=R,x}try{for(;;){const{done:R,value:x}=await g.read();if(o||R)break;if(x){if(_+x.length>lv)throw new Error(`Framed response buffer exceeded ${lv} bytes`);for(b.push(x),_+=x.length;;){const M=S();if(!M)break;const{type:N,streamId:B,length:J}=M;if(N!==Tr.JSON&&N!==Tr.CHUNK&&N!==Tr.END&&N!==Tr.ERROR)throw new Error(`Unknown frame type: ${N}`);if(N===Tr.JSON){if(B!==0)throw new Error("Invalid JSON frame streamId (expected 0)")}else if(B===0)throw new Error("Invalid raw frame streamId (expected non-zero)");if(J>ov)throw new Error(`Frame payload too large: ${J} bytes (max ${ov})`);const K=9+J;if(_<K)break;if(++c>cv)throw new Error(`Too many frames in framed response (max ${cv})`);A(9);const I=A(J);switch(N){case Tr.JSON:try{f.enqueue(iv.decode(I))}catch{}break;case Tr.CHUNK:{const F=y(B);F&&F.enqueue(I);break}case Tr.END:{const F=y(B);if(s.add(B),F){try{F.close()}catch{}e.delete(B)}break}case Tr.ERROR:{const F=y(B);if(s.add(B),F){const Q=iv.decode(I);F.error(new Error(Q)),e.delete(B)}break}}}}}if(_!==0)throw new Error("Incomplete frame at end of framed response");try{f.close()}catch{}e.forEach(R=>{try{R.close()}catch{}}),e.clear()}catch(R){try{f.error(R)}catch{}e.forEach(x=>{try{x.error(R)}catch{}}),e.clear()}finally{try{g.releaseLock()}catch{}u=null}})(),{getOrCreateStream:m,jsonChunks:p}}var hi=null,Tx=Object.prototype.hasOwnProperty;function db(n){for(const e in n)if(Tx.call(n,e))return!0;return!1}async function xx(n,e,r){hi||(hi=wx());const s=e[0],o=s.fetch??r,u=s.data instanceof FormData?"formData":"payload",c=s.headers?new Headers(s.headers):new Headers;if(c.set("x-tsr-serverFn","true"),u==="payload"&&c.set("accept",`${ES}, application/x-ndjson, application/json`),s.method==="GET"){if(u==="formData")throw new Error("FormData is not supported with GET requests");const p=await fb(s);if(p!==void 0){const m=x0({payload:p});n.includes("?")?n+=`&${m}`:n+=`?${m}`}}let f;if(s.method==="POST"){const p=await Rx(s);p?.contentType&&c.set("content-type",p.contentType),f=p?.body}return await Ax(async()=>o(n,{method:s.method,headers:c,signal:s.signal,body:f}))}async function fb(n){let e=!1;const r={};if(n.data!==void 0&&(e=!0,r.data=n.data),n.context&&db(n.context)&&(e=!0,r.context=n.context),e)return hb(r)}async function hb(n){return JSON.stringify(await Promise.resolve(ix(n,{plugins:hi})))}async function Rx(n){if(n.data instanceof FormData){let r;return n.context&&db(n.context)&&(r=await hb(n.context)),r!==void 0&&n.data.set(SS,r),{body:n.data}}const e=await fb(n);if(e)return{body:e,contentType:"application/json"}}async function Ax(n){let e;try{e=await n()}catch(s){if(s instanceof Response)e=s;else throw console.log(s),s}if(e.headers.get("x-tss-raw")==="true")return e;const r=e.headers.get("content-type");if(r||on(),e.headers.get("x-tss-serialized")){let s;if(r.includes("application/x-tss-framed")){if(RS(r),!e.body)throw new Error("No response body for framed response");const{getOrCreateStream:o,jsonChunks:u}=Ex(e.body),c=[mx(o),...hi||[]],f=new Map;s=await kx({jsonStream:u,onMessage:p=>jf(p,{refs:f,plugins:c}),onError(p,m){console.error(p,m)}})}else if(r.includes("application/x-ndjson")){const o=new Map;s=await Ox({response:e,onMessage:u=>jf(u,{refs:o,plugins:hi}),onError(u,c){console.error(u,c)}})}else r.includes("application/json")&&(s=jf(await e.json(),{plugins:hi}));if(s||on(),s instanceof Error)throw s;return s}if(r.includes("application/json")){const s=await e.json(),o=lE(s);if(o)throw o;if(Dt(s))throw s;return s}if(!e.ok)throw new Error(await e.text());return e}async function Ox({response:n,onMessage:e,onError:r}){if(!n.body)throw new Error("No response body");const s=n.body.pipeThrough(new TextDecoderStream).getReader();let o="",u=!1,c;for(;!u;){const{value:f,done:p}=await s.read();if(f&&(o+=f),o.length===0&&p)throw new Error("Stream ended before first object");
12if(o.endsWith(`
13`)){const m=o.split(`
14`).filter(Boolean),y=m[0];if(!y)throw new Error("No JSON line in the first chunk");c=JSON.parse(y),u=!0,o=m.slice(1).join(`
15`)}else{const m=o.indexOf(`
16`);if(m>=0){const y=o.slice(0,m).trim();o=o.slice(m+1),y.length>0&&(c=JSON.parse(y),u=!0)}}}return(async()=>{try{for(;;){const{value:f,done:p}=await s.read();f&&(o+=f);const m=o.lastIndexOf(`
17`);if(m>=0){const y=o.slice(0,m);o=o.slice(m+1);const g=y.split(`
18`).filter(Boolean);for(const b of g)try{e(JSON.parse(b))}catch(_){r?.(`Invalid JSON line: ${b}`,_)}}if(p)break}}catch(f){r?.("Stream processing error:",f)}})(),e(c)}async function kx({jsonStream:n,onMessage:e,onError:r}){const s=n.getReader(),{value:o,done:u}=await s.read();if(u||!o)throw new Error("Stream ended before first object");const c=JSON.parse(o);return(async()=>{try{for(;;){const{value:f,done:p}=await s.read();if(p)break;if(f)try{e(JSON.parse(f))}catch(m){r?.(`Invalid JSON: ${f}`,m)}}}catch(f){r?.("Stream processing error:",f)}})(),e(c)}function Cx(n){const e="/_serverFn/"+n;return Object.assign((...o)=>{const u=b0()?.serverFns?.fetch;return xx(e,o,u??fetch)},{url:e,serverFnMeta:{id:n},[Yf]:!0})}var jx={key:"$TSS/serverfn",test:n=>typeof n!="function"||!(Yf in n)?!1:!!n[Yf],toSerializable:({serverFnMeta:n})=>({functionId:n.id}),fromSerializable:({functionId:n})=>Cx(n)};function dv(n){return n.replaceAll("\0","/").replaceAll("�","/")}function Nx(n,e){n.id=e.i,n.__beforeLoadContext=e.b,n.loaderData=e.l,n.status=e.s,n.ssr=e.ssr,n.updatedAt=e.u,n.error=e.e,e.g!==void 0&&(n.globalNotFound=e.g)}async function Mx(n){window.$_TSR||on();const e=n.options.serializationAdapters;if(e?.length){const R=new Map;e.forEach(x=>{R.set(x.key,x.fromSerializable)}),window.$_TSR.t=R,window.$_TSR.buffer.forEach(x=>x())}window.$_TSR.initialized=!0,window.$_TSR.router||on();const r=window.$_TSR.router;r.matches.forEach(R=>{R.i=dv(R.i)}),r.lastMatchId&&(r.lastMatchId=dv(r.lastMatchId));const{manifest:s,dehydratedData:o,lastMatchId:u}=r;n.ssr={manifest:s};const c=document.querySelector('meta[property="csp-nonce"]')?.content;n.options.ssr={nonce:c};const f=n.matchRoutes(n.stores.location.state),p=Promise.all(f.map(R=>n.loadRouteChunk(n.looseRoutesById[R.routeId])));function m(R){const x=n.looseRoutesById[R.routeId].options.pendingMinMs??n.options.defaultPendingMinMs;if(x){const M=rs();R._nonReactive.minPendingPromise=M,R._forcePending=!0,setTimeout(()=>{M.resolve(),n.updateMatch(R.id,N=>(N._nonReactive.minPendingPromise=void 0,{...N,_forcePending:void 0}))},x)}}function y(R){const x=n.looseRoutesById[R.routeId];x&&(x.options.ssr=R.ssr)}let g;f.forEach(R=>{const x=r.matches.find(M=>M.i===R.id);if(!x){R._nonReactive.dehydrated=!1,R.ssr=!1,y(R);return}Nx(R,x),y(R),R._nonReactive.dehydrated=R.ssr!==!1,(R.ssr==="data-only"||R.ssr===!1)&&g===void 0&&(g=R.index,m(R))}),n.stores.setActiveMatches(f),await n.options.hydrate?.(o);const b=n.stores.activeMatchesSnapshot.state,_=n.stores.location.state;await Promise.all(b.map(async R=>{try{const x=n.looseRoutesById[R.routeId],M=b[R.index-1]?.context??n.options.context;if(x.options.context){const K={deps:R.loaderDeps,params:R.params,context:M??{},location:_,navigate:I=>n.navigate({...I,_fromLocation:_}),buildLocation:n.buildLocation,cause:R.cause,abortController:R.abortController,preload:!1,matches:f,routeId:x.id};R.__routeContext=x.options.context(K)??void 0}R.context={...M,...R.__routeContext,...R.__beforeLoadContext};const N={ssr:n.options.ssr,matches:b,match:R,params:R.params,loaderData:R.loaderData},B=await x.options.head?.(N),J=await x.options.scripts?.(N);R.meta=B?.meta,R.links=B?.links,R.headScripts=B?.scripts,R.styles=B?.styles,R.scripts=J}catch(x){if(Dt(x))R.error={isNotFound:!0},console.error(`NotFound error during hydration for routeId: ${R.routeId}`,x);else throw R.error=x,console.error(`Error during hydration for route ${R.routeId}:`,x),x}}));const S=f[f.length-1].id!==u;if(!f.some(R=>R.ssr===!1)&&!S)return f.forEach(R=>{R._nonReactive.dehydrated=void 0}),n.stores.resolvedLocation.setState(()=>n.stores.location.state),p;const A=Promise.resolve().then(()=>n.load()).catch(R=>{console.error("Error during router hydration:",R)});if(S){const R=f[1];R||on(),m(R),R._displayPending=!0,R._nonReactive.displayPendingPromise=A,A.then(()=>{n.batch(()=>{n.stores.status.state==="pending"&&n.batch(()=>{n.stores.status.setState(()=>"idle"),n.stores.resolvedLocation.setState(()=>n.stores.location.state)}),n.updateMatch(R.id,x=>({...x,_displayPending:void 0,displayPendingPromise:void 0}))})})}return p}var Nu=ae.use,xo=typeof window<"u"?ae.useLayoutEffect:ae.useEffect;function Nf(n){const e=ae.useRef({value:n,prev:null}),r=e.current.value;return n!==r&&(e.current={value:n,prev:r}),e.current.prev}function Dx(n,e,r={},s={}){ae.useEffect(()=>{if(!n.current||s.disabled||typeof IntersectionObserver!="function")return;const o=new IntersectionObserver(([u])=>{e(u)},r);return o.observe(n.current),()=>{o.disconnect()}},[e,r,s.disabled,n])}function Lx(n){const e=ae.useRef(null);return ae.useImperativeHandle(n,()=>e.current,[]),e}function Ux({promise:n}){if(Nu)return Nu(n);const e=kE(n);if(e[er].status==="pending")throw e;if(e[er].status==="error")throw e[er].error;return e[er].data}function zx(n){const e=H.jsx(Bx,{...n});
18return n.fallback?H.jsx(ae.Suspense,{fallback:n.fallback,children:e}):e}function Bx(n){const e=Ux(n);return n.children(e)}function Rh(n){const e=n.errorComponent??Ah;return H.jsx(Px,{getResetKey:n.getResetKey,onCatch:n.onCatch,children:({error:r,reset:s})=>r?ae.createElement(e,{error:r,reset:s}):n.children})}var Px=class extends ae.Component{constructor(...n){super(...n),this.state={error:null}}static getDerivedStateFromProps(n){return{resetKey:n.getResetKey()}}static getDerivedStateFromError(n){return{error:n}}reset(){this.setState({error:null})}componentDidUpdate(n,e){e.error&&e.resetKey!==this.state.resetKey&&this.reset()}componentDidCatch(n,e){this.props.onCatch&&this.props.onCatch(n,e)}render(){return this.props.children({error:this.state.resetKey!==this.props.getResetKey()?null:this.state.error,reset:()=>{this.reset()}})}};function Ah({error:n}){const[e,r]=ae.useState(!1);return H.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[H.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[H.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),H.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>r(s=>!s),children:e?"Hide Error":"Show Error"})]}),H.jsx("div",{style:{height:".25rem"}}),e?H.jsx("div",{children:H.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:n.message?H.jsx("code",{children:n.message}):null})}):null]})}function Ix({children:n,fallback:e=null}){return Oh()?H.jsx(ee.Fragment,{children:n}):H.jsx(ee.Fragment,{children:e})}function Oh(){return ee.useSyncExternalStore(Hx,()=>!0,()=>!1)}function Hx(){return()=>{}}var pb=ae.createContext(null);function Lt(n){return ae.useContext(pb)}var ec=ae.createContext(void 0),$x=ae.createContext(void 0),rt=(n=>(n[n.None=0]="None",n[n.Mutable=1]="Mutable",n[n.Watching=2]="Watching",n[n.RecursedCheck=4]="RecursedCheck",n[n.Recursed=8]="Recursed",n[n.Dirty=16]="Dirty",n[n.Pending=32]="Pending",n))(rt||{});function qx({update:n,notify:e,unwatched:r}){return{link:s,unlink:o,propagate:u,checkDirty:c,shallowPropagate:f};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 A=y.depsTail=m.subsTail={version:g,dep:m,sub:y,prevDep:b,nextDep:_,prevSub:S,nextSub:void 0};_!==void 0&&(_.prevDep=A),b!==void 0?b.nextDep=A:y.deps=A,S!==void 0?S.nextSub=A:m.subs=A}function o(m,y=m.sub){const g=m.dep,b=m.prevDep,_=m.nextDep,S=m.nextSub,A=m.prevSub;return _!==void 0?_.prevDep=b:y.depsTail=b,b!==void 0?b.nextDep=_:y.deps=_,S!==void 0?S.prevSub=A:g.subsTail=A,A!==void 0?A.nextSub=S:(g.subs=S)===void 0&&r(g),_}function u(m){let y=m.nextSub,g;e:do{const b=m.sub;let _=b.flags;if(_&60?_&12?_&4?!(_&48)&&p(m,b)?(b.flags=_|40,_&=1):_=0:b.flags=_&-9|32:_=0:b.flags=_|32,_&2&&e(b),_&1){const S=b.subs;if(S!==void 0){const A=(m=S).nextSub;A!==void 0&&(g={value:y,prev:g},y=A);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 c(m,y){let g,b=0,_=!1;e:do{const S=m.dep,A=S.flags;if(y.flags&16)_=!0;else if((A&17)===17){if(n(S)){const R=S.subs;R.nextSub!==void 0&&f(R),_=!0}}else if((A&33)===33){(m.nextSub!==void 0||m.prevSub!==void 0)&&(g={value:m,prev:g}),m=S.deps,y=S,++b;continue}if(!_){const R=m.nextDep;if(R!==void 0){m=R;continue}}for(;b--;){const R=y.subs,x=R.nextSub!==void 0;if(x?(m=g.value,g=g.prev):m=R,_){if(n(y)){x&&f(R),y=m.sub;continue}_=!1}else y.flags&=-33;y=m.sub;const M=m.nextDep;if(M!==void 0){m=M;continue e}}return _}while(!0)}function f(m){do{const y=m.sub,g=y.flags;(g&48)===32&&(y.flags=g|16,(g&6)===2&&e(y))}while((m=m.nextSub)!==void 0)}function p(m,y){let g=y.depsTail;for(;g!==void 0;){if(g===m)return!0;g=g.prevDep}return!1}}function kh(n,e,r){const s=typeof n=="object",o=s?n:void 0;return{next:(s?n.next:n)?.bind(o),error:(s?n.error:e)?.bind(o),c
18omplete:(s?n.complete:r)?.bind(o)}}const Xf=[];let Tu=0;const{link:fv,unlink:Vx,propagate:Gx,checkDirty:mb,shallowPropagate:hv}=qx({update(n){return n._update()},notify(n){Xf[Ff++]=n,n.flags&=~rt.Watching},unwatched(n){n.depsTail!==void 0&&(n.depsTail=void 0,n.flags=rt.Mutable|rt.Dirty,Mu(n))}});let uu=0,Ff=0,Qn,Qf=0;function gb(n){try{++Qf,n()}finally{--Qf||yb()}}function Mu(n){const e=n.depsTail;let r=e!==void 0?e.nextDep:n.deps;for(;r!==void 0;)r=Vx(r,n)}function yb(){if(!(Qf>0)){for(;uu<Ff;){const n=Xf[uu];Xf[uu++]=void 0,n.notify()}uu=0,Ff=0}}function vb(n,e){const r=typeof n=="function",s=n,o={_snapshot:r?void 0:n,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:r?rt.None:rt.Mutable,get(){return Qn!==void 0&&fv(o,Qn,Tu),o._snapshot},subscribe(u){const c=kh(u),f={current:!1},p=Yx(()=>{o.get(),f.current?c.next?.(o._snapshot):f.current=!0});return{unsubscribe:()=>{p.stop()}}},_update(u){const c=Qn,f=Object.is;if(r)Qn=o,++Tu,o.depsTail=void 0;else if(u===void 0)return!1;r&&(o.flags=rt.Mutable|rt.RecursedCheck);try{const p=o._snapshot,m=typeof u=="function"?u(p):u===void 0&&r?s(p):u;return p===void 0||!f(p,m)?(o._snapshot=m,!0):!1}finally{Qn=c,r&&(o.flags&=~rt.RecursedCheck),Mu(o)}}};return r?(o.flags=rt.Mutable|rt.Dirty,o.get=function(){const u=o.flags;if(u&rt.Dirty||u&rt.Pending&&mb(o.deps,o)){if(o._update()){const c=o.subs;c!==void 0&&hv(c)}}else u&rt.Pending&&(o.flags=u&~rt.Pending);return Qn!==void 0&&fv(o,Qn,Tu),o._snapshot}):o.set=function(u){if(o._update(u)){const c=o.subs;c!==void 0&&(Gx(c),hv(c),yb())}},o}function Yx(n){const e=()=>{const s=Qn;Qn=r,++Tu,r.depsTail=void 0,r.flags=rt.Watching|rt.RecursedCheck;try{return n()}finally{Qn=s,r.flags&=~rt.RecursedCheck,Mu(r)}},r={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:rt.Watching|rt.RecursedCheck,notify(){const s=this.flags;s&rt.Dirty||s&rt.Pending&&mb(this.deps,this)?e():this.flags=rt.Watching},stop(){this.flags=rt.None,this.depsTail=void 0,Mu(this)}};return e(),r}class Kx{constructor(e){this.atom=vb(e)}setState(e){this.atom.set(e)}get state(){return this.atom.get()}get(){return this.state}subscribe(e){return this.atom.subscribe(kh(e))}}class Zx{constructor(e){this.atom=vb(e)}get state(){return this.atom.get()}get(){return this.state}subscribe(e){return this.atom.subscribe(kh(e))}}function pv(n){return typeof n=="function"?new Zx(n):new Kx(n)}var Mf={exports:{}},Df={},Lf={exports:{}},Uf={};var mv;function Jx(){if(mv)return Uf;mv=1;var n=Go();function e(g,b){return g===b&&(g!==0||1/g===1/b)||g!==g&&b!==b}var r=typeof Object.is=="function"?Object.is:e,s=n.useState,o=n.useEffect,u=n.useLayoutEffect,c=n.useDebugValue;function f(g,b){var _=b(),S=s({inst:{value:_,getSnapshot:b}}),A=S[0].inst,R=S[1];return u(function(){A.value=_,A.getSnapshot=b,p(A)&&R({inst:A})},[g,_,b]),o(function(){return p(A)&&R({inst:A}),g(function(){p(A)&&R({inst:A})})},[g]),c(_),_}function p(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:f;return Uf.useSyncExternalStore=n.useSyncExternalStore!==void 0?n.useSyncExternalStore:y,Uf}var gv;function Xx(){return gv||(gv=1,Lf.exports=Jx()),Lf.exports}var yv;function Fx(){if(yv)return Df;yv=1;var n=Go(),e=Xx();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=e.useSyncExternalStore,u=n.useRef,c=n.useEffect,f=n.useMemo,p=n.useDebugValue;return Df.useSyncExternalStoreWithSelector=function(m,y,g,b,_){var S=u(null);if(S.current===null){var A={hasValue:!1,value:null};S.current=A}else A=S.current;S=f(function(){function x(K){if(!M){if(M=!0,N=K,K=b(K),_!==void 0&&A.hasValue){var I=A.value;if(_(I,K))return B=I}return B=K}if(I=B,s(N,K))return I;var F=b(K);return _!==void 0&&_(I,F)?(N=K,I):(N=K,B=F)}var M=!1,N,B,J=g===void 0?null:g;return[function(){return x(y())},J===null?void 0:function(){return x(J())}]},[y,g,b,_]);var R=o(m,S[0],S[1]);return c(function(){A.hasValue=!0,A.value=R},[R]),p(R),R},Df}var vv;function Qx(){return vv||(vv=1,Mf.exports=Fx()),Mf.exports}var Wx=Qx();function eR(n,e){return n===e}function yt(n,e,r=eR){const s=ae.useCallback(c=>{if(!n)return()=>{};const{unsubscribe:f}=n.subscribe(c);return f},[n]),o=ae.useCallback(()=>n?.get(),[n]);return Wx.useSyncExternalStoreWithSelector(s,o,o,e,r)}var tR={state:void 0,get:()=>{},subscribe:()=>()=>{}};function os(n){const e=Lt(),r=ae.useContext(n.from?$x:ec),s=n.from??r,o=s?n.from?e.stores.getMatchStoreByRouteId(s):e.stores.activeMatchStoresById.get(s):void 0,u=ae.useRef(void 0);return yt(o??tR,c=>{if((n.shouldThrow??!0)&&!c&&on(),c===void 0)return;const f=n.select?n.select(c):c;if(n.structuralSharing??e.options.defaultStructuralSharing){const p=Xa(u.current,f);return u.current=p,p}return f})}function bb(n){return os({from:n.from,strict:n.strict,structuralSharing:n.structuralSharing,select:e=>n.select?n.select(e.loaderData):e.loaderData})}function _b(n){const{select:e,...r}=n;return os({...r,select:s=>e?e(s.loaderDeps):s.loaderDeps})}function wb(n){return os({from:n.from,shouldThrow:n.shouldThrow,structuralSharing:n.structuralSharing,strict:n.strict,select:e=>{const r=n.strict===!1?e.params:e._strictParams;return n.select?n.select(r):r}})}function Sb(n){return os({from:n.from,strict:n.strict,shouldThrow:n.shouldThrow,structuralSharing:n.structuralSharing,select:e=>n.select?n.select(e.search):e.search})}function Eb(n){const e=Lt();return ae.useCallback(r=>e.navigate({...r,from:r.from??n?.from}),[n?.from,e])}function Tb(n){return os({...n,select:e=>n.select?n.select(e.context):e.context})}var xb=v0();const nR=y0(xb);function rR(n,e){const r=Lt(),s=Lx(e),{activeProps:o,inactiveProps:u,activeOptions:c,to:f,preload:p,preloadDelay:m,hashScrollIntoView:y,replace:g,startTransition:b,resetScroll:_,viewTransition:S,children:A,target:R,disabled:x,style:M,className:N,onClick:B,onBlur:J,onFocus:K,onMouseEnter:I,onMouseLeave:F,onTouchStart:Q,ignoreBlocker:he,params:se,search:_e,hash:ye,state:Je,mask:Ue,reloadDocument:L,unsafeRelative:Z,from:le,_fromLocation:ke,...we}=n,k=Oh(),q=ae.useMemo(()=>n,[r,n.from,n._fromLocation,n.hash,n.to,n.search,n.params,n.state,n.mask,n.unsafeRelative]),G=yt(r.stores.location,Oe=>Oe,(Oe,wt)=>Oe.href===wt.href),X=ae.useMemo(()=>{const Oe={_fromLocation:G,...q};return r.buildLocation(Oe)},[r,G,q]),re=X.maskedLocation?X.maskedLocation.publicHref:X.publicHref,pe=X.maskedLocation?X.maskedLocation.external:X.external,xe=ae.useMemo(()=>uR(re,pe,r.history,x),[x,pe,re,r.history]),ve=ae.useMemo(()=>
18{if(xe?.external)return Au(xe.href,r.protocolAllowlist)?void 0:xe.href;if(!cR(f)&&!(typeof f!="string"||f.indexOf(":")===-1))try{return new URL(f),Au(f,r.protocolAllowlist)?void 0:f}catch{}},[f,xe,r.protocolAllowlist]),Be=ae.useMemo(()=>{if(ve)return!1;if(c?.exact){if(!ZS(G.pathname,X.pathname,r.basepath))return!1}else{const Oe=Ou(G.pathname,r.basepath),wt=Ou(X.pathname,r.basepath);if(!(Oe.startsWith(wt)&&(Oe.length===wt.length||Oe[wt.length]==="/")))return!1}return(c?.includeSearch??!0)&&!an(G.search,X.search,{partial:!c?.exact,ignoreUndefined:!c?.explicitUndefined})?!1:c?.includeHash?k&&G.hash===X.hash:!0},[c?.exact,c?.explicitUndefined,c?.includeHash,c?.includeSearch,G,ve,k,X.hash,X.pathname,X.search,r.basepath]),Pt=Be?fa(o,{})??aR:zf,Vt=Be?zf:fa(u,{})??zf,cn=[N,Pt.className,Vt.className].filter(Boolean).join(" "),Ea=(M||Pt.style||Vt.style)&&{...M,...Pt.style,...Vt.style},[dn,Mr]=ae.useState(!1),rr=ae.useRef(!1),Gt=n.reloadDocument||ve?!1:p??r.options.defaultPreload,ar=m??r.options.defaultPreloadDelay??0,lt=ae.useCallback(()=>{r.preloadRoute({...q,_builtLocation:X}).catch(Oe=>{console.warn(Oe),console.warn(CE)})},[r,q,X]);Dx(s,ae.useCallback(Oe=>{Oe?.isIntersecting&&lt()},[lt]),lR,{disabled:!!x||Gt!=="viewport"}),ae.useEffect(()=>{rr.current||!x&&Gt==="render"&&(lt(),rr.current=!0)},[x,lt,Gt]);const Ta=Oe=>{const wt=Oe.currentTarget.getAttribute("target"),It=R!==void 0?R:wt;if(!x&&!dR(Oe)&&!Oe.defaultPrevented&&(!It||It==="_self")&&Oe.button===0){Oe.preventDefault(),xb.flushSync(()=>{Mr(!0)});const ls=r.subscribe("onResolved",()=>{ls(),Mr(!1)});r.navigate({...q,replace:g,resetScroll:_,hashScrollIntoView:y,startTransition:b,viewTransition:S,ignoreBlocker:he})}};if(ve)return{...we,ref:s,href:ve,...A&&{children:A},...R&&{target:R},...x&&{disabled:x},...M&&{style:M},...N&&{className:N},...B&&{onClick:B},...J&&{onBlur:J},...K&&{onFocus:K},...I&&{onMouseEnter:I},...F&&{onMouseLeave:F},...Q&&{onTouchStart:Q}};const Dr=Oe=>{if(x||Gt!=="intent")return;if(!ar){lt();return}const wt=Oe.currentTarget;if(So.has(wt))return;const It=setTimeout(()=>{So.delete(wt),lt()},ar);So.set(wt,It)},Rt=Oe=>{x||Gt!=="intent"||lt()},Dn=Oe=>{if(x||!Gt||!ar)return;const wt=Oe.currentTarget,It=So.get(wt);It&&(clearTimeout(It),So.delete(wt))};return{...we,...Pt,...Vt,href:xe?.href,ref:s,onClick:Xs([B,Ta]),onBlur:Xs([J,Dn]),onFocus:Xs([K,Dr]),onMouseEnter:Xs([I,Dr]),onMouseLeave:Xs([F,Dn]),onTouchStart:Xs([Q,Rt]),disabled:!!x,target:R,...Ea&&{style:Ea},...cn&&{className:cn},...x&&sR,...Be&&iR,...k&&dn&&oR}}var zf={},aR={className:"active"},sR={role:"link","aria-disabled":!0},iR={"data-status":"active","aria-current":"page"},oR={"data-transitioning":"transitioning"},So=new WeakMap,lR={rootMargin:"100px"},Xs=n=>e=>{for(const r of n)if(r){if(e.defaultPrevented)return;r(e)}};function uR(n,e,r,s){if(!s)return e?{href:n,external:!0}:{href:r.createHref(n)||"/",external:!1}}function cR(n){if(typeof n!="string")return!1;const e=n.charCodeAt(0);return e===47?n.charCodeAt(1)!==47:e===46}var qt=ae.forwardRef((n,e)=>{const{_asChild:r,...s}=n,{type:o,...u}=rR(s,e),c=typeof s.children=="function"?s.children({isActive:u["data-status"]==="active"}):s.children;if(!r){const{disabled:f,...p}=u;return ae.createElement("a",p,c)}return ae.createElement(r,u,c)});function dR(n){return!!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)}var fR=class extends N0{constructor(e){super(e),this.useMatch=r=>os({select:r?.select,from:this.id,structuralSharing:r?.structuralSharing}),this.useRouteContext=r=>Tb({...r,from:this.id}),this.useSearch=r=>Sb({select:r?.select,structuralSharing:r?.structuralSharing,from:this.id}),this.useParams=r=>wb({select:r?.select,structuralSharing:r?.structuralSharing,from:this.id}),this.useLoaderDeps=r=>_b({...r,from:this.id}),this.useLoaderData=r=>bb({...r,from:this.id}),this.useNavigate=()=>Eb({from:this.fullPath}),this.Link=ee.forwardRef((r,s)=>H.jsx(qt,{ref:s,from:this.fullPath,...r}))}};function hR(n){return new fR(n)}var pR=class extends NE{constructor(n){super(n),this.useMatch=e=>os({select:e?.select,from:this.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>Tb({...e,from:this.id}),this.useSearch=e=>Sb({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useParams=e=>wb({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useLoaderDeps=e=>_b({...e,from:this.id}),this.useLoaderData=e=>bb({...e,from:this.id}),this.useNavigate=()=>Eb({from:this.fullPath}),this.Link=ee.forwardRef((e,r)=>H.jsx(qt,{ref:r,from:this.fullPath,...e}))}};function mR(n){return new pR(n)}function Nn(n){return typeof n=="object"?new bv(n,{silent:!0}).createRoute(n):new bv(n,{silent:!0}).createRoute}var bv=class{constructor(n,e){this.path=n,this.createRoute=r=>{const s=hR(r);return s.isRoot=!1,s},this.silent=e?.silent}};function ln(n,e){let r,s,o,u;const c=()=>(r||(r=n().then(p=>{r=void 0,s=p[e??"default"]}).catch(p=>{if(o=p,CS(o)&&o instanceof Error&&typeof window<"u"&&typeof sessionStorage<"u"){const m=`tanstack_router_reload:${o.message}`;sessionStorage.getItem(m)||(sessionStorage.setItem(m,"1"),u=!0)}})),r),f=function(m){if(u)throw window.location.reload(),new Promise(()=>{});if(o)throw o;if(!s)if(Nu)Nu(c());else throw c();return ae.createElement(s,m)};return f.preload=c,f}function gR(n){const e=Lt(),r=`not-found-${yt(e.stores.location,s=>s.pathname)}-${yt(e.stores.status,s=>s)}`;return H.jsx(Rh,{getResetKey:()=>r,onCatch:(s,o)=>
18{if(Dt(s))n.onCatch?.(s,o);else throw s},errorComponent:({error:s})=>{if(Dt(s))return n.fallback?.(s);throw s},children:n.children})}function yR(){return H.jsx("p",{children:"Not Found"})}function ni(n){return H.jsx(H.Fragment,{children:n.children})}function Rb(n,e,r){return e.options.notFoundComponent?H.jsx(e.options.notFoundComponent,{...r}):n.options.defaultNotFoundComponent?H.jsx(n.options.defaultNotFoundComponent,{...r}):H.jsx(yR,{})}function vR(n){return null}function bR(){return vR(Lt()),null}var Ab=ae.memo(function({matchId:e}){const r=Lt(),s=r.stores.activeMatchStoresById.get(e);s||on();const o=yt(r.stores.loadedAt,c=>c),u=yt(s,c=>c);return H.jsx(_R,{router:r,matchId:e,resetKey:o,matchState:ae.useMemo(()=>{const c=u.routeId,f=r.routesById[c].parentRoute?.id;return{routeId:c,ssr:u.ssr,_displayPending:u._displayPending,parentRouteId:f}},[u._displayPending,u.routeId,u.ssr,r.routesById])})});function _R({router:n,matchId:e,resetKey:r,matchState:s}){const o=n.routesById[s.routeId],u=o.options.pendingComponent??n.options.defaultPendingComponent,c=u?H.jsx(u,{}):null,f=o.options.errorComponent??n.options.defaultErrorComponent,p=o.options.onCatch??n.options.defaultOnCatch,m=o.isRoot?o.options.notFoundComponent??n.options.notFoundRoute?.options.component:o.options.notFoundComponent,y=s.ssr===!1||s.ssr==="data-only",g=(!o.isRoot||o.options.wrapInSuspense||y)&&(o.options.wrapInSuspense??u??(o.options.errorComponent?.preload||y))?ae.Suspense:ni,b=f?Rh:ni,_=m?gR:ni;return H.jsxs(o.isRoot?o.options.shellComponent??ni:ni,{children:[H.jsx(ec.Provider,{value:e,children:H.jsx(g,{fallback:c,children:H.jsx(b,{getResetKey:()=>r,errorComponent:f||Ah,onCatch:(S,A)=>{if(Dt(S))throw S.routeId??=s.routeId,S;p?.(S,A)},children:H.jsx(_,{fallback:S=>{if(S.routeId??=s.routeId,!m||S.routeId&&S.routeId!==s.routeId||!S.routeId&&
18!o.isRoot)throw S;return ae.createElement(m,S)},children:y||s._displayPending?H.jsx(Ix,{fallback:c,children:H.jsx(_v,{matchId:e})}):H.jsx(_v,{matchId:e})})})})}),s.parentRouteId===ts?H.jsxs(H.Fragment,{children:[H.jsx(wR,{resetKey:r}),n.options.scrollRestoration&&_0?H.jsx(bR,{}):null]}):null]})}function wR({resetKey:n}){const e=Lt(),r=ae.useRef(void 0);return xo(()=>{const s=e.latestLocation.href;(r.current===void 0||r.current!==s)&&(e.emit({type:"onRendered",...ci(e.stores.location.state,e.stores.resolvedLocation.state)}),r.current=s)},[e.latestLocation.state.__TSR_key,n,e]),null}var _v=ae.memo(function({matchId:e}){const r=Lt(),s=r.stores.activeMatchStoresById.get(e);s||on();const o=yt(s,m=>m),u=o.routeId,c=r.routesById[u],f=ae.useMemo(()=>{const m=(r.routesById[u].options.remountDeps??r.options.defaultRemountDeps)?.({routeId:u,loaderDeps:o.loaderDeps,params:o._strictParams,search:o._strictSearch});return m?JSON.stringify(m):void 0},[u,o.loaderDeps,o._strictParams,o._strictSearch,r.options.defaultRemountDeps,r.routesById]),p=ae.useMemo(()=>{const m=c.options.component??r.options.defaultComponent;return m?H.jsx(m,{},f):H.jsx(Ob,{})},[f,c.options.component,r.options.defaultComponent]);if(o._displayPending)throw r.getMatch(o.id)?._nonReactive.displayPendingPromise;if(o._forcePending)throw r.getMatch(o.id)?._nonReactive.minPendingPromise;if(o.status==="pending"){const m=c.options.pendingMinMs??r.options.defaultPendingMinMs;if(m){const y=r.getMatch(o.id);if(y&&!y._nonReactive.minPendingPromise){const g=rs();y._nonReactive.minPendingPromise=g,setTimeout(()=>{g.resolve(),y._nonReactive.minPendingPromise=void 0},m)}}throw r.getMatch(o.id)?._nonReactive.loadPromise}if(o.status==="notFound")return Dt(o.error)||on(),Rb(r,c,o.error);if(o.status==="redirected")throw sn(o.error)||on(),r.getMatch(o.id)?._nonReactive.loadPromise;if(o.status==="error")throw o.error;return p}),Ob=ae.memo(function(){const e=Lt(),r=ae.useContext(ec);let s,o=!1,u;{const m=r?e.stores.activeMatchStoresById.get(r):void 0;[s,o]=yt(m,y=>[y?.routeId,y?.globalNotFound??!1]),u=yt(e.stores.matchesId,y=>y[y.findIndex(g=>g===r)+1])}const c=s?e.routesById[s]:void 0,f=e.options.defaultPendingComponent?H.jsx(e.options.defaultPendingComponent,{}):null;if(o)return c||on(),Rb(e,c,void 0);if(!u)return null;const p=H.jsx(Ab,{matchId:u});return s===ts?H.jsx(ae.Suspense,{fallback:f,children:p}):p});function SR(){const n=Lt(),e=ae.useRef({router:n,mounted:!1}),[r,s]=ae.useState(!1),o=yt(n.stores.isLoading,g=>g),u=yt(n.stores.hasPendingMatches,g=>g),c=Nf(o),f=o||r||u,p=Nf(f),m=o||u,y=Nf(m);return n.startTransition=g=>{s(!0),ae.startTransition(()=>{g(),s(!1)})},ae.useEffect(()=>{const g=n.history.subscribe(n.load),b=n.buildLocation({to:n.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return ma(n.latestLocation.publicHref)!==ma(b.publicHref)&&n.commitLocation({...b,replace:!0}),()=>{g()}},[n,n.history]),xo(()=>{if(typeof window<"u"&&n.ssr||e.current.router===n&&e.current.mounted)return;e.current={router:n,mounted:!0},(async()=>{try{await n.load()}catch(b){console.error(b)}})()},[n]),xo(()=>{c&&!o&&n.emit({type:"onLoad",...ci(n.stores.location.state,n.stores.resolvedLocation.state)})},[c,n,o]),xo(()=>{y&&!m&&n.emit({type:"onBeforeRouteMount",...ci(n.stores.location.state,n.stores.resolvedLocation.state)})},[m,y,n]),xo(()=>{if(p&&!f){const g=ci(n.stores.location.state,n.stores.resolvedLocation.state);n.emit({type:"onResolved",...g}),gb(()=>{n.stores.status.setState(()=>"idle"),n.stores.resolvedLocation.setState(()=>n.stores.location.state)}),g.hrefChanged&&ME(n)}},[f,p,n]),null}function ER(){const n=Lt(),e=n.routesById[ts].options.pendingComponent??n.options.defaultPendingComponent,r=e?H.jsx(e,{}):null,s=H.jsxs(typeof document<"u"&&n.ssr?ni:ae.Suspense,{fallback:r,children:[H.jsx(SR,{}),H.jsx(TR,{})]});return n.options.InnerWrap?H.jsx(n.options.InnerWrap,{children:s}):s}function TR(){const n=Lt(),e=yt(n.stores.firstMatchId,o=>o),r=yt(n.stores.loadedAt,o=>o),s=e?H.jsx(Ab,{matchId:e}):null;return H.jsx(ec.Provider,{value:e,children:n.options.disableGlobalCatchBoundary?s:H.jsx(Rh,{getResetKey:()=>r,errorComponent:Ah,onCatch:void 0,children:s})})}var xR=n=>({createMutableStore:pv,createReadonlyStore:pv,batch:gb}),RR=n=>new AR(n),AR=class extends SE{constructor(n){super(n,xR)}};function OR({router:n,children:e,...r}){Object.keys(r).length>0&&n.update({...n.options,...r,context:{...n.options.context,...r.context}});const s=H.jsx(pb.Provider,{value:n,children:e});return n.options.Wrap?H.jsx(n.options.Wrap,{children:s}):s}function kR({router:n,...e}){return H.jsx(OR,{router:n,...e,children:H.jsx(ER,{})})}function kb({tag:n,attrs:e,children:r,nonce:s}
18){switch(n){case"title":return H.jsx("title",{...e,suppressHydrationWarning:!0,children:r});case"meta":return H.jsx("meta",{...e,suppressHydrationWarning:!0});case"link":return H.jsx("link",{...e,nonce:s,suppressHydrationWarning:!0});case"style":return H.jsx("style",{...e,dangerouslySetInnerHTML:{__html:r},nonce:s});case"script":return H.jsx(CR,{attrs:e,children:r});default:return null}}function CR({attrs:n,children:e}){Lt();const r=Oh(),s=typeof n?.type=="string"&&n.type!==""&&n.type!=="text/javascript"&&n.type!=="module";if(ae.useEffect(()=>{if(!s){if(n?.src){const o=(()=>{try{const c=document.baseURI||window.location.href;return new URL(n.src,c).href}catch{return n.src}})();if(Array.from(document.querySelectorAll("script[src]")).find(c=>c.src===o))return;const u=document.createElement("script");for(const[c,f]of Object.entries(n))c!=="suppressHydrationWarning"&&f!==void 0&&f!==!1&&u.setAttribute(c,typeof f=="boolean"?"":String(f));return document.head.appendChild(u),()=>{u.parentNode&&u.parentNode.removeChild(u)}}if(typeof e=="string"){const o=typeof n?.type=="string"?n.type:"text/javascript",u=typeof n?.nonce=="string"?n.nonce:void 0;if(Array.from(document.querySelectorAll("script:not([src])")).find(f=>{if(!(f instanceof HTMLScriptElement))return!1;const p=f.getAttribute("type")??"text/javascript",m=f.getAttribute("nonce")??void 0;return f.textContent===e&&p===o&&m===u}))return;const c=document.createElement("script");if(c.textContent=e,n)for(const[f,p]of Object.entries(n))f!=="suppressHydrationWarning"&&p!==void 0&&p!==!1&&c.setAttribute(f,typeof p=="boolean"?"":String(p));return document.head.appendChild(c),()=>{c.parentNode&&c.parentNode.removeChild(c)}}}},[n,e,s]),s&&typeof e=="string")return H.jsx("script",{...n,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:e}});if(!r){if(n?.src)return H.jsx("script",{...n,suppressHydrationWarning:!0});if(typeof e=="string")return H.jsx("script",{...n,dangerouslySetInnerHTML:{__html:e},suppressHydrationWarning:!0})}return null}var jR=n=>{const e=Lt(),r=e.options.ssr?.nonce,s=yt(e.stores.activeMatchesSnapshot,m=>m.map(y=>y.meta).filter(Boolean),an),o=ae.useMemo(()=>{const m=[],y={};let g;for(let b=s.length-1;b>=0;b--){const _=s[b];for(let S=_.length-1;S>=0;S--){const A=_[S];if(A)if(A.title)g||(g={tag:"title",children:A.title});else if("script:ld+json"in A)try{const R=JSON.stringify(A["script:ld+json"]);m.push({tag:"script",attrs:{type:"application/ld+json"},children:LS(R)})}catch{}else{const R=A.name??A.property;if(R){if(y[R])continue;y[R]=!0}m.push({tag:"meta",attrs:{...A,nonce:r}})}}}return g&&m.push(g),r&&m.push({tag:"meta",attrs:{property:"csp-nonce",content:r}}),m.reverse(),m},[s,r]),u=yt(e.stores.activeMatchesSnapshot,m=>{const y=m.map(_=>_.links).filter(Boolean).flat(1).map(_=>({tag:"link",attrs:{..._,nonce:r}})),g=e.ssr?.manifest,b=m.map(_=>g?.routes[_.routeId]?.assets??[]).filter(Boolean).flat(1).filter(_=>_.tag==="link").map(_=>({tag:"link",attrs:{..._.attrs,crossOrigin:Wy(n,"stylesheet")??_.attrs?.crossOrigin,suppressHydrationWarning:!0,nonce:r}}));return[...y,...b]},an),c=yt(e.stores.activeMatchesSnapshot,m=>{const y=[];return m.map(g=>e.looseRoutesById[g.routeId]).forEach(g=>e.ssr?.manifest?.routes[g.id]?.preloads?.filter(Boolean).forEach(b=>{const _=jE(b);y.push({tag:"link",attrs:{rel:"modulepreload",href:_.href,crossOrigin:Wy(n,"modulepreload")??_.crossOrigin,nonce:r}})})),y},an),f=yt(e.stores.activeMatchesSnapshot,m=>m.map(y=>y.styles).flat(1).filter(Boolean).map(({children:y,...g})=>({tag:"style",attrs:{...g,nonce:r},children:y})),an),p=yt(e.stores.activeMatchesSnapshot,m=>m.map(y=>y.headScripts).flat(1).filter(Boolean).map(({children:y,...g})=>({tag:"script",attrs:{...g,nonce:r},children:y})),an);return NR([...o,...c,...u,...f,...p],m=>JSON.stringify(m))};function NR(n,e){const r=new Set;return n.filter(s=>{const o=e(s);return r.has(o)?!1:(r.add(o),!0)})}function MR(n){const e=jR(n.assetCrossOrigin),r=Lt().options.ssr?.nonce;return H.jsx(H.Fragment,{children:e.map(s=>ae.createElement(kb,{...s,key:`tsr-meta-${JSON.stringify(s)}`,nonce:r}))})}var DR=()=>{const n=Lt(),e=n.options.ssr?.nonce,r=u=>{const c=[],f=n.ssr?.manifest;return f?(u.map(p=>
18n.looseRoutesById[p.routeId]).forEach(p=>f.routes[p.id]?.assets?.filter(m=>m.tag==="script").forEach(m=>{c.push({tag:"script",attrs:{...m.attrs,nonce:e},children:m.children})})),c):[]},s=u=>u.map(c=>c.scripts).flat(1).filter(Boolean).map(({children:c,...f})=>({tag:"script",attrs:{...f,suppressHydrationWarning:!0,nonce:e},children:c})),o=yt(n.stores.activeMatchesSnapshot,r,an);return LR(n,yt(n.stores.activeMatchesSnapshot,s,an),o)};function LR(n,e,r){let s;n.serverSsr&&(s=n.serverSsr.takeBufferedScripts());const o=[...e,...r];return s&&o.unshift(s),H.jsx(H.Fragment,{children:o.map((u,c)=>ae.createElement(kb,{...u,key:`tsr-scripts-${u.tag}-${c}`}))})}const UR="/assets/styles-CwmdfiHu.css";function tc(n,e){var r={};for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&e.indexOf(s)<0&&(r[s]=n[s]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,s=Object.getOwnPropertySymbols(n);o<s.length;o++)e.indexOf(s[o])<0&&Object.prototype.propertyIsEnumerable.call(n,s[o])&&(r[s[o]]=n[s[o]]);return r}function zR(n,e,r,s){function o(u){return u instanceof r?u:new r(function(c){c(u)})}return new(r||(r=Promise))(function(u,c){function f(y){try{m(s.next(y))}catch(g){c(g)}}function p(y){try{m(s.throw(y))}catch(g){c(g)}}function m(y){y.done?u(y.value):o(y.value).then(f,p)}m((s=s.apply(n,e||[])).next())})}const BR=n=>n?(...e)=>n(...e):(...e)=>fetch(...e);class Ch extends Error{constructor(e,r="FunctionsError",s){super(e),this.name=r,this.context=s}toJSON(){return{name:this.name,message:this.message,context:this.context}}}class PR extends Ch{constructor(e){super("Failed to send a request to the Edge Function","FunctionsFetchError",e)}}class wv extends Ch{constructor(e){super("Relay Error invoking the Edge Function","FunctionsRelayError",e)}}class Sv extends Ch{constructor(e){super("Edge Function returned a non-2xx status code","FunctionsHttpError",e)}}var Wf;(function(n){n.Any="any",n.ApNortheast1="ap-northeast-1",n.ApNortheast2="ap-northeast-2",n.ApSouth1="ap-south-1",n.ApSoutheast1="ap-southeast-1",n.ApSoutheast2="ap-southeast-2",n.CaCentral1="ca-central-1",n.EuCentral1="eu-central-1",n.EuWest1="eu-west-1",n.EuWest2="eu-west-2",n.EuWest3="eu-west-3",n.SaEast1="sa-east-1",n.UsEast1="us-east-1",n.UsWest1="us-west-1",n.UsWest2="us-west-2"})(Wf||(Wf={}));class IR{constructor(e,{headers:r={},customFetch:s,region:o=Wf.Any}={}){this.url=e,this.headers=r,this.region=o,this.fetch=BR(s)}setAuth(e){this.headers.Authorization=`Bearer ${e}`}invoke(e){return zR(this,arguments,void 0,function*(r,s={}){var o;let u,c;try{const{headers:f,method:p,body:m,signal:y,timeout:g}=s;let b={},{region:_}=s;_||(_=this.region);const S=new URL(`${this.url}/${r}`);_&&_!=="any"&&(b["x-region"]=_,S.searchParams.set("forceFunctionRegion",_));let A;m&&(f&&!Object.prototype.hasOwnProperty.call(f,"Content-Type")||!f)?typeof Blob<"u"&&m instanceof Blob||m instanceof ArrayBuffer?(b["Content-Type"]="application/octet-stream",A=m):typeof m=="string"?(b["Content-Type"]="text/plain",A=m):typeof FormData<"u"&&m instanceof FormData?A=m:(b["Content-Type"]="application/json",A=JSON.stringify(m)):m&&typeof m!="string"&&!(typeof Blob<"u"&&m instanceof Blob)&&!(m instanceof ArrayBuffer)&&!(typeof FormData<"u"&&m instanceof FormData)?A=JSON.stringify(m):A=m;let R=y;g&&(c=new AbortController,u=setTimeout(()=>c.abort(),g),y?(R=c.signal,y.addEventListener("abort",()=>c.abort())):R=c.signal);const x=yield this.fetch(S.toString(),{method:p||"POST",headers:Object.assign(Object.assign(Object.assign({},b),this.headers),f),body:A,signal:R}).catch(J=>{throw new PR(J)}),M=x.headers.get("x-relay-error");if(M&&M==="true")throw new wv(x);if(!x.ok)throw new Sv(x);let N=((o=x.headers.get("Content-Type"))!==null&&o!==void 0?o:"text/plain").split(";")[0].trim(),B;return N==="application/json"?B=yield x.json():N==="application/octet-stream"||N==="application/pdf"?B=yield x.blob():N==="text/event-stream"?B=x:N==="multipart/form-data"?B=yield x.formData():B=yield x.text(),{data:B,error:null,response:x}}catch(f){return{data:null,error:f,response:f instanceof Sv||f instanceof wv?f.context:void 0}}finally{u&&clearTimeout(u)}})}}const Cb=3,Ev=n=>Math.min(1e3*2**n,3e4),HR=[520,503],jb=["GET","HEAD","OPTIONS"];
18var $R=class extends Error{constructor(n){super(n.message),this.name="PostgrestError",this.details=n.details,this.hint=n.hint,this.code=n.code}toJSON(){return{name:this.name,message:this.message,details:this.details,hint:this.hint,code:this.code}}};function Tv(n,e){return new Promise(r=>{if(e?.aborted){r();return}const s=setTimeout(()=>{e?.removeEventListener("abort",o),r()},n);function o(){clearTimeout(s),r()}e?.addEventListener("abort",o)})}function qR(n,e,r,s){return!(!s||r>=Cb||!jb.includes(n)||!HR.includes(e))}var VR=class{constructor(n){var e,r,s,o,u;this.shouldThrowOnError=!1,this.retryEnabled=!0,this.method=n.method,this.url=n.url,this.headers=new Headers(n.headers),this.schema=n.schema,this.body=n.body,this.shouldThrowOnError=(e=n.shouldThrowOnError)!==null&&e!==void 0?e:!1,this.signal=n.signal,this.isMaybeSingle=(r=n.isMaybeSingle)!==null&&r!==void 0?r:!1,this.shouldStripNulls=(s=n.shouldStripNulls)!==null&&s!==void 0?s:!1,this.urlLengthLimit=(o=n.urlLengthLimit)!==null&&o!==void 0?o:8e3,this.retryEnabled=(u=n.retry)!==null&&u!==void 0?u:!0,n.fetch?this.fetch=n.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(n,e){return this.headers=new Headers(this.headers),this.headers.set(n,e),this}retry(n){return this.retryEnabled=n,this}then(n,e){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 c=this.headers.get("Accept");c==="application/vnd.pgrst.object+json"?this.headers.set("Accept","application/vnd.pgrst.object+json;nulls=stripped"):(!c||c==="application/json")&&this.headers.set("Accept","application/vnd.pgrst.array+json;nulls=stripped")}const s=this.fetch;let u=(async()=>{let c=0;for(;;){const m=new Headers(r.headers);c>0&&m.set("X-Retry-Count",String(c));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"||!jb.includes(r.method))throw g;if(r.retryEnabled&&c<Cb){const b=Ev(c);c++,await Tv(b,r.signal);continue}throw g}if(qR(r.method,y.status,c,r.retryEnabled)){var f,p;const g=(f=(p=y.headers)===null||p===void 0?void 0:p.get("Retry-After"))!==null&&f!==void 0?f:null,b=g!==null?Math.max(0,parseInt(g,10)||0)*1e3:Ev(c);await y.text(),c++,await Tv(b,r.signal);continue}return await r.processResponse(y)}})();return this.shouldThrowOnError||(u=u.catch(c=>{var f;let p="",m="",y="";const g=c?.cause;if(g){var b,_,S,A;const M=(b=g?.message)!==null&&b!==void 0?b:"",N=(_=g?.code)!==null&&_!==void 0?_:"";p=`${(S=c?.name)!==null&&S!==void 0?S:"FetchError"}: ${c?.message}`,p+=`
19
20Caused by: ${(A=g?.name)!==null&&A!==void 0?A:"Error"}: ${M}`,N&&(p+=` (${N})`),g?.stack&&(p+=`
21${g.stack}`)}else{var R;p=(R=c?.stack)!==null&&R!==void 0?R:""}const x=this.url.toString().length;return c?.name==="AbortError"||c?.code==="ABORT_ERR"?(y="",m="Request was aborted (timeout or manual cancellation)",x>this.urlLengthLimit&&(m+=`. Note: Your request URL is ${x} 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)",x>this.urlLengthLimit&&(m+=`. Your request URL is ${x} characters. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [200+ IDs])), consider using an RPC function instead.`)),{success:!1,error:{message:`${(f=c?.name)!==null&&f!==void 0?f:"FetchError"}: ${c?.message}`,details:p,hint:m,code:y},data:null,count:null,status:0,statusText:""}}
21)),u.then(n,e)}async processResponse(n){var e=this;let r=null,s=null,o=null,u=n.status,c=n.statusText;if(n.ok){var f,p;if(e.method!=="HEAD"){var m;const b=await n.text();b===""||(e.headers.get("Accept")==="text/csv"||e.headers.get("Accept")&&(!((m=e.headers.get("Accept"))===null||m===void 0)&&m.includes("application/vnd.pgrst.plan+text"))?s=b:s=JSON.parse(b))}const y=(f=e.headers.get("Prefer"))===null||f===void 0?void 0:f.match(/count=(exact|planned|estimated)/),g=(p=n.headers.get("content-range"))===null||p===void 0?void 0:p.split("/");y&&g&&g.length>1&&(o=parseInt(g[1])),e.isMaybeSingle&&Array.isArray(s)&&(s.length>1?(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,u=406,c="Not Acceptable"):s.length===1?s=s[0]:s=null)}else{const y=await n.text();try{r=JSON.parse(y),Array.isArray(r)&&n.status===404&&(s=[],r=null,u=200,c="OK")}catch{n.status===404&&y===""?(u=204,c="No Content"):r={message:y}}if(r&&e.shouldThrowOnError)throw new $R(r)}return{success:r===null,error:r,data:s,count:o,status:u,statusText:c}}returns(){return this}overrideTypes(){return this}},GR=class extends VR{select(n){let e=!1;const r=(n??"*").split("").map(s=>/\s/.test(s)&&!e?"":(s==='"'&&(e=!e),s)).join("");return this.url.searchParams.set("select",r),this.headers.append("Prefer","return=representation"),this}order(n,{ascending:e=!0,nullsFirst:r,foreignTable:s,referencedTable:o=s}={}){const u=o?`${o}.order`:"order",c=this.url.searchParams.get(u);return this.url.searchParams.set(u,`${c?`${c},`:""}${n}.${e?"asc":"desc"}${r===void 0?"":r?".nullsfirst":".nullslast"}`),this}limit(n,{foreignTable:e,referencedTable:r=e}={}){const s=typeof r>"u"?"limit":`${r}.limit`;return this.url.searchParams.set(s,`${n}`),this}range(n,e,{foreignTable:r,referencedTable:s=r}={}){const o=typeof s>"u"?"offset":`${s}.offset`,u=typeof s>"u"?"limit":`${s}.limit`;return this.url.searchParams.set(o,`${n}`),this.url.searchParams.set(u,`${e-n+1}`),this}abortSignal(n){return this.signal=n,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:n=!1,verbose:e=!1,settings:r=!1,buffers:s=!1,wal:o=!1,format:u="text"}={}){var c;const f=[n?"analyze":null,e?"verbose":null,r?"settings":null,s?"buffers":null,o?"wal":null].filter(Boolean).join("|"),p=(c=this.headers.get("Accept"))!==null&&c!==void 0?c:"application/json";return this.headers.set("Accept",`application/vnd.pgrst.plan+${u}; for="${p}"; options=${f};`),u==="json"?this:this}rollback(){return this.headers.append("Prefer","tx=rollback"),this}returns(){return this}maxAffected(n){return this.headers.append("Prefer","handling=strict"),this.headers.append("Prefer",`max-affected=${n}`),this}};const xv=new RegExp("[,()]");var ri=class extends GR{eq(n,e){return this.url.searchParams.append(n,`eq.${e}`),this}neq(n,e){return this.url.searchParams.append(n,`neq.${e}`),this}gt(n,e){return this.url.searchParams.append(n,`gt.${e}`),this}gte(n,e){return this.url.searchParams.append(n,`gte.${e}`),this}lt(n,e){return this.url.searchParams.append(n,`lt.${e}`),this}lte(n,e){return this.url.searchParams.append(n,`lte.${e}`),this}like(n,e){return this.url.searchParams.append(n,`like.${e}`),this}likeAllOf(n,e){return this.url.searchParams.append(n,`like(all).{${e.join(",")}}`),this}likeAnyOf(n,e){return this.url.searchParams.append(n,`like(any).{${e.join(",")}}`),this}ilike(n,e){return this.url.searchParams.append(n,`ilike.${e}`),this}ilikeAllOf(n,e){return this.url.searchParams.append(n,`ilike(all).{${e.join(",")}}`),this}ilikeAnyOf(n,e){return this.url.searchParams.append(n,`ilike(any).{${e.join(",")}}`),this}regexMatch(n,e){return this.url.searchParams.append(n,`match.${e}`),this}regexIMatch(n,e){return this.url.searchParams.append(n,`imatch.${e}`),this}is(n,e){return this.url.searchParams.append(n,`is.${e}`),this}isDistinct(n,e){return this.url.searchParams.append(n,`isdistinct.${e}`),this}in(n,e){const r=Array.from(new Set(e)).map(s=>typeof s=="string"&&xv.test(s)?`"${s}"`:`${s}`).join(",");return this.url.searchParams.append(n,`in.(${r})`),this}notIn(n,e){const r=Array.from(new Set(e)).map(s=>typeof s=="string"&&xv.test(s)?`"${s}"`:`${s}`).join(",");return this.url.searchParams.append(n,`not.in.(${r})`),this}contains(n,e){return typeof e=="string"?this.url.searchParams.append(n,`cs.${e}`):Array.isArray(e)?this.url.searchParams.append(n,`cs.{${e.join(",")}}`):this.url.searchParams.append(n,`cs.${JSON.stringify(e)}`),this}containedBy(n,e){return typeof e=="string"?this.url.searchParams.append(n,`cd.${e}`):Array.isArray(e)?this.url.searchParams.append(n,`cd.{${e.join(",")}}`):this.url.searchParams.append(n,`cd.${JSON.stringify(e)}`),this}rangeGt(n,e){return this.url.searchParams.append(n,`sr.${e}`),this}rangeGte(n,e){return this.url.searchParams.append(n,`nxl.${e}`),this}rangeLt(n,e){return this.url.searchParams.append(n,`sl.${e}`),this}rangeLte(n,e){return this.url.searchParams.append(n,`nxr.${e}`),this}rangeAdjacent(n,e){return this.url.searchParams.append(n,`adj.${e}`),this}overlaps(n,e){return typeof e=="string"?this.url.searchParams.append(n,`ov.${e}`):this.url.searchParams.append(n,`ov.{${e.join(",")}}`),this}textSearch(n,e,{config:r,type:s}={}){let o="";s==="plain"?o="pl":s==="phrase"?o="ph":s==="websearch"&&(o="w");const u=r===void 0?"":`(${r})`;return this.url.searchParams.append(n,`${o}fts${u}.${e}`),this}match(n){return Object.entries(n).filter(([e,r])=>
21r!==void 0).forEach(([e,r])=>{this.url.searchParams.append(e,`eq.${r}`)}),this}not(n,e,r){return this.url.searchParams.append(n,`not.${e}.${r}`),this}or(n,{foreignTable:e,referencedTable:r=e}={}){const s=r?`${r}.or`:"or";return this.url.searchParams.append(s,`(${n})`),this}filter(n,e,r){return this.url.searchParams.append(n,`${e}.${r}`),this}},YR=class{constructor(n,{headers:e={},schema:r,fetch:s,urlLengthLimit:o=8e3,retry:u}){this.url=n,this.headers=new Headers(e),this.schema=r,this.fetch=s,this.urlLengthLimit=o,this.retry=u}cloneRequestState(){return{url:new URL(this.url.toString()),headers:new Headers(this.headers)}}select(n,e){const{head:r=!1,count:s}=e??{},o=r?"HEAD":"GET";let u=!1;const c=(n??"*").split("").map(m=>/\s/.test(m)&&!u?"":(m==='"'&&(u=!u),m)).join(""),{url:f,headers:p}=this.cloneRequestState();return f.searchParams.set("select",c),s&&p.append("Prefer",`count=${s}`),new ri({method:o,url:f,headers:p,schema:this.schema,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}insert(n,{count:e,defaultToNull:r=!0}={}){var s;const o="POST",{url:u,headers:c}=this.cloneRequestState();if(e&&c.append("Prefer",`count=${e}`),r||c.append("Prefer","missing=default"),Array.isArray(n)){const f=n.reduce((p,m)=>p.concat(Object.keys(m)),[]);if(f.length>0){const p=[...new Set(f)].map(m=>`"${m}"`);u.searchParams.set("columns",p.join(","))}}return new ri({method:o,url:u,headers:c,schema:this.schema,body:n,fetch:(s=this.fetch)!==null&&s!==void 0?s:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}upsert(n,{onConflict:e,ignoreDuplicates:r=!1,count:s,defaultToNull:o=!0}={}){var u;const c="POST",{url:f,headers:p}=this.cloneRequestState();if(p.append("Prefer",`resolution=${r?"ignore":"merge"}-duplicates`),e!==void 0&&f.searchParams.set("on_conflict",e),s&&p.append("Prefer",`count=${s}`),o||p.append("Prefer","missing=default"),Array.isArray(n)){const m=n.reduce((y,g)=>y.concat(Object.keys(g)),[]);if(m.length>0){const y=[...new Set(m)].map(g=>`"${g}"`);f.searchParams.set("columns",y.join(","))}}return new ri({method:c,url:f,headers:p,schema:this.schema,body:n,fetch:(u=this.fetch)!==null&&u!==void 0?u:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}update(n,{count:e}={}){var r;const s="PATCH",{url:o,headers:u}=this.cloneRequestState();return e&&u.append("Prefer",`count=${e}`),new ri({method:s,url:o,headers:u,schema:this.schema,body:n,fetch:(r=this.fetch)!==null&&r!==void 0?r:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}delete({count:n}={}){var e;const r="DELETE",{url:s,headers:o}=this.cloneRequestState();return n&&o.append("Prefer",`count=${n}`),new ri({method:r,url:s,headers:o,schema:this.schema,fetch:(e=this.fetch)!==null&&e!==void 0?e:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};function Uo(n){"@babel/helpers - typeof";return Uo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Uo(n)}function KR(n,e){if(Uo(n)!="object"||!n)return n;var r=n[Symbol.toPrimitive];if(r!==void 0){var s=r.call(n,e);if(Uo(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}function ZR(n){var e=KR(n,"string");return Uo(e)=="symbol"?e:e+""}function JR(n,e,r){return(e=ZR(e))in n?Object.defineProperty(n,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):n[e]=r,n}function Rv(n,e){var r=Object.keys(n);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(n);e&&(s=s.filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable})),r.push.apply(r,s)}return r}function cu(n){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Rv(Object(r),!0).forEach(function(s){JR(n,s,r[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):Rv(Object(r)).forEach(function(s){Object.defineProperty(n,s,Object.getOwnPropertyDescriptor(r,s))})}return n}var XR=class Nb{constructor(e,{headers:r={},schema:s,fetch:o,timeout:u,urlLengthLimit:c=8e3,retry:f}={}){this.url=e,this.headers=new Headers(r),this.schemaName=s,this.urlLengthLimit=c;const p=o??globalThis.fetch;u!==void 0&&u>0?this.fetch=(m,y)=>{const g=new AbortController,b=setTimeout(()=>g.abort(),u),_=y?.signal;if(_){if(_.aborted)return clearTimeout(b),p(m,y);const S=()=>{clearTimeout(b),g.abort()};return _.addEventListener("abort",S,{once:!0}),p(m,cu(cu({},y),{},{signal:g.signal})).finally(()=>{clearTimeout(b),_.removeEventListener("abort",S)})}return p(m,cu(cu({},y),{},{signal:g.signal})).finally(()=>clearTimeout(b))}:this.fetch=p,this.retry=f}from(e){if(!e||typeof e!="string"||e.trim()==="")throw new Error("Invalid relation name: relation must be a non-empty string.");return new YR(new URL(`${this.url}/${e}`),{headers:new Headers(this.headers),schema:this.schemaName,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}schema(e){return new Nb(this.url,{headers:this.headers,schema:e,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}rpc(e,r={}
21,{head:s=!1,get:o=!1,count:u}={}){var c;let f;const p=new URL(`${this.url}/rpc/${e}`);let m;const y=_=>_!==null&&typeof _=="object"&&(!Array.isArray(_)||_.some(y)),g=s&&Object.values(r).some(y);g?(f="POST",m=r):s||o?(f=s?"HEAD":"GET",Object.entries(r).filter(([_,S])=>S!==void 0).map(([_,S])=>[_,Array.isArray(S)?`{${S.join(",")}}`:`${S}`]).forEach(([_,S])=>{p.searchParams.append(_,S)})):(f="POST",m=r);const b=new Headers(this.headers);return g?b.set("Prefer",u?`count=${u},return=minimal`:"return=minimal"):u&&b.set("Prefer",`count=${u}`),new ri({method:f,url:p,headers:b,schema:this.schemaName,body:m,fetch:(c=this.fetch)!==null&&c!==void 0?c:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};class FR{constructor(){}static detectEnvironment(){var e;if(typeof WebSocket<"u")return{type:"native",constructor:WebSocket};if(typeof globalThis<"u"&&typeof globalThis.WebSocket<"u")return{type:"native",constructor:globalThis.WebSocket};if(typeof global<"u"&&typeof global.WebSocket<"u")return{type:"native",constructor:global.WebSocket};if(typeof globalThis<"u"&&typeof globalThis.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"&&globalThis.EdgeRuntime||typeof navigator<"u"&&(!((e=navigator.userAgent)===null||e===void 0)&&e.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 r=globalThis.process;if(r){const s=r.versions;if(s&&s.node){const o=s.node,u=parseInt(o.replace(/^v/,"").split(".")[0]);return u>=22?typeof globalThis.WebSocket<"u"?{type:"native",constructor:globalThis.WebSocket}:{type:"unsupported",error:`Node.js ${u} detected but native WebSocket not found.`,workaround:"Provide a WebSocket implementation via the transport option."}:{type:"unsupported",error:`Node.js ${u} detected without native WebSocket support.`,workaround:`For Node.js < 22, install "ws" package and provide it via the transport option:
22import ws from "ws"
23new RealtimeClient(url, { transport: ws })`}}}return{type:"unsupported",error:"Unknown JavaScript runtime without WebSocket support.",workaround:"Ensure you're running in a supported environment (browser, Node.js, Deno) or provide a custom WebSocket implementation."}}static getWebSocketConstructor(){const e=this.detectEnvironment();if(e.constructor)return e.constructor;let r=e.error||"WebSocket not supported in this environment.";throw e.workaround&&(r+=`
24
25Suggested solution: ${e.workaround}`),new Error(r)}static isWebSocketSupported(){try{const e=this.detectEnvironment();return e.type==="native"||e.type==="ws"}catch{return!1}}}const QR="2.105.0",WR=`realtime-js/${QR}`,eA="1.0.0",Mb="2.0.0",tA=Mb,nA=1e4,rA=100,ca={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},Db={close:"phx_close",error:"phx_error",join:"phx_join",leave:"phx_leave",access_token:"access_token"},eh={connecting:"connecting",closing:"closing",closed:"closed"};class aA{constructor(e){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=e??[]}encode(e,r){if(e.event===this.BROADCAST_EVENT&&!(e.payload instanceof ArrayBuffer)&&typeof e.payload.event=="string")return r(this._binaryEncodeUserBroadcastPush(e));let s=[e.join_ref,e.ref,e.topic,e.event,e.payload];return r(JSON.stringify(s))}_binaryEncodeUserBroadcastPush(e){var r;return this._isArrayBuffer((r=e.payload)===null||r===void 0?void 0:r.payload)?this._encodeBinaryUserBroadcastPush(e):this._encodeJsonUserBroadcastPush(e)}_encodeBinaryUserBroadcastPush(e){var r,s;const o=(s=(r=e.payload)===null||r===void 0?void 0:r.payload)!==null&&s!==void 0?s:new ArrayBuffer(0);return this._encodeUserBroadcastPush(e,this.BINARY_ENCODING,o)}_encodeJsonUserBroadcastPush(e){var r,s;const o=(s=(r=e.payload)===null||r===void 0?void 0:r.payload)!==null&&s!==void 0?s:{},c=new TextEncoder().encode(JSON.stringify(o)).buffer;return this._encodeUserBroadcastPush(e,this.JSON_ENCODING,c)}_encodeUserBroadcastPush(e,r,s){var o,u;const c=e.topic,f=(o=e.ref)!==null&&o!==void 0?o:"",p=(u=e.join_ref)!==null&&u!==void 0?u:"",m=e.payload.event,y=this.allowedMetadataKeys?this._pick(e.payload,this.allowedMetadataKeys):{},g=Object.keys(y).length===0?"":JSON.stringify(y);if(p.length>255)throw new Error(`joinRef length ${p.length} exceeds maximum of 255`);if(f.length>255)throw new Error(`ref length ${f.length} exceeds maximum of 255`);if(c.length>255)throw new Error(`topic length ${c.length} exceeds maximum of 255`);if(m.length>255)throw new Error(`userEvent length ${m.length} exceeds maximum of 255`);if(g.length>255)throw new Error(`metadata length ${g.length} exceeds maximum of 255`);const b=this.USER_BROADCAST_PUSH_META_LENGTH+p.length+f.length+c.length+m.length+g.length,_=new ArrayBuffer(this.HEADER_LENGTH+b);let S=new DataView(_),A=0;S.setUint8(A++,this.KINDS.userBroadcastPush),S.setUint8(A++,p.length),S.setUint8(A++,f.length),S.setUint8(A++,c.length),S.setUint8(A++,m.length),S.setUint8(A++,g.length),S.setUint8(A++,r),Array.from(p,x=>S.setUint8(A++,x.charCodeAt(0))),Array.from(f,x=>S.setUint8(A++,x.charCodeAt(0))),Array.from(c,x=>S.setUint8(A++,x.charCodeAt(0))),Array.from(m,x=>S.setUint8(A++,x.charCodeAt(0))),Array.from(g,x=>S.setUint8(A++,x.charCodeAt(0)));var R=new Uint8Array(_.byteLength+s.byteLength);return R.set(new Uint8Array(_),0),R.set(new Uint8Array(s),_.byteLength),R.buffer}decode(e,r){if(this._isArrayBuffer(e)){let s=this._binaryDecode(e);return r(s)}if(typeof e=="string"){const s=JSON.parse(e),[o,u,c,f,p]=s;return r({join_ref:o,ref:u,topic:c,event:f,payload:p})}return r({})}_binaryDecode(e){const r=new DataView(e),s=r.getUint8(0),o=new TextDecoder;if(s===this.KINDS.userBroadcast)return this._decodeUserBroadcast(e,r,o)}_decodeUserBroadcast(e,r,s){const o=r.getUint8(1),u=r.getUint8(2),c=r.getUint8(3),f=r.getUint8(4);let p=this.HEADER_LENGTH+4;const m=s.decode(e.slice(p,p+o));p=p+o;const y=s.decode(e.slice(p,p+u));p=p+u;const g=s.decode(e.slice(p,p+c));p=p+c;const b=e.slice(p,e.byteLength),_=f===this.JSON_ENCODING?JSON.parse(s.decode(b)):b,S={type:this.BROADCAST_EVENT,event:y,payload:_};return c>0&&(S.meta=JSON.parse(g)),{join_ref:null,ref:null,topic:m,event:this.BROADCAST_EVENT,payload:S}}_isArrayBuffer(e){var r;return e instanceof ArrayBuffer||((r=e?.constructor)===null||r===void 0?void 0:r.name)==="ArrayBuffer"}_pick(e,r){return!e||typeof e!="object"?{}:Object.fromEntries(Object.entries(e).filter(([s])=>r.includes(s)))}}var Qe;(function(n){n.abstime="abstime",n.bool="bool",n.date="date",n.daterange="daterange",n.float4="float4",n.float8="float8",n.int2="int2",n.int4="int4",n.int4range="int4range",n.int8="int8",n.int8range="int8range",n.json="json",n.jsonb="jsonb",n.money="money",n.numeric="numeric",n.oid="oid",n.reltime="reltime",n.text="text",n.time="time",n.timestamp="timestamp",n.timestamptz="timestamptz",n.timetz="timetz",n.tsrange="tsrange",n.tstzrange="tstzrange"})(Qe||(Qe={}));const Av=(n,e,r={})=>{var s;const o=(s=r.skipTypes)!==null&&s!==void 0?s:[];return e?Object.keys(e).reduce((u,c)=>(u[c]=sA(c,n,e,o),u),{}):{}},sA=(n,e,r,s)=>{const o=e.find(f=>f.name===n),u=o?.type,c=r[n];return u&&!s.includes(u)?Lb(u,c):th(c)},Lb=(n,e)=>{if(n.charAt(0)==="_"){const r=n.slice(1,n.length);return uA(e,r)}switch(n){case Qe.bool:return iA(e);case Qe.float4:case Qe.float8:case Qe.int2:case Qe.int4:case Qe.int8:case Qe.numeric:case Qe.oid:return oA(e);case Qe.json:case Qe.jsonb:return lA(e);case Qe.timestamp:return cA(e);case Qe.abstime:case Qe.date:case Qe.daterange:case Qe.int4range:case Qe.int8range:case Qe.money:case Qe.reltime:case Qe.text:case Qe.time:case Qe.timestamptz:case Qe.timetz:case Qe.tsrange:case Qe.tstzrange:return th(e);default:return th(e)}},th=n=>n,iA=n=>{switch(n){case"t":return!0;case"f":return!1;default:return n}},oA=n=>{if(typeof n=="string"){const e=parseFloat(n);if(!Number.isNaN(e))return e}return n},lA=n=>{if(typeof n=="string")try{return JSON.parse(n)}catch{return n}return n},uA=(n,e)=>
25{if(typeof n!="string")return n;const r=n.length-1,s=n[r];if(n[0]==="{"&&s==="}"){let u;const c=n.slice(1,r);try{u=JSON.parse("["+c+"]")}catch{u=c?c.split(","):[]}return u.map(f=>Lb(e,f))}return n},cA=n=>typeof n=="string"?n.replace(" ","T"):n,Ub=n=>{const e=new URL(n);return e.protocol=e.protocol.replace(/^ws/i,"http"),e.pathname=e.pathname.replace(/\/+$/,"").replace(/\/socket\/websocket$/i,"").replace(/\/socket$/i,"").replace(/\/websocket$/i,""),e.pathname===""||e.pathname==="/"?e.pathname="/api/broadcast":e.pathname=e.pathname+"/api/broadcast",e.href};var ko=n=>typeof n=="function"?n:function(){return n},dA=typeof self<"u"?self:null,ai=typeof window<"u"?window:null,Wn=dA||ai||globalThis,fA="2.0.0",hA=1e4,pA=1e3,tr={connecting:0,open:1,closing:2,closed:3},nn={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},Rr={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave"},nh={longpoll:"longpoll",websocket:"websocket"},mA={complete:4},rh="base64url.bearer.phx.",du=class{constructor(n,e,r,s){this.channel=n,this.event=e,this.payload=r||function(){return{}},this.receivedResp=null,this.timeout=s,this.timeoutTimer=null,this.recHooks=[],this.sent=!1,this.ref=void 0}resend(n){this.timeout=n,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(n,e){return this.hasReceived(n)&&e(this.receivedResp.response),this.recHooks.push({status:n,callback:e}),this}reset(){this.cancelRefEvent(),this.ref=null,this.refEvent=null,this.receivedResp=null,this.sent=!1}destroy(){this.cancelRefEvent(),this.cancelTimeout()}matchReceive({status:n,response:e,_ref:r}){this.recHooks.filter(s=>s.status===n).forEach(s=>s.callback(e))}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,n=>{this.cancelRefEvent(),this.cancelTimeout(),this.receivedResp=n,this.matchReceive(n)}),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}hasReceived(n){return this.receivedResp&&this.receivedResp.status===n}trigger(n,e){this.channel.trigger(this.refEvent,{status:n,response:e})}},zb=class{constructor(n,e){this.callback=n,this.timerCalc=e,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))}},gA=class{constructor(n,e,r){this.state=nn.closed,this.topic=n,this.params=ko(e||{}),this.socket=r,this.bindings=[],this.bindingRef=0,this.timeout=this.socket.timeout,this.joinedOnce=!1,this.joinPush=new du(this,Rr.join,this.params,this.timeout),this.pushBuffer=[],this.stateChangeRefs=[],this.rejoinTimer=new zb(()=>{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=nn.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(s=>s.send()),this.pushBuffer=[]}),this.joinPush.receive("error",s=>{this.state=nn.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=nn.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=nn.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 du(this,Rr.leave,ko({}),this.timeout).send(),this.state=nn.errored,this.joinPush.reset(),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.on(Rr.reply,(s,o)=>{this.trigger(this.replyEventName(o),s)})}join(n=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=n,this.joinedOnce=!0,this.rejoin(),this.joinPush}teardown(){this.pushBuffer.forEach(n=>n.destroy()),this.pushBuffer=[],this.rejoinTimer.reset(),this.joinPush.destroy(),this.state=nn.closed,this.bindings=[]}onClose(n){this.on(Rr.close,n)}onError(n){return this.on(Rr.error,e=>n(e))}on(n,e){let r=this.bindingRef++;return this.bindings.push({event:n,ref:r,callback:e}),r}off(n,e){this.bindings=this.bindings.filter(r=>!(r.event===n&&(typeof e>"u"||e===r.ref)))}canPush(){return this.socket.isConnected()&&this.isJoined()}push(n,e,r=this.timeout){if(e=e||{},!this.joinedOnce)throw new Error(`tried to push '${n}' to '${this.topic}' before joining. Use channel.join() before pushing events`);let s=new du(this,n,function(){return e},r);return this.canPush()?s.send():(s.startTimeout(),this.pushBuffer.push(s)),s}leave(n=this.timeout){this.rejoinTimer.reset(),this.joinPush.cancelTimeout(),this.state=nn.leav
vendor: 4,098 bytes, line 25
25ing;let e=()=>{this.socket.hasLogger()&&this.socket.log("channel",`leave ${this.topic}`),this.trigger(Rr.close,"leave")},r=new du(this,Rr.leave,ko({}),n);return r.receive("ok",()=>e()).receive("timeout",()=>e()),r.send(),this.canPush()||r.trigger("ok",{}),r}onMessage(n,e,r){return e}filterBindings(n,e,r){return!0}isMember(n,e,r,s){return this.topic!==n?!1:s&&s!==this.joinRef()?(this.socket.hasLogger()&&this.socket.log("channel","dropping outdated message",{topic:n,event:e,payload:r,joinRef:s}),!1):!0}joinRef(){return this.joinPush.ref}rejoin(n=this.timeout){this.isLeaving()||(this.socket.leaveOpenTopic(this.topic),this.state=nn.joining,this.joinPush.resend(n))}trigger(n,e,r,s){let o=this.onMessage(n,e,r,s);if(e&&!o)throw new Error("channel onMessage callbacks must return the payload, modified or unmodified");let u=this.bindings.filter(c=>c.event===n&&this.filterBindings(c,e,r));for(let c=0;c<u.length;c++)u[c].callback(o,r,s||this.joinRef())}replyEventName(n){return`chan_reply_${n}`}isClosed(){return this.state===nn.closed}isErrored(){return this.state===nn.errored}isJoined(){return this.state===nn.joined}isJoining(){return this.state===nn.joining}isLeaving(){return this.state===nn.leaving}},Du=class{static request(n,e,r,s,o,u,c){if(Wn.XDomainRequest){let f=new Wn.XDomainRequest;return this.xdomainRequest(f,n,e,s,o,u,c)}else if(Wn.XMLHttpRequest){let f=new Wn.XMLHttpRequest;return this.xhrRequest(f,n,e,r,s,o,u,c)}else{if(Wn.fetch&&Wn.AbortController)return this.fetchRequest(n,e,r,s,o,u,c);throw new Error("No suitable XMLHttpRequest implementation found")}}static fetchRequest(n,e,r,s,o,u,c){let f={method:n,headers:r,body:s},p=null;return o&&(p=new AbortController,setTimeout(()=>p.abort(),o),f.signal=p.signal),Wn.fetch(e,f).then(m=>m.text()).then(m=>this.parseJSON(m)).then(m=>c&&c(m)).catch(m=>{m.name==="AbortError"&&u?u():c&&c(null)}),p}static xdomainRequest(n,e,r,s,o,u,c){return n.timeout=o,n.open(e,r),n.onload=()=>{let f=this.parseJSON(n.responseText);c&&c(f)},u&&(n.ontimeout=u),n.onprogress=()=>{},n.send(s),n}static xhrRequest(n,e,r,s,o,u,c,f){n.open(e,r,!0),n.timeout=u;for(let[p,m]of Object.entries(s))n.setRequestHeader(p,m);return n.onerror=()=>f&&f(null),n.onreadystatechange=()=>{if(n.readyState===mA.complete&&f){let p=this.parseJSON(n.responseText);f(p)}},c&&(n.ontimeout=c),n.send(o),n}static parseJSON(n){if(!n||n==="")return null;try{return JSON.parse(n)}catch{return console&&console.log("failed to parse JSON response",n),null}}static serialize(n,e){let r=[];for(var s in n){if(!Object.prototype.hasOwnProperty.call(n,s))continue;let o=e?`${e}[${s}]`:s,u=n[s];typeof u=="object"?r.push(this.serialize(u,o)):r.push(encodeURIComponent(o)+"="+encodeURIComponent(u))}return r.join("&")}static appendParams(n,e){if(Object.keys(e).length===0)return n;let r=n.match(/\?/)?"&":"?";return`${n}${r}${this.serialize(e)}`}},yA=n=>{let e="",r=new Uint8Array(n),s=r.byteLength;for(let o=0;o<s;o++)e+=String.fromCharCode(r[o]);return btoa(e)},Fs=class{constructor(n,e){e&&e.length===2&&e[1].startsWith(rh)&&(this.authToken=atob(e[1].slice(rh.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(n),this.readyState=tr.connecting,setTimeout(()=>this.poll(),0)}normalizeEndpoint(n){return n.replace("ws://","http://").replace("wss://","https://").replace(new RegExp("(.*)/"+nh.websocket),"$1/"+nh.longpoll)}endpointURL(){return Du.appendParams(this.pollEndpoint,{token:this.token})}closeAndRetry(n,e,r){this.close(n,e,r),this.readyState=tr.connecting}ontimeout(){this.onerror("timeout"),this.closeAndRetry(1005,"timeout",!1)}isActive(){return this.readyState===tr.open||this.readyState===tr.connecting}poll(){const n={Accept:"application/json"};this.authToken&&(n["X-Phoenix-AuthToken"]=this.authToken),this.ajax("GET",n,null,()=>this.ontimeout(),e=>{if(e){var{status:r,token:s,messages:o}=e;
25if(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(u=>{setTimeout(()=>this.onmessage({data:u}),0)}),this.poll();break;case 204:this.poll();break;case 410:this.readyState=tr.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(n){typeof n!="string"&&(n=yA(n)),this.currentBatch?this.currentBatch.push(n):this.awaitingBatchAck?this.batchBuffer.push(n):(this.currentBatch=[n],this.currentBatchTimer=setTimeout(()=>{this.batchSend(this.currentBatch),this.currentBatch=null},0))}batchSend(n){this.awaitingBatchAck=!0,this.ajax("POST",{"Content-Type":"application/x-ndjson"},n.join(`
26`),()=>this.onerror("timeout"),e=>{this.awaitingBatchAck=!1,!e||e.status!==200?(this.onerror(e&&e.status),this.closeAndRetry(1011,"internal server error",!1)):this.batchBuffer.length>0&&(this.batchSend(this.batchBuffer),this.batchBuffer=[])})}close(n,e,r){for(let o of this.reqs)o.abort();this.readyState=tr.closed;let s=Object.assign({code:1e3,reason:void 0,wasClean:!0},{code:n,reason:e,wasClean:r});this.batchBuffer=[],clearTimeout(this.currentBatchTimer),this.currentBatchTimer=null,typeof CloseEvent<"u"?this.onclose(new CloseEvent("close",s)):this.onclose(s)}ajax(n,e,r,s,o){let u,c=()=>{this.reqs.delete(u),s()};u=Du.request(n,this.endpointURL(),e,r,this.timeout,c,f=>{this.reqs.delete(u),this.isActive()&&o(f)}),this.reqs.add(u)}},vA=class Ro{constructor(e,r={}){let s=r.events||{state:"presence_state",diff:"presence_diff"};this.state={},this.pendingDiffs=[],this.channel=e,this.joinRef=null,this.caller={onJoin:function(){},onLeave:function(){},onSync:function(){}},this.channel.on(s.state,o=>{let{onJoin:u,onLeave:c,onSync:f}=this.caller;this.joinRef=this.channel.joinRef(),this.state=Ro.syncState(this.state,o,u,c),this.pendingDiffs.forEach(p=>{this.state=Ro.syncDiff(this.state,p,u,c)}),this.pendingDiffs=[],f()}),this.channel.on(s.diff,o=>{let{onJoin:u,onLeave:c,onSync:f}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(o):(this.state=Ro.syncDiff(this.state,o,u,c),f())})}onJoin(e){this.caller.onJoin=e}onLeave(e){this.caller.onLeave=e}onSync(e){this.caller.onSync=e}list(e){return Ro.list(this.state,e)}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel.joinRef()}static syncState(e,r,s,o){let u=this.clone(e),c={},f={};return this.map(u,(p,m)=>{r[p]||(f[p]=m)}),this.map(r,(p,m)=>{let y=u[p];if(y){let g=m.metas.map(A=>A.phx_ref),b=y.metas.map(A=>A.phx_ref),_=m.metas.filter(A=>b.indexOf(A.phx_ref)<0),S=y.metas.filter(A=>g.indexOf(A.phx_ref)<0);_.length>0&&(c[p]=m,c[p].metas=_),S.length>0&&(f[p]=this.clone(y),f[p].metas=S)}else c[p]=m}),this.syncDiff(u,{joins:c,leaves:f},s,o)}static syncDiff(e,r,s,o){let{joins:u,leaves:c}=this.clone(r);return s||(s=function(){}),o||(o=function(){}),this.map(u,(f,p)=>{let m=e[f];if(e[f]=this.clone(p),m){let y=e[f].metas.map(b=>b.phx_ref),g=m.metas.filter(b=>y.indexOf(b.phx_ref)<0);e[f].metas.unshift(...g)}s(f,m,p)}),this.map(c,(f,p)=>{let m=e[f];if(!m)return;let y=p.metas.map(g=>g.phx_ref);m.metas=m.metas.filter(g=>y.indexOf(g.phx_ref)<0),o(f,m,p),m.metas.length===0&&delete e[f]}),e}static list(e,r){return r||(r=function(s,o){return o}),this.map(e,(s,o)=>r(s,o))}static map(e,r){return Object.getOwnPropertyNames(e).map(s=>r(s,e[s]))}static clone(e){return JSON.parse(JSON.stringify(e))}},fu={HEADER_LENGTH:1,META_LENGTH:4,KINDS:{push:0,reply:1,broadcast:2},encode(n,e){if(n.payload.constructor===ArrayBuffer)return e(this.binaryEncode(n));{let r=[n.join_ref,n.ref,n.topic,n.event,n.payload];return e(JSON.stringify(r))}},decode(n,e){if(n.constructor===ArrayBuffer)return e(this.binaryDecode(n));{let[r,s,o,u,c]=JSON.parse(n);return e({join_ref:r,ref:s,topic:o,event:u,payload:c})}},binaryEncode(n){let{join_ref:e,ref:r,event:s,topic:o,payload:u}=n,c=this.META_LENGTH+e.length+r.length+o.length+s.length,f=new ArrayBuffer(this.HEADER_LENGTH+c),p=new DataView(f),m=0;p.setUint8(m++,this.KINDS.push),p.setUint8(m++,e.length),p.setUint8(m++,r.length),p.setUint8(m++,o.length),p.setUint8(m++,s.length),Array.from(e,g=>p.setUint8(m++,g.charCodeAt(0))),Array.from(r,g=>p.setUint8(m++,g.charCodeAt(0))),Array.from(o,g=>p.setUint8(m++,g.charCodeAt(0))),Array.from(s,g=>p.setUint8(m++,g.charCodeAt(0)));var y=new Uint8Array(f.byteLength+u.byteLength);return y.set(new Uint8Array(f),0),y.set(new Uint8Array(u),f.byteLength),y.buffer},binaryDecode(n){let e=new DataView(n),r=e.getUint8(0),s=new TextDecoder;switch(r){case this.KINDS.push:return this.decodePush(n,e,s);case this.KINDS.reply:return this.decodeReply(n,e,s);case this.KINDS.broadcast:return this.decodeBroadcast(n,e,s)}},decodePush(n,e,r){let s=e.getUint8(1),o=e.getUint8(2),u=e.getUint8(3),c=this.HEADER_LENGTH+this.META_LENGTH-1,f=r.decode(n.slice(c,c+s));c=c+s;
26let p=r.decode(n.slice(c,c+o));c=c+o;let m=r.decode(n.slice(c,c+u));c=c+u;let y=n.slice(c,n.byteLength);return{join_ref:f,ref:null,topic:p,event:m,payload:y}},decodeReply(n,e,r){let s=e.getUint8(1),o=e.getUint8(2),u=e.getUint8(3),c=e.getUint8(4),f=this.HEADER_LENGTH+this.META_LENGTH,p=r.decode(n.slice(f,f+s));f=f+s;let m=r.decode(n.slice(f,f+o));f=f+o;let y=r.decode(n.slice(f,f+u));f=f+u;let g=r.decode(n.slice(f,f+c));f=f+c;let b=n.slice(f,n.byteLength),_={status:g,response:b};return{join_ref:p,ref:m,topic:y,event:Rr.reply,payload:_}},decodeBroadcast(n,e,r){let s=e.getUint8(1),o=e.getUint8(2),u=this.HEADER_LENGTH+2,c=r.decode(n.slice(u,u+s));u=u+s;let f=r.decode(n.slice(u,u+o));u=u+o;let p=n.slice(u,n.byteLength);return{join_ref:null,ref:null,topic:c,event:f,payload:p}}},bA=class{constructor(n,e={}){this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.channels=[],this.sendBuffer=[],this.ref=0,this.fallbackRef=null,this.timeout=e.timeout||hA,this.transport=e.transport||Wn.WebSocket||Fs,this.conn=void 0,this.primaryPassedHealthCheck=!1,this.longPollFallbackMs=e.longPollFallbackMs,this.fallbackTimer=null,this.sessionStore=e.sessionStorage||Wn&&Wn.sessionStorage,this.establishedConnections=0,this.defaultEncoder=fu.encode.bind(fu),this.defaultDecoder=fu.decode.bind(fu),this.closeWasClean=!0,this.disconnecting=!1,this.binaryType=e.binaryType||"arraybuffer",this.connectClock=1,this.pageHidden=!1,this.encode=void 0,this.decode=void 0,this.transport!==Fs?(this.encode=e.encode||this.defaultEncoder,this.decode=e.decode||this.defaultDecoder):(this.encode=this.defaultEncoder,this.decode=this.defaultDecoder);let r=null;ai&&ai.addEventListener&&(ai.addEventListener("pagehide",s=>{this.conn&&(this.disconnect(),r=this.connectClock)}),ai.addEventListener("pageshow",s=>{r===this.connectClock&&(r=null,this.connect())}),ai.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"?this.pageHidden=!0:(this.pageHidden=!1,!this.isConnected()&&!this.closeWasClean&&this.teardown(()=>this.connect()))})),this.heartbeatIntervalMs=e.heartbeatIntervalMs||3e4,this.autoSendHeartbeat=e.autoSendHeartbeat??!0,this.heartbeatCallback=e.heartbeatCallback??(()=>{}),this.rejoinAfterMs=s=>e.rejoinAfterMs?e.rejoinAfterMs(s):[1e3,2e3,5e3][s-1]||1e4,this.reconnectAfterMs=s=>e.reconnectAfterMs?e.reconnectAfterMs(s):[10,50,100,150,200,250,500,1e3,2e3][s-1]||5e3,this.logger=e.logger||null,!this.logger&&e.debug&&(this.logger=(s,o,u)=>{console.log(`${s}: ${o}`,u)}),this.longpollerTimeout=e.longpollerTimeout||2e4,this.params=ko(e.params||{}),this.endPoint=`${n}/${nh.websocket}`,this.vsn=e.vsn||fA,this.heartbeatTimeoutTimer=null,this.heartbeatTimer=null,this.heartbeatSentAt=null,this.pendingHeartbeatRef=null,this.reconnectTimer=new zb(()=>{if(this.pageHidden){this.log("Not reconnecting as page is hidden!"),this.teardown();return}this.teardown(async()=>{e.beforeReconnect&&await e.beforeReconnect(),this.connect()})},this.reconnectAfterMs),this.authToken=e.authToken}getLongPollTransport(){return Fs}replaceTransport(n){this.connectClock++,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.conn&&(this.conn.close(),this.conn=null),this.transport=n}protocol(){return location.protocol.match(/^https/)?"wss":"ws"}endPointURL(){let n=Du.appendParams(Du.appendParams(this.endPoint,this.params()),{vsn:this.vsn});return n.charAt(0)!=="/"?n:n.charAt(1)==="/"?`${this.protocol()}:${n}`:`${this.protocol()}://${location.host}${n}`}disconnect(n,e,r){this.connectClock++,this.disconnecting=!0,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.teardown(()=>{this.disconnecting=!1,n&&n()},e,r)}connect(n){n&&(console&&console.log("passing params to connect is deprecated. Instead pass :params to the Socket constructor"),this.params=ko(n)),!(this.conn&&!this.disconnecting)&&(this.longPollFallbackMs&&this.transport!==Fs?this.connectWithF
vendor: 4,313 bytes, line 26
26allback(Fs,this.longPollFallbackMs):this.transportConnect())}log(n,e,r){this.logger&&this.logger(n,e,r)}hasLogger(){return this.logger!==null}onOpen(n){let e=this.makeRef();return this.stateChangeCallbacks.open.push([e,n]),e}onClose(n){let e=this.makeRef();return this.stateChangeCallbacks.close.push([e,n]),e}onError(n){let e=this.makeRef();return this.stateChangeCallbacks.error.push([e,n]),e}onMessage(n){let e=this.makeRef();return this.stateChangeCallbacks.message.push([e,n]),e}onHeartbeat(n){this.heartbeatCallback=n}ping(n){if(!this.isConnected())return!1;let e=this.makeRef(),r=Date.now();this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:e});let s=this.onMessage(o=>{o.ref===e&&(this.off([s]),n(Date.now()-r))});return!0}transportName(n){return n===Fs?"LongPoll":n.name}transportConnect(){this.connectClock++,this.closeWasClean=!1;let n;this.authToken&&(n=["phoenix",`${rh}${btoa(this.authToken).replace(/=/g,"")}`]),this.conn=new this.transport(this.endPointURL(),n),this.conn.binaryType=this.binaryType,this.conn.timeout=this.longpollerTimeout,this.conn.onopen=()=>this.onConnOpen(),this.conn.onerror=e=>this.onConnError(e),this.conn.onmessage=e=>this.onConnMessage(e),this.conn.onclose=e=>this.onConnClose(e)}getSession(n){return this.sessionStore&&this.sessionStore.getItem(n)}storeSession(n,e){this.sessionStore&&this.sessionStore.setItem(n,e)}connectWithFallback(n,e=2500){clearTimeout(this.fallbackTimer);let r=!1,s=!0,o,u,c=this.transportName(n),f=p=>{this.log("transport",`falling back to ${c}...`,p),this.off([o,u]),s=!1,this.replaceTransport(n),this.transportConnect()};if(this.getSession(`phx:fallback:${c}`))return f("memorized");this.fallbackTimer=setTimeout(f,e),u=this.onError(p=>{this.log("transport","error",p),s&&!r&&(clearTimeout(this.fallbackTimer),f(p))}),this.fallbackRef&&this.off([this.fallbackRef]),this.fallbackRef=this.onOpen(()=>{if(r=!0,!s){let p=this.transportName(n);return this.primaryPassedHealthCheck||this.storeSession(`phx:fallback:${p}`,"true"),this.log("transport",`established ${p} fallback`)}clearTimeout(this.fallbackTimer),this.fallbackTimer=setTimeout(f,e),this.ping(p=>{this.log("transport","connected to primary after",p),this.primaryPassedHealthCheck=!0,clearTimeout(this.fallbackTimer)})}),this.transportConnect()}clearHeartbeats(){clearTimeout(this.heartbeatTimer),clearTimeout(this.heartbeatTimeoutTimer)}onConnOpen(){this.hasLogger()&&this.log("transport",`connected to ${this.endPointURL()}`),this.closeWasClean=!1,this.disconnecting=!1,this.establishedConnections++,this.flushSendBuffer(),this.reconnectTimer.reset(),this.autoSendHeartbeat&&this.resetHeartbeat(),this.triggerStateCallbacks("open")}heartbeatTimeout(){if(this.pendingHeartbeatRef){this.pendingHeartbeatRef=null,this.heartbeatSentAt=null,this.hasLogger()&&this.log("transport","heartbeat timeout. Attempting to re-establish connection");try{this.heartbeatCallback("timeout")}catch(n){this.log("error","error in heartbeat callback",n)}this.triggerChanError(),this.closeWasClean=!1,this.teardown(()=>this.reconnectTimer.scheduleTimeout(),pA,"heartbeat timeout")}}resetHeartbeat(){this.conn&&this.conn.skipHeartbeat||(this.pendingHeartbeatRef=null,this.clearHeartbeats(),this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}teardown(n,e,r){if(!this.conn)return n&&n();const s=this.conn;this.waitForBufferDone(s,()=>{e?s.close(e,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),n&&n()})})}waitForBufferDone(n,e,r=1){if(r===5||!n.bufferedAmount){e();return}setTimeout(()=>{this.waitForBufferDone(n,e,r+1)},150*r)}waitForSocketClosed(n,e,r=1){if(r===5||n.readyState===tr.closed){e();return}setTimeout(()=>{this.waitForSocketClosed(n,e,r+1)},150*r)}onConnClose(n){this.conn&&(this.conn.onclose=()=>{}),this.hasLogger()&&this.log("transport","close",n),this.triggerChanError(),this.clearHeartbeats(),this.closeWasClean||this.reconnectTimer.scheduleTimeout(),this.triggerStateCallbacks("close",n)}onConnError(n){this.hasLogger()&&this.log("transport",n);let e=this.transport,r=this.establishedConnections;this.triggerStateCallbacks("error",n,e,r),(e===this.transport||r>0)&&this.triggerChanError()}
26triggerChanError(){this.channels.forEach(n=>{n.isErrored()||n.isLeaving()||n.isClosed()||n.trigger(Rr.error)})}connectionState(){switch(this.conn&&this.conn.readyState){case tr.connecting:return"connecting";case tr.open:return"open";case tr.closing:return"closing";default:return"closed"}}isConnected(){return this.connectionState()==="open"}remove(n){this.off(n.stateChangeRefs),this.channels=this.channels.filter(e=>e!==n)}off(n){for(let e in this.stateChangeCallbacks)this.stateChangeCallbacks[e]=this.stateChangeCallbacks[e].filter(([r])=>n.indexOf(r)===-1)}channel(n,e={}){let r=new gA(n,e,this);return this.channels.push(r),r}push(n){if(this.hasLogger()){let{topic:e,event:r,payload:s,ref:o,join_ref:u}=n;this.log("push",`${e} ${r} (${u}, ${o})`,s)}this.isConnected()?this.encode(n,e=>this.conn.send(e)):this.sendBuffer.push(()=>this.encode(n,e=>this.conn.send(e)))}makeRef(){let n=this.ref+1;return n===this.ref?this.ref=0:this.ref=n,this.ref.toString()}sendHeartbeat(){if(!this.isConnected()){try{this.heartbeatCallback("disconnected")}catch(n){this.log("error","error in heartbeat callback",n)}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(n){this.log("error","error in heartbeat callback",n)}this.heartbeatTimeoutTimer=setTimeout(()=>this.heartbeatTimeout(),this.heartbeatIntervalMs)}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(n=>n()),this.sendBuffer=[])}onConnMessage(n){this.decode(n.data,e=>{let{topic:r,event:s,payload:o,ref:u,join_ref:c}=e;if(u&&u===this.pendingHeartbeatRef){const f=this.heartbeatSentAt?Date.now()-this.heartbeatSentAt:void 0;this.clearHeartbeats();try{this.heartbeatCallback(o.status==="ok"?"ok":"error",f)}catch(p){this.log("error","error in heartbeat callback",p)}this.pendingHeartbeatRef=null,this.heartbeatSentAt=null,this.autoSendHeartbeat&&(this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}this.hasLogger()&&this.log("receive",`${o.status||""} ${r} ${s} ${u&&"("+u+")"||""}`.trim(),o);for(let f=0;f<this.channels.length;f++){const p=this.channels[f];p.isMember(r,s,o,c)&&p.trigger(s,o,u,c)}this.triggerStateCallbacks("message",e)})}triggerStateCallbacks(n,...e){try{this.stateChangeCallbacks[n].forEach(([r,s])=>{try{s(...e)}catch(o){this.log("error",`error in ${n} callback`,o)}})}catch(r){this.log("error",`error triggering ${n} callbacks`,r)}}leaveOpenTopic(n){let e=this.channels.find(r=>r.topic===n&&(r.isJoined()||r.isJoining()));e&&(this.hasLogger()&&this.log("transport",`leaving duplicate topic "${n}"`),e.leave())}};class Co{constructor(e,r){const s=wA(r);this.presence=new vA(e.getChannel(),s),this.presence.onJoin((o,u,c)=>{const f=Co.onJoinPayload(o,u,c);e.getChannel().trigger("presence",f)}),this.presence.onLeave((o,u,c)=>{const f=Co.onLeavePayload(o,u,c);e.getChannel().trigger("presence",f)}),this.presence.onSync(()=>{e.getChannel().trigger("presence",{event:"sync"})})}get state(){return Co.transformState(this.presence.state)}static transformState(e){return e=_A(e),Object.getOwnPropertyNames(e).reduce((r,s)=>{const o=e[s];return r[s]=xu(o),r},{})}static onJoinPayload(e,r,s){const o=Ov(r),u=xu(s);return{event:"join",key:e,currentPresences:o,newPresences:u}}static onLeavePayload(e,r,s){const o=Ov(r),u=xu(s);return{event:"leave",key:e,currentPresences:o,leftPresences:u}}}function xu(n){return n.metas.map(e=>(e.presence_ref=e.phx_ref,delete e.phx_ref,delete e.phx_ref_prev,e))}function _A(n){return JSON.parse(JSON.stringify(n))}function wA(n){return n?.events&&{events:n.events}}function Ov(n){return n?.metas?xu(n):[]}var kv;(function(n){n.SYNC="sync",n.JOIN="join",n.LEAVE="leave"})(kv||(kv={}));class SA{get state(){return this.presenceAdapter.state}constructor(e,r){this.channel=e,this.presenceAdapter=new Co(this.channel.channelAdapter,r)}}class EA{constructor(e,r,s){const o=TA(s);this.channel=e.getSocket().channel(r,o),this.socket=e}get state(){return this.channel.state}set state(e){this.channel.state=e}get joinedOnce(){return this.channel.joinedOnce}get joinPush(){return this.channel.joinPush}get rejoinTimer(){return this.channel.rejoinTimer}on(e,r){return this.channel.on(e,r)}off(e,r){this.channel.off(e,r)}subscribe(e){return this.channel.join(e)}unsubscribe(e){return this.channel.leave(e)}teardown(){this.channel.teardown()}onClose(e){this.channel.onClose(e)}onError(e){return this.channel.onError(e)}push(e,r,s){let o;try{o=this.channel.push(e,r,s)}catch{throw new Error(`tried to push '${e}' to '${this.channel.topic}' before joining. Use channel.subscribe() before pushing events`)}if(this.channel.pushBuffer.length>rA){const u=this.channel.pushBuffer.shift();u.cancelTimeout(),this.socket.log("channel",`discarded push due to buffer overflow: ${u.event}`,u.payload())}return o}updateJoinPayload(e){const r=this.channel.joinPush.payload();this.channel.joinPush.payload=()=>Object.assign(Object.assign({},r),e)}canPush(){return this.socket.isConnected()&&this.state===ca.joined}isJoined(){return this.state===ca.joined}isJoining(){return this.state===ca.joining}isClosed(){return this.state===ca.closed}isLeaving(){return this.state===ca.leaving}updateFilterBindings(e){this.channel.filterBindings=e}updatePayloadTransform(e){this.channel.onMessage=e}getChannel(){return this.channel}}function TA(n){return{config:Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},n.config)}}var Cv;(function(n){n.ALL="*",n.INSERT="INSERT",n.UPDATE="UPDATE",n.DELETE="DELETE"})(Cv||(Cv={}));var ui;(function(n){n.BROADCAST="broadcast",n.PRESENCE="presence",n.POSTGRES_CHANGES="postgres_changes",n.SYSTEM="system"})(ui||(ui={}));var Ar;(function(n){n.SUBSCRIBED="SUBSCRIBED",n.TIMED_OUT="TIMED_OUT",n.CLOSED="CLOSED",n.CHANNEL_ERROR="CHANNEL_ERROR"})(Ar||(Ar={}));
26class jo{get state(){return this.channelAdapter.state}set state(e){this.channelAdapter.state=e}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(e,r={config:{}},s){var o,u;if(this.topic=e,this.params=r,this.socket=s,this.bindings={},this.subTopic=e.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},r.config),this.channelAdapter=new EA(this.socket.socketAdapter,e,this.params),this.presence=new SA(this),this._onClose(()=>{this.socket._remove(this)}),this._updateFilterTransform(),this.broadcastEndpointURL=Ub(this.socket.socketAdapter.endPointURL()),this.private=this.params.config.private||!1,!this.private&&(!((u=(o=this.params.config)===null||o===void 0?void 0:o.broadcast)===null||u===void 0)&&u.replay))throw new Error(`tried to use replay on public channel '${this.topic}'. It must be a private channel.`)}subscribe(e,r=this.timeout){var s,o,u;if(this.socket.isConnected()||this.socket.connect(),this.channelAdapter.isClosed()){const{config:{broadcast:c,presence:f,private:p}}=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[ui.PRESENCE]&&this.bindings[ui.PRESENCE].length>0||((u=this.params.config.presence)===null||u===void 0?void 0:u.enabled)===!0,g={},b={broadcast:c,presence:Object.assign(Object.assign({},f),{enabled:y}),postgres_changes:m,private:p};this.socket.accessTokenValue&&(g.access_token=this.socket.accessTokenValue),this._onError(_=>{e?.(Ar.CHANNEL_ERROR,_)}),this._onClose(()=>e?.(Ar.CLOSED)),this.updateJoinPayload(Object.assign({config:b},g)),this._updateFilterMessage(),this.channelAdapter.subscribe(r).receive("ok",async({postgres_changes:_})=>{if(this.socket._isManualToken()||this.socket.setAuth(),_===void 0){e?.(Ar.SUBSCRIBED);return}this._updatePostgresBindings(_,e)}).receive("error",_=>{this.state=ca.errored,e?.(Ar.CHANNEL_ERROR,new Error(JSON.stringify(Object.values(_).join(", ")||"error")))}).receive("timeout",()=>{e?.(Ar.TIMED_OUT)})}return this}_updatePostgresBindings(e,r){var s;const o=this.bindings.postgres_changes,u=(s=o?.length)!==null&&s!==void 0?s:0,c=[];for(let f=0;f<u;f++){const p=o[f],{filter:{event:m,schema:y,table:g,filter:b}}=p,_=e&&e[f];if(_&&_.event===m&&jo.isFilterValueEqual(_.schema,y)&&jo.isFilterValueEqual(_.table,g)&&jo.isFilterValueEqual(_.filter,b))c.push(Object.assign(Object.assign({},p),{id:_.id}));else{this.unsubscribe(),this.state=ca.errored,r?.(Ar.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=c,this.state!=ca.errored&&r&&r(Ar.SUBSCRIBED)}presenceState(){return this.presence.state}async track(e,r={}){return await this.send({type:"presence",event:"track",payload:e},r.timeout||this.timeout)}async untrack(e={}){return await this.send({type:"presence",event:"untrack"},e)}on(e,r,s){const o=this.channelAdapter.isJoined()||this.channelAdapter.isJoining(),u=e===ui.PRESENCE||e===ui.POSTGRES_CHANGES;if(o&&u)throw this.socket.log("channel",`cannot add \`${e}\` callbacks for ${this.topic} after \`subscribe()\`.`),new Error(`cannot add \`${e}\` callbacks for ${this.topic} after \`subscribe()\`.`);return this._on(e,r,s)}async httpSend(e,r,s={}){var o;if(r==null)return Promise.reject(new Error("Payload is required for httpSend()"));const u={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(u.Authorization=`Bearer ${this.socket.accessTokenValue}`);const c={method:"POST",headers:u,body:JSON.stringify({messages:[{topic:this.subTopic,event:e,payload:r,private:this.private}]})},f=await this._fetchWithTimeout(this.broadcastEndpointURL,c,(o=s.timeout)!==null&&o!==void 0?o:this.timeout);if(f.status===202)return{success:!0};let p=f.statusText;try{const m=await f.json();p=m.error||m.message||p}catch{}return Promise.reject(new Error(p))}async send(e,r={}){var s,o;if(!this.channelAdapter.canPush()&&e.type==="broadcast"){console.warn("Realtime send() is automatically falling back to REST API. This behavior will be deprecated 
26in the future. Please use httpSend() explicitly for REST delivery.");const{event:u,payload:c}=e,f={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(f.Authorization=`Bearer ${this.socket.accessTokenValue}`);const p={method:"POST",headers:f,body:JSON.stringify({messages:[{topic:this.subTopic,event:u,payload:c,private:this.private}]})};try{const m=await this._fetchWithTimeout(this.broadcastEndpointURL,p,(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.name==="AbortError"?"timed out":"error"}}else return new Promise(u=>{var c,f,p;const m=this.channelAdapter.push(e.type,e,r.timeout||this.timeout);e.type==="broadcast"&&!(!((p=(f=(c=this.params)===null||c===void 0?void 0:c.config)===null||f===void 0?void 0:f.broadcast)===null||p===void 0)&&p.ack)&&u("ok"),m.receive("ok",()=>u("ok")),m.receive("error",()=>u("error")),m.receive("timeout",()=>u("timed out"))})}updateJoinPayload(e){this.channelAdapter.updateJoinPayload(e)}async unsubscribe(e=this.timeout){return new Promise(r=>{this.channelAdapter.unsubscribe(e).receive("ok",()=>r("ok")).receive("timeout",()=>r("timed out")).receive("error",()=>r("error"))})}teardown(){this.channelAdapter.teardown()}async _fetchWithTimeout(e,r,s){const o=new AbortController,u=setTimeout(()=>o.abort(),s),c=await this.socket.fetch(e,Object.assign(Object.assign({},r),{signal:o.signal}));return clearTimeout(u),c}_on(e,r,s){const o=e.toLocaleLowerCase(),u=this.channelAdapter.on(e,s),c={type:o,filter:r,callback:s,ref:u};return this.bindings[o]?this.bindings[o].push(c):this.bindings[o]=[c],this._updateFilterMessage(),this}_onClose(e){this.channelAdapter.onClose(e)}_onError(e){this.channelAdapter.onError(e)}_updateFilterMessage(){this.channelAdapter.updateFilterBindings((e,r,s)=>{var o,u,c,f,p,m,y;const g=e.event.toLocaleLowerCase();if(this._notThisChannelEvent(g,s))return!1;const b=(o=this.bindings[g])===null||o===void 0?void 0:o.find(_=>_.ref===e.ref);if(!b)return!0;if(["broadcast","presence","postgres_changes"].includes(g))if("id"in b){const _=b.id,S=(u=b.filter)===null||u===void 0?void 0:u.event;return _&&((c=r.ids)===null||c===void 0?void 0:c.includes(_))&&(S==="*"||S?.toLocaleLowerCase()===((f=r.data)===null||f===void 0?void 0:f.type.toLocaleLowerCase()))}else{const _=(m=(p=b?.filter)===null||p===void 0?void 0:p.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(e,r){const{close:s,error:o,leave:u,join:c}=Db;return r&&[s,o,u,c].includes(e)&&r!==this.joinPush.ref}_updateFilterTransform(){this.channelAdapter.updatePayloadTransform((e,r,s)=>{if(typeof r=="object"&&"ids"in r){const o=r.data,{schema:u,table:c,commit_timestamp:f,type:p,errors:m}=o;return Object.assign(Object.assign({},{schema:u,table:c,commit_timestamp:f,eventType:p,new:{},old:{},errors:m}),this._getPayloadRecords(o))}return r})}copyBindings(e){if(this.joinedOnce)throw new Error("cannot copy bindings into joined channel");for(const r in e.bindings)for(const s of e.bindings[r])this._on(s.type,s.filter,s.callback)}static isFilterValueEqual(e,r){return(e??void 0)===(r??void 0)}_getPayloadRecords(e){const r={new:{},old:{}};return(e.type==="INSERT"||e.type==="UPDATE")&&(r.new=Av(e.columns,e.record)),(e.type==="UPDATE"||e.type==="DELETE")&&(r.old=Av(e.columns,e.old_record)),r}}class xA{constructor(e,r){this.socket=new bA(e,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(e){this.socket.heartbeatCallback=e}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(e,r,s,o=1e4){return new Promise(u=>{setTimeout(()=>u("timeout"),o),this.socket.disconnect(()=>{e(),u("ok")},r,s)})}push(e){this.socket.push(e)}log(e,r,s){this.socket.log(e,r,s)}makeRef(){return this.socket.makeRef()}onOpen(e){this.socket.onOpen(e)}onClose(e){this.socket.onClose(e)}onError(e){this.socket.onError(e)}onMessage(e){this.socket.onMessage(e)}isConnected(){return this.socket.isConnected()}isConnecting(){return this.socket.connectionState()==eh.connecting}isDisconnecting(){return this.socket.connectionState()==eh.closing}connectionState(){return this.socket.connectionState()}endPointURL(){return this.socket.endPointURL()}sendHeartbeat(){this.socket.sendHeartbeat()}getSocket(){return this.socket}}const jv={HEARTBEAT_INTERVAL:25e3},RA=[1e3,2e3,5e3,1e4],AA=1e4,OA=`
27  addEventListener("message", (e) => {
28    if (e.data.event === "start") {
29      setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval);
30    }
31  });`;class kA{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(e,r){var s;if(this.channels=new Array,this.accessTokenValue=null,this.accessToken=null,this.apiKey=null,this.httpEndpoint="",this.headers={},this.params={}
31,this.ref=0,this.serializer=new aA,this._manuallySetToken=!1,this._authPromise=null,this._workerHeartbeatTimer=void 0,this._pendingWorkerHeartbeatRef=null,this._pendingDisconnectTimer=null,this._disconnectOnEmptyChannelsAfterMs=0,this._resolveFetch=u=>u?(...c)=>u(...c):(...c)=>fetch(...c),!(!((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 xA(e,o),this.httpEndpoint=Ub(e),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(e){const r=e.message;throw r.includes("Node.js")?new Error(`${r}
32
33To use Realtime in Node.js, you need to provide a WebSocket implementation:
34
35Option 1: Use Node.js 22+ which has native WebSocket support
36Option 2: Install and provide the "ws" package:
37
38  npm install ws
39
40  import ws from "ws"
41  const client = new RealtimeClient(url, {
42    ...options,
43    transport: ws
44  })`):new Error(`WebSocket not available: ${r}`)}this._handleNodeJsRaceCondition()}}endpointURL(){return this.socketAdapter.endPointURL()}async disconnect(e,r){return this._cancelPendingDisconnect(),this.isDisconnecting()?"ok":await this.socketAdapter.disconnect(()=>{clearInterval(this._workerHeartbeatTimer),this._terminateWorker()},e,r)}getChannels(){return this.channels}async removeChannel(e){const r=await e.unsubscribe();return r==="ok"&&e.teardown(),r}async removeAllChannels(){const e=this.channels.map(async s=>{const o=await s.unsubscribe();return s.teardown(),o}),r=await Promise.all(e);return await this.disconnect(),r}log(e,r,s){this.socketAdapter.log(e,r,s)}connectionState(){return this.socketAdapter.connectionState()||eh.closed}isConnected(){return this.socketAdapter.isConnected()}isConnecting(){return this.socketAdapter.isConnecting()}isDisconnecting(){return this.socketAdapter.isDisconnecting()}channel(e,r={config:{}}){const s=`realtime:${e}`,o=this.getChannels().find(u=>u.topic===s);if(o)return o;{const u=new jo(`realtime:${e}`,r,this);return this._cancelPendingDisconnect(),this.channels.push(u),u}}push(e){this.socketAdapter.push(e)}async setAuth(e=null){this._authPromise=this._performAuth(e);try{await this._authPromise}finally{this._authPromise=null}}_isManualToken(){return this._manuallySetToken}async sendHeartbeat(){this.socketAdapter.sendHeartbeat()}onHeartbeat(e){this.socketAdapter.heartbeatCallback=this._wrapHeartbeatCallback(e)}_makeRef(){return this.socketAdapter.makeRef()}_remove(e){this.channels=this.channels.filter(r=>r.topic!==e.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}
44this._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(e=null){let r,s=!1;if(e)r=e,s=!0;else if(this.accessToken)try{r=await this.accessToken()}catch(o){this.log("error","Error fetching access token from callback",o),r=this.accessTokenValue}else r=this.accessTokenValue;s?this._manuallySetToken=!0:this.accessToken&&(this._manuallySetToken=!1),this.accessTokenValue!=r&&(this.accessTokenValue=r,this.channels.forEach(o=>{const u={access_token:r,version:WR};r&&o.updateJoinPayload(u),o.joinedOnce&&o.channelAdapter.isJoined()&&o.channelAdapter.push(Db.access_token,{access_token:r})}))}async _waitForAuthIfNeeded(){this._authPromise&&await this._authPromise}_setAuthSafely(e="general"){this._isManualToken()||this.setAuth().catch(r=>{this.log("error",`Error setting auth in ${e}`,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(e=>{e.ref&&e.ref===this._pendingWorkerHeartbeatRef&&(this._pendingWorkerHeartbeatRef=null)})}_handleNodeJsRaceCondition(){this.socketAdapter.isConnected()&&this.socketAdapter.getSocket().onConnOpen()}_wrapHeartbeatCallback(e){return(r,s)=>{r=="sent"&&this._setAuthSafely(),e&&e(r,s)}}_startWorkerHeartbeat(){this.workerUrl?this.log("worker",`starting worker for from ${this.workerUrl}`):this.log("worker","starting default worker");const e=this._workerObjectUrl(this.workerUrl);this.workerRef=new Worker(e),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(e){let r;if(e)r=e;else{const s=new Blob([OA],{type:"application/javascript"});r=URL.createObjectURL(s)}return r}_initializeOptions(e){var r,s,o,u,c,f,p,m,y,g,b;this.worker=(r=e?.worker)!==null&&r!==void 0?r:!1,this.accessToken=(s=e?.accessToken)!==null&&s!==void 0?s:null;const _={};_.timeout=(o=e?.timeout)!==null&&o!==void 0?o:nA,_.heartbeatIntervalMs=(u=e?.heartbeatIntervalMs)!==null&&u!==void 0?u:jv.HEARTBEAT_INTERVAL,this._disconnectOnEmptyChannelsAfterMs=(c=e?.disconnectOnEmptyChannelsAfterMs)!==null&&c!==void 0?c:2*((f=e?.heartbeatIntervalMs)!==null&&f!==void 0?f:jv.HEARTBEAT_INTERVAL),_.transport=(p=e?.transport)!==null&&p!==void 0?p:FR.getWebSocketConstructor(),_.params=e?.params,_.logger=e?.logger,_.heartbeatCallback=this._wrapHeartbeatCallback(e?.heartbeatCallback),_.reconnectAfterMs=(m=e?.reconnectAfterMs)!==null&&m!==void 0?m:(x=>RA[x-1]||AA);let S,A;const R=(y=e?.vsn)!==null&&y!==void 0?y:tA;switch(R){case eA:S=(x,M)=>M(JSON.stringify(x)),A=(x,M)=>M(JSON.parse(x));break;case Mb:S=this.serializer.encode.bind(this.serializer),A=this.serializer.decode.bind(this.serializer);break;default:throw new Error(`Unsupported serializer version: ${_.vsn}`)}if(_.vsn=R,_.encode=(g=e?.encode)!==null&&g!==void 0?g:S,_.decode=(b=e?.decode)!==null&&b!==void 0?b:A,_.beforeReconnect=this._reconnectAuth.bind(this),(e?.logLevel||e?.log_level)&&(this.logLevel=e.logLevel||e.log_level,_.params=Object.assign(Object.assign({},_.params),{log_level:this.logLevel})),this.worker){if(typeof window<"u"&&!window.Worker)throw new Error("Web Worker is not supported");this.workerUrl=e?.workerUrl,_.autoSendHeartbeat=!this.worker}return _}async _reconnectAuth(){await this._waitForAuthIfNeeded(),this.isConnected()||this.connect()}}
44var zo=class extends Error{constructor(n,e){super(n),this.name="IcebergError",this.status=e.status,this.icebergType=e.icebergType,this.icebergCode=e.icebergCode,this.details=e.details,this.isCommitStateUnknown=e.icebergType==="CommitStateUnknownException"||[500,502,504].includes(e.status)&&e.icebergType?.includes("CommitState")===!0}isNotFound(){return this.status===404}isConflict(){return this.status===409}isAuthenticationTimeout(){return this.status===419}};function CA(n,e,r){const s=new URL(e,n);if(r)for(const[o,u]of Object.entries(r))u!==void 0&&s.searchParams.set(o,u);return s.toString()}async function jA(n){return!n||n.type==="none"?{}:n.type==="bearer"?{Authorization:`Bearer ${n.token}`}:n.type==="header"?{[n.name]:n.value}:n.type==="custom"?await n.getHeaders():{}}function NA(n){const e=n.fetchImpl??globalThis.fetch;return{async request({method:r,path:s,query:o,body:u,headers:c}){const f=CA(n.baseUrl,s,o),p=await jA(n.auth),m=await e(f,{method:r,headers:{...u?{"Content-Type":"application/json"}:{},...p,...c},body:u?JSON.stringify(u):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 zo(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 hu(n){return n.join("�")}var MA=class{constructor(n,e=""){this.client=n,this.prefix=e}async listNamespaces(n){const e=n?{parent:hu(n.namespace)}:void 0;return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces`,query:e})).data.namespaces.map(s=>({namespace:s}))}async createNamespace(n,e){const r={namespace:n.namespace,properties:e?.properties};return(await this.client.request({method:"POST",path:`${this.prefix}/namespaces`,body:r})).data}async dropNamespace(n){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${hu(n.namespace)}`})}async loadNamespaceMetadata(n){return{properties:(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${hu(n.namespace)}`})).data.properties}}async namespaceExists(n){try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${hu(n.namespace)}`}),!0}catch(e){if(e instanceof zo&&e.status===404)return!1;throw e}}async createNamespaceIfNotExists(n,e){try{return await this.createNamespace(n,e)}catch(r){if(r instanceof zo&&r.status===409)return;throw r}}};function Qs(n){return n.join("�")}var DA=class{constructor(n,e="",r){this.client=n,this.prefix=e,this.accessDelegation=r}async listTables(n){return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${Qs(n.namespace)}/tables`})).data.identifiers}async createTable(n,e){const r={};return this.accessDelegation&&(r["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${Qs(n.namespace)}/tables`,body:e,headers:r})).data.metadata}async updateTable(n,e){const r=await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${Qs(n.namespace)}/tables/${n.name}`,body:e});return{"metadata-location":r.data["metadata-location"],metadata:r.data.metadata}}async dropTable(n,e){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${Qs(n.namespace)}/tables/${n.name}`,query:{purgeRequested:String(e?.purge??!1)}})}async loadTable(n){const e={};return this.accessDelegation&&(e["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${Qs(n.namespace)}/tables/${n.name}`,headers:e})).data.metadata}async tableExists(n){const e={};this.accessDelegation&&(e["X-Iceberg-Access-Delegation"]=this.accessDelegation);try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${Qs(n.namespace)}/tables/${n.name}`,headers:e}),!0}catch(r){if(r instanceof zo&&r.status===404)return!1;throw r}}async createTableIfNotExists(n,e){try{return await this.createTable(n,e)}catch(r){if(r instanceof zo&&r.status===409)return await this.loadTable({namespace:n.namespace,name:e.name});throw r}}},LA=class{constructor(n){let e="v1";n.catalogName&&(e+=`/${n.catalogName}`);const r=n.baseUrl.endsWith("/")?n.baseUrl:`${n.baseUrl}/`;this.client=NA({baseUrl:r,auth:n.auth,fetchImpl:n.fetch}),this.accessDelegation=n.accessDelegation?.join(","),this.namespaceOps=new MA(this.client,e),this.tableOps=new DA(this.client,e,this.accessDelegation)}async listNamespaces(n){return this.namespaceOps.listNamespaces(n)}async createNamespace(n,e){return this.namespaceOps.createNamespace(n,e)}async dropNamespace(n){await this.namespaceOps.dropNamespace(n)}async loadNamespaceMetadata(n){return this.namespaceOps.loadNamespaceMetadata(n)}async listTables(n){return this.tableOps.listTables(n)}
44async createTable(n,e){return this.tableOps.createTable(n,e)}async updateTable(n,e){return this.tableOps.updateTable(n,e)}async dropTable(n,e){await this.tableOps.dropTable(n,e)}async loadTable(n){return this.tableOps.loadTable(n)}async namespaceExists(n){return this.namespaceOps.namespaceExists(n)}async tableExists(n){return this.tableOps.tableExists(n)}async createNamespaceIfNotExists(n,e){return this.namespaceOps.createNamespaceIfNotExists(n,e)}async createTableIfNotExists(n,e){return this.tableOps.createTableIfNotExists(n,e)}};function Bo(n){"@babel/helpers - typeof";return Bo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Bo(n)}function UA(n,e){if(Bo(n)!="object"||!n)return n;var r=n[Symbol.toPrimitive];if(r!==void 0){var s=r.call(n,e);if(Bo(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}function zA(n){var e=UA(n,"string");return Bo(e)=="symbol"?e:e+""}function BA(n,e,r){return(e=zA(e))in n?Object.defineProperty(n,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):n[e]=r,n}function Nv(n,e){var r=Object.keys(n);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(n);e&&(s=s.filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable})),r.push.apply(r,s)}return r}function ge(n){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Nv(Object(r),!0).forEach(function(s){BA(n,s,r[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):Nv(Object(r)).forEach(function(s){Object.defineProperty(n,s,Object.getOwnPropertyDescriptor(r,s))})}return n}var nc=class extends Error{constructor(n,e="storage",r,s){super(n),this.__isStorageError=!0,this.namespace=e,this.name=e==="vectors"?"StorageVectorsError":"StorageError",this.status=r,this.statusCode=s}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}};function rc(n){return typeof n=="object"&&n!==null&&"__isStorageError"in n}var ah=class extends nc{constructor(n,e,r,s="storage"){super(n,s,e,r),this.name=s==="vectors"?"StorageVectorsApiError":"StorageApiError",this.status=e,this.statusCode=r}toJSON(){return ge({},super.toJSON())}},Bb=class extends nc{constructor(n,e,r="storage"){super(n,r),this.name=r==="vectors"?"StorageVectorsUnknownError":"StorageUnknownError",this.originalError=e}};function Lu(n,e,r){const s=ge({},n),o=e.toLowerCase();for(const u of Object.keys(s))u.toLowerCase()===o&&delete s[u];return s[o]=r,s}function PA(n){const e={};for(const[r,s]of Object.entries(n))e[r.toLowerCase()]=s;return e}const IA=n=>n?(...e)=>n(...e):(...e)=>fetch(...e),HA=n=>{if(typeof n!="object"||n===null)return!1;const e=Object.getPrototypeOf(n);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in n)&&!(Symbol.iterator in n)},sh=n=>{if(Array.isArray(n))return n.map(r=>sh(r));if(typeof n=="function"||n!==Object(n))return n;const e={};return Object.entries(n).forEach(([r,s])=>{const o=r.replace(/([-_][a-z])/gi,u=>u.toUpperCase().replace(/[-_]/g,""));e[o]=sh(s)}),e},$A=n=>!n||typeof n!="string"||n.length===0||n.length>100||n.trim()!==n||n.includes("/")||n.includes("\\")?!1:/^[\w!.\*'() &$@=;:+,?-]+$/.test(n),Mv=n=>{var e;return n.msg||n.message||n.error_description||(typeof n.error=="string"?n.error:(e=n.error)===null||e===void 0?void 0:e.message)||JSON.stringify(n)},qA=async(n,e,r,s)=>{if(n!==null&&typeof n=="object"&&typeof n.json=="function"){const o=n;let u=parseInt(o.status,10);Number.isFinite(u)||(u=500),o.json().then(c=>{const f=c?.statusCode||c?.code||u+"";e(new ah(Mv(c),u,f,s))}).catch(()=>{const c=u+"";e(new ah(o.statusText||`HTTP ${u} error`,u,c,s))})}else e(new Bb(Mv(n),n,s))},VA=(n,e,r,s)=>{const o={method:n,headers:e?.headers||{}};if(n==="GET"||n==="HEAD"||!s)return ge(ge({},o),r);if(HA(s)){var u;const c=e?.headers||{};let f;for(const[p,m]of Object.entries(c))p.toLowerCase()==="content-type"&&(f=m);o.headers=Lu(c,"Content-Type",(u=f)!==null&&u!==void 0?u:"application/json"),o.body=JSON.stringify(s)}else o.body=s;return e?.duplex&&(o.duplex=e.duplex),ge(ge({},o),r)};async function Eo(n,e,r,s,o,u,c){return new Promise((f,p)=>{n(r,VA(e,s,o,u)).then(m=>{if(!m.ok)throw m;if(s?.noResolveJson)return m;if(c==="vectors"){const y=m.headers.get("content-type");if(m.headers.get("content-length")==="0"||m.status===204)return{};if(!y||!y.includes("application/json"))return{}}return m.json()}).then(m=>f(m)).catch(m=>qA(m,p,s,c))})}function Pb(n="storage"){return{get:async(e,r,s,o)=>Eo(e,"GET",r,s,o,void 0,n),post:async(e,r,s,o,u)=>Eo(e,"POST",r,o,u,s,n),put:async(e,r,s,o,u)=>Eo(e,"PUT",r,o,u,s,n),head:async(e,r,s,o)=>Eo(e,"HEAD",r,ge(ge({},s),{},{noResolveJson:!0}),o,void 0,n),remove:async(e,r,s,o,u)=>Eo(e,"DELETE",r,o,u,s,n)}}const GA=Pb("storage"),{get:Po,post:Hn,put:ih,head:YA,remove:jh}=GA,bn=Pb("vectors");var wi=class{constructor(n,e={},r,s="storage"){this.shouldThrowOnError=!1,this.url=n,this.headers=PA(e),this.fetch=IA(r),this.namespace=s}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(n,e){return this.headers=Lu(this.headers,n,e),this}async handleOperation(n){var e=this;try{return{data:await n(),error:null}}catch(r){if(e.shouldThrowOnError)throw r;if(rc(r))return{data:null,error:r};throw r}}},KA=class{constructor(n,e){this.downloadFn=n,this.shouldThrowOnError=e}then(n,e){return this.execute().then(n,e)}async execute(){var n=this;try{return{data:(await n.downloadFn()).body,error:null}}catch(e){if(n.shouldThrowOnError)throw e;if(rc(e))return{data:null,error:e};throw e}}};let Ib;Ib=Symbol.toStringTag;var ZA=class{constructor(n,e){this.downloadFn=n,this.shouldThrowOnError=e,this[Ib]="BlobDownloadBuilder",this.promise=null}asStream(){return new KA(this.downloadFn,this.shouldThrowOnError)}then(n,e){return this.getPromise().then(n,e)}catch(n){return this.getPromise().catch(n)}finally(n){return this.getPromise().finally(n)}getPromise(){return this.promise||(this.promise=this.execute()),this.promise}async execute(){var n=this;try{return{data:await(await n.downloadFn()).blob(),error:null}}catch(e){if(n.shouldThrowOnError)throw e;if(rc(e))return{data:null,error:e};throw e}}};const JA={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},Dv={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};var XA=class extends wi{constructor(n,e={},r,s){super(n,e,s,"storage"),this.bucketId=r}async uploadOrUpdate(n,e,r,s){var o=this;return o.handleOperation(async()=>{let u;const c=ge(ge({},Dv),s);let f=ge(ge({},o.headers),n==="POST"&&{"x-upsert":String(c.upsert)});const p=c.metadata;if(typeof Blob<"u"&&r instanceof Blob?(u=new FormData,u.append("cacheControl",c.cacheControl),p&&u.append("metadata",o.encodeMetadata(p)),u.append("",r)):typeof FormData<"u"&&r instanceof FormData?(u=r,u.has("cacheControl")||u.append("cacheControl",c.cacheControl),p&&!u.has("metadata")&&u.append("metadata",o.encodeMetadata(p))):(u=r,f["cache-control"]=`max-age=${c.cacheControl}`,f["content-type"]=c.contentType,p&&(f["x-metadata"]=o.toBase64(o.encodeMetadata(p))),(typeof ReadableStream<"u"&&u instanceof ReadableStream||u&&typeof u=="object"&&"pipe"in u&&typeof u.pipe=="function")&&!c.duplex&&(c.duplex="half")),s?.headers)for(const[b,_]of Object.entries(s.headers))f=Lu(f,b,_);const m=o._removeEmptyFolders(e),y=o._getFinalPath(m),g=await(n=="PUT"?ih:Hn)(o.fetch,`${o.url}/object/${y}`,u,ge({headers:f},c?.duplex?{duplex:c.duplex}:{}));return{path:m,id:g.Id,fullPath:g.Key}})}async upload(n,e,r){return this.uploadOrUpdate("POST",n,e,r)}async uploadToSignedUrl(n,e,r,s){var o=this;const u=o._removeEmptyFolders(n),c=o._getFinalPath(u),f=new URL(o.url+`/object/upload/sign/${c}`);return f.searchParams.set("token",e),o.handleOperation(async()=>{let p;const m=ge(ge({},Dv),s);let y=ge(ge({},o.headers),{"x-upsert":String(m.upsert)});const g=m.metadata;if(typeof Blob<"u"&&r instanceof Blob?(p=new FormData,p.append("cacheControl",m.cacheControl),g&&p.append("metadata",o.encodeMetadata(g)),p.append("",r)):typeof FormData<"u"&&r instanceof FormData?(p=r,p.has("cacheControl")||p.append("cacheControl",m.cacheControl),g&&!p.has("metadata")&&p.append("metadata",o.encodeMetadata(g))):(p=r,y["cache-control"]=`max-age=${m.cacheControl}`,y["content-type"]=m.contentType,g&&(y["x-metadata"]=o.toBase64(o.encodeMetadata(g))),(typeof ReadableStream<"u"&&p instanceof ReadableStream||p&&typeof p=="object"&&"pipe"in p&&typeof p.pipe=="function")&&!m.duplex&&(m.duplex="half")),s?.headers)for(const[b,_]of Object.entries(s.headers))y=Lu(y,b,_);return{path:u,fullPath:(await ih(o.fetch,f.toString(),p,ge({headers:y},m?.duplex?{duplex:m.duplex}:{}))).Key}})}async createSignedUploadUrl(n,e){var r=this;return r.handleOperation(async()=>{let s=r._getFinalPath(n);const o=ge({},r.headers);e?.upsert&&(o["x-upsert"]="true");const u=await Hn(r.fetch,`${r.url}/object/upload/sign/${s}`,{},{headers:o}),c=new URL(r.url+u.url),f=c.searchParams.get("token");if(!f)throw new nc("No token returned by API");return{signedUrl:c.toString(),path:n,token:f}})}async update(n,e,r){return this.uploadOrUpdate("PUT",n,e,r)}async move(n,e,r){var s=this;return s.handleOperation(async()=>await Hn(s.fetch,`${s.url}/object/move`,{bucketId:s.bucketId,sourceKey:n,destinationKey:e,destinationBucket:r?.destinationBucket},{headers:s.headers}))}async copy(n,e,r){var s=this;return s.handleOperation(async()=>({path:(await Hn(s.fetch,`${s.url}/object/copy`,{bucketId:s.bucketId,sourceKey:n,destinationKey:e,destinationBucket:r?.destinationBucket},{headers:s.headers})).Key}))}async createSignedUrl(n,e,r){var s=this;return s.handleOperation(async()=>{let o=s._getFinalPath(n);const u=typeof r?.transform=="object"&&r.transform!==null&&Object.keys(r.transform).length>0;let c=await Hn(s.fetch,`${s.url}/object/sign/${o}
44`,ge({expiresIn:e},u?{transform:r.transform}:{}),{headers:s.headers});const f=new URLSearchParams;r?.download&&f.set("download",r.download===!0?"":r.download),r?.cacheNonce!=null&&f.set("cacheNonce",String(r.cacheNonce));const p=f.toString();return{signedUrl:encodeURI(`${s.url}${c.signedURL}${p?`&${p}`:""}`)}})}async createSignedUrls(n,e,r){var s=this;return s.handleOperation(async()=>{const o=await Hn(s.fetch,`${s.url}/object/sign/${s.bucketId}`,{expiresIn:e,paths:n},{headers:s.headers}),u=new URLSearchParams;r?.download&&u.set("download",r.download===!0?"":r.download),r?.cacheNonce!=null&&u.set("cacheNonce",String(r.cacheNonce));const c=u.toString();return o.map(f=>ge(ge({},f),{},{signedUrl:f.signedURL?encodeURI(`${s.url}${f.signedURL}${c?`&${c}`:""}`):null}))})}download(n,e,r){const s=typeof e?.transform=="object"&&e.transform!==null&&Object.keys(e.transform).length>0?"render/image/authenticated":"object",o=new URLSearchParams;e?.transform&&this.applyTransformOptsToQuery(o,e.transform),e?.cacheNonce!=null&&o.set("cacheNonce",String(e.cacheNonce));const u=o.toString(),c=this._getFinalPath(n),f=()=>Po(this.fetch,`${this.url}/${s}/${c}${u?`?${u}`:""}`,{headers:this.headers,noResolveJson:!0},r);return new ZA(f,this.shouldThrowOnError)}async info(n){var e=this;const r=e._getFinalPath(n);return e.handleOperation(async()=>sh(await Po(e.fetch,`${e.url}/object/info/${r}`,{headers:e.headers})))}async exists(n){var e=this;const r=e._getFinalPath(n);try{return await YA(e.fetch,`${e.url}/object/${r}`,{headers:e.headers}),{data:!0,error:null}}catch(o){if(e.shouldThrowOnError)throw o;if(rc(o)){var s;const u=o instanceof ah?o.status:o instanceof Bb?(s=o.originalError)===null||s===void 0?void 0:s.status:void 0;if(u!==void 0&&[400,404].includes(u))return{data:!1,error:o}}throw o}}getPublicUrl(n,e){const r=this._getFinalPath(n),s=new URLSearchParams;e?.download&&s.set("download",e.download===!0?"":e.download),e?.transform&&this.applyTransformOptsToQuery(s,e.transform),e?.cacheNonce!=null&&s.set("cacheNonce",String(e.cacheNonce));const o=s.toString(),u=typeof e?.transform=="object"&&e.transform!==null&&Object.keys(e.transform).length>0?"render/image":"object";return{data:{publicUrl:encodeURI(`${this.url}/${u}/public/${r}`)+(o?`?${o}`:"")}}}async remove(n){var e=this;return e.handleOperation(async()=>await jh(e.fetch,`${e.url}/object/${e.bucketId}`,{prefixes:n},{headers:e.headers}))}async list(n,e,r){var s=this;return s.handleOperation(async()=>{const o=ge(ge(ge({},JA),e),{},{prefix:n||""});return await Hn(s.fetch,`${s.url}/object/list/${s.bucketId}`,o,{headers:s.headers},r)})}async listV2(n,e){var r=this;return r.handleOperation(async()=>{const s=ge({},n);return await Hn(r.fetch,`${r.url}/object/list-v2/${r.bucketId}`,s,{headers:r.headers},e)})}encodeMetadata(n){return JSON.stringify(n)}toBase64(n){return typeof Buffer<"u"?Buffer.from(n).toString("base64"):btoa(n)}_getFinalPath(n){return`${this.bucketId}/${n.replace(/^\/+/,"")}`}_removeEmptyFolders(n){return n.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}applyTransformOptsToQuery(n,e){return e.width&&n.set("width",e.width.toString()),e.height&&n.set("height",e.height.toString()),e.resize&&n.set("resize",e.resize),e.format&&n.set("format",e.format),e.quality&&n.set("quality",e.quality.toString()),n}};const FA="2.105.0",Ko={"X-Client-Info":`storage-js/${FA}`};var QA=class extends wi{constructor(n,e={},r,s){const o=new URL(n);s?.useNewHostname&&/supabase\.(co|in|red)$/.test(o.hostname)&&!o.hostname.includes("storage.supabase.")&&(o.hostname=o.hostname.replace("supabase.","storage.supabase."));const u=o.href.replace(/\/$/,""),c=ge(ge({},Ko),e);super(u,c,r,"storage")}async listBuckets(n){var e=this;return e.handleOperation(async()=>{const r=e.listBucketOptionsToQueryString(n);return await Po(e.fetch,`${e.url}/bucket${r}`,{headers:e.headers})})}async getBucket(n){var e=this;return e.handleOperation(async()=>await Po(e.fetch,`${e.url}/bucket/${n}`,{headers:e.headers}))}async createBucket(n,e={public:!1}){var r=this;return r.handleOperation(async()=>await Hn(r.fetch,`${r.url}/bucket`,{id:n,name:n,type:e.type,public:e.public,file_size_limit:e.fileSizeLimit,allowed_mime_types:e.allowedMimeTypes},{headers:r.headers}))}async updateBucket(n,e){var r=this;return r.handleOperation(async()=>await ih(r.fetch,`${r.url}/bucket/${n}`,{id:n,name:n,public:e.public,file_size_limit:e.fileSizeLimit,allowed_mime_types:e.allowedMimeTypes},{headers:r.headers}))}async emptyBucket(n){var e=this;return e.handleOperation(async()=>await Hn(e.fetch,`${e.url}/bucket/${n}/empty`,{},{headers:e.headers}))}async deleteBucket(n){var e=this;return e.handleOperation(async()=>await jh(e.fetch,`${e.url}/bucket/${n}`,{},{headers:e.headers}))}listBucketOptionsToQueryString(n){const e={};return n&&("limit"in n&&(e.limit=String(n.limit)),"offset"in n&&(e.offset=String(n.offset)),n.search&&(e.search=n.search),n.sortColumn&&(e.sortColumn=n.sortColumn),n.sortOrder&&(e.sortOrder=n.sortOrder)),Object.keys(e).length>0?"?"+new URLSearchParams(e).toString():""}},WA=class extends wi{constructor(n,e={},r){const s=n.replace(/\/$/,""),o=ge(ge({},Ko),e);super(s,o,r,"storage")}async createBucket(n){var e=this;return e.handleOperation(async()=>await Hn(e.fetch,`${e.url}/bucket`,{name:n},{headers:e.headers}))}async listBuckets(n){var e=this;return e.handleOperation(async()=>
44{const r=new URLSearchParams;n?.limit!==void 0&&r.set("limit",n.limit.toString()),n?.offset!==void 0&&r.set("offset",n.offset.toString()),n?.sortColumn&&r.set("sortColumn",n.sortColumn),n?.sortOrder&&r.set("sortOrder",n.sortOrder),n?.search&&r.set("search",n.search);const s=r.toString(),o=s?`${e.url}/bucket?${s}`:`${e.url}/bucket`;return await Po(e.fetch,o,{headers:e.headers})})}async deleteBucket(n){var e=this;return e.handleOperation(async()=>await jh(e.fetch,`${e.url}/bucket/${n}`,{},{headers:e.headers}))}from(n){var e=this;if(!$A(n))throw new nc("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 LA({baseUrl:this.url,catalogName:n,auth:{type:"custom",getHeaders:async()=>e.headers},fetch:this.fetch}),s=this.shouldThrowOnError;return new Proxy(r,{get(o,u){const c=o[u];return typeof c!="function"?c:async(...f)=>{try{return{data:await c.apply(o,f),error:null}}catch(p){if(s)throw p;return{data:null,error:p}}}}})}},eO=class extends wi{constructor(n,e={},r){const s=n.replace(/\/$/,""),o=ge(ge({},Ko),{},{"Content-Type":"application/json"},e);super(s,o,r,"vectors")}async createIndex(n){var e=this;return e.handleOperation(async()=>await bn.post(e.fetch,`${e.url}/CreateIndex`,n,{headers:e.headers})||{})}async getIndex(n,e){var r=this;return r.handleOperation(async()=>await bn.post(r.fetch,`${r.url}/GetIndex`,{vectorBucketName:n,indexName:e},{headers:r.headers}))}async listIndexes(n){var e=this;return e.handleOperation(async()=>await bn.post(e.fetch,`${e.url}/ListIndexes`,n,{headers:e.headers}))}async deleteIndex(n,e){var r=this;return r.handleOperation(async()=>await bn.post(r.fetch,`${r.url}/DeleteIndex`,{vectorBucketName:n,indexName:e},{headers:r.headers})||{})}},tO=class extends wi{constructor(n,e={},r){const s=n.replace(/\/$/,""),o=ge(ge({},Ko),{},{"Content-Type":"application/json"},e);super(s,o,r,"vectors")}async putVectors(n){var e=this;if(n.vectors.length<1||n.vectors.length>500)throw new Error("Vector batch size must be between 1 and 500 items");return e.handleOperation(async()=>await bn.post(e.fetch,`${e.url}/PutVectors`,n,{headers:e.headers})||{})}async getVectors(n){var e=this;return e.handleOperation(async()=>await bn.post(e.fetch,`${e.url}/GetVectors`,n,{headers:e.headers}))}async listVectors(n){var e=this;if(n.segmentCount!==void 0){if(n.segmentCount<1||n.segmentCount>16)throw new Error("segmentCount must be between 1 and 16");if(n.segmentIndex!==void 0&&(n.segmentIndex<0||n.segmentIndex>=n.segmentCount))throw new Error(`segmentIndex must be between 0 and ${n.segmentCount-1}`)}return e.handleOperation(async()=>await bn.post(e.fetch,`${e.url}/ListVectors`,n,{headers:e.headers}))}async queryVectors(n){var e=this;return e.handleOperation(async()=>await bn.post(e.fetch,`${e.url}/QueryVectors`,n,{headers:e.headers}))}async deleteVectors(n){var e=this;if(n.keys.length<1||n.keys.length>500)throw new Error("Keys batch size must be between 1 and 500 items");return e.handleOperation(async()=>await bn.post(e.fetch,`${e.url}/DeleteVectors`,n,{headers:e.headers})||{})}},nO=class extends wi{constructor(n,e={},r){const s=n.replace(/\/$/,""),o=ge(ge({},Ko),{},{"Content-Type":"application/json"},e);super(s,o,r,"vectors")}async createBucket(n){var e=this;return e.handleOperation(async()=>await bn.post(e.fetch,`${e.url}/CreateVectorBucket`,{vectorBucketName:n},{headers:e.headers})||{})}async getBucket(n){var e=this;return e.handleOperation(async()=>await bn.post(e.fetch,`${e.url}/GetVectorBucket`,{vectorBucketName:n},{headers:e.headers}))}async listBuckets(n={}){var e=this;return e.handleOperation(async()=>await bn.post(e.fetch,`${e.url}/ListVectorBuckets`,n,{headers:e.headers}))}async deleteBucket(n){var e=this;return e.handleOperation(async()=>await bn.post(e.fetch,`${e.url}/DeleteVectorBucket`,{vectorBucketName:n},{headers:e.headers})||{})}},rO=class extends nO{constructor(n,e={}){super(n,e.headers||{},e.fetch)}from(n){return new aO(this.url,this.headers,n,this.fetch)}async createBucket(n){var e=()=>super.createBucket,r=this;return e().call(r,n)}async getBucket(n){var e=()=>super.getBucket,r=this;return e().call(r,n)}async listBuckets(n={}){var e=()=>super.listBuckets,r=this;return e().call(r,n)}async deleteBucket(n){var e=()=>super.deleteBucket,r=this;return e().call(r,n)}},aO=class extends eO{constructor(n,e,r,s){super(n,e,s),this.vectorBucketName=r}async createIndex(n){var e=()=>super.createIndex,r=this;return e().call(r,ge(ge({},n),{},{vectorBucketName:r.vectorBucketName}))}async listIndexes(n={}){var e=()=>super.listIndexes,r=this;return e().call(r,ge(ge({},n),{},{vectorBucketName:r.vectorBucketName}))}async getIndex(n){var e=()=>super.getIndex,r=this;return e().call(r,r.vectorBucketName,n)}async deleteIndex(n){var e=()=>super.deleteIndex,r=this;return e().call(r,r.vectorBucketName,n)}index(n){return new sO(this.url,this.headers,this.vectorBucketName,n,this.fetch)}}
44,sO=class extends tO{constructor(n,e,r,s,o){super(n,e,o),this.vectorBucketName=r,this.indexName=s}async putVectors(n){var e=()=>super.putVectors,r=this;return e().call(r,ge(ge({},n),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async getVectors(n){var e=()=>super.getVectors,r=this;return e().call(r,ge(ge({},n),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async listVectors(n={}){var e=()=>super.listVectors,r=this;return e().call(r,ge(ge({},n),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async queryVectors(n){var e=()=>super.queryVectors,r=this;return e().call(r,ge(ge({},n),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async deleteVectors(n){var e=()=>super.deleteVectors,r=this;return e().call(r,ge(ge({},n),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}},iO=class extends QA{constructor(n,e={},r,s){super(n,e,r,s)}from(n){return new XA(this.url,this.headers,n,this.fetch)}get vectors(){return new rO(this.url+"/vector",{headers:this.headers,fetch:this.fetch})}get analytics(){return new WA(this.url+"/iceberg",this.headers,this.fetch)}};const Hb="2.105.0",si=30*1e3,oh=3,Bf=oh*si,oO="http://localhost:9999",lO="supabase.auth.token",uO={"X-Client-Info":`gotrue-js/${Hb}`},lh="X-Supabase-Api-Version",$b={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},cO=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,dO=600*1e3;class Io extends Error{constructor(e,r,s){super(e),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 te(n){return typeof n=="object"&&n!==null&&"__isAuthError"in n}class fO extends Io{constructor(e,r,s){super(e,r,s),this.name="AuthApiError",this.status=r,this.code=s}}function hO(n){return te(n)&&n.name==="AuthApiError"}class $n extends Io{constructor(e,r){super(e),this.name="AuthUnknownError",this.originalError=r}}class Nr extends Io{constructor(e,r,s,o){super(e,s,o),this.name=r,this.status=s}}class xt extends Nr{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function pu(n){return te(n)&&n.name==="AuthSessionMissingError"}class Ws extends Nr{constructor(){super("Auth session or user missing","AuthInvalidToken
44ResponseError",500,void 0)}}class mu extends Nr{constructor(e){super(e,"AuthInvalidCredentialsError",400,void 0)}}class gu extends Nr{constructor(e,r=null){super(e,"AuthImplicitGrantRedirectError",500,void 0),this.details=null,this.details=r}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{details:this.details})}}function pO(n){return te(n)&&n.name==="AuthImplicitGrantRedirectError"}class Lv extends Nr{constructor(e,r=null){super(e,"AuthPKCEGrantCodeExchangeError",500,void 0),this.details=null,this.details=r}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{details:this.details})}}class mO extends Nr{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 uh extends Nr{constructor(e,r){super(e,"AuthRetryableFetchError",r,void 0)}}function Pf(n){return te(n)&&n.name==="AuthRetryableFetchError"}class Uv extends Nr{constructor(e,r,s){super(e,"AuthWeakPasswordError",r,"weak_password"),this.reasons=s}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{reasons:this.reasons})}}class ch extends Nr{constructor(e){super(e,"AuthInvalidJwtError",400,"invalid_jwt")}}const Uu="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),zv=` 	
45\r=`.split(""),gO=(()=>{const n=new Array(128);for(let e=0;e<n.length;e+=1)n[e]=-1;for(let e=0;e<zv.length;e+=1)n[zv[e].charCodeAt(0)]=-2;for(let e=0;e<Uu.length;e+=1)n[Uu[e].charCodeAt(0)]=e;return n})();function Bv(n,e,r){if(n!==null)for(e.queue=e.queue<<8|n,e.queuedBits+=8;e.queuedBits>=6;){const s=e.queue>>e.queuedBits-6&63;r(Uu[s]),e.queuedBits-=6}else if(e.queuedBits>0)for(e.queue=e.queue<<6-e.queuedBits,e.queuedBits=6;e.queuedBits>=6;){const s=e.queue>>e.queuedBits-6&63;r(Uu[s]),e.queuedBits-=6}}function qb(n,e,r){const s=gO[n];if(s>-1)for(e.queue=e.queue<<6|s,e.queuedBits+=6;e.queuedBits>=8;)r(e.queue>>e.queuedBits-8&255),e.queuedBits-=8;else{if(s===-2)return;throw new Error(`Invalid Base64-URL character "${String.fromCharCode(n)}"`)}}function Pv(n){const e=[],r=c=>{e.push(String.fromCodePoint(c))},s={utf8seq:0,codepoint:0},o={queue:0,queuedBits:0},u=c=>{bO(c,s,r)};for(let c=0;c<n.length;c+=1)qb(n.charCodeAt(c),o,u);return e.join("")}function yO(n,e){if(n<=127){e(n);return}else if(n<=2047){e(192|n>>6),e(128|n&63);return}else if(n<=65535){e(224|n>>12),e(128|n>>6&63),e(128|n&63);return}else if(n<=1114111){e(240|n>>18),e(128|n>>12&63),e(128|n>>6&63),e(128|n&63);return}throw new Error(`Unrecognized Unicode codepoint: ${n.toString(16)}`)}function vO(n,e){for(let r=0;r<n.length;r+=1){let s=n.charCodeAt(r);if(s>55295&&s<=56319){const o=(s-55296)*1024&65535;s=(n.charCodeAt(r+1)-56320&65535|o)+65536,r+=1}yO(s,e)}}function bO(n,e,r){if(e.utf8seq===0){if(n<=127){r(n);return}for(let s=1;s<6;s+=1)if((n>>7-s&1)===0){e.utf8seq=s;break}if(e.utf8seq===2)e.codepoint=n&31;else if(e.utf8seq===3)e.codepoint=n&15;else if(e.utf8seq===4)e.codepoint=n&7;else throw new Error("Invalid UTF-8 sequence");e.utf8seq-=1}else if(e.utf8seq>0){if(n<=127)throw new Error("Invalid UTF-8 sequence");e.codepoint=e.codepoint<<6|n&63,e.utf8seq-=1,e.utf8seq===0&&r(e.codepoint)}}function pi(n){const e=[],r={queue:0,queuedBits:0},s=o=>{e.push(o)};for(let o=0;o<n.length;o+=1)qb(n.charCodeAt(o),r,s);return new Uint8Array(e)}function _O(n){const e=[];return vO(n,r=>e.push(r)),new Uint8Array(e)}function es(n){const e=[],r={queue:0,queuedBits:0},s=o=>{e.push(o)};return n.forEach(o=>Bv(o,r,s)),Bv(null,r,s),e.join("")}function wO(n){return Math.round(Date.now()/1e3)+n}function SO(){return Symbol("auth-callback")}const Mt=()=>typeof window<"u"&&typeof document<"u",Ka={tested:!1,writable:!1},Vb=()=>{if(!Mt())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(Ka.tested)return Ka.writable;const n=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(n,n),globalThis.localStorage.removeItem(n),Ka.tested=!0,Ka.writable=!0}catch{Ka.tested=!0,Ka.writable=!1}return Ka.writable};function EO(n){const e={},r=new URL(n);if(r.hash&&r.hash[0]==="#")try{new URLSearchParams(r.hash.substring(1)).forEac
45h((o,u)=>{e[u]=o})}catch{}return r.searchParams.forEach((s,o)=>{e[o]=s}),e}const Gb=n=>n?(...e)=>n(...e):(...e)=>fetch(...e),TO=n=>typeof n=="object"&&n!==null&&"status"in n&&"ok"in n&&"json"in n&&typeof n.json=="function",ii=async(n,e,r)=>{await n.setItem(e,JSON.stringify(r))},Za=async(n,e)=>{const r=await n.getItem(e);if(!r)return null;try{return JSON.parse(r)}catch{return r}},Nt=async(n,e)=>{await n.removeItem(e)};class ac{constructor(){this.promise=new ac.promiseConstructor((e,r)=>{this.resolve=e,this.reject=r})}}ac.promiseConstructor=Promise;function yu(n){const e=n.split(".");if(e.length!==3)throw new ch("Invalid JWT structure");for(let s=0;s<e.length;s++)if(!cO.test(e[s]))throw new ch("JWT not in base64url format");return{header:JSON.parse(Pv(e[0])),payload:JSON.parse(Pv(e[1])),signature:pi(e[2]),raw:{header:e[0],payload:e[1]}}}async function xO(n){return await new Promise(e=>{setTimeout(()=>e(null),n)})}function RO(n,e){return new Promise((s,o)=>{(async()=>{for(let u=0;u<1/0;u++)try{const c=await n(u);if(!e(u,null,c)){s(c);return}}catch(c){if(!e(u,c)){o(c);return}}})()})}function AO(n){return("0"+n.toString(16)).substr(-2)}function OO(){const e=new Uint32Array(56);if(typeof crypto>"u"){const r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",s=r.length;let o="";for(let u=0;u<56;u++)o+=r.charAt(Math.floor(Math.random()*s));return o}return crypto.getRandomValues(e),Array.from(e,AO).join("")}async function kO(n){const r=new TextEncoder().encode(n),s=await crypto.subtle.digest("SHA-256",r),o=new Uint8Array(s);return Array.from(o).map(u=>String.fromCharCode(u)).join("")}async function CO(n){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."),n;const r=await kO(n);return btoa(r).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function ei(n,e,r=!1){const s=OO();let o=s;r&&(o+="/recovery"),await ii(n,`${e}-code-verifier`,o);const u=await CO(s);return[u,s===u?"plain":"s256"]}const jO=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function NO(n){const e=n.headers.get(lh);if(!e||!e.match(jO))return null;try{return new Date(`${e}T00:00:00.0Z`)}catch{return null}}function MO(n){if(!n)throw new Error("Missing exp claim");const e=Math.floor(Date.now()/1e3);if(n<=e)throw new Error("JWT has expired")}function DO(n){switch(n){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 LO=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function xr(n){if(!LO.test(n))throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not")}function In(n){if(!n.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 If(){const n={};return new Proxy(n,{get:(e,r)=>{if(r==="__isUserNotAvailableProxy")return!0;if(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:(e,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:(e,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 UO(n,e){return new Proxy(n,{get:(r,s,o)=>
45{if(s==="__isInsecureUserWarningProxy")return!0;if(typeof s=="symbol"){const u=s.toString();if(u==="Symbol(Symbol.toPrimitive)"||u==="Symbol(Symbol.toStringTag)"||u==="Symbol(util.inspect.custom)"||u==="Symbol(nodejs.util.inspect.custom)")return Reflect.get(r,s,o)}return!e.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."),e.value=!0),Reflect.get(r,s,o)}})}function Iv(n){return JSON.parse(JSON.stringify(n))}const Ja=n=>n.msg||n.message||n.error_description||n.error||JSON.stringify(n),zO=[502,503,504,520,521,522,523,524,530];async function Hv(n){var e;if(!TO(n))throw new uh(Ja(n),0);if(zO.includes(n.status))throw new uh(Ja(n),n.status);let r;try{r=await n.json()}catch(u){throw new $n(Ja(u),u)}let s;const o=NO(n);if(o&&o.getTime()>=$b["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 Uv(Ja(r),n.status,((e=r.weak_password)===null||e===void 0?void 0:e.reasons)||[]);if(s==="session_not_found")throw new xt}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((u,c)=>u&&typeof c=="string",!0))throw new Uv(Ja(r),n.status,r.weak_password.reasons);throw new fO(Ja(r),n.status||500,s)}const BO=(n,e,r,s)=>{const o={method:n,headers:e?.headers||{}};return n==="GET"?o:(o.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},e?.headers),o.body=JSON.stringify(s),Object.assign(Object.assign({},o),r))};async function oe(n,e,r,s){var o;const u=Object.assign({},s?.headers);u[lh]||(u[lh]=$b["2024-01-01"].name),s?.jwt&&(u.Authorization=`Bearer ${s.jwt}`);const c=(o=s?.query)!==null&&o!==void 0?o:{};s?.redirectTo&&(c.redirect_to=s.redirectTo);const f=Object.keys(c).length?"?"+new URLSearchParams(c).toString():"",p=await PO(n,e,r+f,{headers:u,noResolveJson:s?.noResolveJson},{},s?.body);return s?.xform?s?.xform(p):{data:Object.assign({},p),error:null}}async function PO(n,e,r,s,o,u){const c=BO(e,s,o,u);let f;try{f=await n(r,Object.assign({},c))}catch(p){throw console.error(p),new uh(Ja(p),0)}if(f.ok||await Hv(f),s?.noResolveJson)return f;try{return await f.json()}catch(p){await Hv(p)}}function jn(n){var e;let r=null;$O(n)&&(r=Object.assign({},n),n.expires_at||(r.expires_at=wO(n.expires_in)));const s=(e=n.user)!==null&&e!==void 0?e:n;return{data:{session:r,user:s},error:null}}function $v(n){const e=jn(n);return!e.error&&n.weak_password&&typeof n.weak_password=="object"&&Array.isArray(n.weak_password.reasons)&&n.weak_password.reasons.length&&n.weak_password.message&&typeof n.weak_password.message=="string"&&n.weak_password.reasons.reduce((r,s)=>r&&typeof s=="string",!0)&&(e.data.weak_password=n.weak_password),e}function da(n){var e;return{data:{user:(e=n.user)!==null&&e!==void 0?e:n},error:null}}function IO(n){return{data:n,error:null}}function HO(n){const{action_link:e,email_otp:r,hashed_token:s,redirect_to:o,verification_type:u}=n,c=tc(n,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),f={action_link:e,email_otp:r,hashed_token:s,redirect_to:o,verification_type:u},p=Object.assign({},c);return{data:{properties:f,user:p},error:null}}function qv(n){return n}function $O(n){return n.access_token&&n.refresh_token&&n.expires_in}const Hf=["global","local","others"];class qO{constructor({url:e="",headers:r={},fetch:s,experimental:o}){this.url=e,this.headers=r,this.fetch=Gb(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)}}async signOut(e,r=Hf[0]){if(Hf.indexOf(r)<0)throw new Error(`@supabase/auth-js: Parameter scope must be one of ${Hf.join(", ")}`);try{return await oe(this.fetch,"POST",`${this.url}/logout?scope=${r}`,{headers:this.headers,jwt:e,noResolveJson:!0}),{data:null,error:null}}catch(s){if(te(s))return{data:null,error:s};throw s}}async inviteUserByEmail(e,r={}){try{return await oe(this.fetch,"POST",`${this.url}/invite`,{body:{email:e,data:r.data},headers:this.headers,redirectTo:r.redirectTo,xform:da})}catch(s){if(te(s))return{data:{user:null},error:s};throw s}}async generateLink(e){try{const{options:r}=e,s=tc(e,["options"]),o=Object.assign(Object.assign({},s),r);return"newEmail"in s&&(o.new_email=s?.newEmail,delete o.newEmail),await oe(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:o,headers:this.headers,xform:HO,redirectTo:r?.redirectTo})}catch(r){if(te(r))return{data:{properties:null,user:null},error:r};throw r}}async createUser(e){try{return await oe(this.fetch,"POST",`${this.url}/admin/users`,{body:e,headers:this.headers,xform:da})}catch(r){if(te(r))return{data:{user:null},error:r};throw r}}async listUsers(e){var r,s,o,u,c,f,p;try{const m={nextPage:null,lastPage:0,total:0},y=await oe(this.fetch,"GET",`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:(s=(r=e?.page)===null||r===void 0?void 0:r.toString())!==null&&s!==void 0?s:"",per_page:(u=(o=e?.perPage)===null||o===void 0?void 0:o.toString())!==null&&u!==void 0?u:""},xform:qv});if(y.error)throw y.error;const g=await y.json(),b=(c=y.headers.get("x-total-count"))!==null&&c!==void 0?c:0,_=(p=(f=y.headers.get("link"))===null||f===void 0?void 0:f.split(","))!==null&&p!==void 0?p:[];return _.length>0&&(_.forEach(S=>{const A=parseInt(S.split(";")[0].split("=")[1].substring(0,1)),R=JSON.parse(S.split(";")[1].split("=")[1]);m[`${R}Page`]=A}),m.total=parseInt(b)),{data:Object.assign(Object.assign({},g),m),error:null}}catch(m){if(te(m))return{data:{users:[]},error:m};throw m}}async getUserById(e){xr(e);try{return await oe(this.fetch,"GET",`${this.url}/admin/users/${e}`,{headers:this.headers,xform:da})}catch(r){if(te(r))return{data:{user:null},error:r};throw r}}async updateUserById(e,r){xr(e);try{return await oe(this.fetch,"PUT",`${this.url}/admin/users/${e}`,{body:r,headers:this.headers,xform:da})}catch(s){if(te(s))return{data:{user:null},error:s};throw s}}async deleteUser(e,r=!1){xr(e);
45try{return await oe(this.fetch,"DELETE",`${this.url}/admin/users/${e}`,{headers:this.headers,body:{should_soft_delete:r},xform:da})}catch(s){if(te(s))return{data:{user:null},error:s};throw s}}async _listFactors(e){xr(e.userId);try{const{data:r,error:s}=await oe(this.fetch,"GET",`${this.url}/admin/users/${e.userId}/factors`,{headers:this.headers,xform:o=>({data:{factors:o},error:null})});return{data:r,error:s}}catch(r){if(te(r))return{data:null,error:r};throw r}}async _deleteFactor(e){xr(e.userId),xr(e.id);try{return{data:await oe(this.fetch,"DELETE",`${this.url}/admin/users/${e.userId}/factors/${e.id}`,{headers:this.headers}),error:null}}catch(r){if(te(r))return{data:null,error:r};throw r}}async _listOAuthClients(e){var r,s,o,u,c,f,p;try{const m={nextPage:null,lastPage:0,total:0},y=await oe(this.fetch,"GET",`${this.url}/admin/oauth/clients`,{headers:this.headers,noResolveJson:!0,query:{page:(s=(r=e?.page)===null||r===void 0?void 0:r.toString())!==null&&s!==void 0?s:"",per_page:(u=(o=e?.perPage)===null||o===void 0?void 0:o.toString())!==null&&u!==void 0?u:""},xform:qv});if(y.error)throw y.error;const g=await y.json(),b=(c=y.headers.get("x-total-count"))!==null&&c!==void 0?c:0,_=(p=(f=y.headers.get("link"))===null||f===void 0?void 0:f.split(","))!==null&&p!==void 0?p:[];return _.length>0&&(_.forEach(S=>{const A=parseInt(S.split(";")[0].split("=")[1].substring(0,1)),R=JSON.parse(S.split(";")[1].split("=")[1]);m[`${R}Page`]=A}),m.total=parseInt(b)),{data:Object.assign(Object.assign({},g),m),error:null}}catch(m){if(te(m))return{data:{clients:[]},error:m};throw m}}async _createOAuthClient(e){try{return await oe(this.fetch,"POST",`${this.url}/admin/oauth/clients`,{body:e,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(te(r))return{data:null,error:r};throw r}}async _getOAuthClient(e){try{return await oe(this.fetch,"GET",`${this.url}/admin/oauth/clients/${e}`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(te(r))return{data:null,error:r};throw r}}async _updateOAuthClient(e,r){try{return await oe(this.fetch,"PUT",`${this.url}/admin/oauth/clients/${e}`,{body:r,headers:this.headers,xform:s=>({data:s,error:null})})}catch(s){if(te(s))return{data:null,error:s};throw s}}async _deleteOAuthClient(e){try{return await oe(this.fetch,"DELETE",`${this.url}/admin/oauth/clients/${e}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(r){if(te(r))return{data:null,error:r};throw r}}async _regenerateOAuthClientSecret(e){try{return await oe(this.fetch,"POST",`${this.url}/admin/oauth/clients/${e}/regenerate_secret`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(te(r))return{data:null,error:r};throw r}}async _listCustomProviders(e){try{const r={};return e?.type&&(r.type=e.type),await oe(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(te(r))return{data:{providers:[]},error:r};throw r}}async _createCustomProvider(e){try{return await oe(this.fetch,"POST",`${this.url}/admin/custom-providers`,{body:e,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(te(r))return{data:null,error:r};throw r}}async _getCustomProvider(e){try{return await oe(this.fetch,"GET",`${this.url}/admin/custom-providers/${e}`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(te(r))return{data:null,error:r};throw r}}async _updateCustomProvider(e,r){try{return await oe(this.fetch,"PUT",`${this.url}/admin/custom-providers/${e}`,{body:r,headers:this.headers,xform:s=>({data:s,error:null})})}catch(s){if(te(s))return{data:null,error:s};throw s}}async _deleteCustomProvider(e){try{return await oe(this.fetch,"DELETE",`${this.url}/admin/custom-providers/${e}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(r){if(te(r))return{data:null,error:r};throw r}}async _adminListPasskeys(e){In(this.experimental),xr(e.userId);try{return await oe(this.fetch,"GET",`${this.url}/admin/users/${e.userId}/passkeys`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(te(r))return{data:null,error:r};throw r}}async _adminDeletePasskey(e){In(this.experimental),xr(e.userId),xr(e.passkeyId);
45try{return await oe(this.fetch,"DELETE",`${this.url}/admin/users/${e.userId}/passkeys/${e.passkeyId}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(r){if(te(r))return{data:null,error:r};throw r}}}function Vv(n={}){return{getItem:e=>n[e]||null,setItem:(e,r)=>{n[e]=r},removeItem:e=>{delete n[e]}}}const Xn={debug:!!(globalThis&&Vb()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug")==="true")};class Yb extends Error{constructor(e){super(e),this.isAcquireTimeout=!0}}class Gv extends Yb{}async function VO(n,e,r){Xn.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire lock",n,e);const s=new globalThis.AbortController;let o;e>0&&(o=setTimeout(()=>{s.abort(),Xn.debug&&console.log("@supabase/gotrue-js: navigatorLock acquire timed out",n)},e)),await Promise.resolve();try{return await globalThis.navigator.locks.request(n,e===0?{mode:"exclusive",ifAvailable:!0}:{mode:"exclusive",signal:s.signal},async u=>{if(u){clearTimeout(o),Xn.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquired",n,u.name);try{return await r()}finally{Xn.debug&&console.log("@supabase/gotrue-js: navigatorLock: released",n,u.name)}}else{if(e===0)throw Xn.debug&&console.log("@supabase/gotrue-js: navigatorLock: not immediately available",n),new Gv(`Acquiring an exclusive Navigator LockManager lock "${n}" immediately failed`);if(Xn.debug)try{const c=await globalThis.navigator.locks.query();console.log("@supabase/gotrue-js: Navigator LockManager state",JSON.stringify(c,null,"  "))}catch(c){console.warn("@supabase/gotrue-js: Error when querying Navigator LockManager state",c)}return console.warn("@supabase/gotrue-js: Navigator LockManager returned a null lock when using #request without ifAvailable set to true, it appears this browser is not following the LockManager spec https://developer.mozilla.org/en-US/docs/Web/API/LockManager/request"),clearTimeout(o),await r()}})}catch(u){if(e>0&&clearTimeout(o),u?.name==="AbortError"&&e>0){if(s.signal.aborted)return Xn.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire timeout, recovering by stealing lock",n),console.warn(`@supabase/gotrue-js: Lock "${n}" was not released within ${e}ms. This may indicate an orphaned lock from a component unmount (e.g., React Strict Mode). Forcefully acquiring the lock to recover.`),await Promise.resolve().then(()=>globalThis.navigator.locks.request(n,{mode:"exclusive",steal:!0},async c=>{if(c){Xn.debug&&console.log("@supabase/gotrue-js: navigatorLock: recovered (stolen)",n,c.name);try{return await r()}finally{Xn.debug&&console.log("@supabase/gotrue-js: navigatorLock: released (stolen)",n,c.name)}}else return console.warn("@supabase/gotrue-js: Navigator LockManager returned null lock even with steal: true"),await r()}));throw Xn.debug&&console.log("@supabase/gotrue-js: navigatorLock: lock was stolen by another request",n),new Gv(`Lock "${n}" was released because another request stole it`)}throw u}}function GO(){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 Kb(n){if(!/^0x[a-fA-F0-9]{40}$/.test(n))throw new Error(`@supabase/auth-js: Address "${n}" is invalid.`);return n.toLowerCase()}function YO(n){return parseInt(n,16)}function KO(n){const e=new TextEncoder().encode(n);return"0x"+Array.from(e,s=>s.toString(16).padStart(2,"0")).join("")}function ZO(n){var e;const{chainId:r,domain:s,expirationTime:o,issuedAt:u=new Date,nonce:c,notBefore:f,requestId:p,resources:m,scheme:y,uri:g,version:b}=n;{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(c&&c.length<8)throw new Error(`@supabase/auth-js: Invalid SIWE message field "nonce". Nonce must be at least 8 characters. Provided value: ${c}`);if(!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(!((e=n.statement)===null||e===void 0)&&e.includes(`
46`))throw new Error(`@supabase/auth-js: Invalid SIWE message field "statement". Statement must not include '\\n'. Provided value: ${n.statement}`)}const _=Kb(n.address),S=y?`${y}://${s}`:s,A=n.statement?`${n.statement}
47`:"",R=`${S} wants you to sign in with your Ethereum account:
48${_}
49
50${A}`;let x=`URI: ${g}
51Version: ${b}
52Chain ID: ${r}${c?`
53Nonce: ${c}`:""}
54Issued At: ${u.toISOString()}`;
54if(o&&(x+=`
55Expiration Time: ${o.toISOString()}`),f&&(x+=`
56Not Before: ${f.toISOString()}`),p&&(x+=`
57Request ID: ${p}`),m){let M=`
58Resources:`;for(const N of m){if(!N||typeof N!="string")throw new Error(`@supabase/auth-js: Invalid SIWE message field "resources". Every resource must be a valid string. Provided value: ${N}`);M+=`
59- ${N}`}x+=M}return`${R}
60${x}`}class mt extends Error{constructor({message:e,code:r,cause:s,name:o}){var u;super(e,{cause:s}),this.__isWebAuthnError=!0,this.name=(u=o??(s instanceof Error?s.name:void 0))!==null&&u!==void 0?u:"Unknown Error",this.code=r}}class zu extends mt{constructor(e,r){super({code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:r,message:e}),this.name="WebAuthnUnknownError",this.originalError=r}}function JO({error:n,options:e}){var r,s,o;const{publicKey:u}=e;if(!u)throw Error("options was missing required publicKey property");if(n.name==="AbortError"){if(e.signal instanceof AbortSignal)return new mt({message:"Registration ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:n})}else if(n.name==="ConstraintError"){if(((r=u.authenticatorSelection)===null||r===void 0?void 0:r.requireResidentKey)===!0)return new mt({message:"Discoverable credentials were required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT",cause:n});if(e.mediation==="conditional"&&((s=u.authenticatorSelection)===null||s===void 0?void 0:s.userVerification)==="required")return new mt({message:"User verification was required during automatic registration but it could not be performed",code:"ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE",cause:n});if(((o=u.authenticatorSelection)===null||o===void 0?void 0:o.userVerification)==="required")return new mt({message:"User verification was required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT",cause:n})}else{if(n.name==="InvalidStateError")return new mt({message:"The authenticator was previously registered",code:"ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",cause:n});if(n.name==="NotAllowedError")return new mt({message:n.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:n});if(n.name==="NotSupportedError")return u.pubKeyCredParams.filter(f=>f.type==="public-key").length===0?new mt({message:'No entry in pubKeyCredParams was of type "public-key"',code:"ERROR_MALFORMED_PUBKEYCREDPARAMS",cause:n}):new mt({message:"No available authenticator supported any of the specified pubKeyCredParams algorithms",code:"ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG",cause:n});if(n.name==="SecurityError"){const c=window.location.hostname;if(Zb(c)){if(u.rp.id!==c)return new mt({message:`The RP ID "${u.rp.id}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:n})}else return new mt({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:n})}else if(n.name==="TypeError"){if(u.user.id.byteLength<1||u.user.id.byteLength>64)return new mt({message:"User ID was not between 1 and 64 characters",code:"ERROR_INVALID_USER_ID_LENGTH",cause:n})}else if(n.name==="UnknownError")return new mt({message:"The authenticator was unable to process the specified options, or could not create a new credential",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:n})}return new mt({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:n})}function XO({error:n,options:e}){const{publicKey:r}=e;if(!r)throw Error("options was missing required publicKey property");if(n.name==="AbortError"){if(e.signal instanceof AbortSignal)return new mt({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:n})}else{if(n.name==="NotAllowedError")return new mt({message:n.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:n});if(n.name==="SecurityError"){const s=window.location.hostname;if(Zb(s)){if(r.rpId!==s)return new mt({message:`The RP ID "${r.rpId}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:n})}else return new mt({message:`${window.location.hostname}
60 is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:n})}else if(n.name==="UnknownError")return new mt({message:"The authenticator was unable to process the specified options, or could not create a new assertion signature",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:n})}return new mt({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:n})}class FO{createNewAbortSignal(){if(this.controller){const r=new Error("Cancelling existing WebAuthn API call for new one");r.name="AbortError",this.controller.abort(r)}const e=new AbortController;return this.controller=e,e.signal}cancelCeremony(){if(this.controller){const e=new Error("Manually cancelling existing WebAuthn API call");e.name="AbortError",this.controller.abort(e),this.controller=void 0}}}const dh=new FO;function Yv(n){if(!n)throw new Error("Credential creation options are required");if(typeof PublicKeyCredential<"u"&&"parseCreationOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseCreationOptionsFromJSON=="function")return PublicKeyCredential.parseCreationOptionsFromJSON(n);const{challenge:e,user:r,excludeCredentials:s}=n,o=tc(n,["challenge","user","excludeCredentials"]),u=pi(e).buffer,c=Object.assign(Object.assign({},r),{id:pi(r.id).buffer}),f=Object.assign(Object.assign({},o),{challenge:u,user:c});if(s&&s.length>0){f.excludeCredentials=new Array(s.length);for(let p=0;p<s.length;p++){const m=s[p];f.excludeCredentials[p]=Object.assign(Object.assign({},m),{id:pi(m.id).buffer,type:m.type||"public-key",transports:m.transports})}}return f}function Kv(n){if(!n)throw new Error("Credential request options are required");if(typeof PublicKeyCredential<"u"&&"parseRequestOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseRequestOptionsFromJSON=="function")return PublicKeyCredential.parseRequestOptionsFromJSON(n);const{challenge:e,allowCredentials:r}=n,s=tc(n,["challenge","allowCredentials"]),o=pi(e).buffer,u=Object.assign(Object.assign({},s),{challenge:o});if(r&&r.length>0){u.allowCredentials=new Array(r.length);for(let c=0;c<r.length;c++){const f=r[c];u.allowCredentials[c]=Object.assign(Object.assign({},f),{id:pi(f.id).buffer,type:f.type||"public-key",transports:f.transports})}}return u}function Zv(n){var e;if("toJSON"in n&&typeof n.toJSON=="function")return n.toJSON();const r=n;return{id:n.id,rawId:n.id,response:{attestationObject:es(new Uint8Array(n.response.attestationObject)),clientDataJSON:es(new Uint8Array(n.response.clientDataJSON))},type:"public-key",clientExtensionResults:n.getClientExtensionResults(),authenticatorAttachment:(e=r.authenticatorAttachment)!==null&&e!==void 0?e:void 0}}function Jv(n){var e;if("toJSON"in n&&typeof n.toJSON=="function")return n.toJSON();const r=n,s=n.getClientExtensionResults(),o=n.response;return{id:n.id,rawId:n.id,response:{authenticatorData:es(new Uint8Array(o.authenticatorData)),clientDataJSON:es(new Uint8Array(o.clientDataJSON)),signature:es(new Uint8Array(o.signature)),userHandle:o.userHandle?es(new Uint8Array(o.userHandle)):void 0},type:"public-key",clientExtensionResults:s,authenticatorAttachment:(e=r.authenticatorAttachment)!==null&&e!==void 0?e:void 0}}function Zb(n){return n==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(n)}function Bu(){var n,e;return!!(Mt()&&"PublicKeyCredential"in window&&window.PublicKeyCredential&&"credentials"in navigator&&typeof((n=navigator?.credentials)===null||n===void 0?void 0:n.create)=="function"&&typeof((e=navigator?.credentials)===null||e===void 0?void 0:e.get)=="function")}async function Jb(n){try{const e=await navigator.credentials.create(n);return e?e instanceof PublicKeyCredential?{data:e,error:null}:{data:null,error:new zu("Browser returned unexpected credential type",e)}:{data:null,error:new zu("Empty credential response",e)}}catch(e){return{data:null,error:JO({error:e,options:n})}}}async function Xb(n){try{const e=await navigator.credentials.get(n);return e?e instanceof PublicKeyCredential?{data:e,error:null}:{data:null,error:new zu("Browser returned unexpected credential type",e)}:{data:null,error:new zu("Empty credential response",e)}}catch(e){return{data:null,error:XO({error:e,options:n})}}}const QO={hints:["security-key"],authenticatorSelection:{authenticatorAttachment:"cross-platform",requireResidentKey:!1,userVerification:"preferred",residentKey:"discouraged"},attestation:"direct"},WO={userVerification:"preferred",hints:["security-key"],attestation:"direct"};function Pu(...n){const e=o=>o!==null&&typeof o=="object"&&!Array.isArray(o),r=o=>o instanceof ArrayBuffer||ArrayBuffer.isView(o),s={};for(const o of n)if(o)for(const u in o){const c=o[u];if(c!==void 0)if(Array.isArray(c))s[u]=c;else if(r(c))s[u]=c;else if(e(c)){const f=s[u];e(f)?s[u]=Pu(f,c):s[u]=Pu(c)}else s[u]=c}return s}function ek(n,e){return Pu(QO,n,e||{})}function tk(n,e){return Pu(WO,n,e||{})}class nk{constructor(e){this.client=e,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(e){return this.client.mfa.enroll(Object.assign(Object.assign({},e),{factorType:"webauthn"}))}async _challenge({factorId:e,webauthn:r,friendlyName:s,signal:o},u){var c;try{const{data:f,error:p}=await this.client.mfa.challenge({factorId:e,webauthn:r});if(!f)return{data:null,error:p};const m=o??dh.createNewAbortSignal();if(f.webauthn.type==="create"){const{user:y}=f.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=((c=_?.user_metadata)===null||c===void 0?void 0:c.name)||_?.email||_?.id||"User";y.name=`${y.id}:${S}`}}y.displayName||(y.displayName=y.name)}switch(f.webauthn.type){case"create":{const y=ek(f.webauthn.credential_options.publicKey,u?.create),{data:g,error:b}=await Jb({publicKey:y,signal:m});return g?{data:{factorId:e,challengeId:f.id,webauthn:{type:f.webauthn.type,credential_response:g}},error:null}:{data:null,error:b}}case"request":{const y=tk(f.webauthn.credential_options.publicKey,u?.request),{data:g,error:b}=await Xb(Object.assign(Object.assign({},f.webauthn.credential_options),{publicKey:y,signal:m}));return g?{data:{factorId:e,challengeId:f.id,webauthn:{type:f.webauthn.type,credential_response:g}},error:null}:{data:null,error:b}}}}catch(f){return te(f)?{data:null,error:f}:{data:null,error:new $n("Unexpected error in challenge",f)}}}async _verify({challengeId:e,factorId:r,webauthn:s}){return this.client.mfa.verify({factorId:r,challengeId:e,webauthn:s})}async _authenticate({factorId:e,webauthn:{rpId:r=typeof window<"u"?window.location.hostname:void 0,rpOrigins:s=typeof window<"u"?[window.location.origin]:void 0,signal:o}={}},u){if(!r)return{data:null,error:new Io("rpId is required for WebAuthn authentication")};try{if(!Bu())return{data:null,error:new $n("Browser does not support WebAuthn",null)};const{data:c,error:f}=await this.challenge({factorId:e,webauthn:{rpId:r,rpOrigins:s},signal:o},{request:u});if(!c)return{data:null,error:f};const{webauthn:p}=c;return this._verify({factorId:e,challengeId:c.challengeId,webauthn:{type:p.type,rpId:r,rpOrigins:s,credential_response:p.credential_response}})}catch(c){return te(c)?{data:null,error:c}:{data:null,error:new $n("Unexpected error in authenticate",c)}}}async _register({friendlyName:e,webauthn:{rpId:r=typeof window<"u"?window.location.hostname:void 0,rpOrigins:s=typeof window<"u"?[window.location.origin]:void 0,signal:o}={}},u){if(!r)return{data:null,error:new Io("rpId is required for WebAuthn registration")};try{if(!Bu())return{data:null,error:new $n("Browser does not support WebAuthn",null)};const{data:c,error:f}=await this._enroll({friendlyName:e});if(!c)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===e&&b.status!=="unverified")}).then(y=>y?this.client.mfa.unenroll({factorId:y?.id}):void 0),{data:null,error:f};const{data:p,error:m}=await this._challenge({factorId:c.id,friendlyName:c.friendly_name,webauthn:{rpId:r,rpOrigins:s},signal:o},{create:u});return p?this._verify({factorId:c.id,challengeId:p.challengeId,webauthn:{rpId:r,rpOrigins:s,type:p.webauthn.type,credential_response:p.webauthn.credential_response}}):{data:null,error:m}}catch(c){return te(c)?{data:null,error:c}:{data:null,error:new $n("Unexpected error in register",c)}}}}GO();const rk={url:oO,storageKey:lO,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:uO,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1,throwOnError:!1,lockAcquireTimeout:5e3,skipAutoInitialize:!1,experimental:{}};async function Xv(n,e,r){return await r()}const ti={};class Ho{get jwks(){var e,r;return(r=(e=ti[this.storageKey])===null||e===void 0?void 0:e.jwks)!==null&&r!==void 0?r:{keys:[]}}set jwks(e){ti[this.storageKey]=Object.assign(Object.assign({},ti[this.storageKey]),{jwks:e})}get jwks_cached_at(){var e,r;return(r=(e=ti[this.storageKey])===null||e===void 0?void 0:e.cachedAt)!==null&&r!==void 0?r:Number.MIN_SAFE_INTEGER}set jwks_cached_at(e){ti[this.storageKey]=Object.assign(Object.assign({},ti[this.storageKey]),{cachedAt:e})}constructor(e){var r,s,o,u;this.userStorage=null,this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=null,this.autoRefreshTickTimeout=null,this.visibilityChangedCallback=null,this.refreshingDeferred=null,this.initializePromise=null,this.detectSessionInUrl=!0,this.hasCustomAuthorizationHeader=!1,this.suppressGetSessionWarning=!1,this.lockAcquired=!1,this.pendingInLock=[],this.broadcastChannel=null,this.logger=console.log;const c=Object.assign(Object.assign({},rk),e);
60if(this.storageKey=c.storageKey,this.instanceID=(r=Ho.nextInstanceID[this.storageKey])!==null&&r!==void 0?r:0,Ho.nextInstanceID[this.storageKey]=this.instanceID+1,this.logDebugMessages=!!c.debug,typeof c.debug=="function"&&(this.logger=c.debug),this.instanceID>0&&Mt()){const f=`${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(f),this.logDebugMessages&&console.trace(f)}if(this.persistSession=c.persistSession,this.autoRefreshToken=c.autoRefreshToken,this.experimental=(s=c.experimental)!==null&&s!==void 0?s:{},this.admin=new qO({url:c.url,headers:c.headers,fetch:c.fetch,experimental:this.experimental}),this.url=c.url,this.headers=c.headers,this.fetch=Gb(c.fetch),this.lock=c.lock||Xv,this.detectSessionInUrl=c.detectSessionInUrl,this.flowType=c.flowType,this.hasCustomAuthorizationHeader=c.hasCustomAuthorizationHeader,this.throwOnError=c.throwOnError,this.lockAcquireTimeout=c.lockAcquireTimeout,c.lock?this.lock=c.lock:this.persistSession&&Mt()&&(!((o=globalThis?.navigator)===null||o===void 0)&&o.locks)?this.lock=VO:this.lock=Xv,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 nk(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:Vb()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=Vv(this.memoryStorage)),c.userStorage&&(this.userStorage=c.userStorage)):(this.memoryStorage={},this.storage=Vv(this.memoryStorage)),Mt()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(f){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",f)}(u=this.broadcastChannel)===null||u===void 0||u.addEventListener("message",async f=>{this._debug("received broadcast notification from other tab or client",f);try{await this._notifyAllSubscribers(f.data.event,f.data.session,!1)}catch(p){this._debug("#broadcastChannel","error",p)}})}c.skipAutoInitialize||this.initialize().catch(f=>{this._debug("#initialize()","error",f)})}isThrowOnErrorEnabled(){return this.throwOnError}_returnResult(e){if(this.throwOnError&&e&&e.error)throw e.error;return e}_logPrefix(){return`GoTrueClient@${this.storageKey}:${this.instanceID} (${Hb}) ${new Date().toISOString()}`}_debug(...e){return this.logDebugMessages&&this.logger(this._logPrefix(),...e),this}async initialize(){return this.initializePromise?await this.initializePromise:(this.initializePromise=(async()=>await this._acquireLock(this.lockAcquireTimeout,async()=>await this._initialize()))(),await this.initializePromise)}async _initialize(){var e;try{let r={},s="none";if(Mt()&&(r=EO(window.location.href),this._isImplicitGrantCallback(r)?s="implicit":await this._isPKCECallback(r)&&(s="pkce")),Mt()&&this.detectSessionInUrl&&s!=="none"){const{data:o,error:u}=await this._getSessionFromURL(r,s);if(u){if(this._debug("#_initialize()","error detecting session from URL",u),pO(u)){const p=(e=u.details)===null||e===void 0?void 0:e.code;if(p==="identity_already_exists"||p==="identity_not_found"||p==="single_identity_not_deletable")return{error:u}}return{error:u}}const{session:c,redirectType:f}=o;return this._debug("#_initialize()","detected session in URL",c,"redirect type",f),await this._saveSession(c),setTimeout(async()=>
60{f==="recovery"?await this._notifyAllSubscribers("PASSWORD_RECOVERY",c):await this._notifyAllSubscribers("SIGNED_IN",c)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(r){return te(r)?this._returnResult({error:r}):this._returnResult({error:new $n("Unexpected error during initialization",r)})}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(e){var r,s,o;try{const u=await oe(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:(s=(r=e?.options)===null||r===void 0?void 0:r.data)!==null&&s!==void 0?s:{},gotrue_meta_security:{captcha_token:(o=e?.options)===null||o===void 0?void 0:o.captchaToken}},xform:jn}),{data:c,error:f}=u;if(f||!c)return this._returnResult({data:{user:null,session:null},error:f});const p=c.session,m=c.user;return c.session&&(await this._saveSession(c.session),await this._notifyAllSubscribers("SIGNED_IN",p)),this._returnResult({data:{user:m,session:p},error:null})}catch(u){if(te(u))return this._returnResult({data:{user:null,session:null},error:u});throw u}}async signUp(e){var r,s,o;try{let u;if("email"in e){const{email:y,password:g,options:b}=e;let _=null,S=null;this.flowType==="pkce"&&([_,S]=await ei(this.storage,this.storageKey)),u=await oe(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:b?.emailRedirectTo,body:{email:y,password:g,data:(r=b?.data)!==null&&r!==void 0?r:{},gotrue_meta_security:{captcha_token:b?.captchaToken},code_challenge:_,code_challenge_method:S},xform:jn})}else if("phone"in e){const{phone:y,password:g,options:b}=e;u=await oe(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:y,password:g,data:(s=b?.data)!==null&&s!==void 0?s:{},channel:(o=b?.channel)!==null&&o!==void 0?o:"sms",gotrue_meta_security:{captcha_token:b?.captchaToken}},xform:jn})}else throw new mu("You must provide either an email or phone number and a password");const{data:c,error:f}=u;if(f||!c)return await Nt(this.storage,`${this.storageKey}-code-verifier`),this._returnResult({data:{user:null,session:null},error:f});const p=c.session,m=c.user;return c.session&&(await this._saveSession(c.session),await this._notifyAllSubscribers("SIGNED_IN",p)),this._returnResult({data:{user:m,session:p},error:null})}catch(u){if(await Nt(this.storage,`${this.storageKey}-code-verifier`),te(u))return this._returnResult({data:{user:null,session:null},error:u});throw u}}async signInWithPassword(e){try{let r;if("email"in e){const{email:u,password:c,options:f}=e;r=await oe(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:u,password:c,gotrue_meta_security:{captcha_token:f?.captchaToken}},xform:$v})}else if("phone"in e){const{phone:u,password:c,options:f}=e;r=await oe(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:u,password:c,gotrue_meta_security:{captcha_token:f?.captchaToken}},xform:$v})}else throw new mu("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 u=new Ws;return this._returnResult({data:{user:null,session:null},error:u})}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(te(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async signInWithOAuth(e){var r,s,o,u;return await this._handleProviderSignIn(e.provider,{redirectTo:(r=e.options)===null||r===void 0?void 0:r.redirectTo,scopes:(s=e.options)===null||s===void 0?void 0:s.scopes,queryParams:(o=e.options)===null||o===void 0?void 0:o.queryParams,skipBrowserRedirect:(u=e.options)===null||u===void 0?void 0:u.skipBrowserRedirect})}async exchangeCodeForSession(e){return await this.initializePromise,this._acquireLock(this.lockAcquireTimeout,async()=>this._exchangeCodeForSession(e))}async signInWithWeb3(e){const{chain:r}=e;switch(r){case"ethereum":return await this.signInWithEthereum(e);case"solana":return await this.signInWithSolana(e);default:throw new Error(`@supabase/auth-js: Unsupported chain "${r}"`)}}async signInWithEthereum(e){var r,s,o,u,c,f,p,m,y,g,b;let _,S;if("message"in e)_=e.message,S=e.signature;else{const{chain:A,wallet:R,statement:x,options:M}=e;let N;if(Mt())if(typeof R=="object")N=R;else{const Q=window;if("ethereum"in Q&&typeof Q.ethereum=="object"&&"request"in Q.ethereum&&typeof Q.ethereum.request=="function")N=Q.ethereum;else throw new Error("@supabase/auth-js: No compatible Ethereum wallet interface on the window object (window.ethereum) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'ethereum', wallet: resolvedUserWallet }) instead.")}else{if(typeof R!="object"||!M?.url)throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");N=R}const B=new URL((r=M?.url)!==null&&r!==void 0?r:window.location.href),J=await N.request({method:"eth_requestAccounts"}).then(Q=>Q).catch(()=>{throw new Error("@supabase/auth-js: Wallet method eth_requestAccounts is missing or invalid")});if(!J||J.length===0)throw new Error("@supabase/auth-js: No accounts available. Please ensure the wallet is connected.");const K=Kb(J[0]);let I=(s=M?.signInWithEthereum)===null||s===void 0?void 0:s.chainId;if(!I){const Q=await N.request({method:"eth_chainId"});I=YO(Q)}const F={domain:B.host,address:K,statement:x,uri:B.href,version:"1",chainId:I,nonce:(o=M?.signInWithEthereum)===null||o===void 0?void 0:o.nonce,issuedAt:(c=(u=M?.signInWithEthereum)===null||u===void 0?void 0:u.issuedAt)!==null&&c!==void 0?c:new Date,expirationTime:(f=M?.signInWithEthereum)===null||f===void 0?void 0:f.expirationTime,notBefore:(p=M?.signInWithEthereum)===null||p===void 0?void 0:p.notBefore,requestId:(m=M?.signInWithEthereum)===null||m===void 0?void 0:m.requestId,resources:(y=M?.signInWithEthereum)===null||y===void 0?void 0:y.resources};_=ZO(F),S=await N.request({method:"personal_sign",params:[KO(_),K]})}try{const{data:A,error:R}=await oe(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"ethereum",message:_,signature:S},!((g=e.options)===null||g===void 0)&&g.captchaToken?{gotrue_meta_security:{captcha_token:(b=e.options)===null||b===void 0?void 0:b.captchaToken}}:null),xform:jn});if(R)throw R;if(!A||!A.session||!A.user){const x=new Ws;return this._returnResult({data:{user:null,session:null},error:x})}
60return A.session&&(await this._saveSession(A.session),await this._notifyAllSubscribers("SIGNED_IN",A.session)),this._returnResult({data:Object.assign({},A),error:R})}catch(A){if(te(A))return this._returnResult({data:{user:null,session:null},error:A});throw A}}async signInWithSolana(e){var r,s,o,u,c,f,p,m,y,g,b,_;let S,A;if("message"in e)S=e.message,A=e.signature;else{const{chain:R,wallet:x,statement:M,options:N}=e;let B;if(Mt())if(typeof x=="object")B=x;else{const K=window;if("solana"in K&&typeof K.solana=="object"&&("signIn"in K.solana&&typeof K.solana.signIn=="function"||"signMessage"in K.solana&&typeof K.solana.signMessage=="function"))B=K.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 x!="object"||!N?.url)throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");B=x}const J=new URL((r=N?.url)!==null&&r!==void 0?r:window.location.href);if("signIn"in B&&B.signIn){const K=await B.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},N?.signInWithSolana),{version:"1",domain:J.host,uri:J.href}),M?{statement:M}:null));let I;if(Array.isArray(K)&&K[0]&&typeof K[0]=="object")I=K[0];else if(K&&typeof K=="object"&&"signedMessage"in K&&"signature"in K)I=K;else throw new Error("@supabase/auth-js: Wallet method signIn() returned unrecognized value");if("signedMessage"in I&&"signature"in I&&(typeof I.signedMessage=="string"||I.signedMessage instanceof Uint8Array)&&I.signature instanceof Uint8Array)S=typeof I.signedMessage=="string"?I.signedMessage:new TextDecoder().decode(I.signedMessage),A=I.signature;else throw new Error("@supabase/auth-js: Wallet method signIn() API returned object without signedMessage and signature fields")}else{if(!("signMessage"in B)||typeof B.signMessage!="function"||!("publicKey"in B)||typeof B!="object"||!B.publicKey||!("toBase58"in B.publicKey)||typeof B.publicKey.toBase58!="function")throw new Error("@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API");S=[`${J.host} wants you to sign in with your Solana account:`,B.publicKey.toBase58(),...M?["",M,""]:[""],"Version: 1",`URI: ${J.href}`,`Issued At: ${(o=(s=N?.signInWithSolana)===null||s===void 0?void 0:s.issuedAt)!==null&&o!==void 0?o:new Date().toISOString()}`,...!((u=N?.signInWithSolana)===null||u===void 0)&&u.notBefore?[`Not Before: ${N.signInWithSolana.notBefore}`]:[],...!((c=N?.signInWithSolana)===null||c===void 0)&&c.expirationTime?[`Expiration Time: ${N.signInWithSolana.expirationTime}`]:[],...!((f=N?.signInWithSolana)===null||f===void 0)&&f.chainId?[`Chain ID: ${N.signInWithSolana.chainId}`]:[],...!((p=N?.signInWithSolana)===null||p===void 0)&&p.nonce?[`Nonce: ${N.signInWithSolana.nonce}`]:[],...!((m=N?.signInWithSolana)===null||m===void 0)&&m.requestId?[`Request ID: ${N.signInWithSolana.requestId}`]:[],...!((g=(y=N?.signInWithSolana)===null||y===void 0?void 0:y.resources)===null||g===void 0)&&g.length?["Resources",...N.signInWithSolana.resources.map(I=>`- ${I}`)]:[]].join(`
61`);const K=await B.signMessage(new TextEncoder().encode(S),"utf8");if(!K||!(K instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");A=K}}try{const{data:R,error:x}=await oe(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:S,signature:es(A)},!((b=e.options)===null||b===void 0)&&b.captchaToken?{gotrue_meta_security:{captcha_token:(_=e.options)===null||_===void 0?void 0:_.captchaToken}}:null),xform:jn});if(x)throw x;if(!R||!R.session||!R.user){const M=new Ws;return this._returnResult({data:{user:null,session:null},error:M})}return R.session&&(await this._saveSession(R.session),await this._notifyAllSubscribers("SIGNED_IN",R.session)),this._returnResult({data:Object.assign({},R),error:x})}catch(R){if(te(R))return this._returnResult({data:{user:null,session:null},error:R});throw R}}async _exchangeCodeForSession(e){const r=await Za(this.storage,`${this.storageKey}-code-verifier`),[s,o]=(r??"").split("/");try{if(!s&&this.flowType==="pkce")throw new mO;const{data:u,error:c}=await oe(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:e,code_verifier:s},xform:jn});if(await Nt(this.storage,`${this.storageKey}-code-verifier`),c)throw c;if(!u||!u.session||!u.user){const f=new Ws;return this._returnResult({data:{user:null,session:null,redirectType:null},error:f})}return u.session&&(await this._saveSession(u.session),await this._notifyAllSubscribers(o==="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",u.session)),this._returnResult({data:Object.assign(Object.assign({},u),{redirectType:o??null}),error:c})}catch(u){if(await Nt(this.storage,`${this.storageKey}-code-verifier`),te(u))return this._returnResult({data:{user:null,session:null,redirectType:null},error:u});throw u}}async signInWithIdToken(e){try{const{options:r,provider:s,token:o,access_token:u,nonce:c}=e,f=await oe(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:s,id_token:o,access_token:u,nonce:c,gotrue_meta_security:{captcha_token:r?.captchaToken}},xform:jn}),{data:p,error:m}=f;if(m)return this._returnResult({data:{user:null,session:null},error:m});if(!p||!p.session||!p.user){const y=new Ws;return this._returnResult({data:{user:null,session:null},error:y})}return p.session&&(await this._saveSession(p.session),await this._notifyAllSubscribers("SIGNED_IN",p.session)),this._returnResult({data:p,error:m})}catch(r){if(te(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async signInWithOtp(e){var r,s,o,u,c;try{if("email"in e){const{email:f,options:p}=e;let m=null,y=null;this.flowType==="pkce"&&([m,y]=await ei(this.storage,this.storageKey));const{error:g}=await oe(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:f,data:(r=p?.data)!==null&&r!==void 0?r:{}
61,create_user:(s=p?.shouldCreateUser)!==null&&s!==void 0?s:!0,gotrue_meta_security:{captcha_token:p?.captchaToken},code_challenge:m,code_challenge_method:y},redirectTo:p?.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:g})}if("phone"in e){const{phone:f,options:p}=e,{data:m,error:y}=await oe(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:f,data:(o=p?.data)!==null&&o!==void 0?o:{},create_user:(u=p?.shouldCreateUser)!==null&&u!==void 0?u:!0,gotrue_meta_security:{captcha_token:p?.captchaToken},channel:(c=p?.channel)!==null&&c!==void 0?c:"sms"}});return this._returnResult({data:{user:null,session:null,messageId:m?.message_id},error:y})}throw new mu("You must provide either an email or phone number.")}catch(f){if(await Nt(this.storage,`${this.storageKey}-code-verifier`),te(f))return this._returnResult({data:{user:null,session:null},error:f});throw f}}async verifyOtp(e){var r,s;try{let o,u;"options"in e&&(o=(r=e.options)===null||r===void 0?void 0:r.redirectTo,u=(s=e.options)===null||s===void 0?void 0:s.captchaToken);const{data:c,error:f}=await oe(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},e),{gotrue_meta_security:{captcha_token:u}}),redirectTo:o,xform:jn});if(f)throw f;if(!c)throw new Error("An error occurred on token verification.");const p=c.session,m=c.user;return p?.access_token&&(await this._saveSession(p),await this._notifyAllSubscribers(e.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",p)),this._returnResult({data:{user:m,session:p},error:null})}catch(o){if(te(o))return this._returnResult({data:{user:null,session:null},error:o});throw o}}async signInWithSSO(e){var r,s,o,u,c;try{let f=null,p=null;this.flowType==="pkce"&&([f,p]=await ei(this.storage,this.storageKey));const m=await oe(this.fetch,"POST",`${this.url}/sso`,{body:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},"providerId"in e?{provider_id:e.providerId}:null),"domain"in e?{domain:e.domain}:null),{redirect_to:(s=(r=e.options)===null||r===void 0?void 0:r.redirectTo)!==null&&s!==void 0?s:void 0}),!((o=e?.options)===null||o===void 0)&&o.captchaToken?{gotrue_meta_security:{captcha_token:e.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:f,code_challenge_method:p}),headers:this.headers,xform:IO});return!((u=m.data)===null||u===void 0)&&u.url&&Mt()&&!(!((c=e.options)===null||c===void 0)&&c.skipBrowserRedirect)&&window.location.assign(m.data.url),this._returnResult(m)}catch(f){if(await Nt(this.storage,`${this.storageKey}-code-verifier`),te(f))return this._returnResult({data:null,error:f});throw f}}async reauthenticate(){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._reauthenticate())}async _reauthenticate(){try{return await this._useSession(async e=>{const{data:{session:r},error:s}=e;if(s)throw s;if(!r)throw new xt;const{error:o}=await oe(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:r.access_token});return this._returnResult({data:{user:null,session:null},error:o})})}catch(e){if(te(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}}async resend(e){try{const r=`${this.url}/resend`;if("email"in e){const{email:s,type:o,options:u}=e,{error:c}=await oe(this.fetch,"POST",r,{headers:this.headers,body:{email:s,type:o,gotrue_meta_security:{captcha_token:u?.captchaToken}},redirectTo:u?.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:c})}else if("phone"in e){const{phone:s,type:o,options:u}=e,{data:c,error:f}=await oe(this.fetch,"POST",r,{headers:this.headers,body:{phone:s,type:o,gotrue_meta_security:{captcha_token:u?.captchaToken}}});return this._returnResult({data:{user:null,session:null,messageId:c?.message_id},error:f})}throw new mu("You must provide either an email or phone number and a type")}catch(r){if(te(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async getSession(){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>this._useSession(async r=>r))}async _acquireLock(e,r){this._debug("#_acquireLock","begin",e);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}`,e,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(e){this._debug("#_useSession","begin");try{const r=await this.__loadSession();return await e(r)}finally{this._debug("#_useSession","end")}}async __loadSession(){this._debug("#__loadSession()","begin"),this.lockAcquired||this._debug("#__loadSession()","used outside of an acquired lock!",new Error().stack);try{let e=null;const r=await Za(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",r),r!==null&&(this._isValidSession(r)?e=r:(this._debug("#getSession()","session from storage is not val
61id"),await this._removeSession())),!e)return{data:{session:null},error:null};const s=e.expires_at?e.expires_at*1e3-Date.now()<Bf:!1;if(this._debug("#__loadSession()",`session has${s?"":" not"} expired`,"expires_at",e.expires_at),!s){if(this.userStorage){const c=await Za(this.userStorage,this.storageKey+"-user");c?.user?e.user=c.user:e.user=If()}if(this.storage.isServer&&e.user&&!e.user.__isUserNotAvailableProxy){const c={value:this.suppressGetSessionWarning};e.user=UO(e.user,c),c.value&&(this.suppressGetSessionWarning=!0)}return{data:{session:e},error:null}}const{data:o,error:u}=await this._callRefreshToken(e.refresh_token);return u?this._returnResult({data:{session:null},error:u}):this._returnResult({data:{session:o},error:null})}finally{this._debug("#__loadSession()","end")}}async getUser(e){if(e)return await this._getUser(e);await this.initializePromise;const r=await this._acquireLock(this.lockAcquireTimeout,async()=>await this._getUser());return r.data.user&&(this.suppressGetSessionWarning=!0),r}async _getUser(e){try{return e?await oe(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:e,xform:da}):await this._useSession(async r=>{var s,o,u;const{data:c,error:f}=r;if(f)throw f;return!(!((s=c.session)===null||s===void 0)&&s.access_token)&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new xt}:await oe(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:(u=(o=c.session)===null||o===void 0?void 0:o.access_token)!==null&&u!==void 0?u:void 0,xform:da})})}catch(r){if(te(r))return pu(r)&&(await this._removeSession(),await Nt(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({data:{user:null},error:r});throw r}}async updateUser(e,r={}){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._updateUser(e,r))}async _updateUser(e,r={}){try{return await this._useSession(async s=>{const{data:o,error:u}=s;if(u)throw u;if(!o.session)throw new xt;const c=o.session;let f=null,p=null;this.flowType==="pkce"&&e.email!=null&&([f,p]=await ei(this.storage,this.storageKey));const{data:m,error:y}=await oe(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:r?.emailRedirectTo,body:Object.assign(Object.assign({},e),{code_challenge:f,code_challenge_method:p}),jwt:c.access_token,xform:da});if(y)throw y;return c.user=m.user,await this._saveSession(c),await this._notifyAllSubscribers("USER_UPDATED",c),this._returnResult({data:{user:c.user},error:null})})}catch(s){if(await Nt(this.storage,`${this.storageKey}-code-verifier`),te(s))return this._returnResult({data:{user:null},error:s});throw s}}async setSession(e){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._setSession(e))}async _setSession(e){try{if(!e.access_token||!e.refresh_token)throw new xt;const r=Date.now()/1e3;let s=r,o=!0,u=null;const{payload:c}=yu(e.access_token);if(c.exp&&(s=c.exp,o=s<=r),o){const{data:f,error:p}=await this._callRefreshToken(e.refresh_token);if(p)return this._returnResult({data:{user:null,session:null},error:p});if(!f)return{data:{user:null,session:null},error:null};u=f}else{const{data:f,error:p}=await this._getUser(e.access_token);if(p)return this._returnResult({data:{user:null,session:null},error:p});u={access_token:e.access_token,refresh_token:e.refresh_token,user:f.user,token_type:"bearer",expires_in:s-r,expires_at:s},await this._saveSession(u),await this._notifyAllSubscribers("SIGNED_IN",u)}return this._returnResult({data:{user:u.user,session:u},error:null})}catch(r){if(te(r))return this._returnResult({data:{session:null,user:null},error:r});throw r}}async refreshSession(e){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._refreshSession(e))}async _refreshSession(e){try{return await this._useSession(async r=>{var s;if(!e){const{data:c,error:f}=r;if(f)throw f;e=(s=c.session)!==null&&s!==void 0?s:void 0}if(!e?.refresh_token)throw new xt;const{data:o,error:u}=await this._callRefreshToken(e.refresh_token);return u?this._returnResult({data:{user:null,session:null},error:u}):o?this._returnResult({data:{user:o.user,session:o},error:null}):this._returnResult({data:{user:null,session:null},error:null})})}catch(r){if(te(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async _getSessionFromURL(e,r){var s;try{if(!Mt())throw new gu("No browser detected.");
61if(e.error||e.error_description||e.error_code)throw new gu(e.error_description||"Error in URL with unspecified error_description",{error:e.error||"unspecified_error",code:e.error_code||"unspecified_code"});switch(r){case"implicit":if(this.flowType==="pkce")throw new Lv("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new gu("Not a valid implicit grant flow url.");break;default:}if(r==="pkce"){if(this._debug("#_initialize()","begin","is PKCE flow",!0),!e.code)throw new Lv("No code detected.");const{data:N,error:B}=await this._exchangeCodeForSession(e.code);if(B)throw B;const J=new URL(window.location.href);return J.searchParams.delete("code"),window.history.replaceState(window.history.state,"",J.toString()),{data:{session:N.session,redirectType:(s=N.redirectType)!==null&&s!==void 0?s:null},error:null}}const{provider_token:o,provider_refresh_token:u,access_token:c,refresh_token:f,expires_in:p,expires_at:m,token_type:y}=e;if(!c||!p||!f||!y)throw new gu("No session defined in URL");const g=Math.round(Date.now()/1e3),b=parseInt(p);let _=g+b;m&&(_=parseInt(m));const S=_-g;S*1e3<=si&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${S}s, should have been closer to ${b}s`);const A=_-b;g-A>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",A,_,g):g-A<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",A,_,g);const{data:R,error:x}=await this._getUser(c);if(x)throw x;const M={provider_token:o,provider_refresh_token:u,access_token:c,expires_in:b,expires_at:_,refresh_token:f,token_type:y,user:R.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),this._returnResult({data:{session:M,redirectType:e.type},error:null})}catch(o){if(te(o))return this._returnResult({data:{session:null,redirectType:null},error:o});throw o}}_isImplicitGrantCallback(e){return typeof this.detectSessionInUrl=="function"?this.detectSessionInUrl(new URL(window.location.href),e):!!(e.access_token||e.error_description)}async _isPKCECallback(e){const r=await Za(this.storage,`${this.storageKey}-code-verifier`);return!!(e.code&&r)}async signOut(e={scope:"global"}){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._signOut(e))}async _signOut({scope:e}={scope:"global"}){return await this._useSession(async r=>{var s;const{data:o,error:u}=r;if(u&&!pu(u))return this._returnResult({error:u});const c=(s=o.session)===null||s===void 0?void 0:s.access_token;if(c){const{error:f}=await this.admin.signOut(c,e);if(f&&!(hO(f)&&(f.status===404||f.status===401||f.status===403)||pu(f)))return this._returnResult({error:f})}return e!=="others"&&(await this._removeSession(),await Nt(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({error:null})})}onAuthStateChange(e){const r=SO(),s={id:r,callback:e,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,await this._acquireLock(this.lockAcquireTimeout,async()=>{this._emitInitialSession(r)})))(),{data:{subscription:s}}}async _emitInitialSession(e){return await this._useSession(async r=>{var s,o;try{const{data:{session:u},error:c}=r;if(c)throw c;await((s=this.stateChangeEmitters.get(e))===null||s===void 0?void 0:s.callback("INITIAL_SESSION",u)),this._debug("INITIAL_SESSION","callback id",e,"session",u)}catch(u){await((o=this.stateChangeEmitters.get(e))===null||o===void 0?void 0:o.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",e,"error",u),pu(u)?console.warn(u):console.error(u)}})}async resetPasswordForEmail(e,r={}){let s=null,o=null;this.flowType==="pkce"&&([s,o]=await ei(this.storage,this.storageKey,!0));try{return await oe(this.fetch,"POST",`${this.url}/recover`,{body:{email:e,code_challenge:s,code_challenge_method:o,gotrue_meta_security:{captcha_token:r.captchaToken}},headers:this.headers,redirectTo:r.redirectTo})}catch(u){if(await Nt(this.storage,`${this.storageKey}-code-verifier`),te(u))return this._returnResult({data:null,error:u});throw u}}async getUserIdentities(){var e;try{const{data:r,error:s}=await this.getUser();if(s)throw s;return this._returnResult({data:{identities:(e=r.user.identities)!==null&&e!==void 0?e:[]},error:null})}catch(r){if(te(r))return this._returnResult({data:null,error:r});throw r}}async linkIdentity(e){return"token"in e?this.linkIdentityIdToken(e):this.linkIdentityOAuth(e)}async linkIdentityOAuth(e){var r;try{const{data:s,error:o}=await this._useSession(async u=>{var c,f,p,m,y;const{data:g,error:b}=u;if(b)throw b;const _=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,e.provider,{redirectTo:(c=e.options)===null||c===void 0?void 0:c.redirectTo,scopes:(f=e.options)===null||f===void 0?void 0:f.scopes,queryParams:(p=e.options)===null||p===void 0?void 0:p.queryParams,skipBrowserRedirect:!0});return await oe(this.fetch,"GET",_,{headers:this.headers,jwt:(y=(m=g.session)===null||m===void 0?void 0:m.access_token)!==null&&y!==void 0?y:void 0})});if(o)throw o;return Mt()&&!(!((r=e.options)===null||r===void 0)&&r.skipBrowserRedirect)&&window.location.assign(s?.url),this._returnResult({data:{provider:e.provider,url:s?.url},error:null})}catch(s){if(te(s))return this._returnResult({data:{provider:e.provider,url:null},error:s});throw s}}async linkIdentityIdToken(e){return await this._useSession(async r=>{var s;try{const{error:o,data:{session:u}}=r;if(o)throw o;const{options:c,provider:f,token:p,access_token:m,nonce:y}=e,g=await oe(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,jwt:(s=u?.access_token)!==null&&s!==void 0?s:void 0,body:{provider:f,id_token:p,access_token:m,nonce:y,link_identity:!0,gotrue_meta_security:{captcha_token:c?.captchaToken}},xform:jn}),{data:b,error:_}=g;return _?this._returnResult({data:{user:null,session:null},error:_}
61):!b||!b.session||!b.user?this._returnResult({data:{user:null,session:null},error:new Ws}):(b.session&&(await this._saveSession(b.session),await this._notifyAllSubscribers("USER_UPDATED",b.session)),this._returnResult({data:b,error:_}))}catch(o){if(await Nt(this.storage,`${this.storageKey}-code-verifier`),te(o))return this._returnResult({data:{user:null,session:null},error:o});throw o}})}async unlinkIdentity(e){try{return await this._useSession(async r=>{var s,o;const{data:u,error:c}=r;if(c)throw c;return await oe(this.fetch,"DELETE",`${this.url}/user/identities/${e.identity_id}`,{headers:this.headers,jwt:(o=(s=u.session)===null||s===void 0?void 0:s.access_token)!==null&&o!==void 0?o:void 0})})}catch(r){if(te(r))return this._returnResult({data:null,error:r});throw r}}async _refreshAccessToken(e){const r=`#_refreshAccessToken(${e.substring(0,5)}...)`;this._debug(r,"begin");try{const s=Date.now();return await RO(async o=>(o>0&&await xO(200*Math.pow(2,o-1)),this._debug(r,"refreshing attempt",o),await oe(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:e},headers:this.headers,xform:jn})),(o,u)=>{const c=200*Math.pow(2,o);return u&&Pf(u)&&Date.now()+c-s<si})}catch(s){if(this._debug(r,"error",s),te(s))return this._returnResult({data:{session:null,user:null},error:s});throw s}finally{this._debug(r,"end")}}_isValidSession(e){return typeof e=="object"&&e!==null&&"access_token"in e&&"refresh_token"in e&&"expires_at"in e}async _handleProviderSignIn(e,r){const s=await this._getUrlForProvider(`${this.url}/authorize`,e,{redirectTo:r.redirectTo,scopes:r.scopes,queryParams:r.queryParams});return this._debug("#_handleProviderSignIn()","provider",e,"options",r,"url",s),Mt()&&!r.skipBrowserRedirect&&window.location.assign(s),{data:{provider:e,url:s},error:null}}async _recoverAndRefresh(){var e,r;const s="#_recoverAndRefresh()";this._debug(s,"begin");try{const o=await Za(this.storage,this.storageKey);if(o&&this.userStorage){let c=await Za(this.userStorage,this.storageKey+"-user");!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!c&&(c={user:o.user},await ii(this.userStorage,this.storageKey+"-user",c)),o.user=(e=c?.user)!==null&&e!==void 0?e:If()}else if(o&&!o.user&&!o.user){const c=await Za(this.storage,this.storageKey+"-user");c&&c?.user?(o.user=c.user,await Nt(this.storage,this.storageKey+"-user"),await ii(this.storage,this.storageKey,o)):o.user=If()}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 u=((r=o.expires_at)!==null&&r!==void 0?r:1/0)*1e3-Date.now()<Bf;if(this._debug(s,`session has${u?"":" not"} expired with margin of ${Bf}s`),u){if(this.autoRefreshToken&&o.refresh_token){const{error:c}=await this._callRefreshToken(o.refresh_token);c&&(console.error(c),Pf(c)||(this._debug(s,"refresh failed with a non-retryable error, removing the session",c),await this._removeSession()))}}else if(o.user&&o.user.__isUserNotAvailableProxy===!0)try{const{data:c,error:f}=await this._getUser(o.access_token);!f&&c?.user?(o.user=c.user,await this._saveSession(o),await this._notifyAllSubscribers("SIGNED_IN",o)):this._debug(s,"could not get user data, skipping SIGNED_IN notification")}catch(c){console.error("Error getting user data:",c),this._debug(s,"error getting user data, skipping SIGNED_IN notification",c)}else await this._notifyAllSubscribers("SIGNED_IN",o)}catch(o){this._debug(s,"error",o),console.error(o);return}finally{this._debug(s,"end")}}async _callRefreshToken(e){var r,s;if(!e)throw new xt;if(this.refreshingDeferred)return this.refreshingDeferred.promise;const o=`#_callRefreshToken(${e.substring(0,5)}...)`;this._debug(o,"begin");try{this.refreshingDeferred=new ac;const{data:u,error:c}=await this._refreshAccessToken(e);if(c)throw c;if(!u.session)throw new xt;await this._saveSession(u.session),await this._notifyAllSubscribers("TOKEN_REFRESHED",u.session);const f={data:u.session,error:null};return this.refreshingDeferred.resolve(f),f}catch(u){if(this._debug(o,"error",u),te(u)){const c={data:null,error:u};return Pf(u)||await this._removeSession(),(r=this.refreshingDeferred)===null||r===void 0||r.resolve(c),c}throw(s=this.refreshingDeferred)===null||s===void 0||s.reject(u),u}finally{this.refreshingDeferred=null,this._debug(o,"end")}}async _notifyAllSubscribers(e,r,s=!0){const o=`#_notifyAllSubscribers(${e})`;this._debug(o,"begin",r,`broadcast = ${s}`);try{this.broadcastChannel&&s&&this.broadcastChannel.postMessage({event:e,session:r});const u=[],c=Array.from(this.stateChangeEmitters.values()).map(async f=>{try{await f.callback(e,r)}catch(p){u.push(p)}});if(await Promise.all(c),u.length>0){for(let f=0;f<u.length;f+=1)console.error(u[f]);throw u[0]}}finally{this._debug(o,"end")}}async _saveSession(e){this._debug("#_saveSession()",e),this.suppressGetSessionWarning=!0,await Nt(this.storage,`${this.storageKey}-code-verifier`);const r=Object.assign({},e),s=r.user&&r.user.__isUserNotAvailableProxy===!0;if(this.userStorage){!s&&r.user&&await ii(this.userStorage,this.storageKey+"-user",{user:r.user});const o=Object.assign({},r);delete o.user;const u=Iv(o);await ii(this.storage,this.storageKey,u)}else{const o=Iv(r);await ii(this.storage,this.storageKey,o)}}async _removeSession(){this._debug("#_removeSession()"),this.suppressGetSessionWarning=!1,await Nt(this.storage,this.storageKey),await Nt(this.storage,this.storageKey+"-code-verifier"),await Nt(this.storage,this.storageKey+"-user"),this.userStorage&&await Nt(this.userStorage,this.storageKey+"-user"),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const e=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{e&&Mt()&&window?.removeEventListener&&window.removeEventListener("visibilitychange",e)}
61catch(r){console.error("removing visibilitychange callback failed",r)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const e=setInterval(()=>this._autoRefreshTokenTick(),si);this.autoRefreshTicker=e,e&&typeof e=="object"&&typeof e.unref=="function"?e.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(e);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 e=this.autoRefreshTicker;this.autoRefreshTicker=null,e&&clearInterval(e);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 _autoRefreshTokenTick(){this._debug("#_autoRefreshTokenTick()","begin");try{await this._acquireLock(0,async()=>{try{const e=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-e)/si);this._debug("#_autoRefreshTokenTick()",`access token expires in ${o} ticks, a tick lasts ${si}ms, refresh threshold is ${oh} ticks`),o<=oh&&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(e){if(e.isAcquireTimeout||e instanceof Yb)this._debug("auto refresh token tick lock not available");else throw e}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!Mt()||!window?.addEventListener)return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=async()=>{try{await this._onVisibilityChanged(!1)}catch(e){this._debug("#visibilityChangedCallback","error",e)}},window?.addEventListener("visibilitychange",this.visibilityChangedCallback),await this._onVisibilityChanged(!0)}catch(e){console.error("_handleVisibilityChange",e)}}async _onVisibilityChanged(e){const r=`#_onVisibilityChanged(${e})`;this._debug(r,"visibilityState",document.visibilityState),document.visibilityState==="visible"?(this.autoRefreshToken&&this._startAutoRefresh(),e||(await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>{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()}))):document.visibilityState==="hidden"&&this.autoRefreshToken&&this._stopAutoRefresh()}async _getUrlForProvider(e,r,s){const o=[`provider=${encodeURIComponent(r)}`];if(s?.redirectTo&&o.push(`redirect_to=${encodeURIComponent(s.redirectTo)}`),s?.scopes&&o.push(`scopes=${encodeURIComponent(s.scopes)}`),this.flowType==="pkce"){const[u,c]=await ei(this.storage,this.storageKey),f=new URLSearchParams({code_challenge:`${encodeURIComponent(u)}`,code_challenge_method:`${encodeURIComponent(c)}`});o.push(f.toString())}if(s?.queryParams){const u=new URLSearchParams(s.queryParams);o.push(u.toString())}return s?.skipBrowserRedirect&&o.push(`skip_http_redirect=${s.skipBrowserRedirect}`),`${e}?${o.join("&")}`}async _unenroll(e){try{return await this._useSession(async r=>{var s;const{data:o,error:u}=r;return u?this._returnResult({data:null,error:u}):await oe(this.fetch,"DELETE",`${this.url}/factors/${e.factorId}`,{headers:this.headers,jwt:(s=o?.session)===null||s===void 0?void 0:s.access_token})})}catch(r){if(te(r))return this._returnResult({data:null,error:r});throw r}}async _enroll(e){try{return await this._useSession(async r=>{var s,o;const{data:u,error:c}=r;if(c)return this._returnResult({data:null,error:c});const f=Object.assign({friendly_name:e.friendlyName,factor_type:e.factorType},e.factorType==="phone"?{phone:e.phone}:e.factorType==="totp"?{issuer:e.issuer}:{}),{data:p,error:m}=await oe(this.fetch,"POST",`${this.url}/factors`,{body:f,headers:this.headers,jwt:(s=u?.session)===null||s===void 0?void 0:s.access_token});return m?this._returnResult({data:null,error:m}):(e.factorType==="totp"&&p.type==="totp"&&(!((o=p?.totp)===null||o===void 0)&&o.qr_code)&&(p.totp.qr_code=`data:image/svg+xml;utf-8,${p.totp.qr_code}`),this._returnResult({data:p,error:null}))})}catch(r){if(te(r))return this._returnResult({data:null,error:r});throw r}}async _verify(e){return this._acquireLock(this.lockAcquireTimeout,async()=>{try{return await this._useSession(async r=>{var s;const{data:o,error:u}=r;if(u)return this._returnResult({data:null,error:u});const c=Object.assign({challenge_id:e.challengeId},"webauthn"in e?{webauthn:Object.assign(Object.assign({},e.webauthn),{credential_response:e.webauthn.type==="create"?Zv(e.webauthn.credential_response):Jv(e.webauthn.credential_response)})}:{code:e.code}),{data:f,error:p}=await oe(this.fetch,"POST",`${this.url}/factors/${e.factorId}/verify`,{body:c,headers:this.headers,jwt:(s=o?.session)===null||s===void 0?void 0:s.access_token});return p?this._returnResult({data:null,error:p}):(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:p}))})}catch(r){if(te(r))return this._returnResult({data:null,error:r});throw r}})}async _challenge(e){return this._acquireLock(this.lockAcquireTimeout,async()=>{try{return await this._useSession(async r=>{var s;const{data:o,error:u}=r;if(u)return this._returnResult({data:null,error:u});const c=await oe(this.fetch,"POST",`${this.url}/factors/${e.factorId}/challenge`,{body:e,headers:this.headers,jwt:(s=o?.session)===null||s===void 0?void 0:s.access_token});if(c.error)return c;const{data:f}=c;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:Yv(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:Kv(f.webauthn.credential_options.publicKey)})})}),error:null}}})}catch(r){if(te(r))return this._returnResult({data:null,error:r});throw r}})}async _challengeAndVerify(e){const{data:r,error:s}=await this._challenge({factorId:e.factorId});return s?this._returnResult({data:null,error:s}):await this._verify({factorId:e.factorId,challengeId:r.id,code:e.code})}async _listFactors(){var e;const{data:{user:r},error:s}=await this.getUser();if(s)return{data:null,error:s};const o={all:[],phone:[],totp:[],webauthn:[]};for(const u of(e=r?.factors)!==null&&e!==void 0?e:[])o.all.push(u),u.status==="verified"&&o[u.factor_type].push(u);return{data:o,error:null}}async _getAuthenticatorAssuranceLevel(e){var r,s,o,u;if(e)try{const{payload:_}=yu(e);let S=null;_.aal&&(S=_.aal);let A=S;const{data:{user:R},error:x}=await this.getUser(e);if(x)return this._returnResult({data:null,error:x});((s=(r=R?.factors)===null||r===void 0?void 0:r.filter(B=>B.status==="verified"))!==null&&s!==void 0?s:[]).length>0&&(A="aal2");const N=_.amr||[];return{data:{currentLevel:S,nextLevel:A,currentAuthenticationMethods:N},error:null}}catch(_){if(te(_))return this._returnResult({data:null,error:_});throw _}const{data:{session:c},error:f}
61=await this.getSession();if(f)return this._returnResult({data:null,error:f});if(!c)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const{payload:p}=yu(c.access_token);let m=null;p.aal&&(m=p.aal);let y=m;((u=(o=c.user.factors)===null||o===void 0?void 0:o.filter(_=>_.status==="verified"))!==null&&u!==void 0?u:[]).length>0&&(y="aal2");const b=p.amr||[];return{data:{currentLevel:m,nextLevel:y,currentAuthenticationMethods:b},error:null}}async _getAuthorizationDetails(e){try{return await this._useSession(async r=>{const{data:{session:s},error:o}=r;return o?this._returnResult({data:null,error:o}):s?await oe(this.fetch,"GET",`${this.url}/oauth/authorizations/${e}`,{headers:this.headers,jwt:s.access_token,xform:u=>({data:u,error:null})}):this._returnResult({data:null,error:new xt})})}catch(r){if(te(r))return this._returnResult({data:null,error:r});throw r}}async _approveAuthorization(e,r){try{return await this._useSession(async s=>{const{data:{session:o},error:u}=s;if(u)return this._returnResult({data:null,error:u});if(!o)return this._returnResult({data:null,error:new xt});const c=await oe(this.fetch,"POST",`${this.url}/oauth/authorizations/${e}/consent`,{headers:this.headers,jwt:o.access_token,body:{action:"approve"},xform:f=>({data:f,error:null})});return c.data&&c.data.redirect_url&&Mt()&&!r?.skipBrowserRedirect&&window.location.assign(c.data.redirect_url),c})}catch(s){if(te(s))return this._returnResult({data:null,error:s});throw s}}async _denyAuthorization(e,r){try{return await this._useSession(async s=>{const{data:{session:o},error:u}=s;if(u)return this._returnResult({data:null,error:u});if(!o)return this._returnResult({data:null,error:new xt});const c=await oe(this.fetch,"POST",`${this.url}/oauth/authorizations/${e}/consent`,{headers:this.headers,jwt:o.access_token,body:{action:"deny"},xform:f=>({data:f,error:null})});return c.data&&c.data.redirect_url&&Mt()&&!r?.skipBrowserRedirect&&window.location.assign(c.data.redirect_url),c})}catch(s){if(te(s))return this._returnResult({data:null,error:s});throw s}}async _listOAuthGrants(){try{return await this._useSession(async e=>{const{data:{session:r},error:s}=e;return s?this._returnResult({data:null,error:s}):r?await oe(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 xt})})}catch(e){if(te(e))return this._returnResult({data:null,error:e});throw e}}async _revokeOAuthGrant(e){try{return await this._useSession(async r=>{const{data:{session:s},error:o}=r;return o?this._returnResult({data:null,error:o}):s?(await oe(this.fetch,"DELETE",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:s.access_token,query:{client_id:e.clientId},noResolveJson:!0}),{data:{},error:null}):this._returnResult({data:null,error:new xt})})}catch(r){if(te(r))return this._returnResult({data:null,error:r});throw r}}async fetchJwk(e,r={keys:[]}){let s=r.keys.find(f=>f.kid===e);if(s)return s;const o=Date.now();if(s=this.jwks.keys.find(f=>f.kid===e),s&&this.jwks_cached_at+dO>o)return s;const{data:u,error:c}=await oe(this.fetch,"GET",`${this.url}/.well-known/jwks.json`,{headers:this.headers});if(c)throw c;return!u.keys||u.keys.length===0||(this.jwks=u,this.jwks_cached_at=o,s=u.keys.find(f=>f.kid===e),!s)?null:s}async getClaims(e,r={}){try{let s=e;if(!s){const{data:_,error:S}
61=await this.getSession();if(S||!_.session)return this._returnResult({data:null,error:S});s=_.session.access_token}const{header:o,payload:u,signature:c,raw:{header:f,payload:p}}=yu(s);r?.allowExpired||MO(u.exp);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:u,header:o,signature:c},error:null}}const y=DO(o.alg),g=await crypto.subtle.importKey("jwk",m,y,!0,["verify"]);if(!await crypto.subtle.verify(y,g,c,_O(`${f}.${p}`)))throw new ch("Invalid JWT signature");return{data:{claims:u,header:o,signature:c},error:null}}catch(s){if(te(s))return this._returnResult({data:null,error:s});throw s}}async signInWithPasskey(e){var r,s,o;In(this.experimental);try{if(!Bu())return this._returnResult({data:null,error:new $n("Browser does not support WebAuthn",null)});const{data:u,error:c}=await this._startPasskeyAuthentication({options:{captchaToken:(r=e?.options)===null||r===void 0?void 0:r.captchaToken}});if(c||!u)return this._returnResult({data:null,error:c});const f=Kv(u.options),p=(o=(s=e?.options)===null||s===void 0?void 0:s.signal)!==null&&o!==void 0?o:dh.createNewAbortSignal(),{data:m,error:y}=await Xb({publicKey:f,signal:p});if(y||!m)return this._returnResult({data:null,error:y??new $n("WebAuthn ceremony failed",null)});const g=Jv(m);return this._verifyPasskeyAuthentication({challengeId:u.challenge_id,credential:g})}catch(u){if(te(u))return this._returnResult({data:null,error:u});throw u}}async registerPasskey(e){var r,s;In(this.experimental);try{if(!Bu())return this._returnResult({data:null,error:new $n("Browser does not support WebAuthn",null)});const{data:o,error:u}=await this._startPasskeyRegistration();if(u||!o)return this._returnResult({data:null,error:u});const c=Yv(o.options),f=(s=(r=e?.options)===null||r===void 0?void 0:r.signal)!==null&&s!==void 0?s:dh.createNewAbortSignal(),{data:p,error:m}=await Jb({publicKey:c,signal:f});if(m||!p)return this._returnResult({data:null,error:m??new $n("WebAuthn ceremony failed",null)});const y=Zv(p);return this._verifyPasskeyRegistration({challengeId:o.challenge_id,credential:y})}catch(o){if(te(o))return this._returnResult({data:null,error:o});throw o}}async _startPasskeyRegistration(){In(this.experimental);try{return await this._useSession(async e=>{const{data:{session:r},error:s}=e;if(s)return this._returnResult({data:null,error:s});if(!r)return this._returnResult({data:null,error:new xt});const{data:o,error:u}=await oe(this.fetch,"POST",`${this.url}/passkeys/registration/options`,{headers:this.headers,jwt:r.access_token,body:{}});return u?this._returnResult({data:null,error:u}):this._returnResult({data:o,error:null})})}catch(e){if(te(e))return this._returnResult({data:null,error:e});throw e}}async _verifyPasskeyRegistration(e){In(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 xt});const{data:u,error:c}=await oe(this.fetch,"POST",`${this.url}/passkeys/registration/verify`,{headers:this.headers,jwt:s.access_token,body:{challenge_id:e.challengeId,credential:e.credential}});return c?this._returnResult({data:null,error:c}):this._returnResult({data:u,error:null})})}catch(r){if(te(r))return this._returnResult({data:null,error:r});throw r}}async _startPasskeyAuthentication(e){var r;In(this.experimental);try{const{data:s,error:o}=await oe(this.fetch,"POST",`${this.url}/passkeys/authentication/options`,{headers:this.headers,body:{gotrue_meta_security:{captcha_token:(r=e?.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(te(s))return this._returnResult({data:null,error:s});throw s}}async _verifyPasskeyAuthentication(e){In(this.experimental);try{const{data:r,error:s}=await oe(this.fetch,"POST",`${this.url}/passkeys/authentication/verify`,{headers:this.headers,body:{challenge_id:e.challengeId,credential:e.credential},xform:jn});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(te(r))return this._returnResult({data:null,error:r});throw r}}async _listPasskeys(){In(this.experimental);try{return await this._useSession(async e=>{const{data:{session:r},error:s}=e;if(s)return this._returnResult({data:null,error:s});if(!r)return this._returnResult({data:null,error:new xt});const{data:o,error:u}=await oe(this.fetch,"GET",`${this.url}/passkeys`,{headers:this.headers,jwt:r.access_token,xform:c=>({data:c,error:null})});return u?this._returnResult({data:null,error:u}):this._returnResult({data:o,error:null})})}catch(e){if(te(e))return this._returnResult({data:null,error:e});throw e}}async _updatePasskey(e){In(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 xt});const{data:u,error:c}=await oe(this.fetch,"PATCH",`${this.url}/passkeys/${e.passkeyId}`,{headers:this.headers,jwt:s.access_token,body:{friendly_name:e.friendlyName}});return c?this._returnResult({data:null,error:c}):this._returnResult({data:u,error:null})})}catch(r){if(te(r))return this._returnResult({data:null,error:r});throw r}}async _deletePasskey(e){In(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 xt});const{error:u}
61=await oe(this.fetch,"DELETE",`${this.url}/passkeys/${e.passkeyId}`,{headers:this.headers,jwt:s.access_token,noResolveJson:!0});return u?this._returnResult({data:null,error:u}):this._returnResult({data:null,error:null})})}catch(r){if(te(r))return this._returnResult({data:null,error:r});throw r}}}Ho.nextInstanceID={};const ak=Ho,sk="2.105.0";let Ao="";typeof Deno<"u"?Ao="deno":typeof document<"u"?Ao="web":typeof navigator<"u"&&navigator.product==="ReactNative"?Ao="react-native":Ao="node";const ik={"X-Client-Info":`supabase-js-${Ao}/${sk}`},ok={headers:ik},lk={schema:"public"},uk={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},ck={};function $o(n){"@babel/helpers - typeof";return $o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},$o(n)}function dk(n,e){if($o(n)!="object"||!n)return n;var r=n[Symbol.toPrimitive];if(r!==void 0){var s=r.call(n,e);if($o(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}function fk(n){var e=dk(n,"string");return $o(e)=="symbol"?e:e+""}function hk(n,e,r){return(e=fk(e))in n?Object.defineProperty(n,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):n[e]=r,n}function Fv(n,e){var r=Object.keys(n);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(n);e&&(s=s.filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable})),r.push.apply(r,s)}return r}function ot(n){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Fv(Object(r),!0).forEach(function(s){hk(n,s,r[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):Fv(Object(r)).forEach(function(s){Object.defineProperty(n,s,Object.getOwnPropertyDescriptor(r,s))})}return n}const pk=n=>n?(...e)=>n(...e):(...e)=>fetch(...e),mk=()=>Headers,gk=(n,e,r)=>{const s=pk(r),o=mk();return async(u,c)=>{var f;const p=(f=await e())!==null&&f!==void 0?f:n;let m=new o(c?.headers);return m.has("apikey")||m.set("apikey",n),m.has("Authorization")||m.set("Authorization",`Bearer ${p}`),s(u,ot(ot({},c),{},{headers:m}))}};function yk(n){return n.endsWith("/")?n:n+"/"}function vk(n,e){var r,s;const{db:o,auth:u,realtime:c,global:f}=n,{db:p,auth:m,realtime:y,global:g}=e,b={db:ot(ot({},p),o),auth:ot(ot({},m),u),realtime:ot(ot({},y),c),storage:{},global:ot(ot(ot({},g),f),{},{headers:ot(ot({},(r=g?.headers)!==null&&r!==void 0?r:{}),(s=f?.headers)!==null&&s!==void 0?s:{})}),accessToken:async()=>""};return n.accessToken?b.accessToken=n.accessToken:delete b.accessToken,b}function bk(n){const e=n?.trim();if(!e)throw new Error("supabaseUrl is required.");if(!e.match(/^https?:\/\//i))throw new Error("Invalid supabaseUrl: Must be a valid HTTP or HTTPS URL.");try{return new URL(yk(e))}catch{throw Error("Invalid supabaseUrl: Provided URL is malformed.")}}var _k=class extends ak{constructor(n){super(n)}},wk=class{constructor(n,e,r){var s,o;this.supabaseUrl=n,this.supabaseKey=e;const u=bk(n);if(!e)throw new Error("supabaseKey is required.");this.realtimeUrl=new URL("realtime/v1",u),this.realtimeUrl.protocol=this.realtimeUrl.protocol.replace("http","ws"),this.authUrl=new URL("auth/v1",u),this.storageUrl=new URL("storage/v1",u),this.functionsUrl=new URL("functions/v1",u);const c=`sb-${u.hostname.split(".")[0]}-auth-token`,f={db:lk,realtime:ck,auth:ot(ot({},uk),{},{storageKey:c}),global:ok},p=vk(r??{},f);if(this.storageKey=(s=p.auth.storageKey)!==null&&s!==void 0?s:"",this.headers=(o=p.global.headers)!==null&&o!==void 0?o:{},p.accessToken)this.accessToken=p.accessToken,this.auth=new Proxy({},{get:(y,g)=>{throw new Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(g)} is not possible`)}});else{var m;this.auth=this._initSupabaseAuthClient((m=p.auth)!==null&&m!==void 0?m:{},this.headers,p.global.fetch)}this.fetch=gk(e,this._getAccessToken.bind(this),p.global.fetch),this.realtime=this._initRealtimeClient(ot({headers:this.headers,accessToken:this._getAccessToken.bind(this),fetch:this.fetch},p.realtime)),this.accessToken&&Promise.resolve(this.accessToken()).then(y=>this.realtime.setAuth(y)).catch(y=>console.warn("Failed to set initial Realtime auth token:",y)),this.rest=new XR(new URL("rest/v1",u).href,{headers:this.headers,schema:p.db.schema,fetch:this.fetch,timeout:p.db.timeout,urlLengthLimit:p.db.urlLengthLimit}),this.storage=new iO(this.storageUrl.href,this.headers,this.fetch,r?.storage),p.accessToken||this._listenForAuthEvents()}get functions(){return new IR(this.functionsUrl.href,{headers:this.headers,customFetch:this.fetch})}from(n){return this.rest.from(n)}schema(n){return this.rest.schema(n)}rpc(n,e={},r={head:!1,get:!1,count:void 0}){return this.rest.rpc(n,e,r)}channel(n,e={config:{}}){return this.realtime.channel(n,e)}getChannels(){return this.realtime.getChannels()}removeChannel(n){return this.realtime.removeChannel(n)}removeAllChannels(){return this.realtime.removeAllChannels()}async _getAccessToken(){var n=this,e,r;if(n.accessToken)return await n.accessToken();const{data:s}=await n.auth.getSession();return(e=(r=s.session)===null||r===void 0?void 0:r.access_token)!==null&&e!==void 0?e:n.supabaseKey}_initSupabaseAuthClient({autoRefreshToken:n,persistSession:e,detectSessionInUrl:r,storage:s,userStorage:o,storageKey:u,flowType:c,lock:f,debug:p,throwOnError:m,experimental:y},g,b){const _={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new _k({url:this.authUrl.href,headers:ot(ot({},_),g),storageKey:u,autoRefreshToken:n,persistSession:e,detectSessionInUrl:r,storage:s,userStorage:o,flowType:c,lock:f,debug:p,throwOnError:m,experimental:y,fetch:b,hasCustomAuthorizationHeader:Object.keys(this.headers).some(S=>S.toLowerCase()==="authorization")})}_initRealtimeClient(n){return new kA(this.realtimeUrl.href,ot(ot({},n),{},{params:ot(ot({},{apikey:this.supabaseKey}),n?.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((n,e)=>{this._handleTokenChanged(n,"CLIENT",e?.access_token)})}_handleTokenChanged(n,e,r){(n==="TOKEN_REFRESHED"||n==="SIGNED_IN")&&this.changedAccessToken!==r?(this.changedAccessToken=r,this.realtime.setAuth(r)):n==="SIGNED_OUT"&&(this.realtime.setAuth(),e=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}};const Sk=(n,e,r)=>new wk(n,e,r);function Ek(){if(typeof window<"u")return!1;const n=globalThis.process;if(!n)return!1;const e=n.version;if(e==null)return!1;const r=e.match(/^v(\d+)\./);return r?parseInt(r[1],10)<=18:!1}Ek()&&console.warn("⚠️  Node.js 18 and below are deprecated and will no longer be supported in future versions of @supabase/supabase-js. Please upgrade to N
61ode.js 20 or later. For more information, visit: https://github.com/orgs/supabase/discussions/37217");function Tk(){return Sk("https://roakbzorjieyzyfzppwg.supabase.co","eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InJvYWtiem9yamlleXp5ZnpwcHdnIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NzczMjY1NjMsImV4cCI6MjA5MjkwMjU2M30.AwehPHR6qrFdPfqxJxTq5gioo_tlGcWZC2EhfI0VjVw",{auth:{storage:typeof window<"u"?localStorage:void 0,persistSession:!0,autoRefreshToken:!0}})}let $f;const Ru=new Proxy({},{get(n,e,r){return $f||($f=Tk()),Reflect.get($f,e,r)}}),Fb=ae.createContext({user:null,session:null,loading:!0,signOut:async()=>{}});function xk({children:n}){const[e,r]=ae.useState(null),[s,o]=ae.useState(!0);return ae.useEffect(()=>{const{data:u}=Ru.auth.onAuthStateChange((c,f)=>{r(f),o(!1)});return Ru.auth.getSession().then(({data:c})=>{r(c.session),o(!1)}),()=>u.subscription.unsubscribe()},[]),H.jsx(Fb.Provider,{value:{user:e?.user??null,session:e,loading:s,signOut:async()=>{await Ru.auth.signOut()}},children:n})}const Rk=()=>ae.useContext(Fb);const Qb=(...n)=>n.filter((e,r,s)=>!!e&&e.trim()!==""&&s.indexOf(e)===r).join(" ").trim();const Ak=n=>n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const Ok=n=>n.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,r,s)=>s?s.toUpperCase():r.toLowerCase());const Qv=n=>{const e=Ok(n);return e.charAt(0).toUpperCase()+e.slice(1)};var kk={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 Ck=n=>{for(const e in n)if(e.startsWith("aria-")||e==="role"||e==="title")return!0;return!1};const jk=ae.forwardRef(({color:n="currentColor",size:e=24,strokeWidth:r=2,absoluteStrokeWidth:s,className:o="",children:u,iconNode:c,...f},p)=>ae.createElement("svg",{ref:p,...kk,width:e,height:e,stroke:n,strokeWidth:s?Number(r)*24/Number(e):r,className:Qb("lucide",o),...!u&&!Ck(f)&&{"aria-hidden":"true"},...f},[...c.map(([m,y])=>ae.createElement(m,y)),...Array.isArray(u)?u:[u]]));const Nk=(n,e)=>{const r=ae.forwardRef(({className:s,...o},u)=>ae.createElement(jk,{ref:u,iconNode:e,className:Qb(`lucide-${Ak(Qv(n))}`,`lucide-${n}`,s),...o}));return r.displayName=Qv(n),r};const Mk=[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}
61],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],Dk=Nk("sparkles",Mk),fh="live_890a21ddb0ca901f01a0e054bfc";function Iu(){return fh?.startsWith("test_")?"sandbox":"live"}let qf=!1;async function G2(){if(!qf)return new Promise((n,e)=>{if(document.querySelector('script[data-paddle="true"]')){const o=Iu()==="sandbox"?"sandbox":"production";window.Paddle.Environment.set(o),window.Paddle.Initialize({token:fh}),qf=!0,n();return}const s=document.createElement("script");s.src="https://cdn.paddle.com/paddle/v2/paddle.js",s.dataset.paddle="true",s.onload=()=>{const o=Iu()==="sandbox"?"sandbox":"production";window.Paddle.Environment.set(o),window.Paddle.Initialize({token:fh}),qf=!0,n()},s.onerror=e,document.head.appendChild(s)})}async function Y2(n){const e=Iu(),{data:r,error:s}=await Ru.functions.invoke("get-paddle-price",{body:{priceId:n,environment:e}});if(s||!r?.paddleId)throw new Error(`Failed to resolve price: ${n}`);return r.paddleId}function Lk(){return Iu()!=="sandbox"?null:H.jsxs("div",{className:"w-full bg-orange-100 border-b border-orange-300 px-4 py-2 text-center text-sm text-orange-800",children:["All payments made in the preview are in test mode."," ",H.jsx("a",{href:"https://docs.lovable.dev/features/payments#test-and-live-environments",target:"_blank",rel:"noopener noreferrer",className:"underline font-medium",children:"Read more"})]})}function Uk(){const{user:n,signOut:e}=Rk();return H.jsx("header",{className:"sticky top-0 z-30 backdrop-blur-md bg-background/80 border-b border-border/50",children:H.jsxs("div",{className:"max-w-6xl mx-auto px-5 h-16 flex items-center justify-between",children:[H.jsxs(qt,{to:"/",className:"flex items-center gap-2 font-extrabold text-lg",children:[H.jsx("span",{className:"grid place-items-center w-9 h-9 rounded-2xl bg-primary text-primary-foreground shadow-pop",children:H.jsx(Dk,{className:"w-5 h-5",strokeWidth:2.5})}),H.jsx("span",{children:"Scattered Saver"})]}),H.jsxs("nav",{className:"hidden md:flex items-center gap-7 text-sm",children:[H.jsx(qt,{to:"/features",className:"hover:text-primary transition",activeProps:{className:"text-primary"},children:"Features"}),H.jsx(qt,{to:"/pricing",className:"hover:text-primary transition",activeProps:{className:"text-primary"},children:"Pricing"}),H.jsx(qt,{to:"/privacy",className:"hover:text-primary transition",activeProps:{className:"text-primary"},children:"Privacy"})]}),H.jsxs("div",{className:"flex items-center gap-3",children:[n?H.jsxs(H.Fragment,{children:[H.jsx(qt,{to:"/account",className:"text-sm hidden sm:inline hover:text-primary",children:"Account"}),H.jsx("button",{onClick:e,className:"text-sm text-muted-foreground hover:text-foreground",children:"Sign out"})]}):H.jsx(qt,{to:"/login",className:"text-sm text-muted-foreground hover:text-foreground hidden sm:inline",children:"Sign in"}),H.jsx(qt,{to:"/download",className:"px-4 py-2 rounded-full bg-primary text-primary-foreground text-sm font-bold shadow-pop hover:scale-[1.03] transition",children:"Download"})]})]})})}function zk(){return H.jsx("footer",{className:"mt-24 border-t border-border/50 bg-card/50",children:H.jsxs("div",{className:"max-w-6xl mx-auto px-5 py-10 flex flex-col gap-4 text-sm text-muted-foreground",children:[H.jsxs("div",{className:"flex flex-col md:flex-row gap-4 md:items-center md:justify-between",children:[H.jsxs("p",{children:["© ",new Date().getFullYear()," Scattered Saver — your data stays on your device."]}),H.jsxs("div",{className:"flex flex-wrap gap-6",children:[H.jsx(qt,{to:"/privacy",className:"hover:text-foreground",children:"Privacy"}),H.jsx(qt,{to:"/terms",className:"hover:text-foreground",children:"Terms"}),H.jsx(qt,{to:"/refunds",className:"hover:text-foreground",children:"Refunds"}),H.jsx(qt,{to:"/features",className:"hover:text-foreground",children:"Features"}),H.jsx(qt,{to:"/pricing",className:"hover:text-foreground",children:"Pricing"}),H.jsx("a",{href:"https://www.etsy.com/shop/TheScatteredSaver",target:"_blank",rel:"noopener noreferrer",className:"hover:text-foreground",children:"Planning kits on Etsy ↗"})]})]}),H.jsx("p",{className:"text-xs italic",children:"Made for ADHD brains, by someone who gets it."})]})})}function Bk(){return H.jsxs("div",{className:"min-h-screen flex flex-col",children:[H.jsx(Lk,{}),H.jsx(Uk,{}),H.jsx("main",{className:"flex-1",children:H.jsx(Ob,{})}),H.jsx(zk,{})]})}function Pk(n){if(typeof document>"u")return;let e=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",e.appendChild(r),r.styleSheet?r.styleSheet.cssText=n:r.appendChild(document.createTextNode(n))}const Ik=n=>{switch(n){case"success":return qk;case"info":return Gk;case"warning":return Vk;case"error":return Yk;default:return null}},Hk=Array(12).fill(0),$k=({visible:n,className:e})=>ee.createElement("div",{className:["sonner-loading-wrapper",e].filter(
vendor: 6,040 bytes, line 61
61Boolean).join(" "),"data-visible":n},ee.createElement("div",{className:"sonner-spinner"},Hk.map((r,s)=>ee.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${s}`})))),qk=ee.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ee.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),Vk=ee.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},ee.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),Gk=ee.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ee.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),Yk=ee.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ee.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),Kk=ee.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},ee.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),ee.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),Zk=()=>{const[n,e]=ee.useState(document.hidden);return ee.useEffect(()=>{const r=()=>{e(document.hidden)};return document.addEventListener("visibilitychange",r),()=>window.removeEventListener("visibilitychange",r)},[]),n};let hh=1;class Jk{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{const r=this.subscribers.indexOf(e);this.subscribers.splice(r,1)}),this.publish=e=>{this.subscribers.forEach(r=>r(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var r;const{message:s,...o}=e,u=typeof e?.id=="number"||((r=e.id)==null?void 0:r.length)>0?e.id:hh++,c=this.toasts.find(p=>p.id===u),f=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(u)&&this.dismissedToasts.delete(u),c?this.toasts=this.toasts.map(p=>p.id===u?(this.publish({...p,...e,id:u,title:s}),{...p,...e,id:u,dismissible:f,title:s}):p):this.addToast({title:s,...o,dismissible:f,id:u}),u},this.dismiss=e=>(e?(this.dismissedToasts.add(e),requestAnimationFrame(()=>this.subscribers.forEach(r=>r({id:e,dismiss:!0})))):this.toasts.forEach(r=>{this.subscribers.forEach(s=>s({id:r.id,dismiss:!0}))}),e),this.message=(e,r)=>this.create({...r,message:e}),this.error=(e,r)=>this.create({...r,message:e,type:"error"}),this.success=(e,r)=>this.create({...r,type:"success",message:e}),this.info=(e,r)=>this.create({...r,type:"info",message:e}),this.warning=(e,r)=>this.create({...r,type:"warning",message:e}),this.loading=(e,r)=>this.create({...r,type:"loading",message:e}),this.promise=(e,r)=>{if(!r)return;let s;r.loading!==void 0&&(s=this.create({...r,promise:e,type:"loading",message:r.loading,description:typeof r.description!="function"?r.description:void 0}));const o=Promise.resolve(e instanceof Function?e():e);let u=s!==void 0,c;const f=o.then(async m=>{if(c=["resolve",m],ee.isValidElement(m))u=!1,this.create({id:s,type:"default",message:m});else if(Fk(m)&&!m.ok){u=!1;const g=typeof r.error=="function"?await r.error(`HTTP error! status: ${m.status}`):r.error,b=typeof r.description=="function"?await r.description(`HTTP error! status: ${m.status}`):r.description,S=typeof g=="object"&&!ee.isValidElement(g)?g:{message:g};this.create({id:s,type:"error",description:b,...S})}else if(m instanceof Error){u=!1;const g=typeof r.error=="function"?await r.error(m):r.error,b=typeof r.description=="function"?await r.description(m):r.description,S=typeof g=="object"&&!ee.isValidElement(g)?g:{message:g};this.create({id:s,type:"error",description:b,...S})}else if(r.success!==void 0){u=!1;const g=typeof r.success=="function"?await r.success(m):r.success,b=typeof r.description=="function"?await r.description(m):r.description,S=typeof g=="object"&&!ee.isValidElement(g)?g:{message:g};this.create({id:s,type:"success",description:b,...S})}}).catch(async m=>{if(c=["reject",m],r.error!==void 0){u=!1;const y=typeof r.error=="function"?await r.error(m):r.error,g=typeof r.description=="function"?await r.description(m):r.description,_=typeof y=="object"&&!ee.isValidElement(y)?y:{message:y};this.create({id:s,type:"error",description:g,..._})}}).finally(()=>{u&&(this.dismiss(s),s=void 0),r.finally==null||r.finally.call(r)}),p=()=>new Promise((m,y)=>f.then(()=>c[0]==="reject"?y(c[1]):m(c[1])).catch(y));return typeof s!="string"&&typeof s!="number"?{unwrap:p}:Object.assign(s,{unwrap:p})},this.custom=(e,r)=>{const s=r?.id||hh++;return this.create({jsx:e(s),id:s,...r}),s},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const rn=new Jk,Xk=(n,e)=>{const r=e?.id||hh++;return rn.addToast({title:n,...e,id:r}),r},Fk=n=>n&&typeof n=="object"&&"ok"in n&&typeof n.ok=="boolean"&&"status"in n&&typeof n.status=="number",Qk=Xk,Wk=()=>rn.toasts,eC=()=>rn.getActiveToasts(),K2=Object.assign(Qk,{success:rn.success,info:rn.info,warning:rn.warning,error:rn.error,custom:rn.custom,message:rn.message,promise:rn.promise,dismiss:rn.dismiss,loading:rn.loading},{getHistory:Wk,getToasts:eC});Pk
vendor: 14,873 bytes, line 61
61("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function 
vendor: 2,366 bytes, line 61
61vu(n){return n.label!==void 0}const tC=3,nC="24px",rC="16px",Wv=4e3,aC=356,sC=14,iC=45,oC=200;function Fn(...n){return n.filter(Boolean).join(" ")}function lC(n){const[e,r]=n.split("-"),s=[];return e&&s.push(e),r&&s.push(r),s}const uC=n=>{var e,r,s,o,u,c,f,p,m;const{invert:y,toast:g,unstyled:b,interacting:_,setHeights:S,visibleToasts:A,heights:R,index:x,toasts:M,expanded:N,removeToast:B,defaultRichColors:J,closeButton:K,style:I,cancelButtonStyle:F,actionButtonStyle:Q,className:he="",descriptionClassName:se="",duration:_e,position:ye,gap:Je,expandByDefault:Ue,classNames:L,icons:Z,closeButtonAriaLabel:le="Close toast"}=n,[ke,we]=ee.useState(null),[k,q]=ee.useState(null),[G,X]=ee.useState(!1),[re,pe]=ee.useState(!1),[xe,ve]=ee.useState(!1),[Be,Pt]=ee.useState(!1),[Vt,cn]=ee.useState(!1),[Ea,dn]=ee.useState(0),[Mr,rr]=ee.useState(0),Gt=ee.useRef(g.duration||_e||Wv),ar=ee.useRef(null),lt=ee.useRef(null),Ta=x===0,Dr=x+1<=A,Rt=g.type,Dn=g.dismissible!==!1,Oe=g.className||"",wt=g.descriptionClassName||"",It=ee.useMemo(()=>R.findIndex(be=>be.toastId===g.id)||0,[R,g.id]),ls=ee.useMemo(()=>{var be;return(be=g.closeButton)!=null?be:K},[g.closeButton,K]),xa=ee.useMemo(()=>g.duration||_e||Wv,[g.duration,_e]),Si=ee.useRef(0),sr=ee.useRef(0),Zo=ee.useRef(0),Lr=ee.useRef(null),[Ra,Ht]=ye.split("-"),Ln=ee.useMemo(()=>R.reduce((be,tt,St)=>St>=It?be:be+tt.height,0),[R,It]),Ut=Zk(),sc=g.invert||y,Ei=Rt==="loading";sr.current=ee.useMemo(()=>It*Je+Ln,[It,Ln]),ee.useEffect(()=>{Gt.current=xa},[xa]),ee.useEffect(()=>{X(!0)},[]),ee.useEffect(()=>{const be=lt.current;if(be){const tt=be.getBoundingClientRect().height;return rr(tt),S(St=>[{toastId:g.id,height:tt,position:g.position},...St]),()=>S(St=>St.filter(zt=>zt.toastId!==g.id))}},[S,g.id]),ee.useLayoutEffect(()=>{if(!G)return;const be=lt.current,tt=be.style.height;be.style.height="auto";const St=be.getBoundingClientRect().height;be.style.height=tt,rr(St),S(zt=>zt.find(at=>at.toastId===g.id)?zt.map(at=>at.toastId===g.id?{...at,height:St}:at):[{toastId:g.id,height:St,position:g.position},...zt])},[G,g.title,g.description,S,g.id,g.jsx,g.action,g.cancel]);const Vn=ee.useCallback(()=>{pe(!0),dn(sr.current),S(be=>be.filter(tt=>tt.toastId!==g.id)),setTimeout(()=>{B(g)},oC)},[g,B,S,sr]);ee.useEffect(()=>{if(g.promise&&Rt==="loading"||g.duration===1/0||g.type==="loading")return;let be;return N||_||Ut?(()=>
vendor: 6,628 bytes, line 61
61{if(Zo.current<Si.current){const zt=new Date().getTime()-Si.current;Gt.current=Gt.current-zt}Zo.current=new Date().getTime()})():Gt.current!==1/0&&(Si.current=new Date().getTime(),be=setTimeout(()=>{g.onAutoClose==null||g.onAutoClose.call(g,g),Vn()},Gt.current)),()=>clearTimeout(be)},[N,_,g,Rt,Ut,Vn]),ee.useEffect(()=>{g.delete&&(Vn(),g.onDismiss==null||g.onDismiss.call(g,g))},[Vn,g.delete]);function us(){var be;if(Z?.loading){var tt;return ee.createElement("div",{className:Fn(L?.loader,g==null||(tt=g.classNames)==null?void 0:tt.loader,"sonner-loader"),"data-visible":Rt==="loading"},Z.loading)}return ee.createElement($k,{className:Fn(L?.loader,g==null||(be=g.classNames)==null?void 0:be.loader),visible:Rt==="loading"})}const cs=g.icon||Z?.[Rt]||Ik(Rt);var Aa,Gn;return ee.createElement("li",{tabIndex:0,ref:lt,className:Fn(he,Oe,L?.toast,g==null||(e=g.classNames)==null?void 0:e.toast,L?.default,L?.[Rt],g==null||(r=g.classNames)==null?void 0:r[Rt]),"data-sonner-toast":"","data-rich-colors":(Aa=g.richColors)!=null?Aa:J,"data-styled":!(g.jsx||g.unstyled||b),"data-mounted":G,"data-promise":!!g.promise,"data-swiped":Vt,"data-removed":re,"data-visible":Dr,"data-y-position":Ra,"data-x-position":Ht,"data-index":x,"data-front":Ta,"data-swiping":xe,"data-dismissible":Dn,"data-type":Rt,"data-invert":sc,"data-swipe-out":Be,"data-swipe-direction":k,"data-expanded":!!(N||Ue&&G),"data-testid":g.testId,style:{"--index":x,"--toasts-before":x,"--z-index":M.length-x,"--offset":`${re?Ea:sr.current}px`,"--initial-height":Ue?"auto":`${Mr}px`,...I,...g.style},onDragEnd:()=>{ve(!1),we(null),Lr.current=null},onPointerDown:be=>{be.button!==2&&(Ei||!Dn||(ar.current=new Date,dn(sr.current),be.target.setPointerCapture(be.pointerId),be.target.tagName!=="BUTTON"&&(ve(!0),Lr.current={x:be.clientX,y:be.clientY})))},onPointerUp:()=>{var be,tt,St;if(Be||!Dn)return;Lr.current=null;const zt=Number(((be=lt.current)==null?void 0:be.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Ur=Number(((tt=lt.current)==null?void 0:tt.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),at=new Date().getTime()-((St=ar.current)==null?void 0:St.getTime()),Yt=ke==="x"?zt:Ur,Oa=Math.abs(Yt)/at;if(Math.abs(Yt)>=iC||Oa>.11){dn(sr.current),g.onDismiss==null||g.onDismiss.call(g,g),q(ke==="x"?zt>0?"right":"left":Ur>0?"down":"up"),Vn(),Pt(!0);return}else{var Kt,Zt;(Kt=lt.current)==null||Kt.style.setProperty("--swipe-amount-x","0px"),(Zt=lt.current)==null||Zt.style.setProperty("--swipe-amount-y","0px")}cn(!1),ve(!1),we(null)},onPointerMove:be=>{var tt,St,zt;if(!Lr.current||!Dn||((tt=window.getSelection())==null?void 0:tt.toString().length)>0)return;const at=be.clientY-Lr.current.y,Yt=be.clientX-Lr.current.x;var Oa;const Kt=(Oa=n.swipeDirections)!=null?Oa:lC(ye);!ke&&(Math.abs(Yt)>1||Math.abs(at)>1)&&we(Math.abs(Yt)>Math.abs(at)?"x":"y");let Zt={x:0,y:0};const ds=Un=>1/(1.5+Math.abs(Un)/20);if(ke==="y"){if(Kt.includes("top")||Kt.includes("bottom"))if(Kt.includes("top")&&at<0||Kt.includes("bottom")&&at>0)Zt.y=at;else{const Un=at*ds(at);Zt.y=Math.abs(Un)<Math.abs(at)?Un:at}}else if(ke==="x"&&(Kt.includes("left")||Kt.includes("right")))if(Kt.includes("left")&&Yt<0||Kt.includes("right")&&Yt>0)Zt.x=Yt;else{const Un=Yt*ds(Yt);Zt.x=Math.abs(Un)<Math.abs(Yt)?Un:Yt}(Math.abs(Zt.x)>0||Math.abs(Zt.y)>0)&&cn(!0),(St=lt.current)==null||St.style.setProperty("--swipe-amount-x",`${Zt.x}px`),(zt=lt.current)==null||zt.style.setProperty("--swipe-amount-y",`${Zt.y}px`)}},ls&&!g.jsx&&Rt!=="loading"?ee.createElement("button",{"aria-label":le,"data-disabled":Ei,"data-close-button":!0,onClick:Ei||!Dn?()=>{}:()=>{Vn(),g.onDismiss==null||g.onDismiss.call(g,g)},className:Fn(L?.closeButton,g==null||(s=g.classNames)==null?void 0:s.closeButton)},(Gn=Z?.close)!=null?Gn:Kk):null,(Rt||g.icon||g.promise)&&g.icon!==null&&(Z?.[Rt]!==null||g.icon)?ee.createElement("div",{"data-icon":"",className:Fn(L?.icon,g==null||(o=g.classNames)==null?void 0:o.icon)},g.promise||g.type==="loading"&&!g.icon?g.icon||us():null,g.type!=="loading"?cs:null):null,ee.createElement("div",{"data-content":"",className:Fn(L?.content,g==null||(u=g.classNames)==null?void 0:u.content)},ee.createElement("div",{"data-title":"",className:Fn(L?.title,g==null||(c=g.classNames)==null?void 0:c.title)},g.jsx?g.jsx:typeof g.title=="function"?g.title():g.title),g.description?ee.createElement("div",{"data-description":"",className:Fn(se,wt,L?.description,g==null||(f=g.classNames)==null?void 0:f.description)},typeof g.description=="function"?g.description():g.description):null),ee.isValidElement(g.cancel)?g.cancel:g.cancel&&vu(g.cancel)?ee.createElement("button",{"data-button":!0,"data-cancel":!0,style:g.cancelButtonStyle||F,onClick:be=>{vu(g.cancel)&&Dn&&(g.cancel.onClick==null||g.cancel.onClick.call(g.cancel,be),Vn())},className:Fn(L?.cancelButton,g==null||(p=g.classNames)==null?void 0:p.cancelButton)},g.cancel.label):null,ee.isValidElement(g.action)?g.action:g.action&&vu(g.action)?ee.createElement("button",{"data-button":!0,"data-action":!0,style:g.actionButtonStyle||Q,onClick:be=>{vu(g.action)&&(g.action.onClick==null||g.action.onClick.call(g.action,be),!be.defaultPrevented&&Vn())},className:Fn(L?.actionButton,g==null||(m=g.classNames)==null?void 0:m.actionButton)},g.action.label):null)};function e0(){if(typeof window>"u"||typeof document>"u")return"ltr";const n=document.documentElement.getAttribute("dir");return n==="auto"||!n?window.getComputedStyle(document.documentElement).direction:n}function cC(n,e){const r={};return[n,e].forEach((s,o)=>{const u=o===1,c=u?"--mobile-offset":"--offset",f=u?rC:nC;function p(m){["top","right","bottom","left"].forEach(y=>{r[`${c}-${y}`]=typeof m=="number"?`${m}px`:m})}typeof s=="number"||typeof s=="string"?p(s):typeof s=="object"?["top","right","bottom","left"].forEach(m=>{s[m]===void 0?r[`${c}-${m}`]=f:r[`${c}-${m}`]=typeof s[m]=="number"?`${s[m]}px`:s[m]}):p(f)}),r}const dC=ee.forwardRef(function(e,r){const{id:s,invert:o,position:u="bottom-right",hotkey:c=["altKey","KeyT"],expand:f,closeButton:p,className:m,offset:y,mobileOffset:g,theme:b="light",richColors:_,duration:S,style:A,visibleToasts:R=tC,toastOptions:x,dir:M=e0(),gap:N=sC,icons:B,containerAriaLabel:J="Notifications"}=e,[K,I]=ee.useState([]),F=ee.useMemo(()=>s?K.filter(G=>G.toasterId===s):K.filter(G=>!G.toasterId),[K,s]),Q=ee.useMemo(()=>Array.from(new Set([u].concat(F.filter(G=>G.position).map(G=>G.position)))),[F,u]),[he,se]=ee.useState([]),[_e,ye]=ee.useState(!1),[Je,Ue]=ee.useState(!1),[L,Z]=ee.useState(b!=="system"?b:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dar
61k":"light"),le=ee.useRef(null),ke=c.join("+").replace(/Key/g,"").replace(/Digit/g,""),we=ee.useRef(null),k=ee.useRef(!1),q=ee.useCallback(G=>{I(X=>{var re;return(re=X.find(pe=>pe.id===G.id))!=null&&re.delete||rn.dismiss(G.id),X.filter(({id:pe})=>pe!==G.id)})},[]);return ee.useEffect(()=>rn.subscribe(G=>{if(G.dismiss){requestAnimationFrame(()=>{I(X=>X.map(re=>re.id===G.id?{...re,delete:!0}:re))});return}setTimeout(()=>{nR.flushSync(()=>{I(X=>{const re=X.findIndex(pe=>pe.id===G.id);return re!==-1?[...X.slice(0,re),{...X[re],...G},...X.slice(re+1)]:[G,...X]})})})}),[K]),ee.useEffect(()=>{if(b!=="system"){Z(b);return}if(b==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?Z("dark"):Z("light")),typeof window>"u")return;const G=window.matchMedia("(prefers-color-scheme: dark)");try{G.addEventListener("change",({matches:X})=>{Z(X?"dark":"light")})}catch{G.addListener(({matches:re})=>{try{Z(re?"dark":"light")}catch(pe){console.error(pe)}})}},[b]),ee.useEffect(()=>{K.length<=1&&ye(!1)},[K]),ee.useEffect(()=>{const G=X=>{var re;if(c.every(ve=>X[ve]||X.code===ve)){var xe;ye(!0),(xe=le.current)==null||xe.focus()}X.code==="Escape"&&(document.activeElement===le.current||(re=le.current)!=null&&re.contains(document.activeElement))&&ye(!1)};return document.addEventListener("keydown",G),()=>document.removeEventListener("keydown",G)},[c]),ee.useEffect(()=>{if(le.current)return()=>{we.current&&(we.current.focus({preventScroll:!0}),we.current=null,k.current=!1)}},[le.current]),ee.createElement("section",{ref:r,"aria-label":`${J} ${ke}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},Q.map((G,X)=>{var re;const[pe,xe]=G.split("-");return F.length?ee.createElement("ol",{key:G,dir:M==="auto"?e0():M,tabIndex:-1,ref:le,className:m,"data-sonner-toaster":!0,"data-sonner-theme":L,"data-y-position":pe,"data-x-position":xe,style:{"--front-toast-height":`${((re=he[0])==null?void 0:re.height)||0}px`,"--width":`${aC}px`,"--gap":`${N}px`,...A,...cC(y,g)},onBlur:ve=>{k.current&&!ve.currentTarget.contains(ve.relatedTarget)&&(k.current=!1,we.current&&(we.current.focus({preventScroll:!0}),we.current=null))},onFocus:ve=>{ve.target instanceof HTMLElement&&ve.target.dataset.dismissible==="false"||k.current||(k.current=!0,we.current=ve.relatedTarget)},onMouseEnter:()=>ye(!0),onMouseMove:()=>ye(!0),onMouseLeave:()=>{Je||ye(!1)},onDragEnd:()=>ye(!1),onPointerDown:ve=>{ve.target instanceof HTMLElement&&ve.target.dataset.dismissible==="false"||Ue(!0)},onPointerUp:()=>Ue(!1)},F.filter(ve=>!ve.position&&X===0||ve.position===G).map((ve,Be)=>{var Pt,Vt;return ee.createElement(uC,{key:ve.id,icons:B,index:Be,toast:ve,defaultRichColors:_,duration:(Pt=x?.duration)!=null?Pt:S,className:x?.className,descriptionClassName:x?.descriptionClassName,invert:o,visibleToasts:R,closeButton:(Vt=x?.closeButton)!=null?Vt:p,interacting:Je,position:G,style:x?.style,unstyled:x?.unstyled,classNames:x?.classNames,cancelButtonStyle:x?.cancelButtonStyle,actionButtonStyle:x?.actionButtonStyle,closeButtonAriaLabel:x?.closeButtonAriaLabel,removeToast:q,toasts:F.filter(cn=>cn.position==ve.position),heights:he.filter(cn=>cn.position==ve.position),setHeights:se,expandByDefault:f,gap:N,expanded:_e,swipeDirections:e.swipeDirections})})):null}))});function fC(){return H.jsx("div",{className:"flex min-h-screen items-center justify-center bg-background px-4",children:H.jsxs("div",{className:"max-w-md text-center",children:[H.jsx("h1",{className:"text-7xl font-bold text-foreground",children:"404"}),H.jsx("h2",{className:"mt-4 text-xl font-semibold text-foreground",children:"Page not found"}),H.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:"The page you're looking for doesn't exist or has been moved."}),H.jsx("div",{className:"mt-6",children:H.jsx(qt,{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"})})]})})}const qn=mR({head:()=>({meta:[{charSet:"utf-8"},{name:"viewport",content:"width=device-width, initial-scale=1"},{title:"The Scattered Saver — Budget help for ADHD brains"},{name:"description",content:"A Chrome extension that catches impulse buys, tracks subscriptions, and plans your payday — without spreadsheets."},{property:"og:title",content:"The Scattered Saver — Budget help for ADHD brains"},{property:"og:description",content:"A Chrome extension that catches impulse buys, tracks subscriptions, and plans your payday — without spreadsheets."},{property:"og:type",content:"website"},{name:"twitter:card",content:"summary"}
61,{httpEquiv:"Content-Security-Policy-Report-Only",content:["default-src 'self' https:","script-src 'self' 'unsafe-inline' 'unsafe-eval' https://*.paddle.com https://*.paddle.com.cn https://*.lovable.dev https://*.lovable.app https://cdn.gpteng.co","style-src 'self' 'unsafe-inline' https://fonts.googleapis.com https://*.paddle.com","font-src 'self' data: https://fonts.gstatic.com https://*.paddle.com","img-src 'self' data: blob: https:","connect-src 'self' https://*.supabase.co wss://*.supabase.co https://*.paddle.com https://*.paddle.com.cn https://*.lovable.app https://*.lovable.dev","frame-src 'self' https://*.paddle.com https://*.paddle.com.cn","frame-ancestors 'self'","base-uri 'self'","form-action 'self' https://*.paddle.com","object-src 'none'","report-uri /api/csp-report"].join("; ")},{name:"twitter:title",content:"The Scattered Saver — Budget help for ADHD brains"},{name:"twitter:description",content:"A Chrome extension that catches impulse buys, tracks subscriptions, and plans your payday — without spreadsheets."},{property:"og:image",content:"https://storage.googleapis.com/gpt-engineer-file-uploads/NMNobBEXMvfO3RCFlpeyQdFSMX53/social-images/social-1777403779485-106de2d8-0aea-4ec3-b97c-f13fc5ae580e.webp"},{name:"twitter:image",content:"https://storage.googleapis.com/gpt-engineer-file-uploads/NMNobBEXMvfO3RCFlpeyQdFSMX53/social-images/social-1777403779485-106de2d8-0aea-4ec3-b97c-f13fc5ae580e.webp"}],links:[{rel:"preconnect",href:"https://fonts.googleapis.com"},{rel:"preconnect",href:"https://fonts.gstatic.com",crossOrigin:""},{rel:"stylesheet",href:"https://fonts.googleapis.com/css2?family=Nunito:wght@500;600;700;800;900&display=swap"},{rel:"stylesheet",href:UR}]}),shellComponent:hC,component:pC,notFoundComponent:fC});function hC({children:n}){return H.jsxs("html",{lang:"en",children:[H.jsx("head",{children:H.jsx(MR,{})}),H.jsxs("body",{children:[n,H.jsx(DR,{})]})]})}function pC(){return H.jsxs(xk,{children:[H.jsx(Bk,{}),H.jsx(dC,{position:"top-center"})]})}const mC="modulepreload",gC=function(n){return"/"+n},t0={},un=function(e,r,s){let o=Promise.resolve();if(r&&r.length>0){let p=function(m){return Promise.all(m.map(y=>Promise.resolve(y).then(g=>({status:"fulfilled",value:g}),g=>({status:"rejected",reason:g}))))};document.getElementsByTagName("link");const c=document.querySelector("meta[property=csp-nonce]"),f=c?.nonce||c?.getAttribute("nonce");o=p(r.map(m=>{if(m=gC(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":mC,y||(b.as="script"),b.crossOrigin="",b.href=m,f&&b.setAttribute("nonce",f),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 u(c){const f=new Event("vite:preloadError",{cancelable:!0});if(f.payload=c,window.dispatchEvent(f),!f.defaultPrevented)throw c}return o.then(c=>{for(const f of c||[])f.status==="rejected"&&u(f.reason);return e().catch(u)})},yC=()=>un(()=>import("./terms-BfdyTjvB.js"),[]),vC=Nn("/terms")({head:()=>({meta:[{title:"Terms & Conditions — The Scattered Saver"},{name:"description",content:"Terms & Conditions for using The Scattered Saver Chrome extension and Plus subscription."}]}),component:ln(yC,"component")}),bC=()=>un(()=>import("./signup-Dx7VddoS.js"),__vite__mapDeps([0,1])),_C=Nn("/signup")({head:()=>({meta:[{title:"Create account — The Scattered Saver"}]}),component:ln(bC,"component")}),wC=()=>un(()=>import("./refunds-ezy8Q7yz.js"),[]),SC=Nn("/refunds")({head:()=>({meta:[{title:"Refund Policy — The Scattered Saver"},{name:"description",content:"30-day money-back guarantee on Plus. Refunds are processed by our payment provider Paddle."},{name:"robots",content:"index, follow"},{property:"og:title",content:"Refund Policy — The Scattered Saver"},{property:"og:description",content:"30-day money-back guarantee on Plus. Refunds are processed by Paddle, our Merchant of Record."},{property:"og:type",content:"website"},{property:"og:url",content:"https://scatteredsaver.com/refunds"},{name:"twitter:card",content:"summary"},{name:"twitter:title",content:"Refund Policy — The Scattered Saver"},{name:"twitter:description",content:"30-day money-back guarantee on Plus."}],links:[{rel:"canonical",href:"https://scatteredsaver.com/refunds"}]}),component:ln(wC,"component")}),EC=()=>un(()=>import("./privacy-C1i5h23y.js"),__vite__mapDeps([2,3])),TC=Nn("/privacy")({head:()=>({meta:[{title:"Privacy Notice — The Scattered Saver"},{name:"description",content:"Your data stays on your device. We never read your bank account, never read your email, never sell your data."}]}),component:ln(EC,"component")}),xC=()=>un(()=>import("./pricing-CQkjhJbd.js"),__vite__mapDeps([4,5,6])),RC=Nn("/pricing")({head:()=>({meta:[{title:"Pricing — The Scattered Saver"},{name:"description",content:"Free forever for the basics. $5.99/mo or $49/year for unlimited categories, auto-detection, and cross-device sync."}]}),component:ln(xC,"component")}
61),AC=()=>un(()=>import("./login-x-zbIE8M.js"),__vite__mapDeps([7,1])),OC=Nn("/login")({head:()=>({meta:[{title:"Sign in — The Scattered Saver"}]}),component:ln(AC,"component")}),kC=()=>un(()=>import("./features-DRqwBK9u.js"),__vite__mapDeps([8,9,3])),CC=Nn("/features")({head:()=>({meta:[{title:"Features — The Scattered Saver"},{name:"description",content:"Impulse Check, Subscription Tracker, and Payday Planner — three ADHD-friendly tools that live in your browser."}]}),component:ln(kC,"component")}),jC=()=>un(()=>import("./download-Dny8JojZ.js"),__vite__mapDeps([10,11,6,12])),NC=Nn("/download")({head:()=>({meta:[{title:"Download — The Scattered Saver"},{name:"description",content:"Download the Chrome extension and load it into your browser in 4 steps."}]}),component:ln(jC,"component")}),MC=()=>un(()=>import("./account-DWrqtlAE.js"),__vite__mapDeps([13,5,14,11])),DC=Nn("/account")({head:()=>({meta:[{title:"Account — The Scattered Saver"}]}),validateSearch:n=>({checkout:n.checkout??void 0,onboarding:n.onboarding??void 0}),component:ln(MC,"component")}),LC=()=>un(()=>import("./index-CclpEpro.js"),__vite__mapDeps([15,9,12])),UC=Nn("/")({head:()=>({meta:[{title:"The Scattered Saver — Budget help for ADHD brains"},{name:"description",content:"A warm, friction-free Chrome extension that helps ADHD brains manage money in the moment — no spreadsheets, no shame."}]}),component:ln(LC,"component")});var He;(function(n){n.assertEqual=o=>{};function e(o){}n.assertIs=e;function r(o){throw new Error}n.assertNever=r,n.arrayToEnum=o=>{const u={};for(const c of o)u[c]=c;return u},n.getValidEnumValues=o=>{const u=n.objectKeys(o).filter(f=>typeof o[o[f]]!="number"),c={};for(const f of u)c[f]=o[f];return n.objectValues(c)},n.objectValues=o=>n.objectKeys(o).map(function(u){return o[u]}),n.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{const u=[];for(const c in o)Object.prototype.hasOwnProperty.call(o,c)&&u.push(c);return u},n.find=(o,u)=>{for(const c of o)if(u(c))return c},n.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&Number.isFinite(o)&&Math.floor(o)===o;function s(o,u=" | "){return o.map(c=>typeof c=="string"?`'${c}'`:c).join(u)}n.joinValues=s,n.jsonStringifyReplacer=(o,u)=>typeof u=="bigint"?u.toString():u})(He||(He={}));var n0;(function(n){n.mergeShapes=(e,r)=>({...e,...r})})(n0||(n0={}));const ue=He.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),la=n=>{switch(typeof n){case"undefined":return ue.undefined;case"string":return ue.string;case"number":return Number.isNaN(n)?ue.nan:ue.number;case"boolean":return ue.boolean;case"function":return ue.function;case"bigint":return ue.bigint;case"symbol":return ue.symbol;case"object":return Array.isArray(n)?ue.array:n===null?ue.null:n.then&&typeof n.then=="function"&&n.catch&&typeof n.catch=="function"?ue.promise:typeof Map<"u"&&n instanceof Map?ue.map:typeof Set<"u"&&n instanceof Set?ue.set:typeof Date<"u"&&n instanceof Date?ue.date:ue.object;default:return ue.unknown}}
vendor: 16,349 bytes, line 61
61,W=He.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class Cr extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=s=>{this.issues=[...this.issues,s]},this.addIssues=(s=[])=>{this.issues=[...this.issues,...s]};const r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=e}format(e){const r=e||function(u){return u.message},s={_errors:[]},o=u=>{for(const c of u.issues)if(c.code==="invalid_union")c.unionErrors.map(o);else if(c.code==="invalid_return_type")o(c.returnTypeError);else if(c.code==="invalid_arguments")o(c.argumentsError);else if(c.path.length===0)s._errors.push(r(c));else{let f=s,p=0;for(;p<c.path.length;){const m=c.path[p];p===c.path.length-1?(f[m]=f[m]||{_errors:[]},f[m]._errors.push(r(c))):f[m]=f[m]||{_errors:[]},f=f[m],p++}}};return o(this),s}static assert(e){if(!(e instanceof Cr))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,He.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=r=>r.message){const r={},s=[];for(const o of this.issues)if(o.path.length>0){const u=o.path[0];r[u]=r[u]||[],r[u].push(e(o))}else s.push(e(o));return{formErrors:s,fieldErrors:r}}get formErrors(){return this.flatten()}}Cr.create=n=>new Cr(n);const ph=(n,e)=>{let r;switch(n.code){case W.invalid_type:n.received===ue.undefined?r="Required":r=`Expected ${n.expected}, received ${n.received}`;break;case W.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(n.expected,He.jsonStringifyReplacer)}`;break;case W.unrecognized_keys:r=`Unrecognized key(s) in object: ${He.joinValues(n.keys,", ")}`;break;case W.invalid_union:r="Invalid input";break;case W.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${He.joinValues(n.options)}`;break;case W.invalid_enum_value:r=`Invalid enum value. Expected ${He.joinValues(n.options)}, received '${n.received}'`;break;case W.invalid_arguments:r="Invalid function arguments";break;case W.invalid_return_type:r="Invalid function return type";break;case W.invalid_date:r="Invalid date";break;case W.invalid_string:typeof n.validation=="object"?"includes"in n.validation?(r=`Invalid input: must include "${n.validation.includes}"`,typeof n.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${n.validation.position}`)):"startsWith"in n.validation?r=`Invalid input: must start with "${n.validation.startsWith}"`:"endsWith"in n.validation?r=`Invalid input: must end with "${n.validation.endsWith}"`:He.assertNever(n.validation):n.validation!=="regex"?r=`Invalid ${n.validation}`:r="Invalid";break;case W.too_small:n.type==="array"?r=`Array must contain ${n.exact?"exactly":n.inclusive?"at least":"more than"} ${n.minimum} element(s)`:n.type==="string"?r=`String must contain ${n.exact?"exactly":n.inclusive?"at least":"over"} ${n.minimum} character(s)`:n.type==="number"?r=`Number must be ${n.exact?"exactly equal to ":n.inclusive?"greater than or equal to ":"greater than "}${n.minimum}`:n.type==="bigint"?r=`Number must be ${n.exact?"exactly equal to ":n.inclusive?"greater than or equal to ":"greater than "}${n.minimum}`:n.type==="date"?r=`Date must be ${n.exact?"exactly equal to ":n.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(n.minimum))}`:r="Invalid input";break;case W.too_big:n.type==="array"?r=`Array must contain ${n.exact?"exactly":n.inclusive?"at most":"less than"} ${n.maximum} element(s)`:n.type==="string"?r=`String must contain ${n.exact?"exactly":n.inclusive?"at most":"under"} ${n.maximum} character(s)`:n.type==="number"?r=`Number must be ${n.exact?"exactly":n.inclusive?"less than or equal to":"less than"} ${n.maximum}`:n.type==="bigint"?r=`BigInt must be ${n.exact?"exactly":n.inclusive?"less than or equal to":"less than"} ${n.maximum}`:n.type==="date"?r=`Date must be ${n.exact?"exactly":n.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(n.maximum))}`:r="Invalid input";break;case W.custom:r="Invalid input";break;case W.invalid_intersection_types:r="Intersection results could not be merged";break;case W.not_multiple_of:r=`Number must be a multiple of ${n.multipleOf}`;break;case W.not_finite:r="Number must be finite";break;default:r=e.defaultError,He.assertNever(n)}return{message:r}};let zC=ph;function BC(){return zC}const PC=n=>{const{data:e,path:r,errorMaps:s,issueData:o}=n,u=[...r,...o.path||[]],c={...o,path:u};if(o.message!==void 0)return{...o,path:u,message:o.message};let f="";const p=s.filter(m=>!!m).slice().reverse();for(const m of p)f=m(c,{data:e,defaultError:f}).message;return{...o,path:u,message:f}};function ne(n,e){const r=BC(),s=PC({issueData:e,data:n.data,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,r,r===ph?void 0:ph].filter(o=>!!o)});n.common.issues.push(s)}class _n{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,r){const s=[];for(const o of r){if(o.status==="aborted")return Ee;o.status==="dirty"&&e.dirty(),s.push(o.value)}return{status:e.value,value:s}}static async mergeObjectAsync(e,r){const s=[];for(const o of r){const u=await o.key,c=await o.value;s.push({key:u,value:c})}return _n.mergeObjectSync(e,s)}static mergeObjectSync(e,r){const s={};for(const o of r){const{key:u,value:c}=o;if(u.status==="aborted"||c.status==="aborted")return Ee;u.status==="dirty"&&e.dirty(),c.status==="dirty"&&e.dirty(),u.value!=="__proto__"&&(typeof c.value<"u"||o.alwaysSet)&&(s[u.value]=c.value)}return{status:e.value,value:s}}}const Ee=Object.freeze({status:"aborted"}),Oo=n=>({status:"dirty",value:n}),Mn=n=>({status:"valid",value:n}),r0=n=>n.status==="aborted",a0=n=>n.status==="dirty",gi=n=>n.status==="valid",Hu=n=>typeof Promise<"u"&&n instanceof Promise;var de;(function(n){n.errToObj=e=>typeof e=="string"?{message:e}:e||{},n.toString=e=>typeof e=="string"?e:e?.message})(de||(de={}));class va{constructor(e,r,s,o){this._cachedPath=[],this.parent=e,this.data=r,this._path=s,this._key=o}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const s0=(n,e)=>{if(gi(e))return{success:!0,data:e.value};if(!n.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const r=new Cr(n.common.issues);return this._error=r,this._error}}};function Ce(n){if(!n)return{};const{errorMap:e,invalid_type_error:r,required_error:s,description:o}=n;if(e&&(r||s))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:o}:{errorMap:(c,f)=>{const{message:p}=n;return c.code==="invalid_enum_value"?{message:p??f.defaultError}:typeof f.data>"u"?{message:p??s??f.defaultError}:c.code!=="invalid_type"?{message:f.defaultError}:{message:p??r??f.defaultError}},description:o}}class ze{get description(){return this._def.description}_getType(e){return la(e.data)}_getOrReturnCtx(e,r){return r||{common:e.parent.common,data:e.data,parsedType:la(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new _n,ctx:{common:e.parent.common,data:e.data,parsedType:la(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const r=this._parse(e);if(Hu(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(e){const r=this._parse(e);return Promise.resolve(r)}parse(e,r){const s=this.safeParse(e,r);if(s.success)return s.data;throw s.error}safeParse(e,r){const s={common:{issues:[],async:r?.async??!1,contextualErrorMap:r?.errorMap},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:la(e)},o=this._parseSync({data:e,path:s.path,parent:s});return s0(s,o)}"~validate"(e){const r={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:la(e)};if(!this["~standard"].async)try{const s=this._parseSync({data:e,path:[],parent:r});return gi(s)?{value:s.value}:{issues:r.common.issues}}catch(s){s?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),r.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:r}).then(s=>gi(s)?{value:s.value}:{issues:r.common.issues})}async parseAsync(e,r){const s=await this.safeParseAsync(e,r);if(s.success)return s.data;throw s.error}async safeParseAsync(e,r){const s={common:{issues:[],contextualErrorMap:r?.errorMap,async:!0},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:la(e)},o=this._parse({data:e,path:s.path,parent:s}),u=await(Hu(o)?o:Promise.resolve(o));return s0(s,u)}refine(e,r){const s=o=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(o):r;return this._refinement((o,u)=>{const c=e(o),f=()=>u.addIssue({code:W.custom,...s(o)});return typeof Promise<"u"&&c instanceof Promise?c.then(p=>p?!0:(f(),!1)):c?!0:(f(),!1)})}refinement(e,r){return this._refinement((s,o)=>e(s)?!0:(o.addIssue(typeof r=="function"?r(s,o):r),!1))}_refinement(e){return new bi({schema:this,typeName:Te.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:r=>this["~validate"](r)}}optional(){return ya.create(this,this._def)}nullable(){return _i.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return nr.create(this)}promise(){return Yu.create(this,this._def)}or(e){return Vu.create([this,e],this._def)}and(e){return Gu.create(this,e,this._def)}transform(e){return new bi({...Ce(this._def),schema:this,typeName:Te.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const r=typeof e=="function"?e:()=>e;return new gh({...Ce(this._def),innerType:this,defaultValue:r,typeName:Te.ZodDefault})}brand(){return new l2({typeName:Te.ZodBranded,type:this,...Ce(this._def)})}catch(e){const r=typeof e=="function"?e:()=>e;return new yh({...Ce(this._def),innerType:this,catchValue:r,typeName:Te.ZodCatch})}describe(e){const r=this.constructor;return new r({...this._def,description:e})}pipe(e){return Nh.create(this,e)}readonly(){return vh.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const IC=/^c[^\s-]{8,}$/i,HC=/^[0-9a-z]+$/,$C=/^[0-9A-HJKMNP-TV-Z]{26}$/i,qC=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,VC=/^[a-z0-9_-]{21}$/i,GC=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,YC=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,KC=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,ZC="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Vf;const JC=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,XC=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,FC=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,QC=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,WC=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,e2=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Wb="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",t2=new RegExp(`^${Wb}$`);function e_(n){let e="[0-5]\\d";n.precision?e=`${e}\\.\\d{${n.precision}}`:n.precision==null&&(e=`${e}(\\.\\d+)?`);const r=n.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${r}`}function n2(n){return new RegExp(`^${e_(n)}$`)}function r2(n){let e=`${Wb}T${e_(n)}`;const r=[];return r.push(n.local?"Z?":"Z"),n.offset&&r.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${r.join("|")})`,new RegExp(`^${e}$`)}function a2(n,e){return!!((e==="v4"||!e)&&JC.test(n)||(e==="v6"||!e)&&FC.test(n))}function s2(n,e){if(!GC.test(n))return!1;try{const[r]=n.split(".");if(!r)return!1;const s=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),o=JSON.parse(atob(s));return!(typeof o!="object"||o===null||"typ"in o&&o?.typ!=="JWT"||!o.alg||e&&o.alg!==e)}catch{return!1}}function i2(n,e){return!!((e==="v4"||!e)&&XC.test(n)||(e==="v6"||!e)&&QC.test(n))}class pa extends ze{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==ue.string){const u=this._getOrReturnCtx(e);return ne(u,{code:W.invalid_type,expected:ue.string,received:u.parsedType}),Ee}const s=new _n;let o;for(const u of this._def.checks)if(u.kind==="min")e.data.length<u.value&&(o=this._getOrReturnCtx(e,o),ne(o,{code:W.too_small,minimum:u.value,type:"string",inclusive:!0,exact:!1,message:u.message}),s.dirty());else if(u.kind==="max")e.data.length>u.value&&(o=this._getOrReturnCtx(e,o),ne(o,{code:W.too_big,maximum:u.value,type:"string",inclusive:!0,exact:!1,message:u.message}),s.dirty());else if(u.kind==="length"){const c=e.data.length>u.value,f=e.data.length<u.value;(c||f)&&(o=this._getOrReturnCtx(e,o),c?ne(o,{code:W.too_big,maximum:u.value,type:"string",inclusive:!0,exact:!0,message:u.message}):f&&ne(o,{code:W.too_small,minimum:u.value,type:"string",inclusive:!0,exact:!0,message:u.message}),s.dirty())}else if(u.kind==="email")KC.test(e.data)||(o=this._getOrReturnCtx(e,o),ne(o,{validation:"email",code:W.invali
vendor: 5,861 bytes, line 61
61d_string,message:u.message}),s.dirty());else if(u.kind==="emoji")Vf||(Vf=new RegExp(ZC,"u")),Vf.test(e.data)||(o=this._getOrReturnCtx(e,o),ne(o,{validation:"emoji",code:W.invalid_string,message:u.message}),s.dirty());else if(u.kind==="uuid")qC.test(e.data)||(o=this._getOrReturnCtx(e,o),ne(o,{validation:"uuid",code:W.invalid_string,message:u.message}),s.dirty());else if(u.kind==="nanoid")VC.test(e.data)||(o=this._getOrReturnCtx(e,o),ne(o,{validation:"nanoid",code:W.invalid_string,message:u.message}),s.dirty());else if(u.kind==="cuid")IC.test(e.data)||(o=this._getOrReturnCtx(e,o),ne(o,{validation:"cuid",code:W.invalid_string,message:u.message}),s.dirty());else if(u.kind==="cuid2")HC.test(e.data)||(o=this._getOrReturnCtx(e,o),ne(o,{validation:"cuid2",code:W.invalid_string,message:u.message}),s.dirty());else if(u.kind==="ulid")$C.test(e.data)||(o=this._getOrReturnCtx(e,o),ne(o,{validation:"ulid",code:W.invalid_string,message:u.message}),s.dirty());else if(u.kind==="url")try{new URL(e.data)}catch{o=this._getOrReturnCtx(e,o),ne(o,{validation:"url",code:W.invalid_string,message:u.message}),s.dirty()}else u.kind==="regex"?(u.regex.lastIndex=0,u.regex.test(e.data)||(o=this._getOrReturnCtx(e,o),ne(o,{validation:"regex",code:W.invalid_string,message:u.message}),s.dirty())):u.kind==="trim"?e.data=e.data.trim():u.kind==="includes"?e.data.includes(u.value,u.position)||(o=this._getOrReturnCtx(e,o),ne(o,{code:W.invalid_string,validation:{includes:u.value,position:u.position},message:u.message}),s.dirty()):u.kind==="toLowerCase"?e.data=e.data.toLowerCase():u.kind==="toUpperCase"?e.data=e.data.toUpperCase():u.kind==="startsWith"?e.data.startsWith(u.value)||(o=this._getOrReturnCtx(e,o),ne(o,{code:W.invalid_string,validation:{startsWith:u.value},message:u.message}),s.dirty()):u.kind==="endsWith"?e.data.endsWith(u.value)||(o=this._getOrReturnCtx(e,o),ne(o,{code:W.invalid_string,validation:{endsWith:u.value},message:u.message}),s.dirty()):u.kind==="datetime"?r2(u).test(e.data)||(o=this._getOrReturnCtx(e,o),ne(o,{code:W.invalid_string,validation:"datetime",message:u.message}),s.dirty()):u.kind==="date"?t2.test(e.data)||(o=this._getOrReturnCtx(e,o),ne(o,{code:W.invalid_string,validation:"date",message:u.message}),s.dirty()):u.kind==="time"?n2(u).test(e.data)||(o=this._getOrReturnCtx(e,o),ne(o,{code:W.invalid_string,validation:"time",message:u.message}),s.dirty()):u.kind==="duration"?YC.test(e.data)||(o=this._getOrReturnCtx(e,o),ne(o,{validation:"duration",code:W.invalid_string,message:u.message}),s.dirty()):u.kind==="ip"?a2(e.data,u.version)||(o=this._getOrReturnCtx(e,o),ne(o,{validation:"ip",code:W.invalid_string,message:u.message}),s.dirty()):u.kind==="jwt"?s2(e.data,u.alg)||(o=this._getOrReturnCtx(e,o),ne(o,{validation:"jwt",code:W.invalid_string,message:u.message}),s.dirty()):u.kind==="cidr"?i2(e.data,u.version)||(o=this._getOrReturnCtx(e,o),ne(o,{validation:"cidr",code:W.invalid_string,message:u.message}),s.dirty()):u.kind==="base64"?WC.test(e.data)||(o=this._getOrReturnCtx(e,o),ne(o,{validation:"base64",code:W.invalid_string,message:u.message}),s.dirty()):u.kind==="base64url"?e2.test(e.data)||(o=this._getOrReturnCtx(e,o),ne(o,{validation:"base64url",code:W.invalid_string,message:u.message}),s.dirty()):He.assertNever(u);return{status:s.value,value:e.data}}_regex(e,r,s){return this.refinement(o=>e.test(o),{validation:r,code:W.invalid_string,...de.errToObj(s)})}_addCheck(e){return new pa({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...de.errToObj(e)})}url(e){return this._addCheck({kind:"url",...de.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...de.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...de.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...de.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...de.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...de.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...de.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...de.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...de.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...de.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...de.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...de.errToObj(e)})}datetime(e){return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof e?.precision>"u"?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...de.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof e?.precision>"u"?null:e?.precision,...de.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...de.errToObj(e)})}regex(e,r){return this._addCheck({kind:"regex",regex:e,...de.errToObj(r)})}includes(e,r){return this._addCheck({kind:"includes",value:e,position:r?.position,...de.errToObj(r?.message)})}startsWith(e,r){return this._addCheck({kind:"startsWith",value:e,...de.errToObj(r)})}endsWith(e,r){return this._addCheck({kind:"endsWith",value:e,...de.errToObj(r)})}min(e,r){return this._addCheck({kind:"min",value:e,...de.errToObj(r)})}max(e,r){return this._addCheck({kind:"max",value:e,...de.errToObj(r)})}length(e,r){return this._addCheck({kind:"length",value:e,...de.errToObj(r)})}nonempty(e){return this.min(1,de.errToObj(e))}trim(){return new pa({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new pa({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new pa({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}
vendor: 15,751 bytes, line 61
61get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxLength(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}}pa.create=n=>new pa({checks:[],typeName:Te.ZodString,coerce:n?.coerce??!1,...Ce(n)});function o2(n,e){const r=(n.toString().split(".")[1]||"").length,s=(e.toString().split(".")[1]||"").length,o=r>s?r:s,u=Number.parseInt(n.toFixed(o).replace(".","")),c=Number.parseInt(e.toFixed(o).replace(".",""));return u%c/10**o}class yi extends ze{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==ue.number){const u=this._getOrReturnCtx(e);return ne(u,{code:W.invalid_type,expected:ue.number,received:u.parsedType}),Ee}let s;const o=new _n;for(const u of this._def.checks)u.kind==="int"?He.isInteger(e.data)||(s=this._getOrReturnCtx(e,s),ne(s,{code:W.invalid_type,expected:"integer",received:"float",message:u.message}),o.dirty()):u.kind==="min"?(u.inclusive?e.data<u.value:e.data<=u.value)&&(s=this._getOrReturnCtx(e,s),ne(s,{code:W.too_small,minimum:u.value,type:"number",inclusive:u.inclusive,exact:!1,message:u.message}),o.dirty()):u.kind==="max"?(u.inclusive?e.data>u.value:e.data>=u.value)&&(s=this._getOrReturnCtx(e,s),ne(s,{code:W.too_big,maximum:u.value,type:"number",inclusive:u.inclusive,exact:!1,message:u.message}),o.dirty()):u.kind==="multipleOf"?o2(e.data,u.value)!==0&&(s=this._getOrReturnCtx(e,s),ne(s,{code:W.not_multiple_of,multipleOf:u.value,message:u.message}),o.dirty()):u.kind==="finite"?Number.isFinite(e.data)||(s=this._getOrReturnCtx(e,s),ne(s,{code:W.not_finite,message:u.message}),o.dirty()):He.assertNever(u);return{status:o.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,de.toString(r))}gt(e,r){return this.setLimit("min",e,!1,de.toString(r))}lte(e,r){return this.setLimit("max",e,!0,de.toString(r))}lt(e,r){return this.setLimit("max",e,!1,de.toString(r))}setLimit(e,r,s,o){return new yi({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:s,message:de.toString(o)}]})}_addCheck(e){return new yi({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:de.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:de.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:de.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:de.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:de.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:de.toString(r)})}finite(e){return this._addCheck({kind:"finite",message:de.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:de.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:de.toString(e)})}get minValue(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&He.isInteger(e.value))}get isFinite(){let e=null,r=null;for(const s of this._def.checks){if(s.kind==="finite"||s.kind==="int"||s.kind==="multipleOf")return!0;s.kind==="min"?(r===null||s.value>r)&&(r=s.value):s.kind==="max"&&(e===null||s.value<e)&&(e=s.value)}return Number.isFinite(r)&&Number.isFinite(e)}}yi.create=n=>new yi({checks:[],typeName:Te.ZodNumber,coerce:n?.coerce||!1,...Ce(n)});class qo extends ze{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==ue.bigint)return this._getInvalidInput(e);let s;const o=new _n;for(const u of this._def.checks)u.kind==="min"?(u.inclusive?e.data<u.value:e.data<=u.value)&&(s=this._getOrReturnCtx(e,s),ne(s,{code:W.too_small,type:"bigint",minimum:u.value,inclusive:u.inclusive,message:u.message}),o.dirty()):u.kind==="max"?(u.inclusive?e.data>u.value:e.data>=u.value)&&(s=this._getOrReturnCtx(e,s),ne(s,{code:W.too_big,type:"bigint",maximum:u.value,inclusive:u.inclusive,message:u.message}),o.dirty()):u.kind==="multipleOf"?e.data%u.value!==BigInt(0)&&(s=this._getOrReturnCtx(e,s),ne(s,{code:W.not_multiple_of,multipleOf:u.value,message:u.message}),o.dirty()):He.assertNever(u);return{status:o.value,value:e.data}}_getInvalidInput(e){const r=this._getOrReturnCtx(e);return ne(r,{code:W.invalid_type,expected:ue.bigint,received:r.parsedType}),Ee}gte(e,r){return this.setLimit("min",e,!0,de.toString(r))}gt(e,r){return this.setLimit("min",e,!1,de.toString(r))}lte(e,r){return this.setLimit("max",e,!0,de.toString(r))}lt(e,r){return this.setLimit("max",e,!1,de.toString(r))}setLimit(e,r,s,o){return new qo({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:s,message:de.toString(o)}]})}_addCheck(e){return new qo({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:de.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:de.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:de.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:de.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:de.toString(r)})}get minValue(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}}qo.create=n=>new qo({checks:[],typeName:Te.ZodBigInt,coerce:n?.coerce??!1,...Ce(n)});class i0 extends ze{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==ue.boolean){const s=this._getOrReturnCtx(e);return ne(s,{code:W.invalid_type,expected:ue.boolean,received:s.parsedType}),Ee}return Mn(e.data)}}i0.create=n=>new i0({typeName:Te.ZodBoolean,coerce:n?.coerce||!1,...Ce(n)});class $u extends ze{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==ue.date){const u=this._getOrReturnCtx(e);return ne(u,{code:W.invalid_type,expected:ue.date,received:u.parsedType}),Ee}if(Number.isNaN(e.data.getTime())){const u=this._getOrReturnCtx(e);return ne(u,{code:W.invalid_date}),Ee}const s=new _n;let o;for(const u of this._def.checks)u.kind==="min"?e.data.getTime()<u.value&&(o=this._getOrReturnCtx(e,o),ne(o,{code:W.too_small,message:u.message,inclusive:!0,exact:!1,minimum:u.value,type:"date"}),s.dirty()):u.kind==="max"?e.data.getTime()>u.value&&(o=this._getOrReturnCtx(e,o),ne(o,{code:W.too_big,message:u.message,inclusive:!0,exact:!1,maximum:u.value,type:"date"}),s.dirty()):He.assertNever(u);return{status:s.value,value:new Date(e.data.getTime())}}_addCheck(e){return new $u({...this._def,checks:[...this._def.checks,e]})}min(e,r){return this._addCheck({kind:"min",value:e.getTime(),message:de.toString(r)})}max(e,r){return this._addCheck({kind:"max",value:e.getTime(),message:de.toString(r)})}get minDate(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e!=null?new Date(e):null}}$u.create=n=>new $u({checks:[],coerce:n?.coerce||!1,typeName:Te.ZodDate,...Ce(n)});class o0 extends ze{_parse(e){if(this._getType(e)!==ue.symbol){const s=this._getOrReturnCtx(e);return ne(s,{code:W.invalid_type,expected:ue.symbol,received:s.parsedType}),Ee}return Mn(e.data)}}o0.create=n=>new o0({typeName:Te.ZodSymbol,...Ce(n)});class l0 extends ze{_parse(e){if(this._getType(e)!==ue.undefined){const s=this._getOrReturnCtx(e);return ne(s,{code:W.invalid_type,expected:ue.undefined,received:s.parsedType}),Ee}return Mn(e.data)}}l0.create=n=>new l0({typeName:Te.ZodUndefined,...Ce(n)});class u0 extends ze{_parse(e){if(this._getType(e)!==ue.null){const s=this._getOrReturnCtx(e);return ne(s,{code:W.invalid_type,expected:ue.null,received:s.parsedType}),Ee}return Mn(e.data)}}u0.create=n=>new u0({typeName:Te.ZodNull,...Ce(n)});class qu extends ze{constructor(){super(...arguments),this._any=!0}_parse(e){return Mn(e.data)}}qu.create=n=>new qu({typeName:Te.ZodAny,...Ce(n)});class c0 extends ze{constructor(){super(...arguments),this._unknown=!0}_parse(e){return Mn(e.data)}}c0.create=n=>new c0({typeName:Te.ZodUnknown,...Ce(n)});class ba extends ze{_parse(e){const r=this._getOrReturnCtx(e);return ne(r,{code:W.invalid_type,expected:ue.never,received:r.parsedType}),Ee}}ba.create=n=>new ba({typeName:Te.ZodNever,...Ce(n)});class d0 extends ze{_parse(e){if(this._getType(e)!==ue.undefined){const s=this._getOrReturnCtx(e);return ne(s,{code:W.invalid_type,expected:ue.void,received:s.parsedType}),Ee}return Mn(e.data)}}d0.create=n=>new d0({typeName:Te.ZodVoid,...Ce(n)});class nr extends ze{_parse(e){const{ctx:r,status:s}=this._processInputParams(e),o=this._def;if(r.parsedType!==ue.array)return ne(r,{code:W.invalid_type,expected:ue.array,received:r.parsedType}),Ee;if(o.exactLength!==null){const c=r.data.length>o.exactLength.value,f=r.data.length<o.exactLength.value;(c||f)&&(ne(r,{code:c?W.too_big:W.too_small,minimum:f?o.exactLength.value:void 0,maximum:c?o.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:o.exactLength.message}),s.dirty())}if(o.minLength!==null&&r.data.length<o.minLength.value&&(ne(r,{code:W.too_small,minimum:o.minLength.value,type:"array",inclusive:!0,exact:!1,message:o.minLength.message}),s.dirty()),o.maxLength!==null&&r.data.length>o.maxLength.value&&(ne(r,{code:W.too_big,maximum:o.maxLength.value,type:"array",inclusive:!0,exact:!1,message:o.maxLength.message}),s.dirty()),r.common.async)return Promise.all([...r.data].map((c,f)=>o.type._parseAsync(new va(r,c,r.path,f)))).then(c=>_n.mergeArray(s,c));const u=[...r.data].map((c,f)=>o.type._parseSync(new va(r,c,r.path,f)));return _n.mergeArray(s,u)}get element(){return this._def.type}min(e,r){return new nr({...this._def,minLength:{value:e,message:de.toString(r)}})}max(e,r){return new nr({...this._def,maxLength:{value:e,message:de.toString(r)}})}length(e,r){return new nr({...this._def,exactLength:{value:e,message:de.toString(r)}})}nonempty(e){return this.min(1,e)}}nr.create=(n,e)=>new nr({type:n,minLength:null,maxLength:null,exactLength:null,typeName:Te.ZodArray,...Ce(e)});function oi(n){if(n instanceof gt){const e={};for(const r in n.shape){const s=n.shape[r];e[r]=ya.create(oi(s))}return new gt({...n._def,shape:()=>e})}else return n instanceof nr?new nr({...n._def,type:oi(n.element)}):n instanceof ya?ya.create(oi(n.unwrap())):n instanceof _i?_i.create(oi(n.unwrap())):n instanceof as?as.create(n.items.map(e=>oi(e))):n}class gt extends ze{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),r=He.objectKeys(e);return this._cached={shape:e,keys:r},this._cached}_parse(e){if(this._getType(e)!==ue.object){const m=this._getOrReturnCtx(e);return ne(m,{code:W.invalid_type,expected:ue.object,received:m.parsedType}),Ee}const{status:s,ctx:o}=this._processInputParams(e),{shape:u,keys:c}=this._getCached(),f=[];if(!(this._def.catchall instanceof ba&&this._def.unknownKeys==="strip"))for(const m in o.data)c.includes(m)||f.push(m);const p=[];for(const m of c){const y=u[m],g=o.data[m];p.push({key:{status:"valid",value:m},value:y._parse(new va(o,g,o.path,m)),alwaysSet:m in o.data})}if(this._def.catchall instanceof ba){const m=this._def.unknownKeys;if(m==="passthrough")for(const y of f)p.push({key:{status:"valid",value:y},value:{status:"valid",value:o.data[y]}});else if(m==="strict")f.length>0&&(ne(o,{code:W.unrecognized_keys,keys:f}),s.dirty());else if(m!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const m=this._def.catchall;for(const y of f){const g=o.data[y];p.push({key:{status:"valid",value:y},value:m._parse(new va(o,g,o.path,y)),alwaysSet:y in o.data})}}return o.common.async?Promise.resolve().then(async()=>{const m=[];for(const y of p){const g=await y.key,b=await y.value;m.push({key:g,value:b,alwaysSet:y.alwaysSet})}return m}).then(m=>_n.mergeObjectSync(s,m)):_n.mergeObjectSync(s,p)}get shape(){return this._def.shape()}strict(e){return de.errToObj,new gt({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(r,s)=>{const o=this._def.errorMap?.(r,s).message??s.defaultError;return r.code==="unrecognized_keys"?{message:de.errToObj(e).message??o}:{message:o}}}:{}})}strip(){return new gt({...this._def,unknownKeys:"strip"})}passthrough(){return new gt({...this._def,unknownKeys:"passthrough"})}extend(e){return new gt({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new gt({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:Te.ZodObject})}setKey(e,r){return this.augment({[e]:r})}catchall(e){return new gt({...this._def,catchall:e})}pick(e){const r={};for(const s of He.objectKeys(e))e[s]&&this.shape[s]&&(r[s]=this.shape[s]);return new gt({...this._def,shape:()=>r})}omit(e){const r={};for(const s of He.objectKeys(this.shape))e[s]||(r[s]=this.shape[s]);return new gt({...this._def,shape:()=>r})}deepPartial(){return oi(this)}partial(e){const r={};for(const s of He.objectKeys(this.shape)){const o=this.shape[s];e&&!e[s]?r[s]=o:r[s]=o.optional()}return new gt({...this._def,shape:()=>r})}required(e){const r={};for(const s of He.objectKeys(this.shape))if(e&&!e[s])r[s]=this.shape[s];else{let u=this.shape[s];for(;u instanceof ya;)u=u._def.innerType;r[s]=u}return new gt({...this._def,shape:()=>r})}keyof(){return t_(He.objectKeys(this.shape))}}gt.create=(n,e)=>new gt({shape:()=>n,unknownKeys:"strip",catchall:ba.create(),typeName:Te.ZodObject,...Ce(e)});gt.strictCreate=(n,e)=>new gt({shape:()=>n,unknownKeys:"strict",catchall:ba.create(),typeName:Te.ZodObject,...Ce(e)});gt.lazycreate=(n,e)=>new gt({shape:n,unknownKeys:"strip",catchall:ba.create(),typeName:Te.ZodObject,...Ce(e)});class Vu extends ze{_parse(e){const{ctx:r}=this._processInputParams(e),s=this._def.options;function o(u){for(const f of u)if(f.result.status==="valid")return f.result;for(const f of u)if(f.result.status==="dirty")return r.common.issues.push(...f.ctx.common.issues),f.result;const c=u.map(f=>new Cr(f.ctx.common.issues));
vendor: 4,111 bytes, line 61
61return ne(r,{code:W.invalid_union,unionErrors:c}),Ee}if(r.common.async)return Promise.all(s.map(async u=>{const c={...r,common:{...r.common,issues:[]},parent:null};return{result:await u._parseAsync({data:r.data,path:r.path,parent:c}),ctx:c}})).then(o);{let u;const c=[];for(const p of s){const m={...r,common:{...r.common,issues:[]},parent:null},y=p._parseSync({data:r.data,path:r.path,parent:m});if(y.status==="valid")return y;y.status==="dirty"&&!u&&(u={result:y,ctx:m}),m.common.issues.length&&c.push(m.common.issues)}if(u)return r.common.issues.push(...u.ctx.common.issues),u.result;const f=c.map(p=>new Cr(p));return ne(r,{code:W.invalid_union,unionErrors:f}),Ee}}get options(){return this._def.options}}Vu.create=(n,e)=>new Vu({options:n,typeName:Te.ZodUnion,...Ce(e)});function mh(n,e){const r=la(n),s=la(e);if(n===e)return{valid:!0,data:n};if(r===ue.object&&s===ue.object){const o=He.objectKeys(e),u=He.objectKeys(n).filter(f=>o.indexOf(f)!==-1),c={...n,...e};for(const f of u){const p=mh(n[f],e[f]);if(!p.valid)return{valid:!1};c[f]=p.data}return{valid:!0,data:c}}else if(r===ue.array&&s===ue.array){if(n.length!==e.length)return{valid:!1};const o=[];for(let u=0;u<n.length;u++){const c=n[u],f=e[u],p=mh(c,f);if(!p.valid)return{valid:!1};o.push(p.data)}return{valid:!0,data:o}}else return r===ue.date&&s===ue.date&&+n==+e?{valid:!0,data:n}:{valid:!1}}class Gu extends ze{_parse(e){const{status:r,ctx:s}=this._processInputParams(e),o=(u,c)=>{if(r0(u)||r0(c))return Ee;const f=mh(u.value,c.value);return f.valid?((a0(u)||a0(c))&&r.dirty(),{status:r.value,value:f.data}):(ne(s,{code:W.invalid_intersection_types}),Ee)};return s.common.async?Promise.all([this._def.left._parseAsync({data:s.data,path:s.path,parent:s}),this._def.right._parseAsync({data:s.data,path:s.path,parent:s})]).then(([u,c])=>o(u,c)):o(this._def.left._parseSync({data:s.data,path:s.path,parent:s}),this._def.right._parseSync({data:s.data,path:s.path,parent:s}))}}Gu.create=(n,e,r)=>new Gu({left:n,right:e,typeName:Te.ZodIntersection,...Ce(r)});class as extends ze{_parse(e){const{status:r,ctx:s}=this._processInputParams(e);if(s.parsedType!==ue.array)return ne(s,{code:W.invalid_type,expected:ue.array,received:s.parsedType}),Ee;if(s.data.length<this._def.items.length)return ne(s,{code:W.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Ee;!this._def.rest&&s.data.length>this._def.items.length&&(ne(s,{code:W.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());const u=[...s.data].map((c,f)=>{const p=this._def.items[f]||this._def.rest;return p?p._parse(new va(s,c,s.path,f)):null}).filter(c=>!!c);return s.common.async?Promise.all(u).then(c=>_n.mergeArray(r,c)):_n.mergeArray(r,u)}get items(){return this._def.items}rest(e){return new as({...this._def,rest:e})}}as.create=(n,e)=>{if(!Array.isArray(n))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new as({items:n,typeName:Te.ZodTuple,rest:null,...Ce(e)})};class f0 extends ze{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:r,ctx:s}=this._processInputParams(e);if(s.parsedType!==ue.map)return ne(s,{code:W.invalid_type,expected:ue.map,received:s.parsedType}),Ee;const o=this._def.keyType,u=this._def.valueType,c=[...s.data.entries()].map(([f,p],m)=>({key:o._parse(new va(s,f,s.path,[m,"key"])),value:u._parse(new va(s,p,s.path,[m,"value"]))}));if(s.common.async){const f=new Map;return Promise.resolve().then(async()=>{for(const p of c){const m=await p.key,y=await p.value;if(m.status==="aborted"||y.status==="aborted")return Ee;(m.status==="dirty"||y.status==="dirty")&&r.dirty(),f.set(m.value,y.value)}return{status:r.value,value:f}})}else{const f=new Map;for(const p of c){const m=p.key,y=p.value;if(m.status==="aborted"||y.status==="aborted")return Ee;(m.status==="dirty"||y.status==="dirty")&&r.dirty(),f.set(m.value,y.value)}return{status:r.value,value:f}}}}f0.create=(n,e,r)=>new f0({valueType:e,keyType:n,typeName:Te.ZodMap,...Ce(r)});class Vo extends ze{_parse(e){const{status:r,ctx:s}=this._processInputParams(e);
vendor: 9,065 bytes, line 61
61if(s.parsedType!==ue.set)return ne(s,{code:W.invalid_type,expected:ue.set,received:s.parsedType}),Ee;const o=this._def;o.minSize!==null&&s.data.size<o.minSize.value&&(ne(s,{code:W.too_small,minimum:o.minSize.value,type:"set",inclusive:!0,exact:!1,message:o.minSize.message}),r.dirty()),o.maxSize!==null&&s.data.size>o.maxSize.value&&(ne(s,{code:W.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),r.dirty());const u=this._def.valueType;function c(p){const m=new Set;for(const y of p){if(y.status==="aborted")return Ee;y.status==="dirty"&&r.dirty(),m.add(y.value)}return{status:r.value,value:m}}const f=[...s.data.values()].map((p,m)=>u._parse(new va(s,p,s.path,m)));return s.common.async?Promise.all(f).then(p=>c(p)):c(f)}min(e,r){return new Vo({...this._def,minSize:{value:e,message:de.toString(r)}})}max(e,r){return new Vo({...this._def,maxSize:{value:e,message:de.toString(r)}})}size(e,r){return this.min(e,r).max(e,r)}nonempty(e){return this.min(1,e)}}Vo.create=(n,e)=>new Vo({valueType:n,minSize:null,maxSize:null,typeName:Te.ZodSet,...Ce(e)});class h0 extends ze{get schema(){return this._def.getter()}_parse(e){const{ctx:r}=this._processInputParams(e);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}}h0.create=(n,e)=>new h0({getter:n,typeName:Te.ZodLazy,...Ce(e)});class p0 extends ze{_parse(e){if(e.data!==this._def.value){const r=this._getOrReturnCtx(e);return ne(r,{received:r.data,code:W.invalid_literal,expected:this._def.value}),Ee}return{status:"valid",value:e.data}}get value(){return this._def.value}}p0.create=(n,e)=>new p0({value:n,typeName:Te.ZodLiteral,...Ce(e)});function t_(n,e){return new vi({values:n,typeName:Te.ZodEnum,...Ce(e)})}class vi extends ze{_parse(e){if(typeof e.data!="string"){const r=this._getOrReturnCtx(e),s=this._def.values;return ne(r,{expected:He.joinValues(s),received:r.parsedType,code:W.invalid_type}),Ee}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){const r=this._getOrReturnCtx(e),s=this._def.values;return ne(r,{received:r.data,code:W.invalid_enum_value,options:s}),Ee}return Mn(e.data)}get options(){return this._def.values}get enum(){const e={};for(const r of this._def.values)e[r]=r;return e}get Values(){const e={};for(const r of this._def.values)e[r]=r;return e}get Enum(){const e={};for(const r of this._def.values)e[r]=r;return e}extract(e,r=this._def){return vi.create(e,{...this._def,...r})}exclude(e,r=this._def){return vi.create(this.options.filter(s=>!e.includes(s)),{...this._def,...r})}}vi.create=t_;class m0 extends ze{_parse(e){const r=He.getValidEnumValues(this._def.values),s=this._getOrReturnCtx(e);if(s.parsedType!==ue.string&&s.parsedType!==ue.number){const o=He.objectValues(r);return ne(s,{expected:He.joinValues(o),received:s.parsedType,code:W.invalid_type}),Ee}if(this._cache||(this._cache=new Set(He.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){const o=He.objectValues(r);return ne(s,{received:s.data,code:W.invalid_enum_value,options:o}),Ee}return Mn(e.data)}get enum(){return this._def.values}}m0.create=(n,e)=>new m0({values:n,typeName:Te.ZodNativeEnum,...Ce(e)});class Yu extends ze{unwrap(){return this._def.type}_parse(e){const{ctx:r}=this._processInputParams(e);if(r.parsedType!==ue.promise&&r.common.async===!1)return ne(r,{code:W.invalid_type,expected:ue.promise,received:r.parsedType}),Ee;const s=r.parsedType===ue.promise?r.data:Promise.resolve(r.data);return Mn(s.then(o=>this._def.type.parseAsync(o,{path:r.path,errorMap:r.common.contextualErrorMap})))}}Yu.create=(n,e)=>new Yu({type:n,typeName:Te.ZodPromise,...Ce(e)});class bi extends ze{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Te.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:r,ctx:s}=this._processInputParams(e),o=this._def.effect||null,u={addIssue:c=>{ne(s,c),c.fatal?r.abort():r.dirty()},get path(){return s.path}};if(u.addIssue=u.addIssue.bind(u),o.type==="preprocess"){const c=o.transform(s.data,u);if(s.common.async)return Promise.resolve(c).then(async f=>{if(r.value==="aborted")return Ee;const p=await this._def.schema._parseAsync({data:f,path:s.path,parent:s});return p.status==="aborted"?Ee:p.status==="dirty"||r.value==="dirty"?Oo(p.value):p});{if(r.value==="aborted")return Ee;const f=this._def.schema._parseSync({data:c,path:s.path,parent:s});return f.status==="aborted"?Ee:f.status==="dirty"||r.value==="dirty"?Oo(f.value):f}}if(o.type==="refinement"){const c=f=>{const p=o.refinement(f,u);if(s.common.async)return Promise.resolve(p);if(p instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return f};if(s.common.async===!1){const f=this._def.schema._parseSync({data:s.data,path:s.path,parent:s});return f.status==="aborted"?Ee:(f.status==="dirty"&&r.dirty(),c(f.value),{status:r.value,value:f.value})}else return this._def.schema._parseAsync({data:s.data,path:s.path,parent:s}).then(f=>f.status==="aborted"?Ee:(f.status==="dirty"&&r.dirty(),c(f.value).then(()=>({status:r.value,value:f.value}))))}if(o.type==="transform")if(s.common.async===!1){const c=this._def.schema._parseSync({data:s.data,path:s.path,parent:s});if(!gi(c))return Ee;const f=o.transform(c.value,u);if(f instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:f}}else return this._def.schema._parseAsync({data:s.data,path:s.path,parent:s}).then(c=>gi(c)?Promise.resolve(o.transform(c.value,u)).then(f=>({status:r.value,value:f})):Ee);He.assertNever(o)}}bi.create=(n,e,r)=>new bi({schema:n,typeName:Te.ZodEffects,effect:e,...Ce(r)});bi.createWithPreprocess=(n,e,r)=>new bi({schema:e,effect:{type:"preprocess",transform:n},typeName:Te.ZodEffects,...Ce(r)});class ya extends ze{_parse(e){return this._getType(e)===ue.undefined?Mn(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}ya.create=(n,e)=>new ya({innerType:n,typeName:Te.ZodOptional,...Ce(e)});class _i extends ze{_parse(e){return this._getType(e)===ue.null?Mn(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}_i.create=(n,e)=>new _i({innerType:n,typeName:Te.ZodNullable,...Ce(e)});class gh extends ze{_parse(e){const{ctx:r}=this._processInputParams(e);let s=r.data;return r.parsedType===ue.undefined&&(s=this._def.defaultValue()),this._def.innerType._parse({data:s,path:r.path,parent:r})}removeDefault(){return this._def.innerType}}gh.create=(n,e)=>new gh({innerType:n,typeName:Te.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...Ce(e)});class yh extends ze{_parse(e){const{ctx:r}=this._processInputParams(e),s={...r,common:{...r.common,issues:[]}},o=this._def.innerType._parse({data:s.data,path:s.path,parent:{...s}});return Hu(o)?o.then(u=>({status:"valid",value:u.status==="valid"?u.value:this._def.catchValue({get error(){return new Cr(s.common.issues)},input:s.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Cr(s.common.issues)},input:s.data})}}removeCatch(){return this._def.innerType}}yh.create=(n,e)=>new yh({innerType:n,typeName:Te.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...Ce(e)});class g0 extends ze{_parse(e){if(this._getType(e)!==ue.nan){const s=this._getOrReturnCtx(e);return ne(s,{code:W.invalid_type,expected:ue.nan,received:s.parsedType}),Ee}return{status:"valid",value:e.data}}}g0.create=n=>new g0({typeName:Te.ZodNaN,...Ce(n)});class l2 extends ze{_parse(e){const{ctx:r}=this._processInputParams(e),s=r.data;return this._def.type._parse({data:s,path:r.path,parent:r})}unwrap(){return this._def.type}}class Nh extends ze{_parse(e){const{status:r,ctx:s}=this._processInputParams(e);if(s.common.async)return(async()=>{const u=await this._def.in._parseAsync({data:s.data,path:s.path,parent:s});return u.status==="aborted"?Ee:u.status==="dirty"?(r.dirty(),Oo(u.value)):this._def.out._parseAsync({data:u.value,path:s.path,parent:s})})();{const o=this._def.in._parseSync({data:s.data,path:s.path,parent:s});return o.status==="aborted"?Ee:o.status==="dirty"?(r.dirty(),{status:"dirty",value:o.value}):this._def.out._parseSync({data:o.value,path:s.path,parent:s})}}static create(e,r){return new Nh({in:e,out:r,typeName:Te.ZodPipeline})}}class vh extends ze{_parse(e){const r=this._def.innerType._parse(e),s=o=>(gi(o)&&(o.value=Object.freeze(o.value)),o);return Hu(r)?r.then(o=>s(o)):s(r)}unwrap(){return this._def.innerType}}vh.create=(n,e)=>new vh({innerType:n,typeName:Te.ZodReadonly,...Ce(e)});function u2(n,e={},r){return qu.create()}var Te;(function(n){n.ZodString="ZodString",n.ZodNumber="ZodNumber",n.ZodNaN="ZodNaN",n.ZodBigInt="ZodBigInt",n.ZodBoolean="ZodBoolean",n.ZodDate="ZodDate",n.ZodSymbol="ZodSymbol",n.ZodUndefined="ZodUndefined",n.ZodNull="ZodNull",n.ZodAny="ZodAny",n.ZodUnknown="ZodUnknown",n.ZodNever="ZodNever",n.ZodVoid="ZodVoid",n.ZodArray="ZodArray",n.ZodObject="ZodObject",n.ZodUnion="ZodUnion",
61n.ZodDiscriminatedUnion="ZodDiscriminatedUnion",n.ZodIntersection="ZodIntersection",n.ZodTuple="ZodTuple",n.ZodRecord="ZodRecord",n.ZodMap="ZodMap",n.ZodSet="ZodSet",n.ZodFunction="ZodFunction",n.ZodLazy="ZodLazy",n.ZodLiteral="ZodLiteral",n.ZodEnum="ZodEnum",n.ZodEffects="ZodEffects",n.ZodNativeEnum="ZodNativeEnum",n.ZodOptional="ZodOptional",n.ZodNullable="ZodNullable",n.ZodDefault="ZodDefault",n.ZodCatch="ZodCatch",n.ZodPromise="ZodPromise",n.ZodBranded="ZodBranded",n.ZodPipeline="ZodPipeline",n.ZodReadonly="ZodReadonly"})(Te||(Te={}));const bu=pa.create,c2=yi.create;qu.create;ba.create;nr.create;const d2=gt.create;Vu.create;Gu.create;as.create;vi.create;Yu.create;ya.create;_i.create;var f2=n=>{const e="input"in n?n.input:"input",r="output"in n?n.output:"output",s="schema"in n?n.schema._input:n._input,o="schema"in n?n.schema._output:n._output;return{types:{input:e==="output"?o:s,output:r==="input"?s:o},parse:u=>"schema"in n?n.schema.parse(u):n.parse(u)}},To=(n,e)=>u2().pipe(n.catch(e));const h2=()=>un(()=>import("./account.csp-violations-A0ibrTlu.js"),[]),p2=()=>un(()=>import("./account.csp-violations-Cjtb_O1U.js"),[]),m2=()=>un(()=>import("./account.csp-violations-C1OlOD9E.js"),[]),g2=d2({pagePath:To(bu(),"").default(""),directive:To(bu(),"").default(""),startDate:To(bu(),"").default(""),endDate:To(bu(),"").default(""),page:To(c2().int().min(1),1).default(1)}),y2=Nn("/account/csp-violations")({head:()=>({meta:[{title:"CSP Violations — Admin"},{name:"robots",content:"noindex, nofollow"}]}),validateSearch:f2(g2),component:ln(m2,"component"),errorComponent:ln(p2,"errorComponent"),notFoundComponent:ln(h2,"notFoundComponent")}),v2=()=>un(()=>import("./account.billing-events-DwVwhb-o.js"),__vite__mapDeps([16,14])),b2=Nn("/account/billing-events")({head:()=>({meta:[{title:"Billing events — The Scattered Saver"}]}),component:ln(v2,"component")}),_2=vC.update({id:"/terms",path:"/terms",getParentRoute:()=>qn}),w2=_C.update({id:"/signup",path:"/signup",getParentRoute:()=>qn}),S2=SC.update({id:"/refunds",path:"/refunds",getParentRoute:()=>qn}),E2=TC.update({id:"/privacy",path:"/privacy",getParentRoute:()=>qn}),T2=RC.update({id:"/pricing",path:"/pricing",getParentRoute:()=>qn}),x2=OC.update({id:"/login",path:"/login",getParentRoute:()=>qn}),R2=CC.update({id:"/features",path:"/features",getParentRoute:()=>qn}),A2=NC.update({id:"/download",path:"/download",getParentRoute:()=>qn}),Mh=DC.update({id:"/account",path:"/account",getParentRoute:()=>qn}),O2=UC.update({id:"/",path:"/",getParentRoute:()=>qn}),k2=y2.update({id:"/csp-violations",path:"/csp-violations",getParentRoute:()=>Mh}),C2=b2.update({id:"/billing-events",path:"/billing-events",getParentRoute:()=>Mh}),j2={AccountBillingEventsRoute:C2,AccountCspViolationsRoute:k2},N2=Mh._addFileChildren(j2),M2={IndexRoute:O2,AccountRoute:N2,DownloadRoute:A2,FeaturesRoute:R2,LoginRoute:x2,PricingRoute:T2,PrivacyRoute:E2,RefundsRoute:S2,SignupRoute:w2,TermsRoute:_2},D2=qn._addFileChildren(M2);function L2({error:n,reset:e}){const r=Lt();return H.jsx("div",{className:"flex min-h-screen items-center justify-center bg-background px-4",children:H.jsxs("div",{className:"max-w-md text-center",children:[H.jsx("div",{className:"mx-auto mb-6 flex h-16 w-16 items-center justify-center rounded-full bg-destructive/10",children:H.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-8 w-8 text-destructive",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:H.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126ZM12 15.75h.007v.008H12v-.008Z"})})}),H.jsx("h1",{className:"text-2xl font-bold tracking-tight text-foreground",children:"Something went wrong"}),H.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:"An unexpected error occurred. Please try again."}),!1,H.jsxs("div",{className:"mt-6 flex items-center justify-center gap-3",children:[H.jsx("button",{onClick:()=>{r.invalidate(),e()},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"}),H.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 U2=()=>RR({routeTree:D2,context:{},scrollRestoration:!0,defaultPreloadStaleTime:0,defaultErrorComponent:L2});async function z2(){const n=await U2();let e;return e=[],window.__TSS_START_OPTIONS__={serializationAdapters:e},e.push(jx),n.options.serializationAdapters&&e.push(...n.options.serializationAdapters),n.update({basepath:"",serializationAdapters:e}),n.stores.matchesId.state.length||await Mx(n),n}async function B2(){const n=await z2();return window.$_TSR?.h(),n}var Gf;function P2(){return Gf||(Gf=B2()),H.jsx(zx,{promise:Gf,children:n=>H.jsx(kR,{router:n})})}ae.startTransition(()=>{wS.hydrateRoot(document,H.jsx(ae.StrictMode,{children:H.jsx(P2,{})}))});export{qt as L,RC as R,Dk as S,I2 as T,Rk as a,Sb as b,Nk as c,Y2 as d,Lt as e,b0 as f,Iu as g,sn as h,G2 as i,H as j,Cx as k,y2 as l,lE as p,ae as r,Ru as s,K2 as t,Eb as u};

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