PageSourceSearch

https://cro-vault-library.lovable.app/assets/index-tW6vhKuj.js

js cro-vault-library.lovable.app collected 2026-10-03 03:21:15 UTC 560,301 bytes, 54 lines download raw bytes

vendor: 20,708 bytes, lines 1-3
1function TS(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Sh={exports:{}},da={};var jy;function RS(){if(jy)return da;jy=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function s(a,l,u){var c=null;if(u!==void 0&&(c=""+u),l.key!==void 0&&(c=""+l.key),"key"in l){u={};for(var d in l)d!=="key"&&(u[d]=l[d])}else u=l;return l=u.ref,{$$typeof:e,type:a,key:c,ref:l!==void 0?l:null,props:u}}return da.Fragment=t,da.jsx=s,da.jsxs=s,da}var My;function AS(){return My||(My=1,Sh.exports=RS()),Sh.exports}var Y=AS(),wh={exports:{}},he={};var Uy;function OS(){if(Uy)return he;Uy=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler"),u=Symbol.for("react.consumer"),c=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),y=Symbol.for("react.activity"),b=Symbol.iterator;function _(k){return k===null||typeof k!="object"?null:(k=b&&k[b]||k["@@iterator"],typeof k=="function"?k:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},A=Object.assign,R={};function O(k,$,X){this.props=k,this.context=$,this.refs=R,this.updater=X||w}O.prototype.isReactComponent={},O.prototype.setState=function(k,$){if(typeof k!="object"&&typeof k!="function"&&k!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,k,$,"setState")},O.prototype.forceUpdate=function(k){this.updater.enqueueForceUpdate(this,k,"forceUpdate")};function U(){}U.prototype=O.prototype;function j(k,$,X){this.props=k,this.context=$,this.refs=R,this.updater=X||w}var L=j.prototype=new U;L.constructor=j,A(L,O.prototype),L.isPureReactComponent=!0;var Q=Array.isArray;function V(){}var q={H:null,A:null,T:null,S:null},K=Object.prototype.hasOwnProperty;function J(k,$,X){var W=X.ref;return{$$typeof:e,type:k,key:$,ref:W!==void 0?W:null,props:X}}function le(k,$){return J(k.type,$,k.props)}function se(k){return typeof k=="object"&&k!==null&&k.$$typeof===e}function me(k){var $={"=":"=0",":":"=2"};return"$"+k.replace(/[=:]/g,function(X){return $[X]})}var Ce=/\/+/g;function Ye(k,$){return typeof k=="object"&&k!==null&&k.key!=null?me(""+k.key):$.toString(36)}function Be(k){switch(k.status){case"fulfilled":return k.value;case"rejected":throw k.reason;default:switch(typeof k.status=="string"?k.then(V,V):(k.status="pending",k.then(function($){k.status==="pending"&&(k.status="fulfilled",k.value=$)},function($){k.status==="pending"&&(k.status="rejected",k.reason=$)})),k.status){case"fulfilled":return k.value;case"rejected":throw k.reason}}throw k}function B(k,$,X,W,ie){var pe=typeof k;(pe==="undefined"||pe==="boolean")&&(k=null);var Se=!1;if(k===null)Se=!0;else switch(pe){case"bigint":case"string":case"number":Se=!0;break;case"object":switch(k.$$typeof){case e:case t:Se=!0;break;case m:return Se=k._init,B(Se(k._payload),$,X,W,ie)}}if(Se)return ie=ie(k),Se=W===""?"."+Ye(k,0):W,Q(ie)?(X="",Se!=null&&(X=Se.replace(Ce,"$&/")+"/"),B(ie,$,X,"",function(Sn){return Sn})):ie!=null&&(se(ie)&&(ie=le(ie,X+(ie.key==null||k&&k.key===ie.key?"":(""+ie.key).replace(Ce,"$&/")+"/")+Se)),$.push(ie)),1;Se=0;var Fe=W===""?".":W+":";if(Q(k))for(var De=0;De<k.length;De++)W=k[De],pe=Fe+Ye(W,De),Se+=B(W,$,X,pe,ie);else if(De=_(k),typeof De=="function")for(k=De.call(k),De=0;!(W=k.next()).done;)W=W.value,pe=Fe+Ye(W,De++),Se+=B(W,$,X,pe,ie);else if(pe==="object"){if(typeof k.then=="function")return B(Be(k),$,X,W,ie);throw $=String(k),Error("Objects are not valid as a React child (found: "+($==="[object Object]"?"object with keys {"+Object.keys(k).join(", ")+"}":$)+"). If you meant to render a collection of children, use an array instead.")}return Se}function F(k,$,X){if(k==null)return k;var W=[],ie=0;return B(k,W,"","",function(pe){return $.call(X,pe,ie++)}),W}function oe(k){if(k._status===-1){var $=k._result;$=$(),$.then(function(X){(k._status===0||k._status===-1)&&(k._status=1,k._result=X)},function(X){(k._status===0||k._status===-1)&&(k._status=2,k._result=X)}),k._status===-1&&(k._status=0,k._result=$)}if(k._status===1)return k._result.default;throw k._result}var Re=typeof reportError=="function"?reportError:function(k){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var $=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof k=="object"&&k!==null&&typeof k.message=="string"?String(k.message):String(k),error:k});if(!window.dispatchEvent($))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",k);return}console.error(k)},Oe={map:F,forEach:function(k,$,X){F(k,function(){$.apply(this,arguments)},X)},count:function(k){var $=0;return F(k,function(){$++}),$},toArray:function(k){return F(k,function($){return $})||[]},only:function(k){if(!se(k))throw Error("React.Children.only expected to receive a single React element child.");return k}};return he.Activity=y,he.Children=Oe,he.Component=O,he.Fragment=s,he.Profiler=l,he.PureComponent=j,he.StrictMode=a,he.Suspense=p,he.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=q,he.__COMPILER_RUNTIME={__proto__:null,c:function(k){return q.H.useMemoCache(k)}},he.cache=function(k){return function(){return k.apply(null,arguments)}},he.cacheSignal=function(){return null},he.cloneElement=function(k,$,X){if(k==null)throw Error("The argument must be a React element, but you passed "+k+".");var W=A({},k.props),ie=k.key;if($!=null)for(pe in $.key!==void 0&&(ie=""+$.key),$)!K.call($,pe)||pe==="key"||pe==="__self"||pe==="__source"||pe==="ref"&&$.ref===void 0||(W[pe]=$[pe]);var pe=arguments.length-2;if(pe===1)W.children=X;else if(1<pe){for(var Se=Array(pe),Fe=0;Fe<pe;Fe++)Se[Fe]=arguments[Fe+2];W.children=Se}return J(k.type,ie,W)},he.createContext=function(k){return k={$$typeof:c,_currentValue:k,_currentValue2:k,_threadCount:0,Provider:null,Consumer:null},k.Provider=k,k.Consumer={$$typeof:u,_context:k},k},he.createElement=function(k,$,X){var W,ie={},pe=null;if($!=null)for(W in $.key!==void 0&&(pe=""+$.key),$)K.call($,W)&&W!=="key"&&W!=="__self"&&W!=="__source"&&(ie[W]=$[W]);var Se=arguments.length-2;if(Se===1)ie.children=X;else if(1<Se){for(var Fe=Array(Se),De=0;De<Se;De++)Fe[De]=arguments[De+2];ie.children=Fe}if(k&&k.defaultProps)for(W in Se=k.defaultProps,Se)ie[W]===void 0&&(ie[W]=Se[W]);return J(k,pe,ie)},he.createRef=function(){return{current:null}},he.forwardRef=function(k){return{$$typeof:d,render:k}},he.isValidElement=se,he.lazy=function(k){return{$$typeof:m,_payload:{_status:-1,_result:k},_init:oe}},he.memo=function(k,$){return{$$typeof:g,type:k,compare:$===void 0?null:$}},he.startTransition=function(k){var $=q.T,X={};q.T=X;try{var W=k(),ie=q.S;ie!==null&&ie(X,W),typeof W=="object"&&W!==null&&typeof W.then=="function"&&W.then(V,Re)}catch(pe){Re(pe)}finally{$!==null&&X.types!==null&&($.types=X.types),q.T=$}},he.unstable_useCacheRefresh=function(){return q.H.useCacheRefresh()},he.use=function(k){return q.H.use(k)},he.useActionState=function(k,$,X){return q.H.useActionState(k,$,X)},he.useCallback=function(k,$){return q.H.useCallback(k,$)},he.useContext=function(k){return q.H.useContext(k)},he.useDebugValue=function(){},he.useDeferredValue=function(k,$){return q.H.useDeferredValue(k,$)},he.useEffect=function(k,$){return q.H.useEffect(k,$)},he.useEffectEvent=function(k){return q.H.useEffectEvent(k)},he.useId=function(){return q.H.useId()},he.useImperativeHandle=function(k,$,X){return q.H.useImperativeHandle(k,$,X)},he.useInsertionEffect=function(k,$){return q.H.useInsertionEffect(k,$)},he.useLayoutEffect=function(k,$){return q.H.useLayoutEffect(k,$)},he.useMemo=function(k,$){return q.H.useMemo(k,$)},he.useOptimistic=function(k,$){return q.H.useOptimistic(k,$)},he.useReducer=function(k,$,X){return q.H.useReducer(k,$,X)},he.useRef=function(k){return q.H.useRef(k)},he.useState=function(k){return q.H.useState(k)},he.useSyncExternalStore=function(k,$,X){return q.H.useSyncExternalStore(k,$,X)},he.useTransition=function(){return q.H.useTransition()},he.version="19.2.5",he}var Dy;function Ga(){return Dy||(Dy=1,wh.exports=OS()),wh.exports}var re=Ga();const xa=TS(re);var Eh={exports:{}},pa={},Th={exports:{}},Rh={};var Ny;function CS(){return Ny||(Ny=1,(function(e){function t(B,F){var oe=B.length;B.push(F);e:for(;0<oe;){var Re=oe-1>>>1,Oe=B[Re];if(0<l(Oe,F))B[Re]=F,B[oe]=Oe,oe=Re;else break e}}function s(B){return B.length===0?null:B[0]}function a(B){if(B.length===0)return null;var F=B[0],oe=B.pop();if(oe!==F){B[0]=oe;e:for(var Re=0,Oe=B.length,k=Oe>>>1;Re<k;){var $=2*(Re+1)-1,X=B[$],W=$+1,ie=B[W];if(0>l(X,oe))W<Oe&&0>l(ie,X)?(B[Re]=ie,B[W]=oe,Re=W):(B[Re]=X,B[$]=oe,Re=$);else if(W<Oe&&0>l(ie,oe))B[Re]=ie,B[W]=oe,Re=W;else break e}}return F}function l(B,F){var oe=B.sortIndex-F.sortIndex;return oe!==0?oe:B.id-F.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var u=performance;e.unstable_now=function(){return u.now()}}else{var c=Date,d=c.now();e.unstable_now=function(){return c.now()-d}}var p=[],g=[],m=1,y=null,b=3,_=!1,w=!1,A=!1,R=!1,O=typeof setTimeout=="function"?setTimeout:null,U=typeof clearTimeout=="function"?clearTimeout:null,j=typeof setImmediate<"u"?setImmediate:null;function L(B){for(var F=s(g);F!==null;){if(F.callback===null)a(g);else if(F.startTime<=B)a(g),F.sortIndex=F.expirationTime,t(p,F);else break;F=s(g)}}function Q(B){if(A=!1,L(B),!w)if(s(p)!==null)w=!0,V||(V=!0,me());else{var F=s(g);F!==null&&Be(Q,F.startTime-B)}}var V=!1,q=-1,K=5,J=-1;function le(){return R?!0:!(e.unstable_now()-J<K)}function se(){if(R=!1,V){var B=e.unstable_now();J=B;var F=!0;try{e:{w=!1,A&&(A=!1,U(q),q=-1),_=!0;var oe=b;try{t:{for(L(B),y=s(p);y!==null&&!(y.expirationTime>B&&le());){var Re=y.callback;if(typeof Re=="function"){y.callback=null,b=y.priorityLevel;var Oe=Re(y.expirationTime<=B);if(B=e.unstable_now(),typeof Oe=="function"){y.callback=Oe,L(B),F=!0;break t}y===s(p)&&a(p),L(B)}else a(p);y=s(p)}if(y!==null)F=!0;else{var k=s(g);k!==null&&Be(Q,k.startTime-B),F=!1}}break e}finally{y=null,b=oe,_=!1}F=void 0}}finally{F?me():V=!1}}}var me;if(typeof j=="function")me=function(){j(se)};else if(typeof MessageChannel<"u"){var Ce=new MessageChannel,Ye=Ce.port2;Ce.port1.onmessage=se,me=function(){Ye.postMessage(null)}}else me=function(){O(se,0)};function Be(B,F){q=O(function(){B(e.unstable_now())},F)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(B){B.callback=null},e.unstable_forceFrameRate=function(B){0>B||125<B?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):K=0<B?Math.floor(1e3/B):5},e.unstable_getCurrentPriorityLevel=function(){return b},e.unstable_next=function(B){switch(b){case 1:case 2:case 3:var F=3;break;default:F=b}var oe=b;b=F;try{return B()}finally{b=oe}},e.unstable_requestPaint=function(){R=!0},e.unstable_runWithPriority=function(B,F){switch(B){case 1:case 2:case 3:case 4:case 5:break;default:B=3}var oe=b;b=B;try{return F()}finally{b=oe}},e.unstable_scheduleCallback=function(B,F,oe){var Re=e.unstable_now();switch(typeof oe=="object"&&oe!==null?(oe=oe.delay,oe=typeof oe=="number"&&0<oe?Re+oe:Re):oe=Re,B){case 1:var Oe=-1;break;case 2:Oe=250;break;case 5:Oe=1073741823;break;case 4:Oe=1e4;break;default:Oe=5e3}return Oe=oe+Oe,B={id:m++,callback:F,priorityLevel:B,startTime:oe,expirationTime:Oe,sortIndex:-1},oe>Re?(B.sortIndex=oe,t(g,B),s(p)===null&&B===s(g)&&(A?(U(q),q=-1):A=!0,Be(Q,oe-Re))):(B.sortIndex=Oe,t(p,B),w||_||(w=!0,V||(V=!0,me()))),B},e.unstable_shouldYield=le,e.unstable_wrapCallback=function(B){var F=b;return function(){var oe=b;b=F;try{return B.apply(this,arguments)}finally{b=oe}}}})(Rh)),Rh}var Ly;function xS(){return Ly||(Ly=1,Th.exports=CS()),Th.exports}var Ah={exports:{}},bt={};var zy;function kS(){if(zy)return bt;zy=1;var e=Ga();function t(p){var g="https://react.dev/errors/"+p;if(1<arguments.length){g+="?args[]="+encodeURIComponent(arguments[1]);for(var m=2;m<arguments.length;m++)g+="&args[]="+encodeURIComponent(arguments[m])}return"Minified React error #"+p+"; visit "+g+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(){}var a={d:{f:s,r:function(){throw Error(t(522))},D:s,C:s,L:s,m:s,X:s,S:s,M:s},p:0,findDOMNode:null},l=Symbol.for("react.portal");function u(p,g,m){var y=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:l,key:y==null?null:""+y,children:p,containerInfo:g,implementation:m}}var c=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function d(p,g){if(p==="font")return"";if(typeof g=="string")return g==="use-credentials"?g:""}return bt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,bt.createPortal=function(p,g){var m=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!g||g.nodeType!==1&&g.nodeType!==9&&g.nodeType!==11)throw Error(t(299));return u(p,g,null,m)},bt.flushSync=function(p){var g=c.T,m=a.p;try{if(c.T=null,a.p=2,p)return p()}finally{c.T=g,a.p=m,a.d.f()}},bt.preconnect=function(p,g){typeof p=="string"&&(g?(g=g.crossOrigin,g=typeof g=="string"?g==="use-credentials"?g:"":void 0):g=null,a.d.C(p,g))},bt.prefetchDNS=function(p){typeof p=="string"&&a.d.D(p)},bt.preinit=function(p,g){if(typeof p=="string"&&g&&typeof g.as=="string"){var m=g.as,y=d(m,g.crossOrigin),b=typeof g.integrity=="string"?g.integrity:void 0,_=typeof g.fetchPriority=="string"?g.fetchPriority:void 0;m==="style"?a.d.S(p,typeof g.precedence=="string"?g.precedence:void 0,{crossOrigin:y,integrity:b,fetchPriority:_}):m==="script"&&a.d.X(p,{crossOrigin:y,integrity:b,fetchPriority:_,nonce:typeof g.nonce=="string"?g.nonce:void 0})}},bt.preinitModule=function(p,g){if(typeof p=="string")if(typeof g=="object"&&g!==null){if(g.as==null||g.as==="script"){var m=d(g.as,g.crossOrigin);a.d.M(p,{crossOrigin:m,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0})}}else g==null&&a.d.M(p)},bt.preload=function(p,g){if(typeof p=="string"&&typeof g=="object"&&g!==null&&typeof g.as=="string"){var m=g.as,y=d(m,g.crossOrigin);a.d.L(p,m,{crossOrigin:y,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0,type:typeof g.type=="string"?g.type:void 0,fetchPriority:typeof g.fetchPriority=="string"?g.fetchPriority:void 0,referrerPolicy:typeof g.referrerPolicy=="string"?g.referrerPolicy:void 0,imageSrcSet:typeof g.imageSrcSet=="string"?g.imageSrcSet:void 0,imageSizes:typeof g.imageSizes=="string"?g.imageSizes:void 0,media:typeof g.media=="string"?g.media:void 0})}},bt.preloadModule=function(p,g){if(typeof p=="string")if(g){var m=d(g.as,g.crossOrigin);a.d.m(p,{as:typeof g.as=="string"&&g.as!=="script"?g.as:void 0,crossOrigin:m,integrity:typeof g.integrity=="string"?g.integrity:void 0})}else a.d.m(p)},bt.requestFormReset=function(p){a.d.r(p)},bt.unstable_batchedUpdates=function(p,g){return p(g)},bt.useFormState=function(p,g,m){return c.H.useFormState(p,g,m)},bt.useFormStatus=function(){return c.H.useHostTransitionStatus()},bt.version="19.2.5",bt}var Py;function yv(){if(Py)return Ah.exports;Py=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Ah.exports=kS(),Ah.exports}var By;function jS(){if(By)return pa;By=1;var e=xS(),t=Ga(),s=yv();function a(n){var r="https://react.dev/errors/"+n;if(1<arguments.length){r+="?args[]="+encodeURIComponent(arguments[1]);for(var i=2;i<arguments.length;i++)r+="&args[]="+encodeURIComponent(arguments[i])}return"Minified React error #"+n+"; visit "+r+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function l(n){return!(!n||n.nodeType!==1&&n.nodeType!==9&&n.nodeType!==11)}function u(n){var r=n,i=n;if(n.alternate)for(;r.return;)r=r.return;else{n=r;do r=n,(r.flags&4098)!==0&&(i=r.return),n=r.return;while(n)}return r.tag===3?i:null}function c(n){if(n.tag===13){var r=n.memoizedState;if(r===null&&(n=n.alternate,n!==null&&(r=n.memoizedState)),r!==null)return r.dehydrated}return null}function d(n){if(n.tag===31){var r=n.memoizedState;if(r===null&&(n=n.alternate,n!==null&&(r=n.memoizedState)),r!==null)return r.dehydrated}return null}function p(n){if(u(n)!==n)throw Error(a(188))}function g(n){var r=n.alternate;if(!r){if(r=u(n),r===null)throw Error(a(188));return r!==n?null:n}for(var i=n,o=r;;){var h=i.return;if(h===null)break;var f=h.alternate;if(f===null){if(o=h.return,o!==null){i=o;continue}break}if(h.child===f.child){for(f=h.child;f;){if(f===i)return p(h),n;if(f===o)return p(h),r;f=f.sibling}throw Error(a(188))}if(i.return!==o.return)i=h,o=f;else{for(var v=!1,S=h.child;S;){if(S===i){v=!0,i=h,o=f;break}if(S===o){v=!0,o=h,i=f;break}S=S.sibling}if(!v){for(S=f.child;S;){if(S===i){v=!0,i=f,o=h;break}if(S===o){v=!0,o=f,i=h;break}S=S.sibling}if(!v)throw Error(a(189))}}if(i.alternate!==o)throw Error(a(190))}if(i.tag!==3)throw Error(a(188));return i.stateNode.current===i?n:r}function m(n){var r=n.tag;if(r===5||r===26||r===27||r===6)return n;for(n=n.child;n!==null;){if(r=m(n),r!==null)return r;n=n.sibling}return null}var y=Object.assign,b=Symbol.for("react.element"),_=Symbol.for("react.transitional.element"),w=Symbol.for("react.portal"),A=Symbol.for("react.fragment"),R=Symbol.for("react.strict_mode"),O=Symbol.for("react.profiler"),U=Symbol.for("react.consumer"),j=Symbol.for("react.context"),L=Symbol.for("react.forward_ref"),Q=Symbol.for("react.suspense"),V=Symbol.for("react.suspense_list"),q=Symbol.for("react.memo"),K=Symbol.for("react.lazy"),J=Symbol.for("react.activity"),le=Symbol.for("react.memo_cache_sentinel"),se=Symbol.iterator;function me(n){return n===null||typeof n!="object"?null:(n=se&&n[se]||n["@@iterator"],typeof n=="function"?n:null)}var Ce=Symbol.for("react.client.reference");function Ye(n){if(n==null)return null;if(typeof n=="function")return n.$$typeof===Ce?null:n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case A:return"Fragment";case O:return"Profiler";case R:return"StrictMode";case Q:return"Suspense";case V:return"SuspenseList";case J:return"Activity"}if(typeof n=="object")switch(n.$$typeof){case w:return"Portal";case j:return n.displayName||"Context";case U:return(n._context.displayName||"Context")+".Consumer";case L:var r=n.render;return n=n.displayName,n||(n=r.displayName||r.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case q:return r=n.displayName||null,r!==null?r:Ye(n.type)||"Memo";case K:r=n._payload,n=n._init;try{return Ye(n(r))}catch{}}return null}var Be=Array.isArray,B=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F=s.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,oe={pending:!1,data:null,method:null,action:null},Re=[],Oe=-1;function k(n){return{current:n}}function $(n){0>Oe||(n.current=Re[Oe],Re[Oe]=null,Oe--)}function X(n,r){Oe++,Re[Oe]=n.current,n.current=r}var W=k(null),ie=k(null),pe=k(null),Se=k(null);function Fe(n,r){switch(X(pe,r),X(ie,n),X(W,null),r.nodeType){case 9:case 11:n=(n=r.documentElement)&&(n=n.namespaceURI)?ey(n):0;break;default:if(n=r.tagName,r=r.namespaceURI)r=ey(r),n=ty(r,n);else switch(n){case"svg":n=1;break;case"math":n=2;break;default:n=0}}$(W),X(W,n)}function De(){$(W),$(ie),$(pe)}function Sn(n){n.memoizedState!==null&&X(Se,n);var r=W.current,i=ty(r,n.type);r!==i&&(X(ie,n),X(W,i))}function wn(n){ie.current===n&&($(W),$(ie)),Se.current===n&&($(Se),ua._currentValue=oe)}var Jn,vi;function cn(n){if(Jn===void 0)try{throw Error()}catch(i){var r=i.stack.trim().match(/\n( *(at )?)/);Jn=r&&r[1]||"",vi=-1<i.stack.indexOf(`
2    at`)?" (<anonymous>)":-1<i.stack.indexOf("@")?"@unknown:0:0":""}return`
3`+Jn+n+vi}var bi=!1;function gs(n,r){if(!n||bi)return"";bi=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var o={DetermineComponentFrameRoot:function(){try{if(r){var G=function(){throw Error()};if(Object.defineProperty(G.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(G,[])}catch(P){var z=P}Reflect.construct(n,[],G)}else{try{G.call()}catch(P){z=P}n.call(G.prototype)}}else{try{throw Error()}catch(P){z=P}(G=n())&&typeof G.catch=="function"&&G.catch(function(){})}}
vendor: 6,273 bytes, lines 3-8
3catch(P){if(P&&z&&typeof P.stack=="string")return[P.stack,z.stack]}return[null,null]}};o.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var h=Object.getOwnPropertyDescriptor(o.DetermineComponentFrameRoot,"name");h&&h.configurable&&Object.defineProperty(o.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var f=o.DetermineComponentFrameRoot(),v=f[0],S=f[1];if(v&&S){var C=v.split(`
4`),N=S.split(`
5`);for(h=o=0;o<C.length&&!C[o].includes("DetermineComponentFrameRoot");)o++;for(;h<N.length&&!N[h].includes("DetermineComponentFrameRoot");)h++;if(o===C.length||h===N.length)for(o=C.length-1,h=N.length-1;1<=o&&0<=h&&C[o]!==N[h];)h--;for(;1<=o&&0<=h;o--,h--)if(C[o]!==N[h]){if(o!==1||h!==1)do if(o--,h--,0>h||C[o]!==N[h]){var H=`
6`+C[o].replace(" at new "," at ");return n.displayName&&H.includes("<anonymous>")&&(H=H.replace("<anonymous>",n.displayName)),H}while(1<=o&&0<=h);break}}}finally{bi=!1,Error.prepareStackTrace=i}return(i=n?n.displayName||n.name:"")?cn(i):""}function Ya(n,r){switch(n.tag){case 26:case 27:case 5:return cn(n.type);case 16:return cn("Lazy");case 13:return n.child!==r&&r!==null?cn("Suspense Fallback"):cn("Suspense");case 19:return cn("SuspenseList");case 0:case 15:return gs(n.type,!1);case 11:return gs(n.type.render,!1);case 1:return gs(n.type,!0);case 31:return cn("Activity");default:return""}}function En(n){try{var r="",i=null;do r+=Ya(n,i),i=n,n=n.return;while(n);return r}catch(o){return`
7Error generating stack: `+o.message+`
8`+o.stack}}var Lr=Object.prototype.hasOwnProperty,tn=e.unstable_scheduleCallback,_i=e.unstable_cancelCallback,Fa=e.unstable_shouldYield,lu=e.unstable_requestPaint,vt=e.unstable_now,ze=e.unstable_getCurrentPriorityLevel,ht=e.unstable_ImmediatePriority,hn=e.unstable_UserBlockingPriority,ys=e.unstable_NormalPriority,ib=e.unstable_LowPriority,Df=e.unstable_IdlePriority,ab=e.log,ob=e.unstable_setDisableYieldValue,Si=null,Dt=null;function Xn(n){if(typeof ab=="function"&&ob(n),Dt&&typeof Dt.setStrictMode=="function")try{Dt.setStrictMode(Si,n)}catch{}}var Nt=Math.clz32?Math.clz32:cb,lb=Math.log,ub=Math.LN2;function cb(n){return n>>>=0,n===0?32:31-(lb(n)/ub|0)|0}var Qa=256,Ja=262144,Xa=4194304;function zr(n){var r=n&42;if(r!==0)return r;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 Za(n,r,i){var o=n.pendingLanes;if(o===0)return 0;var h=0,f=n.suspendedLanes,v=n.pingedLanes;n=n.warmLanes;var S=o&134217727;return S!==0?(o=S&~f,o!==0?h=zr(o):(v&=S,v!==0?h=zr(v):i||(i=S&~n,i!==0&&(h=zr(i))))):(S=o&~f,S!==0?h=zr(S):v!==0?h=zr(v):i||(i=o&~n,i!==0&&(h=zr(i)))),h===0?0:r!==0&&r!==h&&(r&f)===0&&(f=h&-h,i=r&-r,f>=i||f===32&&(i&4194048)!==0)?r:h}function wi(n,r){return(n.pendingLanes&~(n.suspendedLanes&~n.pingedLanes)&r)===0}function hb(n,r){switch(n){case 1:case 2:case 4:case 8:case 64:return r+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return r+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Nf(){var n=Xa;return Xa<<=1,(Xa&62914560)===0&&(Xa=4194304),n}function uu(n){for(var r=[],i=0;31>i;i++)r.push(n);return r}function Ei(n,r){n.pendingLanes|=r,r!==268435456&&(n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0)}function fb(n,r,i,o,h,f){var v=n.pendingLanes;n.pendingLanes=i,n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0,n.expiredLanes&=i,n.entangledLanes&=i,n.errorRecoveryDisabledLanes&=i,n.shellSuspendCounter=0;var S=n.entanglements,C=n.expirationTimes,N=n.hiddenUpdates;for(i=v&~i;0<i;){var H=31-Nt(i),G=1<<H;S[H]=0,C[H]=-1;var z=N[H];if(z!==null)for(N[H]=null,H=0;H<z.length;H++){var P=z[H];P!==null&&(P.lane&=-536870913)}i&=~G}o!==0&&Lf(n,o,0),f!==0&&h===0&&n.tag!==0&&(n.suspendedLanes|=f&~(v&~r))}function Lf(n,r,i){n.pendingLanes|=r,n.suspendedLanes&=~r;var o=31-Nt(r);n.entangledLanes|=r,n.entanglements[o]=n.entanglements[o]|1073741824|i&261930}function zf(n,r){var i=n.entangledLanes|=r;for(n=n.entanglements;i;){var o=31-Nt(i),h=1<<o;h&r|n[o]&r&&(n[o]|=r),i&=~h}}function Pf(n,r){var i=r&-r;return i=(i&42)!==0?1:cu(i),(i&(n.suspendedLanes|r))!==0?0:i}function cu(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 hu(n){return n&=-n,2<n?8<n?(n&134217727)!==0?32:268435456:8:2}function Bf(){var n=F.p;return n!==0?n:(n=window.event,n===void 0?32:Ty(n.type))}function Hf(n,r){var i=F.p;try{return F.p=n,r()}finally{F.p=i}}var Zn=Math.random().toString(36).slice(2),ft="__reactFiber$"+Zn,Et="__reactProps$"+Zn,ms="__reactContainer$"+Zn,fu="__reactEvents$"+Zn,db="__reactListeners$"+Zn,pb="__reactHandles$"+Zn,qf="__reactResources$"+Zn,Ti="__reactMarker$"+Zn;function du(n){delete n[ft],delete n[Et],delete n[fu],delete n[db],delete n[pb]}function vs(n){var r=n[ft];if(r)return r;for(var i=n.parentNode;i;){if(r=i[ms]||i[ft]){if(i=r.alternate,r.child!==null||i!==null&&i.child!==null)for(n=ly(n);n!==null;){if(i=n[ft])return i;n=ly(n)}return r}n=i,i=n.parentNode}return null}function bs(n){if(n=n[ft]||n[ms]){var r=n.tag;if(r===5||r===6||r===13||r===31||r===26||r===27||r===3)return n}return null}function Ri(n){var r=n.tag;if(r===5||r===26||r===27||r===6)return n.stateNode;throw Error(a(33))}function _s(n){var r=n[qf];return r||(r=n[qf]={hoistableStyles:new Map,hoistableScripts:new Map}),r}function ot(n){n[Ti]=!0}var If=new Set,$f={};
vendor: 6,950 bytes, line 8
8function Pr(n,r){Ss(n,r),Ss(n+"Capture",r)}function Ss(n,r){for($f[n]=r,n=0;n<r.length;n++)If.add(r[n])}var gb=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),Gf={},Vf={};function yb(n){return Lr.call(Vf,n)?!0:Lr.call(Gf,n)?!1:gb.test(n)?Vf[n]=!0:(Gf[n]=!0,!1)}function Wa(n,r,i){if(yb(r))if(i===null)n.removeAttribute(r);else{switch(typeof i){case"undefined":case"function":case"symbol":n.removeAttribute(r);return;case"boolean":var o=r.toLowerCase().slice(0,5);if(o!=="data-"&&o!=="aria-"){n.removeAttribute(r);return}}n.setAttribute(r,""+i)}}function eo(n,r,i){if(i===null)n.removeAttribute(r);else{switch(typeof i){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(r);return}n.setAttribute(r,""+i)}}function Tn(n,r,i,o){if(o===null)n.removeAttribute(i);else{switch(typeof o){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(i);return}n.setAttributeNS(r,i,""+o)}}function Gt(n){switch(typeof n){case"bigint":case"boolean":case"number":case"string":case"undefined":return n;case"object":return n;default:return""}}function Kf(n){var r=n.type;return(n=n.nodeName)&&n.toLowerCase()==="input"&&(r==="checkbox"||r==="radio")}function mb(n,r,i){var o=Object.getOwnPropertyDescriptor(n.constructor.prototype,r);if(!n.hasOwnProperty(r)&&typeof o<"u"&&typeof o.get=="function"&&typeof o.set=="function"){var h=o.get,f=o.set;return Object.defineProperty(n,r,{configurable:!0,get:function(){return h.call(this)},set:function(v){i=""+v,f.call(this,v)}}),Object.defineProperty(n,r,{enumerable:o.enumerable}),{getValue:function(){return i},setValue:function(v){i=""+v},stopTracking:function(){n._valueTracker=null,delete n[r]}}}}function pu(n){if(!n._valueTracker){var r=Kf(n)?"checked":"value";n._valueTracker=mb(n,r,""+n[r])}}function Yf(n){if(!n)return!1;var r=n._valueTracker;if(!r)return!0;var i=r.getValue(),o="";return n&&(o=Kf(n)?n.checked?"true":"false":n.value),n=o,n!==i?(r.setValue(n),!0):!1}function to(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 vb=/[\n"\\]/g;function Vt(n){return n.replace(vb,function(r){return"\\"+r.charCodeAt(0).toString(16)+" "})}function gu(n,r,i,o,h,f,v,S){n.name="",v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"?n.type=v:n.removeAttribute("type"),r!=null?v==="number"?(r===0&&n.value===""||n.value!=r)&&(n.value=""+Gt(r)):n.value!==""+Gt(r)&&(n.value=""+Gt(r)):v!=="submit"&&v!=="reset"||n.removeAttribute("value"),r!=null?yu(n,v,Gt(r)):i!=null?yu(n,v,Gt(i)):o!=null&&n.removeAttribute("value"),h==null&&f!=null&&(n.defaultChecked=!!f),h!=null&&(n.checked=h&&typeof h!="function"&&typeof h!="symbol"),S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"?n.name=""+Gt(S):n.removeAttribute("name")}function Ff(n,r,i,o,h,f,v,S){if(f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"&&(n.type=f),r!=null||i!=null){if(!(f!=="submit"&&f!=="reset"||r!=null)){pu(n);return}i=i!=null?""+Gt(i):"",r=r!=null?""+Gt(r):i,S||r===n.value||(n.value=r),n.defaultValue=r}o=o??h,o=typeof o!="function"&&typeof o!="symbol"&&!!o,n.checked=S?n.checked:!!o,n.defaultChecked=!!o,v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"&&(n.name=v),pu(n)}function yu(n,r,i){r==="number"&&to(n.ownerDocument)===n||n.defaultValue===""+i||(n.defaultValue=""+i)}function ws(n,r,i,o){if(n=n.options,r){r={};for(var h=0;h<i.length;h++)r["$"+i[h]]=!0;for(i=0;i<n.length;i++)h=r.hasOwnProperty("$"+n[i].value),n[i].selected!==h&&(n[i].selected=h),h&&o&&(n[i].defaultSelected=!0)}else{for(i=""+Gt(i),r=null,h=0;h<n.length;h++){if(n[h].value===i){n[h].selected=!0,o&&(n[h].defaultSelected=!0);return}r!==null||n[h].disabled||(r=n[h])}r!==null&&(r.selected=!0)}}function Qf(n,r,i){if(r!=null&&(r=""+Gt(r),r!==n.value&&(n.value=r),i==null)){n.defaultValue!==r&&(n.defaultValue=r);return}n.defaultValue=i!=null?""+Gt(i):""}function Jf(n,r,i,o){if(r==null){if(o!=null){if(i!=null)throw Error(a(92));if(Be(o)){if(1<o.length)throw Error(a(93));o=o[0]}i=o}i==null&&(i=""),r=i}i=Gt(r),n.defaultValue=i,o=n.textContent,o===i&&o!==""&&o!==null&&(n.value=o),pu(n)}function Es(n,r){if(r){var i=n.firstChild;if(i&&i===n.lastChild&&i.nodeType===3){i.nodeValue=r;return}}n.textContent=r}var bb=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 Xf(n,r,i){var o=r.indexOf("--")===0;i==null||typeof i=="boolean"||i===""?o?n.setProperty(r,""):r==="float"?n.cssFloat="":n[r]="":o?n.setProperty(r,i):typeof i!="number"||i===0||bb.has(r)?r==="float"?n.cssFloat=i:n[r]=(""+i).trim():n[r]=i+"px"}function Zf(n,r,i){if(r!=null&&typeof r!="object")throw Error(a(62));if(n=n.style,i!=null){for(var o in i)!i.hasOwnProperty(o)||r!=null&&r.hasOwnProperty(o)||(o.indexOf("--")===0?n.setProperty(o,""):o==="float"?n.cssFloat="":n[o]="");for(var h in r)o=r[h],r.hasOwnProperty(h)&&i[h]!==o&&Xf(n,h,o)}else for(var f in r)r.hasOwnProperty(f)&&Xf(n,f,r[f])}function mu(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 _b=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
8dering","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"]]),Sb=/^[\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 no(n){return Sb.test(""+n)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":n}function Rn(){}var vu=null;function bu(n){return n=n.target||n.srcElement||window,n.correspondingUseElement&&(n=n.correspondingUseElement),n.nodeType===3?n.parentNode:n}var Ts=null,Rs=null;function Wf(n){var r=bs(n);if(r&&(n=r.stateNode)){var i=n[Et]||null;e:switch(n=r.stateNode,r.type){case"input":if(gu(n,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name),r=i.name,i.type==="radio"&&r!=null){for(i=n;i.parentNode;)i=i.parentNode;for(i=i.querySelectorAll('input[name="'+Vt(""+r)+'"][type="radio"]'),r=0;r<i.length;r++){var o=i[r];if(o!==n&&o.form===n.form){var h=o[Et]||null;if(!h)throw Error(a(90));gu(o,h.value,h.defaultValue,h.defaultValue,h.checked,h.defaultChecked,h.type,h.name)}}for(r=0;r<i.length;r++)o=i[r],o.form===n.form&&Yf(o)}break e;case"textarea":Qf(n,i.value,i.defaultValue);break e;case"select":r=i.value,r!=null&&ws(n,!!i.multiple,r,!1)}}}var _u=!1;function ed(n,r,i){if(_u)return n(r,i);_u=!0;try{var o=n(r);return o}finally{if(_u=!1,(Ts!==null||Rs!==null)&&(Go(),Ts&&(r=Ts,n=Rs,Rs=Ts=null,Wf(r),n)))for(r=0;r<n.length;r++)Wf(n[r])}}function Ai(n,r){var i=n.stateNode;if(i===null)return null;var o=i[Et]||null;if(o===null)return null;i=o[r];e:switch(r){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(o=!o.disabled)||(n=n.type,o=!(n==="button"||n==="input"||n==="select"||n==="textarea")),n=!o;break e;default:n=!1}if(n)return null;if(i&&typeof i!="function")throw Error(a(231,r,typeof i));return i}var An=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Su=!1;
vendor: 3,351 bytes, line 8
8if(An)try{var Oi={};Object.defineProperty(Oi,"passive",{get:function(){Su=!0}}),window.addEventListener("test",Oi,Oi),window.removeEventListener("test",Oi,Oi)}catch{Su=!1}var Wn=null,wu=null,ro=null;function td(){if(ro)return ro;var n,r=wu,i=r.length,o,h="value"in Wn?Wn.value:Wn.textContent,f=h.length;for(n=0;n<i&&r[n]===h[n];n++);var v=i-n;for(o=1;o<=v&&r[i-o]===h[f-o];o++);return ro=h.slice(n,1<o?1-o:void 0)}function so(n){var r=n.keyCode;return"charCode"in n?(n=n.charCode,n===0&&r===13&&(n=13)):n=r,n===10&&(n=13),32<=n||n===13?n:0}function io(){return!0}function nd(){return!1}function Tt(n){function r(i,o,h,f,v){this._reactName=i,this._targetInst=h,this.type=o,this.nativeEvent=f,this.target=v,this.currentTarget=null;for(var S in n)n.hasOwnProperty(S)&&(i=n[S],this[S]=i?i(f):f[S]);return this.isDefaultPrevented=(f.defaultPrevented!=null?f.defaultPrevented:f.returnValue===!1)?io:nd,this.isPropagationStopped=nd,this}return y(r.prototype,{preventDefault:function(){this.defaultPrevented=!0;var i=this.nativeEvent;i&&(i.preventDefault?i.preventDefault():typeof i.returnValue!="unknown"&&(i.returnValue=!1),this.isDefaultPrevented=io)},stopPropagation:function(){var i=this.nativeEvent;i&&(i.stopPropagation?i.stopPropagation():typeof i.cancelBubble!="unknown"&&(i.cancelBubble=!0),this.isPropagationStopped=io)},persist:function(){},isPersistent:io}),r}var Br={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(n){return n.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ao=Tt(Br),Ci=y({},Br,{view:0,detail:0}),wb=Tt(Ci),Eu,Tu,xi,oo=y({},Ci,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Au,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!==xi&&(xi&&n.type==="mousemove"?(Eu=n.screenX-xi.screenX,Tu=n.screenY-xi.screenY):Tu=Eu=0,xi=n),Eu)},movementY:function(n){return"movementY"in n?n.movementY:Tu}}),rd=Tt(oo),Eb=y({},oo,{dataTransfer:0}),Tb=Tt(Eb),Rb=y({},Ci,{relatedTarget:0}),Ru=Tt(Rb),Ab=y({},Br,{animationName:0,elapsedTime:0,pseudoElement:0}),Ob=Tt(Ab),Cb=y({},Br,{clipboardData:function(n){return"clipboardData"in n?n.clipboardData:window.clipboardData}}),xb=Tt(Cb),kb=y({},Br,{data:0}),sd=Tt(kb),jb={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Mb={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"},Ub={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Db(n){var r=this.nativeEvent;return r.getModifierState?r.getModifierState(n):(n=Ub[n])?!!r[n]:!1}function Au(){return Db}var Nb=y({},Ci,{key:function(n){if(n.key){var r=jb[n.key]||n.key;if(r!=="Unidentified")return r}return n.type==="keypress"?(n=so(n),n===13?"Enter":String.fromCharCode(n)):n.type==="
8keydown"||n.type==="keyup"?Mb[n.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Au,charCode:function(n){return n.type==="keypress"?so(n):0},keyCode:function(n){return n.type==="keydown"||n.type==="keyup"?n.keyCode:0},which:function(n){return n.type==="keypress"?so(n):n.type==="keydown"||n.type==="keyup"?n.keyCode:0}}),Lb=Tt(Nb),zb=y({},oo,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),id=Tt(zb),Pb=y({},Ci,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Au}),Bb=Tt(Pb),Hb=y({},Br,{propertyName:0,elapsedTime:0,pseudoElement:0}),qb=Tt(Hb),Ib=y({},oo,{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}),$b=Tt(Ib),Gb=y({},Br,{newState:0,oldState:0}),Vb=Tt(Gb),Kb=[9,13,27,32],Ou=An&&"CompositionEvent"in window,ki=null;An&&"documentMode"in document&&(ki=document.documentMode);var Yb=An&&"TextEvent"in window&&!ki,ad=An&&(!Ou||ki&&8<ki&&11>=ki),od=" ",ld=!1;function ud(n,r){switch(n){case"keyup":return Kb.indexOf(r.keyCode)!==-1;case"keydown":return r.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function cd(n){return n=n.detail,typeof n=="object"&&"data"in n?n.data:null}var As=!1;function Fb(n,r){switch(n){case"compositionend":return cd(r);case"keypress":return r.which!==32?null:(ld=!0,od);case"textInput":return n=r.data,n===od&&ld?null:n;default:return null}}function Qb(n,r){if(As)return n==="compositionend"||!Ou&&ud(n,r)?(n=td(),ro=wu=Wn=null,As=!1,n):null;switch(n){case"paste":return null;case"keypress":if(!(r.ctrlKey||r.altKey||r.metaKey)||r.ctrlKey&&r.altKey){if(r.char&&1<r.char.length)return r.char;if(r.which)return String.fromCharCode(r.which)}return null;case"compositionend":return ad&&r.locale!=="ko"?null:r.data;default:return null}}var Jb={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 hd(n){var r=n&&n.nodeName&&n.nodeName.toLowerCase();return r==="input"?!!Jb[n.type]:r==="textarea"}function fd(n,r,i,o){Ts?Rs?Rs.push(o):Rs=[o]:Ts=o,r=Xo(r,"onChange"),0<r.length&&(i=new ao("onChange","change",null,i,o),n.push({event:i,listeners:r}))}var ji=null,Mi=null;function Xb(n){Fg(n,0)}function lo(n){var r=Ri(n);if(Yf(r))return n}function dd(n,r){if(n==="change")return r}var pd=!1;if(An){var Cu;if(An){var xu="oninput"in document;if(!xu){var gd=document.createElement("div");gd.setAttribute("oninput","return;"),xu=typeof gd.oninput=="function"}Cu=xu}else Cu=!1;pd=Cu&&(!document.documentMode||9<document.documentMode)}function yd(){ji&&(ji.detachEvent("onpropertychange",md),Mi=ji=null)}function md(n){if(n.propertyName==="value"&&lo(Mi)){var r=[];fd(r,Mi,n,bu(n)),ed(Xb,r)}}function Zb(n,r,i){n==="focusin"?(yd(),ji=r,Mi=i,ji.attachEvent("onpropertychange",md)):n==="focusout"&&yd()}function Wb(n){if(n==="selectionchange"||n==="keyup"||n==="keydown")return lo(Mi)}function e_(n,r){if(n==="click")return lo(r)}function t_(n,r){if(n==="input"||n==="change")return lo(r)}function n_(n,r){return n===r&&(n!==0||1/n===1/r)||n!==n&&r!==r}var Lt=typeof Object.is=="function"?Object.is:n_;function Ui(n,r){if(Lt(n,r))return!0;if(typeof n!="object"||n===null||typeof r!="object"||r===null)return!1;var i=Object.keys(n),o=Object.keys(r);if(i.length!==o.length)return!1;for(o=0;o<i.length;o++){var h=i[o];if(!Lr.call(r,h)||!Lt(n[h],r[h]))return!1}return!0}function vd(n){for(;n&&n.firstChild;)n=n.firstChild;return n}function bd(n,r){var i=vd(n);n=0;for(var o;i;){if(i.nodeType===3){if(o=n+i.textContent.length,n<=r&&o>=r)return{node:i,offset:r-n};n=o}e:{for(;i;){if(i.nextSibling){i=i.nextSibling;break e}i=i.parentNode}i=void 0}i=vd(i)}}function _d(n,r){return n&&r?n===r?!0:n&&n.nodeType===3?!1:r&&r.nodeType===3?_d(n,r.parentNode):"contains"in n?n.contains(r):n.compareDocumentPosition?!!(n.compareDocumentPosition(r)&16):!1:!1}function Sd(n){n=n!=null&&n.ownerDocument!=null&&n.ownerDocument.defaultView!=null?n.ownerDocument.defaultView:window;for(var r=to(n.document);r instanceof n.HTMLIFrameElement;){try{var i=typeof r.contentWindow.location.href=="string"}catch{i=!1}if(i)n=r.contentWindow;else break;r=to(n.document)}return r}function ku(n){var r=n&&n.nodeName&&n.nodeName.toLowerCase();return r&&(r==="input"&&(n.type==="text"||n.type==="search"||n.type==="tel"||n.type==="url"||n.type==="password")||r==="textarea"||n.contentEditable==="true")}var r_=An&&"documentMode"in document&&11>=document.documentMode,Os=null,ju=null,Di=null,Mu=!1;function wd(n,r,i){var o=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;
vendor: 19,237 bytes, line 8
8Mu||Os==null||Os!==to(o)||(o=Os,"selectionStart"in o&&ku(o)?o={start:o.selectionStart,end:o.selectionEnd}:(o=(o.ownerDocument&&o.ownerDocument.defaultView||window).getSelection(),o={anchorNode:o.anchorNode,anchorOffset:o.anchorOffset,focusNode:o.focusNode,focusOffset:o.focusOffset}),Di&&Ui(Di,o)||(Di=o,o=Xo(ju,"onSelect"),0<o.length&&(r=new ao("onSelect","select",null,r,i),n.push({event:r,listeners:o}),r.target=Os)))}function Hr(n,r){var i={};return i[n.toLowerCase()]=r.toLowerCase(),i["Webkit"+n]="webkit"+r,i["Moz"+n]="moz"+r,i}var Cs={animationend:Hr("Animation","AnimationEnd"),animationiteration:Hr("Animation","AnimationIteration"),animationstart:Hr("Animation","AnimationStart"),transitionrun:Hr("Transition","TransitionRun"),transitionstart:Hr("Transition","TransitionStart"),transitioncancel:Hr("Transition","TransitionCancel"),transitionend:Hr("Transition","TransitionEnd")},Uu={},Ed={};An&&(Ed=document.createElement("div").style,"AnimationEvent"in window||(delete Cs.animationend.animation,delete Cs.animationiteration.animation,delete Cs.animationstart.animation),"TransitionEvent"in window||delete Cs.transitionend.transition);function qr(n){if(Uu[n])return Uu[n];if(!Cs[n])return n;var r=Cs[n],i;for(i in r)if(r.hasOwnProperty(i)&&i in Ed)return Uu[n]=r[i];return n}var Td=qr("animationend"),Rd=qr("animationiteration"),Ad=qr("animationstart"),s_=qr("transitionrun"),i_=qr("transitionstart"),a_=qr("transitioncancel"),Od=qr("transitionend"),Cd=new Map,Du="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(" ");Du.push("scrollEnd");function nn(n,r){Cd.set(n,r),Pr(r,[n])}var uo=typeof reportError=="function"?reportError:function(n){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var r=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(r))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",n);return}console.error(n)},Kt=[],xs=0,Nu=0;function co(){for(var n=xs,r=Nu=xs=0;r<n;){var i=Kt[r];Kt[r++]=null;var o=Kt[r];Kt[r++]=null;var h=Kt[r];Kt[r++]=null;var f=Kt[r];if(Kt[r++]=null,o!==null&&h!==null){var v=o.pending;v===null?h.next=h:(h.next=v.next,v.next=h),o.pending=h}f!==0&&xd(i,h,f)}}function ho(n,r,i,o){Kt[xs++]=n,Kt[xs++]=r,Kt[xs++]=i,Kt[xs++]=o,Nu|=o,n.lanes|=o,n=n.alternate,n!==null&&(n.lanes|=o)}function Lu(n,r,i,o){return ho(n,r,i,o),fo(n)}function Ir(n,r){return ho(n,null,null,r),fo(n)}function xd(n,r,i){n.lanes|=i;var o=n.alternate;o!==null&&(o.lanes|=i);for(var h=!1,f=n.return;f!==null;)f.childLanes|=i,o=f.alternate,o!==null&&(o.childLanes|=i),f.tag===22&&(n=f.stateNode,n===null||n._visibility&1||(h=!0)),n=f,f=f.return;return n.tag===3?(f=n.stateNode,h&&r!==null&&(h=31-Nt(i),n=f.hiddenUpdates,o=n[h],o===null?n[h]=[r]:o.push(r),r.lane=i|536870912),f):null}function fo(n){if(50<na)throw na=0,Vc=null,Error(a(185));for(var r=n.return;r!==null;)n=r,r=n.return;return n.tag===3?n.stateNode:null}var ks={};function o_(n,r,i,o){this.tag=n,this.key=i,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=r,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=o,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function zt(n,r,i,o){return new o_(n,r,i,o)}function zu(n){return n=n.prototype,!(!n||!n.isReactComponent)}function On(n,r){var i=n.alternate;return i===null?(i=zt(n.tag,r,n.key,n.mode),i.elementType=n.elementType,i.type=n.type,i.stateNode=n.stateNode,i.alternate=n,n.alternate=i):(i.pendingProps=r,i.type=n.type,i.flags=0,i.subtreeFlags=0,i.deletions=null),i.flags=n.flags&65011712,i.childLanes=n.childLanes,i.lanes=n.lanes,i.child=n.child,i.memoizedProps=n.memoizedProps,i.memoizedState=n.memoizedState,i.updateQueue=n.updateQueue,r=n.dependencies,i.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext},i.sibling=n.sibling,i.index=n.index,i.ref=n.ref,i.refCleanup=n.refCleanup,i}function kd(n,r){n.flags&=65011714;var i=n.alternate;return i===null?(n.childLanes=0,n.lanes=r,n.child=null,n.subtreeFlags=0,n.memoizedProps=null,n.memoizedState=null,n.updateQueue=null,n.dependencies=null,n.stateNode=null):(n.childLanes=i.childLanes,n.lanes=i.lanes,n.child=i.child,n.subtreeFlags=0,n.deletions=null,n.memoizedProps=i.memoizedProps,n.memoizedState=i.memoizedState,n.updateQueue=i.updateQueue,n.type=i.type,r=i.dependencies,n.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext}),n}function po(n,r,i,o,h,f){var v=0;if(o=n,typeof n=="function")zu(n)&&(v=1);else if(typeof n=="string")v=fS(n,i,W.current)?26:n==="html"||n==="head"||n==="body"?27:5;else e:switch(n){case J:return n=zt(31,i,r,h),n.elementType=J,n.lanes=f,n;case A:return $r(i.children,h,f,r);case R:v=8,h|=24;break;case O:return n=zt(12,i,r,h|2),n.elementType=O,n.lanes=f,n;case Q:return n=zt(13,i,r,h),n.elementType=Q,n.lanes=f,n;case V:return n=zt(19,i,r,h),n.elementType=V,n.lanes=f,n;default:if(typeof n=="object"&&n!==null)switch(n.$$typeof){case j:v=10;break e;case U:v=9;break e;case L:v=11;break e;case q:v=14;break e;case K:v=16,o=null;break e}v=29,i=Error(a(130,n===null?"null":typeof n,"")),o=null}return r=zt(v,i,r,h),r.elementType=n,r.type=o,r.lanes=f,r}function $r(n,r,i,o){return n=zt(7,n,o,r),n.lanes=i,n}function Pu(n,r,i){return n=zt(6,n,null,r),n.lanes=i,n}function jd(n){var r=zt(18,null,null,0);return r.stateNode=n,r}function Bu(n,r,i){return r=zt(4,n.children!==null?n.children:[],n.key,r),r.lanes=i,r.stateNode={containerInfo:n.containerInfo,pendingChildren:null,implementation:n.implementation},r}var Md=new WeakMap;function Yt(n,r){if(typeof n=="object"&&n!==null){var i=Md.get(n);return i!==void 0?i:(r={value:n,source:r,stack:En(r)},Md.set(n,r),r)}return{value:n,source:r,stack:En(r)}}var js=[],Ms=0,go=null,Ni=0,Ft=[],Qt=0,er=null,fn=1,dn="";function Cn(n,r){js[Ms++]=Ni,js[Ms++]=go,go=n,Ni=r}function Ud(n,r,i){Ft[Qt++]=fn,Ft[Qt++]=dn,Ft[Qt++]=er,er=n;var o=fn;n=dn;var h=32-Nt(o)-1;o&=~(1<<h),i+=1;var f=32-Nt(r)+h;if(30<f){var v=h-h%5;f=(o&(1<<v)-1).toString(32),o>>=v,h-=v,fn=1<<32-Nt(r)+h|i<<h|o,dn=f+n}else fn=1<<f|i<<h|o,dn=n}function Hu(n){n.return!==null&&(Cn(n,1),Ud(n,1,0))}function qu(n){for(;n===go;)go=js[--Ms],js[Ms]=null,Ni=js[--Ms],js[Ms]=null;for(;n===er;)er=Ft[--Qt],Ft[Qt]=null,dn=Ft[--Qt],Ft[Qt]=null,fn=Ft[--Qt],Ft[Qt]=null}function Dd(n,r){Ft[Qt++]=fn,Ft[Qt++]=dn,Ft[Qt++]=er,fn=r.id,dn=r.overflow,er=n}var dt=null,He=null,_e=!1,tr=null,Jt=!1,Iu=Error(a(519));function nr(n){var r=Error(a(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Li(Yt(r,n)),Iu}function Nd(n){var r=n.stateNode,i=n.type,o=n.memoizedProps;switch(r[ft]=n,r[Et]=o,i){case"dialog":ye("cancel",r),ye("close",r);break;case"iframe":case"object":case"embed":ye("load",r);break;case"video":case"audio":for(i=0;i<sa.length;i++)ye(sa[i],r);break;case"source":ye("error",r);break;case"img":case"image":case"link":ye("error",r),ye("load",r);break;case"details":ye("toggle",r);break;case"input":ye("invalid",r),Ff(r,o.value,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name,!0);break;case"select":ye("invalid",r);break;case"textarea":ye("invalid",r),Jf(r,o.value,o.defaultValue,o.children)}i=o.children,typeof i!="string"&&typeof i!="number"&&typeof i!="bigint"||r.textContent===""+i||o.suppressHydrationWarning===!0||Zg(r.textContent,i)?(o.popover!=null&&(ye("beforetoggle",r),ye("toggle",r)),o.onScroll!=null&&ye("scroll",r),o.onScrollEnd!=null&&ye("scrollend",r),o.onClick!=null&&(r.onclick=Rn),r=!0):r=!1,r||nr(n,!0)}function Ld(n){for(dt=n.return;dt;)switch(dt.tag){case 5:case 31:case 13:Jt=!1;return;case 27:case 3:Jt=!0;return;default:dt=dt.return}}function Us(n){if(n!==dt)return!1;if(!_e)return Ld(n),_e=!0,!1;var r=n.tag,i;if((i=r!==3&&r!==27)&&((i=r===5)&&(i=n.type,i=!(i!=="form"&&i!=="button")||ah(n.type,n.memoizedProps)),i=!i),i&&He&&nr(n),Ld(n),r===13){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(a(317));He=oy(n)}else if(r===31){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(a(317));He=oy(n)}else r===27?(r=He,yr(n.type)?(n=hh,hh=null,He=n):He=r):He=dt?Zt(n.stateNode.nextSibling):null;return!0}function Gr(){He=dt=null,_e=!1}function $u(){var n=tr;return n!==null&&(Ct===null?Ct=n:Ct.push.apply(Ct,n),tr=null),n}function Li(n){tr===null?tr=[n]:tr.push(n)}var Gu=k(null),Vr=null,xn=null;function rr(n,r,i){X(Gu,r._currentValue),r._currentValue=i}function kn(n){n._currentValue=Gu.current,$(Gu)}function Vu(n,r,i){for(;n!==null;){var o=n.alternate;if((n.childLanes&r)!==r?(n.childLanes|=r,o!==null&&(o.childLanes|=r)):o!==null&&(o.childLanes&r)!==r&&(o.childLanes|=r),n===i)break;n=n.return}}function Ku(n,r,i,o){var h=n.child;for(h!==null&&(h.return=n);h!==null;){var f=h.dependencies;if(f!==null){var v=h.child;f=f.firstContext;e:for(;f!==null;){var S=f;f=h;for(var C=0;C<r.length;C++)if(S.context===r[C]){f.lanes|=i,S=f.alternate,S!==null&&(S.lanes|=i),Vu(f.return,i,n),o||(v=null);break e}f=S.next}}else if(h.tag===18){if(v=h.return,v===null)throw Error(a(341));v.lanes|=i,f=v.alternate,f!==null&&(f.lanes|=i),Vu(v,i,n),v=null}else v=h.child;if(v!==null)v.return=h;else for(v=h;v!==null;){if(v===n){v=null;break}if(h=v.sibling,h!==null){h.return=v.return,v=h;break}v=v.return}h=v}}function Ds(n,r,i,o){n=null;for(var h=r,f=!1;h!==null;){if(!f){if((h.flags&524288)!==0)f=!0;else if((h.flags&262144)!==0)break}if(h.tag===10){var v=h.alternate;if(v===null)throw Error(a(387));if(v=v.memoizedProps,v!==null){var S=h.type;Lt(h.pendingProps.value,v.value)||(n!==null?n.push(S):n=[S])}}else if(h===Se.current){if(v=h.alternate,v===null)throw Error(a(387));v.memoizedState.memoizedState!==h.memoizedState.memoizedState&&(n!==null?n.push(ua):n=[ua])}h=h.return}n!==null&&Ku(r,n,i,o),r.flags|=262144}function yo(n){for(n=n.firstContext;n!==null;){if(!Lt(n.context._currentValue,n.memoizedValue))return!0;n=n.next}return!1}function Kr(n){Vr=n,xn=null,n=n.dependencies,n!==null&&(n.firstContext=null)}function pt(n){return zd(Vr,n)}function mo(n,r){return Vr===null&&Kr(n),zd(n,r)}function zd(n,r){var i=r._currentValue;if(r={context:r,memoizedValue:i,next:null},xn===null){if(n===null)throw Error(a(308));xn=r,n.dependencies={lanes:0,firstContext:r},n.flags|=524288}else xn=xn.next=r;return i}var l_=typeof AbortController<"u"?AbortController:function(){var n=[],r=this.signal={aborted:!1,addEventListener:function(i,o){n.push(o)}};this.abort=function(){r.aborted=!0,n.forEach(function(i){return i()})}},u_=e.unstable_scheduleCallback,c_=e.unstable_NormalPriority,Ze={$$typeof:j,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Yu(){return{controller:new l_,data:new Map,refCount:0}}function zi(n){n.refCount--,n.refCount===0&&u_(c_,function(){n.controller.abort()})}var Pi=null,Fu=0,Ns=0,Ls=null;function h_(n,r){if(Pi===null){var i=Pi=[];Fu=0,Ns=Xc(),Ls={status:"pending",value:void 0,then:function(o){i.push(o)}}}return Fu++,r.then(Pd,Pd),r}function Pd(){if(--Fu===0&&Pi!==null){Ls!==null&&(Ls.status="fulfilled");var n=Pi;Pi=null,Ns=0,Ls=null;for(var r=0;r<n.length;r++)(0,n[r])()}}function f_(n,r){var i=[],o={status:"pending",value:null,reason:null,then:function(h){i.push(h)}};return n.then(function(){o.status="fulfilled",o.value=r;for(var h=0;h<i.length;h++)(0,i[h])(r)},function(h){for(o.status="rejected",o.reason=h,h=0;h<i.length;h++)(0,i[h])(void 0)}),o}var Bd=B.S;B.S=function(n,r){wg=vt(),typeof r=="object"&&r!==null&&typeof r.then=="function"&&h_(n,r),Bd!==null&&Bd(n,r)};var Yr=k(null);function Qu(){var n=Yr.current;return n!==null?n:Ne.pooledCache}function vo(n,r){r===null?X(Yr,Yr.current):X(Yr,r.pool)}function Hd(){var n=Qu();return n===null?null:{parent:Ze._currentValue,pool:n}}var zs=Error(a(460)),Ju=Error(a(474)),bo=Error(a(542)),_o={then:function(){}};function qd(n){return n=n.status,n==="fulfilled"||n==="rejected"}function Id(n,r,i){switch(i=n[i],i===void 0?n.push(r):i!==r&&(r.then(Rn,Rn),r=i),r.status){case"fulfilled":return r.value;case"rejected":throw n=r.reason,Gd(n),n;default:if(typeof r.status=="string")r.then(Rn,Rn);else{if(n=Ne,n!==null&&100<n.shellSuspendCounter)throw Error(a(482));n=r,n.status="pending",n.then(function(o){if(r.status==="pending"){var h=r;h.status="fulfilled",h.value=o}},function(o){if(r.status==="pending"){var h=r;h.status="rejected",h.reason=o}})}switch(r.status){case"fulfilled":return r.value;case"rejected":throw n=r.reason,Gd(n),n}throw Qr=r,zs}}function Fr(n){try{var r=n._init;return r(n._payload)}catch(i){throw i!==null&&typeof i=="object"&&typeof i.then=="function"?(Qr=i,zs):i}}var Qr=null;function $d(){if(Qr===null)throw Error(a(459));var n=Qr;return Qr=null,n}function Gd(n){if(n===zs||n===bo)throw Error(a(483))}var Ps=null,Bi=0;function So(n){var r=Bi;return Bi+=1,Ps===null&&(Ps=[]),Id(Ps,n,r)}function Hi(n,r){r=r.props.ref,n.ref=r!==void 0?r:null}function wo(n,r){throw r.$$typeof===b?Error(a(525)):(n=Object.prototype.toString.call(r),Error(a(31,n==="[object Object]"?"object with keys {"+Object.keys(r).join(", ")+"}":n)))}function Vd(n){function r(M,x){if(n){var D=M.deletions;D===null?(M.deletions=[x],M.flags|=16):D.push(x)}}function i(M,x){if(!n)return null;for(;x!==null;)r(M,x),x=x.sibling;return null}function o(M){for(var x=new Map;M!==null;)M.key!==null?x.set(M.key,M):x.set(M.index,M),M=M.sibling;return x}function h(M,x){return M=On(M,x),M.index=0,M.sibling=null,M}function f(M,x,D){return M.index=D,n?(D=M.alternate,D!==null?(D=D.index,D<x?(M.flags|=67108866,x):D):(M.flags|=67108866,x)):(M.flags|=1048576,x)}function v(M){return n&&M.alternate===null&&(M.flags|=67108866),M}function S(M,x,D,I){return x===null||x.tag!==6?(x=Pu(D,M.mode,I),x.return=M,x):(x=h(x,D),x.return=M,x)}function C(M,x,D,I){var ae=D.type;return ae===A?H(M,x,D.props.children,I,D.key):x!==null&&(x.elementType===ae||typeof ae=="object"&&ae!==null&&ae.$$typeof===K&&Fr(ae)===x.type)?(x=h(x,D.props),Hi(x,D),x.return=M,x):(x=po(D.type,D.key,D.props,null,M.mode,I),Hi(x,D),x.return=M,x)}function N(M,x,D,I){return x===null||x.tag!==4||x.stateNode.containerInfo!==D.containerInfo||x.stateNode.implementation!==D.implementation?(x=Bu(D,M.mode,I),x.return=M,x):(x=h(x,D.children||[]),x.return=M,x)}function H(M,x,D,I,ae){return x===null||x.tag!==7?(x=$r(D,M.mode,I,ae),x.return=M,x):(x=h(x,D),x.return=M,x)}function G(M,x,D){if(typeof x=="string"&&x!==""||typeof x=="number"||typeof x=="bigint")return x=Pu(""+x,M.mode,D),x.return=M,x;if(typeof x=="object"&&x!==null){switch(x.$$typeof){case _:return D=po(x.type,x.key,x.props,null,M.mode,D),Hi(D,x),D.return=M,D;case w:return x=Bu(x,M.mode,D),x.return=M,x;case K:return x=Fr(x),G(M,x,D)}if(Be(x)||me(x))return x=$r(x,M.mode,D,null),x.return=M,x;if(typeof x.then=="function")return G(M,So(x),D);if(x.$$typeof===j)return G(M,mo(M,x),D);wo(M,x)}return null}function z(M,x,D,I){var ae=x!==null?x.key:null;if(typeof D=="string"&&D!==""||typeof D=="number"||typeof D=="bigint")return ae!==null?null:S(M,x,""+D,I);if(typeof D=="object"&&D!==null){switch(D.$$typeof){case _:return D.key===ae?C(M,x,D,I):null;case w:return D.key===ae?N(M,x,D,I):null;case K:return D=Fr(D),z(M,x,D,I)}if(Be(D)||me(D))return ae!==null?null:H(M,x,D,I,null);if(typeof D.then=="function")return z(M,x,So(D),I);if(D.$$typeof===j)return z(M,x,mo(M,D),I);wo(M,D)}return null}function P(M,x,D,I,ae){if(typeof I=="string"&&I!==""||typeof I=="number"||typeof I=="bigint")return M=M.get(D)||null,S(x,M,""+I,ae);if(typeof I=="object"&&I!==null){switch(I.$$typeof){case _:return M=M.get(I.key===null?D:I.key)||null,C(x,M,I,ae);case w:return M=M.get(I.key===null?D:I.key)||null,N(x,M,I,ae);case K:return I=Fr(I),P(M,x,D,I,ae)}if(Be(I)||me(I))return M=M.get(D)||null,H(x,M,I,ae,null);if(typeof I.then=="function")return P(M,x,D,So(I),ae);if(I.$$typeof===j)return P(M,x,D,mo(x,I),ae);wo(x,I)}return null}function ee(M,x,D,I){for(var ae=null,we=null,ne=x,de=x=0,be=null;ne!==null&&de<D.length;de++){ne.index>de?(be=ne,ne=null):be=ne.sibling;var Ee=z(M,ne,D[de],I);if(Ee===null){ne===null&&(ne=be);break}n&&ne&&Ee.alternate===null&&r(M,ne),x=f(Ee,x,de),we===null?ae=Ee:we.sibling=Ee,we=Ee,ne=be}if(de===D.length)return i(M,ne),_e&&Cn(M,de),ae;if(ne===null){for(;de<D.length;de++)ne=G(M,D[de],I),ne!==null&&(x=f(ne,x,de),we===null?ae=ne:we.sibling=ne,we=ne);return _e&&Cn(M,de),ae}for(ne=o(ne);de<D.length;de++)be=P(ne,M,de,D[de],I),be!==null&&(n&&be.alternate!==null&&ne.delete(be.key===null?de:be.key),x=f(be,x,de),we===null?ae=be:we.sibling=be,we=be);return n&&ne.forEach(function(Sr){return r(M,Sr)}),_e&&Cn(M,de),ae}function ue(M,x,D,I){if(D==null)throw Error(a(151));for(var ae=null,we=null,ne=x,de=x=0,be=null,Ee=D.next();ne!==null&&!Ee.done;de++,Ee=D.next()){ne.index>de?(be=ne,ne=null):be=ne.sibling;var Sr=z(M,ne,Ee.value,I);if(Sr===null){ne===null&&(ne=be);break}n&&ne&&Sr.alternate===null&&r(M,ne),x=f(Sr,x,de),we===null?ae=Sr:we.sibling=Sr,we=Sr,ne=be}if(Ee.done)return i(M,ne),_e&&Cn(M,de),ae;if(ne===null){for(;!Ee.done;de++,Ee=D.next())Ee=G(M,Ee.value,I),Ee!==null&&(x=f(Ee,x,de),we===null?ae=Ee:we.sibling=Ee,we=Ee);return _e&&Cn(M,de),ae}for(ne=o(ne);!Ee.done;de++,Ee=D.next())Ee=P(ne,M,de,Ee.value,I),Ee!==null&&(n&&Ee.alternate!==null&&ne.delete(Ee.key===null?de:Ee.key),x=f(Ee,x,de),we===null?ae=Ee:we.sibling=Ee,we=Ee);return n&&ne.forEach(function(ES){return r(M,ES)}),_e&&Cn(M,de),ae}function Ue(M,x,D,I){if(typeof D=="object"&&D!==null&&D.type===A&&D.key===null&&(D=D.props.children),typeof D=="object"&&D!==null){switch(D.$$typeof){case _:e:{for(var ae=D.key;x!==null;){if(x.key===ae){if(ae=D.type,ae===A){if(x.tag===7){i(M,x.sibling),I=h(x,D.props.children),I.return=M,M=I;break e}}else if(x.elementType===ae||typeof ae=="object"&&ae!==null&&ae.$$typeof===K&&Fr(ae)===x.type){i(M,x.sibling),I=h(x,D.props),Hi(I,D),I.return=M,M=I;break e}i(M,x);break}else r(M,x);x=x.sibling}D.type===A?(I=$r(D.props.children,M.mode,I,D.key),I.return=M,M=I):(I=po(D.type,D.key,D.props,null,M.mode,I),Hi(I,D),I.return=M,M=I)}return v(M);case w:e:{for(ae=D.key;x!==null;){if(x.key===ae)if(x.tag===4&&x.stateNode.containerInfo===D.containerInfo&&x.stateNode.implementation===D.implementation){i(M,x.sibling),I=h(x,D.children||[]),I.return=M,M=I;break e}else{i(M,x);break}else r(M,x);x=x.sibling}I=Bu(D,M.mode,I),I.return=M,M=I}return v(M);case K:return D=Fr(D),Ue(M,x,D,I)}if(Be(D))return ee(M,x,D,I);if(me(D)){if(ae=me(D),typeof ae!="function")throw Error(a(150));return D=ae.call(D),ue(M,x,D,I)}if(typeof D.then=="function")return Ue(M,x,So(D),I);if(D.$$typeof===j)return Ue(M,x,mo(M,D),I);wo(M,D)}
vendor: 4,983 bytes, line 8
8return typeof D=="string"&&D!==""||typeof D=="number"||typeof D=="bigint"?(D=""+D,x!==null&&x.tag===6?(i(M,x.sibling),I=h(x,D),I.return=M,M=I):(i(M,x),I=Pu(D,M.mode,I),I.return=M,M=I),v(M)):i(M,x)}return function(M,x,D,I){try{Bi=0;var ae=Ue(M,x,D,I);return Ps=null,ae}catch(ne){if(ne===zs||ne===bo)throw ne;var we=zt(29,ne,null,M.mode);return we.lanes=I,we.return=M,we}}}var Jr=Vd(!0),Kd=Vd(!1),sr=!1;function Xu(n){n.updateQueue={baseState:n.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Zu(n,r){n=n.updateQueue,r.updateQueue===n&&(r.updateQueue={baseState:n.baseState,firstBaseUpdate:n.firstBaseUpdate,lastBaseUpdate:n.lastBaseUpdate,shared:n.shared,callbacks:null})}function ir(n){return{lane:n,tag:0,payload:null,callback:null,next:null}}function ar(n,r,i){var o=n.updateQueue;if(o===null)return null;if(o=o.shared,(Ae&2)!==0){var h=o.pending;return h===null?r.next=r:(r.next=h.next,h.next=r),o.pending=r,r=fo(n),xd(n,null,i),r}return ho(n,o,r,i),fo(n)}function qi(n,r,i){if(r=r.updateQueue,r!==null&&(r=r.shared,(i&4194048)!==0)){var o=r.lanes;o&=n.pendingLanes,i|=o,r.lanes=i,zf(n,i)}}function Wu(n,r){var i=n.updateQueue,o=n.alternate;if(o!==null&&(o=o.updateQueue,i===o)){var h=null,f=null;if(i=i.firstBaseUpdate,i!==null){do{var v={lane:i.lane,tag:i.tag,payload:i.payload,callback:null,next:null};f===null?h=f=v:f=f.next=v,i=i.next}while(i!==null);f===null?h=f=r:f=f.next=r}else h=f=r;i={baseState:o.baseState,firstBaseUpdate:h,lastBaseUpdate:f,shared:o.shared,callbacks:o.callbacks},n.updateQueue=i;return}n=i.lastBaseUpdate,n===null?i.firstBaseUpdate=r:n.next=r,i.lastBaseUpdate=r}var ec=!1;function Ii(){if(ec){var n=Ls;if(n!==null)throw n}}function $i(n,r,i,o){ec=!1;var h=n.updateQueue;sr=!1;var f=h.firstBaseUpdate,v=h.lastBaseUpdate,S=h.shared.pending;if(S!==null){h.shared.pending=null;var C=S,N=C.next;C.next=null,v===null?f=N:v.next=N,v=C;var H=n.alternate;H!==null&&(H=H.updateQueue,S=H.lastBaseUpdate,S!==v&&(S===null?H.firstBaseUpdate=N:S.next=N,H.lastBaseUpdate=C))}if(f!==null){var G=h.baseState;v=0,H=N=C=null,S=f;do{var z=S.lane&-536870913,P=z!==S.lane;if(P?(ve&z)===z:(o&z)===z){z!==0&&z===Ns&&(ec=!0),H!==null&&(H=H.next={lane:0,tag:S.tag,payload:S.payload,callback:null,next:null});e:{var ee=n,ue=S;z=r;var Ue=i;switch(ue.tag){case 1:if(ee=ue.payload,typeof ee=="function"){G=ee.call(Ue,G,z);break e}G=ee;break e;case 3:ee.flags=ee.flags&-65537|128;case 0:if(ee=ue.payload,z=typeof ee=="function"?ee.call(Ue,G,z):ee,z==null)break e;G=y({},G,z);break e;case 2:sr=!0}}z=S.callback,z!==null&&(n.flags|=64,P&&(n.flags|=8192),P=h.callbacks,P===null?h.callbacks=[z]:P.push(z))}else P={lane:z,tag:S.tag,payload:S.payload,callback:S.callback,next:null},H===null?(N=H=P,C=G):H=H.next=P,v|=z;if(S=S.next,S===null){if(S=h.shared.pending,S===null)break;P=S,S=P.next,P.next=null,h.lastBaseUpdate=P,h.shared.pending=null}}while(!0);H===null&&(C=G),h.baseState=C,h.firstBaseUpdate=N,h.lastBaseUpdate=H,f===null&&(h.shared.lanes=0),hr|=v,n.lanes=v,n.memoizedState=G}}function Yd(n,r){if(typeof n!="function")throw Error(a(191,n));n.call(r)}function Fd(n,r){var i=n.callbacks;if(i!==null)for(n.callbacks=null,n=0;n<i.length;n++)Yd(i[n],r)}var Bs=k(null),Eo=k(0);function Qd(n,r){n=Bn,X(Eo,n),X(Bs,r),Bn=n|r.baseLanes}function tc(){X(Eo,Bn),X(Bs,Bs.current)}function nc(){Bn=Eo.current,$(Bs),$(Eo)}var Pt=k(null),Xt=null;function or(n){var r=n.alternate;X(Qe,Qe.current&1),X(Pt,n),Xt===null&&(r===null||Bs.current!==null||r.memoizedState!==null)&&(Xt=n)}function rc(n){X(Qe,Qe.current),X(Pt,n),Xt===null&&(Xt=n)}function Jd(n){n.tag===22?(X(Qe,Qe.current),X(Pt,n),Xt===null&&(Xt=n)):lr()}function lr(){X(Qe,Qe.current),X(Pt,Pt.current)}function Bt(n){$(Pt),Xt===n&&(Xt=null),$(Qe)}var Qe=k(0);function To(n){for(var r=n;r!==null;){if(r.tag===13){var i=r.memoizedState;if(i!==null&&(i=i.dehydrated,i===null||uh(i)||ch(i)))return r}else if(r.tag===19&&(r.memoizedProps.revealOrder==="forwards"||r.memoizedProps.revealOrder==="backwards"||r.memoizedProps.revealOrder==="unstable_legacy-backwards"||r.memoizedProps.revealOrder==="together")){if((r.flags&128)!==0)return r}else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===n)break;for(;r.sibling===null;){if(r.return===null||r.return===n)return null;r=r.return}r.sibling.return=r.return,r=r.sibling}return null}var jn=0,fe=null,je=null,We=null,Ro=!1,Hs=!1,Xr=!1,Ao=0,Gi=0,qs=null,d_=0;function Ge(){throw Error(a(321))}function sc(n,r){if(r===null)return!1;for(var i=0;i<r.length&&i<n.length;i++)if(!Lt(n[i],r[i]))return!1;return!0}function ic(n,r,i,o,h,f){return jn=f,fe=r,r.memoizedState=null,r.updateQueue=null,r.lanes=0,B.H=n===null||n.memoizedState===null?Up:_c,Xr=!1,f=i(o,h),Xr=!1,Hs&&(f=Zd(r,i,o,h)),Xd(n),f}function Xd(n){B.H=Yi;var r=je!==null&&je.next!==null;if(jn=0,We=je=fe=null,Ro=!1,Gi=0,qs=null,r)throw Error(a(300));n===null||et||(n=n.dependencies,n!==null&&yo(n)&&(et=!0))}function Zd(n,r,i,o){fe=n;var h=0;
vendor: 10,259 bytes, line 8
8do{if(Hs&&(qs=null),Gi=0,Hs=!1,25<=h)throw Error(a(301));if(h+=1,We=je=null,n.updateQueue!=null){var f=n.updateQueue;f.lastEffect=null,f.events=null,f.stores=null,f.memoCache!=null&&(f.memoCache.index=0)}B.H=Dp,f=r(i,o)}while(Hs);return f}function p_(){var n=B.H,r=n.useState()[0];return r=typeof r.then=="function"?Vi(r):r,n=n.useState()[0],(je!==null?je.memoizedState:null)!==n&&(fe.flags|=1024),r}function ac(){var n=Ao!==0;return Ao=0,n}function oc(n,r,i){r.updateQueue=n.updateQueue,r.flags&=-2053,n.lanes&=~i}function lc(n){if(Ro){for(n=n.memoizedState;n!==null;){var r=n.queue;r!==null&&(r.pending=null),n=n.next}Ro=!1}jn=0,We=je=fe=null,Hs=!1,Gi=Ao=0,qs=null}function St(){var n={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return We===null?fe.memoizedState=We=n:We=We.next=n,We}function Je(){if(je===null){var n=fe.alternate;n=n!==null?n.memoizedState:null}else n=je.next;var r=We===null?fe.memoizedState:We.next;if(r!==null)We=r,je=n;else{if(n===null)throw fe.alternate===null?Error(a(467)):Error(a(310));je=n,n={memoizedState:je.memoizedState,baseState:je.baseState,baseQueue:je.baseQueue,queue:je.queue,next:null},We===null?fe.memoizedState=We=n:We=We.next=n}return We}function Oo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Vi(n){var r=Gi;return Gi+=1,qs===null&&(qs=[]),n=Id(qs,n,r),r=fe,(We===null?r.memoizedState:We.next)===null&&(r=r.alternate,B.H=r===null||r.memoizedState===null?Up:_c),n}function Co(n){if(n!==null&&typeof n=="object"){if(typeof n.then=="function")return Vi(n);if(n.$$typeof===j)return pt(n)}throw Error(a(438,String(n)))}function uc(n){var r=null,i=fe.updateQueue;if(i!==null&&(r=i.memoCache),r==null){var o=fe.alternate;o!==null&&(o=o.updateQueue,o!==null&&(o=o.memoCache,o!=null&&(r={data:o.data.map(function(h){return h.slice()}),index:0})))}if(r==null&&(r={data:[],index:0}),i===null&&(i=Oo(),fe.updateQueue=i),i.memoCache=r,i=r.data[r.index],i===void 0)for(i=r.data[r.index]=Array(n),o=0;o<n;o++)i[o]=le;return r.index++,i}function Mn(n,r){return typeof r=="function"?r(n):r}function xo(n){var r=Je();return cc(r,je,n)}function cc(n,r,i){var o=n.queue;if(o===null)throw Error(a(311));o.lastRenderedReducer=i;var h=n.baseQueue,f=o.pending;if(f!==null){if(h!==null){var v=h.next;h.next=f.next,f.next=v}r.baseQueue=h=f,o.pending=null}if(f=n.baseState,h===null)n.memoizedState=f;else{r=h.next;var S=v=null,C=null,N=r,H=!1;do{var G=N.lane&-536870913;if(G!==N.lane?(ve&G)===G:(jn&G)===G){var z=N.revertLane;if(z===0)C!==null&&(C=C.next={lane:0,revertLane:0,gesture:null,action:N.action,hasEagerState:N.hasEagerState,eagerState:N.eagerState,next:null}),G===Ns&&(H=!0);else if((jn&z)===z){N=N.next,z===Ns&&(H=!0);continue}else G={lane:0,revertLane:N.revertLane,gesture:null,action:N.action,hasEagerState:N.hasEagerState,eagerState:N.eagerState,next:null},C===null?(S=C=G,v=f):C=C.next=G,fe.lanes|=z,hr|=z;G=N.action,Xr&&i(f,G),f=N.hasEagerState?N.eagerState:i(f,G)}else z={lane:G,revertLane:N.revertLane,gesture:N.gesture,action:N.action,hasEagerState:N.hasEagerState,eagerState:N.eagerState,next:null},C===null?(S=C=z,v=f):C=C.next=z,fe.lanes|=G,hr|=G;N=N.next}while(N!==null&&N!==r);if(C===null?v=f:C.next=S,!Lt(f,n.memoizedState)&&(et=!0,H&&(i=Ls,i!==null)))throw i;n.memoizedState=f,n.baseState=v,n.baseQueue=C,o.lastRenderedState=f}return h===null&&(o.lanes=0),[n.memoizedState,o.dispatch]}function hc(n){var r=Je(),i=r.queue;if(i===null)throw Error(a(311));i.lastRenderedReducer=n;var o=i.dispatch,h=i.pending,f=r.memoizedState;if(h!==null){i.pending=null;var v=h=h.next;do f=n(f,v.action),v=v.next;while(v!==h);Lt(f,r.memoizedState)||(et=!0),r.memoizedState=f,r.baseQueue===null&&(r.baseState=f),i.lastRenderedState=f}return[f,o]}function Wd(n,r,i){var o=fe,h=Je(),f=_e;if(f){if(i===void 0)throw Error(a(407));i=i()}else i=r();var v=!Lt((je||h).memoizedState,i);if(v&&(h.memoizedState=i,et=!0),h=h.queue,pc(np.bind(null,o,h,n),[n]),h.getSnapshot!==r||v||We!==null&&We.memoizedState.tag&1){if(o.flags|=2048,Is(9,{destroy:void 0},tp.bind(null,o,h,i,r),null),Ne===null)throw Error(a(349));f||(jn&127)!==0||ep(o,r,i)}return i}function ep(n,r,i){n.flags|=16384,n={getSnapshot:r,value:i},r=fe.updateQueue,r===null?(r=Oo(),fe.updateQueue=r,r.stores=[n]):(i=r.stores,i===null?r.stores=[n]:i.push(n))}function tp(n,r,i,o){r.value=i,r.getSnapshot=o,rp(r)&&sp(n)}function np(n,r,i){return i(function(){rp(r)&&sp(n)})}function rp(n){var r=n.getSnapshot;n=n.value;try{var i=r();return!Lt(n,i)}catch{return!0}}function sp(n){var r=Ir(n,2);r!==null&&xt(r,n,2)}function fc(n){var r=St();if(typeof n=="function"){var i=n;if(n=i(),Xr){Xn(!0);try{i()}finally{Xn(!1)}}}return r.memoizedState=r.baseState=n,r.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Mn,lastRenderedState:n},r}function ip(n,r,i,o){return n.baseState=i,cc(n,je,typeof o=="function"?o:Mn)}function g_(n,r,i,o,h){if(Mo(n))throw Error(a(485));if(n=r.action,n!==null){var f={payload:h,action:n,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(v){f.listeners.push(v)}};B.T!==null?i(!0):f.isTransition=!1,o(f),i=r.pending,i===null?(f.next=r.pending=f,ap(r,f)):(f.next=i.next,r.pending=i.next=f)}}function ap(n,r){var i=r.action,o=r.payload,h=n.state;if(r.isTransition){var f=B.T,v={};B.T=v;try{var S=i(h,o),C=B.S;C!==null&&C(v,S),op(n,r,S)}catch(N){dc(n,r,N)}finally{f!==null&&v.types!==null&&(f.types=v.types),B.T=f}}else try{f=i(h,o),op(n,r,f)}catch(N){dc(n,r,N)}}function op(n,r,i){i!==null&&typeof i=="object"&&typeof i.then=="function"?i.then(function(o){lp(n,r,o)},function(o){return dc(n,r,o)}):lp(n,r,i)}function lp(n,r,i){r.status="fulfilled",r.value=i,up(r),n.state=i,r=n.pending,r!==null&&(i=r.next,i===r?n.pending=null:(i=i.next,r.next=i,ap(n,i)))}function dc(n,r,i){var o=n.pending;if(n.pending=null,o!==null){o=o.next;do r.status="rejected",r.reason=i,up(r),r=r.next;while(r!==o)}n.action=null}function up(n){n=n.listeners;for(var r=0;r<n.length;r++)(0,n[r])()}function cp(n,r){return r}function hp(n,r){if(_e){var i=Ne.formState;if(i!==null){e:{var o=fe;if(_e){if(He){t:{for(var h=He,f=Jt;h.nodeType!==8;){if(!f){h=null;break t}if(h=Zt(h.nextSibling),h===null){h=null;break t}}f=h.data,h=f==="F!"||f==="F"?h:null}if(h){He=Zt(h.nextSibling),o=h.data==="F!";break e}}nr(o)}o=!1}o&&(r=i[0])}}return i=St(),i.memoizedState=i.baseState=r,o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:cp,lastRenderedState:r},i.queue=o,i=kp.bind(null,fe,o),o.dispatch=i,o=fc(!1),f=bc.bind(null,fe,!1,o.queue),o=St(),h={state:r,dispatch:null,action:n,pending:null},o.queue=h,i=g_.bind(null,fe,h,f,i),h.dispatch=i,o.memoizedState=n,[r,i,!1]}function fp(n){var r=Je();return dp(r,je,n)}function dp(n,r,i){if(r=cc(n,r,cp)[0],n=xo(Mn)[0],typeof r=="object"&&r!==null&&typeof r.then=="function")try{var o=Vi(r)}catch(v){throw v===zs?bo:v}else o=r;r=Je();var h=r.queue,f=h.dispatch;return i!==r.memoizedState&&(fe.flags|=2048,Is(9,{destroy:void 0},y_.bind(null,h,i),null)),[o,f,n]}function y_(n,r){n.action=r}function pp(n){var r=Je(),i=je;if(i!==null)return dp(r,i,n);Je(),r=r.memoizedState,i=Je();var o=i.queue.dispatch;return i.memoizedState=n,[r,o,!1]}function Is(n,r,i,o){return n={tag:n,create:i,deps:o,inst:r,next:null},r=fe.updateQueue,r===null&&(r=Oo(),fe.updateQueue=r),i=r.lastEffect,i===null?r.lastEffect=n.next=n:(o=i.next,i.next=n,n.next=o,r.lastEffect=n),n}function gp(){return Je().memoizedState}function ko(n,r,i,o){var h=St();fe.flags|=n,h.memoizedState=Is(1|r,{destroy:void 0},i,o===void 0?null:o)}function jo(n,r,i,o){var h=Je();o=o===void 0?null:o;var f=h.memoizedState.inst;je!==null&&o!==null&&sc(o,je.memoizedState.deps)?h.memoizedState=Is(r,f,i,o):(fe.flags|=n,h.memoizedState=Is(1|r,f,i,o))}function yp(n,r){ko(8390656,8,n,r)}function pc(n,r){jo(2048,8,n,r)}function m_(n){fe.flags|=4;var r=fe.updateQueue;if(r===null)r=Oo(),fe.updateQueue=r,r.events=[n];else{var i=r.events;i===null?r.events=[n]:i.push(n)}}function mp(n){var r=Je().memoizedState;return m_({ref:r,nextImpl:n}),function(){if((Ae&2)!==0)throw Error(a(440));return r.impl.apply(void 0,arguments)}}function vp(n,r){return jo(4,2,n,r)}function bp(n,r){return jo(4,4,n,r)}function _p(n,r){if(typeof r=="function"){n=n();var i=r(n);return function(){typeof i=="function"?i():r(null)}}if(r!=null)return n=n(),r.current=n,function(){r.current=null}}function Sp(n,r,i){i=i!=null?i.concat([n]):null,jo(4,4,_p.bind(null,r,n),i)}function gc(){}function wp(n,r){var i=Je();r=r===void 0?null:r;var o=i.memoizedState;return r!==null&&sc(r,o[1])?o[0]:(i.memoizedState=[n,r],n)}function Ep(n,r){var i=Je();r=r===void 0?null:r;var o=i.memoizedState;if(r!==null&&sc(r,o[1]))return o[0];if(o=n(),Xr){Xn(!0);try{n()}finally{Xn(!1)}}return i.memoizedState=[o,r],o}function yc(n,r,i){return i===void 0||(jn&1073741824)!==0&&(ve&261930)===0?n.memoizedState=r:(n.memoizedState=i,n=Tg(),fe.lanes|=n,hr|=n,i)}function Tp(n,r,i,o){return Lt(i,r)?i:Bs.current!==null?(n=yc(n,i,o),Lt(n,r)||(et=!0),n):(jn&42)===0||(jn&1073741824)!==0&&(ve&261930)===0?(et=!0,n.memoizedState=i):(n=Tg(),fe.lanes|=n,hr|=n,r)}function Rp(n,r,i,o,h){var f=F.p;F.p=f!==0&&8>f?f:8;var v=B.T,S={};B.T=S,bc(n,!1,r,i);try{var C=h(),N=B.S;if(N!==null&&N(S,C),C!==null&&typeof C=="object"&&typeof C.then=="function"){var H=f_(C,o);Ki(n,r,H,It(n))}else Ki(n,r,o,It(n))}catch(G){Ki(n,r,{then:function(){},status:"rejected",reason:G},It())}finally{F.p=f,v!==null&&S.types!==null&&(v.types=S.types),B.T=v}}function v_(){}function mc(n,r,i,o){if(n.tag!==5)throw Error(a(476));var h=Ap(n).queue;Rp(n,h,r,oe,i===null?v_:function(){return Op(n),i(o)})}function Ap(n){var r=n.memoizedState;if(r!==null)return r;r={memoizedState:oe,baseState:oe,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Mn,lastRenderedState:oe},next:null};var i={};return r.next={memoizedState:i,baseState:i,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Mn,lastRenderedState:i},next:null},n.memoizedState=r,n=n.alternate,n!==null&&(n.memoizedState=r),r}function Op(n){var r=Ap(n);r.next===null&&(r=n.alternate.memoizedState),Ki(n,r.next.queue,{},It())}function vc(){return pt(ua)}function Cp(){return Je().memoizedState}function xp(){return Je().memoizedState}function b_(n){for(var r=n.return;r!==null;
vendor: 10,399 bytes, line 8
8){switch(r.tag){case 24:case 3:var i=It();n=ir(i);var o=ar(r,n,i);o!==null&&(xt(o,r,i),qi(o,r,i)),r={cache:Yu()},n.payload=r;return}r=r.return}}function __(n,r,i){var o=It();i={lane:o,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},Mo(n)?jp(r,i):(i=Lu(n,r,i,o),i!==null&&(xt(i,n,o),Mp(i,r,o)))}function kp(n,r,i){var o=It();Ki(n,r,i,o)}function Ki(n,r,i,o){var h={lane:o,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null};if(Mo(n))jp(r,h);else{var f=n.alternate;if(n.lanes===0&&(f===null||f.lanes===0)&&(f=r.lastRenderedReducer,f!==null))try{var v=r.lastRenderedState,S=f(v,i);if(h.hasEagerState=!0,h.eagerState=S,Lt(S,v))return ho(n,r,h,0),Ne===null&&co(),!1}catch{}if(i=Lu(n,r,h,o),i!==null)return xt(i,n,o),Mp(i,r,o),!0}return!1}function bc(n,r,i,o){if(o={lane:2,revertLane:Xc(),gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null},Mo(n)){if(r)throw Error(a(479))}else r=Lu(n,i,o,2),r!==null&&xt(r,n,2)}function Mo(n){var r=n.alternate;return n===fe||r!==null&&r===fe}function jp(n,r){Hs=Ro=!0;var i=n.pending;i===null?r.next=r:(r.next=i.next,i.next=r),n.pending=r}function Mp(n,r,i){if((i&4194048)!==0){var o=r.lanes;o&=n.pendingLanes,i|=o,r.lanes=i,zf(n,i)}}var Yi={readContext:pt,use:Co,useCallback:Ge,useContext:Ge,useEffect:Ge,useImperativeHandle:Ge,useLayoutEffect:Ge,useInsertionEffect:Ge,useMemo:Ge,useReducer:Ge,useRef:Ge,useState:Ge,useDebugValue:Ge,useDeferredValue:Ge,useTransition:Ge,useSyncExternalStore:Ge,useId:Ge,useHostTransitionStatus:Ge,useFormState:Ge,useActionState:Ge,useOptimistic:Ge,useMemoCache:Ge,useCacheRefresh:Ge};Yi.useEffectEvent=Ge;var Up={readContext:pt,use:Co,useCallback:function(n,r){return St().memoizedState=[n,r===void 0?null:r],n},useContext:pt,useEffect:yp,useImperativeHandle:function(n,r,i){i=i!=null?i.concat([n]):null,ko(4194308,4,_p.bind(null,r,n),i)},useLayoutEffect:function(n,r){return ko(4194308,4,n,r)},useInsertionEffect:function(n,r){ko(4,2,n,r)},useMemo:function(n,r){var i=St();r=r===void 0?null:r;var o=n();if(Xr){Xn(!0);try{n()}finally{Xn(!1)}}return i.memoizedState=[o,r],o},useReducer:function(n,r,i){var o=St();if(i!==void 0){var h=i(r);if(Xr){Xn(!0);try{i(r)}finally{Xn(!1)}}}else h=r;return o.memoizedState=o.baseState=h,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:n,lastRenderedState:h},o.queue=n,n=n.dispatch=__.bind(null,fe,n),[o.memoizedState,n]},useRef:function(n){var r=St();return n={current:n},r.memoizedState=n},useState:function(n){n=fc(n);var r=n.queue,i=kp.bind(null,fe,r);return r.dispatch=i,[n.memoizedState,i]},useDebugValue:gc,useDeferredValue:function(n,r){var i=St();return yc(i,n,r)},useTransition:function(){var n=fc(!1);return n=Rp.bind(null,fe,n.queue,!0,!1),St().memoizedState=n,[!1,n]},useSyncExternalStore:function(n,r,i){var o=fe,h=St();if(_e){if(i===void 0)throw Error(a(407));i=i()}else{if(i=r(),Ne===null)throw Error(a(349));(ve&127)!==0||ep(o,r,i)}h.memoizedState=i;var f={value:i,getSnapshot:r};return h.queue=f,yp(np.bind(null,o,f,n),[n]),o.flags|=2048,Is(9,{destroy:void 0},tp.bind(null,o,f,i,r),null),i},useId:function(){var n=St(),r=Ne.identifierPrefix;if(_e){var i=dn,o=fn;i=(o&~(1<<32-Nt(o)-1)).toString(32)+i,r="_"+r+"R_"+i,i=Ao++,0<i&&(r+="H"+i.toString(32)),r+="_"}else i=d_++,r="_"+r+"r_"+i.toString(32)+"_";return n.memoizedState=r},useHostTransitionStatus:vc,useFormState:hp,useActionState:hp,useOptimistic:function(n){var r=St();r.memoizedState=r.baseState=n;var i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return r.queue=i,r=bc.bind(null,fe,!0,i),i.dispatch=r,[n,r]},useMemoCache:uc,useCacheRefresh:function(){return St().memoizedState=b_.bind(null,fe)},useEffectEvent:function(n){var r=St(),i={impl:n};return r.memoizedState=i,function(){if((Ae&2)!==0)throw Error(a(440));return i.impl.apply(void 0,arguments)}}},_c={readContext:pt,use:Co,useCallback:wp,useContext:pt,useEffect:pc,useImperativeHandle:Sp,useInsertionEffect:vp,useLayoutEffect:bp,useMemo:Ep,useReducer:xo,useRef:gp,useState:function(){return xo(Mn)},useDebugValue:gc,useDeferredValue:function(n,r){var i=Je();return Tp(i,je.memoizedState,n,r)},useTransition:function(){var n=xo(Mn)[0],r=Je().memoizedState;return[typeof n=="boolean"?n:Vi(n),r]},useSyncExternalStore:Wd,useId:Cp,useHostTransitionStatus:vc,useFormState:fp,useActionState:fp,useOptimistic:function(n,r){var i=Je();return ip(i,je,n,r)},useMemoCache:uc,useCacheRefresh:xp};_c.useEffectEvent=mp;var Dp={readContext:pt,use:Co,useCallback:wp,useContext:pt,useEffect:pc,useImperativeHandle:Sp,useInsertionEffect:vp,useLayoutEffect:bp,useMemo:Ep,useReducer:hc,useRef:gp,useState:function(){return hc(Mn)},useDebugValue:gc,useDeferredValue:function(n,r){var i=Je();return je===null?yc(i,n,r):Tp(i,je.memoizedState,n,r)},useTransition:function(){var n=hc(Mn)[0],r=Je().memoizedState;return[typeof n=="boolean"?n:Vi(n),r]},useSyncExternalStore:Wd,useId:Cp,useHostTransitionStatus:vc,useFormState:pp,useActionState:pp,useOptimistic:function(n,r){var i=Je();return je!==null?ip(i,je,n,r):(i.baseState=n,[n,i.queue.dispatch])},useMemoCache:uc,useCacheRefresh:xp};Dp.useEffectEvent=mp;function Sc(n,r,i,o){r=n.memoizedState,i=i(o,r),i=i==null?r:y({},r,i),n.memoizedState=i,n.lanes===0&&(n.updateQueue.baseState=i)}var wc={enqueueSetState:function(n,r,i){n=n._reactInternals;var o=It(),h=ir(o);h.payload=r,i!=null&&(h.callback=i),r=ar(n,h,o),r!==null&&(xt(r,n,o),qi(r,n,o))},enqueueReplaceState:function(n,r,i){n=n._reactInternals;var o=It(),h=ir(o);h.tag=1,h.payload=r,i!=null&&(h.callback=i),r=ar(n,h,o),r!==null&&(xt(r,n,o),qi(r,n,o))},enqueueForceUpdate:function(n,r){n=n._reactInternals;var i=It(),o=ir(i);o.tag=2,r!=null&&(o.callback=r),r=ar(n,o,i),r!==null&&(xt(r,n,i),qi(r,n,i))}};function Np(n,r,i,o,h,f,v){return n=n.stateNode,typeof n.shouldComponentUpdate=="function"?n.shouldComponentUpdate(o,f,v):r.prototype&&r.prototype.isPureReactComponent?!Ui(i,o)||!Ui(h,f):!0}function Lp(n,r,i,o){n=r.state,typeof r.componentWillReceiveProps=="function"&&r.componentWillReceiveProps(i,o),typeof r.UNSAFE_componentWillReceiveProps=="function"&&r.UNSAFE_componentWillReceiveProps(i,o),r.state!==n&&wc.enqueueReplaceState(r,r.state,null)}function Zr(n,r){var i=r;if("ref"in r){i={};for(var o in r)o!=="ref"&&(i[o]=r[o])}if(n=n.defaultProps){i===r&&(i=y({},i));for(var h in n)i[h]===void 0&&(i[h]=n[h])}return i}function zp(n){uo(n)}function Pp(n){console.error(n)}function Bp(n){uo(n)}function Uo(n,r){try{var i=n.onUncaughtError;i(r.value,{componentStack:r.stack})}catch(o){setTimeout(function(){throw o})}}function Hp(n,r,i){try{var o=n.onCaughtError;o(i.value,{componentStack:i.stack,errorBoundary:r.tag===1?r.stateNode:null})}catch(h){setTimeout(function(){throw h})}}function Ec(n,r,i){return i=ir(i),i.tag=3,i.payload={element:null},i.callback=function(){Uo(n,r)},i}function qp(n){return n=ir(n),n.tag=3,n}function Ip(n,r,i,o){var h=i.type.getDerivedStateFromError;if(typeof h=="function"){var f=o.value;n.payload=function(){return h(f)},n.callback=function(){Hp(r,i,o)}}var v=i.stateNode;v!==null&&typeof v.componentDidCatch=="function"&&(n.callback=function(){Hp(r,i,o),typeof h!="function"&&(fr===null?fr=new Set([this]):fr.add(this));var S=o.stack;this.componentDidCatch(o.value,{componentStack:S!==null?S:""})})}function S_(n,r,i,o,h){if(i.flags|=32768,o!==null&&typeof o=="object"&&typeof o.then=="function"){if(r=i.alternate,r!==null&&Ds(r,i,h,!0),i=Pt.current,i!==null){switch(i.tag){case 31:case 13:return Xt===null?Vo():i.alternate===null&&Ve===0&&(Ve=3),i.flags&=-257,i.flags|=65536,i.lanes=h,o===_o?i.flags|=16384:(r=i.updateQueue,r===null?i.updateQueue=new Set([o]):r.add(o),Fc(n,o,h)),!1;case 22:return i.flags|=65536,o===_o?i.flags|=16384:(r=i.updateQueue,r===null?(r={transitions:null,markerInstances:null,retryQueue:new Set([o])},i.updateQueue=r):(i=r.retryQueue,i===null?r.retryQueue=new Set([o]):i.add(o)),Fc(n,o,h)),!1}throw Error(a(435,i.tag))}return Fc(n,o,h),Vo(),!1}if(_e)return r=Pt.current,r!==null?((r.flags&65536)===0&&(r.flags|=256),r.flags|=65536,r.lanes=h,o!==Iu&&(n=Error(a(422),{cause:o}),Li(Yt(n,i)))):(o!==Iu&&(r=Error(a(423),{cause:o}),Li(Yt(r,i))),n=n.current.alternate,n.flags|=65536,h&=-h,n.lanes|=h,o=Yt(o,i),h=Ec(n.stateNode,o,h),Wu(n,h),Ve!==4&&(Ve=2)),!1;var f=Error(a(520),{cause:o});if(f=Yt(f,i),ta===null?ta=[f]:ta.push(f),Ve!==4&&(Ve=2),r===null)return!0;o=Yt(o,i),i=r;do{switch(i.tag){case 3:return i.flags|=65536,n=h&-h,i.lanes|=n,n=Ec(i.stateNode,o,n),Wu(i,n),!1;case 1:if(r=i.type,f=i.stateNode,(i.flags&128)===0&&(typeof r.getDerivedStateFromError=="function"||f!==null&&typeof f.componentDidCatch=="function"&&(fr===null||!fr.has(f))))return i.flags|=65536,h&=-h,i.lanes|=h,h=qp(h),Ip(h,n,i,o),Wu(i,h),!1}i=i.return}while(i!==null);return!1}var Tc=Error(a(461)),et=!1;function gt(n,r,i,o){r.child=n===null?Kd(r,null,i,o):Jr(r,n.child,i,o)}function $p(n,r,i,o,h){i=i.render;var f=r.ref;if("ref"in o){var v={};for(var S in o)S!=="ref"&&(v[S]=o[S])}else v=o;return Kr(r),o=ic(n,r,i,v,f,h),S=ac(),n!==null&&!et?(oc(n,r,h),Un(n,r,h)):(_e&&S&&Hu(r),r.flags|=1,gt(n,r,o,h),r.child)}function Gp(n,r,i,o,h){if(n===null){var f=i.type;return typeof f=="function"&&!zu(f)&&f.defaultProps===void 0&&i.compare===null?(r.tag=15,r.type=f,Vp(n,r,f,o,h)):(n=po(i.type,null,o,r,r.mode,h),n.ref=r.ref,n.return=r,r.child=n)}if(f=n.child,!Mc(n,h)){var v=f.memoizedProps;if(i=i.compare,i=i!==null?i:Ui,i(v,o)&&n.ref===r.ref)return Un(n,r,h)}return r.flags|=1,n=On(f,o),n.ref=r.ref,n.return=r,r.child=n}function Vp(n,r,i,o,h){if(n!==null){var f=n.memoizedProps;if(Ui(f,o)&&n.ref===r.ref)if(et=!1,r.pendingProps=o=f,Mc(n,h))(n.flags&131072)!==0&&(et=!0);else return r.lanes=n.lanes,Un(n,r,h)}return Rc(n,r,i,o,h)}function Kp(n,r,i,o){var h=o.children,f=n!==null?n.memoizedState:null;if(n===null&&r.stateNode===null&&(r.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),o.mode==="hidden"){if((r.flags&128)!==0){if(f=f!==null?f.baseLanes|i:i,n!==null){for(o=r.child=n.child,h=0;o!==null;)h=h|o.lanes|o.childLanes,o=o.sibling;o=h&~f}else o=0,r.child=null;return Yp(n,r,f,i,o)}if((i&536870912)!==0)r.memoizedState={baseLanes:0,cachePool:null},n!==null&&vo(r,f!==null?f.cachePool:null),f!==null?Qd(r,f):tc(),Jd(r);else return o=r.lanes=536870912,Yp(n,r,f!==null?f.baseLanes|i:i,i,o)}else f!==null?(vo(r,f.cachePool),Qd(r,f),lr(),r.memoizedState=null):(n!==null&&vo(r,null),tc(),lr()
vendor: 1,446 bytes, line 8
8);return gt(n,r,h,i),r.child}function Fi(n,r){return n!==null&&n.tag===22||r.stateNode!==null||(r.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.sibling}function Yp(n,r,i,o,h){var f=Qu();return f=f===null?null:{parent:Ze._currentValue,pool:f},r.memoizedState={baseLanes:i,cachePool:f},n!==null&&vo(r,null),tc(),Jd(r),n!==null&&Ds(n,r,o,!0),r.childLanes=h,null}function Do(n,r){return r=Lo({mode:r.mode,children:r.children},n.mode),r.ref=n.ref,n.child=r,r.return=n,r}function Fp(n,r,i){return Jr(r,n.child,null,i),n=Do(r,r.pendingProps),n.flags|=2,Bt(r),r.memoizedState=null,n}function w_(n,r,i){var o=r.pendingProps,h=(r.flags&128)!==0;if(r.flags&=-129,n===null){if(_e){if(o.mode==="hidden")return n=Do(r,o),r.lanes=536870912,Fi(null,n);if(rc(r),(n=He)?(n=ay(n,Jt),n=n!==null&&n.data==="&"?n:null,n!==null&&(r.memoizedState={dehydrated:n,treeContext:er!==null?{id:fn,overflow:dn}:null,retryLane:536870912,hydrationErrors:null},i=jd(n),i.return=r,r.child=i,dt=r,He=null)):n=null,n===null)throw nr(r);return r.lanes=536870912,null}return Do(r,o)}var f=n.memoizedState;if(f!==null){var v=f.dehydrated;if(rc(r),h)if(r.flags&256)r.flags&=-257,r=Fp(n,r,i);else if(r.memoizedState!==null)r.child=n.child,r.flags|=128,r=null;else throw Error(a(558));else if(et||Ds(n,r,i,!1),h=(i&n.childLanes)!==0,et||h){if(o=Ne,o!==null&&(v=Pf(o,i),v!==0&&v!==f.retryLane))throw f.retryLane=v,Ir(n,v),xt(o,n,v),Tc;Vo(),r=Fp(n,r,i)}
vendor: 11,711 bytes, line 8
8else n=f.treeContext,He=Zt(v.nextSibling),dt=r,_e=!0,tr=null,Jt=!1,n!==null&&Dd(r,n),r=Do(r,o),r.flags|=4096;return r}return n=On(n.child,{mode:o.mode,children:o.children}),n.ref=r.ref,r.child=n,n.return=r,n}function No(n,r){var i=r.ref;if(i===null)n!==null&&n.ref!==null&&(r.flags|=4194816);else{if(typeof i!="function"&&typeof i!="object")throw Error(a(284));(n===null||n.ref!==i)&&(r.flags|=4194816)}}function Rc(n,r,i,o,h){return Kr(r),i=ic(n,r,i,o,void 0,h),o=ac(),n!==null&&!et?(oc(n,r,h),Un(n,r,h)):(_e&&o&&Hu(r),r.flags|=1,gt(n,r,i,h),r.child)}function Qp(n,r,i,o,h,f){return Kr(r),r.updateQueue=null,i=Zd(r,o,i,h),Xd(n),o=ac(),n!==null&&!et?(oc(n,r,f),Un(n,r,f)):(_e&&o&&Hu(r),r.flags|=1,gt(n,r,i,f),r.child)}function Jp(n,r,i,o,h){if(Kr(r),r.stateNode===null){var f=ks,v=i.contextType;typeof v=="object"&&v!==null&&(f=pt(v)),f=new i(o,f),r.memoizedState=f.state!==null&&f.state!==void 0?f.state:null,f.updater=wc,r.stateNode=f,f._reactInternals=r,f=r.stateNode,f.props=o,f.state=r.memoizedState,f.refs={},Xu(r),v=i.contextType,f.context=typeof v=="object"&&v!==null?pt(v):ks,f.state=r.memoizedState,v=i.getDerivedStateFromProps,typeof v=="function"&&(Sc(r,i,v,o),f.state=r.memoizedState),typeof i.getDerivedStateFromProps=="function"||typeof f.getSnapshotBeforeUpdate=="function"||typeof f.UNSAFE_componentWillMount!="function"&&typeof f.componentWillMount!="function"||(v=f.state,typeof f.componentWillMount=="function"&&f.componentWillMount(),typeof f.UNSAFE_componentWillMount=="function"&&f.UNSAFE_componentWillMount(),v!==f.state&&wc.enqueueReplaceState(f,f.state,null),$i(r,o,f,h),Ii(),f.state=r.memoizedState),typeof f.componentDidMount=="function"&&(r.flags|=4194308),o=!0}else if(n===null){f=r.stateNode;var S=r.memoizedProps,C=Zr(i,S);f.props=C;var N=f.context,H=i.contextType;v=ks,typeof H=="object"&&H!==null&&(v=pt(H));var G=i.getDerivedStateFromProps;H=typeof G=="function"||typeof f.getSnapshotBeforeUpdate=="function",S=r.pendingProps!==S,H||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(S||N!==v)&&Lp(r,f,o,v),sr=!1;var z=r.memoizedState;f.state=z,$i(r,o,f,h),Ii(),N=r.memoizedState,S||z!==N||sr?(typeof G=="function"&&(Sc(r,i,G,o),N=r.memoizedState),(C=sr||Np(r,i,C,o,z,N,v))?(H||typeof f.UNSAFE_componentWillMount!="function"&&typeof f.componentWillMount!="function"||(typeof f.componentWillMount=="function"&&f.componentWillMount(),typeof f.UNSAFE_componentWillMount=="function"&&f.UNSAFE_componentWillMount()),typeof f.componentDidMount=="function"&&(r.flags|=4194308)):(typeof f.componentDidMount=="function"&&(r.flags|=4194308),r.memoizedProps=o,r.memoizedState=N),f.props=o,f.state=N,f.context=v,o=C):(typeof f.componentDidMount=="function"&&(r.flags|=4194308),o=!1)}else{f=r.stateNode,Zu(n,r),v=r.memoizedProps,H=Zr(i,v),f.props=H,G=r.pendingProps,z=f.context,N=i.contextType,C=ks,typeof N=="object"&&N!==null&&(C=pt(N)),S=i.getDerivedStateFromProps,(N=typeof S=="function"||typeof f.getSnapshotBeforeUpdate=="function")||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(v!==G||z!==C)&&Lp(r,f,o,C),sr=!1,z=r.memoizedState,f.state=z,$i(r,o,f,h),Ii();var P=r.memoizedState;v!==G||z!==P||sr||n!==null&&n.dependencies!==null&&yo(n.dependencies)?(typeof S=="function"&&(Sc(r,i,S,o),P=r.memoizedState),(H=sr||Np(r,i,H,o,z,P,C)||n!==null&&n.dependencies!==null&&yo(n.dependencies))?(N||typeof f.UNSAFE_componentWillUpdate!="function"&&typeof f.componentWillUpdate!="function"||(typeof f.componentWillUpdate=="function"&&f.componentWillUpdate(o,P,C),typeof f.UNSAFE_componentWillUpdate=="function"&&f.UNSAFE_componentWillUpdate(o,P,C)),typeof f.componentDidUpdate=="function"&&(r.flags|=4),typeof f.getSnapshotBeforeUpdate=="function"&&(r.flags|=1024)):(typeof f.componentDidUpdate!="function"||v===n.memoizedProps&&z===n.memoizedState||(r.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||v===n.memoizedProps&&z===n.memoizedState||(r.flags|=1024),r.memoizedProps=o,r.memoizedState=P),f.props=o,f.state=P,f.context=C,o=H):(typeof f.componentDidUpdate!="function"||v===n.memoizedProps&&z===n.memoizedState||(r.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||v===n.memoizedProps&&z===n.memoizedState||(r.flags|=1024),o=!1)}return f=o,No(n,r),o=(r.flags&128)!==0,f||o?(f=r.stateNode,i=o&&typeof i.getDerivedStateFromError!="function"?null:f.render(),r.flags|=1,n!==null&&o?(r.child=Jr(r,n.child,null,h),r.child=Jr(r,null,i,h)):gt(n,r,i,h),r.memoizedState=f.state,n=r.child):n=Un(n,r,h),n}function Xp(n,r,i,o){return Gr(),r.flags|=256,gt(n,r,i,o),r.child}var Ac={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Oc(n){return{baseLanes:n,cachePool:Hd()}}function Cc(n,r,i){return n=n!==null?n.childLanes&~i:0,r&&(n|=qt),n}function Zp(n,r,i){var o=r.pendingProps,h=!1,f=(r.flags&128)!==0,v;if((v=f)||(v=n!==null&&n.memoizedState===null?!1:(Qe.current&2)!==0),v&&(h=!0,r.flags&=-129),v=(r.flags&32)!==0,r.flags&=-33,n===null){if(_e){if(h?or(r):lr(),(n=He)?(n=ay(n,Jt),n=n!==null&&n.data!=="&"?n:null,n!==null&&(r.memoizedState={dehydrated:n,treeContext:er!==null?{id:fn,overflow:dn}:null,retryLane:536870912,hydrationErrors:null},i=jd(n),i.return=r,r.child=i,dt=r,He=null)):n=null,n===null)throw nr(r);return ch(n)?r.lanes=32:r.lanes=536870912,null}var S=o.children;return o=o.fallback,h?(lr(),h=r.mode,S=Lo({mode:"hidden",children:S},h),o=$r(o,h,i,null),S.return=r,o.return=r,S.sibling=o,r.child=S,o=r.child,o.memoizedState=Oc(i),o.childLanes=Cc(n,v,i),r.memoizedState=Ac,Fi(null,o)):(or(r),xc(r,S))}var C=n.memoizedState;if(C!==null&&(S=C.dehydrated,S!==null)){if(f)r.flags&256?(or(r),r.flags&=-257,r=kc(n,r,i)):r.memoizedState!==null?(lr(),r.child=n.child,r.flags|=128,r=null):(lr(),S=o.fallback,h=r.mode,o=Lo({mode:"visible",children:o.children},h),S=$r(S,h,i,null),S.flags|=2,o.return=r,S.return=r,o.sibling=S,r.child=o,Jr(r,n.child,null,i),o=r.child,o.memoizedState=Oc(i),o.childLanes=Cc(n,v,i),r.memoizedState=Ac,r=Fi(null,o));else if(or(r),ch(S)){if(v=S.nextSibling&&S.nextSibling.dataset,v)var N=v.dgst;v=N,o=Error(a(419)),o.stack="",o.digest=v,Li({value:o,source:null,stack:null}),r=kc(n,r,i)}else if(et||Ds(n,r,i,!1),v=(i&n.childLanes)!==0,et||v){if(v=Ne,v!==null&&(o=Pf(v,i),o!==0&&o!==C.retryLane))throw C.retryLane=o,Ir(n,o),xt(v,n,o),Tc;uh(S)||Vo(),r=kc(n,r,i)}else uh(S)?(r.flags|=192,r.child=n.child,r=null):(n=C.treeContext,He=Zt(S.nextSibling),dt=r,_e=!0,tr=null,Jt=!1,n!==null&&Dd(r,n),r=xc(r,o.children),r.flags|=4096);return r}return h?(lr(),S=o.fallback,h=r.mode,C=n.child,N=C.sibling,o=On(C,{mode:"hidden",children:o.children}),o.subtreeFlags=C.subtreeFlags&65011712,N!==null?S=On(N,S):(S=$r(S,h,i,null),S.flags|=2),S.return=r,o.return=r,o.sibling=S,r.child=o,Fi(null,o),o=r.child,S=n.child.memoizedState,S===null?S=Oc(i):(h=S.cachePool,h!==null?(C=Ze._currentValue,h=h.parent!==C?{parent:C,pool:C}:h):h=Hd(),S={baseLanes:S.baseLanes|i,cachePool:h}),o.memoizedState=S,o.childLanes=Cc(n,v,i),r.memoizedState=Ac,Fi(n.child,o)):(or(r),i=n.child,n=i.sibling,i=On(i,{mode:"visible",children:o.children}),i.return=r,i.sibling=null,n!==null&&(v=r.deletions,v===null?(r.deletions=[n],r.flags|=16):v.push(n)),r.child=i,r.memoizedState=null,i)}function xc(n,r){return r=Lo({mode:"visible",children:r},n.mode),r.return=n,n.child=r}function Lo(n,r){return n=zt(22,n,null,r),n.lanes=0,n}function kc(n,r,i){return Jr(r,n.child,null,i),n=xc(r,r.pendingProps.children),n.flags|=2,r.memoizedState=null,n}function Wp(n,r,i){n.lanes|=r;var o=n.alternate;o!==null&&(o.lanes|=r),Vu(n.return,r,i)}function jc(n,r,i,o,h,f){var v=n.memoizedState;v===null?n.memoizedState={isBackwards:r,rendering:null,renderingStartTime:0,last:o,tail:i,tailMode:h,treeForkCount:f}:(v.isBackwards=r,v.rendering=null,v.renderingStartTime=0,v.last=o,v.tail=i,v.tailMode=h,v.treeForkCount=f)}function eg(n,r,i){var o=r.pendingProps,h=o.revealOrder,f=o.tail;o=o.children;var v=Qe.current,S=(v&2)!==0;if(S?(v=v&1|2,r.flags|=128):v&=1,X(Qe,v),gt(n,r,o,i),o=_e?Ni:0,!S&&n!==null&&(n.flags&128)!==0)e:for(n=r.child;n!==null;){if(n.tag===13)n.memoizedState!==null&&Wp(n,i,r);else if(n.tag===19)Wp(n,i,r);else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===r)break e;for(;n.sibling===null;){if(n.return===null||n.return===r)break e;n=n.return}n.sibling.return=n.return,n=n.sibling}switch(h){case"forwards":for(i=r.child,h=null;i!==null;)n=i.alternate,n!==null&&To(n)===null&&(h=i),i=i.sibling;i=h,i===null?(h=r.child,r.child=null):(h=i.sibling,i.sibling=null),jc(r,!1,h,i,f,o);break;case"backwards":case"unstable_legacy-backwards":for(i=null,h=r.child,r.child=null;h!==null;){if(n=h.alternate,n!==null&&To(n)===null){r.child=h;break}n=h.sibling,h.sibling=i,i=h,h=n}jc(r,!0,i,null,f,o);break;case"together":jc(r,!1,null,null,void 0,o);break;default:r.memoizedState=null}return r.child}function Un(n,r,i){if(n!==null&&(r.dependencies=n.dependencies),hr|=r.lanes,(i&r.childLanes)===0)if(n!==null){if(Ds(n,r,i,!1),(i&r.childLanes)===0)return null}else return null;if(n!==null&&r.child!==n.child)throw Error(a(153));if(r.child!==null){for(n=r.child,i=On(n,n.pendingProps),r.child=i,i.return=r;n.sibling!==null;)n=n.sibling,i=i.sibling=On(n,n.pendingProps),i.return=r;i.sibling=null}return r.child}function Mc(n,r){return(n.lanes&r)!==0?!0:(n=n.dependencies,!!(n!==null&&yo(n)))}function E_(n,r,i){switch(r.tag){case 3:Fe(r,r.stateNode.containerInfo),rr(r,Ze,n.memoizedState.cache),Gr();break;case 27:case 5:Sn(r);break;case 4:Fe(r,r.stateNode.containerInfo);break;case 10:rr(r,r.type,r.memoizedProps.value);break;case 31:if(r.memoizedState!==null)return r.flags|=128,rc(r),null;break;case 13:var o=r.memoizedState;if(o!==null)return o.dehydrated!==null?(or(r),r.flags|=128,null):(i&r.child.childLanes)!==0?Zp(n,r,i):(or(r),n=Un(n,r,i),n!==null?n.sibling:null);or(r);break;case 19:var h=(n.flags&128)!==0;if(o=(i&r.childLanes)!==0,o||(Ds(n,r,i,!1),o=(i&r.childLanes)!==0),h){if(o)return eg(n,r,i);r.flags|=128}if(h=r.memoizedState,h!==null&&(h.rendering=null,h.tail=null,h.lastEffect=null),X(Qe,Qe.current),o)break;return null;case 22:return r.lanes=0,Kp(n,r,i,r.pendingProps);case 24:rr(r,Ze,n.memoizedState.cache)}return Un(n,r,i)}function tg(n,r,i){if(n!==null)if(n.memoizedProps!==r.pendingProps)et=!0;else{if(!Mc(n,i)&&(r.flags&128)===0)return et=!1,E_(n,r,i);et=(n.flags&131072)!==0}else et=!1,_e&&(r.flags&1048576)!==0&&Ud(r,Ni,r.index);switch(r.lanes=0,r.tag){case 16:e:{var o=r.pendingProps;if(n=Fr(r.elementType),r.type=n,typeof n=="function")zu(n)?(o=Zr(n,o),r.tag=1,r=Jp(null,r,n,o,i)):(r.tag=0,r=Rc(null,r,n,o,i));else{if(n!=null){var h=n.$$typeof;if(h===L){r.tag=11,r=$p(null,r,n,o,i);break e}else if(h===q){r.tag=14,r=Gp(null,r,n,o,i);break e}}throw r=Ye(n)||n,Error(a(306,r,""))}}return r;case 0:return Rc(n,r,r.type,r.pendingProps,i);case 1:return o=r.type,h=Zr(o,r.pendingProps),Jp(n,r,o,h,i);case 3:e:{if(Fe(r,r.stateNode.containerInfo),n===null)throw Error(a(387));o=r.pendingProps;var f=r.memoizedState;h=f.element,Zu(n,r),$i(r,o,null,i);var v=r.memoizedState;if(o=v.cache,rr(r,Ze,o),o!==f.cache&&Ku(r,[Ze],i,!0),Ii(),o=v.element,f.isDehydrated)if(f={element:o,isDehydrated:!1,cache:v.cache},r.updateQueue.baseState=f,r.memoizedState=f,r.flags&256){r=Xp(n,r,o,i);break e}else if(o!==h){h=Yt(Error(a(424)),r),Li(h),r=Xp(n,r,o,i);break e}else for(n=r.stateNode.containerInfo,n.nodeType===9?n=n.body:n=n.nodeName==="HTML"?n.ownerDocument.body:n,He=Zt(n.firstChild),dt=r,_e=!0,tr=null,Jt=!0,i=Kd(r,null,o,i),r.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling;else{if(Gr(),o===h){r=Un(n,r,i);break e}gt(n,r,o,i)}r=r.child}return r;case 26:return No(n,r),n===null?(i=fy(r.type,null,r.pendingProps,null))?r.memoizedState=i:_e||(i=r.type,n=r.pen
vendor: 4,917 bytes, line 8
8dingProps,o=Zo(pe.current).createElement(i),o[ft]=r,o[Et]=n,yt(o,i,n),ot(o),r.stateNode=o):r.memoizedState=fy(r.type,n.memoizedProps,r.pendingProps,n.memoizedState),null;case 27:return Sn(r),n===null&&_e&&(o=r.stateNode=uy(r.type,r.pendingProps,pe.current),dt=r,Jt=!0,h=He,yr(r.type)?(hh=h,He=Zt(o.firstChild)):He=h),gt(n,r,r.pendingProps.children,i),No(n,r),n===null&&(r.flags|=4194304),r.child;case 5:return n===null&&_e&&((h=o=He)&&(o=W_(o,r.type,r.pendingProps,Jt),o!==null?(r.stateNode=o,dt=r,He=Zt(o.firstChild),Jt=!1,h=!0):h=!1),h||nr(r)),Sn(r),h=r.type,f=r.pendingProps,v=n!==null?n.memoizedProps:null,o=f.children,ah(h,f)?o=null:v!==null&&ah(h,v)&&(r.flags|=32),r.memoizedState!==null&&(h=ic(n,r,p_,null,null,i),ua._currentValue=h),No(n,r),gt(n,r,o,i),r.child;case 6:return n===null&&_e&&((n=i=He)&&(i=eS(i,r.pendingProps,Jt),i!==null?(r.stateNode=i,dt=r,He=null,n=!0):n=!1),n||nr(r)),null;case 13:return Zp(n,r,i);case 4:return Fe(r,r.stateNode.containerInfo),o=r.pendingProps,n===null?r.child=Jr(r,null,o,i):gt(n,r,o,i),r.child;case 11:return $p(n,r,r.type,r.pendingProps,i);case 7:return gt(n,r,r.pendingProps,i),r.child;case 8:return gt(n,r,r.pendingProps.children,i),r.child;case 12:return gt(n,r,r.pendingProps.children,i),r.child;case 10:return o=r.pendingProps,rr(r,r.type,o.value),gt(n,r,o.children,i),r.child;case 9:return h=r.type._context,o=r.pendingProps.children,Kr(r),h=pt(h),o=o(h),r.flags|=1,gt(n,r,o,i),r.child;case 14:return Gp(n,r,r.type,r.pendingProps,i);case 15:return Vp(n,r,r.type,r.pendingProps,i);case 19:return eg(n,r,i);case 31:return w_(n,r,i);case 22:return Kp(n,r,i,r.pendingProps);case 24:return Kr(r),o=pt(Ze),n===null?(h=Qu(),h===null&&(h=Ne,f=Yu(),h.pooledCache=f,f.refCount++,f!==null&&(h.pooledCacheLanes|=i),h=f),r.memoizedState={parent:o,cache:h},Xu(r),rr(r,Ze,h)):((n.lanes&i)!==0&&(Zu(n,r),$i(r,null,null,i),Ii()),h=n.memoizedState,f=r.memoizedState,h.parent!==o?(h={parent:o,cache:o},r.memoizedState=h,r.lanes===0&&(r.memoizedState=r.updateQueue.baseState=h),rr(r,Ze,o)):(o=f.cache,rr(r,Ze,o),o!==h.cache&&Ku(r,[Ze],i,!0))),gt(n,r,r.pendingProps.children,i),r.child;case 29:throw r.pendingProps}throw Error(a(156,r.tag))}function Dn(n){n.flags|=4}function Uc(n,r,i,o,h){if((r=(n.mode&32)!==0)&&(r=!1),r){if(n.flags|=16777216,(h&335544128)===h)if(n.stateNode.complete)n.flags|=8192;else if(Cg())n.flags|=8192;else throw Qr=_o,Ju}else n.flags&=-16777217}function ng(n,r){if(r.type!=="stylesheet"||(r.state.loading&4)!==0)n.flags&=-16777217;else if(n.flags|=16777216,!my(r))if(Cg())n.flags|=8192;else throw Qr=_o,Ju}function zo(n,r){r!==null&&(n.flags|=4),n.flags&16384&&(r=n.tag!==22?Nf():536870912,n.lanes|=r,Ks|=r)}function Qi(n,r){if(!_e)switch(n.tailMode){case"hidden":r=n.tail;for(var i=null;r!==null;)r.alternate!==null&&(i=r),r=r.sibling;i===null?n.tail=null:i.sibling=null;break;case"collapsed":i=n.tail;for(var o=null;i!==null;)i.alternate!==null&&(o=i),i=i.sibling;o===null?r||n.tail===null?n.tail=null:n.tail.sibling=null:o.sibling=null}}function qe(n){var r=n.alternate!==null&&n.alternate.child===n.child,i=0,o=0;if(r)for(var h=n.child;h!==null;)i|=h.lanes|h.childLanes,o|=h.subtreeFlags&65011712,o|=h.flags&65011712,h.return=n,h=h.sibling;else for(h=n.child;h!==null;)i|=h.lanes|h.childLanes,o|=h.subtreeFlags,o|=h.flags,h.return=n,h=h.sibling;return n.subtreeFlags|=o,n.childLanes=i,r}function T_(n,r,i){var o=r.pendingProps;switch(qu(r),r.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return qe(r),null;case 1:return qe(r),null;case 3:return i=r.stateNode,o=null,n!==null&&(o=n.memoizedState.cache),r.memoizedState.cache!==o&&(r.flags|=2048),kn(Ze),De(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(n===null||n.child===null)&&(Us(r)?Dn(r):n===null||n.memoizedState.isDehydrated&&(r.flags&256)===0||(r.flags|=1024,$u())),qe(r),null;case 26:var h=r.type,f=r.memoizedState;return n===null?(Dn(r),f!==null?(qe(r),ng(r,f)):(qe(r),Uc(r,h,null,o,i))):f?f!==n.memoizedState?(Dn(r),qe(r),ng(r,f)):(qe(r),r.flags&=-16777217):(n=n.memoizedProps,n!==o&&Dn(r),qe(r),Uc(r,h,n,o,i)),null;case 27:if(wn(r),i=pe.current,h=r.type,n!==null&&r.stateNode!=null)n.memoizedProps!==o&&Dn(r);else{if(!o){if(r.stateNode===null)throw Error(a(166));return qe(r),null}n=W.current,Us(r)?Nd(r):(n=uy(h,o,i),r.stateNode=n,Dn(r))}return qe(r),null;case 5:if(wn(r),h=r.type,n!==null&&r.stateNode!=null)n.memoizedProps!==o&&Dn(r);else{if(!o){if(r.stateNode===null)throw Error(a(166));return qe(r),null}if(f=W.current,Us(r))Nd(r);else{var v=Zo(pe.current);switch(f){case 1:f=v.createElementNS("http://www.w3.org/2000/svg",h);break;case 2:f=v.createElementNS("http://www.w3.org/1998/Math/MathML",h);break;default:switch(h){case"svg":f=v.createElementNS("http://www.w3.org/2000/svg",h);break;case"math":f=v.createElementNS("http://www.w3.org/1998/Math/MathML",h);break;case"script":f=v.createElement("div"),f.innerHTML="<script><\/script>
8",f=f.removeChild(f.firstChild);break;case"select":f=typeof o.is=="string"?v.createElement("select",{is:o.is}):v.createElement("select"),o.multiple?f.multiple=!0:o.size&&(f.size=o.size);break;default:f=typeof o.is=="string"?v.createElement(h,{is:o.is}):v.createElement(h)}}f[ft]=r,f[Et]=o;e:for(v=r.child;v!==null;){if(v.tag===5||v.tag===6)f.appendChild(v.stateNode);else if(v.tag!==4&&v.tag!==27&&v.child!==null){v.child.return=v,v=v.child;continue}if(v===r)break e;for(;v.sibling===null;){if(v.return===null||v.return===r)break e;v=v.return}v.sibling.return=v.return,v=v.sibling}r.stateNode=f;e:switch(yt(f,h,o),h){case"button":case"input":case"select":case"textarea":o=!!o.autoFocus;break e;case"img":o=!0;break e;default:o=!1}o&&Dn(r)}}return qe(r),Uc(r,r.type,n===null?null:n.memoizedProps,r.pendingProps,i),null;case 6:if(n&&r.stateNode!=null)n.memoizedProps!==o&&Dn(r);else{if(typeof o!="string"&&r.stateNode===null)throw Error(a(166));if(n=pe.current,Us(r)){if(n=r.stateNode,i=r.memoizedProps,o=null,h=dt,h!==null)switch(h.tag){case 27:case 5:o=h.memoizedProps}n[ft]=r,n=!!(n.nodeValue===i||o!==null&&o.suppressHydrationWarning===!0||Zg(n.nodeValue,i)),n||nr(r,!0)}else n=Zo(n).createTextNode(o),n[ft]=r,r.stateNode=n}return qe(r),null;case 31:if(i=r.memoizedState,n===null||n.memoizedState!==null){if(o=Us(r),i!==null){if(n===null){if(!o)throw Error(a(318));if(n=r.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(a(557));n[ft]=r}else Gr(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;qe(r),n=!1}else i=$u(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=i),n=!0;if(!n)return r.flags&256?(Bt(r),r):(Bt(r),null);if((r.flags&128)!==0)throw Error(a(558))}return qe(r),null;case 13:if(o=r.memoizedState,n===null||n.memoizedState!==null&&n.memoizedState.dehydrated!==null){if(h=Us(r),o!==null&&o.dehydrated!==null){if(n===null){if(!h)throw Error(a(318));if(h=r.memoizedState,h=h!==null?h.dehydrated:null,!h)throw Error(a(317));h[ft]=r}else Gr(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;qe(r),h=!1}else h=$u(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=h),h=!0;if(!h)return r.flags&256?(Bt(r),r):(Bt(r),null)}return Bt(r),(r.flags&128)!==0?(r.lanes=i,r):(i=o!==null,n=n!==null&&n.memoizedState!==null,i&&(o=r.child,h=null,o.alternate!==null&&o.alternate.memoizedState!==null&&o.alternate.memoizedState.cachePool!==null&&(h=o.alternate.memoizedState.cachePool.pool),f=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(f=o.memoizedState.cachePool.pool),f!==h&&(o.flags|=2048)),i!==n&&i&&(r.child.flags|=8192),zo(r,r.updateQueue),qe(r),null);case 4:return De(),n===null&&th(r.stateNode.containerInfo),qe(r),null;case 10:return kn(r.type),qe(r),null;case 19:if($(Qe),o=r.memoizedState,o===null)return qe(r),null;if(h=(r.flags&128)!==0,f=o.rendering,f===null)if(h)Qi(o,!1);else{if(Ve!==0||n!==null&&(n.flags&128)!==0)for(n=r.child;n!==null;){if(f=To(n),f!==null){for(r.flags|=128,Qi(o,!1),n=f.updateQueue,r.updateQueue=n,zo(r,n),r.subtreeFlags=0,n=i,i=r.child;i!==null;)kd(i,n),i=i.sibling;return X(Qe,Qe.current&1|2),_e&&Cn(r,o.treeForkCount),r.child}n=n.sibling}o.tail!==null&&vt()>Io&&(r.flags|=128,h=!0,Qi(o,!1),r.lanes=4194304)}else{if(!h)if(n=To(f),n!==null){if(r.flags|=128,h=!0,n=n.updateQueue,r.updateQueue=n,zo(r,n),Qi(o,!0),o.tail===null&&o.tailMode==="hidden"&&!f.alternate&&!_e)return qe(r),null}else 2*vt()-o.renderingStartTime>Io&&i!==536870912&&(r.flags|=128,h=!0,Qi(o,!1),r.lanes=4194304);o.isBackwards?(f.sibling=r.child,r.child=f):(n=o.last,n!==null?n.sibling=f:r.child=f,o.last=f)}return o.tail!==null?(n=o.tail,o.rendering=n,o.tail=n.sibling,o.renderingStartTime=vt(),n.sibling=null,i=Qe.current,X(Qe,h?i&1|2:i&1),_e&&Cn(r,o.treeForkCount),n):(qe(r),null);case 22:case 23:return Bt(r),nc(),o=r.memoizedState!==null,n!==null?n.memoizedState!==null!==o&&(r.flags|=8192):o&&(r.flags|=8192),o?(i&536870912)!==0&&(r.flags&128)===0&&(qe(r),r.subtreeFlags&6&&(r.flags|=8192)):qe(r),i=r.updateQueue,i!==null&&zo(r,i.retryQueue),i=null,n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(i=n.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==i&&(r.flags|=2048),n!==null&&$(Yr),null;case 24:return i=null,n!==null&&(i=n.memoizedState.cache),r.memoizedState.cache!==i&&(r.flags|=2048),kn(Ze),qe(r),null;case 25:return null;case 30:return null}throw Error(a(156,r.tag))}function R_(n,r){switch(qu(r),r.tag){case 1:return n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 3:return kn(Ze),De(),n=r.flags,(n&65536)!==0&&(n&128)===0?(r.flags=n&-65537|128,r):null;case 26:case 27:case 5:return wn(r),null;case 31:if(r.memoizedState!==null){if(Bt(r),r.alternate===null)throw Error(a(340));Gr()}return n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 13:if(Bt(r),n=r.memoizedState,n!==null&&n.dehydrated!==null){if(r.alternate===null)throw Error(a(340));Gr()}return n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 19:return $(Qe),null;case 4:return De(),null;case 10:return kn(r.type),null;case 22:case 23:return Bt(r),nc(),n!==null&&$(Yr),n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 24:return kn(Ze),null;case 25:return null;default:return null}}function rg(n,r){switch(qu(r),r.tag){case 3:kn(Ze),De();break;case 26:case 27:case 5:wn(r);break;case 4:De();break;case 31:r.memoizedState!==null&&Bt(r);break;case 13:Bt(r);break;case 19:$(Qe);break;case 10:kn(r.type);break;case 22:case 23:Bt(r),nc(),n!==null&&$(Yr);break;case 24:kn(Ze)}}function Ji(n,r){try{var i=r.updateQueue,o=i!==null?i.lastEffect:null;if(o!==null){var h=o.next;i=h;do{if((i.tag&n)===n){o=void 0;var f=i.create,v=i.inst;o=f(),v.destroy=o}i=i.next}while(i!==h)}}catch(S){ke(r,r.return,S)}}function ur(n,r,i){try{var o=r.updateQueue,h=o!==null?o.lastEffect:null;if(h!==null){var f=h.next;o=f;do{if((o.tag&n)===n){var v=o.inst,S=v.destroy;if(S!==void 0){v.destroy=void 0,h=r;var C=i,N=S;try{N()}catch(H){ke(h,C,H)}}}o=o.next}while(o!==f)}}catch(H){ke(r,r.return,H)}}function sg(n){var r=n.updateQueue;if(r!==null){var i=n.stateNode;try{Fd(r,i)}catch(o){ke(n,n.return,o)}}}function ig(n,r,i){i.props=Zr(n.type,n.memoizedProps),i.state=n.memoizedState;
vendor: 18,134 bytes, line 8
8try{i.componentWillUnmount()}catch(o){ke(n,r,o)}}function Xi(n,r){try{var i=n.ref;if(i!==null){switch(n.tag){case 26:case 27:case 5:var o=n.stateNode;break;case 30:o=n.stateNode;break;default:o=n.stateNode}typeof i=="function"?n.refCleanup=i(o):i.current=o}}catch(h){ke(n,r,h)}}function pn(n,r){var i=n.ref,o=n.refCleanup;if(i!==null)if(typeof o=="function")try{o()}catch(h){ke(n,r,h)}finally{n.refCleanup=null,n=n.alternate,n!=null&&(n.refCleanup=null)}else if(typeof i=="function")try{i(null)}catch(h){ke(n,r,h)}else i.current=null}function ag(n){var r=n.type,i=n.memoizedProps,o=n.stateNode;try{e:switch(r){case"button":case"input":case"select":case"textarea":i.autoFocus&&o.focus();break e;case"img":i.src?o.src=i.src:i.srcSet&&(o.srcset=i.srcSet)}}catch(h){ke(n,n.return,h)}}function Dc(n,r,i){try{var o=n.stateNode;Y_(o,n.type,i,r),o[Et]=r}catch(h){ke(n,n.return,h)}}function og(n){return n.tag===5||n.tag===3||n.tag===26||n.tag===27&&yr(n.type)||n.tag===4}function Nc(n){e:for(;;){for(;n.sibling===null;){if(n.return===null||og(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&&yr(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 Lc(n,r,i){var o=n.tag;if(o===5||o===6)n=n.stateNode,r?(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i).insertBefore(n,r):(r=i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,r.appendChild(n),i=i._reactRootContainer,i!=null||r.onclick!==null||(r.onclick=Rn));else if(o!==4&&(o===27&&yr(n.type)&&(i=n.stateNode,r=null),n=n.child,n!==null))for(Lc(n,r,i),n=n.sibling;n!==null;)Lc(n,r,i),n=n.sibling}function Po(n,r,i){var o=n.tag;if(o===5||o===6)n=n.stateNode,r?i.insertBefore(n,r):i.appendChild(n);else if(o!==4&&(o===27&&yr(n.type)&&(i=n.stateNode),n=n.child,n!==null))for(Po(n,r,i),n=n.sibling;n!==null;)Po(n,r,i),n=n.sibling}function lg(n){var r=n.stateNode,i=n.memoizedProps;try{for(var o=n.type,h=r.attributes;h.length;)r.removeAttributeNode(h[0]);yt(r,o,i),r[ft]=n,r[Et]=i}catch(f){ke(n,n.return,f)}}var Nn=!1,tt=!1,zc=!1,ug=typeof WeakSet=="function"?WeakSet:Set,lt=null;function A_(n,r){if(n=n.containerInfo,sh=il,n=Sd(n),ku(n)){if("selectionStart"in n)var i={start:n.selectionStart,end:n.selectionEnd};else e:{i=(i=n.ownerDocument)&&i.defaultView||window;var o=i.getSelection&&i.getSelection();if(o&&o.rangeCount!==0){i=o.anchorNode;var h=o.anchorOffset,f=o.focusNode;o=o.focusOffset;try{i.nodeType,f.nodeType}catch{i=null;break e}var v=0,S=-1,C=-1,N=0,H=0,G=n,z=null;t:for(;;){for(var P;G!==i||h!==0&&G.nodeType!==3||(S=v+h),G!==f||o!==0&&G.nodeType!==3||(C=v+o),G.nodeType===3&&(v+=G.nodeValue.length),(P=G.firstChild)!==null;)z=G,G=P;for(;;){if(G===n)break t;if(z===i&&++N===h&&(S=v),z===f&&++H===o&&(C=v),(P=G.nextSibling)!==null)break;G=z,z=G.parentNode}G=P}i=S===-1||C===-1?null:{start:S,end:C}}else i=null}i=i||{start:0,end:0}}else i=null;for(ih={focusedElem:n,selectionRange:i},il=!1,lt=r;lt!==null;)if(r=lt,n=r.child,(r.subtreeFlags&1028)!==0&&n!==null)n.return=r,lt=n;else for(;lt!==null;){switch(r=lt,f=r.alternate,n=r.flags,r.tag){case 0:if((n&4)!==0&&(n=r.updateQueue,n=n!==null?n.events:null,n!==null))for(i=0;i<n.length;i++)h=n[i],h.ref.impl=h.nextImpl;break;case 11:case 15:break;case 1:if((n&1024)!==0&&f!==null){n=void 0,i=r,h=f.memoizedProps,f=f.memoizedState,o=i.stateNode;try{var ee=Zr(i.type,h);n=o.getSnapshotBeforeUpdate(ee,f),o.__reactInternalSnapshotBeforeUpdate=n}catch(ue){ke(i,i.return,ue)}}break;case 3:if((n&1024)!==0){if(n=r.stateNode.containerInfo,i=n.nodeType,i===9)lh(n);else if(i===1)switch(n.nodeName){case"HEAD":case"HTML":case"BODY":lh(n);break;default:n.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((n&1024)!==0)throw Error(a(163))}if(n=r.sibling,n!==null){n.return=r.return,lt=n;break}lt=r.return}}function cg(n,r,i){var o=i.flags;switch(i.tag){case 0:case 11:case 15:zn(n,i),o&4&&Ji(5,i);break;case 1:if(zn(n,i),o&4)if(n=i.stateNode,r===null)try{n.componentDidMount()}catch(v){ke(i,i.return,v)}else{var h=Zr(i.type,r.memoizedProps);r=r.memoizedState;try{n.componentDidUpdate(h,r,n.__reactInternalSnapshotBeforeUpdate)}catch(v){ke(i,i.return,v)}}o&64&&sg(i),o&512&&Xi(i,i.return);break;case 3:if(zn(n,i),o&64&&(n=i.updateQueue,n!==null)){if(r=null,i.child!==null)switch(i.child.tag){case 27:case 5:r=i.child.stateNode;break;case 1:r=i.child.stateNode}try{Fd(n,r)}catch(v){ke(i,i.return,v)}}break;case 27:r===null&&o&4&&lg(i);case 26:case 5:zn(n,i),r===null&&o&4&&ag(i),o&512&&Xi(i,i.return);break;case 12:zn(n,i);break;case 31:zn(n,i),o&4&&dg(n,i);break;case 13:zn(n,i),o&4&&pg(n,i),o&64&&(n=i.memoizedState,n!==null&&(n=n.dehydrated,n!==null&&(i=N_.bind(null,i),tS(n,i))));break;case 22:if(o=i.memoizedState!==null||Nn,!o){r=r!==null&&r.memoizedState!==null||tt,h=Nn;var f=tt;Nn=o,(tt=r)&&!f?Pn(n,i,(i.subtreeFlags&8772)!==0):zn(n,i),Nn=h,tt=f}break;case 30:break;default:zn(n,i)}}function hg(n){var r=n.alternate;r!==null&&(n.alternate=null,hg(r)),n.child=null,n.deletions=null,n.sibling=null,n.tag===5&&(r=n.stateNode,r!==null&&du(r)),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 Ie=null,Rt=!1;function Ln(n,r,i){for(i=i.child;i!==null;)fg(n,r,i),i=i.sibling}function fg(n,r,i){if(Dt&&typeof Dt.onCommitFiberUnmount=="function")try{Dt.onCommitFiberUnmount(Si,i)}catch{}switch(i.tag){case 26:tt||pn(i,r),Ln(n,r,i),i.memoizedState?i.memoizedState.count--:i.stateNode&&(i=i.stateNode,i.parentNode.removeChild(i));break;case 27:tt||pn(i,r);var o=Ie,h=Rt;yr(i.type)&&(Ie=i.stateNode,Rt=!1),Ln(n,r,i),aa(i.stateNode),Ie=o,Rt=h;break;case 5:tt||pn(i,r);case 6:if(o=Ie,h=Rt,Ie=null,Ln(n,r,i),Ie=o,Rt=h,Ie!==null)if(Rt)try{(Ie.nodeType===9?Ie.body:Ie.nodeName==="HTML"?Ie.ownerDocument.body:Ie).removeChild(i.stateNode)}catch(f){ke(i,r,f)}else try{Ie.removeChild(i.stateNode)}catch(f){ke(i,r,f)}break;case 18:Ie!==null&&(Rt?(n=Ie,sy(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,i.stateNode),ei(n)):sy(Ie,i.stateNode));break;case 4:o=Ie,h=Rt,Ie=i.stateNode.containerInfo,Rt=!0,Ln(n,r,i),Ie=o,Rt=h;break;case 0:case 11:case 14:case 15:ur(2,i,r),tt||ur(4,i,r),Ln(n,r,i);break;case 1:tt||(pn(i,r),o=i.stateNode,typeof o.componentWillUnmount=="function"&&ig(i,r,o)),Ln(n,r,i);break;case 21:Ln(n,r,i);break;case 22:tt=(o=tt)||i.memoizedState!==null,Ln(n,r,i),tt=o;break;default:Ln(n,r,i)}}function dg(n,r){if(r.memoizedState===null&&(n=r.alternate,n!==null&&(n=n.memoizedState,n!==null))){n=n.dehydrated;try{ei(n)}catch(i){ke(r,r.return,i)}}}function pg(n,r){if(r.memoizedState===null&&(n=r.alternate,n!==null&&(n=n.memoizedState,n!==null&&(n=n.dehydrated,n!==null))))try{ei(n)}catch(i){ke(r,r.return,i)}}function O_(n){switch(n.tag){case 31:case 13:case 19:var r=n.stateNode;return r===null&&(r=n.stateNode=new ug),r;case 22:return n=n.stateNode,r=n._retryCache,r===null&&(r=n._retryCache=new ug),r;default:throw Error(a(435,n.tag))}}function Bo(n,r){var i=O_(n);r.forEach(function(o){if(!i.has(o)){i.add(o);var h=L_.bind(null,n,o);o.then(h,h)}})}function At(n,r){var i=r.deletions;if(i!==null)for(var o=0;o<i.length;o++){var h=i[o],f=n,v=r,S=v;e:for(;S!==null;){switch(S.tag){case 27:if(yr(S.type)){Ie=S.stateNode,Rt=!1;break e}break;case 5:Ie=S.stateNode,Rt=!1;break e;case 3:case 4:Ie=S.stateNode.containerInfo,Rt=!0;break e}S=S.return}if(Ie===null)throw Error(a(160));fg(f,v,h),Ie=null,Rt=!1,f=h.alternate,f!==null&&(f.return=null),h.return=null}if(r.subtreeFlags&13886)for(r=r.child;r!==null;)gg(r,n),r=r.sibling}var rn=null;function gg(n,r){var i=n.alternate,o=n.flags;switch(n.tag){case 0:case 11:case 14:case 15:At(r,n),Ot(n),o&4&&(ur(3,n,n.return),Ji(3,n),ur(5,n,n.return));break;case 1:At(r,n),Ot(n),o&512&&(tt||i===null||pn(i,i.return)),o&64&&Nn&&(n=n.updateQueue,n!==null&&(o=n.callbacks,o!==null&&(i=n.shared.hiddenCallbacks,n.shared.hiddenCallbacks=i===null?o:i.concat(o))));break;case 26:var h=rn;if(At(r,n),Ot(n),o&512&&(tt||i===null||pn(i,i.return)),o&4){var f=i!==null?i.memoizedState:null;if(o=n.memoizedState,i===null)if(o===null)if(n.stateNode===null){e:{o=n.type,i=n.memoizedProps,h=h.ownerDocument||h;t:switch(o){case"title":f=h.getElementsByTagName("title")[0],(!f||f[Ti]||f[ft]||f.namespaceURI==="http://www.w3.org/2000/svg"||f.hasAttribute("itemprop"))&&(f=h.createElement(o),h.head.insertBefore(f,h.querySelector("head > title"))),yt(f,o,i),f[ft]=n,ot(f),o=f;break e;case"link":var v=gy("link","href",h).get(o+(i.href||""));if(v){for(var S=0;S<v.length;S++)if(f=v[S],f.getAttribute("href")===(i.href==null||i.href===""?null:i.href)&&f.getAttribute("rel")===(i.rel==null?null:i.rel)&&f.getAttribute("title")===(i.title==null?null:i.title)&&f.getAttribute("crossorigin")===(i.crossOrigin==null?null:i.crossOrigin)){v.splice(S,1);break t}}f=h.createElement(o),yt(f,o,i),h.head.appendChild(f);break;case"meta":if(v=gy("meta","content",h).get(o+(i.content||""))){for(S=0;S<v.length;S++)if(f=v[S],f.getAttribute("content")===(i.content==null?null:""+i.content)&&f.getAttribute("name")===(i.name==null?null:i.name)&&f.getAttribute("property")===(i.property==null?null:i.property)&&f.getAttribute("http-equiv")===(i.httpEquiv==null?null:i.httpEquiv)&&f.getAttribute("charset")===(i.charSet==null?null:i.charSet)){v.splice(S,1);break t}}f=h.createElement(o),yt(f,o,i),h.head.appendChild(f);break;default:throw Error(a(468,o))}f[ft]=n,ot(f),o=f}n.stateNode=o}else yy(h,n.type,n.stateNode);else n.stateNode=py(h,o,n.memoizedProps);else f!==o?(f===null?i.stateNode!==null&&(i=i.stateNode,i.parentNode.removeChild(i)):f.count--,o===null?yy(h,n.type,n.stateNode):py(h,o,n.memoizedProps)):o===null&&n.stateNode!==null&&Dc(n,n.memoizedProps,i.memoizedProps)}break;case 27:At(r,n),Ot(n),o&512&&(tt||i===null||pn(i,i.return)),i!==null&&o&4&&Dc(n,n.memoizedProps,i.memoizedProps);break;case 5:if(At(r,n),Ot(n),o&512&&(tt||i===null||pn(i,i.return)),n.flags&32){h=n.stateNode;try{Es(h,"")}catch(ee){ke(n,n.return,ee)}}o&4&&n.stateNode!=null&&(h=n.memoizedProps,Dc(n,h,i!==null?i.memoizedProps:h)),o&1024&&(zc=!0);break;case 6:if(At(r,n),Ot(n),o&4){if(n.stateNode===null)throw Error(a(162));o=n.memoizedProps,i=n.stateNode;try{i.nodeValue=o}catch(ee){ke(n,n.return,ee)}}break;case 3:if(tl=null,h=rn,rn=Wo(r.containerInfo),At(r,n),rn=h,Ot(n),o&4&&i!==null&&i.memoizedState.isDehydrated)try{ei(r.containerInfo)}catch(ee){ke(n,n.return,ee)}zc&&(zc=!1,yg(n));break;case 4:o=rn,rn=Wo(n.stateNode.containerInfo),At(r,n),Ot(n),rn=o;break;case 12:At(r,n),Ot(n);break;case 31:At(r,n),Ot(n),o&4&&(o=n.updateQueue,o!==null&&(n.updateQueue=null,Bo(n,o)));break;case 13:At(r,n),Ot(n),n.child.flags&8192&&n.memoizedState!==null!=(i!==null&&i.memoizedState!==null)&&(qo=vt()),o&4&&(o=n.updateQueue,o!==null&&(n.updateQueue=null,Bo(n,o)));break;case 22:h=n.memoizedState!==null;var C=i!==null&&i.memoizedState!==null,N=Nn,H=tt;if(Nn=N||h,tt=H||C,At(r,n),tt=H,Nn=N,Ot(n),o&8192)e:for(r=n.stateNode,r._visibility=h?r._visibility&-2:r._visibility|1,h&&(i===null||C||Nn||tt||Wr(n)),i=null,r=n;;){if(r.tag===5||r.tag===26){if(i===null){C=i=r;try{if(f=C.stateNode,h)v=f.style,typeof v.setProperty=="function"?v.setProperty("display","none","important"):v.display="none";else{S=C.stateNode;var G=C.memoizedProps.style,z=G!=null&&G.hasOwnProperty("display")?G.display:null;S.style.display=z==null||typeof z=="boolean"?"":(""+z).trim()}}catch(ee){ke(C,C.return,ee)}}}else if(r.tag===6){if(i===null){C=r;try{C.stateNode.nodeValue=h?"":C.memoizedProps}catch(ee){ke(C,C.return,ee)}}}else if(r.tag===18){if(i===null){C=r;try{var P=C.stateNode;h?iy(P,!0):iy(C.stateNode,!1)}catch(ee){ke(C,C.return,ee)}}}else if((r.tag!==22&&r.tag!==23||r.memoizedState===null||r===n)&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===n)break e;for(;r.sibling===null;){if(r.return===null||r.return===n)break e;i===r&&(i=null),r=r.return}i===r&&(i=null),r.sibling.return=r.return,r=r.sibling}o&4&&(o=n.updateQueue,o!==null&&(i=o.retryQueue,i!==null&&(o.retryQueue=null,Bo(n,i))));break;case 19:At(r,n),Ot(n),o&4&&(o=n.updateQueue,o!==null&&(n.updateQueue=null,Bo(n,o)));break;case 30:break;case 21:break;default:At(r,n),Ot(n)}}function Ot(n){var r=n.flags;if(r&2){try{for(var i,o=n.return;o!==null;){if(og(o)){i=o;break}o=o.return}if(i==null)throw Error(a(160));switch(i.tag){case 27:var h=i.stateNode,f=Nc(n);Po(n,f,h);break;case 5:var v=i.stateNode;i.flags&32&&(Es(v,""),i.flags&=-33);var S=Nc(n);Po(n,S,v);break;case 3:case 4:var C=i.stateNode.containerInfo,N=Nc(n);Lc(n,N,C);break;default:throw Error(a(161))}}catch(H){ke(n,n.return,H)}n.flags&=-3}r&4096&&(n.flags&=-4097)}function yg(n){if(n.subtreeFlags&1024)for(n=n.child;n!==null;){var r=n;yg(r),r.tag===5&&r.flags&1024&&r.stateNode.reset(),n=n.sibling}}function zn(n,r){if(r.subtreeFlags&8772)for(r=r.child;r!==null;)cg(n,r.alternate,r),r=r.sibling}function Wr(n){for(n=n.child;n!==null;){var r=n;switch(r.tag){case 0:case 11:case 14:case 15:ur(4,r,r.return),Wr(r);break;case 1:pn(r,r.return);var i=r.stateNode;typeof i.componentWillUnmount=="function"&&ig(r,r.return,i),Wr(r);break;case 27:aa(r.stateNode);case 26:case 5:pn(r,r.return),Wr(r);break;case 22:r.memoizedState===null&&Wr(r);break;case 30:Wr(r);break;default:Wr(r)}n=n.sibling}}function Pn(n,r,i){for(i=i&&(r.subtreeFlags&8772)!==0,r=r.child;r!==null;){var o=r.alternate,h=n,f=r,v=f.flags;switch(f.tag){case 0:case 11:case 15:Pn(h,f,i),Ji(4,f);break;case 1:if(Pn(h,f,i),o=f,h=o.stateNode,typeof h.componentDidMount=="function")try{h.componentDidMount()}catch(N){ke(o,o.return,N)}if(o=f,h=o.updateQueue,h!==null){var S=o.stateNode;try{var C=h.shared.hiddenCallbacks;if(C!==null)for(h.shared.hiddenCallbacks=null,h=0;h<C.length;h++)Yd(C[h],S)}catch(N){ke(o,o.return,N)}}i&&v&64&&sg(f),Xi(f,f.return);break;case 27:lg(f);case 26:case 5:Pn(h,f,i),i&&o===null&&v&4&&ag(f),Xi(f,f.return);break;case 12:Pn(h,f,i);break;case 31:Pn(h,f,i),i&&v&4&&dg(h,f);break;case 13:Pn(h,f,i),i&&v&4&&pg(h,f);break;case 22:f.memoizedState===null&&Pn(h,f,i),Xi(f,f.return);break;case 30:break;default:Pn(h,f,i)}r=r.sibling}}function Pc(n,r){var i=null;n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(i=n.memoizedState.cachePool.pool),n=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(n=r.memoizedState.cachePool.pool),n!==i&&(n!=null&&n.refCount++,i!=null&&zi(i))}function Bc(n,r){n=null,r.alternate!==null&&(n=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==n&&(r.refCount++,n!=null&&zi(n))}function sn(n,r,i,o){if(r.subtreeFlags&10256)for(r=r.child;r!==null;)mg(n,r,i,o),r=r.sibling}function mg(n,r,i,o){var h=r.flags;switch(r.tag){case 0:case 11:case 15:sn(n,r,i,o),h&2048&&Ji(9,r);break;case 1:sn(n,r,i,o);break;case 3:sn(n,r,i,o),h&2048&&(n=null,r.alternate!==null&&(n=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==n&&(r.refCount++,n!=null&&zi(n)));break;case 12:if(h&2048){sn(n,r,i,o),n=r.stateNode;try{var f=r.memoizedProps,v=f.id,S=f.onPostCommit;typeof S=="function"&&S(v,r.alternate===null?"mount":"update",n.passiveEffectDuration,-0)}catch(C){ke(r,r.return,C)}}else sn(n,r,i,o);break;case 31:sn(n,r,i,o);break;case 13:sn(n,r,i,o);break;case 23:break;case 22:f=r.stateNode,v=r.alternate,r.memoizedState!==null?f._visibility&2?sn(n,r,i,o):Zi(n,r):f._visibility&2?sn(n,r,i,o):(f._visibility|=2,$s(n,r,i,o,(r.subtreeFlags&10256)!==0||!1)),h&2048&&Pc(v,r);break;case 24:sn(n,r,i,o),h&2048&&Bc(r.alternate,r);break;default:sn(n,r,i,o)}}function $s(n,r,i,o,h){for(h=h&&((r.subtreeFlags&10256)!==0||!1),r=r.child;r!==null;){var f=n,v=r,S=i,C=o,N=v.flags;switch(v.tag){case 0:case 11:case 15:$s(f,v,S,C,h),Ji(8,v);break;case 23:break;case 22:var H=v.stateNode;v.memoizedState!==null?H._visibility&2?$s(f,v,S,C,h):Zi(f,v):(H._visibility|=2,$s(f,v,S,C,h)),h&&N&2048&&Pc(v.alternate,v);break;case 24:$s(f,v,S,C,h),h&&N&2048&&Bc(v.alternate,v);break;default:$s(f,v,S,C,h)}r=r.sibling}}function Zi(n,r){if(r.subtreeFlags&10256)for(r=r.child;r!==null;){var i=n,o=r,h=o.flags;switch(o.tag){case 22:Zi(i,o),h&2048&&Pc(o.alternate,o);break;case 24:Zi(i,o),h&2048&&Bc(o.alternate,o);break;default:Zi(i,o)}r=r.sibling}}var Wi=8192;function Gs(n,r,i){if(n.subtreeFlags&Wi)for(n=n.child;n!==null;)vg(n,r,i),n=n.sibling}function vg(n,r,i){switch(n.tag){case 26:Gs(n,r,i),n.flags&Wi&&n.memoizedState!==null&&dS(i,rn,n.memoizedState,n.memoizedProps);break;case 5:Gs(n,r,i);break;case 3:case 4:var o=rn;rn=Wo(n.stateNode.containerInfo),Gs(n,r,i),rn=o;break;case 22:n.memoizedState===null&&(o=n.alternate,o!==null&&o.memoizedState!==null?(o=Wi,Wi=16777216,Gs(n,r,i),Wi=o):Gs(n,r,i));break;default:Gs(n,r,i)}}function bg(n){var r=n.alternate;if(r!==null&&(n=r.child,n!==null)){r.child=null;do r=n.sibling,n.sibling=null,n=r;while(n!==null)}}function ea(n){var r=n.deletions;if((n.flags&16)!==0){if(r!==null)for(var i=0;i<r.length;i++){var o=r[i];lt=o,Sg(o,n)}bg(n)}if(n.subtreeFlags&10256)for(n=n.child;n!==null;)_g(n),n=n.sibling}function _g(n){switch(n.tag){case 0:case 11:case 15:ea(n),n.flags&2048&&ur(9,n,n.return);break;case 3:ea(n);break;case 12:ea(n);break;case 22:var r=n.stateNode;n.memoizedState!==null&&r._visibility&2&&(n.return===null||n.return.tag!==13)?(r._visibility&=-3,Ho(n)):ea(n);break;default:ea(n)}}function Ho(n){var r=n.deletions;if((n.flags&16)!==0){if(r!==null)for(var i=0;i<r.length;i++){var o=r[i];lt=o,Sg(o,n)}bg(n)}for(n=n.child;n!==null;){switch(r=n,r.tag){case 0:case 11:case 15:ur(8,r,r.return),Ho(r);break;case 22:i=r.stateNode,i._visibility&2&&(i._visibility&=-3,Ho(r));break;default:Ho(r)}n=n.sibling}}function Sg(n,r){for(;lt!==null;){var i=lt;switch(i.tag){case 0:case 11:case 15:ur(8,i,r);break;case 23:case 22:if(i.memoizedState!==null&&i.memoizedState.cachePool!==null){var o=i.memoizedState.cachePool.pool;o!=null&&o.refCount++}break;case 24:zi(i.memoizedState.cache)}if(o=i.child,o!==null)o.return=i,lt=o;else e:for(i=n;lt!==null;){o=lt;var h=o.sibling,f=o.return;if(hg(o),o===i){lt=null;break e}if(h!==null){h.return=f,lt=h;break e}lt=f}}}var C_={getCacheForType:function(n){var r=pt(Ze),i=r.data.get(n);return i===void 0&&(i=n(),r.data.set(n,i)),i}
vendor: 22,198 bytes, lines 8-9
8,cacheSignal:function(){return pt(Ze).controller.signal}},x_=typeof WeakMap=="function"?WeakMap:Map,Ae=0,Ne=null,ge=null,ve=0,xe=0,Ht=null,cr=!1,Vs=!1,Hc=!1,Bn=0,Ve=0,hr=0,es=0,qc=0,qt=0,Ks=0,ta=null,Ct=null,Ic=!1,qo=0,wg=0,Io=1/0,$o=null,fr=null,st=0,dr=null,Ys=null,Hn=0,$c=0,Gc=null,Eg=null,na=0,Vc=null;function It(){return(Ae&2)!==0&&ve!==0?ve&-ve:B.T!==null?Xc():Bf()}function Tg(){if(qt===0)if((ve&536870912)===0||_e){var n=Ja;Ja<<=1,(Ja&3932160)===0&&(Ja=262144),qt=n}else qt=536870912;return n=Pt.current,n!==null&&(n.flags|=32),qt}function xt(n,r,i){(n===Ne&&(xe===2||xe===9)||n.cancelPendingCommit!==null)&&(Fs(n,0),pr(n,ve,qt,!1)),Ei(n,i),((Ae&2)===0||n!==Ne)&&(n===Ne&&((Ae&2)===0&&(es|=i),Ve===4&&pr(n,ve,qt,!1)),gn(n))}function Rg(n,r,i){if((Ae&6)!==0)throw Error(a(327));var o=!i&&(r&127)===0&&(r&n.expiredLanes)===0||wi(n,r),h=o?M_(n,r):Yc(n,r,!0),f=o;do{if(h===0){Vs&&!o&&pr(n,r,0,!1);break}else{if(i=n.current.alternate,f&&!k_(i)){h=Yc(n,r,!1),f=!1;continue}if(h===2){if(f=r,n.errorRecoveryDisabledLanes&f)var v=0;else v=n.pendingLanes&-536870913,v=v!==0?v:v&536870912?536870912:0;if(v!==0){r=v;e:{var S=n;h=ta;var C=S.current.memoizedState.isDehydrated;if(C&&(Fs(S,v).flags|=256),v=Yc(S,v,!1),v!==2){if(Hc&&!C){S.errorRecoveryDisabledLanes|=f,es|=f,h=4;break e}f=Ct,Ct=h,f!==null&&(Ct===null?Ct=f:Ct.push.apply(Ct,f))}h=v}if(f=!1,h!==2)continue}}if(h===1){Fs(n,0),pr(n,r,0,!0);break}e:{switch(o=n,f=h,f){case 0:case 1:throw Error(a(345));case 4:if((r&4194048)!==r)break;case 6:pr(o,r,qt,!cr);break e;case 2:Ct=null;break;case 3:case 5:break;default:throw Error(a(329))}if((r&62914560)===r&&(h=qo+300-vt(),10<h)){if(pr(o,r,qt,!cr),Za(o,0,!0)!==0)break e;Hn=r,o.timeoutHandle=ny(Ag.bind(null,o,i,Ct,$o,Ic,r,qt,es,Ks,cr,f,"Throttled",-0,0),h);break e}Ag(o,i,Ct,$o,Ic,r,qt,es,Ks,cr,f,null,-0,0)}}break}while(!0);gn(n)}function Ag(n,r,i,o,h,f,v,S,C,N,H,G,z,P){if(n.timeoutHandle=-1,G=r.subtreeFlags,G&8192||(G&16785408)===16785408){G={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Rn},vg(r,f,G);var ee=(f&62914560)===f?qo-vt():(f&4194048)===f?wg-vt():0;if(ee=pS(G,ee),ee!==null){Hn=f,n.cancelPendingCommit=ee(Dg.bind(null,n,r,f,i,o,h,v,S,C,H,G,null,z,P)),pr(n,f,v,!N);return}}Dg(n,r,f,i,o,h,v,S,C)}function k_(n){for(var r=n;;){var i=r.tag;if((i===0||i===11||i===15)&&r.flags&16384&&(i=r.updateQueue,i!==null&&(i=i.stores,i!==null)))for(var o=0;o<i.length;o++){var h=i[o],f=h.getSnapshot;h=h.value;try{if(!Lt(f(),h))return!1}catch{return!1}}if(i=r.child,r.subtreeFlags&16384&&i!==null)i.return=r,r=i;else{if(r===n)break;for(;r.sibling===null;){if(r.return===null||r.return===n)return!0;r=r.return}r.sibling.return=r.return,r=r.sibling}}return!0}function pr(n,r,i,o){r&=~qc,r&=~es,n.suspendedLanes|=r,n.pingedLanes&=~r,o&&(n.warmLanes|=r),o=n.expirationTimes;for(var h=r;0<h;){var f=31-Nt(h),v=1<<f;o[f]=-1,h&=~v}i!==0&&Lf(n,i,r)}function Go(){return(Ae&6)===0?(ra(0),!1):!0}function Kc(){if(ge!==null){if(xe===0)var n=ge.return;else n=ge,xn=Vr=null,lc(n),Ps=null,Bi=0,n=ge;for(;n!==null;)rg(n.alternate,n),n=n.return;ge=null}}function Fs(n,r){var i=n.timeoutHandle;i!==-1&&(n.timeoutHandle=-1,J_(i)),i=n.cancelPendingCommit,i!==null&&(n.cancelPendingCommit=null,i()),Hn=0,Kc(),Ne=n,ge=i=On(n.current,null),ve=r,xe=0,Ht=null,cr=!1,Vs=wi(n,r),Hc=!1,Ks=qt=qc=es=hr=Ve=0,Ct=ta=null,Ic=!1,(r&8)!==0&&(r|=r&32);var o=n.entangledLanes;if(o!==0)for(n=n.entanglements,o&=r;0<o;){var h=31-Nt(o),f=1<<h;r|=n[h],o&=~f}return Bn=r,co(),i}function Og(n,r){fe=null,B.H=Yi,r===zs||r===bo?(r=$d(),xe=3):r===Ju?(r=$d(),xe=4):xe=r===Tc?8:r!==null&&typeof r=="object"&&typeof r.then=="function"?6:1,Ht=r,ge===null&&(Ve=1,Uo(n,Yt(r,n.current)))}function Cg(){var n=Pt.current;return n===null?!0:(ve&4194048)===ve?Xt===null:(ve&62914560)===ve||(ve&536870912)!==0?n===Xt:!1}function xg(){var n=B.H;return B.H=Yi,n===null?Yi:n}function kg(){var n=B.A;return B.A=C_,n}function Vo(){Ve=4,cr||(ve&4194048)!==ve&&Pt.current!==null||(Vs=!0),(hr&134217727)===0&&(es&134217727)===0||Ne===null||pr(Ne,ve,qt,!1)}function Yc(n,r,i){var o=Ae;Ae|=2;var h=xg(),f=kg();(Ne!==n||ve!==r)&&($o=null,Fs(n,r)),r=!1;var v=Ve;e:do try{if(xe!==0&&ge!==null){var S=ge,C=Ht;switch(xe){case 8:Kc(),v=6;break e;case 3:case 2:case 9:case 6:Pt.current===null&&(r=!0);var N=xe;if(xe=0,Ht=null,Qs(n,S,C,N),i&&Vs){v=0;break e}break;default:N=xe,xe=0,Ht=null,Qs(n,S,C,N)}}j_(),v=Ve;break}catch(H){Og(n,H)}while(!0);return r&&n.shellSuspendCounter++,xn=Vr=null,Ae=o,B.H=h,B.A=f,ge===null&&(Ne=null,ve=0,co()),v}function j_(){for(;ge!==null;)jg(ge)}function M_(n,r){var i=Ae;Ae|=2;var o=xg(),h=kg();Ne!==n||ve!==r?($o=null,Io=vt()+500,Fs(n,r)):Vs=wi(n,r);e:do try{if(xe!==0&&ge!==null){r=ge;var f=Ht;t:switch(xe){case 1:xe=0,Ht=null,Qs(n,r,f,1);break;case 2:case 9:if(qd(f)){xe=0,Ht=null,Mg(r);break}r=function(){xe!==2&&xe!==9||Ne!==n||(xe=7),gn(n)},f.then(r,r);break e;case 3:xe=7;break e;case 4:xe=5;break e;case 7:qd(f)?(xe=0,Ht=null,Mg(r)):(xe=0,Ht=null,Qs(n,r,f,7));break;case 5:var v=null;switch(ge.tag){case 26:v=ge.memoizedState;case 5:case 27:var S=ge;if(v?my(v):S.stateNode.complete){xe=0,Ht=null;var C=S.sibling;if(C!==null)ge=C;else{var N=S.return;N!==null?(ge=N,Ko(N)):ge=null}break t}}xe=0,Ht=null,Qs(n,r,f,5);break;case 6:xe=0,Ht=null,Qs(n,r,f,6);break;case 8:Kc(),Ve=6;break e;default:throw Error(a(462))}}U_();break}catch(H){Og(n,H)}while(!0);return xn=Vr=null,B.H=o,B.A=h,Ae=i,ge!==null?0:(Ne=null,ve=0,co(),Ve)}function U_(){for(;ge!==null&&!Fa();)jg(ge)}function jg(n){var r=tg(n.alternate,n,Bn);n.memoizedProps=n.pendingProps,r===null?Ko(n):ge=r}function Mg(n){var r=n,i=r.alternate;switch(r.tag){case 15:case 0:r=Qp(i,r,r.pendingProps,r.type,void 0,ve);break;case 11:r=Qp(i,r,r.pendingProps,r.type.render,r.ref,ve);break;case 5:lc(r);default:rg(i,r),r=ge=kd(r,Bn),r=tg(i,r,Bn)}n.memoizedProps=n.pendingProps,r===null?Ko(n):ge=r}function Qs(n,r,i,o){xn=Vr=null,lc(r),Ps=null,Bi=0;var h=r.return;try{if(S_(n,h,r,i,ve)){Ve=1,Uo(n,Yt(i,n.current)),ge=null;return}}catch(f){if(h!==null)throw ge=h,f;Ve=1,Uo(n,Yt(i,n.current)),ge=null;return}r.flags&32768?(_e||o===1?n=!0:Vs||(ve&536870912)!==0?n=!1:(cr=n=!0,(o===2||o===9||o===3||o===6)&&(o=Pt.current,o!==null&&o.tag===13&&(o.flags|=16384))),Ug(r,n)):Ko(r)}function Ko(n){var r=n;do{if((r.flags&32768)!==0){Ug(r,cr);return}n=r.return;var i=T_(r.alternate,r,Bn);if(i!==null){ge=i;return}if(r=r.sibling,r!==null){ge=r;return}ge=r=n}while(r!==null);Ve===0&&(Ve=5)}function Ug(n,r){do{var i=R_(n.alternate,n);if(i!==null){i.flags&=32767,ge=i;return}if(i=n.return,i!==null&&(i.flags|=32768,i.subtreeFlags=0,i.deletions=null),!r&&(n=n.sibling,n!==null)){ge=n;return}ge=n=i}while(n!==null);Ve=6,ge=null}function Dg(n,r,i,o,h,f,v,S,C){n.cancelPendingCommit=null;do Yo();while(st!==0);if((Ae&6)!==0)throw Error(a(327));if(r!==null){if(r===n.current)throw Error(a(177));if(f=r.lanes|r.childLanes,f|=Nu,fb(n,i,f,v,S,C),n===Ne&&(ge=Ne=null,ve=0),Ys=r,dr=n,Hn=i,$c=f,Gc=h,Eg=o,(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?(n.callbackNode=null,n.callbackPriority=0,z_(ys,function(){return Bg(),null})):(n.callbackNode=null,n.callbackPriority=0),o=(r.flags&13878)!==0,(r.subtreeFlags&13878)!==0||o){o=B.T,B.T=null,h=F.p,F.p=2,v=Ae,Ae|=4;try{A_(n,r,i)}finally{Ae=v,F.p=h,B.T=o}}st=1,Ng(),Lg(),zg()}}function Ng(){if(st===1){st=0;var n=dr,r=Ys,i=(r.flags&13878)!==0;if((r.subtreeFlags&13878)!==0||i){i=B.T,B.T=null;var o=F.p;F.p=2;var h=Ae;Ae|=4;try{gg(r,n);var f=ih,v=Sd(n.containerInfo),S=f.focusedElem,C=f.selectionRange;if(v!==S&&S&&S.ownerDocument&&_d(S.ownerDocument.documentElement,S)){if(C!==null&&ku(S)){var N=C.start,H=C.end;if(H===void 0&&(H=N),"selectionStart"in S)S.selectionStart=N,S.selectionEnd=Math.min(H,S.value.length);else{var G=S.ownerDocument||document,z=G&&G.defaultView||window;if(z.getSelection){var P=z.getSelection(),ee=S.textContent.length,ue=Math.min(C.start,ee),Ue=C.end===void 0?ue:Math.min(C.end,ee);!P.extend&&ue>Ue&&(v=Ue,Ue=ue,ue=v);var M=bd(S,ue),x=bd(S,Ue);if(M&&x&&(P.rangeCount!==1||P.anchorNode!==M.node||P.anchorOffset!==M.offset||P.focusNode!==x.node||P.focusOffset!==x.offset)){var D=G.createRange();D.setStart(M.node,M.offset),P.removeAllRanges(),ue>Ue?(P.addRange(D),P.extend(x.node,x.offset)):(D.setEnd(x.node,x.offset),P.addRange(D))}}}}for(G=[],P=S;P=P.parentNode;)P.nodeType===1&&G.push({element:P,left:P.scrollLeft,top:P.scrollTop});for(typeof S.focus=="function"&&S.focus(),S=0;S<G.length;S++){var I=G[S];I.element.scrollLeft=I.left,I.element.scrollTop=I.top}}il=!!sh,ih=sh=null}finally{Ae=h,F.p=o,B.T=i}}n.current=r,st=2}}function Lg(){if(st===2){st=0;var n=dr,r=Ys,i=(r.flags&8772)!==0;if((r.subtreeFlags&8772)!==0||i){i=B.T,B.T=null;var o=F.p;F.p=2;var h=Ae;Ae|=4;try{cg(n,r.alternate,r)}finally{Ae=h,F.p=o,B.T=i}}st=3}}function zg(){if(st===4||st===3){st=0,lu();var n=dr,r=Ys,i=Hn,o=Eg;(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?st=5:(st=0,Ys=dr=null,Pg(n,n.pendingLanes));var h=n.pendingLanes;if(h===0&&(fr=null),hu(i),r=r.stateNode,Dt&&typeof Dt.onCommitFiberRoot=="function")try{Dt.onCommitFiberRoot(Si,r,void 0,(r.current.flags&128)===128)}catch{}if(o!==null){r=B.T,h=F.p,F.p=2,B.T=null;try{for(var f=n.onRecoverableError,v=0;v<o.length;v++){var S=o[v];f(S.value,{componentStack:S.stack})}}finally{B.T=r,F.p=h}}(Hn&3)!==0&&Yo(),gn(n),h=n.pendingLanes,(i&261930)!==0&&(h&42)!==0?n===Vc?na++:(na=0,Vc=n):na=0,ra(0)}}function Pg(n,r){(n.pooledCacheLanes&=r)===0&&(r=n.pooledCache,r!=null&&(n.pooledCache=null,zi(r)))}function Yo(){return Ng(),Lg(),zg(),Bg()}function Bg(){if(st!==5)return!1;var n=dr,r=$c;$c=0;var i=hu(Hn),o=B.T,h=F.p;try{F.p=32>i?32:i,B.T=null,i=Gc,Gc=null;var f=dr,v=Hn;if(st=0,Ys=dr=null,Hn=0,(Ae&6)!==0)throw Error(a(331));var S=Ae;if(Ae|=4,_g(f.current),mg(f,f.current,v,i),Ae=S,ra(0,!1),Dt&&typeof Dt.onPostCommitFiberRoot=="function")try{Dt.onPostCommitFiberRoot(Si,f)}catch{}return!0}finally{F.p=h,B.T=o,Pg(n,r)}}function Hg(n,r,i){r=Yt(i,r),r=Ec(n.stateNode,r,2),n=ar(n,r,2),n!==null&&(Ei(n,2),gn(n))}function ke(n,r,i){if(n.tag===3)Hg(n,n,i);else for(;r!==null;){if(r.tag===3){Hg(r,n,i);break}else if(r.tag===1){var o=r.stateNode;if(typeof r.type.getDerivedStateFromError=="function"||typeof o.componentDidCatch=="function"&&(fr===null||!fr.has(o))){n=Yt(i,n),i=qp(2),o=ar(r,i,2),o!==null&&(Ip(i,o,r,n),Ei(o,2),gn(o));break}}r=r.return}}function Fc(n,r,i){var o=n.pingCache;if(o===null){o=n.pingCache=new x_;var h=new Set;o.set(r,h)}else h=o.get(r),h===void 0&&(h=new Set,o.set(r,h));h.has(i)||(Hc=!0,h.add(i),n=D_.bind(null,n,r,i),r.then(n,n))}function D_(n,r,i){var o=n.pingCache;o!==null&&o.delete(r),n.pingedLanes|=n.suspendedLanes&i,n.warmLanes&=~i,Ne===n&&(ve&i)===i&&(Ve===4||Ve===3&&(ve&62914560)===ve&&300>vt()-qo?(Ae&2)===0&&Fs(n,0):qc|=i,Ks===ve&&(Ks=0)),gn(n)}function qg(n,r){r===0&&(r=Nf()),n=Ir(n,r),n!==null&&(Ei(n,r),gn(n))}function N_(n){var r=n.memoizedState,i=0;r!==null&&(i=r.retryLane),qg(n,i)}function L_(n,r){var i=0;switch(n.tag){case 31:case 13:var o=n.stateNode,h=n.memoizedState;h!==null&&(i=h.retryLane);break;case 19:o=n.stateNode;break;case 22:o=n.stateNode._retryCache;break;default:throw Error(a(314))}o!==null&&o.delete(r),qg(n,i)}function z_(n,r){return tn(n,r)}var Fo=null,Js=null,Qc=!1,Qo=!1,Jc=!1,gr=0;function gn(n){n!==Js&&n.next===null&&(Js===null?Fo=Js=n:Js=Js.next=n),Qo=!0,Qc||(Qc=!0,B_())}function ra(n,r){if(!Jc&&Qo){Jc=!0;do for(var i=!1,o=Fo;o!==null;){if(n!==0){var h=o.pendingLanes;if(h===0)var f=0;else{var v=o.suspendedLanes,S=o.pingedLanes;f=(1<<31-Nt(42|n)+1)-1,f&=h&~(v&~S),f=f&201326741?f&201326741|1:f?f|2:0}f!==0&&(i=!0,Vg(o,f))}else f=ve,f=Za(o,o===Ne?f:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),(f&3)===0||wi(o,f)||(i=!0,Vg(o,f));o=o.next}while(i);Jc=!1}}function P_(){Ig()}function Ig(){Qo=Qc=!1;var n=0;gr!==0&&Q_()&&(n=gr);for(var r=vt(),i=null,o=Fo;o!==null;){var h=o.next,f=$g(o,r);f===0?(o.next=null,i===null?Fo=h:i.next=h,h===null&&(Js=i)):(i=o,(n!==0||(f&3)!==0)&&(Qo=!0)),o=h}st!==0&&st!==5||ra(n),gr!==0&&(gr=0)}function $g(n,r){for(var i=n.suspendedLanes,o=n.pingedLanes,h=n.expirationTimes,f=n.pendingLanes&-62914561;0<f;){var v=31-Nt(f),S=1<<v,C=h[v];C===-1?((S&i)===0||(S&o)!==0)&&(h[v]=hb(S,r)):C<=r&&(n.expiredLanes|=S),f&=~S}if(r=Ne,i=ve,i=Za(n,n===r?i:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),o=n.callbackNode,i===0||n===r&&(xe===2||xe===9)||n.cancelPendingCommit!==null)return o!==null&&o!==null&&_i(o),n.callbackNode=null,n.callbackPriority=0;if((i&3)===0||wi(n,i)){if(r=i&-i,r===n.callbackPriority)return r;switch(o!==null&&_i(o),hu(i)){case 2:case 8:i=hn;break;case 32:i=ys;break;case 268435456:i=Df;break;default:i=ys}return o=Gg.bind(null,n),i=tn(i,o),n.callbackPriority=r,n.callbackNode=i,r}return o!==null&&o!==null&&_i(o),n.callbackPriority=2,n.callbackNode=null,2}function Gg(n,r){if(st!==0&&st!==5)return n.callbackNode=null,n.callbackPriority=0,null;var i=n.callbackNode;if(Yo()&&n.callbackNode!==i)return null;var o=ve;return o=Za(n,n===Ne?o:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),o===0?null:(Rg(n,o,r),$g(n,vt()),n.callbackNode!=null&&n.callbackNode===i?Gg.bind(null,n):null)}function Vg(n,r){if(Yo())return null;Rg(n,r,!0)}function B_(){X_(function(){(Ae&6)!==0?tn(ht,P_):Ig()})}function Xc(){if(gr===0){var n=Ns;n===0&&(n=Qa,Qa<<=1,(Qa&261888)===0&&(Qa=256)),gr=n}return gr}function Kg(n){return n==null||typeof n=="symbol"||typeof n=="boolean"?null:typeof n=="function"?n:no(""+n)}function Yg(n,r){var i=r.ownerDocument.createElement("input");return i.name=r.name,i.value=r.value,n.id&&i.setAttribute("form",n.id),r.parentNode.insertBefore(i,r),n=new FormData(n),i.parentNode.removeChild(i),n}function H_(n,r,i,o,h){if(r==="submit"&&i&&i.stateNode===h){var f=Kg((h[Et]||null).action),v=o.submitter;v&&(r=(r=v[Et]||null)?Kg(r.formAction):v.getAttribute("formAction"),r!==null&&(f=r,v=null));var S=new ao("action","action",null,o,h);n.push({event:S,listeners:[{instance:null,listener:function(){if(o.defaultPrevented){if(gr!==0){var C=v?Yg(h,v):new FormData(h);mc(i,{pending:!0,data:C,method:h.method,action:f},null,C)}}else typeof f=="function"&&(S.preventDefault(),C=v?Yg(h,v):new FormData(h),mc(i,{pending:!0,data:C,method:h.method,action:f},f,C))},currentTarget:h}]})}}for(var Zc=0;Zc<Du.length;Zc++){var Wc=Du[Zc],q_=Wc.toLowerCase(),I_=Wc[0].toUpperCase()+Wc.slice(1);nn(q_,"on"+I_)}nn(Td,"onAnimationEnd"),nn(Rd,"onAnimationIteration"),nn(Ad,"onAnimationStart"),nn("dblclick","onDoubleClick"),nn("focusin","onFocus"),nn("focusout","onBlur"),nn(s_,"onTransitionRun"),nn(i_,"onTransitionStart"),nn(a_,"onTransitionCancel"),nn(Od,"onTransitionEnd"),Ss("onMouseEnter",["mouseout","mouseover"]),Ss("onMouseLeave",["mouseout","mouseover"]),Ss("onPointerEnter",["pointerout","pointerover"]),Ss("onPointerLeave",["pointerout","pointerover"]),Pr("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Pr("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Pr("onBeforeInput",["compositionend","keypress","textInput","paste"]),Pr("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Pr("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Pr("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var sa="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(" "),$_=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(sa));function Fg(n,r){r=(r&4)!==0;for(var i=0;i<n.length;i++){var o=n[i],h=o.event;o=o.listeners;e:{var f=void 0;if(r)for(var v=o.length-1;0<=v;v--){var S=o[v],C=S.instance,N=S.currentTarget;if(S=S.listener,C!==f&&h.isPropagationStopped())break e;f=S,h.currentTarget=N;try{f(h)}catch(H){uo(H)}h.currentTarget=null,f=C}else for(v=0;v<o.length;v++){if(S=o[v],C=S.instance,N=S.currentTarget,S=S.listener,C!==f&&h.isPropagationStopped())break e;f=S,h.currentTarget=N;try{f(h)}catch(H){uo(H)}h.currentTarget=null,f=C}}}}function ye(n,r){var i=r[fu];i===void 0&&(i=r[fu]=new Set);var o=n+"__bubble";i.has(o)||(Qg(r,n,2,!1),i.add(o))}function eh(n,r,i){var o=0;r&&(o|=4),Qg(i,n,o,r)}var Jo="_reactListening"+Math.random().toString(36).slice(2);function th(n){if(!n[Jo]){n[Jo]=!0,If.forEach(function(i){i!=="selectionchange"&&($_.has(i)||eh(i,!1,n),eh(i,!0,n))});var r=n.nodeType===9?n:n.ownerDocument;r===null||r[Jo]||(r[Jo]=!0,eh("selectionchange",!1,r))}}function Qg(n,r,i,o){switch(Ty(r)){case 2:var h=mS;break;case 8:h=vS;break;default:h=yh}i=h.bind(null,r,i,n),h=void 0,!Su||r!=="touchstart"&&r!=="touchmove"&&r!=="wheel"||(h=!0),o?h!==void 0?n.addEventListener(r,i,{capture:!0,passive:h}):n.addEventListener(r,i,!0):h!==void 0?n.addEventListener(r,i,{passive:h}):n.addEventListener(r,i,!1)}function nh(n,r,i,o,h){var f=o;if((r&1)===0&&(r&2)===0&&o!==null)e:for(;;){if(o===null)return;var v=o.tag;if(v===3||v===4){var S=o.stateNode.containerInfo;if(S===h)break;if(v===4)for(v=o.return;v!==null;){var C=v.tag;if((C===3||C===4)&&v.stateNode.containerInfo===h)return;v=v.return}for(;S!==null;){if(v=vs(S),v===null)return;if(C=v.tag,C===5||C===6||C===26||C===27){o=f=v;continue e}S=S.parentNode}}o=o.return}ed(function(){var N=f,H=bu(i),G=[];e:{var z=Cd.get(n);if(z!==void 0){var P=ao,ee=n;switch(n){case"keypress":if(so(i)===0)break e;case"keydown":case"keyup":P=Lb;break;case"focusin":ee="focus",P=Ru;break;case"focusout":ee="blur",P=Ru;break;case"beforeblur":case"afterblur":P=Ru;break;case"click":if(i.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":P=rd;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":P=Tb;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":P=Bb;break;case Td:case Rd:case Ad:P=Ob;break;case Od:P=qb;break;case"scroll":case"scrollend":P=wb;break;case"wheel":P=$b;break;case"copy":case"cut":case"paste":P=xb;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":P=id;break;case"toggle":case"beforetoggle":P=Vb}var ue=(r&4)!==0,Ue=!ue&&(n==="scroll"||n==="scrollend"),M=ue?z!==null?z+"Capture":null:z;ue=[];for(var x=N,D;x!==null;){var I=x;if(D=I.stateNode,I=I.tag,I!==5&&I!==26&&I!==27||D===null||M===null||(I=Ai(x,M),I!=null&&ue.push(ia(x,I,D))),Ue)break;x=x.return}0<ue.length&&(z=new P(z,ee,null,i,H),G.push({event:z,listeners:ue}))}}if((r&7)===0){e:{if(z=n==="mouseover"||n==="pointerover",P=n==="mouseout"||n==="pointerout",z&&i!==vu&&(ee=i.relatedTarget||i.fromElement)&&(vs(ee)||ee[ms]))break e;if((P||z)&&(z=H.window===H?H:(z=H.ownerDocument)?z.defaultView||z.parentWindow:window,P?(ee=i.relatedTarget||i.toElement,P=N,ee=ee?vs(ee):null,ee!==null&&(Ue=u(ee),ue=ee.tag,ee!==Ue||ue!==5&&ue!==27&&ue!==6)&&(ee=null)):(P=null,ee=N),P!==ee)){if(ue=rd,I="onMouseLeave",M="onMouseEnter",x="mouse",(n==="pointerout"||n==="pointerover")&&(ue=id,I="onPointerLeave",M="onPointerEnter",x="pointer"),Ue=P==null?z:Ri(P),D=ee==null?z:Ri(ee),z=new ue(I,x+"leave",P,i,H),z.target=Ue,z.relatedTarget=D,I=null,vs(H)===N&&(ue=new ue(M,x+"enter",ee,i,H),ue.target=D,ue.relatedTarget=Ue,I=ue),Ue=I,P&&ee)t:{for(ue=G_,M=P,x=ee,D=0,I=M;I;I=ue(I))D++;I=0;for(var ae=x;ae;ae=ue(ae))I++;for(;0<D-I;)M=ue(M),D--;for(;0<I-D;)x=ue(x),I--;for(;D--;){if(M===x||x!==null&&M===x.alternate){ue=M;break t}M=ue(M),x=ue(x)}ue=null}else ue=null;P!==null&&Jg(G,z,P,ue,!1),ee!==null&&Ue!==null&&Jg(G,Ue,ee,ue,!0)}}e:{if(z=N?Ri(N):window,P=z.nodeName&&z.nodeName.toLowerCase(),P==="select"||P==="input"&&z.type==="file")var we=dd;else if(hd(z))if(pd)we=t_;else{we=Wb;var ne=Zb}else P=z.nodeName,!P||P.toLowerCase()!=="input"||z.type!=="checkbox"&&z.type!=="radio"?N&&mu(N.elementType)&&(we=dd):we=e_;if(we&&(we=we(n,N))){fd(G,we,i,H);break e}ne&&ne(n,z,N),n==="focusout"&&N&&z.type==="number"&&N.memoizedProps.value!=null&&yu(z,"number",z.value)}switch(ne=N?Ri(N):window,n){case"focusin":(hd(ne)||ne.contentEditable==="true")&&(Os=ne,ju=N,Di=null);break;case"focusout":Di=ju=Os=null;break;case"mousedown":Mu=!0;break;case"contextmenu":case"mouseup":case"dragend":Mu=!1,wd(G,i,H);break;case"selectionchange":if(r_)break;case"keydown":case"keyup":wd(G,i,H)}var de;if(Ou)e:{switch(n){case"compositionstart":var be="onCompositionStart";break e;case"compositionend":be="onCompositionEnd";break e;case"compositionupdate":be="onCompositionUpdate";break e}be=void 0}else As?ud(n,i)&&(be="onCompositionEnd"):n==="keydown"&&i.keyCode===229&&(be="onCompositionStart");be&&(ad&&i.locale!=="ko"&&(As||be!=="onCompositionStart"?be==="onCompositionEnd"&&As&&(de=td()):(Wn=H,wu="value"in Wn?Wn.value:Wn.textContent,As=!0)),ne=Xo(N,be),0<ne.length&&(be=new sd(be,n,null,i,H),G.push({event:be,listeners:ne}),de?be.data=de:(de=cd(i),de!==null&&(be.data=de)))),(de=Yb?Fb(n,i):Qb(n,i))&&(be=Xo(N,"onBeforeInput"),0<be.length&&(ne=new sd("onBeforeInput","beforeinput",null,i,H),G.push({event:ne,listeners:be}),ne.data=de)),H_(G,n,N,i,H)}Fg(G,r)})}function ia(n,r,i){return{instance:n,listener:r,currentTarget:i}}function Xo(n,r){for(var i=r+"Capture",o=[];n!==null;){var h=n,f=h.stateNode;if(h=h.tag,h!==5&&h!==26&&h!==27||f===null||(h=Ai(n,i),h!=null&&o.unshift(ia(n,h,f)),h=Ai(n,r),h!=null&&o.push(ia(n,h,f))),n.tag===3)return o;n=n.return}return[]}function G_(n){if(n===null)return null;do n=n.return;while(n&&n.tag!==5&&n.tag!==27);return n||null}function Jg(n,r,i,o,h){for(var f=r._reactName,v=[];i!==null&&i!==o;){var S=i,C=S.alternate,N=S.stateNode;if(S=S.tag,C!==null&&C===o)break;S!==5&&S!==26&&S!==27||N===null||(C=N,h?(N=Ai(i,f),N!=null&&v.unshift(ia(i,N,C))):h||(N=Ai(i,f),N!=null&&v.push(ia(i,N,C)))),i=i.return}v.length!==0&&n.push({event:r,listeners:v})}var V_=/\r\n?/g,K_=/\u0000|\uFFFD/g;function Xg(n){return(typeof n=="string"?n:""+n).replace(V_,`
9`).replace(K_,"")}function Zg(n,r){return r=Xg(r),Xg(n)===r}function Me(n,r,i,o,h,f){switch(i){case"children":typeof o=="str
9ing"?r==="body"||r==="textarea"&&o===""||Es(n,o):(typeof o=="number"||typeof o=="bigint")&&r!=="body"&&Es(n,""+o);break;case"className":eo(n,"class",o);break;case"tabIndex":eo(n,"tabindex",o);break;case"dir":case"role":case"viewBox":case"width":case"height":eo(n,i,o);break;case"style":Zf(n,o,f);break;case"data":if(r!=="object"){eo(n,"data",o);break}case"src":case"href":if(o===""&&(r!=="a"||i!=="href")){n.removeAttribute(i);break}if(o==null||typeof o=="function"||typeof o=="symbol"||typeof o=="boolean"){n.removeAttribute(i);break}o=no(""+o),n.setAttribute(i,o);break;case"action":case"formAction":if(typeof o=="function"){n.setAttribute(i,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof f=="function"&&(i==="formAction"?(r!=="input"&&Me(n,r,"name",h.name,h,null),Me(n,r,"formEncType",h.formEncType,h,null),Me(n,r,"formMethod",h.formMethod,h,null),Me(n,r,"formTarget",h.formTarget,h,null)):(Me(n,r,"encType",h.encType,h,null),Me(n,r,"method",h.method,h,null),Me(n,r,"target",h.target,h,null)));if(o==null||typeof o=="symbol"||typeof o=="boolean"){n.removeAttribute(i);break}o=no(""+o),n.setAttribute(i,o);break;case"onClick":o!=null&&(n.onclick=Rn);break;case"onScroll":o!=null&&ye("scroll",n);break;case"onScrollEnd":o!=null&&ye("scrollend",n);break;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(a(61));if(i=o.__html,i!=null){if(h.children!=null)throw Error(a(60));n.innerHTML=i}}break;case"multiple":n.multiple=o&&typeof o!="function"&&typeof o!="symbol";break;case"muted":n.muted=o&&typeof o!="function"&&typeof o!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(o==null||typeof o=="function"||typeof o=="boolean"||typeof o=="symbol"){n.removeAttribute("xlink:href");break}i=no(""+o),n.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",i);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":o!=null&&typeof o!="function"&&typeof o!="symbol"?n.setAttribute(i,""+o):n.removeAttribute(i);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":o&&typeof o!="function"&&typeof o!="symbol"?n.setAttribute(i,""):n.removeAttribute(i);break;case"capture":case"download":o===!0?n.setAttribute(i,""):o!==!1&&o!=null&&typeof o!="function"&&typeof o!="symbol"?n.setAttribute(i,o):n.removeAttribute(i);break;case"cols":case"rows":case"size":case"span":o!=null&&typeof o!="function"&&typeof o!="symbol"&&!isNaN(o)&&1<=o?n.setAttribute(i,o):n.removeAttribute(i);break;case"rowSpan":case"start":o==null||typeof o=="function"||typeof o=="symbol"||isNaN(o)?n.removeAttribute(i):n.setAttribute(i,o);break;case"popover":ye("beforetoggle",n),ye("toggle",n),Wa(n,"popover",o);break;case"xlinkActuate":Tn(n,"http://www.w3.org/1999/xlink","xlink:actuate",o);break;case"xlinkArcrole":Tn(n,"http://www.w3.org/1999/xlink","xlink:arcrole",o);break;case"xlinkRole":Tn(n,"http://www.w3.org/1999/xlink","xlink:role",o);break;case"xlinkShow":Tn(n,"http://www.w3.org/1999/xlink","xlink:show",o);break;case"xlinkTitle":Tn(n,"http://www.w3.org/1999/xlink","xlink:title",o);break;case"xlinkType":Tn(n,"http://www.w3.org/1999/xlink","xlink:type",o);break;case"xmlBase":Tn(n,"http://www.w3.org/XML/1998/namespace","xml:base",o);break;case"xmlLang":Tn(n,"http://www.w3.org/XML/1998/namespace","xml:lang",o);break;case"xmlSpace":Tn(n,"http://www.w3.org/XML/1998/namespace","xml:space",o);break;case"is":Wa(n,"is",o);break;case"innerText":case"textContent":break;default:(!(2<i.length)||i[0]!=="o"&&i[0]!=="O"||i[1]!=="n"&&i[1]!=="N")&&(i=_b.get(i)||i,Wa(n,i,o))}}function rh(n,r,i,o,h,f){switch(i){case"style":Zf(n,o,f);break;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(a(61));if(i=o.__html,i!=null){if(h.children!=null)throw Error(a(60));n.innerHTML=i}}break;
vendor: 6,437 bytes, line 9
9case"children":typeof o=="string"?Es(n,o):(typeof o=="number"||typeof o=="bigint")&&Es(n,""+o);break;case"onScroll":o!=null&&ye("scroll",n);break;case"onScrollEnd":o!=null&&ye("scrollend",n);break;case"onClick":o!=null&&(n.onclick=Rn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!$f.hasOwnProperty(i))e:{if(i[0]==="o"&&i[1]==="n"&&(h=i.endsWith("Capture"),r=i.slice(2,h?i.length-7:void 0),f=n[Et]||null,f=f!=null?f[i]:null,typeof f=="function"&&n.removeEventListener(r,f,h),typeof o=="function")){typeof f!="function"&&f!==null&&(i in n?n[i]=null:n.hasAttribute(i)&&n.removeAttribute(i)),n.addEventListener(r,o,h);break e}i in n?n[i]=o:o===!0?n.setAttribute(i,""):Wa(n,i,o)}}}function yt(n,r,i){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":ye("error",n),ye("load",n);var o=!1,h=!1,f;for(f in i)if(i.hasOwnProperty(f)){var v=i[f];if(v!=null)switch(f){case"src":o=!0;break;case"srcSet":h=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(a(137,r));default:Me(n,r,f,v,i,null)}}h&&Me(n,r,"srcSet",i.srcSet,i,null),o&&Me(n,r,"src",i.src,i,null);return;case"input":ye("invalid",n);var S=f=v=h=null,C=null,N=null;for(o in i)if(i.hasOwnProperty(o)){var H=i[o];if(H!=null)switch(o){case"name":h=H;break;case"type":v=H;break;case"checked":C=H;break;case"defaultChecked":N=H;break;case"value":f=H;break;case"defaultValue":S=H;break;case"children":case"dangerouslySetInnerHTML":if(H!=null)throw Error(a(137,r));break;default:Me(n,r,o,H,i,null)}}Ff(n,f,S,C,N,v,h,!1);return;case"select":ye("invalid",n),o=v=f=null;for(h in i)if(i.hasOwnProperty(h)&&(S=i[h],S!=null))switch(h){case"value":f=S;break;case"defaultValue":v=S;break;case"multiple":o=S;default:Me(n,r,h,S,i,null)}r=f,i=v,n.multiple=!!o,r!=null?ws(n,!!o,r,!1):i!=null&&ws(n,!!o,i,!0);return;case"textarea":ye("invalid",n),f=h=o=null;for(v in i)if(i.hasOwnProperty(v)&&(S=i[v],S!=null))switch(v){case"value":o=S;break;case"defaultValue":h=S;break;case"children":f=S;break;case"dangerouslySetInnerHTML":if(S!=null)throw Error(a(91));break;default:Me(n,r,v,S,i,null)}Jf(n,o,h,f);return;case"option":for(C in i)i.hasOwnProperty(C)&&(o=i[C],o!=null)&&(C==="selected"?n.selected=o&&typeof o!="function"&&typeof o!="symbol":Me(n,r,C,o,i,null));return;case"dialog":ye("beforetoggle",n),ye("toggle",n),ye("cancel",n),ye("close",n);break;case"iframe":case"object":ye("load",n);break;case"video":case"audio":for(o=0;o<sa.length;o++)ye(sa[o],n);break;case"image":ye("error",n),ye("load",n);break;case"details":ye("toggle",n);break;case"embed":case"source":case"link":ye("error",n),ye("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(N in i)if(i.hasOwnProperty(N)&&(o=i[N],o!=null))switch(N){case"children":case"dangerouslySetInnerHTML":throw Error(a(137,r));default:Me(n,r,N,o,i,null)}return;default:if(mu(r)){for(H in i)i.hasOwnProperty(H)&&(o=i[H],o!==void 0&&rh(n,r,H,o,i,void 0));return}}for(S in i)i.hasOwnProperty(S)&&(o=i[S],o!=null&&Me(n,r,S,o,i,null))}function Y_(n,r,i,o){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var h=null,f=null,v=null,S=null,C=null,N=null,H=null;for(P in i){var G=i[P];if(i.hasOwnProperty(P)&&G!=null)switch(P){case"checked":break;case"value":break;case"defaultValue":C=G;default:o.hasOwnProperty(P)||Me(n,r,P,null,o,G)}}for(var z in o){var P=o[z];if(G=i[z],o.hasOwnProperty(z)&&(P!=null||G!=null))switch(z){case"type":f=P;break;case"name":h=P;break;case"checked":N=P;break;case"defaultChecked":H=P;break;case"value":v=P;break;case"defaultValue":S=P;break;case"children":case"dangerouslySetInnerHTML":if(P!=null)throw Error(a(137,r));break;default:P!==G&&Me(n,r,z,P,o,G)}}gu(n,v,S,C,N,H,f,h);return;case"select":P=v=S=z=null;for(f in i)if(C=i[f],i.hasOwnProperty(f)&&C!=null)switch(f){case"value":break;case"multiple":P=C;default:o.hasOwnProperty(f)||Me(n,r,f,null,o,C)}for(h in o)if(f=o[h],C=i[h],o.hasOwnProperty(h)&&(f!=null||C!=null))switch(h){case"value":z=f;break;case"defaultValue":S=f;break;case"multiple":v=f;default:f!==C&&Me(n,r,h,f,o,C)}r=S,i=v,o=P,z!=null?ws(n,!!i,z,!1):!!o!=!!i&&(r!=null?ws(n,!!i,r,!0):ws(n,!!i,i?[]:"",!1));return;case"textarea":P=z=null;for(S in i)if(h=i[S],i.hasOwnProperty(S)&&h!=null&&!o.hasOwnProperty(S))switch(S){case"value":break;case"children":break;default:Me(n,r,S,null,o,h)}for(v in o)if(h=o[v],f=i[v],o.hasOwnProperty(v)&&(h!=null||f!=null))switch(v){case"value":z=h;break;case"defaultValue":P=h;break;case"children":break;case"dangerouslySetInnerHTML":if(h!=null)throw Error(a(91));break;default:h!==f&&Me(n,r,v,h,o,f)}Qf(n,z,P);return;case"option":for(var ee in i)z=i[ee],i.hasOwnProperty(ee)&&z!=null&&!o.hasOwnProperty(ee)&&(ee==="selected"?n.selected=!1:Me(n,r,ee,null,o,z));for(C in o)z=o[C],P=i[C],o.hasOwnProperty(C)&&z!==P&&(z!=null||P!=null)&&(C==="selected"?n.selected=z&&typeof z!="function"&&typeof z!="symbol":Me(n,r,C,z,o,P));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var ue in i)z=i[ue],i.hasOwnProperty(ue)&&z!=null&&!o.hasOwnProperty(ue)&&Me(n,r,ue,null,o,z);for(N in o)if(z=o[N],P=i[N],o.hasOwnProperty(N)&&z!==P&&(z!=null||P!=null))switch(N){case"children":case"dangerouslySetInnerHTML":if(z!=null)throw Error(a(137,r));break;default:Me(n,r,N,z,o,P)}return;default:if(mu(r)){for(var Ue in i)z=i[Ue],i.hasOwnProperty(Ue)&&z!==void 0&&!o.hasOwnProperty(Ue)&&rh(n,r,Ue,void 0,o,z);for(H in o)z=o[H],P=i[H],!o.hasOwnProperty(H)||z===P||z===void 0&&P===void 0||rh(n,r,H,z,o,P);return}}for(var M in i)z=i[M],i.hasOwnProperty(M)&&z!=null&&!o.hasOwnProperty(M)&&Me(n,r,M,null,o,z);for(G in o)z=o[G],P=i[G],!o.hasOwnProperty(G)||z===P||z==null&&P==null||Me(n,r,G,z,o,P)}function Wg(n){switch(n){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function F_(){if(typeof performance.getEntriesByType=="function"){for(var n=0,r=0,i=performance.getEntriesByType("resource"),o=0;o<i.length;o++){var h=i[o],f=h.transferSize,v=h.initiatorType,S=h.duration;if(f&&S&&Wg(v)){for(v=0,S=h.responseEnd,o+=1;o<i.length;o++){var C=i[o],N=C.startTime;if(N>S)break;var H=C.transferSize,G=C.initiatorType;
vendor: 8,773 bytes, line 9
9H&&Wg(G)&&(C=C.responseEnd,v+=H*(C<S?1:(S-N)/(C-N)))}if(--o,r+=8*(f+v)/(h.duration/1e3),n++,10<n)break}}if(0<n)return r/n/1e6}return navigator.connection&&(n=navigator.connection.downlink,typeof n=="number")?n:5}var sh=null,ih=null;function Zo(n){return n.nodeType===9?n:n.ownerDocument}function ey(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 ty(n,r){if(n===0)switch(r){case"svg":return 1;case"math":return 2;default:return 0}return n===1&&r==="foreignObject"?0:n}function ah(n,r){return n==="textarea"||n==="noscript"||typeof r.children=="string"||typeof r.children=="number"||typeof r.children=="bigint"||typeof r.dangerouslySetInnerHTML=="object"&&r.dangerouslySetInnerHTML!==null&&r.dangerouslySetInnerHTML.__html!=null}var oh=null;function Q_(){var n=window.event;return n&&n.type==="popstate"?n===oh?!1:(oh=n,!0):(oh=null,!1)}var ny=typeof setTimeout=="function"?setTimeout:void 0,J_=typeof clearTimeout=="function"?clearTimeout:void 0,ry=typeof Promise=="function"?Promise:void 0,X_=typeof queueMicrotask=="function"?queueMicrotask:typeof ry<"u"?function(n){return ry.resolve(null).then(n).catch(Z_)}:ny;function Z_(n){setTimeout(function(){throw n})}function yr(n){return n==="head"}function sy(n,r){var i=r,o=0;do{var h=i.nextSibling;if(n.removeChild(i),h&&h.nodeType===8)if(i=h.data,i==="/$"||i==="/&"){if(o===0){n.removeChild(h),ei(r);return}o--}else if(i==="$"||i==="$?"||i==="$~"||i==="$!"||i==="&")o++;else if(i==="html")aa(n.ownerDocument.documentElement);else if(i==="head"){i=n.ownerDocument.head,aa(i);for(var f=i.firstChild;f;){var v=f.nextSibling,S=f.nodeName;f[Ti]||S==="SCRIPT"||S==="STYLE"||S==="LINK"&&f.rel.toLowerCase()==="stylesheet"||i.removeChild(f),f=v}}else i==="body"&&aa(n.ownerDocument.body);i=h}while(i);ei(r)}function iy(n,r){var i=n;n=0;do{var o=i.nextSibling;if(i.nodeType===1?r?(i._stashedDisplay=i.style.display,i.style.display="none"):(i.style.display=i._stashedDisplay||"",i.getAttribute("style")===""&&i.removeAttribute("style")):i.nodeType===3&&(r?(i._stashedText=i.nodeValue,i.nodeValue=""):i.nodeValue=i._stashedText||""),o&&o.nodeType===8)if(i=o.data,i==="/$"){if(n===0)break;n--}else i!=="$"&&i!=="$?"&&i!=="$~"&&i!=="$!"||n++;i=o}while(i)}function lh(n){var r=n.firstChild;for(r&&r.nodeType===10&&(r=r.nextSibling);r;){var i=r;switch(r=r.nextSibling,i.nodeName){case"HTML":case"HEAD":case"BODY":lh(i),du(i);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(i.rel.toLowerCase()==="stylesheet")continue}n.removeChild(i)}}function W_(n,r,i,o){for(;n.nodeType===1;){var h=i;if(n.nodeName.toLowerCase()!==r.toLowerCase()){if(!o&&(n.nodeName!=="INPUT"||n.type!=="hidden"))break}else if(o){if(!n[Ti])switch(r){case"meta":if(!n.hasAttribute("itemprop"))break;return n;case"link":if(f=n.getAttribute("rel"),f==="stylesheet"&&n.hasAttribute("data-precedence"))break;if(f!==h.rel||n.getAttribute("href")!==(h.href==null||h.href===""?null:h.href)||n.getAttribute("crossorigin")!==(h.crossOrigin==null?null:h.crossOrigin)||n.getAttribute("title")!==(h.title==null?null:h.title))break;return n;case"style":if(n.hasAttribute("data-precedence"))break;return n;case"script":if(f=n.getAttribute("src"),(f!==(h.src==null?null:h.src)||n.getAttribute("type")!==(h.type==null?null:h.type)||n.getAttribute("crossorigin")!==(h.crossOrigin==null?null:h.crossOrigin))&&f&&n.hasAttribute("async")&&!n.hasAttribute("itemprop"))break;return n;default:return n}}else if(r==="input"&&n.type==="hidden"){var f=h.name==null?null:""+h.name;if(h.type==="hidden"&&n.getAttribute("name")===f)return n}else return n;if(n=Zt(n.nextSibling),n===null)break}return null}function eS(n,r,i){if(r==="")return null;for(;n.nodeType!==3;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!i||(n=Zt(n.nextSibling),n===null))return null;return n}function ay(n,r){for(;n.nodeType!==8;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!r||(n=Zt(n.nextSibling),n===null))return null;return n}function uh(n){return n.data==="$?"||n.data==="$~"}function ch(n){return n.data==="$!"||n.data==="$?"&&n.ownerDocument.readyState!=="loading"}function tS(n,r){var i=n.ownerDocument;if(n.data==="$~")n._reactRetry=r;else if(n.data!=="$?"||i.readyState!=="loading")r();else{var o=function(){r(),i.removeEventListener("DOMContentLoaded",o)};i.addEventListener("DOMContentLoaded",o),n._reactRetry=o}}function Zt(n){for(;n!=null;n=n.nextSibling){var r=n.nodeType;if(r===1||r===3)break;if(r===8){if(r=n.data,r==="$"||r==="$!"||r==="$?"||r==="$~"||r==="&"||r==="F!"||r==="F")break;if(r==="/$"||r==="/&")return null}}return n}var hh=null;function oy(n){n=n.nextSibling;for(var r=0;n;){if(n.nodeType===8){var i=n.data;if(i==="/$"||i==="/&"){if(r===0)return Zt(n.nextSibling);r--}else i!=="$"&&i!=="$!"&&i!=="$?"&&i!=="$~"&&i!=="&"||r++}n=n.nextSibling}return null}function ly(n){n=n.previousSibling;for(var r=0;n;){if(n.nodeType===8){var i=n.data;if(i==="$"||i==="$!"||i==="$?"||i==="$~"||i==="&"){if(r===0)return n;r--}else i!=="/$"&&i!=="/&"||r++}n=n.previousSibling}return null}function uy(n,r,i){switch(r=Zo(i),n){case"html":if(n=r.documentElement,!n)throw Error(a(452));return n;case"head":if(n=r.head,!n)throw Error(a(453));return n;case"body":if(n=r.body,!n)throw Error(a(454));return n;default:throw Error(a(451))}}function aa(n){for(var r=n.attributes;r.length;)n.removeAttributeNode(r[0]);du(n)}var Wt=new Map,cy=new Set;function Wo(n){return typeof n.getRootNode=="function"?n.getRootNode():n.nodeType===9?n:n.ownerDocument}var qn=F.d;F.d={f:nS,r:rS,D:sS,C:iS,L:aS,m:oS,X:uS,S:lS,M:cS};function nS(){var n=qn.f(),r=Go();return n||r}function rS(n){var r=bs(n);r!==null&&r.tag===5&&r.type==="form"?Op(r):qn.r(n)}var Xs=typeof document>"u"?null:document;function hy(n,r,i){var o=Xs;if(o&&typeof r=="string"&&r){var h=Vt(r);h='link[rel="'+n+'"][href="'+h+'"]',typeof i=="string"&&(h+='[crossorigin="'+i+'"]'),cy.has(h)||(cy.add(h),n={rel:n,crossOrigin:i,href:r},o.querySelector(h)===null&&(r=o.createElement("link"),yt(r,"link",n),ot(r),o.head.appendChild(r)))}}function sS(n){qn.D(n),hy("dns-prefetch",n,null)}function iS(n,r){qn.C(n,r),hy("preconnect",n,r)}function aS(n,r,i){qn.L(n,r,i);var o=Xs;if(o&&n&&r){var h='link[rel="preload"][as="'+Vt(r)+'"]';r==="image"&&i&&i.imageSrcSet?(h+='[imagesrcset="'+Vt(i.imageSrcSet)+'"]',typeof i.imageSizes=="string"&&(h+='[imagesizes="'+Vt(i.imageSizes)+'"]')):h+='[href="'+Vt(n)+'"]';var f=h;switch(r){case"style":f=Zs(n);break;case"script":f=Ws(n)}Wt.has(f)||(n=y({rel:"preload",href:r==="image"&&i&&i.imageSrcSet?void 0:n,as:r},i),Wt.set(f,n),o.querySelector(h)!==null||r==="style"&&o.querySelector(oa(f))||r==="script"&&o.querySelector(la(f))||(r=o.createElement("link"),yt(r,"link",n),ot(r),o.head.appendChild(r)))}}function oS(n,r){qn.m(n,r);var i=Xs;if(i&&n){var o=r&&typeof r.as=="string"?r.as:"script",h='link[rel="modulepreload"][as="'+Vt(o)+'"][href="'+Vt(n)+'"]',f=h;switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":f=Ws(n)}if(!Wt.has(f)&&(n=y({rel:"modulepreload",href:n},r),Wt.set(f,n),i.querySelector(h)===null)){switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(i.querySelector(la(f)))return}o=i.createElement("link"),yt(o,"link",n),ot(o),i.head.appendChild(o)}}}function lS(n,r,i){qn.S(n,r,i);var o=Xs;if(o&&n){var h=_s(o).hoistableStyles,f=Zs(n);r=r||"default";var v=h.get(f);if(!v){var S={loading:0,preload:null};if(v=o.querySelector(oa(f)))S.loading=5;else{n=y({rel:"stylesheet",href:n,"data-precedence":r},i),(i=Wt.get(f))&&fh(n,i);var C=v=o.createElement("link");ot(C),yt(C,"link",n),C._p=new Promise(function(N,H){C.onload=N,C.onerror=H}),C.addEventListener("load",function(){S.loading|=1}),C.addEventListener("error",function(){S.loading|=2}),S.loading|=4,el(v,r,o)}v={type:"stylesheet",instance:v,count:1,state:S},h.set(f,v)}}}function uS(n,r){qn.X(n,r);var i=Xs;if(i&&n){var o=_s(i).hoistableScripts,h=Ws(n),f=o.get(h);f||(f=i.querySelector(la(h)),f||(n=y({src:n,async:!0},r),(r=Wt.get(h))&&dh(n,r),f=i.createElement("script"),ot(f),yt(f,"link",n),i.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},o.set(h,f))}}function cS(n,r){qn.M(n,r);var i=Xs;if(i&&n){var o=_s(i).hoistableScripts,h=Ws(n),f=o.get(h);f||(f=i.querySelector(la(h)),f||(n=y({src:n,async:!0,type:"module"},r),(r=Wt.get(h))&&dh(n,r),f=i.createElement("script"),ot(f),yt(f,"link",n),i.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},o.set(h,f))}}function fy(n,r,i,o){var h=(h=pe.current)?Wo(h):null;if(!h)throw Error(a(446));switch(n){case"meta":case"title":return null;case"style":return typeof i.precedence=="string"&&typeof i.href=="string"?(r=Zs(i.href),i=_s(
vendor: 4,604 bytes, line 9
9h).hoistableStyles,o=i.get(r),o||(o={type:"style",instance:null,count:0,state:null},i.set(r,o)),o):{type:"void",instance:null,count:0,state:null};case"link":if(i.rel==="stylesheet"&&typeof i.href=="string"&&typeof i.precedence=="string"){n=Zs(i.href);var f=_s(h).hoistableStyles,v=f.get(n);if(v||(h=h.ownerDocument||h,v={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},f.set(n,v),(f=h.querySelector(oa(n)))&&!f._p&&(v.instance=f,v.state.loading=5),Wt.has(n)||(i={rel:"preload",as:"style",href:i.href,crossOrigin:i.crossOrigin,integrity:i.integrity,media:i.media,hrefLang:i.hrefLang,referrerPolicy:i.referrerPolicy},Wt.set(n,i),f||hS(h,n,i,v.state))),r&&o===null)throw Error(a(528,""));return v}if(r&&o!==null)throw Error(a(529,""));return null;case"script":return r=i.async,i=i.src,typeof i=="string"&&r&&typeof r!="function"&&typeof r!="symbol"?(r=Ws(i),i=_s(h).hoistableScripts,o=i.get(r),o||(o={type:"script",instance:null,count:0,state:null},i.set(r,o)),o):{type:"void",instance:null,count:0,state:null};default:throw Error(a(444,n))}}function Zs(n){return'href="'+Vt(n)+'"'}function oa(n){return'link[rel="stylesheet"]['+n+"]"}function dy(n){return y({},n,{"data-precedence":n.precedence,precedence:null})}function hS(n,r,i,o){n.querySelector('link[rel="preload"][as="style"]['+r+"]")?o.loading=1:(r=n.createElement("link"),o.preload=r,r.addEventListener("load",function(){return o.loading|=1}),r.addEventListener("error",function(){return o.loading|=2}),yt(r,"link",i),ot(r),n.head.appendChild(r))}function Ws(n){return'[src="'+Vt(n)+'"]'}function la(n){return"script[async]"+n}function py(n,r,i){if(r.count++,r.instance===null)switch(r.type){case"style":var o=n.querySelector('style[data-href~="'+Vt(i.href)+'"]');if(o)return r.instance=o,ot(o),o;var h=y({},i,{"data-href":i.href,"data-precedence":i.precedence,href:null,precedence:null});return o=(n.ownerDocument||n).createElement("style"),ot(o),yt(o,"style",h),el(o,i.precedence,n),r.instance=o;case"stylesheet":h=Zs(i.href);var f=n.querySelector(oa(h));if(f)return r.state.loading|=4,r.instance=f,ot(f),f;o=dy(i),(h=Wt.get(h))&&fh(o,h),f=(n.ownerDocument||n).createElement("link"),ot(f);var v=f;return v._p=new Promise(function(S,C){v.onload=S,v.onerror=C}),yt(f,"link",o),r.state.loading|=4,el(f,i.precedence,n),r.instance=f;case"script":return f=Ws(i.src),(h=n.querySelector(la(f)))?(r.instance=h,ot(h),h):(o=i,(h=Wt.get(f))&&(o=y({},i),dh(o,h)),n=n.ownerDocument||n,h=n.createElement("script"),ot(h),yt(h,"link",o),n.head.appendChild(h),r.instance=h);case"void":return null;default:throw Error(a(443,r.type))}else r.type==="stylesheet"&&(r.state.loading&4)===0&&(o=r.instance,r.state.loading|=4,el(o,i.precedence,n));return r.instance}function el(n,r,i){for(var o=i.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),h=o.length?o[o.length-1]:null,f=h,v=0;v<o.length;v++){var S=o[v];if(S.dataset.precedence===r)f=S;else if(f!==h)break}f?f.parentNode.insertBefore(n,f.nextSibling):(r=i.nodeType===9?i.head:i,r.insertBefore(n,r.firstChild))}function fh(n,r){n.crossOrigin==null&&(n.crossOrigin=r.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=r.referrerPolicy),n.title==null&&(n.title=r.title)}function dh(n,r){n.crossOrigin==null&&(n.crossOrigin=r.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=r.referrerPolicy),n.integrity==null&&(n.integrity=r.integrity)}var tl=null;function gy(n,r,i){if(tl===null){var o=new Map,h=tl=new Map;h.set(i,o)}else h=tl,o=h.get(i),o||(o=new Map,h.set(i,o));if(o.has(n))return o;for(o.set(n,null),i=i.getElementsByTagName(n),h=0;h<i.length;h++){var f=i[h];if(!(f[Ti]||f[ft]||n==="link"&&f.getAttribute("rel")==="stylesheet")&&f.namespaceURI!=="http://www.w3.org/2000/svg"){var v=f.getAttribute(r)||"";v=n+v;var S=o.get(v);S?S.push(f):o.set(v,[f])}}return o}function yy(n,r,i){n=n.ownerDocument||n,n.head.insertBefore(i,r==="title"?n.querySelector("head > title"):null)}function fS(n,r,i){if(i===1||r.itemProp!=null)return!1;switch(n){case"meta":case"title":return!0;case"style":if(typeof r.precedence!="string"||typeof r.href!="string"||r.href==="")break;return!0;case"link":if(typeof r.rel!="string"||typeof r.href!="string"||r.href===""||r.onLoad||r.onError)break;return r.rel==="stylesheet"?(n=r.disabled,typeof r.precedence=="string"&&n==null):!0;case"script":if(r.async&&typeof r.async!="function"&&typeof r.async!="symbol"&&!r.onLoad&&!r.onError&&r.src&&typeof r.src=="string")return!0}return!1}function my(n){return!(n.type==="stylesheet"&&(n.state.loading&3)===0)}function dS(n,r,i,o){if(i.type==="stylesheet"&&(typeof o.media!="str
9ing"||matchMedia(o.media).matches!==!1)&&(i.state.loading&4)===0){if(i.instance===null){var h=Zs(o.href),f=r.querySelector(oa(h));if(f){r=f._p,r!==null&&typeof r=="object"&&typeof r.then=="function"&&(n.count++,n=nl.bind(n),r.then(n,n)),i.state.loading|=4,i.instance=f,ot(f);return}f=r.ownerDocument||r,o=dy(o),(h=Wt.get(h))&&fh(o,h),f=f.createElement("link"),ot(f);var v=f;v._p=new Promise(function(S,C){v.onload=S,v.onerror=C}),yt(f,"link",o),i.instance=f}n.stylesheets===null&&(n.stylesheets=new Map),n.stylesheets.set(i,r),(r=i.state.preload)&&(i.state.loading&3)===0&&(n.count++,i=nl.bind(n),r.addEventListener("load",i),r.addEventListener("error",i))}}var ph=0;function pS(n,r){return n.stylesheets&&n.count===0&&sl(n,n.stylesheets),0<n.count||0<n.imgCount?function(i){var o=setTimeout(function(){if(n.stylesheets&&sl(n,n.stylesheets),n.unsuspend){var f=n.unsuspend;n.unsuspend=null,f()}},6e4+r);0<n.imgBytes&&ph===0&&(ph=62500*F_());var h=setTimeout(function(){if(n.waitingForImages=!1,n.count===0&&(n.stylesheets&&sl(n,n.stylesheets),n.unsuspend)){var f=n.unsuspend;n.unsuspend=null,f()}},(n.imgBytes>ph?50:800)+r);return n.unsuspend=i,function(){n.unsuspend=null,clearTimeout(o),clearTimeout(h)}}:null}function nl(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)sl(this,this.stylesheets);else if(this.unsuspend){var n=this.unsuspend;this.unsuspend=null,n()}}}var rl=null;function sl(n,r){n.stylesheets=null,n.unsuspend!==null&&(n.count++,rl=new Map,r.forEach(gS,n),rl=null,nl.call(n))}function gS(n,r){if(!(r.state.loading&4)){var i=rl.get(n);if(i)var o=i.get(null);else{i=new Map,rl.set(n,i);for(var h=n.querySelectorAll("link[data-precedence],style[data-precedence]"),f=0;f<h.length;f++){var v=h[f];(v.nodeName==="LINK"||v.getAttribute("media")!=="not all")&&(i.set(v.dataset.precedence,v),o=v)}o&&i.set(null,o)}h=r.instance,v=h.getAttribute("data-precedence"),f=i.get(v)||o,f===o&&i.set(null,h),i.set(v,h),this.count++,o=nl.bind(this),h.addEventListener("load",o),h.addEventListener("error",o),f?f.parentNode.insertBefore(h,f.nextSibling):(n=n.nodeType===9?n.head:n,n.insertBefore(h,n.firstChild)),r.state.loading|=4}}var ua={$$typeof:j,Provider:null,Consumer:null,_currentValue:oe,_currentValue2:oe,_threadCount:0};function yS(n,r,i,o,h,f,v,S,C){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=uu(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=uu(0),this.hiddenUpdates=uu(null),this.identifierPrefix=o,this.onUncaughtError=h,this.onCaughtError=f,this.onRecoverableError=v,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=C,this.incompleteTransitions=new Map}function vy(n,r,i,o,h,f,v,S,C,N,H,G){return n=new yS(n,r,i,v,C,N,H,G,S),r=1,f===!0&&(r|=24),f=zt(3,null,null,r),n.current=f,f.stateNode=n,r=Yu(),r.refCount++,n.pooledCache=r,r.refCount++,f.memoizedState={element:o,isDehydrated:i,cache:r},Xu(f),n}function by(n){return n?(n=ks,n):ks}function _y(n,r,i,o,h,f){h=by(h),o.context===null?o.context=h:o.pendingContext=h,o=ir(r),o.payload={element:i},f=f===void 0?null:f,f!==null&&(o.callback=f),i=ar(n,o,r),i!==null&&(xt(i,n,r),qi(i,n,r))}function Sy(n,r){if(n=n.memoizedState,n!==null&&n.dehydrated!==null){var i=n.retryLane;n.retryLane=i!==0&&i<r?i:r}}function gh(n,r){Sy(n,r),(n=n.alternate)&&Sy(n,r)}function wy(n){if(n.tag===13||n.tag===31){var r=Ir(n,67108864);r!==null&&xt(r,n,67108864),gh(n,67108864)}}function Ey(n){if(n.tag===13||n.tag===31){var r=It();r=cu(r);var i=Ir(n,r);i!==null&&xt(i,n,r),gh(n,r)}}var il=!0;function mS(n,r,i,o){var h=B.T;B.T=null;var f=F.p;try{F.p=2,yh(n,r,i,o)}finally{F.p=f,B.T=h}}function vS(n,r,i,o){var h=B.T;B.T=null;var f=F.p;try{F.p=8,yh(n,r,i,o)}finally{F.p=f,B.T=h}}function yh(n,r,i,o){if(il){var h=mh(o);if(h===null)nh(n,r,o,al,i),Ry(n,o);else if(_S(h,n,r,i,o))o.stopPropagation();else if(Ry(n,o),r&4&&-1<bS.indexOf(n)){for(;h!==null;){var f=bs(h);if(f!==null)switch(f.tag){case 3:if(f=f.stateNode,f.current.memoizedState.isDehydrated){var v=zr(f.pen
vendor: 4,109 bytes, line 9
9dingLanes);if(v!==0){var S=f;for(S.pendingLanes|=2,S.entangledLanes|=2;v;){var C=1<<31-Nt(v);S.entanglements[1]|=C,v&=~C}gn(f),(Ae&6)===0&&(Io=vt()+500,ra(0))}}break;case 31:case 13:S=Ir(f,2),S!==null&&xt(S,f,2),Go(),gh(f,2)}if(f=mh(o),f===null&&nh(n,r,o,al,i),f===h)break;h=f}h!==null&&o.stopPropagation()}else nh(n,r,o,null,i)}}function mh(n){return n=bu(n),vh(n)}var al=null;function vh(n){if(al=null,n=vs(n),n!==null){var r=u(n);if(r===null)n=null;else{var i=r.tag;if(i===13){if(n=c(r),n!==null)return n;n=null}else if(i===31){if(n=d(r),n!==null)return n;n=null}else if(i===3){if(r.stateNode.current.memoizedState.isDehydrated)return r.tag===3?r.stateNode.containerInfo:null;n=null}else r!==n&&(n=null)}}return al=n,null}function Ty(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(ze()){case ht:return 2;case hn:return 8;case ys:case ib:return 32;case Df:return 268435456;default:return 32}default:return 32}}var bh=!1,mr=null,vr=null,br=null,ca=new Map,ha=new Map,_r=[],bS="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 Ry(n,r){switch(n){case"focusin":case"focusout":mr=null;break;case"dragenter":case"dragleave":vr=null;break;case"mouseover":case"mouseout":br=null;break;case"pointerover":case"pointerout":ca.delete(r.pointerId);break;case"gotpointercapture":case"lostpointercapture":ha.delete(r.pointerId)}}function fa(n,r,i,o,h,f){return n===null||n.nativeEvent!==f?(n={blockedOn:r,domEventName:i,eventSystemFlags:o,nativeEvent:f,targetContainers:[h]},r!==null&&(r=bs(r),r!==null&&wy(r)),n):(n.eventSystemFlags|=o,r=n.targetContainers,h!==null&&r.indexOf(h)===-1&&r.push(h),n)}function _S(n,r,i,o,h){switch(r){case"focusin":return mr=fa(mr,n,r,i,o,h),!0;case"dragenter":return vr=fa(vr,n,r,i,o,h),!0;case"mouseover":return br=fa(br,n,r,i,o,h),!0;case"pointerover":var f=h.pointerId;return ca.set(f,fa(ca.get(f)||null,n,r,i,o,h)),!0;case"gotpointercapture":return f=h.pointerId,ha.set(f,fa(ha.get(f)||null,n,r,i,o,h)),!0}return!1}function Ay(n){var r=vs(n.target);if(r!==null){var i=u(r);if(i!==null){if(r=i.tag,r===13){if(r=c(i),r!==null){n.blockedOn=r,Hf(n.priority,function(){Ey(i)});return}}else if(r===31){if(r=d(i),r!==null){n.blockedOn=r,Hf(n.priority,function(){Ey(i)});return}}else if(r===3&&i.stateNode.current.memoizedState.isDehydrated){n.blockedOn=i.tag===3?i.stateNode.containerInfo:null;return}}}n.blockedOn=null}function ol(n){if(n.blockedOn!==null)return!1;for(var r=n.targetContainers;0<r.length;){var i=mh(n.nativeEvent);if(i===null){i=n.nativeEvent;var o=new i.constructor(i.type,i);vu=o,i.target.dispatchEvent(o),vu=null}else return r=bs(i),r!==null&&wy(r),n.blockedOn=i,!1;r.shift()}return!0}function Oy(n,r,i){ol(n)&&i.delete(r)}function SS(){bh=!1,mr!==null&&ol(mr)&&(mr=null),vr!==null&&ol(vr)&&(vr=null),br!==null&&ol(br)&&(br=null),ca.forEach(Oy),ha.forEac
9h(Oy)}function ll(n,r){n.blockedOn===r&&(n.blockedOn=null,bh||(bh=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,SS)))}var ul=null;function Cy(n){ul!==n&&(ul=n,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){ul===n&&(ul=null);for(var r=0;r<n.length;r+=3){var i=n[r],o=n[r+1],h=n[r+2];if(typeof o!="function"){if(vh(o||i)===null)continue;break}var f=bs(i);f!==null&&(n.splice(r,3),r-=3,mc(f,{pending:!0,data:h,method:i.method,action:o},o,h))}}))}function ei(n){function r(C){return ll(C,n)}mr!==null&&ll(mr,n),vr!==null&&ll(vr,n),br!==null&&ll(br,n),ca.forEach(r),ha.forEach(r);for(var i=0;i<_r.length;i++){var o=_r[i];o.blockedOn===n&&(o.blockedOn=null)}for(;0<_r.length&&(i=_r[0],i.blockedOn===null);)Ay(i),i.blockedOn===null&&_r.shift();if(i=(n.ownerDocument||n).$$reactFormReplay,i!=null)for(o=0;o<i.length;o+=3){var h=i[o],f=i[o+1],v=h[Et]||null;if(typeof f=="function")v||Cy(i);else if(v){var S=null;if(f&&f.hasAttribute("formAction")){if(h=f,v=f[Et]||null)S=v.formAction;else if(vh(h)!==null)continue}else S=v.action;typeof S=="function"?i[o+1]=S:(i.splice(o,3),o-=3),Cy(i)}}}function xy(){function n(f){f.canIntercept&&f.info==="react-transition"&&f.intercept({handler:function(){return new Promise(function(v){return h=v})},focusReset:"manual",scroll:"manual"})}function r(){h!==null&&(h(),h=null),o||setTimeout(i,20)}function i(){if(!o&&!navigation.transition){var f=navigation.currentEntry;f&&f.url!=null&&navigation.navigate(f.url,{state:f.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var o=!1,h=null;return navigation.addEventListener("navigate",n),navigation.addEventListener("navigatesuccess",r),navigation.addEventListener("navigateerror",r),setTimeout(i,100),function(){o=!0,navigation.removeEventListener("navigate",n),navigation.removeEventListener("navigatesuccess",r),navigation.removeEventListener("navigateerror",r),h!==null&&(h(),h=null)}}}function _h(n){this._internalRoot=n}cl.prototype.render=_h.prototype.render=function(n){var r=this._internalRoot;if(r===null)throw Error(a(409));var i=r.current,o=It();_y(i,o,n,r,null,null)},cl.prototype.unmount=_h.prototype.unmount=function(){var n=this._internalRoot;if(n!==null){this._internalRoot=null;var r=n.containerInfo;_y(n.current,2,null,n,null,null),Go(),r[ms]=null}};function cl(n){this._internalRoot=n}cl.prototype.unstable_scheduleHydration=function(n){if(n){var r=Bf();n={blockedOn:null,target:n,priority:r};for(var i=0;i<_r.length&&r!==0&&r<_r[i].priority;i++);_r.splice(i,0,n),i===0&&Ay(n)}};var ky=t.version;if(ky!=="19.2.5")throw Error(a(527,ky,"19.2.5"));F.findDOMNode=function(n){var r=n._reactInternals;if(r===void 0)throw typeof n.render=="function"?Error(a(188)):(n=Object.keys(n).join(","),Error(a(268,n)));return n=g(r),n=n!==null?m(n):null,n=n===null?null:n.stateNode,n};var wS={bundleType:0,version:"19.2.5",rendererPackageName:"react-dom",currentDispatcherRef:B,reconcilerVersion:"19.2.5"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var hl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!hl.isDisabled&&hl.supportsFiber)try{Si=hl.inject(wS),Dt=hl}catch{}}return pa.createRoot=function(n,r){if(!l(n))throw Error(a(299));var i=!1,o="",h=zp,f=Pp,v=Bp;return r!=null&&(r.unstable_strictMode===!0&&(i=!0),r.identifierPrefix!==void 0&&(o=r.identifierPrefix),r.onUncaughtError!==void 0&&(h=r.onUncaughtError),r.onCaughtError!==void 0&&(f=r.onCaughtError),r.onRecoverableError!==void 0&&(v=r.onRecoverableError)),r=vy(n,1,!1,null,null,i,o,null,h,f,v,xy),n[ms]=r.current,th(n),new _h(r)},pa.hydrateRoot=function(n,r,i){if(!l(n))throw Error(a(299));var o=!1,h="",f=zp,v=Pp,S=Bp,C=null;return i!=null&&(i.unstable_strictMode===!0&&(o=!0),i.identifierPrefix!==void 0&&(h=i.identifierPrefix),i.onUncaughtError!==void 0&&(f=i.onUncaughtError),i.onCaughtError!==void 0&&(v=i.onCaughtError),i.onRecoverableError!==void 0&&(S=i.onRecoverableError),i.formState!==void 0&&(C=i.formState)),r=vy(n,1,!0,r,i??null,o,h,C,f,v,S,xy),r.context=by(null),i=r.current,o=It(),o=cu(o),h=ir(o),h.callback=null,ar(i,h,o),i=o,r.current.lanes=i,Ei(r,i),gn(r),n[ms]=r.current,th(n),new cl(r)},pa.version="19.2.5",pa}var Hy;function MS(){if(Hy)return Eh.exports;Hy=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Eh.exports=jS(),Eh.exports}var US=MS(),DS="__TSS_CONTEXT",Qh=Symbol.for("TSS_SERVER_FUNCTION"),NS="application/x-tss-framed",In={JSON:0,CHUNK:1,END:2,ERROR:3},LS=/;\s*v=(\d+)/;function zS(e){const t=e.match(LS);return t?parseInt(t[1],10):void 0}function PS(e){const t=zS(e);if(t!==void 0&&t!==1)throw new Error(`Incompatible framed protocol version: server=${t}, client=1. Please ensure client and server are using compatible versions.`)}var mv=()=>window.__TSS_START_OPTIONS__,vv=!1;function ka(e){return e[e.length-1]}function BS(e){return typeof e=="function"}function Or(e,t){return BS(e)?e(t):e}var HS=Object.prototype.hasOwnProperty,qy=Object.prototype.propertyIsEnumerable,qS=()=>Object.create(null),ts=(e,t)=>is(e,t,qS);function is(e,t,s=()=>({}),a=0){if(e===t)return e;if(a>500)return t;const l=t,u=Gy(e)&&Gy(l);if(!u&&!(yi(e)&&yi(l)))return l;const c=u?e:Iy(e);if(!c)return l;const d=u?l:Iy(l);if(!d)return l;const p=c.length,g=d.length,m=u?new Array(g):s();let y=0;for(let b=0;b<g;b++){const _=u?b:d[b],w=e[_],A=l[_];if(w===A){m[_]=w,(u?b<p:HS.call(e,_))&&y++;continue}if(w===null||A===null||typeof w!="object"||typeof A!="object"){m[_]=A;continue}const R=is(w,A,s,a+1);m[_]=R,R===w&&y++}return p===g&&y===p?e:m}function Iy(e){const t=Object.getOwnPropertyNames(e);for(const l of t)if(!qy.call(e,l))return!1;const s=Object.getOwnPropertySymbols(e);if(s.length===0)return t;const a=t;for(const l of s){if(!qy.call(e,l))return!1;a.push(l)}return a}function yi(e){if(!$y(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const s=t.prototype;return!(!$y(s)||!s.hasOwnProperty("isPrototypeOf"))}function $y(e){return Object.prototype.toString.call(e)==="[object Object]"}function Gy(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function jt(e,t,s){if(e===t)return!0;
9if(typeof e!=typeof t)return!1;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let a=0,l=e.length;a<l;a++)if(!jt(e[a],t[a],s))return!1;return!0}if(yi(e)&&yi(t)){const a=s?.ignoreUndefined??!0;if(s?.partial){for(const c in t)if((!a||t[c]!==void 0)&&!jt(e[c],t[c],s))return!1;return!0}let l=0;if(!a)l=Object.keys(e).length;else for(const c in e)e[c]!==void 0&&l++;let u=0;for(const c in t)if((!a||t[c]!==void 0)&&(u++,u>l||!jt(e[c],t[c],s)))return!1;return l===u}return!1}function fs(e){let t,s;const a=new Promise((l,u)=>{t=l,s=u});return a.status="pending",a.resolve=l=>{a.status="resolved",a.value=l,t(l),e?.(l)},a.reject=l=>{a.status="rejected",s(l)},a}function IS(e){return typeof e?.message!="string"?!1:e.message.startsWith("Failed to fetch dynamically imported module")||e.message.startsWith("error loading dynamically imported module")||e.message.startsWith("Importing a module script failed")}function ja(e){return!!(e&&typeof e=="object"&&typeof e.then=="function")}function $S(e){return e.replace(/[\x00-\x1f\x7f]/g,"")}function Vy(e){let t;try{t=decodeURI(e)}catch{t=e.replaceAll(/%[0-9A-F]{2}/gi,s=>{try{return decodeURI(s)}catch{return s}})}return $S(t)}var GS=["http:","https:","mailto:","tel:"];function Ml(e,t){if(!e)return!1;try{const s=new URL(e);return!t.has(s.protocol)}catch{return!1}}var VS={"&":"\\u0026",">":"\\u003e","<":"\\u003c","\u2028":"\\u2028","\u2029":"\\u2029"},KS=/[&><\u2028\u2029]/g;function YS(e){return e.replace(KS,t=>VS[t])}function ga(e){if(!e)return{path:e,handledProtocolRelativeURL:!1};if(!/[%\\\x00-\x1f\x7f]/.test(e)&&!e.startsWith("//"))return{path:e,handledProtocolRelativeURL:!1};const t=/%25|%5C/gi;let s=0,a="",l;for(;(l=t.exec(e))!==null;)a+=Vy(e.slice(s,l.index))+l[0],s=t.lastIndex;a=a+Vy(s?e.slice(s):e);let u=!1;return a.startsWith("//")&&(u=!0,a="/"+a.replace(/^\/+/,"")),{path:a,handledProtocolRelativeURL:u}}function FS(e){return/\s|[^\u0000-\u007F]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function QS(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let s=0;s<e.length;s++)if(e[s]!==t[s])return!1;return!0}function Ut(){throw new Error("Invariant failed")}function Ma(e){const t=new Map;let s,a;const l=u=>{u.next&&(u.prev?(u.prev.next=u.next,u.next.prev=u.prev,u.next=void 0,a&&(a.next=u,u.prev=a
9)):(u.next.prev=void 0,s=u.next,u.next=void 0,a&&(u.prev=a,a.next=u)),a=u)};return{get(u){const c=t.get(u);if(c)return l(c),c.value},set(u,c){if(t.size>=e&&s){const p=s;t.delete(p.key),p.next&&(s=p.next,p.next.prev=void 0),p===a&&(a=void 0)}const d=t.get(u);if(d)d.value=c,l(d);else{const p={key:u,value:c,prev:a};a&&(a.next=p),a=p,s||(s=p),t.set(u,p)}},clear(){t.clear(),s=void 0,a=void 0}}}var Cr=4,bv=5;function JS(e){const t=e.indexOf("{");if(t===-1)return null;const s=e.indexOf("}",t);return s===-1||t+1>=e.length?null:[t,s]}function bf(e,t,s=new Uint16Array(6)){const a=e.indexOf("/",t),l=a===-1?e.length:a,u=e.substring(t,l);if(!u||!u.includes("$"))return s[0]=0,s[1]=t,s[2]=t,s[3]=l,s[4]=l,s[5]=l,s;if(u==="$"){const d=e.length;return s[0]=2,s[1]=t,s[2]=t,s[3]=d,s[4]=d,s[5]=d,s}if(u.charCodeAt(0)===36)return s[0]=1,s[1]=t,s[2]=t+1,s[3]=l,s[4]=l,s[5]=l,s;const c=JS(u);if(c){const[d,p]=c,g=u.charCodeAt(d+1);if(g===45){if(d+2<u.length&&u.charCodeAt(d+2)===36){const m=d+3,y=p;if(m<y)return s[0]=3,s[1]=t+d,s[2]=t+m,s[3]=t+y,s[4]=t+p+1,s[5]=l,s}}else if(g===36){const m=d+1,y=d+2;return y===p?(s[0]=2,s[1]=t+d,s[2]=t+m,s[3]=t+y,s[4]=t+p+1,s[5]=e.length,s):(s[0]=1,s[1]=t+d,s[2]=t+y,s[3]=t+p,s[4]=t+p+1,s[5]=l,s)}}return s[0]=0,s[1]=t,s[2]=t,s[3]=l,s[4]=l,s[5]=l,s}function Fl(e,t,s,a,l,u,c){c?.(s);let d=a;{const p=s.fullPath??s.from,g=p.length,m=s.options?.caseSensitive??e,y=!!(s.options?.params?.parse&&s.options?.skipRouteOnParseError?.params);for(;d<g;){const _=bf(p,d,t);let w;const A=d,R=_[5];switch(d=R+1,u++,_[0]){case 0:{const O=p.substring(_[2],_[3]);if(m){const U=l.static?.get(O);if(U)w=U;else{l.static??=new Map;const j=as(s.fullPath??s.from);j.parent=l,j.depth=u,w=j,l.static.set(O,j)}}else{const U=O.toLowerCase(),j=l.staticInsensitive?.get(U);if(j)w=j;else{l.staticInsensitive??=new Map;const L=as(s.fullPath??s.from);L.parent=l,L.depth=u,w=L,l.staticInsensitive.set(U,L)}}break}case 1:{const O=p.substring(A,_[1]),U=p.substring(_[4],R),j=m&&!!(O||U),L=O?j?O:O.toLowerCase():void 0,Q=U?j?U:U.toLowerCase():void 0,V=!y&&l.dynamic?.find(q=>!q.skipOnParamError&&q.caseSensitive===j&&q.prefix===L&&q.suffix===Q);if(V)w=V;else{const q=Ch(1,s.fullPath??s.from,j,L,Q);w=q,q.depth=u,q.parent=l,l.dynamic??=[],l.dynamic.push(q)}break}case 3:{const O=p.substring(A,_[1]),U=p.substring(_[4],R),j=m&&!!(O||U),L=O?j?O:O.toLowerCase():void 0,Q=U?j?U:U.toLowerCase():void 0,V=!y&&l.optional?.find(q=>!q.skipOnParamError&&q.caseSensitive===j&&q.prefix===L&&q.suffix===Q);if(V)w=V;else{const q=Ch(3,s.fullPath??s.from,j,L,Q);w=q,q.parent=l,q.depth=u,l.optional??=[],l.optional.push(q)}break}case 2:{const O=p.substring(A,_[1]),U=p.substring(_[4],R),j=m&&!!(O||U),L=O?j?O:O.toLowerCase():void 0,Q=U?j?U:U.toLowerCase():void 0,V=Ch(2,s.fullPath??s.from,j,L,Q);w=V,V.parent=l,V.depth=u,l.wildcard??=[],l.wildcard.push(V)}}l=w}if(y&&s.children&&!s.isRoot&&s.id&&s.id.charCodeAt(s.id.lastIndexOf("/")+1)===95){const _=as(s.fullPath??s.from);_.kind=bv,_.parent=l,u++,_.depth=u,l.pathless??=[],l.pathless.push(_),l=_}const b=(s.path||!s.children)&&!s.isRoot;if(b&&p.endsWith("/")){const _=as(s.fullPath??s.from);_.kind=Cr,_.parent=l,u++,_.depth=u,l.index=_,l=_}l.parse=s.options?.params?.parse??null,l.skipOnParamError=y,l.parsingPriority=s.options?.skipRouteOnParseError?.priority??0,b&&!l.route&&(l.route=s,l.fullPath=s.fullPath??s.from)}if(s.children)for(const p of s.children)Fl(e,t,p,d,l,u,c)}function Oh(e,t){if(e.skipOnParamError&&!t.skipOnParamError)return-1;if(!e.skipOnParamError&&t.skipOnParamError)return 1;if(e.skipOnParamError&&t.skipOnParamError&&(e.parsingPriority||t.parsingPriority))return t.parsingPriority-e.parsingPriority;if(e.prefix&&t.prefix&&e.prefix!==t.prefix){if(e.prefix.startsWith(t.prefix))return-1;if(t.prefix.startsWith(e.prefix))return 1}if(e.suffix&&t.suffix&&e.suffix!==t.suffix){if(e.suffix.endsWith(t.suffix))return-1;if(t.suffix.endsWith(e.suffix))return 1}return e.prefix&&!t.prefix?-1:!e.prefix&&t.prefix?1:e.suffix&&!t.suffix?-1:!e.suffix&&t.suffix?1:e.caseSensitive&&!t.caseSensitive?-1:!e.caseSensitive&&t.caseSensitive?1:0}function Er(e){if(e.pathless)for(const t of e.pathless)Er(t);if(e.static)for(const t of e.static.values())Er(t);if(e.staticInsensitive)for(const t of e.staticInsensitive.values())Er(t);if(e.dynamic?.length){e.dynamic.sort(Oh);for(const t of e.dynamic)Er(t)}if(e.optional?.length){e.optional.sort(Oh);for(const t of e.optional)Er(t)}if(e.wildcard?.length){e.wildcard.sort(Oh);for(const t of e.wildcard)Er(t)}}function as(e){return{kind:0,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null,parse:null,skipOnParamError:!1,parsingPriority:0}}function Ch(e,t,s,a,l){return{kind:e,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:t,parent:null,parse:null,skipOnParamError:!1,parsingPriority:0,caseSensitive:s,prefix:a,suffix:l}}function XS(e,t){const s=as("/"),a=new Uint16Array(6);for(const l of e)Fl(!1,a,l,1,s,0);Er(s),t.masksTree=s,t.flatCache=Ma(1e3)}function ZS(e,t){e||="/";const s=t.flatCache.get(e);if(s)return s;const a=_f(e,t.masksTree);return t.flatCache.set(e,a),a}function WS(e,t,s,a,l){e||="/",a||="/";const u=t?`case\0${e}`:e;let c=l.singleCache.get(u);return c||(c=as("/"),Fl(t,new Uint16Array(6),{from:e},1,c,0),l.singleCache.set(u,c)),_f(a,c,s)}function ew(e,t,s=!1){const a=s?e:`nofuzz\0${e}`,l=t.matchCache.get(a);if(l!==void 0)return l;e||="/";let u;
9try{u=_f(e,t.segmentTree,s)}catch(c){if(c instanceof URIError)u=null;else throw c}return u&&(u.branch=rw(u.route)),t.matchCache.set(a,u),u}function tw(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function nw(e,t=!1,s){const a=as(e.fullPath),l=new Uint16Array(6),u={},c={};let d=0;return Fl(t,l,e,1,a,0,p=>{if(s?.(p,d),p.id in u&&Ut(),u[p.id]=p,d!==0&&p.path){const g=tw(p.fullPath);(!c[g]||p.fullPath.endsWith("/"))&&(c[g]=p)}d++}),Er(a),{processedTree:{segmentTree:a,singleCache:Ma(1e3),matchCache:Ma(1e3),flatCache:null,masksTree:null},routesById:u,routesByPath:c}}function _f(e,t,s=!1){const a=e.split("/"),l=iw(e,a,t,s);if(!l)return null;const[u]=_v(e,a,l);return{route:l.node.route,rawParams:u,parsedParams:l.parsedParams}}function _v(e,t,s){const a=sw(s.node);let l=null;const u=Object.create(null);let c=s.extract?.part??0,d=s.extract?.node??0,p=s.extract?.path??0,g=s.extract?.segment??0;for(;d<a.length;c++,d++,p++,g++){const m=a[d];if(m.kind===Cr)break;if(m.kind===bv){g--,c--,p--;continue}const y=t[c],b=p;if(y&&(p+=y.length),m.kind===1){l??=s.node.fullPath.split("/");const _=l[g],w=m.prefix?.length??0;if(_.charCodeAt(w)===123){const A=m.suffix?.length??0,R=_.substring(w+2,_.length-A-1),O=y.substring(w,y.length-A);u[R]=decodeURIComponent(O)}else{const A=_.substring(1);u[A]=decodeURIComponent(y)}}else if(m.kind===3){if(s.skipped&1<<d){c--,p=b-1;continue}l??=s.node.fullPath.split("/");const _=l[g],w=m.prefix?.length??0,A=m.suffix?.length??0,R=_.substring(w+3,_.length-A-1),O=m.suffix||m.prefix?y.substring(w,y.length-A):y;O&&(u[R]=decodeURIComponent(O))}else if(m.kind===2){const _=m,w=e.substring(b+(_.prefix?.length??0),e.length-(_.suffix?.length??0)),A=decodeURIComponent(w);u["*"]=A,u._splat=A;break}}return s.rawParams&&Object.assign(u,s.rawParams),[u,{part:c,node:d,path:p,segment:g}]}function rw(e){const t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function sw(e){const t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function iw(e,t,s,a){if(e==="/"&&s.index)return{node:s.index,skipped:0};const l=!ka(t),u=l&&e!=="/",c=t.length-(l?1:0),d=[{node:s,index:1,skipped:0,depth:1,statics:0,dynamics:0,optionals:0}];let p=null,g=null;for(;d.length;){const m=d.pop(),{node:y,index:b,skipped:_,depth:w,statics:A,dynamics:R,optionals:O}=m;let{extract:U,rawParams:j,parsedParams:L}=m;if(y.kind===2&&y.route&&!dl(g,m))continue;if(y.skipOnParamError){if(!Ky(e,t,m))continue;j=m.rawParams,U=m.extract,L=m.parsedParams}a&&y.route&&y.kind!==Cr&&dl(p,m)&&(p=m);const Q=b===c;if(Q&&(y.route&&(!u||y.kind===Cr||y.kind===2)&&dl(g,m)&&(g=m),!y.optional&&!y.wildcard&&!y.index&&!y.pathless))continue;const V=Q?void 0:t[b];let q;if(Q&&y.index){const K={node:y.index,index:b,skipped:_,depth:w+1,statics:A,dynamics:R,optionals:O,extract:U,rawParams:j,parsedParams:L};let J=!0;if(y.index.skipOnParamError&&(Ky(e,t,K)||(J=!1)),J){if(!R&&!O&&!_&&aw(A,c))return K;dl(g,K)&&(g=K)}}if(y.wildcard)for(let K=y.wildcard.length-1;K>=0;K--){const J=y.wildcard[K],{prefix:le,suffix:se}=J;if(!(le&&(Q||!(J.caseSensitive?V:q??=V.toLowerCase()).startsWith(le)))){if(se){if(Q)continue;const me=t.slice(b).join("/").slice(-se.length);if((J.caseSensitive?me:me.toLowerCase())!==se)continue}d.push({node:J,index:c,skipped:_,depth:w+1,statics:A,dynamics:R,optionals:O,extract:U,rawParams:j,parsedParams:L})}}if(y.optional){const K=_|1<<w,J=w+1;for(let le=y.optional.length-1;le>=0;le--){const se=y.optional[le];d.push({node:se,index:b,skipped:K,depth:J,statics:A,dynamics:R,optionals:O,extract:U,rawParams:j,parsedParams:L})}if(!Q)for(let le=y.optional.length-1;le>=0;le--){const se=y.optional[le],{prefix:me,suffix:Ce}=se;if(me||Ce){const Ye=se.caseSensitive?V:q??=V.toLowerCase();if(me&&!Ye.startsWith(me)||Ce&&!Ye.endsWith(Ce))continue}d.push({node:se,index:b+1,skipped:_,depth:J,statics:A,dynamics:R,optionals:O+fl(c,b),extract:U,rawParams:j,parsedParams:L})}}if(!Q&&y.dynamic&&V)for(let K=y.dynamic.length-1;K>=0;K--){const J=y.dynamic[K],{prefix:le,suffix:se}=J;if(le||se){const me=J.caseSensitive?V:q??=V.toLowerCase();if(le&&!me.startsWith(le)||se&&!me.endsWith(se))continue}d.push({node:J,index:b+1,skipped:_,depth:w+1,statics:A,dynamics:R+fl(c,b),optionals:O,extract:U,rawParams:j,parsedParams:L})}if(!Q&&y.staticInsensitive){const K=y.staticInsensitive.get(q??=V.toLowerCase());K&&d.push({node:K,index:b+1,skipped:_,depth:w+1,statics:A+fl(c,b),dynamics:R,optionals:O,extract:U,rawParams:j,parsedParams:L})}if(!Q&&y.static){const K=y.static.get(V);K&&d.push({node:K,index:b+1,skipped:_,depth:w+1,statics:A+fl(c,b),dynamics:R,optionals:O,extract:U,rawParams:j,parsedParams:L})}if(y.pathless){const K=w+1;for(let J=y.pathless.length-1;J>=0;J--){const le=y.pathless[J];d.push({node:le,index:b,skipped:_,depth:K,statics:A,dynamics:R,optionals:O,extract:U,rawParams:j,parsedParams:L})}}}if(g)return g;if(a&&p){let m=p.index;for(let b=0;b<p.index;b++)m+=t[b].length;const y=m===e.length?"/":e.slice(m);return p.rawParams??=Object.create(null),p.rawParams["**"]=decodeURIComponent(y),p}return null}function fl(e,t){return 2**(e-t-1)}function aw(e,t){return e===2**(t-1)-1}function Ky(e,t,s){try{const[a,l]=_v(e,t,s);s.rawParams=a,s.extract=l;const u=s.node.parse(a);return s.parsedParams=Object.assign(Object.create(null),s.parsedParams,u),!0}catch{return null}}function dl(e,t){return e?t.statics>e.statics||t.statics===e.statics&&(t.dynamics>e.dynamics||t.dynamics===e.dynamics&&(t.optionals>e.optionals||t.optionals===e.optionals&&((t.node.kind===Cr)>(e.node.kind===Cr)||t.node.kind===Cr==(e.node.kind===Cr)&&t.depth>e.depth))):!0}function Al(e){return Sf(e.filter(t=>t!==void 0).join("/"))}function Sf(e){return e.replace(/\/{2,}/g,"/")}function Sv(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function kr(e){const t=e.length;return t>1&&e[t-1]==="/"?e.replace(/\/{1,}$/,""):e}function wv(e){return kr(Sv(e))}function Ul(e,t){return e?.endsWith("/")&&e!=="/"&&e!==`${t}/`?e.slice(0,-1):e}function ow(e,t,s){return Ul(e,s)===Ul(t,s)}function lw({base:e,to:t,trailingSlash:s="never",cache:a}){const l=t.startsWith("/"),u=!l&&t===".";let c;if(a){c=l?t:u?e:e+"\0"+t;const y=a.get(c);if(y)return y}let d;if(u)d=e.split("/");else if(l)d=t.split("/");else{for(d=e.split("/");d.length>1&&ka(d)==="";)d.pop();const y=t.split("/");for(let b=0,_=y.length;b<_;b++){const w=y[b];w===""?b?b===_-1&&d.push(w):d=[w]:w===".."?d.pop():w==="."||d.push(w)}}d.length>1&&(ka(d)===""?s==="never"&&d.pop():s==="always"&&d.push(""));let p,g="";for(let y=0;y<d.length;y++){y>0&&(g+="/");const b=d[y];if(!b)continue;p=bf(b,0,p);const _=p[0];if(_===0){g+=b;continue}const w=p[5],A=b.substring(0,p[1]),R=b.substring(p[4],w),O=b.substring(p[2],p[3]);_===1?g+=A||R?`${A}{$${O}}${R}`:`$${O}`:_===2?g+=A||R?`${A}{$}${R}`:"$":g+=`${A}{-$${O}}${R}`}g=Sf(g);const m=g||"/";return c&&a&&a.set(c,m),m}function uw(e){const t=new Map(e.map(l=>[encodeURIComponent(l),l])),s=Array.from(t.keys()).map(l=>l.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),a=new RegExp(s,"g");return l=>l.replace(a,u=>t.get(u)??u)}function xh(e,t,s){const a=t[e];return typeof a!="string"?a:e==="_splat"?/^[a-zA-Z0-9\-._~!/]*$/.test(a)?a:a.split("/").map(l=>Fy(l,s)).join("/"):Fy(a,s)}function Yy({path:e,params:t,decoder:s,...a}){let l=!1;const u=Object.create(null);if(!e||e==="/")return{interpolatedPath:"/",usedParams:u,isMissingParams:l};if(!e.includes("$"))return{interpolatedPath:e,usedParams:u,isMissingParams:l};const c=e.length;let d=0,p,g="";for(;d<c;){const m=d;p=bf(e,m,p);const y=p[5];if(d=y+1,m===y)continue;const b=p[0];if(b===0){g+="/"+e.substring(m,y);continue}if(b===2){const _=t._splat;u._splat=_,u["*"]=_;const w=e.substring(m,p[1]),A=e.substring(p[4],y);if(!_){l=!0,(w||A)&&(g+="/"+w+A);continue}const R=xh("_splat",t,s);g+="/"+w+R+A;continue}if(b===1){const _=e.substring(p[2],p[3]);!l&&!(_ in t)&&(l=!0),u[_]=t[_];const w=e.substring(m,p[1]),A=e.substring(p[4],y),R=xh(_,t,s)??"undefined";g+="/"+w+R+A;continue}if(b===3){const _=e.substring(p[2],p[3]),w=t[_];if(w==null)continue;u[_]=w;const A=e.substring(m,p[1]),R=e.substring(p[4],y),O=xh(_,t,s)??"";g+="/"+A+O+R;continue}}return e.endsWith("/")&&(g+="/"),{usedParams:u,interpolatedPath:g||"/",isMissingParams:l}}function Fy(e,t){const s=encodeURIComponent(e);return t?.(s)??s}function ct(e){return e?.isNotFound===!0}function cw(){try{return typeof window<"u"&&typeof window.sessionStorage=="object"?window.sessionStorage:void 0}catch{return}}var hw="tsr-scroll-restoration-v1_3";function fw(){const e=cw();if(!e)return null;let t={};try{const a=JSON.parse(e.getItem("tsr-scroll-restoration-v1_3")||"{}");yi(a)&&(t=a)}catch{}return{get state(){return t},set:a=>{t=Or(a,t)||t},persist:()=>{try{e.setItem(hw,JSON.stringify(t))}catch{}}}}var Qy=fw(),dw=e=>e.state.__TSR_key||e.href;function pw(e){const t=[];let s;for(;s=e.parentNode;)t.push(`${e.tagName}:nth-child(${Array.prototype.indexOf.call(s.children,e)+1})`),e=s;return`${t.reverse().join(" > ")}`.toLowerCase()}var pl=!1,ya="window",Jy="data-scroll-restoration-id";function gw(e,t){if(!Qy)return;const s=Qy;if((e.options.scrollRestoration??!1)&&(e.isScrollRestoring=!0),e.isScrollRestorationSetup||!s)return;e.isScrollRestorationSetup=!0,pl=!1;const a=e.options.getScrollRestorationKey||dw,l=new Map;window.history.scrollRestoration="manual";const u=d=>{if(!(pl||!e.isScrollRestoring))if(d.target===document||d.target===window)l.set(ya,{scrollX:window.scrollX||0,scrollY:window.scrollY||0});else{const p=d.target;l.set(p,{scrollX:p.scrollLeft||0,scrollY:p.scrollTop||0})}},c=d=>
9{if(!e.isScrollRestoring||!d||l.size===0||!s)return;const p=s.state[d]||={};for(const[g,m]of l){let y;if(g===ya)y=ya;else if(g.isConnected){const b=g.getAttribute(Jy);y=b?`[${Jy}="${b}"]`:pw(g)}y&&(p[y]=m)}};document.addEventListener("scroll",u,!0),e.subscribe("onBeforeLoad",d=>{c(d.fromLocation?a(d.fromLocation):void 0),l.clear()}),window.addEventListener("pagehide",()=>{c(a(e.stores.resolvedLocation.get()??e.stores.location.get())),s.persist()}),e.subscribe("onRendered",d=>{const p=a(d.toLocation),g=e.options.scrollRestorationBehavior,m=e.options.scrollToTopSelectors;if(l.clear(),!e.resetNextScroll){e.resetNextScroll=!0;return}if(!(typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation}))){pl=!0;try{const y=e.isScrollRestoring?s.state[p]:void 0;let b=!1;if(y)for(const _ in y){const w=y[_];if(!yi(w))continue;const{scrollX:A,scrollY:R}=w;if(!(!Number.isFinite(A)||!Number.isFinite(R))){if(_===ya)window.scrollTo({top:R,left:A,behavior:g}),b=!0;else if(_){let O;try{O=document.querySelector(_)}catch{continue}O&&(O.scrollLeft=A,O.scrollTop=R,b=!0)}}}if(!b){const _=e.history.location.hash.slice(1);if(_){const w=window.history.state?.__hashScrollIntoViewOptions??!0;if(w){const A=document.getElementById(_);A&&A.scrollIntoView(w)}}else{const w={top:0,left:0,behavior:g};if(window.scrollTo(w),m)for(const A of m){if(A===ya)continue;const R=typeof A=="function"?A():document.querySelector(A);R&&R.scrollTo(w)}}}}finally{pl=!1}e.isScrollRestoring&&s.set(y=>(y[p]||={},y))}})}function Ev(e,t=String){const s=new URLSearchParams;for(const a in e){const l=e[a];l!==void 0&&s.set(a,t(l))}return s.toString()}function kh(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function yw(e){const t=new URLSearchParams(e),s=Object.create(null);for(const[a,l]of t.entries()){const u=s[a];u==null?s[a]=kh(l):Array.isArray(u)?u.push(kh(l)):s[a]=[u,kh(l)]}return s}var mw=bw(JSON.parse),vw=_w(JSON.stringify,JSON.parse);function bw(e){return t=>{t[0]==="?"&&(t=t.substring(1));const s=yw(t);for(const a in s){const l=s[a];if(typeof l=="string")try{s[a]=e(l)}catch{}}return s}}function _w(e,t){const s=typeof t=="function";function a(l){if(typeof l=="object"&&l!==null)try{return e(l)}catch{}else if(s&&typeof l=="string")try{return t(l),e(l)}catch{}return l}return l=>{const u=Ev(l,a);return u?`?${u}`:""}}var cs="__root__";function Tv(e){if(e.statusCode=e.statusCode||e.code||307,!e._builtLocation&&!e.reloadDocument&&typeof e.href=="string")try{new URL(e.href),e.reloadDocument=!0}catch{}const t=new Headers(e.headers);e.href&&t.get("Location")===null&&t.set("Location",e.href);const s=new Response(null,{status:e.statusCode,headers:t});if(s.options=e,e.throw)throw s;return s}function Mt(e){return e instanceof Response&&!!e.options}function Sw(e){if(e!==null&&typeof e=="object"&&e.isSerializedRedirect)return Tv(e)}function ww(e){return{input:({url:t})=>{for(const s of e)t=Jh(s,t);return t},output:({url:t})=>{for(let s=e.length-1;s>=0;s--)t=Rv(e[s],t);return t}}}function Ew(e){const t=wv(e.basepath),s=`/${t}`,a=`${s}/`,l=e.caseSensitive?s:s.toLowerCase(),u=e.caseSensitive?a:a.toLowerCase();return{input:({url:c})=>{const d=e.caseSensitive?c.pathname:c.pathname.toLowerCase();return d===l?c.pathname="/":d.startsWith(u)&&(c.pathname=c.pathname.slice(s.length)),c},output:({url:c})=>(c.pathname=Al(["/",t,c.pathname]),c)}}function Jh(e,t){const s=e?.input?.({url:t});if(s){if(typeof s=="string")return new URL(s);if(s instanceof URL)return s}return t}function Rv(e,t){const s=e?.output?.({url:t});if(s){if(typeof s=="string")return new URL(s);if(s instanceof URL)return s}return t}function Tw(e,t){const{createMutableStore:s,createReadonlyStore:a,batch:l,init:u}=t,c=new Map,d=new Map,p=new Map,g=s(e.status),m=s(e.loadedAt),y=s(e.isLoading),b=s(e.isTransitioning),_=s(e.location),w=s(e.resolvedLocation),A=s(e.statusCode),R=s(e.redirect),O=s([]),U=s([]),j=s([]),L=a(()=>jh(c,O.get())),Q=a(()=>jh(d,U.get())),V=a(()=>jh(p,j.get())),q=a(()=>O.get()[0]),K=a(()=>O.get().some(F=>c.get(F)?.get().status==="pending")),J=a(()=>({locationHref:_.get().href,resolvedLocationHref:w.get()?.href,status:g.get()})),le=a(()=>({status:g.get(),loadedAt:m.get(),isLoading:y.get(),isTransitioning:b.get(),matches:L.get(),location:_.get(),resolvedLocation:w.get(),statusCode:A.get(),redirect:R.get()})),se=Ma(64);function me(F){let oe=se.get(F);return oe||(oe=a(()=>{const Re=O.get();for(const Oe of Re){const k=c.get(Oe);if(k&&k.routeId===F)return k.get()}}),se.set(F,oe)),oe}const Ce={status:g,loadedAt:m,isLoading:y,isTransitioning:b,location:_,resolvedLocation:w,statusCode:A,redirect:R,matchesId:O,pendingIds:U,cachedIds:j,matches:L,pendingMatches:Q,cachedMatches:V,firstId:q,hasPending:K,matchRouteDeps:J,matchStores:c,pendingMatchStores:d,cachedMatchStores:p,__store:le,getRouteMatchStore:me,setMatches:Ye,setPending:Be,setCached:B};Ye(e.matches),u?.(Ce);function Ye(F){Mh(F,c,O,s,l)}function Be(F){Mh(F,d,U,s,l)}function B(F){Mh(F,p,j,s,l)}return Ce}function jh(e,t){const s=[];for(const a of t){const l=e.get(a);l&&s.push(l.get())}return s}function Mh(e,t,s,a,l){const u=e.map(d=>d.id),c=new Set(u);l(()=>{for(const d of t.keys())c.has(d)||t.delete(d);for(const d of e){const p=t.get(d.id);if(!p){const g=a(d);g.routeId=d.routeId,t.set(d.id,g);continue}p.routeId=d.routeId,p.get()!==d&&p.set(d)}QS(s.get(),u)||s.set(u)})}var Xh=e=>{if(!e.rendered)return e.rendered=!0,e.onReady?.()},Rw=e=>e.stores.matchesId.get().some(t=>
9e.stores.matchStores.get(t)?.get()._forcePending),Ql=(e,t)=>!!(e.preload&&!e.router.stores.matchStores.has(t)),hs=(e,t,s=!0)=>{const a={...e.router.options.context??{}},l=s?t:t-1;for(let u=0;u<=l;u++){const c=e.matches[u];if(!c)continue;const d=e.router.getMatch(c.id);d&&Object.assign(a,d.__routeContext,d.__beforeLoadContext)}return a},Xy=(e,t)=>{if(!e.matches.length)return;const s=t.routeId,a=e.matches.findIndex(c=>c.routeId===e.router.routeTree.id),l=a>=0?a:0;let u=s?e.matches.findIndex(c=>c.routeId===s):e.firstBadMatchIndex??e.matches.length-1;u<0&&(u=l);for(let c=u;c>=0;c--){const d=e.matches[c];if(e.router.looseRoutesById[d.routeId].options.notFoundComponent)return c}return s?u:l},xr=(e,t,s)=>{if(!(!Mt(s)&&!ct(s)))throw Mt(s)&&s.redirectHandled&&!s.options.reloadDocument||(t&&(t._nonReactive.beforeLoadPromise?.resolve(),t._nonReactive.loaderPromise?.resolve(),t._nonReactive.beforeLoadPromise=void 0,t._nonReactive.loaderPromise=void 0,t._nonReactive.error=s,e.updateMatch(t.id,a=>({...a,status:Mt(s)?"redirected":ct(s)?"notFound":a.status==="pending"?"success":a.status,context:hs(e,t.index),isFetching:!1,error:s})),ct(s)&&!s.routeId&&(s.routeId=t.routeId),t._nonReactive.loadPromise?.resolve()),Mt(s)&&(e.rendered=!0,s.options._fromLocation=e.location,s.redirectHandled=!0,s=e.router.resolveRedirect(s))),s},Av=(e,t)=>{const s=e.router.getMatch(t);return!!(!s||s._nonReactive.dehydrated)},Zy=(e,t,s)=>{const a=hs(e,s);e.updateMatch(t,l=>({...l,context:a}))},ma=(e,t,s,a)=>{const{id:l,routeId:u}=e.matches[t],c=e.router.looseRoutesById[u];if(s instanceof Promise)throw s;s.routerCode=a,e.firstBadMatchIndex??=t,xr(e,e.router.getMatch(l),s);try{c.options.onError?.(s)}catch(d){s=d,xr(e,e.router.getMatch(l),s)}e.updateMatch(l,d=>(d._nonReactive.beforeLoadPromise?.resolve(),d._nonReactive.beforeLoadPromise=void 0,d._nonReactive.loadPromise?.resolve(),{...d,error:s,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController})),!e.preload&&!Mt(s)&&!ct(s)&&(e.serialError??=s)},Ov=(e,t,s,a)=>{if(a._nonReactive.pendingTimeout!==void 0)return;const l=s.options.pendingMs??e.router.options.defaultPendingMs;if(e.onReady&&!Ql(e,t)&&(s.options.loader||s.options.beforeLoad||xv(s))&&typeof l=="number"&&l!==1/0&&(s.options.pendingComponent??e.router.options?.defaultPendingComponent)){const u=setTimeout(()=>{Xh(e)},l);a._nonReactive.pendingTimeout=u}},Aw=(e,t,s)=>{const a=e.router.getMatch(t);if(!a._nonReactive.beforeLoadPromise&&!a._nonReactive.loaderPromise)return;Ov(e,t,s,a);const l=()=>{const u=e.router.getMatch(t);u.preload&&(u.status==="redirected"||u.status==="notFound")&&xr(e,u,u.error)};return a._nonReactive.beforeLoadPromise?a._nonReactive.beforeLoadPromise.then(l):l()},Ow=(e,t,s,a)=>{const l=e.router.getMatch(t);let u=l._nonReactive.loadPromise;l._nonReactive.loadPromise=fs(()=>{u?.resolve(),u=void 0});const{paramsError:c,searchError:d}=l;c&&ma(e,s,c,"PARSE_PARAMS"),d&&ma(e,s,d,"VALIDATE_SEARCH"),Ov(e,t,a,l);const p=new AbortController;let g=!1;const m=()=>{g||(g=!0,e.updateMatch(t,L=>({...L,isFetching:"beforeLoad",fetchCount:L.fetchCount+1,abortController:p})))},y=()=>{l._nonReactive.beforeLoadPromise?.resolve(),l._nonReactive.beforeLoadPromise=void 0,e.updateMatch(t,L=>({...L,isFetching:!1}))};if(!a.options.beforeLoad){e.router.batch(()=>{m(),y()});return}l._nonReactive.beforeLoadPromise=fs();const b={...hs(e,s,!1),...l.__routeContext},{search:_,params:w,cause:A}=l,R=Ql(e,t),O={search:_,abortController:p,params:w,preload:R,context:b,location:e.location,navigate:L=>e.router.navigate({...L,_fromLocation:e.location}),buildLocation:e.router.buildLocation,cause:R?"preload":A,matches:e.matches,routeId:a.id,...e.router.options.additionalContext},U=L=>{if(L===void 0){e.router.batch(()=>{m(),y()});return}(Mt(L)||ct(L))&&(m(),ma(e,s,L,"BEFORE_LOAD")),e.router.batch(()=>{m(),e.updateMatch(t,Q=>({...Q,__beforeLoadContext:L})),y()})};let j;try{if(j=a.options.beforeLoad(O),ja(j))return m(),j.catch(L=>{ma(e,s,L,"BEFORE_LOAD")}).then(U)}catch(L){m(),ma(e,s,L,"BEFORE_LOAD")}U(j)},Cw=(e,t)=>{const{id:s,routeId:a}=e.matches[t],l=e.router.looseRoutesById[a],u=()=>d(),c=()=>Ow(e,s,t,l),d=()=>
9{if(Av(e,s))return;const p=Aw(e,s,l);return ja(p)?p.then(c):c()};return u()},xw=(e,t,s)=>{const a=e.router.getMatch(t);if(!a||!s.options.head&&!s.options.scripts&&!s.options.headers)return;const l={ssr:e.router.options.ssr,matches:e.matches,match:a,params:a.params,loaderData:a.loaderData};return Promise.all([s.options.head?.(l),s.options.scripts?.(l),s.options.headers?.(l)]).then(([u,c,d])=>({meta:u?.meta,links:u?.links,headScripts:u?.scripts,headers:d,scripts:c,styles:u?.styles}))},Cv=(e,t,s,a,l)=>{const u=t[a-1],{params:c,loaderDeps:d,abortController:p,cause:g}=e.router.getMatch(s),m=hs(e,a),y=Ql(e,s);return{params:c,deps:d,preload:!!y,parentMatchPromise:u,abortController:p,context:m,location:e.location,navigate:b=>e.router.navigate({...b,_fromLocation:e.location}),cause:y?"preload":g,route:l,...e.router.options.additionalContext}},Wy=async(e,t,s,a,l)=>{try{const u=e.router.getMatch(s);try{(!(vv??e.router.isServer)||u.ssr===!0)&&Ua(l);const c=l.options.loader,d=typeof c=="function"?c:c?.handler,p=d?.(Cv(e,t,s,a,l)),g=!!d&&ja(p);if((g||l._lazyPromise||l._componentsPromise||l.options.head||l.options.scripts||l.options.headers||u._nonReactive.minPendingPromise)&&e.updateMatch(s,y=>({...y,isFetching:"loader"})),d){const y=g?await p:p;xr(e,e.router.getMatch(s),y),y!==void 0&&e.updateMatch(s,b=>({...b,loaderData:y}))}l._lazyPromise&&await l._lazyPromise;const m=u._nonReactive.minPendingPromise;m&&await m,l._componentsPromise&&await l._componentsPromise,e.updateMatch(s,y=>({...y,error:void 0,context:hs(e,a),status:"success",isFetching:!1,updatedAt:Date.now()}))}catch(c){let d=c;if(d?.name==="AbortError"){if(u.abortController.signal.aborted){u._nonReactive.loaderPromise?.resolve(),u._nonReactive.loaderPromise=void 0;return}e.updateMatch(s,g=>({...g,status:g.status==="pending"?"success":g.status,isFetching:!1,context:hs(e,a)}));return}const p=u._nonReactive.minPendingPromise;p&&await p,ct(c)&&await l.options.notFoundComponent?.preload?.(),xr(e,e.router.getMatch(s),c);try{l.options.onError?.(c)}catch(g){d=g,xr(e,e.router.getMatch(s),g)}!Mt(d)&&!ct(d)&&await Ua(l,["errorComponent"]),e.updateMatch(s,g=>({...g,error:d,context:hs(e,a),status:"error",isFetching:!1}))}}catch(u){const c=e.router.getMatch(s);c&&(c._nonReactive.loaderPromise=void 0),xr(e,c,u)}},kw=async(e,t,s)=>{async function a(_,w,A,R,O){const U=Date.now()-w.updatedAt,j=_?O.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:O.options.staleTime??e.router.options.defaultStaleTime??0,L=O.options.shouldReload,Q=typeof L=="function"?L(Cv(e,t,l,s,O)):L,{status:V,invalid:q}=R,K=U>=j&&(!!e.forceStaleReload||R.cause==="enter"||A!==void 0&&A!==R.id);c=V==="success"&&(q||(Q??K)),_&&O.options.preload===!1||(c&&!e.sync&&m?(d=!0,(async()=>{try{await Wy(e,t,l,s,O);const J=e.router.getMatch(l);J._nonReactive.loaderPromise?.resolve(),J._nonReactive.loadPromise?.resolve(),J._nonReactive.loaderPromise=void 0,J._nonReactive.loadPromise=void 0}catch(J){Mt(J)&&await e.router.navigate(J.options)}})()):V!=="success"||c?await Wy(e,t,l,s,O):Zy(e,l,s))}const{id:l,routeId:u}=e.matches[s];let c=!1,d=!1;const p=e.router.looseRoutesById[u],g=p.options.loader,m=((typeof g=="function"?void 0:g?.staleReloadMode)??e.router.options.defaultStaleReloadMode)!=="blocking";if(Av(e,l)){if(!e.router.getMatch(l))return e.matches[s];Zy(e,l,s)}else{const _=e.router.getMatch(l),w=e.router.stores.matchesId.get()[s],A=(w&&e.router.stores.matchStores.get(w)||null)?.routeId===u?w:e.router.stores.matches.get().find(O=>O.routeId===u)?.id,R=Ql(e,l);if(_._nonReactive.loaderPromise){if(_.status==="success"&&!e.sync&&!_.preload&&m)return _;await _._nonReactive.loaderPromise;const O=e.router.getMatch(l),U=O._nonReactive.error||O.error;U&&xr(e,O,U),O.status==="pending"&&await a(R,_,A,O,p)}else{const O=R&&!e.router.stores.matchStores.has(l),U=e.router.getMatch(l);U._nonReactive.loaderPromise=fs(),O!==U.preload&&e.updateMatch(l,j=>({...j,preload:O})),await a(R,_,A,U,p)}}const y=e.router.getMatch(l);d||(y._nonReactive.loaderPromise?.resolve(),y._nonReactive.loadPromise?.resolve(),y._nonReactive.loadPromise=void 0),clearTimeout(y._nonReactive.pen
9dingTimeout),y._nonReactive.pendingTimeout=void 0,d||(y._nonReactive.loaderPromise=void 0),y._nonReactive.dehydrated=void 0;const b=d?y.isFetching:!1;return b!==y.isFetching||y.invalid!==!1?(e.updateMatch(l,_=>({..._,isFetching:b,invalid:!1})),e.router.getMatch(l)):y};async function em(e){const t=e,s=[];Rw(t.router)&&Xh(t);let a;for(let b=0;b<t.matches.length;b++){try{const _=Cw(t,b);ja(_)&&await _}catch(_){if(Mt(_))throw _;if(ct(_))a=_;else if(!t.preload)throw _;break}if(t.serialError||t.firstBadMatchIndex!=null)break}const l=t.firstBadMatchIndex??t.matches.length,u=a&&!t.preload?Xy(t,a):void 0,c=a&&t.preload?0:u!==void 0?Math.min(u+1,l):l;let d,p;for(let b=0;b<c;b++)s.push(kw(t,s,b));try{await Promise.all(s)}catch{const b=await Promise.allSettled(s);for(const _ of b){if(_.status!=="rejected")continue;const w=_.reason;if(Mt(w))throw w;ct(w)?d??=w:p??=w}if(p!==void 0)throw p}const g=d??(a&&!t.preload?a:void 0);let m=t.firstBadMatchIndex!==void 0?t.firstBadMatchIndex:t.matches.length-1;if(!g&&a&&t.preload)return t.matches;if(g){const b=Xy(t,g);b===void 0&&Ut();const _=t.matches[b],w=t.router.looseRoutesById[_.routeId],A=t.router.options?.defaultNotFoundComponent;!w.options.notFoundComponent&&A&&(w.options.notFoundComponent=A),g.routeId=_.routeId;const R=_.routeId===t.router.routeTree.id;t.updateMatch(_.id,O=>({...O,...R?{status:"success",globalNotFound:!0,error:void 0}:{status:"notFound",error:g},isFetching:!1})),m=b,await Ua(w,["notFoundComponent"])}else if(!t.preload){const b=t.matches[0];b.globalNotFound||t.router.getMatch(b.id)?.globalNotFound&&t.updateMatch(b.id,_=>({..._,globalNotFound:!1,error:void 0}))}if(t.serialError&&t.firstBadMatchIndex!==void 0){const b=t.router.looseRoutesById[t.matches[t.firstBadMatchIndex].routeId];await Ua(b,["errorComponent"])}for(let b=0;b<=m;b++){const{id:_,routeId:w}=t.matches[b],A=t.router.looseRoutesById[w];try{const R=xw(t,_,A);if(R){const O=await R;t.updateMatch(_,U=>({...U,...O}))}}catch(R){console.error(`Error executing head for route ${w}:`,R)}}const y=Xh(t);if(ja(y)&&await y,g)throw g;if(t.serialError&&!t.preload&&!t.onReady)throw t.serialError;return t.matches}function tm(e,t){const s=t.map(a=>e.options[a]?.preload?.()).filter(Boolean);if(s.length!==0)return Promise.all(s)}function Ua(e,t=Ol){!e._lazyLoaded&&e._lazyPromise===void 0&&(e.lazyFn?e._lazyPromise=e.lazyFn().then(a=>{const{id:l,...u}=a.options;Object.assign(e.options,u),e._lazyLoaded=!0,e._lazyPromise=void 0}):e._lazyLoaded=!0);const s=()=>e._componentsLoaded?void 0:t===Ol?(()=>{if(e._componentsPromise===void 0){const a=tm(e,Ol);a?e._componentsPromise=a.then(()=>{e._componentsLoaded=!0,e._componentsPromise=void 0}):e._componentsLoaded=!0}return e._componentsPromise})():tm(e,t);return e._lazyPromise?e._lazyPromise.then(s):s()}function xv(e){for(const t of Ol)if(e.options[t]?.preload)return!0;return!1}var Ol=["component","errorComponent","pendingComponent","notFoundComponent"],jr="__TSR_index",nm="popstate",rm="beforeunload";function jw(e){let t=e.getLocation();const s=new Set,a=c=>{t=e.getLocation(),s.forEach(d=>d({location:t,action:c}))},l=c=>{e.notifyOnIndexChange??!0?a(c):t=e.getLocation()},u=async({task:c,navigateOpts:d,...p})=>{if(d?.ignoreBlocker??!1){c();return}const g=e.getBlockers?.()??[],m=p.type==="PUSH"||p.type==="REPLACE";if(typeof document<"u"&&g.length&&m)for(const y of g){const b=Dl(p.path,p.state);if(await y.blockerFn({currentLocation:t,nextLocation:b,action:p.type})){e.onBlocked?.();return}}c()};return{get location(){return t},get length(){return e.getLength()},subscribers:s,subscribe:c=>(s.add(c),()=>{s.delete(c)}),push:(c,d,p)=>{const g=t.state[jr];d=sm(g+1,d),u({task:()=>{e.pushState(c,d),a({type:"PUSH"})},navigateOpts:p,type:"PUSH",path:c,state:d})},replace:(c,d,p)=>{const g=t.state[jr];d=sm(g,d),u({task:()=>{e.replaceState(c,d),a({type:"REPLACE"})},navigateOpts:p,type:"REPLACE",path:c,state:d})},go:(c,d)=>{u({task:()=>{e.go(c),l({type:"GO",index:c})},navigateOpts:d,type:"GO"})},back:c=>{u({task:()=>{e.back(c?.ignoreBlocker??!1),l({type:"BACK"})},navigateOpts:c,type:"BACK"})},forward:c=>{u({task:()=>{e.forward(c?.ignoreBlocker??!1),l({type:"FORWARD"})},navigateOpts:c,type:"FORWARD"})},canGoBack:()=>t.state[jr]!==0,createHref:c=>e.createHref(c),block:c=>{if(!e.setBlockers)return()=>{};const d=e.getBlockers?.()??[];return e.setBlockers([...d,c]),()=>{const p=e.getBlockers?.()??[];e.setBlockers?.(p.filter(g=>g!==c))}},flush:()=>e.flush?.(),destroy:()=>e.destroy?.(),notify:a}}function sm(e,t){t||(t={});const s=wf();return{...t,key:s,__TSR_key:s,[jr]:e}}function Mw(e){const t=typeof document<"u"?window:void 0,s=t.history.pushState,a=t.history.replaceState;let l=[];const u=()=>l,c=K=>l=K,d=(K=>K),p=(()=>Dl(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){const K=wf();t.history.replaceState({[jr]:0,key:K,__TSR_key:K},"")}let g=p(),m,y=!1,b=!1,_=!1,w=!1;const A=()=>g;let R,O;const U=()=>{R&&(q._ignoreSubscribers=!0,(R.isPush?t.history.pushState:t.history.replaceState)(R.state,"",R.href),q._ignoreSubscribers=!1,R=void 0,O=void 0,m=void 0)},j=(K,J,le)=>{const se=d(J);O||(m=g),g=Dl(J,le),R={href:se,state:le,isPush:R?.isPush||K==="push"},O||(O=Promise.resolve().then(()=>U()))},L=K=>
9{g=p(),q.notify({type:K})},Q=async()=>{if(b){b=!1;return}const K=p(),J=K.state[jr]-g.state[jr],le=J===1,se=J===-1,me=!le&&!se||y;y=!1;const Ce=me?"GO":se?"BACK":"FORWARD",Ye=me?{type:"GO",index:J}:{type:se?"BACK":"FORWARD"};if(_)_=!1;else{const Be=u();if(typeof document<"u"&&Be.length){for(const B of Be)if(await B.blockerFn({currentLocation:g,nextLocation:K,action:Ce})){b=!0,t.history.go(1),q.notify(Ye);return}}}g=p(),q.notify(Ye)},V=K=>{if(w){w=!1;return}let J=!1;const le=u();if(typeof document<"u"&&le.length)for(const se of le){const me=se.enableBeforeUnload??!0;if(me===!0){J=!0;break}if(typeof me=="function"&&me()===!0){J=!0;break}}if(J)return K.preventDefault(),K.returnValue=""},q=jw({getLocation:A,getLength:()=>t.history.length,pushState:(K,J)=>j("push",K,J),replaceState:(K,J)=>j("replace",K,J),back:K=>(K&&(_=!0),w=!0,t.history.back()),forward:K=>{K&&(_=!0),w=!0,t.history.forward()},go:K=>{y=!0,t.history.go(K)},createHref:K=>d(K),flush:U,destroy:()=>{t.history.pushState=s,t.history.replaceState=a,t.removeEventListener(rm,V,{capture:!0}),t.removeEventListener(nm,Q)},onBlocked:()=>{m&&g!==m&&(g=m)},getBlockers:u,setBlockers:c,notifyOnIndexChange:!1});return t.addEventListener(rm,V,{capture:!0}),t.addEventListener(nm,Q),t.history.pushState=function(...K){const J=s.apply(t.history,K);return q._ignoreSubscribers||L("PUSH"),J},t.history.replaceState=function(...K){const J=a.apply(t.history,K);return q._ignoreSubscribers||L("REPLACE"),J},q}function Uw(e){let t=e.replace(/[\x00-\x1f\x7f]/g,"");return t.startsWith("//")&&(t="/"+t.replace(/^\/+/,"")),t}function Dl(e,t){const s=Uw(e),a=s.indexOf("#"),l=s.indexOf("?"),u=wf();return{href:s,pathname:s.substring(0,a>0?l>0?Math.min(a,l):a:l>0?l:s.length),hash:a>-1?s.substring(a):"",search:l>-1?s.slice(l,a===-1?void 0:a):"",state:t||{[jr]:0,key:u,__TSR_key:u}}}function wf(){return(Math.random()+1).toString(36).substring(7)}function Dw(e){return e instanceof Error?{name:e.name,message:e.message}:{data:e}}function fi(e,t){const s=t,a=e;return{fromLocation:s,toLocation:a,pathChanged:s?.pathname!==a.pathname,hrefChanged:s?.href!==a.href,hashChanged:s?.hash!==a.hash}}var Nw=class{constructor(e,t){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this.resetNextScroll=!0,this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.isScrollRestoring=!1,this.isScrollRestorationSetup=!1,this.startTransition=s=>s(),this.update=s=>{const a=this.options,l=this.basepath??a?.basepath??"/",u=this.basepath===void 0,c=a?.rewrite;if(this.options={...a,...s},this.isServer=this.options.isServer??typeof document>"u",this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=uw(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=Mw()),this.origin=this.options.origin,this.origin||(window?.origin&&window.origin!=="null"?this.origin=window.origin:this.origin="http://localhost"),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree){this.routeTree=this.options.routeTree;let m;this.resolvePathCache=Ma(1e3),m=this.buildRouteTree(),this.setRoutes(m)}if(!this.stores&&this.latestLocation){const m=this.getStoreConfig(this);this.batch=m.batch,this.stores=Tw(zw(this.latestLocation),m),gw(this)}let d=!1;const p=this.options.basepath??"/",g=this.options.rewrite;if(u||l!==p||c!==g){this.basepath=p;const m=[],y=wv(p);y&&y!=="/"&&m.push(Ew({basepath:p})),g&&m.push(g),this.rewrite=m.length===0?void 0:m.length===1?m[0]:ww(m),this.history&&this.updateLatestLocation(),d=!0}d&&this.stores&&this.stores.location.set(this.latestLocation),typeof window<"u"&&"CSS"in window&&typeof window.CSS?.supports=="function"&&(this.isViewTransitionTypesSupported=window.CSS.supports("selector(:active-view-transition-type(a)"))},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{const s=nw(this.routeTree,this.options.caseSensitive,(a,l)=>{a.init({originalIndex:l})});return this.options.routeMasks&&XS(this.options.routeMasks,s.processedTree),s},this.subscribe=(s,a)=>{const l={eventType:s,fn:a};return this.subscribers.add(l),()=>{this.subscribers.delete(l)}},this.emit=s=>
9{this.subscribers.forEach(a=>{a.eventType===s.type&&a.fn(s)})},this.parseLocation=(s,a)=>{const l=({pathname:p,search:g,hash:m,href:y,state:b})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(p)){const O=this.options.parseSearch(g),U=this.options.stringifySearch(O);return{href:p+U+m,publicHref:p+U+m,pathname:ga(p).path,external:!1,searchStr:U,search:ts(a?.search,O),hash:ga(m.slice(1)).path,state:is(a?.state,b)}}const _=new URL(y,this.origin),w=Jh(this.rewrite,_),A=this.options.parseSearch(w.search),R=this.options.stringifySearch(A);return w.search=R,{href:w.href.replace(w.origin,""),publicHref:y,pathname:ga(w.pathname).path,external:!!this.rewrite&&w.origin!==this.origin,searchStr:R,search:ts(a?.search,A),hash:ga(w.hash.slice(1)).path,state:is(a?.state,b)}},u=l(s),{__tempLocation:c,__tempKey:d}=u.state;if(c&&(!d||d===this.tempLocationKey)){const p=l(c);return p.state.key=u.state.key,p.state.__TSR_key=u.state.__TSR_key,delete p.state.__tempLocation,{...p,maskedLocation:u}}return u},this.resolvePathWithBase=(s,a)=>lw({base:s,to:Sf(a),trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(s,a,l)=>typeof s=="string"?this.matchRoutesInternal({pathname:s,search:a},l):this.matchRoutesInternal(s,a),this.getMatchedRoutes=s=>Pw({pathname:s,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=s=>{const a=this.getMatch(s);a&&(a.abortController.abort(),clearTimeout(a._nonReactive.pendingTimeout),a._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{this.stores.pendingIds.get().forEach(s=>{this.cancelMatch(s)}),this.stores.matchesId.get().forEach(s=>{if(this.stores.pendingMatchStores.has(s))return;const a=this.stores.matchStores.get(s)?.get();a&&(a.status==="pending"||a.isFetching==="loader")&&this.cancelMatch(s)})},this.buildLocation=s=>{const a=(u={})=>{const c=u._fromLocation||this.pendingBuiltLocation||this.latestLocation,d=this.matchRoutesLightweight(c);u.from;const p=u.unsafeRelative==="path"?c.pathname:u.from??d.fullPath,g=this.resolvePathWithBase(p,"."),m=d.search,y=Object.assign(Object.create(null),d.params),b=u.to?this.resolvePathWithBase(g,`${u.to}`):this.resolvePathWithBase(g,"."),_=u.params===!1||u.params===null?Object.create(null):(u.params??!0)===!0?y:Object.assign(y,Or(u.params,y)),w=this.getMatchedRoutes(b);let A=w.matchedRoutes;if((!w.foundRoute||w.foundRoute.path!=="/"&&w.routeParams["**"])&&this.options.notFoundRoute&&(A=[...A,this.options.notFoundRoute]),Object.keys(_).length>0)for(const le of A){const se=le.options.params?.stringify??le.options.stringifyParams;if(se)try{Object.assign(_,se(_))}catch{}}const R=s.leaveParams?b:ga(Yy({path:b,params:_,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path;let O=m;if(s._includeValidateSearch&&this.options.search?.strict){const le={};A.forEach(se=>{if(se.options.validateSearch)try{Object.assign(le,Cl(se.options.validateSearch,{...le,...O}))}catch{}}),O=le}O=Bw({search:O,dest:u,destRoutes:A,_includeValidateSearch:s._includeValidateSearch}),O=ts(m,O);const U=this.options.stringifySearch(O),j=u.hash===!0?c.hash:u.hash?Or(u.hash,c.hash):void 0,L=j?`#${j}`:"";let Q=u.state===!0?c.state:u.state?Or(u.state,c.state):{};Q=is(c.state,Q);const V=`${R}${U}${L}`;let q,K,J=!1;if(this.rewrite){const le=new URL(V,this.origin),se=Rv(this.rewrite,le);q=le.href.replace(le.origin,""),se.origin!==this.origin?(K=se.href,J=!0):K=se.pathname+se.search+se.hash}else q=FS(V),K=q;return{publicHref:K,href:q,pathname:R,search:O,searchStr:U,state:Q,hash:j??"",external:J,unmaskOnReload:u.unmaskOnReload}},l=(u={},c)=>{const d=a(u);let p=c?a(c):void 0;if(!p){const g=Object.create(null);if(this.options.routeMasks){const m=ZS(d.pathname,this.processedTree);if(m){Object.assign(g,m.rawParams);const{from:y,params:b,..._}=m.route,w=b===!1||b===null?Object.create(null):(b??!0)===!0?g:Object.assign(g,Or(b,g));c={from:s.from,..._,params:w},p=a(c)}}}return p&&(d.maskedLocation=p),d};return s.mask?l(s,{from:s.from,...s.mask}):l(s)},this.commitLocation=async({viewTransition:s,ignoreBlocker:a,...l})=>{const u=()=>{const p=["key","__TSR_key","__TSR_index","__hashScrollIntoViewOptions"];p.forEach(m=>{l.state[m]=this.latestLocation.state[m]}
9);const g=jt(l.state,this.latestLocation.state);return p.forEach(m=>{delete l.state[m]}),g},c=kr(this.latestLocation.href)===kr(l.href);let d=this.commitLocationPromise;if(this.commitLocationPromise=fs(()=>{d?.resolve(),d=void 0}),c&&u())this.load();else{let{maskedLocation:p,hashScrollIntoView:g,...m}=l;p&&(m={...p,state:{...p.state,__tempKey:void 0,__tempLocation:{...m,search:m.searchStr,state:{...m.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(m.unmaskOnReload??this.options.unmaskOnReload??!1)&&(m.state.__tempKey=this.tempLocationKey)),m.state.__hashScrollIntoViewOptions=g??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=s,this.history[l.replace?"replace":"push"](m.publicHref,m.state,{ignoreBlocker:a})}return this.resetNextScroll=l.resetScroll??!0,this.history.subscribers.size||this.load(),this.commitLocationPromise},this.buildAndCommitLocation=({replace:s,resetScroll:a,hashScrollIntoView:l,viewTransition:u,ignoreBlocker:c,href:d,...p}={})=>{if(d){const y=this.history.location.state.__TSR_index,b=Dl(d,{__TSR_index:s?y:y+1}),_=new URL(b.pathname,this.origin);p.to=Jh(this.rewrite,_).pathname,p.search=this.options.parseSearch(b.search),p.hash=b.hash.slice(1)}const g=this.buildLocation({...p,_includeValidateSearch:!0});this.pendingBuiltLocation=g;const m=this.commitLocation({...g,viewTransition:u,replace:s,resetScroll:a,hashScrollIntoView:l,ignoreBlocker:c});return Promise.resolve().then(()=>{this.pendingBuiltLocation===g&&(this.pendingBuiltLocation=void 0)}),m},this.navigate=async({to:s,reloadDocument:a,href:l,publicHref:u,...c})=>{let d=!1;if(l)try{new URL(`${l}`),d=!0}catch{}if(d&&!a&&(a=!0),a){if(s!==void 0||!l){const g=this.buildLocation({to:s,...c});l=l??g.publicHref,u=u??g.publicHref}const p=!d&&u?u:l;if(Ml(p,this.protocolAllowlist))return Promise.resolve();if(!c.ignoreBlocker){const g=this.history.getBlockers?.()??[];for(const m of g)if(m?.blockerFn&&await m.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return Promise.resolve()}return c.replace?window.location.replace(p):window.location.href=p,Promise.resolve()}return this.buildAndCommitLocation({...c,href:l,to:s,_isNavigate:!0})},this.beforeLoad=()=>{this.cancelMatches(),this.updateLatestLocation();const s=this.matchRoutes(this.latestLocation),a=this.stores.cachedMatches.get().filter(l=>!s.some(u=>u.id===l.id));this.batch(()=>{this.stores.status.set("pending"),this.stores.statusCode.set(200),this.stores.isLoading.set(!0),this.stores.location.set(this.latestLocation),this.stores.setPending(s),this.stores.setCached(a)})},this.load=async s=>{let a,l,u;const c=this.stores.resolvedLocation.get()??this.stores.location.get();for(u=new Promise(p=>{this.startTransition(async()=>{try{this.beforeLoad();const g=this.latestLocation,m=fi(g,this.stores.resolvedLocation.get());this.stores.redirect.get()||this.emit({type:"onBeforeNavigate",...m}),this.emit({type:"onBeforeLoad",...m}),await em({router:this,sync:s?.sync,forceStaleReload:c.href===g.href,matches:this.stores.pendingMatches.get(),location:g,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{let y=null,b=null,_=null,w=null;this.batch(()=>{const A=this.stores.pendingMatches.get(),R=A.length,O=this.stores.matches.get();y=R?O.filter(L=>!this.stores.pendingMatchStores.has(L.id)):null;const U=new Set;for(const L of this.stores.pendingMatchStores.values())L.routeId&&U.add(L.routeId);const j=new Set;for(const L of this.stores.matchStores.values())L.routeId&&j.add(L.routeId);b=R?O.filter(L=>!U.has(L.routeId)):null,_=R?A.filter(L=>!j.has(L.routeId)):null,w=R?A.filter(L=>j.has(L.routeId)):O,this.stores.isLoading.set(!1),this.stores.loadedAt.set(Date.now()),R&&(this.stores.setMatches(A),this.stores.setPending([]),this.stores.setCached([...this.stores.cachedMatches.get(),...y.filter(L=>L.status!=="error"&&L.status!=="notFound"&&L.status!=="redirected")]),this.clearExpiredCache())});for(const[A,R]of[[b,"onLeave"],[_,"onEnter"],[w,"onStay"]])if(A)for(const O of A)this.looseRoutesById[O.routeId].options[R]?.(O)})})}})}catch(g){Mt(g)?(a=g,this.navigate({...a.options,replace:!0,ignoreBlocker:!0})):ct(g)&&(l=g);const m=a?a.status:l?404:this.stores.matches.get().some(y=>y.status==="error")?500:200;this.batch(()=>{this.stores.statusCode.set(m),this.stores.redirect.set(a)})}this.latestLoadPromise===u&&(this.commitLocationPromise?.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),p()})}),this.latestLoadPromise=u,await u;this.latestLoadPromise&&u!==this.latestLoadPromise;)await this.latestLoadPromise;let d;this.hasNotFoundMatch()?d=404:this.stores.matches.get().some(p=>p.status==="error")&&(d=500),d!==void 0&&this.stores.statusCode.set(d)},this.startViewTransition=s=>{const a=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,a&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let l;if(typeof a=="object"&&this.isViewTransitionTypesSupported){const u=this.latestLocation,c=this.stores.resolvedLocation.get(),d=typeof a.types=="function"?a.types(fi(u,c)):a.types;if(d===!1){s();return}l={update:s,types:d}}else l=s;document.startViewTransition(l)}else s()},this.updateMatch=(s,a)=>{this.startTransition(()=>
9{const l=this.stores.pendingMatchStores.get(s);if(l){l.set(a);return}const u=this.stores.matchStores.get(s);if(u){u.set(a);return}const c=this.stores.cachedMatchStores.get(s);if(c){const d=a(c.get());d.status==="redirected"?this.stores.cachedMatchStores.delete(s)&&this.stores.cachedIds.set(p=>p.filter(g=>g!==s)):c.set(d)}})},this.getMatch=s=>this.stores.cachedMatchStores.get(s)?.get()??this.stores.pendingMatchStores.get(s)?.get()??this.stores.matchStores.get(s)?.get(),this.invalidate=s=>{const a=l=>s?.filter?.(l)??!0?{...l,invalid:!0,...s?.forcePending||l.status==="error"||l.status==="notFound"?{status:"pending",error:void 0}:void 0}:l;return this.batch(()=>{this.stores.setMatches(this.stores.matches.get().map(a)),this.stores.setCached(this.stores.cachedMatches.get().map(a)),this.stores.setPending(this.stores.pendingMatches.get().map(a))}),this.shouldViewTransition=!1,this.load({sync:s?.sync})},this.getParsedLocationHref=s=>s.publicHref||"/",this.resolveRedirect=s=>{const a=s.headers.get("Location");if(!s.options.href||s.options._builtLocation){const l=s.options._builtLocation??this.buildLocation(s.options),u=this.getParsedLocationHref(l);s.options.href=u,s.headers.set("Location",u)}else if(a)try{const l=new URL(a);if(this.origin&&l.origin===this.origin){const u=l.pathname+l.search+l.hash;s.options.href=u,s.headers.set("Location",u)}}catch{}if(s.options.href&&!s.options._builtLocation&&Ml(s.options.href,this.protocolAllowlist))throw new Error("Redirect blocked: unsafe protocol");return s.headers.get("Location")||s.headers.set("Location",s.options.href),s},this.clearCache=s=>{const a=s?.filter;a!==void 0?this.stores.setCached(this.stores.cachedMatches.get().filter(l=>!a(l))):this.stores.setCached([])},this.clearExpiredCache=()=>{const s=Date.now(),a=l=>{const u=this.looseRoutesById[l.routeId];if(!u.options.loader)return!0;const c=(l.preload?u.options.preloadGcTime??this.options.defaultPreloadGcTime:u.options.gcTime??this.options.defaultGcTime)??300*1e3;return l.status==="error"?!0:s-l.updatedAt>=c};this.clearCache({filter:a})},this.loadRouteChunk=Ua,this.preloadRoute=async s=>{const a=s._builtLocation??this.buildLocation(s);let l=this.matchRoutes(a,{throwOnError:!0,preload:!0,dest:s});const u=new Set([...this.stores.matchesId.get(),...this.stores.pendingIds.get()]),c=new Set([...u,...this.stores.cachedIds.get()]),d=l.filter(p=>!c.has(p.id));if(d.length){const p=this.stores.cachedMatches.get();this.stores.setCached([...p,...d])}try{return l=await em({router:this,matches:l,location:a,preload:!0,updateMatch:(p,g)=>{u.has(p)?l=l.map(m=>m.id===p?g(m):m):this.updateMatch(p,g)}}),l}catch(p){if(Mt(p))return p.options.reloadDocument?void 0:await this.preloadRoute({...p.options,_fromLocation:a});ct(p)||console.error(p);return}},this.matchRoute=(s,a)=>{const l={...s,to:s.to?this.resolvePathWithBase(s.from||"",s.to):void 0,params:s.params||{},leaveParams:!0},u=this.buildLocation(l);if(a?.pending&&this.stores.status.get()!=="pending")return!1;const c=(a?.pending===void 0?!this.stores.isLoading.get():a.pending)?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),d=WS(u.pathname,a?.caseSensitive??!1,a?.fuzzy??!1,c.pathname,this.processedTree);return!d||s.params&&!jt(d.rawParams,s.params,{partial:!0})?!1:a?.includeSearch??!0?jt(c.search,u.search,{partial:!0})?d.rawParams:!1:d.rawParams},this.hasNotFoundMatch=()=>this.stores.matches.get().some(s=>s.status==="notFound"||s.globalNotFound),this.getStoreConfig=t,this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...e,caseSensitive:e.caseSensitive??!1,notFoundMode:e.notFoundMode??"fuzzy",stringifySearch:e.stringifySearch??vw,parseSearch:e.parseSearch??mw,protocolAllowlist:e.protocolAllowlist??GS}),typeof document<"u"&&(self.__TSR_ROUTER__=this)}isShell(){return!!this.options.isShell}isPrerendering(){return!!this.options.isPrerendering}get state(){return this.stores.__store.get()}setRoutes({routesById:e,routesByPath:t,processedTree:s}){this.routesById=e,this.routesByPath=t,this.processedTree=s;const a=this.options.notFoundRoute;a&&(a.init({originalIndex:99999999999}),this.routesById[a.id]=a)}get looseRoutesById(){return this.routesById}getParentContext(e){return e?.id?e.context??this.options.context??void 0:this.options.context??void 0}matchRoutesInternal(e,t){const s=this.getMatchedRoutes(e.pathname),{foundRoute:a,routeParam
9s:l,parsedParams:u}=s;let{matchedRoutes:c}=s,d=!1;(a?a.path!=="/"&&l["**"]:kr(e.pathname))&&(this.options.notFoundRoute?c=[...c,this.options.notFoundRoute]:d=!0);const p=d?qw(this.options.notFoundMode,c):void 0,g=new Array(c.length),m=new Map;for(const y of this.stores.matchStores.values())y.routeId&&m.set(y.routeId,y.get());for(let y=0;y<c.length;y++){const b=c[y],_=g[y-1];let w,A,R;{const Ce=_?.search??e.search,Ye=_?._strictSearch??void 0;try{const Be=Cl(b.options.validateSearch,{...Ce})??void 0;w={...Ce,...Be},A={...Ye,...Be},R=void 0}catch(Be){let B=Be;if(Be instanceof Nl||(B=new Nl(Be.message,{cause:Be})),t?.throwOnError)throw B;w=Ce,A={},R=B}}const O=b.options.loaderDeps?.({search:w})??"",U=O?JSON.stringify(O):"",{interpolatedPath:j,usedParams:L}=Yy({path:b.fullPath,params:l,decoder:this.pathParamsDecoder,server:this.isServer}),Q=b.id+j+U,V=this.getMatch(Q),q=m.get(b.id),K=V?._strictParams??L;let J;if(!V)try{im(b,L,u,K)}catch(Ce){if(ct(Ce)||Mt(Ce)?J=Ce:J=new Lw(Ce.message,{cause:Ce}),t?.throwOnError)throw J}Object.assign(l,K);const le=q?"stay":"enter";let se;if(V)se={...V,cause:le,params:q?.params??l,_strictParams:K,search:ts(q?q.search:V.search,w),_strictSearch:A};else{const Ce=b.options.loader||b.options.beforeLoad||b.lazyFn||xv(b)?"pending":"success";se={id:Q,ssr:b.options.ssr,index:y,routeId:b.id,params:q?.params??l,_strictParams:K,pathname:j,updatedAt:Date.now(),search:q?ts(q.search,w):w,_strictSearch:A,searchError:void 0,status:Ce,isFetching:!1,error:void 0,paramsError:J,__routeContext:void 0,_nonReactive:{loadPromise:fs()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:le,loaderDeps:q?is(q.loaderDeps,O):O,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:b.options.staticData||{},fullPath:b.fullPath}}t?.preload||(se.globalNotFound=p===b.id),se.searchError=R;const me=this.getParentContext(_);se.context={...me,...se.__routeContext,...se.__beforeLoadContext},g[y]=se}for(let y=0;y<g.length;y++){const b=g[y],_=this.looseRoutesById[b.routeId],w=this.getMatch(b.id),A=m.get(b.routeId);if(b.params=A?ts(A.params,l):l,!w){const R=g[y-1],O=this.getParentContext(R);if(_.options.context){const U={deps:b.loaderDeps,params:b.params,context:O??{},location:e,navigate:j=>this.navigate({...j,_fromLocation:e}),buildLocation:this.buildLocation,cause:b.cause,abortController:b.abortController,preload:!!b.preload,matches:g,routeId:_.id};b.__routeContext=_.options.context(U)??void 0}b.context={...O,...b.__routeContext,...b.__beforeLoadContext}}}return g}matchRoutesLightweight(e){const{matchedRoutes:t,routeParams:s,parsedParams:a}=this.getMatchedRoutes(e.pathname),l=ka(t),u={...e.search};for(const m of t)try{Object.assign(u,Cl(m.options.validateSearch,u))}catch{}const c=ka(this.stores.matchesId.get()),d=c&&this.stores.matchStores.get(c)?.get(),p=d&&d.routeId===l.id&&d.pathname===e.pathname;let g;if(p)g=d.params;else{const m=Object.assign(Object.create(null),s);for(const y of t)try{im(y,s,a??{},m)}catch{}g=m}return{matchedRoutes:t,fullPath:l.fullPath,search:u,params:g}}},Nl=class extends Error{},Lw=class extends Error{};function zw(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:e,matches:[],statusCode:200}}function Cl(e,t){if(e==null)return{};if("~standard"in e){const s=e["~standard"].validate(t);if(s instanceof Promise)throw new Nl("Async validation not supported");if(s.issues)throw new Nl(JSON.stringify(s.issues,void 0,2),{cause:s});return s.value}return"parse"in e?e.parse(t):typeof e=="function"?e(t):{}}function Pw({pathname:e,routesById:t,processedTree:s}){const a=Object.create(null),l=kr(e);let u,c;const d=ew(l,s,!0);return d&&(u=d.route,Object.assign(a,d.rawParams),c=Object.assign(Object.create(null),d.parsedParams)),{matchedRoutes:d?.branch||[t.__root__],routeParams:a,foundRoute:u,parsedParams:c}}function Bw({search:e,dest:t,destRoutes:s,_includeValidateSearch:a}){return Hw(s)(e,t,a??!1)}function Hw(e){const t={dest:null,_includeValidateSearch:!1,middlewares:[]};for(const l of e){if("search"in l.options)l.options.search?.middlewares&&t.middlewares.push(...l.options.search.middlewares);else if(l.options.preSearchFilters||l.options.postSearchFilters){const u=({search:c,next:d})=>{let p=c;
9"preSearchFilters"in l.options&&l.options.preSearchFilters&&(p=l.options.preSearchFilters.reduce((m,y)=>y(m),c));const g=d(p);return"postSearchFilters"in l.options&&l.options.postSearchFilters?l.options.postSearchFilters.reduce((m,y)=>y(m),g):g};t.middlewares.push(u)}if(l.options.validateSearch){const u=({search:c,next:d})=>{const p=d(c);if(!t._includeValidateSearch)return p;try{return{...p,...Cl(l.options.validateSearch,p)??void 0}}catch{return p}};t.middlewares.push(u)}}const s=({search:l})=>{const u=t.dest;return u.search?u.search===!0?l:Or(u.search,l):{}};t.middlewares.push(s);const a=(l,u,c)=>{if(l>=c.length)return u;const d=c[l];return d({search:u,next:g=>a(l+1,g,c)})};return function(u,c,d){return t.dest=c,t._includeValidateSearch=d,a(0,u,t.middlewares)}}function qw(e,t){if(e!=="root")for(let s=t.length-1;s>=0;s--){const a=t[s];if(a.children)return a.id}return cs}function im(e,t,s,a){const l=e.options.params?.parse??e.options.parseParams;if(l)if(e.options.skipRouteOnParseError)for(const u in t)u in s&&(a[u]=s[u]);else{const u=l(a);Object.assign(a,u)}}var vn=Symbol.for("TSR_DEFERRED_PROMISE");function Iw(e,t){const s=e;return s[vn]||(s[vn]={status:"pending"},s.then(a=>{s[vn].status="success",s[vn].data=a}).catch(a=>{s[vn].status="error",s[vn].error={data:Dw(a),__isServerError:!0}})),s}var $w="Error preloading route! ☝️";function am(e,t){if(e)return typeof e=="string"?e:e[t]}function Gw(e){return typeof e=="string"?{href:e,crossOrigin:void 0}:e}function Vw(e){if(e.tag!=="link")return;const t=e.attrs?.rel,s=e.attrs?.href;if(typeof s=="string"&&(typeof t=="string"?t.split(/\s+/):[]).includes("stylesheet"))return s}function Kw(e,t){const s=Vw(t);return!!s&&e?.inlineCss?.styles[s]!==void 0}var kv=class{get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(e){if(this.init=t=>{this.originalIndex=t.originalIndex;const s=this.options,a=!s?.path&&!s?.id;this.parentRoute=this.options.getParentRoute?.(),a?this._path=cs:this.parentRoute||Ut();let l=a?cs:s?.path;l&&l!=="/"&&(l=Sv(l));const u=s?.id||l;let c=a?cs:Al([this.parentRoute.id==="__root__"?"":this.parentRoute.id,u]);l==="__root__"&&(l="/"),c!=="__root__"&&(c=Al(["/",c]));const d=c==="__root__"?"/":Al([this.parentRoute.fullPath,l]);this._path=l,this._id=c,this._fullPath=d,this._to=kr(d)},this.addChildren=t=>this._addFileChildren(t),this._addFileChildren=t=>(Array.isArray(t)&&(this.children=t),typeof t=="object"&&t!==null&&(this.children=Object.values(t)),this),this._addFileTypes=()=>this,this.updateLoader=t=>(Object.assign(this.options,t),this),this.update=t=>(Object.assign(this.options,t),this),this.lazy=t=>(this.lazyFn=t,this),this.redirect=t=>Tv({from:this.fullPath,...t}),this.options=e||{},this.isRoot=!e?.getParentRoute,e?.id&&e?.path)throw new Error("Route cannot have both an 'id' and a 'path' option.")}},Yw=class extends kv{constructor(e){super(e)}};function Fw(e){if(typeof document<"u"&&document.querySelector){const t=e.stores.location.get(),s=t.state.__hashScrollIntoViewOptions??!0;if(s&&t.hash!==""){const a=document.getElementById(t.hash);a&&a.scrollIntoView(s)}}}var Qw=(e=>(e[e.AggregateError=1]="AggregateError",e[e.ArrowFunction=2]="ArrowFunction",e[e.ErrorPrototypeStack=4]="ErrorPrototypeStack",e[e.ObjectAssign=8]="ObjectAssign",e[e.BigIntTypedArray=16]="BigIntTypedArray",e[e.RegExp=32]="RegExp",e))(Qw||{}),Yn=Symbol.asyncIterator,jv=Symbol.hasInstance,di=Symbol.isConcatSpreadable,Fn=Symbol.iterator,Mv=Symbol.match,Uv=Symbol.matchAll,Dv=Symbol.replace,Nv=Symbol.search,Lv=Symbol.species,zv=Symbol.split,Pv=Symbol.toPrimitive,pi=Symbol.toStringTag,Bv=Symbol.unscopables,Hv={[Yn]:0,[jv]:1,[di]:2,[Fn]:3,[Mv]:4,[Uv]:5,[Dv]:6,[Nv]:7,[Lv]:8,[zv]:9,[Pv]:10,[pi]:11,[Bv]:12},Jw={0:Yn,1:jv,2:di,3:Fn,4:Mv,5:Uv,6:Dv,7:Nv,8:Lv,9:zv,10:Pv,11:pi,12:Bv},E=void 0,Xw={2:!0,3:!1,1:E,0:null,4:-0,5:Number.POSITIVE_INFINITY,6:Number.NEGATIVE_INFINITY,7:Number.NaN},Zw={0:"Error",1:"EvalError",2:"RangeError",3:"ReferenceError",4:"SyntaxError",5:"TypeError",6:"URIError"},Ww={0:Error,1:EvalError,2:RangeError,3:ReferenceError,4:SyntaxError,5:TypeError,6:URIError};function Te(e,t,s,a,l,u,c,d,p,g,m,y){return{t:e,i:t,s,c:a,m:l,p:u,e:c,a:d,f:p,b:g,o:m,l:y}}function Mr(e){return Te(2,E,e,E,E,E,E,E,E,E,E,E)}var qv=Mr(2),Iv=Mr(3),eE=Mr(1),tE=Mr(0),nE=Mr(4),rE=Mr(5),sE=Mr(6),iE=Mr(7);function aE(e){switch(e){case'"':return'\\"';case"\\":return"\\\\";case`
10`:return"\\n";case"\r":return"\\r";case"\b":return"\\b";case"	":return"\\t";case"\f":return"\\f";case"<":return"\\x3C";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:return E}}function Ur(e){let t="",s=0,a;for(let l=0,u=e.length;l<u;l++)a=aE(e[l]),a&&(t+=e.slice(s,l)+a,s=l+1);return s===0?t=e:t+=e.slice(s),t}function oE(e){switch(e){case"\\\\":return"\\";case'\\"':return'"';case"\\n":return`
11`;case"\\r":return"\r";case"\\b":return"\b";case"\\t":return"	";case"\\f":return"\f";case"\\x3C":return"<";case"\\u2028":return"\u2028";case"\\u2029":return"\u2029";default:return e}}function Dr(e){return e.replace(/(\\\\|\\"|\\n|\\r|\\b|\\t|\\f|\\u2028|\\u2029|\\x3C)/g,oE)}var gl="__SEROVAL_REFS__",$v=new Map,ci=new Map;function Gv(e){return $v.has(e)}function lE(e){return ci.has(e)}function uE(e){if(Gv(e))return $v.get(e);throw new HE(e)}function cE(e){if(lE(e))return ci.get(e);throw new qE(e)}typeof globalThis<"u"?Object.defineProperty(globalThis,gl,{value:ci,configurable:!0,writable:!1,enumerable:!1}):typeof window<"u"?Object.defineProperty(window,gl,{value:ci,configurable:!0,writable:!1,enumerable:!1}):typeof self<"u"?Object.defineProperty(self,gl,{value:ci,configurable:!0,writable:!1,enumerable:!1}):typeof global<"u"&&Object.defineProperty(global,gl,{value:ci,configurable:!0,writable:!1,enumerable:!1});function Ef(e){return e instanceof EvalError?1:e instanceof RangeError?2:e instanceof ReferenceError?3:e instanceof SyntaxError?4:e instanceof TypeError?5:e instanceof URIError?6:0}function hE(e){let t=Zw[Ef(e)];return e.name!==t?{name:e.name}:e.constructor.name!==t?{name:e.constructor.name}:{}}function Vv(e,t){let s=hE(e),a=Object.getOwnPropertyNames(e);for(let l=0,u=a.length,c;
11l<u;l++)c=a[l],c!=="name"&&c!=="message"&&(c==="stack"?t&4&&(s=s||{},s[c]=e[c]):(s=s||{},s[c]=e[c]));return s}function Kv(e){return Object.isFrozen(e)?3:Object.isSealed(e)?2:Object.isExtensible(e)?0:1}function fE(e){switch(e){case Number.POSITIVE_INFINITY:return rE;case Number.NEGATIVE_INFINITY:return sE}return e!==e?iE:Object.is(e,-0)?nE:Te(0,E,e,E,E,E,E,E,E,E,E,E)}function Yv(e){return Te(1,E,Ur(e),E,E,E,E,E,E,E,E,E)}function dE(e){return Te(3,E,""+e,E,E,E,E,E,E,E,E,E)}function pE(e){return Te(4,e,E,E,E,E,E,E,E,E,E,E)}function gE(e,t){let s=t.valueOf();return Te(5,e,s!==s?"":t.toISOString(),E,E,E,E,E,E,E,E,E)}function yE(e,t){return Te(6,e,E,Ur(t.source),t.flags,E,E,E,E,E,E,E)}function mE(e,t){return Te(17,e,Hv[t],E,E,E,E,E,E,E,E,E)}function vE(e,t){return Te(18,e,Ur(uE(t)),E,E,E,E,E,E,E,E,E)}function bE(e,t,s){return Te(25,e,s,Ur(t),E,E,E,E,E,E,E,E)}function _E(e,t,s){return Te(9,e,E,E,E,E,E,s,E,E,Kv(t),E)}function SE(e,t){return Te(21,e,E,E,E,E,E,E,t,E,E,E)}function wE(e,t,s){return Te(15,e,E,t.constructor.name,E,E,E,E,s,t.byteOffset,E,t.length)}function EE(e,t,s){return Te(16,e,E,t.constructor.name,E,E,E,E,s,t.byteOffset,E,t.byteLength)}function TE(e,t,s){return Te(20,e,E,E,E,E,E,E,s,t.byteOffset,E,t.byteLength)}function RE(e,t,s){return Te(13,e,Ef(t),E,Ur(t.message),s,E,E,E,E,E,E)}function AE(e,t,s){return Te(14,e,Ef(t),E,Ur(t.message),s,E,E,E,E,E,E)}function OE(e,t){return Te(7,e,E,E,E,E,E,t,E,E,E,E)}function CE(e,t){return Te(28,E,E,E,E,E,E,[e,t],E,E,E,E)}function xE(e,t){return Te(30,E,E,E,E,E,E,[e,t],E,E,E,E)}function kE(e,t,s){return Te(31,e,E,E,E,E,E,s,t,E,E,E)}function jE(e,t){return Te(32,e,E,E,E,E,E,E,t,E,E,E)}function ME(e,t){return Te(33,e,E,E,E,E,E,E,t,E,E,E)}function UE(e,t){return Te(34,e,E,E,E,E,E,E,t,E,E,E)}function DE(e,t,s,a){return Te(35,e,s,E,E,E,E,t,E,E,E,a)}var NE={parsing:1,serialization:2,deserialization:3};function LE(e){return`Seroval Error (step: ${NE[e]})`}var zE=(e,t)=>LE(e),Fv=class extends Error{constructor(e,t){super(zE(e)),this.cause=t}},om=class extends Fv{constructor(e){super("parsing",e)}},PE=class extends Fv{constructor(e){super("deserialization",e)}};function Qn(e){return`Seroval Error (specific: ${e})`}var Jl=class extends Error{constructor(t){super(Qn(1)),this.value=t}},Qv=class extends Error{constructor(t){super(Qn(2))}},BE=class extends Error{constructor(e){super(Qn(3))}},Va=class extends Error{constructor(e){super(Qn(4))}},HE=class extends Error{constructor(e){super(Qn(5)),this.value=e}},qE=class extends Error{constructor(e){super(Qn(6))}},IE=class extends Error{constructor(e){super(Qn(7))}},Nr=class extends Error{constructor(e){super(Qn(8))}},$E=class extends Error{constructor(t){super(Qn(9))}},GE=class{constructor(e,t){this.value=e,this.replacement=t}},Xl=()=>{let e={p:0,s:0,f:0};return e.p=new Promise((t,s)=>{e.s=t,e.f=s}),e},VE=(e,t)=>{e.s(t),e.p.s=1,e.p.v=t},KE=(e,t)=>{e.f(t),e.p.s=2,e.p.v=t};Xl.toString();VE.toString();KE.toString();var YE=()=>{let e=[],t=[],s=!0,a=!1,l=0,u=(p,g,m)=>{for(m=0;m<l;m++)t[m]&&t[m][g](p)},c=(p,g,m,y)=>{for(g=0,m=e.length;g<m;g++)y=e[g],!s&&g===m-1?p[a?"return":"throw"](y):p.next(y)},d=(p,g)=>(s&&(g=l++,t[g]=p),c(p),()=>{s&&(t[g]=t[l],t[l--]=void 0)});return{__SEROVAL_STREAM__:!0,on:p=>d(p),next:p=>{s&&(e.push(p),u(p,"next"))},throw:p=>{s&&(e.push(p),u(p,"throw"),s=!1,a=!1,t.length=0)},return:p=>{s&&(e.push(p),u(p,"return"),s=!1,a=!0,t.length=0)}}},FE=e=>t=>()=>{let s=0,a={[e]:()=>a,next:()=>{if(s>t.d)return{done:!0,value:void 0};let l=s++,u=t.v[l];if(l===t.t)throw u;return{done:l===t.d,value:u}}};return a},QE=(e,t)=>s=>()=>{let a=0,l=-1,u=!1,c=[],d=[],p=(m=0,y=d.length)=>{for(;m<y;m++)d[m].s({done:!0,value:void 0})};s.on({next:m=>{let y=d.shift();y&&y.s({done:!1,value:m}),c.push(m)},throw:m=>{let y=d.shift();y&&y.f(m),p(),l=c.length,u=!0,c.push(m)},return:m=>{let y=d.shift();y&&y.s({done:!0,value:m}),p(),l=c.length,c.push(m)}});let g={[e]:()=>g,next:()=>{if(l===-1){let b=a++;if(b>=c.length){let _=t();return d.push(_),_.p}return{done:!1,value:c[b]}}if(a>l)return{done:!0,value:void 0};let m=a++,y=c[m];if(m!==l)return{done:!1,value:y};if(u)throw y;return{done:!0,value:y}}};return g},Jv=e=>{let t=atob(e),s=t.length,a=new Uint8Array(s);for(let l=0;l<s;l++)a[l]=t.charCodeAt(l);return a.buffer};Jv.toString();
11function JE(e){return"__SEROVAL_SEQUENCE__"in e}function Xv(e,t,s){return{__SEROVAL_SEQUENCE__:!0,v:e,t,d:s}}function XE(e){let t=[],s=-1,a=-1,l=e[Fn]();for(;;)try{let u=l.next();if(t.push(u.value),u.done){a=t.length-1;break}}catch(u){s=t.length,t.push(u)}return Xv(t,s,a)}var ZE=FE(Fn);function WE(e){return ZE(e)}var eT={},tT={},nT={0:{},1:{},2:{},3:{},4:{},5:{}};function Zl(e){return"__SEROVAL_STREAM__"in e}function ds(){return YE()}function rT(e){let t=ds(),s=e[Yn]();async function a(){try{let l=await s.next();l.done?t.return(l.value):(t.next(l.value),await a())}catch(l){t.throw(l)}}return a().catch(()=>{}),t}var sT=QE(Yn,Xl);function iT(e){return sT(e)}async function aT(e){try{return[1,await e]}catch(t){return[0,t]}}function oT(e,t){return{plugins:t.plugins,mode:e,marked:new Set,features:63^(t.disabledFeatures||0),refs:t.refs||new Map,depthLimit:t.depthLimit||1e3}}function xl(e,t){e.marked.add(t)}function lT(e,t){let s=e.refs.size;return e.refs.set(t,s),s}function Wl(e,t){let s=e.refs.get(t);return s!=null?(xl(e,s),{type:1,value:pE(s)}):{type:0,value:lT(e,t)}}function Tf(e,t){let s=Wl(e,t);return s.type===1?s:Gv(t)?{type:2,value:vE(s.value,t)}:s}function os(e,t){let s=Tf(e,t);if(s.type!==0)return s.value;if(t in Hv)return mE(s.value,t);throw new Jl(t)}function eu(e,t){let s=Wl(e,nT[t]);return s.type===1?s.value:Te(26,s.value,t,E,E,E,E,E,E,E,E,E)}function uT(e){let t=Wl(e,eT);return t.type===1?t.value:Te(27,t.value,E,E,E,E,E,E,os(e,Fn),E,E,E)}function cT(e){let t=Wl(e,tT);return t.type===1?t.value:Te(29,t.value,E,E,E,E,E,[eu(e,1),os(e,Yn)],E,E,E,E)}function hT(e,t,s,a){return Te(s?11:10,e,E,E,E,a,E,E,E,E,Kv(t),E)}function fT(e,t,s,a){return Te(8,t,E,E,E,E,{k:s,v:a},E,eu(e,0),E,E,E)}function dT(e,t,s){let a=new Uint8Array(s),l="";for(let u=0,c=a.length;u<c;u++)l+=String.fromCharCode(a[u]);return Te(19,t,Ur(btoa(l)),E,E,E,E,E,eu(e,5),E,E,E)}function pT(e,t){return{base:oT(e,t),child:void 0}}var gT=class{constructor(e,t){this._p=e,this.depth=t}parse(e){return it(this._p,this.depth,e)}};async function yT(e,t,s){let a=[];for(let l=0,u=s.length;l<u;l++)l in s?a[l]=await it(e,t,s[l]):a[l]=0;return a}async function mT(e,t,s,a){return _E(s,a,await yT(e,t,a))}async function Rf(e,t,s){let a=Object.entries(s),l=[],u=[];for(let c=0,d=a.length;c<d;c++)l.push(Ur(a[c][0])),u.push(await it(e,t,a[c][1]));return Fn in s&&(l.push(os(e.base,Fn)),u.push(CE(uT(e.base),await it(e,t,XE(s))))),Yn in s&&(l.push(os(e.base,Yn)),u.push(xE(cT(e.base),await it(e,t,rT(s))))),pi in s&&(l.push(os(e.base,pi)),u.push(Yv(s[pi]))),di in s&&(l.push(os(e.base,di)),u.push(s[di]?qv:Iv)),{k:l,v:u}}async function Uh(e,t,s,a,l){return hT(s,a,l,await Rf(e,t,a))}async function vT(e,t,s,a){return SE(s,await it(e,t,a.valueOf()))}async function bT(e,t,s,a){return wE(s,a,await it(e,t,a.buffer))}async function _T(e,t,s,a){return EE(s,a,await it(e,t,a.buffer))}async function ST(e,t,s,a){return TE(s,a,await it(e,t,a.buffer))}async function lm(e,t,s,a){let l=Vv(a,e.base.features);return RE(s,a,l?await Rf(e,t,l):E)}async function wT(e,t,s,a){let l=Vv(a,e.base.features);return AE(s,a,l?await Rf(e,t,l):E)}async function ET(e,t,s,a){let l=[],u=[];for(let[c,d]of a.entries())l.push(await it(e,t,c)),u.push(await it(e,t,d));return fT(e.base,s,l,u)}async function TT(e,t,s,a){let l=[];for(let u of a.keys())l.push(await it(e,t,u));return OE(s,l)}async function Zv(e,t,s,a){let l=e.base.plugins;if(l)for(let u=0,c=l.length;u<c;u++){let d=l[u];if(d.parse.async&&d.test(a))return bE(s,d.tag,await d.parse.async(a,new gT(e,t),{id:s}))}return E}async function RT(e,t,s,a){let[l,u]=await aT(a);return Te(12,s,l,E,E,E,E,E,await it(e,t,u),E,E,E)}function AT(e,t,s,a,l){let u=[],c=s.on({next:d=>{xl(this.base,t),it(this,e,d).then(p=>{u.push(jE(t,p))},p=>{l(p),c()})},throw:d=>{xl(this.base,t),it(this,e,d).then(p=>{u.push(ME(t,p)),a(u),c()},p=>{l(p),c()})},return:d=>{xl(this.base,t),it(this,e,d).then(p=>{u.push(UE(t,p)),a(u),c()},p=>{l(p),c()})}})}async function OT(e,t,s,a){return kE(s,eu(e.base,4),await new Promise(AT.bind(e,t,s,a)))}async function CT(e,t,s,a){let l=[];for(let u=0,c=a.v.length;u<c;u++)l[u]=await it(e,t,a.v[u]);return DE(s,l,a.t,a.d)}async function xT(e,t,s,a){if(Array.isArray(a))return mT(e,t,s,a);
11if(Zl(a))return OT(e,t,s,a);if(JE(a))return CT(e,t,s,a);let l=a.constructor;if(l===GE)return it(e,t,a.replacement);let u=await Zv(e,t,s,a);if(u)return u;switch(l){case Object:return Uh(e,t,s,a,!1);case E:return Uh(e,t,s,a,!0);case Date:return gE(s,a);case Error:case EvalError:case RangeError:case ReferenceError:case SyntaxError:case TypeError:case URIError:return lm(e,t,s,a);case Number:case Boolean:case String:case BigInt:return vT(e,t,s,a);case ArrayBuffer:return dT(e.base,s,a);case Int8Array:case Int16Array:case Int32Array:case Uint8Array:case Uint16Array:case Uint32Array:case Uint8ClampedArray:case Float32Array:case Float64Array:return bT(e,t,s,a);case DataView:return ST(e,t,s,a);case Map:return ET(e,t,s,a);case Set:return TT(e,t,s,a)}if(l===Promise||a instanceof Promise)return RT(e,t,s,a);let c=e.base.features;if(c&32&&l===RegExp)return yE(s,a);if(c&16)switch(l){case BigInt64Array:case BigUint64Array:return _T(e,t,s,a)}if(c&1&&typeof AggregateError<"u"&&(l===AggregateError||a instanceof AggregateError))return wT(e,t,s,a);if(a instanceof Error)return lm(e,t,s,a);if(Fn in a||Yn in a)return Uh(e,t,s,a,!!l);throw new Jl(a)}async function kT(e,t,s){let a=Tf(e.base,s);if(a.type!==0)return a.value;let l=await Zv(e,t,a.value,s);if(l)return l;throw new Jl(s)}async function it(e,t,s){switch(typeof s){case"boolean":return s?qv:Iv;case"undefined":return eE;case"string":return Yv(s);case"number":return fE(s);case"bigint":return dE(s);case"object":{if(s){let a=Tf(e.base,s);return a.type===0?await xT(e,t+1,a.value,s):a.value}return tE}case"symbol":return os(e.base,s);case"function":return kT(e,t,s);default:throw new Jl(s)}}async function jT(e,t){try{return await it(e,0,t)}catch(s){throw s instanceof om?s:new om(s)}}var MT=(e=>(e[e.Vanilla=1]="Vanilla",e[e.Cross=2]="Cross",e))(MT||{});function Wv(e,t){for(let s=0,a=t.length;s<a;s++){let l=t[s];e.has(l)||(e.add(l),l.extends&&Wv(e,l.extends))}}function e0(e){if(e){let t=new Set;return Wv(t,e),[...t]}}function UT(e){switch(e){case"Int8Array":return Int8Array;case"Int16Array":return Int16Array;case"Int32Array":return Int32Array;case"Uint8Array":return Uint8Array;case"Uint16Array":return Uint16Array;case"Uint32Array":return Uint32Array;case"Uint8ClampedArray":return Uint8ClampedArray;case"Float32Array":return Float32Array;case"Float64Array":return Float64Array;case"BigInt64Array":return BigInt64Array;case"BigUint64Array":return BigUint64Array;default:throw new IE(e)}}var DT=1e6,NT=1e4,LT=2e4;function t0(e,t){switch(t){case 3:return Object.freeze(e);case 1:return Object.preventExtensions(e);case 2:return Object.seal(e);default:return e}}var zT=1e3;function PT(e,t){var s;return{mode:e,plugins:t.plugins,refs:t.refs||new Map,features:(s=t.features)!=null?s:63^(t.disabledFeatures||0),depthLimit:t.depthLimit||zT}}function BT(e){return{mode:2,base:PT(2,e),child:E}}var HT=class{constructor(e,t){this._p=e,this.depth=t}deserialize(e){return Le(this._p,this.depth,e)}};function n0(e,t){if(t<0||!Number.isFinite(t)||!Number.isInteger(t))throw new Nr({t:4,i:t});if(e.refs.has(t))throw new Error("Conflicted ref id: "+t)}function qT(e,t,s){return n0(e.base,t),e.state.marked.has(t)&&e.base.refs.set(t,s),s}function IT(e,t,s){return n0(e.base,t),e.base.refs.set(t,s),s}function at(e,t,s){return e.mode===1?qT(e,t,s):IT(e,t,s)}function Zh(e,t,s){if(Object.hasOwn(t,s))return t[s];throw new Nr(e)}function $T(e,t){return at(e,t.i,cE(Dr(t.s)))}function GT(e,t,s){let a=s.a,l=a.length,u=at(e,s.i,new Array(l));for(let c=0,d;c<l;c++)d=a[c],d&&(u[c]=Le(e,t,d));return t0(u,s.o),u}function VT(e){switch(e){case"constructor":case"__proto__":case"prototype":case"__defineGetter__":case"__defineSetter__":case"__lookupGetter__":case"__lookupSetter__":return!1;default:return!0}}function KT(e){switch(e){case Yn:case di:case pi:case Fn:return!0;default:return!1}}function um(e,t,s){VT(t)?e[t]=s:Object.defineProperty(e,t,{value:s,configurable:!0,enumerable:!0,writable:!0})}function YT(e,t,s,a,l){if(typeof a=="string")um(s,Dr(a),Le(e,t,l));else{let u=Le(e,t,a);switch(typeof u){case"string":um(s,u,Le(e,t,l));break;case"symbol":KT(u)&&(s[u]=Le(e,t,l));break;default:throw new Nr(a)}}}function r0(e,t,s,a){let l=s.k;if(l.length>0)for(let u=0,c=s.v,d=l.length;u<d;u++)YT(e,t,a,l[u],c[u]);return a}function FT(e,t,s){let a=at(e,s.i,s.t===10?{}:Object.create(null));return r0(e,t,s.p,a),t0(a,s.o),a}function QT(e,t){return at(e,t.i,new Date(t.s))}function JT(e,t){if(e.base.features&32){let s=Dr(t.c);if(s.length>LT)throw new Nr(t);return at(e,t.i,new RegExp(s,t.m))}throw new Qv(t)}function XT(e,t,s){let a=at(e,s.i,new Set);for(let l=0,u=s.a,c=u.length;l<c;l++)a.add(Le(e,t,u[l]));return a}function ZT(e,t,s){let a=at(e,s.i,new Map);for(let l=0,u=s.e.k,c=s.e.v,d=u.length;l<d;l++)a.set(Le(e,t,u[l]),Le(e,t,c[l]));return a}function WT(e,t){if(t.s.length>DT)throw new Nr(t);return at(e,t.i,Jv(Dr(t.s)))}function eR(e,t,s){var a;let l=UT(s.c),u=Le(e,t,s.f),c=(a=s.b)!=null?a:0;if(c<0||c>u.byteLength)throw new Nr(s);return at(e,s.i,new l(u,c,s.l))}function tR(e,t,s){var a;let l=Le(e,t,s.f),u=(a=s.b)!=null?a:0;if(u<0||u>l.byteLength)throw new Nr(s);return at(e,s.i,new DataView(l,u,s.l))}function s0(e,t,s,a){if(s.p){let l=r0(e,t,s.p,{});Object.defineProperties(a,Object.getOwnPropertyDescriptors(l))}return a}function nR(e,t,s){let a=at(e,s.i,new AggregateError([],Dr(s.m)));return s0(e,t,s,a)}function rR(e,t,s){let a=Zh(s,Ww,s.s),l=at(e,s.i,new a(Dr(s.m)));return s0(e,t,s,l)}function sR(e,t,s){let a=Xl(),l=at(e,s.i,a.p),u=Le(e,t,s.f);return s.s?a.s(u):a.f(u),l}
11function iR(e,t,s){return at(e,s.i,Object(Le(e,t,s.f)))}function aR(e,t,s){let a=e.base.plugins;if(a){let l=Dr(s.c);for(let u=0,c=a.length;u<c;u++){let d=a[u];if(d.tag===l)return at(e,s.i,d.deserialize(s.s,new HT(e,t),{id:s.i}))}}throw new BE(s.c)}function oR(e,t){return at(e,t.i,at(e,t.s,Xl()).p)}function lR(e,t,s){let a=e.base.refs.get(s.i);if(a)return a.s(Le(e,t,s.a[1])),E;throw new Va("Promise")}function uR(e,t,s){let a=e.base.refs.get(s.i);if(a)return a.f(Le(e,t,s.a[1])),E;throw new Va("Promise")}function cR(e,t,s){Le(e,t,s.a[0]);let a=Le(e,t,s.a[1]);return WE(a)}function hR(e,t,s){Le(e,t,s.a[0]);let a=Le(e,t,s.a[1]);return iT(a)}function fR(e,t,s){let a=at(e,s.i,ds()),l=s.a,u=l.length;if(u)for(let c=0;c<u;c++)Le(e,t,l[c]);return a}function dR(e,t,s){let a=e.base.refs.get(s.i);if(a&&Zl(a))return a.next(Le(e,t,s.f)),E;throw new Va("Stream")}function pR(e,t,s){let a=e.base.refs.get(s.i);if(a&&Zl(a))return a.throw(Le(e,t,s.f)),E;throw new Va("Stream")}function gR(e,t,s){let a=e.base.refs.get(s.i);if(a&&Zl(a))return a.return(Le(e,t,s.f)),E;throw new Va("Stream")}function yR(e,t,s){return Le(e,t,s.f),E}function mR(e,t,s){return Le(e,t,s.a[1]),E}function vR(e,t,s){let a=at(e,s.i,Xv([],s.s,s.l));for(let l=0,u=s.a.length;l<u;l++)a.v[l]=Le(e,t,s.a[l]);return a}function Le(e,t,s){if(t>e.base.depthLimit)throw new $E(e.base.depthLimit);switch(t+=1,s.t){case 2:return Zh(s,Xw,s.s);case 0:return Number(s.s);case 1:return Dr(String(s.s));case 3:if(String(s.s).length>NT)throw new Nr(s);return BigInt(s.s);case 4:return e.base.refs.get(s.i);case 18:return $T(e,s);case 9:return GT(e,t,s);case 10:case 11:return FT(e,t,s);case 5:return QT(e,s);case 6:return JT(e,s);case 7:return XT(e,t,s);case 8:return ZT(e,t,s);case 19:return WT(e,s);case 16:case 15:return eR(e,t,s);case 20:return tR(e,t,s);case 14:return nR(e,t,s);case 13:return rR(e,t,s);case 12:return sR(e,t,s);case 17:return Zh(s,Jw,s.s);case 21:return iR(e,t,s);case 25:return aR(e,t,s);case 22:return oR(e,s);case 23:return lR(e,t,s);case 24:return uR(e,t,s);case 28:return cR(e,t,s);case 30:return hR(e,t,s);case 31:return fR(e,t,s);case 32:return dR(e,t,s);case 33:return pR(e,t,s);case 34:return gR(e,t,s);case 27:return yR(e,t,s);case 29:return mR(e,t,s);case 35:return vR(e,t,s);default:throw new Qv(s)}}function bR(e,t){try{return Le(e,0,t)}catch(s){throw new PE(s)}}var _R=()=>T;_R.toString();function cm(e,t){let s=e0(t.plugins),a=BT({plugins:s,refs:t.refs,features:t.features,disabledFeatures:t.disabledFeatures,depthLimit:t.depthLimit});return bR(a,e)}async function SR(e,t={}){let s=e0(t.plugins),a=pT(1,{plugins:s,disabledFeatures:t.disabledFeatures});return{t:await jT(a,e),f:a.base.features,m:Array.from(a.base.marked)}}function wR(e){return{tag:"$TSR/t/"+e.key,test:e.test,parse:{sync(t,s,a){return{v:s.parse(e.toSerializable(t))}},async async(t,s,a){return{v:await s.parse(e.toSerializable(t))}},stream(t,s,a){return{v:s.parse(e.toSerializable(t))}}},serialize:void 0,deserialize(t,s,a){return e.fromSerializable(s.deserialize(t.v))}}}var ER=class{constructor(e,t){this.stream=e,this.hint=t?.hint??"binary"}},Ll=globalThis.Buffer,i0=!!Ll&&typeof Ll.from=="function";function a0(e){if(e.length===0)return"";if(i0)return Ll.from(e).toString("base64");const t=32768,s=[];for(let a=0;a<e.length;a+=t){const l=e.subarray(a,a+t);s.push(String.fromCharCode.apply(null,l))}return btoa(s.join(""))}function o0(e){if(e.length===0)return new Uint8Array(0);if(i0){const a=Ll.from(e,"base64");return new Uint8Array(a.buffer,a.byteOffset,a.byteLength)}const t=atob(e),s=new Uint8Array(t.length);for(let a=0;a<t.length;a++)s[a]=t.charCodeAt(a);return s}var va=Object.create(null),ba=Object.create(null),TR=e=>new ReadableStream({start(t){e.on({next(s){try{t.enqueue(o0(s))}catch{}},throw(s){t.error(s)},return(){try{t.close()}catch{}}})}}),RR=new TextEncoder,AR=e=>new ReadableStream({start(t){e.on({next(s){try{typeof s=="string"?t.enqueue(RR.encode(s)):t.enqueue(o0(s.$b64))}catch{}},throw(s){t.error(s)},return(){try{t.close()}catch{}}})}}),OR="(s=>new ReadableStream({start(c){s.on({next(b){try{const d=atob(b),a=new Uint8Array(d.length);for(let i=0;i<d.length;
11i++)a[i]=d.charCodeAt(i);c.enqueue(a)}catch(_){}},throw(e){c.error(e)},return(){try{c.close()}catch(_){}}})}}))",CR="(s=>{const e=new TextEncoder();return new ReadableStream({start(c){s.on({next(v){try{if(typeof v==='string'){c.enqueue(e.encode(v))}else{const d=atob(v.$b64),a=new Uint8Array(d.length);for(let i=0;i<d.length;i++)a[i]=d.charCodeAt(i);c.enqueue(a)}}catch(_){}},throw(x){c.error(x)},return(){try{c.close()}catch(_){}}})}})})";function hm(e){const t=ds(),s=e.getReader();return(async()=>{try{for(;;){const{done:a,value:l}=await s.read();if(a){t.return(void 0);break}t.next(a0(l))}}catch(a){t.throw(a)}finally{s.releaseLock()}})(),t}function fm(e){const t=ds(),s=e.getReader(),a=new TextDecoder("utf-8",{fatal:!0});return(async()=>{try{for(;;){const{done:l,value:u}=await s.read();if(l){try{const c=a.decode();c.length>0&&t.next(c)}catch{}t.return(void 0);break}try{const c=a.decode(u,{stream:!0});c.length>0&&t.next(c)}catch{t.next({$b64:a0(u)})}}}catch(l){t.throw(l)}finally{s.releaseLock()}})(),t}var xR={tag:"tss/RawStream",extends:[{tag:"tss/RawStreamFactory",test(e){return e===va},parse:{sync(e,t,s){return{}},async async(e,t,s){return{}},stream(e,t,s){return{}}},serialize(e,t,s){return OR},deserialize(e,t,s){return va}},{tag:"tss/RawStreamFactoryText",test(e){return e===ba},parse:{sync(e,t,s){return{}},async async(e,t,s){return{}},stream(e,t,s){return{}}},serialize(e,t,s){return CR},deserialize(e,t,s){return ba}}],test(e){return e instanceof ER},parse:{sync(e,t,s){const a=e.hint==="text"?ba:va;return{hint:t.parse(e.hint),factory:t.parse(a),stream:t.parse(ds())}},async async(e,t,s){const a=e.hint==="text"?ba:va,l=e.hint==="text"?fm(e.stream):hm(e.stream);return{hint:await t.parse(e.hint),factory:await t.parse(a),stream:await t.parse(l)}},stream(e,t,s){const a=e.hint==="text"?ba:va,l=e.hint==="text"?fm(e.stream):hm(e.stream);return{hint:t.parse(e.hint),factory:t.parse(a),stream:t.parse(l)}}},serialize(e,t,s){return"("+t.serialize(e.factory)+")("+t.serialize(e.stream)+")"},deserialize(e,t,s){const a=t.deserialize(e.stream);return t.deserialize(e.hint)==="text"?AR(a):TR(a)}};function kR(e){return{tag:"tss/RawStream",test:()=>!1,parse:{},serialize(){throw new Error("RawStreamDeserializePlugin.serialize should not be called. Client only deserializes.")},deserialize(t,s,a){return e(typeof s?.deserialize=="function"?s.deserialize(t.streamId):t.streamId)}}}var jR={tag:"$TSR/Error",test(e){return e instanceof Error},parse:{sync(e,t){return{message:t.parse(e.message)}},async async(e,t){return{message:await t.parse(e.message)}},stream(e,t){return{message:t.parse(e.message)}}},serialize(e,t){return"new Error("+t.serialize(e.message)+")"},deserialize(e,t){return new Error(t.deserialize(e.message))}},Tr={},l0=e=>new ReadableStream({start:t=>{e.on({next:s=>{try{t.enqueue(s)}catch{}},throw:s=>{t.error(s)},return:()=>{try{t.close()}catch{}}})}}),MR={tag:"seroval-plugins/web/ReadableStreamFactory",test(e){return e===Tr},parse:{sync(){return Tr},async async(){return await Promise.resolve(Tr)},stream(){return Tr}},serialize(){return l0.toString()},deserialize(){return Tr}};function dm(e){let t=ds(),s=e.getReader();async function a(){try{let l=await s.read();l.done?t.return(l.value):(t.next(l.value),await a())}catch(l){t.throw(l)}}return a().catch(()=>{}),t}var UR={tag:"seroval/plugins/web/ReadableStream",extends:[MR],test(e){return typeof ReadableStream>"u"?!1:e instanceof ReadableStream},parse:{sync(e,t){return{factory:t.parse(Tr),stream:t.parse(ds())}},async async(e,t){return{factory:await t.parse(Tr),stream:await t.parse(dm(e))}},stream(e,t){return{factory:t.parse(Tr),stream:t.parse(dm(e))}}},serialize(e,t){return"("+t.serialize(e.factory)+")("+t.serialize(e.stream)+")"},deserialize(e,t){let s=t.deserialize(e.stream);return l0(s)}},DR=UR,NR=[jR,xR,DR];function LR(){return[...mv()?.serializationAdapters?.map(wR)??[],...NR]}var pm=new TextDecoder,zR=new Uint8Array(0),gm=16*1024*1024,ym=32*1024*1024,mm=1024,vm=1e5;function PR(e){const t=new Map,s=new Map,a=new Set;let l=!1,u=null,c=0,d;const p=new ReadableStream({start(y){d=y},cancel(){l=!0;try{u?.cancel()}catch{}t.forEach(y=>{try{y.error(new Error("Framed response cancelled"))}catch{}}),t.clear(),s.clear(),a.clear()}});function g(y){const b=s.get(y);if(b)return b;if(a.has(y))return new ReadableStream({start(w){w.close()}});if(s.size>
11=mm)throw new Error(`Too many raw streams in framed response (max ${mm})`);const _=new ReadableStream({start(w){t.set(y,w)},cancel(){a.add(y),t.delete(y),s.delete(y)}});return s.set(y,_),_}function m(y){return g(y),t.get(y)}return(async()=>{const y=e.getReader();u=y;const b=[];let _=0;function w(){if(_<9)return null;const R=b[0];if(R.length>=9)return{type:R[0],streamId:(R[1]<<24|R[2]<<16|R[3]<<8|R[4])>>>0,length:(R[5]<<24|R[6]<<16|R[7]<<8|R[8])>>>0};const O=new Uint8Array(9);let U=0,j=9;for(let L=0;L<b.length&&j>0;L++){const Q=b[L],V=Math.min(Q.length,j);O.set(Q.subarray(0,V),U),U+=V,j-=V}return{type:O[0],streamId:(O[1]<<24|O[2]<<16|O[3]<<8|O[4])>>>0,length:(O[5]<<24|O[6]<<16|O[7]<<8|O[8])>>>0}}function A(R){if(R===0)return zR;const O=new Uint8Array(R);let U=0,j=R;for(;j>0&&b.length>0;){const L=b[0];if(!L)break;const Q=Math.min(L.length,j);O.set(L.subarray(0,Q),U),U+=Q,j-=Q,Q===L.length?b.shift():b[0]=L.subarray(Q)}return _-=R,O}try{for(;;){const{done:R,value:O}=await y.read();if(l||R)break;if(O){if(_+O.length>ym)throw new Error(`Framed response buffer exceeded ${ym} bytes`);for(b.push(O),_+=O.length;;){const U=w();if(!U)break;const{type:j,streamId:L,length:Q}=U;if(j!==In.JSON&&j!==In.CHUNK&&j!==In.END&&j!==In.ERROR)throw new Error(`Unknown frame type: ${j}`);if(j===In.JSON){if(L!==0)throw new Error("Invalid JSON frame streamId (expected 0)")}else if(L===0)throw new Error("Invalid raw frame streamId (expected non-zero)");if(Q>gm)throw new Error(`Frame payload too large: ${Q} bytes (max ${gm})`);const V=9+Q;if(_<V)break;if(++c>vm)throw new Error(`Too many frames in framed response (max ${vm})`);A(9);const q=A(Q);switch(j){case In.JSON:try{d.enqueue(pm.decode(q))}catch{}break;case In.CHUNK:{const K=m(L);K&&K.enqueue(q);break}case In.END:{const K=m(L);if(a.add(L),K){try{K.close()}catch{}t.delete(L)}break}case In.ERROR:{const K=m(L);if(a.add(L),K){const J=pm.decode(q);K.error(new Error(J)),t.delete(L)}break}}}}}if(_!==0)throw new Error("Incomplete frame at end of framed response");try{d.close()}catch{}t.forEach(R=>{try{R.close()}catch{}}),t.clear()}catch(R){try{d.error(R)}catch{}t.forEach(O=>{try{O.error(R)}catch{}}),t.clear()}finally{try{y.releaseLock()}catch{}u=null}})(),{getOrCreateStream:g,jsonChunks:p}}var Da=null;async function Wh(e){e.length>0&&await Promise.allSettled(e)}var BR=Object.prototype.hasOwnProperty;function u0(e){for(const t in e)if(BR.call(e,t))return!0;return!1}async function HR(e,t,s){Da||(Da=LR());const a=t[0],l=a.fetch??s,u=a.data instanceof FormData?"formData":"payload",c=a.headers?new Headers(a.headers):new Headers;if(c.set("x-tsr-serverFn","true"),u==="payload"&&c.set("accept",`${NS}, application/x-ndjson, application/json`),a.method==="GET"){if(u==="formData")throw new Error("FormData is not supported with GET requests");const p=await c0(a);if(p!==void 0){const g=Ev({payload:p});e.includes("?")?e+=`&${g}`:e+=`?${g}`}}let d;if(a.method==="POST"){const p=await qR(a);p?.contentType&&c.set("content-type",p.contentType),d=p?.body}return await IR(async()=>l(e,{method:a.method,headers:c,signal:a.signal,body:d}))}async function c0(e){let t=!1;const s={};if(e.data!==void 0&&(t=!0,s.data=e.data),e.context&&u0(e.context)&&(t=!0,s.context=e.context),t)return h0(s)}async function h0(e){return JSON.stringify(await Promise.resolve(SR(e,{plugins:Da})))}async function qR(e){if(e.data instanceof FormData){let s;return e.context&&u0(e.context)&&(s=await h0(e.context)),s!==void 0&&e.data.set(DS,s),{body:e.data}}const t=await c0(e);if(t)return{body:t,contentType:"application/json"}}async function IR(e){let t;try{t=await e()}catch(a){if(a instanceof Response)t=a;else throw console.log(a),a}if(t.headers.get("x-tss-raw")==="true")return t;const s=t.headers.get("content-type");if(s||Ut(),t.headers.get("x-tss-serialized")){let a;if(s.includes("application/x-tss-framed")){if(PS(s),!t.body)throw new Error("No response body for framed response");const{getOrCreateStream:l,jsonChunks:u}=PR(t.body),c=[kR(l),...Da||[]],d=new Map;a=await $R({jsonStream:u,onMessage:p=>cm(p,{refs:d,plugins:c}),onError(p,g){console.error(p,g)}})}else if(s.includes("application/json")){const l=await t.json(),u=[];a=cm(l,{plugins:Da}),await Wh(u)}if(a||Ut(),a instanceof Error)throw a;return a}if(s.includes("application/json")){const a=await t.json(),l=Sw(a);if(l)throw l;if(ct(a))throw a;return a}if(!t.ok)throw new Error(await t.text());return t}async function $R({jsonStream:e,onMessage:t,onError:s}){const a=e.getReader(),{value:l,done:u}=await a.read();if(u||!l)throw new Error("Stream ended before first object");const c=JSON.parse(l);let d=!1;const p=(async()=>{try{for(;;){const{value:y,done:b}=await a.read();if(b)break;
11if(y)try{const _=[];try{t(JSON.parse(y))}finally{}await Wh(_)}catch(_){s?.(`Invalid JSON: ${y}`,_)}}}catch(y){d||s?.("Stream processing error:",y)}})();let g;const m=[];try{g=t(c)}catch(y){throw d=!0,a.cancel().catch(()=>{}),y}return await Wh(m),Promise.resolve(g).catch(()=>{d=!0,a.cancel().catch(()=>{})}),p.finally(()=>{try{a.releaseLock()}catch{}}),g}function GR(e){const t="/_serverFn/"+e;return Object.assign((...l)=>{const u=mv()?.serverFns?.fetch;return HR(t,l,u??fetch)},{url:t,serverFnMeta:{id:e},[Qh]:!0})}var VR={key:"$TSS/serverfn",test:e=>typeof e!="function"||!(Qh in e)?!1:!!e[Qh],toSerializable:({serverFnMeta:e})=>({functionId:e.id}),fromSerializable:({functionId:e})=>GR(e)};function bm(e){return e.replaceAll("\0","/").replaceAll("�","/")}function KR(e,t){e.id=t.i,e.__beforeLoadContext=t.b,e.loaderData=t.l,e.status=t.s,e.ssr=t.ssr,e.updatedAt=t.u,e.error=t.e,t.g!==void 0&&(e.globalNotFound=t.g)}async function YR(e){window.$_TSR||Ut();const t=e.options.serializationAdapters;if(t?.length){const R=new Map;t.forEach(O=>{R.set(O.key,O.fromSerializable)}),window.$_TSR.t=R,window.$_TSR.buffer.forEach(O=>O())}window.$_TSR.initialized=!0,window.$_TSR.router||Ut();const s=window.$_TSR.router;s.matches.forEach(R=>{R.i=bm(R.i)}),s.lastMatchId&&(s.lastMatchId=bm(s.lastMatchId));const{manifest:a,dehydratedData:l,lastMatchId:u}=s;e.ssr={manifest:a};const c=document.querySelector('meta[property="csp-nonce"]')?.content;e.options.ssr={nonce:c};const d=e.matchRoutes(e.stores.location.get()),p=Promise.all(d.map(R=>e.loadRouteChunk(e.looseRoutesById[R.routeId])));function g(R){const O=e.looseRoutesById[R.routeId].options.pendingMinMs??e.options.defaultPendingMinMs;if(O){const U=fs();R._nonReactive.minPendingPromise=U,R._forcePending=!0,setTimeout(()=>{U.resolve(),e.updateMatch(R.id,j=>(j._nonReactive.minPendingPromise=void 0,{...j,_forcePending:void 0}))},O)}}function m(R){const O=e.looseRoutesById[R.routeId];O&&(O.options.ssr=R.ssr)}let y;d.forEach(R=>{const O=s.matches.find(U=>U.i===R.id);if(!O){R._nonReactive.dehydrated=!1,R.ssr=!1,m(R);return}KR(R,O),m(R),R._nonReactive.dehydrated=R.ssr!==!1,(R.ssr==="data-only"||R.ssr===!1)&&y===void 0&&(y=R.index,g(R))}),e.stores.setMatches(d),await e.options.hydrate?.(l);const b=e.stores.matches.get(),_=e.stores.location.get();await Promise.all(b.map(async R=>{try{const O=e.looseRoutesById[R.routeId],U=b[R.index-1]?.context??e.options.context;if(O.options.context){const V={deps:R.loaderDeps,params:R.params,context:U??{},location:_,navigate:q=>e.navigate({...q,_fromLocation:_}),buildLocation:e.buildLocation,cause:R.cause,abortController:R.abortController,preload:!1,matches:d,routeId:O.id};
11R.__routeContext=O.options.context(V)??void 0}R.context={...U,...R.__routeContext,...R.__beforeLoadContext};const j={ssr:e.options.ssr,matches:b,match:R,params:R.params,loaderData:R.loaderData},L=await O.options.head?.(j),Q=await O.options.scripts?.(j);R.meta=L?.meta,R.links=L?.links,R.headScripts=L?.scripts,R.styles=L?.styles,R.scripts=Q}catch(O){if(ct(O))R.error={isNotFound:!0},console.error(`NotFound error during hydration for routeId: ${R.routeId}`,O);else throw R.error=O,console.error(`Error during hydration for route ${R.routeId}:`,O),O}}));const w=d[d.length-1].id!==u;if(!d.some(R=>R.ssr===!1)&&!w)return d.forEach(R=>{R._nonReactive.dehydrated=void 0}),e.stores.resolvedLocation.set(e.stores.location.get()),p;const A=Promise.resolve().then(()=>e.load()).catch(R=>{console.error("Error during router hydration:",R)});if(w){const R=d[1];R||Ut(),g(R),R._displayPending=!0,R._nonReactive.displayPendingPromise=A,A.then(()=>{e.batch(()=>{e.stores.status.get()==="pending"&&(e.stores.status.set("idle"),e.stores.resolvedLocation.set(e.stores.location.get())),e.updateMatch(R.id,O=>({...O,_displayPending:void 0,displayPendingPromise:void 0}))})})}return p}var zl=re.use,wa=typeof window<"u"?re.useLayoutEffect:re.useEffect;function Dh(e){const t=re.useRef({value:e,prev:null}),s=t.current.value;return e!==s&&(t.current={value:e,prev:s}),t.current.prev}function FR(e,t,s={},a={}){re.useEffect(()=>{if(!e.current||a.disabled||typeof IntersectionObserver!="function")return;const l=new IntersectionObserver(([u])=>{t(u)},s);return l.observe(e.current),()=>{l.disconnect()}},[t,s,a.disabled,e])}function QR(e){const t=re.useRef(null);return re.useImperativeHandle(e,()=>t.current,[]),t}function JR({promise:e}){if(zl)return zl(e);const t=Iw(e);if(t[vn].status==="pending")throw t;if(t[vn].status==="error")throw t[vn].error;return t[vn].data}function XR(e){const t=Y.jsx(ZR,{...e});return e.fallback?Y.jsx(re.Suspense,{fallback:e.fallback,children:t}):t}function ZR(e){const t=JR(e);return e.children(t)}function Af(e){const t=e.errorComponent??Of;return Y.jsx(WR,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:s,reset:a})=>s?re.createElement(t,{error:s,reset:a}):e.children})}var WR=class extends re.Component{constructor(...e){super(...e),this.state={error:null}}static getDerivedStateFromProps(e,t){const s=e.getResetKey();return t.error&&t.resetKey!==s?{resetKey:s,error:null}:{resetKey:s}}static getDerivedStateFromError(e){return{error:e}}reset(){this.setState({error:null})}componentDidCatch(e,t){this.props.onCatch&&this.props.onCatch(e,t)}render(){return this.props.children({error:this.state.error,reset:()=>{this.reset()}})}};function Of({error:e}){const[t,s]=re.useState(!1);return Y.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[Y.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[Y.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),Y.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>s(a=>!a),children:t?"Hide Error":"Show Error"})]}),Y.jsx("div",{style:{height:".25rem"}}),t?Y.jsx("div",{children:Y.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:e.message?Y.jsx("code",{children:e.message}):null})}):null]})}function eA({children:e,fallback:t=null}){return Cf()?Y.jsx(xa.Fragment,{children:e}):Y.jsx(xa.Fragment,{children:t})}function Cf(){return xa.useSyncExternalStore(tA,()=>!0,()=>!1)}function tA(){return()=>{}}var f0=re.createContext(null);function mt(e){return re.useContext(f0)}var tu=re.createContext(void 0),nA=re.createContext(void 0),$e=(e=>(e[e.None=0]="None",e[e.Mutable=1]="Mutable",e[e.Watching=2]="Watching",e[e.RecursedCheck=4]="RecursedCheck",e[e.Recursed=8]="Recursed",e[e.Dirty=16]="Dirty",e[e.Pending=32]="Pending",e))($e||{});function rA({update:e,notify:t,unwatched:s}){return{link:a,unlink:l,propagate:u,checkDirty:c,shallowPropagate:d};function a(g,m,y){const b=m.depsTail;if(b!==void 0&&b.dep===g)return;const _=b!==void 0?b.nextDep:m.deps;if(_!==void 0&&_.dep===g){_.version=y,m.depsTail=_;return}const w=g.subsTail;if(w!==void 0&&w.version===y&&w.sub===m)return;const A=m.depsTail=g.subsTail={version:y,dep:g,sub:m,prevDep:b,nextDep:_,prevSub:w,nextSub:void 0};_!==void 0&&(_.prevDep=A),b!==void 0?b.nextDep=A:m.deps=A,w!==void 0?w.nextSub=A:g.subs=A}function l(g,m=g.sub){const y=g.dep,b=g.prevDep,_=g.nextDep,w=g.nextSub,A=g.prevSub;return _!==void 0?_.prevDep=b:m.depsTail=b,b!==void 0?b.nextDep=_:m.deps=_,w!==void 0?w.prevSub=A:y.subsTail=A,A!==void 0?A.nextSub=w:(y.subs=w)===void 0&&s(y),_}function u(g){let m=g.nextSub,y;
11e:do{const b=g.sub;let _=b.flags;if(_&60?_&12?_&4?!(_&48)&&p(g,b)?(b.flags=_|40,_&=1):_=0:b.flags=_&-9|32:_=0:b.flags=_|32,_&2&&t(b),_&1){const w=b.subs;if(w!==void 0){const A=(g=w).nextSub;A!==void 0&&(y={value:m,prev:y},m=A);continue}}if((g=m)!==void 0){m=g.nextSub;continue}for(;y!==void 0;)if(g=y.value,y=y.prev,g!==void 0){m=g.nextSub;continue e}break}while(!0)}function c(g,m){let y,b=0,_=!1;e:do{const w=g.dep,A=w.flags;if(m.flags&16)_=!0;else if((A&17)===17){if(e(w)){const R=w.subs;R.nextSub!==void 0&&d(R),_=!0}}else if((A&33)===33){(g.nextSub!==void 0||g.prevSub!==void 0)&&(y={value:g,prev:y}),g=w.deps,m=w,++b;continue}if(!_){const R=g.nextDep;if(R!==void 0){g=R;continue}}for(;b--;){const R=m.subs,O=R.nextSub!==void 0;if(O?(g=y.value,y=y.prev):g=R,_){if(e(m)){O&&d(R),m=g.sub;continue}_=!1}else m.flags&=-33;m=g.sub;const U=g.nextDep;if(U!==void 0){g=U;continue e}}return _}while(!0)}function d(g){do{const m=g.sub,y=m.flags;(y&48)===32&&(m.flags=y|16,(y&6)===2&&t(m))}while((g=g.nextSub)!==void 0)}function p(g,m){let y=m.depsTail;for(;y!==void 0;){if(y===g)return!0;y=y.prevDep}return!1}}function sA(e,t,s){const a=typeof e=="object",l=a?e:void 0;return{next:(a?e.next:e)?.bind(l),error:(a?e.error:t)?.bind(l),complete:(a?e.complete:s)?.bind(l)}}const ef=[];let kl=0;const{link:_m,unlink:iA,propagate:aA,checkDirty:d0,shallowPropagate:Sm}=rA({update(e){return e._update()},notify(e){ef[tf++]=e,e.flags&=~$e.Watching},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=$e.Mutable|$e.Dirty,Pl(e))}});let yl=0,tf=0,yn,nf=0;function p0(e){try{++nf,e()}finally{--nf||g0()}}function Pl(e){const t=e.depsTail;let s=t!==void 0?t.nextDep:e.deps;for(;s!==void 0;)s=iA(s,e)}function g0(){if(!(nf>0)){for(;yl<tf;){const e=ef[yl];ef[yl++]=void 0,e.notify()}yl=0,tf=0}}function wm(e,t){const s=typeof e=="function",a=e,l={_snapshot:s?void 0:e,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:s?$e.None:$e.Mutable,get(){return yn!==void 0&&_m(l,yn,kl),l._snapshot},subscribe(u){const c=sA(u),d={current:!1},p=oA(()=>{l.get(),d.current?c.next?.(l._snapshot):d.current=!0});return{unsubscribe:()=>{p.stop()}}},_update(u){const c=yn,d=t?.compare??Object.is;if(s)yn=l,++kl,l.depsTail=void 0;else if(u===void 0)return!1;s&&(l.flags=$e.Mutable|$e.RecursedCheck);try{const p=l._snapshot,g=typeof u=="function"?u(p):u===void 0&&s?a(p):u;return p===void 0||!d(p,g)?(l._snapshot=g,!0):!1}finally{yn=c,s&&(l.flags&=~$e.RecursedCheck),Pl(l)}}};return s?(l.flags=$e.Mutable|$e.Dirty,l.get=function(){const u=l.flags;if(u&$e.Dirty||u&$e.Pending&&d0(l.deps,l)){if(l._update()){const c=l.subs;c!==void 0&&Sm(c)}}else u&$e.Pending&&(l.flags=u&~$e.Pending);return yn!==void 0&&_m(l,yn,kl),l._snapshot}):l.set=function(u){if(l._update(u)){const c=l.subs;c!==void 0&&(aA(c),Sm(c),g0())}},l}function oA(e){const t=()=>{const a=yn;yn=s,++kl,s.depsTail=void 0,s.flags=$e.Watching|$e.RecursedCheck;try{return e()}finally{yn=a,s.flags&=~$e.RecursedCheck,Pl(s)}},s={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:$e.Watching|$e.RecursedCheck,notify(){const a=this.flags;a&$e.Dirty||a&$e.Pending&&d0(this.deps,this)?t():this.flags=$e.Watching},stop(){this.flags=$e.None,this.depsTail=void 0,Pl(this)}};return t(),s}var Nh={exports:{}},Lh={},zh={exports:{}},Ph={};var Em;function lA(){if(Em)return Ph;Em=1;var e=Ga();function t(y,b){return y===b&&(y!==0||1/y===1/b)||y!==y&&b!==b}var s=typeof Object.is=="function"?Object.is:t,a=e.useState,l=e.useEffect,u=e.useLayoutEffect,c=e.useDebugValue;function d(y,b){var _=b(),w=a({inst:{value:_,getSnapshot:b}}),A=w[0].inst,R=w[1];return u(function(){A.value=_,A.getSnapshot=b,p(A)&&R({inst:A})},[y,_,b]),l(function(){return p(A)&&R({inst:A}),y(function(){p(A)&&R({inst:A})})},[y]),c(_),_}function p(y){var b=y.getSnapshot;y=y.value;try{var _=b();return!s(y,_)}catch{return!0}}function g(y,b){return b()}var m=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?g:d;return Ph.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:m,Ph}var Tm;function uA(){return Tm||(Tm=1,zh.exports=lA()),zh.exports}var Rm;function cA(){if(Rm)return Lh;Rm=1;var e=Ga(),t=uA();function s(g,m){return g===m&&(g!==0||1/g===1/m)||g!==g&&m!==m}var a=typeof Object.is=="function"?Object.is:s,l=t.useSyncExternalStore,u=e.useRef,c=e.useEffect,d=e.useMemo,p=e.useDebugValue;
11return Lh.useSyncExternalStoreWithSelector=function(g,m,y,b,_){var w=u(null);if(w.current===null){var A={hasValue:!1,value:null};w.current=A}else A=w.current;w=d(function(){function O(V){if(!U){if(U=!0,j=V,V=b(V),_!==void 0&&A.hasValue){var q=A.value;if(_(q,V))return L=q}return L=V}if(q=L,a(j,V))return q;var K=b(V);return _!==void 0&&_(q,K)?(j=V,q):(j=V,L=K)}var U=!1,j,L,Q=y===void 0?null:y;return[function(){return O(m())},Q===null?void 0:function(){return O(Q())}]},[m,y,b,_]);var R=l(g,w[0],w[1]);return c(function(){A.hasValue=!0,A.value=R},[R]),p(R),R},Lh}var Am;function hA(){return Am||(Am=1,Nh.exports=cA()),Nh.exports}var fA=hA();function dA(e,t){return e===t}function rt(e,t,s=dA){const a=re.useCallback(c=>{if(!e)return()=>{};const{unsubscribe:d}=e.subscribe(c);return d},[e]),l=re.useCallback(()=>e?.get(),[e]);return fA.useSyncExternalStoreWithSelector(a,l,l,t,s)}var pA={get:()=>{},subscribe:()=>({unsubscribe:()=>{}})};function ps(e){const t=mt(),s=re.useContext(e.from?nA:tu),a=e.from??s,l=a?e.from?t.stores.getRouteMatchStore(a):t.stores.matchStores.get(a):void 0,u=re.useRef(void 0);return rt(l??pA,c=>{if((e.shouldThrow??!0)&&!c&&Ut(),c===void 0)return;const d=e.select?e.select(c):c;if(e.structuralSharing??t.options.defaultStructuralSharing){const p=is(u.current,d);return u.current=p,p}return d})}function y0(e){return ps({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function m0(e){const{select:t,...s}=e;return ps({...s,select:a=>t?t(a.loaderDeps):a.loaderDeps})}function v0(e){return ps({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:t=>{const s=e.strict===!1?t.params:t._strictParams;return e.select?e.select(s):s}})}function b0(e){return ps({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function _0(e){const t=mt();return re.useCallback(s=>t.navigate({...s,from:s.from??e?.from}),[e?.from,t])}function S0(e){return ps({...e,select:t=>e.select?e.select(t.context):t.context})}var gA=yv();function yA(e,t){const s=mt(),a=QR(t),{activeProps:l,inactiveProps:u,activeOptions:c,to:d,preload:p,preloadDelay:g,preloadIntentProximity:m,hashScrollIntoView:y,replace:b,startTransition:_,resetScroll:w,viewTransition:A,children:R,target:O,disabled:U,style:j,className:L,onClick:Q,onBlur:V,onFocus:q,onMouseEnter:K,onMouseLeave:J,onTouchStart:le,ignoreBlocker:se,params:me,search:Ce,hash:Ye,state:Be,mask:B,reloadDocument:F,unsafeRelative:oe,from:Re,_fromLocation:Oe,...k}=e,$=Cf(),X=re.useMemo(()=>e,[s,e.from,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),W=rt(s.stores.location,ze=>ze,(ze,ht)=>ze.href===ht.href),ie=re.useMemo(()=>{const ze={_fromLocation:W,...X};return s.buildLocation(ze)},[s,W,X]),pe=ie.maskedLocation?ie.maskedLocation.publicHref:ie.publicHref,Se=ie.maskedLocation?ie.maskedLocation.external:ie.external,Fe=re.useMemo(()=>wA(pe,Se,s.history,U),[U,Se,pe,s.history]),De=re.useMemo(()=>{if(Fe?.external)return Ml(Fe.href,s.protocolAllowlist)?void 0:Fe.href;if(!EA(d)&&!(typeof d!="string"||d.indexOf(":")===-1))try{return new URL(d),Ml(d,s.protocolAllowlist)?void 0:d}catch{}},[d,Fe,s.protocolAllowlist]),Sn=re.useMemo(()=>{if(De)return!1;if(c?.exact){if(!ow(W.pathname,ie.pathname,s.basepath))return!1}else{const ze=Ul(W.pathname,s.basepath),ht=Ul(ie.pathname,s.basepath);if(!(ze.startsWith(ht)&&(ze.length===ht.length||ze[ht.length]==="/")))return!1}return(c?.includeSearch??!0)&&!jt(W.search,ie.search,{partial:!c?.exact,ignoreUndefined:!c?.explicitUndefined})?!1:c?.includeHash?$&&W.hash===ie.hash:!0},[c?.exact,c?.explicitUndefined,c?.includeHash,c?.includeSearch,W,De,$,ie.hash,ie.pathname,ie.search,s.basepath]),wn=Sn?Or(l,{})??mA:Bh,Jn=Sn?Bh:Or(u,{})??Bh,vi=[L,wn.className,Jn.className].filter(Boolean).join(" "),cn=(j||wn.style||Jn.style)&&{...j,...wn.style,...Jn.style},[bi,gs]=re.useState(!1),Ya=re.useRef(!1),En=e.reloadDocument||De?!1:p??s.options.defaultPreload,Lr=g??s.options.defaultPreloadDelay??0,tn=re.useCallback(()=>{s.preloadRoute({...X,_builtLocation:ie}).catch(ze=>{console.warn(ze),console.warn($w)})},[s,X,ie]);FR(a,re.useCallback(ze=>{ze?.isIntersecting&&tn()},[tn]),SA,{disabled:!!U||En!=="viewport"}),re.useEffect(()=>{Ya.current||!U&&En==="render"&&(tn(),Ya.current=!0)},[U,tn,En]);const _i=ze=>{const ht=ze.currentTarget.getAttribute("target"),hn=O!==void 0?O:ht;if(!U&&!TA(ze)&&!ze.defaultPrevented&&(!hn||hn==="_self")&&ze.button===0){ze.preventDefault(),gA.flushSync(()=>{gs(!0)});const ys=s.subscribe("onResolved",()=>{ys(),gs(!1)});s.navigate({...X,replace:b,resetScroll:w,hashScrollIntoView:y,startTransition:_,viewTransition:A,ignoreBlocker:se})}};if(De)return{...k,ref:a,href:De,...R&&{children:R},...O&&{target:O},...U&&{disabled:U},...j&&{style:j},...L&&{className:L},...Q&&{onClick:Q},...V&&{onBlur:V},...q&&{onFocus:q},...K&&{onMouseEnter:K},...J&&{onMouseLeave:J},...le&&{onTouchStart:le}};const Fa=ze=>{if(U||En!=="intent")return;if(!Lr){tn();return}const ht=ze.currentTarget;if(_a.has(ht))return;const hn=setTimeout(()=>{_a.delete(ht),tn()},Lr);_a.set(ht,hn)},lu=ze=>{U||En!=="intent"||tn()},vt=ze=>{if(U||!En||!Lr)return;const ht=ze.currentTarget,hn=_a.get(ht);hn&&(clearTimeout(hn),_a.delete(ht))};return{...k,...wn,...Jn,href:Fe?.href,ref:a,onClick:ti([Q,_i]),onBlur:ti([V,vt]),onFocus:ti([q,Fa]),onMouseEnter:ti([K,Fa]),onMouseLeave:ti([J,vt]),onTouchStart:ti([le,lu]),disabled:!!U,target:O,...cn&&{style:cn},...vi&&{className:vi},...U&&vA,...Sn&&bA,...$&&bi&&_A}}var Bh={},mA={className:"active"},vA={role:"link","aria-disabled":!0},bA={"data-status":"active","aria-current":"page"},_A={"data-transitioning":"transitioning"},_a=new WeakMap,SA={rootMargin:"100px"},ti=e=>t=>{for(const s of e)if(s){if(t.defaultPrevented)return;s(t)}};function wA(e,t,s,a){if(!a)return t?{href:e,external:!0}:{href:s.createHref(e)||"/",external:!1}}function EA(e){if(typeof e!="string")return!1;const t=e.charCodeAt(0);return t===47?e.charCodeAt(1)!==47:t===46}var xf=re.forwardRef((e,t)=>
11{const{_asChild:s,...a}=e,{type:l,...u}=yA(a,t),c=typeof a.children=="function"?a.children({isActive:u["data-status"]==="active"}):a.children;if(!s){const{disabled:d,...p}=u;return re.createElement("a",p,c)}return re.createElement(s,u,c)});function TA(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}var RA=class extends kv{constructor(t){super(t),this.useMatch=s=>ps({select:s?.select,from:this.id,structuralSharing:s?.structuralSharing}),this.useRouteContext=s=>S0({...s,from:this.id}),this.useSearch=s=>b0({select:s?.select,structuralSharing:s?.structuralSharing,from:this.id}),this.useParams=s=>v0({select:s?.select,structuralSharing:s?.structuralSharing,from:this.id}),this.useLoaderDeps=s=>m0({...s,from:this.id}),this.useLoaderData=s=>y0({...s,from:this.id}),this.useNavigate=()=>_0({from:this.fullPath}),this.Link=xa.forwardRef((s,a)=>Y.jsx(xf,{ref:a,from:this.fullPath,...s}))}};function AA(e){return new RA(e)}function OA(){return e=>xA(e)}var CA=class extends Yw{constructor(e){super(e),this.useMatch=t=>ps({select:t?.select,from:this.id,structuralSharing:t?.structuralSharing}),this.useRouteContext=t=>S0({...t,from:this.id}),this.useSearch=t=>b0({select:t?.select,structuralSharing:t?.structuralSharing,from:this.id}),this.useParams=t=>v0({select:t?.select,structuralSharing:t?.structuralSharing,from:this.id}),this.useLoaderDeps=t=>m0({...t,from:this.id}),this.useLoaderData=t=>y0({...t,from:this.id}),this.useNavigate=()=>_0({from:this.fullPath}),this.Link=xa.forwardRef((t,s)=>Y.jsx(xf,{ref:s,from:this.fullPath,...t}))}};function xA(e){return new CA(e)}function w0(e){return new kA(e,{silent:!0}).createRoute}var kA=class{constructor(e,t){this.path=e,this.createRoute=s=>{const a=AA(s);return a.isRoot=!1,a},this.silent=t?.silent}};function E0(e,t){let s,a,l,u;const c=()=>(s||(s=e().then(p=>{s=void 0,a=p[t]}).catch(p=>{if(l=p,IS(l)&&l instanceof Error&&typeof window<"u"&&typeof sessionStorage<"u"){const g=`tanstack_router_reload:${l.message}`;sessionStorage.getItem(g)||(sessionStorage.setItem(g,"1"),u=!0)}})),s),d=function(g){if(u)throw window.location.reload(),new Promise(()=>{});if(l)throw l;if(!a)if(zl)zl(c());else throw c();return re.createElement(a,g)};return d.preload=c,d}function jA(e){const t=mt(),s=`not-found-${rt(t.stores.location,a=>a.pathname)}-${rt(t.stores.status,a=>a)}`;return Y.jsx(Af,{getResetKey:()=>s,onCatch:(a,l)=>{if(ct(a))e.onCatch?.(a,l);else throw a},errorComponent:({error:a})=>{if(ct(a))return e.fallback?.(a);throw a},children:e.children})}function MA(){return Y.jsx("p",{children:"Not Found"})}function ai(e){return Y.jsx(Y.Fragment,{children:e.children})}function T0(e,t,s){return t.options.notFoundComponent?Y.jsx(t.options.notFoundComponent,{...s}):e.options.defaultNotFoundComponent?Y.jsx(e.options.defaultNotFoundComponent,{...s}):Y.jsx(MA,{})}function UA(e){return null}function DA(){return UA(mt()),null}var R0=re.memo(function({matchId:t}){const s=mt(),a=s.stores.matchStores.get(t);a||Ut();const l=rt(s.stores.loadedAt,c=>c),u=rt(a,c=>c);return Y.jsx(NA,{router:s,matchId:t,resetKey:l,matchState:re.useMemo(()=>{const c=u.routeId,d=s.routesById[c].parentRoute?.id;return{routeId:c,ssr:u.ssr,_displayPending:u._displayPending,parentRouteId:d}},[u._displayPending,u.routeId,u.ssr,s.routesById])})});function NA({router:e,matchId:t,resetKey:s,matchState:a}){const l=e.routesById[a.routeId],u=l.options.pendingComponent??e.options.defaultPendingComponent,c=u?Y.jsx(u,{}):null,d=l.options.errorComponent??e.options.defaultErrorComponent,p=l.options.onCatch??e.options.defaultOnCatch,g=l.isRoot?l.options.notFoundComponent??e.options.notFoundRoute?.options.component:l.options.notFoundComponent,m=a.ssr===!1||a.ssr==="data-only",y=(!l.isRoot||l.options.wrapInSuspense||m)&&(l.options.wrapInSuspense??u??(l.options.errorComponent?.preload||m))?re.Suspense:ai,b=d?Af:ai,_=g?jA:ai;return Y.jsxs(l.isRoot?l.options.shellComponent??ai:ai,{children:[Y.jsx(tu.Provider,{value:t,children:Y.jsx(y,{fallback:c,children:Y.jsx(b,{getResetKey:()=>s,errorComponent:d||Of,onCatch:(w,A)=>{if(ct(w))throw w.routeId??=a.routeId,w;p?.(w,A)},children:Y.jsx(_,{fallback:w=>{if(w.routeId??=a.routeId,!g||w.routeId&&w.routeId!==a.routeId||!w.routeId&&
11!l.isRoot)throw w;return re.createElement(g,w)},children:m||a._displayPending?Y.jsx(eA,{fallback:c,children:Y.jsx(Om,{matchId:t})}):Y.jsx(Om,{matchId:t})})})})}),a.parentRouteId===cs?Y.jsxs(Y.Fragment,{children:[Y.jsx(LA,{resetKey:s}),e.options.scrollRestoration&&vv?Y.jsx(DA,{}):null]}):null]})}function LA({resetKey:e}){const t=mt(),s=re.useRef(void 0);return wa(()=>{const a=t.latestLocation.href;(s.current===void 0||s.current!==a)&&(t.emit({type:"onRendered",...fi(t.stores.location.get(),t.stores.resolvedLocation.get())}),s.current=a)},[t.latestLocation.state.__TSR_key,e,t]),null}var Om=re.memo(function({matchId:t}){const s=mt(),a=(m,y)=>s.getMatch(m.id)?._nonReactive[y]??m._nonReactive[y],l=s.stores.matchStores.get(t);l||Ut();const u=rt(l,m=>m),c=u.routeId,d=s.routesById[c],p=re.useMemo(()=>{const m=(s.routesById[c].options.remountDeps??s.options.defaultRemountDeps)?.({routeId:c,loaderDeps:u.loaderDeps,params:u._strictParams,search:u._strictSearch});return m?JSON.stringify(m):void 0},[c,u.loaderDeps,u._strictParams,u._strictSearch,s.options.defaultRemountDeps,s.routesById]),g=re.useMemo(()=>{const m=d.options.component??s.options.defaultComponent;return m?Y.jsx(m,{},p):Y.jsx(A0,{})},[p,d.options.component,s.options.defaultComponent]);if(u._displayPending)throw a(u,"displayPendingPromise");if(u._forcePending)throw a(u,"minPendingPromise");if(u.status==="pending"){const m=d.options.pendingMinMs??s.options.defaultPendingMinMs;if(m){const y=s.getMatch(u.id);if(y&&!y._nonReactive.minPendingPromise){const b=fs();y._nonReactive.minPendingPromise=b,setTimeout(()=>{b.resolve(),y._nonReactive.minPendingPromise=void 0},m)}}throw a(u,"loadPromise")}if(u.status==="notFound")return ct(u.error)||Ut(),T0(s,d,u.error);if(u.status==="redirected")throw Mt(u.error)||Ut(),a(u,"loadPromise");if(u.status==="error")throw u.error;return g}),A0=re.memo(function(){const t=mt(),s=re.useContext(tu);let a,l=!1,u;{const g=s?t.stores.matchStores.get(s):void 0;[a,l]=rt(g,m=>[m?.routeId,m?.globalNotFound??!1]),u=rt(t.stores.matchesId,m=>m[m.findIndex(y=>y===s)+1])}const c=a?t.routesById[a]:void 0,d=t.options.defaultPendingComponent?Y.jsx(t.options.defaultPendingComponent,{}):null;if(l)return c||Ut(),T0(t,c,void 0);if(!u)return null;const p=Y.jsx(R0,{matchId:u});return a===cs?Y.jsx(re.Suspense,{fallback:d,children:p}):p});function zA(){const e=mt(),t=re.useRef({router:e,mounted:!1}),[s,a]=re.useState(!1),l=rt(e.stores.isLoading,y=>y),u=rt(e.stores.hasPending,y=>y),c=Dh(l),d=l||s||u,p=Dh(d),g=l||u,m=Dh(g);return e.startTransition=y=>{a(!0),re.startTransition(()=>{y(),a(!1)})},re.useEffect(()=>{const y=e.history.subscribe(e.load),b=e.buildLocation({to:e.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return kr(e.latestLocation.publicHref)!==kr(b.publicHref)&&e.commitLocation({...b,replace:!0}),()=>{y()}},[e,e.history]),wa(()=>{if(typeof window<"u"&&e.ssr||t.current.router===e&&t.current.mounted)return;t.current={router:e,mounted:!0},(async()=>{try{await e.load()}catch(b){console.error(b)}})()},[e]),wa(()=>{c&&!l&&e.emit({type:"onLoad",...fi(e.stores.location.get(),e.stores.resolvedLocation.get())})},[c,e,l]),wa(()=>{m&&!g&&e.emit({type:"onBeforeRouteMount",...fi(e.stores.location.get(),e.stores.resolvedLocation.get())})},[g,m,e]),wa(()=>{if(p&&!d){const y=fi(e.stores.location.get(),e.stores.resolvedLocation.get());e.emit({type:"onResolved",...y}),p0(()=>{e.stores.status.set("idle"),e.stores.resolvedLocation.set(e.stores.location.get())}),y.hrefChanged&&Fw(e)}},[d,p,e]),null}function PA(){const e=mt(),t=e.routesById[cs].options.pendingComponent??e.options.defaultPendingComponent,s=t?Y.jsx(t,{}):null,a=Y.jsxs(typeof document<"u"&&e.ssr?ai:re.Suspense,{fallback:s,children:[Y.jsx(zA,{}),Y.jsx(BA,{})]});return e.options.InnerWrap?Y.jsx(e.options.InnerWrap,{children:a}):a}function BA(){const e=mt(),t=rt(e.stores.firstId,l=>l),s=rt(e.stores.loadedAt,l=>l),a=t?Y.jsx(R0,{matchId:t}):null;return Y.jsx(tu.Provider,{value:t,children:e.options.disableGlobalCatchBoundary?a:Y.jsx(Af,{getResetKey:()=>s,errorComponent:Of,onCatch:void 0,children:a})})}var HA=e=>({createMutableStore:wm,createReadonlyStore:wm,batch:p0}),qA=e=>new IA(e),IA=class extends Nw{constructor(e){super(e,HA)}};function $A({router:e,children:t,...s}){Object.keys(s).length>0&&e.update({...e.options,...s,context:{...e.options.context,...s.context}});const a=Y.jsx(f0.Provider,{value:e,children:t});return e.options.Wrap?Y.jsx(e.options.Wrap,{children:a}):a}function GA({router:e,...t}){return Y.jsx($A,{router:e,...t,children:Y.jsx(PA,{})})}function O0(e){const{attrs:t,children:s,nonce:a}=e;switch(e.tag){case"title":return Y.jsx("title",{...t,suppressHydrationWarning:!0,children:s});case"meta":return Y.jsx("meta",{...t,suppressHydrationWarning:!0});case"link":return Y.jsx("link",{...t,precedence:t?.precedence??(t?.rel==="stylesheet"?"default":void 0),nonce:a,suppressHydrationWarning:!0});case"style":return e.inlineCss,Y.jsx("style",{...t,dangerouslySetInnerHTML:{__html:s},nonce:a});case"script":return Y.jsx(VA,{attrs:t,children:s});default:return null}}function VA({attrs:e,children:t}){mt();const s=Cf(),a=typeof e?.type=="string"&&e.type!==""&&e.type!=="text/javascript"&&e.type!=="module";if(re.useEffect(()=>{if(!a){if(e?.src){const l=(()=>{try{const c=document.baseURI||window.location.href;return new URL(e.src,c).href}catch{return e.src}})();if(Array.from(document.querySelectorAll("script[src]")).find(c=>c.src===l))return;const u=document.createElement("script");for(const[c,d]of Object.entries(e))c!=="suppressHydrationWarning"&&d!==void 0&&d!==!1&&u.setAttribute(c,typeof d=="boolean"?"":String(d));return document.head.appendChild(u),()=>{u.parentNode&&u.parentNode.removeChild(u)}}if(typeof t=="string"){const l=typeof e?.type=="string"?e.type:"text/javascript",u=typeof e?.nonce=="string"?e.nonce:void 0;if(Array.from(document.querySelectorAll("script:not([src])")).find(d=>{if(!(d instanceof HTMLScriptElement))return!1;const p=d.getAttribute("type")??"text/javascript",g=d.getAttribute("nonce")??void 0;return d.textContent===t&&p===l&&g===u}))return;const c=document.createElement("script");
11if(c.textContent=t,e)for(const[d,p]of Object.entries(e))d!=="suppressHydrationWarning"&&p!==void 0&&p!==!1&&c.setAttribute(d,typeof p=="boolean"?"":String(p));return document.head.appendChild(c),()=>{c.parentNode&&c.parentNode.removeChild(c)}}}},[e,t,a]),a&&typeof t=="string")return Y.jsx("script",{...e,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:t}});if(!s){if(e?.src)return Y.jsx("script",{...e,suppressHydrationWarning:!0});if(typeof t=="string")return Y.jsx("script",{...e,dangerouslySetInnerHTML:{__html:t},suppressHydrationWarning:!0})}return null}var KA=e=>{const t=mt(),s=t.options.ssr?.nonce,a=rt(t.stores.matches,g=>g.map(m=>m.meta).filter(Boolean),jt),l=re.useMemo(()=>{const g=[],m={};let y;for(let b=a.length-1;b>=0;b--){const _=a[b];for(let w=_.length-1;w>=0;w--){const A=_[w];if(A)if(A.title)y||(y={tag:"title",children:A.title});else if("script:ld+json"in A)try{const R=JSON.stringify(A["script:ld+json"]);g.push({tag:"script",attrs:{type:"application/ld+json"},children:YS(R)})}catch{}else{const R=A.name??A.property;if(R){if(m[R])continue;m[R]=!0}g.push({tag:"meta",attrs:{...A,nonce:s}})}}}return y&&g.push(y),s&&g.push({tag:"meta",attrs:{property:"csp-nonce",content:s}}),g.reverse(),g},[a,s]),u=rt(t.stores.matches,g=>{const m=g.map(_=>_.links).filter(Boolean).flat(1).map(_=>({tag:"link",attrs:{..._,nonce:s}})),y=t.ssr?.manifest,b=g.map(_=>y?.routes[_.routeId]?.assets??[]).filter(Boolean).flat(1).flatMap(_=>_.tag==="link"?Kw(y,_)?[]:[{tag:"link",attrs:{..._.attrs,crossOrigin:am(e,"stylesheet")??_.attrs?.crossOrigin,suppressHydrationWarning:!0,nonce:s}}]:_.tag==="style"?[{tag:"style",attrs:{..._.attrs,nonce:s},children:_.children,..._.inlineCss?{inlineCss:!0}:{}}]:[]);return[...m,...b]},jt),c=rt(t.stores.matches,g=>{const m=[];return g.map(y=>t.looseRoutesById[y.routeId]).forEach(y=>t.ssr?.manifest?.routes[y.id]?.preloads?.filter(Boolean).forEach(b=>{const _=Gw(b);m.push({tag:"link",attrs:{rel:"modulepreload",href:_.href,crossOrigin:am(e,"modulepreload")??_.crossOrigin,nonce:s}})})),m},jt),d=rt(t.stores.matches,g=>g.map(m=>m.styles).flat(1).filter(Boolean).map(({children:m,...y})=>({tag:"style",attrs:{...y,nonce:s},children:m})),jt),p=rt(t.stores.matches,g=>g.map(m=>m.headScripts).flat(1).filter(Boolean).map(({children:m,...y})=>({tag:"script",attrs:{...y,nonce:s},children:m})),jt);return YA([...l,...c,...u,...d,...p],g=>JSON.stringify(g))};function YA(e,t){const s=new Set;return e.filter(a=>{const l=t(a);return s.has(l)?!1:(s.add(l),!0)})}function FA(e){const t=KA(e.assetCrossOrigin),s=mt().options.ssr?.nonce;return Y.jsx(Y.Fragment,{children:t.map(a=>re.createElement(O0,{...a,key:`tsr-meta-${JSON.stringify(a)}`,nonce:s}))})}var QA=()=>{const e=mt(),t=e.options.ssr?.nonce,s=u=>{const c=[],d=e.ssr?.manifest;return d?(u.map(p=>e.looseRoutesById[p.routeId]).forEach(p=>d.routes[p.id]?.assets?.filter(g=>g.tag==="script").forEach(g=>{c.push({tag:"script",attrs:{...g.attrs,nonce:t},children:g.children})})),c):[]},a=u=>u.map(c=>c.scripts).flat(1).filter(Boolean).map(({children:c,...d})=>({tag:"script",attrs:{...d,suppressHydrationWarning:!0,nonce:t},children:c})),l=rt(e.stores.matches,s,jt);return JA(e,rt(e.stores.matches,a,jt),l)};
11function JA(e,t,s){let a;e.serverSsr&&(a=e.serverSsr.takeBufferedScripts());const l=[...t,...s];return a&&l.unshift(a),Y.jsx(Y.Fragment,{children:l.map((u,c)=>re.createElement(O0,{...u,key:`tsr-scripts-${u.tag}-${c}`}))})}var ls=(e,t)=>{const s={type:"request",...t||e};return{options:s,middleware:a=>ls({},Object.assign(s,{middleware:a})),inputValidator:a=>ls({},Object.assign(s,{inputValidator:a})),client:a=>ls({},Object.assign(s,{client:a})),server:a=>ls({},Object.assign(s,{server:a}))}};function C0(e,t){for(let s=0,a=t.length;s<a;s++){const l=t[s];e.has(l)||(e.add(l),l.extends&&C0(e,l.extends))}}var XA=e=>({getOptions:async()=>{const t=await e();if(t.serializationAdapters){const s=new Set;C0(s,t.serializationAdapters),t.serializationAdapters=Array.from(s)}return t},createMiddleware:ls});function nu(e,t){var s={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(s[a]=e[a]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var l=0,a=Object.getOwnPropertySymbols(e);l<a.length;l++)t.indexOf(a[l])<0&&Object.prototype.propertyIsEnumerable.call(e,a[l])&&(s[a[l]]=e[a[l]]);return s}function ZA(e,t,s,a){function l(u){return u instanceof s?u:new s(function(c){c(u)})}return new(s||(s=Promise))(function(u,c){function d(m){try{g(a.next(m))}catch(y){c(y)}}function p(m){try{g(a.throw(m))}catch(y){c(y)}}function g(m){m.done?u(m.value):l(m.value).then(d,p)}g((a=a.apply(e,t||[])).next())})}const WA=e=>e?(...t)=>e(...t):(...t)=>fetch(...t);class kf extends Error{constructor(t,s="FunctionsError",a){super(t),this.name=s,this.context=a}toJSON(){return{name:this.name,message:this.message,context:this.context}}}class e1 extends kf{constructor(t){super("Failed to send a request to the Edge Function","FunctionsFetchError",t)}}class Cm extends kf{constructor(t){super("Relay Error invoking the Edge Function","FunctionsRelayError",t)}}class xm extends kf{constructor(t){super("Edge Function returned a non-2xx status code","FunctionsHttpError",t)}}var rf;(function(e){e.Any="any",e.ApNortheast1="ap-northeast-1",e.ApNortheast2="ap-northeast-2",e.ApSouth1="ap-south-1",e.ApSoutheast1="ap-southeast-1",e.ApSoutheast2="ap-southeast-2",e.CaCentral1="ca-central-1",e.EuCentral1="eu-central-1",e.EuWest1="eu-west-1",e.EuWest2="eu-west-2",e.EuWest3="eu-west-3",e.SaEast1="sa-east-1",e.UsEast1="us-east-1",e.UsWest1="us-west-1",e.UsWest2="us-west-2"})(rf||(rf={}));class t1{constructor(t,{headers:s={},customFetch:a,region:l=rf.Any}={}){this.url=t,this.headers=s,this.region=l,this.fetch=WA(a)}setAuth(t){this.headers.Authorization=`Bearer ${t}`}invoke(t){return ZA(this,arguments,void 0,function*(s,a={}){var l;let u,c;try{const{headers:d,method:p,body:g,signal:m,timeout:y}=a;let b={},{region:_}=a;_||(_=this.region);const w=new URL(`${this.url}/${s}`);_&&_!=="any"&&(b["x-region"]=_,w.searchParams.set("forceFunctionRegion",_));let A;g&&(d&&!Object.prototype.hasOwnProperty.call(d,"Content-Type")||!d)?typeof Blob<"u"&&g instanceof Blob||g instanceof ArrayBuffer?(b["Content-Type"]="application/octet-stream",A=g):typeof g=="string"?(b["Content-Type"]="text/plain",A=g):typeof FormData<"u"&&g instanceof FormData?A=g:(b["Content-Type"]="application/json",A=JSON.stringify(g)):g&&typeof g!="string"&&!(typeof Blob<"u"&&g instanceof Blob)&&!(g instanceof ArrayBuffer)&&!(typeof FormData<"u"&&g instanceof FormData)?A=JSON.stringify(g):A=g;let R=m;y&&(c=new AbortController,u=setTimeout(()=>c.abort(),y),m?(R=c.signal,m.addEventListener("abort",()=>c.abort())):R=c.signal);const O=yield this.fetch(w.toString(),{method:p||"POST",headers:Object.assign(Object.assign(Object.assign({},b),this.headers),d),body:A,signal:R}).catch(Q=>{throw new e1(Q)}),U=O.headers.get("x-relay-error");if(U&&U==="true")throw new Cm(O);if(!O.ok)throw new xm(O);let j=((l=O.headers.get("Content-Type"))!==null&&l!==void 0?l:"text/plain").split(";")[0].trim(),L;return j==="application/json"?L=yield O.json():j==="application/octet-stream"||j==="application/pdf"?L=yield O.blob():j==="text/event-stream"?L=O:j==="multipart/form-data"?L=yield O.formData():L=yield O.text(),{data:L,error:null,response:O}}catch(d){return{data:null,error:d,response:d instanceof xm||d instanceof Cm?d.context:void 0}}finally{u&&clearTimeout(u)}})}}const x0=3,km=e=>Math.min(1e3*2**e,3e4),n1=[520,503],k0=["GET","HEAD","OPTIONS"];
11var jm=class extends Error{constructor(e){super(e.message),this.name="PostgrestError",this.details=e.details,this.hint=e.hint,this.code=e.code}toJSON(){return{name:this.name,message:this.message,details:this.details,hint:this.hint,code:this.code}}};function Mm(e,t){return new Promise(s=>{if(t?.aborted){s();return}const a=setTimeout(()=>{t?.removeEventListener("abort",l),s()},e);function l(){clearTimeout(a),s()}t?.addEventListener("abort",l)})}function r1(e,t,s,a){return!(!a||s>=x0||!k0.includes(e)||!n1.includes(t))}var s1=class{constructor(e){var t,s,a,l,u;this.shouldThrowOnError=!1,this.retryEnabled=!0,this.method=e.method,this.url=e.url,this.headers=new Headers(e.headers),this.schema=e.schema,this.body=e.body,this.shouldThrowOnError=(t=e.shouldThrowOnError)!==null&&t!==void 0?t:!1,this.signal=e.signal,this.isMaybeSingle=(s=e.isMaybeSingle)!==null&&s!==void 0?s:!1,this.shouldStripNulls=(a=e.shouldStripNulls)!==null&&a!==void 0?a:!1,this.urlLengthLimit=(l=e.urlLengthLimit)!==null&&l!==void 0?l:8e3,this.retryEnabled=(u=e.retry)!==null&&u!==void 0?u:!0,e.fetch?this.fetch=e.fetch:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}stripNulls(){if(this.headers.get("Accept")==="text/csv")throw new Error("stripNulls() cannot be used with csv()");return this.shouldStripNulls=!0,this}setHeader(e,t){return this.headers=new Headers(this.headers),this.headers.set(e,t),this}retry(e){return this.retryEnabled=e,this}then(e,t){var s=this;if(this.schema===void 0||(["GET","HEAD"].includes(this.method)?this.headers.set("Accept-Profile",this.schema):this.headers.set("Content-Profile",this.schema)),this.method!=="GET"&&this.method!=="HEAD"&&this.headers.set("Content-Type","application/json"),this.shouldStripNulls){const c=this.headers.get("Accept");c==="application/vnd.pgrst.object+json"?this.headers.set("Accept","application/vnd.pgrst.object+json;nulls=stripped"):(!c||c==="application/json")&&this.headers.set("Accept","application/vnd.pgrst.array+json;nulls=stripped")}const a=this.fetch;let u=(async()=>{let c=0;for(;;){const g={};s.headers.forEach((y,b)=>{g[b]=y}),c>0&&(g["X-Retry-Count"]=String(c));let m;try{m=await a(s.url.toString(),{method:s.method,headers:g,body:JSON.stringify(s.body,(y,b)=>typeof b=="bigint"?b.toString():b),signal:s.signal})}catch(y){if(y?.name==="AbortError"||y?.code==="ABORT_ERR"||!k0.includes(s.method))throw y;if(s.retryEnabled&&c<x0){const b=km(c);c++,await Mm(b,s.signal);continue}throw y}if(r1(s.method,m.status,c,s.retryEnabled)){var d,p;const y=(d=(p=m.headers)===null||p===void 0?void 0:p.get("Retry-After"))!==null&&d!==void 0?d:null,b=y!==null?Math.max(0,parseInt(y,10)||0)*1e3:km(c);await m.text(),c++,await Mm(b,s.signal);continue}return await s.processResponse(m)}})();return this.shouldThrowOnError||(u=u.catch(c=>{var d;let p="",g="",m="";const y=c?.cause;if(y){var b,_,w,A;const U=(b=y?.message)!==null&&b!==void 0?b:"",j=(_=y?.code)!==null&&_!==void 0?_:"";p=`${(w=c?.name)!==null&&w!==void 0?w:"FetchError"}: ${c?.message}`,p+=`
12
13Caused by: ${(A=y?.name)!==null&&A!==void 0?A:"Error"}: ${U}`,j&&(p+=` (${j})`),y?.stack&&(p+=`
14${y.stack}`)}else{var R;p=(R=c?.stack)!==null&&R!==void 0?R:""}const O=this.url.toString().length;return c?.name==="AbortError"||c?.code==="ABORT_ERR"?(m="",g="Request was aborted (timeout or manual cancellation)",O>this.urlLengthLimit&&(g+=`. Note: Your request URL is ${O} characters, which may exceed server limits. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [many IDs])), consider using an RPC function to pass values server-side.`)):(y?.name==="HeadersOverflowError"||y?.code==="UND_ERR_HEADERS_OVERFLOW")&&(m="",g="HTTP headers exceeded server limits (typically 16KB)",O>this.urlLengthLimit&&(g+=`. Your request URL is ${O} characters. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [200+ IDs])), consider using an RPC function instead.`)),{success:!1,error:{message:`${(d=c?.name)!==null&&d!==void 0?d:"FetchError"}: ${c?.message}`,details:p,hint:g,code:m},data:null,count:null,status:0,statusText:""}}
14)),u.then(e,t)}async processResponse(e){var t=this;let s=null,a=null,l=null,u=e.status,c=e.statusText;if(e.ok){var d,p;if(t.method!=="HEAD"){var g;const b=await e.text();if(b!=="")if(t.headers.get("Accept")==="text/csv")a=b;else if(t.headers.get("Accept")&&(!((g=t.headers.get("Accept"))===null||g===void 0)&&g.includes("application/vnd.pgrst.plan+text")))a=b;else try{a=JSON.parse(b)}catch{if(s={message:b},a=null,t.shouldThrowOnError)throw new jm({message:b,details:"",hint:"",code:""})}}const m=(d=t.headers.get("Prefer"))===null||d===void 0?void 0:d.match(/count=(exact|planned|estimated)/),y=(p=e.headers.get("content-range"))===null||p===void 0?void 0:p.split("/");m&&y&&y.length>1&&(l=parseInt(y[1])),t.isMaybeSingle&&Array.isArray(a)&&(a.length>1?(s={code:"PGRST116",details:`Results contain ${a.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},a=null,l=null,u=406,c="Not Acceptable"):a.length===1?a=a[0]:a=null)}else{const m=await e.text();try{s=JSON.parse(m),Array.isArray(s)&&e.status===404&&(a=[],s=null,u=200,c="OK")}catch{e.status===404&&m===""?(u=204,c="No Content"):s={message:m}}if(s&&t.shouldThrowOnError)throw new jm(s)}return{success:s===null,error:s,data:a,count:l,status:u,statusText:c}}returns(){return this}overrideTypes(){return this}},i1=class extends s1{throwOnError(){return super.throwOnError()}select(e){let t=!1;const s=(e??"*").split("").map(a=>/\s/.test(a)&&!t?"":(a==='"'&&(t=!t),a)).join("");return this.url.searchParams.set("select",s),this.headers.append("Prefer","return=representation"),this}order(e,{ascending:t=!0,nullsFirst:s,foreignTable:a,referencedTable:l=a}={}){const u=l?`${l}.order`:"order",c=this.url.searchParams.get(u);return this.url.searchParams.set(u,`${c?`${c},`:""}${e}.${t?"asc":"desc"}${s===void 0?"":s?".nullsfirst":".nullslast"}`),this}limit(e,{foreignTable:t,referencedTable:s=t}={}){const a=typeof s>"u"?"limit":`${s}.limit`;return this.url.searchParams.set(a,`${e}`),this}range(e,t,{foreignTable:s,referencedTable:a=s}={}){const l=typeof a>"u"?"offset":`${a}.offset`,u=typeof a>"u"?"limit":`${a}.limit`;return this.url.searchParams.set(l,`${e}`),this.url.searchParams.set(u,`${t-e+1}`),this}abortSignal(e){return this.signal=e,this}single(){return this.headers.set("Accept","application/vnd.pgrst.object+json"),this}maybeSingle(){return this.isMaybeSingle=!0,this}csv(){return this.headers.set("Accept","text/csv"),this}geojson(){return this.headers.set("Accept","application/geo+json"),this}explain({analyze:e=!1,verbose:t=!1,settings:s=!1,buffers:a=!1,wal:l=!1,format:u="text"}={}){var c;const d=[e?"analyze":null,t?"verbose":null,s?"settings":null,a?"buffers":null,l?"wal":null].filter(Boolean).join("|"),p=(c=this.headers.get("Accept"))!==null&&c!==void 0?c:"application/json";return this.headers.set("Accept",`application/vnd.pgrst.plan+${u}; for="${p}"; options=${d};`),u==="json"?this:this}rollback(){return this.headers.append("Prefer","tx=rollback"),this}returns(){return this}maxAffected(e){return this.headers.append("Prefer","handling=strict"),this.headers.append("Prefer",`max-affected=${e}`),this}};const Um=new RegExp("[,()]");var oi=class extends i1{throwOnError(){return super.throwOnError()}eq(e,t){return this.url.searchParams.append(e,`eq.${t}`),this}neq(e,t){return this.url.searchParams.append(e,`neq.${t}`),this}gt(e,t){return this.url.searchParams.append(e,`gt.${t}`),this}gte(e,t){return this.url.searchParams.append(e,`gte.${t}`),this}lt(e,t){return this.url.searchParams.append(e,`lt.${t}`),this}lte(e,t){return this.url.searchParams.append(e,`lte.${t}`),this}like(e,t){return this.url.searchParams.append(e,`like.${t}`),this}likeAllOf(e,t){return this.url.searchParams.append(e,`like(all).{${t.join(",")}}`),this}likeAnyOf(e,t){return this.url.searchParams.append(e,`like(any).{${t.join(",")}}`),this}ilike(e,t){return this.url.searchParams.append(e,`ilike.${t}`),this}ilikeAllOf(e,t){return this.url.searchParams.append(e,`ilike(all).{${t.join(",")}}`),this}ilikeAnyOf(e,t){return this.url.searchParams.append(e,`ilike(any).{${t.join(",")}}`),this}regexMatch(e,t){return this.url.searchParams.append(e,`match.${t}`),this}regexIMatch(e,t){return this.url.searchParams.append(e,`imatch.${t}`),this}is(e,t){return this.url.searchParams.append(e,`is.${t}`),this}isDistinct(e,t){return this.url.searchParams.append(e,`isdistinct.${t}`),this}in(e,t){const s=Array.from(new Set(t)).map(a=>
14typeof a=="string"&&Um.test(a)?`"${a}"`:`${a}`).join(",");return this.url.searchParams.append(e,`in.(${s})`),this}notIn(e,t){const s=Array.from(new Set(t)).map(a=>typeof a=="string"&&Um.test(a)?`"${a}"`:`${a}`).join(",");return this.url.searchParams.append(e,`not.in.(${s})`),this}contains(e,t){return typeof t=="string"?this.url.searchParams.append(e,`cs.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cs.{${t.join(",")}}`):this.url.searchParams.append(e,`cs.${JSON.stringify(t)}`),this}containedBy(e,t){return typeof t=="string"?this.url.searchParams.append(e,`cd.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cd.{${t.join(",")}}`):this.url.searchParams.append(e,`cd.${JSON.stringify(t)}`),this}rangeGt(e,t){return this.url.searchParams.append(e,`sr.${t}`),this}rangeGte(e,t){return this.url.searchParams.append(e,`nxl.${t}`),this}rangeLt(e,t){return this.url.searchParams.append(e,`sl.${t}`),this}rangeLte(e,t){return this.url.searchParams.append(e,`nxr.${t}`),this}rangeAdjacent(e,t){return this.url.searchParams.append(e,`adj.${t}`),this}overlaps(e,t){return typeof t=="string"?this.url.searchParams.append(e,`ov.${t}`):this.url.searchParams.append(e,`ov.{${t.join(",")}}`),this}textSearch(e,t,{config:s,type:a}={}){let l="";a==="plain"?l="pl":a==="phrase"?l="ph":a==="websearch"&&(l="w");const u=s===void 0?"":`(${s})`;return this.url.searchParams.append(e,`${l}fts${u}.${t}`),this}match(e){return Object.entries(e).filter(([t,s])=>s!==void 0).forEach(([t,s])=>{this.url.searchParams.append(t,`eq.${s}`)}),this}not(e,t,s){return this.url.searchParams.append(e,`not.${t}.${s}`),this}or(e,{foreignTable:t,referencedTable:s=t}={}){const a=s?`${s}.or`:"or";return this.url.searchParams.append(a,`(${e})`),this}filter(e,t,s){return this.url.searchParams.append(e,`${t}.${s}`),this}},a1=class{constructor(e,{headers:t={},schema:s,fetch:a,urlLengthLimit:l=8e3,retry:u}){this.url=e,this.headers=new Headers(t),this.schema=s,this.fetch=a,this.urlLengthLimit=l,this.retry=u}cloneRequestState(){return{url:new URL(this.url.toString()),headers:new Headers(this.headers)}}select(e,t){const{head:s=!1,count:a}=t??{},l=s?"HEAD":"GET";let u=!1;const c=(e??"*").split("").map(g=>/\s/.test(g)&&!u?"":(g==='"'&&(u=!u),g)).join(""),{url:d,headers:p}=this.cloneRequestState();return d.searchParams.set("select",c),a&&p.append("Prefer",`count=${a}`),new oi({method:l,url:d,headers:p,schema:this.schema,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}insert(e,{count:t,defaultToNull:s=!0}={}){var a;const l="POST",{url:u,headers:c}=this.cloneRequestState();if(t&&c.append("Prefer",`count=${t}`),s||c.append("Prefer","missing=default"),Array.isArray(e)){const d=e.reduce((p,g)=>p.concat(Object.keys(g)),[]);if(d.length>0){const p=[...new Set(d)].map(g=>`"${g}"`);u.searchParams.set("columns",p.join(","))}}return new oi({method:l,url:u,headers:c,schema:this.schema,body:e,fetch:(a=this.fetch)!==null&&a!==void 0?a:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}upsert(e,{onConflict:t,ignoreDuplicates:s=!1,count:a,defaultToNull:l=!0}={}){var u;const c="POST",{url:d,headers:p}=this.cloneRequestState();if(p.append("Prefer",`resolution=${s?"ignore":"merge"}-duplicates`),t!==void 0&&d.searchParams.set("on_conflict",t),a&&p.append("Prefer",`count=${a}`),l||p.append("Prefer","missing=default"),Array.isArray(e)){const g=e.reduce((m,y)=>m.concat(Object.keys(y)),[]);if(g.length>0){const m=[...new Set(g)].map(y=>`"${y}"`);d.searchParams.set("columns",m.join(","))}}return new oi({method:c,url:d,headers:p,schema:this.schema,body:e,fetch:(u=this.fetch)!==null&&u!==void 0?u:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}update(e,{count:t}={}){var s;const a="PATCH",{url:l,headers:u}=this.cloneRequestState();return t&&u.append("Prefer",`count=${t}`),new oi({method:a,url:l,headers:u,schema:this.schema,body:e,fetch:(s=this.fetch)!==null&&s!==void 0?s:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}delete({count:e}={}){var t;const s="DELETE",{url:a,headers:l}=this.cloneRequestState();return e&&l.append("Prefer",`count=${e}`),new oi({method:s,url:a,headers:l,schema:this.schema,fetch:(t=this.fetch)!==null&&t!==void 0?t:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};function Na(e){"@babel/helpers - typeof";return Na=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Na(e)}function o1(e,t){if(Na(e)!="object"||!e)return e;var s=e[Symbol.toPrimitive];if(s!==void 0){var a=s.call(e,t);if(Na(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function l1(e){var t=o1(e,"string");return Na(t)=="symbol"?t:t+""}function u1(e,t,s){return(t=l1(t))in e?Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[t]=s,e}function Dm(e,t){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(l){return Object.getOwnPropertyDescriptor(e,l).enumerable})),s.push.apply(s,a)}return s}function ml(e){for(var t=1;t<arguments.length;t++){var s=arguments[t]!=null?arguments[t]:{};
14t%2?Dm(Object(s),!0).forEach(function(a){u1(e,a,s[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(s)):Dm(Object(s)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(s,a))})}return e}var c1=class j0{constructor(t,{headers:s={},schema:a,fetch:l,timeout:u,urlLengthLimit:c=8e3,retry:d}={}){this.url=t,this.headers=new Headers(s),this.schemaName=a,this.urlLengthLimit=c;const p=l??globalThis.fetch;u!==void 0&&u>0?this.fetch=(g,m)=>{const y=new AbortController,b=setTimeout(()=>y.abort(),u),_=m?.signal;if(_){if(_.aborted)return clearTimeout(b),p(g,m);const w=()=>{clearTimeout(b),y.abort()};return _.addEventListener("abort",w,{once:!0}),p(g,ml(ml({},m),{},{signal:y.signal})).finally(()=>{clearTimeout(b),_.removeEventListener("abort",w)})}return p(g,ml(ml({},m),{},{signal:y.signal})).finally(()=>clearTimeout(b))}:this.fetch=p,this.retry=d}from(t){if(!t||typeof t!="string"||t.trim()==="")throw new Error("Invalid relation name: relation must be a non-empty string.");return new a1(new URL(`${this.url}/${t}`),{headers:new Headers(this.headers),schema:this.schemaName,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}schema(t){return new j0(this.url,{headers:this.headers,schema:t,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}rpc(t,s={},{head:a=!1,get:l=!1,count:u}={}){var c;let d;const p=new URL(`${this.url}/rpc/${t}`);let g;const m=_=>_!==null&&typeof _=="object"&&(!Array.isArray(_)||_.some(m)),y=a&&Object.values(s).some(m);y?(d="POST",g=s):a||l?(d=a?"HEAD":"GET",Object.entries(s).filter(([_,w])=>w!==void 0).map(([_,w])=>[_,Array.isArray(w)?`{${w.join(",")}}`:`${w}`]).forEach(([_,w])=>{p.searchParams.append(_,w)})):(d="POST",g=s);const b=new Headers(this.headers);return y?b.set("Prefer",u?`count=${u},return=minimal`:"return=minimal"):u&&b.set("Prefer",`count=${u}`),new oi({method:d,url:p,headers:b,schema:this.schemaName,body:g,fetch:(c=this.fetch)!==null&&c!==void 0?c:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};class h1{constructor(){}static detectEnvironment(){var t;if(typeof WebSocket<"u")return{type:"native",wsConstructor:WebSocket};const s=globalThis;if(typeof globalThis<"u"&&typeof s.WebSocket<"u")return{type:"native",wsConstructor:s.WebSocket};const a=typeof global<"u"?global:void 0;if(a&&typeof a.WebSocket<"u")return{type:"native",wsConstructor:a.WebSocket};if(typeof globalThis<"u"&&typeof s.WebSocketPair<"u"&&typeof globalThis.WebSocket>"u")return{type:"cloudflare",error:"Cloudflare Workers detected. WebSocket clients are not supported in Cloudflare Workers.",workaround:"Use Cloudflare Workers WebSocket API for server-side WebSocket handling, or deploy to a different runtime."};if(typeof globalThis<"u"&&s.EdgeRuntime||typeof navigator<"u"&&(!((t=navigator.userAgent)===null||t===void 0)&&t.includes("Vercel-Edge")))return{type:"unsupported",error:"Edge runtime detected (Vercel Edge/Netlify Edge). WebSockets are not supported in edge functions.",workaround:"Use serverless functions or a different deployment target for WebSocket functionality."};const l=globalThis.process;if(l){const u=l.versions;if(u&&u.node){const c=u.node,d=parseInt(c.replace(/^v/,"").split(".")[0]);return d>=22?typeof globalThis.WebSocket<"u"?{type:"native",wsConstructor:globalThis.WebSocket}:{type:"unsupported",error:`Node.js ${d} detected but native WebSocket not found.`,workaround:"Provide a WebSocket implementation via the transport option."}:{type:"unsupported",error:`Node.js ${d} detected without native WebSocket support.`,workaround:`For Node.js < 22, install "ws" package and provide it via the transport option:
15import ws from "ws"
16new RealtimeClient(url, { transport: ws })`}}}return{type:"unsupported",error:"Unknown JavaScript runtime without WebSocket support.",workaround:"Ensure you're running in a supported environment (browser, Node.js, Deno) or provide a custom WebSocket implementation."}}static getWebSocketConstructor(){const t=this.detectEnvironment();if(t.wsConstructor)return t.wsConstructor;let s=t.error||"WebSocket not supported in this environment.";throw t.workaround&&(s+=`
17
18Suggested solution: ${t.workaround}`),new Error(s)}static isWebSocketSupported(){try{const t=this.detectEnvironment();return t.type==="native"||t.type==="ws"}catch{return!1}}}const f1="2.108.1",d1=`realtime-js/${f1}`,p1="1.0.0",M0="2.0.0",g1=M0,y1=1e4,m1=100,Rr={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},U0={close:"phx_close",error:"phx_error",join:"phx_join",leave:"phx_leave",access_token:"access_token"},sf={connecting:"connecting",closing:"closing",closed:"closed"};class v1{constructor(t){this.HEADER_LENGTH=1,this.USER_BROADCAST_PUSH_META_LENGTH=6,this.KINDS={userBroadcastPush:3,userBroadcast:4},this.BINARY_ENCODING=0,this.JSON_ENCODING=1,this.BROADCAST_EVENT="broadcast",this.allowedMetadataKeys=[],this.allowedMetadataKeys=t??[]}encode(t,s){if(t.event===this.BROADCAST_EVENT&&!(t.payload instanceof ArrayBuffer)&&typeof t.payload.event=="string")return s(this._binaryEncodeUserBroadcastPush(t));let a=[t.join_ref,t.ref,t.topic,t.event,t.payload];return s(JSON.stringify(a))}_binaryEncodeUserBroadcastPush(t){var s;return this._isArrayBuffer((s=t.payload)===null||s===void 0?void 0:s.payload)?this._encodeBinaryUserBroadcastPush(t):this._encodeJsonUserBroadcastPush(t)}_encodeBinaryUserBroadcastPush(t){var s,a;const l=(a=(s=t.payload)===null||s===void 0?void 0:s.payload)!==null&&a!==void 0?a:new ArrayBuffer(0);return this._encodeUserBroadcastPush(t,this.BINARY_ENCODING,l)}_encodeJsonUserBroadcastPush(t){var s,a;const l=(a=(s=t.payload)===null||s===void 0?void 0:s.payload)!==null&&a!==void 0?a:{},c=new TextEncoder().encode(JSON.stringify(l)).buffer;return this._encodeUserBroadcastPush(t,this.JSON_ENCODING,c)}_encodeUserBroadcastPush(t,s,a){var l,u;
18const c=t.topic,d=(l=t.ref)!==null&&l!==void 0?l:"",p=(u=t.join_ref)!==null&&u!==void 0?u:"",g=t.payload.event,m=this.allowedMetadataKeys?this._pick(t.payload,this.allowedMetadataKeys):{},y=Object.keys(m).length===0?"":JSON.stringify(m);if(p.length>255)throw new Error(`joinRef length ${p.length} exceeds maximum of 255`);if(d.length>255)throw new Error(`ref length ${d.length} exceeds maximum of 255`);if(c.length>255)throw new Error(`topic length ${c.length} exceeds maximum of 255`);if(g.length>255)throw new Error(`userEvent length ${g.length} exceeds maximum of 255`);if(y.length>255)throw new Error(`metadata length ${y.length} exceeds maximum of 255`);const b=this.USER_BROADCAST_PUSH_META_LENGTH+p.length+d.length+c.length+g.length+y.length,_=new ArrayBuffer(this.HEADER_LENGTH+b);let w=new DataView(_),A=0;w.setUint8(A++,this.KINDS.userBroadcastPush),w.setUint8(A++,p.length),w.setUint8(A++,d.length),w.setUint8(A++,c.length),w.setUint8(A++,g.length),w.setUint8(A++,y.length),w.setUint8(A++,s),Array.from(p,O=>w.setUint8(A++,O.charCodeAt(0))),Array.from(d,O=>w.setUint8(A++,O.charCodeAt(0))),Array.from(c,O=>w.setUint8(A++,O.charCodeAt(0))),Array.from(g,O=>w.setUint8(A++,O.charCodeAt(0))),Array.from(y,O=>w.setUint8(A++,O.charCodeAt(0)));var R=new Uint8Array(_.byteLength+a.byteLength);return R.set(new Uint8Array(_),0),R.set(new Uint8Array(a),_.byteLength),R.buffer}decode(t,s){if(this._isArrayBuffer(t)){let a=this._binaryDecode(t);return s(a)}if(typeof t=="string"){const a=JSON.parse(t),[l,u,c,d,p]=a;return s({join_ref:l,ref:u,topic:c,event:d,payload:p})}return s({})}_binaryDecode(t){const s=new DataView(t),a=s.getUint8(0),l=new TextDecoder;if(a===this.KINDS.userBroadcast)return this._decodeUserBroadcast(t,s,l)}_decodeUserBroadcast(t,s,a){const l=s.getUint8(1),u=s.getUint8(2),c=s.getUint8(3),d=s.getUint8(4);let p=this.HEADER_LENGTH+4;const g=a.decode(t.slice(p,p+l));p=p+l;const m=a.decode(t.slice(p,p+u));p=p+u;const y=a.decode(t.slice(p,p+c));p=p+c;const b=t.slice(p,t.byteLength),_=d===this.JSON_ENCODING?JSON.parse(a.decode(b)):b,w={type:this.BROADCAST_EVENT,event:m,payload:_};return c>0&&(w.meta=JSON.parse(y)),{join_ref:null,ref:null,topic:g,event:this.BROADCAST_EVENT,payload:w}}_isArrayBuffer(t){var s;return t instanceof ArrayBuffer||((s=t?.constructor)===null||s===void 0?void 0:s.name)==="ArrayBuffer"}_pick(t,s){return!t||typeof t!="object"?{}:Object.fromEntries(Object.entries(t).filter(([a])=>s.includes(a)))}}var Pe;(function(e){e.abstime="abstime",e.bool="bool",e.date="date",e.daterange="daterange",e.float4="float4",e.float8="float8",e.int2="int2",e.int4="int4",e.int4range="int4range",e.int8="int8",e.int8range="int8range",e.json="json",e.jsonb="jsonb",e.money="money",e.numeric="numeric",e.oid="oid",e.reltime="reltime",e.text="text",e.time="time",e.timestamp="timestamp",e.timestamptz="timestamptz",e.timetz="timetz",e.tsrange="tsrange",e.tstzrange="tstzrange"})(Pe||(Pe={}));const Nm=(e,t,s={})=>{var a;const l=(a=s.skipTypes)!==null&&a!==void 0?a:[];return t?Object.keys(t).reduce((u,c)=>(u[c]=b1(c,e,t,l),u),{}):{}},b1=(e,t,s,a)=>{const l=t.find(d=>d.name===e),u=l?.type,c=s[e];return u&&!a.includes(u)?D0(u,c):af(c)},D0=(e,t)=>{if(e.charAt(0)==="_"){const s=e.slice(1,e.length);return E1(t,s)}switch(e){case Pe.bool:return _1(t);case Pe.float4:case Pe.float8:case Pe.int2:case Pe.int4:case Pe.int8:case Pe.numeric:case Pe.oid:return S1(t);case Pe.json:case Pe.jsonb:return w1(t);case Pe.timestamp:return T1(t);case Pe.abstime:case Pe.date:case Pe.daterange:case Pe.int4range:case Pe.int8range:case Pe.money:case Pe.reltime:case Pe.text:case Pe.time:case Pe.timestamptz:case Pe.timetz:case Pe.tsrange:case Pe.tstzrange:return af(t);default:return af(t)}},af=e=>e,_1=e=>{switch(e){case"t":return!0;case"f":return!1;default:return e}},S1=e=>{if(typeof e=="string"){const t=parseFloat(e);if(!Number.isNaN(t))return t}return e},w1=e=>{if(typeof e=="string")try{return JSON.parse(e)}catch{return e}return e},E1=(e,t)=>{if(typeof e!="string")return e;const s=e.length-1,a=e[s];if(e[0]==="{"&&a==="}"){let u;const c=e.slice(1,s);try{u=JSON.parse("["+c+"]")}catch{u=c?c.split(","):[]}return u.map(d=>D0(t,d))}return e},T1=e=>typeof e=="string"?e.replace(" ","T"):e,N0=e=>{const t=new URL(e);return t.protocol=t.protocol.replace(/^ws/i,"http"),t.pathname=t.pathname.replace(/\/+$/,"").replace(/\/socket\/websocket$/i,"").replace(/\/socket$/i,"").replace(/\/websocket$/i,""),t.pathname===""||t.pathname==="/"?t.pathname="/api/broadcast":t.pathname=t.pathname+"/api/broadcast",t.href};var Aa=e=>typeof e=="function"?e:function(){return e},R1=typeof self<"u"?self:null,li=typeof window<"u"?window:null,mn=R1||li||globalThis,A1="2.0.0",O1=1e4,C1=1e3,bn={connecting:0,open:1,closing:2,closed:3},kt={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},Vn={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave"},of={longpoll:"longpoll",websocket:"websocket"},x1={complete:4},lf="base64url.bearer.phx.",vl=class{constructor(e,t,s,a){this.channel=e,this.event=t,this.payload=s||function(){return{}},this.receivedResp=null,this.timeout=a,this.timeoutTimer=null,this.recHo
vendor: 4,549 bytes, line 18
18oks=[],this.sent=!1,this.ref=void 0}resend(e){this.timeout=e,this.reset(),this.send()}send(){this.hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload(),ref:this.ref,join_ref:this.channel.joinRef()}))}receive(e,t){return this.hasReceived(e)&&t(this.receivedResp.response),this.recHooks.push({status:e,callback:t}),this}reset(){this.cancelRefEvent(),this.ref=null,this.refEvent=null,this.receivedResp=null,this.sent=!1}destroy(){this.cancelRefEvent(),this.cancelTimeout()}matchReceive({status:e,response:t,_ref:s}){this.recHooks.filter(a=>a.status===e).forEach(a=>a.callback(t))}cancelRefEvent(){this.refEvent&&this.channel.off(this.refEvent)}cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=null}startTimeout(){this.timeoutTimer&&this.cancelTimeout(),this.ref=this.channel.socket.makeRef(),this.refEvent=this.channel.replyEventName(this.ref),this.channel.on(this.refEvent,e=>{this.cancelRefEvent(),this.cancelTimeout(),this.receivedResp=e,this.matchReceive(e)}),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}hasReceived(e){return this.receivedResp&&this.receivedResp.status===e}trigger(e,t){this.channel.trigger(this.refEvent,{status:e,response:t})}},L0=class{constructor(e,t){this.callback=e,this.timerCalc=t,this.timer=void 0,this.tries=0}reset(){this.tries=0,clearTimeout(this.timer)}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout(()=>{this.tries=this.tries+1,this.callback()},this.timerCalc(this.tries+1))}},k1=class{constructor(e,t,s){this.state=kt.closed,this.topic=e,this.params=Aa(t||{}),this.socket=s,this.bindings=[],this.bindingRef=0,this.timeout=this.socket.timeout,this.joinedOnce=!1,this.joinPush=new vl(this,Vn.join,this.params,this.timeout),this.pushBuffer=[],this.stateChangeRefs=[],this.rejoinTimer=new L0(()=>{this.socket.isConnected()&&this.rejoin()},this.socket.rejoinAfterMs),this.stateChangeRefs.push(this.socket.onError(()=>this.rejoinTimer.reset())),this.stateChangeRefs.push(this.socket.onOpen(()=>{this.rejoinTimer.reset(),this.isErrored()&&this.rejoin()})),this.joinPush.receive("ok",()=>{this.state=kt.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(a=>a.send()),this.pushBuffer=[]}),this.joinPush.receive("error",a=>{this.state=kt.errored,this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,a),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.onClose(()=>{this.rejoinTimer.reset(),this.socket.hasLogger()&&this.socket.log("channel",`close ${this.topic}`),this.state=kt.closed,this.socket.remove(this)}),this.onError(a=>{this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,a),this.isJoining()&&this.joinPush.reset(),this.state=kt.errored,this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.joinPush.receive("timeout",()=>{this.socket.hasLogger()&&this.socket.log("channel",`timeout ${this.topic}`,this.joinPush.timeout),new vl(this,Vn.leave,Aa({}),this.timeout).send(),this.state=kt.errored,this.joinPush.reset(),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.on(Vn.reply,(a,l)=>{this.trigger(this.replyEventName(l),a)})}join(e=this.timeout){if(this.joinedOnce)throw new Error("tried to join multiple times. 'join' can only be called a single time per channel instance");return this.timeout=e,this.joinedOnce=!0,this.rejoin(),this.joinPush}teardown(){this.pushBuffer.forEach(e=>e.destroy()),this.pushBuffer=[],this.rejoinTimer.reset(),this.joinPush.destroy(),this.state=kt.closed,this.bindings=[]}onClose(e){this.on(Vn.close,e)}onError(e){return this.on(Vn.error,t=>e(t))}on(e,t){let s=this.bindingRef++;return this.bindings.push({event:e,ref:s,callback:t}),s}off(e,t){this.bindings=this.bindings.filter(s=>!(s.event===e&&(typeof t>"u"||t===s.ref)))}canPush(){return this.socket.isConnected()&&this.isJoined()}push(e,t,s=this.timeout){if(t=t||{},!this.joinedOnce)throw new Error(`tried to push '${e}' to '${this.topic}' before joining. Use channel.join() before pushing events`);let a=new vl(this,e,function(){return t},s);return this.canPush()?a.send():(a.startTimeout(),this.pushBuffer.push(a)),a}leave(e=this.timeout){this.rejoinTimer.reset(),this.joinPush.cancelTimeout(),this.state=kt.leaving;let t=()=>{this.socket.hasLogger()&&this.socket.log("channel",`leave ${this.topic}`),this.trigger(Vn.close,"leave")},s=new vl(this,Vn.leave,Aa({}),e);return s.receive("ok",()=>t()).receive("timeout",()=>t()),s.send(),this.canPush()||s.trigger("ok",{}),s}
18onMessage(e,t,s){return t}filterBindings(e,t,s){return!0}isMember(e,t,s,a){return this.topic!==e?!1:a&&a!==this.joinRef()?(this.socket.hasLogger()&&this.socket.log("channel","dropping outdated message",{topic:e,event:t,payload:s,joinRef:a}),!1):!0}joinRef(){return this.joinPush.ref}rejoin(e=this.timeout){this.isLeaving()||(this.socket.leaveOpenTopic(this.topic),this.state=kt.joining,this.joinPush.resend(e))}trigger(e,t,s,a){let l=this.onMessage(e,t,s,a);if(t&&!l)throw new Error("channel onMessage callbacks must return the payload, modified or unmodified");let u=this.bindings.filter(c=>c.event===e&&this.filterBindings(c,t,s));for(let c=0;c<u.length;c++)u[c].callback(l,s,a||this.joinRef())}replyEventName(e){return`chan_reply_${e}`}isClosed(){return this.state===kt.closed}isErrored(){return this.state===kt.errored}isJoined(){return this.state===kt.joined}isJoining(){return this.state===kt.joining}isLeaving(){return this.state===kt.leaving}},Bl=class{static request(e,t,s,a,l,u,c){if(mn.XDomainRequest){let d=new mn.XDomainRequest;return this.xdomainRequest(d,e,t,a,l,u,c)}else if(mn.XMLHttpRequest){let d=new mn.XMLHttpRequest;return this.xhrRequest(d,e,t,s,a,l,u,c)}else{if(mn.fetch&&mn.AbortController)return this.fetchRequest(e,t,s,a,l,u,c);throw new Error("No suitable XMLHttpRequest implementation found")}}static fetchRequest(e,t,s,a,l,u,c){let d={method:e,headers:s,body:a},p=null;return l&&(p=new AbortController,setTimeout(()=>p.abort(),l),d.signal=p.signal),mn.fetch(t,d).then(g=>g.text()).then(g=>this.parseJSON(g)).then(g=>c&&c(g)).catch(g=>{g.name==="AbortError"&&u?u():c&&c(null)}),p}static xdomainRequest(e,t,s,a,l,u,c){return e.timeout=l,e.open(t,s),e.onload=()=>{let d=this.parseJSON(e.responseText);c&&c(d)},u&&(e.ontimeout=u),e.onprogress=()=>{},e.send(a),e}static xhrRequest(e,t,s,a,l,u,c,d){e.open(t,s,!0),e.timeout=u;for(let[p,g]of Object.entries(a))e.setRequestHeader(p,g);return e.onerror=()=>d&&d(null),e.onreadystatechange=()=>{if(e.readyState===x1.complete&&d){let p=this.parseJSON(e.responseText);d(p)}},c&&(e.ontimeout=c),e.send(l),e}static parseJSON(e){if(!e||e==="")return null;try{return JSON.parse(e)}catch{return console&&console.log("failed to parse JSON response",e),null}}static serialize(e,t){let s=[];for(var a in e){if(!Object.prototype.hasOwnProperty.call(e,a))continue;let l=t?`${t}[${a}]`:a,u=e[a];typeof u=="object"?s.push(this.serialize(u,l)):s.push(encodeURIComponent(l)+"="+encodeURIComponent(u))}return s.join("&")}static appendParams(e,t){if(Object.keys(t).length===0)return e;let s=e.match(/\?/)?"&":"?";return`${e}${s}${this.serialize(t)}`}},j1=e=>{let t="",s=new Uint8Array(e),a=s.byteLength;for(let l=0;l<a;l++)t+=String.fromCharCode(s[l]);return btoa(t)},ni=class{constructor(e,t){t&&t.length===2&&t[1].startsWith(lf)&&(this.authToken=atob(t[1].slice(lf.length))),this.endPoint=null,this.token=null,this.skipHeartbeat=!0,this.reqs=new Set,this.awaitingBatchAck=!1,this.currentBatch=null,this.currentBatchTimer=null,this.batchBuffer=[],this.onopen=function(){},this.onerror=function(){},this.onmessage=function(){},this.onclose=function(){},this.pollEndpoint=this.normalizeEndpoint(e),this.readyState=bn.connecting,setTimeout(()=>this.poll(),0)}normalizeEndpoint(e){return e.replace("ws://","http://").replace("wss://","https://").replace(new RegExp("(.*)/"+of.websocket),"$1/"+of.longpoll)}endpointURL(){return Bl.appendParams(this.pollEndpoint,{token:this.token})}closeAndRetry(e,t,s){this.close(e,t,s),this.readyState=bn.connecting}ontimeout(){this.onerror("timeout"),this.closeAndRetry(1005,"timeout",!1)}isActive(){return this.readyState===bn.open||this.readyState===bn.connecting}poll(){const e={Accept:"application/json"};this.authToken&&(e["X-Phoenix-AuthToken"]=this.authToken),this.ajax("GET",e,null,()=>this.ontimeout(),t=>{if(t){var{status:s,token:a,messages:l}=t;if(s===410&&this.token!==null){this.onerror(410),this.closeAndRetry(3410,"session_gone",!1);return}this.token=a}else s=0;switch(s){case 200:l.forEach(u=>{setTimeout(()=>this.onmessage({data:u}),0)}),this.poll();break;case 204:this.poll();break;case 410:this.readyState=bn.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 ${s}`)}})}send(e){typeof e!="string"&&(e=j1(e)),this.currentBatch?this.currentBatch.push(e):this.awaitingBatchAck?this.batchBuffer.push(e):(this.currentBatch=[e],this.currentBatchTimer=setTimeout(()=>{this.batchSend(this.currentBatch),this.currentBatch=null},0))}batchSend(e){this.awaitingBatchAck=!0,this.ajax("POST",{"Content-Type":"application/x-ndjson"},e.join(`
19`),()=>this.onerror("timeout"),t=>{this.awaitingBatchAck=!1,!t||t.status!==200?(this.onerror(t&&t.status),this.closeAndRetry(1011,"internal server error",!1)):this.batchBuffer.length>0&&(this.batchSend(this.batchBuffer),this.batchBuffer=[])})}close(e,t,s){for(let l of this.reqs)l.abort();this.readyState=bn.closed;let a=Object.assign({code:1e3,reason:void 0,wasClean:!0},{code:e,reason:t,wasClean:s});this.batchBuffer=[],clearTimeout(this.currentBatchTimer),this.currentBatchTimer=null,typeof CloseEvent<"u"?this.onclose(new CloseEvent("close",a)):this.onclose(a)}ajax(e,t,s,a,l){let u,c=()=>{this.reqs.delete(u),a()};u=Bl.request(e,this.endpointURL(),t,s,this.timeout,c,d=>{this.reqs.delete(u),this.isActive()&&l(d)}),this.reqs.add(u)}},M1=class Ea{constructor(t,s={}){let a=s.events||{state:"presence_state",diff:"presence_diff"};this.state={},this.pendingDiffs=[],this.channel=t,this.joinRef=null,this.caller={onJoin:function(){},onLeave:function(){},onSync:function(){}},this.channel.on(a.state,l=>{let{onJoin:u,onLeave:c,onSync:d}=this.caller;this.joinRef=this.channel.joinRef(),this.state=Ea.syncState(this.state,l,u,c),this.pendingDiffs.forEach(p=>{this.state=Ea.syncDiff(this.state,p,u,c)}),this.pendingDiffs=[],d()}),this.channel.on(a.diff,l=>{let{onJoin:u,onLeave:c,onSync:d}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(l):(this.state=Ea.syncDiff(this.state,l,u,c),d())})}onJoin(t){this.caller.onJoin=t}onLeave(t){this.caller.onLeave=t}onSync(t){this.caller.onSync=t}list(t){return Ea.list(this.state,t)}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel.joinRef()}static syncState(t,s,a,l){let u=this.clone(t),c={},d={};return this.map(u,(p,g)=>{s[p]||(d[p]=g)}),this.map(s,(p,g)=>{let m=u[p];if(m){let y=g.metas.map(A=>A.phx_ref),b=m.metas.map(A=>A.phx_ref),_=g.metas.filter(A=>b.indexOf(A.phx_ref)<0),w=m.metas.filter(A=>y.indexOf(A.phx_ref)<0);_.length>0&&(c[p]=g,c[p].metas=_),w.length>0&&(d[p]=this.clone(m),d[p].metas=w)}else c[p]=g}),this.syncDiff(u,{joins:c,leaves:d},a,l)}static syncDiff(t,s,a,l){let{joins:u,leaves:c}=this.clone(s);return a||(a=function(){}),l||(l=function(){}),this.map(u,(d,p)=>{let g=t[d];if(t[d]=this.clone(p),g){let m=t[d].metas.map(b=>b.phx_ref),y=g.metas.filter(b=>m.indexOf(b.phx_ref)<0);t[d].metas.unshift(...y)}a(d,g,p)}),this.map(c,(d,p)=>{let g=t[d];if(!g)return;let m=p.metas.map(y=>y.phx_ref);g.metas=g.metas.filter(y=>m.indexOf(y.phx_ref)<0),l(d,g,p),g.metas.length===0&&delete t[d]}),t}static list(t,s){return s||(s=function(a,l){return l}),this.map(t,(a,l)=>s(a,l))}static map(t,s){return Object.getOwnPropertyNames(t).map(a=>s(a,t[a]))}static clone(t){return JSON.parse(JSON.stringify(t))}},bl={HEADER_LENGTH:1,META_LENGTH:4,KINDS:{push:0,reply:1,broadcast:2},encode(e,t){if(e.payload.constructor===ArrayBuffer)return t(this.binaryEncode(e));{let s=[e.join_ref,e.ref,e.topic,e.event,e.payload];return t(JSON.stringify(s))}},decode(e,t){if(e.constructor===ArrayBuffer)return t(this.binaryDecode(e));{let[s,a,l,u,c]=JSON.parse(e);return t({join_ref:s,ref:a,topic:l,event:u,payload:c})}},binaryEncode(e){let{join_ref:t,ref:s,event:a,topic:l,payload:u}=e,c=this.META_LENGTH+t.length+s.length+l.length+a.length,d=new ArrayBuffer(this.HEADER_LENGTH+c),p=new DataView(d),g=0;p.setUint8(g++,this.KINDS.push),p.setUint8(g++,t.length),p.setUint8(g++,s.length),p.setUint8(g++,l.length),p.setUint8(g++,a.length),Array.from(t,y=>p.setUint8(g++,y.charCodeAt(0))),Array.from(s,y=>p.setUint8(g++,y.charCodeAt(0))),Array.from(l,y=>
19p.setUint8(g++,y.charCodeAt(0))),Array.from(a,y=>p.setUint8(g++,y.charCodeAt(0)));var m=new Uint8Array(d.byteLength+u.byteLength);return m.set(new Uint8Array(d),0),m.set(new Uint8Array(u),d.byteLength),m.buffer},binaryDecode(e){let t=new DataView(e),s=t.getUint8(0),a=new TextDecoder;switch(s){case this.KINDS.push:return this.decodePush(e,t,a);case this.KINDS.reply:return this.decodeReply(e,t,a);case this.KINDS.broadcast:return this.decodeBroadcast(e,t,a)}},decodePush(e,t,s){let a=t.getUint8(1),l=t.getUint8(2),u=t.getUint8(3),c=this.HEADER_LENGTH+this.META_LENGTH-1,d=s.decode(e.slice(c,c+a));c=c+a;let p=s.decode(e.slice(c,c+l));c=c+l;let g=s.decode(e.slice(c,c+u));c=c+u;let m=e.slice(c,e.byteLength);return{join_ref:d,ref:null,topic:p,event:g,payload:m}},decodeReply(e,t,s){let a=t.getUint8(1),l=t.getUint8(2),u=t.getUint8(3),c=t.getUint8(4),d=this.HEADER_LENGTH+this.META_LENGTH,p=s.decode(e.slice(d,d+a));d=d+a;let g=s.decode(e.slice(d,d+l));d=d+l;let m=s.decode(e.slice(d,d+u));d=d+u;let y=s.decode(e.slice(d,d+c));d=d+c;let b=e.slice(d,e.byteLength),_={status:y,response:b};return{join_ref:p,ref:g,topic:m,event:Vn.reply,payload:_}},decodeBroadcast(e,t,s){let a=t.getUint8(1),l=t.getUint8(2),u=this.HEADER_LENGTH+2,c=s.decode(e.slice(u,u+a));u=u+a;let d=s.decode(e.slice(u,u+l));u=u+l;let p=e.slice(u,e.byteLength);return{join_ref:null,ref:null,topic:c,event:d,payload:p}}},U1=class{constructor(e,t={}){this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.channels=[],this.sendBuffer=[],this.ref=0,this.fallbackRef=null,this.timeout=t.timeout||O1,this.transport=t.transport||mn.WebSocket||ni,this.conn=void 0,this.primaryPassedHealthCheck=!1,this.longPollFallbackMs=t.longPollFallbackMs,this.fallbackTimer=null;let s=null;try{s=mn&&mn.sessionStorage}catch{}this.sessionStore=t.sessionStorage||s,this.establishedConnections=0,this.defaultEncoder=bl.encode.bind(bl),this.defaultDecoder=bl.decode.bind(bl),this.closeWasClean=!0,this.disconnecting=!1,this.binaryType=t.binaryType||"arraybuffer",this.connectClock=1,this.pageHidden=!1,this.encode=void 0,this.decode=void 0,this.transport!==ni?(this.encode=t.encode||this.defaultEncoder,this.decode=t.decode||this.defaultDecoder):(this.encode=this.defaultEncoder,this.decode=this.defaultDecoder);let a=null;li&&li.addEventListener&&(li.addEventListener("pagehide",l=>{this.conn&&(this.disconnect(),a=this.connectClock)}),li.addEventListener("pageshow",l=>{a===this.connectClock&&(a=null,this.connect())}),li.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"?this.pageHidden=!0:(this.pageHidden=!1,!this.isConnected()&&!this.closeWasClean&&this.teardown(()=>this.connect()))})),this.heartbeatIntervalMs=t.heartbeatIntervalMs||3e4,this.autoSendHeartbeat=t.autoSendHeartbeat??!0,this.heartbeatCallback=t.heartbeatCallback??(()=>{}),this.rejoinAfterMs=l=>t.rejoinAfterMs?t.rejoinAfterMs(l):[1e3,2e3,5e3][l-1]||1e4,this.reconnectAfterMs=l=>t.reconnectAfterMs?t.reconnectAfterMs(l):[10,50,100,150,200,250,500,1e3,2e3][l-1]||5e3,this.logger=t.logger||null,!this.logger&&t.debug&&(this.logger=(l,u,c)=>{console.log(`${l}: ${u}`,c)}),this.longpollerTimeout=t.longpollerTimeout||2e4,this.params=Aa(t.params||{}),this.endPoint=`${e}/${of.websocket}`,this.vsn=t.vsn||A1,this.heartbeatTimeoutTimer=null,this.heartbeatTimer=null,this.heartbeatSentAt=null,this.pendingHeartbeatRef=null,this.reconnectTimer=new L0(()=>
19{if(this.pageHidden){this.log("Not reconnecting as page is hidden!"),this.teardown();return}this.teardown(async()=>{t.beforeReconnect&&await t.beforeReconnect(),this.connect()})},this.reconnectAfterMs),this.authToken=t.authToken}getLongPollTransport(){return ni}replaceTransport(e){this.connectClock++,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.conn&&(this.conn.close(),this.conn=null),this.transport=e}protocol(){return location.protocol.match(/^https/)?"wss":"ws"}endPointURL(){let e=Bl.appendParams(Bl.appendParams(this.endPoint,this.params()),{vsn:this.vsn});return e.charAt(0)!=="/"?e:e.charAt(1)==="/"?`${this.protocol()}:${e}`:`${this.protocol()}://${location.host}${e}`}disconnect(e,t,s){this.connectClock++,this.disconnecting=!0,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.teardown(()=>{this.disconnecting=!1,e&&e()},t,s)}connect(e){e&&(console&&console.log("passing params to connect is deprecated. Instead pass :params to the Socket constructor"),this.params=Aa(e)),!(this.conn&&!this.disconnecting)&&(this.longPollFallbackMs&&this.transport!==ni?this.connectWithF
vendor: 4,353 bytes, line 19
19allback(ni,this.longPollFallbackMs):this.transportConnect())}log(e,t,s){this.logger&&this.logger(e,t,s)}hasLogger(){return this.logger!==null}onOpen(e){let t=this.makeRef();return this.stateChangeCallbacks.open.push([t,e]),t}onClose(e){let t=this.makeRef();return this.stateChangeCallbacks.close.push([t,e]),t}onError(e){let t=this.makeRef();return this.stateChangeCallbacks.error.push([t,e]),t}onMessage(e){let t=this.makeRef();return this.stateChangeCallbacks.message.push([t,e]),t}onHeartbeat(e){this.heartbeatCallback=e}ping(e){if(!this.isConnected())return!1;let t=this.makeRef(),s=Date.now();this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:t});let a=this.onMessage(l=>{l.ref===t&&(this.off([a]),e(Date.now()-s))});return!0}transportName(e){return e===ni?"LongPoll":e.name}transportConnect(){this.connectClock++,this.closeWasClean=!1;let e;this.authToken&&(e=["phoenix",`${lf}${btoa(this.authToken).replace(/=/g,"")}`]),this.conn=new this.transport(this.endPointURL(),e),this.conn.binaryType=this.binaryType,this.conn.timeout=this.longpollerTimeout,this.conn.onopen=()=>this.onConnOpen(),this.conn.onerror=t=>this.onConnError(t),this.conn.onmessage=t=>this.onConnMessage(t),this.conn.onclose=t=>this.onConnClose(t)}getSession(e){return this.sessionStore&&this.sessionStore.getItem(e)}storeSession(e,t){this.sessionStore&&this.sessionStore.setItem(e,t)}connectWithFallback(e,t=2500){clearTimeout(this.fallbackTimer);let s=!1,a=!0,l,u,c=this.transportName(e),d=p=>{this.log("transport",`falling back to ${c}...`,p),this.off([l,u]),a=!1,this.replaceTransport(e),this.transportConnect()};if(this.getSession(`phx:fallback:${c}`))return d("memorized");this.fallbackTimer=setTimeout(d,t),u=this.onError(p=>{this.log("transport","error",p),a&&!s&&(clearTimeout(this.fallbackTimer),d(p))}),this.fallbackRef&&this.off([this.fallbackRef]),this.fallbackRef=this.onOpen(()=>{if(s=!0,!a){let p=this.transportName(e);return this.primaryPassedHealthCheck||this.storeSession(`phx:fallback:${p}`,"true"),this.log("transport",`established ${p} fallback`)}clearTimeout(this.fallbackTimer),this.fallbackTimer=setTimeout(d,t),this.ping(p=>{this.log("transport","connected to primary after",p),this.primaryPassedHealthCheck=!0,clearTimeout(this.fallbackTimer)})}),this.transportConnect()}clearHeartbeats(){clearTimeout(this.heartbeatTimer),clearTimeout(this.heartbeatTimeoutTimer)}onConnOpen(){this.hasLogger()&&this.log("transport",`connected to ${this.endPointURL()}`),this.closeWasClean=!1,this.disconnecting=!1,this.establishedConnections++,this.flushSendBuffer(),this.reconnectTimer.reset(),this.autoSendHeartbeat&&this.resetHeartbeat(),this.triggerStateCallbacks("open")}heartbeatTimeout(){if(this.pendingHeartbeatRef){this.pendingHeartbeatRef=null,this.heartbeatSentAt=null,this.hasLogger()&&this.log("transport","heartbeat timeout. Attempting to re-establish connection");try{this.heartbeatCallback("timeout")}catch(e){this.log("error","error in heartbeat callback",e)}this.triggerChanError(new Error("heartbeat timeout")),this.closeWasClean=!1,this.teardown(()=>this.reconnectTimer.scheduleTimeout(),C1,"heartbeat timeout")}}resetHeartbeat(){this.conn&&this.conn.skipHeartbeat||(this.pendingHeartbeatRef=null,this.clearHeartbeats(),this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}teardown(e,t,s){if(!this.conn)return e&&e();const a=this.conn;this.waitForBufferDone(a,()=>{t?a.close(t,s||""):a.close(),this.waitForSocketClosed(a,()=>{this.conn===a&&(this.conn.onopen=function(){},this.conn.onerror=function(){},this.conn.onmessage=function(){},this.conn.onclose=function(){},this.conn=null),e&&e()})})}waitForBufferDone(e,t,s=1){if(s===5||!e.bufferedAmount){t();return}setTimeout(()=>{this.waitForBufferDone(e,t,s+1)},150*s)}waitForSocketClosed(e,t,s=1){if(s===5||e.readyState===bn.closed){t();return}setTimeout(()=>{this.waitForSocketClosed(e,t,s+1)},150*s)}onConnClose(e){this.conn&&(this.conn.onclose=()=>{}),this.hasLogger()&&this.log("transport","close",e),this.triggerChanError(e),this.clearHeartbeats(),this.closeWasClean||this.reconnectTimer.scheduleTimeout(),this.triggerStateCallbacks("close",e)}onConnError(e){this.hasLogger()&&this.log("transport","error",e);let t=this.transport,s=this.establishedConnections;this.triggerStateCallbacks("error",e,t,s),(t===this.transport||s>0)&&this.triggerChanError(e)}
19triggerChanError(e){this.channels.forEach(t=>{t.isErrored()||t.isLeaving()||t.isClosed()||t.trigger(Vn.error,e)})}connectionState(){switch(this.conn&&this.conn.readyState){case bn.connecting:return"connecting";case bn.open:return"open";case bn.closing:return"closing";default:return"closed"}}isConnected(){return this.connectionState()==="open"}remove(e){this.off(e.stateChangeRefs),this.channels=this.channels.filter(t=>t!==e)}off(e){for(let t in this.stateChangeCallbacks)this.stateChangeCallbacks[t]=this.stateChangeCallbacks[t].filter(([s])=>e.indexOf(s)===-1)}channel(e,t={}){let s=new k1(e,t,this);return this.channels.push(s),s}push(e){if(this.hasLogger()){let{topic:t,event:s,payload:a,ref:l,join_ref:u}=e;this.log("push",`${t} ${s} (${u}, ${l})`,a)}this.isConnected()?this.encode(e,t=>this.conn.send(t)):this.sendBuffer.push(()=>this.encode(e,t=>this.conn.send(t)))}makeRef(){let e=this.ref+1;return e===this.ref?this.ref=0:this.ref=e,this.ref.toString()}sendHeartbeat(){if(!this.isConnected()){try{this.heartbeatCallback("disconnected")}catch(e){this.log("error","error in heartbeat callback",e)}return}if(this.pendingHeartbeatRef){this.heartbeatTimeout();return}this.pendingHeartbeatRef=this.makeRef(),this.heartbeatSentAt=Date.now(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef});try{this.heartbeatCallback("sent")}catch(e){this.log("error","error in heartbeat callback",e)}this.heartbeatTimeoutTimer=setTimeout(()=>this.heartbeatTimeout(),this.heartbeatIntervalMs)}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(e=>e()),this.sendBuffer=[])}onConnMessage(e){this.decode(e.data,t=>{let{topic:s,event:a,payload:l,ref:u,join_ref:c}=t;if(u&&u===this.pendingHeartbeatRef){const d=this.heartbeatSentAt?Date.now()-this.heartbeatSentAt:void 0;this.clearHeartbeats();try{this.heartbeatCallback(l.status==="ok"?"ok":"error",d)}catch(p){this.log("error","error in heartbeat callback",p)}this.pendingHeartbeatRef=null,this.heartbeatSentAt=null,this.autoSendHeartbeat&&(this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}this.hasLogger()&&this.log("receive",`${l.status||""} ${s} ${a} ${u&&"("+u+")"||""}`.trim(),l);for(let d=0;d<this.channels.length;d++){const p=this.channels[d];p.isMember(s,a,l,c)&&p.trigger(a,l,u,c)}this.triggerStateCallbacks("message",t)})}triggerStateCallbacks(e,...t){try{this.stateChangeCallbacks[e].forEach(([s,a])=>{try{a(...t)}catch(l){this.log("error",`error in ${e} callback`,l)}})}catch(s){this.log("error",`error triggering ${e} callbacks`,s)}}leaveOpenTopic(e){let t=this.channels.find(s=>s.topic===e&&(s.isJoined()||s.isJoining()));t&&(this.hasLogger()&&this.log("transport",`leaving duplicate topic "${e}"`),t.leave())}};class Oa{constructor(t,s){const a=N1(s);this.presence=new M1(t.getChannel(),a),this.presence.onJoin((l,u,c)=>{const d=Oa.onJoinPayload(l,u,c);t.getChannel().trigger("presence",d)}),this.presence.onLeave((l,u,c)=>{const d=Oa.onLeavePayload(l,u,c);t.getChannel().trigger("presence",d)}),this.presence.onSync(()=>{t.getChannel().trigger("presence",{event:"sync"})})}get state(){return Oa.transformState(this.presence.state)}static transformState(t){return t=D1(t),Object.getOwnPropertyNames(t).reduce((s,a)=>{const l=t[a];return s[a]=jl(l),s},{})}static onJoinPayload(t,s,a){const l=Lm(s),u=jl(a);return{event:"join",key:t,currentPresences:l,newPresences:u}}static onLeavePayload(t,s,a){const l=Lm(s),u=jl(a);return{event:"leave",key:t,currentPresences:l,leftPresences:u}}}function jl(e){return e.metas.map(t=>(t.presence_ref=t.phx_ref,delete t.phx_ref,delete t.phx_ref_prev,t))}function D1(e){return JSON.parse(JSON.stringify(e))}function N1(e){return e?.events&&{events:e.events}}function Lm(e){return e?.metas?jl(e):[]}var zm;(function(e){e.SYNC="sync",e.JOIN="join",e.LEAVE="leave"})(zm||(zm={}));class L1{get state(){return this.presenceAdapter.state}constructor(t,s){this.channel=t,this.presenceAdapter=new Oa(this.channel.channelAdapter,s)}}function z1(e){if(e instanceof Error)return e;if(typeof e=="string")return new Error(e);
19if(e&&typeof e=="object"){const t=e;if(typeof t.code=="number"){const s=typeof t.reason=="string"&&t.reason?` (${t.reason})`:"";return new Error(`socket closed: ${t.code}${s}`,{cause:e})}return new Error("channel error: transport failure",{cause:e})}return new Error("channel error: connection lost")}class P1{constructor(t,s,a){const l=B1(a);this.channel=t.getSocket().channel(s,l),this.socket=t}get state(){return this.channel.state}set state(t){this.channel.state=t}get joinedOnce(){return this.channel.joinedOnce}get joinPush(){return this.channel.joinPush}get rejoinTimer(){return this.channel.rejoinTimer}on(t,s){return this.channel.on(t,s)}off(t,s){this.channel.off(t,s)}subscribe(t){return this.channel.join(t)}unsubscribe(t){return this.channel.leave(t)}teardown(){this.channel.teardown()}onClose(t){this.channel.onClose(t)}onError(t){return this.channel.onError(t)}push(t,s,a){let l;try{l=this.channel.push(t,s,a)}catch{throw new Error(`tried to push '${t}' to '${this.channel.topic}' before joining. Use channel.subscribe() before pushing events`)}if(this.channel.pushBuffer.length>m1){const u=this.channel.pushBuffer.shift();u.cancelTimeout(),this.socket.log("channel",`discarded push due to buffer overflow: ${u.event}`,u.payload())}return l}updateJoinPayload(t){const s=this.channel.joinPush.payload();this.channel.joinPush.payload=()=>Object.assign(Object.assign({},s),t)}canPush(){return this.socket.isConnected()&&this.state===Rr.joined}isJoined(){return this.state===Rr.joined}isJoining(){return this.state===Rr.joining}isClosed(){return this.state===Rr.closed}isLeaving(){return this.state===Rr.leaving}updateFilterBindings(t){this.channel.filterBindings=t}updatePayloadTransform(t){this.channel.onMessage=t}getChannel(){return this.channel}}function B1(e){return{config:Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},e.config)}}var Pm;(function(e){e.ALL="*",e.INSERT="INSERT",e.UPDATE="UPDATE",e.DELETE="DELETE"})(Pm||(Pm={}));var hi;(function(e){e.BROADCAST="broadcast",e.PRESENCE="presence",e.POSTGRES_CHANGES="postgres_changes",e.SYSTEM="system"})(hi||(hi={}));var Kn;(function(e){e.SUBSCRIBED="SUBSCRIBED",e.TIMED_OUT="TIMED_OUT",e.CLOSED="CLOSED",e.CHANNEL_ERROR="CHANNEL_ERROR"})(Kn||(Kn={}));class Ca{get state(){return this.channelAdapter.state}set state(t){this.channelAdapter.state=t}get joinedOnce(){return this.channelAdapter.joinedOnce}get timeout(){return this.socket.timeout}get joinPush(){return this.channelAdapter.joinPush}get rejoinTimer(){return this.channelAdapter.rejoinTimer}constructor(t,s={config:{}},a){var l,u;if(this.topic=t,this.params=s,this.socket=a,this.bindings={},this.subTopic=t.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},s.config),this.channelAdapter=new P1(this.socket.socketAdapter,t,this.params),this.presence=new L1(this),this._onClose(()=>{this.socket._remove(this)}),this._updateFilterTransform(),this.broadcastEndpointURL=N0(this.socket.socketAdapter.endPointURL()),this.private=this.params.config.private||!1,!this.private&&(!((u=(l=this.params.config)===null||l===void 0?void 0:l.broadcast)===null||u===void 0)&&u.replay))throw new Error(`tried to use replay on public channel '${this.topic}'. It must be a private channel.`)}subscribe(t,s=this.timeout){var a,l,u;if(this.socket.isConnected()||this.socket.connect(),this.channelAdapter.isClosed()){const{config:{broadcast:c,presence:d,private:p}}=this.params,g=(l=(a=this.bindings.postgres_changes)===null||a===void 0?void 0:a.map(_=>_.filter))!==null&&l!==void 0?l:[],m=!!this.bindings[hi.PRESENCE]&&this.bindings[hi.PRESENCE].length>0||((u=this.params.config.presence)===null||u===void 0?void 0:u.enabled)===!0,y={},b={broadcast:c,presence:Object.assign(Object.assign({},d),{enabled:m}),postgres_changes:g,private:p};this.socket.accessTokenValue&&(y.access_token=this.socket.accessTokenValue),this._onError(_=>{t?.(Kn.CHANNEL_ERROR,z1(_))}),this._onClose(()=>t?.(Kn.CLOSED)),this.updateJoinPayload(Object.assign({config:b},y)),this._updateFilterMessage(),this.channelAdapter.subscribe(s).receive("ok",async({postgres_changes:_})=>
19{if(this.socket._isManualToken()||this.socket.setAuth(),_===void 0){t?.(Kn.SUBSCRIBED);return}this._updatePostgresBindings(_,t)}).receive("error",_=>{this.state=Rr.errored;const w=Object.values(_).join(", ")||"error";t?.(Kn.CHANNEL_ERROR,new Error(w,{cause:_}))}).receive("timeout",()=>{t?.(Kn.TIMED_OUT)})}return this}_updatePostgresBindings(t,s){var a;const l=this.bindings.postgres_changes,u=(a=l?.length)!==null&&a!==void 0?a:0,c=[];for(let d=0;d<u;d++){const p=l[d],{filter:{event:g,schema:m,table:y,filter:b}}=p,_=t&&t[d];if(_&&_.event===g&&Ca.isFilterValueEqual(_.schema,m)&&Ca.isFilterValueEqual(_.table,y)&&Ca.isFilterValueEqual(_.filter,b))c.push(Object.assign(Object.assign({},p),{id:_.id}));else{this.unsubscribe(),this.state=Rr.errored,s?.(Kn.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=c,this.state!=Rr.errored&&s&&s(Kn.SUBSCRIBED)}presenceState(){return this.presence.state}async track(t,s={}){return await this.send({type:"presence",event:"track",payload:t},s.timeout||this.timeout)}async untrack(t={}){return await this.send({type:"presence",event:"untrack"},t)}on(t,s,a){const l=this.channelAdapter.isJoined()||this.channelAdapter.isJoining(),u=t===hi.PRESENCE||t===hi.POSTGRES_CHANGES;if(l&&u)throw this.socket.log("channel",`cannot add \`${t}\` callbacks for ${this.topic} after \`subscribe()\`.`),new Error(`cannot add \`${t}\` callbacks for ${this.topic} after \`subscribe()\`.`);return this._on(t,s,a)}async httpSend(t,s,a={}){var l;if(s==null)return Promise.reject(new Error("Payload is required for httpSend()"));const u=s instanceof ArrayBuffer||ArrayBuffer.isView(s),c={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":u?"application/octet-stream":"application/json"};this.socket.accessTokenValue&&(c.Authorization=`Bearer ${this.socket.accessTokenValue}`);const d=new URL(this.broadcastEndpointURL);d.pathname+=`/${encodeURIComponent(this.subTopic)}/events/${encodeURIComponent(t)}`,this.private&&d.searchParams.set("private","true");const p={method:"POST",headers:c,body:u?s:JSON.stringify(s)},g=await this._fetchWithTimeout(d.toString(),p,(l=a.timeout)!==null&&l!==void 0?l:this.timeout);if(g.status===202)return{success:!0};let m=g.statusText;try{const y=await g.json();m=y.error||y.message||m}catch{}return Promise.reject(new Error(m))}async send(t,s={}){var a,l;if(!this.channelAdapter.canPush()&&t.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:u,payload:c}=t,d={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(d.Authorization=`Bearer ${this.socket.accessTokenValue}`);const p={method:"POST",headers:d,body:JSON.stringify({messages:[{topic:this.subTopic,event:u,payload:c,private:this.private}]})};try{const g=await this._fetchWithTimeout(this.broadcastEndpointURL,p,(a=s.timeout)!==null&&a!==void 0?a:this.timeout);return await((l=g.body)===null||l===void 0?void 0:l.cancel()),g.ok?"ok":"error"}catch(g){return g instanceof Error&&g.name==="AbortError"?"timed out":"error"}}else return new Promise(u=>{var c,d,p;const g=this.channelAdapter.push(t.type,t,s.timeout||this.timeout);t.type==="broadcast"&&!(!((p=(d=(c=this.params)===null||c===void 0?void 0:c.config)===null||d===void 0?void 0:d.broadcast)===null||p===void 0)&&p.ack)&&u("ok"),g.receive("ok",()=>u("ok")),g.receive("error",()=>u("error")),g.receive("timeout",()=>u("timed out"))})}updateJoinPayload(t){this.channelAdapter.updateJoinPayload(t)}async unsubscribe(t=this.timeout){return new Promise(s=>{this.channelAdapter.unsubscribe(t).receive("ok",()=>s("ok")).receive("timeout",()=>s("timed out")).receive("error",()=>s("error"))})}teardown(){this.channelAdapter.teardown()}async _fetchWithTimeout(t,s,a){const l=new AbortController,u=setTimeout(()=>l.abort(),a),c=await this.socket.fetch(t,Object.assign(Object.assign({},s),{signal:l.signal}));return clearTimeout(u),c}_on(t,s,a){const l=t.toLocaleLowerCase(),u=this.channelAdapter.on(t,a),c={type:l,filter:s,callback:a,ref:u};return this.bindings[l]?this.bindings[l].push(c):this.bindings[l]=[c],this._updateFilterMessage(),this}_onClose(t){this.channelAdapter.onClose(t)}_onError(t){this.channelAdapter.onError(t)}_updateFilterMessage(){this.channelAdapter.updateFilterBindings((t,s,a)=>{var l,u,c,d,p,g,m;
19const y=t.event.toLocaleLowerCase();if(this._notThisChannelEvent(y,a))return!1;const b=(l=this.bindings[y])===null||l===void 0?void 0:l.find(_=>_.ref===t.ref);if(!b)return!0;if(["broadcast","presence","postgres_changes"].includes(y))if("id"in b){const _=b.id,w=(u=b.filter)===null||u===void 0?void 0:u.event;return _&&((c=s.ids)===null||c===void 0?void 0:c.includes(_))&&(w==="*"||w?.toLocaleLowerCase()===((d=s.data)===null||d===void 0?void 0:d.type.toLocaleLowerCase()))}else{const _=(g=(p=b?.filter)===null||p===void 0?void 0:p.event)===null||g===void 0?void 0:g.toLocaleLowerCase();return _==="*"||_===((m=s?.event)===null||m===void 0?void 0:m.toLocaleLowerCase())}else return b.type.toLocaleLowerCase()===y})}_notThisChannelEvent(t,s){const{close:a,error:l,leave:u,join:c}=U0;return s&&[a,l,u,c].includes(t)&&s!==this.joinPush.ref}_updateFilterTransform(){this.channelAdapter.updatePayloadTransform((t,s,a)=>{if(typeof s=="object"&&"ids"in s){const l=s.data,{schema:u,table:c,commit_timestamp:d,type:p,errors:g}=l;return Object.assign(Object.assign({},{schema:u,table:c,commit_timestamp:d,eventType:p,new:{},old:{},errors:g}),this._getPayloadRecords(l))}return s})}copyBindings(t){if(this.joinedOnce)throw new Error("cannot copy bindings into joined channel");for(const s in t.bindings)for(const a of t.bindings[s])this._on(a.type,a.filter,a.callback)}static isFilterValueEqual(t,s){return(t??void 0)===(s??void 0)}_getPayloadRecords(t){const s={new:{},old:{}};return(t.type==="INSERT"||t.type==="UPDATE")&&(s.new=Nm(t.columns,t.record)),(t.type==="UPDATE"||t.type==="DELETE")&&(s.old=Nm(t.columns,t.old_record)),s}}class H1{constructor(t,s){this.socket=new U1(t,s)}get timeout(){return this.socket.timeout}get endPoint(){return this.socket.endPoint}get transport(){return this.socket.transport}get heartbeatIntervalMs(){return this.socket.heartbeatIntervalMs}get heartbeatCallback(){return this.socket.heartbeatCallback}set heartbeatCallback(t){this.socket.heartbeatCallback=t}get heartbeatTimer(){return this.socket.heartbeatTimer}get pendingHeartbeatRef(){return this.socket.pendingHeartbeatRef}get reconnectTimer(){return this.socket.reconnectTimer}get vsn(){return this.socket.vsn}get encode(){return this.socket.encode}get decode(){return this.socket.decode}get reconnectAfterMs(){return this.socket.reconnectAfterMs}get sendBuffer(){return this.socket.sendBuffer}get stateChangeCallbacks(){return this.socket.stateChangeCallbacks}connect(){this.socket.connect()}disconnect(t,s,a,l=1e4){return new Promise(u=>{setTimeout(()=>u("timeout"),l),this.socket.disconnect(()=>{t(),u("ok")},s,a)})}push(t){this.socket.push(t)}log(t,s,a){this.socket.log(t,s,a)}makeRef(){return this.socket.makeRef()}onOpen(t){this.socket.onOpen(t)}onClose(t){this.socket.onClose(t)}onError(t){this.socket.onError(t)}onMessage(t){this.socket.onMessage(t)}isConnected(){return this.socket.isConnected()}isConnecting(){return this.socket.connectionState()==sf.connecting}isDisconnecting(){return this.socket.connectionState()==sf.closing}connectionState(){return this.socket.connectionState()}endPointURL(){return this.socket.endPointURL()}sendHeartbeat(){this.socket.sendHeartbeat()}getSocket(){return this.socket}}const Bm={HEARTBEAT_INTERVAL:25e3},q1=[1e3,2e3,5e3,1e4],I1=1e4;function $1(){const e=new Map;return{get length(){return e.size},clear(){e.clear()},getItem(t){return e.has(t)?e.get(t):null},key(t){var s;return(s=Array.from(e.keys())[t])!==null&&s!==void 0?s:null},removeItem(t){e.delete(t)},setItem(t,s){e.set(t,String(s))}}}function G1(){try{if(typeof globalThis<"u"&&globalThis.sessionStorage)return globalThis.sessionStorage}catch{}return $1()}const V1=`
20  addEventListener("message", (e) => {
21    if (e.data.event === "start") {
22      setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval);
23    }
24  });`;class K1{get endPoint(){return this.socketAdapter.endPoint}get timeout(){return this.socketAdapter.timeout}get transport(){return this.socketAdapter.transport}get heartbeatCallback(){return this.socketAdapter.heartbeatCallback}get heartbeatIntervalMs(){return this.socketAdapter.heartbeatIntervalMs}get heartbeatTimer(){return this.worker?this._workerHeartbeatTimer:this.socketAdapter.heartbeatTimer}get pendingHeartbeatRef(){return this.worker?this._pendingWorkerHeartbeatRef:this.socketAdapter.pendingHeartbeatRef}get reconnectTimer(){return this.socketAdapter.reconnectTimer}get vsn(){return this.socketAdapter.vsn}get encode(){return this.socketAdapter.encode}get decode(){return this.socketAdapter.decode}get reconnectAfterMs(){return this.socketAdapter.reconnectAfterMs}get sendBuffer(){return this.socketAdapter.sendBuffer}get stateChangeCallbacks(){return this.socketAdapter.stateChangeCallbacks}constructor(t,s){var a;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 v1,this._manuallySetToken=!1,this._authPromise=null,this._workerHeartbeatTimer=void 0,this._pendingWorkerHeartbeatRef=null,this._pendingDisconnectTimer=null,this._disconnectOnEmptyChannelsAfterMs=0,this._resolveFetch=u=>u?(...c)=>u(...c):(...c)=>fetch(...c),!(!((a=s?.params)===null||a===void 0)&&a.apikey))throw new Error("API key is required to connect to Realtime");this.apiKey=s.params.apikey;const l=this._initializeOptions(s);this.socketAdapter=new H1(t,l),this.httpEndpoint=N0(t),this.fetch=this._resolveFetch(s?.fetch)}connect(){if(!(this.isConnecting()||this.isDisconnecting()||this.isConnected())){this.accessToken&&!this._authPromise&&this._setAuthSafely("connect"),this._setupConnectionHandlers();try{this.socketAdapter.connect()}catch(t){const s=t.message;throw s.includes("Node.js")?new Error(`${s}
25
26To use Realtime in Node.js, you need to provide a WebSocket implementation:
27
28Option 1: Use Node.js 22+ which has native WebSocket support
29Option 2: Install and provide the "ws" package:
30
31  npm install ws
32
33  import ws from "ws"
34  const client = new RealtimeClient(url, {
35    ...options,
36    transport: ws
37  })`):new Error(`WebSocket not available: ${s}`)}this._handleNodeJsRaceCondition()}}endpointURL(){return this.socketAdapter.endPointURL()}async disconnect(t,s){return this._cancelPendingDisconnect(),this.isDisconnecting()?"ok":await this.socketAdapter.disconnect(()=>{clearInterval(this._workerHeartbeatTimer),this._terminateWorker()},t,s)}getChannels(){return this.channels}async removeChannel(t){const s=await t.unsubscribe();return s==="ok"&&t.teardown(),s}async removeAllChannels(){const t=this.channels.map(async a=>{const l=await a.unsubscribe();return a.teardown(),l}),s=await Promise.all(t);return await this.disconnect(),s}log(t,s,a){this.socketAdapter.log(t,s,a)}connectionState(){return this.socketAdapter.connectionState()||sf.closed}isConnected(){return this.socketAdapter.isConnected()}isConnecting(){return this.socketAdapter.isConnecting()}isDisconnecting(){return this.socketAdapter.isDisconnecting()}channel(t,s={config:{}}){const a=`realtime:${t}`,l=this.getChannels().find(u=>u.topic===a);if(l)return l;{const u=new Ca(`realtime:${t}`,s,this);return this._cancelPendingDisconnect(),this.channels.push(u),u}}push(t){this.socketAdapter.push(t)}async setAuth(t=null){this._authPromise=this._performAuth(t);try{await this._authPromise}finally{this._authPromise=null}}_isManualToken(){return this._manuallySetToken}async sendHeartbeat(){this.socketAdapter.sendHeartbeat()}onHeartbeat(t){this.socketAdapter.heartbeatCallback=this._wrapHeartbeatCallback(t)}_makeRef(){return this.socketAdapter.makeRef()}_remove(t){this.channels=this.channels.filter(s=>s.topic!==t.topic),this.channels.length===0&&(this.log("transport","no channels remaining, scheduling disconnect"),this._schedulePendingDisconnect())}_schedulePendingDisconnect(){if(this._cancelPendingDisconnect(),this._disconnectOnEmptyChannelsAfterMs===0){this.log("transport","disconnecting immediately - no channels"),this.disconnect();return}
37this._pendingDisconnectTimer=setTimeout(()=>{this._pendingDisconnectTimer=null,this.channels.length===0&&(this.log("transport","deferred disconnect fired - no channels, disconnecting"),this.disconnect())},this._disconnectOnEmptyChannelsAfterMs),this.log("transport",`deferred disconnect scheduled in ${this._disconnectOnEmptyChannelsAfterMs}ms`)}_cancelPendingDisconnect(){this._pendingDisconnectTimer!==null&&(this.log("transport","pending disconnect cancelled - channel activity detected"),clearTimeout(this._pendingDisconnectTimer),this._pendingDisconnectTimer=null)}async _performAuth(t=null){let s,a=!1;if(t)s=t,a=!0;else if(this.accessToken)try{s=await this.accessToken()}catch(l){this.log("error","Error fetching access token from callback",l),s=this.accessTokenValue}else s=this.accessTokenValue;a?this._manuallySetToken=!0:this.accessToken&&(this._manuallySetToken=!1),this.accessTokenValue!=s&&(this.accessTokenValue=s,this.channels.forEach(l=>{const u={access_token:s,version:d1};s&&l.updateJoinPayload(u),l.joinedOnce&&l.channelAdapter.isJoined()&&l.channelAdapter.push(U0.access_token,{access_token:s})}))}async _waitForAuthIfNeeded(){this._authPromise&&await this._authPromise}_setAuthSafely(t="general"){this._isManualToken()||this.setAuth().catch(s=>{this.log("error",`Error setting auth in ${t}`,s)})}_setupConnectionHandlers(){this.socketAdapter.onOpen(()=>{(this._authPromise||(this.accessToken&&!this.accessTokenValue?this.setAuth():Promise.resolve())).catch(s=>{this.log("error","error waiting for auth on connect",s)}),this.worker&&!this.workerRef&&this._startWorkerHeartbeat()}),this.socketAdapter.onClose(()=>{this.worker&&this.workerRef&&this._terminateWorker()}),this.socketAdapter.onMessage(t=>{t.ref&&t.ref===this._pendingWorkerHeartbeatRef&&(this._pendingWorkerHeartbeatRef=null)})}_handleNodeJsRaceCondition(){this.socketAdapter.isConnected()&&this.socketAdapter.getSocket().onConnOpen()}_wrapHeartbeatCallback(t){return(s,a)=>{s=="sent"&&this._setAuthSafely(),t&&t(s,a)}}_startWorkerHeartbeat(){this.workerUrl?this.log("worker",`starting worker for from ${this.workerUrl}`):this.log("worker","starting default worker");const t=this._workerObjectUrl(this.workerUrl);this.workerRef=new Worker(t),this.workerRef.onerror=s=>{this.log("worker","worker error",s.message),this._terminateWorker(),this.disconnect()},this.workerRef.onmessage=s=>{s.data.event==="keepAlive"&&this.sendHeartbeat()},this.workerRef.postMessage({event:"start",interval:this.heartbeatIntervalMs})}_terminateWorker(){this.workerRef&&(this.log("worker","terminating worker"),this.workerRef.terminate(),this.workerRef=void 0)}_workerObjectUrl(t){let s;if(t)s=t;else{const a=new Blob([V1],{type:"application/javascript"});s=URL.createObjectURL(a)}return s}_initializeOptions(t){var s,a,l,u,c,d,p,g,m,y,b,_;this.worker=(s=t?.worker)!==null&&s!==void 0?s:!1,this.accessToken=(a=t?.accessToken)!==null&&a!==void 0?a:null;const w={};w.timeout=(l=t?.timeout)!==null&&l!==void 0?l:y1,w.heartbeatIntervalMs=(u=t?.heartbeatIntervalMs)!==null&&u!==void 0?u:Bm.HEARTBEAT_INTERVAL,this._disconnectOnEmptyChannelsAfterMs=(c=t?.disconnectOnEmptyChannelsAfterMs)!==null&&c!==void 0?c:2*((d=t?.heartbeatIntervalMs)!==null&&d!==void 0?d:Bm.HEARTBEAT_INTERVAL),w.transport=(p=t?.transport)!==null&&p!==void 0?p:h1.getWebSocketConstructor(),w.params=t?.params,w.logger=t?.logger,w.heartbeatCallback=this._wrapHeartbeatCallback(t?.heartbeatCallback),w.sessionStorage=(g=t?.sessionStorage)!==null&&g!==void 0?g:G1(),w.reconnectAfterMs=(m=t?.reconnectAfterMs)!==null&&m!==void 0?m:(U=>q1[U-1]||I1);let A,R;const O=(y=t?.vsn)!==null&&y!==void 0?y:g1;switch(O){case p1:A=(U,j)=>j(JSON.stringify(U)),R=(U,j)=>j(JSON.parse(U));break;case M0:A=this.serializer.encode.bind(this.serializer),R=this.serializer.decode.bind(this.serializer);break;default:throw new Error(`Unsupported serializer version: ${w.vsn}`)}if(w.vsn=O,w.encode=(b=t?.encode)!==null&&b!==void 0?b:A,w.decode=(_=t?.decode)!==null&&_!==void 0?_:R,w.beforeReconnect=this._reconnectAuth.bind(this),(t?.logLevel||t?.log_level)&&(this.logLevel=t.logLevel||t.log_level,w.params=Object.assign(Object.assign({},w.params),{log_level:this.logLevel})),this.worker){if(typeof window<"u"&&!window.Worker)throw new Error("Web Worker is not supported");this.workerUrl=t?.workerUrl,w.autoSendHeartbeat=!this.worker}return w}async _reconnectAuth(){await this._waitForAuthIfNeeded(),this.isConnected()||this.connect()}}
37var La=class extends Error{constructor(e,t){super(e),this.name="IcebergError",this.status=t.status,this.icebergType=t.icebergType,this.icebergCode=t.icebergCode,this.details=t.details,this.isCommitStateUnknown=t.icebergType==="CommitStateUnknownException"||[500,502,504].includes(t.status)&&t.icebergType?.includes("CommitState")===!0}isNotFound(){return this.status===404}isConflict(){return this.status===409}isAuthenticationTimeout(){return this.status===419}};function Y1(e,t,s){const a=new URL(t,e);if(s)for(const[l,u]of Object.entries(s))u!==void 0&&a.searchParams.set(l,u);return a.toString()}async function F1(e){return!e||e.type==="none"?{}:e.type==="bearer"?{Authorization:`Bearer ${e.token}`}:e.type==="header"?{[e.name]:e.value}:e.type==="custom"?await e.getHeaders():{}}function Q1(e){const t=e.fetchImpl??globalThis.fetch;return{async request({method:s,path:a,query:l,body:u,headers:c}){const d=Y1(e.baseUrl,a,l),p=await F1(e.auth),g=await t(d,{method:s,headers:{...u?{"Content-Type":"application/json"}:{},...p,...c},body:u?JSON.stringify(u):void 0}),m=await g.text(),y=(g.headers.get("content-type")||"").includes("application/json"),b=y&&m?JSON.parse(m):m;if(!g.ok){const _=y?b:void 0,w=_?.error;throw new La(w?.message??`Request failed with status ${g.status}`,{status:g.status,icebergType:w?.type,icebergCode:w?.code,details:_})}return{status:g.status,headers:g.headers,data:b}}}}function _l(e){return e.join("�")}var J1=class{constructor(e,t=""){this.client=e,this.prefix=t}async listNamespaces(e){const t=e?{parent:_l(e.namespace)}:void 0;return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces`,query:t})).data.namespaces.map(a=>({namespace:a}))}async createNamespace(e,t){const s={namespace:e.namespace,properties:t?.properties};return(await this.client.request({method:"POST",path:`${this.prefix}/namespaces`,body:s})).data}async dropNamespace(e){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${_l(e.namespace)}`})}async loadNamespaceMetadata(e){return{properties:(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${_l(e.namespace)}`})).data.properties}}async namespaceExists(e){try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${_l(e.namespace)}`}),!0}catch(t){if(t instanceof La&&t.status===404)return!1;throw t}}async createNamespaceIfNotExists(e,t){try{return await this.createNamespace(e,t)}catch(s){if(s instanceof La&&s.status===409)return;throw s}}};function ri(e){return e.join("�")}var X1=class{constructor(e,t="",s){this.client=e,this.prefix=t,this.accessDelegation=s}async listTables(e){return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${ri(e.namespace)}/tables`})).data.identifiers}async createTable(e,t){const s={};return this.accessDelegation&&(s["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${ri(e.namespace)}/tables`,body:t,headers:s})).data.metadata}async updateTable(e,t){const s=await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${ri(e.namespace)}/tables/${e.name}`,body:t});return{"metadata-location":s.data["metadata-location"],metadata:s.data.metadata}}async dropTable(e,t){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${ri(e.namespace)}/tables/${e.name}`,query:{purgeRequested:String(t?.purge??!1)}})}async loadTable(e){const t={};return this.accessDelegation&&(t["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${ri(e.namespace)}/tables/${e.name}`,headers:t})).data.metadata}async tableExists(e){const t={};this.accessDelegation&&(t["X-Iceberg-Access-Delegation"]=this.accessDelegation);try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${ri(e.namespace)}/tables/${e.name}`,headers:t}),!0}catch(s){if(s instanceof La&&s.status===404)return!1;throw s}}async createTableIfNotExists(e,t){try{return await this.createTable(e,t)}catch(s){if(s instanceof La&&s.status===409)return await this.loadTable({namespace:e.namespace,name:t.name});throw s}}},Z1=class{constructor(e){let t="v1";e.catalogName&&(t+=`/${e.catalogName}`);const s=e.baseUrl.endsWith("/")?e.baseUrl:`${e.baseUrl}/`;this.client=Q1({baseUrl:s,auth:e.auth,fetchImpl:e.fetch}),this.accessDelegation=e.accessDelegation?.join(","),this.namespaceOps=new J1(this.client,t),this.tableOps=new X1(this.client,t,this.accessDelegation)}async listNamespaces(e){return this.namespaceOps.listNamespaces(e)}async createNamespace(e,t){return this.namespaceOps.createNamespace(e,t)}async dropNamespace(e){await this.namespaceOps.dropNamespace(e)}async loadNamespaceMetadata(e){return this.namespaceOps.loadNamespaceMetadata(e)}async listTables(e){return this.tableOps.listTables(e)}
37async createTable(e,t){return this.tableOps.createTable(e,t)}async updateTable(e,t){return this.tableOps.updateTable(e,t)}async dropTable(e,t){await this.tableOps.dropTable(e,t)}async loadTable(e){return this.tableOps.loadTable(e)}async namespaceExists(e){return this.namespaceOps.namespaceExists(e)}async tableExists(e){return this.tableOps.tableExists(e)}async createNamespaceIfNotExists(e,t){return this.namespaceOps.createNamespaceIfNotExists(e,t)}async createTableIfNotExists(e,t){return this.tableOps.createTableIfNotExists(e,t)}};function za(e){"@babel/helpers - typeof";return za=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},za(e)}function W1(e,t){if(za(e)!="object"||!e)return e;var s=e[Symbol.toPrimitive];if(s!==void 0){var a=s.call(e,t);if(za(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function eO(e){var t=W1(e,"string");return za(t)=="symbol"?t:t+""}function tO(e,t,s){return(t=eO(t))in e?Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[t]=s,e}function Hm(e,t){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(l){return Object.getOwnPropertyDescriptor(e,l).enumerable})),s.push.apply(s,a)}return s}function ce(e){for(var t=1;t<arguments.length;t++){var s=arguments[t]!=null?arguments[t]:{};t%2?Hm(Object(s),!0).forEach(function(a){tO(e,a,s[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(s)):Hm(Object(s)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(s,a))})}return e}var ru=class extends Error{constructor(e,t="storage",s,a){super(e),this.__isStorageError=!0,this.namespace=t,this.name=t==="vectors"?"StorageVectorsError":"StorageError",this.status=s,this.statusCode=a}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}};function su(e){return typeof e=="object"&&e!==null&&"__isStorageError"in e}var uf=class extends ru{constructor(e,t,s,a="storage"){super(e,a,t,s),this.name=a==="vectors"?"StorageVectorsApiError":"StorageApiError",this.status=t,this.statusCode=s}toJSON(){return ce({},super.toJSON())}},z0=class extends ru{constructor(e,t,s="storage"){super(e,s),this.name=s==="vectors"?"StorageVectorsUnknownError":"StorageUnknownError",this.originalError=t}};function Hl(e,t,s){const a=ce({},e),l=t.toLowerCase();for(const u of Object.keys(a))u.toLowerCase()===l&&delete a[u];return a[l]=s,a}function nO(e){const t={};for(const[s,a]of Object.entries(e))t[s.toLowerCase()]=a;return t}const rO=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),sO=e=>{if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},cf=e=>{if(Array.isArray(e))return e.map(s=>cf(s));if(typeof e=="function"||e!==Object(e))return e;const t={};return Object.entries(e).forEach(([s,a])=>{const l=s.replace(/([-_][a-z])/gi,u=>u.toUpperCase().replace(/[-_]/g,""));t[l]=cf(a)}),t},iO=e=>!e||typeof e!="string"||e.length===0||e.length>100||e.trim()!==e||e.includes("/")||e.includes("\\")?!1:/^[\w!.\*'() &$@=;:+,?-]+$/.test(e),qm=e=>{if(typeof e=="object"&&e!==null){const t=e;if(typeof t.msg=="string")return t.msg;if(typeof t.message=="string")return t.message;if(typeof t.error_description=="string")return t.error_description;if(typeof t.error=="string")return t.error;if(typeof t.error=="object"&&t.error!==null){const s=t.error;if(typeof s.message=="string")return s.message}}return JSON.stringify(e)},aO=async(e,t,s,a)=>{if(e!==null&&typeof e=="object"&&"json"in e&&typeof e.json=="function"){const l=e;let u=parseInt(String(l.status),10);Number.isFinite(u)||(u=500),l.json().then(c=>{const d=c?.statusCode||c?.code||u+"";t(new uf(qm(c),u,d,a))}).catch(()=>{const c=u+"";t(new uf(l.statusText||`HTTP ${u} error`,u,c,a))})}else t(new z0(qm(e),e,a))},oO=(e,t,s,a)=>{const l={method:e,headers:t?.headers||{}};if(e==="GET"||e==="HEAD"||!a)return ce(ce({},l),s);if(sO(a)){var u;const c=t?.headers||{};let d;for(const[p,g]of Object.entries(c))p.toLowerCase()==="content-type"&&(d=g);l.headers=Hl(c,"Content-Type",(u=d)!==null&&u!==void 0?u:"application/json"),l.body=JSON.stringify(a)}else l.body=a;return t?.duplex&&(l.duplex=t.duplex),ce(ce({},l),s)};async function Sa(e,t,s,a,l,u,c){return new Promise((d,p)=>{e(s,oO(t,a,l,u)).then(g=>{if(!g.ok)throw g;if(a?.noResolveJson)return g;if(c==="vectors"){const m=g.headers.get("content-type");if(g.headers.get("content-length")==="0"||g.status===204)return{};if(!m||!m.includes("application/json"))return{}}return g.json()}).then(g=>d(g)).catch(g=>aO(g,p,a,c))})}function P0(e="storage"){return{get:async(t,s,a,l)=>Sa(t,"GET",s,a,l,void 0,e),post:async(t,s,a,l,u)=>Sa(t,"POST",s,l,u,a,e),put:async(t,s,a,l,u)=>Sa(t,"PUT",s,l,u,a,e),head:async(t,s,a,l)=>Sa(t,"HEAD",s,ce(ce({},a),{},{noResolveJson:!0}),l,void 0,e),remove:async(t,s,a,l,u)=>Sa(t,"DELETE",s,l,u,a,e)}}const lO=P0("storage"),{get:Pa,post:on,put:hf,head:uO,remove:jf}=lO,$t=P0("vectors");var mi=class{constructor(e,t={},s,a="storage"){this.shouldThrowOnError=!1,this.url=e,this.headers=nO(t),this.fetch=rO(s),this.namespace=a}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(e,t){return this.headers=Hl(this.headers,e,t),this}async handleOperation(e){var t=this;try{return{data:await e(),error:null}}catch(s){if(t.shouldThrowOnError)throw s;if(su(s))return{data:null,error:s};throw s}}};let B0;B0=Symbol.toStringTag;var cO=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t,this[B0]="StreamDownloadBuilder",this.promise=null}
37then(e,t){return this.getPromise().then(e,t)}catch(e){return this.getPromise().catch(e)}finally(e){return this.getPromise().finally(e)}getPromise(){return this.promise||(this.promise=this.execute()),this.promise}async execute(){var e=this;try{return{data:(await e.downloadFn()).body,error:null}}catch(t){if(e.shouldThrowOnError)throw t;if(su(t))return{data:null,error:t};throw t}}};let H0;H0=Symbol.toStringTag;var hO=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t,this[H0]="BlobDownloadBuilder",this.promise=null}asStream(){return new cO(this.downloadFn,this.shouldThrowOnError)}then(e,t){return this.getPromise().then(e,t)}catch(e){return this.getPromise().catch(e)}finally(e){return this.getPromise().finally(e)}getPromise(){return this.promise||(this.promise=this.execute()),this.promise}async execute(){var e=this;try{return{data:await(await e.downloadFn()).blob(),error:null}}catch(t){if(e.shouldThrowOnError)throw t;if(su(t))return{data:null,error:t};throw t}}};const fO={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},Im={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};var dO=class extends mi{constructor(e,t={},s,a){super(e,t,a,"storage"),this.bucketId=s}async uploadOrUpdate(e,t,s,a){var l=this;return l.handleOperation(async()=>{let u;const c=ce(ce({},Im),a);let d=ce(ce({},l.headers),e==="POST"&&{"x-upsert":String(c.upsert)});const p=c.metadata;if(typeof Blob<"u"&&s instanceof Blob?(u=new FormData,u.append("cacheControl",c.cacheControl),p&&u.append("metadata",l.encodeMetadata(p)),u.append("",s)):typeof FormData<"u"&&s instanceof FormData?(u=s,u.has("cacheControl")||u.append("cacheControl",c.cacheControl),p&&!u.has("metadata")&&u.append("metadata",l.encodeMetadata(p))):(u=s,d["cache-control"]=`max-age=${c.cacheControl}`,d["content-type"]=c.contentType,p&&(d["x-metadata"]=l.toBase64(l.encodeMetadata(p))),(typeof ReadableStream<"u"&&u instanceof ReadableStream||u&&typeof u=="object"&&"pipe"in u&&typeof u.pipe=="function")&&!c.duplex&&(c.duplex="half")),a?.headers)for(const[b,_]of Object.entries(a.headers))d=Hl(d,b,_);const g=l._removeEmptyFolders(t),m=l._getFinalPath(g),y=await(e=="PUT"?hf:on)(l.fetch,`${l.url}/object/${m}`,u,ce({headers:d},c?.duplex?{duplex:c.duplex}:{}));return{path:g,id:y.Id,fullPath:y.Key}})}async upload(e,t,s){return this.uploadOrUpdate("POST",e,t,s)}async uploadToSignedUrl(e,t,s,a){var l=this;const u=l._removeEmptyFolders(e),c=l._getFinalPath(u),d=new URL(l.url+`/object/upload/sign/${c}`);return d.searchParams.set("token",t),l.handleOperation(async()=>{let p;const g=ce(ce({},Im),a);let m=ce(ce({},l.headers),{"x-upsert":String(g.upsert)});const y=g.metadata;if(typeof Blob<"u"&&s instanceof Blob?(p=new FormData,p.append("cacheControl",g.cacheControl),y&&p.append("metadata",l.encodeMetadata(y)),p.append("",s)):typeof FormData<"u"&&s instanceof FormData?(p=s,p.has("cacheControl")||p.append("cacheControl",g.cacheControl),y&&!p.has("metadata")&&p.append("metadata",l.encodeMetadata(y))):(p=s,m["cache-control"]=`max-age=${g.cac
37heControl}`,m["content-type"]=g.contentType,y&&(m["x-metadata"]=l.toBase64(l.encodeMetadata(y))),(typeof ReadableStream<"u"&&p instanceof ReadableStream||p&&typeof p=="object"&&"pipe"in p&&typeof p.pipe=="function")&&!g.duplex&&(g.duplex="half")),a?.headers)for(const[b,_]of Object.entries(a.headers))m=Hl(m,b,_);return{path:u,fullPath:(await hf(l.fetch,d.toString(),p,ce({headers:m},g?.duplex?{duplex:g.duplex}:{}))).Key}})}async createSignedUploadUrl(e,t){var s=this;return s.handleOperation(async()=>{let a=s._getFinalPath(e);const l=ce({},s.headers);t?.upsert&&(l["x-upsert"]="true");const u=await on(s.fetch,`${s.url}/object/upload/sign/${a}`,{},{headers:l}),c=new URL(s.url+u.url),d=c.searchParams.get("token");if(!d)throw new ru("No token returned by API");return{signedUrl:c.toString(),path:e,token:d}})}async update(e,t,s){return this.uploadOrUpdate("PUT",e,t,s)}async move(e,t,s){var a=this;return a.handleOperation(async()=>await on(a.fetch,`${a.url}/object/move`,{bucketId:a.bucketId,sourceKey:e,destinationKey:t,destinationBucket:s?.destinationBucket},{headers:a.headers}))}async copy(e,t,s){var a=this;return a.handleOperation(async()=>({path:(await on(a.fetch,`${a.url}/object/copy`,{bucketId:a.bucketId,sourceKey:e,destinationKey:t,de
37stinationBucket:s?.destinationBucket},{headers:a.headers})).Key}))}async createSignedUrl(e,t,s){var a=this;return a.handleOperation(async()=>{let l=a._getFinalPath(e);const u=typeof s?.transform=="object"&&s.transform!==null&&Object.keys(s.transform).length>0;let c=await on(a.fetch,`${a.url}/object/sign/${l}`,ce({expiresIn:t},u?{transform:s.transform}:{}),{headers:a.headers});const d=new URLSearchParams;s?.download&&d.set("download",s.download===!0?"":s.download),s?.cacheNonce!=null&&d.set("cacheNonce",String(s.cacheNonce));const p=d.toString();return{signedUrl:encodeURI(`${a.url}${c.signedURL}${p?`&${p}`:""}`)}})}async createSignedUrls(e,t,s){var a=this;return a.handleOperation(async()=>{const l=await on(a.fetch,`${a.url}/object/sign/${a.bucketId}`,{expiresIn:t,paths:e},{headers:a.headers}),u=new URLSearchParams;s?.download&&u.set("download",s.download===!0?"":s.download),s?.cacheNonce!=null&&u.set("cacheNonce",String(s.cacheNonce));const c=u.toString();return l.map(d=>ce(ce({},d),{},{signedUrl:d.signedURL?encodeURI(`${a.url}${d.signedURL}${c?`&${c}`:""}`):null}))})}download(e,t,s){const a=typeof t?.transform=="object"&&t.transform!==null&&Object.keys(t.transform).length>0?"render/image/authenticated":"object",l=new URLSearchParams;t?.transform&&this.applyTransformOptsToQuery(l,t.transform),t?.cacheNonce!=null&&l.set("cacheNonce",String(t.cacheNonce));const u=l.toString(),c=this._getFinalPath(e),d=()=>Pa(this.fetch,`${this.url}/${a}/${c}${u?`?${u}`:""}`,{headers:this.headers,noResolveJson:!0},s);return new hO(d,this.shouldThrowOnError)}async info(e){var t=this;const s=t._getFinalPath(e);return t.handleOperation(async()=>cf(await Pa(t.fetch,`${t.url}/object/info/${s}`,{headers:t.headers})))}async exists(e){var t=this;const s=t._getFinalPath(e);try{return await uO(t.fetch,`${t.url}/object/${s}`,{headers:t.headers}),{data:!0,error:null}}catch(l){if(t.shouldThrowOnError)throw l;if(su(l)){var a;const u=l instanceof uf?l.status:l instanceof z0?(a=l.originalError)===null||a===void 0?void 0:a.status:void 0;if(u!==void 0&&[400,404].includes(u))return{data:!1,error:l}}throw l}}getPublicUrl(e,t){const s=this._getFinalPath(e),a=new URLSearchParams;t?.download&&a.set("download",t.download===!0?"":t.download),t?.transform&&this.applyTransformOptsToQuery(a,t.transform),t?.cacheNonce!=null&&a.set("cacheNonce",String(t.cacheNonce));const l=a.toString(),u=typeof t?.transform=="object"&&t.transform!==null&&Object.keys(t.transform).length>0?"render/image":"object";return{data:{publicUrl:encodeURI(`${this.url}/${u}/public/${s}`)+(l?`?${l}`:"")}}}async remove(e){var t=this;return t.handleOperation(async()=>await jf(t.fetch,`${t.url}/object/${t.bucketId}`,{prefixes:e},{headers:t.headers}))}async list(e,t,s){var a=this;return a.handleOperation(async()=>{const l=ce(ce(ce({},fO),t),{},{prefix:e||""});return await on(a.fetch,`${a.url}/object/list/${a.bucketId}`,l,{headers:a.headers},s)})}async listV2(e,t){var s=this;return s.handleOperation(async()=>{const a=ce({},e);return await on(s.fetch,`${s.url}/object/list-v2/${s.bucketId}`,a,{headers:s.headers},t)})}encodeMetadata(e){return JSON.stringify(e)}toBase64(e){return typeof Buffer<"u"?Buffer.from(e).toString("base64"):btoa(e)}_getFinalPath(e){return`${this.bucketId}/${e.replace(/^\/+/,"")}`}_removeEmptyFolders(e){return e.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}applyTransformOptsToQuery(e,t){return t.width&&e.set("width",t.width.toString()),t.height&&e.set("height",t.height.toString()),t.resize&&e.set("resize",t.resize),t.format&&e.set("format",t.format),t.quality&&e.set("quality",t.quality.toString()),e}};const pO="2.108.1",Ka={"X-Client-Info":`storage-js/${pO}`};var gO=class extends mi{constructor(e,t={},s,a){const l=new URL(e);a?.useNewHostname&&/supabase\.(co|in|red)$/.test(l.hostname)&&!l.hostname.includes("storage.supabase.")&&(l.hostname=l.hostname.replace("supabase.","storage.supabase."));const u=l.href.replace(/\/$/,""),c=ce(ce({},Ka),t);super(u,c,s,"storage")}async listBuckets(e){var t=this;return t.handleOperation(async()=>{const s=t.listBucketOptionsToQueryString(e);return await Pa(t.fetch,`${t.url}/bucket${s}`,{headers:t.headers})})}async getBucket(e){var t=this;return t.handleOperation(async()=>await Pa(t.fetch,`${t.url}/bucket/${e}`,{headers:t.headers}))}async createBucket(e,t={public:!1}){var s=this;return s.handleOperation(async()=>await on(s.fetch,`${s.url}/bucket`,{id:e,name:e,type:t.type,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:s.headers}))}async updateBucket(e,t){var s=this;return s.handleOperation(async()=>await hf(s.fetch,`${s.url}/bucket/${e}`,{id:e,name:e,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:s.headers}))}async emptyBucket(e){var t=this;return t.handleOperation(async()=>await on(t.fetch,`${t.url}/bucket/${e}/empty`,{},{headers:t.headers}))}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await jf(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}))}listBucketOptionsToQueryString(e){const t={};return e&&("limit"in e&&(t.limit=String(e.limit)),"offset"in e&&(t.offset=String(e.offset)),e.search&&(t.search=e.search),e.sortColumn&&(t.sortColumn=e.sortColumn),e.sortOrder&&(t.sortOrder=e.sortOrder)),Object.keys(t).length>0?"?"+new URLSearchParams(t).toString():""}},yO=class extends mi{constructor(e,t={},s){const a=e.replace(/\/$/,""),l=ce(ce({},Ka),t);super(a,l,s,"storage")}async createBucket(e){var t=this;return t.handleOperation(async()=>await on(t.fetch,`${t.url}/bucket`,{name:e},{headers:t.headers}))}async listBuckets(e){var t=this;return t.handleOperation(async()=>{const s=new URLSearchParams;e?.limit!==void 0&&s.set("limit",e.limit.toString()),e?.offset!==void 0&&s.set("offset",e.offset.toString()),e?.sortColumn&&s.set("sortColumn",e.sortColumn),e?.sortOrder&&s.set("sortOrder",e.sortOrder),e?.search&&s.set("search",e.search);const a=s.toString(),l=a?`${t.url}/bucket?${a}`:`${t.url}/bucket`;return await Pa(t.fetch,l,{headers:t.headers})})}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await jf(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}))}from(e){var t=this;if(!iO(e))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 s=new Z1({baseUrl:this.url,catalogName:e,auth:{type:"custom",getHeaders:async()=>t.headers},fetch:this.fetch}),a=this.shouldThrowOnError;return new Proxy(s,{get(l,u){const c=l[u];return typeof c!="function"?c:async(...d)=>{try{return{data:await c.apply(l,d),error:null}}catch(p){if(a)throw p;return{data:null,error:p}}}}})}},mO=class extends mi{constructor(e,t={},s){const a=e.replace(/\/$/,""),l=ce(ce({},Ka),{},{"Content-Type":"application/json"},t);super(a,l,s,"vectors")}async createIndex(e){var t=this;return t.handleOperation(async()=>await $t.post(t.fetch,`${t.url}/CreateIndex`,e,{headers:t.headers})||{})}async getIndex(e,t){var s=this;return s.handleOperation(async()=>await $t.post(s.fetch,`${s.url}/GetIndex`,{vectorBucketName:e,indexName:t},{headers:s.headers}))}async listIndexes(e){var t=this;return t.handleOperation(async()=>await $t.post(t.fetch,`${t.url}/ListIndexes`,e,{headers:t.headers}))}async deleteIndex(e,t){var s=this;return s.handleOperation(async()=>await $t.post(s.fetch,`${s.url}/DeleteIndex`,{vectorBucketName:e,indexName:t},{headers:s.headers})||{})}},vO=class extends mi{constructor(e,t={},s){const a=e.replace(/\/$/,""),l=ce(ce({},Ka),{},{"Content-Type":"application/json"},t);super(a,l,s,"vectors")}async putVectors(e){var t=this;if(e.vectors.length<1||e.vectors.length>500)throw new Error("Vector batch size must be between 1 and 500 items");return t.handleOperation(async()=>await $t.post(t.fetch,`${t.url}/PutVectors`,e,{headers:t.headers})||{})}async getVectors(e){var t=this;return t.handleOperation(async()=>await $t.post(t.fetch,`${t.url}/GetVectors`,e,{headers:t.headers}))}async listVectors(e){var t=this;if(e.segmentCount!==void 0){if(e.segmentCount<1||e.segmentCount>16)throw new Error("segmentCount must be between 1 and 16");
37if(e.segmentIndex!==void 0&&(e.segmentIndex<0||e.segmentIndex>=e.segmentCount))throw new Error(`segmentIndex must be between 0 and ${e.segmentCount-1}`)}return t.handleOperation(async()=>await $t.post(t.fetch,`${t.url}/ListVectors`,e,{headers:t.headers}))}async queryVectors(e){var t=this;return t.handleOperation(async()=>await $t.post(t.fetch,`${t.url}/QueryVectors`,e,{headers:t.headers}))}async deleteVectors(e){var t=this;if(e.keys.length<1||e.keys.length>500)throw new Error("Keys batch size must be between 1 and 500 items");return t.handleOperation(async()=>await $t.post(t.fetch,`${t.url}/DeleteVectors`,e,{headers:t.headers})||{})}},bO=class extends mi{constructor(e,t={},s){const a=e.replace(/\/$/,""),l=ce(ce({},Ka),{},{"Content-Type":"application/json"},t);super(a,l,s,"vectors")}async createBucket(e){var t=this;return t.handleOperation(async()=>await $t.post(t.fetch,`${t.url}/CreateVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{})}async getBucket(e){var t=this;return t.handleOperation(async()=>await $t.post(t.fetch,`${t.url}/GetVectorBucket`,{vectorBucketName:e},{headers:t.headers}))}async listBuckets(e={}){var t=this;return t.handleOperation(async()=>await $t.post(t.fetch,`${t.url}/ListVectorBuckets`,e,{headers:t.headers}))}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await $t.post(t.fetch,`${t.url}/DeleteVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{})}},_O=class extends bO{constructor(e,t={}){super(e,t.headers||{},t.fetch)}from(e){return new SO(this.url,this.headers,e,this.fetch)}async createBucket(e){var t=()=>super.createBucket,s=this;return t().call(s,e)}async getBucket(e){var t=()=>super.getBucket,s=this;return t().call(s,e)}async listBuckets(e={}){var t=()=>super.listBuckets,s=this;return t().call(s,e)}async deleteBucket(e){var t=()=>super.deleteBucket,s=this;return t().call(s,e)}},SO=class extends mO{constructor(e,t,s,a){super(e,t,a),this.vectorBucketName=s}async createIndex(e){var t=()=>super.createIndex,s=this;return t().call(s,ce(ce({},e),{},{vectorBucketName:s.vectorBucketName}))}async listIndexes(e={}){var t=()=>super.listIndexes,s=this;return t().call(s,ce(ce({},e),{},{vectorBucketName:s.vectorBucketName}))}async getIndex(e){var t=()=>super.getIndex,s=this;return t().call(s,s.vectorBucketName,e)}async deleteIndex(e){var t=()=>super.deleteIndex,s=this;return t().call(s,s.vectorBucketName,e)}index(e){return new wO(this.url,this.headers,this.vectorBucketName,e,this.fetch)}},wO=class extends vO{constructor(e,t,s,a,l){super(e,t,l),this.vectorBucketName=s,this.indexName=a}async putVectors(e){var t=()=>super.putVectors,s=this;return t().call(s,ce(ce({},e),{},{vectorBucketName:s.vectorBucketName,indexName:s.indexName}))}async getVectors(e){var t=()=>super.getVectors,s=this;return t().call(s,ce(ce({},e),{},{vectorBucketName:s.vectorBucketName,indexName:s.indexName}))}async listVectors(e={}){var t=()=>super.listVectors,s=this;return t().call(s,ce(ce({},e),{},{vectorBucketName:s.vectorBucketName,indexName:s.indexName}))}async queryVectors(e){var t=()=>super.queryVectors,s=this;return t().call(s,ce(ce({},e),{},{vectorBucketName:s.vectorBucketName,indexName:s.indexName}))}async deleteVectors(e){var t=()=>super.deleteVectors,s=this;return t().call(s,ce(ce({},e),{},{vectorBucketName:s.vectorBucketName,indexName:s.indexName}))}},EO=class extends gO{constructor(e,t={},s,a){super(e,t,s,a)}from(e){return new dO(this.url,this.headers,e,this.fetch)}get vectors(){return new _O(this.url+"/vector",{headers:this.headers,fetch:this.fetch})}get analytics(){return new yO(this.url+"/iceberg",this.headers,this.fetch)}};const q0="2.108.1",wr=30*1e3,Ta=3,Hh=Ta*wr,TO="http://localhost:9999",RO="supabase.auth.token",AO={"X-Client-Info":`gotrue-js/${q0}`},ff="X-Supabase-Api-Version",I0={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},OO=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,CO=600*1e3;class Ba extends Error{constructor(t,s,a){super(t),this.__isAuthError=!0,this.name="AuthError",this.status=s,this.code=a}toJSON(){return{name:this.name,message:this.message,status:this.status,code:this.code}}}function Z(e){return typeof e=="object"&&e!==null&&"__isAuthError"in e}class xO extends Ba{constructor(t,s,a){super(t,s,a),this.name="AuthApiError",this.status=s,this.code=a}}function kO(e){return Z(e)&&e.name==="AuthApiError"}
37class un extends Ba{constructor(t,s){super(t),this.name="AuthUnknownError",this.originalError=s}}class _n extends Ba{constructor(t,s,a,l){super(t,a,l),this.name=s,this.status=a}}class ut extends _n{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function Sl(e){return Z(e)&&e.name==="AuthSessionMissingError"}class si extends _n{constructor(){super("Auth session or user missing","AuthInvalidTokenResponseError",500,void 0)}}class wl extends _n{constructor(t){super(t,"AuthInvalidCredentialsError",400,void 0)}}class El extends _n{constructor(t,s=null){super(t,"AuthImplicitGrantRedirectError",500,void 0),this.details=null,this.details=s}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{details:this.details})}}function jO(e){return Z(e)&&e.name==="AuthImplicitGrantRedirectError"}class $m extends _n{constructor(t,s=null){super(t,"AuthPKCEGrantCodeExchangeError",500,void 0),this.details=null,this.details=s}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{details:this.details})}}class MO extends _n{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 df extends _n{constructor(t,s){super(t,"AuthRetryableFetchError",s,void 0)}}function qh(e){return Z(e)&&e.name==="AuthRetryableFetchError"}class Gm extends _n{constructor(t="Refresh result discarded: session state changed mid-flight (e.g., concurrent signOut)"){super(t,"AuthRefreshDiscardedError",409,void 0)}}function UO(e){return Z(e)&&e.name==="AuthRefreshDiscardedError"}class Vm extends _n{constructor(t,s,a){super(t,"AuthWeakPasswordError",s,"weak_password"),this.reasons=a}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{reasons:this.reasons})}}class ql extends _n{constructor(t){super(t,"AuthInvalidJwtError",400,"invalid_jwt")}}const Il="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),Km=` 	
38\r=`.split(""),DO=(()=>{const e=new Array(128);for(let t=0;t<e.length;t+=1)e[t]=-1;for(let t=0;t<Km.length;t+=1)e[Km[t].charCodeAt(0)]=-2;for(let t=0;t<Il.length;t+=1)e[Il[t].charCodeAt(0)]=t;return e})();function Ym(e,t,s){if(e!==null)for(t.queue=t.queue<<8|e,t.queuedBits+=8;t.queuedBits>=6;){const a=t.queue>>t.queuedBits-6&63;s(Il[a]),t.queuedBits-=6}else if(t.queuedBits>0)for(t.queue=t.queue<<6-t.queuedBits,t.queuedBits=6;t.queuedBits>=6;){const a=t.queue>>t.queuedBits-6&63;s(Il[a]),t.queuedBits-=6}}function $0(e,t,s){const a=DO[e];if(a>-1)for(t.queue=t.queue<<6|a,t.queuedBits+=6;t.queuedBits>=8;)s(t.queue>>t.queuedBits-8&255),t.queuedBits-=8;else{if(a===-2)return;throw new Error(`Invalid Base64-URL character "${String.fromCharCode(e)}"`)}}function Fm(e){const t=[],s=c=>{t.push(String.fromCodePoint(c))},a={utf8seq:0,codepoint:0},l={queue:0,queuedBits:0},u=c=>{zO(c,a,s)};for(let c=0;c<e.length;c+=1)$0(e.charCodeAt(c),l,u);return t.join("")}function NO(e,t){if(e<=127){t(e);return}else if(e<=2047){t(192|e>>6),t(128|e&63);return}else if(e<=65535){t(224|e>>12),t(128|e>>6&63),t(128|e&63);return}else if(e<=1114111){t(240|e>>18),t(128|e>>12&63),t(128|e>>6&63),t(128|e&63);return}throw new Error(`Unrecognized Unicode codepoint: ${e.toString(16)}`)}function LO(e,t){for(let s=0;s<e.length;s+=1){let a=e.charCodeAt(s);if(a>55295&&a<=56319){const l=(a-55296)*1024&65535;a=(e.charCodeAt(s+1)-56320&65535|l)+65536,s+=1}NO(a,t)}}function zO(e,t,s){if(t.utf8seq===0){if(e<=127){s(e);return}for(let a=1;a<6;a+=1)if((e>>7-a&1)===0){t.utf8seq=a;break}if(t.utf8seq===2)t.codepoint=e&31;else if(t.utf8seq===3)t.codepoint=e&15;else if(t.utf8seq===4)t.codepoint=e&7;else throw new Error("Invalid UTF-8 sequence");t.utf8seq-=1}else if(t.utf8seq>0){if(e<=127)throw new Error("Invalid UTF-8 sequence");t.codepoint=t.codepoint<<6|e&63,t.utf8seq-=1,t.utf8seq===0&&s(t.codepoint)}}function gi(e){const t=[],s={queue:0,queuedBits:0},a=l=>{t.push(l)};for(let l=0;l<e.length;l+=1)$0(e.charCodeAt(l),s,a);return new Uint8Array(t)}function PO(e){const t=[];return LO(e,s=>t.push(s)),new Uint8Array(t)}function us(e){const t=[],s={queue:0,queuedBits:0},a=l=>{t.push(l)};return e.forEach(l=>Ym(l,s,a)),Ym(null,s,a),t.join("")}function BO(e){return Math.round(Date.now()/1e3)+e}function HO(){return Symbol("auth-callback")}const _t=()=>typeof window<"u"&&typeof document<"u",ns={tested:!1,writable:!1},G0=()=>
38{if(!_t())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(ns.tested)return ns.writable;const e=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(e,e),globalThis.localStorage.removeItem(e),ns.tested=!0,ns.writable=!0}catch{ns.tested=!0,ns.writable=!1}return ns.writable};function qO(e){const t={},s=new URL(e);if(s.hash&&s.hash[0]==="#")try{new URLSearchParams(s.hash.substring(1)).forEach((l,u)=>{t[u]=l})}catch{}return s.searchParams.forEach((a,l)=>{t[l]=a}),t}const V0=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),IO=e=>typeof e=="object"&&e!==null&&"status"in e&&"ok"in e&&"json"in e&&typeof e.json=="function",ui=async(e,t,s)=>{await e.setItem(t,JSON.stringify(s))},$n=async(e,t)=>{const s=await e.getItem(t);if(!s)return null;try{return JSON.parse(s)}catch{return null}},Xe=async(e,t)=>{await e.removeItem(t)};class iu{constructor(){this.promise=new iu.promiseConstructor((t,s)=>{this.resolve=t,this.reject=s})}}iu.promiseConstructor=Promise;function Tl(e){const t=e.split(".");if(t.length!==3)throw new ql("Invalid JWT structure");for(let a=0;a<t.length;a++)if(!OO.test(t[a]))throw new ql("JWT not in base64url format");return{header:JSON.parse(Fm(t[0])),payload:JSON.parse(Fm(t[1])),signature:gi(t[2]),raw:{header:t[0],payload:t[1]}}}async function $O(e){return await new Promise(t=>{setTimeout(()=>t(null),e)})}function GO(e,t){return new Promise((a,l)=>{(async()=>{for(let u=0;u<1/0;u++)try{const c=await e(u);if(!t(u,null,c)){a(c);return}}catch(c){if(!t(u,c)){l(c);return}}})()})}function VO(e){return("0"+e.toString(16)).substr(-2)}function KO(){const t=new Uint32Array(56);if(typeof crypto>"u"){const s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",a=s.length;let l="";for(let u=0;u<56;u++)l+=s.charAt(Math.floor(Math.random()*a));return l}return crypto.getRandomValues(t),Array.from(t,VO).join("")}async function YO(e){const s=new TextEncoder().encode(e),a=await crypto.subtle.digest("SHA-256",s),l=new Uint8Array(a);return Array.from(l).map(u=>String.fromCharCode(u)).join("")}async function FO(e){if(!(typeof crypto<"u"&&typeof crypto.subtle<"u"&&typeof TextEncoder<"u"))return console.warn("WebCrypto API is not supported. Code challenge method will default to use plain instead of sha256."),e;const s=await YO(e);return btoa(s).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function rs(e,t,s=!1){const a=KO();let l=a;s&&(l+="/recovery"),await ui(e,`${t}-code-verifier`,l);const u=await FO(a);return[u,a===u?"plain":"s256"]}const QO=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function JO(e){const t=e.headers.get(ff);if(!t||!t.match(QO))return null;try{return new Date(`${t}T00:00:00.0Z`)}catch{return null}}function XO(e){if(!e)throw new Error("Missing exp claim");const t=Math.floor(Date.now()/1e3);if(e<=t)throw new Error("JWT has expired")}function ZO(e){switch(e){case"RS256":return{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}};case"ES256":return{name:"ECDSA",namedCurve:"P-256",hash:{name:"SHA-256"}};default:throw new Error("Invalid alg claim")}}const WO=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function Gn(e){if(!WO.test(e))throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not")}function an(e){if(!e.passkey)throw new Error("@supabase/auth-js: the passkey API is experimental and disabled by default. Enable it by passing `auth: { experimental: { passkey: true } }` to createClient (or to the GoTrueClient constructor).")}function Ih(){const e={};return new Proxy(e,{get:(t,s)=>{if(s==="__isUserNotAvailableProxy")return!0;if(typeof s=="symbol"){const a=s.toString();if(a==="Symbol(Symbol.toPrimitive)"||a==="Symbol(Symbol.toStringTag)"||a==="Symbol(util.inspect.custom)")return}throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Accessing the "${s}" property of the session object is not supported. Please use getUser() instead.`)},set:(t,s)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Setting the "${s}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)},deleteProperty:(t,s)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Deleting the "${s}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)}})}function eC(e,t){return new Proxy(e,{get:(s,a,l)=>{if(a==="__isInsecureUserWarningProxy")return!0;
38if(typeof a=="symbol"){const u=a.toString();if(u==="Symbol(Symbol.toPrimitive)"||u==="Symbol(Symbol.toStringTag)"||u==="Symbol(util.inspect.custom)"||u==="Symbol(nodejs.util.inspect.custom)")return Reflect.get(s,a,l)}return!t.value&&typeof a=="string"&&(console.warn("Using the user object as returned from supabase.auth.getSession() or from some supabase.auth.onAuthStateChange() events could be insecure! This value comes directly from the storage medium (usually cookies on the server) and may not be authentic. Use supabase.auth.getUser() instead which authenticates the data by contacting the Supabase Auth server."),t.value=!0),Reflect.get(s,a,l)}})}function Qm(e){return JSON.parse(JSON.stringify(e))}const ss=e=>{if(typeof e=="object"&&e!==null){const t=e;if(typeof t.msg=="string")return t.msg;if(typeof t.message=="string")return t.message;if(typeof t.error_description=="string")return t.error_description;if(typeof t.error=="string")return t.error}return JSON.stringify(e)},tC=[502,503,504,520,521,522,523,524,530];async function Jm(e){var t;if(!IO(e))throw new df(ss(e),0);if(tC.includes(e.status))throw new df(ss(e),e.status);let s;try{s=await e.json()}catch(u){throw new un(ss(u),u)}let a;const l=JO(e);if(l&&l.getTime()>=I0["2024-01-01"].timestamp&&typeof s=="object"&&s&&typeof s.code=="string"?a=s.code:typeof s=="object"&&s&&typeof s.error_code=="string"&&(a=s.error_code),a){if(a==="weak_password")throw new Vm(ss(s),e.status,((t=s.weak_password)===null||t===void 0?void 0:t.reasons)||[]);if(a==="session_not_found")throw new ut}else if(typeof s=="object"&&s&&typeof s.weak_password=="object"&&s.weak_password&&Array.isArray(s.weak_password.reasons)&&s.weak_password.reasons.length&&s.weak_password.reasons.reduce((u,c)=>u&&typeof c=="string",!0))throw new Vm(ss(s),e.status,s.weak_password.reasons);throw new xO(ss(s),e.status||500,a)}const nC=(e,t,s,a)=>{const l={method:e,headers:t?.headers||{}};return e==="GET"?l:(l.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},t?.headers),l.body=JSON.stringify(a),Object.assign(Object.assign({},l),s))};async function te(e,t,s,a){var l;const u=Object.assign({},a?.headers);u[ff]||(u[ff]=I0["2024-01-01"].name),a?.jwt&&(u.Authorization=`Bearer ${a.jwt}`);const c=(l=a?.query)!==null&&l!==void 0?l:{};a?.redirectTo&&(c.redirect_to=a.redirectTo);const d=Object.keys(c).length?"?"+new URLSearchParams(c).toString():"",p=await rC(e,t,s+d,{headers:u,noResolveJson:a?.noResolveJson},{},a?.body);return a?.xform?a?.xform(p):{data:Object.assign({},p),error:null}}async function rC(e,t,s,a,l,u){const c=nC(t,a,l,u);let d;try{d=await e(s,Object.assign({},c))}catch(p){throw console.error(p),new df(ss(p),0)}if(d.ok||await Jm(d),a?.noResolveJson)return d;try{return await d.json()}catch(p){await Jm(p)}}function en(e){var t;let s=null;aC(e)&&(s=Object.assign({},e),e.expires_at||(s.expires_at=BO(e.expires_in)));const a=(t=e.user)!==null&&t!==void 0?t:typeof e?.id=="string"?e:null;return{data:{session:s,user:a},error:null}}function Xm(e){const t=en(e);return!t.error&&e.weak_password&&typeof e.weak_password=="object"&&Array.isArray(e.weak_password.reasons)&&e.weak_password.reasons.length&&e.weak_password.message&&typeof e.weak_password.message=="string"&&e.weak_password.reasons.reduce((s,a)=>s&&typeof a=="string",!0)&&(t.data.weak_password=e.weak_password),t}function Ar(e){var t;return{data:{user:(t=e.user)!==null&&t!==void 0?t:e},error:null}}function sC(e){return{data:e,error:null}}function iC(e){const{action_link:t,email_otp:s,hashed_token:a,redirect_to:l,verification_type:u}=e,c=nu(e,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),d={action_link:t,email_otp:s,hashed_token:a,redirect_to:l,verification_type:u},p=Object.assign({},c);return{data:{properties:d,user:p},error:null}}function Zm(e){return e}function aC(e){return!!e.access_token&&!!e.refresh_token&&!!e.expires_in}const $h=["global","local","others"];class oC{constructor({url:t="",headers:s={},fetch:a,experimental:l}){this.url=t,this.headers=s,this.fetch=V0(a),this.experimental=l??{},this.mfa={listFactors:this._listFactors.bind(this),deleteFactor:this._deleteFactor.bind(this)},this.oauth={listClients:this._listOAuthClients.bind(this),createClient:this._createOAuthClient.bind(this),getClient:this._getOAuthClient.bind(this),updateClient:this._updateOAuthClient.bind(this),deleteClient:this._deleteOAuthClient.bind(this),regenerateClientSecret:this._regenerateOAuthClientSecret.bind(this)},this.customProviders={listProviders:this._listCustomProviders.bind(this),createProvider:this._createCustomProvider.bind(this),getProvider:this._getCustomProvider.bind(this),updateProvider:this._updateCustomProvider.bind(this),deleteProvider:this._deleteCustomProvider.bind(this)},this.passkey={listPasskeys:this._adminListPasskeys.bind(this),deletePasskey:this._adminDeletePasskey.bind(this)}}async signOut(t,s=$h[0]){if($h.indexOf(s)<0)throw new Error(`@supabase/auth-js: Parameter scope must be one of ${$h.join(", ")}`);try{return await te(this.fetch,"POST",`${this.url}/logout?scope=${s}`,{headers:this.headers,jwt:t,noResolveJson:!0}),{data:null,error:null}}catch(a){if(Z(a))return{data:null,error:a};throw a}}async inviteUserByEmail(t,s={}){try{return await te(this.fetch,"POST",`${this.url}/invite`,{body:{email:t,data:s.data},headers:this.headers,redirectTo:s.redirectTo,xform:Ar})}catch(a){if(Z(a))return{data:{user:null},error:a};throw a}}async generateLink(t){try{const{options:s}=t,a=nu(t,["options"]),l=Object.assign(Object.assign({},a),s);return"newEmail"in a&&(l.new_email=a?.newEmail,delete l.newEmail),await te(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:l,headers:this.headers,xform:iC,redirectTo:s?.redirectTo})}catch(s){if(Z(s))return{data:{properties:null,user:null},error:s};throw s}}async createUser(t){try{return await te(this.fetch,"POST",`${this.url}/admin/users`,{body:t,headers:this.headers,xform:Ar})}catch(s){if(Z(s))return{data:{user:null},error:s};throw s}}async listUsers(t){var s,a,l,u,c,d,p;try{const g={nextPage:null,lastPage:0,total:0},m=await te(this.fetch,"GET",`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:(a=(s=t?.page)===null||s===void 0?void 0:s.toString())!==null&&a!==void 0?a:"",per_page:(u=(l=t?.perPage)===null||l===void 0?void 0:l.toString())!==null&&u!==void 0?u:""},xform:Zm});if(m.error)throw m.error;const y=await m.json(),b=(c=m.headers.get("x-total-count"))!==null&&c!==void 0?c:0,_=(p=(d=m.headers.get("link"))===null||d===void 0?void 0:d.split(","))!==null&&p!==void 0?p:[];return _.length>0&&(_.forEach(w=>{const A=parseInt(w.split(";")[0].split("=")[1].substring(0,1)),R=JSON.parse(w.split(";")[1].split("=")[1]);g[`${R}Page`]=A}),g.total=parseInt(b)),{data:Object.assign(Object.assign({},y),g),error:null}}catch(g){if(Z(g))return{data:{users:[]},error:g};throw g}}async getUserById(t){Gn(t);try{return await te(this.fetch,"GET",`${this.url}/admin/users/${t}`,{headers:this.headers,xform:Ar})}catch(s){if(Z(s))return{data:{user:null},error:s};throw s}}async updateUserById(t,s){Gn(t);try{return await te(this.fetch,"PUT",`${this.url}/admin/users/${t}`,{body:s,headers:this.headers,xform:Ar})}catch(a){if(Z(a))return{data:{user:null},error:a};throw a}}async deleteUser(t,s=!1){Gn(t);
38try{return await te(this.fetch,"DELETE",`${this.url}/admin/users/${t}`,{headers:this.headers,body:{should_soft_delete:s},xform:Ar})}catch(a){if(Z(a))return{data:{user:null},error:a};throw a}}async _listFactors(t){Gn(t.userId);try{const{data:s,error:a}=await te(this.fetch,"GET",`${this.url}/admin/users/${t.userId}/factors`,{headers:this.headers,xform:l=>({data:{factors:l},error:null})});return{data:s,error:a}}catch(s){if(Z(s))return{data:null,error:s};throw s}}async _deleteFactor(t){Gn(t.userId),Gn(t.id);try{return{data:await te(this.fetch,"DELETE",`${this.url}/admin/users/${t.userId}/factors/${t.id}`,{headers:this.headers}),error:null}}catch(s){if(Z(s))return{data:null,error:s};throw s}}async _listOAuthClients(t){var s,a,l,u,c,d,p;try{const g={nextPage:null,lastPage:0,total:0},m=await te(this.fetch,"GET",`${this.url}/admin/oauth/clients`,{headers:this.headers,noResolveJson:!0,query:{page:(a=(s=t?.page)===null||s===void 0?void 0:s.toString())!==null&&a!==void 0?a:"",per_page:(u=(l=t?.perPage)===null||l===void 0?void 0:l.toString())!==null&&u!==void 0?u:""},xform:Zm});if(m.error)throw m.error;const y=await m.json(),b=(c=m.headers.get("x-total-count"))!==null&&c!==void 0?c:0,_=(p=(d=m.headers.get("link"))===null||d===void 0?void 0:d.split(","))!==null&&p!==void 0?p:[];return _.length>0&&(_.forEach(w=>{const A=parseInt(w.split(";")[0].split("=")[1].substring(0,1)),R=JSON.parse(w.split(";")[1].split("=")[1]);g[`${R}Page`]=A}),g.total=parseInt(b)),{data:Object.assign(Object.assign({},y),g),error:null}}catch(g){if(Z(g))return{data:{clients:[]},error:g};throw g}}async _createOAuthClient(t){try{return await te(this.fetch,"POST",`${this.url}/admin/oauth/clients`,{body:t,headers:this.headers,xform:s=>({data:s,error:null})})}catch(s){if(Z(s))return{data:null,error:s};throw s}}async _getOAuthClient(t){try{return await te(this.fetch,"GET",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,xform:s=>({data:s,error:null})})}catch(s){if(Z(s))return{data:null,error:s};throw s}}async _updateOAuthClient(t,s){try{return await te(this.fetch,"PUT",`${this.url}/admin/oauth/clients/${t}`,{body:s,headers:this.headers,xform:a=>({data:a,error:null})})}catch(a){if(Z(a))return{data:null,error:a};throw a}}async _deleteOAuthClient(t){try{return await te(this.fetch,"DELETE",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(s){if(Z(s))return{data:null,error:s};throw s}}async _regenerateOAuthClientSecret(t){try{return await te(this.fetch,"POST",`${this.url}/admin/oauth/clients/${t}/regenerate_secret`,{headers:this.headers,xform:s=>({data:s,error:null})})}catch(s){if(Z(s))return{data:null,error:s};throw s}}async _listCustomProviders(t){try{const s={};return t?.type&&(s.type=t.type),await te(this.fetch,"GET",`${this.url}/admin/custom-providers`,{headers:this.headers,query:s,xform:a=>{var l;return{data:{providers:(l=a?.providers)!==null&&l!==void 0?l:[]},error:null}}})}catch(s){if(Z(s))return{data:{providers:[]},error:s};throw s}}async _createCustomProvider(t){try{return await te(this.fetch,"POST",`${this.url}/admin/custom-providers`,{body:t,headers:this.headers,xform:s=>({data:s,error:null})})}catch(s){if(Z(s))return{data:null,error:s};throw s}}async _getCustomProvider(t){try{return await te(this.fetch,"GET",`${this.url}/admin/custom-providers/${t}`,{headers:this.headers,xform:s=>({data:s,error:null})})}catch(s){if(Z(s))return{data:null,error:s};throw s}}async _updateCustomProvider(t,s){try{return await te(this.fetch,"PUT",`${this.url}/admin/custom-providers/${t}`,{body:s,headers:this.headers,xform:a=>({data:a,error:null})})}catch(a){if(Z(a))return{data:null,error:a};throw a}}async _deleteCustomProvider(t){try{return await te(this.fetch,"DELETE",`${this.url}/admin/custom-providers/${t}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(s){if(Z(s))return{data:null,error:s};throw s}}async _adminListPasskeys(t){an(this.experimental),Gn(t.userId);try{return await te(this.fetch,"GET",`${this.url}/admin/users/${t.userId}/passkeys`,{headers:this.headers,xform:s=>({data:s,error:null})})}catch(s){if(Z(s))return{data:null,error:s};throw s}}async _adminDeletePasskey(t){an(this.experimental),Gn(t.userId),Gn(t.passkeyId);
38try{return await te(this.fetch,"DELETE",`${this.url}/admin/users/${t.userId}/passkeys/${t.passkeyId}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(s){if(Z(s))return{data:null,error:s};throw s}}}function Wm(e={}){return{getItem:t=>e[t]||null,setItem:(t,s)=>{e[t]=s},removeItem:t=>{delete e[t]}}}globalThis&&G0()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug");class lC extends Error{constructor(t){super(t),this.isAcquireTimeout=!0}}function uC(){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 K0(e){if(!/^0x[a-fA-F0-9]{40}$/.test(e))throw new Error(`@supabase/auth-js: Address "${e}" is invalid.`);return e.toLowerCase()}function cC(e){return parseInt(e,16)}function hC(e){const t=new TextEncoder().encode(e);return"0x"+Array.from(t,a=>a.toString(16).padStart(2,"0")).join("")}function fC(e){var t;const{chainId:s,domain:a,expirationTime:l,issuedAt:u=new Date,nonce:c,notBefore:d,requestId:p,resources:g,scheme:m,uri:y,version:b}=e;{if(!Number.isInteger(s))throw new Error(`@supabase/auth-js: Invalid SIWE message field "chainId". Chain ID must be a EIP-155 chain ID. Provided value: ${s}`);if(!a)throw new Error('@supabase/auth-js: Invalid SIWE message field "domain". Domain must be provided.');if(c&&c.length<8)throw new Error(`@supabase/auth-js: Invalid SIWE message field "nonce". Nonce must be at least 8 characters. Provided value: ${c}`);if(!y)throw new Error('@supabase/auth-js: Invalid SIWE message field "uri". URI must be provided.');if(b!=="1")throw new Error(`@supabase/auth-js: Invalid SIWE message field "version". Version must be '1'. Provided value: ${b}`);if(!((t=e.statement)===null||t===void 0)&&t.includes(`
39`))throw new Error(`@supabase/auth-js: Invalid SIWE message field "statement". Statement must not include '\\n'. Provided value: ${e.statement}`)}const _=K0(e.address),w=m?`${m}://${a}`:a,A=e.statement?`${e.statement}
40`:"",R=`${w} wants you to sign in with your Ethereum account:
41${_}
42
43${A}`;let O=`URI: ${y}
44Version: ${b}
45Chain ID: ${s}${c?`
46Nonce: ${c}`:""}
47Issued At: ${u.toISOString()}`;if(l&&(O+=`
48Expiration Time: ${l.toISOString()}`),d&&(O+=`
49Not Before: ${d.toISOString()}`),p&&(O+=`
50Request ID: ${p}`),g){let U=`
51Resources:`;for(const j of g){if(!j||typeof j!="string")throw new Error(`@supabase/auth-js: Invalid SIWE message field "resources". Every resource must be a valid string. Provided value: ${j}`);U+=`
52- ${j}`}O+=U}return`${R}
53${O}`}class nt extends Error{constructor({message:t,code:s,cause:a,name:l}){var u;super(t,{cause:a}),this.__isWebAuthnError=!0,this.name=(u=l??(a instanceof Error?a.name:void 0))!==null&&u!==void 0?u:"Unknown Error",this.code=s}toJSON(){return{name:this.name,message:this.message,code:this.code}}}class $l extends nt{constructor(t,s){super({code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:s,message:t}),this.name="WebAuthnUnknownError",this.originalError=s}}function dC({error:e,options:t}){var s,a,l;const{publicKey:u}=t;if(!u)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new nt({message:"Registration ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else if(e.name==="ConstraintError"){if(((s=u.authenticatorSelection)===null||s===void 0?void 0:s.requireResidentKey)===!0)return new nt({message:"Discoverable credentials were required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT",cause:e});if(t.mediation==="conditional"&&((a=u.authenticatorSelection)===null||a===void 0?void 0:a.userVerification)==="required")return new nt({message:"User verification was required during automatic registration but it could not be performed",code:"ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE",cause:e});if(((l=u.authenticatorSelection)===null||l===void 0?void 0:l.userVerification)==="required")return new nt({message:"User verification was required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT",cause:e})}else{if(e.name==="InvalidStateError")return new nt({message:"The authenticator was previously registered",code:"ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",cause:e});if(e.name==="NotAllowedError")return new nt({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="NotSupportedError")return u.pubKeyCredParams.filter(d=>d.type==="public-key").length===0?new nt({message:'No entry in pubKeyCredParams was of type "public-key"',code:"ERROR_MALFORMED_PUBKEYCREDPARAMS",cause:e}):new nt({message:"No available authenticator supported any of the specified pubKeyCredParams algorithms",code:"ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG",cause:e});if(e.name==="SecurityError"){const c=window.location.hostname;if(Y0(c)){if(u.rp.id!==c)return new nt({message:`The RP ID "${u.rp.id}
53" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new nt({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="TypeError"){if(u.user.id.byteLength<1||u.user.id.byteLength>64)return new nt({message:"User ID was not between 1 and 64 characters",code:"ERROR_INVALID_USER_ID_LENGTH",cause:e})}else if(e.name==="UnknownError")return new nt({message:"The authenticator was unable to process the specified options, or could not create a new credential",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:e})}return new nt({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}function pC({error:e,options:t}){const{publicKey:s}=t;if(!s)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new nt({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else{if(e.name==="NotAllowedError")return new nt({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="SecurityError"){const a=window.location.hostname;if(Y0(a)){if(s.rpId!==a)return new nt({message:`The RP ID "${s.rpId}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new nt({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="UnknownError")return new nt({message:"The authenticator was unable to process the specified options, or could not create a new assertion signature",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:e})}return new nt({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}class gC{createNewAbortSignal(){if(this.controller){const s=new Error("Cancelling existing WebAuthn API call for new one");s.name="AbortError",this.controller.abort(s)}const t=new AbortController;return this.controller=t,t.signal}cancelCeremony(){if(this.controller){const t=new Error("Manually cancelling existing WebAuthn API call");t.name="AbortError",this.controller.abort(t),this.controller=void 0}}}const pf=new gC;function ev(e){if(!e)throw new Error("Credential creation options are required");if(typeof PublicKeyCredential<"u"&&"parseCreationOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseCreationOptionsFromJSON=="function")return PublicKeyCredential.parseCreationOptionsFromJSON(e);const{challenge:t,user:s,excludeCredentials:a}=e,l=nu(e,["challenge","user","excludeCredentials"]),u=gi(t).buffer,c=Object.assign(Object.assign({},s),{id:gi(s.id).buffer}),d=Object.assign(Object.assign({},l),{challenge:u,user:c});if(a&&a.length>0){d.excludeCredentials=new Array(a.length);for(let p=0;p<a.length;p++){const g=a[p];d.excludeCredentials[p]=Object.assign(Object.assign({},g),{id:gi(g.id).buffer,type:g.type||"public-key",transports:g.transports})}}return d}function tv(e){if(!e)throw new Error("Credential request options are required");if(typeof PublicKeyCredential<"u"&&"parseRequestOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseRequestOptionsFromJSON=="function")return PublicKeyCredential.parseRequestOptionsFromJSON(e);const{challenge:t,allowCredentials:s}=e,a=nu(e,["challenge","allowCredentials"]),l=gi(t).buffer,u=Object.assign(Object.assign({},a),{challenge:l});if(s&&s.length>0){u.allowCredentials=new Array(s.length);for(let c=0;c<s.length;c++){const d=s[c];u.allowCredentials[c]=Object.assign(Object.assign({},d),{id:gi(d.id).buffer,type:d.type||"public-key",transports:d.transports})}}return u}function nv(e){var t;if("toJSON"in e&&typeof e.toJSON=="function")return e.toJSON();const s=e;return{id:e.id,rawId:e.id,response:{attestationObject:us(new Uint8Array(e.response.attestationObject)),clientDataJSON:us(new Uint8Array(e.response.clientDataJSON))},type:"public-key",clientExtensionResults:e.getClientExtensionResults(),authenticatorAttachment:(t=s.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function rv(e){var t;if("toJSON"in e&&typeof e.toJSON=="function")return e.toJSON();const s=e,a=e.getClientExtensionResults(),l=e.response;return{id:e.id,rawId:e.id,response:{authenticatorData:us(new Uint8Array(l.authenticatorData)),clientDataJSON:us(new Uint8Array(l.clientDataJSON)),signature:us(new Uint8Array(l.signature)),userHandle:l.userHandle?us(new Uint8Array(l.userHandle)):void 0},type:"public-key",clientExtensionResults:a,authenticatorAttachment:(t=s.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function Y0(e){return e==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e)}function Gl(){var e,t;return!!(_t()&&"PublicKeyCredential"in window&&window.PublicKeyCredential&&"credentials"in navigator&&typeof((e=navigator?.credentials)===null||e===void 0?void 0:e.create)=="function"&&typeof((t=navigator?.credentials)===null||t===void 0?void 0:t.get)=="function")}async function F0(e){try{const t=await navigator.credentials.create(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new $l("Browser returned unexpected credential type",t)}:{data:null,error:new $l("Empty credential response",t)}}
53catch(t){return{data:null,error:dC({error:t,options:e})}}}async function Q0(e){try{const t=await navigator.credentials.get(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new $l("Browser returned unexpected credential type",t)}:{data:null,error:new $l("Empty credential response",t)}}catch(t){return{data:null,error:pC({error:t,options:e})}}}const yC={hints:["security-key"],authenticatorSelection:{authenticatorAttachment:"cross-platform",requireResidentKey:!1,userVerification:"preferred",residentKey:"discouraged"},attestation:"direct"},mC={userVerification:"preferred",hints:["security-key"],attestation:"direct"};function Vl(...e){const t=l=>l!==null&&typeof l=="object"&&!Array.isArray(l),s=l=>l instanceof ArrayBuffer||ArrayBuffer.isView(l),a={};for(const l of e)if(l)for(const u in l){const c=l[u];if(c!==void 0)if(Array.isArray(c))a[u]=c;else if(s(c))a[u]=c;else if(t(c)){const d=a[u];t(d)?a[u]=Vl(d,c):a[u]=Vl(c)}else a[u]=c}return a}function vC(e,t){return Vl(yC,e,t||{})}function bC(e,t){return Vl(mC,e,t||{})}class _C{constructor(t){this.client=t,this.enroll=this._enroll.bind(this),this.challenge=this._challenge.bind(this),this.verify=this._verify.bind(this),this.authenticate=this._authenticate.bind(this),this.register=this._register.bind(this)}async _enroll(t){return this.client.mfa.enroll(Object.assign(Object.assign({},t),{factorType:"webauthn"}))}async _challenge({factorId:t,webauthn:s,friendlyName:a,signal:l},u){var c;try{const{data:d,error:p}=await this.client.mfa.challenge({factorId:t,webauthn:s});if(!d)return{data:null,error:p};const g=l??pf.createNewAbortSignal();if(d.webauthn.type==="create"){const{user:m}=d.webauthn.credential_options.publicKey;if(!m.name){const y=a;if(y)m.name=`${m.id}:${y}`;else{const _=(await this.client.getUser()).data.user,w=((c=_?.user_metadata)===null||c===void 0?void 0:c.name)||_?.email||_?.id||"User";m.name=`${m.id}:${w}`}}m.displayName||(m.displayName=m.name)}switch(d.webauthn.type){case"create":{const m=vC(d.webauthn.credential_options.publicKey,u?.create),{data:y,error:b}=await F0({publicKey:m,signal:g});return y?{data:{factorId:t,challengeId:d.id,webauthn:{type:d.webauthn.type,credential_response:y}},error:null}:{data:null,error:b}}case"request":{const m=bC(d.webauthn.credential_options.publicKey,u?.request),{data:y,error:b}=await Q0(Object.assign(Object.assign({},d.webauthn.credential_options),{publicKey:m,signal:g}));return y?{data:{factorId:t,challengeId:d.id,webauthn:{type:d.webauthn.type,credential_response:y}},error:null}:{data:null,error:b}}}}catch(d){return Z(d)?{data:null,error:d}:{data:null,error:new un("Unexpected error in challenge",d)}}}async _verify({challengeId:t,factorId:s,webauthn:a}){return this.client.mfa.verify({factorId:s,challengeId:t,webauthn:a})}async _authenticate({factorId:t,webauthn:{rpId:s=typeof window<"u"?window.location.hostname:void 0,rpOrigins:a=typeof window<"u"?[window.location.origin]:void 0,signal:l}={}},u){if(!s)return{data:null,error:new Ba("rpId is required for WebAuthn authentication")};try{if(!Gl())return{data:null,error:new un("Browser does not support WebAuthn",null)};const{data:c,error:d}=await this.challenge({factorId:t,webauthn:{rpId:s,rpOrigins:a},signal:l},{request:u});if(!c)return{data:null,error:d};const{webauthn:p}=c;return this._verify({factorId:t,challengeId:c.challengeId,webauthn:{type:p.type,rpId:s,rpOrigins:a,credential_response:p.credential_response}})}catch(c){return Z(c)?{data:null,error:c}:{data:null,error:new un("Unexpected error in authenticate",c)}}}async _register({friendlyName:t,webauthn:{rpId:s=typeof window<"u"?window.location.hostname:void 0,rpOrigins:a=typeof window<"u"?[window.location.origin]:void 0,signal:l}={}},u){if(!s)return{data:null,error:new Ba("rpId is required for WebAuthn registration")};try{if(!Gl())return{data:null,error:new un("Browser does not support WebAuthn",null)};const{data:c,error:d}=await this._enroll({friendlyName:t});if(!c)return await this.client.mfa.listFactors().then(m=>{var y;return(y=m.data)===null||y===void 0?void 0:y.all.find(b=>b.factor_type==="webauthn"&&b.friendly_name===t&&b.status!=="unverified")}).then(m=>m?this.client.mfa.unenroll({factorId:m?.id}):void 0),{data:null,error:d};const{data:p,error:g}=await this._challenge({factorId:c.id,friendlyName:c.friendly_name,webauthn:{rpId:s,rpOrigins:a},signal:l},{create:u});return p?this._verify({factorId:c.id,challengeId:p.challengeId,webauthn:{rpId:s,rpOrigins:a,type:p.webauthn.type,credential_response:p.webauthn.credential_response}}):{data:null,error:g}}catch(c){return Z(c)?{data:null,error:c}:{data:null,error:new un("Unexpected error in register",c)}}}}uC();const SC={url:TO,storageKey:RO,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:AO,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1,throwOnError:!1,lockAcquireTimeout:5e3,skipAutoInitialize:!1,experimental:{}},ii={};class Ha{get jwks(){var t,s;return(s=(t=ii[this.storageKey])===null||t===void 0?void 0:t.jwks)!==null&&s!==void 0?s:{keys:[]}}set jwks(t){ii[this.storageKey]=Object.assign(Object.assign({},ii[this.storageKey]),{jwks:t})}get jwks_cached_at(){var t,s;return(s=(t=ii[this.storageKey])===null||t===void 0?void 0:t.cachedAt)!==null&&s!==void 0?s:Number.MIN_SAFE_INTEGER}set jwks_cached_at(t){ii[this.storageKey]=Object.assign(Object.assign({},ii[this.storageKey]),{cachedAt:t})}constructor(t){var s,a,l;this.userStorage=null,this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=null,this.autoRefreshTickTimeout=null,this.visibilityChangedCallback=null,this.refreshingDeferred=null,this._sessionRemovalEpoch=0,this.initializePromise=null,this.detectSessionInUrl=!0,this.hasCustomAuthorizationHeader=!1,this.suppressGetSessionWarning=!1,this.lock=null,this.lockAcquired=!1,this.pendingInLock=[],this.broadcastChannel=null,this.logger=console.log;const u=Object.assign(Object.assign({},SC),t);
53if(this.storageKey=u.storageKey,this.instanceID=(s=Ha.nextInstanceID[this.storageKey])!==null&&s!==void 0?s:0,Ha.nextInstanceID[this.storageKey]=this.instanceID+1,this.logDebugMessages=!!u.debug,typeof u.debug=="function"&&(this.logger=u.debug),this.instanceID>0&&_t()){const c=`${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(c),this.logDebugMessages&&console.trace(c)}if(this.persistSession=u.persistSession,this.autoRefreshToken=u.autoRefreshToken,this.experimental=(a=u.experimental)!==null&&a!==void 0?a:{},this.admin=new oC({url:u.url,headers:u.headers,fetch:u.fetch,experimental:this.experimental}),this.url=u.url,this.headers=u.headers,this.fetch=V0(u.fetch),this.detectSessionInUrl=u.detectSessionInUrl,this.flowType=u.flowType,this.hasCustomAuthorizationHeader=u.hasCustomAuthorizationHeader,this.throwOnError=u.throwOnError,this.lockAcquireTimeout=u.lockAcquireTimeout,u.lock!=null&&(this.lock=u.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 _C(this)},this.oauth={getAuthorizationDetails:this._getAuthorizationDetails.bind(this),approveAuthorization:this._approveAuthorization.bind(this),denyAuthorization:this._denyAuthorization.bind(this),listGrants:this._listOAuthGrants.bind(this),revokeGrant:this._revokeOAuthGrant.bind(this)},this.passkey={startRegistration:this._startPasskeyRegistration.bind(this),verifyRegistration:this._verifyPasskeyRegistration.bind(this),startAuthentication:this._startPasskeyAuthentication.bind(this),verifyAuthentication:this._verifyPasskeyAuthentication.bind(this),list:this._listPasskeys.bind(this),update:this._updatePasskey.bind(this),delete:this._deletePasskey.bind(this)},this.persistSession?(u.storage?this.storage=u.storage:G0()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=Wm(this.memoryStorage)),u.userStorage&&(this.userStorage=u.userStorage)):(this.memoryStorage={},this.storage=Wm(this.memoryStorage)),_t()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(c){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",c)}(l=this.broadcastChannel)===null||l===void 0||l.addEventListener("message",async c=>{this._debug("received broadcast notification from other tab or client",c);try{await this._notifyAllSubscribers(c.data.event,c.data.session,!1)}catch(d){this._debug("#broadcastChannel","error",d)}})}u.skipAutoInitialize||this.initialize().catch(c=>{this._debug("#initialize()","error",c)})}isThrowOnErrorEnabled(){return this.throwOnError}_returnResult(t){if(this.throwOnError&&t&&t.error)throw t.error;return t}_logPrefix(){return`GoTrueClient@${this.storageKey}:${this.instanceID} (${q0}) ${new Date().toISOString()}`}_debug(...t){return this.logDebugMessages&&this.logger(this._logPrefix(),...t),this}async initialize(){return this.initializePromise?await this.initializePromise:(this.initializePromise=(async()=>this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._initialize()):await this._initialize())(),await this.initializePromise)}async _initialize(){var t;try{let s={},a="none";if(_t()&&(s=qO(window.location.href),this._isImplicitGrantCallback(s)?a="implicit":await this._isPKCECallback(s)&&(a="pkce")),_t()&&this.detectSessionInUrl&&a!=="none"){const{data:l,error:u}=await this._getSessionFromURL(s,a);if(u){if(this._debug("#_initialize()","error detecting session from URL",u),jO(u)){const p=(t=u.details)===null||t===void 0?void 0:t.code;if(p==="identity_already_exists"||p==="identity_not_found"||p==="single_identity_not_deletable")return{error:u}}return{error:u}}const{session:c,redirectType:d}=l;return this._debug("#_initialize()","detected session in URL",c,"redirect type",d),await this._saveSession(c),setTimeout(async()=>{d==="recovery"?await this._notifyAllSubscribers("PASSWORD_RECOVERY",c):await this._notifyAllSubscribers("SIGNED_IN",c)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(s){return Z(s)?this._returnResult({error:s}):this._returnResult({error:new un("Unexpected error during initialization",s)})}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(t){var s,a,l;try{const u=await te(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:(a=(s=t?.options)===null||s===void 0?void 0:s.data)!==null&&a!==void 0?a:{},gotrue_meta_security:{captcha_token:(l=t?.options)===null||l===void 0?void 0:l.captchaToken}},xform:en}),{data:c,error:d}=u;if(d||!c)return this._returnResult({data:{user:null,session:null},error:d});const p=c.session,g=c.user;return c.session&&(await this._saveSession(c.session),await this._notifyAllSubscribers("SIGNED_IN",p)),this._returnResult({data:{user:g,session:p},error:null})}catch(u){if(Z(u))return this._returnResult({data:{user:null,session:null},error:u});throw u}}async signUp(t){var s,a,l;try{let u;if("email"in t){const{email:m,password:y,options:b}=t;let _=null,w=null;this.flowType==="pkce"&&([_,w]=await rs(this.storage,this.storageKey)),u=await te(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:b?.emailRedirectTo,body:{email:m,password:y,data:(s=b?.data)!==null&&s!==void 0?s:{},gotrue_meta_security:{captcha_token:b?.captchaToken},code_challenge:_,code_challenge_method:w},xform:en})}else if("phone"in t){const{phone:m,password:y,options:b}=t;u=await te(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:m,password:y,data:(a=b?.data)!==null&&a!==void 0?a:{},channel:(l=b?.channel)!==null&&l!==void 0?l:"sms",gotrue_meta_security:{captcha_token:b?.captchaToken}},xform:en})}else throw new wl("You must provide either an email or phone number and a password");const{data:c,error:d}=u;if(d||!c)return await Xe(this.storage,`${this.storageKey}-code-verifier`),this._returnResult({data:{user:null,session:null},error:d});const p=c.session,g=c.user;return c.session&&(await this._saveSession(c.session),await this._notifyAllSubscribers("SIGNED_IN",p)),this._returnResult({data:{user:g,session:p},error:null})}catch(u){if(await Xe(this.storage,`${this.storageKey}-code-verifier`),Z(u))return this._returnResult({data:{user:null,session:null},error:u});throw u}}async signInWithPassword(t){try{let s;if("email"in t){const{email:u,password:c,options:d}=t;s=await te(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:u,password:c,gotrue_meta_security:{captcha_token:d?.captchaToken}},xform:Xm})}else if("phone"in t){const{phone:u,password:c,options:d}=t;s=await te(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:u,password:c,gotrue_meta_security:{captcha_token:d?.captchaToken}},xform:Xm})}else throw new wl("You must provide either an email or phone number and a password");const{data:a,error:l}=s;if(l)return this._returnResult({data:{user:null,session:null},error:l});if(!a||!a.session||!a.user){const u=new si;return this._returnResult({data:{user:null,session:null},error:u})}return a.session&&(await this._saveSession(a.session),await this._notifyAllSubscribers("SIGNED_IN",a.session)),this._returnResult({data:Object.assign({user:a.user,session:a.session},a.weak_password?{weakPassword:a.weak_password}:null),error:l})}catch(s){if(Z(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}}async signInWithOAuth(t){var s,a,l,u;return await this._handleProviderSignIn(t.provider,{redirectTo:(s=t.options)===null||s===void 0?void 0:s.redirectTo,scopes:(a=t.options)===null||a===void 0?void 0:a.scopes,queryParams:(l=t.options)===null||l===void 0?void 0:l.queryParams,skipBrowserRedirect:(u=t.options)===null||u===void 0?void 0:u.skipBrowserRedirect})}async exchangeCodeForSession(t){return await this.initializePromise,this.lock!=null?this._acquireLock(this.lockAcquireTimeout,async()=>this._exchangeCodeForSession(t)):this._exchangeCodeForSession(t)}async signInWithWeb3(t){const{chain:s}=t;switch(s){case"ethereum":return await this.signInWithEthereum(t);case"solana":return await this.signInWithSolana(t);default:throw new Error(`@supabase/auth-js: Unsupported chain "${s}"`)}}async signInWithEthereum(t){var s,a,l,u,c,d,p,g,m,y,b;let _,w;if("message"in t)_=t.message,w=t.signature;else{const{chain:A,wallet:R,statement:O,options:U}=t;let j;if(_t())if(typeof R=="object")j=R;else{const J=window;if("ethereum"in J&&typeof J.ethereum=="object"&&"request"in J.ethereum&&typeof J.ethereum.request=="function")j=J.ethereum;else throw new Error("@supabase/auth-js: No compatible Ethereum wallet interface on the window object (window.ethereum) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'ethereum', wallet: resolvedUserWallet }) instead.")}else{if(typeof R!="object"||!U?.url)throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");j=R}const L=new URL((s=U?.url)!==null&&s!==void 0?s:window.location.href),Q=await j.request({method:"eth_requestAccounts"}).then(J=>J).catch(()=>{throw new Error("@supabase/auth-js: Wallet method eth_requestAccounts is missing or invalid")});if(!Q||Q.length===0)throw new Error("@supabase/auth-js: No accounts available. Please ensure the wallet is connected.");const V=K0(Q[0]);let q=(a=U?.signInWithEthereum)===null||a===void 0?void 0:a.chainId;if(!q){const J=await j.request({method:"eth_chainId"});q=cC(J)}const K={domain:L.host,address:V,statement:O,uri:L.href,version:"1",chainId:q,nonce:(l=U?.signInWithEthereum)===null||l===void 0?void 0:l.nonce,issuedAt:(c=(u=U?.signInWithEthereum)===null||u===void 0?void 0:u.issuedAt)!==null&&c!==void 0?c:new Date,expirationTime:(d=U?.signInWithEthereum)===null||d===void 0?void 0:d.expirationTime,notBefore:(p=U?.signInWithEthereum)===null||p===void 0?void 0:p.notBefore,requestId:(g=U?.signInWithEthereum)===null||g===void 0?void 0:g.requestId,resources:(m=U?.signInWithEthereum)===null||m===void 0?void 0:m.resources};_=fC(K),w=await j.request({method:"personal_sign",params:[hC(_),V]})}try{const{data:A,error:R}=await te(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"ethereum",message:_,signature:w},!((y=t.options)===null||y===void 0)&&y.captchaToken?{gotrue_meta_security:{captcha_token:(b=t.options)===null||b===void 0?void 0:b.captchaToken}}:null),xform:en});if(R)throw R;if(!A||!A.session||!A.user){const O=new si;return this._returnResult({data:{user:null,session:null},error:O})}
53return A.session&&(await this._saveSession(A.session),await this._notifyAllSubscribers("SIGNED_IN",A.session)),this._returnResult({data:Object.assign({},A),error:R})}catch(A){if(Z(A))return this._returnResult({data:{user:null,session:null},error:A});throw A}}async signInWithSolana(t){var s,a,l,u,c,d,p,g,m,y,b,_;let w,A;if("message"in t)w=t.message,A=t.signature;else{const{chain:R,wallet:O,statement:U,options:j}=t;let L;if(_t())if(typeof O=="object")L=O;else{const V=window;if("solana"in V&&typeof V.solana=="object"&&("signIn"in V.solana&&typeof V.solana.signIn=="function"||"signMessage"in V.solana&&typeof V.solana.signMessage=="function"))L=V.solana;else throw new Error("@supabase/auth-js: No compatible Solana wallet interface on the window object (window.solana) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'solana', wallet: resolvedUserWallet }) instead.")}else{if(typeof O!="object"||!j?.url)throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");L=O}const Q=new URL((s=j?.url)!==null&&s!==void 0?s:window.location.href);if("signIn"in L&&L.signIn){const V=await L.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},j?.signInWithSolana),{version:"1",domain:Q.host,uri:Q.href}),U?{statement:U}:null));let q;if(Array.isArray(V)&&V[0]&&typeof V[0]=="object")q=V[0];else if(V&&typeof V=="object"&&"signedMessage"in V&&"signature"in V)q=V;else throw new Error("@supabase/auth-js: Wallet method signIn() returned unrecognized value");if("signedMessage"in q&&"signature"in q&&(typeof q.signedMessage=="string"||q.signedMessage instanceof Uint8Array)&&q.signature instanceof Uint8Array)w=typeof q.signedMessage=="string"?q.signedMessage:new TextDecoder().decode(q.signedMessage),A=q.signature;else throw new Error("@supabase/auth-js: Wallet method signIn() API returned object without signedMessage and signature fields")}else{if(!("signMessage"in L)||typeof L.signMessage!="function"||!("publicKey"in L)||typeof L!="object"||!L.publicKey||!("toBase58"in L.publicKey)||typeof L.publicKey.toBase58!="function")throw new Error("@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API");w=[`${Q.host} wants you to sign in with your Solana account:`,L.publicKey.toBase58(),...U?["",U,""]:[""],"Version: 1",`URI: ${Q.href}`,`Issued At: ${(l=(a=j?.signInWithSolana)===null||a===void 0?void 0:a.issuedAt)!==null&&l!==void 0?l:new Date().toISOString()}`,...!((u=j?.signInWithSolana)===null||u===void 0)&&u.notBefore?[`Not Before: ${j.signInWithSolana.notBefore}`]:[],...!((c=j?.signInWithSolana)===null||c===void 0)&&c.expirationTime?[`Expiration Time: ${j.signInWithSolana.expirationTime}`]:[],...!((d=j?.signInWithSolana)===null||d===void 0)&&d.chainId?[`Chain ID: ${j.signInWithSolana.chainId}`]:[],...!((p=j?.signInWithSolana)===null||p===void 0)&&p.nonce?[`Nonce: ${j.signInWithSolana.nonce}`]:[],...!((g=j?.signInWithSolana)===null||g===void 0)&&g.requestId?[`Request ID: ${j.signInWithSolana.requestId}`]:[],...!((y=(m=j?.signInWithSolana)===null||m===void 0?void 0:m.resources)===null||y===void 0)&&y.length?["Resources",...j.signInWithSolana.resources.map(q=>`- ${q}`)]:[]].join(`
54`);const V=await L.signMessage(new TextEncoder().encode(w),"utf8");if(!V||!(V instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");A=V}}try{const{data:R,error:O}=await te(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:w,signature:us(A)},!((b=t.options)===null||b===void 0)&&b.captchaToken?{gotrue_meta_security:{captcha_token:(_=t.options)===null||_===void 0?void 0:_.captchaToken}}:null),xform:en});if(O)throw O;if(!R||!R.session||!R.user){const U=new si;return this._returnResult({data:{user:null,session:null},error:U})}return R.session&&(await this._saveSession(R.session),await this._notifyAllSubscribers("SIGNED_IN",R.session)),this._returnResult({data:Object.assign({},R),error:O})}catch(R){if(Z(R))return this._returnResult({data:{user:null,session:null},error:R});throw R}}async _exchangeCodeForSession(t){const s=await $n(this.storage,`${this.storageKey}-code-verifier`),[a,l]=(s??"").split("/");try{if(!a&&this.flowType==="pkce")throw new MO;const{data:u,error:c}=await te(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:t,code_verifier:a},xform:en});if(await Xe(this.storage,`${this.storageKey}-code-verifier`),c)throw c;if(!u||!u.session||!u.user){const d=new si;return this._returnResult({data:{user:null,session:null,redirectType:null},error:d})}return u.session&&(await this._saveSession(u.session),await this._notifyAllSubscribers(l==="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",u.session)),this._returnResult({data:Object.assign(Object.assign({},u),{redirectType:l??null}),error:c})}catch(u){if(await Xe(this.storage,`${this.storageKey}-code-verifier`),Z(u))return this._returnResult({data:{user:null,session:null,redirectType:null},error:u});throw u}}async signInWithIdToken(t){try{const{options:s,provider:a,token:l,access_token:u,nonce:c}=t,d=await te(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:a,id_token:l,access_token:u,nonce:c,gotrue_meta_security:{captcha_token:s?.captchaToken}},xform:en}),{data:p,error:g}=d;if(g)return this._returnResult({data:{user:null,session:null},error:g});if(!p||!p.session||!p.user){const m=new si;return this._returnResult({data:{user:null,session:null},error:m})}return p.session&&(await this._saveSession(p.session),await this._notifyAllSubscribers("SIGNED_IN",p.session)),this._returnResult({data:p,error:g})}catch(s){if(Z(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}}async signInWithOtp(t){var s,a,l,u,c;try{if("email"in t){const{email:d,options:p}=t;let g=null,m=null;this.flowType==="pkce"&&([g,m]=await rs(this.storage,this.storageKey));const{error:y}=await te(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:d,data:(s=p?.data)!==null&&s!==void 0?s:{},create_user:(a=p?.shouldCreateUser)!==null&&a!==void 0?a:!0,gotrue_meta_security:{captcha_token:p?.captchaToken},code_challenge:g,code_challenge_method:m},redirectTo:p?.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:y})}if("phone"in t){const{phone:d,options:p}=t,{data:g,error:m}=await te(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:d,data:(l=p?.data)!==null&&l!==void 0?l:{},create_user:(u=p?.shouldCreateUser)!==null&&u!==void 0?u:!0,gotrue_meta_security:{captcha_token:p?.captchaToken},channel:(c=p?.channel)!==null&&c!==void 0?c:"sms"}});return this._returnResult({data:{user:null,session:null,messageId:g?.message_id},error:m})}throw new wl("You must provide either an email or phone number.")}catch(d){if(await Xe(this.storage,`${this.storageKey}-code-verifier`),Z(d))return this._returnResult({data:{user:null,session:null},error:d});throw d}}async verifyOtp(t){var s,a;try{let l,u;"options"in t&&(l=(s=t.options)===null||s===void 0?void 0:s.redirectTo,u=(a=t.o
54ptions)===null||a===void 0?void 0:a.captchaToken);const{data:c,error:d}=await te(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},t),{gotrue_meta_security:{captcha_token:u}}),redirectTo:l,xform:en});if(d)throw d;if(!c)throw new Error("An error occurred on token verification.");const p=c.session,g=c.user;return p?.access_token&&(await this._saveSession(p),await this._notifyAllSubscribers(t.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",p)),this._returnResult({data:{user:g,session:p},error:null})}catch(l){if(Z(l))return this._returnResult({data:{user:null,session:null},error:l});throw l}}async signInWithSSO(t){var s,a,l,u,c;try{let d=null,p=null;this.flowType==="pkce"&&([d,p]=await rs(this.storage,this.storageKey));const g=await te(this.fetch,"POST",`${this.url}/sso`,{body:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},"providerId"in t?{provider_id:t.providerId}:null),"domain"in t?{domain:t.domain}:null),{redirect_to:(a=(s=t.options)===null||s===void 0?void 0:s.redirectTo)!==null&&a!==void 0?a:void 0}),!((l=t?.options)===null||l===void 0)&&l.captchaToken?{gotrue_meta_security:{captcha_token:t.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:d,code_challenge_method:p}),headers:this.headers,xform:sC});return!((u=g.data)===null||u===void 0)&&u.url&&_t()&&!(!((c=t.options)===null||c===void 0)&&c.skipBrowserRedirect)&&window.location.assign(g.data.url),this._returnResult(g)}catch(d){if(await Xe(this.storage,`${this.storageKey}-code-verifier`),Z(d))return this._returnResult({data:null,error:d});throw d}}async reauthenticate(){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._reauthenticate()):await this._reauthenticate()}async _reauthenticate(){try{return await this._useSession(async t=>{const{data:{session:s},error:a}=t;if(a)throw a;if(!s)throw new ut;const{error:l}=await te(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:s.access_token});return this._returnResult({data:{user:null,session:null},error:l})})}catch(t){if(Z(t))return this._returnResult({data:{user:null,session:null},error:t});throw t}}async resend(t){try{const s=`${this.url}/resend`;if("email"in t){const{email:a,type:l,options:u}=t;let c=null,d=null;this.flowType==="pkce"&&([c,d]=await rs(this.storage,this.storageKey));const{error:p}=await te(this.fetch,"POST",s,{headers:this.headers,body:{email:a,type:l,gotrue_meta_security:{captcha_token:u?.captchaToken},code_challenge:c,code_challenge_method:d},redirectTo:u?.emailRedirectTo});return p&&await Xe(this.storage,`${this.storageKey}-code-verifier`),this._returnResult({data:{user:null,session:null},error:p})}else if("phone"in t){const{phone:a,type:l,options:u}=t,{data:c,error:d}=await te(this.fetch,"POST",s,{headers:this.headers,body:{phone:a,type:l,gotrue_meta_security:{captcha_token:u?.captchaToken}}});return this._returnResult({data:{user:null,session:null,messageId:c?.message_id},error:d})}throw new wl("You must provide either an email or phone number and a type")}catch(s){if(await Xe(this.storage,`${this.storageKey}-code-verifier`),Z(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}}async getSession(){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>this._useSession(async t=>t)):await this._useSession(async t=>t)}async _acquireLock(t,s){this._debug("#_acquireLock","begin",t);try{if(this.lockAcquired){const a=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),l=(async()=>(await a,await s()))();return this.pendingInLock.push((async()=>{try{await l}catch{}})()),l}return await this.lock(`lock:${this.storageKey}`,t,async()=>{this._debug("#_acquireLock","lock acquired for storage key",this.storageKey);try{this.lockAcquired=!0;const a=s();for(this.pendingInLock.push((async()=>{try{await a}catch{}})()),await a;this.pendingInLock.length;){const l=[...this.pendingInLock];await Promise.all(l),this.pendingInLock.splice(0,l.length)}return await a}finally{this._debug("#_acquireLock","lock released for storage key",this.storageKey),this.lockAcquired=!1}})}finally{this._debug("#_acquireLock","end")}}async _useSession(t){this._debug("#_useSession","begin");try{const s=await this.__loadSession();return await t(s)}finally{this._debug("#_useSession","end")}}async __loadSession(){this._debug("#__loadSession()","begin"),this.lock!=null&&!this.lockAcquired&&this._debug("#__loadSession()","used outside of an acquired lock!",new Error().stack);try{let t=null;const s=await $n(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",s),s!==null&&(this._isValidSession(s)?t=s:(this._debug("#getSession()","session from storage is not val
54id"),await this._removeSession())),!t)return{data:{session:null},error:null};const a=t.expires_at?t.expires_at*1e3-Date.now()<Hh:!1;if(this._debug("#__loadSession()",`session has${a?"":" not"} expired`,"expires_at",t.expires_at),!a){if(this.userStorage){const c=await $n(this.userStorage,this.storageKey+"-user");c?.user?t.user=c.user:t.user=Ih()}if(this.storage.isServer&&t.user&&!t.user.__isUserNotAvailableProxy){const c={value:this.suppressGetSessionWarning};t.user=eC(t.user,c),c.value&&(this.suppressGetSessionWarning=!0)}return{data:{session:t},error:null}}const{data:l,error:u}=await this._callRefreshToken(t.refresh_token);return u?this._returnResult({data:{session:null},error:u}):this._returnResult({data:{session:l},error:null})}finally{this._debug("#__loadSession()","end")}}async getUser(t){if(t)return await this._getUser(t);await this.initializePromise;let s;return this.lock!=null?s=await this._acquireLock(this.lockAcquireTimeout,async()=>await this._getUser()):s=await this._getUser(),s.data.user&&(this.suppressGetSessionWarning=!0),s}async _getUser(t){try{return t?await te(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:t,xform:Ar}):await this._useSession(async s=>{var a,l,u;const{data:c,error:d}=s;if(d)throw d;return!(!((a=c.session)===null||a===void 0)&&a.access_token)&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new ut}:await te(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:(u=(l=c.session)===null||l===void 0?void 0:l.access_token)!==null&&u!==void 0?u:void 0,xform:Ar})})}catch(s){if(Z(s))return Sl(s)&&(await this._removeSession(),await Xe(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({data:{user:null},error:s});throw s}}async updateUser(t,s={}){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._updateUser(t,s)):await this._updateUser(t,s)}async _updateUser(t,s={}){try{return await this._useSession(async a=>{const{data:l,error:u}=a;if(u)throw u;if(!l.session)throw new ut;const c=l.session;let d=null,p=null;this.flowType==="pkce"&&t.email!=null&&([d,p]=await rs(this.storage,this.storageKey));const{data:g,error:m}=await te(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:s?.emailRedirectTo,body:Object.assign(Object.assign({},t),{code_challenge:d,code_challenge_method:p}),jwt:c.access_token,xform:Ar});if(m)throw m;return c.user=g.user,await this._saveSession(c),await this._notifyAllSubscribers("USER_UPDATED",c),this._returnResult({data:{user:c.user},error:null})})}catch(a){if(await Xe(this.storage,`${this.storageKey}-code-verifier`),Z(a))return this._returnResult({data:{user:null},error:a});throw a}}async setSession(t){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._setSession(t)):await this._setSession(t)}async _setSession(t){try{if(!t.access_token||!t.refresh_token)throw new ut;const s=Date.now()/1e3;let a=s,l=!0,u=null;const{payload:c}=Tl(t.access_token);if(c.exp&&(a=c.exp,l=a<=s),l){const{data:d,error:p}=await this._callRefreshToken(t.refresh_token);if(p)return this._returnResult({data:{user:null,session:null},error:p});if(!d)return{data:{user:null,session:null},error:null};u=d}else{const{data:d,error:p}=await this._getUser(t.access_token);if(p)return this._returnResult({data:{user:null,session:null},error:p});u={access_token:t.access_token,refresh_token:t.refresh_token,user:d.user,token_type:"bearer",expires_in:a-s,expires_at:a},await this._saveSession(u),await this._notifyAllSubscribers("SIGNED_IN",u)}return this._returnResult({data:{user:u.user,session:u},error:null})}catch(s){if(Z(s))return this._returnResult({data:{session:null,user:null},error:s});throw s}}async refreshSession(t){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._refreshSession(t)):await this._refreshSession(t)}async _refreshSession(t){try{return await this._useSession(async s=>{var a;if(!t){const{data:c,error:d}=s;if(d)throw d;t=(a=c.session)!==null&&a!==void 0?a:void 0}if(!t?.refresh_token)throw new ut;const{data:l,error:u}=await this._callRefreshToken(t.refresh_token);return u?this._returnResult({data:{user:null,session:null},error:u}):l?this._returnResult({data:{user:l.user,session:l},error:null}):this._returnResult({data:{user:null,session:null},error:null})})}catch(s){if(Z(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}}async _getSessionFromURL(t,s){var a;try{if(!_t())throw new El("No browser detected.");
54if(t.error||t.error_description||t.error_code)throw new El(t.error_description||"Error in URL with unspecified error_description",{error:t.error||"unspecified_error",code:t.error_code||"unspecified_code"});switch(s){case"implicit":if(this.flowType==="pkce")throw new $m("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new El("Not a valid implicit grant flow url.");break;default:}if(s==="pkce"){if(this._debug("#_initialize()","begin","is PKCE flow",!0),!t.code)throw new $m("No code detected.");const{data:j,error:L}=await this._exchangeCodeForSession(t.code);if(L)throw L;const Q=new URL(window.location.href);return Q.searchParams.delete("code"),window.history.replaceState(window.history.state,"",Q.toString()),{data:{session:j.session,redirectType:(a=j.redirectType)!==null&&a!==void 0?a:null},error:null}}const{provider_token:l,provider_refresh_token:u,access_token:c,refresh_token:d,expires_in:p,expires_at:g,token_type:m}=t;if(!c||!p||!d||!m)throw new El("No session defined in URL");const y=Math.round(Date.now()/1e3),b=parseInt(p);let _=y+b;g&&(_=parseInt(g));const w=_-y;w*1e3<=wr&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${w}s, should have been closer to ${b}s`);const A=_-b;y-A>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",A,_,y):y-A<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",A,_,y);const{data:R,error:O}=await this._getUser(c);if(O)throw O;const U={provider_token:l,provider_refresh_token:u,access_token:c,expires_in:b,expires_at:_,refresh_token:d,token_type:m,user:R.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),this._returnResult({data:{session:U,redirectType:t.type},error:null})}catch(l){if(Z(l))return this._returnResult({data:{session:null,redirectType:null},error:l});throw l}}_isImplicitGrantCallback(t){return typeof this.detectSessionInUrl=="function"?this.detectSessionInUrl(new URL(window.location.href),t):!!(t.access_token||t.error||t.error_description||t.error_code)}async _isPKCECallback(t){const s=await $n(this.storage,`${this.storageKey}-code-verifier`);return!!(t.code&&s)}async signOut(t={scope:"global"}){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._signOut(t)):await this._signOut(t)}async _signOut({scope:t}={scope:"global"}){return await this._useSession(async s=>{var a;const{data:l,error:u}=s;if(u&&!Sl(u))return this._returnResult({error:u});const c=(a=l.session)===null||a===void 0?void 0:a.access_token;if(c){const{error:d}=await this.admin.signOut(c,t);if(d&&!(kO(d)&&(d.status===404||d.status===401||d.status===403)||Sl(d)))return this._returnResult({error:d})}return t!=="others"&&(await this._removeSession(),await Xe(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({error:null})})}onAuthStateChange(t){const s=HO(),a={id:s,callback:t,unsubscribe:()=>{this._debug("#unsubscribe()","state change callback with id removed",s),this.stateChangeEmitters.delete(s)}};return this._debug("#onAuthStateChange()","registered callback with id",s),this.stateChangeEmitters.set(s,a),(async()=>(await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>{this._emitInitialSession(s)}):await this._emitInitialSession(s)))(),{data:{subscription:a}}}async _emitInitialSession(t){return await this._useSession(async s=>{var a,l;try{const{data:{session:u},error:c}=s;if(c)throw c;await((a=this.stateChangeEmitters.get(t))===null||a===void 0?void 0:a.callback("INITIAL_SESSION",u)),this._debug("INITIAL_SESSION","callback id",t,"session",u)}catch(u){await((l=this.stateChangeEmitters.get(t))===null||l===void 0?void 0:l.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",t,"error",u),Sl(u)?console.warn(u):console.error(u)}})}async resetPasswordForEmail(t,s={}){let a=null,l=null;this.flowType==="pkce"&&([a,l]=await rs(this.storage,this.storageKey,!0));try{return await te(this.fetch,"POST",`${this.url}/recover`,{body:{email:t,code_challenge:a,code_challenge_method:l,gotrue_meta_security:{captcha_token:s.captchaToken}},headers:this.headers,redirectTo:s.redirectTo})}catch(u){if(await Xe(this.storage,`${this.storageKey}-code-verifier`),Z(u))return this._returnResult({data:null,error:u});throw u}}async getUserIdentities(){var t;try{const{data:s,error:a}=await this.getUser();if(a)throw a;return this._returnResult({data:{identities:(t=s.user.identities)!==null&&t!==void 0?t:[]},error:null})}catch(s){if(Z(s))return this._returnResult({data:null,error:s});throw s}}async linkIdentity(t){return"token"in t?this.linkIdentityIdToken(t):this.linkIdentityOAuth(t)}async linkIdentityOAuth(t){var s;try{const{data:a,error:l}=await this._useSession(async u=>{var c,d,p,g,m;
54const{data:y,error:b}=u;if(b)throw b;const _=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,t.provider,{redirectTo:(c=t.options)===null||c===void 0?void 0:c.redirectTo,scopes:(d=t.options)===null||d===void 0?void 0:d.scopes,queryParams:(p=t.options)===null||p===void 0?void 0:p.queryParams,skipBrowserRedirect:!0});return await te(this.fetch,"GET",_,{headers:this.headers,jwt:(m=(g=y.session)===null||g===void 0?void 0:g.access_token)!==null&&m!==void 0?m:void 0})});if(l)throw l;return _t()&&!(!((s=t.options)===null||s===void 0)&&s.skipBrowserRedirect)&&window.location.assign(a?.url),this._returnResult({data:{provider:t.provider,url:a?.url},error:null})}catch(a){if(Z(a))return this._returnResult({data:{provider:t.provider,url:null},error:a});throw a}}async linkIdentityIdToken(t){return await this._useSession(async s=>{var a;try{const{error:l,data:{session:u}}=s;if(l)throw l;const{options:c,provider:d,token:p,access_token:g,nonce:m}=t,y=await te(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,jwt:(a=u?.access_token)!==null&&a!==void 0?a:void 0,body:{provider:d,id_token:p,access_token:g,nonce:m,link_identity:!0,gotrue_meta_security:{captcha_token:c?.captchaToken}},xform:en}),{data:b,error:_}=y;return _?this._returnResult({data:{user:null,session:null},error:_}):!b||!b.session||!b.user?this._returnResult({data:{user:null,session:null},error:new si}):(b.session&&(await this._saveSession(b.session),await this._notifyAllSubscribers("USER_UPDATED",b.session)),this._returnResult({data:b,error:_}))}catch(l){if(await Xe(this.storage,`${this.storageKey}-code-verifier`),Z(l))return this._returnResult({data:{user:null,session:null},error:l});throw l}})}async unlinkIdentity(t){try{return await this._useSession(async s=>{var a,l;const{data:u,error:c}=s;if(c)throw c;return await te(this.fetch,"DELETE",`${this.url}/user/identities/${t.identity_id}`,{headers:this.headers,jwt:(l=(a=u.session)===null||a===void 0?void 0:a.access_token)!==null&&l!==void 0?l:void 0})})}catch(s){if(Z(s))return this._returnResult({data:null,error:s});throw s}}async _refreshAccessToken(t){const s="#_refreshAccessToken()";this._debug(s,"begin");try{const a=Date.now();return await GO(async l=>(l>0&&await $O(200*Math.pow(2,l-1)),this._debug(s,"refreshing attempt",l),await te(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:t},headers:this.headers,xform:en})),(l,u)=>{const c=200*Math.pow(2,l);return u&&qh(u)&&Date.now()+c-a<wr})}catch(a){if(this._debug(s,"error",a),Z(a))return this._returnResult({data:{session:null,user:null},error:a});throw a}finally{this._debug(s,"end")}}_isValidSession(t){return typeof t=="object"&&t!==null&&"access_token"in t&&"refresh_token"in t&&"expires_at"in t}async _handleProviderSignIn(t,s){const a=await this._getUrlForProvider(`${this.url}/authorize`,t,{redirectTo:s.redirectTo,scopes:s.scopes,queryParams:s.queryParams});return this._debug("#_handleProviderSignIn()","provider",t,"options",s,"url",a),_t()&&!s.skipBrowserRedirect&&window.location.assign(a),{data:{provider:t,url:a},error:null}}async _recoverAndRefresh(){var t,s;const a="#_recoverAndRefresh()";this._debug(a,"begin");try{const l=await $n(this.storage,this.storageKey);if(l&&this.userStorage){let c=await $n(this.userStorage,this.storageKey+"-user");!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!c&&(c={user:l.user},await ui(this.userStorage,this.storageKey+"-user",c)),l.user=(t=c?.user)!==null&&t!==void 0?t:Ih()}else if(l&&!l.user&&!l.user){const c=await $n(this.storage,this.storageKey+"-user");c&&c?.user?(l.user=c.user,await Xe(this.storage,this.storageKey+"-user"),await ui(this.storage,this.storageKey,l)):l.user=Ih()}if(this._debug(a,"session from storage",l),!this._isValidSession(l)){this._debug(a,"session is not valid"),l!==null&&await this._removeSession();return}const u=((s=l.expires_at)!==null&&s!==void 0?s:1/0)*1e3-Date.now()<Hh;if(this._debug(a,`session has${u?"":" not"} expired with margin of ${Hh}s`),u){if(this.autoRefreshToken&&l.refresh_token){const{error:c}=await this._callRefreshToken(l.refresh_token);c&&(UO(c)?this._debug(a,"refresh discarded by commit guard",c):(this._debug(a,"refresh failed",c),qh(c)||(this._debug(a,"refresh failed with a non-retryable error, remov
54ing the session",c),await this._removeSession())))}}else if(l.user&&l.user.__isUserNotAvailableProxy===!0)try{const{data:c,error:d}=await this._getUser(l.access_token);!d&&c?.user?(l.user=c.user,await this._saveSession(l),await this._notifyAllSubscribers("SIGNED_IN",l)):this._debug(a,"could not get user data, skipping SIGNED_IN notification")}catch(c){console.error("Error getting user data:",c),this._debug(a,"error getting user data, skipping SIGNED_IN notification",c)}else await this._notifyAllSubscribers("SIGNED_IN",l)}catch(l){this._debug(a,"error",l),console.error(l);return}finally{this._debug(a,"end")}}async _callRefreshToken(t){var s,a;if(!t)throw new ut;if(this.refreshingDeferred)return this.refreshingDeferred.promise;const l="#_callRefreshToken()";this._debug(l,"begin");try{this.refreshingDeferred=new iu;const u=await $n(this.storage,this.storageKey),{data:c,error:d}=await this._refreshAccessToken(t);if(d)throw d;if(!c.session)throw new ut;const p=await $n(this.storage,this.storageKey);if(u!==null&&(p===null||p.refresh_token!==u.refresh_token)){this._debug(l,"commit guard: storage changed since refresh started, discarding rotated tokens",{startedWith:"present",nowHolds:p?"replaced":"cleared"});const b={data:null,error:new Gm};return this.refreshingDeferred.resolve(b),b}const m=this._sessionRemovalEpoch;if(await this._saveSession(c.session),this._sessionRemovalEpoch!==m){this._debug(l,"commit guard (post-save): _removeSession ran during _saveSession, undoing write"),await Xe(this.storage,this.storageKey),this.userStorage&&await Xe(this.userStorage,this.storageKey+"-user");const b={data:null,error:new Gm};return this.refreshingDeferred.resolve(b),b}await this._notifyAllSubscribers("TOKEN_REFRESHED",c.session);const y={data:c.session,error:null};return this.refreshingDeferred.resolve(y),y}catch(u){if(this._debug(l,"error",u),Z(u)){const c={data:null,error:u};return qh(u)||await this._removeSession(),(s=this.refreshingDeferred)===null||s===void 0||s.resolve(c),c}throw(a=this.refreshingDeferred)===null||a===void 0||a.reject(u),u}finally{this.refreshingDeferred=null,this._debug(l,"end")}}async _notifyAllSubscribers(t,s,a=!0){const l=`#_notifyAllSubscribers(${t})`;this._debug(l,"begin",s,`broadcast = ${a}`);try{this.broadcastChannel&&a&&this.broadcastChannel.postMessage({event:t,session:s});const u=[],c=Array.from(this.stateChangeEmitters.values()).map(async d=>{try{await d.callback(t,s)}catch(p){u.push(p)}});if(await Promise.all(c),u.length>0){for(let d=0;d<u.length;d+=1)console.error(u[d]);throw u[0]}}finally{this._debug(l,"end")}}async _saveSession(t){this._debug("#_saveSession()",t),this.suppressGetSessionWarning=!0,await Xe(this.storage,`${this.storageKey}-code-verifier`);const s=Object.assign({},t),a=s.user&&s.user.__isUserNotAvailableProxy===!0;if(this.userStorage){!a&&s.user&&await ui(this.userStorage,this.storageKey+"-user",{user:s.user});const l=Object.assign({},s);delete l.user;const u=Qm(l);await ui(this.storage,this.storageKey,u)}else{const l=Qm(s);await ui(this.storage,this.storageKey,l)}}async _removeSession(){this._sessionRemovalEpoch+=1,this._debug("#_removeSession()"),this.suppressGetSessionWarning=!1,await Xe(this.storage,this.storageKey),await Xe(this.storage,this.storageKey+"-code-verifier"),await Xe(this.storage,this.storageKey+"-user"),this.userStorage&&await Xe(this.userStorage,this.storageKey+"-user"),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const t=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{t&&_t()&&window?.removeEventListener&&window.removeEventListener("visibilitychange",t)}catch(s){console.error("removing visibilitychange callback failed",s)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const t=setInterval(()=>this._autoRefreshTokenTick(),wr);this.autoRefreshTicker=t,t&&typeof t=="object"&&typeof t.unref=="function"?t.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(t);const s=setTimeout(async()=>{await this.initializePromise,await this._autoRefreshTokenTick()},0);this.autoRefreshTickTimeout=s,s&&typeof s=="object"&&typeof s.unref=="function"?s.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(s)}async _stopAutoRefresh(){this._debug("#_stopAutoRefresh()");const t=this.autoRefreshTicker;this.autoRefreshTicker=null,t&&clearInterval(t);const s=this.autoRefreshTickTimeout;this.autoRefreshTickTimeout=null,s&&clearTimeout(s)}async startAutoRefresh(){this._removeVisibilityChangedCallback(),await this._startAutoRefresh()}async stopAutoRefresh(){this._removeVisibilityChangedCallback(),await this._stopAutoRefresh()}async dispose(){var t;this._removeVisibilityChangedCallback(),await this._stopAutoRefresh(),(t=this.broadcastChannel)===null||t===void 0||t.close(),this.broadcastChannel=null,this.stateChangeEmitters.clear()}async _autoRefreshTokenTick(){if(this._debug("#_autoRefreshTokenTick()","begin"),this.lock!=null){try{await this._acquireLock(0,async()=>{try{const t=Date.now();try{return await this._useSession(async s=>{const{data:{session:a}}=s;if(!a||!a.refresh_token||!a.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const l=Math.floor((a.expires_at*1e3-t)/wr);this._debug("#_autoRefreshTokenTick()",`access token expires in ${l} ticks, a tick lasts ${wr}ms, refresh threshold is ${Ta} ticks`),l<=Ta&&await this._callRefreshToken(a.refresh_token)})}catch(s){console.error("Auto refresh tick failed with error. This is likely a transient error.",s
54)}}finally{this._debug("#_autoRefreshTokenTick()","end")}})}catch(t){if(t instanceof lC)this._debug("auto refresh token tick lock not available");else throw t}return}if(this.refreshingDeferred!==null){this._debug("#_autoRefreshTokenTick()","refresh already in flight, skipping");return}try{const t=Date.now();try{await this._useSession(async s=>{const{data:{session:a}}=s;if(!a||!a.refresh_token||!a.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const l=Math.floor((a.expires_at*1e3-t)/wr);this._debug("#_autoRefreshTokenTick()",`access token expires in ${l} ticks, a tick lasts ${wr}ms, refresh threshold is ${Ta} ticks`),l<=Ta&&await this._callRefreshToken(a.refresh_token)})}catch(s){console.error("Auto refresh tick failed with error. This is likely a transient error.",s)}}finally{this._debug("#_autoRefreshTokenTick()","end")}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!_t()||!window?.addEventListener)return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=async()=>{try{await this._onVisibilityChanged(!1)}catch(t){this._debug("#visibilityChangedCallback","error",t)}},window?.addEventListener("visibilitychange",this.visibilityChangedCallback),await this._onVisibilityChanged(!0)}catch(t){console.error("_handleVisibilityChange",t)}}async _onVisibilityChanged(t){const s=`#_onVisibilityChanged(${t})`;if(this._debug(s,"visibilityState",document.visibilityState),document.visibilityState==="visible"){if(this.autoRefreshToken&&this._startAutoRefresh(),!t)if(await this.initializePromise,this.lock!=null)await this._acquireLock(this.lockAcquireTimeout,async()=>{if(document.visibilityState!=="visible"){this._debug(s,"acquired the lock to recover the session, but the browser visibilityState is no longer visible, aborting");return}await this._recoverAndRefresh()});else{if(document.visibilityState!=="visible"){this._debug(s,"visibilityState is no longer visible, skipping recovery");return}await this._recoverAndRefresh()}}else document.visibilityState==="hidden"&&this.autoRefreshToken&&this._stopAutoRefresh()}async _getUrlForProvider(t,s,a){const l=[`provider=${encodeURIComponent(s)}`];if(a?.redirectTo&&l.push(`redirect_to=${encodeURIComponent(a.redirectTo)}`),a?.scopes&&l.push(`scopes=${encodeURIComponent(a.scopes)}`),this.flowType==="pkce"){const[u,c]=await rs(this.storage,this.storageKey),d=new URLSearchParams({code_challenge:`${encodeURIComponent(u)}`,code_challenge_method:`${encodeURIComponent(c)}`});l.push(d.toString())}if(a?.queryParams){const u=new URLSearchParams(a.queryParams);l.push(u.toString())}return a?.skipBrowserRedirect&&l.push(`skip_http_redirect=${a.skipBrowserRedirect}`),`${t}?${l.join("&")}`}async _unenroll(t){try{return await this._useSession(async s=>{var a;const{data:l,error:u}=s;return u?this._returnResult({data:null,error:u}):await te(this.fetch,"DELETE",`${this.url}/factors/${t.factorId}`,{headers:this.headers,jwt:(a=l?.session)===null||a===void 0?void 0:a.access_token})})}catch(s){if(Z(s))return this._returnResult({data:null,error:s});throw s}}async _enroll(t){try{return await this._useSession(async s=>{var a,l;const{data:u,error:c}=s;if(c)return this._returnResult({data:null,error:c});const d=Object.assign({friendly_name:t.friendlyName,factor_type:t.factorType},t.factorType==="phone"?{phone:t.phone}:t.factorType==="totp"?{issuer:t.issuer}:{}),{data:p,error:g}=await te(this.fetch,"POST",`${this.url}/factors`,{body:d,headers:this.headers,jwt:(a=u?.session)===null||a===void 0?void 0:a.access_token});return g?this._returnResult({data:null,error:g}):(t.factorType==="totp"&&p.type==="totp"&&(!((l=p?.totp)===null||l===void 0)&&l.qr_code)&&(p.totp.qr_code=`data:image/svg+xml;utf-8,${p.totp.qr_code}`),this._returnResult({data:p,error:null}))})}catch(s){if(Z(s))return this._returnResult({data:null,error:s});throw s}}async _verify(t){const s=async()=>{try{return await this._useSession(async a=>{var l;const{data:u,error:c}=a;if(c)return this._returnResult({data:null,error:c});const d=Object.assign({challenge_id:t.challengeId},"webauthn"in t?{webauthn:Object.assign(Object.assign({},t.webauthn),{credential_response:t.webauthn.type==="create"?nv(t.webauthn.credential_response):rv(t.webauthn.credential_response)})}:{code:t.code}),{data:p,error:g}=await te(this.fetch,"POST",`${this.url}/factors/${t.factorId}/verify`,{body:d,headers:this.headers,jwt:(l=u?.session)===null||l===void 0?void 0:l.access_token});return g?this._returnResult({data:null,error:g}):(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+p.expires_in},p)),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",p),this._returnResult({data:p,error:g}))})}catch(a){if(Z(a))return this._returnResult({data:null,error:a});throw a}};return this.lock!=null?this._acquireLock(this.lockAcquireTimeout,s):s()}async _challenge(t){const s=async()=>{try{return await this._useSession(async a=>{var l;const{data:u,error:c}=a;if(c)return this._returnResult({data:null,error:c});const d=await te(this.fetch,"POST",`${this.url}/factors/${t.factorId}/challenge`,{body:t,headers:this.headers,jwt:(l=u?.session)===null||l===void 0?void 0:l.access_token});if(d.error)return d;const{data:p}=d;if(p.type!=="webauthn")return{data:p,error:null};switch(p.webauthn.type){case"create":return{data:Object.assign(Object.assign({},p),{webauthn:Object.assign(Object.assign({},p.webauthn),{credential_options:Object.assign(Object.assign({},p.webauthn.credential_options),{publicKey:ev(p.webauthn.credential_options.publicKey)})})}),error:null};case"request":return{data:Object.assign(Object.assign({},p),{webauthn:Object.assign(Object.assign({},p.webauthn),{credential_options:Object.assign(Object.assign({},p.webauthn.credential_options),{publicKey:tv(p.webauthn.credential_options.publicKey)})})}),error:null}}})}catch(a){if(Z(a))return this._returnResult({data:null,error:a});throw a}};return this.lock!=null?this._acquireLock(this.lockAcquireTimeout,s):s()}async _challengeAndVerify(t){const{data:s,error:a}=await this._challenge({factorId:t.factorId});return a?this._returnResult({data:null,error:a}):await this._verify({factorId:t.factorId,challengeId:s.id,code:t.code})}async _listFactors(){var t;const{data:{user:s},error:a}=await this.getUser();if(a)return{data:null,error:a};const l={all:[],phone:[],totp:[],webauthn:[]};for(const u of(t=s?.factors)!==null&&t!==void 0?t:[])l.all.push(u),u.status==="verified"&&l[u.factor_type].push(u);return{data:l,error:null}}async _getAuthenticatorAssuranceLevel(t){var s,a,l,u;if(t)try{const{payload:_}=Tl(t);let w=null;_.aal&&(w=_.aal);let A=w;const{data:{user:R},error:O}=await this.getUser(t);if(O)return this._returnResult({data:null,error:O});((a=(s=R?.factors)===null||s===void 0?void 0:s.filter(L=>L.status==="verified"))!==null&&a!==void 0?a:[]).length>0&&(A="aal2");const j=_.amr||[];return{data:{currentLevel:w,nextLevel:A,currentAuthenticationMethods:j},error:null}}catch(_){if(Z(_))return this._returnResult({data:null,error:_});throw _}const{data:{session:c},error:d}
54=await this.getSession();if(d)return this._returnResult({data:null,error:d});if(!c)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const{payload:p}=Tl(c.access_token);let g=null;p.aal&&(g=p.aal);let m=g;((u=(l=c.user.factors)===null||l===void 0?void 0:l.filter(_=>_.status==="verified"))!==null&&u!==void 0?u:[]).length>0&&(m="aal2");const b=p.amr||[];return{data:{currentLevel:g,nextLevel:m,currentAuthenticationMethods:b},error:null}}async _getAuthorizationDetails(t){try{return await this._useSession(async s=>{const{data:{session:a},error:l}=s;return l?this._returnResult({data:null,error:l}):a?await te(this.fetch,"GET",`${this.url}/oauth/authorizations/${t}`,{headers:this.headers,jwt:a.access_token,xform:u=>({data:u,error:null})}):this._returnResult({data:null,error:new ut})})}catch(s){if(Z(s))return this._returnResult({data:null,error:s});throw s}}async _approveAuthorization(t,s){try{return await this._useSession(async a=>{const{data:{session:l},error:u}=a;if(u)return this._returnResult({data:null,error:u});if(!l)return this._returnResult({data:null,error:new ut});const c=await te(this.fetch,"POST",`${this.url}/oauth/authorizations/${t}/consent`,{headers:this.headers,jwt:l.access_token,body:{action:"approve"},xform:d=>({data:d,error:null})});return c.data&&c.data.redirect_url&&_t()&&!s?.skipBrowserRedirect&&window.location.assign(c.data.redirect_url),c})}catch(a){if(Z(a))return this._returnResult({data:null,error:a});throw a}}async _denyAuthorization(t,s){try{return await this._useSession(async a=>{const{data:{session:l},error:u}=a;if(u)return this._returnResult({data:null,error:u});if(!l)return this._returnResult({data:null,error:new ut});const c=await te(this.fetch,"POST",`${this.url}/oauth/authorizations/${t}/consent`,{headers:this.headers,jwt:l.access_token,body:{action:"deny"},xform:d=>({data:d,error:null})});return c.data&&c.data.redirect_url&&_t()&&!s?.skipBrowserRedirect&&window.location.assign(c.data.redirect_url),c})}catch(a){if(Z(a))return this._returnResult({data:null,error:a});throw a}}async _listOAuthGrants(){try{return await this._useSession(async t=>{const{data:{session:s},error:a}=t;return a?this._returnResult({data:null,error:a}):s?await te(this.fetch,"GET",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:s.access_token,xform:l=>({data:l,error:null})}):this._returnResult({data:null,error:new ut})})}catch(t){if(Z(t))return this._returnResult({data:null,error:t});throw t}}async _revokeOAuthGrant(t){try{return await this._useSession(async s=>{const{data:{session:a},error:l}=s;return l?this._returnResult({data:null,error:l}):a?(await te(this.fetch,"DELETE",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:a.access_token,query:{client_id:t.clientId},noResolveJson:!0}),{data:{},error:null}):this._returnResult({data:null,error:new ut})})}catch(s){if(Z(s))return this._returnResult({data:null,error:s});throw s}}async fetchJwk(t,s={keys:[]}){let a=s.keys.find(d=>d.kid===t);if(a)return a;const l=Date.now();if(a=this.jwks.keys.find(d=>d.kid===t),a&&this.jwks_cached_at+CO>l)return a;const{data:u,error:c}=await te(this.fetch,"GET",`${this.url}/.well-known/jwks.json`,{headers:this.headers});if(c)throw c;return!u.keys||u.keys.length===0||(this.jwks=u,this.jwks_cached_at=l,a=u.keys.find(d=>d.kid===t),!a)?null:a}async getClaims(t,s={}){try{let a=t;if(!a){const{data:_,error:w}
54=await this.getSession();if(w||!_.session)return this._returnResult({data:null,error:w});a=_.session.access_token}const{header:l,payload:u,signature:c,raw:{header:d,payload:p}}=Tl(a);if(!s?.allowExpired)try{XO(u.exp)}catch(_){throw new ql(_ instanceof Error?_.message:"JWT validation failed")}const g=!l.alg||l.alg.startsWith("HS")||!l.kid||!("crypto"in globalThis&&"subtle"in globalThis.crypto)?null:await this.fetchJwk(l.kid,s?.keys?{keys:s.keys}:s?.jwks);if(!g){const{error:_}=await this.getUser(a);if(_)throw _;return{data:{claims:u,header:l,signature:c},error:null}}const m=ZO(l.alg),y=await crypto.subtle.importKey("jwk",g,m,!0,["verify"]);if(!await crypto.subtle.verify(m,y,c,PO(`${d}.${p}`)))throw new ql("Invalid JWT signature");return{data:{claims:u,header:l,signature:c},error:null}}catch(a){if(Z(a))return this._returnResult({data:null,error:a});throw a}}async signInWithPasskey(t){var s,a,l;an(this.experimental);try{if(!Gl())return this._returnResult({data:null,error:new un("Browser does not support WebAuthn",null)});const{data:u,error:c}=await this._startPasskeyAuthentication({options:{captchaToken:(s=t?.options)===null||s===void 0?void 0:s.captchaToken}});if(c||!u)return this._returnResult({data:null,error:c});const d=tv(u.options),p=(l=(a=t?.options)===null||a===void 0?void 0:a.signal)!==null&&l!==void 0?l:pf.createNewAbortSignal(),{data:g,error:m}=await Q0({publicKey:d,signal:p});if(m||!g)return this._returnResult({data:null,error:m??new un("WebAuthn ceremony failed",null)});const y=rv(g);return this._verifyPasskeyAuthentication({challengeId:u.challenge_id,credential:y})}catch(u){if(Z(u))return this._returnResult({data:null,error:u});throw u}}async registerPasskey(t){var s,a;an(this.experimental);try{if(!Gl())return this._returnResult({data:null,error:new un("Browser does not support WebAuthn",null)});const{data:l,error:u}=await this._startPasskeyRegistration();if(u||!l)return this._returnResult({data:null,error:u});const c=ev(l.options),d=(a=(s=t?.options)===null||s===void 0?void 0:s.signal)!==null&&a!==void 0?a:pf.createNewAbortSignal(),{data:p,error:g}=await F0({publicKey:c,signal:d});if(g||!p)return this._returnResult({data:null,error:g??new un("WebAuthn ceremony failed",null)});const m=nv(p);return this._verifyPasskeyRegistration({challengeId:l.challenge_id,credential:m})}catch(l){if(Z(l))return this._returnResult({data:null,error:l});throw l}}async _startPasskeyRegistration(){an(this.experimental);try{return await this._useSession(async t=>{const{data:{session:s},error:a}=t;if(a)return this._returnResult({data:null,error:a});if(!s)return this._returnResult({data:null,error:new ut});const{data:l,error:u}=await te(this.fetch,"POST",`${this.url}/passkeys/registration/options`,{headers:this.headers,jwt:s.access_token,body:{}});return u?this._returnResult({data:null,error:u}):this._returnResult({data:l,error:null})})}catch(t){if(Z(t))return this._returnResult({data:null,error:t});throw t}}async _verifyPasskeyRegistration(t){an(this.experimental);try{return await this._useSession(async s=>{const{data:{session:a},error:l}=s;if(l)return this._returnResult({data:null,error:l});if(!a)return this._returnResult({data:null,error:new ut});const{data:u,error:c}=await te(this.fetch,"POST",`${this.url}/passkeys/registration/verify`,{headers:this.headers,jwt:a.access_token,body:{challenge_id:t.challengeId,credential:t.credential}});return c?this._returnResult({data:null,error:c}):this._returnResult({data:u,error:null})})}catch(s){if(Z(s))return this._returnResult({data:null,error:s});throw s}}async _startPasskeyAuthentication(t){var s;an(this.experimental);try{const{data:a,error:l}=await te(this.fetch,"POST",`${this.url}/passkeys/authentication/options`,{headers:this.headers,body:{gotrue_meta_security:{captcha_token:(s=t?.options)===null||s===void 0?void 0:s.captchaToken}}});return l?this._returnResult({data:null,error:l}):this._returnResult({data:a,error:null})}catch(a){if(Z(a))return this._returnResult({data:null,error:a});throw a}}async _verifyPasskeyAuthentication(t){an(this.experimental);try{const{data:s,error:a}=await te(this.fetch,"POST",`${this.url}/passkeys/authentication/verify`,{headers:this.headers,body:{challenge_id:t.challengeId,credential:t.credential},xform:en});return a?this._returnResult({data:null,error:a}):(s.session&&(await this._saveSession(s.session),await this._notifyAllSubscribers("SIGNED_IN",s.session)),this._returnResult({data:s,error:null}))}catch(s){if(Z(s))return this._returnResult({data:null,error:s});throw s}}async _listPasskeys(){an(this.experimental);try{return await this._useSession(async t=>{const{data:{session:s},error:a}=t;if(a)return this._returnResult({data:null,error:a});if(!s)return this._returnResult({data:null,error:new ut});const{data:l,error:u}=await te(this.fetch,"GET",`${this.url}/passkeys`,{headers:this.headers,jwt:s.access_token,xform:c=>({data:c,error:null})});return u?this._returnResult({data:null,error:u}):this._returnResult({data:l,error:null})})}catch(t){if(Z(t))return this._returnResult({data:null,error:t});throw t}}async _updatePasskey(t){an(this.experimental);try{return await this._useSession(async s=>{const{data:{session:a},error:l}=s;if(l)return this._returnResult({data:null,error:l});if(!a)return this._returnResult({data:null,error:new ut});const{data:u,error:c}=await te(this.fetch,"PATCH",`${this.url}/passkeys/${t.passkeyId}`,{headers:this.headers,jwt:a.access_token,body:{friendly_name:t.friendlyName}});return c?this._returnResult({data:null,error:c}):this._returnResult({data:u,error:null})})}catch(s){if(Z(s))return this._returnResult({data:null,error:s});throw s}}async _deletePasskey(t){an(this.experimental);try{return await this._useSession(async s=>{const{data:{session:a},error:l}=s;if(l)return this._returnResult({data:null,error:l});if(!a)return this._returnResult({data:null,error:new ut});const{error:u}
54=await te(this.fetch,"DELETE",`${this.url}/passkeys/${t.passkeyId}`,{headers:this.headers,jwt:a.access_token,noResolveJson:!0});return u?this._returnResult({data:null,error:u}):this._returnResult({data:null,error:null})})}catch(s){if(Z(s))return this._returnResult({data:null,error:s});throw s}}}Ha.nextInstanceID={};const wC=Ha,EC="2.108.1";let Ra="",Kl;if(typeof Deno<"u"){var Gh;Ra="deno",Kl=(Gh=Deno.version)===null||Gh===void 0?void 0:Gh.deno}else if(typeof document<"u")Ra="web";else if(typeof navigator<"u"&&navigator.product==="ReactNative")Ra="react-native";else{var Vh;Ra="node",Kl=typeof process<"u"?(Vh=process.version)===null||Vh===void 0?void 0:Vh.replace(/^v/,""):void 0}const J0=[`runtime=${Ra}`];Kl&&J0.push(`runtime-version=${Kl}`);const TC={"X-Client-Info":`supabase-js/${EC}; ${J0.join("; ")}`},RC={headers:TC},AC={schema:"public"},OC={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},CC={},xC={enabled:!1,respectSamplingDecision:!0};function kC(e,t,s,a){function l(u){return u instanceof s?u:new s(function(c){c(u)})}return new(s||(s=Promise))(function(u,c){function d(m){try{g(a.next(m))}catch(y){c(y)}}function p(m){try{g(a.throw(m))}catch(y){c(y)}}function g(m){m.done?u(m.value):l(m.value).then(d,p)}g((a=a.apply(e,[])).next())})}let Kh=null;const jC="@opentelemetry/api";function MC(){return Kh===null&&(Kh=import(jC).catch(()=>null)),Kh}function UC(){return kC(this,void 0,void 0,function*(){try{const e=yield MC();if(!e||!e.propagation||!e.context)return null;const t={};e.propagation.inject(e.context.active(),t);const s=t.traceparent;return s?{traceparent:s,tracestate:t.tracestate,baggage:t.baggage}:null}catch{return null}})}function DC(e){if(!e||typeof e!="string")return null;const t=e.split("-");if(t.length!==4)return null;const[s,a,l,u]=t;if(s.length!==2||a.length!==32||l.length!==16||u.length!==2)return null;const c=/^[0-9a-f]+$/i;return!c.test(s)||!c.test(a)||!c.test(l)||!c.test(u)||a==="00000000000000000000000000000000"||l==="0000000000000000"?null:{version:s,traceId:a,parentId:l,traceFlags:u,isSampled:(parseInt(u,16)&1)===1}}function NC(e,t){if(!e||!t||t.length===0)return!1;let s;if(e instanceof URL)s=e;else try{s=new URL(e)}catch{return!1}for(const a of t)try{if(typeof a=="string"){if(LC(s.hostname,a))return!0}else if(a instanceof RegExp){if(a.test(s.hostname))return!0}else if(typeof a=="function"&&a(s))return!0}catch{continue}return!1}function LC(e,t){if(t===e)return!0;if(t.startsWith("*.")){const s=t.slice(2);if(e.endsWith(s)&&(e===s||e.endsWith("."+s)))return!0}return!1}function zC(e){const t=[];try{const s=new URL(e);t.push(s.hostname)}catch{}return t.push("*.supabase.co","*.supabase.in"),t.push("localhost","127.0.0.1","[::1]"),t}function qa(e){"@babel/helpers - typeof";return qa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},qa(e)}function PC(e,t){if(qa(e)!="object"||!e)return e;var s=e[Symbol.toPrimitive];if(s!==void 0){var a=s.call(e,t);if(qa(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function BC(e){var t=PC(e,"string");return qa(t)=="symbol"?t:t+""}function HC(e,t,s){return(t=BC(t))in e?Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[t]=s,e}function sv(e,t){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(l){return Object.getOwnPropertyDescriptor(e,l).enumerable})),s.push.apply(s,a)}return s}function Ke(e){for(var t=1;t<arguments.length;t++){var s=arguments[t]!=null?arguments[t]:{};t%2?sv(Object(s),!0).forEach(function(a){HC(e,a,s[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(s)):sv(Object(s)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(s,a))})}return e}const qC=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),IC=()=>Headers,$C=(e,t,s,a,l)=>{const u=qC(a),c=IC(),d=l?.enabled===!0,p=l?.respectSamplingDecision!==!1,g=d?zC(t):null;return async(m,y)=>{var b;const _=(b=await s())!==null&&b!==void 0?b:e;let w=new c(y?.headers);if(w.has("apikey")||w.set("apikey",e),w.has("Authorization")||w.set("Authorization",`Bearer ${_}`),g){const A=await GC(m,g,p);A&&(A.traceparent&&!w.has("traceparent")&&w.set("traceparent",A.traceparent),A.tracestate&&!w.has("tracestate")&&w.set("tracestate",A.tracestate),A.baggage&&!w.has("baggage")&&w.set("baggage",A.baggage))}return u(m,Ke(Ke({},y),{},{headers:w}))}};async function GC(e,t,s){if(!NC(typeof e=="string"||e instanceof URL?e:e.url,t))return null;const a=await UC();if(!a||!a.traceparent)return null;if(s){const l=DC(a.traceparent);if(l&&!l.isSampled)return null}return a}function iv(e){return typeof e=="boolean"?{enabled:e}:e}function VC(e){return e.endsWith("/")?e:e+"/"}function KC(e,t){var s,a,l,u,c,d;const{db:p,auth:g,realtime:m,global:y}=e,{db:b,auth:_,realtime:w,global:A}=t,R=iv(e.tracePropagation),O=iv(t.tracePropagation),U={db:Ke(Ke({},b),p),auth:Ke(Ke({},_),g),realtime:Ke(Ke({},w),m),storage:{},global:Ke(Ke(Ke({},A),y),{},{headers:Ke(Ke({},(s=A?.headers)!==null&&s!==void 0?s:{}),(a=y?.headers)!==null&&a!==void 0?a:{})}),tracePropagation:{enabled:(l=(u=R?.enabled)!==null&&u!==void 0?u:O?.enabled)!==null&&l!==void 0?l:!1,respectSamplingDecision:(c=(d=R?.respectSamplingDecision)!==null&&d!==void 0?d:O?.respectSamplingDecision)!==null&&c!==void 0?c:!0},accessToken:async()=>""};return e.accessToken?U.accessToken=e.accessToken:delete U.accessToken,U}function YC(e){const t=e?.trim();if(!t)throw new Error("supabaseUrl is required.");
54if(!t.match(/^https?:\/\//i))throw new Error("Invalid supabaseUrl: Must be a valid HTTP or HTTPS URL.");try{return new URL(VC(t))}catch{throw Error("Invalid supabaseUrl: Provided URL is malformed.")}}var FC=class extends wC{constructor(e){super(e)}},QC=class{constructor(e,t,s){var a,l;this.supabaseUrl=e,this.supabaseKey=t;const u=YC(e);if(!t)throw new Error("supabaseKey is required.");this.realtimeUrl=new URL("realtime/v1",u),this.realtimeUrl.protocol=this.realtimeUrl.protocol.replace("http","ws"),this.authUrl=new URL("auth/v1",u),this.storageUrl=new URL("storage/v1",u),this.functionsUrl=new URL("functions/v1",u);const c=`sb-${u.hostname.split(".")[0]}-auth-token`,d={db:AC,realtime:CC,auth:Ke(Ke({},OC),{},{storageKey:c}),global:RC,tracePropagation:xC},p=KC(s??{},d);if(this.settings=p,this.storageKey=(a=p.auth.storageKey)!==null&&a!==void 0?a:"",this.headers=(l=p.global.headers)!==null&&l!==void 0?l:{},p.accessToken)this.accessToken=p.accessToken,this.auth=new Proxy({},{get:(m,y)=>{throw new Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(y)} is not possible`)}});else{var g;this.auth=this._initSupabaseAuthClient((g=p.auth)!==null&&g!==void 0?g:{},this.headers,p.global.fetch)}this.fetch=$C(t,e,this._getAccessToken.bind(this),p.global.fetch,p.tracePropagation),this.realtime=this._initRealtimeClient(Ke({headers:this.headers,accessToken:this._getAccessToken.bind(this),fetch:this.fetch},p.realtime)),this.accessToken&&Promise.resolve(this.accessToken()).then(m=>this.realtime.setAuth(m)).catch(m=>console.warn("Failed to set initial Realtime auth token:",m)),this.rest=new c1(new URL("rest/v1",u).href,{headers:this.headers,schema:p.db.schema,fetch:this.fetch,timeout:p.db.timeout,urlLengthLimit:p.db.urlLengthLimit}),this.storage=new EO(this.storageUrl.href,this.headers,this.fetch,s?.storage),p.accessToken||this._listenForAuthEvents()}get functions(){return new t1(this.functionsUrl.href,{headers:this.headers,customFetch:this.fetch})}from(e){return this.rest.from(e)}schema(e){return this.rest.schema(e)}rpc(e,t={},s={head:!1,get:!1,count:void 0}){return this.rest.rpc(e,t,s)}channel(e,t={config:{}}){return this.realtime.channel(e,t)}getChannels(){return this.realtime.getChannels()}removeChannel(e){return this.realtime.removeChannel(e)}removeAllChannels(){return this.realtime.removeAllChannels()}async _getAccessToken(){var e=this,t,s;if(e.accessToken)return await e.accessToken();const{data:a}=await e.auth.getSession();return(t=(s=a.session)===null||s===void 0?void 0:s.access_token)!==null&&t!==void 0?t:e.supabaseKey}_initSupabaseAuthClient({autoRefreshToken:e,persistSession:t,detectSessionInUrl:s,storage:a,userStorage:l,storageKey:u,flowType:c,lock:d,debug:p,throwOnError:g,experimental:m,lockAcquireTimeout:y,skipAutoInitialize:b},_,w){const A={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new FC({url:this.authUrl.href,headers:Ke(Ke({},A),_),storageKey:u,autoRefreshToken:e,persistSession:t,detectSessionInUrl:s,storage:a,userStorage:l,flowType:c,lock:d,debug:p,throwOnError:g,experimental:m,fetch:w,lockAcquireTimeout:y,skipAutoInitialize:b,hasCustomAuthorizationHeader:Object.keys(this.headers).some(R=>R.toLowerCase()==="authorization")})}_initRealtimeClient(e){return new K1(this.realtimeUrl.href,Ke(Ke({},e),{},{params:Ke(Ke({},{apikey:this.supabaseKey}),e?.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((e,t)=>{this._handleTokenChanged(e,"CLIENT",t?.access_token)})}_handleTokenChanged(e,t,s){(e==="TOKEN_REFRESHED"||e==="SIGNED_IN")&&this.changedAccessToken!==s?(this.changedAccessToken=s,this.realtime.setAuth(s)):e==="SIGNED_OUT"&&(this.realtime.setAuth(),t=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}};const JC=(e,t,s)=>new QC(e,t,s);function XC(){if(typeof window<"u")return!1;const e=globalThis.process;if(!e)return!1;const t=e.version;if(t==null)return!1;const s=t.match(/^v(\d+)\./);return s?parseInt(s[1],10)<=18:!1}XC()&&console.warn("⚠️  Node.js 18 and below are deprecated and will no longer be supported in future versions of @supabase/supabase-js. Please upgrade to N
54ode.js 20 or later. For more information, visit: https://github.com/orgs/supabase/discussions/37217");function ZC(){return JC("https://blyswtnnankswqkaknkd.supabase.co","sb_publishable_TUJegwuwUjqH9oSp3qd1lw_eKqhQaMm",{auth:{storage:typeof window<"u"?localStorage:void 0,persistSession:!0,autoRefreshToken:!0}})}let Yh;const WC=new Proxy({},{get(e,t,s){return Yh||(Yh=ZC()),Reflect.get(Yh,t,s)}}),ex=ls({type:"function"}).client(async({next:e})=>{const{data:t}=await WC.auth.getSession(),s=t.session?.access_token;return e({headers:s?{Authorization:`Bearer ${s}`}:{}})}),tx=ls(),av=XA(()=>({functionMiddleware:[ex],requestMiddleware:[tx]}));var au=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},nx=class extends au{#e;#n;#t;constructor(){super(),this.#t=e=>{if(typeof window<"u"&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#n||this.setEventListener(this.#t)}onUnsubscribe(){this.hasListeners()||(this.#n?.(),this.#n=void 0)}setEventListener(e){this.#t=e,this.#n?.(),this.#n=e(t=>{typeof t=="boolean"?this.setFocused(t):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},X0=new nx,rx={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},sx=class{#e=rx;#n=!1;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}},gf=new sx;function ix(e){setTimeout(e,0)}var ax=typeof window>"u"||"Deno"in globalThis;function ln(){}function ox(e,t){return typeof e=="function"?e(t):e}function lx(e){return typeof e=="number"&&e>=0&&e!==1/0}function ux(e,t){return Math.max(e+(t||0)-Date.now(),0)}function yf(e,t){return typeof e=="function"?e(t):e}function cx(e,t){return typeof e=="function"?e(t):e}function ov(e,t){const{type:s="all",exact:a,fetchStatus:l,predicate:u,queryKey:c,stale:d}=e;if(c){if(a){if(t.queryHash!==Mf(c,t.options))return!1}else if(!$a(t.queryKey,c))return!1}if(s!=="all"){const p=t.isActive();if(s==="active"&&!p||s==="inactive"&&p)return!1}return!(typeof d=="boolean"&&t.isStale()!==d||l&&l!==t.state.fetchStatus||u&&!u(t))}function lv(e,t){const{exact:s,status:a,predicate:l,mutationKey:u}=e;if(u){if(!t.options.mutationKey)return!1;if(s){if(Ia(t.options.mutationKey)!==Ia(u))return!1}else if(!$a(t.options.mutationKey,u))return!1}return!(a&&t.state.status!==a||l&&!l(t))}function Mf(e,t){return(t?.queryKeyHashFn||Ia)(e)}function Ia(e){return JSON.stringify(e,(t,s)=>mf(s)?Object.keys(s).sort().reduce((a,l)=>(a[l]=s[l],a),{}):s)}function $a(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(s=>$a(e[s],t[s])):!1}var hx=Object.prototype.hasOwnProperty;function Z0(e,t,s=0){if(e===t)return e;if(s>500)return t;const a=uv(e)&&uv(t);if(!a&&!(mf(e)&&mf(t)))return t;const u=(a?e:Object.keys(e)).length,c=a?t:Object.keys(t),d=c.length,p=a?new Array(d):{};let g=0;for(let m=0;m<d;m++){const y=a?m:c[m],b=e[y],_=t[y];if(b===_){p[y]=b,(a?m<u:hx.call(e,y))&&g++;continue}if(b===null||_===null||typeof b!="object"||typeof _!="object"){p[y]=_;continue}const w=Z0(b,_,s+1);p[y]=w,w===b&&g++}return u===d&&g===u?e:p}function uv(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function mf(e){if(!cv(e))return!1;const t=e.constructor;if(t===void 0)return!0;const s=t.prototype;return!(!cv(s)||!s.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function cv(e){return Object.prototype.toString.call(e)==="[object Object]"}function fx(e){return new Promise(t=>{gf.setTimeout(t,e)})}function dx(e,t,s){return typeof s.structuralSharing=="function"?s.structuralSharing(e,t):s.structuralSharing!==!1?Z0(e,t):t}function px(e,t,s=0){const a=[...e,t];return s&&a.length>s?a.slice(1):a}function gx(e,t,s=0){const a=[t,...e];return s&&a.length>s?a.slice(0,-1):a}var Uf=Symbol();function W0(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===Uf?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function yx(e,t,s){let a=!1,l;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(l??=t(),a||(a=!0,l.aborted?s():l.addEventListener("abort",s,{once:!0})),l)}),e}var eb=(()=>{let e=()=>ax;return{isServer(){return e()},setIsServer(t){e=t}}})();function mx(){let e,t;const s=new Promise((l,u)=>{e=l,t=u});s.status="pending",s.catch(()=>{});function a(l){Object.assign(s,l),delete s.resolve,delete s.reject}return s.resolve=l=>{a({status:"fulfilled",value:l}),e(l)},s.reject=l=>{a({status:"rejected",reason:l}),t(l)},s}var vx=ix;function bx(){let e=[],t=0,s=d=>{d()},a=d=>{d()},l=vx;const u=d=>{t?e.push(d):l(()=>{s(d)})},c=()=>{const d=e;e=[],d.length&&l(()=>{a(()=>{d.forEach(p=>{s(p)})})})};return{batch:d=>{let p;t++;try{p=d()}finally{t--,t||c()}return p},batchCalls:d=>(...p)=>{u(()=>{d(...p)})},schedule:u,setNotifyFunction:d=>{s=d},setBatchNotifyFunction:d=>{a=d},setScheduler:d=>{l=d}}}var wt=bx(),_x=class extends au{#e=!0;#n;#t;constructor(){super(),this.#t=e=>{if(typeof window<"u"&&window.addEventListener){const t=()=>e(!0),s=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",s,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",s)}}}}onSubscribe(){this.#n||this.setEventListener(this.#t)}onUnsubscribe(){this.hasListeners()||(this.#n?.(),this.#n=void 0)}setEventListener(e){this.#t=e,this.#n?.(),this.#n=e(this.setOnline.bind(this))}
vendor: 21,218 bytes, line 54
54setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(s=>{s(e)}))}isOnline(){return this.#e}},Yl=new _x;function Sx(e){return Math.min(1e3*2**e,3e4)}function tb(e){return(e??"online")==="online"?Yl.isOnline():!0}var vf=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function nb(e){let t=!1,s=0,a;const l=mx(),u=()=>l.status!=="pending",c=A=>{if(!u()){const R=new vf(A);b(R),e.onCancel?.(R)}},d=()=>{t=!0},p=()=>{t=!1},g=()=>X0.isFocused()&&(e.networkMode==="always"||Yl.isOnline())&&e.canRun(),m=()=>tb(e.networkMode)&&e.canRun(),y=A=>{u()||(a?.(),l.resolve(A))},b=A=>{u()||(a?.(),l.reject(A))},_=()=>new Promise(A=>{a=R=>{(u()||g())&&A(R)},e.onPause?.()}).then(()=>{a=void 0,u()||e.onContinue?.()}),w=()=>{if(u())return;let A;const R=s===0?e.initialPromise:void 0;try{A=R??e.fn()}catch(O){A=Promise.reject(O)}Promise.resolve(A).then(y).catch(O=>{if(u())return;const U=e.retry??(eb.isServer()?0:3),j=e.retryDelay??Sx,L=typeof j=="function"?j(s,O):j,Q=U===!0||typeof U=="number"&&s<U||typeof U=="function"&&U(s,O);if(t||!Q){b(O);return}s++,e.onFail?.(s,O),fx(L).then(()=>g()?void 0:_()).then(()=>{t?b(O):w()})})};return{promise:l,status:()=>l.status,cancel:c,continue:()=>(a?.(),l),cancelRetry:d,continueRetry:p,canStart:m,start:()=>(m()?w():_().then(w),l)}}var rb=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),lx(this.gcTime)&&(this.#e=gf.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(eb.isServer()?1/0:300*1e3))}clearGcTimeout(){this.#e!==void 0&&(gf.clearTimeout(this.#e),this.#e=void 0)}},wx=class extends rb{#e;#n;#t;#s;#r;#i;#a;constructor(e){super(),this.#a=!1,this.#i=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#s=e.client,this.#t=this.#s.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=fv(this.options),this.state=e.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#r?.promise}setOptions(e){if(this.options={...this.#i,...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const t=fv(this.options);t.data!==void 0&&(this.setState(hv(t.data,t.dataUpdatedAt)),this.#e=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#t.remove(this)}setData(e,t){const s=dx(this.state.data,e,this.options);return this.#o({data:s,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),s}setState(e,t){this.#o({type:"setState",state:e,setStateOptions:t})}cancel(e){const t=this.#r?.promise;return this.#r?.cancel(e),t?t.then(ln).catch(ln):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#e}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>cx(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Uf||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>yf(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!ux(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(t=>t.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#r?.continue()}onOnline(){this.observers.find(t=>t.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#r?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#t.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#r&&(this.#a||this.#l()?this.#r.cancel({revert:!0}):this.#r.cancelRetry()),this.scheduleGc()),this.#t.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}#l(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"}invalidate(){this.state.isInvalidated||this.#o({type:"invalidate"})}async fetch(e,t){if(this.state.fetchStatus!=="idle"&&this.#r?.status()!=="rejected"){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#r)return this.#r.continueRetry(),this.#r.promise}if(e&&this.setOptions(e),!this.options.queryFn){const d=this.observers.find(p=>p.options.queryFn);d&&this.setOptions(d.options)}const s=new AbortController,a=d=>{Object.defineProperty(d,"signal",{enumerable:!0,get:()=>(this.#a=!0,s.signal)})},l=()=>{const d=W0(this.options,t),g=(()=>{const m={client:this.#s,queryKey:this.queryKey,meta:this.meta};return a(m),m})();return this.#a=!1,this.options.persister?this.options.persister(d,g,this):d(g)},c=(()=>{const d={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#s,state:this.state,fetchFn:l};return a(d),d})();this.options.behavior?.onFetch(c,this),this.#n=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==c.fetchOptions?.meta)&&this.#o({type:"fetch",meta:c.fetchOptions?.meta}),this.#r=nb({initialPromise:t?.initialPromise,fn:c.fetchFn,onCancel:d=>{d instanceof vf&&d.revert&&this.setState({...this.#n,fetchStatus:"idle"}),s.abort()},onFail:(d,p)=>{this.#o({type:"failed",failureCount:d,error:p})},onPause:()=>{this.#o({type:"pause"})},onContinue:()=>{this.#o({type:"continue"})},retry:c.options.retry,retryDelay:c.options.retryDelay,networkMode:c.options.networkMode,canRun:()=>!0});try{const d=await this.#r.start();if(d===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(d),this.#t.config.onSuccess?.(d,this),this.#t.config.onSettled?.(d,this.state.error,this),d}catch(d){if(d instanceof vf){if(d.silent)return this.#r.promise;if(d.revert){if(this.state.data===void 0)throw d;return this.state.data}}throw this.#o({type:"error",error:d}),this.#t.config.onError?.(d,this),this.#t.config.onSettled?.(this.state.data,d,this),d}finally{this.scheduleGc()}}#o(e){const t=s=>{switch(e.type){case"failed":return{...s,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...s,fetchStatus:"paused"};case"continue":return{...s,fetchStatus:"fetching"};case"fetch":return{...s,...Ex(s.data,this.options),fetchMeta:e.meta??null};case"success":const a={...s,...hv(e.data,e.dataUpdatedAt),dataUpdateCount:s.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#n=e.manual?a:void 0,a;case"error":const l=e.error;return{...s,error:l,errorUpdateCount:s.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:s.fetchFailureCount+1,fetchFailureReason:l,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...s,isInvalidated:!0};case"setState":return{...s,...e.state}}};this.state=t(this.state),wt.batch(()=>{this.observers.forEach(s=>{s.onQueryUpdate()}),this.#t.notify({query:this,type:"updated",action:e})})}};function Ex(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:tb(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function hv(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function fv(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,s=t!==void 0,a=s?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:s?a??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:s?"success":"pending",fetchStatus:"idle"}}function dv(e){return{onFetch:(t,s)=>{const a=t.options,l=t.fetchOptions?.meta?.fetchMore?.direction,u=t.state.data?.pages||[],c=t.state.data?.pageParams||[];let d={pages:[],pageParams:[]},p=0;const g=async()=>{let m=!1;const y=w=>{yx(w,()=>t.signal,()=>m=!0)},b=W0(t.options,t.fetchOptions),_=async(w,A,R)=>{if(m)return Promise.reject();if(A==null&&w.pages.length)return Promise.resolve(w);const U=(()=>{const V={client:t.client,queryKey:t.queryKey,pageParam:A,direction:R?"backward":"forward",meta:t.options.meta};return y(V),V})(),j=await b(U),{maxPages:L}=t.options,Q=R?gx:px;return{pages:Q(w.pages,j,L),pageParams:Q(w.pageParams,A,L)}};if(l&&u.length){const w=l==="backward",A=w?Tx:pv,R={pages:u,pageParams:c},O=A(a,R);d=await _(R,O,w)}else{const w=e??u.length;do{const A=p===0?c[0]??a.initialPageParam:pv(a,d);if(p>0&&A==null)break;d=await _(d,A),p++}while(p<w)}return d};t.options.persister?t.fetchFn=()=>t.options.persister?.(g,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},s):t.fetchFn=g}}}function pv(e,{pages:t,pageParams:s}){const a=t.length-1;return t.length>0?e.getNextPageParam(t[a],t,s[a],s):void 0}function Tx(e,{pages:t,pageParams:s}){return t.length>0?e.getPreviousPageParam?.(t[0],t,s[0],s):void 0}var Rx=class extends rb{#e;#n;#t;#s;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#t=e.mutationCache,this.#n=[],this.state=e.state||Ax(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#n.includes(e)||(this.#n.push(e),this.clearGcTimeout(),this.#t.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#n=this.#n.filter(t=>t!==e),this.scheduleGc(),this.#t.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#n.length||(this.state.status==="pending"?this.scheduleGc():this.#t.remove(this))}continue(){return this.#s?.continue()??this.execute(this.state.variables)}async execute(e){const t=()=>{this.#r({type:"continue"})},s={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#s=nb({fn:()=>this.options.mutationFn?this.options.mutationFn(e,s):Promise.reject(new Error("No mutationFn found")),onFail:(u,c)=>{this.#r({type:"failed",failureCount:u,error:c})},onPause:()=>{this.#r({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#t.canRun(this)});const a=this.state.status==="pending",l=!this.#s.canStart();try{if(a)t();else{this.#r({type:"pending",variables:e,isPaused:l}),this.#t.config.onMutate&&await this.#t.config.onMutate(e,this,s);const c=await this.options.onMutate?.(e,s);c!==this.state.context&&this.#r({type:"pending",context:c,variables:e,isPaused:l})}const u=await this.#s.start();return await this.#t.config.onSuccess?.(u,e,this.state.context,this,s),await this.options.onSuccess?.(u,e,this.state.context,s),await this.#t.config.onSettled?.(u,null,this.state.variables,this.state.context,this,s),await this.options.onSettled?.(u,null,e,this.state.context,s),this.#r({type:"success",data:u}),u}catch(u){try{await this.#t.config.onError?.(u,e,this.state.context,this,s)}catch(c){Promise.reject(c)}try{await this.options.onError?.(u,e,this.state.context,s)}catch(c){Promise.reject(c)}try{await this.#t.config.onSettled?.(void 0,u,this.state.variables,this.state.context,this,s)}catch(c){Promise.reject(c)}try{await this.options.onSettled?.(void 0,u,e,this.state.context,s)}catch(c){Promise.reject(c)}throw this.#r({type:"error",error:u}),u}finally{this.#t.runNext(this)}}#r(e){const t=s=>{switch(e.type){case"failed":return{...s,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...s,isPaused:!0};case"continue":return{...s,isPaused:!1};case"pending":return{...s,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...s,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...s,data:void 0,error:e.error,failureCount:s.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=t(this.state),wt.batch(()=>{this.#n.forEach(s=>{s.onMutationUpdate(e)}),this.#t.notify({mutation:this,type:"updated",action:e})})}};function Ax(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Ox=class extends au{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#n=new Map,this.#t=0}#e;#n;#t;build(e,t,s){const a=new Rx({client:e,mutationCache:this,mutationId:++this.#t,options:e.defaultMutationOptions(t),state:s});return this.add(a),a}add(e){this.#e.add(e);const t=Rl(e);if(typeof t=="string"){const s=this.#n.get(t);s?s.push(e):this.#n.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#e.delete(e)){const t=Rl(e);if(typeof t=="string"){const s=this.#n.get(t);if(s)if(s.length>1){const a=s.indexOf(e);a!==-1&&s.splice(a,1)}else s[0]===e&&this.#n.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=Rl(e);if(typeof t=="string"){const a=this.#n.get(t)?.find(l=>l.state.status==="pending");return!a||a===e}else return!0}runNext(e){const t=Rl(e);return typeof t=="string"?this.#n.get(t)?.find(a=>a!==e&&a.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){wt.batch(()=>{this.#e.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#e.clear(),this.#n.clear()})}getAll(){return Array.from(this.#e)}find(e){const t={exact:!0,...e};return this.getAll().find(s=>lv(t,s))}findAll(e={}){return this.getAll().filter(t=>lv(e,t))}notify(e){wt.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return wt.batch(()=>Promise.all(e.map(t=>t.continue().catch(ln))))}};function Rl(e){return e.options.scope?.id}var Cx=class extends au{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,s){const a=t.queryKey,l=t.queryHash??Mf(a,t);let u=this.get(l);return u||(u=new wx({client:e,queryKey:a,queryHash:l,options:e.defaultQueryOptions(t),state:s,defaultOptions:e.getQueryDefaults(a)}),this.add(u)),u}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){wt.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){const t={exact:!0,...e};return this.getAll().find(s=>ov(t,s))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(s=>ov(e,s)):t}notify(e){wt.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){wt.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){wt.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},xx=class{#e;#n;#t;#s;#r;#i;#a;#l;constructor(e={}){this.#e=e.queryCache||new Cx,this.#n=e.mutationCache||new Ox,this.#t=e.defaultOptions||{},this.#s=new Map,this.#r=new Map,this.#i=0}mount(){this.#i++,this.#i===1&&(this.#a=X0.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#l=Yl.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#i--,this.#i===0&&(this.#a?.(),this.#a=void 0,this.#l?.(),this.#l=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#n.findAll({...e,status:"pending"}).length}getQueryData(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),s=this.#e.build(this,t),a=s.state.data;return a===void 0?this.fetchQuery(e):(e.revalidateIfStale&&s.isStaleByTime(yf(t.staleTime,s))&&this.prefetchQuery(t),Promise.resolve(a))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:t,state:s})=>{const a=s.data;return[t,a]})}setQueryData(e,t,s){const a=this.defaultQueryOptions({queryKey:e}),u=this.#e.get(a.queryHash)?.state.data,c=ox(t,u);if(c!==void 0)return this.#e.build(this,a).setData(c,{...s,manual:!0})}setQueriesData(e,t,s){return wt.batch(()=>this.#e.findAll(e).map(({queryKey:a})=>[a,this.setQueryData(a,t,s)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){const t=this.#e;wt.batch(()=>{t.findAll(e).forEach(s=>{t.remove(s)})})}resetQueries(e,t){const s=this.#e;return wt.batch(()=>(s.findAll(e).forEach(a=>{a.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const s={revert:!0,...t},a=wt.batch(()=>this.#e.findAll(e).map(l=>l.cancel(s)));return Promise.all(a).then(ln).catch(ln)}invalidateQueries(e,t={}){return wt.batch(()=>(this.#e.findAll(e).forEach(s=>{s.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t)))}refetchQueries(e,t={}){const s={...t,cancelRefetch:t.cancelRefetch??!0},a=wt.batch(()=>this.#e.findAll(e).filter(l=>!l.isDisabled()&&!l.isStatic()).map(l=>{let u=l.fetch(void 0,s);return s.throwOnError||(u=u.catch(ln)),l.state.fetchStatus==="paused"?Promise.resolve():u}));return Promise.all(a).then(ln)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const s=this.#e.build(this,t);return s.isStaleByTime(yf(t.staleTime,s))?s.fetch(t):Promise.resolve(s.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(ln).catch(ln)}fetchInfiniteQuery(e){return e.behavior=dv(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(ln).catch(ln)}ensureInfiniteQueryData(e){return e.behavior=dv(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Yl.isOnline()?this.#n.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#n}getDefaultOptions(){return this.#t}setDefaultOptions(e){this.#t=e}setQueryDefaults(e,t){this.#s.set(Ia(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#s.values()],s={};return t.forEach(a=>{$a(e,a.queryKey)&&Object.assign(s,a.defaultOptions)}),s}setMutationDefaults(e,t){this.#r.set(Ia(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#r.values()],s={};return t.forEach(a=>{$a(e,a.mutationKey)&&Object.assign(s,a.defaultOptions)}),s}defaultQueryOptions(e){if(e._defaulted)return e;const t={...this.#t.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Mf(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===Uf&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#t.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#n.clear()}},kx=re.createContext(void 0),jx=({client:e,children:t})=>(re.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),Y.jsx(kx.Provider,{value:e,children:t}));const Mx="/assets/styles-DlkBt8Ca.css";function Ux(e,t={}){typeof window>"u"||window.__lovableEvents?.captureException?.(e,{source:"react_error_boundary",route:window.location.pathname,...t},{mechanism:"react_error_boundary",handled:!1,severity:"error"})}function Dx(){return Y.jsx("div",{className:"flex min-h-screen items-center justify-center bg-background px-4",children:Y.jsxs("div",{className:"max-w-md text-center",children:[Y.jsx("h1",{className:"text-7xl font-bold text-foreground",children:"404"}),Y.jsx("h2",{className:"mt-4 text-xl font-semibold text-foreground",children:"Page not found"}),Y.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:"The page you're looking for doesn't exist or has been moved."}),Y.jsx("div",{className:"mt-6",children:Y.jsx(xf,{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 Nx({error:e,reset:t}){console.error(e);const s=mt();return re.useEffect(()=>{Ux(e,{boundary:"tanstack_root_error_component"})},[e]),Y.jsx("div",{className:"flex min-h-screen items-center justify-center bg-background px-4",children:Y.jsxs("div",{className:"max-w-md text-center",children:[Y.jsx("h1",{className:"text-xl font-semibold tracking-tight text-foreground",children:"This page didn't load"}),Y.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:"Something went wrong on our end. You can try refreshing or head back home."}),Y.jsxs("div",{className:"mt-6 flex flex-wrap justify-center gap-2",children:[Y.jsx("button",{onClick:()=>{s.invalidate(),t()},className:"inline-flex items-center justify-center rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground transition-colors hover:bg-primary/90",children:"Try again"}),Y.jsx("a",{href:"/",className:"inline-flex items-center justify-center rounded-md border border-input bg-background px-4 py-2 text-sm font-medium text-foreground transition-colors hover:bg-accent",children:"Go home"})]})]})})}
54const ou=OA()({head:()=>({meta:[{charSet:"utf-8"},{name:"viewport",content:"width=device-width, initial-scale=1"},{title:"Materiais Ricos | CRO Brasil"},{name:"description",content:"Biblioteca de materiais ricos da CRO Brasil: guias, estudos, templates e webinars sobre CRO, Growth e Experimentação."},{name:"author",content:"CRO Brasil"},{property:"og:title",content:"Materiais Ricos | CRO Brasil"},{property:"og:description",content:"Biblioteca de materiais ricos da CRO Brasil: guias, estudos, templates e webinars sobre CRO, Growth e Experimentação."},{property:"og:type",content:"website"},{name:"twitter:card",content:"summary_large_image"},{name:"twitter:title",content:"Materiais Ricos | CRO Brasil"},{name:"twitter:description",content:"Biblioteca de materiais ricos da CRO Brasil: guias, estudos, templates e webinars sobre CRO, Growth e Experimentação."},{property:"og:image",content:"https://pub-bb2e103a32db4e198524a2e9ed8f35b4.r2.dev/43a3f682-7144-4e20-abad-ac754ac83e31/id-preview-0d658fd3--1298f825-65b4-4172-8dc5-506d907022bd.lovable.app-1781197630589.png"},{name:"twitter:image",content:"https://pub-bb2e103a32db4e198524a2e9ed8f35b4.r2.dev/43a3f682-7144-4e20-abad-ac754ac83e31/id-preview-0d658fd3--1298f825-65b4-4172-8dc5-506d907022bd.lovable.app-1781197630589.png"}],links:[{rel:"stylesheet",href:Mx},{rel:"preconnect",href:"https://fonts.googleapis.com"},{rel:"preconnect",href:"https://fonts.gstatic.com",crossOrigin:"anonymous"},{rel:"stylesheet",href:"https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap"}]}),shellComponent:Lx,component:zx,notFoundComponent:Dx,errorComponent:Nx});function Lx({children:e}){return Y.jsxs("html",{lang:"en",children:[Y.jsx("head",{children:Y.jsx(FA,{})}),Y.jsxs("body",{children:[e,Y.jsx(QA,{})]})]})}function zx(){const{queryClient:e}=ou.useRouteContext();return Y.jsx(jx,{client:e,children:Y.jsx(A0,{})})}const Px="modulepreload",Bx=function(e){return"/"+e},gv={},sb=function(t,s,a){let l=Promise.resolve();if(s&&s.length>0){let p=function(g){return Promise.all(g.map(m=>Promise.resolve(m).then(y=>({status:"fulfilled",value:y}),y=>({status:"rejected",reason:y}))))};document.getElementsByTagName("link");const c=document.querySelector("meta[property=csp-nonce]"),d=c?.nonce||c?.getAttribute("nonce");l=p(s.map(g=>{if(g=Bx(g),g in gv)return;gv[g]=!0;const m=g.endsWith(".css"),y=m?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${g}"]${y}`))return;const b=document.createElement("link");if(b.rel=m?"stylesheet":Px,m||(b.as="script"),b.crossOrigin="",b.href=g,d&&b.setAttribute("nonce",d),document.head.appendChild(b),m)return new Promise((_,w)=>{b.addEventListener("load",_),b.addEventListener("error",()=>w(new Error(`Unable to preload CSS for ${g}`)))})}))}function u(c){const d=new Event("vite:preloadError",{cancelable:!0});if(d.payload=c,window.dispatchEvent(d),!d.defaultPrevented)throw c}return l.then(c=>{for(const d of c||[])d.status==="rejected"&&u(d.reason);return t().catch(u)})},Hx=()=>sb(()=>import("./privacidade-D00R1-QI.js"),[]),qx=w0("/privacidade")({head:()=>({meta:[{title:"Política de Privacidade | CRO Brasil"},{name:"description",content:"Política de privacidade da CRO Brasil: como coletamos, usamos e protegemos seus dados."},{property:"og:title",content:"Política de Privacidade | CRO Brasil"},{property:"og:description",content:"Como a CRO Brasil coleta, usa e protege seus dados."}]}),component:E0(Hx,"component")}),Ix=()=>sb(()=>import("./index-Dn-1-w8N.js"),[]),$x=w0("/")({head:()=>({meta:[{title:"Materiais Ricos | CRO Brasil"},{name:"description",content:"Biblioteca de materiais ricos da CRO Brasil: guias, estudos, templates e webinars sobre CRO, Growth e Experimentação."}]}),component:E0(Ix,"component")}),Gx=qx.update({id:"/privacidade",path:"/privacidade",getParentRoute:()=>ou}),Vx=$x.update({id:"/",path:"/",getParentRoute:()=>ou}),Kx={IndexRoute:Vx,PrivacidadeRoute:Gx},Yx=ou._addFileChildren(Kx),Fx=()=>{const e=new xx;return qA({routeTree:Yx,context:{queryClient:e},scrollRestoration:!0,defaultPreloadStaleTime:0})};async function Qx(){const e=await Fx();let t;if(av){const s=await av.getOptions();s.serializationAdapters=s.serializationAdapters??[],window.__TSS_START_OPTIONS__=s,t=s.seri
54alizationAdapters,e.options.defaultSsr=s.defaultSsr}else t=[],window.__TSS_START_OPTIONS__={serializationAdapters:t};return t.push(VR),e.options.serializationAdapters&&t.push(...e.options.serializationAdapters),e.update({basepath:"",serializationAdapters:t}),e.stores.matchesId.get().length||await YR(e),e}async function Jx(){const e=await Qx();return window.$_TSR?.h(),e}var Fh;function Xx(){return Fh||(Fh=Jx()),Y.jsx(XR,{promise:Fh,children:e=>Y.jsx(GA,{router:e})})}re.startTransition(()=>{US.hydrateRoot(document,Y.jsx(re.StrictMode,{children:Y.jsx(Xx,{})}))});export{xf as L,Y as j,re as r,WC as s};

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.