vendor: 4,135 bytes, lines 1-2
1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/api-keys-BhVNQmSm.js","assets/VeraSidebar-D5PH9G9h.js","assets/useAuthSession-BDS1BMui.js","assets/callEdgeFunction-utCGNqMC.js","assets/library-shared-2dAcQXUy.js","assets/batch-DayHSuii.js","assets/index-CfiQs3Hs.js","assets/developers-Ip8O8vlI.js","assets/LegalPage-DkUOvSmE.js","assets/library-D93KJ1WF.js","assets/packs-Iospfuv8.js","assets/packs-shared-DoCwKhnN.js","assets/ImportFilesPanel-BKwy2uRM.js","assets/usePackReleaseStatuses-CdbFNJYC.js","assets/pricing-C4KzjxLP.js","assets/privacy-BqvUncL2.js","assets/refund-glEiT1fE.js","assets/sign-in-DNNGt25J.js","assets/terms-DByhVkb6.js","assets/verify-Szkz4eRC.js","assets/check.index-DcMuuIN2.js","assets/check._slug-Ba0B8GYZ.js","assets/pack._packId-Tg-BB8XE.js","assets/results._runId-hrIpk_HX.js"])))=>i.map(i=>d[i]); 2function yb(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var qf={exports:{}},To={};var pv;function KE(){if(pv)return To;pv=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function r(i,o,c){var u=null;if(c!==void 0&&(u=""+c),o.key!==void 0&&(u=""+o.key),"key"in o){c={};for(var f in o)f!=="key"&&(c[f]=o[f])}else c=o;return o=c.ref,{$$typeof:t,type:i,key:u,ref:o!==void 0?o:null,props:c}}return To.Fragment=e,To.jsx=r,To.jsxs=r,To}var mv;function FE(){return mv||(mv=1,qf.exports=KE()),qf.exports}var X=FE(),Vf={exports:{}},Ee={};var gv;function YE(){if(gv)return Ee;gv=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),c=Symbol.for("react.consumer"),u=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),g=Symbol.for("react.activity"),b=Symbol.iterator;function _(O){return O===null||typeof O!="object"?null:(O=b&&O[b]||O["@@iterator"],typeof O=="function"?O:null)}var S={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E=Object.assign,A={};function T(O,H,q){this.props=O,this.context=H,this.refs=A,this.updater=q||S}T.prototype.isReactComponent={},T.prototype.setState=function(O,H){if(typeof O!="object"&&typeof O!="function"&&O!=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,O,H,"setState")},T.prototype.forceUpdate=function(O){this.updater.enqueueForceUpdate(this,O,"forceUpdate")};function C(){}C.prototype=T.prototype;function x(O,H,q){this.props=O,this.context=H,this.refs=A,this.updater=q||S}var B=x.prototype=new C;B.constructor=x,E(B,T.prototype),B.isPureReactComponent=!0;var Z=Array.isArray;function z(){}var D={H:null,A:null,T:null,S:null},Y=Object.prototype.hasOwnProperty;function ne(O,H,q){var Q=q.ref;return{$$typeof:t,type:O,key:H,ref:Q!==void 0?Q:null,props:q}}function de(O,H){return ne(O.type,H,O.props)}function G(O){return typeof O=="object"&&O!==null&&O.$$typeof===t}function K(O){var H={"=":"=0",":":"=2"};return"$"+O.replace(/[=:]/g,function(q){return H[q]})}var ee=/\/+/g;function ve(O,H){return typeof O=="object"&&O!==null&&O.key!=null?K(""+O.key):H.toString(36)}function oe(O){switch(O.status){case"fulfilled":return O.value;case"rejected":throw O.reason;default:switch(typeof O.status=="string"?O.then(z,z):(O.status="pending",O.then(function(H){O.status==="pending"&&(O.status="fulfilled",O.value=H)},function(H){O.status==="pending"&&(O.status="rejected",O.reason=H)})),O.status){case"fulfilled":return O.value;case"rejected":throw O.reason}}throw O}function j(O,H,q,Q,se){var ge=typeof O;(ge==="undefined"||ge==="boolean")&&(O=null);var he=!1;if(O===null)he=!0;else switch(ge){case"bigint":case"string":case"number":he=!0;break;case"object":switch(O.$$typeof){case t:case e:he=!0;break;case y:return he=O._init,j(he(O._payload),H,q,Q,se)}}if(he)return se=se(O),he=Q===""?"."+ve(O,0):Q,Z(se)?(q="",he!=null&&(q=he.replace(ee,"$&/")+"/"),j(se,H,q,"",function(zt){return zt}
vendor: 13,498 bytes, line 2
2)):se!=null&&(G(se)&&(se=de(se,q+(se.key==null||O&&O.key===se.key?"":(""+se.key).replace(ee,"$&/")+"/")+he)),H.push(se)),1;he=0;var pe=Q===""?".":Q+":";if(Z(O))for(var Me=0;Me<O.length;Me++)Q=O[Me],ge=pe+ve(Q,Me),he+=j(Q,H,q,ge,se);else if(Me=_(O),typeof Me=="function")for(O=Me.call(O),Me=0;!(Q=O.next()).done;)Q=Q.value,ge=pe+ve(Q,Me++),he+=j(Q,H,q,ge,se);else if(ge==="object"){if(typeof O.then=="function")return j(oe(O),H,q,Q,se);throw H=String(O),Error("Objects are not valid as a React child (found: "+(H==="[object Object]"?"object with keys {"+Object.keys(O).join(", ")+"}":H)+"). If you meant to render a collection of children, use an array instead.")}return he}function F(O,H,q){if(O==null)return O;var Q=[],se=0;return j(O,Q,"","",function(ge){return H.call(q,ge,se++)}),Q}function ce(O){if(O._status===-1){var H=O._result;H=H(),H.then(function(q){(O._status===0||O._status===-1)&&(O._status=1,O._result=q)},function(q){(O._status===0||O._status===-1)&&(O._status=2,O._result=q)}),O._status===-1&&(O._status=0,O._result=H)}if(O._status===1)return O._result.default;throw O._result}var ke=typeof reportError=="function"?reportError:function(O){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var H=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof O=="object"&&O!==null&&typeof O.message=="string"?String(O.message):String(O),error:O});if(!window.dispatchEvent(H))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",O);return}console.error(O)},we={map:F,forEach:function(O,H,q){F(O,function(){H.apply(this,arguments)},q)},count:function(O){var H=0;return F(O,function(){H++}),H},toArray:function(O){return F(O,function(H){return H})||[]},only:function(O){if(!G(O))throw Error("React.Children.only expected to receive a single React element child.");return O}};return Ee.Activity=g,Ee.Children=we,Ee.Component=T,Ee.Fragment=r,Ee.Profiler=o,Ee.PureComponent=x,Ee.StrictMode=i,Ee.Suspense=h,Ee.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=D,Ee.__COMPILER_RUNTIME={__proto__:null,c:function(O){return D.H.useMemoCache(O)}},Ee.cache=function(O){return function(){return O.apply(null,arguments)}},Ee.cacheSignal=function(){return null},Ee.cloneElement=function(O,H,q){if(O==null)throw Error("The argument must be a React element, but you passed "+O+".");var Q=E({},O.props),se=O.key;if(H!=null)for(ge in H.key!==void 0&&(se=""+H.key),H)!Y.call(H,ge)||ge==="key"||ge==="__self"||ge==="__source"||ge==="ref"&&H.ref===void 0||(Q[ge]=H[ge]);var ge=arguments.length-2;if(ge===1)Q.children=q;else if(1<ge){for(var he=Array(ge),pe=0;pe<ge;pe++)he[pe]=arguments[pe+2];Q.children=he}return ne(O.type,se,Q)},Ee.createContext=function(O){return O={$$typeof:u,_currentValue:O,_currentValue2:O,_threadCount:0,Provider:null,Consumer:null},O.Provider=O,O.Consumer={$$typeof:c,_context:O},O},Ee.createElement=function(O,H,q){var Q,se={},ge=null;if(H!=null)for(Q in H.key!==void 0&&(ge=""+H.key),H)Y.call(H,Q)&&Q!=="key"&&Q!=="__self"&&Q!=="__source"&&(se[Q]=H[Q]);var he=arguments.length-2;if(he===1)se.children=q;else if(1<he){for(var pe=Array(he),Me=0;Me<he;Me++)pe[Me]=arguments[Me+2];se.children=pe}if(O&&O.defaultProps)for(Q in he=O.defaultProps,he)se[Q]===void 0&&(se[Q]=he[Q]);return ne(O,ge,se)},Ee.createRef=function(){return{current:null}},Ee.forwardRef=function(O){return{$$typeof:f,render:O}},Ee.isValidElement=G,Ee.lazy=function(O){return{$$typeof:y,_payload:{_status:-1,_result:O},_init:ce}},Ee.memo=function(O,H){return{$$typeof:m,type:O,compare:H===void 0?null:H}},Ee.startTransition=function(O){var H=D.T,q={};D.T=q;try{var Q=O(),se=D.S;se!==null&&se(q,Q),typeof Q=="object"&&Q!==null&&typeof Q.then=="function"&&Q.then(z,ke)}catch(ge){ke(ge)}finally{H!==null&&q.types!==null&&(H.types=q.types),D.T=H}},Ee.unstable_useCacheRefresh=function(){return D.H.useCacheRefresh()},Ee.use=function(O){return D.H.use(O)},Ee.useActionState=function(O,H,q){return D.H.useActionState(O,H,q)},Ee.useCallback=function(O,H){return D.H.useCallback(O,H)},Ee.useContext=function(O){return D.H.useContext(O)},Ee.useDebugValue=function(){},Ee.useDeferredValue=function(O,H){return D.H.useDeferredValue(O,H)},Ee.useEffect=function(O,H){return D.H.useEffect(O,H)},Ee.useEffectEvent=function(O){return D.H.useEffectEvent(O)},Ee.useId=function(){return D.H.useId()},Ee.useImperativeHandle=function(O,H,q){return D.H.useImperativeHandle(O,H,q)},Ee.useInsertionEffect=function(O,H){return D.H.useInsertionEffect(O,H)},Ee.useLayoutEffect=function(O,H){return D.H.useLayoutEffect(O,H)},Ee.useMemo=function(O,H){return D.H.useMemo(O,H)},Ee.useOptimistic=function(O,H){return D.H.useOptimistic(O,H)},Ee.useReducer=function(O,H,q){return D.H.useReducer(O,H,q)},Ee.useRef=function(O){return D.H.useRef(O)},Ee.useState=function(O){return D.H.useState(O)},Ee.useSyncExternalStore=function(O,H,q){return D.H.useSyncExternalStore(O,H,q)},Ee.useTransition=function(){return D.H.useTransition()},Ee.version="19.2.6",Ee}var yv;function ol(){return yv||(yv=1,Vf.exports=YE()),Vf.exports}var _e=ol();const W=yb(_e);var Gf={exports:{}},Ao={},Kf={exports:{}},Ff={};var vv;function ZE(){return vv||(vv=1,(function(t){function e(j,F){var ce=j.length;j.push(F);e:for(;0<ce;){var ke=ce-1>>>1,we=j[ke];if(0<o(we,F))j[ke]=F,j[ce]=we,ce=ke;else break e}}function r(j){return j.length===0?null:j[0]}function i(j){if(j.length===0)return null;var F=j[0],ce=j.pop();if(ce!==F){j[0]=ce;e:for(var ke=0,we=j.length,O=we>>>1;ke<O;){var H=2*(ke+1)-1,q=j[H],Q=H+1,se=j[Q];if(0>o(q,ce))Q<we&&0>o(se,q)?(j[ke]=se,j[Q]=ce,ke=Q):(j[ke]=q,j[H]=ce,ke=H);else if(Q<we&&0>o(se,ce))j[ke]=se,j[Q]=ce,ke=Q;else break e}}return F}function o(j,F){var ce=j.sortIndex-F.sortIndex;return ce!==0?ce:j.id-F.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var c=performance;t.unstable_now=function(){return c.now()}}else{var u=Date,f=u.now();t.unstable_now=function(){return u.now()-f}}var h=[],m=[],y=1,g=null,b=3,_=!1,S=!1,E=!1,A=!1,T=typeof setTimeout=="function"?setTimeout:null,C=typeof clearTimeout=="function"?clearTimeout:null,x=typeof setImmediate<"u"?setImmediate:null;function B(j){for(var F=r(m);F!==null;){if(F.callback===null)i(m);else if(F.startTime<=j)i(m),F.sortIndex=F.expirationTime,e(h,F);else break;F=r(m)}}function Z(j){if(E=!1,B(j),!S)if(r(h)!==null)S=!0,z||(z=!0,K());else{var F=r(m);F!==null&&oe(Z,F.startTime-j)}}var z=!1,D=-1,Y=5,ne=-1;function de(){return A?!0:!(t.unstable_now()-ne<Y)}function G(){if(A=!1,z){var j=t.unstable_now();ne=j;var F=!0;try{e:{S=!1,E&&(E=!1,C(D),D=-1),_=!0;var ce=b;try{t:{for(B(j),g=r(h);g!==null&&!(g.expirationTime>j&&de());){var ke=g.callback;if(typeof ke=="function"){g.callback=null,b=g.priorityLevel;var we=ke(g.expirationTime<=j);if(j=t.unstable_now(),typeof we=="function"){g.callback=we,B(j),F=!0;break t}g===r(h)&&i(h),B(j)}else i(h);g=r(h)}if(g!==null)F=!0;else{var O=r(m);O!==null&&oe(Z,O.startTime-j),F=!1}}break e}finally{g=null,b=ce,_=!1}F=void 0}}finally{F?K():z=!1}}}var K;if(typeof x=="function")K=function(){x(G)};else if(typeof MessageChannel<"u"){var ee=new MessageChannel,ve=ee.port2;ee.port1.onmessage=G,K=function(){ve.postMessage(null)}}else K=function(){T(G,0)};function oe(j,F){D=T(function(){j(t.unstable_now())},F)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(j){j.callback=null},t.unstable_forceFrameRate=function(j){0>j||125<j?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Y=0<j?Math.floor(1e3/j):5},t.unstable_getCurrentPriorityLevel=function(){return b},t.unstable_next=function(j){switch(b){case 1:case 2:case 3:var F=3;break;default:F=b}var ce=b;b=F;try{return j()}finally{b=ce}},t.unstable_requestPaint=function(){A=!0},t.unstable_runWithPriority=function(j,F){switch(j){case 1:case 2:case 3:case 4:case 5:break;default:j=3}var ce=b;b=j;try{return F()}finally{b=ce}},t.unstable_scheduleCallback=function(j,F,ce){var ke=t.unstable_now();switch(typeof ce=="object"&&ce!==null?(ce=ce.delay,ce=typeof ce=="number"&&0<ce?ke+ce:ke):ce=ke,j){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=ce+we,j={id:y++,callback:F,priorityLevel:j,startTime:ce,expirationTime:we,sortIndex:-1},ce>ke?(j.sortIndex=ce,e(m,j),r(h)===null&&j===r(m)&&(E?(C(D),D=-1):E=!0,oe(Z,ce-ke))):(j.sortIndex=we,e(h,j),S||_||(S=!0,z||(z=!0,K()))),j},t.unstable_shouldYield=de,t.unstable_wrapCallback=function(j){var F=b;return function(){var ce=b;b=F;try{return j.apply(this,arguments)}finally{b=ce}}}})(Ff)),Ff}var bv;function JE(){return bv||(bv=1,Kf.exports=ZE()),Kf.exports}var Yf={exports:{}},Lt={};var _v;function QE(){if(_v)return Lt;_v=1;var t=ol();function e(h){var m="https://react.dev/errors/"+h;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 #"+h+"; visit "+m+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(){}var i={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 c(h,m,y){var g=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:g==null?null:""+g,children:h,containerInfo:m,implementation:y}}var u=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function f(h,m){if(h==="font")return"";if(typeof m=="string")return m==="use-credentials"?m:""}return Lt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,Lt.createPortal=function(h,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 c(h,m,null,y)},Lt.flushSync=function(h){var m=u.T,y=i.p;try{if(u.T=null,i.p=2,h)return h()}finally{u.T=m,i.p=y,i.d.f()}},Lt.preconnect=function(h,m){typeof h=="string"&&(m?(m=m.crossOrigin,m=typeof m=="string"?m==="use-credentials"?m:"":void 0):m=null,i.d.C(h,m))},Lt.prefetchDNS=function(h){typeof h=="string"&&i.d.D(h)},Lt.preinit=function(h,m){if(typeof h=="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"?i.d.S(h,typeof m.precedence=="string"?m.precedence:void 0,{crossOrigin:g,integrity:b,fetchPriority:_}):y==="script"&&i.d.X(h,{crossOrigin:g,integrity:b,fetchPriority:_,nonce:typeof m.nonce=="string"?m.nonce:void 0})}},Lt.preinitModule=function(h,m){if(typeof h=="string")if(typeof m=="object"&&m!==null){if(m.as==null||m.as==="script"){var y=f(m.as,m.crossOrigin);i.d.M(h,{crossOrigin:y,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0})}}else m==null&&i.d.M(h)},Lt.preload=function(h,m){if(typeof h=="string"&&typeof m=="object"&&m!==null&&typeof m.as=="string"){var y=m.as,g=f(y,m.crossOrigin);i.d.L(h,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})}},Lt.preloadModule=function(h,m){if(typeof h=="string")if(m){var y=f(m.as,m.crossOrigin);i.d.m(h,{as:typeof m.as=="string"&&m.as!=="script"?m.as:void 0,crossOrigin:y,integrity:typeof m.integrity=="string"?m.integrity:void 0})}else i.d.m(h)},Lt.requestFormReset=function(h){i.d.r(h)},Lt.unstable_batchedUpdates=function(h,m){return h(m)},Lt.useFormState=function(h,m,y){return u.H.useFormState(h,m,y)},Lt.useFormStatus=function(){return u.H.useHostTransitionStatus()},Lt.version="19.2.6",Lt}var wv;function vb(){if(wv)return Yf.exports;wv=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),Yf.exports=QE(),Yf.exports}var Sv;function XE(){if(Sv)return Ao;Sv=1;var t=JE(),e=ol(),r=vb();function i(n){var s="https://react.dev/errors/"+n;if(1<arguments.length){s+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)s+="&args[]="+encodeURIComponent(arguments[a])}return"Minified React error #"+n+"; visit "+s+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(n){return!(!n||n.nodeType!==1&&n.nodeType!==9&&n.nodeType!==11)}function c(n){var s=n,a=n;if(n.alternate)for(;s.return;)s=s.return;else{n=s;do s=n,(s.flags&4098)!==0&&(a=s.return),n=s.return;while(n)}return s.tag===3?a:null}function u(n){if(n.tag===13){var s=n.memoizedState;if(s===null&&(n=n.alternate,n!==null&&(s=n.memoizedState)),s!==null)return s.dehydrated}return null}function f(n){if(n.tag===31){var s=n.memoizedState;if(s===null&&(n=n.alternate,n!==null&&(s=n.memoizedState)),s!==null)return s.dehydrated}return null}function h(n){if(c(n)!==n)throw Error(i(188))}function m(n){var s=n.alternate;
vendor: 10,366 bytes, lines 2-9
2if(!s){if(s=c(n),s===null)throw Error(i(188));return s!==n?null:n}for(var a=n,l=s;;){var d=a.return;if(d===null)break;var p=d.alternate;if(p===null){if(l=d.return,l!==null){a=l;continue}break}if(d.child===p.child){for(p=d.child;p;){if(p===a)return h(d),n;if(p===l)return h(d),s;p=p.sibling}throw Error(i(188))}if(a.return!==l.return)a=d,l=p;else{for(var v=!1,w=d.child;w;){if(w===a){v=!0,a=d,l=p;break}if(w===l){v=!0,l=d,a=p;break}w=w.sibling}if(!v){for(w=p.child;w;){if(w===a){v=!0,a=p,l=d;break}if(w===l){v=!0,l=p,a=d;break}w=w.sibling}if(!v)throw Error(i(189))}}if(a.alternate!==l)throw Error(i(190))}if(a.tag!==3)throw Error(i(188));return a.stateNode.current===a?n:s}function y(n){var s=n.tag;if(s===5||s===26||s===27||s===6)return n;for(n=n.child;n!==null;){if(s=y(n),s!==null)return s;n=n.sibling}return null}var g=Object.assign,b=Symbol.for("react.element"),_=Symbol.for("react.transitional.element"),S=Symbol.for("react.portal"),E=Symbol.for("react.fragment"),A=Symbol.for("react.strict_mode"),T=Symbol.for("react.profiler"),C=Symbol.for("react.consumer"),x=Symbol.for("react.context"),B=Symbol.for("react.forward_ref"),Z=Symbol.for("react.suspense"),z=Symbol.for("react.suspense_list"),D=Symbol.for("react.memo"),Y=Symbol.for("react.lazy"),ne=Symbol.for("react.activity"),de=Symbol.for("react.memo_cache_sentinel"),G=Symbol.iterator;function K(n){return n===null||typeof n!="object"?null:(n=G&&n[G]||n["@@iterator"],typeof n=="function"?n:null)}var ee=Symbol.for("react.client.reference");function ve(n){if(n==null)return null;if(typeof n=="function")return n.$$typeof===ee?null:n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case E:return"Fragment";case T:return"Profiler";case A:return"StrictMode";case Z:return"Suspense";case z:return"SuspenseList";case ne:return"Activity"}if(typeof n=="object")switch(n.$$typeof){case S:return"Portal";case x:return n.displayName||"Context";case C:return(n._context.displayName||"Context")+".Consumer";case B:var s=n.render;return n=n.displayName,n||(n=s.displayName||s.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case D:return s=n.displayName||null,s!==null?s:ve(n.type)||"Memo";case Y:s=n._payload,n=n._init;try{return ve(n(s))}catch{}}return null}var oe=Array.isArray,j=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ce={pending:!1,data:null,method:null,action:null},ke=[],we=-1;function O(n){return{current:n}}function H(n){0>we||(n.current=ke[we],ke[we]=null,we--)}function q(n,s){we++,ke[we]=n.current,n.current=s}var Q=O(null),se=O(null),ge=O(null),he=O(null);function pe(n,s){switch(q(ge,s),q(se,n),q(Q,null),s.nodeType){case 9:case 11:n=(n=s.documentElement)&&(n=n.namespaceURI)?zy(n):0;break;default:if(n=s.tagName,s=s.namespaceURI)s=zy(s),n=Py(s,n);else switch(n){case"svg":n=1;break;case"math":n=2;break;default:n=0}}H(Q),q(Q,n)}function Me(){H(Q),H(se),H(ge)}function zt(n){n.memoizedState!==null&&q(he,n);var s=Q.current,a=Py(s,n.type);s!==a&&(q(se,n),q(Q,a))}function pn(n){se.current===n&&(H(Q),H(se)),he.current===n&&(H(he),_o._currentValue=ce)}var Nt,ul;function On(n){if(Nt===void 0)try{throw Error()}catch(a){var s=a.stack.trim().match(/\n( *(at )?)/);Nt=s&&s[1]||"",ul=-1<a.stack.indexOf(` 3 at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return` 4`+Nt+n+ul}var ka=!1;function hi(n,s){if(!n||ka)return"";ka=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(s){var V=function(){throw Error()};if(Object.defineProperty(V.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(V,[])}catch(P){var U=P}Reflect.construct(n,[],V)}else{try{V.call()}catch(P){U=P}n.call(V.prototype)}}else{try{throw Error()}catch(P){U=P}(V=n())&&typeof V.catch=="function"&&V.catch(function(){})}}catch(P){if(P&&U&&typeof P.stack=="string")return[P.stack,U.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 p=l.DetermineComponentFrameRoot(),v=p[0],w=p[1];if(v&&w){var R=v.split(` 5`),M=w.split(` 6`);for(d=l=0;l<R.length&&!R[l].includes("DetermineComponentFrameRoot");)l++;for(;d<M.length&&!M[d].includes("DetermineComponentFrameRoot");)d++;if(l===R.length||d===M.length)for(l=R.length-1,d=M.length-1;1<=l&&0<=d&&R[l]!==M[d];)d--;for(;1<=l&&0<=d;l--,d--)if(R[l]!==M[d]){if(l!==1||d!==1)do if(l--,d--,0>d||R[l]!==M[d]){var I=` 7`+R[l].replace(" at new "," at ");return n.displayName&&I.includes("<anonymous>")&&(I=I.replace("<anonymous>",n.displayName)),I}while(1<=l&&0<=d);break}}}finally{ka=!1,Error.prepareStackTrace=a}return(a=n?n.displayName||n.name:"")?On(a):""}function Ns(n,s){switch(n.tag){case 26:case 27:case 5:return On(n.type);case 16:return On("Lazy");case 13:return n.child!==s&&s!==null?On("Suspense Fallback"):On("Suspense");case 19:return On("SuspenseList");case 0:case 15:return hi(n.type,!1);case 11:return hi(n.type.render,!1);case 1:return hi(n.type,!0);case 31:return On("Activity");default:return""}}function Ca(n){try{var s="",a=null;do s+=Ns(n,a),a=n,n=n.return;while(n);return s}catch(l){return` 8Error generating stack: `+l.message+` 9`+l.stack}}var rn=Object.prototype.hasOwnProperty,xa=t.unstable_scheduleCallback,Na=t.unstable_cancelCallback,Pt=t.unstable_shouldYield,Pr=t.unstable_requestPaint,Bt=t.unstable_now,xu=t.unstable_getCurrentPriorityLevel,js=t.unstable_ImmediatePriority,dl=t.unstable_UserBlockingPriority,Ds=t.unstable_NormalPriority,ja=t.unstable_LowPriority,ir=t.unstable_IdlePriority,fl=t.log,Br=t.unstable_setDisableYieldValue,Ls=null,It=null;function kn(n){if(typeof fl=="function"&&Br(n),It&&typeof It.setStrictMode=="function")try{It.setStrictMode(Ls,n)}catch{}}var jt=Math.clz32?Math.clz32:$n,Nu=Math.log,Da=Math.LN2;function $n(n){return n>>>=0,n===0?32:31-(Nu(n)/Da|0)|0}var pi=256,mi=262144,Ms=4194304;function qn(n){var s=n&42;if(s!==0)return s;switch(n&-n){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return n&261888;case 262144:case 524288:case 1048576:case 2097152:return n&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return n&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return n}}function Se(n,s,a){var l=n.pendingLanes;if(l===0)return 0;var d=0,p=n.suspendedLanes,v=n.pingedLanes;n=n.warmLanes;var w=l&134217727;return w!==0?(l=w&~p,l!==0?d=qn(l):(v&=w,v!==0?d=qn(v):a||(a=w&~n,a!==0&&(d=qn(a))))):(w=l&~p,w!==0?d=qn(w):v!==0?d=qn(v):a||(a=l&~n,a!==0&&(d=qn(a)))),d===0?0:s!==0&&s!==d&&(s&p)===0&&(p=d&-d,a=s&-s,p>=a||p===32&&(a&4194048)!==0)?s:d}function We(n,s){return(n.pendingLanes&~(n.suspendedLanes&~n.pingedLanes)&s)===0}function vt(n,s){switch(n){case 1:case 2:case 4:case 8:case 64:return s+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return s+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Dt(){var n=Ms;return Ms<<=1,(Ms&62914560)===0&&(Ms=4194304),n}function Ir(n){for(var s=[],a=0;31>a;a++)s.push(n);return s}function tt(n,s){n.pendingLanes|=s,s!==268435456&&(n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0)}function Gt(n,s,a,l,d,p){var v=n.pendingLanes;n.pendingLanes=a,n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0,n.expiredLanes&=a,n.entangledLanes&=a,n.errorRecoveryDisabledLanes&=a,n.shellSuspendCounter=0;var w=n.entanglements,R=n.expirationTimes,M=n.hiddenUpdates;for(a=v&~a;0<a;){var I=31-jt(a),V=1<<I;w[I]=0,R[I]=-1;var U=M[I];if(U!==null)for(M[I]=null,I=0;I<U.length;I++){var P=U[I];P!==null&&(P.lane&=-536870913)}a&=~V}l!==0&&Us(n,l,0),p!==0&&d===0&&n.tag!==0&&(n.suspendedLanes|=p&~(v&~s))}function Us(n,s,a){n.pendingLanes|=s,n.suspendedLanes&=~s;var l=31-jt(s);n.entangledLanes|=s,n.entanglements[l]=n.entanglements[l]|1073741824|a&261930}function Kt(n,s){var a=n.entangledLanes|=s;for(n=n.entanglements;a;){var l=31-jt(a),d=1<<l;d&s|n[l]&s&&(n[l]|=s),a&=~d}}function Ft(n,s){var a=s&-s;return a=(a&42)!==0?1:gi(a),(a&(n.suspendedLanes|s))!==0?0:a}function gi(n){switch(n){case 2:n=1;break;case 8:n=4;break;case 32:n=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:n=128;break;case 268435456:n=134217728;break;default:n=0}return n}function Cn(n){return n&=-n,2<n?8<n?(n&134217727)!==0?32:268435456:8:2}function ju(){var n=F.p;return n!==0?n:(n=window.event,n===void 0?32:ov(n.type))}function Ep(n,s){var a=F.p;try{return F.p=n,s()}finally{F.p=a}}var Hr=Math.random().toString(36).slice(2),Rt="__reactFiber$"+Hr,Yt="__reactProps$"+Hr,yi="__reactContainer$"+Hr,Du="__reactEvents$"+Hr,Mw="__reactListeners$"+Hr,Uw="__reactHandles$"+Hr,Tp="__reactResources$"+Hr,La="__reactMarker$"+Hr;function Lu(n){delete n[Rt],delete n[Yt],delete n[Du],delete n[Mw],delete n[Uw]}function vi(n){var s=n[Rt];if(s)return s;for(var a=n.parentNode;a;){if(s=a[yi]||a[Rt]){if(a=s.alternate,s.child!==null||a!==null&&a.child!==null)for(n=Gy(n);n!==null;){if(a=n[Rt])return a;n=Gy(n)}return s}n=a,a=n.parentNode}return null}function bi(n){if(n=n[Rt]||n[yi]){var s=n.tag;if(s===5||s===6||s===13||s===31||s===26||s===27||s===3)return n}return null}function Ma(n){var s=n.tag;if(s===5||s===26||s===27||s===6)return n.stateNode;throw Error(i(33))}function _i(n){var s=n[Tp];return s||(s=n[Tp]={hoistableStyles:new Map,hoistableScripts:new Map}),s}function bt(n){n[La]=!0}var Ap=new Set,Rp={};function zs(n,s){wi(n,s),wi(n+"Capture",s)}function wi(n,s){for(Rp[n]=s,n=0;n<s.length;n++)Ap.add(s[n])}var zw=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u
vendor: 6,765 bytes, line 9
9037D\\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]*$"),Op={},kp={};function Pw(n){return rn.call(kp,n)?!0:rn.call(Op,n)?!1:zw.test(n)?kp[n]=!0:(Op[n]=!0,!1)}function hl(n,s,a){if(Pw(s))if(a===null)n.removeAttribute(s);else{switch(typeof a){case"undefined":case"function":case"symbol":n.removeAttribute(s);return;case"boolean":var l=s.toLowerCase().slice(0,5);if(l!=="data-"&&l!=="aria-"){n.removeAttribute(s);return}}n.setAttribute(s,""+a)}}function pl(n,s,a){if(a===null)n.removeAttribute(s);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(s);return}n.setAttribute(s,""+a)}}function ar(n,s,a,l){if(l===null)n.removeAttribute(a);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(a);return}n.setAttributeNS(s,a,""+l)}}function mn(n){switch(typeof n){case"bigint":case"boolean":case"number":case"string":case"undefined":return n;case"object":return n;default:return""}}function Cp(n){var s=n.type;return(n=n.nodeName)&&n.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function Bw(n,s,a){var l=Object.getOwnPropertyDescriptor(n.constructor.prototype,s);if(!n.hasOwnProperty(s)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var d=l.get,p=l.set;return Object.defineProperty(n,s,{configurable:!0,get:function(){return d.call(this)},set:function(v){a=""+v,p.call(this,v)}}),Object.defineProperty(n,s,{enumerable:l.enumerable}),{getValue:function(){return a},setValue:function(v){a=""+v},stopTracking:function(){n._valueTracker=null,delete n[s]}}}}function Mu(n){if(!n._valueTracker){var s=Cp(n)?"checked":"value";n._valueTracker=Bw(n,s,""+n[s])}}function xp(n){if(!n)return!1;var s=n._valueTracker;if(!s)return!0;var a=s.getValue(),l="";return n&&(l=Cp(n)?n.checked?"true":"false":n.value),n=l,n!==a?(s.setValue(n),!0):!1}function ml(n){if(n=n||(typeof document<"u"?document:void 0),typeof n>"u")return null;try{return n.activeElement||n.body}catch{return n.body}}var Iw=/[\n"\\]/g;function gn(n){return n.replace(Iw,function(s){return"\\"+s.charCodeAt(0).toString(16)+" "})}function Uu(n,s,a,l,d,p,v,w){n.name="",v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"?n.type=v:n.removeAttribute("type"),s!=null?v==="number"?(s===0&&n.value===""||n.value!=s)&&(n.value=""+mn(s)):n.value!==""+mn(s)&&(n.value=""+mn(s)):v!=="submit"&&v!=="reset"||n.removeAttribute("value"),s!=null?zu(n,v,mn(s)):a!=null?zu(n,v,mn(a)):l!=null&&n.removeAttribute("value"),d==null&&p!=null&&(n.defaultChecked=!!p),d!=null&&(n.checked=d&&typeof d!="function"&&typeof d!="symbol"),w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"?n.name=""+mn(w):n.removeAttribute("name")}function Np(n,s,a,l,d,p,v,w){if(p!=null&&typeof p!="function"&&typeof p!="symbol"&&typeof p!="boolean"&&(n.type=p),s!=null||a!=null){if(!(p!=="submit"&&p!=="reset"||s!=null)){Mu(n);return}a=a!=null?""+mn(a):"",s=s!=null?""+mn(s):a,w||s===n.value||(n.value=s),n.defaultValue=s}l=l??d,l=typeof l!="function"&&typeof l!="symbol"&&!!l,n.checked=w?n.checked:!!l,n.defaultChecked=!!l,v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"&&(n.name=v),Mu(n)}function zu(n,s,a){s==="number"&&ml(n.ownerDocument)===n||n.defaultValue===""+a||(n.defaultValue=""+a)}function Si(n,s,a,l){if(n=n.options,s){s={};for(var d=0;d<a.length;d++)s["$"+a[d]]=!0;for(a=0;a<n.length;a++)d=s.hasOwnProperty("$"+n[a].value),n[a].selected!==d&&(n[a].selected=d),d&&l&&(n[a].defaultSelected=!0)}else{for(a=""+mn(a),s=null,d=0;d<n.length;d++){if(n[d].value===a){n[d].selected=!0,l&&(n[d].defaultSelected=!0);return}s!==null||n[d].disabled||(s=n[d])}s!==null&&(s.selected=!0)}}function jp(n,s,a){if(s!=null&&(s=""+mn(s),s!==n.value&&(n.value=s),a==null)){n.defaultValue!==s&&(n.defaultValue=s);return}n.defaultValue=a!=null?""+mn(a):""}function Dp(n,s,a,l){if(s==null){if(l!=null){if(a!=null)throw Error(i(92));if(oe(l)){if(1<l.length)throw Error(i(93));l=l[0]}a=l}a==null&&(a=""),s=a}a=mn(s),n.defaultValue=a,l=n.textContent,l===a&&l!==""&&l!==null&&(n.value=l),Mu(n)}function Ei(n,s){if(s){var a=n.firstChild;if(a&&a===n.lastChild&&a.nodeType===3){a.nodeValue=s;return}}n.textContent=s}var Hw=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 Lp(n,s,a){var l=s.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?l?n.setProperty(s,""):s==="float"?n.cssFloat="":n[s]="":l?n.setProperty(s,a):typeof a!="number"||a===0||Hw.has(s)?s==="float"?n.cssFloat=a:n[s]=(""+a).trim():n[s]=a+"px"}function Mp(n,s,a){if(s!=null&&typeof s!="object")throw Error(i(62));if(n=n.style,a!=null){for(var l in a)!a.hasOwnProperty(l)||s!=null&&s.hasOwnProperty(l)||(l.indexOf("--")===0?n.setProperty(l,""):l==="float"?n.cssFloat="":n[l]="");for(var d in s)l=s[d],s.hasOwnProperty(d)&&a[d]!==l&&Lp(n,d,l)}else for(var p in s)s.hasOwnProperty(p)&&Lp(n,p,s[p])}function Pu(n){if(n.indexOf("-")===-1)return!1;switch(n){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var $w=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRen
9dering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),qw=/^[\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 gl(n){return qw.test(""+n)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":n}function or(){}var Bu=null;function Iu(n){return n=n.target||n.srcElement||window,n.correspondingUseElement&&(n=n.correspondingUseElement),n.nodeType===3?n.parentNode:n}var Ti=null,Ai=null;function Up(n){var s=bi(n);if(s&&(n=s.stateNode)){var a=n[Yt]||null;e:switch(n=s.stateNode,s.type){case"input":if(Uu(n,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),s=a.name,a.type==="radio"&&s!=null){for(a=n;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+gn(""+s)+'"][type="radio"]'),s=0;s<a.length;s++){var l=a[s];if(l!==n&&l.form===n.form){var d=l[Yt]||null;if(!d)throw Error(i(90));
vendor: 9,553 bytes, line 9
9Uu(l,d.value,d.defaultValue,d.defaultValue,d.checked,d.defaultChecked,d.type,d.name)}}for(s=0;s<a.length;s++)l=a[s],l.form===n.form&&xp(l)}break e;case"textarea":jp(n,a.value,a.defaultValue);break e;case"select":s=a.value,s!=null&&Si(n,!!a.multiple,s,!1)}}}var Hu=!1;function zp(n,s,a){if(Hu)return n(s,a);Hu=!0;try{var l=n(s);return l}finally{if(Hu=!1,(Ti!==null||Ai!==null)&&(rc(),Ti&&(s=Ti,n=Ai,Ai=Ti=null,Up(s),n)))for(s=0;s<n.length;s++)Up(n[s])}}function Ua(n,s){var a=n.stateNode;if(a===null)return null;var l=a[Yt]||null;if(l===null)return null;a=l[s];e:switch(s){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(l=!l.disabled)||(n=n.type,l=!(n==="button"||n==="input"||n==="select"||n==="textarea")),n=!l;break e;default:n=!1}if(n)return null;if(a&&typeof a!="function")throw Error(i(231,s,typeof a));return a}var lr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),$u=!1;if(lr)try{var za={};Object.defineProperty(za,"passive",{get:function(){$u=!0}}),window.addEventListener("test",za,za),window.removeEventListener("test",za,za)}catch{$u=!1}var $r=null,qu=null,yl=null;function Pp(){if(yl)return yl;var n,s=qu,a=s.length,l,d="value"in $r?$r.value:$r.textContent,p=d.length;for(n=0;n<a&&s[n]===d[n];n++);var v=a-n;for(l=1;l<=v&&s[a-l]===d[p-l];l++);return yl=d.slice(n,1<l?1-l:void 0)}function vl(n){var s=n.keyCode;return"charCode"in n?(n=n.charCode,n===0&&s===13&&(n=13)):n=s,n===10&&(n=13),32<=n||n===13?n:0}function bl(){return!0}function Bp(){return!1}function Zt(n){function s(a,l,d,p,v){this._reactName=a,this._targetInst=d,this.type=l,this.nativeEvent=p,this.target=v,this.currentTarget=null;for(var w in n)n.hasOwnProperty(w)&&(a=n[w],this[w]=a?a(p):p[w]);return this.isDefaultPrevented=(p.defaultPrevented!=null?p.defaultPrevented:p.returnValue===!1)?bl:Bp,this.isPropagationStopped=Bp,this}return g(s.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=bl)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=bl)},persist:function(){},isPersistent:bl}),s}var Ps={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(n){return n.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},_l=Zt(Ps),Pa=g({},Ps,{view:0,detail:0}),Vw=Zt(Pa),Vu,Gu,Ba,wl=g({},Pa,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Fu,button:0,buttons:0,relatedTarget:function(n){return n.relatedTarget===void 0?n.fromElement===n.srcElement?n.toElement:n.fromElement:n.relatedTarget},movementX:function(n){return"movementX"in n?n.movementX:(n!==Ba&&(Ba&&n.type==="mousemove"?(Vu=n.screenX-Ba.screenX,Gu=n.screenY-Ba.screenY):Gu=Vu=0,Ba=n),Vu)},movementY:function(n){return"movementY"in n?n.movementY:Gu}}),Ip=Zt(wl),Gw=g({},wl,{dataTransfer:0}),Kw=Zt(Gw),Fw=g({},Pa,{relatedTarget:0}),Ku=Zt(Fw),Yw=g({},Ps,{animationName:0,elapsedTime:0,pseudoElement:0}),Zw=Zt(Yw),Jw=g({},Ps,{clipboardData:function(n){return"clipboardData"in n?n.clipboardData:window.clipboardData}}),Qw=Zt(Jw),Xw=g({},Ps,{data:0}),Hp=Zt(Xw),Ww={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},eS={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"},tS={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function nS(n){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(n):(n=tS[n])?!!s[n]:!1}function Fu(){return nS}var rS=g({},Pa,{key:function(n){if(n.key){var s=Ww[n.key]||n.key;if(s!=="Unidentified")return s}return n.type==="keypress"?(n=vl(n),n===13?"Enter":String.fromCharCode(n)):n.type==="keydown"||n.type==="keyup"?eS[n.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Fu,charCode:function(n){return n.type==="keypress"?vl(n):0},keyCode:function(n){return n.type==="keydown"||n.type==="keyup"?n.keyCode:0},which:function(n){return n.type==="keypress"?vl(n):n.type==="keydown"||n.type==="keyup"?n.keyCode:0}}),sS=Zt(rS),iS=g({},wl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),$p=Zt(iS),aS=g({},Pa,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Fu}),oS=Zt(aS),lS=g({},Ps,{propertyName:0,elapsedTime:0,pseudoElement:0}),cS=Zt(lS),uS=g({},wl,{deltaX:function(n){return"deltaX"in n?n.deltaX:"wheelDeltaX"in n?-n.wheelDeltaX:0},deltaY:function(n){return"deltaY"in n?n.deltaY:"wheelDeltaY"in n?-n.wheelDeltaY:"wheelDelta"in n?-n.wheelDelta:0},deltaZ:0,deltaMode:0}),dS=Zt(uS),fS=g({},Ps,{newState:0,oldState:0}),hS=Zt(fS),pS=[9,13,27,32],Yu=lr&&"CompositionEvent"in window,Ia=null;lr&&"documentMode"in document&&(Ia=document.documentMode);var mS=lr&&"TextEvent"in window&&!Ia,qp=lr&&(!Yu||Ia&&8<Ia&&11>=Ia),Vp=" ",Gp=!1;function Kp(n,s){switch(n){case"keyup":return pS.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Fp(n){return n=n.detail,typeof n=="object"&&"data"in n?n.data:null}var Ri=!1;function gS(n,s){switch(n){case"compositionend":return Fp(s);case"keypress":return s.which!==32?null:(Gp=!0,Vp);case"textInput":return n=s.data,n===Vp&&Gp?null:n;default:return null}}function yS(n,s){if(Ri)return n==="compositionend"||!Yu&&Kp(n,s)?(n=Pp(),yl=qu=$r=null,Ri=!1,n):null;switch(n){case"paste":return null;case"keypress":if(!(s.ctrlKey||s.altKey||s.metaKey)||s.ctrlKey&&s.altKey){if(s.char&&1<s.char.length)return s.char;if(s.which)return String.fromCharCode(s.which)}return null;case"compositionend":return qp&&s.locale!=="ko"?null:s.data;default:return null}}var vS={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 Yp(n){var s=n&&n.nodeName&&n.nodeName.toLowerCase();return s==="input"?!!vS[n.type]:s==="textarea"}function Zp(n,s,a,l){Ti?Ai?Ai.push(l):Ai=[l]:Ti=l,s=uc(s,"onChange"),0<s.length&&(a=new _l("onChange","change",null,a,l),n.push({event:a,listeners:s}))}var Ha=null,$a=null;function bS(n){Ny(n,0)}function Sl(n){var s=Ma(n);if(xp(s))return n}function Jp(n,s){if(n==="change")return s}var Qp=!1;if(lr){var Zu;if(lr){var Ju="oninput"in document;if(!Ju){var Xp=document.createElement("div");Xp.setAttribute("oninput","return;"),Ju=typeof Xp.oninput=="function"}Zu=Ju}else Zu=!1;Qp=Zu&&(!document.documentMode||9<document.documentMode)}function Wp(){Ha&&(Ha.detachEvent("onpropertychange",em),$a=Ha=null)}function em(n){if(n.propertyName==="value"&&Sl($a)){var s=[];Zp(s,$a,n,Iu(n)),zp(bS,s)}}function _S(n,s,a){n==="focusin"?(Wp(),Ha=s,$a=a,Ha.attachEvent("onpropertychange",em)):n==="focusout"&&Wp()}function wS(n){if(n==="selectionchange"||n==="keyup"||n==="keydown")return Sl($a)}function SS(n,s){if(n==="click")return Sl(s)}function ES(n,s){if(n==="input"||n==="change")return Sl(s)}function TS(n,s){return n===s&&(n!==0||1/n===1/s)||n!==n&&s!==s}var sn=typeof Object.is=="function"?Object.is:TS;function qa(n,s){if(sn(n,s))return!0;if(typeof n!="object"||n===null||typeof s!="object"||s===null)return!1;var a=Object.keys(n),l=Object.keys(s);if(a.length!==l.length)return!1;for(l=0;l<a.length;l++){var d=a[l];if(!rn.call(s,d)||!sn(n[d],s[d]))return!1}return!0}function tm(n){for(;n&&n.firstChild;)n=n.firstChild;return n}function nm(n,s){var a=tm(n);n=0;for(var l;a;){if(a.nodeType===3){if(l=n+a.textContent.length,n<=s&&l>=s)return{node:a,offset:s-n};n=l}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=tm(a)}}function rm(n,s){return n&&s?n===s?!0:n&&n.nodeType===3?!1:s&&s.nodeType===3?rm(n,s.parentNode):"contains"in n?n.contains(s):n.compareDocumentPosition?!!(n.compareDocumentPosition(s)&16):!1:!1}function sm(n){n=n!=null&&n.ownerDocument!=null&&n.ownerDocument.defaultView!=null?n.ownerDocument.defaultView:window;for(var s=ml(n.document);s instanceof n.HTMLIFrameElement;){try{var a=typeof s.contentWindow.location.href=="string"}catch{a=!1}if(a)n=s.contentWindow;else break;s=ml(n.document)}return s}function Qu(n){var s=n&&n.nodeName&&n.nodeName.toLowerCase();return s&&(s==="input"&&(n.type==="text"||n.type==="search"||n.type==="tel"||n.type==="url"||n.type==="password")||s==="textarea"||n.contentEditable==="true")}var AS=lr&&"documentMode"in document&&11>=document.documentMode,Oi=null,Xu=null,Va=null,Wu=!1;function im(n,s,a){var l=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;Wu||Oi==null||Oi!==ml(l)||(l=Oi,"selectionStart"in l&&Qu(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focu
vendor: 15,718 bytes, line 9
9sNode:l.focusNode,focusOffset:l.focusOffset}),Va&&qa(Va,l)||(Va=l,l=uc(Xu,"onSelect"),0<l.length&&(s=new _l("onSelect","select",null,s,a),n.push({event:s,listeners:l}),s.target=Oi)))}function Bs(n,s){var a={};return a[n.toLowerCase()]=s.toLowerCase(),a["Webkit"+n]="webkit"+s,a["Moz"+n]="moz"+s,a}var ki={animationend:Bs("Animation","AnimationEnd"),animationiteration:Bs("Animation","AnimationIteration"),animationstart:Bs("Animation","AnimationStart"),transitionrun:Bs("Transition","TransitionRun"),transitionstart:Bs("Transition","TransitionStart"),transitioncancel:Bs("Transition","TransitionCancel"),transitionend:Bs("Transition","TransitionEnd")},ed={},am={};lr&&(am=document.createElement("div").style,"AnimationEvent"in window||(delete ki.animationend.animation,delete ki.animationiteration.animation,delete ki.animationstart.animation),"TransitionEvent"in window||delete ki.transitionend.transition);function Is(n){if(ed[n])return ed[n];if(!ki[n])return n;var s=ki[n],a;for(a in s)if(s.hasOwnProperty(a)&&a in am)return ed[n]=s[a];return n}var om=Is("animationend"),lm=Is("animationiteration"),cm=Is("animationstart"),RS=Is("transitionrun"),OS=Is("transitionstart"),kS=Is("transitioncancel"),um=Is("transitionend"),dm=new Map,td="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(" ");td.push("scrollEnd");function xn(n,s){dm.set(n,s),zs(s,[n])}var El=typeof reportError=="function"?reportError:function(n){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var s=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof n=="object"&&n!==null&&typeof n.message=="string"?String(n.message):String(n),error:n});if(!window.dispatchEvent(s))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",n);return}console.error(n)},yn=[],Ci=0,nd=0;function Tl(){for(var n=Ci,s=nd=Ci=0;s<n;){var a=yn[s];yn[s++]=null;var l=yn[s];yn[s++]=null;var d=yn[s];yn[s++]=null;var p=yn[s];if(yn[s++]=null,l!==null&&d!==null){var v=l.pending;v===null?d.next=d:(d.next=v.next,v.next=d),l.pending=d}p!==0&&fm(a,d,p)}}function Al(n,s,a,l){yn[Ci++]=n,yn[Ci++]=s,yn[Ci++]=a,yn[Ci++]=l,nd|=l,n.lanes|=l,n=n.alternate,n!==null&&(n.lanes|=l)}function rd(n,s,a,l){return Al(n,s,a,l),Rl(n)}function Hs(n,s){return Al(n,null,null,s),Rl(n)}function fm(n,s,a){n.lanes|=a;var l=n.alternate;l!==null&&(l.lanes|=a);for(var d=!1,p=n.return;p!==null;)p.childLanes|=a,l=p.alternate,l!==null&&(l.childLanes|=a),p.tag===22&&(n=p.stateNode,n===null||n._visibility&1||(d=!0)),n=p,p=p.return;return n.tag===3?(p=n.stateNode,d&&s!==null&&(d=31-jt(a),n=p.hiddenUpdates,l=n[d],l===null?n[d]=[s]:l.push(s),s.lane=a|536870912),p):null}function Rl(n){if(50<ho)throw ho=0,hf=null,Error(i(185));for(var s=n.return;s!==null;)n=s,s=n.return;return n.tag===3?n.stateNode:null}var xi={};function CS(n,s,a,l){this.tag=n,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=s,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function an(n,s,a,l){return new CS(n,s,a,l)}function sd(n){return n=n.prototype,!(!n||!n.isReactComponent)}function cr(n,s){var a=n.alternate;return a===null?(a=an(n.tag,s,n.key,n.mode),a.elementType=n.elementType,a.type=n.type,a.stateNode=n.stateNode,a.alternate=n,n.alternate=a):(a.pendingProps=s,a.type=n.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=n.flags&65011712,a.childLanes=n.childLanes,a.lanes=n.lanes,a.child=n.child,a.memoizedProps=n.memoizedProps,a.memoizedState=n.memoizedState,a.updateQueue=n.updateQueue,s=n.dependencies,a.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},a.sibling=n.sibling,a.index=n.index,a.ref=n.ref,a.refCleanup=n.refCleanup,a}function hm(n,s){n.flags&=65011714;var a=n.alternate;return a===null?(n.childLanes=0,n.lanes=s,n.child=null,n.subtreeFlags=0,n.memoizedProps=null,n.memoizedState=null,n.updateQueue=null,n.dependencies=null,n.stateNode=null):(n.childLanes=a.childLanes,n.lanes=a.lanes,n.child=a.child,n.subtreeFlags=0,n.deletions=null,n.memoizedProps=a.memoizedProps,n.memoizedState=a.memoizedState,n.updateQueue=a.updateQueue,n.type=a.type,s=a.dependencies,n.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext}),n}function Ol(n,s,a,l,d,p){var v=0;if(l=n,typeof n=="function")sd(n)&&(v=1);else if(typeof n=="string")v=LE(n,a,Q.current)?26:n==="html"||n==="head"||n==="body"?27:5;else e:switch(n){case ne:return n=an(31,a,s,d),n.elementType=ne,n.lanes=p,n;case E:return $s(a.children,d,p,s);case A:v=8,d|=24;break;case T:return n=an(12,a,s,d|2),n.elementType=T,n.lanes=p,n;case Z:return n=an(13,a,s,d),n.elementType=Z,n.lanes=p,n;case z:return n=an(19,a,s,d),n.elementType=z,n.lanes=p,n;default:if(typeof n=="object"&&n!==null)switch(n.$$typeof){case x:v=10;break e;case C:v=9;break e;case B:v=11;break e;case D:v=14;break e;case Y:v=16,l=null;break e}v=29,a=Error(i(130,n===null?"null":typeof n,"")),l=null}return s=an(v,a,s,d),s.elementType=n,s.type=l,s.lanes=p,s}function $s(n,s,a,l){return n=an(7,n,l,s),n.lanes=a,n}function id(n,s,a){return n=an(6,n,null,s),n.lanes=a,n}function pm(n){var s=an(18,null,null,0);return s.stateNode=n,s}function ad(n,s,a){return s=an(4,n.children!==null?n.children:[],n.key,s),s.lanes=a,s.stateNode={containerInfo:n.containerInfo,pendingChildren:null,implementation:n.implementation},s}var mm=new WeakMap;function vn(n,s){if(typeof n=="object"&&n!==null){var a=mm.get(n);return a!==void 0?a:(s={value:n,source:s,stack:Ca(s)},mm.set(n,s),s)}return{value:n,source:s,stack:Ca(s)}}var Ni=[],ji=0,kl=null,Ga=0,bn=[],_n=0,qr=null,Vn=1,Gn="";function ur(n,s){Ni[ji++]=Ga,Ni[ji++]=kl,kl=n,Ga=s}function gm(n,s,a){bn[_n++]=Vn,bn[_n++]=Gn,bn[_n++]=qr,qr=n;var l=Vn;n=Gn;var d=32-jt(l)-1;l&=~(1<<d),a+=1;var p=32-jt(s)+d;if(30<p){var v=d-d%5;p=(l&(1<<v)-1).toString(32),l>>=v,d-=v,Vn=1<<32-jt(s)+d|a<<d|l,Gn=p+n}else Vn=1<<p|a<<d|l,Gn=n}function od(n){n.return!==null&&(ur(n,1),gm(n,1,0))}function ld(n){for(;n===kl;)kl=Ni[--ji],Ni[ji]=null,Ga=Ni[--ji],Ni[ji]=null;for(;n===qr;)qr=bn[--_n],bn[_n]=null,Gn=bn[--_n],bn[_n]=null,Vn=bn[--_n],bn[_n]=null}function ym(n,s){bn[_n++]=Vn,bn[_n++]=Gn,bn[_n++]=qr,Vn=s.id,Gn=s.overflow,qr=n}var Ot=null,Qe=null,Le=!1,Vr=null,wn=!1,cd=Error(i(519));function Gr(n){var s=Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Ka(vn(s,n)),cd}function vm(n){var s=n.stateNode,a=n.type,l=n.memoizedProps;switch(s[Rt]=n,s[Yt]=l,a){case"dialog":Ne("cancel",s),Ne("close",s);break;case"iframe":case"object":case"embed":Ne("load",s);break;case"video":case"audio":for(a=0;a<mo.length;a++)Ne(mo[a],s);break;case"source":Ne("error",s);break;case"img":case"image":case"link":Ne("error",s),Ne("load",s);break;case"details":Ne("toggle",s);break;case"input":Ne("invalid",s),Np(s,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0);break;case"select":Ne("invalid",s);break;case"textarea":Ne("invalid",s),Dp(s,l.value,l.defaultValue,l.children)}a=l.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||s.textContent===""+a||l.suppressHydrationWarning===!0||My(s.textContent,a)?(l.popover!=null&&(Ne("beforetoggle",s),Ne("toggle",s)),l.onScroll!=null&&Ne("scroll",s),l.onScrollEnd!=null&&Ne("scrollend",s),l.onClick!=null&&(s.onclick=or),s=!0):s=!1,s||Gr(n,!0)}function bm(n){for(Ot=n.return;Ot;)switch(Ot.tag){case 5:case 31:case 13:wn=!1;return;case 27:case 3:wn=!0;return;default:Ot=Ot.return}}function Di(n){if(n!==Ot)return!1;if(!Le)return bm(n),Le=!0,!1;var s=n.tag,a;if((a=s!==3&&s!==27)&&((a=s===5)&&(a=n.type,a=!(a!=="form"&&a!=="button")||kf(n.type,n.memoizedProps)),a=!a),a&&Qe&&Gr(n),bm(n),s===13){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(i(317));Qe=Vy(n)}else if(s===31){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(i(317));Qe=Vy(n)}else s===27?(s=Qe,is(n.type)?(n=Df,Df=null,Qe=n):Qe=s):Qe=Ot?En(n.stateNode.nextSibling):null;return!0}function qs(){Qe=Ot=null,Le=!1}function ud(){var n=Vr;return n!==null&&(Wt===null?Wt=n:Wt.push.apply(Wt,n),Vr=null),n}function Ka(n){Vr===null?Vr=[n]:Vr.push(n)}var dd=O(null),Vs=null,dr=null;function Kr(n,s,a){q(dd,s._currentValue),s._currentValue=a}function fr(n){n._currentValue=dd.current,H(dd)}function fd(n,s,a){for(;n!==null;){var l=n.alternate;if((n.childLanes&s)!==s?(n.childLanes|=s,l!==null&&(l.childLanes|=s)):l!==null&&(l.childLanes&s)!==s&&(l.childLanes|=s),n===a)break;n=n.return}}function hd(n,s,a,l){var d=n.child;for(d!==null&&(d.return=n);d!==null;){var p=d.dependencies;if(p!==null){var v=d.child;p=p.firstContext;e:for(;p!==null;){var w=p;p=d;for(var R=0;R<s.length;R++)if(w.context===s[R]){p.lanes|=a,w=p.alternate,w!==null&&(w.lanes|=a),fd(p.return,a,n),l||(v=null);break e}p=w.next}}else if(d.tag===18){if(v=d.return,v===null)throw Error(i(341));v.lanes|=a,p=v.alternate,p!==null&&(p.lanes|=a),fd(v,a,n),v=null}else v=d.child;if(v!==null)v.return=d;else for(v=d;v!==null;){if(v===n){v=null;break}if(d=v.sibling,d!==null){d.return=v.return,v=d;break}v=v.return}d=v}}function Li(n,s,a,l){n=null;for(var d=s,p=!1;d!==null;){if(!p){if((d.flags&524288)!==0)p=!0;else if((d.flags&262144)!==0)break}if(d.tag===10){var v=d.alternate;if(v===null)throw Error(i(387));if(v=v.memoizedProps,v!==null){var w=d.type;sn(d.pendingProps.value,v.value)||(n!==null?n.push(w):n=[w])}}else if(d===he.current){if(v=d.alternate,v===null)throw Error(i(387));v.memoizedState.memoizedState!==d.memoizedState.memoizedState&&(n!==null?n.push(_o):n=[_o])}d=d.return}n!==null&&hd(s,n,a,l),s.flags|=262144}function Cl(n){for(n=n.firstContext;n!==null;){if(!sn(n.context._currentValue,n.memoizedValue))return!0;n=n.next}return!1}function Gs(n){Vs=n,dr=null,n=n.dependencies,n!==null&&(n.firstContext=null)}function kt(n){return _m(Vs,n)}function xl(n,s){return Vs===null&&Gs(n),_m(n,s)}function _m(n,s){var a=s._currentValue;if(s={context:s,memoizedValue:a,next:null},dr===null){if(n===null)throw Error(i(308));dr=s,n.dependencies={lanes:0,firstContext:s},n.flags|=524288}else dr=dr.next=s;return a}var xS=typeof AbortController<"u"?AbortController:function(){var n=[],s=this.signal={aborted:!1,addEventListener:function(a,l){n.push(l)}};this.abort=function(){s.aborted=!0,n.forEach(function(a){return a()})}},NS=t.unstable_scheduleCallback,jS=t.unstable_NormalPriority,lt={$$typeof:x,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function pd(){return{controller:new xS,data:new Map,refCount:0}}function Fa(n){n.refCount--,n.refCount===0&&NS(jS,function(){n.controller.abort()})}var Ya=null,md=0,Mi=0,Ui=null;function DS(n,s){if(Ya===null){var a=Ya=[];md=0,Mi=bf(),Ui={status:"pending",value:void 0,then:function(l){a.push(l)}}}return md++,s.then(wm,wm),s}function wm(){if(--md===0&&Ya!==null){Ui!==null&&(Ui.status="fulfilled");var n=Ya;Ya=null,Mi=0,Ui=null;for(var s=0;s<n.length;s++)(0,n[s])()}}function LS(n,s){var a=[],l={status:"pending",value:null,reason:null,then:function(d){a.push(d)}};return n.then(function(){l.status="fulfilled",l.value=s;for(var d=0;d<a.length;d++)(0,a[d])(s)},function(d){for(l.status="rejected",l.reason=d,d=0;d<a.length;d++)(0,a[d])(void 0)}),l}var Sm=j.S;j.S=function(n,s){iy=Bt(),typeof s=="object"&&s!==null&&typeof s.then=="function"&&DS(n,s),Sm!==null&&Sm(n,s)};var Ks=O(null);function gd(){var n=Ks.current;return n!==null?n:Ye.pooledCache}function Nl(n,s){s===null?q(Ks,Ks.current):q(Ks,s.pool)}function Em(){var n=gd();return n===null?null:{parent:lt._currentValue,pool:n}}var zi=Error(i(460)),yd=Error(i(474)),jl=Error(i(542)),Dl={then:function(){}};function Tm(n){return n=n.status,n==="fulfilled"||n==="rejected"}function Am(n,s,a){switch(a=n[a],a===void 0?n.push(s):a!==s&&(s.then(or,or),s=a),s.status){case"fulfilled":return s.value;case"rejected":throw n=s.reason,Om(n),n;default:if(typeof s.status=="string")s.then(or,or);else{if(n=Ye,n!==null&&100<n.shellSuspendCounter)throw Error(i(482));n=s,n.status="pending",n.then(function(l){if(s.status==="pending"){var d=s;d.status="fulfilled",d.value=l}},function(l){if(s.status==="pending"){var d=s;d.status="rejected",d.reason=l}})}switch(s.status){case"fulfilled":return s.value;case"rejected":throw n=s.reason,Om(n),n}throw Ys=s,zi}}function Fs(n){try{var s=n._init;return s(n._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(Ys=a,zi):a}}var Ys=null;function Rm(){if(Ys===null)throw Error(i(459));var n=Ys;return Ys=null,n}function Om(n){if(n===zi||n===jl)throw Error(i(483))}var Pi=null,Za=0;function Ll(n){var s=Za;return Za+=1,Pi===null&&(Pi=[]),Am(Pi,n,s)}function Ja(n,s){s=s.props.ref,n.ref=s!==void 0?s:null}function Ml(n,s){throw s.$$typeof===b?Error(i(525)):(n=Object.prototype.toString.call(s),Error(i(31,n==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":n)))}function km(n){function s(N,k){if(n){var L=N.deletions;L===null?(N.deletions=[k],N.flags|=16):L.push(k)}}function a(N,k){if(!n)return null;for(;k!==null;)s(N,k),k=k.sibling;return null}function l(N){for(var k=new Map;N!==null;)N.key!==null?k.set(N.key,N):k.set(N.index,N),N=N.sibling;return k}function d(N,k){return N=cr(N,k),N.index=0,N.sibling=null,N}function p(N,k,L){return N.index=L,n?(L=N.alternate,L!==null?(L=L.index,L<k?(N.flags|=67108866,k):L):(N.flags|=67108866,k)):(N.flags|=1048576,k)}function v(N){return n&&N.alternate===null&&(N.flags|=67108866),N}function w(N,k,L,$){return k===null||k.tag!==6?(k=id(L,N.mode,$),k.return=N,k):(k=d(k,L),k.return=N,k)}function R(N,k,L,$){var me=L.type;return me===E?I(N,k,L.props.children,$,L.key):k!==null&&(k.elementType===me||typeof me=="object"&&me!==null&&me.$$typeof===Y&&Fs(me)===k.type)?(k=d(k,L.props),Ja(k,L),k.return=N,k):(k=Ol(L.type,L.key,L.props,null,N.mode,$),Ja(k,L),k.return=N,k)}function M(N,k,L,$){return k===null||k.tag!==4||k.stateNode.containerInfo!==L.containerInfo||k.stateNode.implementation!==L.implementation?(k=ad(L,N.mode,$),k.return=N,k):(k=d(k,L.children||[]),k.return=N,k)}function I(N,k,L,$,me){return k===null||k.tag!==7?(k=$s(L,N.mode,$,me),k.return=N,k):(k=d(k,L),k.return=N,k)}function V(N,k,L){if(typeof k=="string"&&k!==""||typeof k=="number"||typeof k=="bigint")return k=id(""+k,N.mode,L),k.return=N,k;if(typeof k=="object"&&k!==null){switch(k.$$typeof){case _:return L=Ol(k.type,k.key,k.props,null,N.mode,L),Ja(L,k),L.return=N,L;case S:return k=ad(k,N.mode,L),k.return=N,k;case Y:return k=Fs(k),V(N,k,L)}if(oe(k)||K(k))return k=$s(k,N.mode,L,null),k.return=N,k;if(typeof k.then=="function")return V(N,Ll(k),L);if(k.$$typeof===x)return V(N,xl(N,k),L);Ml(N,k)}return null}function U(N,k,L,$){var me=k!==null?k.key:null;if(typeof L=="string"&&L!==""||typeof L=="number"||typeof L=="bigint")return me!==null?null:w(N,k,""+L,$);if(typeof L=="object"&&L!==null){switch(L.$$typeof){case _:return L.key===me?R(N,k,L,$):null;case S:return L.key===me?M(N,k,L,$):null;case Y:return L=Fs(L),U(N,k,L,$)}if(oe(L)||K(L))return me!==null?null:I(N,k,L,$,null);if(typeof L.then=="function")return U(N,k,Ll(L),$);
vendor: 6,343 bytes, line 9
9if(L.$$typeof===x)return U(N,k,xl(N,L),$);Ml(N,L)}return null}function P(N,k,L,$,me){if(typeof $=="string"&&$!==""||typeof $=="number"||typeof $=="bigint")return N=N.get(L)||null,w(k,N,""+$,me);if(typeof $=="object"&&$!==null){switch($.$$typeof){case _:return N=N.get($.key===null?L:$.key)||null,R(k,N,$,me);case S:return N=N.get($.key===null?L:$.key)||null,M(k,N,$,me);case Y:return $=Fs($),P(N,k,L,$,me)}if(oe($)||K($))return N=N.get(L)||null,I(k,N,$,me,null);if(typeof $.then=="function")return P(N,k,L,Ll($),me);if($.$$typeof===x)return P(N,k,L,xl(k,$),me);Ml(k,$)}return null}function ie(N,k,L,$){for(var me=null,Pe=null,ue=k,Oe=k=0,De=null;ue!==null&&Oe<L.length;Oe++){ue.index>Oe?(De=ue,ue=null):De=ue.sibling;var Be=U(N,ue,L[Oe],$);if(Be===null){ue===null&&(ue=De);break}n&&ue&&Be.alternate===null&&s(N,ue),k=p(Be,k,Oe),Pe===null?me=Be:Pe.sibling=Be,Pe=Be,ue=De}if(Oe===L.length)return a(N,ue),Le&&ur(N,Oe),me;if(ue===null){for(;Oe<L.length;Oe++)ue=V(N,L[Oe],$),ue!==null&&(k=p(ue,k,Oe),Pe===null?me=ue:Pe.sibling=ue,Pe=ue);return Le&&ur(N,Oe),me}for(ue=l(ue);Oe<L.length;Oe++)De=P(ue,N,Oe,L[Oe],$),De!==null&&(n&&De.alternate!==null&&ue.delete(De.key===null?Oe:De.key),k=p(De,k,Oe),Pe===null?me=De:Pe.sibling=De,Pe=De);return n&&ue.forEach(function(us){return s(N,us)}),Le&&ur(N,Oe),me}function be(N,k,L,$){if(L==null)throw Error(i(151));for(var me=null,Pe=null,ue=k,Oe=k=0,De=null,Be=L.next();ue!==null&&!Be.done;Oe++,Be=L.next()){ue.index>Oe?(De=ue,ue=null):De=ue.sibling;var us=U(N,ue,Be.value,$);if(us===null){ue===null&&(ue=De);break}n&&ue&&us.alternate===null&&s(N,ue),k=p(us,k,Oe),Pe===null?me=us:Pe.sibling=us,Pe=us,ue=De}if(Be.done)return a(N,ue),Le&&ur(N,Oe),me;if(ue===null){for(;!Be.done;Oe++,Be=L.next())Be=V(N,Be.value,$),Be!==null&&(k=p(Be,k,Oe),Pe===null?me=Be:Pe.sibling=Be,Pe=Be);return Le&&ur(N,Oe),me}for(ue=l(ue);!Be.done;Oe++,Be=L.next())Be=P(ue,N,Oe,Be.value,$),Be!==null&&(n&&Be.alternate!==null&&ue.delete(Be.key===null?Oe:Be.key),k=p(Be,k,Oe),Pe===null?me=Be:Pe.sibling=Be,Pe=Be);return n&&ue.forEach(function(GE){return s(N,GE)}),Le&&ur(N,Oe),me}function Ke(N,k,L,$){if(typeof L=="object"&&L!==null&&L.type===E&&L.key===null&&(L=L.props.children),typeof L=="object"&&L!==null){switch(L.$$typeof){case _:e:{for(var me=L.key;k!==null;){if(k.key===me){if(me=L.type,me===E){if(k.tag===7){a(N,k.sibling),$=d(k,L.props.children),$.return=N,N=$;break e}}else if(k.elementType===me||typeof me=="object"&&me!==null&&me.$$typeof===Y&&Fs(me)===k.type){a(N,k.sibling),$=d(k,L.props),Ja($,L),$.return=N,N=$;break e}a(N,k);break}else s(N,k);k=k.sibling}L.type===E?($=$s(L.props.children,N.mode,$,L.key),$.return=N,N=$):($=Ol(L.type,L.key,L.props,null,N.mode,$),Ja($,L),$.return=N,N=$)}return v(N);case S:e:{for(me=L.key;k!==null;){if(k.key===me)if(k.tag===4&&k.stateNode.containerInfo===L.containerInfo&&k.stateNode.implementation===L.implementation){a(N,k.sibling),$=d(k,L.children||[]),$.return=N,N=$;break e}else{a(N,k);break}else s(N,k);k=k.sibling}$=ad(L,N.mode,$),$.return=N,N=$}return v(N);case Y:return L=Fs(L),Ke(N,k,L,$)}if(oe(L))return ie(N,k,L,$);if(K(L)){if(me=K(L),typeof me!="function")throw Error(i(150));return L=me.call(L),be(N,k,L,$)}if(typeof L.then=="function")return Ke(N,k,Ll(L),$);if(L.$$typeof===x)return Ke(N,k,xl(N,L),$);Ml(N,L)}return typeof L=="string"&&L!==""||typeof L=="number"||typeof L=="bigint"?(L=""+L,k!==null&&k.tag===6?(a(N,k.sibling),$=d(k,L),$.return=N,N=$):(a(N,k),$=id(L,N.mode,$),$.return=N,N=$),v(N)):a(N,k)}return function(N,k,L,$){try{Za=0;var me=Ke(N,k,L,$);return Pi=null,me}catch(ue){if(ue===zi||ue===jl)throw ue;var Pe=an(29,ue,null,N.mode);return Pe.lanes=$,Pe.return=N,Pe}}}var Zs=km(!0),Cm=km(!1),Fr=!1;function vd(n){n.updateQueue={baseState:n.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function bd(n,s){n=n.updateQueue,s.updateQueue===n&&(s.updateQueue={baseState:n.baseState,firstBaseUpdate:n.firstBaseUpdate,lastBaseUpdate:n.lastBaseUpdate,shared:n.shared,callbacks:null})}function Yr(n){return{lane:n,tag:0,payload:null,callback:null,next:null}}function Zr(n,s,a){var l=n.updateQueue;if(l===null)return null;if(l=l.shared,(He&2)!==0){var d=l.pending;return d===null?s.next=s:(s.next=d.next,d.next=s),l.pending=s,s=Rl(n),fm(n,null,a),s}return Al(n,l,s,a),Rl(n)}function Qa(n,s,a){if(s=s.updateQueue,s!==null&&(s=s.shared,(a&4194048)!==0)){var l=s.lanes;l&=n.pendingLanes,a|=l,s.lanes=a,Kt(n,a)}}function _d(n,s){var a=n.updateQueue,l=n.alternate;if(l!==null&&(l=l.updateQueue,a===l)){var d=null,p=null;if(a=a.firstBaseUpdate,a!==null){do{var v={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};p===null?d=p=v:p=p.next=v,a=a.next}while(a!==null);p===null?d=p=s:p=p.next=s}else d=p=s;a={baseState:l.baseState,firstBaseUpdate:d,lastBaseUpdate:p,shared:l.shared,callbacks:l.callbacks},n.updateQueue=a;return}n=a.lastBaseUpdate,n===null?a.firstBaseUpdate=s:n.next=s,a.lastBaseUpdate=s}var wd=!1;function Xa(){if(wd){var n=Ui;if(n!==null)throw n}}function Wa(n,s,a,l){wd=!1;var d=n.updateQueue;Fr=!1;var p=d.firstBaseUpdate,v=d.lastBaseUpdate,w=d.shared.pending;if(w!==null){d.shared.pending=null;var R=w,M=R.next;R.next=null,v===null?p=M:v.next=M,v=R;var I=n.alternate;I!==null&&(I=I.updateQueue,w=I.lastBaseUpdate,w!==v&&(w===null?I.firstBaseUpdate=M:w.next=M,I.lastBaseUpdate=R))}if(p!==null){var V=d.baseState;v=0,I=M=R=null,w=p;do{var U=w.lane&-536870913,P=U!==w.lane;if(P?(je&U)===U:(l&U)===U){U!==0&&U===Mi&&(wd=!0),I!==null&&(I=I.next={lane:0,tag:w.tag,payload:w.payload,callback:null,next:null});e:{var ie=n,be=w;U=s;var Ke=a;switch(be.tag){case 1:if(ie=be.payload,typeof ie=="function"){V=ie.call(Ke,V,U);break e}V=ie;break e;case 3:ie.flags=ie.flags&-65537|128;case 0:if(ie=be.payload,U=typeof ie=="function"?ie.call(Ke,V,U):ie,U==null)break e;V=g({},V,U);break e;case 2:Fr=!0}}U=w.callback,U!==null&&(n.flags|=64,P&&(n.flags|=8192),P=d.callbacks,P===null?d.callbacks=[U]:P.push(U))}else P={lane:U,tag:w.tag,payload:w.payload,callback:w.callback,next:null},I===null?(M=I=P,R=V):I=I.next=P,v|=U;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);I===null&&(R=V),d.baseState=R,d.firstBaseUpdate=M,d.lastBaseUpdate=I,p===null&&(d.shared.lanes=0),es|=v,n.lanes=v,n.memoizedState=V}}
vendor: 5,304 bytes, line 9
9function xm(n,s){if(typeof n!="function")throw Error(i(191,n));n.call(s)}function Nm(n,s){var a=n.callbacks;if(a!==null)for(n.callbacks=null,n=0;n<a.length;n++)xm(a[n],s)}var Bi=O(null),Ul=O(0);function jm(n,s){n=wr,q(Ul,n),q(Bi,s),wr=n|s.baseLanes}function Sd(){q(Ul,wr),q(Bi,Bi.current)}function Ed(){wr=Ul.current,H(Bi),H(Ul)}var on=O(null),Sn=null;function Jr(n){var s=n.alternate;q(it,it.current&1),q(on,n),Sn===null&&(s===null||Bi.current!==null||s.memoizedState!==null)&&(Sn=n)}function Td(n){q(it,it.current),q(on,n),Sn===null&&(Sn=n)}function Dm(n){n.tag===22?(q(it,it.current),q(on,n),Sn===null&&(Sn=n)):Qr()}function Qr(){q(it,it.current),q(on,on.current)}function ln(n){H(on),Sn===n&&(Sn=null),H(it)}var it=O(0);function zl(n){for(var s=n;s!==null;){if(s.tag===13){var a=s.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||Nf(a)||jf(a)))return s}else if(s.tag===19&&(s.memoizedProps.revealOrder==="forwards"||s.memoizedProps.revealOrder==="backwards"||s.memoizedProps.revealOrder==="unstable_legacy-backwards"||s.memoizedProps.revealOrder==="together")){if((s.flags&128)!==0)return s}else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===n)break;for(;s.sibling===null;){if(s.return===null||s.return===n)return null;s=s.return}s.sibling.return=s.return,s=s.sibling}return null}var hr=0,Re=null,Ve=null,ct=null,Pl=!1,Ii=!1,Js=!1,Bl=0,eo=0,Hi=null,MS=0;function nt(){throw Error(i(321))}function Ad(n,s){if(s===null)return!1;for(var a=0;a<s.length&&a<n.length;a++)if(!sn(n[a],s[a]))return!1;return!0}function Rd(n,s,a,l,d,p){return hr=p,Re=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,j.H=n===null||n.memoizedState===null?gg:Hd,Js=!1,p=a(l,d),Js=!1,Ii&&(p=Mm(s,a,l,d)),Lm(n),p}function Lm(n){j.H=ro;var s=Ve!==null&&Ve.next!==null;if(hr=0,ct=Ve=Re=null,Pl=!1,eo=0,Hi=null,s)throw Error(i(300));n===null||ut||(n=n.dependencies,n!==null&&Cl(n)&&(ut=!0))}function Mm(n,s,a,l){Re=n;var d=0;do{if(Ii&&(Hi=null),eo=0,Ii=!1,25<=d)throw Error(i(301));if(d+=1,ct=Ve=null,n.updateQueue!=null){var p=n.updateQueue;p.lastEffect=null,p.events=null,p.stores=null,p.memoCache!=null&&(p.memoCache.index=0)}j.H=yg,p=s(a,l)}while(Ii);return p}function US(){var n=j.H,s=n.useState()[0];return s=typeof s.then=="function"?to(s):s,n=n.useState()[0],(Ve!==null?Ve.memoizedState:null)!==n&&(Re.flags|=1024),s}function Od(){var n=Bl!==0;return Bl=0,n}function kd(n,s,a){s.updateQueue=n.updateQueue,s.flags&=-2053,n.lanes&=~a}function Cd(n){if(Pl){for(n=n.memoizedState;n!==null;){var s=n.queue;s!==null&&(s.pending=null),n=n.next}Pl=!1}hr=0,ct=Ve=Re=null,Ii=!1,eo=Bl=0,Hi=null}function Ht(){var n={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ct===null?Re.memoizedState=ct=n:ct=ct.next=n,ct}function at(){if(Ve===null){var n=Re.alternate;n=n!==null?n.memoizedState:null}else n=Ve.next;var s=ct===null?Re.memoizedState:ct.next;if(s!==null)ct=s,Ve=n;else{if(n===null)throw Re.alternate===null?Error(i(467)):Error(i(310));Ve=n,n={memoizedState:Ve.memoizedState,baseState:Ve.baseState,baseQueue:Ve.baseQueue,queue:Ve.queue,next:null},ct===null?Re.memoizedState=ct=n:ct=ct.next=n}return ct}function Il(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function to(n){var s=eo;return eo+=1,Hi===null&&(Hi=[]),n=Am(Hi,n,s),s=Re,(ct===null?s.memoizedState:ct.next)===null&&(s=s.alternate,j.H=s===null||s.memoizedState===null?gg:Hd),n}function Hl(n){if(n!==null&&typeof n=="object"){if(typeof n.then=="function")return to(n);if(n.$$typeof===x)return kt(n)}throw Error(i(438,String(n)))}function xd(n){var s=null,a=Re.updateQueue;if(a!==null&&(s=a.memoCache),s==null){var l=Re.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(s={data:l.data.map(function(d){return d.slice()}),index:0})))}if(s==null&&(s={data:[],index:0}),a===null&&(a=Il(),Re.updateQueue=a),a.memoCache=s,a=s.data[s.index],a===void 0)for(a=s.data[s.index]=Array(n),l=0;l<n;l++)a[l]=de;return s.index++,a}function pr(n,s){return typeof s=="function"?s(n):s}function $l(n){var s=at();return Nd(s,Ve,n)}function Nd(n,s,a){var l=n.queue;if(l===null)throw Error(i(311));l.lastRenderedReducer=a;var d=n.baseQueue,p=l.pending;if(p!==null){if(d!==null){var v=d.next;d.next=p.next,p.next=v}s.baseQueue=d=p,l.pending=null}if(p=n.baseState,d===null)n.memoizedState=p;else{s=d.next;var w=v=null,R=null,M=s,I=!1;do{var V=M.lane&-536870913;if(V!==M.lane?(je&V)===V:(hr&V)===V){var U=M.revertLane;if(U===0)R!==null&&(R=R.next={lane:0,revertLane:0,gesture:null,action:M.action,hasEagerState:M.hasEagerState,eagerState:M.eagerState,next:null}),V===Mi&&(I=!0);else if((hr&U)===U){M=M.next,U===Mi&&(I=!0);continue}else V={lane:0,revertLane:M.revertLane,gesture:null,action:M.action,hasEagerState:M.hasEagerState,eagerState:M.eagerState,next:null},R===null?(w=R=V,v=p):R=R.next=V,Re.lanes|=U,es|=U;V=M.action,Js&&a(p,V),p=M.hasEagerState?M.eagerState:a(p,V)}else U={lane:V,revertLane:M.revertLane,gesture:M.gesture,action:M.action,hasEagerState:M.hasEagerState,eagerState:M.eagerState,next:null},R===null?(w=R=U,v=p):R=R.next=U,Re.lanes|=V,es|=V;M=M.next}while(M!==null&&M!==s);if(R===null?v=p:R.next=w,!sn(p,n.memoizedState)&&(ut=!0,I&&(a=Ui,a!==null)))throw a;n.memoizedState=p,n.baseState=v,n.baseQueue=R,l.lastRenderedState=p}return d===null&&(l.lanes=0),[n.memoizedState,l.dispatch]}
vendor: 4,772 bytes, line 9
9function jd(n){var s=at(),a=s.queue;if(a===null)throw Error(i(311));a.lastRenderedReducer=n;var l=a.dispatch,d=a.pending,p=s.memoizedState;if(d!==null){a.pending=null;var v=d=d.next;do p=n(p,v.action),v=v.next;while(v!==d);sn(p,s.memoizedState)||(ut=!0),s.memoizedState=p,s.baseQueue===null&&(s.baseState=p),a.lastRenderedState=p}return[p,l]}function Um(n,s,a){var l=Re,d=at(),p=Le;if(p){if(a===void 0)throw Error(i(407));a=a()}else a=s();var v=!sn((Ve||d).memoizedState,a);if(v&&(d.memoizedState=a,ut=!0),d=d.queue,Md(Bm.bind(null,l,d,n),[n]),d.getSnapshot!==s||v||ct!==null&&ct.memoizedState.tag&1){if(l.flags|=2048,$i(9,{destroy:void 0},Pm.bind(null,l,d,a,s),null),Ye===null)throw Error(i(349));p||(hr&127)!==0||zm(l,s,a)}return a}function zm(n,s,a){n.flags|=16384,n={getSnapshot:s,value:a},s=Re.updateQueue,s===null?(s=Il(),Re.updateQueue=s,s.stores=[n]):(a=s.stores,a===null?s.stores=[n]:a.push(n))}function Pm(n,s,a,l){s.value=a,s.getSnapshot=l,Im(s)&&Hm(n)}function Bm(n,s,a){return a(function(){Im(s)&&Hm(n)})}function Im(n){var s=n.getSnapshot;n=n.value;try{var a=s();return!sn(n,a)}catch{return!0}}function Hm(n){var s=Hs(n,2);s!==null&&en(s,n,2)}function Dd(n){var s=Ht();if(typeof n=="function"){var a=n;if(n=a(),Js){kn(!0);try{a()}finally{kn(!1)}}}return s.memoizedState=s.baseState=n,s.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:pr,lastRenderedState:n},s}function $m(n,s,a,l){return n.baseState=a,Nd(n,Ve,typeof l=="function"?l:pr)}function zS(n,s,a,l,d){if(Gl(n))throw Error(i(485));if(n=s.action,n!==null){var p={payload:d,action:n,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(v){p.listeners.push(v)}};j.T!==null?a(!0):p.isTransition=!1,l(p),a=s.pending,a===null?(p.next=s.pending=p,qm(s,p)):(p.next=a.next,s.pending=a.next=p)}}function qm(n,s){var a=s.action,l=s.payload,d=n.state;if(s.isTransition){var p=j.T,v={};j.T=v;try{var w=a(d,l),R=j.S;R!==null&&R(v,w),Vm(n,s,w)}catch(M){Ld(n,s,M)}finally{p!==null&&v.types!==null&&(p.types=v.types),j.T=p}}else try{p=a(d,l),Vm(n,s,p)}catch(M){Ld(n,s,M)}}function Vm(n,s,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(l){Gm(n,s,l)},function(l){return Ld(n,s,l)}):Gm(n,s,a)}function Gm(n,s,a){s.status="fulfilled",s.value=a,Km(s),n.state=a,s=n.pending,s!==null&&(a=s.next,a===s?n.pending=null:(a=a.next,s.next=a,qm(n,a)))}function Ld(n,s,a){var l=n.pending;if(n.pending=null,l!==null){l=l.next;do s.status="rejected",s.reason=a,Km(s),s=s.next;while(s!==l)}n.action=null}function Km(n){n=n.listeners;for(var s=0;s<n.length;s++)(0,n[s])()}function Fm(n,s){return s}function Ym(n,s){if(Le){var a=Ye.formState;if(a!==null){e:{var l=Re;if(Le){if(Qe){t:{for(var d=Qe,p=wn;d.nodeType!==8;){if(!p){d=null;break t}if(d=En(d.nextSibling),d===null){d=null;break t}}p=d.data,d=p==="F!"||p==="F"?d:null}if(d){Qe=En(d.nextSibling),l=d.data==="F!";break e}}Gr(l)}l=!1}l&&(s=a[0])}}return a=Ht(),a.memoizedState=a.baseState=s,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Fm,lastRenderedState:s},a.queue=l,a=hg.bind(null,Re,l),l.dispatch=a,l=Dd(!1),p=Id.bind(null,Re,!1,l.queue),l=Ht(),d={state:s,dispatch:null,action:n,pending:null},l.queue=d,a=zS.bind(null,Re,d,p,a),d.dispatch=a,l.memoizedState=n,[s,a,!1]}function Zm(n){var s=at();return Jm(s,Ve,n)}function Jm(n,s,a){if(s=Nd(n,s,Fm)[0],n=$l(pr)[0],typeof s=="object"&&s!==null&&typeof s.then=="function")try{var l=to(s)}catch(v){throw v===zi?jl:v}else l=s;s=at();var d=s.queue,p=d.dispatch;return a!==s.memoizedState&&(Re.flags|=2048,$i(9,{destroy:void 0},PS.bind(null,d,a),null)),[l,p,n]}function PS(n,s){n.action=s}function Qm(n){var s=at(),a=Ve;if(a!==null)return Jm(s,a,n);at(),s=s.memoizedState,a=at();var l=a.queue.dispatch;return a.memoizedState=n,[s,l,!1]}function $i(n,s,a,l){return n={tag:n,create:a,deps:l,inst:s,next:null},s=Re.updateQueue,s===null&&(s=Il(),Re.updateQueue=s),a=s.lastEffect,a===null?s.lastEffect=n.next=n:(l=a.next,a.next=n,n.next=l,s.lastEffect=n),n}function Xm(){return at().memoizedState}function ql(n,s,a,l){var d=Ht();Re.flags|=n,d.memoizedState=$i(1|s,{destroy:void 0},a,l===void 0?null:l)}function Vl(n,s,a,l){var d=at();l=l===void 0?null:l;var p=d.memoizedState.inst;Ve!==null&&l!==null&&Ad(l,Ve.memoizedState.deps)?d.memoizedState=$i(s,p,a,l):(Re.flags|=n,d.memoizedState=$i(1|s,p,a,l))}function Wm(n,s){ql(8390656,8,n,s)}function Md(n,s){Vl(2048,8,n,s)}function BS(n){Re.flags|=4;var s=Re.updateQueue;if(s===null)s=Il(),Re.updateQueue=s,s.events=[n];else{var a=s.events;a===null?s.events=[n]:a.push(n)}}function eg(n){var s=at().memoizedState;return BS({ref:s,nextImpl:n}),function(){if((He&2)!==0)throw Error(i(440));return s.impl.apply(void 0,arguments)}}function tg(n,s){return Vl(4,2,n,s)}function ng(n,s){return Vl(4,4,n,s)}
vendor: 4,503 bytes, line 9
9function rg(n,s){if(typeof s=="function"){n=n();var a=s(n);return function(){typeof a=="function"?a():s(null)}}if(s!=null)return n=n(),s.current=n,function(){s.current=null}}function sg(n,s,a){a=a!=null?a.concat([n]):null,Vl(4,4,rg.bind(null,s,n),a)}function Ud(){}function ig(n,s){var a=at();s=s===void 0?null:s;var l=a.memoizedState;return s!==null&&Ad(s,l[1])?l[0]:(a.memoizedState=[n,s],n)}function ag(n,s){var a=at();s=s===void 0?null:s;var l=a.memoizedState;if(s!==null&&Ad(s,l[1]))return l[0];if(l=n(),Js){kn(!0);try{n()}finally{kn(!1)}}return a.memoizedState=[l,s],l}function zd(n,s,a){return a===void 0||(hr&1073741824)!==0&&(je&261930)===0?n.memoizedState=s:(n.memoizedState=a,n=oy(),Re.lanes|=n,es|=n,a)}function og(n,s,a,l){return sn(a,s)?a:Bi.current!==null?(n=zd(n,a,l),sn(n,s)||(ut=!0),n):(hr&42)===0||(hr&1073741824)!==0&&(je&261930)===0?(ut=!0,n.memoizedState=a):(n=oy(),Re.lanes|=n,es|=n,s)}function lg(n,s,a,l,d){var p=F.p;F.p=p!==0&&8>p?p:8;var v=j.T,w={};j.T=w,Id(n,!1,s,a);try{var R=d(),M=j.S;if(M!==null&&M(w,R),R!==null&&typeof R=="object"&&typeof R.then=="function"){var I=LS(R,l);no(n,s,I,dn(n))}else no(n,s,l,dn(n))}catch(V){no(n,s,{then:function(){},status:"rejected",reason:V},dn())}finally{F.p=p,v!==null&&w.types!==null&&(v.types=w.types),j.T=v}}function IS(){}function Pd(n,s,a,l){if(n.tag!==5)throw Error(i(476));var d=cg(n).queue;lg(n,d,s,ce,a===null?IS:function(){return ug(n),a(l)})}function cg(n){var s=n.memoizedState;if(s!==null)return s;s={memoizedState:ce,baseState:ce,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:pr,lastRenderedState:ce},next:null};var a={};return s.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:pr,lastRenderedState:a},next:null},n.memoizedState=s,n=n.alternate,n!==null&&(n.memoizedState=s),s}function ug(n){var s=cg(n);s.next===null&&(s=n.alternate.memoizedState),no(n,s.next.queue,{},dn())}function Bd(){return kt(_o)}function dg(){return at().memoizedState}function fg(){return at().memoizedState}function HS(n){for(var s=n.return;s!==null;){switch(s.tag){case 24:case 3:var a=dn();n=Yr(a);var l=Zr(s,n,a);l!==null&&(en(l,s,a),Qa(l,s,a)),s={cache:pd()},n.payload=s;return}s=s.return}}function $S(n,s,a){var l=dn();a={lane:l,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Gl(n)?pg(s,a):(a=rd(n,s,a,l),a!==null&&(en(a,n,l),mg(a,s,l)))}function hg(n,s,a){var l=dn();no(n,s,a,l)}function no(n,s,a,l){var d={lane:l,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(Gl(n))pg(s,d);else{var p=n.alternate;if(n.lanes===0&&(p===null||p.lanes===0)&&(p=s.lastRenderedReducer,p!==null))try{var v=s.lastRenderedState,w=p(v,a);if(d.hasEagerState=!0,d.eagerState=w,sn(w,v))return Al(n,s,d,0),Ye===null&&Tl(),!1}catch{}if(a=rd(n,s,d,l),a!==null)return en(a,n,l),mg(a,s,l),!0}return!1}function Id(n,s,a,l){if(l={lane:2,revertLane:bf(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Gl(n)){if(s)throw Error(i(479))}else s=rd(n,a,l,2),s!==null&&en(s,n,2)}function Gl(n){var s=n.alternate;return n===Re||s!==null&&s===Re}function pg(n,s){Ii=Pl=!0;var a=n.pending;a===null?s.next=s:(s.next=a.next,a.next=s),n.pending=s}function mg(n,s,a){if((a&4194048)!==0){var l=s.lanes;l&=n.pendingLanes,a|=l,s.lanes=a,Kt(n,a)}}var ro={readContext:kt,use:Hl,useCallback:nt,useContext:nt,useEffect:nt,useImperativeHandle:nt,useLayoutEffect:nt,useInsertionEffect:nt,useMemo:nt,useReducer:nt,useRef:nt,useState:nt,useDebugValue:nt,useDeferredValue:nt,useTransition:nt,useSyncExternalStore:nt,useId:nt,useHostTransitionStatus:nt,useFormState:nt,useActionState:nt,useOptimistic:nt,useMemoCache:nt,useCacheRefresh:nt};ro.useEffectEvent=nt;var gg={readContext:kt,use:Hl,useCallback:function(n,s){return Ht().memoizedState=[n,s===void 0?null:s],n},useContext:kt,useEffect:Wm,useImperativeHandle:function(n,s,a){a=a!=null?a.concat([n]):null,ql(4194308,4,rg.bind(null,s,n),a)},useLayoutEffect:function(n,s){return ql(4194308,4,n,s)},useInsertionEffect:function(n,s){ql(4,2,n,s)},useMemo:function(n,s){var a=Ht();s=s===void 0?null:s;var l=n();if(Js){kn(!0);try{n()}finally{kn(!1)}}return a.memoizedState=[l,s],l},useReducer:function(n,s,a){var l=Ht();if(a!==void 0){var d=a(s);if(Js){kn(!0);try{a(s)}finally{kn(!1)}}}else d=s;return l.memoizedState=l.baseState=d,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:n,lastRenderedState:d},l.queue=n,n=n.dispatch=$S.bind(null,Re,n),[l.memoizedState,n]}
vendor: 6,243 bytes, line 9
9,useRef:function(n){var s=Ht();return n={current:n},s.memoizedState=n},useState:function(n){n=Dd(n);var s=n.queue,a=hg.bind(null,Re,s);return s.dispatch=a,[n.memoizedState,a]},useDebugValue:Ud,useDeferredValue:function(n,s){var a=Ht();return zd(a,n,s)},useTransition:function(){var n=Dd(!1);return n=lg.bind(null,Re,n.queue,!0,!1),Ht().memoizedState=n,[!1,n]},useSyncExternalStore:function(n,s,a){var l=Re,d=Ht();if(Le){if(a===void 0)throw Error(i(407));a=a()}else{if(a=s(),Ye===null)throw Error(i(349));(je&127)!==0||zm(l,s,a)}d.memoizedState=a;var p={value:a,getSnapshot:s};return d.queue=p,Wm(Bm.bind(null,l,p,n),[n]),l.flags|=2048,$i(9,{destroy:void 0},Pm.bind(null,l,p,a,s),null),a},useId:function(){var n=Ht(),s=Ye.identifierPrefix;if(Le){var a=Gn,l=Vn;a=(l&~(1<<32-jt(l)-1)).toString(32)+a,s="_"+s+"R_"+a,a=Bl++,0<a&&(s+="H"+a.toString(32)),s+="_"}else a=MS++,s="_"+s+"r_"+a.toString(32)+"_";return n.memoizedState=s},useHostTransitionStatus:Bd,useFormState:Ym,useActionState:Ym,useOptimistic:function(n){var s=Ht();s.memoizedState=s.baseState=n;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return s.queue=a,s=Id.bind(null,Re,!0,a),a.dispatch=s,[n,s]},useMemoCache:xd,useCacheRefresh:function(){return Ht().memoizedState=HS.bind(null,Re)},useEffectEvent:function(n){var s=Ht(),a={impl:n};return s.memoizedState=a,function(){if((He&2)!==0)throw Error(i(440));return a.impl.apply(void 0,arguments)}}},Hd={readContext:kt,use:Hl,useCallback:ig,useContext:kt,useEffect:Md,useImperativeHandle:sg,useInsertionEffect:tg,useLayoutEffect:ng,useMemo:ag,useReducer:$l,useRef:Xm,useState:function(){return $l(pr)},useDebugValue:Ud,useDeferredValue:function(n,s){var a=at();return og(a,Ve.memoizedState,n,s)},useTransition:function(){var n=$l(pr)[0],s=at().memoizedState;return[typeof n=="boolean"?n:to(n),s]},useSyncExternalStore:Um,useId:dg,useHostTransitionStatus:Bd,useFormState:Zm,useActionState:Zm,useOptimistic:function(n,s){var a=at();return $m(a,Ve,n,s)},useMemoCache:xd,useCacheRefresh:fg};Hd.useEffectEvent=eg;var yg={readContext:kt,use:Hl,useCallback:ig,useContext:kt,useEffect:Md,useImperativeHandle:sg,useInsertionEffect:tg,useLayoutEffect:ng,useMemo:ag,useReducer:jd,useRef:Xm,useState:function(){return jd(pr)},useDebugValue:Ud,useDeferredValue:function(n,s){var a=at();return Ve===null?zd(a,n,s):og(a,Ve.memoizedState,n,s)},useTransition:function(){var n=jd(pr)[0],s=at().memoizedState;return[typeof n=="boolean"?n:to(n),s]},useSyncExternalStore:Um,useId:dg,useHostTransitionStatus:Bd,useFormState:Qm,useActionState:Qm,useOptimistic:function(n,s){var a=at();return Ve!==null?$m(a,Ve,n,s):(a.baseState=n,[n,a.queue.dispatch])},useMemoCache:xd,useCacheRefresh:fg};yg.useEffectEvent=eg;function $d(n,s,a,l){s=n.memoizedState,a=a(l,s),a=a==null?s:g({},s,a),n.memoizedState=a,n.lanes===0&&(n.updateQueue.baseState=a)}var qd={enqueueSetState:function(n,s,a){n=n._reactInternals;var l=dn(),d=Yr(l);d.payload=s,a!=null&&(d.callback=a),s=Zr(n,d,l),s!==null&&(en(s,n,l),Qa(s,n,l))},enqueueReplaceState:function(n,s,a){n=n._reactInternals;var l=dn(),d=Yr(l);d.tag=1,d.payload=s,a!=null&&(d.callback=a),s=Zr(n,d,l),s!==null&&(en(s,n,l),Qa(s,n,l))},enqueueForceUpdate:function(n,s){n=n._reactInternals;var a=dn(),l=Yr(a);l.tag=2,s!=null&&(l.callback=s),s=Zr(n,l,a),s!==null&&(en(s,n,a),Qa(s,n,a))}};function vg(n,s,a,l,d,p,v){return n=n.stateNode,typeof n.shouldComponentUpdate=="function"?n.shouldComponentUpdate(l,p,v):s.prototype&&s.prototype.isPureReactComponent?!qa(a,l)||!qa(d,p):!0}function bg(n,s,a,l){n=s.state,typeof s.componentWillReceiveProps=="function"&&s.componentWillReceiveProps(a,l),typeof s.UNSAFE_componentWillReceiveProps=="function"&&s.UNSAFE_componentWillReceiveProps(a,l),s.state!==n&&qd.enqueueReplaceState(s,s.state,null)}function Qs(n,s){var a=s;if("ref"in s){a={};for(var l in s)l!=="ref"&&(a[l]=s[l])}if(n=n.defaultProps){a===s&&(a=g({},a));for(var d in n)a[d]===void 0&&(a[d]=n[d])}return a}function _g(n){El(n)}function wg(n){console.error(n)}function Sg(n){El(n)}function Kl(n,s){try{var a=n.onUncaughtError;a(s.value,{componentStack:s.stack})}catch(l){setTimeout(function(){throw l})}}function Eg(n,s,a){try{var l=n.onCaughtError;l(a.value,{componentStack:a.stack,errorBoundary:s.tag===1?s.stateNode:null})}catch(d){setTimeout(function(){throw d})}}function Vd(n,s,a){return a=Yr(a),a.tag=3,a.payload={element:null},a.callback=function(){Kl(n,s)},a}function Tg(n){return n=Yr(n),n.tag=3,n}function Ag(n,s,a,l){var d=a.type.getDerivedStateFromError;if(typeof d=="function"){var p=l.value;n.payload=function(){return d(p)},n.callback=function(){Eg(s,a,l)}}var v=a.stateNode;v!==null&&typeof v.componentDidCatch=="function"&&(n.callback=function(){Eg(s,a,l),typeof d!="function"&&(ts===null?ts=new Set([this]):ts.add(this));var w=l.stack;this.componentDidCatch(l.value,{componentStack:w!==null?w:""})})}function qS(n,s,a,l,d){if(a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(s=a.alternate,s!==null&&Li(s,a,d,!0),a=on.current,a!==null){switch(a.tag){case 31:case 13:return Sn===null?sc():a.alternate===null&&rt===0&&(rt=3),a.flags&=-257,a.flags|=65536,a.lanes=d,l===Dl?a.flags|=16384:(s=a.updateQueue,s===null?a.updateQueue=new Set([l]):s.add(l),gf(n,l,d)),!1;case 22:return a.flags|=65536,l===Dl?a.flags|=16384:(s=a.updateQueue,s===null?(s={transitions:null,markerInstances:null,retryQueue:new Set([l])},a.updateQueue=s):(a=s.retryQueue,a===null?s.retryQueue=new Set([l]):a.add(l)),gf(n,l,d)),!1}throw Error(i(435,a.tag))}return gf(n,l,d),sc(),!1}if(Le)return s=on.current,s!==null?((s.flags&65536)===0&&(s.flags|=256),s.flags|=65536,s.lanes=d,l!==cd&&(n=Error(i(422),{cause:l}),Ka(vn(n,a)))):(l!==cd&&(s=Error(i(423),{cause:l}),Ka(vn(s,a))),n=n.current.alternate,n.flags|=65536,d&=-d,n.lanes|=d,l=vn(l,a),d=Vd(n.stateNode,l,d),_d(n,d),rt!==4&&(rt=2)),!1;var p=Error(i(520),{cause:l});if(p=vn(p,a),fo===null?fo=[p]:fo.push(p),rt!==4&&(rt=2),s===null)return!0;l=vn(l,a),a=s;do{switch(a.tag){case 3:return a.flags|=65536,n=d&-d,a.lanes|=n,n=Vd(a.stateNode,l,n),_d(a,n),!1;case 1:if(s=a.type,p=a.stateNode,(a.flags&128)===0&&(typeof s.getDerivedStateFromError=="function"||p!==null&&typeof p.componentDidCatch=="function"&&(ts===null||!ts.has(p
vendor: 9,363 bytes, line 9
9))))return a.flags|=65536,d&=-d,a.lanes|=d,d=Tg(d),Ag(d,n,a,l),_d(a,d),!1}a=a.return}while(a!==null);return!1}var Gd=Error(i(461)),ut=!1;function Ct(n,s,a,l){s.child=n===null?Cm(s,null,a,l):Zs(s,n.child,a,l)}function Rg(n,s,a,l,d){a=a.render;var p=s.ref;if("ref"in l){var v={};for(var w in l)w!=="ref"&&(v[w]=l[w])}else v=l;return Gs(s),l=Rd(n,s,a,v,p,d),w=Od(),n!==null&&!ut?(kd(n,s,d),mr(n,s,d)):(Le&&w&&od(s),s.flags|=1,Ct(n,s,l,d),s.child)}function Og(n,s,a,l,d){if(n===null){var p=a.type;return typeof p=="function"&&!sd(p)&&p.defaultProps===void 0&&a.compare===null?(s.tag=15,s.type=p,kg(n,s,p,l,d)):(n=Ol(a.type,null,l,s,s.mode,d),n.ref=s.ref,n.return=s,s.child=n)}if(p=n.child,!Wd(n,d)){var v=p.memoizedProps;if(a=a.compare,a=a!==null?a:qa,a(v,l)&&n.ref===s.ref)return mr(n,s,d)}return s.flags|=1,n=cr(p,l),n.ref=s.ref,n.return=s,s.child=n}function kg(n,s,a,l,d){if(n!==null){var p=n.memoizedProps;if(qa(p,l)&&n.ref===s.ref)if(ut=!1,s.pendingProps=l=p,Wd(n,d))(n.flags&131072)!==0&&(ut=!0);else return s.lanes=n.lanes,mr(n,s,d)}return Kd(n,s,a,l,d)}function Cg(n,s,a,l){var d=l.children,p=n!==null?n.memoizedState:null;if(n===null&&s.stateNode===null&&(s.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.mode==="hidden"){if((s.flags&128)!==0){if(p=p!==null?p.baseLanes|a:a,n!==null){for(l=s.child=n.child,d=0;l!==null;)d=d|l.lanes|l.childLanes,l=l.sibling;l=d&~p}else l=0,s.child=null;return xg(n,s,p,a,l)}if((a&536870912)!==0)s.memoizedState={baseLanes:0,cachePool:null},n!==null&&Nl(s,p!==null?p.cachePool:null),p!==null?jm(s,p):Sd(),Dm(s);else return l=s.lanes=536870912,xg(n,s,p!==null?p.baseLanes|a:a,a,l)}else p!==null?(Nl(s,p.cachePool),jm(s,p),Qr(),s.memoizedState=null):(n!==null&&Nl(s,null),Sd(),Qr());return Ct(n,s,d,a),s.child}function so(n,s){return n!==null&&n.tag===22||s.stateNode!==null||(s.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.sibling}function xg(n,s,a,l,d){var p=gd();return p=p===null?null:{parent:lt._currentValue,pool:p},s.memoizedState={baseLanes:a,cachePool:p},n!==null&&Nl(s,null),Sd(),Dm(s),n!==null&&Li(n,s,l,!0),s.childLanes=d,null}function Fl(n,s){return s=Zl({mode:s.mode,children:s.children},n.mode),s.ref=n.ref,n.child=s,s.return=n,s}function Ng(n,s,a){return Zs(s,n.child,null,a),n=Fl(s,s.pendingProps),n.flags|=2,ln(s),s.memoizedState=null,n}function VS(n,s,a){var l=s.pendingProps,d=(s.flags&128)!==0;if(s.flags&=-129,n===null){if(Le){if(l.mode==="hidden")return n=Fl(s,l),s.lanes=536870912,so(null,n);if(Td(s),(n=Qe)?(n=qy(n,wn),n=n!==null&&n.data==="&"?n:null,n!==null&&(s.memoizedState={dehydrated:n,treeContext:qr!==null?{id:Vn,overflow:Gn}:null,retryLane:536870912,hydrationErrors:null},a=pm(n),a.return=s,s.child=a,Ot=s,Qe=null)):n=null,n===null)throw Gr(s);return s.lanes=536870912,null}return Fl(s,l)}var p=n.memoizedState;if(p!==null){var v=p.dehydrated;if(Td(s),d)if(s.flags&256)s.flags&=-257,s=Ng(n,s,a);else if(s.memoizedState!==null)s.child=n.child,s.flags|=128,s=null;else throw Error(i(558));else if(ut||Li(n,s,a,!1),d=(a&n.childLanes)!==0,ut||d){if(l=Ye,l!==null&&(v=Ft(l,a),v!==0&&v!==p.retryLane))throw p.retryLane=v,Hs(n,v),en(l,n,v),Gd;sc(),s=Ng(n,s,a)}else n=p.treeContext,Qe=En(v.nextSibling),Ot=s,Le=!0,Vr=null,wn=!1,n!==null&&ym(s,n),s=Fl(s,l),s.flags|=4096;return s}return n=cr(n.child,{mode:l.mode,children:l.children}),n.ref=s.ref,s.child=n,n.return=s,n}function Yl(n,s){var a=s.ref;if(a===null)n!==null&&n.ref!==null&&(s.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(i(284));(n===null||n.ref!==a)&&(s.flags|=4194816)}}function Kd(n,s,a,l,d){return Gs(s),a=Rd(n,s,a,l,void 0,d),l=Od(),n!==null&&!ut?(kd(n,s,d),mr(n,s,d)):(Le&&l&&od(s),s.flags|=1,Ct(n,s,a,d),s.child)}function jg(n,s,a,l,d,p){return Gs(s),s.updateQueue=null,a=Mm(s,l,a,d),Lm(n),l=Od(),n!==null&&!ut?(kd(n,s,p),mr(n,s,p)):(Le&&l&&od(s),s.flags|=1,Ct(n,s,a,p),s.child)}function Dg(n,s,a,l,d){if(Gs(s),s.stateNode===null){var p=xi,v=a.contextType;typeof v=="object"&&v!==null&&(p=kt(v)),p=new a(l,p),s.memoizedState=p.state!==null&&p.state!==void 0?p.state:null,p.updater=qd,s.stateNode=p,p._reactInternals=s,p=s.stateNode,p.props=l,p.state=s.memoizedState,p.refs={},vd(s),v=a.contextType,p.context=typeof v=="object"&&v!==null?kt(v):xi,p.state=s.memoizedState,v=a.getDerivedStateFromProps,typeof v=="function"&&($d(s,a,v,l),p.state=s.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof p.getSnapshotBeforeUpdate=="function"||typeof p.UNSAFE_componentWillMount!="function"&&typeof p.componentWillMount!="function"||(v=p.state,typeof p.componentWillMount=="function"&&p.componentWillMount(),typeof p.UNSAFE_componentWillMount=="function"&&p.UNSAFE_componentWillMount(),v!==p.state&&qd.enqueueReplaceState(p,p.state,null),Wa(s,l,p,d),Xa(),p.state=s.memoizedState),typeof p.componentDidMount=="function"&&(s.flags|=4194308),l=!0}else if(n===null){p=s.stateNode;var w=s.memoizedProps,R=Qs(a,w);p.props=R;var M=p.context,I=a.contextType;v=xi,typeof I=="object"&&I!==null&&(v=kt(I));var V=a.getDerivedStateFromProps;I=typeof V=="function"||typeof p.getSnapshotBeforeUpdate=="function",w=s.pendingProps!==w,I||typeof p.UNSAFE_componentWillReceiveProps!="function"&&typeof p.componentWillReceiveProps!="function"||(w||M!==v)&&bg(s,p,l,v),Fr=!1;var U=s.memoizedState;p.state=U,Wa(s,l,p,d),Xa(),M=s.memoizedState,w||U!==M||Fr?(typeof V=="function"&&($d(s,a,V,l),M=s.memoizedState),(R=Fr||vg(s,a,R,l,U,M,v))?(I||typeof p.UNSAFE_componentWillMount!="function"&&typeof p.componentWillMount!="function"||(typeof p.componentWillMount=="function"&&p.componentWillMount(),typeof p.UNSAFE_componentWillMount=="function"&&p.UNSAFE_componentWillMount()),typeof p.componentDidMount=="function"&&(s.flags|=4194308)):(typeof p.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=l,s.memoizedState=M),p.props=l,p.state=M,p.context=v,l=R):(typeof p.componentDidMount=="function"&&(s.flags|=4194308),l=!1)}else{p=s.stateNode,bd(n,s),v=s.memoizedProps,I=Qs(a,v),p.props=I,V=s.pendingProps,U=p.context,M=a.contextType,R=xi,typeof M=="object"&&M!==null&&(R=kt(M)),w=a.getDerivedStateFromProps,(M=typeof w=="function"||typeof p.getSnapshotBeforeUpdate=="function")||typeof p.UNSAFE_componentWillReceiveProps!="function"&&typeof p.componentWillReceiveProps!="function"||(v!==V||U!==R)&&bg(s,p,l,R),Fr=!1,U=s.memoizedState,p.state=U,Wa(s,l,p,d),Xa();var P=s.memoizedState;v!==V||U!==P||Fr||n!==null&&n.dependencies!==null&&Cl(n.dependencies)?(typeof w=="function"&&($d(s,a,w,l),P=s.memoizedState),(I=Fr||vg(s,a,I,l,U,P,R)||n!==null&&n.dependencies!==null&&Cl(n.dependencies))?(M||typeof p.UNSAFE_componentWillUpdate!="function"&&typeof p.componentWillUpdate!="function"||(typeof p.componentWillUpdate=="function"&&p.componentWillUpdate(l,P,R),typeof p.UNSAFE_componentWillUpdate=="function"&&p.UNSAFE_componentWillUpdate(l,P,R)),typeof p.componentDidUpdate=="function"&&(s.flags|=4),typeof p.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof p.componentDidUpdate!="function"||v===n.memoizedProps&&U===n.memoizedState||(s.flags|=4),typeof p.getSnapshotBeforeUpdate!="function"||v===n.memoizedProps&&U===n.memoizedState||(s.flags|=1024),s.memoizedProps=l,s.memoizedState=P),p.props=l,p.state=P,p.context=R,l=I):(typeof p.componentDidUpdate!="function"||v===n.memoizedProps&&U===n.memoizedState||(s.flags|=4),typeof p.getSnapshotBeforeUpdate!="function"||v===n.memoizedProps&&U===n.memoizedState||(s.flags|=1024),l=!1)}return p=l,Yl(n,s),l=(s.flags&128)!==0,p||l?(p=s.stateNode,a=l&&typeof a.getDerivedStateFromError!="function"?null:p.render(),s.flags|=1,n!==null&&l?(s.child=Zs(s,n.child,null,d),s.child=Zs(s,null,a,d)):Ct(n,s,a,d),s.memoizedState=p.state,n=s.child):n=mr(n,s,d),n}function Lg(n,s,a,l){return qs(),s.flags|=256,Ct(n,s,a,l),s.child}var Fd={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Yd(n){return{baseLanes:n,cachePool:Em()}}function Zd(n,s,a){return n=n!==null?n.childLanes&~a:0,s&&(n|=un),n}function Mg(n,s,a){var l=s.pendingProps,d=!1,p=(s.flags&128)!==0,v;if((v=p)||(v=n!==null&&n.memoizedState===null?!1:(it.current&2)!==0),v&&(d=!0,s.flags&=-129),v=(s.flags&32)!==0,s.flags&=-33,n===null){if(Le){if(d?Jr(s):Qr(),(n=Qe)?(n=qy(n,wn),n=n!==null&&n.data!=="&"?n:null,n!==null&&(s.memoizedState={dehydrated:n,treeContext:qr!==null?{id:Vn,overflow:Gn}:null,retryLane:536870912,hydrationErrors:null},a=pm(n),a.return=s,s.child=a,Ot=s,Qe=null)):n=null,n===null)throw Gr(s);return jf(n)?s.lanes=32:s.lanes=536870912,null}var w=l.children;return l=l.fallback,d?(Qr(),d=s.mode,w=Zl({mode:"hidden",children:w},d),l=$s(l,d,a,null),w.return=s,l.return=s,w.sibling=l,s.child=w,l=s.child,l.memoizedState=Yd(a),l.childLanes=Zd(n,v,a),s.memoizedState=Fd,so(null,l)):(Jr(s),Jd(s,w))}var R=n.memoizedState;if(R!==null&&(w=R.dehydrated,w!==null)){if(p)s.flags&256?(Jr(s),s.flags&=-257,s=Qd(n,s,a)):s.memoizedState!==null?(Qr(),s.child=n.child,s.flags|=128,s=null):(Qr(),w=l.fallback,d=s.mode,l=Zl({mode:"visible",children:l.children},d),w=$s(w,d,a,null),w.flags|=2,l.return=s,w.return=s,l.sibling=w,s.child=l,Zs(s,n.child,null,a),l=s.child,l.memoizedState=Yd(a),l.childLanes=Zd(n,v,a),s.memoizedState=Fd,s=so(null,l));else if(Jr(s),jf(w)){if(v=w.nextSibling&&w.nextSibling.dataset,v)var M=v.dgst;v=M,l=Error(i(419)),l.stack="",l.digest=v,Ka({value:l,source:null,stack:null}
vendor: 10,503 bytes, line 9
9),s=Qd(n,s,a)}else if(ut||Li(n,s,a,!1),v=(a&n.childLanes)!==0,ut||v){if(v=Ye,v!==null&&(l=Ft(v,a),l!==0&&l!==R.retryLane))throw R.retryLane=l,Hs(n,l),en(v,n,l),Gd;Nf(w)||sc(),s=Qd(n,s,a)}else Nf(w)?(s.flags|=192,s.child=n.child,s=null):(n=R.treeContext,Qe=En(w.nextSibling),Ot=s,Le=!0,Vr=null,wn=!1,n!==null&&ym(s,n),s=Jd(s,l.children),s.flags|=4096);return s}return d?(Qr(),w=l.fallback,d=s.mode,R=n.child,M=R.sibling,l=cr(R,{mode:"hidden",children:l.children}),l.subtreeFlags=R.subtreeFlags&65011712,M!==null?w=cr(M,w):(w=$s(w,d,a,null),w.flags|=2),w.return=s,l.return=s,l.sibling=w,s.child=l,so(null,l),l=s.child,w=n.child.memoizedState,w===null?w=Yd(a):(d=w.cachePool,d!==null?(R=lt._currentValue,d=d.parent!==R?{parent:R,pool:R}:d):d=Em(),w={baseLanes:w.baseLanes|a,cachePool:d}),l.memoizedState=w,l.childLanes=Zd(n,v,a),s.memoizedState=Fd,so(n.child,l)):(Jr(s),a=n.child,n=a.sibling,a=cr(a,{mode:"visible",children:l.children}),a.return=s,a.sibling=null,n!==null&&(v=s.deletions,v===null?(s.deletions=[n],s.flags|=16):v.push(n)),s.child=a,s.memoizedState=null,a)}function Jd(n,s){return s=Zl({mode:"visible",children:s},n.mode),s.return=n,n.child=s}function Zl(n,s){return n=an(22,n,null,s),n.lanes=0,n}function Qd(n,s,a){return Zs(s,n.child,null,a),n=Jd(s,s.pendingProps.children),n.flags|=2,s.memoizedState=null,n}function Ug(n,s,a){n.lanes|=s;var l=n.alternate;l!==null&&(l.lanes|=s),fd(n.return,s,a)}function Xd(n,s,a,l,d,p){var v=n.memoizedState;v===null?n.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:l,tail:a,tailMode:d,treeForkCount:p}:(v.isBackwards=s,v.rendering=null,v.renderingStartTime=0,v.last=l,v.tail=a,v.tailMode=d,v.treeForkCount=p)}function zg(n,s,a){var l=s.pendingProps,d=l.revealOrder,p=l.tail;l=l.children;var v=it.current,w=(v&2)!==0;if(w?(v=v&1|2,s.flags|=128):v&=1,q(it,v),Ct(n,s,l,a),l=Le?Ga:0,!w&&n!==null&&(n.flags&128)!==0)e:for(n=s.child;n!==null;){if(n.tag===13)n.memoizedState!==null&&Ug(n,a,s);else if(n.tag===19)Ug(n,a,s);else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===s)break e;for(;n.sibling===null;){if(n.return===null||n.return===s)break e;n=n.return}n.sibling.return=n.return,n=n.sibling}switch(d){case"forwards":for(a=s.child,d=null;a!==null;)n=a.alternate,n!==null&&zl(n)===null&&(d=a),a=a.sibling;a=d,a===null?(d=s.child,s.child=null):(d=a.sibling,a.sibling=null),Xd(s,!1,d,a,p,l);break;case"backwards":case"unstable_legacy-backwards":for(a=null,d=s.child,s.child=null;d!==null;){if(n=d.alternate,n!==null&&zl(n)===null){s.child=d;break}n=d.sibling,d.sibling=a,a=d,d=n}Xd(s,!0,a,null,p,l);break;case"together":Xd(s,!1,null,null,void 0,l);break;default:s.memoizedState=null}return s.child}function mr(n,s,a){if(n!==null&&(s.dependencies=n.dependencies),es|=s.lanes,(a&s.childLanes)===0)if(n!==null){if(Li(n,s,a,!1),(a&s.childLanes)===0)return null}else return null;if(n!==null&&s.child!==n.child)throw Error(i(153));if(s.child!==null){for(n=s.child,a=cr(n,n.pendingProps),s.child=a,a.return=s;n.sibling!==null;)n=n.sibling,a=a.sibling=cr(n,n.pendingProps),a.return=s;a.sibling=null}return s.child}function Wd(n,s){return(n.lanes&s)!==0?!0:(n=n.dependencies,!!(n!==null&&Cl(n)))}function GS(n,s,a){switch(s.tag){case 3:pe(s,s.stateNode.containerInfo),Kr(s,lt,n.memoizedState.cache),qs();break;case 27:case 5:zt(s);break;case 4:pe(s,s.stateNode.containerInfo);break;case 10:Kr(s,s.type,s.memoizedProps.value);break;case 31:if(s.memoizedState!==null)return s.flags|=128,Td(s),null;break;case 13:var l=s.memoizedState;if(l!==null)return l.dehydrated!==null?(Jr(s),s.flags|=128,null):(a&s.child.childLanes)!==0?Mg(n,s,a):(Jr(s),n=mr(n,s,a),n!==null?n.sibling:null);Jr(s);break;case 19:var d=(n.flags&128)!==0;if(l=(a&s.childLanes)!==0,l||(Li(n,s,a,!1),l=(a&s.childLanes)!==0),d){if(l)return zg(n,s,a);s.flags|=128}if(d=s.memoizedState,d!==null&&(d.rendering=null,d.tail=null,d.lastEffect=null),q(it,it.current),l)break;return null;case 22:return s.lanes=0,Cg(n,s,a,s.pendingProps);case 24:Kr(s,lt,n.memoizedState.cache)}return mr(n,s,a)}function Pg(n,s,a){if(n!==null)if(n.memoizedProps!==s.pendingProps)ut=!0;else{if(!Wd(n,a)&&(s.flags&128)===0)return ut=!1,GS(n,s,a);ut=(n.flags&131072)!==0}else ut=!1,Le&&(s.flags&1048576)!==0&&gm(s,Ga,s.index);switch(s.lanes=0,s.tag){case 16:e:{var l=s.pendingProps;if(n=Fs(s.elementType),s.type=n,typeof n=="function")sd(n)?(l=Qs(n,l),s.tag=1,s=Dg(null,s,n,l,a)):(s.tag=0,s=Kd(null,s,n,l,a));else{if(n!=null){var d=n.$$typeof;if(d===B){s.tag=11,s=Rg(null,s,n,l,a);break e}else if(d===D){s.tag=14,s=Og(null,s,n,l,a);break e}}throw s=ve(n)||n,Error(i(306,s,""))}}return s;case 0:return Kd(n,s,s.type,s.pendingProps,a);case 1:return l=s.type,d=Qs(l,s.pendingProps),Dg(n,s,l,d,a);case 3:e:{if(pe(s,s.stateNode.containerInfo),n===null)throw Error(i(387));l=s.pendingProps;var p=s.memoizedState;d=p.element,bd(n,s),Wa(s,l,null,a);var v=s.memoizedState;if(l=v.cache,Kr(s,lt,l),l!==p.cache&&hd(s,[lt],a,!0),Xa(),l=v.element,p.isDehydrated)if(p={element:l,isDehydrated:!1,cache:v.cache},s.updateQueue.baseState=p,s.memoizedState=p,s.flags&256){s=Lg(n,s,l,a);break e}else if(l!==d){d=vn(Error(i(424)),s),Ka(d),s=Lg(n,s,l,a);break e}else for(n=s.stateNode.containerInfo,n.nodeType===9?n=n.body:n=n.nodeName==="HTML"?n.ownerDocument.body:n,Qe=En(n.firstChild),Ot=s,Le=!0,Vr=null,wn=!0,a=Cm(s,null,l,a),s.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling;else{if(qs(),l===d){s=mr(n,s,a);break e}Ct(n,s,l,a)}s=s.child}return s;case 26:return Yl(n,s),n===null?(a=Zy(s.type,null,s.pendingProps,null))?s.memoizedState=a:Le||(a=s.type,n=s.pendingProps,l=dc(ge.current).createElement(a),l[Rt]=s,l[Yt]=n,xt(l,a,n),bt(l),s.stateNode=l):s.memoizedState=Zy(s.type,n.memoizedProps,s.pendingProps,n.memoizedState),null;case 27:return zt(s),n===null&&Le&&(l=s.stateNode=Ky(s.type,s.pendingProps,ge.current),Ot=s,wn=!0,d=Qe,is(s.type)?(Df=d,Qe=En(l.firstChild)):Qe=d),Ct(n,s,s.pendingProps.children,a),Yl(n,s),n===null&&(s.flags|=4194304),s.child;case 5:return n===null&&Le&&((d=l=Qe)&&(l=wE(l,s.type,s.pendingProps,wn),l!==null?(s.stateNode=l,Ot=s,Qe=En(l.firstChild),wn=!1,d=!0):d=!1),d||Gr(s)),zt(s),d=s.type,p=s.pendingProps,v=n!==null?n.memoizedProps:null,l=p.children,kf(d,p)?l=null:v!==null&&kf(d,v)&&(s.flags|=32),s.memoizedState!==null&&(d=Rd(n,s,US,null,null,a),_o._currentValue=d),Yl(n,s),Ct(n,s,l,a),s.child;case 6:return n===null&&Le&&((n=a=Qe)&&(a=SE(a,s.pendingProps,wn),a!==null?(s.stateNode=a,Ot=s,Qe=null,n=!0):n=!1),n||Gr(s)),null;case 13:return Mg(n,s,a);case 4:return pe(s,s.stateNode.containerInfo),l=s.pendingProps,n===null?s.child=Zs(s,null,l,a):Ct(n,s,l,a),s.child;case 11:return Rg(n,s,s.type,s.pendingProps,a);case 7:return Ct(n,s,s.pendingProps,a),s.child;case 8:return Ct(n,s,s.pendingProps.children,a),s.child;case 12:return Ct(n,s,s.pendingProps.children,a),s.child;case 10:return l=s.pendingProps,Kr(s,s.type,l.value),Ct(n,s,l.children,a),s.child;case 9:return d=s.type._context,l=s.pendingProps.children,Gs(s),d=kt(d),l=l(d),s.flags|=1,Ct(n,s,l,a),s.child;case 14:return Og(n,s,s.type,s.pendingProps,a);case 15:return kg(n,s,s.type,s.pendingProps,a);case 19:return zg(n,s,a);case 31:return VS(n,s,a);case 22:return Cg(n,s,a,s.pendingProps);case 24:return Gs(s),l=kt(lt),n===null?(d=gd(),d===null&&(d=Ye,p=pd(),d.pooledCache=p,p.refCount++,p!==null&&(d.pooledCacheLanes|=a),d=p),s.memoizedState={parent:l,cache:d},vd(s),Kr(s,lt,d)):((n.lanes&a)!==0&&(bd(n,s),Wa(s,null,null,a),Xa()),d=n.memoizedState,p=s.memoizedState,d.parent!==l?(d={parent:l,cache:l},s.memoizedState=d,s.lanes===0&&(s.memoizedState=s.updateQueue.baseState=d),Kr(s,lt,l)):(l=p.cache,Kr(s,lt,l),l!==d.cache&&hd(s,[lt],a,!0))),Ct(n,s,s.pendingProps.children,a),s.child;case 29:throw s.pendingProps}throw Error(i(156,s.tag))}function gr(n){n.flags|=4}function ef(n,s,a,l,d){if((s=(n.mode&32)!==0)&&(s=!1),s){if(n.flags|=16777216,(d&335544128)===d)if(n.stateNode.complete)n.flags|=8192;else if(dy())n.flags|=8192;else throw Ys=Dl,yd}else n.flags&=-16777217}function Bg(n,s){if(s.type!=="stylesheet"||(s.state.loading&4)!==0)n.flags&=-16777217;else if(n.flags|=16777216,!ev(s))if(dy())n.flags|=8192;else throw Ys=Dl,yd}function Jl(n,s){s!==null&&(n.flags|=4),n.flags&16384&&(s=n.tag!==22?Dt():536870912,n.lanes|=s,Ki|=s)}function io(n,s){if(!Le)switch(n.tailMode){case"hidden":s=n.tail;for(var a=null;s!==null;)s.alternate!==null&&(a=s),s=s.sibling;a===null?n.tail=null:a.sibling=null;break;case"collapsed":a=n.tail;for(var l=null;a!==null;)a.alternate!==null&&(l=a),a=a.sibling;l===null?s||n.tail===null?n.tail=null:n.tail.sibling=null:l.sibling=null}}function Xe(n){var s=n.alternate!==null&&n.alternate.child===n.child,a=0,l=0;if(s)for(var d=n.child;d!==null;)a|=d.lanes|d.childLanes,l|=d.subtreeFlags&65011712,l|=d.flags&65011712,d.return=n,d=d.sibling;else for(d=n.child;d!==null;)a|=d.lanes|d.childLanes,l|=d.subtreeFlags,l|=d.flags,d.return=n,d=d.sibling;return n.subtreeFlags|=l,n.childLanes=a,s}function KS(n,s,a){var l=s.pendingProps;switch(ld(s),s.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Xe(s),null;case 1:return Xe(s),null;case 3:return a=s.stateNode,l=null,n!==null&&(l=n.memoizedState.cache),s.memoizedState.cache!==l&&(s.flags|=2048),fr(lt),Me(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(n===null||n.child===null)&&(Di(s)?gr(s):n===null||n.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,ud())),Xe(s),null;case 26:var d=s.type,p=s.memoizedState;return n===null?(gr(s),p!==null?(Xe(s),Bg(s,p)):(Xe(s),ef(s,d,null,l,a))):p?p!==n.memoizedState?(gr(s),Xe(s),Bg(s,p)):(Xe(s),s.flags&=-16777217):(n=n.memoizedProps,n!==l&&gr(s),Xe(s),ef(s,d,n,l,a)),null;case 27:if(pn(s),a=ge.current,d=s.type,n!==null&&s.stateNode!=null)n.memoizedProps!==l&&gr(s);else{if(!l){if(s.stateNode===null)throw Error(i(166));return Xe(s),null}n=Q.current,Di(s)?vm(s):(n=Ky(d,l,a),s.stateNode=n,gr(s))}return Xe(s),null;case 5:if(pn(s),d=s.type,n!==null&&s.stateNode!=null)n.memoizedProps!==l&&gr(s);else{if(!l){if(s.stateNode===null)throw Error(i(166));return Xe(s),null}if(p=Q.current,Di(s))vm(s);else{var v=dc(ge.current);switch(p){case 1:p=v.createElementNS("http://www.w3.org/2000/svg",d);break;case 2:p=v.createElementNS("http://www.w3.org/1998/Math/MathML",d);break;default:switch(d){case"svg":p=v.createElementNS("http://www.w3.org/2000/svg",d);break;case"math":p=v.createElementNS("http://www.w3.org/1998/Math/MathML",d);break;case"script":p=v.createElement("div"),p.innerHTML="<script><\/script>",p=p.removeChild(p.firstChild);break;
vendor: 24,756 bytes, line 9
9case"select":p=typeof l.is=="string"?v.createElement("select",{is:l.is}):v.createElement("select"),l.multiple?p.multiple=!0:l.size&&(p.size=l.size);break;default:p=typeof l.is=="string"?v.createElement(d,{is:l.is}):v.createElement(d)}}p[Rt]=s,p[Yt]=l;e:for(v=s.child;v!==null;){if(v.tag===5||v.tag===6)p.appendChild(v.stateNode);else if(v.tag!==4&&v.tag!==27&&v.child!==null){v.child.return=v,v=v.child;continue}if(v===s)break e;for(;v.sibling===null;){if(v.return===null||v.return===s)break e;v=v.return}v.sibling.return=v.return,v=v.sibling}s.stateNode=p;e:switch(xt(p,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(s)}}return Xe(s),ef(s,s.type,n===null?null:n.memoizedProps,s.pendingProps,a),null;case 6:if(n&&s.stateNode!=null)n.memoizedProps!==l&&gr(s);else{if(typeof l!="string"&&s.stateNode===null)throw Error(i(166));if(n=ge.current,Di(s)){if(n=s.stateNode,a=s.memoizedProps,l=null,d=Ot,d!==null)switch(d.tag){case 27:case 5:l=d.memoizedProps}n[Rt]=s,n=!!(n.nodeValue===a||l!==null&&l.suppressHydrationWarning===!0||My(n.nodeValue,a)),n||Gr(s,!0)}else n=dc(n).createTextNode(l),n[Rt]=s,s.stateNode=n}return Xe(s),null;case 31:if(a=s.memoizedState,n===null||n.memoizedState!==null){if(l=Di(s),a!==null){if(n===null){if(!l)throw Error(i(318));if(n=s.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(i(557));n[Rt]=s}else qs(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;Xe(s),n=!1}else a=ud(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=a),n=!0;if(!n)return s.flags&256?(ln(s),s):(ln(s),null);if((s.flags&128)!==0)throw Error(i(558))}return Xe(s),null;case 13:if(l=s.memoizedState,n===null||n.memoizedState!==null&&n.memoizedState.dehydrated!==null){if(d=Di(s),l!==null&&l.dehydrated!==null){if(n===null){if(!d)throw Error(i(318));if(d=s.memoizedState,d=d!==null?d.dehydrated:null,!d)throw Error(i(317));d[Rt]=s}else qs(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;Xe(s),d=!1}else d=ud(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=d),d=!0;if(!d)return s.flags&256?(ln(s),s):(ln(s),null)}return ln(s),(s.flags&128)!==0?(s.lanes=a,s):(a=l!==null,n=n!==null&&n.memoizedState!==null,a&&(l=s.child,d=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(d=l.alternate.memoizedState.cachePool.pool),p=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(p=l.memoizedState.cachePool.pool),p!==d&&(l.flags|=2048)),a!==n&&a&&(s.child.flags|=8192),Jl(s,s.updateQueue),Xe(s),null);case 4:return Me(),n===null&&Ef(s.stateNode.containerInfo),Xe(s),null;case 10:return fr(s.type),Xe(s),null;case 19:if(H(it),l=s.memoizedState,l===null)return Xe(s),null;if(d=(s.flags&128)!==0,p=l.rendering,p===null)if(d)io(l,!1);else{if(rt!==0||n!==null&&(n.flags&128)!==0)for(n=s.child;n!==null;){if(p=zl(n),p!==null){for(s.flags|=128,io(l,!1),n=p.updateQueue,s.updateQueue=n,Jl(s,n),s.subtreeFlags=0,n=a,a=s.child;a!==null;)hm(a,n),a=a.sibling;return q(it,it.current&1|2),Le&&ur(s,l.treeForkCount),s.child}n=n.sibling}l.tail!==null&&Bt()>tc&&(s.flags|=128,d=!0,io(l,!1),s.lanes=4194304)}else{if(!d)if(n=zl(p),n!==null){if(s.flags|=128,d=!0,n=n.updateQueue,s.updateQueue=n,Jl(s,n),io(l,!0),l.tail===null&&l.tailMode==="hidden"&&!p.alternate&&!Le)return Xe(s),null}else 2*Bt()-l.renderingStartTime>tc&&a!==536870912&&(s.flags|=128,d=!0,io(l,!1),s.lanes=4194304);l.isBackwards?(p.sibling=s.child,s.child=p):(n=l.last,n!==null?n.sibling=p:s.child=p,l.last=p)}return l.tail!==null?(n=l.tail,l.rendering=n,l.tail=n.sibling,l.renderingStartTime=Bt(),n.sibling=null,a=it.current,q(it,d?a&1|2:a&1),Le&&ur(s,l.treeForkCount),n):(Xe(s),null);case 22:case 23:return ln(s),Ed(),l=s.memoizedState!==null,n!==null?n.memoizedState!==null!==l&&(s.flags|=8192):l&&(s.flags|=8192),l?(a&536870912)!==0&&(s.flags&128)===0&&(Xe(s),s.subtreeFlags&6&&(s.flags|=8192)):Xe(s),a=s.updateQueue,a!==null&&Jl(s,a.retryQueue),a=null,n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(a=n.memoizedState.cachePool.pool),l=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(l=s.memoizedState.cachePool.pool),l!==a&&(s.flags|=2048),n!==null&&H(Ks),null;case 24:return a=null,n!==null&&(a=n.memoizedState.cache),s.memoizedState.cache!==a&&(s.flags|=2048),fr(lt),Xe(s),null;case 25:return null;case 30:return null}throw Error(i(156,s.tag))}function FS(n,s){switch(ld(s),s.tag){case 1:return n=s.flags,n&65536?(s.flags=n&-65537|128,s):null;case 3:return fr(lt),Me(),n=s.flags,(n&65536)!==0&&(n&128)===0?(s.flags=n&-65537|128,s):null;case 26:case 27:case 5:return pn(s),null;case 31:if(s.memoizedState!==null){if(ln(s),s.alternate===null)throw Error(i(340));qs()}return n=s.flags,n&65536?(s.flags=n&-65537|128,s):null;case 13:if(ln(s),n=s.memoizedState,n!==null&&n.dehydrated!==null){if(s.alternate===null)throw Error(i(340));qs()}return n=s.flags,n&65536?(s.flags=n&-65537|128,s):null;case 19:return H(it),null;case 4:return Me(),null;case 10:return fr(s.type),null;case 22:case 23:return ln(s),Ed(),n!==null&&H(Ks),n=s.flags,n&65536?(s.flags=n&-65537|128,s):null;case 24:return fr(lt),null;case 25:return null;default:return null}}function Ig(n,s){switch(ld(s),s.tag){case 3:fr(lt),Me();break;case 26:case 27:case 5:pn(s);break;case 4:Me();break;case 31:s.memoizedState!==null&&ln(s);break;case 13:ln(s);break;case 19:H(it);break;case 10:fr(s.type);break;case 22:case 23:ln(s),Ed(),n!==null&&H(Ks);break;case 24:fr(lt)}}function ao(n,s){try{var a=s.updateQueue,l=a!==null?a.lastEffect:null;if(l!==null){var d=l.next;a=d;do{if((a.tag&n)===n){l=void 0;var p=a.create,v=a.inst;l=p(),v.destroy=l}a=a.next}while(a!==d)}}catch(w){qe(s,s.return,w)}}function Xr(n,s,a){try{var l=s.updateQueue,d=l!==null?l.lastEffect:null;if(d!==null){var p=d.next;l=p;do{if((l.tag&n)===n){var v=l.inst,w=v.destroy;if(w!==void 0){v.destroy=void 0,d=s;var R=a,M=w;try{M()}catch(I){qe(d,R,I)}}}l=l.next}while(l!==p)}}catch(I){qe(s,s.return,I)}}function Hg(n){var s=n.updateQueue;if(s!==null){var a=n.stateNode;try{Nm(s,a)}catch(l){qe(n,n.return,l)}}}function $g(n,s,a){a.props=Qs(n.type,n.memoizedProps),a.state=n.memoizedState;try{a.componentWillUnmount()}catch(l){qe(n,s,l)}}function oo(n,s){try{var a=n.ref;if(a!==null){switch(n.tag){case 26:case 27:case 5:var l=n.stateNode;break;case 30:l=n.stateNode;break;default:l=n.stateNode}typeof a=="function"?n.refCleanup=a(l):a.current=l}}catch(d){qe(n,s,d)}}function Kn(n,s){var a=n.ref,l=n.refCleanup;if(a!==null)if(typeof l=="function")try{l()}catch(d){qe(n,s,d)}finally{n.refCleanup=null,n=n.alternate,n!=null&&(n.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(d){qe(n,s,d)}else a.current=null}function qg(n){var s=n.type,a=n.memoizedProps,l=n.stateNode;try{e:switch(s){case"button":case"input":case"select":case"textarea":a.autoFocus&&l.focus();break e;case"img":a.src?l.src=a.src:a.srcSet&&(l.srcset=a.srcSet)}}catch(d){qe(n,n.return,d)}}function tf(n,s,a){try{var l=n.stateNode;mE(l,n.type,a,s),l[Yt]=s}catch(d){qe(n,n.return,d)}}function Vg(n){return n.tag===5||n.tag===3||n.tag===26||n.tag===27&&is(n.type)||n.tag===4}function nf(n){e:for(;;){for(;n.sibling===null;){if(n.return===null||Vg(n.return))return null;n=n.return}for(n.sibling.return=n.return,n=n.sibling;n.tag!==5&&n.tag!==6&&n.tag!==18;){if(n.tag===27&&is(n.type)||n.flags&2||n.child===null||n.tag===4)continue e;n.child.return=n,n=n.child}if(!(n.flags&2))return n.stateNode}}function rf(n,s,a){var l=n.tag;if(l===5||l===6)n=n.stateNode,s?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(n,s):(s=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,s.appendChild(n),a=a._reactRootContainer,a!=null||s.onclick!==null||(s.onclick=or));else if(l!==4&&(l===27&&is(n.type)&&(a=n.stateNode,s=null),n=n.child,n!==null))for(rf(n,s,a),n=n.sibling;n!==null;)rf(n,s,a),n=n.sibling}function Ql(n,s,a){var l=n.tag;if(l===5||l===6)n=n.stateNode,s?a.insertBefore(n,s):a.appendChild(n);else if(l!==4&&(l===27&&is(n.type)&&(a=n.stateNode),n=n.child,n!==null))for(Ql(n,s,a),n=n.sibling;n!==null;)Ql(n,s,a),n=n.sibling}function Gg(n){var s=n.stateNode,a=n.memoizedProps;try{for(var l=n.type,d=s.attributes;d.length;)s.removeAttributeNode(d[0]);xt(s,l,a),s[Rt]=n,s[Yt]=a}catch(p){qe(n,n.return,p)}}var yr=!1,dt=!1,sf=!1,Kg=typeof WeakSet=="function"?WeakSet:Set,_t=null;function YS(n,s){if(n=n.containerInfo,Rf=vc,n=sm(n),Qu(n)){if("selectionStart"in n)var a={start:n.selectionStart,end:n.selectionEnd};else e:{a=(a=n.ownerDocument)&&a.defaultView||window;var l=a.getSelection&&a.getSelection();if(l&&l.rangeCount!==0){a=l.anchorNode;var d=l.anchorOffset,p=l.focusNode;l=l.focusOffset;try{a.nodeType,p.nodeType}catch{a=null;break e}var v=0,w=-1,R=-1,M=0,I=0,V=n,U=null;t:for(;;){for(var P;V!==a||d!==0&&V.nodeType!==3||(w=v+d),V!==p||l!==0&&V.nodeType!==3||(R=v+l),V.nodeType===3&&(v+=V.nodeValue.length),(P=V.firstChild)!==null;)U=V,V=P;for(;;){if(V===n)break t;if(U===a&&++M===d&&(w=v),U===p&&++I===l&&(R=v),(P=V.nextSibling)!==null)break;V=U,U=V.parentNode}V=P}a=w===-1||R===-1?null:{start:w,end:R}}else a=null}a=a||{start:0,end:0}}else a=null;for(Of={focusedElem:n,selectionRange:a},vc=!1,_t=s;_t!==null;)if(s=_t,n=s.child,(s.subtreeFlags&1028)!==0&&n!==null)n.return=s,_t=n;else for(;_t!==null;){switch(s=_t,p=s.alternate,n=s.flags,s.tag){case 0:if((n&4)!==0&&(n=s.updateQueue,n=n!==null?n.events:null,n!==null))for(a=0;a<n.length;a++)d=n[a],d.ref.impl=d.nextImpl;break;case 11:case 15:break;case 1:if((n&1024)!==0&&p!==null){n=void 0,a=s,d=p.memoizedProps,p=p.memoizedState,l=a.stateNode;try{var ie=Qs(a.type,d);n=l.getSnapshotBeforeUpdate(ie,p),l.__reactInternalSnapshotBeforeUpdate=n}catch(be){qe(a,a.return,be)}}break;case 3:if((n&1024)!==0){if(n=s.stateNode.containerInfo,a=n.nodeType,a===9)xf(n);else if(a===1)switch(n.nodeName){case"HEAD":case"HTML":case"BODY":xf(n);break;default:n.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((n&1024)!==0)throw Error(i(163))}if(n=s.sibling,n!==null){n.return=s.return,_t=n;break}_t=s.return}}function Fg(n,s,a){var l=a.flags;switch(a.tag){case 0:case 11:case 15:br(n,a),l&4&&ao(5,a);break;case 1:if(br(n,a),l&4)if(n=a.stateNode,s===null)try{n.componentDidMount()}catch(v){qe(a,a.return,v)}else{var d=Qs(a.type,s.memoizedProps);s=s.memoizedState;try{n.componentDidUpdate(d,s,n.__reactInternalSnapshotBeforeUpdate)}catch(v){qe(a,a.return,v)}}l&64&&Hg(a),l&512&&oo(a,a.return);break;case 3:if(br(n,a),l&64&&(n=a.updateQueue,n!==null)){if(s=null,a.child!==null)switch(a.child.tag){case 27:case 5:s=a.child.stateNode;break;case 1:s=a.child.stateNode}try{Nm(n,s)}catch(v){qe(a,a.return,v)}}break;case 27:s===null&&l&4&&Gg(a);case 26:case 5:br(n,a),s===null&&l&4&&qg(a),l&512&&oo(a,a.return);break;case 12:br(n,a);break;case 31:br(n,a),l&4&&Jg(n,a);break;case 13:br(n,a),l&4&&Qg(n,a),l&64&&(n=a.memoizedState,n!==null&&(n=n.dehydrated,n!==null&&(a=rE.bind(null,a),EE(n,a))));break;case 22:if(l=a.memoizedState!==null||yr,!l){s=s!==null&&s.memoizedState!==null||dt,d=yr;var p=dt;yr=l,(dt=s)&&!p?_r(n,a,(a.subtreeFlags&8772)!==0):br(n,a),yr=d,dt=p}break;case 30:break;default:br(n,a)}}function Yg(n){var s=n.alternate;s!==null&&(n.alternate=null,Yg(s)),n.child=null,n.deletions=null,n.sibling=null,n.tag===5&&(s=n.stateNode,s!==null&&Lu(s)),n.stateNode=null,n.return=null,n.dependencies=null,n.memoizedProps=null,n.memoizedState=null,n.pendingProps=null,n.stateNode=null,n.updateQueue=null}var et=null,Jt=!1;function vr(n,s,a){for(a=a.child;a!==null;)Zg(n,s,a),a=a.sibling}function Zg(n,s,a){if(It&&typeof It.onCommitFiberUnmount=="function")try{It.onCommitFiberUnmount(Ls,a)}catch{}switch(a.tag){case 26:dt||Kn(a,s),vr(n,s,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:dt||Kn(a,s);var l=et,d=Jt;is(a.type)&&(et=a.stateNode,Jt=!1),vr(n,s,a),yo(a.stateNode),et=l,Jt=d;break;case 5:dt||Kn(a,s);case 6:if(l=et,d=Jt,et=null,vr(n,s,a),et=l,Jt=d,et!==null)if(Jt)try{(et.nodeType===9?et.body:et.nodeName==="HTML"?et.ownerDocument.body:et).removeChild(a.stateNode)}catch(p){qe(a,s,p)}else try{et.removeChild(a.stateNode)}catch(p){qe(a,s,p)}break;case 18:et!==null&&(Jt?(n=et,Hy(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,a.stateNode),ea(n)):Hy(et,a.stateNode));break;case 4:l=et,d=Jt,et=a.stateNode.containerInfo,Jt=!0,vr(n,s,a),et=l,Jt=d;break;case 0:case 11:case 14:case 15:Xr(2,a,s),dt||Xr(4,a,s),vr(n,s,a);break;case 1:dt||(Kn(a,s),l=a.stateNode,typeof l.componentWillUnmount=="function"&&$g(a,s,l)),vr(n,s,a);break;case 21:vr(n,s,a);break;case 22:dt=(l=dt)||a.memoizedState!==null,vr(n,s,a),dt=l;break;default:vr(n,s,a)}}function Jg(n,s){if(s.memoizedState===null&&(n=s.alternate,n!==null&&(n=n.memoizedState,n!==null))){n=n.dehydrated;try{ea(n)}catch(a){qe(s,s.return,a)}}}function Qg(n,s){if(s.memoizedState===null&&(n=s.alternate,n!==null&&(n=n.memoizedState,n!==null&&(n=n.dehydrated,n!==null))))try{ea(n)}catch(a){qe(s,s.return,a)}}function ZS(n){switch(n.tag){case 31:case 13:case 19:var s=n.stateNode;return s===null&&(s=n.stateNode=new Kg),s;case 22:return n=n.stateNode,s=n._retryCache,s===null&&(s=n._retryCache=new Kg),s;default:throw Error(i(435,n.tag))}}function Xl(n,s){var a=ZS(n);s.forEach(function(l){if(!a.has(l)){a.add(l);var d=sE.bind(null,n,l);l.then(d,d)}})}function Qt(n,s){var a=s.deletions;if(a!==null)for(var l=0;l<a.length;l++){var d=a[l],p=n,v=s,w=v;e:for(;w!==null;){switch(w.tag){case 27:if(is(w.type)){et=w.stateNode,Jt=!1;break e}break;case 5:et=w.stateNode,Jt=!1;break e;case 3:case 4:et=w.stateNode.containerInfo,Jt=!0;break e}w=w.return}if(et===null)throw Error(i(160));Zg(p,v,d),et=null,Jt=!1,p=d.alternate,p!==null&&(p.return=null),d.return=null}if(s.subtreeFlags&13886)for(s=s.child;s!==null;)Xg(s,n),s=s.sibling}var Nn=null;function Xg(n,s){var a=n.alternate,l=n.flags;switch(n.tag){case 0:case 11:case 14:case 15:Qt(s,n),Xt(n),l&4&&(Xr(3,n,n.return),ao(3,n),Xr(5,n,n.return));break;case 1:Qt(s,n),Xt(n),l&512&&(dt||a===null||Kn(a,a.return)),l&64&&yr&&(n=n.updateQueue,n!==null&&(l=n.callbacks,l!==null&&(a=n.shared.hiddenCallbacks,n.shared.hiddenCallbacks=a===null?l:a.concat(l))));break;case 26:var d=Nn;if(Qt(s,n),Xt(n),l&512&&(dt||a===null||Kn(a,a.return)),l&4){var p=a!==null?a.memoizedState:null;if(l=n.memoizedState,a===null)if(l===null)if(n.stateNode===null){e:{l=n.type,a=n.memoizedProps,d=d.ownerDocument||d;t:switch(l){case"title":p=d.getElementsByTagName("title")[0],(!p||p[La]||p[Rt]||p.namespaceURI==="http://www.w3.org/2000/svg"||p.hasAttribute("itemprop"))&&(p=d.createElement(l),d.head.insertBefore(p,d.querySelector("head > title"))),xt(p,l,a),p[Rt]=n,bt(p),l=p;break e;case"link":var v=Xy("link","href",d).get(l+(a.href||""));if(v){for(var w=0;w<v.length;w++)if(p=v[w],p.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&p.getAttribute("rel")===(a.rel==null?null:a.rel)&&p.getAttribute("title")===(a.title==null?null:a.title)&&p.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){v.splice(w,1);break t}}p=d.createElement(l),xt(p,l,a),d.head.appendChild(p);break;case"meta":if(v=Xy("meta","content",d).get(l+(a.content||""))){for(w=0;w<v.length;w++)if(p=v[w],p.getAttribute("content")===(a.content==null?null:""+a.content)&&p.getAttribute("name")===(a.name==null?null:a.name)&&p.getAttribute("property")===(a.property==null?null:a.property)&&p.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&p.getAttribute("charset")===(a.charSet==null?null:a.charSet)){v.splice(w,1);break t}}p=d.createElement(l),xt(p,l,a),d.head.appendChild(p);break;default:throw Error(i(468,l))}p[Rt]=n,bt(p),l=p}n.stateNode=l}else Wy(d,n.type,n.stateNode);else n.stateNode=Qy(d,l,n.memoizedProps);else p!==l?(p===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):p.count--,l===null?Wy(d,n.type,n.stateNode):Qy(d,l,n.memoizedProps)):l===null&&n.stateNode!==null&&tf(n,n.memoizedProps,a.memoizedProps)}break;case 27:Qt(s,n),Xt(n),l&512&&(dt||a===null||Kn(a,a.return)),a!==null&&l&4&&tf(n,n.memoizedProps,a.memoizedProps);break;case 5:if(Qt(s,n),Xt(n),l&512&&(dt||a===null||Kn(a,a.return)),n.flags&32){d=n.stateNode;try{Ei(d,"")}catch(ie){qe(n,n.return,ie)}}l&4&&n.stateNode!=null&&(d=n.memoizedProps,tf(n,d,a!==null?a.memoizedProps:d)),l&1024&&(sf=!0);break;case 6:if(Qt(s,n),Xt(n),l&4){if(n.stateNode===null)throw Error(i(162));l=n.memoizedProps,a=n.stateNode;try{a.nodeValue=l}catch(ie){qe(n,n.return,ie)}}break;case 3:if(pc=null,d=Nn,Nn=fc(s.containerInfo),Qt(s,n),Nn=d,Xt(n),l&4&&a!==null&&a.memoizedState.isDehydrated)try{ea(s.containerInfo)}catch(ie){qe(n,n.return,ie)}sf&&(sf=!1,Wg(n));break;case 4:l=Nn,Nn=fc(n.stateNode.containerInfo),Qt(s,n),Xt(n),Nn=l;break;case 12:Qt(s,n),Xt(n);break;case 31:Qt(s,n),Xt(n),l&4&&(l=n.updateQueue,l!==null&&(n.updateQueue=null,Xl(n,l)));break;case 13:Qt(s,n),Xt(n),n.child.flags&8192&&n.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(ec=Bt()),l&4&&(l=n.updateQueue,l!==null&&(n.updateQueue=null,Xl(n,l)));break;case 22:d=n.memoizedState!==null;var R=a!==null&&a.memoizedState!==null,M=yr,I=dt;if(yr=M||d,dt=I||R,Qt(s,n),dt=I,yr=M,Xt(n),l&8192)e:for(s=n.stateNode,s._visibility=d?s._visibility&-2:s._visibility|1,d&&(a===null||R||yr||dt||Xs(n)),a=null,s=n;;){if(s.tag===5||s.tag===26){if(a===null){R=a=s;try{if(p=R.stateNode,d)v=p.style,typeof v.setProperty=="function"?v.setProperty("display","none","important"):v.display="none";else{w=R.stateNode;var V=R.memoizedProps.style,U=V!=null&&V.hasOwnProperty("display")?V.display:null;w.style.display=U==null||typeof U=="boolean"?"":(""+U).trim()}}catch(ie){qe(R,R.return,ie)}}}else if(s.tag===6){if(a===null){R=s;try{R.stateNode.nodeValue=d?"":R.memoizedProps}catch(ie){qe(R,R.return,ie)}}}else if(s.tag===18){if(a===null){R=s;try{var P=R.stateNode;d?$y(P,!0):$y(R.stateNode,!1)}catch(ie){qe(R,R.return,ie)}}}else if((s.tag!==22&&s.tag!==23||s.memoizedState===null||s===n)&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===n)break e;for(;s.sibling===null;){if(s.return===null||s.return===n)break e;a===s&&(a=null),s=s.return}a===s&&(a=null),s.sibling.return=s.return,s=s.sibling}l&4&&(l=n.updateQueue,l!==null&&(a=l.retryQueue,a!==null&&(l.retryQueue=null,Xl(n,a))));break;case 19:Qt(s,n),Xt(n),l&4&&(l=n.updateQueue,l!==null&&(n.updateQueue=null,Xl(n,l)));break;case 30:break;case 21:break;default:Qt(s,n),Xt(n)}}function Xt(n){var s=n.flags;if(s&2){try{for(var a,l=n.return;l!==null;){if(Vg(l)){a=l;break}l=l.return}if(a==null)throw Error(i(160));switch(a.tag){case 27:var d=a.stateNode,p=nf(n);Ql(n,p,d);break;case 5:var v=a.stateNode;a.flags&32&&(Ei(v,""),a.flags&=-33);var w=nf(n);Ql(n,w,v);break;case 3:case 4:var R=a.stateNode.containerInfo,M=nf(n);rf(n,M,R);break;default:throw Error(i(161))}}catch(I){qe(n,n.return,I)}n.flags&=-3}s&4096&&(n.flags&=-4097)}function Wg(n){if(n.subtreeFlags&1024)for(n=n.child;n!==null;){var s=n;Wg(s),s.tag===5&&s.flags&1024&&s.stateNode.reset(),n=n.sibling}}function br(n,s){if(s.subtreeFlags&8772)for(s=s.child;s!==null;)Fg(n,s.alternate,s),s=s.sibling}function Xs(n){for(n=n.child;n!==null;){var s=n;switch(s.tag){case 0:case 11:case 14:case 15:Xr(4,s,s.return),Xs(s);break;case 1:Kn(s,s.return);var a=s.stateNode;typeof a.componentWillUnmount=="function"&&$g(s,s.return,a),Xs(s);break;case 27:yo(s.stateNode);case 26:case 5:Kn(s,s.return),Xs(s);break;case 22:s.memoizedState===null&&Xs(s);break;case 30:Xs(s);break;default:Xs(s)}n=n.sibling}}function _r(n,s,a){for(a=a&&(s.subtreeFlags&8772)!==0,s=s.child;s!==null;){var l=s.alternate,d=n,p=s,v=p.flags;switch(p.tag){case 0:case 11:case 15:_r(d,p,a),ao(4,p);break;case 1:if(_r(d,p,a),l=p,d=l.stateNode,typeof d.componentDidMount=="function")try{d.componentDidMount()}catch(M){qe(l,l.return,M)}if(l=p,d=l.updateQueue,d!==null){var w=l.stateNode;try{var R=d.shared.hiddenCallbacks;if(R!==null)for(d.shared.hiddenCallbacks=null,d=0;d<R.length;d++)xm(R[d],w)}catch(M){qe(l,l.return,M)}}a&&v&64&&Hg(p),oo(p,p.return);break;case 27:Gg(p);case 26:case 5:_r(d,p,a),a&&l===null&&v&4&&qg(p),oo(p,p.return);break;case 12:_r(d,p,a);break;case 31:_r(d,p,a),a&&v&4&&Jg(d,p);break;case 13:_r(d,p,a),a&&v&4&&Qg(d,p);break;case 22:p.memoizedState===null&&_r(d,p,a),oo(p,p.return);break;case 30:break;default:_r(d,p,a)}s=s.sibling}}function af(n,s){var a=null;n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(a=n.memoizedState.cachePool.pool),n=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(n=s.memoizedState.cachePool.pool),n!==a&&(n!=null&&n.refCount++,a!=null&&Fa(a))}function of(n,s){n=null,s.alternate!==null&&(n=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==n&&(s.refCount++,n!=null&&Fa(n))}function jn(n,s,a,l){if(s.subtreeFlags&10256)for(s=s.child;s!==null;)ey(n,s,a,l),s=s.sibling}function ey(n,s,a,l){var d=s.flags;switch(s.tag){case 0:case 11:case 15:jn(n,s,a,l),d&2048&&ao(9,s);break;case 1:jn(n,s,a,l);break;case 3:jn(n,s,a,l),d&2048&&(n=null,s.alternate!==null&&(n=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==n&&(s.refCount++,n!=null&&Fa(n)));break;case 12:if(d&2048){jn(n,s,a,l),n=s.stateNode;try{var p=s.memoizedProps,v=p.id,w=p.onPostCommit;typeof w=="function"&&w(v,s.alternate===null?"mount":"update",n.passiveEffectDuration,-0)}catch(R){qe(s,s.return,R)}}else jn(n,s,a,l);break;case 31:jn(n,s,a,l);break;case 13:jn(n,s,a,l);break;case 23:break;case 22:p=s.stateNode,v=s.alternate,s.memoizedState!==null?p._visibility&2?jn(n,s,a,l):lo(n,s):p._visibility&2?jn(n,s,a,l):(p._visibility|=2,qi(n,s,a,l,(s.subtreeFlags&10256)!==0||!1)),d&2048&&af(v,s);break;case 24:jn(n,s,a,l),d&2048&&of(s.alternate,s);break;default:jn(n,s,a,l)}}function qi(n,s,a,l,d){for(d=d&&((s.subtreeFlags&10256)!==0||!1),s=s.child;s!==null;){var p=n,v=s,w=a,R=l,M=v.flags;switch(v.tag){case 0:case 11:case 15:qi(p,v,w,R,d),ao(8,v);break;case 23:break;case 22:var I=v.stateNode;v.memoizedState!==null?I._visibility&2?qi(p,v,w,R,d):lo(p,v):(I._visibility|=2,qi(p,v,w,R,d)),d&&M&2048&&af(v.alternate,v);break;case 24:qi(p,v,w,R,d),d&&M&2048&&of(v.alternate,v);break;default:qi(p,v,w,R,d)}s=s.sibling}}function lo(n,s){if(s.subtreeFlags&10256)for(s=s.child;s!==null;){var a=n,l=s,d=l.flags;switch(l.tag){case 22:lo(a,l),d&2048&&af(l.alternate,l);break;case 24:lo(a,l),d&2048&&of(l.alternate,l);break;default:lo(a,l)}s=s.sibling}}var co=8192;function Vi(n,s,a){if(n.subtreeFlags&co)for(n=n.child;n!==null;)ty(n,s,a),n=n.sibling}function ty(n,s,a){switch(n.tag){case 26:Vi(n,s,a),n.flags&co&&n.memoizedState!==null&&ME(a,Nn,n.memoizedState,n.memoizedProps);break;case 5:Vi(n,s,a);break;case 3:case 4:var l=Nn;Nn=fc(n.stateNode.containerInfo),Vi(n,s,a),Nn=l;break;case 22:n.memoizedState===null&&(l=n.alternate,l!==null&&l.memoizedState!==null?(l=co,co=16777216,Vi(n,s,a),co=l):Vi(n,s,a));break;default:Vi(n,s,a)}}function ny(n){var s=n.alternate;if(s!==null&&(n=s.child,n!==null)){s.child=null;do s=n.sibling,n.sibling=null,n=s;while(n!==null)}}function uo(n){var s=n.deletions;if((n.flags&16)!==0){if(s!==null)for(var a=0;a<s.length;a++){var l=s[a];_t=l,sy(l,n)}ny(n)}if(n.subtreeFlags&10256)for(n=n.child;n!==null;)ry(n),n=n.sibling}function ry(n){switch(n.tag){case 0:case 11:case 15:uo(n),n.flags&2048&&Xr(9,n,n.return);break;case 3:uo(n);break;case 12:uo(n);break;case 22:var s=n.stateNode;n.memoizedState!==null&&s._visibility&2&&(n.return===null||n.return.tag!==13)?(s._visibility&=-3,Wl(n)):uo(n);break;default:uo(n)}}function Wl(n){var s=n.deletions;if((n.flags&16)!==0){if(s!==null)for(var a=0;a<s.length;a++){var l=s[a];_t=l,sy(l,n)}ny(n)}for(n=n.child;n!==null;){switch(s=n,s.tag){case 0:case 11:case 15:Xr(8,s,s.return),Wl(s);break;case 22:a=s.stateNode,a._visibility&2&&(a._visibility&=-3,Wl(s));break;default:Wl(s)}n=n.sibling}}function sy(n,s){for(;_t!==null;){var a=_t;switch(a.tag){case 0:case 11:case 15:Xr(8,a,s);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var l=a.memoizedState.cachePool.pool;l!=null&&l.refCount++}break;case 24:Fa(a.memoizedState.cache)}if(l=a.child,l!==null)l.return=a,_t=l;else e:for(a=n;_t!==null;){l=_t;var d=l.sibling,p=l.return;if(Yg(l),l===a){_t=null;break e}if(d!==null){d.return=p,_t=d;break e}_t=p}}}var JS={getCacheForType:function(n){var s=kt(lt),a=s.data.get(n);return a===void 0&&(a=n(),s.data.set(n,a)),a},cacheSignal:function(){return kt(lt).controller.signal}},QS=typeof WeakMap=="function"?WeakMap:Map,He=0,Ye=null,xe=null,je=0,$e=0,cn=null,Wr=!1,Gi=!1,lf=!1,wr=0,rt=0,es=0,Ws=0,cf=0,un=0,Ki=0,fo=null,Wt=null,uf=!1,ec=0,iy=0,tc=1/0,nc=null,ts=null,mt=0,ns=null,Fi=null,Sr=0,df=0,ff=null,ay=null,ho=0,hf=null;function dn(){return(He&2)!==0&&je!==0?je&-je:j.T!==null?bf():ju()}function oy(){if(un===0)if((je&536870912)===0||Le){var n=mi;
vendor: 6,266 bytes, line 9
9mi<<=1,(mi&3932160)===0&&(mi=262144),un=n}else un=536870912;return n=on.current,n!==null&&(n.flags|=32),un}function en(n,s,a){(n===Ye&&($e===2||$e===9)||n.cancelPendingCommit!==null)&&(Yi(n,0),rs(n,je,un,!1)),tt(n,a),((He&2)===0||n!==Ye)&&(n===Ye&&((He&2)===0&&(Ws|=a),rt===4&&rs(n,je,un,!1)),Fn(n))}function ly(n,s,a){if((He&6)!==0)throw Error(i(327));var l=!a&&(s&127)===0&&(s&n.expiredLanes)===0||We(n,s),d=l?eE(n,s):mf(n,s,!0),p=l;do{if(d===0){Gi&&!l&&rs(n,s,0,!1);break}else{if(a=n.current.alternate,p&&!XS(a)){d=mf(n,s,!1),p=!1;continue}if(d===2){if(p=s,n.errorRecoveryDisabledLanes&p)var v=0;else v=n.pendingLanes&-536870913,v=v!==0?v:v&536870912?536870912:0;if(v!==0){s=v;e:{var w=n;d=fo;var R=w.current.memoizedState.isDehydrated;if(R&&(Yi(w,v).flags|=256),v=mf(w,v,!1),v!==2){if(lf&&!R){w.errorRecoveryDisabledLanes|=p,Ws|=p,d=4;break e}p=Wt,Wt=d,p!==null&&(Wt===null?Wt=p:Wt.push.apply(Wt,p))}d=v}if(p=!1,d!==2)continue}}if(d===1){Yi(n,0),rs(n,s,0,!0);break}e:{switch(l=n,p=d,p){case 0:case 1:throw Error(i(345));case 4:if((s&4194048)!==s)break;case 6:rs(l,s,un,!Wr);break e;case 2:Wt=null;break;case 3:case 5:break;default:throw Error(i(329))}if((s&62914560)===s&&(d=ec+300-Bt(),10<d)){if(rs(l,s,un,!Wr),Se(l,0,!0)!==0)break e;Sr=s,l.timeoutHandle=By(cy.bind(null,l,a,Wt,nc,uf,s,un,Ws,Ki,Wr,p,"Throttled",-0,0),d);break e}cy(l,a,Wt,nc,uf,s,un,Ws,Ki,Wr,p,null,-0,0)}}break}while(!0);Fn(n)}function cy(n,s,a,l,d,p,v,w,R,M,I,V,U,P){if(n.timeoutHandle=-1,V=s.subtreeFlags,V&8192||(V&16785408)===16785408){V={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:or},ty(s,p,V);var ie=(p&62914560)===p?ec-Bt():(p&4194048)===p?iy-Bt():0;if(ie=UE(V,ie),ie!==null){Sr=p,n.cancelPendingCommit=ie(yy.bind(null,n,s,p,a,l,d,v,w,R,I,V,null,U,P)),rs(n,p,v,!M);return}}yy(n,s,p,a,l,d,v,w,R)}function XS(n){for(var s=n;;){var a=s.tag;if((a===0||a===11||a===15)&&s.flags&16384&&(a=s.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var l=0;l<a.length;l++){var d=a[l],p=d.getSnapshot;d=d.value;try{if(!sn(p(),d))return!1}catch{return!1}}if(a=s.child,s.subtreeFlags&16384&&a!==null)a.return=s,s=a;else{if(s===n)break;for(;s.sibling===null;){if(s.return===null||s.return===n)return!0;s=s.return}s.sibling.return=s.return,s=s.sibling}}return!0}function rs(n,s,a,l){s&=~cf,s&=~Ws,n.suspendedLanes|=s,n.pingedLanes&=~s,l&&(n.warmLanes|=s),l=n.expirationTimes;for(var d=s;0<d;){var p=31-jt(d),v=1<<p;l[p]=-1,d&=~v}a!==0&&Us(n,a,s)}function rc(){return(He&6)===0?(po(0),!1):!0}function pf(){if(xe!==null){if($e===0)var n=xe.return;else n=xe,dr=Vs=null,Cd(n),Pi=null,Za=0,n=xe;for(;n!==null;)Ig(n.alternate,n),n=n.return;xe=null}}function Yi(n,s){var a=n.timeoutHandle;a!==-1&&(n.timeoutHandle=-1,vE(a)),a=n.cancelPendingCommit,a!==null&&(n.cancelPendingCommit=null,a()),Sr=0,pf(),Ye=n,xe=a=cr(n.current,null),je=s,$e=0,cn=null,Wr=!1,Gi=We(n,s),lf=!1,Ki=un=cf=Ws=es=rt=0,Wt=fo=null,uf=!1,(s&8)!==0&&(s|=s&32);var l=n.entangledLanes;if(l!==0)for(n=n.entanglements,l&=s;0<l;){var d=31-jt(l),p=1<<d;s|=n[d],l&=~p}return wr=s,Tl(),a}function uy(n,s){Re=null,j.H=ro,s===zi||s===jl?(s=Rm(),$e=3):s===yd?(s=Rm(),$e=4):$e=s===Gd?8:s!==null&&typeof s=="object"&&typeof s.then=="function"?6:1,cn=s,xe===null&&(rt=1,Kl(n,vn(s,n.current)))}function dy(){var n=on.current;return n===null?!0:(je&4194048)===je?Sn===null:(je&62914560)===je||(je&536870912)!==0?n===Sn:!1}function fy(){var n=j.H;return j.H=ro,n===null?ro:n}function hy(){var n=j.A;return j.A=JS,n}function sc(){rt=4,Wr||(je&4194048)!==je&&on.current!==null||(Gi=!0),(es&134217727)===0&&(Ws&134217727)===0||Ye===null||rs(Ye,je,un,!1)}function mf(n,s,a){var l=He;He|=2;var d=fy(),p=hy();(Ye!==n||je!==s)&&(nc=null,Yi(n,s)),s=!1;var v=rt;e:do try{if($e!==0&&xe!==null){var w=xe,R=cn;switch($e){case 8:pf(),v=6;break e;case 3:case 2:case 9:case 6:on.current===null&&(s=!0);var M=$e;if($e=0,cn=null,Zi(n,w,R,M),a&&Gi){v=0;break e}break;default:M=$e,$e=0,cn=null,Zi(n,w,R,M)}}WS(),v=rt;break}catch(I){uy(n,I)}while(!0);return s&&n.shellSuspendCounter++,dr=Vs=null,He=l,j.H=d,j.A=p,xe===null&&(Ye=null,je=0,Tl()),v}function WS(){for(;xe!==null;)py(xe)}function eE(n,s){var a=He;He|=2;var l=fy(),d=hy();Ye!==n||je!==s?(nc=null,tc=Bt()+500,Yi(n,s)):Gi=We(n,s);e:do try{if($e!==0&&xe!==null){s=xe;var p=cn;t:switch($e){case 1:$e=0,cn=null,Zi(n,s,p,1);break;case 2:case 9:if(Tm(p)){$e=0,cn=null,my(s);break}s=function(){$e!==2&&$e!==9||Ye!==n||($e=7),Fn(n)},p.then(s,s);break e;case 3:$e=7;break e;case 4:$e=5;break e;case 7:Tm(p)?($e=0,cn=null,my(s)):($e=0,cn=null,Zi(n,s,p,7));break;case 5:var v=null;switch(xe.tag){case 26:v=xe.memoizedState;case 5:case 27:var w=xe;if(v?ev(v):w.stateNode.complete){$e=0,cn=null;var R=w.sibling;if(R!==null)xe=R;else{var M=w.return;M!==null?(xe=M,ic(M)):xe=null}break t}}$e=0,cn=null,Zi(n,s,p,5);break;case 6:$e=0,cn=null,Zi(n,s,p,6);break;case 8:pf(),rt=6;break e;default:throw Error(i(462))}}tE();break}catch(I){uy(n,I)}while(!0);return dr=Vs=null,j.H=l,j.A=d,He=a,xe!==null?0:(Ye=null,je=0,Tl(),rt)}function tE(){for(;xe!==null&&!Pt();)py(xe)}function py(n){var s=Pg(n.alternate,n,wr);n.memoizedProps=n.pendingProps,s===null?ic(n):xe=s}function my(n){var s=n,a=s.alternate;switch(s.tag){case 15:case 0:s=jg(a,s,s.pendingProps,s.type,void 0,je);break;case 11:s=jg(a,s,s.pendingProps,s.type.render,s.ref,je);break;case 5:Cd(s);default:Ig(a,s),s=xe=hm(s,wr),s=Pg(a,s,wr)}n.memoizedProps=n.pendingProps,s===null?ic(n):xe=s}function Zi(n,s,a,l){dr=Vs=null,Cd(s),Pi=null,Za=0;var d=s.return;try{if(qS(n,d,s,a,je)){rt=1,Kl(n,vn(a,n.current)),xe=null;return}}catch(p){if(d!==null)throw xe=d,p;rt=1,Kl(n,vn(a,n.current)),xe=null;return}s.flags&32768?(Le||l===1?n=!0:Gi||(je&536870912)!==0?n=!1:(Wr=n=!0,(l===2||l===9||l===3||l===6)&&(l=on.current,l!==null&&l.tag===13&&(l.flags|=16384))),gy(s,n)):ic(s)}function ic(n){var s=n;do{if((s.flags&32768)!==0){gy(s,Wr);return}n=s.return;var a=KS(s.alternate,s,wr);if(a!==null){xe=a;return}if(s=s.sibling,s!==null){xe=s;return}xe=s=n}while(s!==null);rt===0&&(rt=5)}function gy(n,s){do{var a=FS(n.alternate,n);if(a!==null){a.flags&=32767,xe=a;return}if(a=n.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!s&&(n=n.sibling,n!==null)){xe=n;return}xe=n=a}while(n!==null);rt=6,xe=null}
vendor: 1,801 bytes, line 9
9function yy(n,s,a,l,d,p,v,w,R){n.cancelPendingCommit=null;do ac();while(mt!==0);if((He&6)!==0)throw Error(i(327));if(s!==null){if(s===n.current)throw Error(i(177));if(p=s.lanes|s.childLanes,p|=nd,Gt(n,a,p,v,w,R),n===Ye&&(xe=Ye=null,je=0),Fi=s,ns=n,Sr=a,df=p,ff=d,ay=l,(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?(n.callbackNode=null,n.callbackPriority=0,iE(Ds,function(){return Sy(),null})):(n.callbackNode=null,n.callbackPriority=0),l=(s.flags&13878)!==0,(s.subtreeFlags&13878)!==0||l){l=j.T,j.T=null,d=F.p,F.p=2,v=He,He|=4;try{YS(n,s,a)}finally{He=v,F.p=d,j.T=l}}mt=1,vy(),by(),_y()}}function vy(){if(mt===1){mt=0;var n=ns,s=Fi,a=(s.flags&13878)!==0;if((s.subtreeFlags&13878)!==0||a){a=j.T,j.T=null;var l=F.p;F.p=2;var d=He;He|=4;try{Xg(s,n);var p=Of,v=sm(n.containerInfo),w=p.focusedElem,R=p.selectionRange;if(v!==w&&w&&w.ownerDocument&&rm(w.ownerDocument.documentElement,w)){if(R!==null&&Qu(w)){var M=R.start,I=R.end;if(I===void 0&&(I=M),"selectionStart"in w)w.selectionStart=M,w.selectionEnd=Math.min(I,w.value.length);else{var V=w.ownerDocument||document,U=V&&V.defaultView||window;if(U.getSelection){var P=U.getSelection(),ie=w.textContent.length,be=Math.min(R.start,ie),Ke=R.end===void 0?be:Math.min(R.end,ie);!P.extend&&be>Ke&&(v=Ke,Ke=be,be=v);var N=nm(w,be),k=nm(w,Ke);if(N&&k&&(P.rangeCount!==1||P.anchorNode!==N.node||P.anchorOffset!==N.offset||P.focusNode!==k.node||P.focusOffset!==k.offset)){var L=V.createRange();L.setStart(N.node,N.offset),P.removeAllRanges(),be>Ke?(P.addRange(L),P.extend(k.node,k.offset)):(L.setEnd(k.node,k.offset),P.addRange(L))}}}}for(V=[],P=w;P=P.parentNode;)P.nodeType===1&&V.push({element:P,left:P.scrollLeft,top:P.scrollTop});for(typeof w.focus=="function"&&w.focus(),w=0;w<V.length;w++){var $=V[w];$.element.scrollLeft=$.left,$.element.scrollTop=$.top}}
vendor: 13,057 bytes, line 9
9vc=!!Rf,Of=Rf=null}finally{He=d,F.p=l,j.T=a}}n.current=s,mt=2}}function by(){if(mt===2){mt=0;var n=ns,s=Fi,a=(s.flags&8772)!==0;if((s.subtreeFlags&8772)!==0||a){a=j.T,j.T=null;var l=F.p;F.p=2;var d=He;He|=4;try{Fg(n,s.alternate,s)}finally{He=d,F.p=l,j.T=a}}mt=3}}function _y(){if(mt===4||mt===3){mt=0,Pr();var n=ns,s=Fi,a=Sr,l=ay;(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?mt=5:(mt=0,Fi=ns=null,wy(n,n.pendingLanes));var d=n.pendingLanes;if(d===0&&(ts=null),Cn(a),s=s.stateNode,It&&typeof It.onCommitFiberRoot=="function")try{It.onCommitFiberRoot(Ls,s,void 0,(s.current.flags&128)===128)}catch{}if(l!==null){s=j.T,d=F.p,F.p=2,j.T=null;try{for(var p=n.onRecoverableError,v=0;v<l.length;v++){var w=l[v];p(w.value,{componentStack:w.stack})}}finally{j.T=s,F.p=d}}(Sr&3)!==0&&ac(),Fn(n),d=n.pendingLanes,(a&261930)!==0&&(d&42)!==0?n===hf?ho++:(ho=0,hf=n):ho=0,po(0)}}function wy(n,s){(n.pooledCacheLanes&=s)===0&&(s=n.pooledCache,s!=null&&(n.pooledCache=null,Fa(s)))}function ac(){return vy(),by(),_y(),Sy()}function Sy(){if(mt!==5)return!1;var n=ns,s=df;df=0;var a=Cn(Sr),l=j.T,d=F.p;try{F.p=32>a?32:a,j.T=null,a=ff,ff=null;var p=ns,v=Sr;if(mt=0,Fi=ns=null,Sr=0,(He&6)!==0)throw Error(i(331));var w=He;if(He|=4,ry(p.current),ey(p,p.current,v,a),He=w,po(0,!1),It&&typeof It.onPostCommitFiberRoot=="function")try{It.onPostCommitFiberRoot(Ls,p)}catch{}return!0}finally{F.p=d,j.T=l,wy(n,s)}}function Ey(n,s,a){s=vn(a,s),s=Vd(n.stateNode,s,2),n=Zr(n,s,2),n!==null&&(tt(n,2),Fn(n))}function qe(n,s,a){if(n.tag===3)Ey(n,n,a);else for(;s!==null;){if(s.tag===3){Ey(s,n,a);break}else if(s.tag===1){var l=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(ts===null||!ts.has(l))){n=vn(a,n),a=Tg(2),l=Zr(s,a,2),l!==null&&(Ag(a,l,s,n),tt(l,2),Fn(l));break}}s=s.return}}function gf(n,s,a){var l=n.pingCache;if(l===null){l=n.pingCache=new QS;var d=new Set;l.set(s,d)}else d=l.get(s),d===void 0&&(d=new Set,l.set(s,d));d.has(a)||(lf=!0,d.add(a),n=nE.bind(null,n,s,a),s.then(n,n))}function nE(n,s,a){var l=n.pingCache;l!==null&&l.delete(s),n.pingedLanes|=n.suspendedLanes&a,n.warmLanes&=~a,Ye===n&&(je&a)===a&&(rt===4||rt===3&&(je&62914560)===je&&300>Bt()-ec?(He&2)===0&&Yi(n,0):cf|=a,Ki===je&&(Ki=0)),Fn(n)}function Ty(n,s){s===0&&(s=Dt()),n=Hs(n,s),n!==null&&(tt(n,s),Fn(n))}function rE(n){var s=n.memoizedState,a=0;s!==null&&(a=s.retryLane),Ty(n,a)}function sE(n,s){var a=0;switch(n.tag){case 31:case 13:var l=n.stateNode,d=n.memoizedState;d!==null&&(a=d.retryLane);break;case 19:l=n.stateNode;break;case 22:l=n.stateNode._retryCache;break;default:throw Error(i(314))}l!==null&&l.delete(s),Ty(n,a)}function iE(n,s){return xa(n,s)}var oc=null,Ji=null,yf=!1,lc=!1,vf=!1,ss=0;function Fn(n){n!==Ji&&n.next===null&&(Ji===null?oc=Ji=n:Ji=Ji.next=n),lc=!0,yf||(yf=!0,oE())}function po(n,s){if(!vf&&lc){vf=!0;do for(var a=!1,l=oc;l!==null;){if(n!==0){var d=l.pendingLanes;if(d===0)var p=0;else{var v=l.suspendedLanes,w=l.pingedLanes;p=(1<<31-jt(42|n)+1)-1,p&=d&~(v&~w),p=p&201326741?p&201326741|1:p?p|2:0}p!==0&&(a=!0,ky(l,p))}else p=je,p=Se(l,l===Ye?p:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(p&3)===0||We(l,p)||(a=!0,ky(l,p));l=l.next}while(a);vf=!1}}function aE(){Ay()}function Ay(){lc=yf=!1;var n=0;ss!==0&&yE()&&(n=ss);for(var s=Bt(),a=null,l=oc;l!==null;){var d=l.next,p=Ry(l,s);p===0?(l.next=null,a===null?oc=d:a.next=d,d===null&&(Ji=a)):(a=l,(n!==0||(p&3)!==0)&&(lc=!0)),l=d}mt!==0&&mt!==5||po(n),ss!==0&&(ss=0)}function Ry(n,s){for(var a=n.suspendedLanes,l=n.pingedLanes,d=n.expirationTimes,p=n.pendingLanes&-62914561;0<p;){var v=31-jt(p),w=1<<v,R=d[v];R===-1?((w&a)===0||(w&l)!==0)&&(d[v]=vt(w,s)):R<=s&&(n.expiredLanes|=w),p&=~w}if(s=Ye,a=je,a=Se(n,n===s?a:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),l=n.callbackNode,a===0||n===s&&($e===2||$e===9)||n.cancelPendingCommit!==null)return l!==null&&l!==null&&Na(l),n.callbackNode=null,n.callbackPriority=0;if((a&3)===0||We(n,a)){if(s=a&-a,s===n.callbackPriority)return s;switch(l!==null&&Na(l),Cn(a)){case 2:case 8:a=dl;break;case 32:a=Ds;break;case 268435456:a=ir;break;default:a=Ds}return l=Oy.bind(null,n),a=xa(a,l),n.callbackPriority=s,n.callbackNode=a,s}return l!==null&&l!==null&&Na(l),n.callbackPriority=2,n.callbackNode=null,2}function Oy(n,s){if(mt!==0&&mt!==5)return n.callbackNode=null,n.callbackPriority=0,null;var a=n.callbackNode;if(ac()&&n.callbackNode!==a)return null;var l=je;return l=Se(n,n===Ye?l:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),l===0?null:(ly(n,l,s),Ry(n,Bt()),n.callbackNode!=null&&n.callbackNode===a?Oy.bind(null,n):null)}function ky(n,s){if(ac())return null;ly(n,s,!0)}function oE(){bE(function(){(He&6)!==0?xa(js,aE):Ay()})}function bf(){if(ss===0){var n=Mi;n===0&&(n=pi,pi<<=1,(pi&261888)===0&&(pi=256)),ss=n}return ss}function Cy(n){return n==null||typeof n=="symbol"||typeof n=="boolean"?null:typeof n=="function"?n:gl(""+n)}function xy(n,s){var a=s.ownerDocument.createElement("input");return a.name=s.name,a.value=s.value,n.id&&a.setAttribute("form",n.id),s.parentNode.insertBefore(a,s),n=new FormData(n),a.parentNode.removeChild(a),n}function lE(n,s,a,l,d){if(s==="submit"&&a&&a.stateNode===d){var p=Cy((d[Yt]||null).action),v=l.submitter;v&&(s=(s=v[Yt]||null)?Cy(s.formAction):v.getAttribute("formAction"),s!==null&&(p=s,v=null));var w=new _l("action","action",null,l,d);n.push({event:w,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(ss!==0){var R=v?xy(d,v):new FormData(d);Pd(a,{pending:!0,data:R,method:d.method,action:p},null,R)}}else typeof p=="function"&&(w.preventDefault(),R=v?xy(d,v):new FormData(d),Pd(a,{pending:!0,data:R,method:d.method,action:p},p,R))},currentTarget:d}]})}}for(var _f=0;_f<td.length;_f++){var wf=td[_f],cE=wf.toLowerCase(),uE=wf[0].toUpperCase()+wf.slice(1);xn(cE,"on"+uE)}xn(om,"onAnimationEnd"),xn(lm,"onAnimationIteration"),xn(cm,"onAnimationStart"),xn("dblclick","onDoubleClick"),xn("focusin","onFocus"),xn("focusout","onBlur"),xn(RS,"onTransitionRun"),xn(OS,"onTransitionStart"),xn(kS,"onTransitionCancel"),xn(um,"onTransitionEnd"),wi("onMouseEnter",["mouseout","mouseover"]),wi("onMouseLeave",["mouseout","mouseover"]),wi("onPointerEnter",["pointerout","pointerover"]),wi("onPointerLeave",["pointerout","pointerover"]),zs("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),zs("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),zs("onBeforeInput",["compositionend","keypress","textInput","paste"]),zs("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),zs("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),zs("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var mo="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(" "),dE=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(mo));function Ny(n,s){s=(s&4)!==0;for(var a=0;a<n.length;a++){var l=n[a],d=l.event;l=l.listeners;e:{var p=void 0;if(s)for(var v=l.length-1;0<=v;v--){var w=l[v],R=w.instance,M=w.currentTarget;if(w=w.listener,R!==p&&d.isPropagationStopped())break e;p=w,d.currentTarget=M;try{p(d)}catch(I){El(I)}d.currentTarget=null,p=R}else for(v=0;v<l.length;v++){if(w=l[v],R=w.instance,M=w.currentTarget,w=w.listener,R!==p&&d.isPropagationStopped())break e;p=w,d.currentTarget=M;try{p(d)}catch(I){El(I)}d.currentTarget=null,p=R}}}}function Ne(n,s){var a=s[Du];a===void 0&&(a=s[Du]=new Set);var l=n+"__bubble";a.has(l)||(jy(s,n,2,!1),a.add(l))}function Sf(n,s,a){var l=0;s&&(l|=4),jy(a,n,l,s)}var cc="_reactListening"+Math.random().toString(36).slice(2);function Ef(n){if(!n[cc]){n[cc]=!0,Ap.forEach(function(a){a!=="selectionchange"&&(dE.has(a)||Sf(a,!1,n),Sf(a,!0,n))});var s=n.nodeType===9?n:n.ownerDocument;s===null||s[cc]||(s[cc]=!0,Sf("selectionchange",!1,s))}}function jy(n,s,a,l){switch(ov(s)){case 2:var d=BE;break;case 8:d=IE;break;default:d=Pf}a=d.bind(null,s,a,n),d=void 0,!$u||s!=="touchstart"&&s!=="touchmove"&&s!=="wheel"||(d=!0),l?d!==void 0?n.addEventListener(s,a,{capture:!0,passive:d}):n.addEventListener(s,a,!0):d!==void 0?n.addEventListener(s,a,{passive:d}):n.addEventListener(s,a,!1)}function Tf(n,s,a,l,d){var p=l;if((s&1)===0&&(s&2)===0&&l!==null)e:for(;;){if(l===null)return;var v=l.tag;if(v===3||v===4){var w=l.stateNode.containerInfo;if(w===d)break;if(v===4)for(v=l.return;v!==null;){var R=v.tag;if((R===3||R===4)&&v.stateNode.containerInfo===d)return;v=v.return}for(;w!==null;){if(v=vi(w),v===null)return;if(R=v.tag,R===5||R===6||R===26||R===27){l=p=v;continue e}w=w.parentNode}}l=l.return}zp(function(){var M=p,I=Iu(a),V=[];e:{var U=dm.get(n);if(U!==void 0){var P=_l,ie=n;switch(n){case"keypress":if(vl(a)===0)break e;case"keydown":case"keyup":P=sS;break;case"focusin":ie="focus",P=Ku;break;case"focusout":ie="blur",P=Ku;break;case"beforeblur":case"afterblur":P=Ku;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":P=Ip;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":P=Kw;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":P=oS;break;case om:case lm:case cm:P=Zw;break;case um:P=cS;break;case"scroll":case"scrollend":P=Vw;break;case"wheel":P=dS;break;case"copy":case"cut":case"paste":P=Qw;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":P=$p;break;case"toggle":case"beforetoggle":P=hS}var be=(s&4)!==0,Ke=!be&&(n==="scroll"||n==="scrollend"),N=be?U!==null?U+"Capture":null:U;be=[];for(var k=M,L;k!==null;){var $=k;if(L=$.stateNode,$=$.tag,$!==5&&$!==26&&$!==27||L===null||N===null||($=Ua(k,N),$!=null&&be.push(go(k,$,L))),Ke)break;k=k.return}0<be.length&&(U=new P(U,ie,null,a,I),V.push({event:U,listeners:be}))}}if((s&7)===0){e:{if(U=n==="mouseover"||n==="pointerover",P=n==="mouseout"||n==="pointerout",U&&a!==Bu&&(ie=a.relatedTarget||a.fromElement)&&(vi(ie)||ie[yi]))break e;if((P||U)&&(U=I.window===I?I:(U=I.ownerDocument)?U.defaultView||U.parentWindow:window,P?(ie=a.relatedTarget||a.toElement,P=M,ie=ie?vi(ie):null,ie!==null&&(Ke=c(ie),be=ie.tag,ie!==Ke||be!==5&&be!==27&&be!==6)&&(ie=null)):(P=null,ie=M),P!==ie)){if(be=Ip,$="onMouseLeave",N="onMouseEnter",k="mouse",(n==="pointerout"||n==="pointerover")&&(be=$p,$="onPointerLeave",N="onPointerEnter",k="pointer"),Ke=P==null?U:Ma(P),L=ie==null?U:Ma(ie),U=new be($,k+"leave",P,a,I),U.target=Ke,U.relatedTarget=L,$=null,vi(I)===M&&(be=new be(N,k+"enter",ie,a,I),be.target=L,be.relatedTarget=Ke,$=be),Ke=$,P&&ie)t:{for(be=fE,N=P,k=ie,L=0,$=N;$;$=be($))L++;$=0;for(var me=k;me;me=be(me))$++;for(;0<L-$;)N=be(N),L--;for(;0<$-L;)k=be(k),$--;for(;L--;){if(N===k||k!==null&&N===k.alternate){be=N;break t}N=be(N),k=be(k)}be=null}else be=null;P!==null&&Dy(V,U,P,be,!1),ie!==null&&Ke!==null&&Dy(V,Ke,ie,be,!0)}}e:{if(U=M?Ma(M):window,P=U.nodeName&&U.nodeName.toLowerCase(),P==="select"||P==="input"&&U.type==="file")var Pe=Jp;else if(Yp(U))if(Qp)Pe=ES;else{Pe=wS;var ue=_S}else P=U.nodeName,!P||P.toLowerCase()!=="input"||U.type!=="checkbox"&&U.type!=="radio"?M&&Pu(M.elementType)&&(Pe=Jp):Pe=SS;if(Pe&&(Pe=Pe(n,M))){Zp(V,Pe,a,I);break e}ue&&ue(n,U,M),n==="focusout"&&M&&U.type==="number"&&M.memoizedProps.value!=null&&zu(U,"number",U.value)}switch(ue=M?Ma(M):window,n){case"focusin":(Yp(ue)||ue.contentEditable==="true")&&(Oi=ue,Xu=M,Va=null);break;case"focusout":Va=Xu=Oi=null;break;case"mousedown":Wu=!0;break;case"contextmenu":case"mouseup":case"dragend":Wu=!1,im(V,a,I);break;case"selectionchange":if(AS)break;case"keydown":case"keyup":im(V,a,I)}var Oe;if(Yu)e:{switch(n){case"compositionstart":var De="onCompositionStart";break e;case"compositionend":De="onCompositionEnd";break e;case"compositionupdate":De="onCompositionUpdate";break e}De=void 0}else Ri?Kp(n,a)&&(De="onCompositionEnd"):n==="keydown"&&a.keyCode===229&&(De="onCompositionStart");De&&(qp&&a.locale!=="ko"&&(Ri||De!=="onCompositionStart"?De==="onCompositionEnd"&&Ri&&(Oe=Pp()):($r=I,qu="value"in $r?$r.value:$r.textContent,Ri=!0)),ue=uc(M,De),0<ue.length&&(De=new Hp(De,n,null,a,I),V.push({event:De,listeners:ue}),Oe?De.data=Oe:(Oe=Fp(a),Oe!==null&&(De.data=Oe)))),(Oe=mS?gS(n,a):yS(n,a))&&(De=uc(M,"onBeforeInput"),0<De.length&&(ue=new Hp("onBeforeInput","beforeinput",null,a,I),V.push({event:ue,listeners:De}),ue.data=Oe)),lE(V,n,M,a,I)}Ny(V,s)})}function go(n,s,a){return{instance:n,listener:s,currentTarget:a}}function uc(n,s){for(var a=s+"Capture",l=[];n!==null;){var d=n,p=d.stateNode;if(d=d.tag,d!==5&&d!==26&&d!==27||p===null||(d=Ua(n,a),d!=null&&l.unshift(go(n,d,p)),d=Ua(n,s),d!=null&&l.push(go(n,d,p))),n.tag===3)return l;n=n.return}return[]}
vendor: 4,248 bytes, lines 9-10
9function fE(n){if(n===null)return null;do n=n.return;while(n&&n.tag!==5&&n.tag!==27);return n||null}function Dy(n,s,a,l,d){for(var p=s._reactName,v=[];a!==null&&a!==l;){var w=a,R=w.alternate,M=w.stateNode;if(w=w.tag,R!==null&&R===l)break;w!==5&&w!==26&&w!==27||M===null||(R=M,d?(M=Ua(a,p),M!=null&&v.unshift(go(a,M,R))):d||(M=Ua(a,p),M!=null&&v.push(go(a,M,R)))),a=a.return}v.length!==0&&n.push({event:s,listeners:v})}var hE=/\r\n?/g,pE=/\u0000|\uFFFD/g;function Ly(n){return(typeof n=="string"?n:""+n).replace(hE,` 10`).replace(pE,"")}function My(n,s){return s=Ly(s),Ly(n)===s}function Ge(n,s,a,l,d,p){switch(a){case"children":typeof l=="string"?s==="body"||s==="textarea"&&l===""||Ei(n,l):(typeof l=="number"||typeof l=="bigint")&&s!=="body"&&Ei(n,""+l);break;case"className":pl(n,"class",l);break;case"tabIndex":pl(n,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":pl(n,a,l);break;case"style":Mp(n,l,p);break;case"data":if(s!=="object"){pl(n,"data",l);break}case"src":case"href":if(l===""&&(s!=="a"||a!=="href")){n.removeAttribute(a);break}if(l==null||typeof l=="function"||typeof l=="symbol"||typeof l=="boolean"){n.removeAttribute(a);break}l=gl(""+l),n.setAttribute(a,l);break;case"action":case"formAction":if(typeof l=="function"){n.setAttribute(a,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof p=="function"&&(a==="formAction"?(s!=="input"&&Ge(n,s,"name",d.name,d,null),Ge(n,s,"formEncType",d.formEncType,d,null),Ge(n,s,"formMethod",d.formMethod,d,null),Ge(n,s,"formTarget",d.formTarget,d,null)):(Ge(n,s,"encType",d.encType,d,null),Ge(n,s,"method",d.method,d,null),Ge(n,s,"target",d.target,d,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){n.removeAttribute(a);break}l=gl(""+l),n.setAttribute(a,l);break;case"onClick":l!=null&&(n.onclick=or);break;case"onScroll":l!=null&&Ne("scroll",n);break;case"onScrollEnd":l!=null&&Ne("scrollend",n);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(i(61));if(a=l.__html,a!=null){if(d.children!=null)throw Error(i(60));n.innerHTML=a}}break;case"multiple":n.multiple=l&&typeof l!="function"&&typeof l!="symbol";break;case"muted":n.muted=l&&typeof l!="function"&&typeof l!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(l==null||typeof l=="function"||typeof l=="boolean"||typeof l=="symbol"){n.removeAttribute("xlink:href");break}a=gl(""+l),n.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":l!=null&&typeof l!="function"&&typeof l!="symbol"?n.setAttribute(a,""+l):n.removeAttribute(a);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":l&&typeof l!="function"&&typeof l!="symbol"?n.setAttribute(a,""):n.removeAttribute(a);break;case"capture":case"download":l===!0?n.setAttribute(a,""):l!==!1&&l!=null&&typeof l!="function"&&typeof l!="symbol"?n.setAttribute(a,l):n.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!="function"&&typeof l!="symbol"&&!isNaN(l)&&1<=l?n.setAttribute(a,l):n.removeAttribute(a);break;case"rowSpan":case"start":l==null||typeof l=="function"||typeof l=="symbol"||isNaN(l)?n.removeAttribute(a):n.setAttribute(a,l);break;case"popover":Ne("beforetoggle",n),Ne("toggle",n),hl(n,"popover",l);break;case"xlinkActuate":ar(n,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":ar(n,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;
vendor: 7,594 bytes, line 10
10case"xlinkRole":ar(n,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":ar(n,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":ar(n,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":ar(n,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":ar(n,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":ar(n,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":ar(n,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":hl(n,"is",l);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=$w.get(a)||a,hl(n,a,l))}}function Af(n,s,a,l,d,p){switch(a){case"style":Mp(n,l,p);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(i(61));if(a=l.__html,a!=null){if(d.children!=null)throw Error(i(60));n.innerHTML=a}}break;case"children":typeof l=="string"?Ei(n,l):(typeof l=="number"||typeof l=="bigint")&&Ei(n,""+l);break;case"onScroll":l!=null&&Ne("scroll",n);break;case"onScrollEnd":l!=null&&Ne("scrollend",n);break;case"onClick":l!=null&&(n.onclick=or);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Rp.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(d=a.endsWith("Capture"),s=a.slice(2,d?a.length-7:void 0),p=n[Yt]||null,p=p!=null?p[a]:null,typeof p=="function"&&n.removeEventListener(s,p,d),typeof l=="function")){typeof p!="function"&&p!==null&&(a in n?n[a]=null:n.hasAttribute(a)&&n.removeAttribute(a)),n.addEventListener(s,l,d);break e}a in n?n[a]=l:l===!0?n.setAttribute(a,""):hl(n,a,l)}}}function xt(n,s,a){switch(s){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ne("error",n),Ne("load",n);var l=!1,d=!1,p;for(p in a)if(a.hasOwnProperty(p)){var v=a[p];if(v!=null)switch(p){case"src":l=!0;break;case"srcSet":d=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(i(137,s));default:Ge(n,s,p,v,a,null)}}d&&Ge(n,s,"srcSet",a.srcSet,a,null),l&&Ge(n,s,"src",a.src,a,null);return;case"input":Ne("invalid",n);var w=p=v=d=null,R=null,M=null;for(l in a)if(a.hasOwnProperty(l)){var I=a[l];if(I!=null)switch(l){case"name":d=I;break;case"type":v=I;break;case"checked":R=I;break;case"defaultChecked":M=I;break;case"value":p=I;break;case"defaultValue":w=I;break;case"children":case"dangerouslySetInnerHTML":if(I!=null)throw Error(i(137,s));break;default:Ge(n,s,l,I,a,null)}}Np(n,p,w,R,M,v,d,!1);return;case"select":Ne("invalid",n),l=v=p=null;for(d in a)if(a.hasOwnProperty(d)&&(w=a[d],w!=null))switch(d){case"value":p=w;break;case"defaultValue":v=w;break;case"multiple":l=w;default:Ge(n,s,d,w,a,null)}s=p,a=v,n.multiple=!!l,s!=null?Si(n,!!l,s,!1):a!=null&&Si(n,!!l,a,!0);return;case"textarea":Ne("invalid",n),p=d=l=null;for(v in a)if(a.hasOwnProperty(v)&&(w=a[v],w!=null))switch(v){case"value":l=w;break;case"defaultValue":d=w;break;case"children":p=w;break;case"dangerouslySetInnerHTML":if(w!=null)throw Error(i(91));break;default:Ge(n,s,v,w,a,null)}Dp(n,l,d,p);return;case"option":for(R in a)a.hasOwnProperty(R)&&(l=a[R],l!=null)&&(R==="selected"?n.selected=l&&typeof l!="function"&&typeof l!="symbol":Ge(n,s,R,l,a,null));return;case"dialog":Ne("beforetoggle",n),Ne("toggle",n),Ne("cancel",n),Ne("close",n);break;case"iframe":case"object":Ne("load",n);break;case"video":case"audio":for(l=0;l<mo.length;l++)Ne(mo[l],n);break;case"image":Ne("error",n),Ne("load",n);break;case"details":Ne("toggle",n);break;case"embed":case"source":case"link":Ne("error",n),Ne("load",n);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(M in a)if(a.hasOwnProperty(M)&&(l=a[M],l!=null))switch(M){case"children":case"dangerouslySetInnerHTML":throw Error(i(137,s));default:Ge(n,s,M,l,a,null)}return;default:if(Pu(s)){for(I in a)a.hasOwnProperty(I)&&(l=a[I],l!==void 0&&Af(n,s,I,l,a,void 0));return}}for(w in a)a.hasOwnProperty(w)&&(l=a[w],l!=null&&Ge(n,s,w,l,a,null))}function mE(n,s,a,l){switch(s){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var d=null,p=null,v=null,w=null,R=null,M=null,I=null;for(P in a){var V=a[P];if(a.hasOwnProperty(P)&&V!=null)switch(P){case"checked":break;case"value":break;case"defaultValue":R=V;default:l.hasOwnProperty(P)||Ge(n,s,P,null,l,V)}}for(var U in l){var P=l[U];if(V=a[U],l.hasOwnProperty(U)&&(P!=null||V!=null))switch(U){case"type":p=P;break;case"name":d=P;break;case"checked":M=P;break;case"defaultChecked":I=P;break;case"value":v=P;break;case"defaultValue":w=P;break;case"children":case"dangerouslySetInnerHTML":if(P!=null)throw Error(i(137,s));break;default:P!==V&&Ge(n,s,U,P,l,V)}}Uu(n,v,w,R,M,I,p,d);return;case"select":P=v=w=U=null;for(p in a)if(R=a[p],a.hasOwnProperty(p)&&R!=null)switch(p){case"value":break;case"multiple":P=R;default:l.hasOwnProperty(p)||Ge(n,s,p,null,l,R)}for(d in l)if(p=l[d],R=a[d],l.hasOwnProperty(d)&&(p!=null||R!=null))switch(d){case"value":U=p;break;case"defaultValue":w=p;break;case"multiple":v=p;default:p!==R&&Ge(n,s,d,p,l,R)}s=w,a=v,l=P,U!=null?Si(n,!!a,U,!1):!!l!=!!a&&(s!=null?Si(n,!!a,s,!0):Si(n,!!a,a?[]:"",!1));return;case"textarea":P=U=null;for(w in a)if(d=a[w],a.hasOwnProperty(w)&&d!=null&&!l.hasOwnProperty(w))switch(w){case"value":break;case"children":break;default:Ge(n,s,w,null,l,d)}for(v in l)if(d=l[v],p=a[v],l.hasOwnProperty(v)&&(d!=null||p!=null))switch(v){case"value":U=d;break;case"defaultValue":P=d;break;case"children":break;case"dangerouslySetInnerHTML":if(d!=null)throw Error(i(91));break;default:d!==p&&Ge(n,s,v,d,l,p)}jp(n,U,P);return;case"option":for(var ie in a)U=a[ie],a.hasOwnProperty(ie)&&U!=null&&!l.hasOwnProperty(ie)&&(ie==="selected"?n.selected=!1:Ge(n,s,ie,null,l,U));for(R in l)U=l[R],P=a[R],l.hasOwnProperty(R)&&U!==P&&(U!=null||P!=null)&&(R==="selected"?n.selected=U&&typeof U!="function"&&typeof U!="symbol":Ge(n,s,R,U,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 be in a)U=a[be],a.hasOwnProperty(be)&&U!=null&&!l.hasOwnProperty(be)&&Ge(n,s,be,null,l,U);for(M in l)if(U=l[M],P=a[M],l.hasOwnProperty(M)&&U!==P&&(U!=null||P!=null))switch(M){case"children":case"dangerouslySetInnerHTML":if(U!=null)throw Error(i(137,s));break;default:Ge(n,s,M,U,l,P)}return;default:if(Pu(s)){for(var Ke in a)U=a[Ke],a.hasOwnProperty(Ke)&&U!==void 0&&!l.hasOwnProperty(Ke)&&Af(n,s,Ke,void 0,l,U);for(I in l)U=l[I],P=a[I],!l.hasOwnProperty(I)||U===P||U===void 0&&P===void 0||Af(n,s,I,U,l,P);return}}for(var N in a)U=a[N],a.hasOwnProperty(N)&&U!=null&&!l.hasOwnProperty(N)&&Ge(n,s,N,null,l,U);for(V in l)U=l[V],P=a[V],!l.hasOwnProperty(V)||U===P||U==null&&P==null||Ge(n,s,V,U,l,P)}function Uy(n){switch(n){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function gE(){if(typeof performance.getEntriesByType=="function"){for(var n=0,s=0,a=performance.getEntriesByType("resource"),l=0;l<a.length;l++){var d=a[l],p=d.transferSize,v=d.initiatorType,w=d.duration;if(p&&w&&Uy(v)){for(v=0,w=d.responseEnd,l+=1;l<a.length;l++){var R=a[l],M=R.startTime;if(M>w)break;var I=R.transferSize,V=R.initiatorType;I&&Uy(V)&&(R=R.responseEnd,v+=I*(R<w?1:(w-M)/(R-M)))}if(--l,s+=8*(p+v)/(d.duration/1e3),n++,10<n)break}}if(0<n)return s/n/1e6}return navigator.connection&&(n=navigator.connection.downlink,typeof n=="number")?
vendor: 9,333 bytes, line 10
10n:5}var Rf=null,Of=null;function dc(n){return n.nodeType===9?n:n.ownerDocument}function zy(n){switch(n){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Py(n,s){if(n===0)switch(s){case"svg":return 1;case"math":return 2;default:return 0}return n===1&&s==="foreignObject"?0:n}function kf(n,s){return n==="textarea"||n==="noscript"||typeof s.children=="string"||typeof s.children=="number"||typeof s.children=="bigint"||typeof s.dangerouslySetInnerHTML=="object"&&s.dangerouslySetInnerHTML!==null&&s.dangerouslySetInnerHTML.__html!=null}var Cf=null;function yE(){var n=window.event;return n&&n.type==="popstate"?n===Cf?!1:(Cf=n,!0):(Cf=null,!1)}var By=typeof setTimeout=="function"?setTimeout:void 0,vE=typeof clearTimeout=="function"?clearTimeout:void 0,Iy=typeof Promise=="function"?Promise:void 0,bE=typeof queueMicrotask=="function"?queueMicrotask:typeof Iy<"u"?function(n){return Iy.resolve(null).then(n).catch(_E)}:By;function _E(n){setTimeout(function(){throw n})}function is(n){return n==="head"}function Hy(n,s){var a=s,l=0;do{var d=a.nextSibling;if(n.removeChild(a),d&&d.nodeType===8)if(a=d.data,a==="/$"||a==="/&"){if(l===0){n.removeChild(d),ea(s);return}l--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")l++;else if(a==="html")yo(n.ownerDocument.documentElement);else if(a==="head"){a=n.ownerDocument.head,yo(a);for(var p=a.firstChild;p;){var v=p.nextSibling,w=p.nodeName;p[La]||w==="SCRIPT"||w==="STYLE"||w==="LINK"&&p.rel.toLowerCase()==="stylesheet"||a.removeChild(p),p=v}}else a==="body"&&yo(n.ownerDocument.body);a=d}while(a);ea(s)}function $y(n,s){var a=n;n=0;do{var l=a.nextSibling;if(a.nodeType===1?s?(a._stashedDisplay=a.style.display,a.style.display="none"):(a.style.display=a._stashedDisplay||"",a.getAttribute("style")===""&&a.removeAttribute("style")):a.nodeType===3&&(s?(a._stashedText=a.nodeValue,a.nodeValue=""):a.nodeValue=a._stashedText||""),l&&l.nodeType===8)if(a=l.data,a==="/$"){if(n===0)break;n--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||n++;a=l}while(a)}function xf(n){var s=n.firstChild;for(s&&s.nodeType===10&&(s=s.nextSibling);s;){var a=s;switch(s=s.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":xf(a),Lu(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}n.removeChild(a)}}function wE(n,s,a,l){for(;n.nodeType===1;){var d=a;if(n.nodeName.toLowerCase()!==s.toLowerCase()){if(!l&&(n.nodeName!=="INPUT"||n.type!=="hidden"))break}else if(l){if(!n[La])switch(s){case"meta":if(!n.hasAttribute("itemprop"))break;return n;case"link":if(p=n.getAttribute("rel"),p==="stylesheet"&&n.hasAttribute("data-precedence"))break;if(p!==d.rel||n.getAttribute("href")!==(d.href==null||d.href===""?null:d.href)||n.getAttribute("crossorigin")!==(d.crossOrigin==null?null:d.crossOrigin)||n.getAttribute("title")!==(d.title==null?null:d.title))break;return n;case"style":if(n.hasAttribute("data-precedence"))break;return n;case"script":if(p=n.getAttribute("src"),(p!==(d.src==null?null:d.src)||n.getAttribute("type")!==(d.type==null?null:d.type)||n.getAttribute("crossorigin")!==(d.crossOrigin==null?null:d.crossOrigin))&&p&&n.hasAttribute("async")&&!n.hasAttribute("itemprop"))break;return n;default:return n}}else if(s==="input"&&n.type==="hidden"){var p=d.name==null?null:""+d.name;if(d.type==="hidden"&&n.getAttribute("name")===p)return n}else return n;if(n=En(n.nextSibling),n===null)break}return null}function SE(n,s,a){if(s==="")return null;for(;n.nodeType!==3;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!a||(n=En(n.nextSibling),n===null))return null;return n}function qy(n,s){for(;n.nodeType!==8;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!s||(n=En(n.nextSibling),n===null))return null;return n}function Nf(n){return n.data==="$?"||n.data==="$~"}function jf(n){return n.data==="$!"||n.data==="$?"&&n.ownerDocument.readyState!=="loading"}function EE(n,s){var a=n.ownerDocument;if(n.data==="$~")n._reactRetry=s;else if(n.data!=="$?"||a.readyState!=="loading")s();else{var l=function(){s(),a.removeEventListener("DOMContentLoaded",l)};a.addEventListener("DOMContentLoaded",l),n._reactRetry=l}}function En(n){for(;n!=null;n=n.nextSibling){var s=n.nodeType;if(s===1||s===3)break;if(s===8){if(s=n.data,s==="$"||s==="$!"||s==="$?"||s==="$~"||s==="&"||s==="F!"||s==="F")break;if(s==="/$"||s==="/&")return null}}return n}var Df=null;function Vy(n){n=n.nextSibling;for(var s=0;n;){if(n.nodeType===8){var a=n.data;if(a==="/$"||a==="/&"){if(s===0)return En(n.nextSibling);s--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||s++}n=n.nextSibling}return null}function Gy(n){n=n.previousSibling;for(var s=0;n;){if(n.nodeType===8){var a=n.data;if(a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"){if(s===0)return n;s--}else a!=="/$"&&a!=="/&"||s++}n=n.previousSibling}return null}function Ky(n,s,a){switch(s=dc(a),n){case"html":if(n=s.documentElement,!n)throw Error(i(452));return n;case"head":if(n=s.head,!n)throw Error(i(453));return n;case"body":if(n=s.body,!n)throw Error(i(454));return n;default:throw Error(i(451))}}function yo(n){for(var s=n.attributes;s.length;)n.removeAttributeNode(s[0]);Lu(n)}var Tn=new Map,Fy=new Set;function fc(n){return typeof n.getRootNode=="function"?n.getRootNode():n.nodeType===9?n:n.ownerDocument}var Er=F.d;F.d={f:TE,r:AE,D:RE,C:OE,L:kE,m:CE,X:NE,S:xE,M:jE};function TE(){var n=Er.f(),s=rc();return n||s}function AE(n){var s=bi(n);s!==null&&s.tag===5&&s.type==="form"?ug(s):Er.r(n)}var Qi=typeof document>"u"?null:document;function Yy(n,s,a){var l=Qi;if(l&&typeof s=="string"&&s){var d=gn(s);d='link[rel="'+n+'"][href="'+d+'"]',typeof a=="string"&&(d+='[crossorigin="'+a+'"]'),Fy.has(d)||(Fy.add(d),n={rel:n,crossOrigin:a,href:s},l.querySelector(d)===null&&(s=l.createElement("link"),xt(s,"link",n),bt(s),l.head.appendChild(s)))}}function RE(n){Er.D(n),Yy("dns-prefetch",n,null)}function OE(n,s){Er.C(n,s),Yy("preconnect",n,s)}function kE(n,s,a){Er.L(n,s,a);var l=Qi;if(l&&n&&s){var d='link[rel="preload"][as="'+gn(s)+'"]';s==="image"&&a&&a.imageSrcSet?(d+='[imagesrcset="'+gn(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(d+='[imagesizes="'+gn(a.imageSizes)+'"]')):d+='[href="'+gn(n)+'"]';var p=d;switch(s){case"style":p=Xi(n);break;case"script":p=Wi(n)}Tn.has(p)||(n=g({rel:"preload",href:s==="image"&&a&&a.imageSrcSet?void 0:n,as:s},a),Tn.set(p,n),l.querySelector(d)!==null||s==="style"&&l.querySelector(vo(p))||s==="script"&&l.querySelector(bo(p))||(s=l.createElement("link"),xt(s,"link",n),bt(s),l.head.appendChild(s)))}}function CE(n,s){Er.m(n,s);var a=Qi;if(a&&n){var l=s&&typeof s.as=="string"?s.as:"script",d='link[rel="modulepreload"][as="'+gn(l)+'"][href="'+gn(n)+'"]',p=d;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":p=Wi(n)}if(!Tn.has(p)&&(n=g({rel:"modulepreload",href:n},s),Tn.set(p,n),a.querySelector(d)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(bo(p)))return}l=a.createElement("link"),xt(l,"link",n),bt(l),a.head.appendChild(l)}}}function xE(n,s,a){Er.S(n,s,a);var l=Qi;if(l&&n){var d=_i(l).hoistableStyles,p=Xi(n);s=s||"default";var v=d.get(p);if(!v){var w={loading:0,preload:null};if(v=l.querySelector(vo(p)))w.loading=5;else{n=g({rel:"stylesheet",href:n,"data-precedence":s},a),(a=Tn.get(p))&&Lf(n,a);var R=v=l.createElement("link");bt(R),xt(R,"link",n),R._p=new Promise(function(M,I){R.onload=M,R.onerror=I}),R.addEventListener("load",function(){w.loading|=1}),R.addEventListener("error",function(){w.loading|=2}),w.loading|=4,hc(v,s,l)}v={type:"stylesheet",instance:v,count:1,state:w},d.set(p,v)}}}function NE(n,s){Er.X(n,s);var a=Qi;if(a&&n){var l=_i(a).hoistableScripts,d=Wi(n),p=l.get(d);p||(p=a.querySelector(bo(d)),p||(n=g({src:n,async:!0},s),(s=Tn.get(d))&&Mf(n,s),p=a.createElement("script"),bt(p),xt(p,"link",n),a.head.appendChild(p)),p={type:"script",instance:p,count:1,state:null},l.set(d,p))}}function jE(n,s){Er.M(n,s);var a=Qi;if(a&&n){var l=_i(a).hoistableScripts,d=Wi(n),p=l.get(d);p||(p=a.querySelector(bo(d)),p||(n=g({src:n,async:!0,type:"module"},s),(s=Tn.get(d))&&Mf(n,s),p=a.createElement("script"),bt(p),xt(p,"link",n),a.head.appendChild(p)),p={type:"script",instance:p,count:1,state:null},l.set(d,p))}}function Zy(n,s,a,l){var d=(d=ge.current)?fc(d):null;if(!d)throw Error(i(446));switch(n){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(s=Xi(a.href),a=_i(d).hoistableStyles,l=a.get(s),l||(l={type:"style",instance:null,count:0,state:null},a.set(s,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){n=Xi(a.href);var p=_i(d).hoistableStyles,v=p.get(n);if(v||(d=d.ownerDocument||d,v={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},p.set(n,v),(p=d.querySelector(vo(n)))&&!p._p&&(v.instance=p,v.state.loading=5),Tn.has(n)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},Tn.set(n,a),p||DE(d,n,a,v.state))),s&&l===null)throw Error(i(528,""));return v}if(s&&l!==null)throw Error(i(529,""));return null;
vendor: 5,047 bytes, line 10
10case"script":return s=a.async,a=a.src,typeof a=="string"&&s&&typeof s!="function"&&typeof s!="symbol"?(s=Wi(a),a=_i(d).hoistableScripts,l=a.get(s),l||(l={type:"script",instance:null,count:0,state:null},a.set(s,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(i(444,n))}}function Xi(n){return'href="'+gn(n)+'"'}function vo(n){return'link[rel="stylesheet"]['+n+"]"}function Jy(n){return g({},n,{"data-precedence":n.precedence,precedence:null})}function DE(n,s,a,l){n.querySelector('link[rel="preload"][as="style"]['+s+"]")?l.loading=1:(s=n.createElement("link"),l.preload=s,s.addEventListener("load",function(){return l.loading|=1}),s.addEventListener("error",function(){return l.loading|=2}),xt(s,"link",a),bt(s),n.head.appendChild(s))}function Wi(n){return'[src="'+gn(n)+'"]'}function bo(n){return"script[async]"+n}function Qy(n,s,a){if(s.count++,s.instance===null)switch(s.type){case"style":var l=n.querySelector('style[data-href~="'+gn(a.href)+'"]');if(l)return s.instance=l,bt(l),l;var d=g({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return l=(n.ownerDocument||n).createElement("style"),bt(l),xt(l,"style",d),hc(l,a.precedence,n),s.instance=l;case"stylesheet":d=Xi(a.href);var p=n.querySelector(vo(d));if(p)return s.state.loading|=4,s.instance=p,bt(p),p;l=Jy(a),(d=Tn.get(d))&&Lf(l,d),p=(n.ownerDocument||n).createElement("link"),bt(p);var v=p;return v._p=new Promise(function(w,R){v.onload=w,v.onerror=R}),xt(p,"link",l),s.state.loading|=4,hc(p,a.precedence,n),s.instance=p;case"script":return p=Wi(a.src),(d=n.querySelector(bo(p)))?(s.instance=d,bt(d),d):(l=a,(d=Tn.get(p))&&(l=g({},a),Mf(l,d)),n=n.ownerDocument||n,d=n.createElement("script"),bt(d),xt(d,"link",l),n.head.appendChild(d),s.instance=d);case"void":return null;default:throw Error(i(443,s.type))}else s.type==="stylesheet"&&(s.state.loading&4)===0&&(l=s.instance,s.state.loading|=4,hc(l,a.precedence,n));return s.instance}function hc(n,s,a){for(var l=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),d=l.length?l[l.length-1]:null,p=d,v=0;v<l.length;v++){var w=l[v];if(w.dataset.precedence===s)p=w;else if(p!==d)break}p?p.parentNode.insertBefore(n,p.nextSibling):(s=a.nodeType===9?a.head:a,s.insertBefore(n,s.firstChild))}function Lf(n,s){n.crossOrigin==null&&(n.crossOrigin=s.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=s.referrerPolicy),n.title==null&&(n.title=s.title)}function Mf(n,s){n.crossOrigin==null&&(n.crossOrigin=s.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=s.referrerPolicy),n.integrity==null&&(n.integrity=s.integrity)}var pc=null;function Xy(n,s,a){if(pc===null){var l=new Map,d=pc=new Map;d.set(a,l)}else d=pc,l=d.get(a),l||(l=new Map,d.set(a,l));if(l.has(n))return l;for(l.set(n,null),a=a.getElementsByTagName(n),d=0;d<a.length;d++){var p=a[d];if(!(p[La]||p[Rt]||n==="link"&&p.getAttribute("rel")==="stylesheet")&&p.namespaceURI!=="http://www.w3.org/2000/svg"){var v=p.getAttribute(s)||"";v=n+v;var w=l.get(v);w?w.push(p):l.set(v,[p])}}return l}function Wy(n,s,a){n=n.ownerDocument||n,n.head.insertBefore(a,s==="title"?n.querySelector("head > title"):null)}function LE(n,s,a){if(a===1||s.itemProp!=null)return!1;switch(n){case"meta":case"title":return!0;case"style":if(typeof s.precedence!="string"||typeof s.href!="string"||s.href==="")break;return!0;case"link":if(typeof s.rel!="string"||typeof s.href!="string"||s.href===""||s.onLoad||s.onError)break;return s.rel==="stylesheet"?(n=s.disabled,typeof s.precedence=="string"&&n==null):!0;case"script":if(s.async&&typeof s.async!="function"&&typeof s.async!="symbol"&&!s.onLoad&&!s.onError&&s.src&&typeof s.src=="string")return!0}return!1}function ev(n){return!(n.type==="stylesheet"&&(n.state.loading&3)===0)}function ME(n,s,a,l){if(a.type==="stylesheet"&&(typeof l.media!="string"||matchMedia(l.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var d=Xi(l.href),p=s.querySelector(vo(d));if(p){s=p._p,s!==null&&typeof s=="object"&&typeof s.then=="function"&&(n.count++,n=mc.bind(n),s.then(n,n)),a.state.loading|=4,a.instance=p,bt(p);return}p=s.ownerDocument||s,l=Jy(l),(d=Tn.get(d))&&Lf(l,d),p=p.createElement("link"),bt(p);var v=p;v._p=new Promise(function(w,R){v.onload=w,v.onerror=R}),xt(p,"link",l),a.instance=p}n.stylesheets===null&&(n.stylesheets=new Map),n.stylesheets.set(a,s),(s=a.state.preload)&&(a.state.loading&3)===0&&(n.count++,a=mc.bind(n),s.addEventListener("load",a),s.addEventListener("error",a))}}var Uf=0;function UE(n,s){return n.stylesheets&&n.count===0&&yc(n,n.stylesheets),0<n.count||0<n.imgCount?function(a){var l=setTimeout(function(){if(n.stylesheets&&yc(n,n.stylesheets),n.unsuspend){var p=n.unsuspend;n.unsuspend=null,p()}},6e4+s);0<n.imgBytes&&Uf===0&&(Uf=62500*gE());var d=setTimeout(function(){if(n.waitingForImages=!1,n.count===0&&(n.stylesheets&&yc(n,n.stylesheets),n.unsuspend)){var p=n.unsuspend;n.unsuspend=null,p()}},(n.imgBytes>Uf?50:800)+s);return n.unsuspend=a,function(){n.unsuspend=null,clearTimeout(l),clearTimeout(d)}}:null}
vendor: 6,755 bytes, line 10
10function mc(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)yc(this,this.stylesheets);else if(this.unsuspend){var n=this.unsuspend;this.unsuspend=null,n()}}}var gc=null;function yc(n,s){n.stylesheets=null,n.unsuspend!==null&&(n.count++,gc=new Map,s.forEach(zE,n),gc=null,mc.call(n))}function zE(n,s){if(!(s.state.loading&4)){var a=gc.get(n);if(a)var l=a.get(null);else{a=new Map,gc.set(n,a);for(var d=n.querySelectorAll("link[data-precedence],style[data-precedence]"),p=0;p<d.length;p++){var v=d[p];(v.nodeName==="LINK"||v.getAttribute("media")!=="not all")&&(a.set(v.dataset.precedence,v),l=v)}l&&a.set(null,l)}d=s.instance,v=d.getAttribute("data-precedence"),p=a.get(v)||l,p===l&&a.set(null,d),a.set(v,d),this.count++,l=mc.bind(this),d.addEventListener("load",l),d.addEventListener("error",l),p?p.parentNode.insertBefore(d,p.nextSibling):(n=n.nodeType===9?n.head:n,n.insertBefore(d,n.firstChild)),s.state.loading|=4}}var _o={$$typeof:x,Provider:null,Consumer:null,_currentValue:ce,_currentValue2:ce,_threadCount:0};function PE(n,s,a,l,d,p,v,w,R){this.tag=1,this.containerInfo=n,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Ir(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ir(0),this.hiddenUpdates=Ir(null),this.identifierPrefix=l,this.onUncaughtError=d,this.onCaughtError=p,this.onRecoverableError=v,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=R,this.incompleteTransitions=new Map}function tv(n,s,a,l,d,p,v,w,R,M,I,V){return n=new PE(n,s,a,v,R,M,I,V,w),s=1,p===!0&&(s|=24),p=an(3,null,null,s),n.current=p,p.stateNode=n,s=pd(),s.refCount++,n.pooledCache=s,s.refCount++,p.memoizedState={element:l,isDehydrated:a,cache:s},vd(p),n}function nv(n){return n?(n=xi,n):xi}function rv(n,s,a,l,d,p){d=nv(d),l.context===null?l.context=d:l.pendingContext=d,l=Yr(s),l.payload={element:a},p=p===void 0?null:p,p!==null&&(l.callback=p),a=Zr(n,l,s),a!==null&&(en(a,n,s),Qa(a,n,s))}function sv(n,s){if(n=n.memoizedState,n!==null&&n.dehydrated!==null){var a=n.retryLane;n.retryLane=a!==0&&a<s?a:s}}function zf(n,s){sv(n,s),(n=n.alternate)&&sv(n,s)}function iv(n){if(n.tag===13||n.tag===31){var s=Hs(n,67108864);s!==null&&en(s,n,67108864),zf(n,67108864)}}function av(n){if(n.tag===13||n.tag===31){var s=dn();s=gi(s);var a=Hs(n,s);a!==null&&en(a,n,s),zf(n,s)}}var vc=!0;function BE(n,s,a,l){var d=j.T;j.T=null;var p=F.p;try{F.p=2,Pf(n,s,a,l)}finally{F.p=p,j.T=d}}function IE(n,s,a,l){var d=j.T;j.T=null;var p=F.p;try{F.p=8,Pf(n,s,a,l)}finally{F.p=p,j.T=d}}function Pf(n,s,a,l){if(vc){var d=Bf(l);if(d===null)Tf(n,s,l,bc,a),lv(n,l);else if($E(d,n,s,a,l))l.stopPropagation();else if(lv(n,l),s&4&&-1<HE.indexOf(n)){for(;d!==null;){var p=bi(d);if(p!==null)switch(p.tag){case 3:if(p=p.stateNode,p.current.memoizedState.isDehydrated){var v=qn(p.pendingLanes);if(v!==0){var w=p;for(w.pendingLanes|=2,w.entangledLanes|=2;v;){var R=1<<31-jt(v);w.entanglements[1]|=R,v&=~R}Fn(p),(He&6)===0&&(tc=Bt()+500,po(0))}}break;case 31:case 13:w=Hs(p,2),w!==null&&en(w,p,2),rc(),zf(p,2)}if(p=Bf(l),p===null&&Tf(n,s,l,bc,a),p===d)break;d=p}d!==null&&l.stopPropagation()}else Tf(n,s,l,null,a)}}function Bf(n){return n=Iu(n),If(n)}var bc=null;function If(n){if(bc=null,n=vi(n),n!==null){var s=c(n);if(s===null)n=null;else{var a=s.tag;if(a===13){if(n=u(s),n!==null)return n;n=null}else if(a===31){if(n=f(s),n!==null)return n;n=null}else if(a===3){if(s.stateNode.current.memoizedState.isDehydrated)return s.tag===3?s.stateNode.containerInfo:null;n=null}else s!==n&&(n=null)}}return bc=n,null}function ov(n){switch(n){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(xu()){case js:return 2;case dl:return 8;case Ds:case ja:return 32;case ir:return 268435456;default:return 32}default:return 32}}var Hf=!1,as=null,os=null,ls=null,wo=new Map,So=new Map,cs=[],HE="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 lv(n,s){switch(n){case"focusin":case"focusout":as=null;break;case"dragenter":case"dragleave":os=null;break;case"mouseover":case"mouseout":ls=null;break;case"pointerover":case"pointerout":wo.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":So.delete(s.pointerId)}}function Eo(n,s,a,l,d,p){return n===null||n.nativeEvent!==p?(n={blockedOn:s,domEventName:a,eventSystemFlags:l,nativeEvent:p,targetContainers:[d]},s!==null&&(s=bi(s),s!==null&&iv(s)),n):(n.eventSystemFlags|=l,s=n.targetContainers,d!==null&&s.indexOf(d)===-1&&s.push(d),n)}function $E(n,s,a,l,d){switch(s){case"focusin":return as=Eo(as,n,s,a,l,d),!0;case"dragenter":return os=Eo(os,n,s,a,l,d),!0;case"mouseover":return ls=Eo(ls,n,s,a,l,d),!0;case"pointerover":var p=d.pointerId;return wo.set(p,Eo(wo.get(p)||null,n,s,a,l,d)),!0;case"gotpointercapture":return p=d.pointerId,So.set(p,Eo(So.get(p)||null,n,s,a,l,d)),!0}return!1}function cv(n){var s=vi(n.target);if(s!==null){var a=c(s);if(a!==null){if(s=a.tag,s===13){if(s=u(a),s!==null){n.blockedOn=s,Ep(n.priority,function(){av(a)});return}}else if(s===31){if(s=f(a),s!==null){n.blockedOn=s,Ep(n.priority,function(){av(a)});return}}else if(s===3&&a.stateNode.current.memoizedState.isDehydrated){n.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}n.blockedOn=null}
10function _c(n){if(n.blockedOn!==null)return!1;for(var s=n.targetContainers;0<s.length;){var a=Bf(n.nativeEvent);if(a===null){a=n.nativeEvent;var l=new a.constructor(a.type,a);Bu=l,a.target.dispatchEvent(l),Bu=null}else return s=bi(a),s!==null&&iv(s),n.blockedOn=a,!1;s.shift()}return!0}function uv(n,s,a){_c(n)&&a.delete(s)}function qE(){Hf=!1,as!==null&&_c(as)&&(as=null),os!==null&&_c(os)&&(os=null),ls!==null&&_c(ls)&&(ls=null),wo.forEach(uv),So.forEach(uv)}function wc(n,s){n.blockedOn===s&&(n.blockedOn=null,Hf||(Hf=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,qE)))}var Sc=null;function dv(n){Sc!==n&&(Sc=n,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Sc===n&&(Sc=null);for(var s=0;s<n.length;s+=3){var a=n[s],l=n[s+1],d=n[s+2];if(typeof l!="function"){if(If(l||a)===null)continue;break}var p=bi(a);p!==null&&(n.splice(s,3),s-=3,Pd(p,{pending:!0,data:d,method:a.method,action:l},l,d))}}))}function ea(n){function s(R){return wc(R,n)}as!==null&&wc(as,n),os!==null&&wc(os,n),ls!==null&&wc(ls,n),wo.forEach(s),So.forEach(s);for(var a=0;a<cs.length;a++){var l=cs[a];l.blockedOn===n&&(l.blockedOn=null)}for(;0<cs.length&&(a=cs[0],a.blockedOn===null);)cv(a),a.blockedOn===null&&cs.shift();if(a=(n.ownerDocument||n).$$reactFormReplay,a!=null)for(l=0;l<a.length;l+=3){var d=a[l],p=a[l+1],v=d[Yt]||null;if(typeof p=="function")v||dv(a);else if(v){var w=null;if(p&&p.hasAttribute("formAction")){if(d=p,v=p[Yt]||null)w=v.formAction;else if(If(d)!==null)continue}else w=v.action;typeof w=="function"?a[l+1]=w:(a.splice(l,3),l-=3),dv(a)}}}function fv(){function n(p){p.canIntercept&&p.info==="react-transition"&&p.intercept({handler:function(){return new Promise(function(v){return d=v})},focusReset:"manual",scroll:"manual"})}function s(){d!==null&&(d(),d=null),l||setTimeout(a,20)}function a(){if(!l&&!navigation.transition){var p=navigation.currentEntry;p&&p.url!=null&&navigation.navigate(p.url,{state:p.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var l=!1,d=null;return navigation.addEventListener("navigate",n),navigation.addEventListener("navigatesuccess",s),navigation.addEventListener("navigateerror",s),setTimeout(a,100),function(){l=!0,navigation.removeEventListener("navigate",n),navigation.removeEventListener("navigatesuccess",s),navigation.removeEventListener("navigateerror",s),d!==null&&(d(),d=null)}}}function $f(n){this._internalRoot=n}Ec.prototype.render=$f.prototype.render=function(n){var s=this._internalRoot;if(s===null)throw Error(i(409));var a=s.current,l=dn();rv(a,l,n,s,null,null)},Ec.prototype.unmount=$f.prototype.unmount=function(){var n=this._internalRoot;if(n!==null){this._internalRoot=null;var s=n.containerInfo;rv(n.current,2,null,n,null,null),rc(),s[yi]=null}};function Ec(n){this._internalRoot=n}Ec.prototype.unstable_scheduleHydration=function(n){if(n){var s=ju();n={blockedOn:null,target:n,priority:s};for(var a=0;a<cs.length&&s!==0&&s<cs[a].priority;a++);cs.splice(a,0,n),a===0&&cv(n)}};var hv=e.version;if(hv!=="19.2.6")throw Error(i(527,hv,"19.2.6"));F.findDOMNode=function(n){var s=n._reactInternals;if(s===void 0)throw typeof n.render=="function"?Error(i(188)):(n=Object.keys(n).join(","),Error(i(268,n)));return n=m(s),n=n!==null?y(n):null,n=n===null?null:n.stateNode,n};var VE={bundleType:0,version:"19.2.6",rendererPackageName:"react-dom",currentDispatcherRef:j,reconcilerVersion:"19.2.6"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Tc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Tc.isDisabled&&Tc.supportsFiber)try{Ls=Tc.inject(VE),It=Tc}catch{}}return Ao.createRoot=function(n,s){if(!o(n))throw Error(i(299));var a=!1,l="",d=_g,p=wg,v=Sg;return s!=null&&(s.unstable_strictMode===!0&&(a=!0),s.identifierPrefix!==void 0&&(l=s.identifierPrefix),s.onUncaughtError!==void 0&&(d=s.onUncaughtError),s.onCaughtError!==void 0&&(p=s.onCaughtError),s.onRecoverableError!==void 0&&(v=s.onRecoverableError)),s=tv(n,1,!1,null,null,a,l,null,d,p,v,fv),n[yi]=s.current,Ef(n),new $f(s)},Ao.hydrateRoot=function(n,s,a){if(!o(n))throw Error(i(299));var l=!1,d="",p=_g,v=wg,w=Sg,R=null;return a!=null&&(a.unstable_strictMode===!0&&(l=!0),a.identifierPrefix!==void 0&&(d=a.identifierPrefix),a.onUncaughtError!==void 0&&(p=a.onUncaughtError),a.onCaughtError!==void 0&&(v=a.onCaughtError),a.onRecoverableError!==void 0&&(w=a.onRecoverableError),a.formState!==void 0&&(R=a.formState)),s=tv(n,1,!0,s,a??null,l,d,R,p,v,w,fv),s.context=nv(null),a=s.current,l=dn(),l=gi(l),d=Yr(l),d.callback=null,Zr(a,d,l),a=l,s.current.lanes=a,tt(s,a),Fn(s),n[yi]=s.current,Ef(n),new Ec(s)},Ao.version="19.2.6",Ao}var Ev;function WE(){if(Ev)return Gf.exports;Ev=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),Gf.exports=XE(),Gf.exports}var eT=WE(),tT="__TSS_CONTEXT",bh=Symbol.for("TSS_SERVER_FUNCTION"),xD=Symbol.for("TSS_SERVER_FUNCTION_FACTORY"),nT="application/x-tss-framed",bb=()=>window.__TSS_START_OPTIONS__;function rT(t={}){if(t.isNotFound=!0,t.throw)throw t;return t}function li(t){return t?.isNotFound===!0}function Qh(t){t.statusCode=t.statusCode||t.code||307;const e=new Headers(t.headers);t.href&&e.get("Location")===null&&e.set("Location",t.href);const r=new Response(null,{status:t.statusCode,headers:e});if(r.options=t,t.throw)throw r;return r}function _b(t){return t instanceof Response&&!!t.options}function sT(t){if(t!==null&&typeof t=="object"&&t.isSerializedRedirect)return Qh(t)}function iT(t){return t.replaceAll("\0","/").replaceAll("�","/").replace(/~([~0r])/g,(e,r)=>r==="0"?"\0":r==="r"?"�":r)}const Tv=!1;function ws(t){return t[t.length-1]}function wb(t,e){return typeof t=="function"?t(e):t}const Xh=Object.prototype.hasOwnProperty;function Sb(t){for(const e in t)if(Xh.call(t,e))return!0;return!1}const qc=()=>Object.create(null),ta=(t,e)=>vs(t,e,!0);function vs(t,e,r,i=0){if(t===e)return t;if(i++>500)return e;const o=Array.isArray(t)&&Array.isArray(e);if(!o&&!(Qc(t)&&Qc(e)))return e;const c=Object.keys(t),u=c.length,f=Object.keys(e),h=f.length;if(o?u!==t.length||h!==e.length||u&&ws(c)!==`${u-1}`||h&&ws(f)!==`${h-1}`:u!==Object.getOwnPropertyNames(t).length||h!==Object.getOwnPropertyNames(e).length||Object.getOwnPropertySymbols(e).length)return e;let m=0,y,g,b;if(o){for(;m<h&&(b=m,g=t[b],y=e[b],y=g===y?g:typeof g=="object"?vs(g,y,r,i):y,y===g);m++);if(m===h&&u===h)return t}else{let S=u===h,E=!0;for(;m<h;m++){b=f[m],g=t[b];const A=e[b];y=g===A?g:typeof g=="object"?vs(g,A,r,i):A,S&&=y===g&&(c[m]===b||Xh.call(t,b)),E&&=Object.is(y,A),c[m]=y}if(S)return Object.getOwnPropertySymbols(t).length?e:t;if(E)return e}const _=o?f.fill(0):r?qc():{};for(let S=0;S<h;S++)b=o?S:f[S],o?(g=t[b],S>m&&(y=e[b],y=g===y?g:typeof g=="object"?vs(g,y,r,i):y),_[b]=S<m?g:y):_[b]=c[S];return _}function Qc(t){return!t||typeof t!="object"?!1:(Object.getPrototypeOf(t)?.constructor??Object)===Object}function Hn(t,e,r,i){if(t===e)return!0;
10if(Array.isArray(t)&&Array.isArray(e)){if(t.length!==e.length)return!1;for(let o=0,c=t.length;o<c;o++){const u=t[o],f=e[o];if(u!==f&&!Hn(u,f,r,i))return!1}return!0}if(Qc(t)&&Qc(e)){if(r){for(const c in e)if((i||e[c]!==void 0)&&!Hn(t[c],e[c],r,i))return!1;return!0}let o=0;if(i)o=Object.keys(t).length;else for(const c in t)t[c]!==void 0&&o++;for(const c in e)if((i||e[c]!==void 0)&&(o--===0||!Hn(t[c],e[c],r,i)))return!1;return o===0}return!1}function aT(t){return typeof t?.message!="string"?!1:t.message.startsWith("Failed to fetch dynamically imported module")||t.message.startsWith("error loading dynamically imported module")||t.message.startsWith("Importing a module script failed")}const oT=/[\x00-\x1f\x7f"<>`{}]/g;function lT(t){return t.replace(oT,e=>"%"+e.charCodeAt(0).toString(16).toUpperCase().padStart(2,"0"))}function Av(t){let e;try{e=decodeURI(t)}catch{e=t.replaceAll(/%[0-9A-F]{2}/gi,r=>{try{return decodeURI(r)}catch{return r}})}return lT(e)}const cT=["http:","https:","mailto:","tel:"];function Ho(t){if(t[0]!=="/"&&t.includes(":"))return/^[\x00-\x20]*([a-z][a-z\d+.\t\n\r-]*:)/i.exec(t)?.[1]?.replace(/[\t\n\r]/g,"").toLowerCase()}const Eb=/^[\x00-\x20]*[\\/][\t\n\r]*[\\/]/;function Tb(t,e){if(!t)return!1;if(Eb.test(t))return!0;const r=Ho(t);return r?!e.has(r):!1}const uT={"&":"\\u0026",">":"\\u003e","<":"\\u003c","\u2028":"\\u2028","\u2029":"\\u2029"},dT=/[&><\u2028\u2029]/g;function fT(t){return t.replace(dT,e=>uT[e])}function Ro(t){if(!t)return t;let e=t;if(/[%\\\x00-\x1f\x7f]/.test(t)){const r=/%25|%5C/gi;let i=0,o;for(e="";(o=r.exec(t))!==null;)e+=Av(t.slice(i,o.index))+o[0],i=r.lastIndex;e+=Av(i?t.slice(i):t)}return e}function hT(t){return/[\s\u0080-\uFFFF]/.test(t)?t.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):t}function pT(t,e){if(t===e)return!0;if(t.length!==e.length)return!1;for(let r=0;r<t.length;r++)if(t[r]!==e[r])return!1;return!0}function ya(t){return t.replace(/\/{2,}/g,"/")}function Ab(t){return t==="/"?t:t.replace(/^\/+/,"")}function Wn(t){const e=t.length;return e>1&&t[e-1]==="/"?t.replace(/\/+$/,""):t}function Rb(t){return Wn(Ab(t))}function Rv(t,e){return t?.endsWith("/")&&t!=="/"&&t!==`${e}/`?t.slice(0,-1):t}function Ov(t,e,r="never",i){if(e.includes("//")&&(e=ya(e)),e.startsWith("/"))return e.length===1||r==="preserve"?e:r==="always"?e.endsWith("/")?e:`${e}/`:e.endsWith("/")?e.slice(0,-1):e;const o=e===".";let c;if(i){c=o?t:t+"\0"+e;const m=i.get(c);if(m)return m}let u;if(o)u=t.split("/");else{for(t.includes("//")&&(t=ya(t)),u=t.split("/");u.length>1&&ws(u)==="";)u.pop();const m=e.split("/");for(let y=0,g=m.length;y<g;y++){const b=m[y];
10b===""?y?y===g-1&&u.push(b):u=[b]:b===".."?u.length>1?u.pop():u=[""]:b==="."||u.push(b)}}u.length>1&&(ws(u)===""?r==="never"&&u.pop():r==="always"&&u.push(""));const f=u.join("/"),h=(o?ya(f):f)||"/";return c&&i&&i.set(c,h),h}function mT(t){const e=new Map(t.map(i=>[encodeURIComponent(i),i])),r=new RegExp([...e.keys()].join("|").replace(/[.*()]/g,"\\$&"),"g");return i=>i.replace(r,o=>e.get(o)??o)}function gT(t){return t==null||t===""}function yT(t,e,r){if(typeof e!="string")return""+(e??void 0);const i=t==="_splat";if(i&&(!e||/^[a-zA-Z0-9\-._~!/]*$/.test(e)))return e;let o=encodeURIComponent(e);return i&&(o=o.replaceAll("%2F","/")),r?r(o):o}function kv(t,e,r,i,o){const c=t.endsWith("/")?"/":"";let u="";for(const f of e){if(typeof f=="string"){u+=f;continue}const[h,m,y,g]=f,b=h===2,_=b&&g!==void 0?g+c:g;let S=r[m];if(!(h===3&&S==null)){if(o&&(o[m]=S,b&&(o["*"]=S)),b&&gT(S)){if(y==="/"&&!_)continue;S=""}u+=y+yT(m,S,i)+(_||"")}}return u+c||"/"}function Xc(t){const e=new Map;let r,i;return{get(o){const c=e.get(o);if(c)return c.visited=!0,c.value},set(o,c){const u=e.get(o);if(u){u.value=c;return}if(e.size>=t){let h=r?.next().value;for(;!h||h.visited;)h?h.visited=!1:r=e.values(),h=r.next().value;h===i&&(r=void 0),e.delete(h.key)}const f={key:o,value:c,visited:!1};i=f,e.set(o,f)},clear(){e.clear(),r=void 0,i=void 0}}}function $o(){throw new Error("Invariant failed")}const gs=4,Ob=5;function vT(t){const e=t.names;if(e)return e;const r=[];for(const i of t)typeof i!="string"&&r.push(i[1]);return t.names=r}function bT(t,e,r){const i=t.substring(e,r);if(i.charCodeAt(0)===36)return i.length===1?[2,"_splat","",void 0]:[1,i.substring(1),"",""];const o=i.indexOf("{");if(o>=0){const c=i.indexOf("}",o),u=i.charCodeAt(o+1)===45,f=o+(u?3:2);if(c>=0&&i.charCodeAt(f-1)===36&&(!u||f<c)){const h=i.substring(f,c);return[u?3:h?1:2,h||"_splat",i.substring(0,o),t.substring(e+c+1,h?r:t.length)]}}return i}
10function qo(t,e,r,i,o,c){let u=r;const f=e.fullPath??e.from,h=e.options,m=f.length,y=f.endsWith("/")?m-1:m,g=h?.caseSensitive??t,b=h?.params?.parse??h?.parseParams;let _,S=c?r-1:0;if(!i||f.includes("$")){_=c?.slice()??[];const T=ws(_);T&&typeof T!="string"&&T[0]===2&&(_[_.length-1]=[T[0],T[1],T[2],T[3]===void 0?void 0:T[3]+f.substring(r-(f[r-2]==="/"?2:1),y)],S=m)}for(;u<m;){const T=u,C=f.indexOf("/",T);let x=C===-1?m:C;const B=bT(f,T,x);u=x+1;let Z;if(typeof B=="string"){if(!i)continue;let z=B,D;g?D=i.static??=new Map:(z=B.toLowerCase(),D=i.staticInsensitive??=new Map);const Y=D.get(z);if(Y)Z=Y;else{const ne=ri(i);Z=ne,D.set(z,ne)}}else{const z=B[0];let D=B[2],Y=B[3]??"";if(z===2&&(x=m,u=x+1),_&&S<x&&(S<T-1&&_.push(f.substring(S,T-1)),B[2]="/"+D,z===2&&B[3]!==void 0&&y<m&&(B[3]=Y.slice(0,-1)),_.push(B),S=x),!i)continue;const ne=g&&!!(D||Y);g||(D=D.toLowerCase(),Y=Y.toLowerCase());const de=z===1?i.dynamic??=[]:z===3?i.optional??=[]:i.wildcard??=[],G=z!==2&&!b&&de.find(K=>!K.parse&&K.caseSensitive===ne&&K.prefix===D&&K.suffix===Y);if(G)Z=G;else{const K=ri(i,z,ne,D,Y);Z=K,de.push(K),de.length===2&&o?.push(de)}}i=Z}_&&S<y&&_.push(f.substring(S,y));const E=_?.slice();if(!i)return E;if(b&&e.children&&!e.isRoot&&e.id&&e.id.charCodeAt(e.id.lastIndexOf("/")+1)===95){const T=ri(i,Ob);(i.pathless??=[]).push(T),i=T}const A=(e.path||!e.children)&&!e.isRoot;if(A&&y<m){const T=ri(i,gs);i.index=T,i=T}return i.parse=b??null,i.priority=h?.params?.priority??0,i.route||(i.data=E,A&&(i.route=e)),[i,u,E]}function kb(t,e){if(t.parse&&!e.parse)return-1;if(!t.parse&&e.parse)return 1;if(t.parse&&e.parse&&(t.priority||e.priority))return e.priority-t.priority;if(t.prefix&&e.prefix&&t.prefix!==e.prefix){if(t.prefix.startsWith(e.prefix))return-1;if(e.prefix.startsWith(t.prefix))return 1}if(t.suffix&&e.suffix&&t.suffix!==e.suffix){if(t.suffix.endsWith(e.suffix))return-1;if(e.suffix.endsWith(t.suffix))return 1}return t.prefix&&!e.prefix?-1:!t.prefix&&e.prefix?1:t.suffix&&!e.suffix?-1:!t.suffix&&e.suffix?1:t.caseSensitive&&!e.caseSensitive?-1:!t.caseSensitive&&e.caseSensitive?1:0}function ri(t,e=0,r,i,o){return{kind:e,depth:t?t.depth+1:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,data:void 0,parent:t,parse:null,priority:0,caseSensitive:r,prefix:i,suffix:o}}function _T(t,e){const r=ri(),i=[];function o(c,u,f,h){const[m,y,g]=qo(!1,c,u,f,i,h);if(c.children)for(const b of c.children)o(b,y,m,g)}for(const c of t)o(c,1,r);for(const c of i)c.sort(kb);e.masksTree=r,e.flatCache=Xc(1e3)}function wT(t,e){t||="/";const r=e.flatCache.get(t);if(r!==void 0)return r;const i=Wh(t,e.masksTree);return e.flatCache.set(t,i),i}function ST(t,e,r,i,o){t||="/",i||="/";const c=e?`case\0${t}`:t;let u=o.singleCache.get(c);return u||(u=ri(),qo(e,{from:t},1,u),o.singleCache.set(c,u)),Wh(i,u,r)}function ET(t,e,r=!1){const i=r?t:`nofuzz\0${t}`,o=e.matchCache.get(i);if(o!==void 0)return o;t||="/";let c;try{c=Wh(t,e.segmentTree,r)}catch(u){if(u instanceof URIError)c=null;else throw u}return c&&(c.branch=xb(c.route)),e.matchCache.set(i,c),c}function TT(t,e=!1){const r=ri(),i=[],o={},c={};let u=0;function f(h,m,y,g){if(h.init(u),h.id in o&&$o(),o[h.id]=h,u!==0&&h.path){const E=Wn(h.fullPath);(!c[E]||h.fullPath.endsWith("/"))&&(c[E]=h)}u++;const[b,_,S]=qo(e,h,m,y,i,g);if(h._interpolation=S,h.children)for(const E of h.children)f(E,_,b,S)}f(t,1,r);for(const h of i)h.sort(kb);return{processedTree:{segmentTree:r,singleCache:Xc(1e3),matchCache:Xc(1e3),flatCache:null,masksTree:null},routesById:o,routesByPath:c}}function Wh(t,e,r=!1){const i=t.split("/"),o=RT(t,i,e,r);if(!o)return null;const[c]=Cb(t,i,o);return{route:o.node.route,rawParams:c}}function Cb(t,e,r){const i=AT(r.node),o=r.node.data&&vT(r.node.data),c=Object.create(null);let u=r.extract?.part??0,f=r.extract?.node??0,h=r.extract?.path??0,m=r.extract?.param??0;for(;f<i.length;u++,f++,h++){const y=i[f];if(y.kind===gs)break;if(y.kind===Ob){u--,h--;continue}const g=e[u],b=h;if(g&&(h+=g.length),y.kind===1||y.kind===3){const _=o[m++];if(y.kind===3&&r.skipped&1<<f){u--,h=b-1;continue}const S=y.suffix||y.prefix?g.substring(y.prefix.length,g.length-y.suffix.length):g;(S||y.kind===1)&&(c[_]=decodeURIComponent(S))}else if(y.kind===2){const _=y,S=t.substring(b+_.prefix.length,t.length-_.suffix.length),E=decodeURIComponent(S);c["*"]=E,c._splat=E;break}}return r.rawParams&&Object.assign(c,r.rawParams),[c,{part:u,node:f,path:h,param:m}]}function xb(t){const e=[t];for(;t.parentRoute;)t=t.parentRoute,e.push(t);return e.reverse(),e}function AT(t){const e=Array(t.depth+1);do e[t.depth]=t,t=t.parent;while(t);return e}function RT(t,e,r,i){if(t==="/"&&r.index)return{node:r.index,skipped:0};const o=!ws(e),c=o&&t!=="/",u=e.length-(o?1:0),f=[{node:r,index:1,skipped:0,statics:0,dynamics:0,optionals:0}];let h=null,m=null;for(;f.length;){const y=f.pop(),{node:g,index:b,skipped:_,statics:S,dynamics:E,optionals:A}=y;let{extract:T,rawParams:C}=y;if(g.kind===2&&g.route&&!Rc(m,y))continue;if(g.parse){if(!Cv(t,e,y))continue;C=y.rawParams,T=y.extract}i&&g.route&&g.kind!==gs&&Rc(h,y)&&(h=y);const x=b===u;if(x&&(g.route&&(!c||g.kind===gs||g.kind===2)&&Rc(m,y)&&(m=y),!g.optional&&!g.wildcard&&!g.index&&!g.pathless))continue;const B=x?void 0:e[b];let Z;if(x&&g.index){const z={node:g.index,index:b,skipped:_,statics:S,dynamics:E,optionals:A,extract:T,rawParams:C};let D=!0;if(g.index.parse&&(Cv(t,e,z)||(D=!1)),D){if(!E&&!A&&!_&&OT(S,u))return z;Rc(m,z)&&(m=z)}}if(g.wildcard)for(let z=g.wildcard.length-1;z>=0;z--){const D=g.wildcard[z],{prefix:Y,suffix:ne}=D;if(!(Y&&(x||!(D.caseSensitive?B:Z??=B.toLowerCase()).startsWith(Y)))){if(ne){if(x)continue;const de=e.slice(b).join("/"),G=de.slice(-ne.length);if((D.caseSensitive?G:G.toLowerCase())!==ne||de.length-ne.length<Y.length)continue}f.push({node:D,index:u,skipped:_,statics:S,dynamics:E,optionals:A,extract:T,rawParams:C})}}if(g.optional){const z=_|1<<g.depth+1;for(let D=g.optional.length-1;D>=0;D--){const Y=g.optional[D];f.push({node:Y,index:b,skipped:z,statics:S,dynamics:E,optionals:A,extract:T,rawParams:C})}if(!x)for(let D=g.optional.length-1;D>=0;D--){const Y=g.optional[D],{prefix:ne,suffix:de}=Y;if(ne||de){const G=Y.caseSensitive?B:Z??=B.toLowerCase();if(ne&&!G.startsWith(ne)||de&&G.indexOf(de,G.length-de.length)<ne.length)continue}f.push({node:Y,index:b+1,skipped:_,statics:S,dynamics:E,optionals:A+Ac(u,b),extract:T,rawParams:C})}}if(!x&&g.dynamic&&B)for(let z=g.dynamic.length-1;z>=0;z--){const D=g.dynamic[z],{prefix:Y,suffix:ne}=D;if(Y||ne){const de=D.caseSensitive?B:Z??=B.toLowerCase();if(Y&&!de.startsWith(Y)||ne&&de.indexOf(ne,de.length-ne.length)<Y.length)continue}f.push({node:D,index:b+1,skipped:_,statics:S,dynamics:E+Ac(u,b),optionals:A,extract:T,rawParams:C})}
10if(!x&&g.staticInsensitive){const z=g.staticInsensitive.get(Z??=B.toLowerCase());z&&f.push({node:z,index:b+1,skipped:_,statics:S+Ac(u,b),dynamics:E,optionals:A,extract:T,rawParams:C})}if(!x&&g.static){const z=g.static.get(B);z&&f.push({node:z,index:b+1,skipped:_,statics:S+Ac(u,b),dynamics:E,optionals:A,extract:T,rawParams:C})}if(g.pathless)for(let z=g.pathless.length-1;z>=0;z--){const D=g.pathless[z];f.push({node:D,index:b,skipped:_,statics:S,dynamics:E,optionals:A,extract:T,rawParams:C})}}if(m)return m;if(i&&h){let y=h.index;for(let b=0;b<h.index;b++)y+=e[b].length;const g=y===t.length?"/":t.slice(y);return h.rawParams??=Object.create(null),h.rawParams["**"]=decodeURIComponent(g),h}return null}function Ac(t,e){return 2**(t-e-1)}function OT(t,e){return t===2**(e-1)-1}function Cv(t,e,r){let i,o;try{[i,o]=Cb(t,e,r)}catch{return null}if(r.rawParams=i,r.extract=o,!r.node.parse)return!0;try{if(r.node.parse(i)===!1)return null}catch{}return!0}function Rc(t,e){return t?e.statics>t.statics||e.statics===t.statics&&(e.dynamics>t.dynamics||e.dynamics===t.dynamics&&(e.optionals>t.optionals||e.optionals===t.optionals&&((e.node.kind===gs)>(t.node.kind===gs)||e.node.kind===gs==(t.node.kind===gs)&&e.node.depth>t.node.depth))):!0}function kT(){try{return sessionStorage}catch{return}}const CT="tsr-scroll-restoration-v1_3",Nb=kT();function xT(){try{return JSON.parse(Nb?.getItem("tsr-scroll-restoration-v1_3")||"{}")}catch{return{}}}const na=xT(),xv="data-scroll-restoration-id",NT=t=>t.state.__TSR_key||t.href;function jT(t){const e=t.getAttribute(xv);if(e)return`[${xv}="${e}"]`;let r="",i=t,o;for(;o=i.parentNode;){let c=1,u=i;for(;u=u.previousElementSibling;)c++;const f=`${i.localName}:nth-child(${c})`;r=r?`${f} > ${r}`:f,i=o}return r}let Oc=!1;const Vc="window";function _h(t){try{return typeof t=="function"?t():document.querySelector(t)}catch{}}function Nv(t){const e=new Set;for(const r of t){if(r===Vc)continue;const i=_h(r);i&&e.add(i)}return e}function DT(t,e){const r=t.options.scrollRestoration,i=t._scroll;r&&(i.e=!0);const o=t.options.getScrollRestorationKey||NT,c=new Set,u=f=>{const h=na[f]||={};for(const m of c)m===document?h[Vc]={scrollX,scrollY}:m.isConnected&&(h[jT(m)]={scrollX:m.scrollLeft,scrollY:m.scrollTop})};r&&!i.s&&(i.s=!0,Oc=!1,history.scrollRestoration="manual",document.addEventListener("scroll",f=>{Oc||c.add(f.target)},!0),t.subscribe("onBeforeLoad",f=>{f.fromLocation&&u(o(f.fromLocation)),c.clear()}),addEventListener("pagehide",()=>{history.scrollRestoration="auto",u(o(t.stores.resolvedLocation.get()??t.stores.location.get()));try{Nb?.setItem(CT,JSON.stringify(na))}catch{}}),addEventListener("pageshow",f=>{f.persisted&&(history.scrollRestoration="manual")})),!i.r&&(i.r=!0,t.subscribe("onRendered",f=>{const h=t.options.scrollRestorationBehavior,m=t.options.scrollToTopSelectors,y=i.n,g=i.h;let b;if(c.clear(),i.n=!0,i.h=!1,typeof t.options.scrollRestoration=="function"&&!t.options.scrollRestoration({location:t.latestLocation}))return;const _=o(f.toLocation),S=f.fromLocation&&o(f.fromLocation);if(i.e&&S&&S!==_){const E=na[S];if(E){let A=na[_];for(const T in E){if(T===Vc){if(y)continue}else{const C=_h(T);if(!C||y&&m&&(b??=Nv(m),b.has(C)))continue}A||(A=na[_]={}),A[T]??=E[T]}}}Oc=!0;try{const E=f.toLocation.hash,A=f.toLocation.state.__hashScrollIntoViewOptions??!0;let T=!1;if(y){!E&&m&&(b??=Nv(m));const C=E&&A&&g,x=i.e?na[_]:void 0;if(x)for(const B in x){const{scrollX:Z,scrollY:z}=x[B];if(B===Vc){if(C)continue;scrollTo({top:z,left:Z,behavior:h}),T=!0}else{const D=_h(B);D&&(D.scrollLeft=Z,D.scrollTop=z,b?.delete(D))}}if(!E){const B={top:0,left:0,behavior:h};if(T||scrollTo(B),b)for(const Z of b)Z.scrollTo(B)}}!T&&E&&A&&document.getElementById(E)?.scrollIntoView(A)}finally{Oc=!1}}))}function jb(t,e=String){let r;for(const i in t){const o=t[i];o!==void 0&&(r||=new URLSearchParams).set(i,e(o))}return r?r.toString():""}function Zf(t){return t?t==="false"?!1:t==="true"?!0:+t*0===0&&+t+""===t?+t:t:""}function LT(t){const e=new URLSearchParams(t),r=Object.create(null);for(const[i,o]of e.entries()){const c=r[i];c==null?r[i]=Zf(o):Array.isArray(c)?c.push(Zf(o)):r[i]=[c,Zf(o)]}return r}const Db=/^(?:\s|["[{\d-]|fa|nu|tr)/,MT=zT(JSON.parse),UT=PT(JSON.stringify,JSON.parse);function zT(t){const e=t===JSON.parse;return r=>{r[0]==="?"&&(r=r.substring(1));const i=LT(r);for(const o in i){const c=i[o];if(typeof c=="string"){if(e&&!Db.test(c))continue;try{i[o]=t(c)}catch{}}}return i}}function PT(t,e){const r=e===JSON.parse;function i(o){if(o&&typeof o=="object")try{return t(o)}catch{}
10else if(e&&typeof o=="string"){if(r&&!Db.test(o))return o;try{return e(o),t(o)}catch{}}return o}return o=>{const c=jb(o,i);return c?`?${c}`:""}}const va="__root__";function BT(t,e,r){const i=Rb(t),o=`/${i}`,c=e?o:o.toLowerCase(),u=`${c}/`,f={input:({url:h})=>{const m=e?h.pathname:h.pathname.toLowerCase();return m===c?h.pathname="/":m.startsWith(u)&&(h.pathname=h.pathname.slice(o.length)),h},output:({url:h})=>(h.pathname=ya(`/${i}${h.pathname}`),h)};return r?{input:({url:h})=>wh(r,f.input({url:h})),output:({url:h})=>f.output({url:Lb(r,h)})}:f}function wh(t,e){const r=t?.input?.({url:e});if(r){if(typeof r=="string")return new URL(r);if(r instanceof URL)return r}return e}function Lb(t,e){const r=t?.output?.({url:e});if(r){if(typeof r=="string")return new URL(r);if(r instanceof URL)return r}return e}function IT(t,e){const{createMutableStore:r,createReadonlyStore:i,batch:o}=e,c=new Map,u=r("idle"),f=r(t),h=r(void 0),m=r([]),y=i(()=>m.get().map(E=>c.get(E).get())),g=i(()=>({status:u.get(),isLoading:u.get()==="pending",matches:y.get(),location:f.get(),resolvedLocation:h.get()}));function b(E){let A=c.get(E);return A||(A=r(void 0),c.set(E,A)),A}const _={status:u,location:f,resolvedLocation:h,ids:m,matches:y,byRoute:c,__store:g,getMatchStore:b,setMatches:S};function S(E){const A=m.get(),T=E.map(C=>C.routeId);o(()=>{pT(A,T)||m.set(T);for(const C of A)T.includes(C)||c.get(C).set(()=>{});for(const C of E){const x=b(C.routeId);x.get()!==C&&x.set(C)}})}return _}var bs="__TSR_index",jv="popstate",Dv="beforeunload",HT=/^[\x00-\x20]*(?:[\\/][\t\n\r]*){2,}/;function Gc(t){const e=HT.exec(t);return e?"/"+t.slice(e[0].length):t}function Mb(t){return/[\x00-\x1f\x7f]/.test(t)&&(t=t.replace(/[\x00-\x1f\x7f]/g,e=>` 11\r`.includes(e)?"":encodeURIComponent(e))),Gc(t)}function $T(t){let e=t.getLocation();const r=new Set,i=u=>{e=t.getLocation(),r.forEach(f=>f({location:e,action:u}))},o=u=>{t.notifyOnIndexChange??!0?i(u):e=t.getLocation()},c=async({task:u,navigateOpts:f,...h})=>{if(f?.ignoreBlocker??!1){u();return}const m=t.getBlockers?.()??[],y=h.type==="PUSH"||h.type==="REPLACE";if(typeof document<"u"&&m.length&&y)for(const g of m){const b=Wc(h.path,h.state);if(await g.blockerFn({currentLocation:e,nextLocation:b,action:h.type})){t.onBlocked?.();return}}u()};return{get location(){return e},get length(){return t.getLength()},subscribers:r,subscribe:u=>(r.add(u),()=>{r.delete(u)}),push:(u,f,h)=>{const m=e.state[bs];f=Lv(m+1,f),c({task:()=>{t.pushState(u,f),i({type:"PUSH"})},navigateOpts:h,type:"PUSH",path:u,state:f})},replace:(u,f,h)=>{const m=e.state[bs];f=Lv(m,f),c({task:()=>{t.replaceState(u,f),i({type:"REPLACE"})},navigateOpts:h,type:"REPLACE",path:u,state:f})},go:(u,f)=>{c({task:()=>{t.go(u,f?.ignoreBlocker??!1),o({type:"GO",index:u})},navigateOpts:f,type:"GO"})},back:u=>{c({task:()=>{t.back(u?.ignoreBlocker??!1),o({type:"BACK"})},navigateOpts:u,type:"BACK"})},forward:u=>{c({task:()=>{t.forward(u?.ignoreBlocker??!1),o({type:"FORWARD"})},navigateOpts:u,type:"FORWARD"})},canGoBack:()=>e.state[bs]!==0,createHref:u=>t.createHref(u),block:u=>{if(!t.setBlockers)return()=>{};const f=t.getBlockers?.()??[];return t.setBlockers([...f,u]),()=>{const h=t.getBlockers?.()??[];t.setBlockers?.(h.filter(m=>m!==u))}},flush:()=>t.flush?.(),destroy:()=>t.destroy?.(),notify:i,_getBlockers:()=>t.getBlockers?.()??[]}}function Lv(t,e){const r=ep();return{...e,key:r,__TSR_key:r,[bs]:t}}function qT(t){const e=typeof document<"u"?window:void 0,r=e.history.pushState,i=e.history.replaceState;let o=[];const c=()=>o,u=D=>o=D,f=D=>Mb(D),h=(()=>Wc(`${e.location.pathname}${e.location.search}${e.location.hash}`,e.history.state));if(!e.history.state?.__TSR_key&&!e.history.state?.key){const D=ep();e.history.replaceState({[bs]:0,key:D,__TSR_key:D},"")}let m=h(),y,g=!1,b=!1,_=!1,S=!1;const E=()=>m;let A;const T=()=>{A&&(z._ignoreSubscribers=!0,(A[2]?e.history.pushState:e.history.replaceState)(A[1],"",A[0]),z._ignoreSubscribers=!1,A=void 0,y=void 0)},C=(D,Y,ne)=>{const de=!!A;de||(y=m),m=Wc(Y,ne),A=[m.href,ne,A?.[2]||D],de||queueMicrotask(()=>T())},x=D=>{m=h(),z.notify({type:D})},B=async()=>
11{if(S=!1,b){b=!1;return}const D=h(),Y=D.state[bs]-m.state[bs],ne=Y===1,de=Y===-1,G=!ne&&!de||g;g=!1;const K=G?"GO":de?"BACK":"FORWARD",ee=G?{type:"GO",index:Y}:{type:de?"BACK":"FORWARD"};if(_)_=!1;else{const ve=c();if(typeof document<"u"&&ve.length){for(const oe of ve)if(await oe.blockerFn({currentLocation:m,nextLocation:D,action:K})){b=!0,e.history.go(-Y),z.notify(ee);return}}}m=h(),z.notify(ee)},Z=D=>{if(S){S=!1;return}let Y=!1;const ne=c();if(typeof document<"u"&&ne.length)for(const de of ne){const G=de.enableBeforeUnload??!0;if(G===!0){Y=!0;break}if(typeof G=="function"&&G()===!0){Y=!0;break}}if(Y)return D.preventDefault(),D.returnValue=""},z=$T({getLocation:E,getLength:()=>e.history.length,pushState:(D,Y)=>C(!0,D,Y),replaceState:(D,Y)=>C(!1,D,Y),back:D=>(D&&(_=!0,S=!0),e.history.back()),forward:D=>{D&&(_=!0,S=!0),e.history.forward()},go:(D,Y)=>{g=!0,Y&&(_=!0,S=!0),e.history.go(D)},createHref:D=>f(D),flush:T,destroy:()=>{e.history.pushState=r,e.history.replaceState=i,e.removeEventListener(Dv,Z,{capture:!0}),e.removeEventListener(jv,B)},onBlocked:()=>{y&&m!==y&&(m=y)},getBlockers:c,setBlockers:u,notifyOnIndexChange:!1});return z._ignoreNextBeforeUnload=D=>{S=!1;try{D=new URL(D,e.document.baseURI).href,S=/^https?:/.test(D)&&(!D.includes("#")||D.split("#")[0]!==e.location.href.split("#")[0])}catch{}},e.addEventListener(Dv,Z,{capture:!0}),e.addEventListener(jv,B),e.history.pushState=function(...D){const Y=r.apply(e.history,D);return z._ignoreSubscribers||x("PUSH"),Y},e.history.replaceState=function(...D){const Y=i.apply(e.history,D);return z._ignoreSubscribers||x("REPLACE"),Y},z}function Wc(t,e){const r=Mb(t),i=r.indexOf("#"),o=r.indexOf("?");if(!e){const c=ep();e={[bs]:0,key:c,__TSR_key:c}}return{href:r,pathname:r.substring(0,i>0?o>0?Math.min(i,o):i:o>0?o:r.length),hash:i>-1?r.substring(i):"",search:o>-1?r.slice(o,i===-1?void 0:i):"",state:e}}function ep(){return(Math.random()+1).toString(36).substring(7)}function Jf(t,e){return t.protocol!=="http:"&&t.protocol!=="https:"||t.origin!==e||!!t.username||!!t.password}function Qf(t){return t.pathname+t.search+t.hash}function Mv(t){return t.options.loader||t.options.beforeLoad||t.lazyFn||t.options.component?.preload||t.options.pendingComponent?.preload}function VT(t){return t instanceof Error?{name:t.name,message:t.message}:{data:t}}function vu(t,e){return{fromLocation:e,toLocation:t,pathChanged:e?.pathname!==t.pathname,hrefChanged:e?.href!==t.href,hashChanged:e?.hash!==t.hash}}function Uv({key:t,__TSR_key:e,__TSR_index:r,__hashScrollIntoViewOptions:i,...o}){return o}function Ub(t){return t.findIndex(e=>e.status==="error"||e.status==="notFound"||e._notFound)+1}function GT(t,e,r,i,o,c){i&&(e=e.slice(0,i)),o&&(r=r.slice(0,o));for(const u of e){if(c&&t._tx!==c)return;r.some(f=>f.routeId===u.routeId)||t.routesById[u.routeId].options.onLeave?.(u)}for(const u of r){if(c&&t._tx!==c)return;t.routesById[u.routeId].options[e.some(f=>f.routeId===u.routeId)?"onStay":"onEnter"]?.(u)}}var KT=class{constructor(t,e){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this._scroll={n:!0},this.subscribers=new Set,this._cache=new Map,this._committed=[],this.startTransition=async r=>(r(),!1),this.update=r=>{const i=this.options;this.options={...i,...r},this.isServer=this.options.isServer??Tv??typeof document>"u",this.staticLocations=new WeakMap,this.protocolAllowlist=new Set(this.options.protocolAllowlist),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=qT()),this.origin=this.options.origin,this.origin||(window?.origin&&window.origin!=="null"?this.origin=window.origin:this.origin="http://localhost");const o=this.options.basepath??"/",c=this.options.rewrite,u=this.basepath!==o||i?.rewrite!==c||i?.caseSensitive!==this.options.caseSensitive;if(u&&(this.basepath=o,this.rewrite=o!=="/"&&Rb(o)?BT(o,this.options.caseSensitive,c):c),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree||Tv){this.routeTree=this.options.routeTree;let f;f=this.buildRouteTree(),this.setRoutes(f)}if(this.stores)u&&this.stores.location.set(this.latestLocation);else if(this.latestLocation){const f=this.getStoreConfig(this);this.batch=f.batch,this.stores=IT(this.latestLocation,f),DT(this)}},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{const r=TT(this.routeTree,this.options.caseSensitive);return this.options.routeMasks&&_T(this.options.routeMasks,r.processedTree),{...r,resolvePathCache:Xc(1e3)}},this.subscribe=(r,i)=>{const o={eventType:r,fn:i};return this.subscribers.add(o),()=>{this.subscribers.delete(o)}},this.emit=r=>{for(const i of this.subscribers)if(i.eventType===r.type)try{i.fn(r)}catch(o){console.error(o)}},this.parseLocation=(r,i)=>{const o=({pathname:h,search:m,hash:y,href:g},b)=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(h)){const A=this.options.parseSearch(m),T=this.options.stringifySearch(A);return{href:h+T+y,publicHref:h+T+y,pathname:Ro(h),external:!1,searchStr:T,search:ta(i?.search,A),hash:Ro(y.slice(1)),state:vs(i?.state,b)}}const _=wh(this.rewrite,new URL(g,this.origin)),S=this.options.parseSearch(_.search),E=this.options.stringifySearch(S);return _.search=E,{href:_.href.replace(_.origin,""),publicHref:g,pathname:Ro(Gc(_.pathname)),external:!!this.rewrite&&Jf(_,this.origin),searchStr:E,search:ta(i?.search,S),hash:Ro(_.hash.slice(1)),state:vs(i?.state,b)}},c=o(r,r.state),{__tempLocation:u,__tempKey:f}=c.state;if(u&&(!f||f===this.tempLocationKey)){const h=o(u,{...u.state,__tempLocation:void 0,key:c.state.key,__TSR_key:c.state.__TSR_key});return h.maskedLocation=c,h}return c},this.matchRoutes=(r,i,o)=>typeof r=="string"?this.matchRoutesInternal({pathname:r,search:i},o):this.matchRoutesInternal(r,i),this.getMatchedRoutes=r=>{const i=Object.create(null),o=ET(Wn(r),this.processedTree,!0);return o&&Object.assign(i,o.rawParams),[o?.branch||[this.routesById.__root__],i,o?.route]},this.buildLocation=r=>{{const u=this.staticLocations.get(r);if(u)return u}let i=!1;const o=(u={})=>
11{if(u.href){const ve=Wc(u.href,{});u={...u,to:wh(this.rewrite,new URL(ve.pathname,this.origin)).pathname,search:this.options.parseSearch(ve.search),hash:ve.hash.slice(1)}}const f=u._fromLocation||this._pendingLocation||this.latestLocation;let h;const m=()=>(i=!0,f),y=()=>(i=!0,h??=this.matchRoutesLightweight(f)),g=u.to?`${u.to}`:".",b=Ov(g[0]==="/"?"":u.unsafeRelative==="path"?m().pathname:u.from??y()[1],g,this.options.trailingSlash,this.resolvePathCache),_=this.routesByPath[Wn(b)],S=b.includes("$");let E;if(_)E=_._branch??=xb(_);else if(S)E=[];else{const[ve,oe,j]=this.getMatchedRoutes(b);E=ve,this.options.notFoundRoute&&(!j||j.path!=="/"&&oe["**"])&&(E=[...E,this.options.notFoundRoute])}const A=S?_?._interpolation??qo(!1,{fullPath:b},0):void 0;let T;for(const ve of E){const oe=ve.options.params?.stringify??ve.options.stringifyParams;if(oe){const j=y()[3];if(T??=Xf(u.params,j),!Sb(T))break;T===j&&(T=Object.assign(qc(),T));try{Object.assign(T,oe(T))}catch{}}}T??=Xf(u.params,YT(u.params,A)?y()[3]:Wf);const C=r.leaveParams?b:Gc(Ro(A?kv(b,A,T,this.pathParamsDecoder):b)),x=ZT(E,r._includeValidateSearch),B=()=>{let ve=y()[2];if(r._includeValidateSearch&&this.options.search?.strict){const oe={};E.forEach(j=>{if(j.options.validateSearch)try{Object.assign(oe,Kc(j.options.validateSearch,{...oe,...ve}))}catch{}}),ve=oe}return ve},Z=x.length?JT(x,B(),u):u.search===!0?B():typeof u.search=="function"?u.search(B()):u.search||Wf,z=this.options.stringifySearch(Z),D=u.hash===!0?m().hash:typeof u.hash=="function"?u.hash(m().hash):u.hash||void 0,Y=D?`#${D}`:"",ne=u.state?u.state===!0?m().state:typeof u.state=="function"?u.state(m().state):u.state:Wf,de=`${C}${z}${Y}`;let G,K,ee=!1;if(this.rewrite){const ve=new URL(de,this.origin),oe=ve.origin,j=Lb(this.rewrite,ve);G=Qf(ve),Jf(j,oe)?(K=j.href,ee=!0):K=Gc(Qf(j))}else G=hT(de),K=G;return{publicHref:K,href:G,pathname:C,search:Z,searchStr:z,state:ne,hash:D??"",external:ee,unmaskOnReload:u.unmaskOnReload}},c=o(r);if(r.mask)c.maskedLocation=o({from:r.from,...r.mask});else if(this.options.routeMasks){const u=wT(c.pathname,this.processedTree);if(u){const f=Object.assign(qc(),u.rawParams),{from:h,params:m,...y}=u.route,g=Xf(m,f);c.maskedLocation=o({from:r.from,...y,params:g})}}return!i&&r._fromLocation&&!c.maskedLocation&&this.staticLocations.set(r,c),c},this.commitLocation=async({viewTransition:r,ignoreBlocker:i,...o})=>{const c=o.maskedLocation??o;if(c.external)return zv(this,c.publicHref,{replace:o.replace,ignoreBlocker:i});let u;const f=Wn(this.latestLocation.href)===Wn(o.href)&&Hn(Uv(o.state),Uv(this.latestLocation.state)),h=this._commitPromise;let m;const y=new Promise(g=>{m=g});if(y.resolve=()=>{m(),h?.resolve()},this._commitPromise=y,f)this.load();else{let{maskedLocation:g,hashScrollIntoView:b,..._}=o;g&&(_={...g,state:{...g.state,__tempKey:void 0,__tempLocation:{..._,search:_.searchStr,state:{..._.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(_.unmaskOnReload??this.options.unmaskOnReload??!1)&&(_.state.__tempKey=this.tempLocationKey)),_.state={..._.state,__hashScrollIntoViewOptions:b??this.options.defaultHashScrollIntoView??!0},this.shouldViewTransition=r,u=o.replace?"REPLACE":"PUSH",this.history[u==="REPLACE"?"replace":"push"](_.publicHref,_.state,{ignoreBlocker:i}),this.history.subscribers.size||this.load({action:{type:u}})}return this._scroll.n=o.resetScroll??!0,this._commitPromise},this.buildAndCommitLocation=({replace:r,resetScroll:i,hashScrollIntoView:o,viewTransition:c,ignoreBlocker:u,...f}={})=>{const h=this.buildLocation({...f,_includeValidateSearch:!0});this._pendingLocation=h;const m=this.commitLocation({...h,viewTransition:c,replace:r,resetScroll:i,hashScrollIntoView:o,ignoreBlocker:u});return queueMicrotask(()=>{this._pendingLocation===h&&(this._pendingLocation=void 0)}),m},this.navigate=async({to:r,reloadDocument:i,href:o,publicHref:c,...u})=>{const f=o?Ho(o):void 0;if(f||i){if(r!==void 0||!o){const m=this.buildLocation({to:r,...u}),y=m.maskedLocation??m;o??=y.publicHref,c??=y.publicHref}return zv(this,!f&&c?c:o,u)}return this.buildAndCommitLocation({...u,href:o,to:r,_isNavigate:!0})},this.load=async r=>{this.updateLatestLocation(),r?.action&&(this._scroll.h=r.action.type==="PUSH"||r.action.type==="REPLACE"),await s1(this,r)},this.startViewTransition=r=>{const i=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,i&&typeof document.startViewTransition=="function"){let o;if(typeof i=="object"&&window.CSS?.supports?.("selector(:active-view-transition-type(a))")){const c=this.latestLocation,u=this.stores.resolvedLocation.get(),f=typeof i.types=="function"?i.types(vu(c,u)):i.types;if(f===!1)return r();o={update:r,types:f}}else o=r;return document.startViewTransition(o).updateCallbackDone}return r()},this.invalidate=r=>{const i=this._committed,o=r?.filter,c=this._preloads,u=new Set,f=y=>{(!o||o(y))&&u.add(y.id)};
11i.forEach(f),this._cache.forEach(f),c?.forEach(y=>y.forEach(f)),this._tx?.[3].forEach(f);const h=[];for(const[y,g]of c??[])g.some(b=>u.has(b.id))&&(c.delete(y),h.push(y));const m=y=>{if(u.has(y.id)){const g=this.routesById[y.routeId],b={...y,invalid:!0,...(r?.forcePending||y.status==="error"||y.status==="notFound")&&Mv(g)?{status:"pending",error:void 0}:void 0};return y._flight=void 0,b}return y};this._committed=i.map(m);for(const[y,g]of this._cache)u.has(y)&&(g.invalid=!0,r?.forcePending&&(g.status="pending"));for(const y of u){const g=this._flights?.get(y);this._flights?.delete(y),g&&!g[2]&&h.push(g[1])}for(const y of h)y.abort();return this.shouldViewTransition=!1,this.load({sync:r?.sync})},this.resolveRedirect=r=>{const i=r.options;let o=r.headers.get("Location")||i.href;if(!o){const u=this.buildLocation(i);o=(u.maskedLocation??u).publicHref||"/"}let c;if(Eb.test(o)||(c=Ho(o))&&!this.protocolAllowlist.has(c))throw new Error("Redirect blocked: unsafe protocol");if(c==="http:"||c==="https:"){const u=new URL(o);u.pathname.startsWith("//")?o=u.href:Jf(u,this.origin)||(o=Qf(u),c=void 0)}return c&&(i.reloadDocument=!0),i.href=o,r.headers.set("Location",o),r},this.clearCache=r=>{const i=this._cache,o=this._preloads,c=r?.filter,u=[],f=[];for(const[m,y]of i)(!c||c(y))&&(f.push(m),u.push(y));const h=[];for(const[m,y]of o??[])(!c||y.some(c))&&(h.push(m),u.push(...y));for(const m of f)i.delete(m);for(const m of h)o.delete(m);for(const m of u){const y=m._flight;m._flight=void 0,y&&!--y[2]&&(this._flights?.get(m.id)===y&&this._flights.delete(m.id),h.push(y[1]))}for(const m of h)m.abort()},this.loadRouteChunk=Nr,this.preloadRoute=r=>i1(this,r),this.matchRoute=(r,i)=>{const o={...r,to:r.to?Ov(r.from||"",r.to,this.options.trailingSlash,this.resolvePathCache):void 0,params:r.params||{},leaveParams:!0},c=this.buildLocation(o),u=this.stores.status.get()==="pending";if(i?.pending&&!u)return!1;const f=i?.pending??!u?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),h=ST(c.pathname,i?.caseSensitive??!1,i?.fuzzy??!1,f.pathname,this.processedTree);return!h||r.params&&!Hn(h.rawParams,r.params,!0)?!1:i?.includeSearch??!0?Hn(f.search,c.search,!0)?h.rawParams:!1:h.rawParams},this.getStoreConfig=e,t.pathParamsAllowedCharacters?.length&&(this.pathParamsDecoder=mT(t.pathParamsAllowedCharacters)),this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...t,caseSensitive:t.caseSensitive??!1,notFoundMode:t.notFoundMode??"fuzzy",stringifySearch:t.stringifySearch??UT,parseSearch:t.parseSearch??MT,protocolAllowlist:t.protocolAllowlist??cT}),self.__TSR_ROUTER__=this}isShell(){return!!this.options.isShell}get state(){return this.stores.__store.get()}setRoutes(t){Object.assign(this,t),this.lightweightCache=new WeakMap,this.staticLocations=new WeakMap;const e=this.options.notFoundRoute;e&&(e.init(99999999999),this.routesById[e.id]!==e&&(e._interpolation=qo(!1,e,0)),this.routesById[e.id]=e)}matchRoutesInternal(t,e){const[r,i,o]=this.getMatchedRoutes(t.pathname);let c=r,u=!1;(o?o.path!=="/"&&i["**"]:Wn(t.pathname))&&(this.options.notFoundRoute?c=[...c,this.options.notFoundRoute]:u=!0);const f=u?QT(this.options.notFoundMode,c):void 0,h=new Array(c.length),m=this._committed,y=(b,_)=>{const S=m[_];return S?.routeId===b.id?S:b===this.options.notFoundRoute?m.find(E=>E.routeId===b.id):void 0};let g;for(let b=0;b<c.length;b++){const _=c[b],S=h[b-1];let E,A,T;{const ee=S?.search??t.search,ve=S?._strictSearch??void 0;try{const oe=Kc(_.options.validateSearch,{...ee})??void 0;E={...ee,...oe},A={...ve,...oe}}catch(oe){let j=oe;if(oe instanceof eu||(j=new eu(oe.message,{cause:oe})),e?.throwOnError)throw j;E=ee,A={},T=j}}let C="",x="";try{C=_.options.loaderDeps?.({search:E})??"",x=C&&JSON.stringify(C)||""}catch(ee){if(e?.throwOnError)throw ee;T??=ee}const B=qc(),Z=_._interpolation?kv(_.fullPath,_._interpolation,i,this.pathParamsDecoder,B):_.fullPath,z=_.id+Z+x,D=y(_,b),Y=this._cache.get(z)??(D?.id===z?D:void 0);g=Y?._strictParams??Object.assign(B,g);let ne;if(!Y)try{Pv(_,g)}catch(ee){if(li(ee)||_b(ee)?ne=ee:ne=new FT(ee.message,{cause:ee}),e?.throwOnError)throw ne}const de=D?"stay":"enter";let G;if(Y)G={...Y,cause:de,search:ta(D?D.search:Y.search,E),_strictSearch:A,searchError:T};else{const ee=Mv(_)?"pending":"success";G={id:z,ssr:_.options.ssr,index:b,routeId:_.id,params:D?.params??g,_strictParams:g,pathname:Z,updatedAt:Date.now(),search:D?ta(D.search,E):E,_strictSearch:A,searchError:T,status:ee,isFetching:!1,error:void 0,paramsError:ne,context:{},abortController:e?._controller??new AbortController,cause:de,loaderDeps:D?vs(D.loaderDeps,C):C,invalid:!1,preload:!1,staticData:_.options.staticData||{},fullPath:_.fullPath}}const K=f===_.id;G._notFound&&!K&&(G.error=void 0),G._notFound=K,h[b]=G}for(let b=0;b<h.length;b++){const _=h[b];_.params=_.cause==="stay"?ta(_.params,g):g,e?._controller&&(_.context={})}return h}matchRoutesLightweight(t){const e=ws(this.stores.ids.get()),r=e?this.stores.byRoute.get(e).get():void 0,i=r?.id,o=this.lightweightCache.get(t);if(o&&o[0]===i)return o[1];const[c,u]=this.getMatchedRoutes(t.pathname),f=ws(c),h={...t.search};for(const b of c)try{Object.assign(h,Kc(b.options.validateSearch,h))}catch{}const m=r&&r.routeId===f.id&&r.pathname===t.pathname;let y;if(m)y=r.params;else{const b=u;for(const _ of c)try{Pv(_,b)}catch{}y=b}const g=[c,f.fullPath,h,y];return this.lightweightCache.set(t,[i,g]),g}};async function zv(t,e,{replace:r,ignoreBlocker:i}){if(!Tb(e,t.protocolAllowlist)){if(!i){const o=t.history._getBlockers();for(const c of o)if(c?.blockerFn&&await c.blockerFn({currentLocation:t.history.location,nextLocation:t.history.location,action:r?"REPLACE":"PUSH"}))return}t.history._ignoreNextBeforeUnload?.(e),r?window.location.replace(e):window.location.href=e}}
11var eu=class extends Error{},FT=class extends Error{};function Kc(t,e){if(t==null)return{};if("~standard"in t){const r=t["~standard"].validate(e);if(r instanceof Promise)throw new eu("Async validation not supported");if(r.issues)throw new eu(JSON.stringify(r.issues,void 0,2),{cause:r});return r.value}return"parse"in t?t.parse(e):typeof t=="function"?t(e):{}}function Xf(t,e){if(t===void 0||t===!0)return e;const r=Object.create(null);return t===!1||t===null?r:typeof t=="function"?(Object.assign(r,e),Object.assign(r,t(r))):Object.assign(r,e,t)}function YT(t,e){return typeof t=="function"?!0:!e||t===!1||t===null?!1:t===void 0||t===!0||e.some(r=>typeof r!="string"&&!Xh.call(t,r[1]))}const Wf=Object.freeze({});function ZT(t,e){const r=[];for(let i=0;i<t.length;i++){const o=t[i].options;if("search"in o)o.search?.middlewares&&r.push(...o.search.middlewares);else if(o.preSearchFilters||o.postSearchFilters){const u=({search:f,next:h})=>{const m=h(o.preSearchFilters?o.preSearchFilters.reduce((y,g)=>g(y),f):f);return o.postSearchFilters?o.postSearchFilters.reduce((y,g)=>g(y),m):m};r.push(u)}const c=o.validateSearch;if(e&&c){const u=({search:f,next:h,meta:m})=>{const y=h(f);try{const g=Kc(c,y);if(m&&g)for(const b in g)b in y||(m.defaulted||=new Map).set(b,g[b]);return{...y,...g}}catch{}return y};r.push(u)}}return r}function JT(t,e,r){const i=(o,c,u)=>{if(o>=t.length){if(!r.search)return{};if(r.search===!0)return c;const h=wb(r.search,c);return u&&(u.explicit=h),h}const f=(h,m)=>{if(m){const y=u||{};return{search:i(o+1,h,y),meta:y}}return i(o+1,h,u)};return t[o]({search:c,next:f,meta:u})};return i(0,e)}function QT(t,e){if(t!=="root"){let r;for(let i=e.length-1;i>=0;i--){const o=e[i];if(o.options.notFoundComponent)return o.id;r||=o.children&&o.id}if(r)return r}return va}function Pv(t,e){const r=t.options.params?.parse??t.options.parseParams;r&&Object.assign(e,r(e))}function Sh(t,e){return t.options[e]?.preload?.()}function XT(t,e){const r=Sh(t,"component");let i=Sh(t,"pendingComponent");return e&&(i?i=i.then(e):e()),r&&i?Promise.all([r,i]).then(()=>{}):r??i}function Nr(t,e,r){const i=()=>e===!1?void 0:e?Sh(t,e):XT(t,r),o=t._lazy;if(o)return o===!0?i():o.then(i);if(!t.lazyFn)return i();const c=t.lazyFn().then(u=>{{const{id:f,...h}=u.options;Object.assign(t.options,h),t._lazy=!0}},u=>{throw t._lazy=void 0,u});return t._lazy=c,c.then(i)}function tp(t){const e=t.findIndex(r=>r.status!=="success"||r._notFound)+1;return e&&e<t.length?t.slice(0,e):t}function zb(t){let e=t.length;for(let r=0;r<e;r++){const i=t[r];if(i._assetEnd!==void 0){e=Math.min(e,Math.max(r+1,i._assetEnd));continue}if(i.status!=="success"||i._notFound){e=r+1;break}}return e<t.length?t.slice(0,e):t}const er=0,jr=1,bu=2,qt=3,Ss=[4];function Vo(t){return typeof t[0]=="number"}function Dr(t,e){return e.aborted?Promise.race([Promise.reject(e),t]):new Promise((r,i)=>{const o=()=>i(e);e.addEventListener("abort",o,{once:!0}),Promise.resolve(t).then(r,i).then(()=>e.removeEventListener("abort",o))})}function In(t,e){return t.routesById[e.routeId]}function Go(t,e,r){return _b(t)?[qt,t]:li(t)?(t.routeId||=r,[bu,t]):e?(typeof t?.then=="function"&&(t=new Error("A Promise was thrown",{cause:t})),[jr,t]):[er,t]}function np(t,e){let r=Go(e,!0,t.id);if(r[0]!==jr)return r;try{t.options.onError?.(r[1])}catch(i){r=Go(i,!0,t.id)}return r}function Uo(t,e,r,i,o){return o[0].signal.aborted?Ss:ip(t,e,r,np(r,i),o)}async function WT(t,e,r,i,o,c){const[u,f]=e,h=r[0].signal,m=!!r[3];for(let y=r[6]??0;y<i;y++){const g=f[y],b=In(t,g);g.abortController=r[0];const _=f[y-1]?.context??t.options.context??{},S={params:g.params,location:u,navigate:C=>t.navigate({...C,_fromLocation:u}),buildLocation:t.buildLocation,cause:m?"preload":g.cause,abortController:r[0],preload:m,matches:f,routeId:b.id};try{const C=g._ctx||=b.options.context?b.options.context({...S,deps:g.loaderDeps,context:_})||{}:void 0;g.context={..._,...C}}catch(C){return xr(t,g),[y,Uo(t,e,b,C,r)]}if(h.aborted)return[y,Ss];const E=g.paramsError??g.searchError;if(E!==void 0)return xr(t,g),[y,Uo(t,e,b,E,r)];const A=b.options.beforeLoad;if(!A)continue;const T=g.status;
11y>=c&&(g.status="pending",r[7]?.());try{Ko(t,g,"beforeLoad",r[0]);const C=A({...S,search:g.search,context:g.context,...t.options.additionalContext}),x=await(typeof C?.then=="function"?Dr(C,h):C);if(h.aborted)return[y,Ss];const B=ip(t,e,b,Go(x,!1,b.id),r);if(B[0]!==er)return xr(t,g),[y,B];g.context={...g.context,...x}}catch(C){return xr(t,g),[y,Uo(t,e,b,C,r)]}finally{g.status=T,Ko(t,g,!1,r[0])}}o()}function rp(t,e,r){if(!(!r||--r[2])){if(t._flights?.get(e.id)===r){const i=t._tx;if(i&&!i[0].signal.aborted&&!i[3].includes(e)&&i[3].some(o=>o.id===e.id)&&i[3].some(o=>o.isFetching==="beforeLoad"))return;t._flights.delete(e.id)}return r[1]}}function xr(t,e){const r=e._flight;e._flight=void 0,rp(t,e,r)?.abort()}function Ut(t,e,r,i){const o=[];for(const c of e)if(!r?.includes(c)){const u=c._flight;if(c._flight=void 0,i&&u?.[2]===1&&t._flights?.get(c.id)===u&&r?.some(f=>f.id===c.id))u[2]=0;else{const f=rp(t,c,u);f&&o.push(f)}}for(const c of o)c.abort()}function sp(t){for(const e of t){const r=e._flight;r&&r[2]++}}function Ko(t,e,r,i){if(e.isFetching=r,i&&t._tx?.[0]!==i)return;const o=t.stores.byRoute.get(e.routeId),c=o?.get();c?.id===e.id&&o.set({...c,isFetching:r})}function Pb(t,e,r,i,o,c,u){const f=e[0];return{params:r.params,location:f,navigate:h=>t.navigate({...h,_fromLocation:f}),cause:u?"preload":r.cause,abortController:o,preload:u,deps:r.loaderDeps,parentMatchPromise:c,context:r.context,route:i,...t.options.additionalContext}}async function Bv(t,e,r,i,o,c,u){const f=u[0],h=f.signal;if(h.aborted)return Ss;if(!o)return[er,void 0];let m=r._flight;Ko(t,r,"loader",f);try{if(!m){const y=new AbortController;m=[Promise.resolve().then(()=>o(Pb(t,e,r,i,y,c,!!u[3]))).then(g=>Go(g,!1,i.id),g=>Go(g,!0,i.id)).then(g=>(g[0]!==er&&t._flights?.get(r.id)===m&&(t._flights.delete(r.id),m[2]||y.abort()),g[0]===jr&&m[2]?np(i,g[1]):g)),y,1],(t._flights??=new Map).set(r.id,m)}return r._flight=m,r.abortController=m[1],ip(t,e,i,await Dr(m[0],h),u)}catch(y){if(y!==h||!h.aborted)throw y;return xr(t,r),Ss}finally{Ko(t,r,!1,f)}}function Iv(t,e,r){e[0]!==qt&&(t.status="success",t.error=void 0,e[0]===er?(t.loaderData=e[1],t.invalid=!1,t.updatedAt=Date.now(),t.preload=r):t.invali
11d=!0)}function Bb(t,e,r){const i=t._cache.get(e.id);if(i!==r||t._committed.some(c=>c.id===e.id&&c._flight===e._flight))return;const o={...e,_notFound:void 0,context:{}};o._flight&&o._flight[2]++,t._cache.set(e.id,o),i&&xr(t,i)}function Hv(t,e){return e[0]===jr||e[0]===bu?{...t,status:e[0]===jr?"error":"notFound",error:e[1],_flight:void 0}:t}function e1(t,e,r,i,o,c,u){const f=e[1][r],h=In(t,f),m=!!c[3],y=t._cache.get(f.id);let g,b=!1,_;try{if(f.status==="success"&&(g=h.options.shouldReload,typeof g=="function"&&(g=g(Pb(t,e,f,h,c[0],o,m))),c[0].signal.aborted&&(_=Ss)),!_)if(f.status!=="success")b=!0;else{const K=m||f.preload?h.options.preloadStaleTime??t.options.defaultPreloadStaleTime??3e4:h.options.staleTime??t.options.defaultStaleTime??0;b=!!(f.invalid||g||g===void 0&&Date.now()-f.updatedAt>=K&&(c[5]||f.cause==="enter"||c[2].some(ee=>ee.routeId===f.routeId&&ee.id!==f.id)))}}catch(K){f.invalid=!0,xr(t,f),_=Uo(t,e,h,K,c)}const S=h.options.loader,E=typeof S=="function",A=E?S:S?.handler,T=!m||h.options.preload!==!1;let C=T&&S?t._flights?.get(f.id):void 0;C===f._flight||_?C=void 0:C&&!b&&!m&&g===void 0?b=!0:b||(C=void 0);const x=!!(S&&b&&f.status==="success"&&!m&&!c[4]&&((E?void 0:S.staleReloadMode)??t.options.defaultStaleReloadMode)!=="blocking"),B=b&&T,Z=B&&!x&&(f.status!=="success"||!!S),z=r>=u?c[7]:void 0,D=h.lazyFn&&h._lazy!==!0?z:void 0;if(B&&!S&&(f.invalid=!1,f.updatedAt=Date.now()),C&&C[2]++,Z){const K=f._flight;f._flight=C,rp(t,f,K)?.abort(),r>=u&&(f.status="pending"),z?.()}B||(f.isFetching=!1);const Y=!_&&Z?Bv(t,e,f,h,A,o,c).then(K=>(Iv(f,K,m),K[0]===er&&(S&&!c[0].signal.aborted&&Bb(t,f,y),r>=u&&(f.status="pending")),K)):Promise.resolve(_??[er,f.loaderData]),ne=(async()=>{try{const ee=Nr(h,void 0,D);ee&&await Dr(ee,c[0].signal)}catch(ee){if(!e[1].some((ve,oe)=>oe<=r&&(ve.status==="error"||ve.status==="notFound"||ve._notFound)))return[r,Uo(t,e,h,ee,c)]}const K=await Y;Z&&K[0]===er&&f.status==="pending"&&!c[0].signal.aborted&&(f.status="success",z?.())})();if(i.push([r,Y,ne]),!x)return Y.then(K=>Hv(f,K));const de={...f,status:"pending",preload:!1,_flight:C};f.invalid=!1,f.isFetching="loader";const G=Bv(t,e,de,h,A,o,c).then(K=>(f.isFetching=!1,Iv(de,K,!1),K));return(e[2]??=[]).push([r,G,ne,de]),G.then(K=>Hv(de,K))}async function Eh(t,e,r,i,o=0){const c=r?.[1][1];let u=c?.routeId?e.findIndex(f=>f.routeId===c.routeId):r?.[0]??e.length-1;u<0&&(u=0);for(let f=u;f>=0;f--){const h=In(t,e[f]);try{const m=Nr(h,!1);m&&await Dr(m,i)}catch(m){if(m===i&&i.aborted)throw m}if(h.options.notFoundComponent)return f}return c?.routeId?u:o}function oi(t,e){e[2]&&(Ut(t,e[2].map(r=>r[3])),e[2]=void 0)}async function $v(t,e,r,i){let o;try{await Promise.all(t.map(c=>c[1].then(async u=>{const f=c[0];if(!(i&&f>=await i)){if(u[0]>=qt)throw[f,u];!o&&u[0]!==er&&(o=[f,u],await Promise.all((r??[]).map(h=>{if(!(h[0]<=f))return h[1].then(m=>{if(m[0]===qt)throw[h[0],m]})})))}})))}catch(c){return c}return e??o}function ip(t,e,r,i,o,c){for(;i[0]===qt;){const u=i[1],f=u.options;try{if((f.href||u.headers.has("Location"))&&(t.resolveRedirect(u),f.reloadDocument)||(f.reloadDocument?o[3]:o[1]>=20))return i;const h=t.buildLocation({...f,_fromLocation:e[0],_includeValidateSearch:!0}),m=h.maskedLocation??h;if(m.external){const y=u.clone();return y.options={...f},y.headers.set("Location",m.publicHref),t.resolveRedirect(y),o[3]?[qt,y]:[qt,y,m]}return[qt,u,h]}catch(h){i=c?[jr,h]:np(r,h),c=!0}}return i}async function Ib(t,e,r,i,o,c){const u=e[1];let f=await o,h=!1;const m=u.findIndex(_=>_._notFound),y=_=>_[1][0]===bu?Eh(t,u,_,i.signal):_[0];let g=m<0?u.length:m;if((f?.[1][0]??0)>=qt)g=0;else if(f){g=f[2]??=await y(f);for(const _ of r){if(_[0]>=g)break;const S=await _[1];if(S[0]!==er&&S[0]<qt&&!("loaderData"in u[_[0]])){f=[_[0],S],g=f[2]=await y(f);break}}}for(const _ of r){if(_[0]>=g)break;const S=await _[2];if(S){f=S;break}}if((f?.[1][0]??0)>=qt){const _=f[1];if(_[0]!==qt||_[1].options.reloadDocument||_[2])return oi(t,e),_;h=!0,f=[0,[jr,new Error("Too many redirects")]]}const b=f?f[2]??await y(f):m;if(b>=0){const _=f?.[1],S=_?.[0],E=u[b],A=_?.[1],T=()=>{_&&(E._notFound=void 0,S===jr?E.status="error":(A.routeId=E.routeId,E.routeId===t.routeTree.id?(E.status="success",E._notFound=!0):E.status="notFound"),E.error=A,E.isFetching=!1)};T(),_||c?.();const C=In(t,E);try{await Dr(_?Promise.resolve().then(()=>Nr(C,S===jr?"errorComponent":"notFoundComponent")):Promise.all([Nr(C),Nr(C,"notFoundComponent")]),i.signal)}
11catch(x){if(x===i.signal&&i.signal.aborted)return oi(t,e),Ss}_?h&&(i.abort(),await Promise.all([...r.map(x=>x[1]),...r.map(x=>x[2]),...(e[2]??[]).map(x=>x[1])]),oi(t,e),Ut(t,u),T()):E.status="success"}return e}async function ap(t,e,r,i=0,o=e[1].length){const c=e[1];for(let u=i;u<o;u++){const f=c[u],h=In(t,f).options;if(h.head||h.scripts)try{const m={ssr:t.options.ssr,matches:c,match:f,params:f.params,loaderData:f.loaderData},[y,g]=await Dr(Promise.all([h.head?.(m),h.scripts?.(m)]),r);f.meta=y?.meta,f.links=y?.links,f.headScripts=y?.scripts,f.styles=y?.styles,f.scripts=g}catch(m){if(m===r&&r.aborted)break;console.error(m)}if(f.status!=="success"||f._notFound)break}return e}async function Hb(t,e,r,i){const o=[e,r],c=i[0].signal;let u;try{const f=t.stores.matches.get();let h=r.findIndex(T=>T._notFound);if(t.options.notFoundMode!=="root"&&h>=0){const T=await Eh(t,r,void 0,c,h);r[h]._notFound=void 0,r[T]._notFound=!0,h=T}let m=h<0?r.length:h+1,y=0;for(;y<m&&y!==h;){const T=r[y],C=i[2][y],x=f[y];if(C?.id!==T.id||C.status!=="success"||T.preload||x?.id!==T.id||x.status!=="success"||(y++,C._notFound||x._notFound))break}const g=[],b=i[6]??0;let _=b?Promise.resolve(r[b-1]):void 0;const S=()=>{for(let T=b;T<m&&!c.aborted;T++)_=e1(t,o,T,g,_,i,y)},E=await WT(t,o,i,m,S,y);if(E){if(i[4]=!0,m=E[0],E[1][0]===bu){const T=await Eh(t,r,E,c);E[2]=T,m=Math.min(m,T+1)}else E[1][0]>=qt&&(m=0);S()}if(!c.aborted&&!i[3]){const T=[];for(const[C,x]of t._flights??[])x[2]||(t._flights.delete(C),T.push(x[1]));for(const C of T)C.abort()}const A=Ib(t,o,g,i[0],$v(g,E,o[2]),i[7]);o[2]?.length&&(o[3]=$v(o[2],void 0,void 0,A.then(T=>Vo(T)?0:tp(r).length,()=>0))),u=await A}catch(f){if(oi(t,o),f===c&&c.aborted)return Ss;throw f}return Vo(u)?u:ap(t,u,c,i[6]===r.length?i[6]:0)}function Th(t,e){if(t._tx!==e)return;const r=e[3],i=t.stores.matches.get();let o=t._pending;for(let c=0;c<r.length;c++){const u=r[c],f=u.status==="success"&&!u._notFound,h=i[c]?.id===u.id&&i[c]?.status==="pending";if(f&&!h)continue;
11const m=In(t,u),y=f||u.invalid?0:m.options.pendingMs??t.options.defaultPendingMs,g=m.options.pendingComponent??t.options.defaultPendingComponent;if(!g||typeof y!="number"||y===1/0){o&&(o[0]=e,o[2]=0,o[4]=!0);return}const b=m.options.pendingMinMs??t.options.defaultPendingMinMs??0;let _=!1;if(o?.[1]===u.id?(_=o[0]!==e,o[0]=e):(clearTimeout(o?.[3]),t._pending=o=void 0),o||(t._pending=o=[e,u.id,h?Date.now()+b:e[4]+y,void 0,h||void 0,g]),o[4]&&!_&&o[5]===g)return;if(o[5]=g,!o[4]){clearTimeout(o[3]);const A=o[2]-Date.now();if(A>0){o[3]=setTimeout(()=>Th(t,e),A);return}o[2]=0}const S=r.map(A=>({...A,_flight:void 0}));S[c].status="pending";const E=o[4]=t.startTransition(()=>t.stores.setMatches(S),S).then(A=>(A&&t._pending===o&&o[4]===E&&!o[2]&&(o[2]=Date.now()+b),A));return}}function Oo(t,e){const r=t._pending;(t._tx===e||!t._tx?.[3].some(i=>i.id===r?.[1]))&&(clearTimeout(r?.[3]),t._pending=void 0)}async function qv(t,e){const r=t._pending;if(!r)return;clearTimeout(r[3]);const i=r[2]-Date.now();if(!r[4]||i<=0||!tp(e[3]).some(c=>c.id===r[1]))return;let o;try{await Dr(new Promise(c=>{o=setTimeout(c,i)}),e[0].signal)}catch{}clearTimeout(o)}function $b(t,e){t._committed=e,t.stores.setMatches(e)}function t1(t,e,r,i){const o=t._committed,c=t._lifecycleEnd,u=t._cache;for(const y of r)y.preload=!1,i&&(y._assetEnd=void 0);const f=tp(r).length,h=new Map;{const y=Date.now(),g=new Set;for(let b=0;b<r.length;b++){const _=r[b];(b<f||_.status==="success")&&g.add(_.id)}for(const b of[...o,...u.values()]){if(b.status!=="success"||g.has(b.id))continue;const _=In(t,b);!_.options.loader||y-b.updatedAt>=(b.preload?_.options.preloadGcTime??t.options.defaultPreloadGcTime??3e5:_.options.gcTime??t.options.defaultGcTime??3e5)||h.set(b.id,u.get(b.id)===b?b:{...b,_flight:void 0,isFetching:!1,context:{}})}}e[3]=[],t._cache=h;const m=t._lifecycleEnd=Ub(r);$b(t,r),Ut(t,[...u.values(),...o].filter(y=>y._flight&&h.get(y.id)!==y),r),GT(t,o,r,c,m,e)}async function kc(t,e){let r=t._tx;for(;r&&r!==e;)e=r,await r[5],r=t._tx}function qb(t,e,r){const i=r[1].options,o=r[2];if(!o)return t.navigate({...i,replace:!0,ignoreBlocker:!0});if(i.reloadDocument)return t.navigate({href:(o.maskedLocation??o).publicHref,reloadDocument:!0,replace:!0,ignoreBlocker:!0});o._redirects=e[1]+1,t._pendingLocation=o;const c=t.commitLocation({...o,viewTransition:i.viewTransition,replace:!0,resetScroll:i.resetScroll,hashScrollIntoView:i.hashScrollIntoView,ignoreBlocker:!0});return queueMicrotask(()=>{t._pendingLocation===o&&(t._pendingLocation=void 0)}),c}async function n1(t,e,r,i,o){const c=r.map(h=>({...h}));sp(c);for(const h of i)xr(t,c[h[0]]),c[h[0]]=h[3];const u=[e[2],c];let f;try{f=await Ib(t,u,i,e[0],o)}catch(h){throw Ut(t,c),h}if(Vo(f)){Ut(t,c),f[0]===qt&&t._tx===e&&t._committed===r&&await qb(t,e,f);return}if(await ap(t,f,e[0].signal),t._tx!==e||t._committed!==r){Ut(t,c);return}for(const h of c){const m=t._cache.get(h.id);m?._flight&&m._flight===h._flight&&(t._cache.delete(h.id),xr(t,m))}$b(t,c),Ut(t,r,c)}async function r1(t,e,r,i,o,c){const u=await Hb(t,e[2],e[3],[e[0],e[1],t._committed,void 0,o,r,c,i]);if(Vo(u)){const g=u[0]===qt&&t._tx===e;if((!g||u[1].options.reloadDocument)&&Oo(t,e),Ut(t,e[3]),e[3]=[],!g)return;if(t._tx!==e){Oo(t,e);return}await qb(t,e,u);return}const f=u[1];if(t._tx===e&&await qv(t,e),t._tx!==e){Oo(t,e),Ut(t,f),oi(t,u);return}const h=e[2],m=vu(h,t.stores.resolvedLocation.get()),y=u[2];await t.startViewTransition(async()=>{if(t._tx===e&&await qv(t,e),t._tx!==e){Oo(t,e),Ut(t,f),oi(t,u);return}const g=()=>{Oo(t,e),t1(t,e,f,c),t._tx===e&&(t.emit({type:"onLoad",...m}),t._tx===e&&t.emit({type:"onBeforeRouteMount",...m}))},b=await t.startTransition(g,f);if(t._tx!==e){oi(t,u);return}y?.length&&n1(t,e,f,y,u[3]).catch(console.error),t.batch(()=>{t.stores.resolvedLocation.set(h),t.stores.status.set("idle"),t._tx===e&&t.emit({type:"onResolved",...m}),b&&t._tx===e&&t.emit({type:"onRendered",...m})}),t._tx===e&&(t._commitPromise?.resolve(),t._commitPromise=void 0)})}async function s1(t,e){const r=t._tx,i=t.stores.resolvedLocation.get(),o=i??t.stores.location.get(),c=t.latestLocation,u=t._pendingLocation,f=u?.href===c.href?u._redirects??0:0,h=t._handoff,m=h?.[0](),y=new AbortController,g=t._preflight;if(t._preflight=y,m||h?.[1](),g?.abort(),!y.signal.aborted){const B=vu(c,i);t.emit({type:"onBeforeNavigate",...B}),y.signal.aborted||t.emit({type:"onBeforeLoad",...B})}if(y.signal.aborted){await kc(t,r);return}const b=o.href===c.href;let _=y;const S=t.matchRoutes(c,{_controller:y});sp(S);const E=m?h[1](S):void 0;if(E?_=m:m?.abort(),y.signal.aborted){Ut(t,S),await kc(t,r);return}t._preflight=void 0;let A;const T=()=>r1(t,x,b,()=>Th(t,x),e?.sync,E),C=e?.sync?new Promise(B=>A=B):Promise.resolve().then(T),x=[_,f,c,S,Date.now(),C.then(()=>kc(t,x))];if(t._tx=x,r){for(const B of t.stores.matches.get()){if(t._tx!==x)break;B.isFetching&&Ko(t,B,!1)}r[0].abort(),Ut(t,r[3],x[3],!0)}if(t._tx!==x){Ut(t,x[3]),x[3]=[],A?.(),await kc(t,x);return}t.batch(()=>{t.stores.status.set("pending"),t.stores.location.set(c)}),(E||!t._committed.length&&S[0]?.status!=="success"&&!S.some(B=>B._notFound))&&Th(t,x),A?.(T()),await x[5]}async function i1(t,e){let r=t.buildLocation(e);for(let i=0;;i++){const o=t._committed,c=new AbortController;let u,f,h;try{try{u=t.matchRoutes(r,{_controller:c}),sp(u),f=(t._preloads??=new Map).set(c,u),h=await Hb(t,r,u,[c,i,o,!0])}finally{f&&(f=f.delete(c),Ut(t,u)),c.abort()}if(!Vo(h))return h[1];if(!f||h.length<3)return;r=h[2]}catch(m){li(m)||console.error(m);return}}}async function a1(t){const e=window.$_TSR,r=t.options.serializationAdapters;r?.length&&(e.t=new Map(r.map(G=>[G.key,G.fromSerializable])),e.buffer.forEach(G=>G())),e.initialized=!0;const i=e.router;t.ssr={manifest:i.manifest},t.options.ssr={nonce:document.querySelector('meta[property="csp-nonce"]')?.content};const o=i.matches,c=new AbortController,u=t._preflight;t._preflight=c,u?.abort();const f=()=>t._preflight===c;let h,m,y,g;try{if(await Dr(t.options.hydrate?.(i.dehydratedData),c.signal),!f())return;const G=t.history.location;y=G.href,g=G.state,t.updateLatestLocation(),h=t.latestLocation,t.stores.location.set(h),m=t.matchRoutes(h,{_controller:c})}
11catch(G){if(f()&&(t._preflight=void 0),c.abort(G),G!==c.signal)throw G}if(!f())return;const b=[];let _,S=0;const E=G=>{S=Math.min(S,G+1);const K=b.splice(G);for(const ee of K)In(t,ee).options.loader&&(ee.status==="success"||!ee.invalid&&"loaderData"in ee)&&Bb(t,{...ee,status:"success",error:void 0,preload:!0},t._cache.get(ee.id));Ut(t,K)},A=o.length>m.length?m.findIndex(G=>G._notFound)+1:o.length;let T=!1;for(let G=0;G<A;G++){const K=m[G],ee=o[G];if(typeof ee.i!="string"||iT(ee.i)!==K.id){_??=G;break}S=G+1;const ve=In(t,K);if(("l"in ee||ee.s==="success"&&ee.e===void 0&&ve.options.loader)&&(K.loaderData=ee.l),K.status=ee.s,K.ssr=ee.ssr,ve.options.ssr=K.ssr,K.updatedAt=ee.u,K.error=ee.e,K._notFound||=ee.g,K.status==="error"||K.status==="notFound"||K._notFound){T=!0,b.push(K),(K.ssr===!1||K.ssr==="data-only")&&(_??=G);break}if(K.status==="pending"){_??=G;break}b.push(K),K.ssr==="data-only"&&(_??=G)}!T&&b.length===A&&A<m.length&&(_=A);const C=b.map(async G=>{try{const K=In(t,G);return await(G._notFound?Promise.all([Nr(K),Nr(K,"notFoundComponent")]):Nr(K,G.status==="error"?"errorComponent":G.status==="notFound"?"notFoundComponent":void 0)),!0}catch{return!1}});let x=0;try{for(;x<C.length&&await Dr(C[x],c.signal);)x++}catch{return}if(!f())return;x<b.length&&E(x);const B=Math.max(_===b.length?b.length+1:b.length,x<C.length?x:S);for(let G=0;G<B;G++){const K=m[G],ee=In(t,K),ve=m[G-1]?.context??t.options.context??{};let oe;if(ee.options.context){try{oe=K._ctx=ee.options.context({deps:K.loaderDeps,params:K.params,context:ve,location:h,navigate:j=>t.navigate({...j,_fromLocation:h}),buildLocation:t.buildLocation,cause:K.cause,abortController:c,preload:!1,matches:m,routeId:ee.id})||{}}catch{if(!f())return;if(K.status!=="error"&&K.status!=="notFound"&&!K._notFound){_=Math.min(_??G,G),E(G);break}}if(!f())return}K.context={...ve,...oe,...b[G]&&o[G].b}}if(await ap(t,[h,m],c.signal,0,S),!f())return;const Z=_!==void 0||b.length<A,z=T&&b.length===A?m:b;let D=Z?m:z,Y;if(Z&&_!==void 0){const G=D[_];Y=G.ssr==="data-only"&&S>_+1?S:void 0,D=D.slice(),D[_]={...G,status:"pending",ssr:G.ssr==="data-only"?"data-only":!1,_assetEnd:Y}}const ne=()=>{const G=t.history.location;return Z&&!t._tx&&G.href===y&&G.state===g&&t._committed===z&&z.length&&!c.signal.aborted?c:void 0},de=[ne,G=>{if(t._handoff!==de)return;t._handoff=void 0;const K=z.length;if(!G||!ne()||z.some((oe,j)=>oe.id!==G[j]?.id)){c.abort();return}let ee=Y;if(ee!==void 0){for(let oe=K;oe<ee;oe++)if(m[oe]?.id!==G[oe]?.id){ee=oe>_+1?oe:void 0;break}}const ve=z.map(oe=>({...oe}));ee!==void 0&&(ve[_]._assetEnd=ee),Ut(t,G.splice(0,K,...ve));for(let oe=K;oe<G.length;oe++){const j=G[oe],F=m[oe];F?.id===j.id&&F._ctx&&(j._ctx=F._ctx),j.abortController=c}return K}];t._committed=z,t._lifecycleEnd=Ub(z),t._handoff=de,t._preflight=void 0,t.batch(()=>{t.stores.setMatches(D),t.stores.status.set("idle"),Z||t.stores.resolvedLocation.set(t.stores.location.get())})}const Lr=Symbol.asyncIterator,Vb=Symbol.hasInstance,ba=Symbol.isConcatSpreadable,Mr=Symbol.iterator,Gb=Symbol.match,Kb=Symbol.matchAll,Fb=Symbol.replace,Yb=Symbol.search,Zb=Symbol.species,Jb=Symbol.split,Qb=Symbol.toPrimitive,_a=Symbol.toStringTag,Xb=Symbol.unscopables,Wb={[Lr]:0,[Vb]:1,[ba]:2,[Mr]:3,[Gb]:4,[Kb]:5,[Fb]:6,[Yb]:7,[Zb]:8,[Jb]:9,[Qb]:10,[_a]:11,[Xb]:12},o1={0:Lr,1:Vb,2:ba,3:Mr,4:Gb,5:Kb,6:Fb,7:Yb,8:Zb,9:Jb,10:Qb,11:_a,12:Xb},l1={2:!0,3:!1,1:void 0,0:null,4:-0,5:Number.POSITIVE_INFINITY,6:Number.NEGATIVE_INFINITY,7:NaN},c1={0:"Error",1:"EvalError",2:"RangeError",3:"ReferenceError",4:"SyntaxError",5:"TypeError",6:"URIError"},u1={0:Error,1:EvalError,2:RangeError,3:ReferenceError,4:SyntaxError,5:TypeError,6:URIError};function Ue(t,e,r,i,o,c,u,f,h,m,y,g){return{t,i:e,s:r,c:i,m:o,p:c,e:u,a:f,f:h,b:m,o:y,l:g}}function Rs(t){return Ue(2,void 0,t,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}const e_=Rs(2),t_=Rs(3),d1=Rs(1),f1=Rs(0),h1=Rs(4),p1=Rs(5),m1=Rs(6),g1=Rs(7),y1=64,v1=/[\x00-\x07\x0b\x0e-\x1f<\u2028\u2029\ud800-\udfff]/;function b1(t){switch(t){case'"':return'\\"';case"\\":return"\\\\";case` 12`:return"\\n";case"\r":return"\\r";case"\b":return"\\b";case" ":return"\\t";case"\f":return"\\f";case"<":return"\\x3C";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:return}}function ui(t){if(t.length>=y1&&!v1.test(t))return JSON.stringify(t).slice(1,-1);let e="",r=0,i;for(let o=0,c=t.length;o<c;o++)i=b1(t[o]),i&&(e+=t.slice(r,o)+i,r=o+1);return r===0?e=t:e+=t.slice(r),e}function _1(t){switch(t){case"\\\\":return"\\";case'\\"':return'"';case"\\n":return` 13`;case"\\r":return"\r";case"\\b":return"\b";case"\\t":return" ";case"\\f":return"\f";case"\\x3C":return"<";case"\\u2028":return"\u2028";case"\\u2029":return"\u2029";default:return t}}function Os(t){return typeof t=="string"&&!t.includes("\\")?t:t.replace(/(\\\\|\\"|\\n|\\r|\\b|\\t|\\f|\\u2028|\\u2029|\\x3C)/g,_1)}
13const w1={parsing:1,serialization:2,deserialization:3};function S1(t){return`Seroval Error (step: ${w1[t]})`}const E1=(t,e)=>S1(t);var n_=class extends Error{constructor(t,e){super(E1(t)),this.cause=e}},Vv=class extends n_{constructor(t){super("parsing",t)}},T1=class extends n_{constructor(t){super("deserialization",t)}};function zr(t){return`Seroval Error (specific: ${t})`}var di=class extends Error{constructor(t){super(zr(1)),this.value=t}},op=class extends Error{constructor(t){super(zr(2))}},A1=class extends Error{constructor(t){super(zr(3))}},_u=class extends Error{constructor(t){super(zr(4))}},R1=class extends Error{constructor(t){super(zr(5)),this.value=t}},O1=class extends Error{constructor(t){super(zr(6))}},k1=class extends Error{constructor(t){super(zr(7))}},St=class extends Error{constructor(t){super(zr(8))}},r_=class extends Error{constructor(t){super(zr(9))}};const Cc="__SEROVAL_REFS__",s_=new Map,ha=new Map;function i_(t){return s_.has(t)}function C1(t){return ha.has(t)}function x1(t){if(i_(t))return s_.get(t);throw new R1(t)}function N1(t){if(C1(t))return ha.get(t);throw new O1(t)}typeof globalThis<"u"?Object.defineProperty(globalThis,Cc,{value:ha,configurable:!0,writable:!1,enumerable:!1}):typeof window<"u"?Object.defineProperty(window,Cc,{value:ha,configurable:!0,writable:!1,enumerable:!1}):typeof self<"u"?Object.defineProperty(self,Cc,{value:ha,configurable:!0,writable:!1,enumerable:!1}):typeof global<"u"&&Object.defineProperty(global,Cc,{value:ha,configurable:!0,writable:!1,enumerable:!1});function lp(t){return t instanceof EvalError?1:t instanceof RangeError?2:t instanceof ReferenceError?3:t instanceof SyntaxError?4:t instanceof TypeError?5:t instanceof URIError?6:0}function j1(t){const e=c1[lp(t)];return t.name!==e?{name:t.name}:t.constructor.name!==e?{name:t.constructor.name}:{}}function a_(t,e){let r=j1(t);const i=Object.getOwnPropertyNames(t);for(let o=0,c=i.length,u;o<c;o++)u=i[o],u!=="name"&&u!=="message"&&(u==="stack"?e&4&&(r=r||{},r[u]=t[u]):(r=r||{},r[u]=t[u]));return r}function o_(t){return Object.isFrozen(t)?3:Object.isSealed(t)?2:Object.isExtensible(t)?0:1}function D1(t){switch(t){case Number.POSITIVE_INFINITY:return p1;case Number.NEGATIVE_INFINITY:return m1}return t!==t?g1:Object.is(t,-0)?h1:Ue(0,void 0,t,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}function l_(t){return Ue(1,void 0,ui(t),void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}function L1(t){return Ue(3,void 0,""+t,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}function M1(t){return Ue(4,t,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}function U1(t,e){const r=e.valueOf();return Ue(5,t,r!==r?"":e.toISOString(),void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}function ds(t,e,r){return Ue(36,t,r.toString(),e,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}function z1(t,e){return Ue(6,t,void 0,ui(e.source),e.flags,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}function P1(t,e){return Ue(17,t,Wb[e],void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}function B1(t,e){return Ue(18,t,ui(x1(e)),void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}function I1(t,e,r){return Ue(25,t,r,ui(e),void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}function H1(t,e,r){return Ue(9,t,void 0,void 0,void 0,void 0,void 0,r,void 0,void 0,o_(e),void 0)}function $1(t,e){return Ue(21,t,void 0,void 0,void 0,void 0,void 0,void 0,e,void 0,void 0,void 0)}const cp=1e6;function q1(t,e,r){if(e.length>cp)throw new di(e);return Ue(15,t,void 0,e.constructor.name,void 0,void 0,void 0,void 0,r,e.byteOffset,void 0,e.length)}function V1(t,e,r){if(e.length>cp)throw new di(e);return Ue(16,t,void 0,e.constructor.name,void 0,void 0,void 0,void 0,r,e.byteOffset,void 0,e.length)}function G1(t,e,r){if(e.byteLength>cp)throw new di(e);return Ue(20,t,void 0,void 0,void 0,void 0,void 0,void 0,r,e.byteOffset,void 0,e.byteLength)}function K1(t,e,r){return Ue(13,t,lp(e),void 0,ui(e.message),r,void 0,void 0,void 0,void 0,void 0,void 0)}function F1(t,e,r){return Ue(14,t,lp(e),void 0,ui(e.message),r,void 0,void 0,void 0,void 0,void 0,void 0)}function Y1(t,e){return Ue(7,t,void 0,void 0,void 0,void 0,void 0,e,void 0,void 0,void 0,void 0)}function Z1(t,e){return Ue(28,void 0,void 0,void 0,void 0,void 0,void 0,[t,e],void 0,void 0,void 0,void 0)}function J1(t,e){return Ue(30,void 0,void 0,void 0,void 0,void 0,void 0,[t,e],void 0,void 0,void 0,void 0)}function Q1(t,e,r){return Ue(31,t,void 0,void 0,void 0,void 0,void 0,r,e,void 0,void 0,void 0)}function X1(t,e){return Ue(32,t,void 0,void 0,void 0,void 0,void 0,void 0,e,void 0,void 0,void 0)}function W1(t,e){return Ue(33,t,void 0,void 0,void 0,void 0,void 0,void 0,e,void 0,void 0,void 0)}function eA(t,e){return Ue(34,t,void 0,void 0,void 0,void 0,void 0,void 0,e,void 0,void 0,void 0)}function tA(t,e,r,i){return Ue(35,t,r,void 0,void 0,void 0,void 0,e,void 0,void 0,void 0,i)}var nA=class{constructor(t,e){this.value=t,this.replacement=e}};const up=()=>{const t={p:0,s:0,f:0};return t.p=new Promise((e,r)=>{t.s=e,t.f=r}),t},rA=t=>e=>()=>{let r=0;const i={[t](){return i},next(){if(r>e.d)return{done:!0,value:void 0};const o=r++,c=e.v[o];if(o===e.t)throw c;return{done:o===e.d,value:c}}};return i},sA=(t,e)=>r=>()=>{let i=0,o=-1,c=!1;const u=[],f=[],h={finalize(y=0,g=f.length){for(;y<g;y++)f[y].s({done:!0,value:void 0})}};r.on({next(y){const g=f.shift();g&&g.s({done:!1,value:y}),u.push(y)},throw(y){const g=f.shift();g&&g.f(y),h.finalize(),o=u.length,c=!0,u.push(y)},return(y){const g=f.shift();g&&g.s({done:!0,value:y}),h.finalize(),o=u.length,u.push(y)}});const m={[t](){return m},next(){if(o===-1){const b=i++;if(b>=u.length){const _=e();return f.push(_),_.p}return{done:!1,value:u[b]}}if(i>o)return{done:!0,value:void 0};const y=i++,g=u[y];if(y!==o)return{done:!1,value:g};if(c)throw g;return{done:!0,value:g}}};return m},iA=t=>{const e=atob(t),r=e.length,i=new Uint8Array(r);for(let o=0;o<r;o++)i[o]=e.charCodeAt(o);return i.buffer};var c_=class{constructor(t,e,r){this.v=t,this.t=e,this.d=r}};function u_(t){return t instanceof c_}function d_(t,e,r){return new c_(t,e,r)}function aA(t){const e=[];let r=-1,i=-1;const o=t[Mr]();for(;;)try{const c=o.next();
13if(e.push(c.value),c.done){i=e.length-1;break}}catch(c){r=e.length,i=r,e.push(c);break}return d_(e,r,i)}const oA=rA(Mr);function lA(t){return oA(t)}const cA={},uA={},dA={0:{},1:{},2:{},3:{},4:{},5:{}};function f_(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function fA(t,e){f_(t,e),e.add(t)}function ko(t,e,r){f_(t,e),e.set(t,r)}function pa(t,e,r){if(typeof t=="function"?t===e:t.has(e))return arguments.length<3?e:r;throw new TypeError("Private element is not present on this object")}function Fe(t,e){return t.get(pa(t,e))}function ra(t,e,r){return t.set(pa(t,e),r),r}var ma=new WeakMap,Ar=new WeakMap,Rr=new WeakMap,Fc=new WeakMap,Ln=new WeakMap,Co=new WeakSet,h_=class{constructor(){fA(this,Co),ko(this,ma,[]),ko(this,Ar,[]),ko(this,Rr,!0),ko(this,Fc,!1),ko(this,Ln,0)}on(t){let e=Fe(Rr,this),r=0;if(e){for(;r<Fe(Ln,this)&&Fe(Ar,this)[r];r++);if(r===Fe(Ln,this)){var i;ra(Ln,this,(i=Fe(Ln,this),i++,i))}Fe(Ar,this)[r]=t}return pa(Co,this,hA).call(this,t),()=>{if(Fe(Rr,this)&&e){for(e=!1,Fe(Ar,this)[r]=void 0;Fe(Ln,this)>0&&!Fe(Ar,this)[Fe(Ln,this)-1];){var o;ra(Ln,this,(o=Fe(Ln,this),o--,o))}Fe(Ar,this).length=Fe(Ln,this)}}}next(t){Fe(Rr,this)&&(Fe(ma,this).push(t),pa(Co,this,eh).call(this,t,"next"))}throw(t){Fe(Rr,this)&&(Fe(ma,this).push(t),pa(Co,this,eh).call(this,t,"throw"),ra(Rr,this,!1),ra(Fc,this,!1),Fe(Ar,this).length=0)}return(t){Fe(Rr,this)&&(Fe(ma,this).push(t),pa(Co,this,eh).call(this,t,"return"),ra(Rr,this,!1),ra(Fc,this,!0),Fe(Ar,this).length=0)}};function eh(t,e){for(let i=0;i<Fe(Ln,this);i++){var r;(r=Fe(Ar,this)[i])===null||r===void 0||r[e](t)}}function hA(t){for(let e=0,r=Fe(ma,this).length;e<r;e++){const i=Fe(ma,this)[e];!Fe(Rr,this)&&e===r-1?t[Fe(Fc,this)?"return":"throw"](i):t.next(i)}}function dp(t){return t instanceof h_}function ll(){return new h_}function pA(t,e){const r=ll(),i=t[Lr]();let o=!1,c=!1;async function u(){try{for(;!o;){const f=await i.next();if(f.done){c=!0,r.return(f.value);break}r.next(f.value)}}catch(f){c=!0,r.throw(f)}}return u().catch(()=>{}),r}const mA=sA(Lr,up);function gA(t){return mA(t)}async function yA(t){try{return[1,await t]}catch(e){return[0,e]}}function vA(t,e){var r;return{plugins:e.plugins,mode:t,marked:new Set,features:127^(e.disabledFeatures||0),refs:e.refs||new Map,depthLimit:e.depthLimit||1e3,compactArrayBufferViews:(r=e.compactArrayBufferViews)!==null&&r!==void 0?r:!1}}function Yc(t,e){t.marked.add(e)}function bA(t,e){const r=t.refs.size;return t.refs.set(e,r),r}function wu(t,e){const r=t.refs.get(e);return r!=null?(Yc(t,r),{type:1,value:M1(r)}):{type:0,value:bA(t,e)}}function fp(t,e){const r=wu(t,e);return r.type===1?r:i_(e)?{type:2,value:B1(r.value,e)}:r}function si(t,e){const r=fp(t,e);if(r.type!==0)return r.value;if(e in Wb)return P1(r.value,e);throw new di(e)}function Su(t,e){const r=wu(t,dA[e]);return r.type===1?r.value:Ue(26,r.value,e,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}function _A(t){const e=wu(t,cA);return e.type===1?e.value:Ue(27,e.value,void 0,void 0,void 0,void 0,void 0,void 0,si(t,Mr),void 0,void 0,void 0)}function wA(t){const e=wu(t,uA);return e.type===1?e.value:Ue(29,e.value,void 0,void 0,void 0,void 0,void 0,[Su(t,1),si(t,Lr)],void 0,void 0,void 0,void 0)}function SA(t,e,r,i){return Ue(r?11:10,t,void 0,void 0,void 0,i,void 0,void 0,void 0,void 0,o_(e),void 0)}function EA(t,e,r,i){return Ue(8,e,void 0,void 0,void 0,void 0,{k:r,v:i},void 0,Su(t,0),void 0,void 0,void 0)}function hp(t,e){if(!t.compactArrayBufferViews)return e;const r=new Uint8Array(e.buffer,e.byteOffset,e.byteLength).slice().buffer,i=e.constructor;return new i(r)}function TA(t){if(typeof Buffer<"u")return Buffer.from(t).toString("base64");const e=new Uint8Array(t);if(typeof e.toBase64=="function")return e.toBase64();let r="";for(let i=0,o=e.length;i<o;i++)r+=String.fromCharCode(e[i]);return btoa(r)}function AA(t,e,r){return Ue(19,e,TA(r),void 0,void 0,void 0,void 0,void 0,Su(t,5),void 0,void 0,void 0)}function RA(t,e){return{base:vA(t,e),child:void 0}}var OA=class{constructor(t,e){this._p=t,this.depth=e}parse(t){return gt(this._p,this.depth,t)}};async function kA(t,e,r){const i=[];for(let o=0,c=r.length;o<c;o++)o in r?i[o]=await gt(t,e,r[o]):i[o]=0;return i}async function CA(t,e,r,i){return H1(r,i,await kA(t,e,i))}async function pp(t,e,r){const i=Object.entries(r),o=[],c=[];for(let u=0,f=i.length;u<f;u++)o.push(ui(i[u][0])),c.push(await gt(t,e,i[u][1]));return Mr in r&&(o.push(si(t.base,Mr)),c.push(Z1(_A(t.base),await gt(t,e,aA(r))))),Lr in r&&(o.push(si(t.base,Lr)),c.push(J1(wA(t.base),await gt(t,e,pA(r))))),_a
13in r&&(o.push(si(t.base,_a)),c.push(l_(r[_a]))),ba in r&&(o.push(si(t.base,ba)),c.push(r[ba]?e_:t_)),{k:o,v:c}}async function th(t,e,r,i,o){return SA(r,i,o,await pp(t,e,i))}async function xA(t,e,r,i){return $1(r,await gt(t,e,i.valueOf()))}async function NA(t,e,r,i){return i=hp(t.base,i),q1(r,i,await gt(t,e,i.buffer))}async function jA(t,e,r,i){return i=hp(t.base,i),V1(r,i,await gt(t,e,i.buffer))}async function DA(t,e,r,i){return i=hp(t.base,i),G1(r,i,await gt(t,e,i.buffer))}async function Gv(t,e,r,i){const o=a_(i,t.base.features);return K1(r,i,o?await pp(t,e,o):void 0)}async function LA(t,e,r,i){const o=a_(i,t.base.features);return F1(r,i,o?await pp(t,e,o):void 0)}async function MA(t,e,r,i){const o=[],c=[];for(const[u,f]of i.entries())o.push(await gt(t,e,u)),c.push(await gt(t,e,f));return EA(t.base,r,o,c)}async function UA(t,e,r,i){const o=[];for(const c of i.keys())o.push(await gt(t,e,c));return Y1(r,o)}async function p_(t,e,r,i){const o=t.base.plugins;if(o)for(let c=0,u=o.length;c<u;c++){const f=o[c];if(f.parse.async&&f.test(i))return I1(r,f.tag,await f.parse.async(i,new OA(t,e),{id:r}))}}async function zA(t,e,r,i){const[o,c]=await yA(i);return Ue(12,r,o,void 0,void 0,void 0,void 0,void 0,await gt(t,e,c),void 0,void 0,void 0)}function PA(t,e,r,i,o){const c=[],u=r.on({next:f=>{Yc(this.base,e),gt(this,t,f).then(h=>{c.push(X1(e,h))},h=>{o(h),u()})},throw:f=>{Yc(this.base,e),gt(this,t,f).then(h=>{c.push(W1(e,h)),i(c),u()},h=>{o(h),u()})},return:f=>{Yc(this.base,e),gt(this,t,f).then(h=>{c.push(eA(e,h)),i(c),u()},h=>{o(h),u()})}})}async function BA(t,e,r,i){return Q1(r,Su(t.base,4),await new Promise(PA.bind(t,e,r,i)))}async function IA(t,e,r,i){const o=[];for(let c=0,u=i.v.length;c<u;c++)o[c]=await gt(t,e,i.v[c]);return tA(r,o,i.t,i.d)}async function HA(t,e,r,i){if(Array.isArray(i))return CA(t,e,r,i);if(dp(i))return BA(t,e,r,i);if(u_(i))return IA(t,e,r,i);let o=i.constructor;if(o!==void 0&&typeof o!="function"){const f=Object.getPrototypeOf(i);o=f===null?void 0:f.constructor}if(o===nA)return gt(t,e,i.replacement);const c=await p_(t,e,r,i);if(c)return c;switch(o){case Object:return th(t,e,r,i,!1);case void 0:return th(t,e,r,i,!0);case Date:return U1(r,i);case Error:case EvalError:case RangeError:case ReferenceError:case SyntaxError:case TypeError:case URIError:return Gv(t,e,r,i);case Number:case Boolean:case String:case BigInt:return xA(t,e,r,i);case ArrayBuffer:return AA(t.base,r,i);case Int8Array:case Int16Array:case Int32Array:case Uint8Array:case Uint16Array:case Uint32Array:case Uint8ClampedArray:case Float32Array:case Float64Array:return NA(t,e,r,i);case DataView:return DA(t,e,r,i);case Map:return MA(t,e,r,i);case Set:return UA(t,e,r,i)}if(o===Promise||i instanceof Promise)return zA(t,e,r,i);const u=t.base.features;if(u&32&&o===RegExp)return z1(r,i);if(u&16)switch(o){case BigInt64Array:case BigUint64Array:return jA(t,e,r,i)}if(u&1&&typeof AggregateError<"u"&&(o===AggregateError||i instanceof AggregateError))return LA(t,e,r,i);if(u&64&&typeof Temporal<"u")switch(o){case Temporal.Instant:return ds(r,0,i);case Temporal.Duration:return ds(r,1,i);case Temporal.PlainDate:return ds(r,2,i);case Temporal.PlainDateTime:return ds(r,3,i);case Temporal.PlainMonthDay:return ds(r,4,i);case Temporal.PlainTime:return ds(r,5,i);case Temporal.PlainYearMonth:return ds(r,6,i);case Temporal.ZonedDateTime:return ds(r,7,i)}if(i instanceof Error)return Gv(t,e,r,i);if(Mr in i||Lr in i)return th(t,e,r,i,!!o);throw new di(i)}async function $A(t,e,r){const i=fp(t.base,r);if(i.type!==0)return i.value;const o=await p_(t,e,i.value,r);if(o)return o;throw new di(r)}async function gt(t,e,r){if(e>=t.base.depthLimit)throw new r_(t.base.depthLimit);switch(typeof r){case"boolean":return r?e_:t_;case"undefined":return d1;case"string":return l_(r);case"number":return D1(r);case"bigint":return L1(r);case"object":if(r){const i=fp(t.base,r);return i.type===0?await HA(t,e+1,i.value,r):i.value}return f1;case"symbol":return si(t.base,r);case"function":return $A(t,e,r);default:throw new di(r)}}async function qA(t,e){try{return await gt(t,0,e)}catch(r){throw r instanceof Vv?r:new Vv(r)}}function m_(t,e){for(let r=0,i=e.length;r<i;r++){const o=e[r];
13t.has(o)||(t.add(o),o.extends&&m_(t,o.extends))}}function g_(t){if(t){const e=new Set;return m_(e,t),[...e]}}function VA(t){switch(t){case"Int8Array":return Int8Array;case"Int16Array":return Int16Array;case"Int32Array":return Int32Array;case"Uint8Array":return Uint8Array;case"Uint16Array":return Uint16Array;case"Uint32Array":return Uint32Array;case"Uint8ClampedArray":return Uint8ClampedArray;case"Float32Array":return Float32Array;case"Float64Array":return Float64Array;case"BigInt64Array":return BigInt64Array;case"BigUint64Array":return BigUint64Array;default:throw new k1(t)}}function GA(t){switch(t){case"constructor":case"__proto__":case"prototype":case"__defineGetter__":case"__defineSetter__":case"__lookupGetter__":case"__lookupSetter__":return!1;default:return!0}}function KA(t){switch(t){case Lr:case ba:case _a:case Mr:return!0;default:return!1}}const FA=1e6,YA=512,ZA=1e4,JA=2e4;function y_(t,e){switch(e){case 3:return Object.freeze(t);case 1:return Object.preventExtensions(t);case 2:return Object.seal(t);default:return t}}const QA=1e3;function XA(t,e){var r,i;const o=(r=e.maxBase64Length)!==null&&r!==void 0?r:FA;if(!Number.isSafeInteger(o)||o<0)throw new RangeError("maxBase64Length must be a non-negative safe integer");const c=e.refs||new Map;return"types"in c||Object.assign(c,{types:new Map}),{mode:t,plugins:e.plugins,refs:c,features:(i=e.features)!==null&&i!==void 0?i:127^(e.disabledFeatures||0),depthLimit:e.depthLimit||QA,maxBase64Length:o}}function WA(t){return{mode:2,base:XA(2,t),child:void 0}}var eR=class{constructor(t,e){this._p=t,this.depth=e}deserialize(t){return Je(this._p,this.depth,t)}};function v_(t,e){if(e<0||!Number.isFinite(e)||!Number.isInteger(e))throw new St({t:4,i:e});if(t.refs.has(e))throw new Error("Conflicted ref id: "+e)}function b_(t){return!!t&&(typeof t=="object"||typeof t=="function")&&"then"in t&&typeof t.then=="function"}function tR(t,e,r){return v_(t.base,e),t.state.marked.has(e)&&t.base.refs.set(e,r),r}function nR(t,e,r){return v_(t.base,e),t.base.refs.set(e,r),r}function pt(t,e,r){return t.mode===1?tR(t,e,r):nR(t,e,r)}function Ah(t,e,r){if(Object.hasOwn(e,r))return e[r];throw new St(t)}function rR(t,e){return pt(t,e.i,N1(Os(e.s)))}function Es(t,e){if(!Array.isArray(e))throw new St(t)}function sR(t,e,r){const i=r.a;Es(r,i);const o=i.length,c=pt(t,r.i,new Array(o));for(let u=0,f;u<o;u++)f=i[u],f&&(c[u]=Je(t,e,f));return y_(c,r.o),c}function Kv(t,e,r){GA(e)?t[e]=r:Object.defineProperty(t,e,{value:r,configurable:!0,enumerable:!0,writable:!0})}function iR(t,e,r,i,o){if(typeof i=="string")Kv(r,Os(i),Je(t,e,o));else{const c=Je(t,e,i);switch(typeof c){case"string":Kv(r,c,Je(t,e,o));break;case"symbol":KA(c)&&(r[c]=Je(t,e,o));break;default:throw new St(i)}}}function __(t,e,r){t.base.refs.types.set(e,r)}function Eu(t,e,r,i){if(t.base.refs.types.get(r)!==i)throw new St(e)}function w_(t,e,r,i){const o=r.k;if(Es(r,o),Es(r,r.v),o.length>0)for(let c=0,u=r.v,f=o.length;c<f;c++)iR(t,e,i,o[c],u[c]);return i}function aR(t,e,r){const i=pt(t,r.i,r.t===10?{}:Object.create(null));return w_(t,e,r.p,i),y_(i,r.o),i}function oR(t,e){return pt(t,e.i,new Date(e.s))}function lR(t,e){if(!(t.base.features&64))throw new op(e);let r;switch(e.c){case 0:r=Temporal.Instant.from(e.s);break;case 1:r=Temporal.Duration.from(e.s);break;case 2:r=Temporal.PlainDate.from(e.s);break;case 3:r=Temporal.PlainDateTime.from(e.s);break;case 4:r=Temporal.PlainMonthDay.from(e.s);break;case 5:r=Temporal.PlainTime.from(e.s);break;case 6:r=Temporal.PlainYearMonth.from(e.s);break;case 7:r=Temporal.ZonedDateTime.from(e.s);break;default:throw new St(e)}return pt(t,e.i,r)}function cR(t,e){if(t.base.features&32){const r=Os(e.c);if(r.length>JA)throw new St(e);return pt(t,e.i,new RegExp(r,e.m))}throw new op(e)}function uR(t,e,r){const i=pt(t,r.i,new Set);Es(r,r.a);for(let o=0,c=r.a,u=c.length;o<u;o++)i.add(Je(t,e,c[o]));return i}function dR(t,e,r){const i=pt(t,r.i,new Map);Es(r,r.e.k),Es(r,r.e.v);for(let o=0,c=r.e.k,u=r.e.v,f=c.length;o<f;o++)i.set(Je(t,e,c[o]),Je(t,e,u[o]));return i}function fR(t,e){if(typeof e.s!="string")throw new St(e);if(e.s.length>t.base.maxBase64Length)throw new RangeError("ArrayBuffer exceeds maxBase64Length ("+t.base.maxBase64Length+")");const r=Os(e.s);let i;if(r.length<YA||typeof Buffer>"u")i=iA(r);else{const o=atob(r);i=new ArrayBuffer(o.length),Buffer.from(i).write(o,"latin1")}return pt(t,e.i,i)}function hR(t,e,r){var i;const o=VA(r.c),c=Je(t,e,r.f);if(!(c instanceof ArrayBuffer))throw new St(r);const u=(i=r.b)!==null&&i!==void 0?i:0;if(u<0||u>c.byteLength)throw new St(r);return pt(t,r.i,new o(c,u,r.l))}function pR(t,e,r){var i;const o=Je(t,e,r.f);if(!(o instanceof ArrayBuffer))throw new St(r);const c=(i=r.b)!==null&&i!==void 0?i:0;if(c<0||c>o.byteLength)throw new St(r);return pt(t,r.i,new DataView(o,c,r.l))}function S_(t,e,r,i){if(r.p){const o=w_(t,e,r.p,{});Object.defineProperties(i,Object.getOwnPropertyDescriptors(o))}return i}function mR(t,e,r){return S_(t,e,r,pt(t,r.i,new AggregateError([],Os(r.m))))}function gR(t,e,r){const i=Ah(r,u1,r.s);return S_(t,e,r,pt(t,r.i,new i(Os(r.m))))}function yR(t,e,r){const i=up(),o=pt(t,r.i,i.p),c=Je(t,e,r.f);if(b_(c))throw new St(r.f);return r.s?i.s(c):i.f(c),o}function vR(t,e,r){return pt(t,r.i,Object(Je(t,e,r.f)))}function bR(t,e,r){const i=t.base.plugins;if(i){const o=Os(r.c);for(let c=0,u=i.length;c<u;c++){const f=i[c];if(f.tag===o)return pt(t,r.i,f.deserialize(r.s,new eR(t,e),{id:r.i}))}}throw new A1(r.c)}function _R(t,e){const r=pt(t,e.i,pt(t,e.s,up()).p);return __(t,e.s,22),r}function wR(t,e,r){const i=t.base.refs.get(r.i);if(i){Eu(t,r,r.i,22);const o=Je(t,e,r.a[1]);if(b_(o))throw new St(r.a[1]);r.t===23?i.s(o):i.f(o);return}throw new _u("Promise")}function SR(t,e,r){Je(t,e,r.a[0]);const i=Je(t,e,r.a[1]);if(!u_(i))throw new St(r.a[1]);return lA(i)}function ER(t,e,r){Je(t,e,r.a[0]);const i=Je(t,e,r.a[1]);if(!dp(i))throw new St(r.a[1]);return gA(i)}function TR(t,e,r){const i=pt(t,r.i,ll());__(t,r.i,31);const o=r.a;Es(r,o);const c=o.length;if(c)for(let u=0;u<c;u++)Je(t,e,o[u]);return i}function AR(t,e,r){const i=t.base.refs.get(r.i);if(i){Eu(t,r,r.i,31),i.next(Je(t,e,r.f));return}throw new _u("Stream")}function RR(t,e,r){const i=t.base.refs.get(r.i);if(i){Eu(t,r,r.i,31),i.throw(Je(t,e,r.f));return}throw new _u("Stream")}function OR(t,e,r){const i=t.base.refs.get(r.i);if(i){Eu(t,r,r.i,31),i.return(Je(t,e,r.f));return}throw new _u("Stream")}function kR(t,e,r){Je(t,e,r.f)}function CR(t,e,r){Je(t,e,r.a[1])}function Fv(t,e){return Number.isInteger(t)&&t>=-1&&t<e}function xR(t,e,r){Es(r,r.a);const i=r.a.length;if(!(Fv(r.s,i)&&Fv(r.l,i)))throw new St(r);const o=pt(t,r.i,d_([],r.s,r.l));for(let c=0;c<i;c++)o.v[c]=Je(t,e,r.a[c]);return o}function Je(t,e,r){if(e>t.base.depthLimit)throw new r_(t.base.depthLimit);switch(e+=1,r.t){case 2:return Ah(r,l1,r.s);case 0:return Number(r.s);case 1:return Os(String(r.s));case 3:if(String(r.s).length>ZA)throw new St(r);return BigInt(r.s);case 4:return t.base.refs.get(r.i);case 18:return rR(t,r);case 9:return sR(t,e,r);case 10:case 11:return aR(t,e,r);case 5:return oR(t,r);case 6:return cR(t,r);case 7:return uR(t,e,r);case 8:return dR(t,e,r);case 19:return fR(t,r);case 16:case 15:return hR(t,e,r);case 20:return pR(t,e,r);case 14:return mR(t,e,r);case 13:return gR(t,e,r);case 12:return yR(t,e,r);case 17:return Ah(r,o1,r.s);case 21:return vR(t,e,r);case 25:return bR(t,e,r);case 22:return _R(t,r);case 23:case 24:return wR(t,e,r);case 28:return SR(t,e,r);case 30:return ER(t,e,r);case 31:return TR(t,e,r);case 32:return AR(t,e,r);case 33:return RR(t,e,r);case 34:return OR(t,e,r);case 27:return kR(t,e,r);case 29:return CR(t,e,r);case 35:return xR(t,e,r);case 36:return lR(t,r);default:throw new op(r)}}function NR(t,e){try{return Je(t,0,e)}catch(r){throw new T1(r)}}function jR(t,e){const r=g_(e.plugins);return NR(WA({maxBase64Length:e.maxBase64Length,plugins:r,refs:e.refs,features:e.features,disabledFeatures:e.disabledFeatures,depthLimit:e.depthLimit}),t)}async function DR(t,e={}){const r=g_(e.plugins),i=RA(1,{compactArrayBufferViews:e.compactArrayBufferViews,plugins:r,disabledFeatures:e.disabledFeatures});return{t:await qA(i,t),f:i.base.features,m:Array.from(i.base.marked)}}function LR(t){return{tag:"$TSR/t/"+t.key,test:t.test,parse:{sync(e,r){return{v:r.parse(t.toSerializable(e))}},async async(e,r){return{v:await r.parse(t.toSerializable(e))}},stream(e,r){return{v:r.parse(t.toSerializable(e))}}},serialize:void 0,deserialize(e,r){return t.fromSerializable(r.deserialize(e.v))}}}const MR={tag:"$TSR/Error",test(t){return t instanceof Error},parse:{sync(t,e){return{message:e.parse(t.message)}},async async(t,e){return{message:await e.parse(t.message)}},stream(t,e){return{message:e.parse(t.message)}}},serialize(t,e){return"new Error("+e.serialize(t.message)+")"},deserialize(t,e){return new Error(e.deserialize(t.message))}};var UR=class{constructor(t,e){this.stream=t,this.hint=e?.hint??"binary"}};function E_(t){const e=[];for(let r=0;r<t.length;r+=32768)e.push(String.fromCharCode.apply(null,t.subarray(r,r+32768)));return btoa(e.join(""))}function T_(t){const e=atob(t),r=new Uint8Array(e.length);for(let i=0;i<e.length;i++)r[i]=e.charCodeAt(i);return r}const zR=new TextDecoder("utf-8",{fatal:!0,ignoreBOM:!0});function PR(t){try{return"t"+zR.decode(t)}catch{return"b"+E_(t)}}const BR=new TextEncoder;function IR(t){const e=t.slice(1);return t[0]==="t"?BR.encode(e):T_(e)}function HR(t,e,r){r?.throwIfAborted();const i=ll(),o=t.getReader();let c=!0;const u=()=>{c=!1,r?.removeEventListener("abort",h),o.releaseLock()},f=m=>c?(o.cancel(m).catch(()=>{}),u(),!0):!1,h=()=>{f(r.reason)&&i.throw(r.reason)};return r?.addEventListener("abort",h),(async()=>{try{for(;c;){const{done:m,value:y}=await o.read();if(!c)return;if(m){u(),i.return(void 0);return}i.next(e(y))}}catch(m){f(m)&&i.throw(m)}})(),[i,f]}function $R(t,e){let r,i=!1;return new ReadableStream({start(o){const c=t.on({next(u){if(!i)try{o.enqueue(e(u))}catch(f){i=!0;const h=r;r=void 0,h?.(),o.error(f)}},throw(u){i||(i=!0,r=void 0,o.error(u))},return(){i||(i=!0,r=void 0,o.close())}});i?c():r=c},cancel(){const o=r;r=void 0,o?.()}})}function A_(t){return{tag:"tss/RawStream",test:e=>e instanceof UR,parse:{async:async(e,r)=>{const i=await r.parse(e.hint==="text"),[o]=HR(e.stream,e.hint==="text"?PR:E_,t);return{text:i,stream:await r.parse(o)}}},serialize:void 0,deserialize:void 0}}const qR=A_(),VR={tag:"tss/RawStream",test:()=>!1,parse:{},serialize:void 0,deserialize(t,e){return $R(e.deserialize(t.stream),e.deserialize(t.text)?IR:T_)}},hs={},R_=t=>new ReadableStream({start(e){t.on({next(r){try{e.enqueue(r)}catch{}},throw(r){e.error(r)},return(){try{e.close()}catch{}}})}}),GR={tag:"seroval-plugins/web/ReadableStreamFactory",test(t){return t===hs}
13,parse:{sync(){return hs},async async(){return await Promise.resolve(hs)},stream(){return hs}},serialize(){return R_.toString()},deserialize(){return hs}};async function KR(t,e){try{for(;;){const r=await e.read();if(r.done){t.return(r.value),e.releaseLock();break}t.next(r.value)}}catch(r){e.releaseLock(),t.throw(r)}}function FR(t){t.cancel().catch(()=>{}),t.releaseLock()}function Yv(t){const e=ll(),r=t.getReader(),i=FR.bind(null,r);return KR(e,r).catch(i),[e,i]}const YR={tag:"seroval/plugins/web/ReadableStream",extends:[GR],test(t){return typeof ReadableStream>"u"?!1:t instanceof ReadableStream},parse:{sync(t,e){return{factory:e.parse(hs),stream:e.parse(ll())}},async async(t,e){return{factory:await e.parse(hs),stream:await e.parse(Yv(t)[0])}},stream(t,e){const[r,i]=Yv(t);return e.addCleanup(i),{factory:e.parse(hs),stream:e.parse(r)}}},serialize(t,e){return"("+e.serialize(t.factory)+")("+e.serialize(t.stream)+")"},deserialize(t,e){const r=e.deserialize(t.stream);if(!r||typeof r!="object"||!dp(r))throw new Error("Expected a stream source.");return R_(r)}};function O_(t){return[MR,t?A_(t):qR,YR]}const ZR=O_();[...ZR];function JR(t){return{tag:"tss/RawStream",test:()=>!1,parse:{},serialize:void 0,deserialize(e,r){return t(r.deserialize(e.streamId))}}}function QR(t){return[...bb()?.serializationAdapters?.map(LR)??[],...t]}function k_(t){return QR(O_(t))}var Zv=new TextDecoder,Yn=new Uint8Array,XR=new ByteLengthQueuingStrategy({highWaterMark:0});function WR(t){const e=t.getReader(),r=new Map;let i=0,o,c;const u=()=>{o?.(),o=void 0},f=(g,b)=>{const _=g[1];g[1]=!1,_&&(b===1?_.close():_.error(b[0]))},h=new ReadableStream({start(g){c=g},pull:u,cancel(g){const b=[g===void 0?new Error("Framed response cancelled"):g];i=b,u(),e.cancel(g).catch(()=>{});for(const _ of r.values())f(_,b)}});function m(g){const b=r.get(g);if(b)return b;if(r.size>=1024)throw new Error("Too many raw streams");let _;const S=[new ReadableStream({start(E){_=E},cancel(){S[1]!==!1&&(S[1]=null)}},XR),_];return r.set(g,S),i!==0&&f(S,i),S}function y(g){if(g===0||g>>>0!==g)throw new RangeError("Invalid raw stream ID");return m(g)[0]}return(async()=>{let g=Yn,b=0;async function _(){for(;b===g.byteLength;){g=Yn,b=0;const E=await e.read();if(i!==0||E.done)return!1;g=E.value}return!0}async function S(E,A){if(E===0)return Yn;if(!await _()){if(A)return;throw new Error("Incomplete frame")}if(g.byteLength-b>=E){const x=g.subarray(b,b+E);return b+=E,b===g.byteLength&&(g=Yn,b=0),x}const T=new Uint8Array(E);let C=0;for(;C<E;){if(!await _())throw new Error("Incomplete frame");const x=Math.min(E-C,g.byteLength-b);T.set(g.subarray(b,b+x),C),b+=x,C+=x}return b===g.byteLength&&(g=Yn,b=0),T}try{for(;i===0;){let E=await S(9,!0);if(i!==0)return;if(!E){for(const Z of r.values())if(Z[1])throw new Error("Incomplete raw stream");i=1,c.close();return}const A=E[0],T=(E[1]<<24|E[2]<<16|E[3]<<8|E[4])>>>0,C=(E[5]<<24|E[6]<<16|E[7]<<8|E[8])>>>0;if(E=Yn,A>3||A===0!=(T===0)||C>16777216||A===2&&C!==0)throw new Error("Invalid frame");const x=A===0?void 0:m(T);if(x?.[1]===!1)throw new Error("Raw stream already ended");let B=await S(C);if(i!==0)return;if(!x){const Z=Zv.decode(B);for(B=Yn,c.enqueue(Z);i===0&&c.desiredSize<=0;)await new Promise(z=>{o=z});continue}if(A===1){const Z=x[1];if(Z){if(-Z.desiredSize>134217728){Z.error(new Error(`Raw stream ${T} has too many unread bytes`)),x[1]=null,B=Yn;continue}const z=B.byteLength*4<B.buffer.byteLength?B.slice():B;B=Yn,Z.enqueue(z)}}else f(x,A===2?1:[new Error(Zv.decode(B))])}}catch(E){if(i===0){const A=[E];i=A,e.cancel(E).catch(()=>{}),c.error(E);for(const T of r.values())f(T,A)}}finally{g=Yn,e.releaseLock()}})(),[h,y]}const Qn=Symbol.for("TSR_DEFERRED_PROMISE");function eO(t,e){const r=t;return r[Qn]||(r[Qn]={status:"pending"},r.then(i=>{r[Qn].status="success",r[Qn].data=i}).catch(i=>{r[Qn].status="error",r[Qn].error={data:VT(i),__isServerError:!0}})),r}const tO="Error preloading route! âï¸";function C_(t,e){if(t)return typeof t=="string"?t:t[e]}function nO(t){return t?.scriptFormat??"module"}function rO(t,e,r){const i=sO(e),o=C_(r,"script")??i.crossOrigin;return{...nO(t)==="iife"?{rel:"preload",as:"script"}:{rel:"modulepreload"},href:i.href,...o?{crossOrigin:o}:{}}}function sO(t){return typeof t=="string"?{href:t,crossOrigin:void 0}:t}function xc(t,e){if(e.length===0)return;if(e.length===1){t.push(e[0]);return}const r=new Set;for(const i of e){const o=JSON.stringify(i);
13r.has(o)||(r.add(o),t.push(i))}}function iO(t){return typeof t=="string"?{href:t,crossOrigin:void 0}:t}function aO(t,e,r,i){const o=zb(t),c=[],u=[];for(const f of o)for(const h of Array.isArray(f.scripts)?f.scripts:[]){if(!h)continue;const{children:m,...y}=h;c.push({tag:"script",attrs:{...y,...i,nonce:r},children:m})}if(e)for(const f of o)for(const h of e.routes[f.routeId]?.scripts??[])u.push({tag:"script",attrs:{...h.attrs,nonce:r},children:h.children});return[c,u]}function oO([t,e],r){return[...t,...e]}var x_=class{get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(t){if(this.init=e=>{this.originalIndex=e,this._branch=void 0;const r=this.options,i=!r?.path&&!r?.id;this.parentRoute=this.options.getParentRoute?.(),i?this._path=va:this.parentRoute||$o();let o=i?va:r?.path;o&&o!=="/"&&(o=Ab(o));const c=r?.id||o,u=i?va:ya((this.parentRoute.id==="__root__"?"":this.parentRoute.id)+"/"+(c??""));o==="__root__"&&(o="/");const f=u==="__root__"?"/":o===void 0?this.parentRoute.fullPath:ya(this.parentRoute.fullPath+"/"+o);this._path=o,this._id=u,this._fullPath=f,this._to=Wn(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=>Qh({from:this.fullPath,...e}),this.options=t||{},this.isRoot=!t?.getParentRoute,t?.id&&t?.path)throw new Error("Route cannot have both an 'id' and a 'path' option.")}},lO=class extends x_{constructor(t){super(t)}};var Fo;function Rh(t,e,r){try{return jR(t,e)}catch(i){throw j_(r),i}}async function N_(t){t.length>0&&(await Promise.allSettled(t),t.length=0)}function j_(t){for(const e of t)e.catch(()=>{});t.length=0}var cO=Object.prototype.hasOwnProperty;function D_(t){for(const e in t)if(cO.call(t,e))return!0;return!1}async function uO(t,e,r){Fo||(Fo=k_());const i=e[0],o=i.fetch??r,c=i.data instanceof FormData,u=new Headers(i.headers);if(u.set("x-tsr-serverFn","true"),c||u.set("accept",`${nT}, application/x-ndjson, application/json`),i.method==="GET"){if(c)throw new Error("FormData is not supported with GET requests");const h=await L_(i);if(h!==void 0){const m=jb({payload:h});t.includes("?")?t+=`&${m}`:t+=`?${m}`}}let f;return i.method==="POST"&&(f=await dO(i),typeof f=="string"&&u.set("content-type","application/json")),fO(()=>o(t,{method:i.method,headers:u,signal:i.signal,body:f}))}async function L_(t){let e;return t.data!==void 0&&(e={data:t.data}),t.context&&D_(t.context)&&((e??={}).context=t.context),e?M_(e,t.signal):void 0}async function M_(t,e){e?.throwIfAborted();let r;try{r=await DR(t,{plugins:e?k_(e):Fo})}finally{e?.throwIfAborted()}return JSON.stringify(r)}async function dO(t){if(t.data instanceof FormData){let e;return t.context&&D_(t.context)&&(e=await M_(t.context,t.signal)),e!==void 0&&t.data.set(tT,e),t.data}return L_(t)}async function fO(t){let e;try{e=await t()}catch(i){if(i instanceof Response)e=i;else throw i}if(e.headers.get("x-tss-raw")==="true")return e;const r=e.headers.get("content-type");if(r||$o(),e.headers.get("x-tss-serialized")){let i;if(r.includes("application/x-tss-framed")){const o=/;\s*v=(\d+)/.exec(r)?.[1];if(o&&+o!=1)throw new Error(`Unsupported framed protocol version ${o}`);if(!e.body)throw new Error("No response body for framed response");const[c,u]=WR(e.body);i=await hO(c,[JR(u),...Fo])}else if(r.includes("application/json")){const o=await e.json(),c=[];i=Rh(o,{plugins:Fo},c),await N_(c)}if(i||$o(),i instanceof Error)throw i;return i}if(r.includes("application/json")){const i=await e.json(),o=sT(i);if(o)throw o;if(li(i))throw i;return i}if(!e.ok)throw new Error(await e.text());return e}async function hO(t,e){const r=t.getReader(),i={refs:new Map,plugins:e},o=f=>{r.cancel(f).catch(()=>{})};let c;const u=[];try{const f=await r.read();if(f.done)throw new Error("Stream ended before first object");c=Rh(JSON.parse(f.value),i,u)}catch(f){throw o(f),r.releaseLock(),f}return(async()=>{const f=[];try{for(;;){const h=await r.read();if(h.done)return;Rh(JSON.parse(h.value),i,f),j_(f)}}catch(h){o(h),console.error("Stream processing error:",h)}finally{r.releaseLock()}})(),await N_(u),c}function pO(t){const e="/_serverFn/"+t;return Object.assign((...o)=>{const c=bb()?.serverFns?.fetch;return uO(e,o,c??fetch)},{url:e,serverFnMeta:{id:t},[bh]:!0})}var mO={key:"$TSS/serverfn",test:t=>typeof t!="function"||!(bh in t)?!1:!!t[bh],toSerializable:({serverFnMeta:t})=>({functionId:t.id}),fromSerializable:({functionId:t})=>pO(t)},tu=_e.use,U_=_e.useLayoutEffect;function gO({promise:t}){if(tu)return tu(t);const e=eO(t);if(e[Qn].status==="pending")throw e;if(e[Qn].status==="error")throw e[Qn].error;return e[Qn].data}function yO(t){const e=X.jsx(vO,{...t});
13return t.fallback?X.jsx(_e.Suspense,{fallback:t.fallback,children:e}):e}function vO(t){const e=gO(t);return t.children(e)}var mp=class extends _e.Component{constructor(...t){super(...t),this.state={error:0},this.reset=()=>{this.setState({error:0})}}static getDerivedStateFromProps(t,e){const r=t.getResetKey();return e.error&&e.resetKey!==r?{resetKey:r,error:0}:{resetKey:r}}static getDerivedStateFromError(t){return{error:[t]}}componentDidCatch(t,e){this.props.onCatch?.(t,e)}render(){const t=this.state.error;return t?_e.createElement(this.props.errorComponent??bO,{error:t[0],reset:this.reset}):this.props.children}};function bO({error:t}){const[e,r]=_e.useState(!1);return X.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[X.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[X.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),X.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>r(i=>!i),children:e?"Hide Error":"Show Error"})]}),X.jsx("div",{style:{height:".25rem"}}),e?X.jsx("div",{children:X.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:t?.message?X.jsx("code",{children:t.message}):null})}):null]})}var Jv=()=>!0,_O=()=>!1;function wO({children:t,fallback:e=null}){return X.jsx(W.Fragment,{children:gp()?t:e})}function gp(t=!0){return W.useSyncExternalStore(SO,Jv,t?_O:Jv)}function SO(){return()=>{}}var z_=_e.createContext(null);function Vt(t){return _e.useContext(z_)}var yp=_e.createContext(void 0),EO=_e.createContext(void 0);function TO({update:t,notify:e,unwatched:r}){return{link:i,unlink:o,propagate:c,checkDirty:u,shallowPropagate:f};function i(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 E=y.depsTail=m.subsTail={version:g,dep:m,sub:y,prevDep:b,nextDep:_,prevSub:S,nextSub:void 0};_!==void 0&&(_.prevDep=E),b!==void 0?b.nextDep=E:y.deps=E,S!==void 0?S.nextSub=E:m.subs=E}function o(m,y=m.sub){const g=m.dep,b=m.prevDep,_=m.nextDep,S=m.nextSub,E=m.prevSub;return _!==void 0?_.prevDep=b:y.depsTail=b,b!==void 0?b.nextDep=_:y.deps=_,S!==void 0?S.prevSub=E:g.subsTail=E,E!==void 0?E.nextSub=S:(g.subs=S)===void 0&&r(g),_}function c(m){let y=m.nextSub,g;e:do{const b=m.sub;let _=b.flags;if(_&60?_&12?_&4?!(_&48)&&h(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 E=(m=S).nextSub;E!==void 0&&(g={value:y,prev:g},y=E);continue}}if((m=y)!==void 0){y=m.nextSub;continue}for(;g!==void 0;)if(m=g.value,g=g.prev,m!==void 0){y=m.nextSub;continue e}break}while(!0)}function u(m,y){let g,b=0,_=!1;e:do{const S=m.dep,E=S.flags;if(y.flags&16)_=!0;else if((E&17)===17){if(t(S)){const A=S.subs;A.nextSub!==void 0&&f(A),_=!0}}else if((E&33)===33){(m.nextSub!==void 0||m.prevSub!==void 0)&&(g={value:m,prev:g}),m=S.deps,y=S,++b;continue}if(!_){const A=m.nextDep;if(A!==void 0){m=A;continue}}for(;b--;){const A=y.subs,T=A.nextSub!==void 0;if(T?(m=g.value,g=g.prev):m=A,_){if(t(y)){T&&f(A),y=m.sub;continue}_=!1}else y.flags&=-33;y=m.sub;const C=m.nextDep;if(C!==void 0){m=C;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 h(m,y){let g=y.depsTail;for(;g!==void 0;){if(g===m)return!0;g=g.prevDep}return!1}}function AO(t,e,r){const i=typeof t=="object",o=i?t:void 0;return{next:(i?t.next:t)?.bind(o),error:(i?t.error:e)?.bind(o),complete:(i?t.complete:r)?.bind(o)}}const Oh=[];let Zc=0;const{link:Qv,unlink:RO,propagate:OO,checkDirty:P_,shallowPropagate:Xv}=TO({update(t){return t._update()},notify(t){Oh[kh++]=t,t.flags&=-3},unwatched(t){t.depsTail!==void 0&&(t.depsTail=void 0,t.flags=17,nu(t))}});let Nc=0,kh=0,Un,Ch=0;function kO(t){try{++Ch,t()}finally{--Ch||B_()}}function nu(t){const e=t.depsTail;let r=e!==void 0?e.nextDep:t.deps;for(;r!==void 0;)r=RO(r,t)}function B_(){if(!(Ch>0)){for(;Nc<kh;){const t=Oh[Nc];Oh[Nc++]=void 0,t.notify()}Nc=0,kh=0}}function Wv(t,e){const r=typeof t=="function",i=t,o={_snapshot:r?void 0:t,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:r?0:1,get(){return Un!==void 0&&Qv(o,Un,Zc),o._snapshot},subscribe(c){const u=AO(c),f={current:!1},h=CO(()=>{o.get(),f.current?(Un=void 0,u.next?.(o._snapshot)):f.current=!0});return{unsubscribe:()=>{h.stop()}}},_update(c){const u=Un,f=e?.compare??Object.is;if(r)Un=o,++Zc,o.depsTail=void 0;else if(c===void 0)return!1;r&&(o.flags=5);try{const h=o._snapshot,m=typeof c=="function"?c(h):c===void 0&&r?i(h):c;return h===void 0||!f(h,m)?(o._snapshot=m,!0):!1}finally{Un=u,r&&(o.flags&=-5),nu(o)}}};return r?(o.flags=17,o.get=function(){const c=o.flags;
13if(c&16||c&32&&P_(o.deps,o)){if(o._update()){const u=o.subs;u!==void 0&&Xv(u)}}else c&32&&(o.flags=c&-33);return Un!==void 0&&Qv(o,Un,Zc),o._snapshot}):o.set=function(c){if(o._update(c)){const u=o.subs;u!==void 0&&(OO(u),Xv(u),B_())}},o}function CO(t){const e=()=>{const i=Un;Un=r,++Zc,r.depsTail=void 0,r.flags=6;try{return t()}finally{Un=i,r.flags&=-5,nu(r)}},r={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:6,notify(){const i=this.flags;i&16||i&32&&P_(this.deps,this)?e():this.flags=2},stop(){this.flags=0,this.depsTail=void 0,nu(this)}};return e(),r}var nh={exports:{}},rh={},sh={exports:{}},ih={};var e0;function xO(){if(e0)return ih;e0=1;var t=ol();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,i=t.useState,o=t.useEffect,c=t.useLayoutEffect,u=t.useDebugValue;function f(g,b){var _=b(),S=i({inst:{value:_,getSnapshot:b}}),E=S[0].inst,A=S[1];return c(function(){E.value=_,E.getSnapshot=b,h(E)&&A({inst:E})},[g,_,b]),o(function(){return h(E)&&A({inst:E}),g(function(){h(E)&&A({inst:E})})},[g]),u(_),_}function h(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 ih.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:y,ih}var t0;function NO(){return t0||(t0=1,sh.exports=xO()),sh.exports}var n0;function jO(){if(n0)return rh;n0=1;var t=ol(),e=NO();function r(m,y){return m===y&&(m!==0||1/m===1/y)||m!==m&&y!==y}var i=typeof Object.is=="function"?Object.is:r,o=e.useSyncExternalStore,c=t.useRef,u=t.useEffect,f=t.useMemo,h=t.useDebugValue;return rh.useSyncExternalStoreWithSelector=function(m,y,g,b,_){var S=c(null);if(S.current===null){var E={hasValue:!1,value:null};S.current=E}else E=S.current;S=f(function(){function T(z){if(!C){if(C=!0,x=z,z=b(z),_!==void 0&&E.hasValue){var D=E.value;if(_(D,z))return B=D}return B=z}if(D=B,i(x,z))return D;var Y=b(z);return _!==void 0&&_(D,Y)?(x=z,D):(x=z,B=Y)}var C=!1,x,B,Z=g===void 0?null:g;return[function(){return T(y())},Z===null?void 0:function(){return T(Z())}]},[y,g,b,_]);var A=o(m,S[0],S[1]);return u(function(){E.hasValue=!0,E.value=A},[A]),h(A),A},rh}var r0;function DO(){return r0||(r0=1,nh.exports=jO()),nh.exports}var LO=DO();function MO(t,e){return t===e}function nr(t,e=i=>i,r){const i=r?.compare??MO,o=_e.useCallback(u=>{const{unsubscribe:f}=t.subscribe(u);return f},[t]),c=_e.useCallback(()=>t.get(),[t]);return LO.useSyncExternalStoreWithSelector(o,c,c,e,i)}var s0={};function UO(t,e){const r=_e.useRef();return i=>{const o=t?.select?t.select(i):i;return t?.structuralSharing??e.options.defaultStructuralSharing?r.current=vs(r.current,o):o}}function fi(t){const e=Vt(),r=_e.useContext(t.from?EO:yp),i=t.from??r,o=e.stores.getMatchStore(i),c=UO(t,e),u=nr(o,f=>f?c(f):s0);if(u!==s0)return u;(t.shouldThrow??!0)&&$o()}function I_(t){return fi({from:t.from,strict:t.strict,structuralSharing:t.structuralSharing,select:e=>t.select?t.select(e.loaderData):e.loaderData})}function H_(t){const{select:e,...r}=t;return fi({...r,select:i=>e?e(i.loaderDeps):i.loaderDeps})}function $_(t){return fi({from:t.from,shouldThrow:t.shouldThrow,structuralSharing:t.structuralSharing,strict:t.strict,select:e=>{const r=t.strict===!1?e.params:e._strictParams;return t.select?t.select(r):r}})}function q_(t){return fi({from:t.from,strict:t.strict,shouldThrow:t.shouldThrow,structuralSharing:t.structuralSharing,select:e=>t.select?t.select(e.search):e.search})}function V_(t){const e=Vt();return _e.useCallback(r=>e.navigate({...r,from:r.from??t?.from}),[t?.from,e])}function G_(t){return fi({...t,select:e=>t.select?t.select(e.context):e.context})}function zO(...t){const e=_e.useRef(t),r=e.current;return t.forEach((i,o)=>{Hn(r[o],i,!1,!0)||(r[o]=i)}),e.current}function jc(t,e){t.preloadRoute(e).catch(r=>{console.warn(r),console.warn(tO)})}var PO={compare:(t,e)=>t[0]===e[0]&&t[1]===e[1]};function BO(t,e){const r=typeof t=="string"&&Ho(t);if(r)return e.has(r)?t:null}function IO(t,e,r,i,o){const c=Rv(t.pathname,i),u=Rv(e.pathname,i);return(r?.exact?c!==u:!(c.startsWith(u)&&(c.length===u.length||c[u.length]==="/")))||(r?.includeSearch??!0)&&!Hn(t.search,e.search,!r?.exact,r?.explicitUndef
13ined)?!1:r?.includeHash?o&&t.hash===e.hash:!0}function HO(t,e,r){const i=Vt(),o=_e.useRef(null),c=_e.useCallback(he=>{if(o.current=he,typeof e=="function")return e(he);e&&(e.current=he)},[e]),{activeOptions:u,to:f,preload:h,preloadDelay:m,hashScrollIntoView:y,replace:g,startTransition:b,resetScroll:_,viewTransition:S,ignoreBlocker:E,disabled:A,target:T,onClick:C,onBlur:x,onFocus:B,onMouseEnter:Z,onMouseLeave:z,onTouchStart:D}=t,Y=gp(!!u?.includeHash),[ne,de,G]=zO(t.search,t.params,u),[K,ee]=_e.useMemo(()=>[t,{...t}],[i,t.from,t._fromLocation,t.hash,t.to,ne,de,t.state,t.mask,t.unsafeRelative]),ve=_e.useMemo(()=>{const he=BO(f,i.protocolAllowlist);if(he!==void 0){const zt=[he??void 0];return()=>zt}let pe,Me;return zt=>{K._fromLocation||(ee._fromLocation=zt);const pn=i.buildLocation(ee),Nt=KO(pn,i,A);return(!pe||pe[0]!==Nt)&&(pe=[Nt,!(A||Nt&&!Ho(Nt))&&void 0],Me=[Nt,!0]),pe[1]!==void 0&&IO(zt,pn,G,i.basepath,Y)?Me:pe}},[G,A,Y,K,ee,i,f]),[oe,j]=nr(i.stores.location,ve,PO),F=j===void 0&&oe,ce=A||oe===void 0,ke=_e.useRef(!1),we=t.reloadDocument||F||ce?!1:h??i.options.defaultPreload,O=m??i.options.defaultPreloadDelay??0,H=_e.useCallback(he=>{const pe=he?.isIntersecting;if(!(pe??we==="intent")){pe===!1&&ah(o);return}if(!O){jc(i,K);return}zo.has(o)||zo.set(o,setTimeout(()=>{zo.delete(o),jc(i,K)},O))},[i,K,o,we,O]);_e.useEffect(()=>{if(!we)return;we==="render"&&!ke.current&&(ke.current=!0,jc(i,K));let he=!0,pe;return we==="viewport"&&o.current&&typeof IntersectionObserver=="function"&&(pe=new IntersectionObserver(Me=>{he&&H(Me.pop())},{rootMargin:"100px"}),pe.observe(o.current)),()=>{he=!1,pe?.disconnect(),ah(o)}},[i,K,we,H,o]);const q=VO(t,r);if(q.ref=e?c:o,F)return q.href=F,q;const Q=he=>{const pe=T??he.currentTarget.getAttribute("target");!ce&&!(he.metaKey||he.altKey||he.ctrlKey||he.shiftKey)&&!he.defaultPrevented&&(!pe||pe==="_self")&&he.button===0&&(he.preventDefault(),i.navigate({...K,replace:g,resetScroll:_,hashScrollIntoView:y,startTransition:b,viewTransition:S,ignoreBlocker:E}))},se=()=>{we==="intent"&&jc(i,K)},ge=()=>{we==="intent"&&ah(o)};return q.onClick=sa(C,Q),q.onBlur=sa(x,ge),q.onFocus=sa(B,H),q.onMouseEnter=sa(Z,H),q.onMouseLeave=sa(z,ge),q.onTouchStart=sa(D,se),GO(q,t,j,oe,ce,r)}var $O={},qO={className:"active"},K_=new Set(["to","params","search","hash","state","mask","from","unsafeRelative","_fromLocation","reloadDocument","preload","preloadDelay","preloadIntentProximity","hashScrollIntoView","replace","startTransition","resetScroll","viewTransition","ignoreBlocker","activeProps","inactiveProps","activeOptions","_asChild"]);function VO(t,e){const r={};for(const i in t)K_.has(i)||i==="type"&&e!==void 0||i==="disabled"&&e==="a"||(r[i]=t[i]);return r}function GO(t,e,r,i,o,c){const{activeProps:u,inactiveProps:f,className:h,style:m,target:y}=e,g=wb(r?u:f,{})??(r?qO:$O);Object.assign(t,g),t.href=i,c!=="a"&&(t.disabled=o),t.target=y;const b=g.style;(m||b)&&(t.style=m&&b?{...m,...b}:m||b);const _=g.className;return(h||_)&&(t.className=h?_?`${h} ${_}`:h:_),o&&(t.role="link",t["aria-disabled"]=!0),r&&(t["data-status"]="active",t["aria-current"]="page"),t}var zo=new WeakMap,ah=t=>{clearTimeout(zo.get(t)),zo.delete(t)},sa=(t,e)=>t?r=>r.defaultPrevented||(t(r),r.defaultPrevented||e(r)):e;function KO(t,e,r){if(r)return;const i=t.maskedLocation??t,o=i.external?i.publicHref:e.history.createHref(i.publicHref)||"/";if(!((i.external||o!==i.publicHref)&&Tb(o,e.protocolAllowlist)))return o}var vp=_e.memo(_e.forwardRef((t,e)=>{const r=t._asChild||"a",i=HO(t,e,r),o=typeof t.children=="function"?t.children({isActive:i["data-status"]==="active"}):t.children;return _e.createElement(r,i,o)}),FO);function FO(t,e){let r=0;for(const i in e)if(r++,t[i]!==e[i]&&(!K_.has(i)||!Hn(t[i],e[i],!1,!0)))return!1;for(const i in t)r--;return r===0}var YO=class extends x_{constructor(e){super(e),this.useMatch=r=>fi({...r,from:this.id}),this.useRouteContext=r=>G_({...r,from:this.id}),this.useSearch=r=>q_({...r,from:this.id}),this.useParams=r=>$_({...r,from:this.id}),this.useLoaderDeps=r=>H_({...r,from:this.id}),this.useLoaderData=r=>I_({...r,from:this.id}),this.useNavigate=()=>V_({from:this.fullPath}),this.Link=W.forwardRef((r,i)=>X.jsx(vp,{ref:i,from:this.fullPath,...r}))}};function ZO(t){return new YO(t)}function JO(){return t=>XO(t)}var QO=class extends lO{constructor(t){super(t),this.useMatch=e=>fi({...e,from:this.id}),this.useRouteContext=e=>G_({...e,from:this.id}),this.useSearch=e=>q_({...e,from:this.id}),this.useParams=e=>$_({...e,from:this.id}),this.useLoaderDeps=e=>H_({...e,from:this.id}),this.useLoaderData=e=>I_({...e,from:this.id}),this.useNavigate=()=>V_({from:this.fullPath}),this.Link=W.forwardRef((e,r)=>X.jsx(vp,{ref:r,from:this.fullPath,...e}))}};function XO(t){return new QO(t)}function Et(t){return e=>{const r=ZO(e);return r.isRoot=!1,r}}function Tt(t,e){let r,i,o;const c=()=>(r||(o=void 0,r=t().then(f=>{r=void 0,u.preload=void 0,i=f[e]}).catch(f=>{r=void 0,o=f})),r),u=function(h){if(o){if(aT(o)&&typeof sessionStorage<"u"){const m=`tanstack_router_reload:${o.message}`;
13if(!sessionStorage.getItem(m))throw sessionStorage.setItem(m,"1"),window.location.reload(),new Promise(()=>{})}throw o}if(!i)if(tu)tu(c());else throw c();return _e.createElement(i,h)};return u.preload=c,u}function WO(t){const e=Vt(),r=`not-found-${nr(e.stores.location,i=>i.pathname)}-${nr(e.stores.status)}`;return X.jsx(mp,{getResetKey:()=>r,onCatch:(i,o)=>{if(li(i))t.onCatch?.(i,o);else throw i},errorComponent:({error:i})=>{if(li(i))return t.fallback?.(i);throw i},children:t.children})}function ek(){return X.jsx("p",{children:"Not Found"})}function F_(t,e,r){return e.options.notFoundComponent?X.jsx(e.options.notFoundComponent,{...r}):t.options.defaultNotFoundComponent?X.jsx(t.options.defaultNotFoundComponent,{...r}):X.jsx(ek,{})}function Tu(t,e){const r=e?.options.pendingComponent??t.options.defaultPendingComponent;return r?X.jsx(r,{}):null}var tk=(t,e)=>t[0]===e[0]&&t[1]===e[1],Y_=(t,e,r)=>!e.isRoot||e.options.shellComponent||e.options.wrapInSuspense||r===!1||r==="data-only"||!t.ssr,Z_=_e.memo(function({routeId:e}){const r=Vt();return X.jsx(nk,{router:r,match:nr(r.stores.getMatchStore(e))})});function nk({router:t,match:e}){const r=t.routesById[e.routeId],i=Tu(t,r),o=r.options.errorComponent??t.options.defaultErrorComponent,c=r.options.onCatch??t.options.defaultOnCatch,u=r.isRoot?r.options.notFoundComponent??t.options.notFoundRoute?.options.component:r.options.notFoundComponent,f=e.ssr===!1||e.ssr==="data-only",h=Y_(t,r,e.ssr)&&(r.options.wrapInSuspense??i??(r.options.errorComponent?.preload||f));let m=X.jsx(rk,{match:e});f&&(m=X.jsx(wO,{fallback:i,children:m})),u&&(m=X.jsx(WO,{fallback:b=>{if(b.routeId??=e.routeId,b.routeId!==e.routeId)throw b;return _e.createElement(u,b)},children:m})),o&&(m=X.jsx(mp,{getResetKey:()=>e,errorComponent:o,onCatch:(b,_)=>{if(li(b))throw b.routeId??=e.routeId,b;c?.(b,_)},children:m})),h&&(m=X.jsx(_e.Suspense,{fallback:i,children:m}));const y=null,g=r.isRoot?r.options.shellComponent:void 0;return X.jsx(yp.Provider,{value:e.routeId,children:g?X.jsxs(g,{children:[m,y]}):X.jsxs(X.Fragment,{children:[m,y]})})}var rk=_e.memo(function({match:e}){const r=Vt(),i=e.routeId,o=r.routesById[i],c=_e.useMemo(()=>{const f=(o.options.remountDeps??r.options.defaultRemountDeps)?.({routeId:i,loaderDeps:e.loaderDeps,params:e._strictParams,search:e._strictSearch});return f?JSON.stringify(f):void 0},[i,e.loaderDeps,e._strictParams,e._strictSearch,o.options.remountDeps,r.options.defaultRemountDeps]),u=_e.useMemo(()=>{const f=o.options.component??r.options.defaultComponent;return f?X.jsx(f,{},c):X.jsx(J_,{})},[c,o.options.component,r.options.defaultComponent]);if(e.status==="pending"){if(r.ssr&&!Y_(r,o,e.ssr))return u;if(r._tx)throw r._tx[5];return Tu(r,o)}if(e.status==="notFound")return F_(r,o,e.error);if(e.status==="error")throw e.error;return u}),J_=_e.memo(function(){const e=Vt(),r=_e.useContext(yp);let i,o,c;{const f=e.stores.getMatchStore(r);[i,o]=nr(f,h=>[!!h._notFound,h.error],{compare:tk}),c=nr(e.stores.ids,h=>h[h.indexOf(r)+1])}if(i)return F_(e,e.routesById[r],o);if(!c)return null;const u=X.jsx(Z_,{routeId:c});return r===va?X.jsx(_e.Suspense,{fallback:Tu(e),children:u}):u});function Q_(t,e){const r=t[1];t.length=0,r?.(e)}function sk({t}){const e=Vt(),r=e._rendered??=[];return e.startTransition=(i,o)=>new Promise(c=>{Q_(r,!1),r.push(o,c),t(e),_e.startTransition(i)}),U_(()=>{const i=e.history.subscribe(e.load);e.updateLatestLocation();const o=e.latestLocation,c=e.buildLocation({to:o.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});if(Wn(o.publicHref)!==Wn(c.publicHref))return e.commitLocation({...c,replace:!0,ignoreBlocker:!0}),i;const u=e.stores.resolvedLocation.get();return u?.href===o.href&&u.state.__TSR_key===o.state.__TSR_key?r.push(e.stores.matches.get(),f=>{f&&e.emit({type:"onRendered",...vu(u,u)})}):e._tx||e.load({sync:!0}).catch(console.error),i},[e,e.history]),null}function ik(){const t=Vt(),e=t.routesById[va],r=Tu(t,e),i=X.jsxs(X.Fragment,{children:[X.jsx(sk,{t:_e.useState()[1]}),t.ssr?X.jsx(i0,{}):X.jsx(_e.Suspense,{fallback:r,children:X.jsx(i0,{})})]});return t.options.InnerWrap?X.jsx(t.options.InnerWrap,{children:i}):i}function i0(){const t=Vt(),e=t._rendered,r=nr(t.stores.matches,u=>e[0]??u),i=r[0],o=i?.routeId;U_(()=>{e[0]===r&&Q_(e,!0)},[e,r]);const c=o?X.jsx(Z_,{routeId:o}):null;return t.options.disableGlobalCatchBoundary?c:X.jsx(mp,{getResetKey:()=>i,onCatch:void 0,children:c})}var ak=t=>({createMutableStore:Wv,createReadonlyStore:Wv,batch:kO}),ok=t=>new lk(t),lk=class extends KT{constructor(t){super(t,ak)}};function ck({router:t,children:e,...r}){Sb(r)&&t.update({...t.options,...r,context:{...t.options.context,...r.context}});const i=X.jsx(z_.Provider,{value:t,children:e});return t.options.Wrap?X.jsx(t.options.Wrap,{children:i}):i}function uk({router:t,...e}){return X.jsx(ck,{router:t,...e,children:X.jsx(ik,{})})}function a0(t,e){if(e)for(const[r,i]of Object.entries(e))r!=="suppressHydrationWarning"&&i!==void 0&&i!==!1&&t.setAttribute(r,typeof i=="boolean"?"":String(i))}function X_(t){const{attrs:e,children:r,nonce:i,preventScriptHoist:o}=t,c=_e.useMemo(()=>r===void 0?void 0:{__html:r},[r]);switch(t.tag){case"title":return X.jsx("title",{...e,suppressHydrationWarning:!0,children:r});case"meta":return X.jsx("meta",{...e,suppressHydrationWarning:!0});case"link":return X.jsx("link",{...e,precedence:e?.precedence??(e?.rel==="stylesheet"?"default":void 0),nonce:i,suppressHydrationWarning:!0});case"style":return t.inlineCss,X.jsx("style",{...e,dangerouslySetInnerHTML:c,nonce:i});case"script":return X.jsx(dk,{attrs:e,preventScriptHoist:o,children:r});default:return null}}function dk({attrs:t,children:e,preventScriptHoist:r}){Vt();const i=gp(),o=_e.useMemo(()=>e===void 0?void 0:{__html:e},[e]),c=typeof t?.type=="string"&&t.type!==""&&t.type!=="text/javascript"&&t.type!=="module";if(_e.useEffect(()=>{if(!c){if(t?.src){const u=document.createElement("a");u.href=t.src;const f=u.href;for(const m of document.scripts)if(m.src===f)return;const h=document.createElement("script");return a0(h,t),document.head.appendChild(h),()=>h.remove()}if(typeof e=="string"){const u=typeof t?.type=="string"?t.type:"text/javascript",f=typeof t?.nonce=="string"?t.nonce:void 0;for(const m of document.scripts){if(m.hasAttribute("src"))continue;const y=m.getAttribute("type")??"text/javascript",g=m.getAttribute("nonce")??void 0;if(m.textContent===e&&y===u&&g===f)return}const h=document.createElement("script");return h.textContent=e,a0(h,t),document.head.appendChild(h),()=>h.remove()}}},[t,e,c]),c&&typeof e=="string")return X.jsx("script",{...t,suppressHydrationWarning:!0,dangerouslySetInnerHTML:o});if(!i){if(t?.src)return X.jsx("script",{...t,suppressHydrationWarning:!0});if(typeof e=="string")return X.jsx("script",{...t,dangerouslySetInnerHTML:o,suppressHydrationWarning:!0})}return null}function fk(t,e,r,i){r=zb(r);const o=r.map(E=>E.meta).filter(E=>E!==void 0),c=[],u={};let f;for(let E=o.length-1;E>=0;E--){const A=o[E];for(let T=A.length-1;T>=0;T--){const C=A[T];if(C)if(C.title)f||(f={tag:"title",children:C.title});else if("script:ld+json"in C)try{const x=JSON.stringify(C["script:ld+json"]);c.push({tag:"script",attrs:{type:"application/ld+json"},children:fT(x)})}catch{}else{const x=C.name??C.property;if(x){if(u[x])continue;u[x]=!0}c.push({tag:"meta",attrs:{...C,nonce:e}})}}}f&&c.push(f),e&&c.push({tag:"meta",attrs:{property:"csp-nonce",content:e}}),c.reverse();const h=r.flatMap(E=>E.links??[]).filter(E=>E!==void 0).map(E=>({tag:"link",attrs:{...E,nonce:e}})),m=t.ssr?.manifest,y=[];m&&(r.forEach(E=>{m.routes[E.routeId]?.css?.forEach(A=>{const T=iO(A);y.push({tag:"link",attrs:{rel:"stylesheet",...T,crossOrigin:C_(i,"stylesheet")??T.crossOrigin,suppressHydrationWarning:!0,nonce:e}})})}),m.inlineStyle&&y.push({tag:"style",attrs:{...m.inlineStyle.attrs,nonce:e},children:m.inlineStyle.children,inlineCss:!0}));const g=[];m&&r.forEach(E=>{m.routes[E.routeId]?.preloads?.forEach(A=>{g.push({tag:"link",attrs:{...rO(m,A,i),nonce:e}})})});const b=r.flatMap(E=>E.styles??[]).filter(E=>E!==void 0).map(({children:E,...A})=>({tag:"style",attrs:{...A,nonce:e},children:E})),_=r.flatMap(E=>E.headScripts??[]).filter(E=>E!==void 0).map(({children:E,...A})=>({tag:"script",attrs:{...A,nonce:e},children:E})),S=[];return xc(S,c),S.push(...g),xc(S,h),S.push(...y),xc(S,b),xc(S,_),S}var hk=t=>{const e=Vt(),r=e.options.ssr?.nonce,i=_e.useCallback(o=>fk(e,r,o,t),[t,r,e]);return nr(e.stores.matches,i,{compare:Hn})};function pk(t){const e=hk(t.assetCrossOrigin),r=Vt().options.ssr?.nonce;return X.jsx(X.Fragment,{children:e.map(i=>_e.createElement(X_,{...i,key:`tsr-meta-${JSON.stringify(i)}`,nonce:r}))})}var mk={suppressHydrationWarning:!0},gk=()=>{const t=Vt(),e=t.options.ssr?.nonce,r=o=>{const c=aO(o,t.ssr?.manifest,e,mk);for(const u of c[1])if(typeof u.attrs?.src=="string"){const f=u;f.preventScriptHoist=!0}return c},i=o=>oO(r(o));return yk(nr(t.stores.matches,i,{compare:Hn}))};function yk(t){return X.jsx(X.Fragment,{children:t.map((e,r)=>_e.createElement(X_,{...e,key:`tsr-scripts-${e.tag}-${r}`}))})}var ii=(t,e)=>{const r={type:"request",...e||t},i=o=>ii({},Object.assign(r,{validator:o,inputValidator:o}));return{options:r,middleware:o=>ii({},Object.assign(r,{middleware:o}
13)),validator:i,inputValidator:i,client:o=>ii({},Object.assign(r,{client:o})),server:o=>ii({},Object.assign(r,{server:o}))}};function W_(t,e){for(let r=0,i=e.length;r<i;r++){const o=e[r];t.has(o)||(t.add(o),o.extends&&W_(t,o.extends))}}var vk=t=>({getOptions:async()=>{const e=await t();if(e.serializationAdapters){const r=new Set;W_(r,e.serializationAdapters),e.serializationAdapters=Array.from(r)}return e},createMiddleware:ii});function Au(t,e){var r={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(r[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);o<i.length;o++)e.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(t,i[o])&&(r[i[o]]=t[i[o]]);return r}function bk(t,e,r,i){function o(c){return c instanceof r?c:new r(function(u){u(c)})}return new(r||(r=Promise))(function(c,u){function f(y){try{m(i.next(y))}catch(g){u(g)}}function h(y){try{m(i.throw(y))}catch(g){u(g)}}function m(y){y.done?c(y.value):o(y.value).then(f,h)}m((i=i.apply(t,e||[])).next())})}const _k=t=>t?(...e)=>t(...e):(...e)=>fetch(...e);
13class bp extends Error{constructor(e,r="FunctionsError",i){super(e),this.name=r,this.context=i}toJSON(){return{name:this.name,message:this.message,context:this.context}}}class wk extends bp{constructor(e){super("Failed to send a request to the Edge Function","FunctionsFetchError",e)}}class o0 extends bp{constructor(e){super("Relay Error invoking the Edge Function","FunctionsRelayError",e)}}class l0 extends bp{constructor(e){super("Edge Function returned a non-2xx status code","FunctionsHttpError",e)}}var xh;(function(t){t.Any="any",t.ApNortheast1="ap-northeast-1",t.ApNortheast2="ap-northeast-2",t.ApSouth1="ap-south-1",t.ApSoutheast1="ap-southeast-1",t.ApSoutheast2="ap-southeast-2",t.CaCentral1="ca-central-1",t.EuCentral1="eu-central-1",t.EuWest1="eu-west-1",t.EuWest2="eu-west-2",t.EuWest3="eu-west-3",t.SaEast1="sa-east-1",t.UsEast1="us-east-1",t.UsWest1="us-west-1",t.UsWest2="us-west-2"})(xh||(xh={}));class Sk{constructor(e,{headers:r={},customFetch:i,region:o=xh.Any}={}){this.url=e,this.headers=r,this.region=o,this.fetch=_k(i)}setAuth(e){this.headers.Authorization=`Bearer ${e}`}invoke(e){return bk(this,arguments,void 0,function*(r,i={}){var o;let c,u;try{const{headers:f,method:h,body:m,signal:y,timeout:g}=i;let b={},{region:_}=i;_||(_=this.region);const S=new URL(`${this.url}/${r}`);_&&_!=="any"&&(b["x-region"]=_,S.searchParams.set("forceFunctionRegion",_));let E;const A=!!f&&Object.keys(f).some(z=>z.toLowerCase()==="content-type");m&&!A?typeof Blob<"u"&&m instanceof Blob||m instanceof ArrayBuffer?(b["Content-Type"]="application/octet-stream",E=m):typeof m=="string"?(b["Content-Type"]="text/plain",E=m):typeof FormData<"u"&&m instanceof FormData?E=m:(b["Content-Type"]="application/json",E=JSON.stringify(m)):m&&typeof m!="string"&&!(typeof Blob<"u"&&m instanceof Blob)&&!(m instanceof ArrayBuffer)&&!(typeof FormData<"u"&&m instanceof FormData)?E=JSON.stringify(m):E=m;let T=y;g&&(u=new AbortController,c=setTimeout(()=>u.abort(),g),y?(T=u.signal,y.addEventListener("abort",()=>u.abort())):T=u.signal);const C=yield this.fetch(S.toString(),{method:h||"POST",headers:Object.assign(Object.assign(Object.assign({},b),this.headers),f),body:E,signal:T}).catch(z=>{throw new wk(z)}),x=C.headers.get("x-relay-error");if(x&&x==="true")throw new o0(C);if(!C.ok)throw new l0(C);let B=((o=C.headers.get("Content-Type"))!==null&&o!==void 0?o:"text/plain").split(";")[0].trim(),Z;return B==="application/json"?Z=yield C.json():B==="application/octet-stream"||B==="application/pdf"?Z=yield C.blob():B==="text/event-stream"?Z=C:B==="multipart/form-data"?Z=yield C.formData():Z=yield C.text(),{data:Z,error:null,response:C}}catch(f){return{data:null,error:f,response:f instanceof l0||f instanceof o0?f.context:void 0}}finally{c&&clearTimeout(c)}})}}const ew=3,c0=t=>Math.min(1e3*2**t,3e4),Ek=[520,503],tw=["GET","HEAD","OPTIONS"];var u0=class extends Error{constructor(t){super(t.message),this.name="PostgrestError",this.details=t.details,this.hint=t.hint,this.co
13de=t.code}toJSON(){return{name:this.name,message:this.message,details:this.details,hint:this.hint,code:this.code}}};function d0(t,e){return new Promise(r=>{if(e?.aborted){r();return}const i=setTimeout(()=>{e?.removeEventListener("abort",o),r()},t);function o(){clearTimeout(i),r()}e?.addEventListener("abort",o)})}function Tk(t,e,r,i){return!(!i||r>=ew||!tw.includes(t)||!Ek.includes(e))}var Ak=class{constructor(t){var e,r,i,o,c;this.shouldThrowOnError=!1,this.retryEnabled=!0,this.method=t.method,this.url=t.url,this.headers=new Headers(t.headers),this.schema=t.schema,this.body=t.body,this.shouldThrowOnError=(e=t.shouldThrowOnError)!==null&&e!==void 0?e:!1,this.signal=t.signal,this.isMaybeSingle=(r=t.isMaybeSingle)!==null&&r!==void 0?r:!1,this.shouldStripNulls=(i=t.shouldStripNulls)!==null&&i!==void 0?i:!1,this.urlLengthLimit=(o=t.urlLengthLimit)!==null&&o!==void 0?o:8e3,this.retryEnabled=(c=t.retry)!==null&&c!==void 0?c:!0,t.fetch?this.fetch=t.fetch:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}stripNulls(){if(this.headers.get("Accept")==="text/csv")throw new Error("stripNulls() cannot be used with csv()");return this.shouldStripNulls=!0,this}setHeader(t,e){return this.headers=new Headers(this.headers),this.headers.set(t,e),this}retry(t){return this.retryEnabled=t,this}then(t,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 u=this.headers.get("Accept");u==="application/vnd.pgrst.object+json"?this.headers.set("Accept","application/vnd.pgrst.object+json;nulls=stripped"):(!u||u==="application/json")&&this.headers.set("Accept","application/vnd.pgrst.array+json;nulls=stripped")}const i=this.fetch;let c=(async()=>{let u=0;for(;;){const m={};r.headers.forEach((g,b)=>{m[b]=g}),u>0&&(m["X-Retry-Count"]=String(u));let y;try{y=await i(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"||!tw.includes(r.method))throw g;if(r.retryEnabled&&u<ew){const b=c0(u);u++,await d0(b,r.signal);continue}throw g}if(Tk(r.method,y.status,u,r.retryEnabled)){var f,h;const g=(f=(h=y.headers)===null||h===void 0?void 0:h.get("Retry-After"))!==null&&f!==void 0?f:null,b=g!==null?Math.max(0,parseInt(g,10)||0)*1e3:c0(u);await y.text(),u++,await d0(b,r.signal);continue}return await r.processResponse(y)}})();return this.shouldThrowOnError||(c=c.catch(u=>{var f;let h="",m="",y="";const g=u?.cause;if(g){var b,_,S,E;const C=(b=g?.message)!==null&&b!==void 0?b:"",x=(_=g?.code)!==null&&_!==void 0?_:"";h=`${(S=u?.name)!==null&&S!==void 0?S:"FetchError"}: ${u?.message}`,h+=` 14 15Caused by: ${(E=g?.name)!==null&&E!==void 0?E:"Error"}: ${C}`,x&&(h+=` (${x})`),g?.stack&&(h+=` 16${g.stack}`)}else{var A;h=(A=u?.stack)!==null&&A!==void 0?A:""}const T=this.url.toString().length;return u?.name==="AbortError"||u?.code==="ABORT_ERR"?(y="",m="Request was aborted (timeout or manual cancellation)",T>this.urlLengthLimit&&(m+=`. Note: Your request URL is ${T} characters, which may exceed server limits. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [many IDs])), consider using an RPC function to pass values server-side.`)):(g?.name==="HeadersOverflowError"||g?.code==="UND_ERR_HEADERS_OVERFLOW")&&(y="",m="HTTP headers exceeded server limits (typically 16KB)",T>this.urlLengthLimit&&(m+=`. Your request URL is ${T} characters. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [200+ IDs])), consider using an RPC function instead.`)),{success:!1,error:{message:`${(f=u?.name)!==null&&f!==void 0?f:"FetchError"}: ${u?.message}`,details:h,hint:m,code:y},data:null,count:null,status:0,statusText:""}})),c.then(t,e)}async processResponse(t){var e=this;let r=null,i=null,o=null,c=t.status,u=t.statusText;if(t.ok){var f,h;if(e.method!=="HEAD"){var m;const b=await t.text();if(b!=="")if(e.headers.get("Accept")==="text/csv")i=b;else if(e.headers.get("Accept")&&(!((m=e.headers.get("Accept"))===null||m===void 0)&&m.includes("application/vnd.pgrst.plan+text")))i=b;else try{i=JSON.parse(b)}catch{if(r={message:b},i=null,e.shouldThrowOnError)throw new u0({message:b,details:"",hint:"",code:""})}}const y=(f=e.headers.get("Prefer"))===null||f===void 0?void 0:f.match(/count=(exact|planned|estimated)/),g=(h=t.headers.get("content-range"))===null||h===void 0?void 0:h.split("/");y&&g&&g.length>
161&&(o=parseInt(g[1])),e.isMaybeSingle&&Array.isArray(i)&&(i.length>1?(r={code:"PGRST116",details:`Results contain ${i.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},i=null,o=null,c=406,u="Not Acceptable"):i.length===1?i=i[0]:i=null)}else{const y=await t.text();try{r=JSON.parse(y),Array.isArray(r)&&t.status===404&&(i=[],r=null,c=200,u="OK")}catch{t.status===404&&y===""?(c=204,u="No Content"):r={message:y}}if(r&&e.shouldThrowOnError)throw new u0(r)}return{success:r===null,error:r,data:i,count:o,status:c,statusText:u}}returns(){return this}overrideTypes(){return this}},Rk=class extends Ak{throwOnError(){return super.throwOnError()}select(t){let e=!1;const r=(t??"*").split("").map(i=>/\s/.test(i)&&!e?"":(i==='"'&&(e=!e),i)).join("");return this.url.searchParams.set("select",r),this.headers.append("Prefer","return=representation"),this}order(t,{ascending:e=!0,nullsFirst:r,foreignTable:i,referencedTable:o=i}={}){const c=o?`${o}.order`:"order",u=this.url.searchParams.get(c);return this.url.searchParams.set(c,`${u?`${u},`:""}${t}.${e?"asc":"desc"}${r===void 0?"":r?".nullsfirst":".nullslast"}`),this}limit(t,{foreignTable:e,referencedTable:r=e}={}){const i=typeof r>"u"?"limit":`${r}.limit`;return this.url.searchParams.set(i,`${t}`),this}range(t,e,{foreignTable:r,referencedTable:i=r}={}){const o=typeof i>"u"?"offset":`${i}.offset`,c=typeof i>"u"?"limit":`${i}.limit`;return this.url.searchParams.set(o,`${t}`),this.url.searchParams.set(c,`${e-t+1}`),this}abortSignal(t){return this.signal=t,this}single(){return this.headers.set("Accept","application/vnd.pgrst.object+json"),this}maybeSingle(){return this.isMaybeSingle=!0,this}csv(){return this.headers.set("Accept","text/csv"),this}geojson(){return this.headers.set("Accept","application/geo+json"),this}explain({analyze:t=!1,verbose:e=!1,settings:r=!1,buffers:i=!1,wal:o=!1,format:c="text"}={}){var u;const f=[t?"analyze":null,e?"verbose":null,r?"settings":null,i?"buffers":null,o?"wal":null].filter(Boolean).join("|"),h=(u=this.headers.get("Accept"))!==null&&u!==void 0?u:"application/json";return this.headers.set("Accept",`application/vnd.pgrst.plan+${c}; for="${h}"; options=${f};`),c==="json"?this:this}rollback(){return this.headers.append("Prefer","tx=rollback"),this}returns(){return this}maxAffected(t){return this.headers.append("Prefer","handling=strict"),this.headers.append("Prefer",`max-affected=${t}`),this}};const f0=new RegExp("[,()]");var ca=class extends Rk{throwOnError(){return super.throwOnError()}eq(t,e){return this.url.searchParams.append(t,`eq.${e}`),this}neq(t,e){return this.url.searchParams.append(t,`neq.${e}`),this}gt(t,e){return this.url.searchParams.append(t,`gt.${e}`),this}gte(t,e){return this.url.searchParams.append(t,`gte.${e}`),this}lt(t,e){return this.url.searchParams.append(t,`lt.${e}`),this}lte(t,e){return this.url.searchParams.append(t,`lte.${e}`),this}like(t,e){return this.url.searchParams.append(t,`like.${e}`),this}likeAllOf(t,e){return this.url.searchParams.append(t,`like(all).{${e.join(",")}}`),this}likeAnyOf(t,e){return this.url.searchParams.append(t,`like(any).{${e.join(",")}}`),this}ilike(t,e){return this.url.searchParams.append(t,`ilike.${e}`),this}ilikeAllOf(t,e){return this.url.searchParams.append(t,`ilike(all).{${e.join(",")}}`),this}ilikeAnyOf(t,e){return this.url.searchParams.append(t,`ilike(any).{${e.join(",")}}`),this}regexMatch(t,e){return this.url.searchParams.append(t,`match.${e}`),this}regexIMatch(t,e){return this.url.searchParams.append(t,`imatch.${e}`),this}is(t,e){return this.url.searchParams.append(t,`is.${e}`),this}isDistinct(t,e){return this.url.searchParams.append(t,`isdistinct.${e}`),this}in(t,e){const r=Array.from(new Set(e)).map(i=>typeof i=="string"&&f0.test(i)?`"${i}"`:`${i}`).join(",");return this.url.searchParams.append(t,`in.(${r})`),this}notIn(t,e){const r=Array.from(new Set(e)).map(i=>typeof i=="string"&&f0.test(i)?`"${i}"`:`${i}`).join(",");return this.url.searchParams.append(t,`not.in.(${r})`),this}contains(t,e){return typeof e=="string"?this.url.searchParams.append(t,`cs.${e}`):Array.isArray(e)?this.url.searchParams.append(t,`cs.{${e.join(",")}}`):this.url.searchParams.append(t,`cs.${JSON.stringify(e)}`),this}containedBy(t,e){return typeof e=="string"?this.url.searchParams.append(t,`cd.${e}`):Array.isArray(e)?this.url.searchParams.append(t,`cd.{${e.join(",")}}`):this.url.searchParams.append(t,`cd.${JSON.stringify(e)}`),this}rangeGt(t,e){return this.url.searchParams.append(t,`sr.${e}`),this}rangeGte(t,e){return this.url.searchParams.append(t,`nxl.${e}`),this}rangeLt(t,e){return this.url.searchParams.append(t,`sl.${e}`),this}rangeLte(t,e){return this.url.searchParams.append(t,`nxr.${e}`),this}rangeAdjacent(t,e){return this.url.searchParams.append(t,`adj.${e}`),this}overlaps(t,e){return typeof e=="string"?this.url.searchParams.append(t,`ov.${e}`):this.url.searchParams.append(t,`ov.{${e.join(",")}}`),this}textSearch(t,e,{config:r,type:i}={}){let o="";i==="plain"?o="pl":i==="phrase"?o="ph":i==="websearch"&&(o="w");const c=r===void 0?"":`(${r})`;return this.url.searchParams.append(t,`${o}fts${c}.${e}`),this}match(t){return Object.entries(t).filter(([e,r])=>
16r!==void 0).forEach(([e,r])=>{this.url.searchParams.append(e,`eq.${r}`)}),this}not(t,e,r){return this.url.searchParams.append(t,`not.${e}.${r}`),this}or(t,{foreignTable:e,referencedTable:r=e}={}){const i=r?`${r}.or`:"or";return this.url.searchParams.append(i,`(${t})`),this}filter(t,e,r){return this.url.searchParams.append(t,`${e}.${r}`),this}},Ok=class{constructor(t,{headers:e={},schema:r,fetch:i,urlLengthLimit:o=8e3,retry:c}){this.url=t,this.headers=new Headers(e),this.schema=r,this.fetch=i,this.urlLengthLimit=o,this.retry=c}cloneRequestState(){return{url:new URL(this.url.toString()),headers:new Headers(this.headers)}}select(t,e){const{head:r=!1,count:i}=e??{},o=r?"HEAD":"GET";let c=!1;const u=(t??"*").split("").map(m=>/\s/.test(m)&&!c?"":(m==='"'&&(c=!c),m)).join(""),{url:f,headers:h}=this.cloneRequestState();return f.searchParams.set("select",u),i&&h.append("Prefer",`count=${i}`),new ca({method:o,url:f,headers:h,schema:this.schema,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}insert(t,{count:e,defaultToNull:r=!0}={}){var i;const o="POST",{url:c,headers:u}=this.cloneRequestState();if(e&&u.append("Prefer",`count=${e}`),r||u.append("Prefer","missing=default"),Array.isArray(t)){const f=t.reduce((h,m)=>h.concat(Object.keys(m)),[]);if(f.length>0){const h=[...new Set(f)].map(m=>`"${m}"`);c.searchParams.set("columns",h.join(","))}}return new ca({method:o,url:c,headers:u,schema:this.schema,body:t,fetch:(i=this.fetch)!==null&&i!==void 0?i:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}upsert(t,{onConflict:e,ignoreDuplicates:r=!1,count:i,defaultToNull:o=!0}={}){var c;const u="POST",{url:f,headers:h}=this.cloneRequestState();if(h.append("Prefer",`resolution=${r?"ignore":"merge"}-duplicates`),e!==void 0&&f.searchParams.set("on_conflict",e),i&&h.append("Prefer",`count=${i}`),o||h.append("Prefer","missing=default"),Array.isArray(t)){const m=t.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 ca({method:u,url:f,headers:h,schema:this.schema,body:t,fetch:(c=this.fetch)!==null&&c!==void 0?c:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}update(t,{count:e}={}){var r;const i="PATCH",{url:o,headers:c}=this.cloneRequestState();return e&&c.append("Prefer",`count=${e}`),new ca({method:i,url:o,headers:c,schema:this.schema,body:t,fetch:(r=this.fetch)!==null&&r!==void 0?r:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}delete({count:t}={}){var e;const r="DELETE",{url:i,headers:o}=this.cloneRequestState();return t&&o.append("Prefer",`count=${t}`),new ca({method:r,url:i,headers:o,schema:this.schema,fetch:(e=this.fetch)!==null&&e!==void 0?e:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};function Yo(t){"@babel/helpers - typeof";return Yo=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},Yo(t)}function kk(t,e){if(Yo(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var i=r.call(t,e);if(Yo(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Ck(t){var e=kk(t,"string");return Yo(e)=="symbol"?e:e+""}function xk(t,e,r){return(e=Ck(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function h0(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),r.push.apply(r,i)}return r}function Dc(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?h0(Object(r),!0).forEach(function(i){xk(t,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):h0(Object(r)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(r,i))})}return t}var Nk=class nw{constructor(e,{headers:r={},schema:i,fetch:o,timeout:c,urlLengthLimit:u=8e3,retry:f}={}){this.url=e,this.headers=new Headers(r),this.schemaName=i,this.urlLengthLimit=u;const h=o??globalThis.fetch;c!==void 0&&c>0?this.fetch=(m,y)=>{const g=new AbortController,b=setTimeout(()=>g.abort(),c),_=y?.signal;if(_){if(_.aborted)return clearTimeout(b),h(m,y);const S=()=>{clearTimeout(b),g.abort()};return _.addEventListener("abort",S,{once:!0}),h(m,Dc(Dc({},y),{},{signal:g.signal})).finally(()=>{clearTimeout(b),_.removeEventListener("abort",S)})}return h(m,Dc(Dc({},y),{},{signal:g.signal})).finally(()=>clearTimeout(b))}:this.fetch=h,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 Ok(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 nw(this.url,{headers:this.headers,schema:e,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}rpc(e,r={}
16,{head:i=!1,get:o=!1,count:c}={}){var u;let f;const h=new URL(`${this.url}/rpc/${e}`);let m;const y=_=>_!==null&&typeof _=="object"&&(!Array.isArray(_)||_.some(y)),g=i&&Object.values(r).some(y);g?(f="POST",m=r):i||o?(f=i?"HEAD":"GET",Object.entries(r).filter(([_,S])=>S!==void 0).map(([_,S])=>[_,Array.isArray(S)?`{${S.join(",")}}`:`${S}`]).forEach(([_,S])=>{h.searchParams.append(_,S)})):(f="POST",m=r);const b=new Headers(this.headers);return g?b.set("Prefer",c?`count=${c},return=minimal`:"return=minimal"):c&&b.set("Prefer",`count=${c}`),new ca({method:f,url:h,headers:b,schema:this.schemaName,body:m,fetch:(u=this.fetch)!==null&&u!==void 0?u:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};class jk{constructor(){}static detectEnvironment(){var e;if(typeof WebSocket<"u")return{type:"native",wsConstructor:WebSocket};const r=globalThis;if(typeof globalThis<"u"&&typeof r.WebSocket<"u")return{type:"native",wsConstructor:r.WebSocket};const i=typeof global<"u"?global:void 0;if(i&&typeof i.WebSocket<"u")return{type:"native",wsConstructor:i.WebSocket};if(typeof globalThis<"u"&&typeof r.WebSocketPair<"u"&&typeof globalThis.WebSocket>"u")return{type:"cloudflare",error:"Cloudflare Workers detected. WebSocket clients are not supported in Cloudflare Workers.",workaround:"Use Cloudflare Workers WebSocket API for server-side WebSocket handling, or deploy to a different runtime."};if(typeof globalThis<"u"&&r.EdgeRuntime||typeof navigator<"u"&&(!((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 o=globalThis.process;if(o){const c=o.versions;if(c&&c.node)return{type:"unsupported",error:"Node.js detected but native WebSocket not found.",workaround:"Ensure you are running Node.js 22+ or provide a WebSocket implementation via the transport option."}}return{type:"unsupported",error:"Unknown JavaScript runtime without WebSocket support.",workaround:"Ensure you're running in a supported environment (browser, Node.js, Deno) or provide a custom WebSocket implementation."}}static getWebSocketConstructor(){const e=this.detectEnvironment();if(e.wsConstructor)return e.wsConstructor;let r=e.error||"WebSocket not supported in this environment.";throw e.workaround&&(r+=` 17 18Suggested solution: ${e.workaround}`),new Error(r)}static isWebSocketSupported(){try{return this.detectEnvironment().type==="native"}catch{return!1}}}const Dk="2.110.0",Lk=`realtime-js/${Dk}`,Mk="1.0.0",rw="2.0.0",Uk=rw,zk=1e4,Pk=100,ps={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},sw={close:"phx_close",error:"phx_error",join:"phx_join",leave:"phx_leave",access_token:"access_token"},Nh={connecting:"connecting",closing:"closing",closed:"closed"};class Bk{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 i=[e.join_ref,e.ref,e.topic,e.event,e.payload];return r(JSON.stringify(i))}_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,i;const o=(i=(r=e.payload)===null||r===void 0?void 0:r.payload)!==null&&i!==void 0?i:new ArrayBuffer(0);return this._encodeUserBroadcastPush(e,this.BINARY_ENCODING,o)}_encodeJsonUserBroadcastPush(e){var r,i;const o=(i=(r=e.payload)===null||r===void 0?void 0:r.payload)!==null&&i!==void 0?i:{},u=new TextEncoder().encode(JSON.stringify(o)).buffer;return this._encodeUserBroadcastPush(e,this.JSON_ENCODING,u)}_encodeUserBroadcastPush(e,r,i){var o,c;const u=e.topic,f=(o=e.ref)!==null&&o!==void 0?o:"",h=(c=e.join_ref)!==null&&c!==void 0?c:"",m=e.payload.event,y=this.allowedMetadataKeys?this._pick(e.payload,this.allowedMetadataKeys):{},g=Object.keys(y).length===0?"":JSON.stringify(y);if(h.length>255)throw new Error(`joinRef length ${h.length} exceeds maximum of 255`);if(f.length>255)throw new Error(`ref length ${f.length} exceeds maximum of 255`);if(u.length>255)throw new Error(`topic length ${u.length} exceeds maximum of 255`);if(m.length>255)throw new Error(`userEvent length ${m.length} exceeds maximum of 255`);if(g.length>255)throw new Error(`metadata length ${g.length} exceeds maximum of 255`);const b=this.USER_BROADCAST_PUSH_META_LENGTH+h.length+f.length+u.length+m.length+g.length,_=new ArrayBuffer(this.HEADER_LENGTH+b);let S=new DataView(_),E=0;S.setUint8(E++,this.KINDS.userBroadcastPush),S.setUint8(E++,h.length),S.setUint8(E++,f.length),S.setUint8(E++,u.length),S.setUint8(E++,m.length),S.setUint8(E++,g.length),S.setUint8(E++,r),Array.from(h,T=>S.setUint8(E++,T.charCodeAt(0))),Array.from(f,T=>S.setUint8(E++,T.charCodeAt(0))),Array.from(u,T=>S.setUint8(E++,T.charCodeAt(0))),Array.from(m,T=>S.setUint8(E++,T.charCodeAt(0))),Array.from(g,T=>S.setUint8(E++,T.charCodeAt(0)));var A=new Uint8Array(_.byteLength+i.byteLength);
18return A.set(new Uint8Array(_),0),A.set(new Uint8Array(i),_.byteLength),A.buffer}decode(e,r){if(this._isArrayBuffer(e)){let i=this._binaryDecode(e);return r(i)}if(typeof e=="string"){const i=JSON.parse(e),[o,c,u,f,h]=i;return r({join_ref:o,ref:c,topic:u,event:f,payload:h})}return r({})}_binaryDecode(e){const r=new DataView(e),i=r.getUint8(0),o=new TextDecoder;if(i===this.KINDS.userBroadcast)return this._decodeUserBroadcast(e,r,o)}_decodeUserBroadcast(e,r,i){const o=r.getUint8(1),c=r.getUint8(2),u=r.getUint8(3),f=r.getUint8(4);let h=this.HEADER_LENGTH+4;const m=i.decode(e.slice(h,h+o));h=h+o;const y=i.decode(e.slice(h,h+c));h=h+c;const g=i.decode(e.slice(h,h+u));h=h+u;const b=e.slice(h,e.byteLength),_=f===this.JSON_ENCODING?JSON.parse(i.decode(b)):b,S={type:this.BROADCAST_EVENT,event:y,payload:_};return u>0&&(S.meta=JSON.parse(g)),{join_ref:null,ref:null,topic:m,event:this.BROADCAST_EVENT,payload:S}}_isArrayBuffer(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(([i])=>r.includes(i)))}}var Ze;(function(t){t.abstime="abstime",t.bool="bool",t.date="date",t.daterange="daterange",t.float4="float4",t.float8="float8",t.int2="int2",t.int4="int4",t.int4range="int4range",t.int8="int8",t.int8range="int8range",t.json="json",t.jsonb="jsonb",t.money="money",t.numeric="numeric",t.oid="oid",t.reltime="reltime",t.text="text",t.time="time",t.timestamp="timestamp",t.timestamptz="timestamptz",t.timetz="timetz",t.tsrange="tsrange",t.tstzrange="tstzrange"})(Ze||(Ze={}));const p0=(t,e,r={})=>{var i;const o=(i=r.skipTypes)!==null&&i!==void 0?i:[];return e?Object.keys(e).reduce((c,u)=>(c[u]=Ik(u,t,e,o),c),{}):{}},Ik=(t,e,r,i)=>{const o=e.find(f=>f.name===t),c=o?.type,u=r[t];return c&&!i.includes(c)?iw(c,u):jh(u)},iw=(t,e)=>{if(t.charAt(0)==="_"){const r=t.slice(1,t.length);return Vk(e,r)}switch(t){case Ze.bool:return Hk(e);case Ze.float4:case Ze.float8:case Ze.int2:case Ze.int4:case Ze.int8:case Ze.numeric:case Ze.oid:return $k(e);case Ze.json:case Ze.jsonb:return qk(e);case Ze.timestamp:return Gk(e);case Ze.abstime:case Ze.date:case Ze.daterange:case Ze.int4range:case Ze.int8range:case Ze.money:case Ze.reltime:case Ze.text:case Ze.time:case Ze.timestamptz:case Ze.timetz:case Ze.tsrange:case Ze.tstzrange:return jh(e);default:return jh(e)}},jh=t=>t,Hk=t=>{switch(t){case"t":return!0;case"f":return!1;default:return t}},$k=t=>{if(typeof t=="string"){const e=parseFloat(t);if(!Number.isNaN(e))return e}return t},qk=t=>{if(typeof t=="string")try{return JSON.parse(t)}catch{return t}return t},Vk=(t,e)=>{if(typeof t!="string")return t;const r=t.length-1,i=t[r];if(t[0]==="{"&&i==="}"){let c;const u=t.slice(1,r);try{c=JSON.parse("["+u+"]")}catch{c=u?u.split(","):[]}return c.map(f=>iw(e,f))}return t},Gk=t=>typeof t=="string"?t.replace(" ","T"):t,aw=t=>{const e=new URL(t);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 Po=t=>typeof t=="function"?t:function(){return t},Kk=typeof self<"u"?self:null,ua=typeof window<"u"?window:null,Jn=Kk||ua||globalThis,Fk="2.0.0",Yk=1e4,Zk=1e3,Xn={connecting:0,open:1,closing:2,closed:3},tn={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},Or={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave"},Dh={longpoll:"longpoll",websocket:"websocket"},Jk={complete:4},Lh="base64url.bearer.phx.",Lc=class{constructor(t,e,r,i){this.channel=t,this.event=e,this.payload=r||function(){return{}},this.receivedResp=null,this.timeout=i,this.timeoutTimer=null,this.recHooks=[],this.sent=!1,this.ref=void 0}resend(t){this.timeout=t,this.reset(),this.send()}send(){this.hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload(),ref:this.ref,j
vendor: 5,239 bytes, line 18
18oin_ref:this.channel.joinRef()}))}receive(t,e){return this.hasReceived(t)&&e(this.receivedResp.response),this.recHooks.push({status:t,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:t,response:e,_ref:r}){this.recHooks.filter(i=>i.status===t).forEach(i=>i.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,t=>{this.cancelRefEvent(),this.cancelTimeout(),this.receivedResp=t,this.matchReceive(t)}),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}hasReceived(t){return this.receivedResp&&this.receivedResp.status===t}trigger(t,e){this.channel.trigger(this.refEvent,{status:t,response:e})}},ow=class{constructor(t,e){this.callback=t,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))}},Qk=class{constructor(t,e,r){this.state=tn.closed,this.topic=t,this.params=Po(e||{}),this.socket=r,this.bindings=[],this.bindingRef=0,this.timeout=this.socket.timeout,this.joinedOnce=!1,this.joinPush=new Lc(this,Or.join,this.params,this.timeout),this.pushBuffer=[],this.stateChangeRefs=[],this.rejoinTimer=new ow(()=>{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=tn.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(i=>i.send()),this.pushBuffer=[]}),this.joinPush.receive("error",i=>{this.state=tn.errored,this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,i),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.onClose(()=>{this.rejoinTimer.reset(),this.socket.hasLogger()&&this.socket.log("channel",`close ${this.topic}`),this.state=tn.closed,this.socket.remove(this)}),this.onError(i=>{this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,i),this.isJoining()&&this.joinPush.reset(),this.state=tn.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 Lc(this,Or.leave,Po({}),this.timeout).send(),this.state=tn.errored,this.joinPush.reset(),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.on(Or.reply,(i,o)=>{this.trigger(this.replyEventName(o),i)})}join(t=this.timeout){if(this.joinedOnce)throw new Error("tried to join multiple times. 'join' can only be called a single time per channel instance");return this.timeout=t,this.joinedOnce=!0,this.rejoin(),this.joinPush}teardown(){this.pushBuffer.forEach(t=>t.destroy()),this.pushBuffer=[],this.rejoinTimer.reset(),this.joinPush.destroy(),this.state=tn.closed,this.bindings=[]}onClose(t){this.on(Or.close,t)}onError(t){return this.on(Or.error,e=>t(e))}on(t,e){let r=this.bindingRef++;return this.bindings.push({event:t,ref:r,callback:e}),r}off(t,e){this.bindings=this.bindings.filter(r=>!(r.event===t&&(typeof e>"u"||e===r.ref)))}canPush(){return this.socket.isConnected()&&this.isJoined()}push(t,e,r=this.timeout){if(e=e||{},!this.joinedOnce)throw new Error(`tried to push '${t}' to '${this.topic}' before joining. Use channel.join() before pushing events`);let i=new Lc(this,t,function(){return e},r);return this.canPush()?i.send():(i.startTimeout(),this.pushBuffer.push(i)),i}leave(t=this.timeout){this.rejoinTimer.reset(),this.joinPush.cancelTimeout(),this.state=tn.leaving;let e=()=>{this.socket.hasLogger()&&this.socket.log("channel",`leave ${this.topic}`),this.trigger(Or.close,"leave")},r=new Lc(this,Or.leave,Po({}),t);return r.receive("ok",()=>e()).receive("timeout",()=>e()),r.send(),this.canPush()||r.trigger("ok",{}),r}onMessage(t,e,r){return e}filterBindings(t,e,r){return!0}isMember(t,e,r,i){return this.topic!==t?!1:i&&i!==this.joinRef()?(this.socket.hasLogger()&&this.socket.log("channel","dropping outdated message",{topic:t,event:e,payload:r,joinRef:i}),!1):!0}joinRef(){return this.joinPush.ref}rejoin(t=this.timeout){this.isLeaving()||(this.socket.leaveOpenTopic(this.topic),this.state=tn.joining,this.joinPush.resend(t))}trigger(t,e,r,i){let o=this.onMessage(t,e,r,i);if(e&&!o)throw new Error("channel onMessage callbacks must return the payload, modified or unmodified");let c=this.bindings.filter(u=>u.event===t&&this.filterBindings(u,e,r));for(let u=0;u<c.length;u++)c[u].callback(o,r,i||this.joinRef())}replyEventName(t){return`chan_reply_${t}`}isClosed(){return this.state===tn.closed}isErrored(){return this.state===tn.errored}isJoined(){return this.state===tn.joined}isJoining(){return this.state===tn.joining}isLeaving(){return this.state===tn.leaving}}
18,ru=class{static request(t,e,r,i,o,c,u){if(Jn.XDomainRequest){let f=new Jn.XDomainRequest;return this.xdomainRequest(f,t,e,i,o,c,u)}else if(Jn.XMLHttpRequest){let f=new Jn.XMLHttpRequest;return this.xhrRequest(f,t,e,r,i,o,c,u)}else{if(Jn.fetch&&Jn.AbortController)return this.fetchRequest(t,e,r,i,o,c,u);throw new Error("No suitable XMLHttpRequest implementation found")}}static fetchRequest(t,e,r,i,o,c,u){let f={method:t,headers:r,body:i},h=null;return o&&(h=new AbortController,setTimeout(()=>h.abort(),o),f.signal=h.signal),Jn.fetch(e,f).then(m=>m.text()).then(m=>this.parseJSON(m)).then(m=>u&&u(m)).catch(m=>{m.name==="AbortError"&&c?c():u&&u(null)}),h}static xdomainRequest(t,e,r,i,o,c,u){return t.timeout=o,t.open(e,r),t.onload=()=>{let f=this.parseJSON(t.responseText);u&&u(f)},c&&(t.ontimeout=c),t.onprogress=()=>{},t.send(i),t}static xhrRequest(t,e,r,i,o,c,u,f){t.open(e,r,!0),t.timeout=c;for(let[h,m]of Object.entries(i))t.setRequestHeader(h,m);return t.onerror=()=>f&&f(null),t.onreadystatechange=()=>{if(t.readyState===Jk.complete&&f){let h=this.parseJSON(t.responseText);f(h)}},u&&(t.ontimeout=u),t.send(o),t}static parseJSON(t){if(!t||t==="")return null;try{return JSON.parse(t)}catch{return console&&console.log("failed to parse JSON response",t),null}}static serialize(t,e){let r=[];for(var i in t){if(!Object.prototype.hasOwnProperty.call(t,i))continue;let o=e?`${e}[${i}]`:i,c=t[i];typeof c=="object"?r.push(this.serialize(c,o)):r.push(encodeURIComponent(o)+"="+encodeURIComponent(c))}return r.join("&")}static appendParams(t,e){if(Object.keys(e).length===0)return t;let r=t.match(/\?/)?"&":"?";return`${t}${r}${this.serialize(e)}`}},Xk=t=>{let e="",r=new Uint8Array(t),i=r.byteLength;for(let o=0;o<i;o++)e+=String.fromCharCode(r[o]);return btoa(e)},ia=class{constructor(t,e){e&&e.length===2&&e[1].startsWith(Lh)&&(this.authToken=atob(e[1].slice(Lh.length))),this.endPoint=null,this.token=null,this.skipHeartbeat=!0,this.reqs=new Set,this.awaitingBatchAck=!1,this.currentBatch=null,this.currentBatchTimer=null,this.batchBuffer=[],this.onopen=function(){},this.onerror=function(){},this.onmessage=function(){},this.onclose=function(){},this.pollEndpoint=this.normalizeEndpoint(t),this.readyState=Xn.connecting,setTimeout(()=>this.poll(),0)}normalizeEndpoint(t){return t.replace("ws://","http://").replace("wss://","https://").replace(new RegExp("(.*)/"+Dh.websocket),"$1/"+Dh.longpoll)}endpointURL(){return ru.appendParams(this.pollEndpoint,{token:this.token})}closeAndRetry(t,e,r){this.close(t,e,r),this.readyState=Xn.connecting}ontimeout(){this.onerror("timeout"),this.closeAndRetry(1005,"timeout",!1)}isActive(){return this.readyState===Xn.open||this.readyState===Xn.connecting}poll(){const t={Accept:"application/json"};this.authToken&&(t["X-Phoenix-AuthToken"]=this.authToken),this.ajax("GET",t,null,()=>this.ontimeout(),e=>{if(e){var{status:r,token:i,messages:o}=e;if(r===410&&this.token!==null){this.onerror(410),this.closeAndRetry(3410,"session_gone",!1);return}this.token=i}else r=0;switch(r){case 200:o.forEach(c=>{setTimeout(()=>this.onmessage({data:c}),0)}),this.poll();break;case 204:this.poll();break;case 410:this.readyState=Xn.open,this.onopen({}),this.poll();break;
18case 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(t){typeof t!="string"&&(t=Xk(t)),this.currentBatch?this.currentBatch.push(t):this.awaitingBatchAck?this.batchBuffer.push(t):(this.currentBatch=[t],this.currentBatchTimer=setTimeout(()=>{this.batchSend(this.currentBatch),this.currentBatch=null},0))}batchSend(t){this.awaitingBatchAck=!0,this.ajax("POST",{"Content-Type":"application/x-ndjson"},t.join(` 19`),()=>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(t,e,r){for(let o of this.reqs)o.abort();this.readyState=Xn.closed;let i=Object.assign({code:1e3,reason:void 0,wasClean:!0},{code:t,reason:e,wasClean:r});this.batchBuffer=[],clearTimeout(this.currentBatchTimer),this.currentBatchTimer=null,typeof CloseEvent<"u"?this.onclose(new CloseEvent("close",i)):this.onclose(i)}ajax(t,e,r,i,o){let c,u=()=>{this.reqs.delete(c),i()};c=ru.request(t,this.endpointURL(),e,r,this.timeout,u,f=>{this.reqs.delete(c),this.isActive()&&o(f)}),this.reqs.add(c)}},Wk=class jo{constructor(e,r={}){let i=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(i.state,o=>{let{onJoin:c,onLeave:u,onSync:f}=this.caller;this.joinRef=this.channel.joinRef(),this.state=jo.syncState(this.state,o,c,u),this.pendingDiffs.forEach(h=>{this.state=jo.syncDiff(this.state,h,c,u)}),this.pendingDiffs=[],f()}),this.channel.on(i.diff,o=>{let{onJoin:c,onLeave:u,onSync:f}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(o):(this.state=jo.syncDiff(this.state,o,c,u),f())})}onJoin(e){this.caller.onJoin=e}onLeave(e){this.caller.onLeave=e}onSync(e){this.caller.onSync=e}list(e){return jo.list(this.state,e)}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel.joinRef()}static syncState(e,r,i,o){let c=this.clone(e),u={},f={};return this.map(c,(h,m)=>{r[h]||(f[h]=m)}),this.map(r,(h,m)=>{let y=c[h];if(y){let g=m.metas.map(E=>E.phx_ref),b=y.metas.map(E=>E.phx_ref),_=m.metas.filter(E=>b.indexOf(E.phx_ref)<0),S=y.metas.filter(E=>g.indexOf(E.phx_ref)<0);_.length>0&&(u[h]=m,u[h].metas=_),S.length>0&&(f[h]=this.clone(y),f[h].metas=S)}else u[h]=m}),this.syncDiff(c,{joins:u,leaves:f},i,o)}static syncDiff(e,r,i,o){let{joins:c,leaves:u}=this.clone(r);return i||(i=function(){}),o||(o=function(){}),this.map(c,(f,h)=>{let m=e[f];if(e[f]=this.clone(h),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)}i(f,m,h)}),this.map(u,(f,h)=>{let m=e[f];if(!m)return;let y=h.metas.map(g=>g.phx_ref);m.metas=m.metas.filter(g=>y.indexOf(g.phx_ref)<0),o(f,m,h),m.metas.length===0&&delete e[f]}),e}static list(e,r){return r||(r=function(i,o){return o}),this.map(e,(i,o)=>r(i,o))}static map(e,r){return Object.getOwnPropertyNames(e).map(i=>r(i,e[i]))}static clone(e){return JSON.parse(JSON.stringify(e))}},Mc={HEADER_LENGTH:1,META_LENGTH:4,KINDS:{push:0,reply:1,broadcast:2},encode(t,e){if(t.payload.constructor===ArrayBuffer)return e(this.binaryEncode(t));{let r=[t.join_ref,t.ref,t.topic,t.event,t.payload];return e(JSON.stringify(r))}},decode(t,e){if(t.constructor===ArrayBuffer)return e(this.binaryDecode(t));{let[r,i,o,c,u]=JSON.parse(t);return e({join_ref:r,ref:i,topic:o,event:c,payload:u})}},binaryEncode(t){let{join_ref:e,ref:r,event:i,topic:o,payload:c}=t,u=this.META_LENGTH+e.length+r.length+o.length+i.length,f=new ArrayBuffer(this.HEADER_LENGTH+u),h=new DataView(f),m=0;h.setUint8(m++,this.KINDS.push),h.setUint8(m++,e.length),h.setUint8(m++,r.length),h.setUint8(m++,o.length),h.setUint8(m++,i.length),Array.from(e,g=>h.setUint8(m++,g.charCodeAt(0))),Array.from(r,g=>h.setUint8(m++,g.charCodeAt(0))),Array.from(o,g=>h.setUint8(m++,g.charCodeAt(0))),Array.from(i,g=>h.setUint8(m++,g.charCodeAt(0)));var y=new Uint8Array(f.byteLength+c.byteLength);return y.set(new Uint8Array(f),0),y.set(new Uint8Array(c),f.byteLength),y.buffer},binaryDecode(t){let e=new DataView(t),r=e.getUint8(0),i=new TextDecoder;switch(r){case this.KINDS.push:return this.decodePush(t,e,i);case this.KINDS.reply:return this.decodeReply(t,e,i);case this.KINDS.broadcast:return this.decodeBroadcast(t,e,i)}},decodePush(t,e,r){let i=e.getUint8(1),o=e.getUint8(2),c=e.getUint8(3),u=this.HEADER_LENGTH+this.META_LENGTH-1,f=r.decode(t.slice(u,u+i));u=u+i;let h=r.decode(t.slice(u,u+o));u=u+o;let m=r.decode(t.slice(u,u+c));u=u+c;let y=t.slice(u,t.byteLength);return{join_ref:f,ref:null,topic:h,event:m,payload:y}},decodeReply(t,e,r){let i=e.getUint8(1),o=e.getUint8(2),c=e.getUint8(3),u=e.getUint8(4),f=this.HEADER_LENGTH+this.META_LENGTH,h=r.decode(t.slice(f,f+i));f=f+i;let m=r.decode(t.slice(f,f+o));f=f+o;let y=r.decode(t.slice(f,f+c));f=f+c;let g=r.decode(t.slice(f,f+u));f=f+u;let b=t.slice(f,t.byteLength),_={status:g,response:b};return{join_ref:h,ref:m,topic:y,event:Or.reply,payload:_}},decodeBroadcast(t,e,r){let i=e.getUint8(1),o=e.getUint8(2),c=this.HEADER_LENGTH+2,u=r.decode(t.slice(c,c+i));c=c+i;
19let f=r.decode(t.slice(c,c+o));c=c+o;let h=t.slice(c,t.byteLength);return{join_ref:null,ref:null,topic:u,event:f,payload:h}}},eC=class{constructor(t,e={}){this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.channels=[],this.sendBuffer=[],this.ref=0,this.fallbackRef=null,this.timeout=e.timeout||Yk,this.transport=e.transport||Jn.WebSocket||ia,this.conn=void 0,this.primaryPassedHealthCheck=!1,this.longPollFallbackMs=e.longPollFallbackMs,this.fallbackTimer=null;let r=null;try{r=Jn&&Jn.sessionStorage}catch{}this.sessionStore=e.sessionStorage||r,this.establishedConnections=0,this.defaultEncoder=Mc.encode.bind(Mc),this.defaultDecoder=Mc.decode.bind(Mc),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!==ia?(this.encode=e.encode||this.defaultEncoder,this.decode=e.decode||this.defaultDecoder):(this.encode=this.defaultEncoder,this.decode=this.defaultDecoder);let i=null;ua&&ua.addEventListener&&(ua.addEventListener("pagehide",o=>{this.conn&&(this.disconnect(),i=this.connectClock)}),ua.addEventListener("pageshow",o=>{i===this.connectClock&&(i=null,this.connect())}),ua.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=o=>e.rejoinAfterMs?e.rejoinAfterMs(o):[1e3,2e3,5e3][o-1]||1e4,this.reconnectAfterMs=o=>e.reconnectAfterMs?e.reconnectAfterMs(o):[10,50,100,150,200,250,500,1e3,2e3][o-1]||5e3,this.logger=e.logger||null,!this.logger&&e.debug&&(this.logger=(o,c,u)=>{console.log(`${o}: ${c}`,u)}),this.longpollerTimeout=e.longpollerTimeout||2e4,this.params=Po(e.params||{}),this.endPoint=`${t}/${Dh.websocket}`,this.vsn=e.vsn||Fk,this.heartbeatTimeoutTimer=null,this.heartbeatTimer=null,this.heartbeatSentAt=null,this.pendingHeartbeatRef=null,this.reconnectTimer=new ow(()=>
19{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 ia}replaceTransport(t){this.connectClock++,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.conn&&(this.conn.close(),this.conn=null),this.transport=t}protocol(){return location.protocol.match(/^https/)?"wss":"ws"}endPointURL(){let t=ru.appendParams(ru.appendParams(this.endPoint,this.params()),{vsn:this.vsn});return t.charAt(0)!=="/"?t:t.charAt(1)==="/"?`${this.protocol()}:${t}`:`${this.protocol()}://${location.host}${t}`}disconnect(t,e,r){this.connectClock++,this.disconnecting=!0,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.teardown(()=>{this.disconnecting=!1,t&&t()},e,r)}connect(t){t&&(console&&console.log("passing params to connect is deprecated. Instead pass :params to the Socket constructor"),this.params=Po(t)),!(this.conn&&!this.disconnecting)&&(this.longPollFallbackMs&&this.transport!==ia?this.connectWithF
vendor: 4,353 bytes, line 19
19allback(ia,this.longPollFallbackMs):this.transportConnect())}log(t,e,r){this.logger&&this.logger(t,e,r)}hasLogger(){return this.logger!==null}onOpen(t){let e=this.makeRef();return this.stateChangeCallbacks.open.push([e,t]),e}onClose(t){let e=this.makeRef();return this.stateChangeCallbacks.close.push([e,t]),e}onError(t){let e=this.makeRef();return this.stateChangeCallbacks.error.push([e,t]),e}onMessage(t){let e=this.makeRef();return this.stateChangeCallbacks.message.push([e,t]),e}onHeartbeat(t){this.heartbeatCallback=t}ping(t){if(!this.isConnected())return!1;let e=this.makeRef(),r=Date.now();this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:e});let i=this.onMessage(o=>{o.ref===e&&(this.off([i]),t(Date.now()-r))});return!0}transportName(t){return t===ia?"LongPoll":t.name}transportConnect(){this.connectClock++,this.closeWasClean=!1;let t;this.authToken&&(t=["phoenix",`${Lh}${btoa(this.authToken).replace(/=/g,"")}`]),this.conn=new this.transport(this.endPointURL(),t),this.conn.binaryType=this.binaryType,this.conn.timeout=this.longpollerTimeout,this.conn.onopen=()=>this.onConnOpen(),this.conn.onerror=e=>this.onConnError(e),this.conn.onmessage=e=>this.onConnMessage(e),this.conn.onclose=e=>this.onConnClose(e)}getSession(t){return this.sessionStore&&this.sessionStore.getItem(t)}storeSession(t,e){this.sessionStore&&this.sessionStore.setItem(t,e)}connectWithFallback(t,e=2500){clearTimeout(this.fallbackTimer);let r=!1,i=!0,o,c,u=this.transportName(t),f=h=>{this.log("transport",`falling back to ${u}...`,h),this.off([o,c]),i=!1,this.replaceTransport(t),this.transportConnect()};if(this.getSession(`phx:fallback:${u}`))return f("memorized");this.fallbackTimer=setTimeout(f,e),c=this.onError(h=>{this.log("transport","error",h),i&&!r&&(clearTimeout(this.fallbackTimer),f(h))}),this.fallbackRef&&this.off([this.fallbackRef]),this.fallbackRef=this.onOpen(()=>{if(r=!0,!i){let h=this.transportName(t);return this.primaryPassedHealthCheck||this.storeSession(`phx:fallback:${h}`,"true"),this.log("transport",`established ${h} fallback`)}clearTimeout(this.fallbackTimer),this.fallbackTimer=setTimeout(f,e),this.ping(h=>{this.log("transport","connected to primary after",h),this.primaryPassedHealthCheck=!0,clearTimeout(this.fallbackTimer)})}),this.transportConnect()}clearHeartbeats(){clearTimeout(this.heartbeatTimer),clearTimeout(this.heartbeatTimeoutTimer)}onConnOpen(){this.hasLogger()&&this.log("transport",`connected to ${this.endPointURL()}`),this.closeWasClean=!1,this.disconnecting=!1,this.establishedConnections++,this.flushSendBuffer(),this.reconnectTimer.reset(),this.autoSendHeartbeat&&this.resetHeartbeat(),this.triggerStateCallbacks("open")}heartbeatTimeout(){if(this.pendingHeartbeatRef){this.pendingHeartbeatRef=null,this.heartbeatSentAt=null,this.hasLogger()&&this.log("transport","heartbeat timeout. Attempting to re-establish connection");try{this.heartbeatCallback("timeout")}catch(t){this.log("error","error in heartbeat callback",t)}this.triggerChanError(new Error("heartbeat timeout")),this.closeWasClean=!1,this.teardown(()=>this.reconnectTimer.scheduleTimeout(),Zk,"heartbeat timeout")}}resetHeartbeat(){this.conn&&this.conn.skipHeartbeat||(this.pendingHeartbeatRef=null,this.clearHeartbeats(),this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}teardown(t,e,r){if(!this.conn)return t&&t();const i=this.conn;this.waitForBufferDone(i,()=>{e?i.close(e,r||""):i.close(),this.waitForSocketClosed(i,()=>{this.conn===i&&(this.conn.onopen=function(){},this.conn.onerror=function(){},this.conn.onmessage=function(){},this.conn.onclose=function(){},this.conn=null),t&&t()})})}waitForBufferDone(t,e,r=1){if(r===5||!t.bufferedAmount){e();return}setTimeout(()=>{this.waitForBufferDone(t,e,r+1)},150*r)}waitForSocketClosed(t,e,r=1){if(r===5||t.readyState===Xn.closed){e();return}setTimeout(()=>{this.waitForSocketClosed(t,e,r+1)},150*r)}onConnClose(t){this.conn&&(this.conn.onclose=()=>{}),this.hasLogger()&&this.log("transport","close",t),this.triggerChanError(t),this.clearHeartbeats(),this.closeWasClean||this.reconnectTimer.scheduleTimeout(),this.triggerStateCallbacks("close",t)}onConnError(t){this.hasLogger()&&this.log("transport","error",t);let e=this.transport,r=this.establishedConnections;this.triggerStateCallbacks("error",t,e,r),(e===this.transport||r>0)&&this.triggerChanError(t)}
19triggerChanError(t){this.channels.forEach(e=>{e.isErrored()||e.isLeaving()||e.isClosed()||e.trigger(Or.error,t)})}connectionState(){switch(this.conn&&this.conn.readyState){case Xn.connecting:return"connecting";case Xn.open:return"open";case Xn.closing:return"closing";default:return"closed"}}isConnected(){return this.connectionState()==="open"}remove(t){this.off(t.stateChangeRefs),this.channels=this.channels.filter(e=>e!==t)}off(t){for(let e in this.stateChangeCallbacks)this.stateChangeCallbacks[e]=this.stateChangeCallbacks[e].filter(([r])=>t.indexOf(r)===-1)}channel(t,e={}){let r=new Qk(t,e,this);return this.channels.push(r),r}push(t){if(this.hasLogger()){let{topic:e,event:r,payload:i,ref:o,join_ref:c}=t;this.log("push",`${e} ${r} (${c}, ${o})`,i)}this.isConnected()?this.encode(t,e=>this.conn.send(e)):this.sendBuffer.push(()=>this.encode(t,e=>this.conn.send(e)))}makeRef(){let t=this.ref+1;return t===this.ref?this.ref=0:this.ref=t,this.ref.toString()}sendHeartbeat(){if(!this.isConnected()){try{this.heartbeatCallback("disconnected")}catch(t){this.log("error","error in heartbeat callback",t)}return}if(this.pendingHeartbeatRef){this.heartbeatTimeout();return}this.pendingHeartbeatRef=this.makeRef(),this.heartbeatSentAt=Date.now(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef});try{this.heartbeatCallback("sent")}catch(t){this.log("error","error in heartbeat callback",t)}this.heartbeatTimeoutTimer=setTimeout(()=>this.heartbeatTimeout(),this.heartbeatIntervalMs)}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(t=>t()),this.sendBuffer=[])}onConnMessage(t){this.decode(t.data,e=>{let{topic:r,event:i,payload:o,ref:c,join_ref:u}=e;if(c&&c===this.pendingHeartbeatRef){const f=this.heartbeatSentAt?Date.now()-this.heartbeatSentAt:void 0;this.clearHeartbeats();try{this.heartbeatCallback(o.status==="ok"?"ok":"error",f)}catch(h){this.log("error","error in heartbeat callback",h)}this.pendingHeartbeatRef=null,this.heartbeatSentAt=null,this.autoSendHeartbeat&&(this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}this.hasLogger()&&this.log("receive",`${o.status||""} ${r} ${i} ${c&&"("+c+")"||""}`.trim(),o);for(let f=0;f<this.channels.length;f++){const h=this.channels[f];h.isMember(r,i,o,u)&&h.trigger(i,o,c,u)}this.triggerStateCallbacks("message",e)})}triggerStateCallbacks(t,...e){try{this.stateChangeCallbacks[t].forEach(([r,i])=>{try{i(...e)}catch(o){this.log("error",`error in ${t} callback`,o)}})}catch(r){this.log("error",`error triggering ${t} callbacks`,r)}}leaveOpenTopic(t){let e=this.channels.find(r=>r.topic===t&&(r.isJoined()||r.isJoining()));e&&(this.hasLogger()&&this.log("transport",`leaving duplicate topic "${t}"`),e.leave())}};class Bo{constructor(e,r){const i=nC(r);this.presence=new Wk(e.getChannel(),i),this.presence.onJoin((o,c,u)=>{const f=Bo.onJoinPayload(o,c,u);e.getChannel().trigger("presence",f)}),this.presence.onLeave((o,c,u)=>{const f=Bo.onLeavePayload(o,c,u);e.getChannel().trigger("presence",f)}),this.presence.onSync(()=>{e.getChannel().trigger("presence",{event:"sync"})})}get state(){return Bo.transformState(this.presence.state)}static transformState(e){return e=tC(e),Object.getOwnPropertyNames(e).reduce((r,i)=>{const o=e[i];return r[i]=Jc(o),r},{})}static onJoinPayload(e,r,i){const o=m0(r),c=Jc(i);return{event:"join",key:e,currentPresences:o,newPresences:c}}static onLeavePayload(e,r,i){const o=m0(r),c=Jc(i);return{event:"leave",key:e,currentPresences:o,leftPresences:c}}}function Jc(t){return t.metas.map(e=>(e.presence_ref=e.phx_ref,delete e.phx_ref,delete e.phx_ref_prev,e))}function tC(t){return JSON.parse(JSON.stringify(t))}function nC(t){return t?.events&&{events:t.events}}function m0(t){return t?.metas?Jc(t):[]}var g0;(function(t){t.SYNC="sync",t.JOIN="join",t.LEAVE="leave"})(g0||(g0={}));class rC{get state(){return this.presenceAdapter.state}constructor(e,r){this.channel=e,this.presenceAdapter=new Bo(this.channel.channelAdapter,r)}}function sC(t){if(t instanceof Error)return t;if(typeof t=="string")return new Error(t);if(t&&typeof t=="object"){const e=t;
19if(typeof e.code=="number"){const r=typeof e.reason=="string"&&e.reason?` (${e.reason})`:"";return new Error(`socket closed: ${e.code}${r}`,{cause:t})}return new Error("channel error: transport failure",{cause:t})}return new Error("channel error: connection lost")}class iC{constructor(e,r,i){const o=aC(i);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,i){let o;try{o=this.channel.push(e,r,i)}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>Pk){const c=this.channel.pushBuffer.shift();c.cancelTimeout(),this.socket.log("channel",`discarded push due to buffer overflow: ${c.event}`,c.payload())}return o}updateJoinPayload(e){const r=this.channel.joinPush.payload();this.channel.joinPush.payload=()=>Object.assign(Object.assign({},r),e)}canPush(){return this.socket.isConnected()&&this.state===ps.joined}isJoined(){return this.state===ps.joined}isJoining(){return this.state===ps.joining}isClosed(){return this.state===ps.closed}isLeaving(){return this.state===ps.leaving}updateFilterBindings(e){this.channel.filterBindings=e}updatePayloadTransform(e){this.channel.onMessage=e}getChannel(){return this.channel}}function aC(t){return{config:Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},t.config)}}const oC=/[,()"\\]/,lC=t=>oC.test(t)||t!==t.trim(),cC=t=>`"${t.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`,y0=t=>{const e=t===null?"null":String(t);return lC(e)?cC(e):e},uC=t=>t===null?"null":String(t),dC=(t,e)=>{if(t==="in"){const r=Array.isArray(e)?e:[e];if(r.length===0)throw new Error("Realtime `in` filter requires at least one value.");return`in.(${Array.from(new Set(r)).map(o=>y0(o)).join(",")})`}return t==="is"?`is.${uC(e)}`:`${t}.${y0(e)}`};class fC{constructor(){this.filters=[]}add(e,r,i,o=!1){const c=o?"not.":"";return this.filters.push(`${e}=${c}${dC(r,i)}`),this}eq(e,r){return this.add(e,"eq",r)}neq(e,r){return this.add(e,"neq",r)}gt(e,r){return this.add(e,"gt",r)}gte(e,r){return this.add(e,"gte",r)}lt(e,r){return this.add(e,"lt",r)}lte(e,r){return this.add(e,"lte",r)}in(e,r){return this.add(e,"in",r)}like(e,r){return this.add(e,"like",r)}ilike(e,r){return this.add(e,"ilike",r)}match(e,r){return this.add(e,"match",r)}imatch(e,r){return this.add(e,"imatch",r)}is(e,r){return this.add(e,"is",r)}isDistinct(e,r){return this.add(e,"isdistinct",r)}not(e,r,i){return this.add(e,r,i,!0)}build(){return this.filters.join(",")}toString(){return this.build()}}var v0;(function(t){t.ALL="*",t.INSERT="INSERT",t.UPDATE="UPDATE",t.DELETE="DELETE"})(v0||(v0={}));var ga;(function(t){t.BROADCAST="broadcast",t.PRESENCE="presence",t.POSTGRES_CHANGES="postgres_changes",t.SYSTEM="system"})(ga||(ga={}));var kr;(function(t){t.SUBSCRIBED="SUBSCRIBED",t.TIMED_OUT="TIMED_OUT",t.CLOSED="CLOSED",t.CHANNEL_ERROR="CHANNEL_ERROR"})(kr||(kr={}));class Io{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:{}},i){var o,c;if(this.topic=e,this.params=r,this.socket=i,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 iC(this.socket.socketAdapter,e,this.params),this.presence=new rC(this),this._onClose(()=>{this.socket._remove(this)}),this._updateFilterTransform(),this.broadcastEndpointURL=aw(this.socket.socketAdapter.endPointURL()),this.private=this.params.config.private||!1,!this.private&&(!((c=(o=this.params.config)===null||o===void 0?void 0:o.broadcast)===null||c===void 0)&&c.replay))throw new Error(`tried to use replay on public channel '${this.topic}'. It must be a private channel.`)}subscribe(e,r=this.timeout){var i,o,c;if(this.socket.isConnected()||this.socket.connect(),this.channelAdapter.isClosed()){const{config:{broadcast:u,presence:f,private:h}}=this.params,m=(o=(i=this.bindings.postgres_changes)===null||i===void 0?void 0:i.map(_=>_.filter))!==null&&o!==void 0?o:[],y=!!this.bindings[ga.PRESENCE]&&this.bindings[ga.PRESENCE].length>0||((c=this.params.config.presence)===null||c===void 0?void 0:c.enabled)===!0,g={},b={broadcast:u,presence:Object.assign(Object.assign({},f),{enabled:y}),postgres_changes:m,private:h};this.socket.accessTokenValue&&(g.access_token=this.socket.accessTokenValue),this._onError(_=>{e?.(kr.CHANNEL_ERROR,sC(_))}),this._onClose(()=>e?.(kr.CLOSED)),this.updateJoinPayload(Object.assign({config:b},g)),this._updateFilterMessage(),this.channelAdapter.subscribe(r).receive("ok",async({postgres_changes:_})=>
19{if(this.socket._isManualToken()||this.socket.setAuth(),_===void 0){e?.(kr.SUBSCRIBED);return}this._updatePostgresBindings(_,e)}).receive("error",_=>{this.state=ps.errored;const S=Object.values(_).join(", ")||"error";e?.(kr.CHANNEL_ERROR,new Error(S,{cause:_}))}).receive("timeout",()=>{e?.(kr.TIMED_OUT)})}return this}_updatePostgresBindings(e,r){var i;const o=this.bindings.postgres_changes,c=(i=o?.length)!==null&&i!==void 0?i:0,u=[];for(let f=0;f<c;f++){const h=o[f],{filter:{event:m,schema:y,table:g,filter:b}}=h,_=e&&e[f];if(_&&_.event===m&&Io.isFilterValueEqual(_.schema,y)&&Io.isFilterValueEqual(_.table,g)&&Io.isFilterValueEqual(_.filter,b))u.push(Object.assign(Object.assign({},h),{id:_.id}));else{this.unsubscribe(),this.state=ps.errored,r?.(kr.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=u,this.state!=ps.errored&&r&&r(kr.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,i){const o=this.channelAdapter.isJoined()||this.channelAdapter.isJoining(),c=e===ga.PRESENCE||e===ga.POSTGRES_CHANGES;if(o&&c)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,i)}async httpSend(e,r,i={}){var o;if(r==null)return Promise.reject(new Error("Payload is required for httpSend()"));const c=r instanceof ArrayBuffer||ArrayBuffer.isView(r),u={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":c?"application/octet-stream":"application/json"};this.socket.accessTokenValue&&(u.Authorization=`Bearer ${this.socket.accessTokenValue}`);const f=new URL(this.broadcastEndpointURL);f.pathname+=`/${encodeURIComponent(this.subTopic)}/events/${encodeURIComponent(e)}`,this.private&&f.searchParams.set("private","true");const h={method:"POST",headers:u,body:c?r:JSON.stringify(r)},m=await this._fetchWithTimeout(f.toString(),h,(o=i.timeout)!==null&&o!==void 0?o:this.timeout);if(m.status===202)return{success:!0};if(m.status===404)return Promise.reject(new Error("httpSend() requires Realtime server v2.97.0 or newer; the endpoint returned 404. Update your Supabase CLI to a recent version, or upgrade the Realtime server in your self-hosted setup. See https://github.com/supabase/supabase-js/blob/master/packages/core/realtime-js/migrations/httpsend-server-version.md"));let y=m.statusText;try{const g=await m.json();y=g.error||g.message||y}catch{}return Promise.reject(new Error(y))}async send(e,r={}){var i,o;if(!this.channelAdapter.canPush()&&e.type==="broadcast"){console.warn("Realtime send() is automatically falling back to REST API. This behavior will be deprecated
19in the future. Please use httpSend() explicitly for REST delivery.");const{event:c,payload:u}=e,f={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(f.Authorization=`Bearer ${this.socket.accessTokenValue}`);const h={method:"POST",headers:f,body:JSON.stringify({messages:[{topic:this.subTopic,event:c,payload:u,private:this.private}]})};try{const m=await this._fetchWithTimeout(this.broadcastEndpointURL,h,(i=r.timeout)!==null&&i!==void 0?i:this.timeout);return await((o=m.body)===null||o===void 0?void 0:o.cancel()),m.ok?"ok":"error"}catch(m){return m instanceof Error&&m.name==="AbortError"?"timed out":"error"}}else return new Promise(c=>{var u,f,h;const m=this.channelAdapter.push(e.type,e,r.timeout||this.timeout);e.type==="broadcast"&&!(!((h=(f=(u=this.params)===null||u===void 0?void 0:u.config)===null||f===void 0?void 0:f.broadcast)===null||h===void 0)&&h.ack)&&c("ok"),m.receive("ok",()=>c("ok")),m.receive("error",()=>c("error")),m.receive("timeout",()=>c("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,i){const o=new AbortController,c=setTimeout(()=>o.abort(),i),u=await this.socket.fetch(e,Object.assign(Object.assign({},r),{signal:o.signal}));return clearTimeout(c),u}_on(e,r,i){const o=e.toLocaleLowerCase(),c=r?.filter;(c instanceof fC||typeof c=="object"&&c!==null&&typeof c.build=="function")&&(r=Object.assign(Object.assign({},r),{filter:c.build()}));const u=this.channelAdapter.on(e,i),f={type:o,filter:r,callback:i,ref:u};return this.bindings[o]?this.bindings[o].push(f):this.bindings[o]=[f],this._updateFilterMessage(),this}_onClose(e){this.channelAdapter.onClose(e)}_onError(e){this.channelAdapter.onError(e)}_updateFilterMessage(){this.channelAdapter.updateFilterBindings((e,r,i)=>{var o,c,u,f,h,m,y;const g=e.event.toLocaleLowerCase();if(this._notThisChannelEvent(g,i))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=(c=b.filter)===null||c===void 0?void 0:c.event;return _&&((u=r.ids)===null||u===void 0?void 0:u.includes(_))&&(S==="*"||S?.toLocaleLowerCase()===((f=r.data)===null||f===void 0?void 0:f.type.toLocaleLowerCase()))}else{const _=(m=(h=b?.filter)===null||h===void 0?void 0:h.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:i,error:o,leave:c,join:u}=sw;return r&&[i,o,c,u].includes(e)&&r!==this.joinPush.ref}_updateFilterTransform(){this.channelAdapter.updatePayloadTransform((e,r,i)=>{if(typeof r=="object"&&"ids"in r){const o=r.data,{schema:c,table:u,commit_timestamp:f,type:h,errors:m}=o;return Object.assign(Object.assign({},{schema:c,table:u,commit_timestamp:f,eventType:h,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 i of e.bindings[r])this._on(i.type,i.filter,i.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=p0(e.columns,e.record)),(e.type==="UPDATE"||e.type==="DELETE")&&(r.old=p0(e.columns,e.old_record)),r}}class hC{constructor(e,r){this.socket=new eC(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,i,o=1e4){return new Promise(c=>{setTimeout(()=>c("timeout"),o),this.socket.disconnect(()=>{e(),c("ok")},r,i)})}push(e){this.socket.push(e)}log(e,r,i){this.socket.log(e,r,i)}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()==Nh.connecting}isDisconnecting(){return this.socket.connectionState()==Nh.closing}connectionState(){return this.socket.connectionState()}endPointURL(){return this.socket.endPointURL()}sendHeartbeat(){this.socket.sendHeartbeat()}getSocket(){return this.socket}}const b0={HEARTBEAT_INTERVAL:25e3},pC=[1e3,2e3,5e3,1e4],mC=1e4;function gC(){const t=new Map;return{get length(){return t.size},clear(){t.clear()},getItem(e){return t.has(e)?t.get(e):null},key(e){var r;return(r=Array.from(t.keys())[e])!==null&&r!==void 0?r:null},removeItem(e){t.delete(e)},setItem(e,r){t.set(e,String(r))}}}function yC(){try{if(typeof globalThis<"u"&&globalThis.sessionStorage)return globalThis.sessionStorage}catch{}return gC()}const vC=` 20 addEventListener("message", (e) => { 21 if (e.data.event === "start") { 22 setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval); 23 } 24 });`;class bC{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 i;if(this.channels=new Array,this.accessTokenValue=null,this.accessToken=null,this.apiKey=null,this.httpEndpoint="",this.headers={},this.params={}
24,this.ref=0,this.serializer=new Bk,this._manuallySetToken=!1,this._authPromise=null,this._workerHeartbeatTimer=void 0,this._pendingWorkerHeartbeatRef=null,this._pendingDisconnectTimer=null,this._disconnectOnEmptyChannelsAfterMs=0,this._resolveFetch=c=>c?(...u)=>c(...u):(...u)=>fetch(...u),!(!((i=r?.params)===null||i===void 0)&&i.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 hC(e,o),this.httpEndpoint=aw(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 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 i=>{const o=await i.unsubscribe();return i.teardown(),o}),r=await Promise.all(e);return await this.disconnect(),r}log(e,r,i){this.socketAdapter.log(e,r,i)}connectionState(){return this.socketAdapter.connectionState()||Nh.closed}isConnected(){return this.socketAdapter.isConnected()}isConnecting(){return this.socketAdapter.isConnecting()}isDisconnecting(){return this.socketAdapter.isDisconnecting()}channel(e,r={config:{}}){const i=`realtime:${e}`,o=this.getChannels().find(c=>c.topic===i);if(o)return o;{const c=new Io(`realtime:${e}`,r,this);return this._cancelPendingDisconnect(),this.channels.push(c),c}}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}
24this._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,i=!1;if(e)r=e,i=!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;i?this._manuallySetToken=!0:this.accessToken&&(this._manuallySetToken=!1),this.accessTokenValue!=r&&(this.accessTokenValue=r,this.channels.forEach(o=>{const c={access_token:r,version:Lk};r&&o.updateJoinPayload(c),o.joinedOnce&&o.channelAdapter.isJoined()&&o.channelAdapter.push(sw.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,i)=>{r=="sent"&&this._setAuthSafely(),e&&e(r,i)}}_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 i=new Blob([vC],{type:"application/javascript"});r=URL.createObjectURL(i)}return r}_initializeOptions(e){var r,i,o,c,u,f,h,m,y,g,b,_;this.worker=(r=e?.worker)!==null&&r!==void 0?r:!1,this.accessToken=(i=e?.accessToken)!==null&&i!==void 0?i:null;const S={};S.timeout=(o=e?.timeout)!==null&&o!==void 0?o:zk,S.heartbeatIntervalMs=(c=e?.heartbeatIntervalMs)!==null&&c!==void 0?c:b0.HEARTBEAT_INTERVAL,this._disconnectOnEmptyChannelsAfterMs=(u=e?.disconnectOnEmptyChannelsAfterMs)!==null&&u!==void 0?u:2*((f=e?.heartbeatIntervalMs)!==null&&f!==void 0?f:b0.HEARTBEAT_INTERVAL),S.transport=(h=e?.transport)!==null&&h!==void 0?h:jk.getWebSocketConstructor(),S.params=e?.params,S.logger=e?.logger,S.heartbeatCallback=this._wrapHeartbeatCallback(e?.heartbeatCallback),S.sessionStorage=(m=e?.sessionStorage)!==null&&m!==void 0?m:yC(),S.reconnectAfterMs=(y=e?.reconnectAfterMs)!==null&&y!==void 0?y:(C=>pC[C-1]||mC);let E,A;const T=(g=e?.vsn)!==null&&g!==void 0?g:Uk;switch(T){case Mk:E=(C,x)=>x(JSON.stringify(C)),A=(C,x)=>x(JSON.parse(C));break;case rw:E=this.serializer.encode.bind(this.serializer),A=this.serializer.decode.bind(this.serializer);break;default:throw new Error(`Unsupported serializer version: ${S.vsn}`)}if(S.vsn=T,S.encode=(b=e?.encode)!==null&&b!==void 0?b:E,S.decode=(_=e?.decode)!==null&&_!==void 0?_:A,S.beforeReconnect=this._reconnectAuth.bind(this),(e?.logLevel||e?.log_level)&&(this.logLevel=e.logLevel||e.log_level,S.params=Object.assign(Object.assign({},S.params),{log_level:this.logLevel})),this.worker){if(typeof window<"u"&&!window.Worker)throw new Error("Web Worker is not supported");this.workerUrl=e?.workerUrl,S.autoSendHeartbeat=!this.worker}return S}async _reconnectAuth(){await this._waitForAuthIfNeeded(),this.isConnected()||this.connect()}}
24var Zo=class extends Error{constructor(t,e){super(t),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 _C(t,e,r){const i=new URL(e,t);if(r)for(const[o,c]of Object.entries(r))c!==void 0&&i.searchParams.set(o,c);return i.toString()}async function wC(t){return!t||t.type==="none"?{}:t.type==="bearer"?{Authorization:`Bearer ${t.token}`}:t.type==="header"?{[t.name]:t.value}:t.type==="custom"?await t.getHeaders():{}}function SC(t){const e=t.fetchImpl??globalThis.fetch;return{async request({method:r,path:i,query:o,body:c,headers:u}){const f=_C(t.baseUrl,i,o),h=await wC(t.auth),m=await e(f,{method:r,headers:{...c?{"Content-Type":"application/json"}:{},...h,...u},body:c?JSON.stringify(c):void 0}),y=await m.text(),g=(m.headers.get("content-type")||"").includes("application/json"),b=g&&y?JSON.parse(y):y;if(!m.ok){const _=g?b:void 0,S=_?.error;throw new 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 Uc(t){return t.join("�")}var EC=class{constructor(t,e=""){this.client=t,this.prefix=e}async listNamespaces(t){const e=t?{parent:Uc(t.namespace)}:void 0;return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces`,query:e})).data.namespaces.map(i=>({namespace:i}))}async createNamespace(t,e){const r={namespace:t.namespace,properties:e?.properties};return(await this.client.request({method:"POST",path:`${this.prefix}/namespaces`,body:r})).data}async dropNamespace(t){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${Uc(t.namespace)}`})}async loadNamespaceMetadata(t){return{properties:(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${Uc(t.namespace)}`})).data.properties}}async namespaceExists(t){try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${Uc(t.namespace)}`}),!0}catch(e){if(e instanceof Zo&&e.status===404)return!1;throw e}}async createNamespaceIfNotExists(t,e){try{return await this.createNamespace(t,e)}catch(r){if(r instanceof Zo&&r.status===409)return;throw r}}};function aa(t){return t.join("�")}var TC=class{constructor(t,e="",r){this.client=t,this.prefix=e,this.accessDelegation=r}async listTables(t){return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${aa(t.namespace)}/tables`})).data.identifiers}async createTable(t,e){const r={};return this.accessDelegation&&(r["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${aa(t.namespace)}/tables`,body:e,headers:r})).data.metadata}async updateTable(t,e){const r=await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${aa(t.namespace)}/tables/${t.name}`,body:e});return{"metadata-location":r.data["metadata-location"],metadata:r.data.metadata}}async dropTable(t,e){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${aa(t.namespace)}/tables/${t.name}`,query:{purgeRequested:String(e?.purge??!1)}})}async loadTable(t){const e={};return this.accessDelegation&&(e["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${aa(t.namespace)}/tables/${t.name}`,headers:e})).data.metadata}async tableExists(t){const e={};this.accessDelegation&&(e["X-Iceberg-Access-Delegation"]=this.accessDelegation);try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${aa(t.namespace)}/tables/${t.name}`,headers:e}),!0}catch(r){if(r instanceof Zo&&r.status===404)return!1;throw r}}async createTableIfNotExists(t,e){try{return await this.createTable(t,e)}catch(r){if(r instanceof Zo&&r.status===409)return await this.loadTable({namespace:t.namespace,name:e.name});throw r}}},AC=class{constructor(t){let e="v1";t.catalogName&&(e+=`/${t.catalogName}`);const r=t.baseUrl.endsWith("/")?t.baseUrl:`${t.baseUrl}/`;this.client=SC({baseUrl:r,auth:t.auth,fetchImpl:t.fetch}),this.accessDelegation=t.accessDelegation?.join(","),this.namespaceOps=new EC(this.client,e),this.tableOps=new TC(this.client,e,this.accessDelegation)}async listNamespaces(t){return this.namespaceOps.listNamespaces(t)}async createNamespace(t,e){return this.namespaceOps.createNamespace(t,e)}async dropNamespace(t){await this.namespaceOps.dropNamespace(t)}async loadNamespaceMetadata(t){return this.namespaceOps.loadNamespaceMetadata(t)}async listTables(t){return this.tableOps.listTables(t)}
24async createTable(t,e){return this.tableOps.createTable(t,e)}async updateTable(t,e){return this.tableOps.updateTable(t,e)}async dropTable(t,e){await this.tableOps.dropTable(t,e)}async loadTable(t){return this.tableOps.loadTable(t)}async namespaceExists(t){return this.namespaceOps.namespaceExists(t)}async tableExists(t){return this.tableOps.tableExists(t)}async createNamespaceIfNotExists(t,e){return this.namespaceOps.createNamespaceIfNotExists(t,e)}async createTableIfNotExists(t,e){return this.tableOps.createTableIfNotExists(t,e)}};function Jo(t){"@babel/helpers - typeof";return Jo=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},Jo(t)}function RC(t,e){if(Jo(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var i=r.call(t,e);if(Jo(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function OC(t){var e=RC(t,"string");return Jo(e)=="symbol"?e:e+""}function kC(t,e,r){return(e=OC(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function _0(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),r.push.apply(r,i)}return r}function ye(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?_0(Object(r),!0).forEach(function(i){kC(t,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):_0(Object(r)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(r,i))})}return t}var Ru=class extends Error{constructor(t,e="storage",r,i){super(t),this.__isStorageError=!0,this.namespace=e,this.name=e==="vectors"?"StorageVectorsError":"StorageError",this.status=r,this.statusCode=i}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}};function Ou(t){return typeof t=="object"&&t!==null&&"__isStorageError"in t}var Mh=class extends Ru{constructor(t,e,r,i="storage"){super(t,i,e,r),this.name=i==="vectors"?"StorageVectorsApiError":"StorageApiError",this.status=e,this.statusCode=r}toJSON(){return ye({},super.toJSON())}},lw=class extends Ru{constructor(t,e,r="storage"){super(t,r),this.name=r==="vectors"?"StorageVectorsUnknownError":"StorageUnknownError",this.originalError=e}};function su(t,e,r){const i=ye({},t),o=e.toLowerCase();for(const c of Object.keys(i))c.toLowerCase()===o&&delete i[c];return i[o]=r,i}function CC(t){const e={};for(const[r,i]of Object.entries(t))e[r.toLowerCase()]=i;return e}const xC=t=>t?(...e)=>t(...e):(...e)=>fetch(...e),NC=t=>{if(typeof t!="object"||t===null)return!1;const e=Object.getPrototypeOf(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},Uh=t=>{if(Array.isArray(t))return t.map(r=>Uh(r));if(typeof t=="function"||t!==Object(t))return t;const e={};return Object.entries(t).forEach(([r,i])=>{const o=r.replace(/([-_][a-z])/gi,c=>c.toUpperCase().replace(/[-_]/g,""));e[o]=Uh(i)}),e},jC=t=>!t||typeof t!="string"||t.length===0||t.length>100||t.trim()!==t||t.includes("/")||t.includes("\\")?!1:/^[\w!.\*'() &$@=;:+,?-]+$/.test(t),w0=t=>{if(typeof t=="object"&&t!==null){const e=t;if(typeof e.msg=="string")return e.msg;if(typeof e.message=="string")return e.message;if(typeof e.error_description=="string")return e.error_description;if(typeof e.error=="string")return e.error;if(typeof e.error=="object"&&e.error!==null){const r=e.error;if(typeof r.message=="string")return r.message}}return JSON.stringify(t)},DC=async(t,e,r,i)=>{if(t!==null&&typeof t=="object"&&"json"in t&&typeof t.json=="function"){const o=t;let c=parseInt(String(o.status),10);Number.isFinite(c)||(c=500),o.json().then(u=>{const f=u?.statusCode||u?.code||c+"";e(new Mh(w0(u),c,f,i))}).catch(()=>{const u=c+"";e(new Mh(o.statusText||`HTTP ${c} error`,c,u,i))})}
24else e(new lw(w0(t),t,i))},LC=(t,e,r,i)=>{const o={method:t,headers:e?.headers||{}};if(t==="GET"||t==="HEAD"||!i)return ye(ye({},o),r);if(NC(i)){var c;const u=e?.headers||{};let f;for(const[h,m]of Object.entries(u))h.toLowerCase()==="content-type"&&(f=m);o.headers=su(u,"Content-Type",(c=f)!==null&&c!==void 0?c:"application/json"),o.body=JSON.stringify(i)}else o.body=i;return e?.duplex&&(o.duplex=e.duplex),ye(ye({},o),r)};async function xo(t,e,r,i,o,c,u){return new Promise((f,h)=>{t(r,LC(e,i,o,c)).then(m=>{if(!m.ok)throw m;if(i?.noResolveJson)return m;if(u==="vectors"){const y=m.headers.get("content-type");if(m.headers.get("content-length")==="0"||m.status===204)return{};if(!y||!y.includes("application/json"))return{}}return m.json()}).then(m=>f(m)).catch(m=>DC(m,h,i,u))})}function cw(t="storage"){return{get:async(e,r,i,o)=>xo(e,"GET",r,i,o,void 0,t),post:async(e,r,i,o,c)=>xo(e,"POST",r,o,c,i,t),put:async(e,r,i,o,c)=>xo(e,"PUT",r,o,c,i,t),head:async(e,r,i,o)=>xo(e,"HEAD",r,ye(ye({},i),{},{noResolveJson:!0}),o,void 0,t),remove:async(e,r,i,o,c)=>xo(e,"DELETE",r,o,c,i,t)}}const MC=cw("storage"),{get:Qo,post:zn,put:zh,head:UC,remove:Xo}=MC,fn=cw("vectors");var Oa=class{constructor(t,e={},r,i="storage"){this.shouldThrowOnError=!1,this.url=t,this.headers=CC(e),this.fetch=xC(r),this.namespace=i}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(t,e){return this.headers=su(this.headers,t,e),this}async handleOperation(t){var e=this;try{return{data:await t(),error:null}}catch(r){if(e.shouldThrowOnError)throw r;if(Ou(r))return{data:null,error:r};throw r}}};let uw;uw=Symbol.toStringTag;var zC=class{constructor(t,e){this.downloadFn=t,this.shouldThrowOnError=e,this[uw]="StreamDownloadBuilder",this.promise=null}then(t,e){return this.getPromise().then(t,e)}catch(t){return this.getPromise().catch(t)}finally(t){return this.getPromise().finally(t)}getPromise(){return this.promise||(this.promise=this.execute()),this.promise}async execute(){var t=this;try{return{data:(await t.downloadFn()).body,error:null}}catch(e){if(t.shouldThrowOnError)throw e;if(Ou(e))return{data:null,error:e};throw e}}};let dw;dw=Symbol.toStringTag;var PC=class{constructor(t,e){this.downloadFn=t,this.shouldThrowOnError=e,this[dw]="BlobDownloadBuilder",this.promise=null}asStream(){return new zC(this.downloadFn,this.shouldThrowOnError)}then(t,e){return this.getPromise().then(t,e)}catch(t){return this.getPromise().catch(t)}finally(t){return this.getPromise().finally(t)}getPromise(){return this.promise||(this.promise=this.execute()),this.promise}async execute(){var t=this;try{return{data:await(await t.downloadFn()).blob(),error:null}}catch(e){if(t.shouldThrowOnError)throw e;if(Ou(e))return{data:null,error:e};throw e}}};const oh={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},S0={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};var BC=class extends Oa{constructor(t,e={},r,i){super(t,e,i,"storage"),this.bucketId=r}async uploadOrUpdate(t,e,r,i){var o=this;return o.handleOperation(async()=>{let c;const u=ye(ye({},S0),i);let f=ye(ye({},o.headers),t==="POST"&&{"x-upsert":String(u.upsert)});const h=u.metadata;if(typeof Blob<"u"&&r instanceof Blob?(c=new FormData,c.append("cacheControl",u.cacheControl),h&&c.append("metadata",o.encodeMetadata(h)),c.append("",r)):typeof FormData<"u"&&r instanceof FormData?(c=r,c.has("cacheControl")||c.append("cacheControl",u.cacheControl),h&&!c.has("metadata")&&c.append("metadata",o.encodeMetadata(h))):(c=r,f["cache-control"]=`max-age=${u.cacheControl}`,f["content-type"]=u.contentType,h&&(f["x-metadata"]=o.toBase64(o.encodeMetadata(h))),(typeof ReadableStream<"u"&&c instanceof ReadableStream||c&&typeof c=="object"&&"pipe"in c&&typeof c.pipe=="function")&&!u.duplex&&(u.duplex="half")),i?.headers)for(const[b,_]of Object.entries(i.headers))f=su(f,b,_);const m=o._removeEmptyFolders(e),y=o._getFinalPath(m),g=await(t=="PUT"?zh:zn)(o.fetch,`${o.url}/object/${y}`,c,ye({headers:f},u?.duplex?{duplex:u.duplex}:{}));return{path:m,id:g.Id,fullPath:g.Key}})}async upload(t,e,r){return this.uploadOrUpdate("POST",t,e,r)}async uploadToSignedUrl(t,e,r,i){var o=this;const c=o._removeEmptyFolders(t),u=o._getFinalPath(c),f=new URL(o.url+`/object/upload/sign/${u}`);return f.searchParams.set("token",e),o.handleOperation(async()=>{let h;const m=ye(ye({},S0),i);let y=ye(ye({},o.headers),{"x-upsert":String(m.upsert)});const g=m.metadata;if(typeof Blob<"u"&&r instanceof Blob?(h=new FormData,h.append("cacheControl",m.cacheControl),g&&h.append("metadata",o.encodeMetadata(g)),h.append("",r)):typeof FormData<"u"&&r instanceof FormData?(h=r,h.has("cacheControl")||h.append("cacheControl",m.cacheControl),g&&!h.has("metadata")&&h.append("metadata",o.encodeMetadata(g))):(h=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"&&h instanceof ReadableStream||h&&typeof h=="object"&&"pipe"in h&&typeof h.pipe=="function")&&!m.duplex&&(m.duplex="half")),i?.headers)for(const[b,_]of Object.entries(i.headers))y=su(y,b,_);return{path:c,fullPath:(await zh(o.fetch,f.toString(),h,ye({headers:y},m?.duplex?{duplex:m.duplex}:{}))).Key}})}async createSignedUploadUrl(t,e){var r=this;return r.handleOperation(async()=>{let i=r._getFinalPath(t);const o=ye({},r.headers);e?.upsert&&(o["x-upsert"]="true");const c=await zn(r.fetch,`${r.url}/object/upload/sign/${i}`,{},{headers:o}),u=new URL(r.url+c.url),f=u.searchParams.get("token");if(!f)throw new Ru("No token returned by API");return{signedUrl:u.toString(),path:t,token:f}})}async update(t,e,r){return this.uploadOrUpdate("PUT",t,e,r)}
24async move(t,e,r){var i=this;return i.handleOperation(async()=>await zn(i.fetch,`${i.url}/object/move`,{bucketId:i.bucketId,sourceKey:t,destinationKey:e,destinationBucket:r?.destinationBucket},{headers:i.headers}))}async copy(t,e,r){var i=this;return i.handleOperation(async()=>({path:(await zn(i.fetch,`${i.url}/object/copy`,{bucketId:i.bucketId,sourceKey:t,destinationKey:e,destinationBucket:r?.destinationBucket},{headers:i.headers})).Key}))}async createSignedUrl(t,e,r){var i=this;return i.handleOperation(async()=>{let o=i._getFinalPath(t);const c=typeof r?.transform=="object"&&r.transform!==null&&Object.keys(r.transform).length>0;let u=await zn(i.fetch,`${i.url}/object/sign/${o}`,ye({expiresIn:e},c?{transform:r.transform}:{}),{headers:i.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 h=f.toString();return{signedUrl:encodeURI(`${i.url}${u.signedURL}${h?`&${h}`:""}`)}})}async createSignedUrls(t,e,r){var i=this;return i.handleOperation(async()=>{const o=await zn(i.fetch,`${i.url}/object/sign/${i.bucketId}`,{expiresIn:e,paths:t},{headers:i.headers}),c=new URLSearchParams;r?.download&&c.set("download",r.download===!0?"":r.download),r?.cacheNonce!=null&&c.set("cacheNonce",String(r.cacheNonce));const u=c.toString();return o.map(f=>ye(ye({},f),{},{signedUrl:f.signedURL?encodeURI(`${i.url}${f.signedURL}${u?`&${u}`:""}`):null}))})}download(t,e,r){const i=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 c=o.toString(),u=this._getFinalPath(t),f=()=>Qo(this.fetch,`${this.url}/${i}/${u}${c?`?${c}`:""}`,{headers:this.headers,noResolveJson:!0},r);return new PC(f,this.shouldThrowOnError)}async info(t){var e=this;const r=e._getFinalPath(t);return e.handleOperation(async()=>Uh(await Qo(e.fetch,`${e.url}/object/info/${r}`,{headers:e.headers})))}async exists(t){var e=this;const r=e._getFinalPath(t);try{return await UC(e.fetch,`${e.url}/object/${r}`,{headers:e.headers}),{data:!0,error:null}}catch(o){if(e.shouldThrowOnError)throw o;if(Ou(o)){var i;const c=o instanceof Mh?o.status:o instanceof lw?(i=o.originalError)===null||i===void 0?void 0:i.status:void 0;if(c!==void 0&&[400,404].includes(c))return{data:!1,error:o}}throw o}}getPublicUrl(t,e){const r=this._getFinalPath(t),i=new URLSearchParams;e?.download&&i.set("download",e.download===!0?"":e.download),e?.transform&&this.applyTransformOptsToQuery(i,e.transform),e?.cacheNonce!=null&&i.set("cacheNonce",String(e.cacheNonce));const o=i.toString(),c=typeof e?.transform=="object"&&e.transform!==null&&Object.keys(e.transform).length>0?"render/image":"object";return{data:{publicUrl:encodeURI(`${this.url}/${c}/public/${r}`)+(o?`?${o}`:"")}}}async remove(t){var e=this;return e.handleOperation(async()=>await Xo(e.fetch,`${e.url}/object/${e.bucketId}`,{prefixes:t},{headers:e.headers}))}async purgeCache(t,e,r){var i=this;return i.handleOperation(async()=>{const o=i._getFinalPath(t),c=new URLSearchParams;e?.transformations&&c.set("transformations","true");const u=c.toString();return await Xo(i.fetch,`${i.url}/cdn/${o}${u?`?${u}`:""}`,{},{headers:i.headers},r)})}async list(t,e,r){var i=this;return i.handleOperation(async()=>{const o=e?.sortBy?ye(ye({},oh.sortBy),e.sortBy):oh.sortBy,c=ye(ye(ye({},oh),e),{},{sortBy:o,prefix:t||""});return await zn(i.fetch,`${i.url}/object/list/${i.bucketId}`,c,{headers:i.headers},r)})}async listV2(t,e){var r=this;return r.handleOperation(async()=>{const i=ye({},t);return await zn(r.fetch,`${r.url}/object/list-v2/${r.bucketId}`,i,{headers:r.headers},e)})}encodeMetadata(t){return JSON.stringify(t)}toBase64(t){return typeof Buffer<"u"?Buffer.from(t).toString("base64"):btoa(t)}_getFinalPath(t){return`${this.bucketId}/${t.replace(/^\/+/,"")}`}_removeEmptyFolders(t){return t.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}applyTransformOptsToQuery(t,e){return e.width&&t.set("width",e.width.toString()),e.height&&t.set("height",e.height.toString()),e.resize&&t.set("resize",e.resize),e.format&&t.set("format",e.format),e.quality&&t.set("qual
24ity",e.quality.toString()),t}};const IC="2.110.0",cl={"X-Client-Info":`storage-js/${IC}`};var HC=class extends Oa{constructor(t,e={},r,i){const o=new URL(t);i?.useNewHostname&&/supabase\.(co|in|red)$/.test(o.hostname)&&!o.hostname.includes("storage.supabase.")&&(o.hostname=o.hostname.replace("supabase.","storage.supabase."));const c=o.href.replace(/\/$/,""),u=ye(ye({},cl),e);super(c,u,r,"storage")}async listBuckets(t){var e=this;return e.handleOperation(async()=>{const r=e.listBucketOptionsToQueryString(t);return await Qo(e.fetch,`${e.url}/bucket${r}`,{headers:e.headers})})}async getBucket(t){var e=this;return e.handleOperation(async()=>await Qo(e.fetch,`${e.url}/bucket/${t}`,{headers:e.headers}))}async createBucket(t,e={public:!1}){var r=this;return r.handleOperation(async()=>await zn(r.fetch,`${r.url}/bucket`,{id:t,name:t,type:e.type,public:e.public,file_size_limit:e.fileSizeLimit,allowed_mime_types:e.allowedMimeTypes},{headers:r.headers}))}async updateBucket(t,e){var r=this;return r.handleOperation(async()=>await zh(r.fetch,`${r.url}/bucket/${t}`,{id:t,name:t,public:e.public,file_size_limit:e.fileSizeLimit,allowed_mime_types:e.allowedMimeTypes},{headers:r.headers}))}async emptyBucket(t){var e=this;return e.handleOperation(async()=>await zn(e.fetch,`${e.url}/bucket/${t}/empty`,{},{headers:e.headers}))}async deleteBucket(t){var e=this;return e.handleOperation(async()=>await Xo(e.fetch,`${e.url}/bucket/${t}`,{},{headers:e.headers}))}async purgeBucketCache(t,e,r){var i=this;return i.handleOperation(async()=>{const o=new URLSearchParams;e?.transformations&&o.set("transformations","true");const c=o.toString();return await Xo(i.fetch,`${i.url}/cdn/${t}${c?`?${c}`:""}`,{},{headers:i.headers},r)})}listBucketOptionsToQueryString(t){const e={};return t&&("limit"in t&&(e.limit=String(t.limit)),"offset"in t&&(e.offset=String(t.offset)),t.search&&(e.search=t.search),t.sortColumn&&(e.sortColumn=t.sortColumn),t.sortOrder&&(e.sortOrder=t.sortOrder)),Object.keys(e).length>0?"?"+new URLSearchParams(e).toString():""}},$C=class extends Oa{constructor(t,e={},r){const i=t.replace(/\/$/,""),o=ye(ye({},cl),e);super(i,o,r,"storage")}async createBucket(t){var e=this;return e.handleOperation(async()=>await zn(e.fetch,`${e.url}/bucket`,{name:t},{headers:e.headers}))}async listBuckets(t){var e=this;return e.handleOperation(async()=>{const r=new URLSearchParams;t?.limit!==void 0&&r.set("limit",t.limit.toString()),t?.offset!==void 0&&r.set("offset",t.offset.toString()),t?.sortColumn&&r.set("sortColumn",t.sortColumn),t?.sortOrder&&r.set("sortOrder",t.sortOrder),t?.search&&r.set("search",t.search);const i=r.toString(),o=i?`${e.url}/bucket?${i}`:`${e.url}/bucket`;return await Qo(e.fetch,o,{headers:e.headers})})}async deleteBucket(t){var e=this;return e.handleOperation(async()=>await Xo(e.fetch,`${e.url}/bucket/${t}`,{},{headers:e.headers}))}from(t){var e=this;if(!jC(t))throw new Ru("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 AC({baseUrl:this.url,catalogName:t,auth:{type:"custom",getHeaders:async()=>e.headers},fetch:this.fetch}),i=this.shouldThrowOnError;return new Proxy(r,{get(o,c){const u=o[c];return typeof u!="function"?u:async(...f)=>{try{return{data:await u.apply(o,f),error:null}}catch(h){if(i)throw h;return{data:null,error:h}}}}})}},qC=class extends Oa{constructor(t,e={},r){const i=t.replace(/\/$/,""),o=ye(ye({},cl),{},{"Content-Type":"application/json"},e);super(i,o,r,"vectors")}async createIndex(t){var e=this;return e.handleOperation(async()=>await fn.post(e.fetch,`${e.url}/CreateIndex`,t,{headers:e.headers})||{})}async getIndex(t,e){var r=this;return r.handleOperation(async()=>await fn.post(r.fetch,`${r.url}/GetIndex`,{vectorBucketName:t,indexName:e},{headers:r.headers}))}async listIndexes(t){var e=this;return e.handleOperation(async()=>await fn.post(e.fetch,`${e.url}/ListIndexes`,t,{headers:e.headers}))}async deleteIndex(t,e){var r=this;return r.handleOperation(async()=>await fn.post(r.fetch,`${r.url}/DeleteIndex`,{vectorBucketName:t,indexName:e},{headers:r.headers})||{})}},VC=class extends Oa{constructor(t,e={},r){const i=t.replace(/\/$/,""),o=ye(ye({},cl),{},{"Content-Type":"application/json"},e);super(i,o,r,"vectors")}async putVectors(t){var e=this;if(t.vectors.length<1||t.vectors.length>500)throw new Error("Vector batch size must be between 1 and 500 items");return e.handleOperation(async()=>await fn.post(e.fetch,`${e.url}/PutVectors`,t,{headers:e.headers})||{})}async getVectors(t){var e=this;return e.handleOperation(async()=>await fn.post(e.fetch,`${e.url}/GetVectors`,t,{headers:e.headers}))}async listVectors(t){var e=this;if(t.segmentCount!==void 0){if(t.segmentCount<1||t.segmentCount>16)throw new Error("segmentCount must be between 1 and 16");
24if(t.segmentIndex!==void 0&&(t.segmentIndex<0||t.segmentIndex>=t.segmentCount))throw new Error(`segmentIndex must be between 0 and ${t.segmentCount-1}`)}return e.handleOperation(async()=>await fn.post(e.fetch,`${e.url}/ListVectors`,t,{headers:e.headers}))}async queryVectors(t){var e=this;return e.handleOperation(async()=>await fn.post(e.fetch,`${e.url}/QueryVectors`,t,{headers:e.headers}))}async deleteVectors(t){var e=this;if(t.keys.length<1||t.keys.length>500)throw new Error("Keys batch size must be between 1 and 500 items");return e.handleOperation(async()=>await fn.post(e.fetch,`${e.url}/DeleteVectors`,t,{headers:e.headers})||{})}},GC=class extends Oa{constructor(t,e={},r){const i=t.replace(/\/$/,""),o=ye(ye({},cl),{},{"Content-Type":"application/json"},e);super(i,o,r,"vectors")}async createBucket(t){var e=this;return e.handleOperation(async()=>await fn.post(e.fetch,`${e.url}/CreateVectorBucket`,{vectorBucketName:t},{headers:e.headers})||{})}async getBucket(t){var e=this;return e.handleOperation(async()=>await fn.post(e.fetch,`${e.url}/GetVectorBucket`,{vectorBucketName:t},{headers:e.headers}))}async listBuckets(t={}){var e=this;return e.handleOperation(async()=>await fn.post(e.fetch,`${e.url}/ListVectorBuckets`,t,{headers:e.headers}))}async deleteBucket(t){var e=this;return e.handleOperation(async()=>await fn.post(e.fetch,`${e.url}/DeleteVectorBucket`,{vectorBucketName:t},{headers:e.headers})||{})}},KC=class extends GC{constructor(t,e={}){super(t,e.headers||{},e.fetch)}from(t){return new FC(this.url,this.headers,t,this.fetch)}async createBucket(t){var e=()=>super.createBucket,r=this;return e().call(r,t)}async getBucket(t){var e=()=>super.getBucket,r=this;return e().call(r,t)}async listBuckets(t={}){var e=()=>super.listBuckets,r=this;return e().call(r,t)}async deleteBucket(t){var e=()=>super.deleteBucket,r=this;return e().call(r,t)}},FC=class extends qC{constructor(t,e,r,i){super(t,e,i),this.vectorBucketName=r}async createIndex(t){var e=()=>super.createIndex,r=this;return e().call(r,ye(ye({},t),{},{vectorBucketName:r.vectorBucketName}))}async listIndexes(t={}){var e=()=>super.listIndexes,r=this;return e().call(r,ye(ye({},t),{},{vectorBucketName:r.vectorBucketName}))}async getIndex(t){var e=()=>super.getIndex,r=this;return e().call(r,r.vectorBucketName,t)}async deleteIndex(t){var e=()=>super.deleteIndex,r=this;return e().call(r,r.vectorBucketName,t)}index(t){return new YC(this.url,this.headers,this.vectorBucketName,t,this.fetch)}},YC=class extends VC{constructor(t,e,r,i,o){super(t,e,o),this.vectorBucketName=r,this.indexName=i}async putVectors(t){var e=()=>super.putVectors,r=this;return e().call(r,ye(ye({},t),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async getVectors(t){var e=()=>super.getVectors,r=this;return e().call(r,ye(ye({},t),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async listVectors(t={}){var e=()=>super.listVectors,r=this;return e().call(r,ye(ye({},t),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async queryVectors(t){var e=()=>super.queryVectors,r=this;return e().call(r,ye(ye({},t),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async deleteVectors(t){var e=()=>super.deleteVectors,r=this;return e().call(r,ye(ye({},t),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}},ZC=class extends HC{constructor(t,e={},r,i){super(t,e,r,i)}from(t){return new BC(this.url,this.headers,t,this.fetch)}get vectors(){return new KC(this.url+"/vector",{headers:this.headers,fetch:this.fetch})}get analytics(){return new $C(this.url+"/iceberg",this.headers,this.fetch)}};const fw="2.110.0",Cr=30*1e3,Do=3,lh=Do*Cr,JC=2*Cr,QC="http://localhost:9999",XC="supabase.auth.token",WC={"X-Client-Info":`gotrue-js/${fw}`},Ph="X-Supabase-Api-Version",hw={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},ex=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,tx=600*1e3;class Wo extends Error{constructor(e,r,i){super(e),this.__isAuthError=!0,this.name="AuthError",this.status=r,this.code=i}toJSON(){return{name:this.name,message:this.message,status:this.status,code:this.code}}}function te(t){return typeof t=="object"&&t!==null&&"__isAuthError"in t}class nx extends Wo{constructor(e,r,i){super(e,r,i),this.name="AuthApiError",this.status=r,this.co
24de=i}}function rx(t){return te(t)&&t.name==="AuthApiError"}class Bn extends Wo{constructor(e,r){super(e),this.name="AuthUnknownError",this.originalError=r}}class sr extends Wo{constructor(e,r,i,o){super(e,i,o),this.name=r,this.status=i}}class wt extends sr{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function zc(t){return te(t)&&t.name==="AuthSessionMissingError"}class oa extends sr{constructor(){super("Auth session or user missing","AuthInvalidTokenResponseError",500,void 0)}}class Pc extends sr{constructor(e){super(e,"AuthInvalidCredentialsError",400,void 0)}}class Bc extends sr{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 sx(t){return te(t)&&t.name==="AuthImplicitGrantRedirectError"}class E0 extends sr{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 ix extends sr{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 Bh extends sr{constructor(e,r){super(e,"AuthRetryableFetchError",r,void 0)}}function T0(t){return te(t)&&t.name==="AuthRetryableFetchError"}class A0 extends sr{constructor(e="Refresh result discarded: session state changed mid-flight (e.g., concurrent signOut)"){super(e,"AuthRefreshDiscardedError",409,void 0)}}function ax(t){return te(t)&&t.name==="AuthRefreshDiscardedError"}class R0 extends sr{constructor(e,r,i){super(e,"AuthWeakPasswordError",r,"weak_password"),this.reasons=i}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{reasons:this.reasons})}}class iu extends sr{constructor(e){super(e,"AuthInvalidJwtError",400,"invalid_jwt")}}const au="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),O0=` 25\r=`.split(""),ox=(()=>{const t=new Array(128);for(let e=0;e<t.length;e+=1)t[e]=-1;for(let e=0;e<O0.length;e+=1)t[O0[e].charCodeAt(0)]=-2;for(let e=0;e<au.length;e+=1)t[au[e].charCodeAt(0)]=e;return t})();function k0(t,e,r){if(t!==null)for(e.queue=e.queue<<8|t,e.queuedBits+=8;e.queuedBits>=6;){const i=e.queue>>e.queuedBits-6&63;r(au[i]),e.queuedBits-=6}else if(e.queuedBits>0)for(e.queue=e.queue<<6-e.queuedBits,e.queuedBits=6;e.queuedBits>=6;){const i=e.queue>>e.queuedBits-6&63;r(au[i]),e.queuedBits-=6}}function pw(t,e,r){const i=ox[t];if(i>-1)for(e.queue=e.queue<<6|i,e.queuedBits+=6;e.queuedBits>=8;)r(e.queue>>e.queuedBits-8&255),e.queuedBits-=8;else{if(i===-2)return;throw new Error(`Invalid Base64-URL character "${String.fromCharCode(t)}"`)}}function C0(t){const e=[],r=u=>{e.push(String.fromCodePoint(u))},i={utf8seq:0,codepoint:0},o={queue:0,queuedBits:0},c=u=>{ux(u,i,r)};for(let u=0;u<t.length;u+=1)pw(t.charCodeAt(u),o,c);return e.join("")}function lx(t,e){if(t<=127){e(t);return}else if(t<=2047){e(192|t>>6),e(128|t&63);return}else if(t<=65535){e(224|t>>12),e(128|t>>6&63),e(128|t&63);return}else if(t<=1114111){e(240|t>>18),e(128|t>>12&63),e(128|t>>6&63),e(128|t&63);return}throw new Error(`Unrecognized Unicode codepoint: ${t.toString(16)}`)}function cx(t,e){for(let r=0;r<t.length;r+=1){let i=t.charCodeAt(r);if(i>55295&&i<=56319){const o=(i-55296)*1024&65535;i=(t.charCodeAt(r+1)-56320&65535|o)+65536,r+=1}lx(i,e)}}function ux(t,e,r){if(e.utf8seq===0){if(t<=127){r(t);return}for(let i=1;i<6;i+=1)if((t>>7-i&1)===0){e.utf8seq=i;break}if(e.utf8seq===2)e.codepoint=t&31;else if(e.utf8seq===3)e.codepoint=t&15;else if(e.utf8seq===4)e.codepoint=t&7;else throw new Error("Invalid UTF-8 sequence");e.utf8seq-=1}else if(e.utf8seq>0){if(t<=127)throw new Error("Invalid UTF-8 sequence");e.codepoint=e.codepoint<<6|t&63,e.utf8seq-=1,e.utf8seq===0&&r(e.codepoint)}}function wa(t){const e=[],r={queue:0,queuedBits:0},i=o=>{e.push(o)};for(let o=0;o<t.length;o+=1)pw(t.charCodeAt(o),r,i);return new Uint8Array(e)}function dx(t){const e=[];return cx(t,r=>e.push(r)),new Uint8Array(e)}function ai(t){const e=[],r={queue:0,queuedBits:0},i=o=>{e.push(o)};return t.forEach(o=>k0(o,r,i)),k0(null,r,i),e.join("")}function fx(t){return Math.round(Date.now()/1e3)+t}function hx(){return Symbol("auth-callback")}const Mt=()=>typeof window<"u"&&typeof document<"u",ei={tested:!1,writable:!1},mw=()=>
25{if(!Mt())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(ei.tested)return ei.writable;const t=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(t,t),globalThis.localStorage.removeItem(t),ei.tested=!0,ei.writable=!0}catch{ei.tested=!0,ei.writable=!1}return ei.writable};function px(t){const e={},r=new URL(t);if(r.hash&&r.hash[0]==="#")try{new URLSearchParams(r.hash.substring(1)).forEach((o,c)=>{e[c]=o})}catch{}return r.searchParams.forEach((i,o)=>{e[o]=i}),e}const gw=t=>t?(...e)=>t(...e):(...e)=>fetch(...e),mx=t=>typeof t=="object"&&t!==null&&"status"in t&&"ok"in t&&"json"in t&&typeof t.json=="function",da=async(t,e,r)=>{await t.setItem(e,JSON.stringify(r))},Dn=async(t,e)=>{const r=await t.getItem(e);if(!r)return null;try{return JSON.parse(r)}catch{return null}},ot=async(t,e)=>{await t.removeItem(e)};class ku{constructor(){this.promise=new ku.promiseConstructor((e,r)=>{this.resolve=e,this.reject=r})}}ku.promiseConstructor=Promise;function Ic(t){const e=t.split(".");if(e.length!==3)throw new iu("Invalid JWT structure");for(let i=0;i<e.length;i++)if(!ex.test(e[i]))throw new iu("JWT not in base64url format");return{header:JSON.parse(C0(e[0])),payload:JSON.parse(C0(e[1])),signature:wa(e[2]),raw:{header:e[0],payload:e[1]}}}async function gx(t){return await new Promise(e=>{setTimeout(()=>e(null),t)})}function yx(t,e){return new Promise((i,o)=>{(async()=>{for(let c=0;c<1/0;c++)try{const u=await t(c);if(!e(c,null,u)){i(u);return}}catch(u){if(!e(c,u)){o(u);return}}})()})}function vx(t){return("0"+t.toString(16)).substr(-2)}function bx(){const e=new Uint32Array(56);if(typeof crypto>"u"){const r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",i=r.length;let o="";for(let c=0;c<56;c++)o+=r.charAt(Math.floor(Math.random()*i));return o}return crypto.getRandomValues(e),Array.from(e,vx).join("")}async function _x(t){const r=new TextEncoder().encode(t),i=await crypto.subtle.digest("SHA-256",r),o=new Uint8Array(i);return Array.from(o).map(c=>String.fromCharCode(c)).join("")}async function wx(t){if(!(typeof crypto<"u"&&typeof crypto.subtle<"u"&&typeof TextEncoder<"u"))return console.warn("WebCrypto API is not supported. Code challenge method will default to use plain instead of sha256."),t;const r=await _x(t);return btoa(r).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function ti(t,e,r=!1){const i=bx();let o=i;r&&(o+="/recovery"),await da(t,`${e}-code-verifier`,o);const c=await wx(i);return[c,i===c?"plain":"s256"]}const Sx=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function Ex(t){const e=t.headers.get(Ph);if(!e||!e.match(Sx))return null;try{return new Date(`${e}T00:00:00.0Z`)}catch{return null}}function Tx(t){if(!t)throw new Error("Missing exp claim");const e=Math.floor(Date.now()/1e3);if(t<=e)throw new Error("JWT has expired")}function Ax(t){switch(t){case"RS256":return{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}};case"ES256":return{name:"ECDSA",namedCurve:"P-256",hash:{name:"SHA-256"}};default:throw new Error("Invalid alg claim")}}const Rx=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function Tr(t){if(!Rx.test(t))throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not")}function Mn(t){if(!t.passkey)throw new Error("@supabase/auth-js: the passkey API is experimental and disabled by default. Enable it by passing `auth: { experimental: { passkey: true } }` to createClient (or to the GoTrueClient constructor).")}function ch(){const t={};return new Proxy(t,{get:(e,r)=>{if(r==="__isUserNotAvailableProxy")return!0;if(typeof r=="symbol"){const i=r.toString();if(i==="Symbol(Symbol.toPrimitive)"||i==="Symbol(Symbol.toStringTag)"||i==="Symbol(util.inspect.custom)")return}throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Accessing the "${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 Ox(t,e){return new Proxy(t,{get:(r,i,o)=>
25{if(i==="__isInsecureUserWarningProxy")return!0;if(typeof i=="symbol"){const c=i.toString();if(c==="Symbol(Symbol.toPrimitive)"||c==="Symbol(Symbol.toStringTag)"||c==="Symbol(util.inspect.custom)"||c==="Symbol(nodejs.util.inspect.custom)")return Reflect.get(r,i,o)}return!e.value&&typeof i=="string"&&(console.warn("Using the user object as returned from supabase.auth.getSession() or from some supabase.auth.onAuthStateChange() events could be insecure! This value comes directly from the storage medium (usually cookies on the server) and may not be authentic. Use supabase.auth.getUser() instead which authenticates the data by contacting the Supabase Auth server."),e.value=!0),Reflect.get(r,i,o)}})}function x0(t){return JSON.parse(JSON.stringify(t))}const ni=t=>{if(typeof t=="object"&&t!==null){const e=t;if(typeof e.msg=="string")return e.msg;if(typeof e.message=="string")return e.message;if(typeof e.error_description=="string")return e.error_description;if(typeof e.error=="string")return e.error}return JSON.stringify(t)},kx=[500,501,502,503,504,520,521,522,523,524,525,526,527,528,529,530];async function N0(t){var e;if(!mx(t))throw new Bh(ni(t),0);if(kx.includes(t.status))throw new Bh(ni(t),t.status);let r;try{r=await t.json()}catch(c){throw new Bn(ni(c),c)}let i;const o=Ex(t);if(o&&o.getTime()>=hw["2024-01-01"].timestamp&&typeof r=="object"&&r&&typeof r.code=="string"?i=r.code:typeof r=="object"&&r&&typeof r.error_code=="string"&&(i=r.error_code),i){if(i==="weak_password")throw new R0(ni(r),t.status,((e=r.weak_password)===null||e===void 0?void 0:e.reasons)||[]);if(i==="session_not_found")throw new wt}else if(typeof r=="object"&&r&&typeof r.weak_password=="object"&&r.weak_password&&Array.isArray(r.weak_password.reasons)&&r.weak_password.reasons.length&&r.weak_password.reasons.reduce((c,u)=>c&&typeof u=="string",!0))throw new R0(ni(r),t.status,r.weak_password.reasons);throw new nx(ni(r),t.status||500,i)}const Cx=(t,e,r,i)=>{const o={method:t,headers:e?.headers||{}};return t==="GET"?o:(o.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},e?.headers),o.body=JSON.stringify(i),Object.assign(Object.assign({},o),r))};async function ae(t,e,r,i){var o;const c=Object.assign({},i?.headers);c[Ph]||(c[Ph]=hw["2024-01-01"].name),i?.jwt&&(c.Authorization=`Bearer ${i.jwt}`);const u=(o=i?.query)!==null&&o!==void 0?o:{};i?.redirectTo&&(u.redirect_to=i.redirectTo);const f=Object.keys(u).length?"?"+new URLSearchParams(u).toString():"",h=await xx(t,e,r+f,{headers:c,noResolveJson:i?.noResolveJson},{},i?.body);return i?.xform?i?.xform(h):{data:Object.assign({},h),error:null}}async function xx(t,e,r,i,o,c){const u=Cx(e,i,o,c);let f;try{f=await t(r,Object.assign({},u))}catch(h){throw console.error(h),new Bh(ni(h),0)}if(f.ok||await N0(f),i?.noResolveJson)return f;try{return await f.json()}catch(h){await N0(h)}}function An(t){var e;let r=null;Dx(t)&&(r=Object.assign({},t),t.expires_at||(r.expires_at=fx(t.expires_in)));const i=(e=t.user)!==null&&e!==void 0?e:typeof t?.id=="string"?t:null;return{data:{session:r,user:i},error:null}}function j0(t){const e=An(t);return!e.error&&t.weak_password&&typeof t.weak_password=="object"&&Array.isArray(t.weak_password.reasons)&&t.weak_password.reasons.length&&t.weak_password.message&&typeof t.weak_password.message=="string"&&t.weak_password.reasons.reduce((r,i)=>r&&typeof i=="string",!0)&&(e.data.weak_password=t.weak_password),e}function ms(t){var e;return{data:{user:(e=t.user)!==null&&e!==void 0?e:t},error:null}}function Nx(t){return{data:t,error:null}}function jx(t){const{action_link:e,email_otp:r,hashed_token:i,redirect_to:o,verification_type:c}=t,u=Au(t,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),f={action_link:e,email_otp:r,hashed_token:i,redirect_to:o,verification_type:c},h=Object.assign({},u);return{data:{properties:f,user:h},error:null}}function D0(t){return t}function Dx(t){return!!t.access_token&&!!t.refresh_token&&!!t.expires_in}const uh=["global","local","others"];class Lx{constructor({url:e="",headers:r={},fetch:i,experimental:o}){this.url=e,this.headers=r,this.fetch=gw(i),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=uh[0]){if(uh.indexOf(r)<0)throw new Error(`@supabase/auth-js: Parameter scope must be one of ${uh.join(", ")}`);try{return await ae(this.fetch,"POST",`${this.url}/logout?scope=${r}`,{headers:this.headers,jwt:e,noResolveJson:!0}),{data:null,error:null}}catch(i){if(te(i))return{data:null,error:i};throw i}}async inviteUserByEmail(e,r={}){try{return await ae(this.fetch,"POST",`${this.url}/invite`,{body:{email:e,data:r.data},headers:this.headers,redirectTo:r.redirectTo,xform:ms})}catch(i){if(te(i))return{data:{user:null},error:i};throw i}}async generateLink(e){try{const{options:r}=e,i=Au(e,["options"]),o=Object.assign(Object.assign({},i),r);return"newEmail"in i&&(o.new_email=i?.newEmail,delete o.newEmail),await ae(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:o,headers:this.headers,xform:jx,redirectTo:r?.redirectTo})}catch(r){if(te(r))return{data:{properties:null,user:null},error:r};throw r}}async createUser(e){try{return await ae(this.fetch,"POST",`${this.url}/admin/users`,{body:e,headers:this.headers,xform:ms})}catch(r){if(te(r))return{data:{user:null},error:r};throw r}}async listUsers(e){var r,i,o,c,u,f,h;try{const m={nextPage:null,lastPage:0,total:0},y=await ae(this.fetch,"GET",`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:(i=(r=e?.page)===null||r===void 0?void 0:r.toString())!==null&&i!==void 0?i:"",per_page:(c=(o=e?.perPage)===null||o===void 0?void 0:o.toString())!==null&&c!==void 0?c:""},xform:D0});if(y.error)throw y.error;const g=await y.json(),b=(u=y.headers.get("x-total-count"))!==null&&u!==void 0?u:0,_=(h=(f=y.headers.get("link"))===null||f===void 0?void 0:f.split(","))!==null&&h!==void 0?h:[];return _.length>0&&(_.forEach(S=>{const E=parseInt(S.split(";")[0].split("=")[1].substring(0,1)),A=JSON.parse(S.split(";")[1].split("=")[1]);m[`${A}Page`]=E}),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){Tr(e);try{return await ae(this.fetch,"GET",`${this.url}/admin/users/${e}`,{headers:this.headers,xform:ms})}catch(r){if(te(r))return{data:{user:null},error:r};throw r}}async updateUserById(e,r){Tr(e);try{return await ae(this.fetch,"PUT",`${this.url}/admin/users/${e}`,{body:r,headers:this.headers,xform:ms})}catch(i){if(te(i))return{data:{user:null},error:i};throw i}}async deleteUser(e,r=!1){Tr(e);
25try{return await ae(this.fetch,"DELETE",`${this.url}/admin/users/${e}`,{headers:this.headers,body:{should_soft_delete:r},xform:ms})}catch(i){if(te(i))return{data:{user:null},error:i};throw i}}async _listFactors(e){Tr(e.userId);try{const{data:r,error:i}=await ae(this.fetch,"GET",`${this.url}/admin/users/${e.userId}/factors`,{headers:this.headers,xform:o=>({data:{factors:o},error:null})});return{data:r,error:i}}catch(r){if(te(r))return{data:null,error:r};throw r}}async _deleteFactor(e){Tr(e.userId),Tr(e.id);try{return{data:await ae(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,i,o,c,u,f,h;try{const m={nextPage:null,lastPage:0,total:0},y=await ae(this.fetch,"GET",`${this.url}/admin/oauth/clients`,{headers:this.headers,noResolveJson:!0,query:{page:(i=(r=e?.page)===null||r===void 0?void 0:r.toString())!==null&&i!==void 0?i:"",per_page:(c=(o=e?.perPage)===null||o===void 0?void 0:o.toString())!==null&&c!==void 0?c:""},xform:D0});if(y.error)throw y.error;const g=await y.json(),b=(u=y.headers.get("x-total-count"))!==null&&u!==void 0?u:0,_=(h=(f=y.headers.get("link"))===null||f===void 0?void 0:f.split(","))!==null&&h!==void 0?h:[];return _.length>0&&(_.forEach(S=>{const E=parseInt(S.split(";")[0].split("=")[1].substring(0,1)),A=JSON.parse(S.split(";")[1].split("=")[1]);m[`${A}Page`]=E}),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 ae(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 ae(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 ae(this.fetch,"PUT",`${this.url}/admin/oauth/clients/${e}`,{body:r,headers:this.headers,xform:i=>({data:i,error:null})})}catch(i){if(te(i))return{data:null,error:i};throw i}}async _deleteOAuthClient(e){try{return await ae(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 ae(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 ae(this.fetch,"GET",`${this.url}/admin/custom-providers`,{headers:this.headers,query:r,xform:i=>{var o;return{data:{providers:(o=i?.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 ae(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 ae(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 ae(this.fetch,"PUT",`${this.url}/admin/custom-providers/${e}`,{body:r,headers:this.headers,xform:i=>({data:i,error:null})})}catch(i){if(te(i))return{data:null,error:i};throw i}}async _deleteCustomProvider(e){try{return await ae(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){Mn(this.experimental),Tr(e.userId);try{return await ae(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){Mn(this.experimental),Tr(e.userId),Tr(e.passkeyId);
25try{return await ae(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 L0(t={}){return{getItem:e=>t[e]||null,setItem:(e,r)=>{t[e]=r},removeItem:e=>{delete t[e]}}}globalThis&&mw()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug");class Mx extends Error{constructor(e){super(e),this.isAcquireTimeout=!0}}function Ux(){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 yw(t){if(!/^0x[a-fA-F0-9]{40}$/.test(t))throw new Error(`@supabase/auth-js: Address "${t}" is invalid.`);return t.toLowerCase()}function zx(t){return parseInt(t,16)}function Px(t){const e=new TextEncoder().encode(t);return"0x"+Array.from(e,i=>i.toString(16).padStart(2,"0")).join("")}function Bx(t){var e;const{chainId:r,domain:i,expirationTime:o,issuedAt:c=new Date,nonce:u,notBefore:f,requestId:h,resources:m,scheme:y,uri:g,version:b}=t;{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(!i)throw new Error('@supabase/auth-js: Invalid SIWE message field "domain". Domain must be provided.');if(u&&u.length<8)throw new Error(`@supabase/auth-js: Invalid SIWE message field "nonce". Nonce must be at least 8 characters. Provided value: ${u}`);if(!g)throw new Error('@supabase/auth-js: Invalid SIWE message field "uri". URI must be provided.');if(b!=="1")throw new Error(`@supabase/auth-js: Invalid SIWE message field "version". Version must be '1'. Provided value: ${b}`);if(!((e=t.statement)===null||e===void 0)&&e.includes(` 26`))throw new Error(`@supabase/auth-js: Invalid SIWE message field "statement". Statement must not include '\\n'. Provided value: ${t.statement}`)}const _=yw(t.address),S=y?`${y}://${i}`:i,E=t.statement?`${t.statement} 27`:"",A=`${S} wants you to sign in with your Ethereum account: 28${_} 29 30${E}`;let T=`URI: ${g} 31Version: ${b} 32Chain ID: ${r}${u?` 33Nonce: ${u}`:""} 34Issued At: ${c.toISOString()}`;if(o&&(T+=` 35Expiration Time: ${o.toISOString()}`),f&&(T+=` 36Not Before: ${f.toISOString()}`),h&&(T+=` 37Request ID: ${h}`),m){let C=` 38Resources:`;for(const x of m){if(!x||typeof x!="string")throw new Error(`@supabase/auth-js: Invalid SIWE message field "resources". Every resource must be a valid string. Provided value: ${x}`);C+=` 39- ${x}`}T+=C}return`${A} 40${T}`}class ft extends Error{constructor({message:e,code:r,cause:i,name:o}){var c;super(e,{cause:i}),this.__isWebAuthnError=!0,this.name=(c=o??(i instanceof Error?i.name:void 0))!==null&&c!==void 0?c:"Unknown Error",this.code=r}toJSON(){return{name:this.name,message:this.message,code:this.code}}}class ou extends ft{constructor(e,r){super({code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:r,message:e}),this.name="WebAuthnUnknownError",this.originalError=r}}function Ix({error:t,options:e}){var r,i,o;const{publicKey:c}=e;if(!c)throw Error("options was missing required publicKey property");if(t.name==="AbortError"){if(e.signal instanceof AbortSignal)return new ft({message:"Registration ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:t})}else if(t.name==="ConstraintError"){if(((r=c.authenticatorSelection)===null||r===void 0?void 0:r.requireResidentKey)===!0)return new ft({message:"Discoverable credentials were required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT",cause:t});if(e.mediation==="conditional"&&((i=c.authenticatorSelection)===null||i===void 0?void 0:i.userVerification)==="required")return new ft({message:"User verification was required during automatic registration but it could not be performed",code:"ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE",cause:t});if(((o=c.authenticatorSelection)===null||o===void 0?void 0:o.userVerification)==="required")return new ft({message:"User verification was required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT",cause:t})}else{if(t.name==="InvalidStateError")return new ft({message:"The authenticator was previously registered",code:"ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",cause:t});if(t.name==="NotAllowedError")return new ft({message:t.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t});if(t.name==="NotSupportedError")return c.pubKeyCredParams.filter(f=>f.type==="public-key").length===0?new ft({message:'No entry in pubKeyCredParams was of type "public-key"',code:"ERROR_MALFORMED_PUBKEYCREDPARAMS",cause:t}):new ft({message:"No available authenticator supported any of the specified pubKeyCredParams algorithms",code:"ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG",cause:t});if(t.name==="SecurityError"){const u=window.location.hostname;if(vw(u)){if(c.rp.id!==u)return new ft({message:`The RP ID "${c.rp.id}
40" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:t})}else return new ft({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:t})}else if(t.name==="TypeError"){if(c.user.id.byteLength<1||c.user.id.byteLength>64)return new ft({message:"User ID was not between 1 and 64 characters",code:"ERROR_INVALID_USER_ID_LENGTH",cause:t})}else if(t.name==="UnknownError")return new ft({message:"The authenticator was unable to process the specified options, or could not create a new credential",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:t})}return new ft({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t})}function Hx({error:t,options:e}){const{publicKey:r}=e;if(!r)throw Error("options was missing required publicKey property");if(t.name==="AbortError"){if(e.signal instanceof AbortSignal)return new ft({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:t})}else{if(t.name==="NotAllowedError")return new ft({message:t.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t});if(t.name==="SecurityError"){const i=window.location.hostname;if(vw(i)){if(r.rpId!==i)return new ft({message:`The RP ID "${r.rpId}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:t})}else return new ft({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:t})}else if(t.name==="UnknownError")return new ft({message:"The authenticator was unable to process the specified options, or could not create a new assertion signature",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:t})}return new ft({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t})}class $x{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 Ih=new $x;function M0(t){if(!t)throw new Error("Credential creation options are required");if(typeof PublicKeyCredential<"u"&&"parseCreationOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseCreationOptionsFromJSON=="function")return PublicKeyCredential.parseCreationOptionsFromJSON(t);const{challenge:e,user:r,excludeCredentials:i}=t,o=Au(t,["challenge","user","excludeCredentials"]),c=wa(e).buffer,u=Object.assign(Object.assign({},r),{id:wa(r.id).buffer}),f=Object.assign(Object.assign({},o),{challenge:c,user:u});if(i&&i.length>0){f.excludeCredentials=new Array(i.length);for(let h=0;h<i.length;h++){const m=i[h];f.excludeCredentials[h]=Object.assign(Object.assign({},m),{id:wa(m.id).buffer,type:m.type||"public-key",transports:m.transports})}}return f}function U0(t){if(!t)throw new Error("Credential request options are required");if(typeof PublicKeyCredential<"u"&&"parseRequestOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseRequestOptionsFromJSON=="function")return PublicKeyCredential.parseRequestOptionsFromJSON(t);const{challenge:e,allowCredentials:r}=t,i=Au(t,["challenge","allowCredentials"]),o=wa(e).buffer,c=Object.assign(Object.assign({},i),{challenge:o});if(r&&r.length>0){c.allowCredentials=new Array(r.length);for(let u=0;u<r.length;u++){const f=r[u];c.allowCredentials[u]=Object.assign(Object.assign({},f),{id:wa(f.id).buffer,type:f.type||"public-key",transports:f.transports})}}return c}function z0(t){var e;if("toJSON"in t&&typeof t.toJSON=="function")return t.toJSON();const r=t;return{id:t.id,rawId:t.id,response:{attestationObject:ai(new Uint8Array(t.response.attestationObject)),clientDataJSON:ai(new Uint8Array(t.response.clientDataJSON))},type:"public-key",clientExtensionResults:t.getClientExtensionResults(),authenticatorAttachment:(e=r.authenticatorAttachment)!==null&&e!==void 0?e:void 0}}function P0(t){var e;if("toJSON"in t&&typeof t.toJSON=="function")return t.toJSON();const r=t,i=t.getClientExtensionResults(),o=t.response;return{id:t.id,rawId:t.id,response:{authenticatorData:ai(new Uint8Array(o.authenticatorData)),clientDataJSON:ai(new Uint8Array(o.clientDataJSON)),signature:ai(new Uint8Array(o.signature)),userHandle:o.userHandle?ai(new Uint8Array(o.userHandle)):void 0},type:"public-key",clientExtensionResults:i,authenticatorAttachment:(e=r.authenticatorAttachment)!==null&&e!==void 0?e:void 0}}function vw(t){return t==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(t)}function lu(){var t,e;return!!(Mt()&&"PublicKeyCredential"in window&&window.PublicKeyCredential&&"credentials"in navigator&&typeof((t=navigator?.credentials)===null||t===void 0?void 0:t.create)=="function"&&typeof((e=navigator?.credentials)===null||e===void 0?void 0:e.get)=="function")}async function bw(t){try{const e=await navigator.credentials.create(t);return e?e instanceof PublicKeyCredential?{data:e,error:null}:{data:null,error:new ou("Browser returned unexpected credential type",e)}:{data:null,error:new ou("Empty credential response",e)}}catch(e){return{data:null,error:Ix({error:e,options:t})}}}async function _w(t){try{const e=await navigator.credentials.get(t);return e?e instanceof PublicKeyCredential?{data:e,error:null}:{data:null,error:new ou("Browser returned unexpected credential type",e)}:{data:null,error:new ou("Empty credential response",e)}}catch(e){return{data:null,error:Hx({error:e,options:t})}}}const qx={hints:["security-key"],authenticatorSelection:{authenticatorAttachment:"cross-platform",requireResidentKey:!1,userVerification:"preferred",residentKey:"discouraged"},attestation:"direct"},Vx={userVerification:"preferred",hints:["security-key"],attestation:"direct"};function cu(...t){const e=o=>o!==null&&typeof o=="object"&&!Array.isArray(o),r=o=>o instanceof ArrayBuffer||ArrayBuffer.isView(o),i={};
40for(const o of t)if(o)for(const c in o){const u=o[c];if(u!==void 0)if(Array.isArray(u))i[c]=u;else if(r(u))i[c]=u;else if(e(u)){const f=i[c];e(f)?i[c]=cu(f,u):i[c]=cu(u)}else i[c]=u}return i}function Gx(t,e){return cu(qx,t,e||{})}function Kx(t,e){return cu(Vx,t,e||{})}class Fx{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:i,signal:o},c){var u;try{const{data:f,error:h}=await this.client.mfa.challenge({factorId:e,webauthn:r});if(!f)return{data:null,error:h};const m=o??Ih.createNewAbortSignal();if(f.webauthn.type==="create"){const{user:y}=f.webauthn.credential_options.publicKey;if(!y.name){const g=i;if(g)y.name=`${y.id}:${g}`;else{const _=(await this.client.getUser()).data.user,S=((u=_?.user_metadata)===null||u===void 0?void 0:u.name)||_?.email||_?.id||"User";y.name=`${y.id}:${S}`}}y.displayName||(y.displayName=y.name)}switch(f.webauthn.type){case"create":{const y=Gx(f.webauthn.credential_options.publicKey,c?.create),{data:g,error:b}=await bw({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=Kx(f.webauthn.credential_options.publicKey,c?.request),{data:g,error:b}=await _w(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 Bn("Unexpected error in challenge",f)}}}async _verify({challengeId:e,factorId:r,webauthn:i}){return this.client.mfa.verify({factorId:r,challengeId:e,webauthn:i})}async _authenticate({factorId:e,webauthn:{rpId:r=typeof window<"u"?window.location.hostname:void 0,rpOrigins:i=typeof window<"u"?[window.location.origin]:void 0,signal:o}={}},c){if(!r)return{data:null,error:new Wo("rpId is required for WebAuthn authentication")};try{if(!lu())return{data:null,error:new Bn("Browser does not support WebAuthn",null)};const{data:u,error:f}=await this.challenge({factorId:e,webauthn:{rpId:r,rpOrigins:i},signal:o},{request:c});if(!u)return{data:null,error:f};const{webauthn:h}=u;return this._verify({factorId:e,challengeId:u.challengeId,webauthn:{type:h.type,rpId:r,rpOrigins:i,credential_response:h.credential_response}})}catch(u){return te(u)?{data:null,error:u}:{data:null,error:new Bn("Unexpected error in authenticate",u)}}}async _register({friendlyName:e,webauthn:{rpId:r=typeof window<"u"?window.location.hostname:void 0,rpOrigins:i=typeof window<"u"?[window.location.origin]:void 0,signal:o}={}},c){if(!r)return{data:null,error:new Wo("rpId is required for WebAuthn registration")};try{if(!lu())return{data:null,error:new Bn("Browser does not support WebAuthn",null)};const{data:u,error:f}=await this._enroll({friendlyName:e});if(!u)return await this.client.mfa.listFactors().then(y=>{var g;return(g=y.data)===null||g===void 0?void 0:g.all.find(b=>b.factor_type==="webauthn"&&b.friendly_name===e&&b.status!=="unverified")}).then(y=>y?this.client.mfa.unenroll({factorId:y?.id}):void 0),{data:null,error:f};const{data:h,error:m}=await this._challenge({factorId:u.id,friendlyName:u.friendly_name,webauthn:{rpId:r,rpOrigins:i},signal:o},{create:c});return h?this._verify({factorId:u.id,challengeId:h.challengeId,webauthn:{rpId:r,rpOrigins:i,type:h.webauthn.type,credential_response:h.webauthn.credential_response}}):{data:null,error:m}}catch(u){return te(u)?{data:null,error:u}:{data:null,error:new Bn("Unexpected error in register",u)}}}}Ux();const Yx={url:QC,storageKey:XC,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:WC,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1,throwOnError:!1,lockAcquireTimeout:5e3,skipAutoInitialize:!1,experimental:{}},la={};class el{get jwks(){var e,r;return(r=(e=la[this.storageKey])===null||e===void 0?void 0:e.jwks)!==null&&r!==void 0?r:{keys:[]}}set jwks(e){la[this.storageKey]=Object.assign(Object.assign({},la[this.storageKey]),{jwks:e})}get jwks_cached_at(){var e,r;return(r=(e=la[this.storageKey])===null||e===void 0?void 0:e.cachedAt)!==null&&r!==void 0?r:Number.MIN_SAFE_INTEGER}set jwks_cached_at(e){la[this.storageKey]=Object.assign(Object.assign({},la[this.storageKey]),{cachedAt:e})}constructor(e){var r,i,o;this.userStorage=null,this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=null,this.autoRefreshTickTimeout=null,this.visibilityChangedCallback=null,this.refreshingDeferred=null,this.lastRefreshFailure=null,this._sessionRemovalEpoch=0,this.initializePromise=null,this.detectSessionInUrl=!0,this.hasCustomAuthorizationHeader=!1,this.suppressGetSessionWarning=!1,this.lock=null,this.lockAcquired=!1,this.pendingInLock=[],this.broadcastChannel=null,this.logger=console.log;const c=Object.assign(Object.assign({},Yx),e);if(this.storageKey=c.storageKey,this.instanceID=(r=el.nextInstanceID[this.storageKey])!==null&&r!==void 0?r:0,el.nextInstanceID[this.storageKey]=this.instanceID+1,this.logDebugMessages=!!c.debug,typeof c.debug=="function"&&(this.logger=c.debug),this.instanceID>0&&Mt()){const u=`${this._logPrefix()} Multiple GoTrueClient instances detected in the same browser context. It is not an error, but this should be avoided as it may produce undefined behavior when used concurrently under the same storage key.`;console.warn(u),this.logDebugMessages&&console.trace(u)}if(this.persistSession=c.persistSession,this.autoRefreshToken=c.autoRefreshToken,this.experimental=(i=c.experimental)!==null&&i!==void 0?i:{},this.admin=new Lx({url:c.url,headers:c.headers,fetch:c.fetch,experimental:this.experimental}),this.url=c.url,this.headers=c.headers,this.fetch=gw(c.fetch),this.detectSessionInUrl=c.detectSessionInUrl,this.flowType=c.flowType,this.hasCustomAuthorizationHeader=c.hasCustomAuthorizationHeader,this.throwOnError=c.throwOnError,this.lockAcquireTimeout=c.lockAcquireTimeout,c.lock!=null&&(this.lock=c.lock),this.jwks||(this.jwks={keys:[]},this.jwks_cached_at=Number.MIN_SAFE_INTEGER),this.mfa={verify:this._verify.bind(this),enroll:this._enroll.bind(this),unenroll:this._unenroll.bind(this),challenge:this._challenge.bind(this),listFactors:this._listFactors.bind(this),challengeAndVerify:this._challengeAndVerify.bind(this),getAuthenticatorAssuranceLevel:this._getAuthenticatorAssuranceLevel.bind(this),webauthn:new Fx(this)}
40,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:mw()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=L0(this.memoryStorage)),c.userStorage&&(this.userStorage=c.userStorage)):(this.memoryStorage={},this.storage=L0(this.memoryStorage)),Mt()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(u){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",u)}(o=this.broadcastChannel)===null||o===void 0||o.addEventListener("message",async u=>{this._debug("received broadcast notification from other tab or client",u),(u.data.event==="TOKEN_REFRESHED"||u.data.event==="SIGNED_IN")&&(this.lastRefreshFailure=null);try{await this._notifyAllSubscribers(u.data.event,u.data.session,!1)}catch(f){this._debug("#broadcastChannel","error",f)}})}c.skipAutoInitialize||this.initialize().catch(u=>{this._debug("#initialize()","error",u)})}isThrowOnErrorEnabled(){return this.throwOnError}_returnResult(e){if(this.throwOnError&&e&&e.error)throw e.error;return e}_logPrefix(){return`GoTrueClient@${this.storageKey}:${this.instanceID} (${fw}) ${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()=>this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._initialize()):await this._initialize())(),await this.initializePromise)}async _initialize(){var e;try{let r={},i="none";if(Mt()&&(r=px(window.location.href),this._isImplicitGrantCallback(r)?i="implicit":await this._isPKCECallback(r)&&(i="pkce")),Mt()&&this.detectSessionInUrl&&i!=="none"){const{data:o,error:c}=await this._getSessionFromURL(r,i);if(c){if(this._debug("#_initialize()","error detecting session from URL",c),sx(c)){const h=(e=c.details)===null||e===void 0?void 0:e.code;if(h==="identity_already_exists"||h==="identity_not_found"||h==="single_identity_not_deletable")return{error:c}}return{error:c}}const{session:u,redirectType:f}=o;return this._debug("#_initialize()","detected session in URL",u,"redirect type",f),await this._saveSession(u),setTimeout(async()=>{f==="recovery"?await this._notifyAllSubscribers("PASSWORD_RECOVERY",u):await this._notifyAllSubscribers("SIGNED_IN",u)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(r){return te(r)?this._returnResult({error:r}):this._returnResult({error:new Bn("Unexpected error during initialization",r)})}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(e){var r,i,o;try{const c=await ae(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:(i=(r=e?.options)===null||r===void 0?void 0:r.data)!==null&&i!==void 0?i:{},gotrue_meta_security:{captcha_token:(o=e?.options)===null||o===void 0?void 0:o.captchaToken}},xform:An}),{data:u,error:f}=c;if(f||!u)return this._returnResult({data:{user:null,session:null},error:f});const h=u.session,m=u.user;return u.session&&(await this._saveSession(u.session),await this._notifyAllSubscribers("SIGNED_IN",h)),this._returnResult({data:{user:m,session:h},error:null})}catch(c){if(te(c))return this._returnResult({data:{user:null,session:null},error:c});throw c}}async signUp(e){var r,i,o;try{let c;if("email"in e){const{email:y,password:g,options:b}=e;let _=null,S=null;this.flowType==="pkce"&&([_,S]=await ti(this.storage,this.storageKey)),c=await ae(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:An})}else if("phone"in e){const{phone:y,password:g,options:b}=e;c=await ae(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:y,password:g,data:(i=b?.data)!==null&&i!==void 0?i:{},channel:(o=b?.channel)!==null&&o!==void 0?o:"sms",gotrue_meta_security:{captcha_token:b?.captchaToken}},xform:An})}else throw new Pc("You must provide either an email or phone number and a password");const{data:u,error:f}=c;if(f||!u)return await ot(this.storage,`${this.storageKey}-code-verifier`),this._returnResult({data:{user:null,session:null},error:f});const h=u.session,m=u.user;return u.session&&(await this._saveSession(u.session),await this._notifyAllSubscribers("SIGNED_IN",h)),this._returnResult({data:{user:m,session:h},error:null})}catch(c){if(await ot(this.storage,`${this.storageKey}-code-verifier`),te(c))return this._returnResult({data:{user:null,session:null},error:c});throw c}}async signInWithPassword(e){try{let r;if("email"in e){const{email:c,password:u,options:f}=e;r=await ae(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:c,password:u,gotrue_meta_security:{captcha_token:f?.captchaToken}},xform:j0})}else if("phone"in e){const{phone:c,password:u,options:f}=e;r=await ae(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:c,password:u,gotrue_meta_security:{captcha_token:f?.captchaToken}},xform:j0})}else throw new Pc("You must provide either an email or phone number and a password");const{data:i,error:o}=r;if(o)return this._returnResult({data:{user:null,session:null},error:o});if(!i||!i.session||!i.user){const c=new oa;return this._returnResult({data:{user:null,session:null},error:c})}return i.session&&(await this._saveSession(i.session),await this._notifyAllSubscribers("SIGNED_IN",i.session)),this._returnResult({data:Object.assign({user:i.user,session:i.session},i.weak_password?{weakPassword:i.weak_password}:null),error:o})}catch(r){if(te(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async signInWithOAuth(e){var r,i,o,c;return await this._handleProviderSignIn(e.provider,{redirectTo:(r=e.options)===null||r===void 0?void 0:r.redirectTo,scopes:(i=e.options)===null||i===void 0?void 0:i.scopes,queryParams:(o=e.options)===null||o===void 0?void 0:o.queryParams,skipBrowserRedirect:(c=e.options)===null||c===void 0?void 0:c.skipBrowserRedirect})}async exchangeCodeForSession(e){return await this.initializePromise,this.lock!=null?this._acquireLock(this.lockAcquireTimeout,async()=>this._exchangeCodeForSession(e)):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,i,o,c,u,f,h,m,y,g,b;let _,S;if("message"in e)_=e.message,S=e.signature;else{const{chain:E,wallet:A,statement:T,options:C}=e;let x;if(Mt())if(typeof A=="object")x=A;else{const ne=window;if("ethereum"in ne&&typeof ne.ethereum=="object"&&"request"in ne.ethereum&&typeof ne.ethereum.request=="function")x=ne.ethereum;else throw new Error("@supabase/auth-js: No compatible Ethereum wallet interface on the window object (window.ethereum) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'ethereum', wallet: resolvedUserWallet }) instead.")}else{if(typeof A!="object"||!C?.url)throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");x=A}const B=new URL((r=C?.url)!==null&&r!==void 0?r:window.location.href),Z=await x.request({method:"eth_requestAccounts"}).then(ne=>ne).catch(()=>{throw new Error("@supabase/auth-js: Wallet method eth_requestAccounts is missing or invalid")});if(!Z||Z.length===0)throw new Error("@supabase/auth-js: No accounts available. Please ensure the wallet is connected.");const z=yw(Z[0]);let D=(i=C?.signInWithEthereum)===null||i===void 0?void 0:i.chainId;if(!D){const ne=await x.request({method:"eth_chainId"});D=zx(ne)}const Y={domain:B.host,address:z,statement:T,uri:B.href,version:"1",chainId:D,nonce:(o=C?.signInWithEthereum)===null||o===void 0?void 0:o.nonce,issuedAt:(u=(c=C?.signInWithEthereum)===null||c===void 0?void 0:c.issuedAt)!==null&&u!==void 0?u:new Date,expirationTime:(f=C?.signInWithEthereum)===null||f===void 0?void 0:f.expirationTime,notBefore:(h=C?.signInWithEthereum)===null||h===void 0?void 0:h.notBefore,requestId:(m=C?.signInWithEthereum)===null||m===void 0?void 0:m.requestId,resources:(y=C?.signInWithEthereum)===null||y===void 0?void 0:y.resources};_=Bx(Y),S=await x.request({method:"personal_sign",params:[Px(_),z]})}try{const{data:E,error:A}=await ae(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:An});if(A)throw A;if(!E||!E.session||!E.user){const T=new oa;return this._returnResult({data:{user:null,session:null},error:T})}return E.session&&(await this._saveSession(E.session),await this._notifyAllSubscribers("SIGNED_IN",E.session)),this._returnResult({data:Object.assign({},E),error:A})}
40catch(E){if(te(E))return this._returnResult({data:{user:null,session:null},error:E});throw E}}async signInWithSolana(e){var r,i,o,c,u,f,h,m,y,g,b,_;let S,E;if("message"in e)S=e.message,E=e.signature;else{const{chain:A,wallet:T,statement:C,options:x}=e;let B;if(Mt())if(typeof T=="object")B=T;else{const z=window;if("solana"in z&&typeof z.solana=="object"&&("signIn"in z.solana&&typeof z.solana.signIn=="function"||"signMessage"in z.solana&&typeof z.solana.signMessage=="function"))B=z.solana;else throw new Error("@supabase/auth-js: No compatible Solana wallet interface on the window object (window.solana) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'solana', wallet: resolvedUserWallet }) instead.")}else{if(typeof T!="object"||!x?.url)throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");B=T}const Z=new URL((r=x?.url)!==null&&r!==void 0?r:window.location.href);if("signIn"in B&&B.signIn){const z=await B.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},x?.signInWithSolana),{version:"1",domain:Z.host,uri:Z.href}),C?{statement:C}:null));let D;if(Array.isArray(z)&&z[0]&&typeof z[0]=="object")D=z[0];else if(z&&typeof z=="object"&&"signedMessage"in z&&"signature"in z)D=z;else throw new Error("@supabase/auth-js: Wallet method signIn() returned unrecognized value");if("signedMessage"in D&&"signature"in D&&(typeof D.signedMessage=="string"||D.signedMessage instanceof Uint8Array)&&D.signature instanceof Uint8Array)S=typeof D.signedMessage=="string"?D.signedMessage:new TextDecoder().decode(D.signedMessage),E=D.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=[`${Z.host} wants you to sign in with your Solana account:`,B.publicKey.toBase58(),...C?["",C,""]:[""],"Version: 1",`URI: ${Z.href}`,`Issued At: ${(o=(i=x?.signInWithSolana)===null||i===void 0?void 0:i.issuedAt)!==null&&o!==void 0?o:new Date().toISOString()}`,...!((c=x?.signInWithSolana)===null||c===void 0)&&c.notBefore?[`Not Before: ${x.signInWithSolana.notBefore}`]:[],...!((u=x?.signInWithSolana)===null||u===void 0)&&u.expirationTime?[`Expiration Time: ${x.signInWithSolana.expirationTime}`]:[],...!((f=x?.signInWithSolana)===null||f===void 0)&&f.chainId?[`Chain ID: ${x.signInWithSolana.chainId}`]:[],...!((h=x?.signInWithSolana)===null||h===void 0)&&h.nonce?[`Nonce: ${x.signInWithSolana.nonce}`]:[],...!((m=x?.signInWithSolana)===null||m===void 0)&&m.requestId?[`Request ID: ${x.signInWithSolana.requestId}`]:[],...!((g=(y=x?.signInWithSolana)===null||y===void 0?void 0:y.resources)===null||g===void 0)&&g.length?["Resources",...x.signInWithSolana.resources.map(D=>`- ${D}`)]:[]].join(` 41`);const z=await B.signMessage(new TextEncoder().encode(S),"utf8");if(!z||!(z instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");E=z}}try{const{data:A,error:T}=await ae(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:S,signature:ai(E)},!((b=e.options)===null||b===void 0)&&b.captchaToken?{gotrue_meta_security:{captcha_token:(_=e.options)===null||_===void 0?void 0:_.captchaToken}}:null),xform:An});if(T)throw T;if(!A||!A.session||!A.user){const C=new oa;return this._returnResult({data:{user:null,session:null},error:C})}return A.session&&(await this._saveSession(A.session),await this._notifyAllSubscribers("SIGNED_IN",A.session)),this._returnResult({data:Object.assign({},A),error:T})}catch(A){if(te(A))return this._returnResult({data:{user:null,session:null},error:A});throw A}}async _exchangeCodeForSession(e){const r=await Dn(this.storage,`${this.storageKey}-code-verifier`),[i,o]=(r??"").split("/");try{if(!i&&this.flowType==="pkce")throw new ix;const{data:c,error:u}=await ae(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:e,code_verifier:i},xform:An});if(await ot(this.storage,`${this.storageKey}-code-verifier`),u)throw u;if(!c||!c.session||!c.user){const f=new oa;return this._returnResult({data:{user:null,session:null,redirectType:null},error:f})}return c.session&&(await this._saveSession(c.session),await this._notifyAllSubscribers(o==="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",c.session)),this._returnResult({data:Object.assign(Object.assign({},c),{redirectType:o??null}),error:u})}catch(c){if(await ot(this.storage,`${this.storageKey}-code-verifier`),te(c))return this._returnResult({data:{user:null,session:null,redirectType:null},error:c});throw c}}async signInWithIdToken(e){try{const{options:r,provider:i,token:o,access_token:c,nonce:u}=e,f=await ae(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:i,id_token:o,access_token:c,nonce:u,gotrue_meta_security:{captcha_token:r?.captchaToken}},xform:An}),{data:h,error:m}=f;if(m)return this._returnResult({data:{user:null,session:null},error:m});if(!h||!h.session||!h.user){const y=new oa;return this._returnResult({data:{user:null,session:null},error:y})}return h.session&&(await this._saveSession(h.session),await this._notifyAllSubscribers("SIGNED_IN",h.session)),this._returnResult({data:h,error:m})}catch(r){if(te(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async signInWithOtp(e){var r,i,o,c,u;try{if("email"in e){const{email:f,options:h}=e;let m=null,y=null;this.flowType==="pkce"&&([m,y]=await ti(this.storage,this.storageKey));const{error:g}=await ae(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:f,data:(r=h?.data)!==null&&r!==void 0?r:{}
41,create_user:(i=h?.shouldCreateUser)!==null&&i!==void 0?i:!0,gotrue_meta_security:{captcha_token:h?.captchaToken},code_challenge:m,code_challenge_method:y},redirectTo:h?.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:g})}if("phone"in e){const{phone:f,options:h}=e,{data:m,error:y}=await ae(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:f,data:(o=h?.data)!==null&&o!==void 0?o:{},create_user:(c=h?.shouldCreateUser)!==null&&c!==void 0?c:!0,gotrue_meta_security:{captcha_token:h?.captchaToken},channel:(u=h?.channel)!==null&&u!==void 0?u:"sms"}});return this._returnResult({data:{user:null,session:null,messageId:m?.message_id},error:y})}throw new Pc("You must provide either an email or phone number.")}catch(f){if(await ot(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,i;try{let o,c;"options"in e&&(o=(r=e.options)===null||r===void 0?void 0:r.redirectTo,c=(i=e.options)===null||i===void 0?void 0:i.captchaToken);const{data:u,error:f}=await ae(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},e),{gotrue_meta_security:{captcha_token:c}}),redirectTo:o,xform:An});if(f)throw f;if(!u)throw new Error("An error occurred on token verification.");const h=u.session,m=u.user;return h?.access_token&&(await this._saveSession(h),await this._notifyAllSubscribers(e.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",h)),this._returnResult({data:{user:m,session:h},error:null})}catch(o){if(te(o))return this._returnResult({data:{user:null,session:null},error:o});throw o}}async signInWithSSO(e){var r,i,o,c,u;try{let f=null,h=null;this.flowType==="pkce"&&([f,h]=await ti(this.storage,this.storageKey));const m=await ae(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:(i=(r=e.options)===null||r===void 0?void 0:r.redirectTo)!==null&&i!==void 0?i: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:h}),headers:this.headers,xform:Nx});return!((c=m.data)===null||c===void 0)&&c.url&&Mt()&&!(!((u=e.options)===null||u===void 0)&&u.skipBrowserRedirect)&&window.location.assign(m.data.url),this._returnResult(m)}catch(f){if(await ot(this.storage,`${this.storageKey}-code-verifier`),te(f))return this._returnResult({data:null,error:f});throw f}}async reauthenticate(){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._reauthenticate()):await this._reauthenticate()}async _reauthenticate(){try{return await this._useSession(async e=>{const{data:{session:r},error:i}=e;if(i)throw i;if(!r)throw new wt;const{error:o}=await ae(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:i,type:o,options:c}=e;let u=null,f=null;this.flowType==="pkce"&&([u,f]=await ti(this.storage,this.storageKey));const{error:h}=await ae(this.fetch,"POST",r,{headers:this.headers,body:{email:i,type:o,gotrue_meta_security:{captcha_token:c?.captchaToken},code_challenge:u,code_challenge_method:f},redirectTo:c?.emailRedirectTo});return h&&await ot(this.storage,`${this.storageKey}-code-verifier`),this._returnResult({data:{user:null,session:null},error:h})}else if("phone"in e){const{phone:i,type:o,options:c}=e,{data:u,error:f}=await ae(this.fetch,"POST",r,{headers:this.headers,body:{phone:i,type:o,gotrue_meta_security:{captcha_token:c?.captchaToken}}});return this._returnResult({data:{user:null,session:null,messageId:u?.message_id},error:f})}throw new Pc("You must provide either an email or phone number and a type")}catch(r){if(await ot(this.storage,`${this.storageKey}-code-verifier`),te(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async getSession(){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>this._useSession(async e=>e)):await this._useSession(async e=>e)}async _acquireLock(e,r){this._debug("#_acquireLock","begin",e);try{if(this.lockAcquired){const i=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),o=(async()=>(await i,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 i=r();for(this.pendingInLock.push((async()=>{try{await i}catch{}})()),await i;this.pendingInLock.length;){const o=[...this.pendingInLock];await Promise.all(o),this.pendingInLock.splice(0,o.length)}return await i}finally{this._debug("#_acquireLock","lock released for storage key",this.storageKey),this.lockAcquired=!1}})}finally{this._debug("#_acquireLock","end")}}async _useSession(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.lock!=null&&!this.lockAcquired&&this._debug("#__loadSession()","used outside of an acquired lock!",new Error().stack);try{let e=null;const r=await Dn(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
41id"),await this._removeSession())),!e)return{data:{session:null},error:null};const i=e.expires_at?e.expires_at*1e3-Date.now()<lh:!1;if(this._debug("#__loadSession()",`session has${i?"":" not"} expired`,"expires_at",e.expires_at),!i){if(this.userStorage){const u=await Dn(this.userStorage,this.storageKey+"-user");u?.user?e.user=u.user:e.user=ch()}if(this.storage.isServer&&e.user&&!e.user.__isUserNotAvailableProxy){const u={value:this.suppressGetSessionWarning};e.user=Ox(e.user,u),u.value&&(this.suppressGetSessionWarning=!0)}return{data:{session:e},error:null}}const{data:o,error:c}=await this._callRefreshToken(e.refresh_token);if(c){if(!!(e.expires_at&&e.expires_at*1e3>Date.now())){const f=await Dn(this.storage,this.storageKey);if(f&&f.refresh_token===e.refresh_token)return this._returnResult({data:{session:e},error:null})}return this._returnResult({data:{session:null},error:c})}return this._returnResult({data:{session:o},error:null})}finally{this._debug("#__loadSession()","end")}}async getUser(e){if(e)return await this._getUser(e);await this.initializePromise;let r;return this.lock!=null?r=await this._acquireLock(this.lockAcquireTimeout,async()=>await this._getUser()):r=await this._getUser(),r.data.user&&(this.suppressGetSessionWarning=!0),r}async _getUser(e){try{return e?await ae(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:e,xform:ms}):await this._useSession(async r=>{var i,o,c;const{data:u,error:f}=r;if(f)throw f;return!(!((i=u.session)===null||i===void 0)&&i.access_token)&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new wt}:await ae(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:(c=(o=u.session)===null||o===void 0?void 0:o.access_token)!==null&&c!==void 0?c:void 0,xform:ms})})}catch(r){if(te(r))return zc(r)&&(await this._removeSession(),await ot(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({data:{user:null},error:r});throw r}}async updateUser(e,r={}){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._updateUser(e,r)):await this._updateUser(e,r)}async _updateUser(e,r={}){try{return await this._useSession(async i=>{const{data:o,error:c}=i;if(c)throw c;if(!o.session)throw new wt;const u=o.session;let f=null,h=null;this.flowType==="pkce"&&e.email!=null&&([f,h]=await ti(this.storage,this.storageKey));const{data:m,error:y}=await ae(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:r?.emailRedirectTo,body:Object.assign(Object.assign({},e),{code_challenge:f,code_challenge_method:h}),jwt:u.access_token,xform:ms});if(y)throw y;return u.user=m.user,await this._saveSession(u),await this._notifyAllSubscribers("USER_UPDATED",u),this._returnResult({data:{user:u.user},error:null})})}catch(i){if(await ot(this.storage,`${this.storageKey}-code-verifier`),te(i))return this._returnResult({data:{user:null},error:i});throw i}}async setSession(e){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._setSession(e)):await this._setSession(e)}async _setSession(e){try{if(!e.access_token||!e.refresh_token)throw new wt;const r=Date.now()/1e3;let i=r,o=!0,c=null;const{payload:u}=Ic(e.access_token);if(u.exp&&(i=u.exp,o=i<=r),o){const{data:f,error:h}=await this._callRefreshToken(e.refresh_token);if(h)return this._returnResult({data:{user:null,session:null},error:h});if(!f)return{data:{user:null,session:null},error:null};c=f}else{const{data:f,error:h}=await this._getUser(e.access_token);if(h)return this._returnResult({data:{user:null,session:null},error:h});c={access_token:e.access_token,refresh_token:e.refresh_token,user:f.user,token_type:"bearer",expires_in:i-r,expires_at:i},await this._saveSession(c),await this._notifyAllSubscribers("SIGNED_IN",c)}return this._returnResult({data:{user:c.user,session:c},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,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._refreshSession(e)):await this._refreshSession(e)}async _refreshSession(e){try{return await this._useSession(async r=>{var i;if(!e){const{data:u,error:f}=r;if(f)throw f;e=(i=u.session)!==null&&i!==void 0?i:void 0}if(!e?.refresh_token)throw new wt;const{data:o,error:c}=await this._callRefreshToken(e.refresh_token);return c?this._returnResult({data:{user:null,session:null},error:c}):o?this._returnResult({data:{user:o.user,session:o},error:null}):this._returnResult({data:{user:null,session:null},error:null})})}catch(r){if(te(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async _getSessionFromURL(e,r){var i;try{if(!Mt())throw new Bc("No browser detected.");
41if(e.error||e.error_description||e.error_code)throw new Bc(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 E0("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new Bc("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 E0("No code detected.");const{data:x,error:B}=await this._exchangeCodeForSession(e.code);if(B)throw B;const Z=new URL(window.location.href);return Z.searchParams.delete("code"),window.history.replaceState(window.history.state,"",Z.toString()),{data:{session:x.session,redirectType:(i=x.redirectType)!==null&&i!==void 0?i:null},error:null}}const{provider_token:o,provider_refresh_token:c,access_token:u,refresh_token:f,expires_in:h,expires_at:m,token_type:y}=e;if(!u||!h||!f||!y)throw new Bc("No session defined in URL");const g=Math.round(Date.now()/1e3),b=parseInt(h);let _=g+b;m&&(_=parseInt(m));const S=_-g;S*1e3<=Cr&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${S}s, should have been closer to ${b}s`);const E=_-b;g-E>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",E,_,g):g-E<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",E,_,g);const{data:A,error:T}=await this._getUser(u);if(T)throw T;const C={provider_token:o,provider_refresh_token:c,access_token:u,expires_in:b,expires_at:_,refresh_token:f,token_type:y,user:A.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),this._returnResult({data:{session:C,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||e.error_description||e.error_code)}async _isPKCECallback(e){const r=await Dn(this.storage,`${this.storageKey}-code-verifier`);return!!(e.code&&r)}async signOut(e={scope:"global"}){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._signOut(e)):await this._signOut(e)}async _signOut({scope:e}={scope:"global"}){return await this._useSession(async r=>{var i;const{data:o,error:c}=r;if(c&&!zc(c))return this._returnResult({error:c});const u=(i=o.session)===null||i===void 0?void 0:i.access_token;if(u){const{error:f}=await this.admin.signOut(u,e);if(f&&!(rx(f)&&(f.status===404||f.status===401||f.status===403)||zc(f)))return this._returnResult({error:f})}return e!=="others"&&(await this._removeSession(),await ot(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({error:null})})}onAuthStateChange(e){const r=hx(),i={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,i),(async()=>(await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>{this._emitInitialSession(r)}):await this._emitInitialSession(r)))(),{data:{subscription:i}}}async _emitInitialSession(e){return await this._useSession(async r=>{var i,o;try{const{data:{session:c},error:u}=r;if(u)throw u;await((i=this.stateChangeEmitters.get(e))===null||i===void 0?void 0:i.callback("INITIAL_SESSION",c)),this._debug("INITIAL_SESSION","callback id",e,"session",c)}catch(c){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",c),zc(c)?console.warn(c):console.error(c)}})}async resetPasswordForEmail(e,r={}){let i=null,o=null;this.flowType==="pkce"&&([i,o]=await ti(this.storage,this.storageKey,!0));try{return await ae(this.fetch,"POST",`${this.url}/recover`,{body:{email:e,code_challenge:i,code_challenge_method:o,gotrue_meta_security:{captcha_token:r.captchaToken}},headers:this.headers,redirectTo:r.redirectTo})}catch(c){if(await ot(this.storage,`${this.storageKey}-code-verifier`),te(c))return this._returnResult({data:null,error:c});throw c}}async getUserIdentities(){var e;try{const{data:r,error:i}=await this.getUser();if(i)throw i;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:i,error:o}=await this._useSession(async c=>{var u,f,h,m,y;const{data:g,error:b}=c;if(b)throw b;const _=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,e.provider,{redirectTo:(u=e.options)===null||u===void 0?void 0:u.redirectTo,scopes:(f=e.options)===null||f===void 0?void 0:f.scopes,queryParams:(h=e.options)===null||h===void 0?void 0:h.queryParams,skipBrowserRedirect:!0});return await ae(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(i?.url),this._returnResult({data:{provider:e.provider,url:i?.url},error:null})}catch(i){if(te(i))return this._returnResult({data:{provider:e.provider,url:null},error:i});throw i}}async linkIdentityIdToken(e){return await this._useSession(async r=>{var i;try{const{error:o,data:{session:c}}=r;if(o)throw o;const{options:u,provider:f,token:h,access_token:m,nonce:y}=e,g=await ae(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,jwt:(i=c?.access_token)!==null&&i!==void 0?i:void 0,body:{provider:f,id_token:h,access_token:m,nonce:y,link_identity:!0,gotrue_meta_security:{captcha_token:u?.captchaToken}},xform:An}),{data:b,error:_}=g;return _?this._returnResult({data:{user:null,session:null},error:_}
41):!b||!b.session||!b.user?this._returnResult({data:{user:null,session:null},error:new oa}):(b.session&&(await this._saveSession(b.session),await this._notifyAllSubscribers("USER_UPDATED",b.session)),this._returnResult({data:b,error:_}))}catch(o){if(await ot(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 i,o;const{data:c,error:u}=r;if(u)throw u;return await ae(this.fetch,"DELETE",`${this.url}/user/identities/${e.identity_id}`,{headers:this.headers,jwt:(o=(i=c.session)===null||i===void 0?void 0:i.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()";this._debug(r,"begin");try{const i=Date.now();return await yx(async o=>(o>0&&await gx(200*Math.pow(2,o-1)),this._debug(r,"refreshing attempt",o),await ae(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:e},headers:this.headers,xform:An})),(o,c)=>{const u=200*Math.pow(2,o);return c&&T0(c)&&Date.now()+u-i<Cr})}catch(i){if(this._debug(r,"error",i),te(i))return this._returnResult({data:{session:null,user:null},error:i});throw i}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 i=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",i),Mt()&&!r.skipBrowserRedirect&&window.location.assign(i),{data:{provider:e,url:i},error:null}}async _recoverAndRefresh(){var e,r;const i="#_recoverAndRefresh()";this._debug(i,"begin");try{const o=await Dn(this.storage,this.storageKey);if(o&&this.userStorage){let u=await Dn(this.userStorage,this.storageKey+"-user");!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!u&&(u={user:o.user},await da(this.userStorage,this.storageKey+"-user",u)),o.user=(e=u?.user)!==null&&e!==void 0?e:ch()}else if(o&&!o.user&&!o.user){const u=await Dn(this.storage,this.storageKey+"-user");u&&u?.user?(o.user=u.user,await ot(this.storage,this.storageKey+"-user"),await da(this.storage,this.storageKey,o)):o.user=ch()}if(this._debug(i,"session from storage",o),!this._isValidSession(o)){this._debug(i,"session is not valid"),o!==null&&await this._removeSession();return}const c=((r=o.expires_at)!==null&&r!==void 0?r:1/0)*1e3-Date.now()<lh;if(this._debug(i,`session has${c?"":" not"} expired with margin of ${lh}s`),c){if(this.autoRefreshToken&&o.refresh_token){const{error:u}=await this._callRefreshToken(o.refresh_token);u&&(ax(u)?this._debug(i,"refresh discarded by commit guard",u):this._debug(i,"refresh failed",u))}}else if(o.user&&o.user.__isUserNotAvailableProxy===!0)try{const{data:u,error:f}=await this._getUser(o.access_token);!f&&u?.user?(o.user=u.user,await this._saveSession(o),await this._notifyAllSubscribers("SIGNED_IN",o)):this._debug(i,"could not get user data, skipping SIGNED_IN notification")}catch(u){console.error("Error getting user data:",u),this._debug(i,"error getting user data, skipping SIGNED_IN notification",u)}else await this._notifyAllSubscribers("SIGNED_IN",o)}catch(o){this._debug(i,"error",o),console.error(o);return}finally{this._debug(i,"end")}}async _callRefreshToken(e){var r,i;if(!e)throw new wt;if(this.refreshingDeferred)return this.refreshingDeferred.promise;if(this.lastRefreshFailure&&this.lastRefreshFailure.refreshToken===e&&Date.now()<this.lastRefreshFailure.expiresAt)return this._debug("#_callRefreshToken()","returning cached failure (cooldown active)"),this.lastRefreshFailure.result;const o="#_callRefreshToken()";this._debug(o,"begin");try{this.refreshingDeferred=new ku;const c=await Dn(this.storage,this.storageKey),{data:u,error:f}=await this._refreshAccessToken(e);if(f)throw f;if(!u.session)throw new wt;const h=await Dn(this.storage,this.storageKey);if(c!==null&&(h===null||h.refresh_token!==c.refresh_token)){this._debug(o,"commit guard: storage changed since refresh started, discarding rotated tokens",{startedWith:"present",nowHolds:h?"replaced":"cleared"});const b={data:null,error:new A0};return this.refreshingDeferred.resolve(b),b}const y=this._sessionRemovalEpoch;if(await this._saveSession(u.session),this._sessionRemovalEpoch!==y){this._debug(o,"commit guard (post-save): _removeSession ran during _saveSession, und
41oing write"),await ot(this.storage,this.storageKey),this.userStorage&&await ot(this.userStorage,this.storageKey+"-user");const b={data:null,error:new A0};return this.refreshingDeferred.resolve(b),b}await this._notifyAllSubscribers("TOKEN_REFRESHED",u.session);const g={data:u.session,error:null};return this.lastRefreshFailure=null,this.refreshingDeferred.resolve(g),g}catch(c){if(this._debug(o,"error",c),te(c)){const u={data:null,error:c};if(!T0(c)){const f=await Dn(this.storage,this.storageKey);!!(f?.expires_at&&f.expires_at*1e3>Date.now())?this._debug(o,"proactive refresh failed, access token still valid â preserving session"):await this._removeSession()}return this.lastRefreshFailure={refreshToken:e,result:u,expiresAt:Date.now()+JC},(r=this.refreshingDeferred)===null||r===void 0||r.resolve(u),u}throw(i=this.refreshingDeferred)===null||i===void 0||i.reject(c),c}finally{this.refreshingDeferred=null,this._debug(o,"end")}}async _notifyAllSubscribers(e,r,i=!0){const o=`#_notifyAllSubscribers(${e})`;this._debug(o,"begin",r,`broadcast = ${i}`);try{this.broadcastChannel&&i&&this.broadcastChannel.postMessage({event:e,session:r});const c=[],u=Array.from(this.stateChangeEmitters.values()).map(async f=>{try{await f.callback(e,r)}catch(h){c.push(h)}});if(await Promise.all(u),c.length>0){for(let f=0;f<c.length;f+=1)console.error(c[f]);throw c[0]}}finally{this._debug(o,"end")}}async _saveSession(e){this._debug("#_saveSession()",e),this.suppressGetSessionWarning=!0,await ot(this.storage,`${this.storageKey}-code-verifier`);const r=Object.assign({},e),i=r.user&&r.user.__isUserNotAvailableProxy===!0;if(this.userStorage){!i&&r.user&&await da(this.userStorage,this.storageKey+"-user",{user:r.user});const o=Object.assign({},r);delete o.user;const c=x0(o);await da(this.storage,this.storageKey,c)}else{const o=x0(r);await da(this.storage,this.storageKey,o)}}async _removeSession(){this._sessionRemovalEpoch+=1,this._debug("#_removeSession()"),this.lastRefreshFailure=null,this.suppressGetSessionWarning=!1,await ot(this.storage,this.storageKey),await ot(this.storage,this.storageKey+"-code-verifier"),await ot(this.storage,this.storageKey+"-user"),this.userStorage&&await ot(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)}catch(r){console.error("removing visibilitychange callback failed",r)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const e=setInterval(()=>this._autoRefreshTokenTick(),Cr);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 dispose(){var e;this._removeVisibilityChangedCallback(),await this._stopAutoRefresh(),(e=this.broadcastChannel)===null||e===void 0||e.close(),this.broadcastChannel=null,this.stateChangeEmitters.clear()}async _autoRefreshTokenTick(){if(this._debug("#_autoRefreshTokenTick()","begin"),this.lock!=null){try{await this._acquireLock(0,async()=>{try{const e=Date.now();try{return await this._useSession(async r=>{const{data:{session:i}}=r;if(!i||!i.refresh_token||!i.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const o=Math.floor((i.expires_at*1e3-e)/Cr);this._debug("#_autoRefreshTokenTick()",`access token expires in ${o} ticks, a tick lasts ${Cr}ms, refresh threshold is ${Do} ticks`),o<=Do&&await this._callRefreshToken(i.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 instanceof Mx)this._debug("auto refresh token tick lock not available");else throw e}return}if(this.refreshingDeferred!==null){this._debug("#_autoRefreshTokenTick()","refresh already in flight, skipping");return}try{const e=Date.now();try{await this._useSession(async r=>{const{data:{session:i}}=r;if(!i||!i.refresh_token||!i.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const o=Math.floor((i.expires_at*1e3-e)/Cr);this._debug("#_autoRefreshTokenTick()",`access token expires in ${o} ticks, a tick lasts ${Cr}ms, refresh threshold is ${Do} ticks`),o<=Do&&await this._callRefreshToken(i.refresh_token)})}catch(r){console.error("Auto refresh tick failed with error. This is likely a transient error.",r)}}finally{this._debug("#_autoRefreshTokenTick()","end")}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!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})`;if(this._debug(r,"visibilityState",document.visibilityState),document.visibilityState==="visible"){if(this.autoRefreshToken&&this._startAutoRefresh(),!e)if(await this.initializePromise,this.lock!=null)await this._acquireLock(this.lockAcquireTimeout,async()=>
41{if(document.visibilityState!=="visible"){this._debug(r,"acquired the lock to recover the session, but the browser visibilityState is no longer visible, aborting");return}await this._recoverAndRefresh()});else{if(document.visibilityState!=="visible"){this._debug(r,"visibilityState is no longer visible, skipping recovery");return}await this._recoverAndRefresh()}}else document.visibilityState==="hidden"&&this.autoRefreshToken&&this._stopAutoRefresh()}async _getUrlForProvider(e,r,i){const o=[`provider=${encodeURIComponent(r)}`];if(i?.redirectTo&&o.push(`redirect_to=${encodeURIComponent(i.redirectTo)}`),i?.scopes&&o.push(`scopes=${encodeURIComponent(i.scopes)}`),this.flowType==="pkce"){const[c,u]=await ti(this.storage,this.storageKey),f=new URLSearchParams({code_challenge:`${encodeURIComponent(c)}`,code_challenge_method:`${encodeURIComponent(u)}`});o.push(f.toString())}if(i?.queryParams){const c=new URLSearchParams(i.queryParams);o.push(c.toString())}return i?.skipBrowserRedirect&&o.push(`skip_http_redirect=${i.skipBrowserRedirect}`),`${e}?${o.join("&")}`}async _unenroll(e){try{return await this._useSession(async r=>{var i;const{data:o,error:c}=r;return c?this._returnResult({data:null,error:c}):await ae(this.fetch,"DELETE",`${this.url}/factors/${e.factorId}`,{headers:this.headers,jwt:(i=o?.session)===null||i===void 0?void 0:i.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 i,o;const{data:c,error:u}=r;if(u)return this._returnResult({data:null,error:u});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:h,error:m}=await ae(this.fetch,"POST",`${this.url}/factors`,{body:f,headers:this.headers,jwt:(i=c?.session)===null||i===void 0?void 0:i.access_token});return m?this._returnResult({data:null,error:m}):(e.factorType==="totp"&&h.type==="totp"&&(!((o=h?.totp)===null||o===void 0)&&o.qr_code)&&(h.totp.qr_code=`data:image/svg+xml;utf-8,${h.totp.qr_code}`),this._returnResult({data:h,error:null}))})}catch(r){if(te(r))return this._returnResult({data:null,error:r});throw r}}async _verify(e){const r=async()=>{try{return await this._useSession(async i=>{var o;const{data:c,error:u}=i;if(u)return this._returnResult({data:null,error:u});const f=Object.assign({challenge_id:e.challengeId},"webauthn"in e?{webauthn:Object.assign(Object.assign({},e.webauthn),{credential_response:e.webauthn.type==="create"?z0(e.webauthn.credential_response):P0(e.webauthn.credential_response)})}:{code:e.code}),{data:h,error:m}=await ae(this.fetch,"POST",`${this.url}/factors/${e.factorId}/verify`,{body:f,headers:this.headers,jwt:(o=c?.session)===null||o===void 0?void 0:o.access_token});return m?this._returnResult({data:null,error:m}):(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+h.expires_in},h)),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",h),this._returnResult({data:h,error:m}))})}catch(i){if(te(i))return this._returnResult({data:null,error:i});throw i}};return this.lock!=null?this._acquireLock(this.lockAcquireTimeout,r):r()}async _challenge(e){const r=async()=>{try{return await this._useSession(async i=>{var o;const{data:c,error:u}=i;if(u)return this._returnResult({data:null,error:u});const f=await ae(this.fetch,"POST",`${this.url}/factors/${e.factorId}/challenge`,{body:e,headers:this.headers,jwt:(o=c?.session)===null||o===void 0?void 0:o.access_token});if(f.error)return f;const{data:h}=f;if(h.type!=="webauthn")return{data:h,error:null};switch(h.webauthn.type){case"create":return{data:Object.assign(Object.assign({},h),{webauthn:Object.assign(Object.assign({},h.webauthn),{credential_options:Object.assign(Object.assign({},h.webauthn.credential_options),{publicKey:M0(h.webauthn.credential_options.publicKey)})})}),error:null};case"request":return{data:Object.assign(Object.assign({},h),{webauthn:Object.assign(Object.assign({},h.webauthn),{credential_options:Object.assign(Object.assign({},h.webauthn.credential_options),{publicKey:U0(h.webauthn.credential_options.publicKey)})})}),error:null}}})}catch(i){if(te(i))return this._returnResult({data:null,error:i});throw i}};return this.lock!=null?this._acquireLock(this.lockAcquireTimeout,r):r()}async _challengeAndVerify(e){const{data:r,error:i}=await this._challenge({factorId:e.factorId});return i?this._returnResult({data:null,error:i}):await this._verify({factorId:e.factorId,challengeId:r.id,code:e.code})}async _listFactors(){var e;const{data:{user:r},error:i}=await this.getUser();if(i)return{data:null,error:i};const o={all:[],phone:[],totp:[],webauthn:[]};for(const c of(e=r?.factors)!==null&&e!==void 0?e:[])o.all.push(c),c.status==="verified"&&o[c.factor_type].push(c);return{data:o,error:null}}async _getAuthenticatorAssuranceLevel(e){var r,i,o,c;if(e)try{const{payload:_}=Ic(e);let S=null;_.aal&&(S=_.aal);let E=S;const{data:{user:A},error:T}=await this.getUser(e);if(T)return this._returnResult({data:null,error:T});((i=(r=A?.factors)===null||r===void 0?void 0:r.filter(B=>B.status==="verified"))!==null&&i!==void 0?i:[]).length>0&&(E="aal2");const x=_.amr||[];return{data:{currentLevel:S,nextLevel:E,currentAuthenticationMethods:x},error:null}}catch(_){if(te(_))return this._returnResult({data:null,error:_});throw _}const{data:{session:u},error:f}
41=await this.getSession();if(f)return this._returnResult({data:null,error:f});if(!u)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const{payload:h}=Ic(u.access_token);let m=null;h.aal&&(m=h.aal);let y=m;((c=(o=u.user.factors)===null||o===void 0?void 0:o.filter(_=>_.status==="verified"))!==null&&c!==void 0?c:[]).length>0&&(y="aal2");const b=h.amr||[];return{data:{currentLevel:m,nextLevel:y,currentAuthenticationMethods:b},error:null}}async _getAuthorizationDetails(e){try{return await this._useSession(async r=>{const{data:{session:i},error:o}=r;return o?this._returnResult({data:null,error:o}):i?await ae(this.fetch,"GET",`${this.url}/oauth/authorizations/${e}`,{headers:this.headers,jwt:i.access_token,xform:c=>({data:c,error:null})}):this._returnResult({data:null,error:new wt})})}catch(r){if(te(r))return this._returnResult({data:null,error:r});throw r}}async _approveAuthorization(e,r){try{return await this._useSession(async i=>{const{data:{session:o},error:c}=i;if(c)return this._returnResult({data:null,error:c});if(!o)return this._returnResult({data:null,error:new wt});const u=await ae(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 u.data&&u.data.redirect_url&&Mt()&&!r?.skipBrowserRedirect&&window.location.assign(u.data.redirect_url),u})}catch(i){if(te(i))return this._returnResult({data:null,error:i});throw i}}async _denyAuthorization(e,r){try{return await this._useSession(async i=>{const{data:{session:o},error:c}=i;if(c)return this._returnResult({data:null,error:c});if(!o)return this._returnResult({data:null,error:new wt});const u=await ae(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 u.data&&u.data.redirect_url&&Mt()&&!r?.skipBrowserRedirect&&window.location.assign(u.data.redirect_url),u})}catch(i){if(te(i))return this._returnResult({data:null,error:i});throw i}}async _listOAuthGrants(){try{return await this._useSession(async e=>{const{data:{session:r},error:i}=e;return i?this._returnResult({data:null,error:i}):r?await ae(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 wt})})}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:i},error:o}=r;return o?this._returnResult({data:null,error:o}):i?(await ae(this.fetch,"DELETE",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:i.access_token,query:{client_id:e.clientId},noResolveJson:!0}),{data:{},error:null}):this._returnResult({data:null,error:new wt})})}catch(r){if(te(r))return this._returnResult({data:null,error:r});throw r}}async fetchJwk(e,r={keys:[]}){let i=r.keys.find(f=>f.kid===e);if(i)return i;const o=Date.now();if(i=this.jwks.keys.find(f=>f.kid===e),i&&this.jwks_cached_at+tx>o)return i;const{data:c,error:u}=await ae(this.fetch,"GET",`${this.url}/.well-known/jwks.json`,{headers:this.headers});if(u)throw u;return!c.keys||c.keys.length===0||(this.jwks=c,this.jwks_cached_at=o,i=c.keys.find(f=>f.kid===e),!i)?null:i}async getClaims(e,r={}){try{let i=e;if(!i){const{data:_,error:S}
41=await this.getSession();if(S||!_.session)return this._returnResult({data:null,error:S});i=_.session.access_token}const{header:o,payload:c,signature:u,raw:{header:f,payload:h}}=Ic(i);if(!r?.allowExpired)try{Tx(c.exp)}catch(_){throw new iu(_ instanceof Error?_.message:"JWT validation failed")}const m=!o.alg||o.alg.startsWith("HS")||!o.kid||!("crypto"in globalThis&&"subtle"in globalThis.crypto)?null:await this.fetchJwk(o.kid,r?.keys?{keys:r.keys}:r?.jwks);if(!m){const{error:_}=await this.getUser(i);if(_)throw _;return{data:{claims:c,header:o,signature:u},error:null}}const y=Ax(o.alg),g=await crypto.subtle.importKey("jwk",m,y,!0,["verify"]);if(!await crypto.subtle.verify(y,g,u,dx(`${f}.${h}`)))throw new iu("Invalid JWT signature");return{data:{claims:c,header:o,signature:u},error:null}}catch(i){if(te(i))return this._returnResult({data:null,error:i});throw i}}async signInWithPasskey(e){var r,i,o;Mn(this.experimental);try{if(!lu())return this._returnResult({data:null,error:new Bn("Browser does not support WebAuthn",null)});const{data:c,error:u}=await this._startPasskeyAuthentication({options:{captchaToken:(r=e?.options)===null||r===void 0?void 0:r.captchaToken}});if(u||!c)return this._returnResult({data:null,error:u});const f=U0(c.options),h=(o=(i=e?.options)===null||i===void 0?void 0:i.signal)!==null&&o!==void 0?o:Ih.createNewAbortSignal(),{data:m,error:y}=await _w({publicKey:f,signal:h});if(y||!m)return this._returnResult({data:null,error:y??new Bn("WebAuthn ceremony failed",null)});const g=P0(m);return this._verifyPasskeyAuthentication({challengeId:c.challenge_id,credential:g})}catch(c){if(te(c))return this._returnResult({data:null,error:c});throw c}}async registerPasskey(e){var r,i;Mn(this.experimental);try{if(!lu())return this._returnResult({data:null,error:new Bn("Browser does not support WebAuthn",null)});const{data:o,error:c}=await this._startPasskeyRegistration();if(c||!o)return this._returnResult({data:null,error:c});const u=M0(o.options),f=(i=(r=e?.options)===null||r===void 0?void 0:r.signal)!==null&&i!==void 0?i:Ih.createNewAbortSignal(),{data:h,error:m}=await bw({publicKey:u,signal:f});if(m||!h)return this._returnResult({data:null,error:m??new Bn("WebAuthn ceremony failed",null)});const y=z0(h);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(){Mn(this.experimental);try{return await this._useSession(async e=>{const{data:{session:r},error:i}=e;if(i)return this._returnResult({data:null,error:i});if(!r)return this._returnResult({data:null,error:new wt});const{data:o,error:c}=await ae(this.fetch,"POST",`${this.url}/passkeys/registration/options`,{headers:this.headers,jwt:r.access_token,body:{}});return c?this._returnResult({data:null,error:c}):this._returnResult({data:o,error:null})})}catch(e){if(te(e))return this._returnResult({data:null,error:e});throw e}}async _verifyPasskeyRegistration(e){Mn(this.experimental);try{return await this._useSession(async r=>{const{data:{session:i},error:o}=r;if(o)return this._returnResult({data:null,error:o});if(!i)return this._returnResult({data:null,error:new wt});const{data:c,error:u}=await ae(this.fetch,"POST",`${this.url}/passkeys/registration/verify`,{headers:this.headers,jwt:i.access_token,body:{challenge_id:e.challengeId,credential:e.credential}});return u?this._returnResult({data:null,error:u}):this._returnResult({data:c,error:null})})}catch(r){if(te(r))return this._returnResult({data:null,error:r});throw r}}async _startPasskeyAuthentication(e){var r;Mn(this.experimental);try{const{data:i,error:o}=await ae(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:i,error:null})}catch(i){if(te(i))return this._returnResult({data:null,error:i});throw i}}async _verifyPasskeyAuthentication(e){Mn(this.experimental);try{const{data:r,error:i}=await ae(this.fetch,"POST",`${this.url}/passkeys/authentication/verify`,{headers:this.headers,body:{challenge_id:e.challengeId,credential:e.credential},xform:An});return i?this._returnResult({data:null,error:i}):(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(){Mn(this.experimental);try{return await this._useSession(async e=>{const{data:{session:r},error:i}=e;if(i)return this._returnResult({data:null,error:i});if(!r)return this._returnResult({data:null,error:new wt});const{data:o,error:c}=await ae(this.fetch,"GET",`${this.url}/passkeys`,{headers:this.headers,jwt:r.access_token,xform:u=>({data:u,error:null})});return c?this._returnResult({data:null,error:c}):this._returnResult({data:o,error:null})})}catch(e){if(te(e))return this._returnResult({data:null,error:e});throw e}}async _updatePasskey(e){Mn(this.experimental);try{return await this._useSession(async r=>{const{data:{session:i},error:o}=r;if(o)return this._returnResult({data:null,error:o});if(!i)return this._returnResult({data:null,error:new wt});const{data:c,error:u}=await ae(this.fetch,"PATCH",`${this.url}/passkeys/${e.passkeyId}`,{headers:this.headers,jwt:i.access_token,body:{friendly_name:e.friendlyName}});return u?this._returnResult({data:null,error:u}):this._returnResult({data:c,error:null})})}catch(r){if(te(r))return this._returnResult({data:null,error:r});throw r}}async _deletePasskey(e){Mn(this.experimental);try{return await this._useSession(async r=>{const{data:{session:i},error:o}=r;if(o)return this._returnResult({data:null,error:o});if(!i)return this._returnResult({data:null,error:new wt});const{error:c}
41=await ae(this.fetch,"DELETE",`${this.url}/passkeys/${e.passkeyId}`,{headers:this.headers,jwt:i.access_token,noResolveJson:!0});return c?this._returnResult({data:null,error:c}):this._returnResult({data:null,error:null})})}catch(r){if(te(r))return this._returnResult({data:null,error:r});throw r}}}el.nextInstanceID={};const Zx=el,Jx="2.110.0";let Lo="",uu;if(typeof Deno<"u"){var dh;Lo="deno",uu=(dh=Deno.version)===null||dh===void 0?void 0:dh.deno}else if(typeof document<"u")Lo="web";else if(typeof navigator<"u"&&navigator.product==="ReactNative")Lo="react-native";else{var fh;Lo="node",uu=typeof process<"u"?(fh=process.version)===null||fh===void 0?void 0:fh.replace(/^v/,""):void 0}const ww=[`runtime=${Lo}`];uu&&ww.push(`runtime-version=${uu}`);const Qx={"X-Client-Info":`supabase-js/${Jx}; ${ww.join("; ")}`},Xx={headers:Qx},Wx={schema:"public"},e2={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},t2={},n2={enabled:!1,respectSamplingDecision:!0};function r2(t,e,r,i){function o(c){return c instanceof r?c:new r(function(u){u(c)})}return new(r||(r=Promise))(function(c,u){function f(y){try{m(i.next(y))}catch(g){u(g)}}function h(y){try{m(i.throw(y))}catch(g){u(g)}}function m(y){y.done?c(y.value):o(y.value).then(f,h)}m((i=i.apply(t,[])).next())})}let hh=null;const s2="@opentelemetry/api";function i2(){return hh===null&&(hh=import(s2).catch(()=>null)),hh}function a2(){return r2(this,void 0,void 0,function*(){try{const t=yield i2();if(!t||!t.propagation||!t.context)return null;const e={};t.propagation.inject(t.context.active(),e);const r=e.traceparent;return r?{traceparent:r,tracestate:e.tracestate,baggage:e.baggage}:null}catch{return null}})}function o2(t){if(!t||typeof t!="string")return null;const e=t.split("-");if(e.length!==4)return null;const[r,i,o,c]=e;if(r.length!==2||i.length!==32||o.length!==16||c.length!==2)return null;const u=/^[0-9a-f]+$/i;return!u.test(r)||!u.test(i)||!u.test(o)||!u.test(c)||i==="00000000000000000000000000000000"||o==="0000000000000000"?null:{version:r,traceId:i,parentId:o,traceFlags:c,isSampled:(parseInt(c,16)&1)===1}}function l2(t,e){if(!t||!e||e.length===0)return!1;let r;if(t instanceof URL)r=t;else try{r=new URL(t)}catch{return!1}for(const i of e)try{if(typeof i=="string"){if(c2(r.hostname,i))return!0}else if(i instanceof RegExp){if(i.test(r.hostname))return!0}else if(typeof i=="function"&&i(r))return!0}catch{continue}return!1}function c2(t,e){if(e===t)return!0;if(e.startsWith("*.")){const r=e.slice(2);if(t.endsWith(r)&&(t===r||t.endsWith("."+r)))return!0}return!1}function u2(t){const e=[];try{const r=new URL(t);e.push(r.hostname)}catch{}return e.push("*.supabase.co","*.supabase.in"),e.push("localhost","127.0.0.1","[::1]"),e}function tl(t){"@babel/helpers - typeof";return tl=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},tl(t)}function d2(t,e){if(tl(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var i=r.call(t,e);if(tl(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function f2(t){var e=d2(t,"string");return tl(e)=="symbol"?e:e+""}function h2(t,e,r){return(e=f2(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function B0(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),r.push.apply(r,i)}return r}function st(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?B0(Object(r),!0).forEach(function(i){h2(t,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):B0(Object(r)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(r,i))})}return t}const p2=t=>t?(...e)=>t(...e):(...e)=>fetch(...e),m2=()=>Headers,g2=(t,e,r,i,o)=>{const c=p2(i),u=m2(),f=o?.enabled===!0,h=o?.respectSamplingDecision!==!1,m=f?u2(e):null;return async(y,g)=>{var b;const _=(b=await r())!==null&&b!==void 0?b:t;let S=new u(g?.headers);if(S.has("apikey")||S.set("apikey",t),S.has("Authorization")||S.set("Authorization",`Bearer ${_}`),m){const E=await y2(y,m,h);E&&(E.traceparent&&!S.has("traceparent")&&S.set("traceparent",E.traceparent),E.tracestate&&!S.has("tracestate")&&S.set("tracestate",E.tracestate),E.baggage&&!S.has("baggage")&&S.set("baggage",E.baggage))}return c(y,st(st({},g),{},{headers:S}))}};async function y2(t,e,r){if(!l2(typeof t=="string"||t instanceof URL?t:t.url,e))return null;const i=await a2();if(!i||!i.traceparent)return null;if(r){const o=o2(i.traceparent);if(o&&!o.isSampled)return null}return i}function I0(t){return typeof t=="boolean"?{enabled:t}:t}function v2(t){return t.endsWith("/")?t:t+"/"}function b2(t,e){var r,i,o,c,u,f;const{db:h,auth:m,realtime:y,global:g}=t,{db:b,auth:_,realtime:S,global:E}=e,A=I0(t.tracePropagation),T=I0(e.tracePropagation),C={db:st(st({},b),h),auth:st(st({},_),m),realtime:st(st({},S),y),storage:{},global:st(st(st({},E),g),{},{headers:st(st({},(r=E?.headers)!==null&&r!==void 0?r:{}),(i=g?.headers)!==null&&i!==void 0?i:{})}),tracePropagation:{enabled:(o=(c=A?.enabled)!==null&&c!==void 0?c:T?.enabled)!==null&&o!==void 0?o:!1,respectSamplingDecision:(u=(f=A?.respectSamplingDecision)!==null&&f!==void 0?f:T?.respectSamplingDecision)!==null&&u!==void 0?u:!0},accessToken:async()=>""};return t.accessToken?C.accessToken=t.accessToken:delete C.accessToken,C}function _2(t){const e=t?.trim();if(!e)throw new Error("supabaseUrl is required.");
41if(!e.match(/^https?:\/\//i))throw new Error("Invalid supabaseUrl: Must be a valid HTTP or HTTPS URL.");try{return new URL(v2(e))}catch{throw Error("Invalid supabaseUrl: Provided URL is malformed.")}}var w2=class extends Zx{constructor(t){super(t)}},S2=class{constructor(t,e,r){var i,o;this.supabaseUrl=t,this.supabaseKey=e;const c=_2(t);if(!e)throw new Error("supabaseKey is required.");this.realtimeUrl=new URL("realtime/v1",c),this.realtimeUrl.protocol=this.realtimeUrl.protocol.replace("http","ws"),this.authUrl=new URL("auth/v1",c),this.storageUrl=new URL("storage/v1",c),this.functionsUrl=new URL("functions/v1",c);const u=`sb-${c.hostname.split(".")[0]}-auth-token`,f={db:Wx,realtime:t2,auth:st(st({},e2),{},{storageKey:u}),global:Xx,tracePropagation:n2},h=b2(r??{},f);if(this.settings=h,this.storageKey=(i=h.auth.storageKey)!==null&&i!==void 0?i:"",this.headers=(o=h.global.headers)!==null&&o!==void 0?o:{},h.accessToken)this.accessToken=h.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=h.auth)!==null&&m!==void 0?m:{},this.headers,h.global.fetch)}this.fetch=g2(e,t,this._getAccessToken.bind(this),h.global.fetch,h.tracePropagation),this.realtime=this._initRealtimeClient(st({headers:this.headers,accessToken:this._getAccessToken.bind(this),fetch:this.fetch},h.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 Nk(new URL("rest/v1",c).href,{headers:this.headers,schema:h.db.schema,fetch:this.fetch,timeout:h.db.timeout,urlLengthLimit:h.db.urlLengthLimit}),this.storage=new ZC(this.storageUrl.href,this.headers,this.fetch,r?.storage),h.accessToken||this._listenForAuthEvents()}get functions(){return new Sk(this.functionsUrl.href,{headers:this.headers,customFetch:this.fetch})}from(t){return this.rest.from(t)}schema(t){return this.rest.schema(t)}rpc(t,e={},r={head:!1,get:!1,count:void 0}){return this.rest.rpc(t,e,r)}channel(t,e={config:{}}){return this.realtime.channel(t,e)}getChannels(){return this.realtime.getChannels()}removeChannel(t){return this.realtime.removeChannel(t)}removeAllChannels(){return this.realtime.removeAllChannels()}async _getAccessToken(){var t=this,e,r;if(t.accessToken)return await t.accessToken();const{data:i}=await t.auth.getSession();return(e=(r=i.session)===null||r===void 0?void 0:r.access_token)!==null&&e!==void 0?e:t.supabaseKey}_initSupabaseAuthClient({autoRefreshToken:t,persistSession:e,detectSessionInUrl:r,storage:i,userStorage:o,storageKey:c,flowType:u,lock:f,debug:h,throwOnError:m,experimental:y,lockAcquireTimeout:g,skipAutoInitialize:b},_,S){const E={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new w2({url:this.authUrl.href,headers:st(st({},E),_),storageKey:c,autoRefreshToken:t,persistSession:e,detectSessionInUrl:r,storage:i,userStorage:o,flowType:u,lock:f,debug:h,throwOnError:m,experimental:y,fetch:S,lockAcquireTimeout:g,skipAutoInitialize:b,hasCustomAuthorizationHeader:Object.keys(this.headers).some(A=>A.toLowerCase()==="authorization")})}_initRealtimeClient(t){return new bC(this.realtimeUrl.href,st(st({},t),{},{params:st(st({},{apikey:this.supabaseKey}),t?.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((t,e)=>{this._handleTokenChanged(t,"CLIENT",e?.access_token)})}_handleTokenChanged(t,e,r){(t==="TOKEN_REFRESHED"||t==="SIGNED_IN")&&this.changedAccessToken!==r?(this.changedAccessToken=r,this.realtime.setAuth(r)):t==="SIGNED_OUT"&&(this.realtime.setAuth(),e=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}};const E2=(t,e,r)=>new S2(t,e,r);function T2(){if(typeof window<"u")return!1;const t=globalThis.process;if(!t)return!1;const e=t.version;if(e==null)return!1;const r=e.match(/^v(\d+)\./);return r?parseInt(r[1],10)<=20:!1}T2()&&console.warn("â ï¸ Node.js 20 and below are deprecated and will no longer be supported in future versions of @supabase/supabase-js. Please upgrade to N
41ode.js 22 or later. For more information, visit: https://github.com/orgs/supabase/discussions/45715");function A2(){if(typeof window>"u")return;const t=location.hostname,r=["lovableproject.com","lovableproject-dev.com","lovable.app","gpt-eng.com","gptengineer.run"].some(A=>t===A||t.endsWith("."+A)),i="[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}",o=r?t.match(new RegExp("^(?:id-preview(?:-[a-z0-9]+)?|project)--("+i+")(?:-dev)?(?=\\.|$)","i"))?.[1]??t.match(new RegExp("^("+i+")(?=[.-])","i"))?.[1]:void 0,c=window.parent&&window.parent!==window;if(!o||!c)return localStorage;const u=t.endsWith(".lovableproject-dev.com")||t.endsWith(".gpt-eng.com"),f=u?/^https:\/\/([a-z0-9-]+\.)*(lovable\.dev|gptengineer\.app)$|^http:\/\/localhost:3000$/:/^https:\/\/([a-z0-9-]+\.)*(lovable\.dev|gptengineer\.app)$/,h=location.ancestorOrigins&&location.ancestorOrigins[0]||(document.referrer?new URL(document.referrer).origin:""),m=h&&f.test(h)?[h]:u?["https://lovable.dev","http://localhost:3000"]:["https://lovable.dev"],y="lovable-preview-auth:result",g=2e3,b=()=>Math.random().toString(36).slice(2)+Date.now().toString(36),_=(A,T,C)=>new Promise(x=>{const B=b();let Z=!1,z;const D=de=>{Z||(Z=!0,clearTimeout(z),window.removeEventListener("message",Y),x(de))},Y=de=>{if(m.indexOf(de.origin)<0)return;const G=de.data;G&&G.type===y&&G.requestId===B&&D(G)};window.addEventListener("message",Y);const ne={type:A,requestId:B,projectId:o,key:T};C!==void 0&&(ne.value=C);for(const de of m)window.parent.postMessage(ne,de);z=setTimeout(()=>D(null),g)});let S=!0;const E=250;return{getItem:async A=>{let T=await _("lovable-preview-auth:get",A);return!T&&S&&(await new Promise(C=>setTimeout(C,E)),T=await _("lovable-preview-auth:get",A)),S=!1,T&&T.ok&&typeof T.value=="string"?T.value===""?(localStorage.removeItem(A),null):T.value:localStorage.getItem(A)},setItem:(A,T)=>(localStorage.setItem(A,T),_("lovable-preview-auth:set",A,T).then(C=>{C&&C.ok&&typeof C.value=="string"&&localStorage.getItem(A)===T&&(C.value===""?localStorage.removeItem(A):localStorage.setItem(A,C.value))})),removeItem:A=>(localStorage.removeItem(A),_("lovable-preview-auth:remove",A).then(()=>{}))}}function R2(){return E2("https://ewyerfxwqwsirzamoykq.supabase.co","eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImV3eWVyZnh3cXdzaXJ6YW1veWtxIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Nzk3ODI2MDIsImV4cCI6MjA5NTM1ODYwMn0.NVa8jIpEar5DZ6YlsMs2eQdDAFXr-JnDS5X8yom6KeI",{auth:{storage:A2(),persistSession:!0,autoRefreshToken:!0}})}let ph;const Sw=new Proxy({},{get(t,e,r){return ph||(ph=R2()),Reflect.get(ph,e,r)}}),O2=ii({type:"function"}).client(async({next:t})=>{const{data:e}=await Sw.auth.getSession(),r=e.session?.access_token;return t({headers:r?{Authorization:`Bearer ${r}`}:{}})}),k2=ii(),H0=vk(()=>({functionMiddleware:[O2],requestMiddleware:[k2]}));var Cu=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},C2=class extends Cu{#e;#t;#n;constructor(){super(),this.#n=t=>{if(typeof window<"u"&&window.addEventListener){const e=()=>t();return window.addEventListener("visibilitychange",e,!1),()=>{window.removeEventListener("visibilitychange",e)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(t){this.#n=t,this.#t?.(),this.#t=t(e=>{typeof e=="boolean"?this.setFocused(e):this.onFocus()})}setFocused(t){this.#e!==t&&(this.#e=t,this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(e=>{e(t)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},Ew=new C2,x2={setTimeout:(t,e)=>setTimeout(t,e),clearTimeout:t=>clearTimeout(t),setInterval:(t,e)=>setInterval(t,e),clearInterval:t=>clearInterval(t)},N2=class{#e=x2;#t=!1;setTimeoutProvider(t){this.#e=t}setTimeout(t,e){return this.#e.setTimeout(t,e)}clearTimeout(t){this.#e.clearTimeout(t)}setInterval(t,e){return this.#e.setInterval(t,e)}clearInterval(t){this.#e.clearInterval(t)}},Hh=new N2;function j2(t){setTimeout(t,0)}var D2=typeof window>"u"||"Deno"in globalThis;function Pn(){}function L2(t,e){return typeof t=="function"?t(e):t}function M2(t){return typeof t=="number"&&t>=0&&t!==1/0}function U2(t,e){return Math.max(t+(e||0)-Date.now(),0)}function $h(t,e){return typeof t=="function"?t(e):t}function z2(t,e){return typeof t=="function"?t(e):t}function $0(t,e){const{type:r="all",exact:i,fetchStatus:o,predicate:c,queryKey:u,stale:f}=t;if(u){if(i){if(e.queryHash!==_p(u,e.options))return!1}else if(!rl(e.queryKey,u))return!1}if(r!=="all"){const h=e.isActive();if(r==="active"&&!h||r==="inactive"&&h)return!1}return!(typeof f=="boolean"&&e.isStale()!==f||o&&o!==e.state.fetchStatus||c&&!c(e))}function q0(t,e){const{exact:r,status:i,predicate:o,mutationKey:c}=t;if(c){if(!e.options.mutationKey)return!1;if(r){if(nl(e.options.mutationKey)!==nl(c))return!1}else if(!rl(e.options.mutationKey,c))return!1}return!(i&&e.state.status!==i||o&&!o(e))}function _p(t,e){return(e?.queryKeyHashFn||nl)(t)}function nl(t){return JSON.stringify(t,(e,r)=>qh(r)?Object.keys(r).sort().reduce((i,o)=>(i[o]=r[o],i),{}):r)}function rl(t,e){return t===e?!0:typeof t!=typeof e?!1:t&&e&&typeof t=="object"&&typeof e=="object"?Object.keys(e).every(r=>rl(t[r],e[r])):!1}var P2=Object.prototype.hasOwnProperty;function Tw(t,e,r=0){if(t===e)return t;if(r>500)return e;const i=V0(t)&&V0(e);if(!i&&!(qh(t)&&qh(e)))return e;const c=(i?t:Object.keys(t)).length,u=i?e:Object.keys(e),f=u.length,h=i?new Array(f):{};let m=0;for(let y=0;y<f;y++){const g=i?y:u[y],b=t[g],_=e[g];if(b===_){h[g]=b,(i?y<c:P2.call(t,g))&&m++;continue}if(b===null||_===null||typeof b!="object"||typeof _!="object"){h[g]=_;continue}const S=Tw(b,_,r+1);h[g]=S,S===b&&m++}return c===f&&m===c?t:h}function V0(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function qh(t){if(!G0(t))return!1;const e=t.constructor;if(e===void 0)return!0;const r=e.prototype;return!(!G0(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(t)!==Object.prototype)}function G0(t){return Object.prototype.toString.call(t)==="[object Object]"}function B2(t){return new Promise(e=>{Hh.setTimeout(e,t)})}function I2(t,e,r){return typeof r.structuralSharing=="function"?r.structuralSharing(t,e):r.structuralSharing!==!1?Tw(t,e):e}function H2(t,e,r=0){const i=[...t,e];return r&&i.length>r?i.slice(1):i}function $2(t,e,r=0){const i=[e,...t];return r&&i.length>r?i.slice(0,-1):i}var wp=Symbol();function Aw(t,e){return!t.queryFn&&e?.initialPromise?()=>e.initialPromise:!t.queryFn||t.queryFn===wp?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}function q2(t,e,r){let i=!1,o;return Object.defineProperty(t,"signal",{enumerable:!0,get:()=>(o??=e(),i||(i=!0,o.aborted?r():o.addEventListener("abort",r,{once:!0})),o)}),t}var Rw=(()=>{let t=()=>D2;return{isServer(){return t()},setIsServer(e){t=e}}})();function V2(){let t,e;const r=new Promise((o,c)=>{t=o,e=c});r.status="pending",r.catch(()=>{});function i(o){Object.assign(r,o),delete r.resolve,delete r.reject}return r.resolve=o=>{i({status:"fulfilled",value:o}),t(o)},r.reject=o=>{i({status:"rejected",reason:o}),e(o)},r}var G2=j2;function K2(){let t=[],e=0,r=f=>{f()},i=f=>{f()},o=G2;
vendor: 25,899 bytes, line 41
41const c=f=>{e?t.push(f):o(()=>{r(f)})},u=()=>{const f=t;t=[],f.length&&o(()=>{i(()=>{f.forEach(h=>{r(h)})})})};return{batch:f=>{let h;e++;try{h=f()}finally{e--,e||u()}return h},batchCalls:f=>(...h)=>{c(()=>{f(...h)})},schedule:c,setNotifyFunction:f=>{r=f},setBatchNotifyFunction:f=>{i=f},setScheduler:f=>{o=f}}}var $t=K2(),F2=class extends Cu{#e=!0;#t;#n;constructor(){super(),this.#n=t=>{if(typeof window<"u"&&window.addEventListener){const e=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",e,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",e),window.removeEventListener("offline",r)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(t){this.#n=t,this.#t?.(),this.#t=t(this.setOnline.bind(this))}setOnline(t){this.#e!==t&&(this.#e=t,this.listeners.forEach(r=>{r(t)}))}isOnline(){return this.#e}},du=new F2;function Y2(t){return Math.min(1e3*2**t,3e4)}function Ow(t){return(t??"online")==="online"?du.isOnline():!0}var Vh=class extends Error{constructor(t){super("CancelledError"),this.revert=t?.revert,this.silent=t?.silent}};function kw(t){let e=!1,r=0,i;const o=V2(),c=()=>o.status!=="pending",u=E=>{if(!c()){const A=new Vh(E);b(A),t.onCancel?.(A)}},f=()=>{e=!0},h=()=>{e=!1},m=()=>Ew.isFocused()&&(t.networkMode==="always"||du.isOnline())&&t.canRun(),y=()=>Ow(t.networkMode)&&t.canRun(),g=E=>{c()||(i?.(),o.resolve(E))},b=E=>{c()||(i?.(),o.reject(E))},_=()=>new Promise(E=>{i=A=>{(c()||m())&&E(A)},t.onPause?.()}).then(()=>{i=void 0,c()||t.onContinue?.()}),S=()=>{if(c())return;let E;const A=r===0?t.initialPromise:void 0;try{E=A??t.fn()}catch(T){E=Promise.reject(T)}Promise.resolve(E).then(g).catch(T=>{if(c())return;const C=t.retry??(Rw.isServer()?0:3),x=t.retryDelay??Y2,B=typeof x=="function"?x(r,T):x,Z=C===!0||typeof C=="number"&&r<C||typeof C=="function"&&C(r,T);if(e||!Z){b(T);return}r++,t.onFail?.(r,T),B2(B).then(()=>m()?void 0:_()).then(()=>{e?b(T):S()})})};return{promise:o,status:()=>o.status,cancel:u,continue:()=>(i?.(),o),cancelRetry:f,continueRetry:h,canStart:y,start:()=>(y()?S():_().then(S),o)}}var Cw=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),M2(this.gcTime)&&(this.#e=Hh.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(Rw.isServer()?1/0:300*1e3))}clearGcTimeout(){this.#e!==void 0&&(Hh.clearTimeout(this.#e),this.#e=void 0)}};function Z2(t){return{onFetch:(e,r)=>{const i=e.options,o=e.fetchOptions?.meta?.fetchMore?.direction,c=e.state.data?.pages||[],u=e.state.data?.pageParams||[];let f={pages:[],pageParams:[]},h=0;const m=async()=>{let y=!1;const g=S=>{q2(S,()=>e.signal,()=>y=!0)},b=Aw(e.options,e.fetchOptions),_=async(S,E,A)=>{if(y)return Promise.reject(e.signal.reason);if(E==null&&S.pages.length)return Promise.resolve(S);const C=(()=>{const z={client:e.client,queryKey:e.queryKey,pageParam:E,direction:A?"backward":"forward",meta:e.options.meta};return g(z),z})(),x=await b(C),{maxPages:B}=e.options,Z=A?$2:H2;return{pages:Z(S.pages,x,B),pageParams:Z(S.pageParams,E,B)}};if(o&&c.length){const S=o==="backward",E=S?J2:K0,A={pages:c,pageParams:u},T=E(i,A);f=await _(A,T,S)}else{const S=t??c.length;do{const E=h===0?u[0]??i.initialPageParam:K0(i,f);if(h>0&&E==null)break;f=await _(f,E),h++}while(h<S)}return f};e.options.persister?e.fetchFn=()=>e.options.persister?.(m,{client:e.client,queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},r):e.fetchFn=m}}}function K0(t,{pages:e,pageParams:r}){const i=e.length-1;return e.length>0?t.getNextPageParam(e[i],e,r[i],r):void 0}function J2(t,{pages:e,pageParams:r}){return e.length>0?t.getPreviousPageParam?.(e[0],e,r[0],r):void 0}var Q2=class extends Cw{#e;#t;#n;#s;#i;#r;#l;#a;constructor(t){super(),this.#a=!1,this.#l=t.defaultOptions,this.setOptions(t.options),this.observers=[],this.#i=t.client,this.#s=this.#i.getQueryCache(),this.queryKey=t.queryKey,this.queryHash=t.queryHash,this.#t=Y0(this.options),this.state=t.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#e}get promise(){return this.#r?.promise}setOptions(t){if(this.options={...this.#l,...t},t?._type&&(this.#e=t._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const e=Y0(this.options);e.data!==void 0&&(this.setState(F0(e.data,e.dataUpdatedAt)),this.#t=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#s.remove(this)}setData(t,e){const r=I2(this.state.data,t,this.options);return this.#o({data:r,type:"success",dataUpdatedAt:e?.updatedAt,manual:e?.manual}),r}setState(t){this.#o({type:"setState",state:t})}cancel(t){const e=this.#r?.promise;return this.#r?.cancel(t),e?e.then(Pn).catch(Pn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#t}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>z2(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===wp||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>$h(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!U2(this.state.dataUpdatedAt,t)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#r?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#r?.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),this.#s.notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(e=>e!==t),this.observers.length||(this.#r&&(this.#a||this.#c()?this.#r.cancel({revert:!0}):this.#r.cancelRetry()),this.scheduleGc()),this.#s.notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}#c(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"}invalidate(){this.state.isInvalidated||this.#o({type:"invalidate"})}async fetch(t,e){if(this.state.fetchStatus!=="idle"&&this.#r?.status()!=="rejected"){if(this.state.data!==void 0&&e?.cancelRefetch)this.cancel({silent:!0});else if(this.#r)return this.#r.continueRetry(),this.#r.promise}if(t&&this.setOptions(t),!this.options.queryFn){const h=this.observers.find(m=>m.options.queryFn);h&&this.setOptions(h.options)}const r=new AbortController,i=h=>{Object.defineProperty(h,"signal",{enumerable:!0,get:()=>(this.#a=!0,r.signal)})},o=()=>{const h=Aw(this.options,e),y=(()=>{const g={client:this.#i,queryKey:this.queryKey,meta:this.meta};return i(g),g})();return this.#a=!1,this.options.persister?this.options.persister(h,y,this):h(y)},u=(()=>{const h={fetchOptions:e,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:o};return i(h),h})();(this.#e==="infinite"?Z2(this.options.pages):this.options.behavior)?.onFetch(u,this),this.#n=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==u.fetchOptions?.meta)&&this.#o({type:"fetch",meta:u.fetchOptions?.meta}),this.#r=kw({initialPromise:e?.initialPromise,fn:u.fetchFn,onCancel:h=>{h instanceof Vh&&h.revert&&this.setState({...this.#n,fetchStatus:"idle"}),r.abort()},onFail:(h,m)=>{this.#o({type:"failed",failureCount:h,error:m})},onPause:()=>{this.#o({type:"pause"})},onContinue:()=>{this.#o({type:"continue"})},retry:u.options.retry,retryDelay:u.options.retryDelay,networkMode:u.options.networkMode,canRun:()=>!0});try{const h=await this.#r.start();if(h===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(h),this.#s.config.onSuccess?.(h,this),this.#s.config.onSettled?.(h,this.state.error,this),h}catch(h){if(h instanceof Vh){if(h.silent)return this.#r.promise;if(h.revert){if(this.state.data===void 0)throw h;return this.state.data}}throw this.#o({type:"error",error:h}),this.#s.config.onError?.(h,this),this.#s.config.onSettled?.(this.state.data,h,this),h}finally{this.scheduleGc()}}#o(t){const e=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...X2(r.data,this.options),fetchMeta:t.meta??null};case"success":const i={...r,...F0(t.data,t.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#n=t.manual?i:void 0,i;case"error":const o=t.error;return{...r,error:o,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=e(this.state),$t.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),this.#s.notify({query:this,type:"updated",action:t})})}};function X2(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Ow(e.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function F0(t,e){return{data:t,dataUpdatedAt:e??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Y0(t){const e=typeof t.initialData=="function"?t.initialData():t.initialData,r=e!==void 0,i=r?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:r?i??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var W2=class extends Cw{#e;#t;#n;#s;constructor(t){super(),this.#e=t.client,this.mutationId=t.mutationId,this.#n=t.mutationCache,this.#t=[],this.state=t.state||eN(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){this.#t.includes(t)||(this.#t.push(t),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){this.#t=this.#t.filter(e=>e!==t),this.scheduleGc(),this.#n.notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){this.#t.length||(this.state.status==="pending"?this.scheduleGc():this.#n.remove(this))}continue(){return this.#s?.continue()??this.execute(this.state.variables)}async execute(t){const e=()=>{this.#i({type:"continue"})},r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#s=kw({fn:()=>this.options.mutationFn?this.options.mutationFn(t,r):Promise.reject(new Error("No mutationFn found")),onFail:(c,u)=>{this.#i({type:"failed",failureCount:c,error:u})},onPause:()=>{this.#i({type:"pause"})},onContinue:e,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});const i=this.state.status==="pending",o=!this.#s.canStart();try{if(i)e();else{this.#i({type:"pending",variables:t,isPaused:o}),this.#n.config.onMutate&&await this.#n.config.onMutate(t,this,r);const u=await this.options.onMutate?.(t,r);u!==this.state.context&&this.#i({type:"pending",context:u,variables:t,isPaused:o})}const c=await this.#s.start();return await this.#n.config.onSuccess?.(c,t,this.state.context,this,r),await this.options.onSuccess?.(c,t,this.state.context,r),await this.#n.config.onSettled?.(c,null,this.state.variables,this.state.context,this,r),await this.options.onSettled?.(c,null,t,this.state.context,r),this.#i({type:"success",data:c}),c}catch(c){try{await this.#n.config.onError?.(c,t,this.state.context,this,r)}catch(u){Promise.reject(u)}try{await this.options.onError?.(c,t,this.state.context,r)}catch(u){Promise.reject(u)}try{await this.#n.config.onSettled?.(void 0,c,this.state.variables,this.state.context,this,r)}catch(u){Promise.reject(u)}try{await this.options.onSettled?.(void 0,c,t,this.state.context,r)}catch(u){Promise.reject(u)}throw this.#i({type:"error",error:c}),c}finally{this.#n.runNext(this)}}#i(t){const e=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=e(this.state),$t.batch(()=>{this.#t.forEach(r=>{r.onMutationUpdate(t)}),this.#n.notify({mutation:this,type:"updated",action:t})})}};function eN(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var tN=class extends Cu{constructor(t={}){super(),this.config=t,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(t,e,r){const i=new W2({client:t,mutationCache:this,mutationId:++this.#n,options:t.defaultMutationOptions(e),state:r});return this.add(i),i}add(t){this.#e.add(t);const e=Hc(t);if(typeof e=="string"){const r=this.#t.get(e);r?r.push(t):this.#t.set(e,[t])}this.notify({type:"added",mutation:t})}remove(t){if(this.#e.delete(t)){const e=Hc(t);if(typeof e=="string"){const r=this.#t.get(e);if(r)if(r.length>1){const i=r.indexOf(t);i!==-1&&r.splice(i,1)}else r[0]===t&&this.#t.delete(e)}}this.notify({type:"removed",mutation:t})}canRun(t){const e=Hc(t);if(typeof e=="string"){const i=this.#t.get(e)?.find(o=>o.state.status==="pending");return!i||i===t}else return!0}runNext(t){const e=Hc(t);return typeof e=="string"?this.#t.get(e)?.find(i=>i!==t&&i.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){$t.batch(()=>{this.#e.forEach(t=>{this.notify({type:"removed",mutation:t})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(t){const e={exact:!0,...t};return this.getAll().find(r=>q0(e,r))}findAll(t={}){return this.getAll().filter(e=>q0(t,e))}notify(t){$t.batch(()=>{this.listeners.forEach(e=>{e(t)})})}resumePausedMutations(){const t=this.getAll().filter(e=>e.state.isPaused);return $t.batch(()=>Promise.all(t.map(e=>e.continue().catch(Pn))))}};function Hc(t){return t.options.scope?.id}var nN=class extends Cu{constructor(t={}){super(),this.config=t,this.#e=new Map}#e;build(t,e,r){const i=e.queryKey,o=e.queryHash??_p(i,e);let c=this.get(o);return c||(c=new Q2({client:t,queryKey:i,queryHash:o,options:t.defaultQueryOptions(e),state:r,defaultOptions:t.getQueryDefaults(i)}),this.add(c)),c}add(t){this.#e.has(t.queryHash)||(this.#e.set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const e=this.#e.get(t.queryHash);e&&(t.destroy(),e===t&&this.#e.delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){$t.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return this.#e.get(t)}getAll(){return[...this.#e.values()]}find(t){const e={exact:!0,...t};return this.getAll().find(r=>$0(e,r))}findAll(t={}){const e=this.getAll();return Object.keys(t).length>0?e.filter(r=>$0(t,r)):e}notify(t){$t.batch(()=>{this.listeners.forEach(e=>{e(t)})})}onFocus(){$t.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){$t.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},rN=class{#e;#t;#n;#s;#i;#r;#l;#a;constructor(t={}){this.#e=t.queryCache||new nN,this.#t=t.mutationCache||new tN,this.#n=t.defaultOptions||{},this.#s=new Map,this.#i=new Map,this.#r=0}mount(){this.#r++,this.#r===1&&(this.#l=Ew.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#a=du.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#r--,this.#r===0&&(this.#l?.(),this.#l=void 0,this.#a?.(),this.#a=void 0)}isFetching(t){return this.#e.findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return this.#t.findAll({...t,status:"pending"}).length}getQueryData(t){const e=this.defaultQueryOptions({queryKey:t});return this.#e.get(e.queryHash)?.state.data}ensureQueryData(t){const e=this.defaultQueryOptions(t),r=this.#e.build(this,e),i=r.state.data;return i===void 0?this.fetchQuery(t):(t.revalidateIfStale&&r.isStaleByTime($h(e.staleTime,r))&&this.prefetchQuery(e),Promise.resolve(i))}getQueriesData(t){return this.#e.findAll(t).map(({queryKey:e,state:r})=>{const i=r.data;return[e,i]})}setQueryData(t,e,r){const i=this.defaultQueryOptions({queryKey:t}),c=this.#e.get(i.queryHash)?.state.data,u=L2(e,c);if(u!==void 0)return this.#e.build(this,i).setData(u,{...r,manual:!0})}setQueriesData(t,e,r){return $t.batch(()=>this.#e.findAll(t).map(({queryKey:i})=>[i,this.setQueryData(i,e,r)]))}getQueryState(t){const e=this.defaultQueryOptions({queryKey:t});return this.#e.get(e.queryHash)?.state}removeQueries(t){const e=this.#e;$t.batch(()=>{e.findAll(t).forEach(r=>{e.remove(r)})})}resetQueries(t,e){const r=this.#e;return $t.batch(()=>(r.findAll(t).forEach(i=>{i.reset()}),this.refetchQueries({type:"active",...t},e)))}cancelQueries(t,e={}){const r={revert:!0,...e},i=$t.batch(()=>this.#e.findAll(t).map(o=>o.cancel(r)));return Promise.all(i).then(Pn).catch(Pn)}invalidateQueries(t,e={}){return $t.batch(()=>(this.#e.findAll(t).forEach(r=>{r.invalidate()}),t?.refetchType==="none"?Promise.resolve():this.refetchQueries({...t,type:t?.refetchType??t?.type??"active"},e)))}refetchQueries(t,e={}){const r={...e,cancelRefetch:e.cancelRefetch??!0},i=$t.batch(()=>this.#e.findAll(t).filter(o=>!o.isDisabled()&&!o.isStatic()).map(o=>{let c=o.fetch(void 0,r);return r.throwOnError||(c=c.catch(Pn)),o.state.fetchStatus==="paused"?Promise.resolve():c}));return Promise.all(i).then(Pn)}fetchQuery(t){const e=this.defaultQueryOptions(t);e.retry===void 0&&(e.retry=!1);const r=this.#e.build(this,e);return r.isStaleByTime($h(e.staleTime,r))?r.fetch(e):Promise.resolve(r.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(Pn).catch(Pn)}fetchInfiniteQuery(t){return t._type="infinite",this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(Pn).catch(Pn)}ensureInfiniteQueryData(t){return t._type="infinite",this.ensureQueryData(t)}resumePausedMutations(){return du.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(t){this.#n=t}setQueryDefaults(t,e){this.#s.set(nl(t),{queryKey:t,defaultOptions:e})}getQueryDefaults(t){const e=[...this.#s.values()],r={};return e.forEach(i=>{rl(t,i.queryKey)&&Object.assign(r,i.defaultOptions)}),r}setMutationDefaults(t,e){this.#i.set(nl(t),{mutationKey:t,defaultOptions:e})}getMutationDefaults(t){const e=[...this.#i.values()],r={};return e.forEach(i=>{rl(t,i.mutationKey)&&Object.assign(r,i.defaultOptions)}),r}defaultQueryOptions(t){if(t._defaulted)return t;const e={...this.#n.queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return e.queryHash||(e.queryHash=_p(e.queryKey,e)),e.refetchOnReconnect===void 0&&(e.refetchOnReconnect=e.networkMode!=="always"),e.throwOnError===void 0&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.queryFn===wp&&(e.enabled=!1),e}defaultMutationOptions(t){return t?._defaulted?t:{...this.#n.mutations,...t?.mutationKey&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},sN=_e.createContext(void 0),iN=({client:t,children:e})=>(_e.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),X.jsx(sN.Provider,{value:t,children:e}));const aN="/assets/styles-3v6nX6W-.css";var oN=vb();const lN=yb(oN);function cN(t){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=t:r.appendChild(document.createTextNode(t))}const uN=t=>{switch(t){case"success":return hN;case"info":return mN;case"warning":return pN;case"error":return gN;default:return null}},dN=Array(12).fill(0),fN=({visible:t,className:e})=>W.createElement("div",{className:["sonner-loading-wrapper",e].filter(Boolean).join(" "),"data-visible":t},W.createElement("div",{className:"sonner-spinner"},dN.map((r,i)=>W.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${i}`})))),hN=W.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},W.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"})),pN=W.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},W.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"})),mN=W.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},W.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"})),gN=W.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},W.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"})),yN=W.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"},W.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),W.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),vN=()=>{const[t,e]=W.useState(document.hidden);return W.useEffect(()=>{const r=()=>{e(document.hidden)};return document.addEventListener("visibilitychange",r),()=>window.removeEventListener("visibilitychange",r)},[]),t};let Gh=1;class bN{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:i,...o}=e,c=typeof e?.id=="number"||((r=e.id)==null?void 0:r.length)>0?e.id:Gh++,u=this.toasts.find(h=>h.id===c),f=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(c)&&this.dismissedToasts.delete(c),u?this.toasts=this.toasts.map(h=>h.id===c?(this.publish({...h,...e,id:c,title:i}),{...h,...e,id:c,dismissible:f,title:i}):h):this.addToast({title:i,...o,dismissible:f,id:c}),c},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(i=>i({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 i;r.loading!==void 0&&(i=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 c=i!==void 0,u;const f=o.then(async m=>{if(u=["resolve",m],W.isValidElement(m))c=!1,this.create({id:i,type:"default",message:m});else if(wN(m)&&!m.ok){c=!1;const g=typeof r.error=="function"?await r.error(`HTTP error! status: ${m.status}`):r.error,b=typeof r.description=="function"?await r.description(`HTTP error! status: ${m.status}`):r.description,S=typeof g=="object"&&!W.isValidElement(g)?g:{message:g};this.create({id:i,type:"error",description:b,...S})}else if(m instanceof Error){c=!1;const g=typeof r.error=="function"?await r.error(m):r.error,b=typeof r.description=="function"?await r.description(m):r.description,S=typeof g=="object"&&!W.isValidElement(g)?g:{message:g};this.create({id:i,type:"error",description:b,...S})}else if(r.success!==void 0){c=!1;const g=typeof r.success=="function"?await r.success(m):r.success,b=typeof r.description=="function"?await r.description(m):r.description,S=typeof g=="object"&&!W.isValidElement(g)?g:{message:g};this.create({id:i,type:"success",description:b,...S})}}).catch(async m=>{if(u=["reject",m],r.error!==void 0){c=!1;const y=typeof r.error=="function"?await r.error(m):r.error,g=typeof r.description=="function"?await r.description(m):r.description,_=typeof y=="object"&&!W.isValidElement(y)?y:{message:y};this.create({id:i,type:"error",description:g,..._})}}).finally(()=>{c&&(this.dismiss(i),i=void 0),r.finally==null||r.finally.call(r)}),h=()=>new Promise((m,y)=>f.then(()=>u[0]==="reject"?y(u[1]):m(u[1])).catch(y));
vendor: 772 bytes, line 41
41return typeof i!="string"&&typeof i!="number"?{unwrap:h}:Object.assign(i,{unwrap:h})},this.custom=(e,r)=>{const i=r?.id||Gh++;return this.create({jsx:e(i),id:i,...r}),i},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const nn=new bN,_N=(t,e)=>{const r=e?.id||Gh++;return nn.addToast({title:t,...e,id:r}),r},wN=t=>t&&typeof t=="object"&&"ok"in t&&typeof t.ok=="boolean"&&"status"in t&&typeof t.status=="number",SN=_N,EN=()=>nn.toasts,TN=()=>nn.getActiveToasts(),jD=Object.assign(SN,{success:nn.success,info:nn.info,warning:nn.warning,error:nn.error,custom:nn.custom,message:nn.message,promise:nn.promise,dismiss:nn.dismiss,loading:nn.loading},{getHistory:EN,getToasts:TN});cN
vendor: 14,873 bytes, line 41
41("[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
41$c(t){return t.label!==void 0}const AN=3,RN="24px",ON="16px",Z0=4e3,kN=356,CN=14,xN=45,NN=200;function Zn(...t){return t.filter(Boolean).join(" ")}function jN(t){const[e,r]=t.split("-"),i=[];return e&&i.push(e),r&&i.push(r),i}const DN=t=>
vendor: 8,703 bytes, line 41
41{var e,r,i,o,c,u,f,h,m;const{invert:y,toast:g,unstyled:b,interacting:_,setHeights:S,visibleToasts:E,heights:A,index:T,toasts:C,expanded:x,removeToast:B,defaultRichColors:Z,closeButton:z,style:D,cancelButtonStyle:Y,actionButtonStyle:ne,className:de="",descriptionClassName:G="",duration:K,position:ee,gap:ve,expandByDefault:oe,classNames:j,icons:F,closeButtonAriaLabel:ce="Close toast"}=t,[ke,we]=W.useState(null),[O,H]=W.useState(null),[q,Q]=W.useState(!1),[se,ge]=W.useState(!1),[he,pe]=W.useState(!1),[Me,zt]=W.useState(!1),[pn,Nt]=W.useState(!1),[ul,On]=W.useState(0),[ka,hi]=W.useState(0),Ns=W.useRef(g.duration||K||Z0),Ca=W.useRef(null),rn=W.useRef(null),xa=T===0,Na=T+1<=E,Pt=g.type,Pr=g.dismissible!==!1,Bt=g.className||"",xu=g.descriptionClassName||"",js=W.useMemo(()=>A.findIndex(Se=>Se.toastId===g.id)||0,[A,g.id]),dl=W.useMemo(()=>{var Se;return(Se=g.closeButton)!=null?Se:z},[g.closeButton,z]),Ds=W.useMemo(()=>g.duration||K||Z0,[g.duration,K]),ja=W.useRef(0),ir=W.useRef(0),fl=W.useRef(0),Br=W.useRef(null),[Ls,It]=ee.split("-"),kn=W.useMemo(()=>A.reduce((Se,We,vt)=>vt>=js?Se:Se+We.height,0),[A,js]),jt=vN(),Nu=g.invert||y,Da=Pt==="loading";ir.current=W.useMemo(()=>js*ve+kn,[js,kn]),W.useEffect(()=>{Ns.current=Ds},[Ds]),W.useEffect(()=>{Q(!0)},[]),W.useEffect(()=>{const Se=rn.current;if(Se){const We=Se.getBoundingClientRect().height;return hi(We),S(vt=>[{toastId:g.id,height:We,position:g.position},...vt]),()=>S(vt=>vt.filter(Dt=>Dt.toastId!==g.id))}},[S,g.id]),W.useLayoutEffect(()=>{if(!q)return;const Se=rn.current,We=Se.style.height;Se.style.height="auto";const vt=Se.getBoundingClientRect().height;Se.style.height=We,hi(vt),S(Dt=>Dt.find(tt=>tt.toastId===g.id)?Dt.map(tt=>tt.toastId===g.id?{...tt,height:vt}:tt):[{toastId:g.id,height:vt,position:g.position},...Dt])},[q,g.title,g.description,S,g.id,g.jsx,g.action,g.cancel]);const $n=W.useCallback(()=>{ge(!0),On(ir.current),S(Se=>Se.filter(We=>We.toastId!==g.id)),setTimeout(()=>{B(g)},NN)},[g,B,S,ir]);W.useEffect(()=>{if(g.promise&&Pt==="loading"||g.duration===1/0||g.type==="loading")return;let Se;return x||_||jt?(()=>{if(fl.current<ja.current){const Dt=new Date().getTime()-ja.current;Ns.current=Ns.current-Dt}fl.current=new Date().getTime()})():Ns.current!==1/0&&(ja.current=new Date().getTime(),Se=setTimeout(()=>{g.onAutoClose==null||g.onAutoClose.call(g,g),$n()},Ns.current)),()=>clearTimeout(Se)},[x,_,g,Pt,jt,$n]),W.useEffect(()=>{g.delete&&($n(),g.onDismiss==null||g.onDismiss.call(g,g))},[$n,g.delete]);function pi(){var Se;if(F?.loading){var We;return W.createElement("div",{className:Zn(j?.loader,g==null||(We=g.classNames)==null?void 0:We.loader,"sonner-loader"),"data-visible":Pt==="loading"},F.loading)}return W.createElement(fN,{className:Zn(j?.loader,g==null||(Se=g.classNames)==null?void 0:Se.loader),visible:Pt==="loading"})}const mi=g.icon||F?.[Pt]||uN(Pt);var Ms,qn;return W.createElement("li",{tabIndex:0,ref:rn,className:Zn(de,Bt,j?.toast,g==null||(e=g.classNames)==null?void 0:e.toast,j?.default,j?.[Pt],g==null||(r=g.classNames)==null?void 0:r[Pt]),"data-sonner-toast":"","data-rich-colors":(Ms=g.richColors)!=null?Ms:Z,"data-styled":!(g.jsx||g.unstyled||b),"data-mounted":q,"data-promise":!!g.promise,"data-swiped":pn,"data-removed":se,"data-visible":Na,"data-y-position":Ls,"data-x-position":It,"data-index":T,"data-front":xa,"data-swiping":he,"data-dismissible":Pr,"data-type":Pt,"data-invert":Nu,"data-swipe-out":Me,"data-swipe-direction":O,"data-expanded":!!(x||oe&&q),"data-testid":g.testId,style:{"--index":T,"--toasts-before":T,"--z-index":C.length-T,"--offset":`${se?ul:ir.current}px`,"--initial-height":oe?"auto":`${ka}px`,...D,...g.style},onDragEnd:()=>{pe(!1),we(null),Br.current=null},onPointerDown:Se=>{Se.button!==2&&(Da||!Pr||(Ca.current=new Date,On(ir.current),Se.target.setPointerCapture(Se.pointerId),Se.target.tagName!=="BUTTON"&&(pe(!0),Br.current={x:Se.clientX,y:Se.clientY})))},onPointerUp:()=>{var Se,We,vt;if(Me||!Pr)return;Br.current=null;const Dt=Number(((Se=rn.current)==null?void 0:Se.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Ir=Number(((We=rn.current)==null?void 0:We.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),tt=new Date().getTime()-((vt=Ca.current)==null?void 0:vt.getTime()),Gt=ke==="x"?Dt:Ir,Us=Math.abs(Gt)/tt;if(Math.abs(Gt)>=xN||Us>.11){On(ir.current),g.onDismiss==null||g.onDismiss.call(g,g),H(ke==="x"?Dt>0?"right":"left":Ir>0?"down":"up"),$n(),zt(!0);return}else{var Kt,Ft;(Kt=rn.current)==null||Kt.style.setProperty("--swipe-amount-x","0px"),(Ft=rn.current)==null||Ft.style.setProperty("--swipe-amount-y","0px")}Nt(!1),pe(!1),we(null)},onPointerMove:Se=>{var We,vt,Dt;if(!Br.current||!Pr||((We=window.getSelection())==null?void 0:We.toString().length)>0)return;const tt=Se.clientY-Br.current.y,Gt=Se.clientX-Br.current.x;var Us;const Kt=(Us=t.swipeDirections)!=null?Us:jN(ee);!ke&&(Math.abs(Gt)>1||Math.abs(tt)>1)&&we(Math.abs(Gt)>Math.abs(tt)?"x":"y");let Ft={x:0,y:0};const gi=Cn=>1/(1.5+Math.abs(Cn)/20);if(ke==="y"){if(Kt.includes("top")||Kt.includes("bottom"))if(Kt.includes("top")&&tt<0||Kt.includes("bottom")&&tt>0)Ft.y=tt;else{const Cn=tt*gi(tt);Ft.y=Math.abs(Cn)<Math.abs(tt)?Cn:tt}}else if(ke==="x"&&(Kt.includes("left")||Kt.includes("right")))if(Kt.includes("left")&&Gt<0||Kt.includes("right")&&Gt>0)Ft.x=Gt;else{const Cn=Gt*gi(Gt);Ft.x=Math.abs(Cn)<Math.abs(Gt)?Cn:Gt}(Math.abs(Ft.x)>0||Math.abs(Ft.y)>0)&&Nt(!0),(vt=rn.current)==null||vt.style.setProperty("--swipe-amount-x",`${Ft.x}px`),(Dt=rn.current)==null||Dt.style.setProperty("--swipe-amount-y",`${Ft.y}px`)}},dl&&!g.jsx&&Pt!=="loading"?W.createElement("button",{"aria-label":ce,"data-disabled":Da,"data-close-button":!0,onClick:Da||!Pr?()=>{}:()=>{$n(),g.onDismiss==null||g.onDismiss.call(g,g)},className:Zn(j?.closeButton,g==null||(i=g.classNames)==null?void 0:i.closeButton)},(qn=F?.close)!=null?qn:yN):null,(Pt||g.icon||g.promise)&&g.icon!==null&&(F?.[Pt]!==null||g.icon)?W.createElement("div",{"data-icon":"",className:Zn(j?.icon,g==null||(o=g.classNames)==null?void 0:o.icon)},g.promise||g.type==="loading"&&!g.icon?g.icon||pi():null,g.type!=="loading"?mi:null):null,W.createElement("div",{"data-content":"",className:Zn(j?.content,g==null||(c=g.classNames)==null?void 0:c.content)},W.createElement("div",{"data-title":"",className:Zn(j?.title,g==null||(u=g.classNames)==null?void 0:u.title)},g.jsx?g.jsx:typeof g.title=="function"?g.title():g.title),g.description?W.createElement("div",{"data-description":"",className:Zn(G,xu,j?.description,g==null||(f=g.classNames)==null?void 0:f.description)},typeof g.description=="function"?g.description():g.description):null),W.isValidElement(g.cancel)?g.cancel:g.cancel&&$c(g.cancel)?W.createElement("button",{"data-button":!0,"data-cancel":!0,style:g.cancelButtonStyle||Y,onClick:Se=>{$c(g.cancel)&&Pr&&(g.cancel.onClick==null||g.cancel.onClick.call(g.cancel,Se),$n())},className:Zn(j?.cancelButton,g==null||(h=g.classNames)==null?void 0:h.cancelButton)},g.cancel.label):null,W.isValidElement(g.action)?g.action:g.action&&$c(g.action)?W.createElement("button",{"data-button":!0,"data-action":!0,style:g.actionButtonStyle||ne,onClick:Se=>{$c(g.action)&&(g.action.onClick==null||g.action.onClick.call(g.action,Se),!Se.defaultPrevented&&$n())},className:Zn(j?.actionButton,g==null||(m=g.classNames)==null?void 0:m.actionButton)},g.action.label):null)};function J0(){if(typeof window>"u"||typeof document>"u")return"ltr";const t=document.documentElement.getAttribute("dir");return t==="auto"||!t?window.getComputedStyle(document.documentElement).direction:t}function LN(t,e){const r={};return[t,e].forEach((i,o)=>{const c=o===1,u=c?"--mobile-offset":"--offset",f=c?ON:RN;function h(m){["top","right","bottom","left"].forEach(y=>{r[`${u}-${y}`]=typeof m=="number"?`${m}px`:m})}typeof i=="number"||typeof i=="string"?h(i):typeof i=="object"?["top","right","bottom","left"].forEach(m=>{i[m]===void 0?r[`${u}-${m}`]=f:r[`${u}-${m}`]=typeof i[m]=="number"?`${i[m]}px`:i[m]}):h(f)}),r}const MN=W.forwardRef(function(e,r){const{id:i,invert:o,position:c="bottom-right",hotkey:u=["altKey","KeyT"],expand:f,closeButton:h,className:m,offset:y,mobileOffset:g,theme:b="light",richColors:_,duration:S,style:E,visibleToasts:A=AN,toastOptions:T,dir:C=J0(),gap:x=CN,icons:B,containerAriaLabel:Z="Notifications"}=e,[z,D]=W.useState([]),Y=W.useMemo(()=>i?z.filter(q=>q.toasterId===i):z.filter(q=>!q.toasterId),[z,i]),ne=W.useMemo(()=>Array.from(new Set([c].concat(Y.filter(q=>q.position).map(q=>q.position)))),[Y,c]),[de,G]=W.useState([]),[K,ee]=W.useState(!1),[ve,oe]=W.useState(!1),[j,F]=W.useState(b!=="system"?b:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dar
41k":"light"),ce=W.useRef(null),ke=u.join("+").replace(/Key/g,"").replace(/Digit/g,""),we=W.useRef(null),O=W.useRef(!1),H=W.useCallback(q=>{D(Q=>{var se;return(se=Q.find(ge=>ge.id===q.id))!=null&&se.delete||nn.dismiss(q.id),Q.filter(({id:ge})=>ge!==q.id)})},[]);return W.useEffect(()=>nn.subscribe(q=>{if(q.dismiss){requestAnimationFrame(()=>{D(Q=>Q.map(se=>se.id===q.id?{...se,delete:!0}:se))});return}setTimeout(()=>{lN.flushSync(()=>{D(Q=>{const se=Q.findIndex(ge=>ge.id===q.id);return se!==-1?[...Q.slice(0,se),{...Q[se],...q},...Q.slice(se+1)]:[q,...Q]})})})}),[z]),W.useEffect(()=>{if(b!=="system"){F(b);return}if(b==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?F("dark"):F("light")),typeof window>"u")return;const q=window.matchMedia("(prefers-color-scheme: dark)");try{q.addEventListener("change",({matches:Q})=>{F(Q?"dark":"light")})}catch{q.addListener(({matches:se})=>{try{F(se?"dark":"light")}catch(ge){console.error(ge)}})}},[b]),W.useEffect(()=>{z.length<=1&&ee(!1)},[z]),W.useEffect(()=>{const q=Q=>{var se;if(u.every(pe=>Q[pe]||Q.code===pe)){var he;ee(!0),(he=ce.current)==null||he.focus()}Q.code==="Escape"&&(document.activeElement===ce.current||(se=ce.current)!=null&&se.contains(document.activeElement))&&ee(!1)};return document.addEventListener("keydown",q),()=>document.removeEventListener("keydown",q)},[u]),W.useEffect(()=>{if(ce.current)return()=>{we.current&&(we.current.focus({preventScroll:!0}),we.current=null,O.current=!1)}},[ce.current]),W.createElement("section",{ref:r,"aria-label":`${Z} ${ke}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},ne.map((q,Q)=>{var se;const[ge,he]=q.split("-");return Y.length?W.createElement("ol",{key:q,dir:C==="auto"?J0():C,tabIndex:-1,ref:ce,className:m,"data-sonner-toaster":!0,"data-sonner-theme":j,"data-y-position":ge,"data-x-position":he,style:{"--front-toast-height":`${((se=de[0])==null?void 0:se.height)||0}px`,"--width":`${kN}px`,"--gap":`${x}px`,...E,...LN(y,g)},onBlur:pe=>{O.current&&!pe.currentTarget.contains(pe.relatedTarget)&&(O.current=!1,we.current&&(we.current.focus({preventScroll:!0}),we.current=null))},onFocus:pe=>{pe.target instanceof HTMLElement&&pe.target.dataset.dismissible==="false"||O.current||(O.current=!0,we.current=pe.relatedTarget)},onMouseEnter:()=>ee(!0),onMouseMove:()=>ee(!0),onMouseLeave:()=>{ve||ee(!1)},onDragEnd:()=>ee(!1),onPointerDown:pe=>{pe.target instanceof HTMLElement&&pe.target.dataset.dismissible==="false"||oe(!0)},onPointerUp:()=>oe(!1)},Y.filter(pe=>!pe.position&&Q===0||pe.position===q).map((pe,Me)=>{var zt,pn;return W.createElement(DN,{key:pe.id,icons:B,index:Me,toast:pe,defaultRichColors:_,duration:(zt=T?.duration)!=null?zt:S,className:T?.className,descriptionClassName:T?.descriptionClassName,invert:o,visibleToasts:A,closeButton:(pn=T?.closeButton)!=null?pn:h,interacting:ve,position:q,style:T?.style,unstyled:T?.unstyled,classNames:T?.classNames,cancelButtonStyle:T?.cancelButtonStyle,actionButtonStyle:T?.actionButtonStyle,closeButtonAriaLabel:T?.closeButtonAriaLabel,removeToast:H,toasts:Y.filter(Nt=>Nt.position==pe.position),heights:de.filter(Nt=>Nt.position==pe.position),setHeights:G,expandByDefault:f,gap:x,expanded:K,swipeDirections:e.swipeDirections})})):null}))}),UN=({...t})=>X.jsx(MN,{className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...t});function zN(){return X.jsx("div",{className:"flex min-h-screen items-center justify-center bg-background px-4",children:X.jsxs("div",{className:"max-w-md text-center",children:[X.jsx("h1",{className:"text-7xl font-bold text-foreground",children:"404"}),X.jsx("h2",{className:"mt-4 text-xl font-semibold text-foreground",children:"Page not found"}),X.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:"The page you're looking for doesn't exist or has been moved."}),X.jsx("div",{className:"mt-6",children:X.jsx(vp,{to:"/",className:"inline-flex items-center justify-center rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground transition-colors hover:bg-primary/90",children:"Go home"})})]})})}function PN({error:t,reset:e}){console.error(t);const r=Vt();return X.jsx("div",{className:"flex min-h-screen items-center justify-center bg-background px-4",children:X.jsxs("div",{className:"max-w-md text-center",children:[X.jsx("h1",{className:"text-xl font-semibold tracking-tight text-foreground",children:"This page didn't load"}),X.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:"Something went wrong on our end. You can try refreshing or head back home."}),X.jsxs("div",{className:"mt-6 flex flex-wrap justify-center gap-2",children:[X.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"}),X.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 mh="vera.ink â Check any document against the rules it must follow",gh="Checks a document against rules taken from the law, the standard or the policy itself. Every finding names the exact clause, with wording to fix it.",Q0="https://vera.ink/og.png",yt=JO()({head:()=>({meta:[{charSet:"utf-8"},{name:"viewport",content:"width=device-width, initial-scale=1"},{title:mh},{name:"description",content:gh},{name:"author",content:"vera.ink"},{property:"og:title",content:mh},{property:"og:description",content:gh},{property:"og:type",content:"website"},{property:"og:image",content:Q0}
41,{property:"og:image:width",content:"1200"},{property:"og:image:height",content:"630"},{name:"twitter:card",content:"summary_large_image"},{name:"twitter:site",content:"@vera_ink"},{name:"twitter:title",content:mh},{name:"twitter:description",content:gh},{name:"twitter:image",content:Q0}],links:[{rel:"stylesheet",href:aN},{rel:"preconnect",href:"https://fonts.googleapis.com"},{rel:"preconnect",href:"https://fonts.gstatic.com",crossOrigin:"anonymous"},{rel:"icon",type:"image/png",href:"/favicon.png"},{rel:"stylesheet",href:"https://fonts.googleapis.com/css2?family=DM+Mono:wght@300;400;500&family=Playfair+Display:wght@400;500;700&display=swap"}]}),shellComponent:BN,component:IN,notFoundComponent:zN,errorComponent:PN});function BN({children:t}){return X.jsxs("html",{lang:"en",children:[X.jsx("head",{children:X.jsx(pk,{})}),X.jsxs("body",{children:[t,X.jsx(gk,{})]})]})}function IN(){const{queryClient:t}=yt.useRouteContext();return X.jsxs(iN,{client:t,children:[X.jsx(J_,{}),X.jsx(UN,{})]})}const HN="modulepreload",$N=function(t){return"/"+t},X0={},At=function(e,r,i){let o=Promise.resolve();if(r&&r.length>0){let h=function(m){return Promise.all(m.map(y=>Promise.resolve(y).then(g=>({status:"fulfilled",value:g}),g=>({status:"rejected",reason:g}))))};document.getElementsByTagName("link");const u=document.querySelector("meta[property=csp-nonce]"),f=u?.nonce||u?.getAttribute("nonce");o=h(r.map(m=>{if(m=$N(m),m in X0)return;X0[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":HN,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 c(u){const f=new Event("vite:preloadError",{cancelable:!0});if(f.payload=u,window.dispatchEvent(f),!f.defaultPrevented)throw u}return o.then(u=>{for(const f of u||[])f.status==="rejected"&&c(f.reason);return e().catch(c)})},qN=()=>At(()=>import("./index-C-sfJ3Kd.js"),[]),VN=Et()({component:Tt(qN,"component")});async function ks({location:t}){const{data:{session:e}}=await Sw.auth.getSession();if(!e)throw Qh({to:"/sign-in",search:{redirect:t.href}})}const GN=()=>At(()=>import("./api-keys-BhVNQmSm.js"),__vite__mapDeps([0,1,2,3,4])),KN=Et()({beforeLoad:ks,head:()=>({meta:[{title:"API Keys â vera.ink"},{name:"description",content:"Manage secure ChatGPT connections and API keys for Claude, Cursor, or your own tools."}]}),component:Tt(GN,"component")});var Ie;(function(t){t.assertEqual=o=>{};function e(o){}t.assertIs=e;function r(o){throw new Error}t.assertNever=r,t.arrayToEnum=o=>{const c={};for(const u of o)c[u]=u;return c},t.getValidEnumValues=o=>{const c=t.objectKeys(o).filter(f=>typeof o[o[f]]!="number"),u={};for(const f of c)u[f]=o[f];return t.objectValues(u)},t.objectValues=o=>t.objectKeys(o).map(function(c){return o[c]}),t.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{const c=[];for(const u in o)Object.prototype.hasOwnProperty.call(o,u)&&c.push(u);return c},t.find=(o,c)=>{for(const u of o)if(c(u))return u},t.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&Number.isFinite(o)&&Math.floor(o)===o;function i(o,c=" | "){return o.map(u=>typeof u=="string"?`'${u}'`:u).join(c)}t.joinValues=i,t.jsonStringifyReplacer=(o,c)=>typeof c=="bigint"?c.toString():c})(Ie||(Ie={}));var W0;(function(t){t.mergeShapes=(e,r)=>({...e,...r})})(W0||(W0={}));const le=Ie.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),fs=t=>{switch(typeof t){case"undefined":return le.undefined;case"string":return le.string;case"number":return Number.isNaN(t)?le.nan:le.number;case"boolean":return le.boolean;case"function":return le.function;case"bigint":return le.bigint;case"symbol":return le.symbol;case"object":return Array.isArray(t)?le.array:t===null?le.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?le.promise:typeof Map<"u"&&t instanceof Map?le.map:typeof Set<"u"&&t instanceof Set?le.set:typeof Date<"u"&&t instanceof Date?le.date:le.object;default:return le.unknown}}
vendor: 16,389 bytes, line 41
41,J=Ie.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 Ur extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=i=>{this.issues=[...this.issues,i]},this.addIssues=(i=[])=>{this.issues=[...this.issues,...i]};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(c){return c.message},i={_errors:[]},o=c=>{for(const u of c.issues)if(u.code==="invalid_union")u.unionErrors.map(o);else if(u.code==="invalid_return_type")o(u.returnTypeError);else if(u.code==="invalid_arguments")o(u.argumentsError);else if(u.path.length===0)i._errors.push(r(u));else{let f=i,h=0;for(;h<u.path.length;){const m=u.path[h];h===u.path.length-1?(f[m]=f[m]||{_errors:[]},f[m]._errors.push(r(u))):f[m]=f[m]||{_errors:[]},f=f[m],h++}}};return o(this),i}static assert(e){if(!(e instanceof Ur))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Ie.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=r=>r.message){const r={},i=[];for(const o of this.issues)if(o.path.length>0){const c=o.path[0];r[c]=r[c]||[],r[c].push(e(o))}else i.push(e(o));return{formErrors:i,fieldErrors:r}}get formErrors(){return this.flatten()}}Ur.create=t=>new Ur(t);const Kh=(t,e)=>{let r;switch(t.code){case J.invalid_type:t.received===le.undefined?r="Required":r=`Expected ${t.expected}, received ${t.received}`;break;case J.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(t.expected,Ie.jsonStringifyReplacer)}`;break;case J.unrecognized_keys:r=`Unrecognized key(s) in object: ${Ie.joinValues(t.keys,", ")}`;break;case J.invalid_union:r="Invalid input";break;case J.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${Ie.joinValues(t.options)}`;break;case J.invalid_enum_value:r=`Invalid enum value. Expected ${Ie.joinValues(t.options)}, received '${t.received}'`;break;case J.invalid_arguments:r="Invalid function arguments";break;case J.invalid_return_type:r="Invalid function return type";break;case J.invalid_date:r="Invalid date";break;case J.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(r=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?r=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?r=`Invalid input: must end with "${t.validation.endsWith}"`:Ie.assertNever(t.validation):t.validation!=="regex"?r=`Invalid ${t.validation}`:r="Invalid";break;case J.too_small:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="bigint"?r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:r="Invalid input";break;case J.too_big:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?r=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:r="Invalid input";break;case J.custom:r="Invalid input";break;case J.invalid_intersection_types:r="Intersection results could not be merged";break;case J.not_multiple_of:r=`Number must be a multiple of ${t.multipleOf}`;break;case J.not_finite:r="Number must be finite";break;default:r=e.defaultError,Ie.assertNever(t)}return{message:r}};let FN=Kh;function YN(){return FN}const ZN=t=>{const{data:e,path:r,errorMaps:i,issueData:o}=t,c=[...r,...o.path||[]],u={...o,path:c};if(o.message!==void 0)return{...o,path:c,message:o.message};let f="";const h=i.filter(m=>!!m).slice().reverse();for(const m of h)f=m(u,{data:e,defaultError:f}).message;return{...o,path:c,message:f}};function re(t,e){const r=YN(),i=ZN({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,r,r===Kh?void 0:Kh].filter(o=>!!o)});t.common.issues.push(i)}class hn{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,r){const i=[];for(const o of r){if(o.status==="aborted")return Te;o.status==="dirty"&&e.dirty(),i.push(o.value)}return{status:e.value,value:i}}static async mergeObjectAsync(e,r){const i=[];for(const o of r){const c=await o.key,u=await o.value;i.push({key:c,value:u})}return hn.mergeObjectSync(e,i)}static mergeObjectSync(e,r){const i={};for(const o of r){const{key:c,value:u}=o;if(c.status==="aborted"||u.status==="aborted")return Te;c.status==="dirty"&&e.dirty(),u.status==="dirty"&&e.dirty(),c.value!=="__proto__"&&(typeof u.value<"u"||o.alwaysSet)&&(i[c.value]=u.value)}return{status:e.value,value:i}}}const Te=Object.freeze({status:"aborted"}),Mo=t=>({status:"dirty",value:t}),Rn=t=>({status:"valid",value:t}),eb=t=>t.status==="aborted",tb=t=>t.status==="dirty",Sa=t=>t.status==="valid",fu=t=>typeof Promise<"u"&&t instanceof Promise;var fe;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message})(fe||(fe={}));class Ts{constructor(e,r,i,o){this._cachedPath=[],this.parent=e,this.data=r,this._path=i,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 nb=(t,e)=>{if(Sa(e))return{success:!0,data:e.value};if(!t.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 Ur(t.common.issues);return this._error=r,this._error}}};function Ce(t){if(!t)return{};const{errorMap:e,invalid_type_error:r,required_error:i,description:o}=t;if(e&&(r||i))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:(u,f)=>{const{message:h}=t;return u.code==="invalid_enum_value"?{message:h??f.defaultError}:typeof f.data>"u"?{message:h??i??f.defaultError}:u.code!=="invalid_type"?{message:f.defaultError}:{message:h??r??f.defaultError}},description:o}}class ze{get description(){return this._def.description}_getType(e){return fs(e.data)}_getOrReturnCtx(e,r){return r||{common:e.parent.common,data:e.data,parsedType:fs(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new hn,ctx:{common:e.parent.common,data:e.data,parsedType:fs(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const r=this._parse(e);if(fu(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 i=this.safeParse(e,r);if(i.success)return i.data;throw i.error}safeParse(e,r){const i={common:{issues:[],async:r?.async??!1,contextualErrorMap:r?.errorMap},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:fs(e)},o=this._parseSync({data:e,path:i.path,parent:i});return nb(i,o)}"~validate"(e){const r={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:fs(e)};if(!this["~standard"].async)try{const i=this._parseSync({data:e,path:[],parent:r});return Sa(i)?{value:i.value}:{issues:r.common.issues}}catch(i){i?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),r.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:r}).then(i=>Sa(i)?{value:i.value}:{issues:r.common.issues})}async parseAsync(e,r){const i=await this.safeParseAsync(e,r);if(i.success)return i.data;throw i.error}async safeParseAsync(e,r){const i={common:{issues:[],contextualErrorMap:r?.errorMap,async:!0},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:fs(e)},o=this._parse({data:e,path:i.path,parent:i}),c=await(fu(o)?o:Promise.resolve(o));return nb(i,c)}refine(e,r){const i=o=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(o):r;return this._refinement((o,c)=>{const u=e(o),f=()=>c.addIssue({code:J.custom,...i(o)});return typeof Promise<"u"&&u instanceof Promise?u.then(h=>h?!0:(f(),!1)):u?!0:(f(),!1)})}refinement(e,r){return this._refinement((i,o)=>e(i)?!0:(o.addIssue(typeof r=="function"?r(i,o):r),!1))}_refinement(e){return new Ta({schema:this,typeName:Ae.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 _s.create(this,this._def)}nullable(){return Aa.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return tr.create(this)}promise(){return yu.create(this,this._def)}or(e){return mu.create([this,e],this._def)}and(e){return gu.create(this,e,this._def)}transform(e){return new Ta({...Ce(this._def),schema:this,typeName:Ae.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const r=typeof e=="function"?e:()=>e;return new Yh({...Ce(this._def),innerType:this,defaultValue:r,typeName:Ae.ZodDefault})}brand(){return new vj({typeName:Ae.ZodBranded,type:this,...Ce(this._def)})}catch(e){const r=typeof e=="function"?e:()=>e;return new Zh({...Ce(this._def),innerType:this,catchValue:r,typeName:Ae.ZodCatch})}describe(e){const r=this.constructor;return new r({...this._def,description:e})}pipe(e){return Sp.create(this,e)}readonly(){return Jh.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const JN=/^c[^\s-]{8,}$/i,QN=/^[0-9a-z]+$/,XN=/^[0-9A-HJKMNP-TV-Z]{26}$/i,WN=/^[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,ej=/^[a-z0-9_-]{21}$/i,tj=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,nj=/^[-+]?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)?)??$/,rj=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,sj="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let yh;const ij=/^(?:(?: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])$/,aj=/^(?:(?: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])$/,oj=/^(([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]))$/,lj=/^(([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])$/,cj=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,uj=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,xw="((\\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])))",dj=new RegExp(`^${xw}$`);function Nw(t){let e="[0-5]\\d";t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`);const r=t.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${r}`}function fj(t){return new RegExp(`^${Nw(t)}$`)}function hj(t){let e=`${xw}T${Nw(t)}`;const r=[];return r.push(t.local?"Z?":"Z"),t.offset&&r.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${r.join("|")})`,new RegExp(`^${e}$`)}function pj(t,e){return!!((e==="v4"||!e)&&ij.test(t)||(e==="v6"||!e)&&oj.test(t))}function mj(t,e){if(!tj.test(t))return!1;try{const[r]=t.split(".");if(!r)return!1;const i=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),o=JSON.parse(atob(i));return!(typeof o!="object"||o===null||"typ"in o&&o?.typ!=="JWT"||!o.alg||e&&o.alg!==e)}catch{return!1}}function gj(t,e){return!!((e==="v4"||!e)&&aj.test(t)||(e==="v6"||!e)&&lj.test(t))}class ys extends ze{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==le.string){const c=this._getOrReturnCtx(e);return re(c,{code:J.invalid_type,expected:le.string,received:c.parsedType}),Te}const i=new hn;let o;for(const c of this._def.checks)if(c.kind==="min")e.data.length<c.value&&(o=this._getOrReturnCtx(e,o),re(o,{code:J.too_small,minimum:c.value,type:"string",inclusive:!0,exact:!1,message:c.message}),i.dirty());else if(c.kind==="max")e.data.length>c.value&&(o=this._getOrReturnCtx(e,o),re(o,{code:J.too_big,maximum:c.value,type:"string",inclusive:!0,exact:!1,message:c.message}),i.dirty());else if(c.kind==="length"){const u=e.data.length>c.value,f=e.data.length<c.value;(u||f)&&(o=this._getOrReturnCtx(e,o),u?re(o,{code:J.too_big,maximum:c.value,type:"string",inclusive:!0,exact:!0,message:c.message}):f&&re(o,{code:J.too_small,minimum:c.value,type:"string",inclusive:!0,exact:!0,message:c.message}),i.dirty())}else if(c.kind==="email")rj.test(e.data)||(o=this._getOrReturnCtx(e,o),re(o,{validation:"email",code:J.invalid_string,message:c.message}),i.dirty());
vendor: 5,821 bytes, line 41
41else if(c.kind==="emoji")yh||(yh=new RegExp(sj,"u")),yh.test(e.data)||(o=this._getOrReturnCtx(e,o),re(o,{validation:"emoji",code:J.invalid_string,message:c.message}),i.dirty());else if(c.kind==="uuid")WN.test(e.data)||(o=this._getOrReturnCtx(e,o),re(o,{validation:"uuid",code:J.invalid_string,message:c.message}),i.dirty());else if(c.kind==="nanoid")ej.test(e.data)||(o=this._getOrReturnCtx(e,o),re(o,{validation:"nanoid",code:J.invalid_string,message:c.message}),i.dirty());else if(c.kind==="cuid")JN.test(e.data)||(o=this._getOrReturnCtx(e,o),re(o,{validation:"cuid",code:J.invalid_string,message:c.message}),i.dirty());else if(c.kind==="cuid2")QN.test(e.data)||(o=this._getOrReturnCtx(e,o),re(o,{validation:"cuid2",code:J.invalid_string,message:c.message}),i.dirty());else if(c.kind==="ulid")XN.test(e.data)||(o=this._getOrReturnCtx(e,o),re(o,{validation:"ulid",code:J.invalid_string,message:c.message}),i.dirty());else if(c.kind==="url")try{new URL(e.data)}catch{o=this._getOrReturnCtx(e,o),re(o,{validation:"url",code:J.invalid_string,message:c.message}),i.dirty()}else c.kind==="regex"?(c.regex.lastIndex=0,c.regex.test(e.data)||(o=this._getOrReturnCtx(e,o),re(o,{validation:"regex",code:J.invalid_string,message:c.message}),i.dirty())):c.kind==="trim"?e.data=e.data.trim():c.kind==="includes"?e.data.includes(c.value,c.position)||(o=this._getOrReturnCtx(e,o),re(o,{code:J.invalid_string,validation:{includes:c.value,position:c.position},message:c.message}),i.dirty()):c.kind==="toLowerCase"?e.data=e.data.toLowerCase():c.kind==="toUpperCase"?e.data=e.data.toUpperCase():c.kind==="startsWith"?e.data.startsWith(c.value)||(o=this._getOrReturnCtx(e,o),re(o,{code:J.invalid_string,validation:{startsWith:c.value},message:c.message}),i.dirty()):c.kind==="endsWith"?e.data.endsWith(c.value)||(o=this._getOrReturnCtx(e,o),re(o,{code:J.invalid_string,validation:{endsWith:c.value},message:c.message}),i.dirty()):c.kind==="datetime"?hj(c).test(e.data)||(o=this._getOrReturnCtx(e,o),re(o,{code:J.invalid_string,validation:"datetime",message:c.message}),i.dirty()):c.kind==="date"?dj.test(e.data)||(o=this._getOrReturnCtx(e,o),re(o,{code:J.invalid_string,validation:"date",message:c.message}),i.dirty()):c.kind==="time"?fj(c).test(e.data)||(o=this._getOrReturnCtx(e,o),re(o,{code:J.invalid_string,validation:"time",message:c.message}),i.dirty()):c.kind==="duration"?nj.test(e.data)||(o=this._getOrReturnCtx(e,o),re(o,{validation:"duration",code:J.invalid_string,message:c.message}),i.dirty()):c.kind==="ip"?pj(e.data,c.version)||(o=this._getOrReturnCtx(e,o),re(o,{validation:"ip",code:J.invalid_string,message:c.message}),i.dirty()):c.kind==="jwt"?mj(e.data,c.alg)||(o=this._getOrReturnCtx(e,o),re(o,{validation:"jwt",code:J.invalid_string,message:c.message}),i.dirty()):c.kind==="cidr"?gj(e.data,c.version)||(o=this._getOrReturnCtx(e,o),re(o,{validation:"cidr",code:J.invalid_string,message:c.message}),i.dirty()):c.kind==="base64"?cj.test(e.data)||(o=this._getOrReturnCtx(e,o),re(o,{validation:"base64",code:J.invalid_string,message:c.message}),i.dirty()):c.kind==="base64url"?uj.test(e.data)||(o=this._getOrReturnCtx(e,o),re(o,{validation:"base64url",code:J.invalid_string,message:c.message}),i.dirty()):Ie.assertNever(c);return{status:i.value,value:e.data}}_regex(e,r,i){return this.refinement(o=>e.test(o),{validation:r,code:J.invalid_string,...fe.errToObj(i)})}_addCheck(e){return new ys({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...fe.errToObj(e)})}url(e){return this._addCheck({kind:"url",...fe.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...fe.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...fe.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...fe.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...fe.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...fe.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...fe.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...fe.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...fe.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...fe.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...fe.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...fe.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,...fe.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,...fe.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...fe.errToObj(e)})}regex(e,r){return this._addCheck({kind:"regex",regex:e,...fe.errToObj(r)})}includes(e,r){return this._addCheck({kind:"includes",value:e,position:r?.position,...fe.errToObj(r?.message)})}startsWith(e,r){return this._addCheck({kind:"startsWith",value:e,...fe.errToObj(r)})}endsWith(e,r){return this._addCheck({kind:"endsWith",value:e,...fe.errToObj(r)})}min(e,r){return this._addCheck({kind:"min",value:e,...fe.errToObj(r)})}max(e,r){return this._addCheck({kind:"max",value:e,...fe.errToObj(r)})}length(e,r){return this._addCheck({kind:"length",value:e,...fe.errToObj(r)})}nonempty(e){return this.min(1,fe.errToObj(e))}trim(){return new ys({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new ys({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new ys({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}
vendor: 23,257 bytes, line 41
41get 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}}ys.create=t=>new ys({checks:[],typeName:Ae.ZodString,coerce:t?.coerce??!1,...Ce(t)});function yj(t,e){const r=(t.toString().split(".")[1]||"").length,i=(e.toString().split(".")[1]||"").length,o=r>i?r:i,c=Number.parseInt(t.toFixed(o).replace(".","")),u=Number.parseInt(e.toFixed(o).replace(".",""));return c%u/10**o}class sl 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)!==le.number){const c=this._getOrReturnCtx(e);return re(c,{code:J.invalid_type,expected:le.number,received:c.parsedType}),Te}let i;const o=new hn;for(const c of this._def.checks)c.kind==="int"?Ie.isInteger(e.data)||(i=this._getOrReturnCtx(e,i),re(i,{code:J.invalid_type,expected:"integer",received:"float",message:c.message}),o.dirty()):c.kind==="min"?(c.inclusive?e.data<c.value:e.data<=c.value)&&(i=this._getOrReturnCtx(e,i),re(i,{code:J.too_small,minimum:c.value,type:"number",inclusive:c.inclusive,exact:!1,message:c.message}),o.dirty()):c.kind==="max"?(c.inclusive?e.data>c.value:e.data>=c.value)&&(i=this._getOrReturnCtx(e,i),re(i,{code:J.too_big,maximum:c.value,type:"number",inclusive:c.inclusive,exact:!1,message:c.message}),o.dirty()):c.kind==="multipleOf"?yj(e.data,c.value)!==0&&(i=this._getOrReturnCtx(e,i),re(i,{code:J.not_multiple_of,multipleOf:c.value,message:c.message}),o.dirty()):c.kind==="finite"?Number.isFinite(e.data)||(i=this._getOrReturnCtx(e,i),re(i,{code:J.not_finite,message:c.message}),o.dirty()):Ie.assertNever(c);return{status:o.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,fe.toString(r))}gt(e,r){return this.setLimit("min",e,!1,fe.toString(r))}lte(e,r){return this.setLimit("max",e,!0,fe.toString(r))}lt(e,r){return this.setLimit("max",e,!1,fe.toString(r))}setLimit(e,r,i,o){return new sl({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:i,message:fe.toString(o)}]})}_addCheck(e){return new sl({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:fe.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:fe.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:fe.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:fe.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:fe.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:fe.toString(r)})}finite(e){return this._addCheck({kind:"finite",message:fe.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:fe.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:fe.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"&&Ie.isInteger(e.value))}get isFinite(){let e=null,r=null;for(const i of this._def.checks){if(i.kind==="finite"||i.kind==="int"||i.kind==="multipleOf")return!0;i.kind==="min"?(r===null||i.value>r)&&(r=i.value):i.kind==="max"&&(e===null||i.value<e)&&(e=i.value)}return Number.isFinite(r)&&Number.isFinite(e)}}sl.create=t=>new sl({checks:[],typeName:Ae.ZodNumber,coerce:t?.coerce||!1,...Ce(t)});class il 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)!==le.bigint)return this._getInvalidInput(e);let i;const o=new hn;for(const c of this._def.checks)c.kind==="min"?(c.inclusive?e.data<c.value:e.data<=c.value)&&(i=this._getOrReturnCtx(e,i),re(i,{code:J.too_small,type:"bigint",minimum:c.value,inclusive:c.inclusive,message:c.message}),o.dirty()):c.kind==="max"?(c.inclusive?e.data>c.value:e.data>=c.value)&&(i=this._getOrReturnCtx(e,i),re(i,{code:J.too_big,type:"bigint",maximum:c.value,inclusive:c.inclusive,message:c.message}),o.dirty()):c.kind==="multipleOf"?e.data%c.value!==BigInt(0)&&(i=this._getOrReturnCtx(e,i),re(i,{code:J.not_multiple_of,multipleOf:c.value,message:c.message}),o.dirty()):Ie.assertNever(c);return{status:o.value,value:e.data}}_getInvalidInput(e){const r=this._getOrReturnCtx(e);return re(r,{code:J.invalid_type,expected:le.bigint,received:r.parsedType}),Te}gte(e,r){return this.setLimit("min",e,!0,fe.toString(r))}gt(e,r){return this.setLimit("min",e,!1,fe.toString(r))}lte(e,r){return this.setLimit("max",e,!0,fe.toString(r))}lt(e,r){return this.setLimit("max",e,!1,fe.toString(r))}setLimit(e,r,i,o){return new il({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:i,message:fe.toString(o)}]})}_addCheck(e){return new il({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:fe.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:fe.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:fe.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:fe.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:fe.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}}il.create=t=>new il({checks:[],typeName:Ae.ZodBigInt,coerce:t?.coerce??!1,...Ce(t)});class rb extends ze{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==le.boolean){const i=this._getOrReturnCtx(e);return re(i,{code:J.invalid_type,expected:le.boolean,received:i.parsedType}),Te}return Rn(e.data)}}rb.create=t=>new rb({typeName:Ae.ZodBoolean,coerce:t?.coerce||!1,...Ce(t)});class hu extends ze{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==le.date){const c=this._getOrReturnCtx(e);return re(c,{code:J.invalid_type,expected:le.date,received:c.parsedType}),Te}if(Number.isNaN(e.data.getTime())){const c=this._getOrReturnCtx(e);return re(c,{code:J.invalid_date}),Te}const i=new hn;let o;for(const c of this._def.checks)c.kind==="min"?e.data.getTime()<c.value&&(o=this._getOrReturnCtx(e,o),re(o,{code:J.too_small,message:c.message,inclusive:!0,exact:!1,minimum:c.value,type:"date"}),i.dirty()):c.kind==="max"?e.data.getTime()>c.value&&(o=this._getOrReturnCtx(e,o),re(o,{code:J.too_big,message:c.message,inclusive:!0,exact:!1,maximum:c.value,type:"date"}),i.dirty()):Ie.assertNever(c);return{status:i.value,value:new Date(e.data.getTime())}}_addCheck(e){return new hu({...this._def,checks:[...this._def.checks,e]})}min(e,r){return this._addCheck({kind:"min",value:e.getTime(),message:fe.toString(r)})}max(e,r){return this._addCheck({kind:"max",value:e.getTime(),message:fe.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}}hu.create=t=>new hu({checks:[],coerce:t?.coerce||!1,typeName:Ae.ZodDate,...Ce(t)});class sb extends ze{_parse(e){if(this._getType(e)!==le.symbol){const i=this._getOrReturnCtx(e);return re(i,{code:J.invalid_type,expected:le.symbol,received:i.parsedType}),Te}return Rn(e.data)}}sb.create=t=>new sb({typeName:Ae.ZodSymbol,...Ce(t)});class ib extends ze{_parse(e){if(this._getType(e)!==le.undefined){const i=this._getOrReturnCtx(e);return re(i,{code:J.invalid_type,expected:le.undefined,received:i.parsedType}),Te}return Rn(e.data)}}ib.create=t=>new ib({typeName:Ae.ZodUndefined,...Ce(t)});class ab extends ze{_parse(e){if(this._getType(e)!==le.null){const i=this._getOrReturnCtx(e);return re(i,{code:J.invalid_type,expected:le.null,received:i.parsedType}),Te}return Rn(e.data)}}ab.create=t=>new ab({typeName:Ae.ZodNull,...Ce(t)});class pu extends ze{constructor(){super(...arguments),this._any=!0}_parse(e){return Rn(e.data)}}pu.create=t=>new pu({typeName:Ae.ZodAny,...Ce(t)});class ob extends ze{constructor(){super(...arguments),this._unknown=!0}_parse(e){return Rn(e.data)}}ob.create=t=>new ob({typeName:Ae.ZodUnknown,...Ce(t)});class As extends ze{_parse(e){const r=this._getOrReturnCtx(e);return re(r,{code:J.invalid_type,expected:le.never,received:r.parsedType}),Te}}As.create=t=>new As({typeName:Ae.ZodNever,...Ce(t)});class lb extends ze{_parse(e){if(this._getType(e)!==le.undefined){const i=this._getOrReturnCtx(e);return re(i,{code:J.invalid_type,expected:le.void,received:i.parsedType}),Te}return Rn(e.data)}}lb.create=t=>new lb({typeName:Ae.ZodVoid,...Ce(t)});class tr extends ze{_parse(e){const{ctx:r,status:i}=this._processInputParams(e),o=this._def;if(r.parsedType!==le.array)return re(r,{code:J.invalid_type,expected:le.array,received:r.parsedType}),Te;if(o.exactLength!==null){const u=r.data.length>o.exactLength.value,f=r.data.length<o.exactLength.value;(u||f)&&(re(r,{code:u?J.too_big:J.too_small,minimum:f?o.exactLength.value:void 0,maximum:u?o.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:o.exactLength.message}),i.dirty())}if(o.minLength!==null&&r.data.length<o.minLength.value&&(re(r,{code:J.too_small,minimum:o.minLength.value,type:"array",inclusive:!0,exact:!1,message:o.minLength.message}),i.dirty()),o.maxLength!==null&&r.data.length>o.maxLength.value&&(re(r,{code:J.too_big,maximum:o.maxLength.value,type:"array",inclusive:!0,exact:!1,message:o.maxLength.message}),i.dirty()),r.common.async)return Promise.all([...r.data].map((u,f)=>o.type._parseAsync(new Ts(r,u,r.path,f)))).then(u=>hn.mergeArray(i,u));const c=[...r.data].map((u,f)=>o.type._parseSync(new Ts(r,u,r.path,f)));return hn.mergeArray(i,c)}get element(){return this._def.type}min(e,r){return new tr({...this._def,minLength:{value:e,message:fe.toString(r)}})}max(e,r){return new tr({...this._def,maxLength:{value:e,message:fe.toString(r)}})}length(e,r){return new tr({...this._def,exactLength:{value:e,message:fe.toString(r)}})}nonempty(e){return this.min(1,e)}}tr.create=(t,e)=>new tr({type:t,minLength:null,maxLength:null,exactLength:null,typeName:Ae.ZodArray,...Ce(e)});function fa(t){if(t instanceof ht){const e={};for(const r in t.shape){const i=t.shape[r];e[r]=_s.create(fa(i))}return new ht({...t._def,shape:()=>e})}else return t instanceof tr?new tr({...t._def,type:fa(t.element)}):t instanceof _s?_s.create(fa(t.unwrap())):t instanceof Aa?Aa.create(fa(t.unwrap())):t instanceof ci?ci.create(t.items.map(e=>fa(e))):t}class ht 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=Ie.objectKeys(e);return this._cached={shape:e,keys:r},this._cached}_parse(e){if(this._getType(e)!==le.object){const m=this._getOrReturnCtx(e);return re(m,{code:J.invalid_type,expected:le.object,received:m.parsedType}),Te}const{status:i,ctx:o}=this._processInputParams(e),{shape:c,keys:u}=this._getCached(),f=[];if(!(this._def.catchall instanceof As&&this._def.unknownKeys==="strip"))for(const m in o.data)u.includes(m)||f.push(m);const h=[];for(const m of u){const y=c[m],g=o.data[m];h.push({key:{status:"valid",value:m},value:y._parse(new Ts(o,g,o.path,m)),alwaysSet:m in o.data})}if(this._def.catchall instanceof As){const m=this._def.unknownKeys;if(m==="passthrough")for(const y of f)h.push({key:{status:"valid",value:y},value:{status:"valid",value:o.data[y]}});else if(m==="strict")f.length>0&&(re(o,{code:J.unrecognized_keys,keys:f}),i.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];h.push({key:{status:"valid",value:y},value:m._parse(new Ts(o,g,o.path,y)),alwaysSet:y in o.data})}}return o.common.async?Promise.resolve().then(async()=>{const m=[];for(const y of h){const g=await y.key,b=await y.value;m.push({key:g,value:b,alwaysSet:y.alwaysSet})}return m}).then(m=>hn.mergeObjectSync(i,m)):hn.mergeObjectSync(i,h)}get shape(){return this._def.shape()}strict(e){return fe.errToObj,new ht({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(r,i)=>{const o=this._def.errorMap?.(r,i).message??i.defaultError;return r.code==="unrecognized_keys"?{message:fe.errToObj(e).message??o}:{message:o}}}:{}})}strip(){return new ht({...this._def,unknownKeys:"strip"})}passthrough(){return new ht({...this._def,unknownKeys:"passthrough"})}extend(e){return new ht({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new ht({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:Ae.ZodObject})}setKey(e,r){return this.augment({[e]:r})}catchall(e){return new ht({...this._def,catchall:e})}pick(e){const r={};for(const i of Ie.objectKeys(e))e[i]&&this.shape[i]&&(r[i]=this.shape[i]);return new ht({...this._def,shape:()=>r})}omit(e){const r={};for(const i of Ie.objectKeys(this.shape))e[i]||(r[i]=this.shape[i]);return new ht({...this._def,shape:()=>r})}deepPartial(){return fa(this)}partial(e){const r={};for(const i of Ie.objectKeys(this.shape)){const o=this.shape[i];e&&!e[i]?r[i]=o:r[i]=o.optional()}return new ht({...this._def,shape:()=>r})}required(e){const r={};for(const i of Ie.objectKeys(this.shape))if(e&&!e[i])r[i]=this.shape[i];else{let c=this.shape[i];for(;c instanceof _s;)c=c._def.innerType;r[i]=c}return new ht({...this._def,shape:()=>r})}keyof(){return jw(Ie.objectKeys(this.shape))}}ht.create=(t,e)=>new ht({shape:()=>t,unknownKeys:"strip",catchall:As.create(),typeName:Ae.ZodObject,...Ce(e)});ht.strictCreate=(t,e)=>new ht({shape:()=>t,unknownKeys:"strict",catchall:As.create(),typeName:Ae.ZodObject,...Ce(e)});ht.lazycreate=(t,e)=>new ht({shape:t,unknownKeys:"strip",catchall:As.create(),typeName:Ae.ZodObject,...Ce(e)});class mu extends ze{_parse(e){const{ctx:r}=this._processInputParams(e),i=this._def.options;function o(c){for(const f of c)if(f.result.status==="valid")return f.result;for(const f of c)if(f.result.status==="dirty")return r.common.issues.push(...f.ctx.common.issues),f.result;const u=c.map(f=>new Ur(f.ctx.common.issues));return re(r,{code:J.invalid_union,unionErrors:u}),Te}if(r.common.async)return Promise.all(i.map(async c=>{const u={...r,common:{...r.common,issues:[]},parent:null};return{result:await c._parseAsync({data:r.data,path:r.path,parent:u}),ctx:u}})).then(o);{let c;const u=[];for(const h of i){const m={...r,common:{...r.common,issues:[]},parent:null},y=h._parseSync({data:r.data,path:r.path,parent:m});if(y.status==="valid")return y;y.status==="dirty"&&!c&&(c={result:y,ctx:m}),m.common.issues.length&&u.push(m.common.issues)}if(c)return r.common.issues.push(...c.ctx.common.issues),c.result;const f=u.map(h=>new Ur(h));return re(r,{code:J.invalid_union,unionErrors:f}),Te}}get options(){return this._def.options}}mu.create=(t,e)=>new mu({options:t,typeName:Ae.ZodUnion,...Ce(e)});function Fh(t,e){const r=fs(t),i=fs(e);if(t===e)return{valid:!0,data:t};if(r===le.object&&i===le.object){const o=Ie.objectKeys(e),c=Ie.objectKeys(t).filter(f=>o.indexOf(f)!==-1),u={...t,...e};for(const f of c){const h=Fh(t[f],e[f]);if(!h.valid)return{valid:!1};u[f]=h.data}return{valid:!0,data:u}}else if(r===le.array&&i===le.array){if(t.length!==e.length)return{valid:!1};const o=[];for(let c=0;c<t.length;c++){const u=t[c],f=e[c],h=Fh(u,f);if(!h.valid)return{valid:!1};o.push(h.data)}return{valid:!0,data:o}}else return r===le.date&&i===le.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}class gu extends ze{_parse(e){const{status:r,ctx:i}=this._processInputParams(e),o=(c,u)=>{if(eb(c)||eb(u))return Te;const f=Fh(c.value,u.value);return f.valid?((tb(c)||tb(u))&&r.dirty(),{status:r.value,value:f.data}):(re(i,{code:J.invalid_intersection_types}),Te)};return i.common.async?Promise.all([this._def.left._parseAsync({data:i.data,path:i.path,parent:i}),this._def.right._parseAsync({data:i.data,path:i.path,parent:i})]).then(([c,u])=>o(c,u)):o(this._def.left._parseSync({data:i.data,path:i.path,parent:i}),this._def.right._parseSync({data:i.data,path:i.path,parent:i}))}}gu.create=(t,e,r)=>new gu({left:t,right:e,typeName:Ae.ZodIntersection,...Ce(r)});class ci extends ze{_parse(e){const{status:r,ctx:i}=this._processInputParams(e);if(i.parsedType!==le.array)return re(i,{code:J.invalid_type,expected:le.array,received:i.parsedType}),Te;if(i.data.length<this._def.items.length)return re(i,{code:J.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Te;!this._def.rest&&i.data.length>this._def.items.length&&(re(i,{code:J.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());const c=[...i.data].map((u,f)=>{const h=this._def.items[f]||this._def.rest;return h?h._parse(new Ts(i,u,i.path,f)):null}).filter(u=>!!u);return i.common.async?Promise.all(c).then(u=>hn.mergeArray(r,u)):hn.mergeArray(r,c)}get items(){return this._def.items}rest(e){return new ci({...this._def,rest:e})}}ci.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new ci({items:t,typeName:Ae.ZodTuple,rest:null,...Ce(e)})};class cb extends ze{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:r,ctx:i}=this._processInputParams(e);if(i.parsedType!==le.map)return re(i,{code:J.invalid_type,expected:le.map,received:i.parsedType}),Te;const o=this._def.keyType,c=this._def.valueType,u=[...i.data.entries()].map(([f,h],m)=>({key:o._parse(new Ts(i,f,i.path,[m,"key"])),value:c._parse(new Ts(i,h,i.path,[m,"value"]))}));if(i.common.async){const f=new Map;return Promise.resolve().then(async()=>{for(const h of u){const m=await h.key,y=await h.value;if(m.status==="aborted"||y.status==="aborted")return Te;(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 h of u){const m=h.key,y=h.value;if(m.status==="aborted"||y.status==="aborted")return Te;(m.status==="dirty"||y.status==="dirty")&&r.dirty(),f.set(m.value,y.value)}return{status:r.value,value:f}}}}cb.create=(t,e,r)=>new cb({valueType:e,keyType:t,typeName:Ae.ZodMap,...Ce(r)});class al extends ze{_parse(e){const{status:r,ctx:i}=this._processInputParams(e);if(i.parsedType!==le.set)return re(i,{code:J.invalid_type,expected:le.set,received:i.parsedType}),Te;const o=this._def;o.minSize!==null&&i.data.size<o.minSize.value&&(re(i,{code:J.too_small,minimum:o.minSize.value,type:"set",inclusive:!0,exact:!1,message:o.minSize.message}),r.dirty()),o.maxSize!==null&&i.data.size>o.maxSize.value&&(re(i,{code:J.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),r.dirty());const c=this._def.valueType;function u(h){const m=new Set;for(const y of h){if(y.status==="aborted")return Te;y.status==="dirty"&&r.dirty(),m.add(y.value)}return{status:r.value,value:m}}const f=[...i.data.values()].map((h,m)=>c._parse(new Ts(i,h,i.path,m)));return i.common.async?Promise.all(f).then(h=>u(h)):u(f)}min(e,r){return new al({...this._def,minSize:{value:e,message:fe.toString(r)}})}max(e,r){return new al({...this._def,maxSize:{value:e,message:fe.toString(r)}})}size(e,r){return this.min(e,r).max(e,r)}nonempty(e){return this.min(1,e)}}al.create=(t,e)=>new al({valueType:t,minSize:null,maxSize:null,typeName:Ae.ZodSet,...Ce(e)});class ub 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})}}ub.create=(t,e)=>new ub({getter:t,typeName:Ae.ZodLazy,...Ce(e)});class db extends ze{_parse(e){if(e.data!==this._def.value){const r=this._getOrReturnCtx(e);return re(r,{received:r.data,code:J.invalid_literal,expected:this._def.value}),Te}return{status:"valid",value:e.data}}get value(){return this._def.value}}db.create=(t,e)=>new db({value:t,typeName:Ae.ZodLiteral,...Ce(e)});function jw(t,e){return new Ea({values:t,typeName:Ae.ZodEnum,...Ce(e)})}class Ea extends ze{_parse(e){if(typeof e.data!="string"){const r=this._getOrReturnCtx(e),i=this._def.values;return re(r,{expected:Ie.joinValues(i),received:r.parsedType,code:J.invalid_type}),Te}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){const r=this._getOrReturnCtx(e),i=this._def.values;return re(r,{received:r.data,code:J.invalid_enum_value,options:i}),Te}return Rn(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 Ea.create(e,{...this._def,...r})}exclude(e,r=this._def){return Ea.create(this.options.filter(i=>!e.includes(i)),{...this._def,...r})}}Ea.create=jw;class fb extends ze{_parse(e){const r=Ie.getValidEnumValues(this._def.values),i=this._getOrReturnCtx(e);if(i.parsedType!==le.string&&i.parsedType!==le.number){const o=Ie.objectValues(r);return re(i,{expected:Ie.joinValues(o),received:i.parsedType,code:J.invalid_type}),Te}if(this._cache||(this._cache=new Set(Ie.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){const o=Ie.objectValues(r);return re(i,{received:i.data,code:J.invalid_enum_value,options:o}),Te}return Rn(e.data)}get enum(){return this._def.values}}fb.create=(t,e)=>new fb({values:t,typeName:Ae.ZodNativeEnum,...Ce(e)});class yu extends ze{unwrap(){return this._def.type}_parse(e){const{ctx:r}=this._processInputParams(e);if(r.parsedType!==le.promise&&r.common.async===!1)return re(r,{code:J.invalid_type,expected:le.promise,received:r.parsedType}),Te;
vendor: 4,097 bytes, line 41
41const i=r.parsedType===le.promise?r.data:Promise.resolve(r.data);return Rn(i.then(o=>this._def.type.parseAsync(o,{path:r.path,errorMap:r.common.contextualErrorMap})))}}yu.create=(t,e)=>new yu({type:t,typeName:Ae.ZodPromise,...Ce(e)});class Ta extends ze{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Ae.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:r,ctx:i}=this._processInputParams(e),o=this._def.effect||null,c={addIssue:u=>{re(i,u),u.fatal?r.abort():r.dirty()},get path(){return i.path}};if(c.addIssue=c.addIssue.bind(c),o.type==="preprocess"){const u=o.transform(i.data,c);if(i.common.async)return Promise.resolve(u).then(async f=>{if(r.value==="aborted")return Te;const h=await this._def.schema._parseAsync({data:f,path:i.path,parent:i});return h.status==="aborted"?Te:h.status==="dirty"||r.value==="dirty"?Mo(h.value):h});{if(r.value==="aborted")return Te;const f=this._def.schema._parseSync({data:u,path:i.path,parent:i});return f.status==="aborted"?Te:f.status==="dirty"||r.value==="dirty"?Mo(f.value):f}}if(o.type==="refinement"){const u=f=>{const h=o.refinement(f,c);if(i.common.async)return Promise.resolve(h);if(h instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return f};if(i.common.async===!1){const f=this._def.schema._parseSync({data:i.data,path:i.path,parent:i});return f.status==="aborted"?Te:(f.status==="dirty"&&r.dirty(),u(f.value),{status:r.value,value:f.value})}else return this._def.schema._parseAsync({data:i.data,path:i.path,parent:i}).then(f=>f.status==="aborted"?Te:(f.status==="dirty"&&r.dirty(),u(f.value).then(()=>({status:r.value,value:f.value}))))}if(o.type==="transform")if(i.common.async===!1){const u=this._def.schema._parseSync({data:i.data,path:i.path,parent:i});if(!Sa(u))return Te;const f=o.transform(u.value,c);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:i.data,path:i.path,parent:i}).then(u=>Sa(u)?Promise.resolve(o.transform(u.value,c)).then(f=>({status:r.value,value:f})):Te);Ie.assertNever(o)}}Ta.create=(t,e,r)=>new Ta({schema:t,typeName:Ae.ZodEffects,effect:e,...Ce(r)});Ta.createWithPreprocess=(t,e,r)=>new Ta({schema:e,effect:{type:"preprocess",transform:t},typeName:Ae.ZodEffects,...Ce(r)});class _s extends ze{_parse(e){return this._getType(e)===le.undefined?Rn(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}_s.create=(t,e)=>new _s({innerType:t,typeName:Ae.ZodOptional,...Ce(e)});class Aa extends ze{_parse(e){return this._getType(e)===le.null?Rn(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Aa.create=(t,e)=>new Aa({innerType:t,typeName:Ae.ZodNullable,...Ce(e)});class Yh extends ze{_parse(e){const{ctx:r}=this._processInputParams(e);let i=r.data;return r.parsedType===le.undefined&&(i=this._def.defaultValue()),this._def.innerType._parse({data:i,path:r.path,parent:r})}removeDefault(){return this._def.innerType}}Yh.create=(t,e)=>new Yh({innerType:t,typeName:Ae.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...Ce(e)});class Zh extends ze{_parse(e){const{ctx:r}=this._processInputParams(e),i={...r,common:{...r.common,issues:[]}},o=this._def.innerType._parse({data:i.data,path:i.path,parent:{...i}});return fu(o)?o.then(c=>({status:"valid",value:c.status==="valid"?c.value:this._def.catchValue({get error(){return new Ur(i.common.issues)},input:i.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Ur(i.common.issues)},input:i.data})}}removeCatch(){return this._def.innerType}}Zh.create=(t,e)=>new Zh({innerType:t,typeName:Ae.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...Ce(e)});class hb extends ze{_parse(e){if(this._getType(e)!==le.nan){const i=this._getOrReturnCtx(e);return re(i,{code:J.invalid_type,expected:le.nan,received:i.parsedType}),Te}
41return{status:"valid",value:e.data}}}hb.create=t=>new hb({typeName:Ae.ZodNaN,...Ce(t)});class vj extends ze{_parse(e){const{ctx:r}=this._processInputParams(e),i=r.data;return this._def.type._parse({data:i,path:r.path,parent:r})}unwrap(){return this._def.type}}class Sp extends ze{_parse(e){const{status:r,ctx:i}=this._processInputParams(e);if(i.common.async)return(async()=>{const c=await this._def.in._parseAsync({data:i.data,path:i.path,parent:i});return c.status==="aborted"?Te:c.status==="dirty"?(r.dirty(),Mo(c.value)):this._def.out._parseAsync({data:c.value,path:i.path,parent:i})})();{const o=this._def.in._parseSync({data:i.data,path:i.path,parent:i});return o.status==="aborted"?Te:o.status==="dirty"?(r.dirty(),{status:"dirty",value:o.value}):this._def.out._parseSync({data:o.value,path:i.path,parent:i})}}static create(e,r){return new Sp({in:e,out:r,typeName:Ae.ZodPipeline})}}class Jh extends ze{_parse(e){const r=this._def.innerType._parse(e),i=o=>(Sa(o)&&(o.value=Object.freeze(o.value)),o);return fu(r)?r.then(o=>i(o)):i(r)}unwrap(){return this._def.innerType}}Jh.create=(t,e)=>new Jh({innerType:t,typeName:Ae.ZodReadonly,...Ce(e)});function bj(t,e={},r){return pu.create()}var Ae;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(Ae||(Ae={}));const rr=ys.create;pu.create;As.create;tr.create;const Cs=ht.create;mu.create;gu.create;ci.create;Ea.create;yu.create;_s.create;Aa.create;var xs=t=>{const e="input"in t?t.input:"input",r="output"in t?t.output:"output",i="schema"in t?t.schema._input
41:t._input,o="schema"in t?t.schema._output:t._output;return{types:{input:e==="output"?o:i,output:r==="input"?i:o},parse:c=>"schema"in t?t.schema.parse(c):t.parse(c)}},Ra=(t,e)=>bj().pipe(t.catch(e));const _j=()=>At(()=>import("./batch-DayHSuii.js"),__vite__mapDeps([5,1,2,3,6])),wj=Cs({id:Ra(rr().optional(),void 0),email:Ra(rr().optional(),void 0)}),Sj=Et()({validateSearch:xs(wj),beforeLoad:ks,head:()=>({meta:[{title:"Batch check â vera.ink"},{name:"description",content:"Check many documents against a pack in one run."}]}),component:Tt(_j,"component")}),Ej=()=>At(()=>import("./developers-Ip8O8vlI.js"),__vite__mapDeps([7,8,2])),pb="Connect vera.ink to Claude Code, Cursor or any MCP client: check documents against rules taken from the law itself, with every finding cited.",Tj=Et()({head:()=>({meta:[{title:"Connect your AI â vera.ink MCP server"},{name:"description",content:pb},{property:"og:title",content:"Connect your AI â vera.ink MCP server"},{property:"og:description",content:pb}]}),component:Tt(Ej,"component")}),Aj=()=>At(()=>import("./library-D93KJ1WF.js"),__vite__mapDeps([9,1,2,4,3])),Rj=Et()({beforeLoad:ks,component:Tt(Aj,"component")}),Oj=()=>At(()=>import("./packs-Iospfuv8.js"),__vite__mapDeps([10,1,2,11,3,12,13])),kj=Cs({prefill:Ra(rr().optional(),void 0)}),Cj=Et()({validateSearch:xs(kj),beforeLoad:ks,head:()=>({meta:[{title:"Packs â vera.ink"},{name:"description",content:"Build reusable verification packs and load them into any check."}]}),component:Tt(Oj,"component")}),xj=()=>At(()=>import("./pricing-C4KzjxLP.js"),__vite__mapDeps([14,1,2])),Nj=Et()({head:()=>({meta:[{title:"Pricing â vera.ink"},{name:"description",content:"Simple pricing for document verification. Every finding cited. Checked against your Source Pack."},{property:"og:title",content:"Pricing â vera.ink"},{property:"og:description",content:"Simple pricing for document verification. Every finding cited. Checked against your Source Pack."}]}),component:Tt(xj,"component")}),jj=()=>At(()=>import("./privacy-BqvUncL2.js"),__vite__mapDeps([15,8,2])),Dj=Et()({head:()=>({meta:[{title:"Privacy Policy â vera.ink"},{name:"description",content:"Privacy Policy for vera.ink, operated by iWantIt (Pty) Ltd."},{property:"og:title",content:"Privacy Policy â vera.ink"},{property:"og:description",content:"Privacy Policy for vera.ink, operated by iWantIt (Pty) Ltd."}]}),component:Tt(jj,"component")}),Lj=()=>At(()=>import("./refund-glEiT1fE.js"),__vite__mapDeps([16,8,2])),Mj=Et()({head:()=>({meta:[{title:"Refund Policy â vera.ink"},{name:"description",content:"Refund Policy for vera.ink, operated by iWantIt (Pty) Ltd."},{property:"og:title",content:"Refund Policy â vera.ink"},{property:"og:description",content:"Refund Policy for vera.ink, operated by iWantIt (Pty) Ltd."}]}),component:Tt(Lj,"component")}),Uj=()=>At(()=>import("./sign-in-DNNGt25J.js"),__vite__mapDeps([17,2,4])),zj=Cs({redirect:Ra(rr().optional(),void 0)}),Pj=Et()({validateSearch:xs(zj),head:()=>({meta:[{title:"Sign in â vera.ink"}]}),component:Tt(Uj,"component")}),Bj=()=>At(()=>import("./terms-DByhVkb6.js"),__vite__mapDeps([18,8,2])),Ij=Et()({head:()=>({meta:[{title:"Terms of Service â vera.ink"},{name:"description",content:"Terms of Service for vera.ink, operated by iWantIt (Pty) Ltd."},{property:"og:title",content:"Terms of Service â vera.ink"},{property:"og:description",content:"Terms of Service for vera.ink, operated by iWantIt (Pty) Ltd."}]}),component:Tt(Bj,"component")}),Hj=()=>At(()=>import("./verify-Szkz4eRC.js"),__vite__mapDeps([19,1,2,3,11,13])),$j=Cs({pack:Ra(rr().optional(),void 0)}),mb="Upload your document and a source URL. VERA verifies every claim exclusively against what you provide.",qj=Et()({validateSearch:xs($j),beforeLoad:ks,head:()=>({meta:[{title:"Vera â vera.ink"},{name:"description",content:mb},{property:"og:title",content:"Vera â vera.ink"},{property:"og:description",content:mb}]}),component:Tt(Hj,"component")}),Vj=()=>At(()=>import("./batch._batchId-De6bWkQT.js"),[]),Gj=Et()({validateSearch:xs(Cs({email:rr().optional()})),component:Tt(Vj,"component")}),Kj=()=>At(()=>import("./check.index-DcMuuIN2.js"),__vite__mapDeps([20,8,2])),gb="Check a privacy policy, web page, code or server configuration against rules taken from UK GDPR, WCAG 2.2 and OWASP. Every finding cites its source.",Fj=Et()({head:()=>({meta:[{title:"Document checks â vera.ink"},{name:"description",content:gb},{property:"og:title",content:"Document checks â vera.ink"},{property:"og:description",content:gb}]}),component:Tt(Kj,"component")}),DD="29 September 2026",No=`### WHAT YOU GET BACK 42
43- Each gap it finds, with the rule it fails and the source text that rule was taken from, quoted, so you can check it yourself. 44- Replacement wording for each finding, and a corrected copy of your document to download. 45- The pack's declared gaps, printed on every report, so you know what was not checked. 46 47### HOW TO RUN IT 48 49**In the browser.** Sign in at https://vera.ink/verify, paste or upload the document, and choose this pack. New accounts start with 40 credits; a check costs 3 credits up to about 4,500 words. 50 51**From your AI assistant.** vera.ink is an MCP server. Connect it to Claude Code or Cursor and ask your assistant to check a file against this pack: https://vera.ink/developers 52 53### GOOD TO KNOW 54 55- vera.ink only reports findings it can tie to a rule in this pack, and quotes the source text so you can check it. Anything it can't tie to a rule is dropped from the report. 56- It is a review aid, not legal advice or a certification. Read each finding before you act on it. 57 58More checks: https://vera.ink/check`,Yj="e8d407ee-4bc4-4767-8ca0-7472eb5cc33e",Dw=[{slug:"uk-gdpr-privacy-policy",packId:Yj,chip:"UK GDPR privacy",name:"Website Privacy & Cookies â UK GDPR and PECR",title:"Check a privacy policy or cookie notice against UK GDPR and PECR",description:"Check a privacy notice, cookie banner or consent form against 52 rules from the UK GDPR, PECR and ICO guidance. Every finding cites the article, with wording to fix it.",content:`### WHAT IT CHECKS 59 60A privacy notice, cookie banner, cookie policy or consent form, against 52 rules taken from the UK GDPR and the Privacy and Electronic Communications Regulations (PECR): 61 62- Every item Article 13(1) and (2) require a privacy notice to contain â who the controller is, the purposes and legal basis, recipients, retention, the data subject's rights, and the right to complain to the ICO. 63- The plain-language duty in Article 12. 64- What makes consent valid, under Article 7 and Article 4(11). 65- The cookie rules in PECR regulation 6 and Schedule A1, as amended in 2025. 66 67### WHERE THE RULES COME FROM 68 69The UK GDPR and PECR as published on legislation.gov.uk, and guidance from the Information Commissioner's Office (ICO). 70 71### WHAT IT DOES NOT CHECK 72 73- **UK law only.** It does not check EU GDPR differences or any other country's law. 74- **The document, not the organisation.** It reviews what the notice says, not whether the business actually does it. 75 76${No}`},{slug:"wcag-2-2",packId:"4adaf2c7-95a4-4305-9b7a-efc8f4ef98b4",chip:"WCAG 2.2",name:"Web Accessibility â WCAG 2.2",title:"Check a web page against WCAG 2.2 A and AA",description:"Check a web page's HTML or component code against 120 rules from W3C covering 54 of the 55 WCAG 2.2 Level A and AA success criteria.",content:`### WHAT IT CHECKS 77 78A web page's HTML or component code, against 120 rules covering 54 of the 55 WCAG 2.2 Level A and AA success criteria â including name, role and value; labels; page titles; focus visibility; redundant entry; accessible authentication; contrast; keyboard access; and time-based media. 79 80### WHERE THE RULES COME FROM 81 82The World Wide Web Consortium (W3C): WCAG 2.2 and its supporting documents. 83 84### WHAT IT DOES NOT CHECK 85 86- **Success criterion 3.3.4 Error Prevention (Legal, Financial, Data)** is not covered, and is listed on every report. 87- **A partial check, not an AA conformance audit.** It reads what you give it; it does not operate a live page with a keyboard or screen reader. 88 89${No}`},{slug:"owasp-top-10",packId:"50f45219-3d97-41da-956f-15a3bc6e6c98",chip:"OWASP Top 10",name:"Web Application Security â OWASP Top 10:2025",title:"Check code against the OWASP Top 10:2025",description:"Check source code, configuration or a technical design against 132 rules from OWASP's Top 10:2025 category pages, all ten categories, with every finding cited.",content:`### WHAT IT CHECKS 90 91Source code, configuration and technical documents, against 132 security rules covering all ten OWASP Top 10:2025 categories â broken access control, security misconfiguration, software supply chain failures, cryptographic failures, injection, insecure design, authentication failures, software or data integrity failures, security logging and alerting failures, and mishandling of exceptional conditions. 92 93### WHERE THE RULES COME FROM 94 95OWASP's own Top 10:2025 category pages, plus one NIST document, so a few rules cite NIST rather than OWASP. 96 97### WHAT IT DOES NOT CHECK 98 99- **Not a penetration test.** It reviews what is written in the code and documents; it does not attack a running system. 100 101${No}`},{slug:"owasp-api-top-10",packId:"78954107-f35e-496f-aaf1-b55c4cd19679",chip:"OWASP API",name:"API Security â OWASP API Security Top 10:2023",title:"Check an API against the OWASP API Security Top 10:2023",description:"Check API code, an OpenAPI specification or gateway configuration against 81 rules from the OWASP API Security Top 10:2023, all ten categories.",content:`### WHAT IT CHECKS 102 103API code, specifications such as OpenAPI files, and configuration, against 81 rules covering all ten OWASP API Security Top 10:2023 categories â object, property and function level authorization; authentication; resource consumption; sensitive business flows; server-side request forgery; security misconfiguration; inventory management; and unsafe consumption of third-party APIs. 104 105### WHERE THE RULES COME FROM 106 107OWASP's official API Security Top 10:2023 category pages, plus one NIST document. 108 109### WHAT IT DOES NOT CHECK 110 111- **Not a penetration test.** It reviews the code, specification and configuration; it does not call your API. 112 113${No}`},{slug:"security-headers",packId:"8a52fc21-89bb-4112-8441-1060f78a2fb4",chip:"Security headers",name:"Security Headers & Transport â OWASP",title:"Check security headers and TLS configuration against OWASP",description:"Check server and response-header configuration against 63 rules from the OWASP Cheat Sheet Series: HSTS, CSP, CORS, cookie attributes, TLS and more.",content:`### WHAT IT CHECKS 114 115Server configuration, response-header configuration and deployment documentation, against 63 rules â HSTS, Content-Security-Policy, clickjacking protection, MIME-sniffing, CORS, cookie attributes, caching of sensitive responses, the Cross-Origin isolation policies, version-disclosing headers, TLS versions and cipher suites, certificate signature algorithms, and HTTP-to-HTTPS redirects. 116 117### WHERE THE RULES COME FROM 118 119The OWASP Cheat Sheet Series. 120 121### WHAT IT DOES NOT CHECK 122 123- **Referrer-Policy** is not covered, and is listed on every report. The pack covers 17 of its 18 topics. 124- **Configuration, not a live scan.** It reads the configuration you give it; it does not probe your server. 125 126${No}`}],LD=`### CHECKS READY NOW 127 128Each check is a pack of rules taken from the source itself. Paste or upload a document, and every finding comes back citing the rule and the source text behind it. 129 130${Dw.map(t=>`- **${t.title}.** https://vera.ink/check/${t.slug}`).join(` 131`)} 132 133Need a different rulebook? Describe what it must cover and vera.ink builds a pack from official sources: https://vera.ink/developers`,Zj=()=>At(()=>import("./check._slug-Ba0B8GYZ.js"),__vite__mapDeps([21,8,2])),Jj=Et()({loader:({params:t})=>{const e=Dw.find(r=>r.slug===t.slug);
133if(!e)throw rT();return e},head:({loaderData:t})=>({meta:t?[{title:`${t.title} â vera.ink`},{name:"description",content:t.description},{property:"og:title",content:t.title},{property:"og:description",content:t.description}]:[],links:t?[{rel:"canonical",href:`https://vera.ink/check/${t.slug}`}]:[]}),component:Tt(Zj,"component")}),Qj=()=>At(()=>import("./oauth.consent-DNH-5Zba.js"),[]),Xj=Cs({authorization_id:Ra(rr().trim().min(1).max(2048).optional(),void 0)}),Wj=Et()({validateSearch:xs(Xj),beforeLoad:ks,head:()=>({meta:[{title:"Connect an app â vera.ink"}]}),component:Tt(Qj,"component")}),eD=()=>At(()=>import("./pack._packId-Tg-BB8XE.js"),__vite__mapDeps([22,1,2,11,3,12])),tD=Et()({validateSearch:xs(Cs({email:rr().optional(),build:rr().optional()})),beforeLoad:ks,head:()=>({meta:[{title:"Pack â vera.ink"},{name:"description",content:"Build a verification pack you can trust."}]}),component:Tt(eD,"component")}),nD=()=>At(()=>import("./results._runId-hrIpk_HX.js"),__vite__mapDeps([23,1,2,6,4,3])),rD=Et()({validateSearch:xs(Cs({batch_id:rr().optional()})),beforeLoad:ks,head:()=>({meta:[{title:"Verification results â vera.ink"},{name:"description",content:"Your VERA verification findings."}]}),component:Tt(nD,"component")}),sD=VN.update({id:"/",path:"/",getParentRoute:()=>yt}),iD=KN.update({id:"/api-keys",path:"/api-keys",getParentRoute:()=>yt}),Lw=Sj.update({id:"/batch",path:"/batch",getParentRoute:()=>yt}),aD=Tj.update({id:"/developers",path:"/developers",getParentRoute:()=>yt}),oD=Rj.update({id:"/library",path:"/library",getParentRoute:()=>yt}),lD=Cj.update({id:"/packs",path:"/packs",getParentRoute:()=>yt}),cD=Nj.update({id:"/pricing",path:"/pricing",getParentRoute:()=>yt}),uD=Dj.update({id:"/privacy",path:"/privacy",getParentRoute:()=>yt}),dD=Mj.update({id:"/refund",path:"/refund",getParentRoute:()=>yt}),fD=Pj.update({id:"/sign-in",path:"/sign-in",getParentRoute:()=>yt}),hD=Ij.update({id:"/terms",path:"/terms",getParentRoute:()=>yt}),pD=qj.update({id:"/verify",path:"/verify",getParentRoute:()=>yt}),mD=Gj.update({id:"/$batchId",path:"/$batchId",getParentRoute:()=>Lw}),gD=Fj.update({id:"/check/",path:"/check/",getParentRoute:()=>yt}),yD=Jj.update({id:"/check/$slug",path:"/check/$slug",getParentRoute:()=>yt}),vD=Wj.update({id:"/oauth/consent",path:"/oauth/consent",getParentRoute:()=>yt}),bD=tD.update({id:"/pack/$packId",path:"/pack/$packId",getParentRoute:()=>yt}),_D=rD.update({id:"/results/$runId",path:"/results/$runId",getParentRoute:()=>yt}),wD={BatchBatchIdRoute:mD},SD=Lw._addFileChildren(wD),ED={IndexRoute:sD,ApiKeysRoute:iD,BatchRoute:SD,DevelopersRoute:aD,LibraryRoute:oD,PacksRoute:lD,PricingRoute:cD,PrivacyRoute:uD,RefundRoute:dD,SignInRoute:fD,TermsRoute:hD,VerifyRoute:pD,CheckSlugRoute:yD,OauthConsentRoute:vD,PackPackIdRoute:bD,ResultsRunIdRoute:_D,CheckIndexRoute:gD},TD=yt._addFileChildren(ED),AD=()=>{const t=new rN;return ok({routeTree:TD,context:{queryClient:t},scrollRestoration:!0,defaultPreloadStaleTime:0})};async function RD(){const t=await AD();let e;if(H0){const r=await H0.getOptions();r.serializationAdapters=r.serializationAdapters??[],window.__TSS_START_OPTIONS__=r,e=r.serializationAdapters,t.options.defaultSsr=r.defaultSsr}else e=[],window.__TSS_START_OPTIONS__={serializationAdapters:e};return e.push(mO),t.options.serializationAdapters&&e.push(...t.options.serializationAdapters),t.update({basepath:"",serializationAdapters:e}),t.stores.ids.get().length||await a1(t),t}var OD=RD;function kD(){return OD().finally(()=>window.$_TSR?.h())}var vh;function CD(){return vh||(vh=kD()),X.jsx(yO,{promise:vh,children:t=>X.jsx(uk,{router:t})})}_e.startTransition(()=>{eT.hydrateRoot(document,X.jsx(_e.StrictMode,{children:X.jsx(CD,{})}))});export{Dw as C,Yj as L,Sj as R,xD as T,LD as a,DD as b,vp as c,Cj as d,Pj as e,qj as f,Gj as g,Jj as h,Wj as i,tD as j,rD as k,pO as l,ii as m,yb as n,bb as o,_b as p,X as q,sT as r,_e as s,Sw as t,jD as u,V_ as v,Vt as w};
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.