vendor: 5,834 bytes, lines 1-2
1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/resources-BPIr8qqp.js","assets/reveal-il-k3PU1.js","assets/chevron-down-BbsuzoT6.js","assets/chevron-right-02vIYcru.js","assets/loans-BxgD4Hcf.js","assets/next-step-form-CCi8Bzzr.js","assets/submit-form.functions-BazfYM8F.js","assets/phone-BHYDm6Qe.js","assets/house-wEx-Z3wz.js","assets/refresh-cw-BwxfopNa.js","assets/file-text-jCwybNvn.js","assets/arrow-right-HJlnhXz0.js","assets/contact-0s_PdIuw.js","assets/admin-C30OU9O-.js","assets/loader-circle-x_No020O.js","assets/external-link-CODIYg5z.js","assets/aboutus-DKW2vHQK.js","assets/star-jAzFSnzK.js","assets/index-D-syS0_D.js","assets/blog.dscr-loans-investment-properties-CMF7VgM9.js","assets/circle-check-CzC1-C8M.js","assets/blog.crystal-beach-dscr-short-term-rental-BwggYMuf.js","assets/blog._slug-DMIhZfKC.js","assets/admin_.videos-C9FxqXEk.js","assets/trash-2-BnzI8J6j.js","assets/admin_.inquiries-D0xmR_qp.js","assets/admin_.blogs-BlhYe-Uo.js"])))=>i.map(i=>d[i]); 2function VS(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Jh={exports:{}},Mi={};var Ry;function KS(){if(Ry)return Mi;Ry=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function r(a,o,u){var c=null;if(u!==void 0&&(c=""+u),o.key!==void 0&&(c=""+o.key),"key"in o){u={};for(var f in o)f!=="key"&&(u[f]=o[f])}else u=o;return o=u.ref,{$$typeof:t,type:a,key:c,ref:o!==void 0?o:null,props:u}}return Mi.Fragment=e,Mi.jsx=r,Mi.jsxs=r,Mi}var xy;function FS(){return xy||(xy=1,Jh.exports=KS()),Jh.exports}var L=FS(),Xh={exports:{}},he={};var Ay;function YS(){if(Ay)return he;Ay=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),u=Symbol.for("react.consumer"),c=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),m=Symbol.for("react.activity"),b=Symbol.iterator;function w(C){return C===null||typeof C!="object"?null:(C=b&&C[b]||C["@@iterator"],typeof C=="function"?C:null)}var _={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},x=Object.assign,E={};function A(C,G,X){this.props=C,this.context=G,this.refs=E,this.updater=X||_}A.prototype.isReactComponent={},A.prototype.setState=function(C,G){if(typeof C!="object"&&typeof C!="function"&&C!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,C,G,"setState")},A.prototype.forceUpdate=function(C){this.updater.enqueueForceUpdate(this,C,"forceUpdate")};function M(){}M.prototype=A.prototype;function j(C,G,X){this.props=C,this.context=G,this.refs=E,this.updater=X||_}var z=j.prototype=new M;z.constructor=j,x(z,A.prototype),z.isPureReactComponent=!0;var Y=Array.isArray;function K(){}var q={H:null,A:null,T:null,S:null},F=Object.prototype.hasOwnProperty;function J(C,G,X){var W=X.ref;return{$$typeof:t,type:C,key:G,ref:W!==void 0?W:null,props:X}}function le(C,G){return J(C.type,G,C.props)}function se(C){return typeof C=="object"&&C!==null&&C.$$typeof===t}function ye(C){var G={"=":"=0",":":"=2"};return"$"+C.replace(/[=:]/g,function(X){return G[X]})}var Ce=/\/+/g;function Qe(C,G){return typeof C=="object"&&C!==null&&C.key!=null?ye(""+C.key):G.toString(36)}function Ie(C){switch(C.status){case"fulfilled":return C.value;case"rejected":throw C.reason;default:switch(typeof C.status=="string"?C.then(K,K):(C.status="pending",C.then(function(G){C.status==="pending"&&(C.status="fulfilled",C.value=G)},function(G){C.status==="pending"&&(C.status="rejected",C.reason=G)})),C.status){case"fulfilled":return C.value;case"rejected":throw C.reason}}throw C}function $(C,G,X,W,ae){var pe=typeof C;(pe==="undefined"||pe==="boolean")&&(C=null);var Se=!1;if(C===null)Se=!0;else switch(pe){case"bigint":case"string":case"number":Se=!0;break;case"object":switch(C.$$typeof){case t:case e:Se=!0;break;case y:return Se=C._init,$(Se(C._payload),G,X,W,ae)}}if(Se)return ae=ae(C),Se=W===""?"."+Qe(C,0):W,Y(ae)?(X="",Se!=null&&(X=Se.replace(Ce,"$&/")+"/"),$(ae,G,X,"",function(Ln){return Ln})):ae!=null&&(se(ae)&&(ae=le(ae,X+(ae.key==null||C&&C.key===ae.key?"":(""+ae.key).replace(Ce,"$&/")+"/")+Se)),G.push(ae)),1;Se=0;var Je=W===""?".":W+":";if(Y(C))for(var Ue=0;Ue<C.length;Ue++)W=C[Ue],pe=Je+Qe(W,Ue),Se+=$(W,G,X,pe,ae);else if(Ue=w(C),typeof Ue=="function")for(C=Ue.call(C),Ue=0;!(W=C.next()).done;)W=W.value,pe=Je+Qe(W,Ue++),Se+=$(W,G,X,pe,ae);else if(pe==="object"){if(typeof C.then=="function")return $(Ie(C),G,X,W,ae);throw G=String(C),Error("Objects are not valid as a React child (found: "+(G==="[object Object]"?"object with keys {"+Object.keys(C).join(", ")+"}":G)+"). If you meant to render a collection of children, use an array instead.")}return Se}function Q(C,G,X){if(C==null)return C;var W=[],ae=0;return $(C,W,"","",function(pe){return G.call(X,pe,ae++)}),W}function oe(C){if(C._status===-1){var G=C._result;G=G(),G.then(function(X){(C._status===0||C._status===-1)&&(C._status=1,C._result=X)},function(X){(C._status===0||C._status===-1)&&(C._status=2,C._result=X)}),C._status===-1&&(C._status=0,C._result=G)}if(C._status===1)return C._result.default;throw C._result}var xe=typeof reportError=="function"?reportError:function(C){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var G=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof C=="object"&&C!==null&&typeof C.message=="string"?String(C.message):String(C),error:C});if(!window.dispatchEvent(G))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",C);return}console.error(C)}
vendor: 11,958 bytes, line 2
2,ke={map:Q,forEach:function(C,G,X){Q(C,function(){G.apply(this,arguments)},X)},count:function(C){var G=0;return Q(C,function(){G++}),G},toArray:function(C){return Q(C,function(G){return G})||[]},only:function(C){if(!se(C))throw Error("React.Children.only expected to receive a single React element child.");return C}};return he.Activity=m,he.Children=ke,he.Component=A,he.Fragment=r,he.Profiler=o,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(C){return q.H.useMemoCache(C)}},he.cache=function(C){return function(){return C.apply(null,arguments)}},he.cacheSignal=function(){return null},he.cloneElement=function(C,G,X){if(C==null)throw Error("The argument must be a React element, but you passed "+C+".");var W=x({},C.props),ae=C.key;if(G!=null)for(pe in G.key!==void 0&&(ae=""+G.key),G)!F.call(G,pe)||pe==="key"||pe==="__self"||pe==="__source"||pe==="ref"&&G.ref===void 0||(W[pe]=G[pe]);var pe=arguments.length-2;if(pe===1)W.children=X;else if(1<pe){for(var Se=Array(pe),Je=0;Je<pe;Je++)Se[Je]=arguments[Je+2];W.children=Se}return J(C.type,ae,W)},he.createContext=function(C){return C={$$typeof:c,_currentValue:C,_currentValue2:C,_threadCount:0,Provider:null,Consumer:null},C.Provider=C,C.Consumer={$$typeof:u,_context:C},C},he.createElement=function(C,G,X){var W,ae={},pe=null;if(G!=null)for(W in G.key!==void 0&&(pe=""+G.key),G)F.call(G,W)&&W!=="key"&&W!=="__self"&&W!=="__source"&&(ae[W]=G[W]);var Se=arguments.length-2;if(Se===1)ae.children=X;else if(1<Se){for(var Je=Array(Se),Ue=0;Ue<Se;Ue++)Je[Ue]=arguments[Ue+2];ae.children=Je}if(C&&C.defaultProps)for(W in Se=C.defaultProps,Se)ae[W]===void 0&&(ae[W]=Se[W]);return J(C,pe,ae)},he.createRef=function(){return{current:null}},he.forwardRef=function(C){return{$$typeof:f,render:C}},he.isValidElement=se,he.lazy=function(C){return{$$typeof:y,_payload:{_status:-1,_result:C},_init:oe}},he.memo=function(C,G){return{$$typeof:g,type:C,compare:G===void 0?null:G}},he.startTransition=function(C){var G=q.T,X={};q.T=X;try{var W=C(),ae=q.S;ae!==null&&ae(X,W),typeof W=="object"&&W!==null&&typeof W.then=="function"&&W.then(K,xe)}catch(pe){xe(pe)}finally{G!==null&&X.types!==null&&(G.types=X.types),q.T=G}},he.unstable_useCacheRefresh=function(){return q.H.useCacheRefresh()},he.use=function(C){return q.H.use(C)},he.useActionState=function(C,G,X){return q.H.useActionState(C,G,X)},he.useCallback=function(C,G){return q.H.useCallback(C,G)},he.useContext=function(C){return q.H.useContext(C)},he.useDebugValue=function(){},he.useDeferredValue=function(C,G){return q.H.useDeferredValue(C,G)},he.useEffect=function(C,G){return q.H.useEffect(C,G)},he.useEffectEvent=function(C){return q.H.useEffectEvent(C)},he.useId=function(){return q.H.useId()},he.useImperativeHandle=function(C,G,X){return q.H.useImperativeHandle(C,G,X)},he.useInsertionEffect=function(C,G){return q.H.useInsertionEffect(C,G)},he.useLayoutEffect=function(C,G){return q.H.useLayoutEffect(C,G)},he.useMemo=function(C,G){return q.H.useMemo(C,G)},he.useOptimistic=function(C,G){return q.H.useOptimistic(C,G)},he.useReducer=function(C,G,X){return q.H.useReducer(C,G,X)},he.useRef=function(C){return q.H.useRef(C)},he.useState=function(C){return q.H.useState(C)},he.useSyncExternalStore=function(C,G,X){return q.H.useSyncExternalStore(C,G,X)},he.useTransition=function(){return q.H.useTransition()},he.version="19.2.5",he}var ky;function ho(){return ky||(ky=1,Xh.exports=YS()),Xh.exports}var ee=ho();const Ji=VS(ee);var Zh={exports:{}},Ni={},Wh={exports:{}},ef={};var Oy;function QS(){return Oy||(Oy=1,(function(t){function e($,Q){var oe=$.length;$.push(Q);e:for(;0<oe;){var xe=oe-1>>>1,ke=$[xe];if(0<o(ke,Q))$[xe]=Q,$[oe]=ke,oe=xe;else break e}}function r($){return $.length===0?null:$[0]}function a($){if($.length===0)return null;var Q=$[0],oe=$.pop();if(oe!==Q){$[0]=oe;e:for(var xe=0,ke=$.length,C=ke>>>1;xe<C;){var G=2*(xe+1)-1,X=$[G],W=G+1,ae=$[W];if(0>o(X,oe))W<ke&&0>o(ae,X)?($[xe]=ae,$[W]=oe,xe=W):($[xe]=X,$[G]=oe,xe=G);else if(W<ke&&0>o(ae,oe))$[xe]=ae,$[W]=oe,xe=W;else break e}}return Q}function o($,Q){var oe=$.sortIndex-Q.sortIndex;return oe!==0?oe:$.id-Q.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var u=performance;t.unstable_now=function(){return u.now()}}else{var c=Date,f=c.now();t.unstable_now=function(){return c.now()-f}}var p=[],g=[],y=1,m=null,b=3,w=!1,_=!1,x=!1,E=!1,A=typeof setTimeout=="function"?setTimeout:null,M=typeof clearTimeout=="function"?clearTimeout:null,j=typeof setImmediate<"u"?setImmediate:null;function z($){for(var Q=r(g);Q!==null;){if(Q.callback===null)a(g);else if(Q.startTime<=$)a(g),Q.sortIndex=Q.expirationTime,e(p,Q);else break;Q=r(g)}}function Y($){if(x=!1,z($),!_)if(r(p)!==null)_=!0,K||(K=!0,ye());else{var Q=r(g);Q!==null&&Ie(Y,Q.startTime-$)}}var K=!1,q=-1,F=5,J=-1;function le(){return E?!0:!(t.unstable_now()-J<F)}function se(){if(E=!1,K){var $=t.unstable_now();J=$;var Q=!0;try{e:{_=!1,x&&(x=!1,M(q),q=-1),w=!0;var oe=b;try{t:{for(z($),m=r(p);m!==null&&!(m.expirationTime>$&&le());){var xe=m.callback;if(typeof xe=="function"){m.callback=null,b=m.priorityLevel;var ke=xe(m.expirationTime<=$);if($=t.unstable_now(),typeof ke=="function"){m.callback=ke,z($),Q=!0;break t}m===r(p)&&a(p),z($)}else a(p);m=r(p)}if(m!==null)Q=!0;else{var C=r(g);C!==null&&Ie(Y,C.startTime-$),Q=!1}}break e}finally{m=null,b=oe,w=!1}Q=void 0}}finally{Q?ye():K=!1}}}var ye;if(typeof j=="function")ye=function(){j(se)};else if(typeof MessageChannel<"u"){var Ce=new MessageChannel,Qe=Ce.port2;Ce.port1.onmessage=se,ye=function(){Qe.postMessage(null)}}else ye=function(){A(se,0)};function Ie($,Q){q=A(function(){$(t.unstable_now())},Q)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function($){$.callback=null},t.unstable_forceFrameRate=function($){0>$||125<$?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):F=0<$?Math.floor(1e3/$):5},t.unstable_getCurrentPriorityLevel=function(){return b},t.unstable_next=function($){switch(b){case 1:case 2:case 3:var Q=3;break;default:Q=b}var oe=b;b=Q;try{return $()}finally{b=oe}},t.unstable_requestPaint=function(){E=!0},t.unstable_runWithPriority=function($,Q){switch($){case 1:case 2:case 3:case 4:case 5:break;default:$=3}var oe=b;b=$;try{return Q()}finally{b=oe}},t.unstable_scheduleCallback=function($,Q,oe){var xe=t.unstable_now();switch(typeof oe=="object"&&oe!==null?(oe=oe.delay,oe=typeof oe=="number"&&0<oe?xe+oe:xe):oe=xe,$){case 1:var ke=-1;break;case 2:ke=250;break;case 5:ke=1073741823;break;case 4:ke=1e4;break;default:ke=5e3}return ke=oe+ke,$={id:y++,callback:Q,priorityLevel:$,startTime:oe,expirationTime:ke,sortIndex:-1},oe>xe?($.sortIndex=oe,e(g,$),r(p)===null&&$===r(g)&&(x?(M(q),q=-1):x=!0,Ie(Y,oe-xe))):($.sortIndex=ke,e(p,$),_||w||(_=!0,K||(K=!0,ye()))),$},t.unstable_shouldYield=le,t.unstable_wrapCallback=function($){var Q=b;return function(){var oe=b;b=Q;try{return $.apply(this,arguments)}finally{b=oe}}}})(ef)),ef}var Cy;function JS(){return Cy||(Cy=1,Wh.exports=QS()),Wh.exports}var tf={exports:{}},_t={};var jy;function XS(){if(jy)return _t;jy=1;var t=ho();function e(p){var g="https://react.dev/errors/"+p;if(1<arguments.length){g+="?args[]="+encodeURIComponent(arguments[1]);for(var y=2;y<arguments.length;y++)g+="&args[]="+encodeURIComponent(arguments[y])}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 r(){}var a={d:{f:r,r:function(){throw Error(e(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},o=Symbol.for("react.portal");function u(p,g,y){var m=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:m==null?null:""+m,children:p,containerInfo:g,implementation:y}}var c=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function f(p,g){if(p==="font")return"";if(typeof g=="string")return g==="use-credentials"?g:""}return _t.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,_t.createPortal=function(p,g){var y=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!g||g.nodeType!==1&&g.nodeType!==9&&g.nodeType!==11)throw Error(e(299));return u(p,g,null,y)},_t.flushSync=function(p){var g=c.T,y=a.p;try{if(c.T=null,a.p=2,p)return p()}finally{c.T=g,a.p=y,a.d.f()}},_t.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))},_t.prefetchDNS=function(p){typeof p=="string"&&a.d.D(p)},_t.preinit=function(p,g){if(typeof p=="string"&&g&&typeof g.as=="string"){var y=g.as,m=f(y,g.crossOrigin),b=typeof g.integrity=="string"?g.integrity:void 0,w=typeof g.fetchPriority=="string"?g.fetchPriority:void 0;y==="style"?a.d.S(p,typeof g.precedence=="string"?g.precedence:void 0,{crossOrigin:m,integrity:b,fetchPriority:w}):y==="script"&&a.d.X(p,{crossOrigin:m,integrity:b,fetchPriority:w,nonce:typeof g.nonce=="string"?g.nonce:void 0})}},_t.preinitModule=function(p,g){if(typeof p=="string")if(typeof g=="object"&&g!==null){if(g.as==null||g.as==="script"){var y=f(g.as,g.crossOrigin);a.d.M(p,{crossOrigin:y,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)},_t.preload=function(p,g){if(typeof p=="string"&&typeof g=="object"&&g!==null&&typeof g.as=="string"){var y=g.as,m=f(y,g.crossOrigin);a.d.L(p,y,{crossOrigin:m,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})}},_t.preloadModule=function(p,g){if(typeof p=="string")if(g){var y=f(g.as,g.crossOrigin);a.d.m(p,{as:typeof g.as=="string"&&g.as!=="script"?g.as:void 0,crossOrigin:y,integrity:typeof g.integrity=="string"?g.integrity:void 0})}else a.d.m(p)},_t.requestFormReset=function(p){a.d.r(p)},_t.unstable_batchedUpdates=function(p,g){return p(g)},_t.useFormState=function(p,g,y){return c.H.useFormState(p,g,y)},_t.useFormStatus=function(){return c.H.useHostTransitionStatus()},_t.version="19.2.5",_t}var My;function Eb(){if(My)return tf.exports;My=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),tf.exports=XS(),tf.exports}var Ny;function ZS(){if(Ny)return Ni;Ny=1;var t=JS(),e=ho(),r=Eb();function a(n){var s="https://react.dev/errors/"+n;if(1<arguments.length){s+="?args[]="+encodeURIComponent(arguments[1]);for(var i=2;i<arguments.length;i++)s+="&args[]="+encodeURIComponent(arguments[i])}return"Minified React error #"+n+"; visit "+s+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(n){return!(!n||n.nodeType!==1&&n.nodeType!==9&&n.nodeType!==11)}function u(n){var s=n,i=n;if(n.alternate)for(;s.return;)s=s.return;else{n=s;do s=n,(s.flags&4098)!==0&&(i=s.return),n=s.return;while(n)}return s.tag===3?i:null}function c(n){if(n.tag===13){var s=n.memoizedState;if(s===null&&(n=n.alternate,n!==null&&(s=n.memoizedState)),s!==null)return s.dehydrated}return null}function f(n){if(n.tag===31){var s=n.memoizedState;if(s===null&&(n=n.alternate,n!==null&&(s=n.memoizedState)),s!==null)return s.dehydrated}return null}function p(n){if(u(n)!==n)throw Error(a(188))}function g(n){var s=n.alternate;
vendor: 6,593 bytes, lines 2-9
2if(!s){if(s=u(n),s===null)throw Error(a(188));return s!==n?null:n}for(var i=n,l=s;;){var h=i.return;if(h===null)break;var d=h.alternate;if(d===null){if(l=h.return,l!==null){i=l;continue}break}if(h.child===d.child){for(d=h.child;d;){if(d===i)return p(h),n;if(d===l)return p(h),s;d=d.sibling}throw Error(a(188))}if(i.return!==l.return)i=h,l=d;else{for(var v=!1,S=h.child;S;){if(S===i){v=!0,i=h,l=d;break}if(S===l){v=!0,l=h,i=d;break}S=S.sibling}if(!v){for(S=d.child;S;){if(S===i){v=!0,i=d,l=h;break}if(S===l){v=!0,l=d,i=h;break}S=S.sibling}if(!v)throw Error(a(189))}}if(i.alternate!==l)throw Error(a(190))}if(i.tag!==3)throw Error(a(188));return i.stateNode.current===i?n:s}function y(n){var s=n.tag;if(s===5||s===26||s===27||s===6)return n;for(n=n.child;n!==null;){if(s=y(n),s!==null)return s;n=n.sibling}return null}var m=Object.assign,b=Symbol.for("react.element"),w=Symbol.for("react.transitional.element"),_=Symbol.for("react.portal"),x=Symbol.for("react.fragment"),E=Symbol.for("react.strict_mode"),A=Symbol.for("react.profiler"),M=Symbol.for("react.consumer"),j=Symbol.for("react.context"),z=Symbol.for("react.forward_ref"),Y=Symbol.for("react.suspense"),K=Symbol.for("react.suspense_list"),q=Symbol.for("react.memo"),F=Symbol.for("react.lazy"),J=Symbol.for("react.activity"),le=Symbol.for("react.memo_cache_sentinel"),se=Symbol.iterator;function ye(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 Qe(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 x:return"Fragment";case A:return"Profiler";case E:return"StrictMode";case Y:return"Suspense";case K:return"SuspenseList";case J:return"Activity"}if(typeof n=="object")switch(n.$$typeof){case _:return"Portal";case j:return n.displayName||"Context";case M:return(n._context.displayName||"Context")+".Consumer";case z:var s=n.render;return n=n.displayName,n||(n=s.displayName||s.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case q:return s=n.displayName||null,s!==null?s:Qe(n.type)||"Memo";case F:s=n._payload,n=n._init;try{return Qe(n(s))}catch{}}return null}var Ie=Array.isArray,$=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Q=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,oe={pending:!1,data:null,method:null,action:null},xe=[],ke=-1;function C(n){return{current:n}}function G(n){0>ke||(n.current=xe[ke],xe[ke]=null,ke--)}function X(n,s){ke++,xe[ke]=n.current,n.current=s}var W=C(null),ae=C(null),pe=C(null),Se=C(null);function Je(n,s){switch(X(pe,s),X(ae,n),X(W,null),s.nodeType){case 9:case 11:n=(n=s.documentElement)&&(n=n.namespaceURI)?Ym(n):0;break;default:if(n=s.tagName,s=s.namespaceURI)s=Ym(s),n=Qm(s,n);else switch(n){case"svg":n=1;break;case"math":n=2;break;default:n=0}}G(W),X(W,n)}function Ue(){G(W),G(ae),G(pe)}function Ln(n){n.memoizedState!==null&&X(Se,n);var s=W.current,i=Qm(s,n.type);s!==i&&(X(ae,n),X(W,i))}function Dn(n){ae.current===n&&(G(W),G(ae)),Se.current===n&&(G(Se),ki._currentValue=oe)}var ur,za;function Sn(n){if(ur===void 0)try{throw Error()}catch(i){var s=i.stack.trim().match(/\n( *(at )?)/);ur=s&&s[1]||"",za=-1<i.stack.indexOf(` 3 at`)?" (<anonymous>)":-1<i.stack.indexOf("@")?"@unknown:0:0":""}return` 4`+ur+n+za}var Pa=!1;function Ms(n,s){if(!n||Pa)return"";Pa=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(s){var V=function(){throw Error()};if(Object.defineProperty(V.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(V,[])}catch(B){var P=B}Reflect.construct(n,[],V)}else{try{V.call()}catch(B){P=B}n.call(V.prototype)}}else{try{throw Error()}catch(B){P=B}(V=n())&&typeof V.catch=="function"&&V.catch(function(){})}}catch(B){if(B&&P&&typeof B.stack=="string")return[B.stack,P.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var h=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");h&&h.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var d=l.DetermineComponentFrameRoot(),v=d[0],S=d[1];if(v&&S){var k=v.split(` 5`),U=S.split(` 6`);for(h=l=0;l<k.length&&!k[l].includes("DetermineComponentFrameRoot");)l++;for(;h<U.length&&!U[h].includes("DetermineComponentFrameRoot");)h++;if(l===k.length||h===U.length)for(l=k.length-1,h=U.length-1;1<=l&&0<=h&&k[l]!==U[h];)h--;for(;1<=l&&0<=h;l--,h--)if(k[l]!==U[h]){if(l!==1||h!==1)do if(l--,h--,0>h||k[l]!==U[h]){var I=` 7`+k[l].replace(" at new "," at ");return n.displayName&&I.includes("<anonymous>")&&(I=I.replace("<anonymous>",n.displayName)),I}while(1<=l&&0<=h);break}}}finally{Pa=!1,Error.prepareStackTrace=i}return(i=n?n.displayName||n.name:"")?Sn(i):""}function yo(n,s){switch(n.tag){case 26:case 27:case 5:return Sn(n.type);case 16:return Sn("Lazy");case 13:return n.child!==s&&s!==null?Sn("Suspense Fallback"):Sn("Suspense");case 19:return Sn("SuspenseList");case 0:case 15:return Ms(n.type,!1);case 11:return Ms(n.type.render,!1);case 1:return Ms(n.type,!0);case 31:return Sn("Activity");default:return""}}function Un(n){try{var s="",i=null;do s+=yo(n,i),i=n,n=n.return;while(n);return s}catch(l){return` 8Error generating stack: `+l.message+` 9`+l.stack}}var Xr=Object.prototype.hasOwnProperty,un=t.unstable_scheduleCallback,Ba=t.unstable_cancelCallback,vo=t.unstable_shouldYield,zu=t.unstable_requestPaint,wt=t.unstable_now,Be=t.unstable_getCurrentPriorityLevel,pt=t.unstable_ImmediatePriority,Tn=t.unstable_UserBlockingPriority,Ns=t.unstable_NormalPriority,xw=t.unstable_LowPriority,kd=t.unstable_IdlePriority,Aw=t.log,kw=t.unstable_setDisableYieldValue,$a=null,It=null;function cr(n){if(typeof Aw=="function"&&kw(n),It&&typeof It.setStrictMode=="function")try{It.setStrictMode($a,n)}catch{}}var qt=Math.clz32?Math.clz32:jw,Ow=Math.log,Cw=Math.LN2;function jw(n){return n>>>=0,n===0?32:31-(Ow(n)/Cw|0)|0}var bo=256,wo=262144,_o=4194304;function Zr(n){var s=n&42;if(s!==0)return s;switch(n&-n){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return n&261888;case 262144:case 524288:case 1048576:case 2097152:return n&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return n&62914560;case 67108864:return 67108864;
vendor: 10,540 bytes, line 9
9case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return n}}function So(n,s,i){var l=n.pendingLanes;if(l===0)return 0;var h=0,d=n.suspendedLanes,v=n.pingedLanes;n=n.warmLanes;var S=l&134217727;return S!==0?(l=S&~d,l!==0?h=Zr(l):(v&=S,v!==0?h=Zr(v):i||(i=S&~n,i!==0&&(h=Zr(i))))):(S=l&~d,S!==0?h=Zr(S):v!==0?h=Zr(v):i||(i=l&~n,i!==0&&(h=Zr(i)))),h===0?0:s!==0&&s!==h&&(s&d)===0&&(d=h&-h,i=s&-s,d>=i||d===32&&(i&4194048)!==0)?s:h}function Ia(n,s){return(n.pendingLanes&~(n.suspendedLanes&~n.pingedLanes)&s)===0}function Mw(n,s){switch(n){case 1:case 2:case 4:case 8:case 64:return s+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return s+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Od(){var n=_o;return _o<<=1,(_o&62914560)===0&&(_o=4194304),n}function Pu(n){for(var s=[],i=0;31>i;i++)s.push(n);return s}function qa(n,s){n.pendingLanes|=s,s!==268435456&&(n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0)}function Nw(n,s,i,l,h,d){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,k=n.expirationTimes,U=n.hiddenUpdates;for(i=v&~i;0<i;){var I=31-qt(i),V=1<<I;S[I]=0,k[I]=-1;var P=U[I];if(P!==null)for(U[I]=null,I=0;I<P.length;I++){var B=P[I];B!==null&&(B.lane&=-536870913)}i&=~V}l!==0&&Cd(n,l,0),d!==0&&h===0&&n.tag!==0&&(n.suspendedLanes|=d&~(v&~s))}function Cd(n,s,i){n.pendingLanes|=s,n.suspendedLanes&=~s;var l=31-qt(s);n.entangledLanes|=s,n.entanglements[l]=n.entanglements[l]|1073741824|i&261930}function jd(n,s){var i=n.entangledLanes|=s;for(n=n.entanglements;i;){var l=31-qt(i),h=1<<l;h&s|n[l]&s&&(n[l]|=s),i&=~h}}function Md(n,s){var i=s&-s;return i=(i&42)!==0?1:Bu(i),(i&(n.suspendedLanes|s))!==0?0:i}function Bu(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 $u(n){return n&=-n,2<n?8<n?(n&134217727)!==0?32:268435456:8:2}function Nd(){var n=Q.p;return n!==0?n:(n=window.event,n===void 0?32:vy(n.type))}function Ld(n,s){var i=Q.p;try{return Q.p=n,s()}finally{Q.p=i}}var hr=Math.random().toString(36).slice(2),gt="__reactFiber$"+hr,Ct="__reactProps$"+hr,Ls="__reactContainer$"+hr,Iu="__reactEvents$"+hr,Lw="__reactListeners$"+hr,Dw="__reactHandles$"+hr,Dd="__reactResources$"+hr,Ha="__reactMarker$"+hr;function qu(n){delete n[gt],delete n[Ct],delete n[Iu],delete n[Lw],delete n[Dw]}function Ds(n){var s=n[gt];if(s)return s;for(var i=n.parentNode;i;){if(s=i[Ls]||i[gt]){if(i=s.alternate,s.child!==null||i!==null&&i.child!==null)for(n=ny(n);n!==null;){if(i=n[gt])return i;n=ny(n)}return s}n=i,i=n.parentNode}return null}function Us(n){if(n=n[gt]||n[Ls]){var s=n.tag;if(s===5||s===6||s===13||s===31||s===26||s===27||s===3)return n}return null}function Ga(n){var s=n.tag;if(s===5||s===26||s===27||s===6)return n.stateNode;throw Error(a(33))}function zs(n){var s=n[Dd];return s||(s=n[Dd]={hoistableStyles:new Map,hoistableScripts:new Map}),s}function ut(n){n[Ha]=!0}var Ud=new Set,zd={};function Wr(n,s){Ps(n,s),Ps(n+"Capture",s)}function Ps(n,s){for(zd[n]=s,n=0;n<s.length;n++)Ud.add(s[n])}var Uw=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]*$"),Pd={},Bd={};function zw(n){return Xr.call(Bd,n)?!0:Xr.call(Pd,n)?!1:Uw.test(n)?Bd[n]=!0:(Pd[n]=!0,!1)}function To(n,s,i){if(zw(s))if(i===null)n.removeAttribute(s);else{switch(typeof i){case"undefined":case"function":case"symbol":n.removeAttribute(s);return;case"boolean":var l=s.toLowerCase().slice(0,5);if(l!=="data-"&&l!=="aria-"){n.removeAttribute(s);return}}n.setAttribute(s,""+i)}}function Eo(n,s,i){if(i===null)n.removeAttribute(s);else{switch(typeof i){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(s);return}n.setAttribute(s,""+i)}}function zn(n,s,i,l){if(l===null)n.removeAttribute(i);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(i);return}n.setAttributeNS(s,i,""+l)}}function Xt(n){switch(typeof n){case"bigint":case"boolean":case"number":case"string":case"undefined":return n;case"object":return n;default:return""}}function $d(n){var s=n.type;return(n=n.nodeName)&&n.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function Pw(n,s,i){var l=Object.getOwnPropertyDescriptor(n.constructor.prototype,s);if(!n.hasOwnProperty(s)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var h=l.get,d=l.set;return Object.defineProperty(n,s,{configurable:!0,get:function(){return h.call(this)},set:function(v){i=""+v,d.call(this,v)}}),Object.defineProperty(n,s,{enumerable:l.enumerable}),{getValue:function(){return i},setValue:function(v){i=""+v},stopTracking:function(){n._valueTracker=null,delete n[s]}}}}function Hu(n){if(!n._valueTracker){var s=$d(n)?"checked":"value";n._valueTracker=Pw(n,s,""+n[s])}}function Id(n){if(!n)return!1;var s=n._valueTracker;if(!s)return!0;var i=s.getValue(),l="";return n&&(l=$d(n)?n.checked?"true":"false":n.value),n=l,n!==i?(s.setValue(n),!0):!1}function Ro(n){if(n=n||(typeof document<"u"?document:void 0),typeof n>"u")return null;try{return n.activeElement||n.body}catch{return n.body}}var Bw=/[\n"\\]/g;function Zt(n){return n.replace(Bw,function(s){return"\\"+s.charCodeAt(0).toString(16)+" "})}function Gu(n,s,i,l,h,d,v,S){n.name="",v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"?n.type=v:n.removeAttribute("type"),s!=null?v==="number"?(s===0&&n.value===""||n.value!=s)&&(n.value=""+Xt(s)):n.value!==""+Xt(s)&&(n.value=""+Xt(s)):v!=="submit"&&v!=="reset"||n.removeAttribute("value"),s!=null?Vu(n,v,Xt(s)):i!=null?Vu(n,v,Xt(i)):l!=null&&n.removeAttribute("value"),h==null&&d!=null&&(n.defaultChecked=!!d),h!=null&&(n.checked=h&&typeof h!="function"&&typeof h!="symbol"),S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"?n.name=""+Xt(S):n.removeAttribute("name")}function qd(n,s,i,l,h,d,v,S){if(d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"&&(n.type=d),s!=null||i!=null){if(!(d!=="submit"&&d!=="reset"||s!=null)){Hu(n);return}i=i!=null?""+Xt(i):"",s=s!=null?""+Xt(s):i,S||s===n.value||(n.value=s),n.defaultValue=s}l=l??h,l=typeof l!="function"&&typeof l!="symbol"&&!!l,n.checked=S?n.checked:!!l,n.defaultChecked=!!l,v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"&&(n.name=v),Hu(n)}function Vu(n,s,i){s==="number"&&Ro(n.ownerDocument)===n||n.defaultValue===""+i||(n.defaultValue=""+i)}function Bs(n,s,i,l){if(n=n.options,s){s={};for(var h=0;h<i.length;h++)s["$"+i[h]]=!0;for(i=0;i<n.length;i++)h=s.hasOwnProperty("$"+n[i].value),n[i].selected!==h&&(n[i].selected=h),h&&l&&(n[i].defaultSelected=!0)}else{for(i=""+Xt(i),s=null,h=0;h<n.length;h++){if(n[h].value===i){n[h].selected=!0,l&&(n[h].defaultSelected=!0);return}s!==null||n[h].disabled||(s=n[h])}s!==null&&(s.selected=!0)}}function Hd(n,s,i){if(s!=null&&(s=""+Xt(s),s!==n.value&&(n.value=s),i==null)){n.defaultValue!==s&&(n.defaultValue=s);return}n.defaultValue=i!=null?""+Xt(i):""}function Gd(n,s,i,l){if(s==null){if(l!=null){if(i!=null)throw Error(a(92));if(Ie(l)){if(1<l.length)throw Error(a(93));l=l[0]}i=l}i==null&&(i=""),s=i}i=Xt(s),n.defaultValue=i,l=n.textContent,l===i&&l!==""&&l!==null&&(n.value=l),Hu(n)}function $s(n,s){if(s){var i=n.firstChild;if(i&&i===n.lastChild&&i.nodeType===3){i.nodeValue=s;return}}n.textContent=s}var $w=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 Vd(n,s,i){var l=s.indexOf("--")===0;i==null||typeof i=="boolean"||i===""?l?n.setProperty(s,""):s==="float"?n.cssFloat="":n[s]="":l?n.setProperty(s,i):typeof i!="number"||i===0||$w.has(s)?s==="float"?n.cssFloat=i:n[s]=(""+i).trim():n[s]=i+"px"}function Kd(n,s,i){if(s!=null&&typeof s!="object")throw Error(a(62));if(n=n.style,i!=null){for(var l in i)!i.hasOwnProperty(l)||s!=null&&s.hasOwnProperty(l)||(l.indexOf("--")===0?n.setProperty(l,""):l==="float"?n.cssFloat="":n[l]="");for(var h in s)l=s[h],s.hasOwnProperty(h)&&i[h]!==l&&Vd(n,h,l)}else for(var d in s)s.hasOwnProperty(d)&&Vd(n,d,s[d])}function Ku(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 Iw=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRen
9dering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),qw=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function xo(n){return qw.test(""+n)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":n}function Pn(){}var Fu=null;function Yu(n){return n=n.target||n.srcElement||window,n.correspondingUseElement&&(n=n.correspondingUseElement),n.nodeType===3?n.parentNode:n}var Is=null,qs=null;function Fd(n){var s=Us(n);if(s&&(n=s.stateNode)){var i=n[Ct]||null;e:switch(n=s.stateNode,s.type){case"input":if(Gu(n,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name),s=i.name,i.type==="radio"&&s!=null){for(i=n;i.parentNode;)i=i.parentNode;for(i=i.querySelectorAll('input[name="'+Zt(""+s)+'"][type="radio"]'),s=0;s<i.length;s++){var l=i[s];if(l!==n&&l.form===n.form){var h=l[Ct]||null;if(!h)throw Error(a(90));Gu(l,h.value,h.defaultValue,h.defaultValue,h.checked,h.defaultChecked,h.type,h.name)}}for(s=0;s<i.length;s++)l=i[s],l.form===n.form&&Id(l)}break e;case"textarea":Hd(n,i.value,i.defaultValue);break e;case"select":s=i.value,s!=null&&Bs(n,!!i.multiple,s,!1)}}}var Qu=!1;function Yd(n,s,i){if(Qu)return n(s,i);Qu=!0;try{var l=n(s);return l}finally{if(Qu=!1,(Is!==null||qs!==null)&&(dl(),Is&&(s=Is,n=qs,qs=Is=null,Fd(s),n)))for(s=0;s<n.length;s++)Fd(n[s])}}function Va(n,s){var i=n.stateNode;if(i===null)return null;var l=i[Ct]||null;if(l===null)return null;i=l[s];e:switch(s){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(l=!l.disabled)||(n=n.type,l=!(n==="button"||n==="input"||n==="select"||n==="textarea")),n=!l;break e;default:n=!1}if(n)return null;if(i&&typeof i!="function")throw Error(a(231,s,typeof i));return i}var Bn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ju=!1;if(Bn)try{var Ka={};Object.defineProperty(Ka,"passive",{get:function(){Ju=!0}}),window.addEventListener("test",Ka,Ka),window.removeEventListener("test",Ka,Ka)}catch{Ju=!1}var fr=null,Xu=null,Ao=null;function Qd(){if(Ao)return Ao;var n,s=Xu,i=s.length,l,h="value"in fr?fr.value:fr.textContent,d=h.length;for(n=0;n<i&&s[n]===h[n];n++);var v=i-n;for(l=1;l<=v&&s[i-l]===h[d-l];l++);return Ao=h.slice(n,1<l?1-l:void 0)}function ko(n){var s=n.keyCode;return"charCode"in n?(n=n.charCode,n===0&&s===13&&(n=13)):n=s,n===10&&(n=13),32<=n||n===13?n:0}function Oo(){return!0}function Jd(){return!1}function jt(n){function s(i,l,h,d,v){this._reactName=i,this._targetInst=h,this.type=l,this.nativeEvent=d,this.target=v,this.currentTarget=null;for(var S in n)n.hasOwnProperty(S)&&(i=n[S],this[S]=i?i(d):d[S]);return this.isDefaultPrevented=(d.defaultPrevented!=null?d.defaultPrevented:d.returnValue===!1)?Oo:Jd,this.isPropagationStopped=Jd,this}return m(s.prototype,{preventDefault:function(){this.defaultPrevented=!0;var i=this.nativeEvent;i&&(i.preventDefault?i.preventDefault():typeof i.returnValue!="unknown"&&(i.returnValue=!1),this.isDefaultPrevented=Oo)},stopPropagation:function(){var i=this.nativeEvent;i&&(i.stopPropagation?i.stopPropagation():typeof i.cancelBubble!="unknown"&&(i.cancelBubble=!0),this.isPropagationStopped=Oo)},persist:function(){},isPersistent:Oo}),s}var es={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(n){return n.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Co=jt(es),Fa=m({},es,{view:0,detail:0}),Hw=jt(Fa),Zu,Wu,Ya,jo=m({},Fa,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:tc,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!==Ya&&(Ya&&n.type==="mousemove"?(Zu=n.screenX-Ya.screenX,Wu=n.screenY-Ya.screenY):Wu=Zu=0,Ya=n),Zu)},movementY:function(n){return"movementY"in n?n.movementY:Wu}}),Xd=jt(jo),Gw=m({},jo,{dataTransfer:0}),Vw=jt(Gw),Kw=m({},Fa,{relatedTarget:0}),ec=jt(Kw),Fw=m({},es,{animationName:0,elapsedTime:0,pseudoElement:0}),Yw=jt(Fw),Qw=m({},es,{clipboardData:function(n){return"clipboardData"in n?n.clipboardData:window.clipboardData}}),Jw=jt(Qw),Xw=m({},es,{data:0}),Zd=jt(Xw),Zw={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Ww={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"},e_={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function t_(n){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(n):(n=e_[n])?!!s[n]:!1}function tc(){return t_}var n_=m({},Fa,{key:function(n){if(n.key){var s=Zw[n.key]||n.key;if(s!=="Unidentified")return s}
vendor: 5,186 bytes, line 9
9return n.type==="keypress"?(n=ko(n),n===13?"Enter":String.fromCharCode(n)):n.type==="keydown"||n.type==="keyup"?Ww[n.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:tc,charCode:function(n){return n.type==="keypress"?ko(n):0},keyCode:function(n){return n.type==="keydown"||n.type==="keyup"?n.keyCode:0},which:function(n){return n.type==="keypress"?ko(n):n.type==="keydown"||n.type==="keyup"?n.keyCode:0}}),r_=jt(n_),s_=m({},jo,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Wd=jt(s_),a_=m({},Fa,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:tc}),i_=jt(a_),o_=m({},es,{propertyName:0,elapsedTime:0,pseudoElement:0}),l_=jt(o_),u_=m({},jo,{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}),c_=jt(u_),h_=m({},es,{newState:0,oldState:0}),f_=jt(h_),d_=[9,13,27,32],nc=Bn&&"CompositionEvent"in window,Qa=null;Bn&&"documentMode"in document&&(Qa=document.documentMode);var p_=Bn&&"TextEvent"in window&&!Qa,ep=Bn&&(!nc||Qa&&8<Qa&&11>=Qa),tp=" ",np=!1;function rp(n,s){switch(n){case"keyup":return d_.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function sp(n){return n=n.detail,typeof n=="object"&&"data"in n?n.data:null}var Hs=!1;function g_(n,s){switch(n){case"compositionend":return sp(s);case"keypress":return s.which!==32?null:(np=!0,tp);case"textInput":return n=s.data,n===tp&&np?null:n;default:return null}}function m_(n,s){if(Hs)return n==="compositionend"||!nc&&rp(n,s)?(n=Qd(),Ao=Xu=fr=null,Hs=!1,n):null;switch(n){case"paste":return null;case"keypress":if(!(s.ctrlKey||s.altKey||s.metaKey)||s.ctrlKey&&s.altKey){if(s.char&&1<s.char.length)return s.char;if(s.which)return String.fromCharCode(s.which)}return null;case"compositionend":return ep&&s.locale!=="ko"?null:s.data;default:return null}}var y_={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 ap(n){var s=n&&n.nodeName&&n.nodeName.toLowerCase();return s==="input"?!!y_[n.type]:s==="textarea"}function ip(n,s,i,l){Is?qs?qs.push(l):qs=[l]:Is=l,s=wl(s,"onChange"),0<s.length&&(i=new Co("onChange","change",null,i,l),n.push({event:i,listeners:s}))}var Ja=null,Xa=null;function v_(n){qm(n,0)}function Mo(n){var s=Ga(n);if(Id(s))return n}function op(n,s){if(n==="change")return s}var lp=!1;if(Bn){var rc;if(Bn){var sc="oninput"in document;if(!sc){var up=document.createElement("div");up.setAttribute("oninput","return;"),sc=typeof up.oninput=="function"}rc=sc}else rc=!1;lp=rc&&(!document.documentMode||9<document.documentMode)}function cp(){Ja&&(Ja.detachEvent("onpropertychange",hp),Xa=Ja=null)}function hp(n){if(n.propertyName==="value"&&Mo(Xa)){var s=[];ip(s,Xa,n,Yu(n)),Yd(v_,s)}}function b_(n,s,i){n==="focusin"?(cp(),Ja=s,Xa=i,Ja.attachEvent("onpropertychange",hp)):n==="focusout"&&cp()}function w_(n){if(n==="selectionchange"||n==="keyup"||n==="keydown")return Mo(Xa)}function __(n,s){if(n==="click")return Mo(s)}function S_(n,s){if(n==="input"||n==="change")return Mo(s)}function T_(n,s){return n===s&&(n!==0||1/n===1/s)||n!==n&&s!==s}var Ht=typeof Object.is=="function"?Object.is:T_;function Za(n,s){if(Ht(n,s))return!0;if(typeof n!="object"||n===null||typeof s!="object"||s===null)return!1;var i=Object.keys(n),l=Object.keys(s);if(i.length!==l.length)return!1;for(l=0;l<i.length;l++){var h=i[l];if(!Xr.call(s,h)||!Ht(n[h],s[h]))return!1}return!0}function fp(n){for(;n&&n.firstChild;)n=n.firstChild;return n}function dp(n,s){var i=fp(n);n=0;for(var l;i;){if(i.nodeType===3){if(l=n+i.textContent.length,n<=s&&l>=s)return{node:i,offset:s-n};n=l}e:{for(;i;){if(i.nextSibling){i=i.nextSibling;break e}i=i.parentNode}i=void 0}i=fp(i)}}function pp(n,s){return n&&s?n===s?!0:n&&n.nodeType===3?!1:s&&s.nodeType===3?pp(n,s.parentNode):"contains"in n?n.contains(s):n.compareDocumentPosition?!!(n.compareDocumentPosition(s)&16):!1:!1}function gp(n){n=n!=null&&n.ownerDocument!=null&&n.ownerDocument.defaultView!=null?n.ownerDocument.defaultView:window;for(var s=Ro(n.document);s instanceof n.HTMLIFrameElement;){try{var i=typeof s.contentWindow.location.href=="string"}catch{i=!1}if(i)n=s.contentWindow;else break;s=Ro(n.document)}return s}function ac(n){var s=n&&n.nodeName&&n.nodeName.toLowerCase();return s&&(s==="input"&&(n.type==="text"||n.type==="search"||n.type==="tel"||n.type==="url"||n.type==="password")||s==="textarea"||n.contentEditable==="true")}var E_=Bn&&"documentMode"in document&&11>=document.documentMode,Gs=null,ic=null,Wa=null,oc=!1;function mp(n,s,i){var l=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;oc||Gs==null||Gs!==Ro(l)||(l=Gs,"selectionStart"in l&&ac(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focu
vendor: 18,999 bytes, line 9
9sNode:l.focusNode,focusOffset:l.focusOffset}),Wa&&Za(Wa,l)||(Wa=l,l=wl(ic,"onSelect"),0<l.length&&(s=new Co("onSelect","select",null,s,i),n.push({event:s,listeners:l}),s.target=Gs)))}function ts(n,s){var i={};return i[n.toLowerCase()]=s.toLowerCase(),i["Webkit"+n]="webkit"+s,i["Moz"+n]="moz"+s,i}var Vs={animationend:ts("Animation","AnimationEnd"),animationiteration:ts("Animation","AnimationIteration"),animationstart:ts("Animation","AnimationStart"),transitionrun:ts("Transition","TransitionRun"),transitionstart:ts("Transition","TransitionStart"),transitioncancel:ts("Transition","TransitionCancel"),transitionend:ts("Transition","TransitionEnd")},lc={},yp={};Bn&&(yp=document.createElement("div").style,"AnimationEvent"in window||(delete Vs.animationend.animation,delete Vs.animationiteration.animation,delete Vs.animationstart.animation),"TransitionEvent"in window||delete Vs.transitionend.transition);function ns(n){if(lc[n])return lc[n];if(!Vs[n])return n;var s=Vs[n],i;for(i in s)if(s.hasOwnProperty(i)&&i in yp)return lc[n]=s[i];return n}var vp=ns("animationend"),bp=ns("animationiteration"),wp=ns("animationstart"),R_=ns("transitionrun"),x_=ns("transitionstart"),A_=ns("transitioncancel"),_p=ns("transitionend"),Sp=new Map,uc="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(" ");uc.push("scrollEnd");function cn(n,s){Sp.set(n,s),Wr(s,[n])}var No=typeof reportError=="function"?reportError:function(n){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var s=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof n=="object"&&n!==null&&typeof n.message=="string"?String(n.message):String(n),error:n});if(!window.dispatchEvent(s))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",n);return}console.error(n)},Wt=[],Ks=0,cc=0;function Lo(){for(var n=Ks,s=cc=Ks=0;s<n;){var i=Wt[s];Wt[s++]=null;var l=Wt[s];Wt[s++]=null;var h=Wt[s];Wt[s++]=null;var d=Wt[s];if(Wt[s++]=null,l!==null&&h!==null){var v=l.pending;v===null?h.next=h:(h.next=v.next,v.next=h),l.pending=h}d!==0&&Tp(i,h,d)}}function Do(n,s,i,l){Wt[Ks++]=n,Wt[Ks++]=s,Wt[Ks++]=i,Wt[Ks++]=l,cc|=l,n.lanes|=l,n=n.alternate,n!==null&&(n.lanes|=l)}function hc(n,s,i,l){return Do(n,s,i,l),Uo(n)}function rs(n,s){return Do(n,null,null,s),Uo(n)}function Tp(n,s,i){n.lanes|=i;var l=n.alternate;l!==null&&(l.lanes|=i);for(var h=!1,d=n.return;d!==null;)d.childLanes|=i,l=d.alternate,l!==null&&(l.childLanes|=i),d.tag===22&&(n=d.stateNode,n===null||n._visibility&1||(h=!0)),n=d,d=d.return;return n.tag===3?(d=n.stateNode,h&&s!==null&&(h=31-qt(i),n=d.hiddenUpdates,l=n[h],l===null?n[h]=[s]:l.push(s),s.lane=i|536870912),d):null}function Uo(n){if(50<_i)throw _i=0,wh=null,Error(a(185));for(var s=n.return;s!==null;)n=s,s=n.return;return n.tag===3?n.stateNode:null}var Fs={};function k_(n,s,i,l){this.tag=n,this.key=i,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=s,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Gt(n,s,i,l){return new k_(n,s,i,l)}function fc(n){return n=n.prototype,!(!n||!n.isReactComponent)}function $n(n,s){var i=n.alternate;return i===null?(i=Gt(n.tag,s,n.key,n.mode),i.elementType=n.elementType,i.type=n.type,i.stateNode=n.stateNode,i.alternate=n,n.alternate=i):(i.pendingProps=s,i.type=n.type,i.flags=0,i.subtreeFlags=0,i.deletions=null),i.flags=n.flags&65011712,i.childLanes=n.childLanes,i.lanes=n.lanes,i.child=n.child,i.memoizedProps=n.memoizedProps,i.memoizedState=n.memoizedState,i.updateQueue=n.updateQueue,s=n.dependencies,i.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},i.sibling=n.sibling,i.index=n.index,i.ref=n.ref,i.refCleanup=n.refCleanup,i}function Ep(n,s){n.flags&=65011714;var i=n.alternate;return i===null?(n.childLanes=0,n.lanes=s,n.child=null,n.subtreeFlags=0,n.memoizedProps=null,n.memoizedState=null,n.updateQueue=null,n.dependencies=null,n.stateNode=null):(n.childLanes=i.childLanes,n.lanes=i.lanes,n.child=i.child,n.subtreeFlags=0,n.deletions=null,n.memoizedProps=i.memoizedProps,n.memoizedState=i.memoizedState,n.updateQueue=i.updateQueue,n.type=i.type,s=i.dependencies,n.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext}),n}function zo(n,s,i,l,h,d){var v=0;if(l=n,typeof n=="function")fc(n)&&(v=1);else if(typeof n=="string")v=NS(n,i,W.current)?26:n==="html"||n==="head"||n==="body"?27:5;else e:switch(n){case J:return n=Gt(31,i,s,h),n.elementType=J,n.lanes=d,n;case x:return ss(i.children,h,d,s);case E:v=8,h|=24;break;case A:return n=Gt(12,i,s,h|2),n.elementType=A,n.lanes=d,n;case Y:return n=Gt(13,i,s,h),n.elementType=Y,n.lanes=d,n;case K:return n=Gt(19,i,s,h),n.elementType=K,n.lanes=d,n;default:if(typeof n=="object"&&n!==null)switch(n.$$typeof){case j:v=10;break e;case M:v=9;break e;case z:v=11;break e;case q:v=14;break e;case F:v=16,l=null;break e}v=29,i=Error(a(130,n===null?"null":typeof n,"")),l=null}return s=Gt(v,i,s,h),s.elementType=n,s.type=l,s.lanes=d,s}function ss(n,s,i,l){return n=Gt(7,n,l,s),n.lanes=i,n}function dc(n,s,i){return n=Gt(6,n,null,s),n.lanes=i,n}function Rp(n){var s=Gt(18,null,null,0);return s.stateNode=n,s}function pc(n,s,i){return s=Gt(4,n.children!==null?n.children:[],n.key,s),s.lanes=i,s.stateNode={containerInfo:n.containerInfo,pendingChildren:null,implementation:n.implementation},s}var xp=new WeakMap;function en(n,s){if(typeof n=="object"&&n!==null){var i=xp.get(n);return i!==void 0?i:(s={value:n,source:s,stack:Un(s)},xp.set(n,s),s)}return{value:n,source:s,stack:Un(s)}}var Ys=[],Qs=0,Po=null,ei=0,tn=[],nn=0,dr=null,En=1,Rn="";function In(n,s){Ys[Qs++]=ei,Ys[Qs++]=Po,Po=n,ei=s}function Ap(n,s,i){tn[nn++]=En,tn[nn++]=Rn,tn[nn++]=dr,dr=n;var l=En;n=Rn;var h=32-qt(l)-1;l&=~(1<<h),i+=1;var d=32-qt(s)+h;if(30<d){var v=h-h%5;d=(l&(1<<v)-1).toString(32),l>>=v,h-=v,En=1<<32-qt(s)+h|i<<h|l,Rn=d+n}else En=1<<d|i<<h|l,Rn=n}function gc(n){n.return!==null&&(In(n,1),Ap(n,1,0))}function mc(n){for(;n===Po;)Po=Ys[--Qs],Ys[Qs]=null,ei=Ys[--Qs],Ys[Qs]=null;for(;n===dr;)dr=tn[--nn],tn[nn]=null,Rn=tn[--nn],tn[nn]=null,En=tn[--nn],tn[nn]=null}function kp(n,s){tn[nn++]=En,tn[nn++]=Rn,tn[nn++]=dr,En=s.id,Rn=s.overflow,dr=n}var mt=null,qe=null,we=!1,pr=null,rn=!1,yc=Error(a(519));function gr(n){var s=Error(a(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw ti(en(s,n)),yc}function Op(n){var s=n.stateNode,i=n.type,l=n.memoizedProps;switch(s[gt]=n,s[Ct]=l,i){case"dialog":me("cancel",s),me("close",s);break;case"iframe":case"object":case"embed":me("load",s);break;case"video":case"audio":for(i=0;i<Ti.length;i++)me(Ti[i],s);break;case"source":me("error",s);break;case"img":case"image":case"link":me("error",s),me("load",s);break;case"details":me("toggle",s);break;case"input":me("invalid",s),qd(s,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0);break;case"select":me("invalid",s);break;case"textarea":me("invalid",s),Gd(s,l.value,l.defaultValue,l.children)}i=l.children,typeof i!="string"&&typeof i!="number"&&typeof i!="bigint"||s.textContent===""+i||l.suppressHydrationWarning===!0||Km(s.textContent,i)?(l.popover!=null&&(me("beforetoggle",s),me("toggle",s)),l.onScroll!=null&&me("scroll",s),l.onScrollEnd!=null&&me("scrollend",s),l.onClick!=null&&(s.onclick=Pn),s=!0):s=!1,s||gr(n,!0)}function Cp(n){for(mt=n.return;mt;)switch(mt.tag){case 5:case 31:case 13:rn=!1;return;case 27:case 3:rn=!0;return;default:mt=mt.return}}function Js(n){if(n!==mt)return!1;if(!we)return Cp(n),we=!0,!1;var s=n.tag,i;if((i=s!==3&&s!==27)&&((i=s===5)&&(i=n.type,i=!(i!=="form"&&i!=="button")||Dh(n.type,n.memoizedProps)),i=!i),i&&qe&&gr(n),Cp(n),s===13){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(a(317));qe=ty(n)}else if(s===31){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(a(317));qe=ty(n)}else s===27?(s=qe,Or(n.type)?(n=$h,$h=null,qe=n):qe=s):qe=mt?an(n.stateNode.nextSibling):null;return!0}function as(){qe=mt=null,we=!1}function vc(){var n=pr;return n!==null&&(Dt===null?Dt=n:Dt.push.apply(Dt,n),pr=null),n}function ti(n){pr===null?pr=[n]:pr.push(n)}var bc=C(null),is=null,qn=null;function mr(n,s,i){X(bc,s._currentValue),s._currentValue=i}function Hn(n){n._currentValue=bc.current,G(bc)}function wc(n,s,i){for(;n!==null;){var l=n.alternate;if((n.childLanes&s)!==s?(n.childLanes|=s,l!==null&&(l.childLanes|=s)):l!==null&&(l.childLanes&s)!==s&&(l.childLanes|=s),n===i)break;n=n.return}}function _c(n,s,i,l){var h=n.child;for(h!==null&&(h.return=n);h!==null;){var d=h.dependencies;if(d!==null){var v=h.child;d=d.firstContext;e:for(;d!==null;){var S=d;d=h;for(var k=0;k<s.length;k++)if(S.context===s[k]){d.lanes|=i,S=d.alternate,S!==null&&(S.lanes|=i),wc(d.return,i,n),l||(v=null);break e}d=S.next}}else if(h.tag===18){if(v=h.return,v===null)throw Error(a(341));v.lanes|=i,d=v.alternate,d!==null&&(d.lanes|=i),wc(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 Xs(n,s,i,l){n=null;for(var h=s,d=!1;h!==null;){if(!d){if((h.flags&524288)!==0)d=!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;Ht(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(ki):n=[ki])}h=h.return}n!==null&&_c(s,n,i,l),s.flags|=262144}function Bo(n){for(n=n.firstContext;n!==null;){if(!Ht(n.context._currentValue,n.memoizedValue))return!0;n=n.next}return!1}function os(n){is=n,qn=null,n=n.dependencies,n!==null&&(n.firstContext=null)}function yt(n){return jp(is,n)}function $o(n,s){return is===null&&os(n),jp(n,s)}function jp(n,s){var i=s._currentValue;if(s={context:s,memoizedValue:i,next:null},qn===null){if(n===null)throw Error(a(308));qn=s,n.dependencies={lanes:0,firstContext:s},n.flags|=524288}else qn=qn.next=s;return i}var O_=typeof AbortController<"u"?AbortController:function(){var n=[],s=this.signal={aborted:!1,addEventListener:function(i,l){n.push(l)}};this.abort=function(){s.aborted=!0,n.forEach(function(i){return i()})}},C_=t.unstable_scheduleCallback,j_=t.unstable_NormalPriority,tt={$$typeof:j,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Sc(){return{controller:new O_,data:new Map,refCount:0}}function ni(n){n.refCount--,n.refCount===0&&C_(j_,function(){n.controller.abort()})}var ri=null,Tc=0,Zs=0,Ws=null;function M_(n,s){if(ri===null){var i=ri=[];Tc=0,Zs=xh(),Ws={status:"pending",value:void 0,then:function(l){i.push(l)}}}return Tc++,s.then(Mp,Mp),s}function Mp(){if(--Tc===0&&ri!==null){Ws!==null&&(Ws.status="fulfilled");var n=ri;ri=null,Zs=0,Ws=null;for(var s=0;s<n.length;s++)(0,n[s])()}}function N_(n,s){var i=[],l={status:"pending",value:null,reason:null,then:function(h){i.push(h)}};return n.then(function(){l.status="fulfilled",l.value=s;for(var h=0;h<i.length;h++)(0,i[h])(s)},function(h){for(l.status="rejected",l.reason=h,h=0;h<i.length;h++)(0,i[h])(void 0)}),l}var Np=$.S;$.S=function(n,s){mm=wt(),typeof s=="object"&&s!==null&&typeof s.then=="function"&&M_(n,s),Np!==null&&Np(n,s)};var ls=C(null);function Ec(){var n=ls.current;return n!==null?n:ze.pooledCache}function Io(n,s){s===null?X(ls,ls.current):X(ls,s.pool)}function Lp(){var n=Ec();return n===null?null:{parent:tt._currentValue,pool:n}}var ea=Error(a(460)),Rc=Error(a(474)),qo=Error(a(542)),Ho={then:function(){}};function Dp(n){return n=n.status,n==="fulfilled"||n==="rejected"}function Up(n,s,i){switch(i=n[i],i===void 0?n.push(s):i!==s&&(s.then(Pn,Pn),s=i),s.status){case"fulfilled":return s.value;case"rejected":throw n=s.reason,Pp(n),n;default:if(typeof s.status=="string")s.then(Pn,Pn);else{if(n=ze,n!==null&&100<n.shellSuspendCounter)throw Error(a(482));n=s,n.status="pending",n.then(function(l){if(s.status==="pending"){var h=s;h.status="fulfilled",h.value=l}},function(l){if(s.status==="pending"){var h=s;h.status="rejected",h.reason=l}})}switch(s.status){case"fulfilled":return s.value;case"rejected":throw n=s.reason,Pp(n),n}throw cs=s,ea}}function us(n){try{var s=n._init;return s(n._payload)}catch(i){throw i!==null&&typeof i=="object"&&typeof i.then=="function"?(cs=i,ea):i}}var cs=null;function zp(){if(cs===null)throw Error(a(459));var n=cs;return cs=null,n}function Pp(n){if(n===ea||n===qo)throw Error(a(483))}var ta=null,si=0;function Go(n){var s=si;return si+=1,ta===null&&(ta=[]),Up(ta,n,s)}function ai(n,s){s=s.props.ref,n.ref=s!==void 0?s:null}function Vo(n,s){throw s.$$typeof===b?Error(a(525)):(n=Object.prototype.toString.call(s),Error(a(31,n==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":n)))}function Bp(n){function s(N,O){if(n){var D=N.deletions;D===null?(N.deletions=[O],N.flags|=16):D.push(O)}}function i(N,O){if(!n)return null;for(;O!==null;)s(N,O),O=O.sibling;return null}function l(N){for(var O=new Map;N!==null;)N.key!==null?O.set(N.key,N):O.set(N.index,N),N=N.sibling;return O}function h(N,O){return N=$n(N,O),N.index=0,N.sibling=null,N}function d(N,O,D){return N.index=D,n?(D=N.alternate,D!==null?(D=D.index,D<O?(N.flags|=67108866,O):D):(N.flags|=67108866,O)):(N.flags|=1048576,O)}function v(N){return n&&N.alternate===null&&(N.flags|=67108866),N}function S(N,O,D,H){return O===null||O.tag!==6?(O=dc(D,N.mode,H),O.return=N,O):(O=h(O,D),O.return=N,O)}function k(N,O,D,H){var ie=D.type;return ie===x?I(N,O,D.props.children,H,D.key):O!==null&&(O.elementType===ie||typeof ie=="object"&&ie!==null&&ie.$$typeof===F&&us(ie)===O.type)?(O=h(O,D.props),ai(O,D),O.return=N,O):(O=zo(D.type,D.key,D.props,null,N.mode,H),ai(O,D),O.return=N,O)}function U(N,O,D,H){return O===null||O.tag!==4||O.stateNode.containerInfo!==D.containerInfo||O.stateNode.implementation!==D.implementation?(O=pc(D,N.mode,H),O.return=N,O):(O=h(O,D.children||[]),O.return=N,O)}function I(N,O,D,H,ie){return O===null||O.tag!==7?(O=ss(D,N.mode,H,ie),O.return=N,O):(O=h(O,D),O.return=N,O)}function V(N,O,D){if(typeof O=="string"&&O!==""||typeof O=="number"||typeof O=="bigint")return O=dc(""+O,N.mode,D),O.return=N,O;if(typeof O=="object"&&O!==null){switch(O.$$typeof){case w:return D=zo(O.type,O.key,O.props,null,N.mode,D),ai(D,O),D.return=N,D;case _:return O=pc(O,N.mode,D),O.return=N,O;case F:return O=us(O),V(N,O,D)}if(Ie(O)||ye(O))return O=ss(O,N.mode,D,null),O.return=N,O;if(typeof O.then=="function")return V(N,Go(O),D);if(O.$$typeof===j)return V(N,$o(N,O),D);Vo(N,O)}return null}function P(N,O,D,H){var ie=O!==null?O.key:null;if(typeof D=="string"&&D!==""||typeof D=="number"||typeof D=="bigint")return ie!==null?null:S(N,O,""+D,H);if(typeof D=="object"&&D!==null){switch(D.$$typeof){case w:return D.key===ie?k(N,O,D,H):null;case _:return D.key===ie?U(N,O,D,H):null;case F:return D=us(D),P(N,O,D,H)}if(Ie(D)||ye(D))return ie!==null?null:I(N,O,D,H,null);if(typeof D.then=="function")return P(N,O,Go(D),H);if(D.$$typeof===j)return P(N,O,$o(N,D),H);Vo(N,D)}return null}function B(N,O,D,H,ie){if(typeof H=="string"&&H!==""||typeof H=="number"||typeof H=="bigint")return N=N.get(D)||null,S(O,N,""+H,ie);if(typeof H=="object"&&H!==null){switch(H.$$typeof){case w:return N=N.get(H.key===null?D:H.key)||null,k(O,N,H,ie);case _:return N=N.get(H.key===null?D:H.key)||null,U(O,N,H,ie);case F:return H=us(H),B(N,O,D,H,ie)}if(Ie(H)||ye(H))return N=N.get(D)||null,I(O,N,H,ie,null);if(typeof H.then=="function")return B(N,O,D,Go(H),ie);if(H.$$typeof===j)return B(N,O,D,$o(O,H),ie);Vo(O,H)}return null}function te(N,O,D,H){for(var ie=null,Te=null,re=O,de=O=0,be=null;re!==null&&de<D.length;de++){re.index>de?(be=re,re=null):be=re.sibling;var Ee=P(N,re,D[de],H);if(Ee===null){re===null&&(re=be);break}n&&re&&Ee.alternate===null&&s(N,re),O=d(Ee,O,de),Te===null?ie=Ee:Te.sibling=Ee,Te=Ee,re=be}if(de===D.length)return i(N,re),we&&In(N,de),ie;if(re===null){for(;de<D.length;de++)re=V(N,D[de],H),re!==null&&(O=d(re,O,de),Te===null?ie=re:Te.sibling=re,Te=re);return we&&In(N,de),ie}for(re=l(re);de<D.length;de++)be=B(re,N,de,D[de],H),be!==null&&(n&&be.alternate!==null&&re.delete(be.key===null?de:be.key),O=d(be,O,de),Te===null?ie=be:Te.sibling=be,Te=be);return n&&re.forEach(function(Lr){return s(N,Lr)}),we&&In(N,de),ie}function ue(N,O,D,H){if(D==null)throw Error(a(151));for(var ie=null,Te=null,re=O,de=O=0,be=null,Ee=D.next();re!==null&&!Ee.done;de++,Ee=D.next()){re.index>de?(be=re,re=null):be=re.sibling;var Lr=P(N,re,Ee.value,H);if(Lr===null){re===null&&(re=be);break}n&&re&&Lr.alternate===null&&s(N,re),O=d(Lr,O,de),Te===null?ie=Lr:Te.sibling=Lr,Te=Lr,re=be}if(Ee.done)return i(N,re),we&&In(N,de),ie;if(re===null){for(;!Ee.done;de++,Ee=D.next())Ee=V(N,Ee.value,H),Ee!==null&&(O=d(Ee,O,de),Te===null?ie=Ee:Te.sibling=Ee,Te=Ee);return we&&In(N,de),ie}for(re=l(re);!Ee.done;de++,Ee=D.next())Ee=B(re,N,de,Ee.value,H),Ee!==null&&(n&&Ee.alternate!==null&&re.delete(Ee.key===null?de:Ee.key),O=d(Ee,O,de),Te===null?ie=Ee:Te.sibling=Ee,Te=Ee);return n&&re.forEach(function(GS){return s(N,GS)}),we&&In(N,de),ie}function De(N,O,D,H){if(typeof D=="object"&&D!==null&&D.type===x&&D.key===null&&(D=D.props.children),typeof D=="object"&&D!==null){switch(D.$$typeof){case w:e:{for(var ie=D.key;O!==null;){if(O.key===ie){if(ie=D.type,ie===x){if(O.tag===7){i(N,O.sibling),H=h(O,D.props.children),H.return=N,N=H;break e}}else if(O.elementType===ie||typeof ie=="object"&&ie!==null&&ie.$$typeof===F&&us(ie)===O.type){i(N,O.sibling),H=h(O,D.props),ai(H,D),H.return=N,N=H;break e}i(N,O);break}else s(N,O);O=O.sibling}D.type===x?(H=ss(D.props.children,N.mode,H,D.key),H.return=N,N=H):(H=zo(D.type,D.key,D.props,null,N.mode,H),ai(H,D),H.return=N,N=H)}return v(N);case _:e:{for(ie=D.key;O!==null;){if(O.key===ie)if(O.tag===4&&O.stateNode.containerInfo===D.containerInfo&&O.stateNode.implementation===D.implementation){i(N,O.sibling),H=h(O,D.children||[]),H.return=N,N=H;break e}else{i(N,O);break}else s(N,O);O=O.sibling}H=pc(D,N.mode,H),H.return=N,N=H}return v(N);case F:return D=us(D),De(N,O,D,H)}if(Ie(D))return te(N,O,D,H);if(ye(D)){if(ie=ye(D),typeof ie!="function")throw Error(a(150));return D=ie.call(D),ue(N,O,D,H)}if(typeof D.then=="function")return De(N,O,Go(D),H);if(D.$$typeof===j)return De(N,O,$o(N,D),H);Vo(N,D)}
vendor: 4,828 bytes, line 9
9return typeof D=="string"&&D!==""||typeof D=="number"||typeof D=="bigint"?(D=""+D,O!==null&&O.tag===6?(i(N,O.sibling),H=h(O,D),H.return=N,N=H):(i(N,O),H=dc(D,N.mode,H),H.return=N,N=H),v(N)):i(N,O)}return function(N,O,D,H){try{si=0;var ie=De(N,O,D,H);return ta=null,ie}catch(re){if(re===ea||re===qo)throw re;var Te=Gt(29,re,null,N.mode);return Te.lanes=H,Te.return=N,Te}}}var hs=Bp(!0),$p=Bp(!1),yr=!1;function xc(n){n.updateQueue={baseState:n.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ac(n,s){n=n.updateQueue,s.updateQueue===n&&(s.updateQueue={baseState:n.baseState,firstBaseUpdate:n.firstBaseUpdate,lastBaseUpdate:n.lastBaseUpdate,shared:n.shared,callbacks:null})}function vr(n){return{lane:n,tag:0,payload:null,callback:null,next:null}}function br(n,s,i){var l=n.updateQueue;if(l===null)return null;if(l=l.shared,(Ae&2)!==0){var h=l.pending;return h===null?s.next=s:(s.next=h.next,h.next=s),l.pending=s,s=Uo(n),Tp(n,null,i),s}return Do(n,l,s,i),Uo(n)}function ii(n,s,i){if(s=s.updateQueue,s!==null&&(s=s.shared,(i&4194048)!==0)){var l=s.lanes;l&=n.pendingLanes,i|=l,s.lanes=i,jd(n,i)}}function kc(n,s){var i=n.updateQueue,l=n.alternate;if(l!==null&&(l=l.updateQueue,i===l)){var h=null,d=null;if(i=i.firstBaseUpdate,i!==null){do{var v={lane:i.lane,tag:i.tag,payload:i.payload,callback:null,next:null};d===null?h=d=v:d=d.next=v,i=i.next}while(i!==null);d===null?h=d=s:d=d.next=s}else h=d=s;i={baseState:l.baseState,firstBaseUpdate:h,lastBaseUpdate:d,shared:l.shared,callbacks:l.callbacks},n.updateQueue=i;return}n=i.lastBaseUpdate,n===null?i.firstBaseUpdate=s:n.next=s,i.lastBaseUpdate=s}var Oc=!1;function oi(){if(Oc){var n=Ws;if(n!==null)throw n}}function li(n,s,i,l){Oc=!1;var h=n.updateQueue;yr=!1;var d=h.firstBaseUpdate,v=h.lastBaseUpdate,S=h.shared.pending;if(S!==null){h.shared.pending=null;var k=S,U=k.next;k.next=null,v===null?d=U:v.next=U,v=k;var I=n.alternate;I!==null&&(I=I.updateQueue,S=I.lastBaseUpdate,S!==v&&(S===null?I.firstBaseUpdate=U:S.next=U,I.lastBaseUpdate=k))}if(d!==null){var V=h.baseState;v=0,I=U=k=null,S=d;do{var P=S.lane&-536870913,B=P!==S.lane;if(B?(ve&P)===P:(l&P)===P){P!==0&&P===Zs&&(Oc=!0),I!==null&&(I=I.next={lane:0,tag:S.tag,payload:S.payload,callback:null,next:null});e:{var te=n,ue=S;P=s;var De=i;switch(ue.tag){case 1:if(te=ue.payload,typeof te=="function"){V=te.call(De,V,P);break e}V=te;break e;case 3:te.flags=te.flags&-65537|128;case 0:if(te=ue.payload,P=typeof te=="function"?te.call(De,V,P):te,P==null)break e;V=m({},V,P);break e;case 2:yr=!0}}P=S.callback,P!==null&&(n.flags|=64,B&&(n.flags|=8192),B=h.callbacks,B===null?h.callbacks=[P]:B.push(P))}else B={lane:P,tag:S.tag,payload:S.payload,callback:S.callback,next:null},I===null?(U=I=B,k=V):I=I.next=B,v|=P;if(S=S.next,S===null){if(S=h.shared.pending,S===null)break;B=S,S=B.next,B.next=null,h.lastBaseUpdate=B,h.shared.pending=null}}while(!0);I===null&&(k=V),h.baseState=k,h.firstBaseUpdate=U,h.lastBaseUpdate=I,d===null&&(h.shared.lanes=0),Er|=v,n.lanes=v,n.memoizedState=V}}function Ip(n,s){if(typeof n!="function")throw Error(a(191,n));n.call(s)}function qp(n,s){var i=n.callbacks;if(i!==null)for(n.callbacks=null,n=0;n<i.length;n++)Ip(i[n],s)}var na=C(null),Ko=C(0);function Hp(n,s){n=Zn,X(Ko,n),X(na,s),Zn=n|s.baseLanes}function Cc(){X(Ko,Zn),X(na,na.current)}function jc(){Zn=Ko.current,G(na),G(Ko)}var Vt=C(null),sn=null;function wr(n){var s=n.alternate;X(Xe,Xe.current&1),X(Vt,n),sn===null&&(s===null||na.current!==null||s.memoizedState!==null)&&(sn=n)}function Mc(n){X(Xe,Xe.current),X(Vt,n),sn===null&&(sn=n)}function Gp(n){n.tag===22?(X(Xe,Xe.current),X(Vt,n),sn===null&&(sn=n)):_r()}function _r(){X(Xe,Xe.current),X(Vt,Vt.current)}function Kt(n){G(Vt),sn===n&&(sn=null),G(Xe)}var Xe=C(0);function Fo(n){for(var s=n;s!==null;){if(s.tag===13){var i=s.memoizedState;if(i!==null&&(i=i.dehydrated,i===null||Ph(i)||Bh(i)))return s}else if(s.tag===19&&(s.memoizedProps.revealOrder==="forwards"||s.memoizedProps.revealOrder==="backwards"||s.memoizedProps.revealOrder==="unstable_legacy-backwards"||s.memoizedProps.revealOrder==="together")){if((s.flags&128)!==0)return s}else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===n)break;for(;s.sibling===null;){if(s.return===null||s.return===n)return null;s=s.return}s.sibling.return=s.return,s=s.sibling}return null}var Gn=0,fe=null,Ne=null,nt=null,Yo=!1,ra=!1,fs=!1,Qo=0,ui=0,sa=null,L_=0;function Ke(){throw Error(a(321))}function Nc(n,s){if(s===null)return!1;for(var i=0;i<s.length&&i<n.length;i++)if(!Ht(n[i],s[i]))return!1;return!0}function Lc(n,s,i,l,h,d){return Gn=d,fe=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,$.H=n===null||n.memoizedState===null?Ag:Qc,fs=!1,d=i(l,h),fs=!1,ra&&(d=Kp(s,i,l,h)),Vp(n),d}function Vp(n){$.H=fi;var s=Ne!==null&&Ne.next!==null;
vendor: 9,106 bytes, line 9
9if(Gn=0,nt=Ne=fe=null,Yo=!1,ui=0,sa=null,s)throw Error(a(300));n===null||rt||(n=n.dependencies,n!==null&&Bo(n)&&(rt=!0))}function Kp(n,s,i,l){fe=n;var h=0;do{if(ra&&(sa=null),ui=0,ra=!1,25<=h)throw Error(a(301));if(h+=1,nt=Ne=null,n.updateQueue!=null){var d=n.updateQueue;d.lastEffect=null,d.events=null,d.stores=null,d.memoCache!=null&&(d.memoCache.index=0)}$.H=kg,d=s(i,l)}while(ra);return d}function D_(){var n=$.H,s=n.useState()[0];return s=typeof s.then=="function"?ci(s):s,n=n.useState()[0],(Ne!==null?Ne.memoizedState:null)!==n&&(fe.flags|=1024),s}function Dc(){var n=Qo!==0;return Qo=0,n}function Uc(n,s,i){s.updateQueue=n.updateQueue,s.flags&=-2053,n.lanes&=~i}function zc(n){if(Yo){for(n=n.memoizedState;n!==null;){var s=n.queue;s!==null&&(s.pending=null),n=n.next}Yo=!1}Gn=0,nt=Ne=fe=null,ra=!1,ui=Qo=0,sa=null}function At(){var n={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return nt===null?fe.memoizedState=nt=n:nt=nt.next=n,nt}function Ze(){if(Ne===null){var n=fe.alternate;n=n!==null?n.memoizedState:null}else n=Ne.next;var s=nt===null?fe.memoizedState:nt.next;if(s!==null)nt=s,Ne=n;else{if(n===null)throw fe.alternate===null?Error(a(467)):Error(a(310));Ne=n,n={memoizedState:Ne.memoizedState,baseState:Ne.baseState,baseQueue:Ne.baseQueue,queue:Ne.queue,next:null},nt===null?fe.memoizedState=nt=n:nt=nt.next=n}return nt}function Jo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ci(n){var s=ui;return ui+=1,sa===null&&(sa=[]),n=Up(sa,n,s),s=fe,(nt===null?s.memoizedState:nt.next)===null&&(s=s.alternate,$.H=s===null||s.memoizedState===null?Ag:Qc),n}function Xo(n){if(n!==null&&typeof n=="object"){if(typeof n.then=="function")return ci(n);if(n.$$typeof===j)return yt(n)}throw Error(a(438,String(n)))}function Pc(n){var s=null,i=fe.updateQueue;if(i!==null&&(s=i.memoCache),s==null){var l=fe.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(s={data:l.data.map(function(h){return h.slice()}),index:0})))}if(s==null&&(s={data:[],index:0}),i===null&&(i=Jo(),fe.updateQueue=i),i.memoCache=s,i=s.data[s.index],i===void 0)for(i=s.data[s.index]=Array(n),l=0;l<n;l++)i[l]=le;return s.index++,i}function Vn(n,s){return typeof s=="function"?s(n):s}function Zo(n){var s=Ze();return Bc(s,Ne,n)}function Bc(n,s,i){var l=n.queue;if(l===null)throw Error(a(311));l.lastRenderedReducer=i;var h=n.baseQueue,d=l.pending;if(d!==null){if(h!==null){var v=h.next;h.next=d.next,d.next=v}s.baseQueue=h=d,l.pending=null}if(d=n.baseState,h===null)n.memoizedState=d;else{s=h.next;var S=v=null,k=null,U=s,I=!1;do{var V=U.lane&-536870913;if(V!==U.lane?(ve&V)===V:(Gn&V)===V){var P=U.revertLane;if(P===0)k!==null&&(k=k.next={lane:0,revertLane:0,gesture:null,action:U.action,hasEagerState:U.hasEagerState,eagerState:U.eagerState,next:null}),V===Zs&&(I=!0);else if((Gn&P)===P){U=U.next,P===Zs&&(I=!0);continue}else V={lane:0,revertLane:U.revertLane,gesture:null,action:U.action,hasEagerState:U.hasEagerState,eagerState:U.eagerState,next:null},k===null?(S=k=V,v=d):k=k.next=V,fe.lanes|=P,Er|=P;V=U.action,fs&&i(d,V),d=U.hasEagerState?U.eagerState:i(d,V)}else P={lane:V,revertLane:U.revertLane,gesture:U.gesture,action:U.action,hasEagerState:U.hasEagerState,eagerState:U.eagerState,next:null},k===null?(S=k=P,v=d):k=k.next=P,fe.lanes|=V,Er|=V;U=U.next}while(U!==null&&U!==s);if(k===null?v=d:k.next=S,!Ht(d,n.memoizedState)&&(rt=!0,I&&(i=Ws,i!==null)))throw i;n.memoizedState=d,n.baseState=v,n.baseQueue=k,l.lastRenderedState=d}return h===null&&(l.lanes=0),[n.memoizedState,l.dispatch]}function $c(n){var s=Ze(),i=s.queue;if(i===null)throw Error(a(311));i.lastRenderedReducer=n;var l=i.dispatch,h=i.pending,d=s.memoizedState;if(h!==null){i.pending=null;var v=h=h.next;do d=n(d,v.action),v=v.next;while(v!==h);Ht(d,s.memoizedState)||(rt=!0),s.memoizedState=d,s.baseQueue===null&&(s.baseState=d),i.lastRenderedState=d}return[d,l]}function Fp(n,s,i){var l=fe,h=Ze(),d=we;if(d){if(i===void 0)throw Error(a(407));i=i()}else i=s();var v=!Ht((Ne||h).memoizedState,i);if(v&&(h.memoizedState=i,rt=!0),h=h.queue,Hc(Jp.bind(null,l,h,n),[n]),h.getSnapshot!==s||v||nt!==null&&nt.memoizedState.tag&1){if(l.flags|=2048,aa(9,{destroy:void 0},Qp.bind(null,l,h,i,s),null),ze===null)throw Error(a(349));d||(Gn&127)!==0||Yp(l,s,i)}return i}function Yp(n,s,i){n.flags|=16384,n={getSnapshot:s,value:i},s=fe.updateQueue,s===null?(s=Jo(),fe.updateQueue=s,s.stores=[n]):(i=s.stores,i===null?s.stores=[n]:i.push(n))}function Qp(n,s,i,l){s.value=i,s.getSnapshot=l,Xp(s)&&Zp(n)}function Jp(n,s,i){return i(function(){Xp(s)&&Zp(n)})}function Xp(n){var s=n.getSnapshot;n=n.value;try{var i=s();return!Ht(n,i)}catch{return!0}}function Zp(n){var s=rs(n,2);s!==null&&Ut(s,n,2)}function Ic(n){var s=At();if(typeof n=="function"){var i=n;if(n=i(),fs){cr(!0);try{i()}finally{cr(!1)}}}return s.memoizedState=s.baseState=n,s.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Vn,lastRenderedState:n},s}function Wp(n,s,i,l){return n.baseState=i,Bc(n,Ne,typeof l=="function"?l:Vn)}function U_(n,s,i,l,h){if(tl(n))throw Error(a(485));if(n=s.action,n!==null){var d={payload:h,action:n,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(v){d.listeners.push(v)}};$.T!==null?i(!0):d.isTransition=!1,l(d),i=s.pending,i===null?(d.next=s.pending=d,eg(s,d)):(d.next=i.next,s.pending=i.next=d)}}function eg(n,s){var i=s.action,l=s.payload,h=n.state;if(s.isTransition){var d=$.T,v={};$.T=v;try{var S=i(h,l),k=$.S;k!==null&&k(v,S),tg(n,s,S)}catch(U){qc(n,s,U)}finally{d!==null&&v.types!==null&&(d.types=v.types),$.T=d}}else try{d=i(h,l),tg(n,s,d)}catch(U){qc(n,s,U)}}function tg(n,s,i){i!==null&&typeof i=="object"&&typeof i.then=="function"?i.then(function(l){ng(n,s,l)},function(l){return qc(n,s,l)}):ng(n,s,i)}function ng(n,s,i){s.status="fulfilled",s.value=i,rg(s),n.state=i,s=n.pending,s!==null&&(i=s.next,i===s?n.pending=null:(i=i.next,s.next=i,eg(n,i)))}function qc(n,s,i){var l=n.pending;if(n.pending=null,l!==null){l=l.next;do s.status="rejected",s.reason=i,rg(s),s=s.next;while(s!==l)}n.action=null}function rg(n){n=n.listeners;for(var s=0;s<n.length;s++)(0,n[s])()}function sg(n,s){return s}function ag(n,s){if(we){var i=ze.formState;if(i!==null){e:{var l=fe;if(we){if(qe){t:{for(var h=qe,d=rn;h.nodeType!==8;){if(!d){h=null;break t}if(h=an(h.nextSibling),h===null){h=null;break t}}d=h.data,h=d==="F!"||d==="F"?h:null}if(h){qe=an(h.nextSibling),l=h.data==="F!";break e}}gr(l)}l=!1}l&&(s=i[0])}}return i=At(),i.memoizedState=i.baseState=s,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:sg,lastRenderedState:s},i.queue=l,i=Eg.bind(null,fe,l),l.dispatch=i,l=Ic(!1),d=Yc.bind(null,fe,!1,l.queue),l=At(),h={state:s,dispatch:null,action:n,pending:null},l.queue=h,i=U_.bind(null,fe,h,d,i),h.dispatch=i,l.memoizedState=n,[s,i,!1]}function ig(n){var s=Ze();return og(s,Ne,n)}function og(n,s,i){if(s=Bc(n,s,sg)[0],n=Zo(Vn)[0],typeof s=="object"&&s!==null&&typeof s.then=="function")try{var l=ci(s)}catch(v){throw v===ea?qo:v}else l=s;s=Ze();var h=s.queue,d=h.dispatch;return i!==s.memoizedState&&(fe.flags|=2048,aa(9,{destroy:void 0},z_.bind(null,h,i),null)),[l,d,n]}function z_(n,s){n.action=s}function lg(n){var s=Ze(),i=Ne;if(i!==null)return og(s,i,n);Ze(),s=s.memoizedState,i=Ze();var l=i.queue.dispatch;return i.memoizedState=n,[s,l,!1]}function aa(n,s,i,l){return n={tag:n,create:i,deps:l,inst:s,next:null},s=fe.updateQueue,s===null&&(s=Jo(),fe.updateQueue=s),i=s.lastEffect,i===null?s.lastEffect=n.next=n:(l=i.next,i.next=n,n.next=l,s.lastEffect=n),n}function ug(){return Ze().memoizedState}function Wo(n,s,i,l){var h=At();fe.flags|=n,h.memoizedState=aa(1|s,{destroy:void 0},i,l===void 0?null:l)}function el(n,s,i,l){var h=Ze();l=l===void 0?null:l;var d=h.memoizedState.inst;Ne!==null&&l!==null&&Nc(l,Ne.memoizedState.deps)?h.memoizedState=aa(s,d,i,l):(fe.flags|=n,h.memoizedState=aa(1|s,d,i,l))}function cg(n,s){Wo(8390656,8,n,s)}function Hc(n,s){el(2048,8,n,s)}function P_(n){fe.flags|=4;var s=fe.updateQueue;if(s===null)s=Jo(),fe.updateQueue=s,s.events=[n];else{var i=s.events;i===null?s.events=[n]:i.push(n)}}function hg(n){var s=Ze().memoizedState;return P_({ref:s,nextImpl:n}),function(){if((Ae&2)!==0)throw Error(a(440));return s.impl.apply(void 0,arguments)}}function fg(n,s){return el(4,2,n,s)}function dg(n,s){return el(4,4,n,s)}function pg(n,s){if(typeof s=="function"){n=n();var i=s(n);return function(){typeof i=="function"?i():s(null)}}if(s!=null)return n=n(),s.current=n,function(){s.current=null}}function gg(n,s,i){i=i!=null?i.concat([n]):null,el(4,4,pg.bind(null,s,n),i)}function Gc(){}function mg(n,s){var i=Ze();s=s===void 0?null:s;var l=i.memoizedState;return s!==null&&Nc(s,l[1])?l[0]:(i.memoizedState=[n,s],n)}function yg(n,s){var i=Ze();s=s===void 0?null:s;var l=i.memoizedState;if(s!==null&&Nc(s,l[1]))return l[0];if(l=n(),fs){cr(!0);try{n()}finally{cr(!1)}}return i.memoizedState=[l,s],l}function Vc(n,s,i){return i===void 0||(Gn&1073741824)!==0&&(ve&261930)===0?n.memoizedState=s:(n.memoizedState=i,n=vm(),fe.lanes|=n,Er|=n,i)}function vg(n,s,i,l){return Ht(i,s)?i:na.current!==null?(n=Vc(n,i,l),Ht(n,s)||
vendor: 4,914 bytes, line 9
9(rt=!0),n):(Gn&42)===0||(Gn&1073741824)!==0&&(ve&261930)===0?(rt=!0,n.memoizedState=i):(n=vm(),fe.lanes|=n,Er|=n,s)}function bg(n,s,i,l,h){var d=Q.p;Q.p=d!==0&&8>d?d:8;var v=$.T,S={};$.T=S,Yc(n,!1,s,i);try{var k=h(),U=$.S;if(U!==null&&U(S,k),k!==null&&typeof k=="object"&&typeof k.then=="function"){var I=N_(k,l);hi(n,s,I,Qt(n))}else hi(n,s,l,Qt(n))}catch(V){hi(n,s,{then:function(){},status:"rejected",reason:V},Qt())}finally{Q.p=d,v!==null&&S.types!==null&&(v.types=S.types),$.T=v}}function B_(){}function Kc(n,s,i,l){if(n.tag!==5)throw Error(a(476));var h=wg(n).queue;bg(n,h,s,oe,i===null?B_:function(){return _g(n),i(l)})}function wg(n){var s=n.memoizedState;if(s!==null)return s;s={memoizedState:oe,baseState:oe,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Vn,lastRenderedState:oe},next:null};var i={};return s.next={memoizedState:i,baseState:i,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Vn,lastRenderedState:i},next:null},n.memoizedState=s,n=n.alternate,n!==null&&(n.memoizedState=s),s}function _g(n){var s=wg(n);s.next===null&&(s=n.alternate.memoizedState),hi(n,s.next.queue,{},Qt())}function Fc(){return yt(ki)}function Sg(){return Ze().memoizedState}function Tg(){return Ze().memoizedState}function $_(n){for(var s=n.return;s!==null;){switch(s.tag){case 24:case 3:var i=Qt();n=vr(i);var l=br(s,n,i);l!==null&&(Ut(l,s,i),ii(l,s,i)),s={cache:Sc()},n.payload=s;return}s=s.return}}function I_(n,s,i){var l=Qt();i={lane:l,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},tl(n)?Rg(s,i):(i=hc(n,s,i,l),i!==null&&(Ut(i,n,l),xg(i,s,l)))}function Eg(n,s,i){var l=Qt();hi(n,s,i,l)}function hi(n,s,i,l){var h={lane:l,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null};if(tl(n))Rg(s,h);else{var d=n.alternate;if(n.lanes===0&&(d===null||d.lanes===0)&&(d=s.lastRenderedReducer,d!==null))try{var v=s.lastRenderedState,S=d(v,i);if(h.hasEagerState=!0,h.eagerState=S,Ht(S,v))return Do(n,s,h,0),ze===null&&Lo(),!1}catch{}if(i=hc(n,s,h,l),i!==null)return Ut(i,n,l),xg(i,s,l),!0}return!1}function Yc(n,s,i,l){if(l={lane:2,revertLane:xh(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},tl(n)){if(s)throw Error(a(479))}else s=hc(n,i,l,2),s!==null&&Ut(s,n,2)}function tl(n){var s=n.alternate;return n===fe||s!==null&&s===fe}function Rg(n,s){ra=Yo=!0;var i=n.pending;i===null?s.next=s:(s.next=i.next,i.next=s),n.pending=s}function xg(n,s,i){if((i&4194048)!==0){var l=s.lanes;l&=n.pendingLanes,i|=l,s.lanes=i,jd(n,i)}}var fi={readContext:yt,use:Xo,useCallback:Ke,useContext:Ke,useEffect:Ke,useImperativeHandle:Ke,useLayoutEffect:Ke,useInsertionEffect:Ke,useMemo:Ke,useReducer:Ke,useRef:Ke,useState:Ke,useDebugValue:Ke,useDeferredValue:Ke,useTransition:Ke,useSyncExternalStore:Ke,useId:Ke,useHostTransitionStatus:Ke,useFormState:Ke,useActionState:Ke,useOptimistic:Ke,useMemoCache:Ke,useCacheRefresh:Ke};fi.useEffectEvent=Ke;var Ag={readContext:yt,use:Xo,useCallback:function(n,s){return At().memoizedState=[n,s===void 0?null:s],n},useContext:yt,useEffect:cg,useImperativeHandle:function(n,s,i){i=i!=null?i.concat([n]):null,Wo(4194308,4,pg.bind(null,s,n),i)},useLayoutEffect:function(n,s){return Wo(4194308,4,n,s)},useInsertionEffect:function(n,s){Wo(4,2,n,s)},useMemo:function(n,s){var i=At();s=s===void 0?null:s;var l=n();if(fs){cr(!0);try{n()}finally{cr(!1)}}return i.memoizedState=[l,s],l},useReducer:function(n,s,i){var l=At();if(i!==void 0){var h=i(s);if(fs){cr(!0);try{i(s)}finally{cr(!1)}}}else h=s;return l.memoizedState=l.baseState=h,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:n,lastRenderedState:h},l.queue=n,n=n.dispatch=I_.bind(null,fe,n),[l.memoizedState,n]},useRef:function(n){var s=At();return n={current:n},s.memoizedState=n},useState:function(n){n=Ic(n);var s=n.queue,i=Eg.bind(null,fe,s);return s.dispatch=i,[n.memoizedState,i]},useDebugValue:Gc,useDeferredValue:function(n,s){var i=At();return Vc(i,n,s)},useTransition:function(){var n=Ic(!1);return n=bg.bind(null,fe,n.queue,!0,!1),At().memoizedState=n,[!1,n]},useSyncExternalStore:function(n,s,i){var l=fe,h=At();if(we){if(i===void 0)throw Error(a(407));i=i()}else{if(i=s(),ze===null)throw Error(a(349));(ve&127)!==0||Yp(l,s,i)}h.memoizedState=i;var d={value:i,getSnapshot:s};return h.queue=d,cg(Jp.bind(null,l,d,n),[n]),l.flags|=2048,aa(9,{destroy:void 0},Qp.bind(null,l,d,i,s),null),i},useId:function(){var n=At(),s=ze.identifierPrefix;if(we){var i=Rn,l=En;i=(l&~(1<<32-qt(l)-1)).toString(32)+i,s="_"+s+"R_"+i,i=Qo++,0<i&&(s+="H"+i.toString(32)),s+="_"}else i=L_++,s="_"+s+"r_"+i.toString(32)+"_";return n.memoizedState=s},useHostTransitionStatus:Fc,useFormState:ag,useActionState:ag,useOptimistic:function(n){var s=At();s.memoizedState=s.baseState=n;var i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return s.queue=i,s=Yc.bind(null,fe,!0,i),i.dispatch=s,[n,s]}
vendor: 5,711 bytes, line 9
9,useMemoCache:Pc,useCacheRefresh:function(){return At().memoizedState=$_.bind(null,fe)},useEffectEvent:function(n){var s=At(),i={impl:n};return s.memoizedState=i,function(){if((Ae&2)!==0)throw Error(a(440));return i.impl.apply(void 0,arguments)}}},Qc={readContext:yt,use:Xo,useCallback:mg,useContext:yt,useEffect:Hc,useImperativeHandle:gg,useInsertionEffect:fg,useLayoutEffect:dg,useMemo:yg,useReducer:Zo,useRef:ug,useState:function(){return Zo(Vn)},useDebugValue:Gc,useDeferredValue:function(n,s){var i=Ze();return vg(i,Ne.memoizedState,n,s)},useTransition:function(){var n=Zo(Vn)[0],s=Ze().memoizedState;return[typeof n=="boolean"?n:ci(n),s]},useSyncExternalStore:Fp,useId:Sg,useHostTransitionStatus:Fc,useFormState:ig,useActionState:ig,useOptimistic:function(n,s){var i=Ze();return Wp(i,Ne,n,s)},useMemoCache:Pc,useCacheRefresh:Tg};Qc.useEffectEvent=hg;var kg={readContext:yt,use:Xo,useCallback:mg,useContext:yt,useEffect:Hc,useImperativeHandle:gg,useInsertionEffect:fg,useLayoutEffect:dg,useMemo:yg,useReducer:$c,useRef:ug,useState:function(){return $c(Vn)},useDebugValue:Gc,useDeferredValue:function(n,s){var i=Ze();return Ne===null?Vc(i,n,s):vg(i,Ne.memoizedState,n,s)},useTransition:function(){var n=$c(Vn)[0],s=Ze().memoizedState;return[typeof n=="boolean"?n:ci(n),s]},useSyncExternalStore:Fp,useId:Sg,useHostTransitionStatus:Fc,useFormState:lg,useActionState:lg,useOptimistic:function(n,s){var i=Ze();return Ne!==null?Wp(i,Ne,n,s):(i.baseState=n,[n,i.queue.dispatch])},useMemoCache:Pc,useCacheRefresh:Tg};kg.useEffectEvent=hg;function Jc(n,s,i,l){s=n.memoizedState,i=i(l,s),i=i==null?s:m({},s,i),n.memoizedState=i,n.lanes===0&&(n.updateQueue.baseState=i)}var Xc={enqueueSetState:function(n,s,i){n=n._reactInternals;var l=Qt(),h=vr(l);h.payload=s,i!=null&&(h.callback=i),s=br(n,h,l),s!==null&&(Ut(s,n,l),ii(s,n,l))},enqueueReplaceState:function(n,s,i){n=n._reactInternals;var l=Qt(),h=vr(l);h.tag=1,h.payload=s,i!=null&&(h.callback=i),s=br(n,h,l),s!==null&&(Ut(s,n,l),ii(s,n,l))},enqueueForceUpdate:function(n,s){n=n._reactInternals;var i=Qt(),l=vr(i);l.tag=2,s!=null&&(l.callback=s),s=br(n,l,i),s!==null&&(Ut(s,n,i),ii(s,n,i))}};function Og(n,s,i,l,h,d,v){return n=n.stateNode,typeof n.shouldComponentUpdate=="function"?n.shouldComponentUpdate(l,d,v):s.prototype&&s.prototype.isPureReactComponent?!Za(i,l)||!Za(h,d):!0}function Cg(n,s,i,l){n=s.state,typeof s.componentWillReceiveProps=="function"&&s.componentWillReceiveProps(i,l),typeof s.UNSAFE_componentWillReceiveProps=="function"&&s.UNSAFE_componentWillReceiveProps(i,l),s.state!==n&&Xc.enqueueReplaceState(s,s.state,null)}function ds(n,s){var i=s;if("ref"in s){i={};for(var l in s)l!=="ref"&&(i[l]=s[l])}if(n=n.defaultProps){i===s&&(i=m({},i));for(var h in n)i[h]===void 0&&(i[h]=n[h])}return i}function jg(n){No(n)}function Mg(n){console.error(n)}function Ng(n){No(n)}function nl(n,s){try{var i=n.onUncaughtError;i(s.value,{componentStack:s.stack})}catch(l){setTimeout(function(){throw l})}}function Lg(n,s,i){try{var l=n.onCaughtError;l(i.value,{componentStack:i.stack,errorBoundary:s.tag===1?s.stateNode:null})}catch(h){setTimeout(function(){throw h})}}function Zc(n,s,i){return i=vr(i),i.tag=3,i.payload={element:null},i.callback=function(){nl(n,s)},i}function Dg(n){return n=vr(n),n.tag=3,n}function Ug(n,s,i,l){var h=i.type.getDerivedStateFromError;if(typeof h=="function"){var d=l.value;n.payload=function(){return h(d)},n.callback=function(){Lg(s,i,l)}}var v=i.stateNode;v!==null&&typeof v.componentDidCatch=="function"&&(n.callback=function(){Lg(s,i,l),typeof h!="function"&&(Rr===null?Rr=new Set([this]):Rr.add(this));var S=l.stack;this.componentDidCatch(l.value,{componentStack:S!==null?S:""})})}function q_(n,s,i,l,h){if(i.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(s=i.alternate,s!==null&&Xs(s,i,h,!0),i=Vt.current,i!==null){switch(i.tag){case 31:case 13:return sn===null?pl():i.alternate===null&&Fe===0&&(Fe=3),i.flags&=-257,i.flags|=65536,i.lanes=h,l===Ho?i.flags|=16384:(s=i.updateQueue,s===null?i.updateQueue=new Set([l]):s.add(l),Th(n,l,h)),!1;case 22:return i.flags|=65536,l===Ho?i.flags|=16384:(s=i.updateQueue,s===null?(s={transitions:null,markerInstances:null,retryQueue:new Set([l])},i.updateQueue=s):(i=s.retryQueue,i===null?s.retryQueue=new Set([l]):i.add(l)),Th(n,l,h)),!1}throw Error(a(435,i.tag))}return Th(n,l,h),pl(),!1}if(we)return s=Vt.current,s!==null?((s.flags&65536)===0&&(s.flags|=256),s.flags|=65536,s.lanes=h,l!==yc&&(n=Error(a(422),{cause:l}),ti(en(n,i)))):(l!==yc&&(s=Error(a(423),{cause:l}),ti(en(s,i))),n=n.current.alternate,n.flags|=65536,h&=-h,n.lanes|=h,l=en(l,i),h=Zc(n.stateNode,l,h),kc(n,h),Fe!==4&&(Fe=2)),!1;var d=Error(a(520),{cause:l});if(d=en(d,i),wi===null?wi=[d]:wi.push(d),Fe!==4&&(Fe=2),s===null)return!0;l=en(l,i),i=s;do{switch(i.tag){case 3:return i.flags|=65536,n=h&-h,i.lanes|=n,n=Zc(i.stateNode,l,n),kc(i,n),!1;case 1:if(s=i.type,d=i.stateNode,(i.flags&128)===0&&(typeof s.getDerivedStateFromError=="function"||d!==null&&typeof d.componentDidCatch=="function"&&(Rr===null||!Rr.has(d))))return i.flags|=65536,h&=-h,i.lanes|=h,h=Dg(h),Ug(h,n,i,l),kc(i,h),!1}i=i.return}while(i!==null);return!1}var Wc=Error(a(461)),rt=!1;function vt(n,s,i,l){s.child=n===null?$p(s,null,i,l):hs(s,n.child,i,l)}function zg(n,s,i,l,h){i=i.render;var d=s.ref;if("ref"in l){var v={};for(var S in l)S!=="ref"&&(v[S]=l[S])}else v=l;return os(s),l=Lc(n,s,i,v,d,h),S=Dc(),n!==null&&!rt?(Uc(n,s,h),Kn(n,s,h)):(we&&S&&gc(s),s.flags|=1,vt(n,s,l,h),s.child)}function Pg(n,s,i,l,h){if(n===null){var d=i.type;return typeof d=="function"&&!fc(d)&&d.defaultProps===void 0&&i.compare===null?(s.tag=15,s.type=d,Bg(n,s,d,l,h)):(n=zo(i.type,null,l,s,s.mode,h),n.ref=s.ref,n.return=s,s.child=n)}
vendor: 9,424 bytes, line 9
9if(d=n.child,!oh(n,h)){var v=d.memoizedProps;if(i=i.compare,i=i!==null?i:Za,i(v,l)&&n.ref===s.ref)return Kn(n,s,h)}return s.flags|=1,n=$n(d,l),n.ref=s.ref,n.return=s,s.child=n}function Bg(n,s,i,l,h){if(n!==null){var d=n.memoizedProps;if(Za(d,l)&&n.ref===s.ref)if(rt=!1,s.pendingProps=l=d,oh(n,h))(n.flags&131072)!==0&&(rt=!0);else return s.lanes=n.lanes,Kn(n,s,h)}return eh(n,s,i,l,h)}function $g(n,s,i,l){var h=l.children,d=n!==null?n.memoizedState:null;if(n===null&&s.stateNode===null&&(s.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.mode==="hidden"){if((s.flags&128)!==0){if(d=d!==null?d.baseLanes|i:i,n!==null){for(l=s.child=n.child,h=0;l!==null;)h=h|l.lanes|l.childLanes,l=l.sibling;l=h&~d}else l=0,s.child=null;return Ig(n,s,d,i,l)}if((i&536870912)!==0)s.memoizedState={baseLanes:0,cachePool:null},n!==null&&Io(s,d!==null?d.cachePool:null),d!==null?Hp(s,d):Cc(),Gp(s);else return l=s.lanes=536870912,Ig(n,s,d!==null?d.baseLanes|i:i,i,l)}else d!==null?(Io(s,d.cachePool),Hp(s,d),_r(),s.memoizedState=null):(n!==null&&Io(s,null),Cc(),_r());return vt(n,s,h,i),s.child}function di(n,s){return n!==null&&n.tag===22||s.stateNode!==null||(s.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.sibling}function Ig(n,s,i,l,h){var d=Ec();return d=d===null?null:{parent:tt._currentValue,pool:d},s.memoizedState={baseLanes:i,cachePool:d},n!==null&&Io(s,null),Cc(),Gp(s),n!==null&&Xs(n,s,l,!0),s.childLanes=h,null}function rl(n,s){return s=al({mode:s.mode,children:s.children},n.mode),s.ref=n.ref,n.child=s,s.return=n,s}function qg(n,s,i){return hs(s,n.child,null,i),n=rl(s,s.pendingProps),n.flags|=2,Kt(s),s.memoizedState=null,n}function H_(n,s,i){var l=s.pendingProps,h=(s.flags&128)!==0;if(s.flags&=-129,n===null){if(we){if(l.mode==="hidden")return n=rl(s,l),s.lanes=536870912,di(null,n);if(Mc(s),(n=qe)?(n=ey(n,rn),n=n!==null&&n.data==="&"?n:null,n!==null&&(s.memoizedState={dehydrated:n,treeContext:dr!==null?{id:En,overflow:Rn}:null,retryLane:536870912,hydrationErrors:null},i=Rp(n),i.return=s,s.child=i,mt=s,qe=null)):n=null,n===null)throw gr(s);return s.lanes=536870912,null}return rl(s,l)}var d=n.memoizedState;if(d!==null){var v=d.dehydrated;if(Mc(s),h)if(s.flags&256)s.flags&=-257,s=qg(n,s,i);else if(s.memoizedState!==null)s.child=n.child,s.flags|=128,s=null;else throw Error(a(558));else if(rt||Xs(n,s,i,!1),h=(i&n.childLanes)!==0,rt||h){if(l=ze,l!==null&&(v=Md(l,i),v!==0&&v!==d.retryLane))throw d.retryLane=v,rs(n,v),Ut(l,n,v),Wc;pl(),s=qg(n,s,i)}else n=d.treeContext,qe=an(v.nextSibling),mt=s,we=!0,pr=null,rn=!1,n!==null&&kp(s,n),s=rl(s,l),s.flags|=4096;return s}return n=$n(n.child,{mode:l.mode,children:l.children}),n.ref=s.ref,s.child=n,n.return=s,n}function sl(n,s){var i=s.ref;if(i===null)n!==null&&n.ref!==null&&(s.flags|=4194816);else{if(typeof i!="function"&&typeof i!="object")throw Error(a(284));(n===null||n.ref!==i)&&(s.flags|=4194816)}}function eh(n,s,i,l,h){return os(s),i=Lc(n,s,i,l,void 0,h),l=Dc(),n!==null&&!rt?(Uc(n,s,h),Kn(n,s,h)):(we&&l&&gc(s),s.flags|=1,vt(n,s,i,h),s.child)}function Hg(n,s,i,l,h,d){return os(s),s.updateQueue=null,i=Kp(s,l,i,h),Vp(n),l=Dc(),n!==null&&!rt?(Uc(n,s,d),Kn(n,s,d)):(we&&l&&gc(s),s.flags|=1,vt(n,s,i,d),s.child)}function Gg(n,s,i,l,h){if(os(s),s.stateNode===null){var d=Fs,v=i.contextType;typeof v=="object"&&v!==null&&(d=yt(v)),d=new i(l,d),s.memoizedState=d.state!==null&&d.state!==void 0?d.state:null,d.updater=Xc,s.stateNode=d,d._reactInternals=s,d=s.stateNode,d.props=l,d.state=s.memoizedState,d.refs={},xc(s),v=i.contextType,d.context=typeof v=="object"&&v!==null?yt(v):Fs,d.state=s.memoizedState,v=i.getDerivedStateFromProps,typeof v=="function"&&(Jc(s,i,v,l),d.state=s.memoizedState),typeof i.getDerivedStateFromProps=="function"||typeof d.getSnapshotBeforeUpdate=="function"||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(v=d.state,typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount(),v!==d.state&&Xc.enqueueReplaceState(d,d.state,null),li(s,l,d,h),oi(),d.state=s.memoizedState),typeof d.componentDidMount=="function"&&(s.flags|=4194308),l=!0}else if(n===null){d=s.stateNode;var S=s.memoizedProps,k=ds(i,S);d.props=k;var U=d.context,I=i.contextType;v=Fs,typeof I=="object"&&I!==null&&(v=yt(I));var V=i.getDerivedStateFromProps;I=typeof V=="function"||typeof d.getSnapshotBeforeUpdate=="function",S=s.pendingProps!==S,I||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(S||U!==v)&&Cg(s,d,l,v),yr=!1;var P=s.memoizedState;d.state=P,li(s,l,d,h),oi(),U=s.memoizedState,S||P!==U||yr?(typeof V=="function"&&(Jc(s,i,V,l),U=s.memoizedState),(k=yr||Og(s,i,k,l,P,U,v))?(I||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount()),typeof d.componentDidMount=="function"&&(s.flags|=4194308)):(typeof d.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=l,s.memoizedState=U),d.props=l,d.state=U,d.context=v,l=k):(typeof d.componentDidMount=="function"&&(s.flags|=4194308),l=!1)}else{d=s.stateNode,Ac(n,s),v=s.memoizedProps,I=ds(i,v),d.props=I,V=s.pendingProps,P=d.context,U=i.contextType,k=Fs,typeof U=="object"&&U!==null&&(k=yt(U)),S=i.getDerivedStateFromProps,(U=typeof S=="function"||typeof d.getSnapshotBeforeUpdate=="function")||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(v!==V||P!==k)&&Cg(s,d,l,k),yr=!1,P=s.memoizedState,d.state=P,li(s,l,d,h),oi();var B=s.memoizedState;v!==V||P!==B||yr||n!==null&&n.dependencies!==null&&Bo(n.dependencies)?(typeof S=="function"&&(Jc(s,i,S,l),B=s.memoizedState),(I=yr||Og(s,i,I,l,P,B,k)||n!==null&&n.dependencies!==null&&Bo(n.dependencies))?(U||typeof d.UNSAFE_componentWillUpdate!="function"&&typeof d.componentWillUpdate!="function"||(typeof d.componentWillUpdate=="function"&&d.componentWillUpdate(l,B,k),typeof d.UNSAFE_componentWillUpdate=="function"&&d.UNSAFE_componentWillUpdate(l,B,k)),typeof d.componentDidUpdate=="function"&&(s.flags|=4),typeof d.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof d.componentDidUpdate!="function"||v===n.memoizedProps&&P===n.memoizedState||(s.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||v===n.memoizedProps&&P===n.memoizedState||(s.flags|=1024),s.memoizedProps=l,s.memoizedState=B),d.props=l,d.state=B,d.context=k,l=I):(typeof d.componentDidUpdate!="function"||v===n.memoizedProps&&P===n.memoizedState||(s.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||v===n.memoizedProps&&P===n.memoizedState||(s.flags|=1024),l=!1)}return d=l,sl(n,s),l=(s.flags&128)!==0,d||l?(d=s.stateNode,i=l&&typeof i.getDerivedStateFromError!="function"?null:d.render(),s.flags|=1,n!==null&&l?(s.child=hs(s,n.child,null,h),s.child=hs(s,null,i,h)):vt(n,s,i,h),s.memoizedState=d.state,n=s.child):n=Kn(n,s,h),n}function Vg(n,s,i,l){return as(),s.flags|=256,vt(n,s,i,l),s.child}var th={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function nh(n){return{baseLanes:n,cachePool:Lp()}}function rh(n,s,i){return n=n!==null?n.childLanes&~i:0,s&&(n|=Yt),n}function Kg(n,s,i){var l=s.pendingProps,h=!1,d=(s.flags&128)!==0,v;if((v=d)||(v=n!==null&&n.memoizedState===null?!1:(Xe.current&2)!==0),v&&(h=!0,s.flags&=-129),v=(s.flags&32)!==0,s.flags&=-33,n===null){if(we){if(h?wr(s):_r(),(n=qe)?(n=ey(n,rn),n=n!==null&&n.data!=="&"?n:null,n!==null&&(s.memoizedState={dehydrated:n,treeContext:dr!==null?{id:En,overflow:Rn}:null,retryLane:536870912,hydrationErrors:null},i=Rp(n),i.return=s,s.child=i,mt=s,qe=null)):n=null,n===null)throw gr(s);return Bh(n)?s.lanes=32:s.lanes=536870912,null}var S=l.children;return l=l.fallback,h?(_r(),h=s.mode,S=al({mode:"hidden",children:S},h),l=ss(l,h,i,null),S.return=s,l.return=s,S.sibling=l,s.child=S,l=s.child,l.memoizedState=nh(i),l.childLanes=rh(n,v,i),s.memoizedState=th,di(null,l)):(wr(s),sh(s,S))}var k=n.memoizedState;if(k!==null&&(S=k.dehydrated,S!==null)){if(d)s.flags&256?(wr(s),s.flags&=-257,s=ah(n,s,i)):s.memoizedState!==null?(_r(),s.child=n.child,s.flags|=128,s=null):(_r(),S=l.fallback,h=s.mode,l=al({mode:"visible",children:l.children},h),S=ss(S,h,i,null),S.flags|=2,l.return=s,S.return=s,l.sibling=S,s.child=l,hs(s,n.child,null,i),l=s.child,l.memoizedState=nh(i),l.childLanes=rh(n,v,i),s.memoizedState=th,s=di(null,l));else if(wr(s),Bh(S)){if(v=S.nextSibling&&S.nextSibling.dataset,v)var U=v.dgst;v=U,l=Error(a(419)),l.stack="",l.digest=v,ti({value:l,source:null,stack:null}),s=ah(n,s,i)}else if(rt||Xs(n,s,i,!1),v=(i&n.childLanes)!==0,rt||v){if(v=ze,v!==null&&(l=Md(v,i),l!==0&&l!==k.retryLane))throw k.retryLane=l,rs(n,l),Ut(v,n,l),Wc;Ph(S)||pl(),s=ah(n,s,i)}else Ph(S)?(s.flags|=192,s.child=n.child,s=null):(n=k.treeContext,qe=an(S.nextSibling),mt=s,we=!0,pr=null,rn=!1,n!==null&&kp(s,n),s=sh(s,l.children),s.flags|=4096);return s}return h?(_r(),S=l.fallback,h=s.mode,k=n.child,U=k.sibling,l=$n(k,{mode:"hidden",children:l.children}),l.subtreeFlags=k.subtreeFlags&65011712,U!==null?S=$n(U,S):(S=ss(S,h,i,null),S.flags|=2),S.return=s,l.return=s,l.sibling=S,s.child=l,di(null,l),l=s.child,S=n.child.memoizedState,S===null?S=nh(i):(h=S.cachePool,h!==null?(k=tt._currentValue,h=h.parent!==k?{parent:k,pool:k}
vendor: 5,372 bytes, line 9
9:h):h=Lp(),S={baseLanes:S.baseLanes|i,cachePool:h}),l.memoizedState=S,l.childLanes=rh(n,v,i),s.memoizedState=th,di(n.child,l)):(wr(s),i=n.child,n=i.sibling,i=$n(i,{mode:"visible",children:l.children}),i.return=s,i.sibling=null,n!==null&&(v=s.deletions,v===null?(s.deletions=[n],s.flags|=16):v.push(n)),s.child=i,s.memoizedState=null,i)}function sh(n,s){return s=al({mode:"visible",children:s},n.mode),s.return=n,n.child=s}function al(n,s){return n=Gt(22,n,null,s),n.lanes=0,n}function ah(n,s,i){return hs(s,n.child,null,i),n=sh(s,s.pendingProps.children),n.flags|=2,s.memoizedState=null,n}function Fg(n,s,i){n.lanes|=s;var l=n.alternate;l!==null&&(l.lanes|=s),wc(n.return,s,i)}function ih(n,s,i,l,h,d){var v=n.memoizedState;v===null?n.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:l,tail:i,tailMode:h,treeForkCount:d}:(v.isBackwards=s,v.rendering=null,v.renderingStartTime=0,v.last=l,v.tail=i,v.tailMode=h,v.treeForkCount=d)}function Yg(n,s,i){var l=s.pendingProps,h=l.revealOrder,d=l.tail;l=l.children;var v=Xe.current,S=(v&2)!==0;if(S?(v=v&1|2,s.flags|=128):v&=1,X(Xe,v),vt(n,s,l,i),l=we?ei:0,!S&&n!==null&&(n.flags&128)!==0)e:for(n=s.child;n!==null;){if(n.tag===13)n.memoizedState!==null&&Fg(n,i,s);else if(n.tag===19)Fg(n,i,s);else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===s)break e;for(;n.sibling===null;){if(n.return===null||n.return===s)break e;n=n.return}n.sibling.return=n.return,n=n.sibling}switch(h){case"forwards":for(i=s.child,h=null;i!==null;)n=i.alternate,n!==null&&Fo(n)===null&&(h=i),i=i.sibling;i=h,i===null?(h=s.child,s.child=null):(h=i.sibling,i.sibling=null),ih(s,!1,h,i,d,l);break;case"backwards":case"unstable_legacy-backwards":for(i=null,h=s.child,s.child=null;h!==null;){if(n=h.alternate,n!==null&&Fo(n)===null){s.child=h;break}n=h.sibling,h.sibling=i,i=h,h=n}ih(s,!0,i,null,d,l);break;case"together":ih(s,!1,null,null,void 0,l);break;default:s.memoizedState=null}return s.child}function Kn(n,s,i){if(n!==null&&(s.dependencies=n.dependencies),Er|=s.lanes,(i&s.childLanes)===0)if(n!==null){if(Xs(n,s,i,!1),(i&s.childLanes)===0)return null}else return null;if(n!==null&&s.child!==n.child)throw Error(a(153));if(s.child!==null){for(n=s.child,i=$n(n,n.pendingProps),s.child=i,i.return=s;n.sibling!==null;)n=n.sibling,i=i.sibling=$n(n,n.pendingProps),i.return=s;i.sibling=null}return s.child}function oh(n,s){return(n.lanes&s)!==0?!0:(n=n.dependencies,!!(n!==null&&Bo(n)))}function G_(n,s,i){switch(s.tag){case 3:Je(s,s.stateNode.containerInfo),mr(s,tt,n.memoizedState.cache),as();break;case 27:case 5:Ln(s);break;case 4:Je(s,s.stateNode.containerInfo);break;case 10:mr(s,s.type,s.memoizedProps.value);break;case 31:if(s.memoizedState!==null)return s.flags|=128,Mc(s),null;break;case 13:var l=s.memoizedState;if(l!==null)return l.dehydrated!==null?(wr(s),s.flags|=128,null):(i&s.child.childLanes)!==0?Kg(n,s,i):(wr(s),n=Kn(n,s,i),n!==null?n.sibling:null);wr(s);break;case 19:var h=(n.flags&128)!==0;if(l=(i&s.childLanes)!==0,l||(Xs(n,s,i,!1),l=(i&s.childLanes)!==0),h){if(l)return Yg(n,s,i);s.flags|=128}if(h=s.memoizedState,h!==null&&(h.rendering=null,h.tail=null,h.lastEffect=null),X(Xe,Xe.current),l)break;return null;case 22:return s.lanes=0,$g(n,s,i,s.pendingProps);case 24:mr(s,tt,n.memoizedState.cache)}return Kn(n,s,i)}function Qg(n,s,i){if(n!==null)if(n.memoizedProps!==s.pendingProps)rt=!0;else{if(!oh(n,i)&&(s.flags&128)===0)return rt=!1,G_(n,s,i);rt=(n.flags&131072)!==0}else rt=!1,we&&(s.flags&1048576)!==0&&Ap(s,ei,s.index);switch(s.lanes=0,s.tag){case 16:e:{var l=s.pendingProps;if(n=us(s.elementType),s.type=n,typeof n=="function")fc(n)?(l=ds(n,l),s.tag=1,s=Gg(null,s,n,l,i)):(s.tag=0,s=eh(null,s,n,l,i));else{if(n!=null){var h=n.$$typeof;if(h===z){s.tag=11,s=zg(null,s,n,l,i);break e}else if(h===q){s.tag=14,s=Pg(null,s,n,l,i);break e}}throw s=Qe(n)||n,Error(a(306,s,""))}}return s;case 0:return eh(n,s,s.type,s.pendingProps,i);case 1:return l=s.type,h=ds(l,s.pendingProps),Gg(n,s,l,h,i);case 3:e:{if(Je(s,s.stateNode.containerInfo),n===null)throw Error(a(387));l=s.pendingProps;var d=s.memoizedState;h=d.element,Ac(n,s),li(s,l,null,i);var v=s.memoizedState;if(l=v.cache,mr(s,tt,l),l!==d.cache&&_c(s,[tt],i,!0),oi(),l=v.element,d.isDehydrated)if(d={element:l,isDehydrated:!1,cache:v.cache},s.updateQueue.baseState=d,s.memoizedState=d,s.flags&256){s=Vg(n,s,l,i);break e}else if(l!==h){h=en(Error(a(424)),s),ti(h),s=Vg(n,s,l,i);break e}else for(n=s.stateNode.containerInfo,n.nodeType===9?n=n.body:n=n.nodeName==="HTML"?n.ownerDocument.body:n,qe=an(n.firstChild),mt=s,we=!0,pr=null,rn=!0,i=$p(s,null,l,i),s.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling;else{if(as(),l===h){s=Kn(n,s,i);break e}vt(n,s,l,i)}s=s.child}return s;case 26:return sl(n,s),n===null?(i=iy(s.type,null,s.pendingProps,null))?s.memoizedState=i:we||(i=s.type,n=s.pendingProps,l=_l(pe.current).createElement(i),l[gt]=s,l[Ct]=n,bt(l,i,n),ut(l),s.stateNode=l):s.memoizedState=iy(s.type,n.memoizedProps,s.pendingProps,n.memoizedState),null;case 27:return Ln(s),n===null&&we&&(l=s.stateNode=ry(s.type,s.pendingProps,pe.current),mt=s,rn=!0,h=qe,Or(s.type)?($h=h,qe=an(l.firstChild)):qe=h),vt(n,s,s.pendingProps.children,i),sl(n,s),n===null&&(s.flags|=4194304),s.child;case 5:return n===null&&we&&((h=l=qe)&&(l=wS(l,s.type,s.pendingProps,rn),l!==null?(s.stateNode=l,mt=s,qe=an(l.firstChild),rn=!1,h=!0):h=!1),h||gr(s)),Ln(s),h=s.t
vendor: 4,398 bytes, line 9
9ype,d=s.pendingProps,v=n!==null?n.memoizedProps:null,l=d.children,Dh(h,d)?l=null:v!==null&&Dh(h,v)&&(s.flags|=32),s.memoizedState!==null&&(h=Lc(n,s,D_,null,null,i),ki._currentValue=h),sl(n,s),vt(n,s,l,i),s.child;case 6:return n===null&&we&&((n=i=qe)&&(i=_S(i,s.pendingProps,rn),i!==null?(s.stateNode=i,mt=s,qe=null,n=!0):n=!1),n||gr(s)),null;case 13:return Kg(n,s,i);case 4:return Je(s,s.stateNode.containerInfo),l=s.pendingProps,n===null?s.child=hs(s,null,l,i):vt(n,s,l,i),s.child;case 11:return zg(n,s,s.type,s.pendingProps,i);case 7:return vt(n,s,s.pendingProps,i),s.child;case 8:return vt(n,s,s.pendingProps.children,i),s.child;case 12:return vt(n,s,s.pendingProps.children,i),s.child;case 10:return l=s.pendingProps,mr(s,s.type,l.value),vt(n,s,l.children,i),s.child;case 9:return h=s.type._context,l=s.pendingProps.children,os(s),h=yt(h),l=l(h),s.flags|=1,vt(n,s,l,i),s.child;case 14:return Pg(n,s,s.type,s.pendingProps,i);case 15:return Bg(n,s,s.type,s.pendingProps,i);case 19:return Yg(n,s,i);case 31:return H_(n,s,i);case 22:return $g(n,s,i,s.pendingProps);case 24:return os(s),l=yt(tt),n===null?(h=Ec(),h===null&&(h=ze,d=Sc(),h.pooledCache=d,d.refCount++,d!==null&&(h.pooledCacheLanes|=i),h=d),s.memoizedState={parent:l,cache:h},xc(s),mr(s,tt,h)):((n.lanes&i)!==0&&(Ac(n,s),li(s,null,null,i),oi()),h=n.memoizedState,d=s.memoizedState,h.parent!==l?(h={parent:l,cache:l},s.memoizedState=h,s.lanes===0&&(s.memoizedState=s.updateQueue.baseState=h),mr(s,tt,l)):(l=d.cache,mr(s,tt,l),l!==h.cache&&_c(s,[tt],i,!0))),vt(n,s,s.pendingProps.children,i),s.child;case 29:throw s.pendingProps}throw Error(a(156,s.tag))}function Fn(n){n.flags|=4}function lh(n,s,i,l,h){if((s=(n.mode&32)!==0)&&(s=!1),s){if(n.flags|=16777216,(h&335544128)===h)if(n.stateNode.complete)n.flags|=8192;else if(Sm())n.flags|=8192;else throw cs=Ho,Rc}else n.flags&=-16777217}function Jg(n,s){if(s.type!=="stylesheet"||(s.state.loading&4)!==0)n.flags&=-16777217;else if(n.flags|=16777216,!hy(s))if(Sm())n.flags|=8192;else throw cs=Ho,Rc}function il(n,s){s!==null&&(n.flags|=4),n.flags&16384&&(s=n.tag!==22?Od():536870912,n.lanes|=s,ua|=s)}function pi(n,s){if(!we)switch(n.tailMode){case"hidden":s=n.tail;for(var i=null;s!==null;)s.alternate!==null&&(i=s),s=s.sibling;i===null?n.tail=null:i.sibling=null;break;case"collapsed":i=n.tail;for(var l=null;i!==null;)i.alternate!==null&&(l=i),i=i.sibling;l===null?s||n.tail===null?n.tail=null:n.tail.sibling=null:l.sibling=null}}function He(n){var s=n.alternate!==null&&n.alternate.child===n.child,i=0,l=0;if(s)for(var h=n.child;h!==null;)i|=h.lanes|h.childLanes,l|=h.subtreeFlags&65011712,l|=h.flags&65011712,h.return=n,h=h.sibling;else for(h=n.child;h!==null;)i|=h.lanes|h.childLanes,l|=h.subtreeFlags,l|=h.flags,h.return=n,h=h.sibling;return n.subtreeFlags|=l,n.childLanes=i,s}function V_(n,s,i){var l=s.pendingProps;switch(mc(s),s.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return He(s),null;case 1:return He(s),null;case 3:return i=s.stateNode,l=null,n!==null&&(l=n.memoizedState.cache),s.memoizedState.cache!==l&&(s.flags|=2048),Hn(tt),Ue(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(n===null||n.child===null)&&(Js(s)?Fn(s):n===null||n.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,vc())),He(s),null;case 26:var h=s.type,d=s.memoizedState;return n===null?(Fn(s),d!==null?(He(s),Jg(s,d)):(He(s),lh(s,h,null,l,i))):d?d!==n.memoizedState?(Fn(s),He(s),Jg(s,d)):(He(s),s.flags&=-16777217):(n=n.memoizedProps,n!==l&&Fn(s),He(s),lh(s,h,n,l,i)),null;case 27:if(Dn(s),i=pe.current,h=s.type,n!==null&&s.stateNode!=null)n.memoizedProps!==l&&Fn(s);else{if(!l){if(s.stateNode===null)throw Error(a(166));return He(s),null}n=W.current,Js(s)?Op(s):(n=ry(h,l,i),s.stateNode=n,Fn(s))}return He(s),null;case 5:if(Dn(s),h=s.type,n!==null&&s.stateNode!=null)n.memoizedProps!==l&&Fn(s);else{if(!l){if(s.stateNode===null)throw Error(a(166));return He(s),null}if(d=W.current,Js(s))Op(s);else{var v=_l(pe.current);switch(d){case 1:d=v.createElementNS("http://www.w3.org/2000/svg",h);break;case 2:d=v.createElementNS("http://www.w3.org/1998/Math/MathML",h);break;default:switch(h){case"svg":d=v.createElementNS("http://www.w3.org/2000/svg",h);break;case"math":d=v.createElementNS("http://www.w3.org/1998/Math/MathML",h);break;case"script":d=v.createElement("div"),d.innerHTML="<script><\/script>",d=d.removeChild(d.firstChild);break;
vendor: 14,663 bytes, line 9
9case"select":d=typeof l.is=="string"?v.createElement("select",{is:l.is}):v.createElement("select"),l.multiple?d.multiple=!0:l.size&&(d.size=l.size);break;default:d=typeof l.is=="string"?v.createElement(h,{is:l.is}):v.createElement(h)}}d[gt]=s,d[Ct]=l;e:for(v=s.child;v!==null;){if(v.tag===5||v.tag===6)d.appendChild(v.stateNode);else if(v.tag!==4&&v.tag!==27&&v.child!==null){v.child.return=v,v=v.child;continue}if(v===s)break e;for(;v.sibling===null;){if(v.return===null||v.return===s)break e;v=v.return}v.sibling.return=v.return,v=v.sibling}s.stateNode=d;e:switch(bt(d,h,l),h){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break e;case"img":l=!0;break e;default:l=!1}l&&Fn(s)}}return He(s),lh(s,s.type,n===null?null:n.memoizedProps,s.pendingProps,i),null;case 6:if(n&&s.stateNode!=null)n.memoizedProps!==l&&Fn(s);else{if(typeof l!="string"&&s.stateNode===null)throw Error(a(166));if(n=pe.current,Js(s)){if(n=s.stateNode,i=s.memoizedProps,l=null,h=mt,h!==null)switch(h.tag){case 27:case 5:l=h.memoizedProps}n[gt]=s,n=!!(n.nodeValue===i||l!==null&&l.suppressHydrationWarning===!0||Km(n.nodeValue,i)),n||gr(s,!0)}else n=_l(n).createTextNode(l),n[gt]=s,s.stateNode=n}return He(s),null;case 31:if(i=s.memoizedState,n===null||n.memoizedState!==null){if(l=Js(s),i!==null){if(n===null){if(!l)throw Error(a(318));if(n=s.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(a(557));n[gt]=s}else as(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;He(s),n=!1}else i=vc(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=i),n=!0;if(!n)return s.flags&256?(Kt(s),s):(Kt(s),null);if((s.flags&128)!==0)throw Error(a(558))}return He(s),null;case 13:if(l=s.memoizedState,n===null||n.memoizedState!==null&&n.memoizedState.dehydrated!==null){if(h=Js(s),l!==null&&l.dehydrated!==null){if(n===null){if(!h)throw Error(a(318));if(h=s.memoizedState,h=h!==null?h.dehydrated:null,!h)throw Error(a(317));h[gt]=s}else as(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;He(s),h=!1}else h=vc(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=h),h=!0;if(!h)return s.flags&256?(Kt(s),s):(Kt(s),null)}return Kt(s),(s.flags&128)!==0?(s.lanes=i,s):(i=l!==null,n=n!==null&&n.memoizedState!==null,i&&(l=s.child,h=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(h=l.alternate.memoizedState.cachePool.pool),d=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(d=l.memoizedState.cachePool.pool),d!==h&&(l.flags|=2048)),i!==n&&i&&(s.child.flags|=8192),il(s,s.updateQueue),He(s),null);case 4:return Ue(),n===null&&Ch(s.stateNode.containerInfo),He(s),null;case 10:return Hn(s.type),He(s),null;case 19:if(G(Xe),l=s.memoizedState,l===null)return He(s),null;if(h=(s.flags&128)!==0,d=l.rendering,d===null)if(h)pi(l,!1);else{if(Fe!==0||n!==null&&(n.flags&128)!==0)for(n=s.child;n!==null;){if(d=Fo(n),d!==null){for(s.flags|=128,pi(l,!1),n=d.updateQueue,s.updateQueue=n,il(s,n),s.subtreeFlags=0,n=i,i=s.child;i!==null;)Ep(i,n),i=i.sibling;return X(Xe,Xe.current&1|2),we&&In(s,l.treeForkCount),s.child}n=n.sibling}l.tail!==null&&wt()>hl&&(s.flags|=128,h=!0,pi(l,!1),s.lanes=4194304)}else{if(!h)if(n=Fo(d),n!==null){if(s.flags|=128,h=!0,n=n.updateQueue,s.updateQueue=n,il(s,n),pi(l,!0),l.tail===null&&l.tailMode==="hidden"&&!d.alternate&&!we)return He(s),null}else 2*wt()-l.renderingStartTime>hl&&i!==536870912&&(s.flags|=128,h=!0,pi(l,!1),s.lanes=4194304);l.isBackwards?(d.sibling=s.child,s.child=d):(n=l.last,n!==null?n.sibling=d:s.child=d,l.last=d)}return l.tail!==null?(n=l.tail,l.rendering=n,l.tail=n.sibling,l.renderingStartTime=wt(),n.sibling=null,i=Xe.current,X(Xe,h?i&1|2:i&1),we&&In(s,l.treeForkCount),n):(He(s),null);case 22:case 23:return Kt(s),jc(),l=s.memoizedState!==null,n!==null?n.memoizedState!==null!==l&&(s.flags|=8192):l&&(s.flags|=8192),l?(i&536870912)!==0&&(s.flags&128)===0&&(He(s),s.subtreeFlags&6&&(s.flags|=8192)):He(s),i=s.updateQueue,i!==null&&il(s,i.retryQueue),i=null,n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(i=n.memoizedState.cachePool.pool),l=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(l=s.memoizedState.cachePool.pool),l!==i&&(s.flags|=2048),n!==null&&G(ls),null;case 24:return i=null,n!==null&&(i=n.memoizedState.cache),s.memoizedState.cache!==i&&(s.flags|=2048),Hn(tt),He(s),null;case 25:return null;case 30:return null}throw Error(a(156,s.tag))}function K_(n,s){switch(mc(s),s.tag){case 1:return n=s.flags,n&65536?(s.flags=n&-65537|128,s):null;case 3:return Hn(tt),Ue(),n=s.flags,(n&65536)!==0&&(n&128)===0?(s.flags=n&-65537|128,s):null;case 26:case 27:case 5:return Dn(s),null;case 31:if(s.memoizedState!==null){if(Kt(s),s.alternate===null)throw Error(a(340));as()}return n=s.flags,n&65536?(s.flags=n&-65537|128,s):null;case 13:if(Kt(s),n=s.memoizedState,n!==null&&n.dehydrated!==null){if(s.alternate===null)throw Error(a(340));as()}return n=s.flags,n&65536?(s.flags=n&-65537|128,s):null;case 19:return G(Xe),null;case 4:return Ue(),null;case 10:return Hn(s.type),null;case 22:case 23:return Kt(s),jc(),n!==null&&G(ls),n=s.flags,n&65536?(s.flags=n&-65537|128,s):null;case 24:return Hn(tt),null;case 25:return null;default:return null}}function Xg(n,s){switch(mc(s),s.tag){case 3:Hn(tt),Ue();break;case 26:case 27:case 5:Dn(s);break;case 4:Ue();break;case 31:s.memoizedState!==null&&Kt(s);break;case 13:Kt(s);break;case 19:G(Xe);break;case 10:Hn(s.type);break;case 22:case 23:Kt(s),jc(),n!==null&&G(ls);break;case 24:Hn(tt)}}function gi(n,s){try{var i=s.updateQueue,l=i!==null?i.lastEffect:null;if(l!==null){var h=l.next;i=h;do{if((i.tag&n)===n){l=void 0;var d=i.create,v=i.inst;l=d(),v.destroy=l}i=i.next}while(i!==h)}}catch(S){Me(s,s.return,S)}}function Sr(n,s,i){try{var l=s.updateQueue,h=l!==null?l.lastEffect:null;if(h!==null){var d=h.next;l=d;do{if((l.tag&n)===n){var v=l.inst,S=v.destroy;if(S!==void 0){v.destroy=void 0,h=s;var k=i,U=S;try{U()}catch(I){Me(h,k,I)}}}l=l.next}while(l!==d)}}catch(I){Me(s,s.return,I)}}function Zg(n){var s=n.updateQueue;if(s!==null){var i=n.stateNode;try{qp(s,i)}catch(l){Me(n,n.return,l)}}}function Wg(n,s,i){i.props=ds(n.type,n.memoizedProps),i.state=n.memoizedState;try{i.componentWillUnmount()}catch(l){Me(n,s,l)}}function mi(n,s){try{var i=n.ref;if(i!==null){switch(n.tag){case 26:case 27:case 5:var l=n.stateNode;break;case 30:l=n.stateNode;break;default:l=n.stateNode}typeof i=="function"?n.refCleanup=i(l):i.current=l}}catch(h){Me(n,s,h)}}function xn(n,s){var i=n.ref,l=n.refCleanup;if(i!==null)if(typeof l=="function")try{l()}catch(h){Me(n,s,h)}finally{n.refCleanup=null,n=n.alternate,n!=null&&(n.refCleanup=null)}else if(typeof i=="function")try{i(null)}catch(h){Me(n,s,h)}else i.current=null}function em(n){var s=n.type,i=n.memoizedProps,l=n.stateNode;try{e:switch(s){case"button":case"input":case"select":case"textarea":i.autoFocus&&l.focus();break e;case"img":i.src?l.src=i.src:i.srcSet&&(l.srcset=i.srcSet)}}catch(h){Me(n,n.return,h)}}function uh(n,s,i){try{var l=n.stateNode;pS(l,n.type,i,s),l[Ct]=s}catch(h){Me(n,n.return,h)}}function tm(n){return n.tag===5||n.tag===3||n.tag===26||n.tag===27&&Or(n.type)||n.tag===4}function ch(n){e:for(;;){for(;n.sibling===null;){if(n.return===null||tm(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&&Or(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 hh(n,s,i){var l=n.tag;if(l===5||l===6)n=n.stateNode,s?(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i).insertBefore(n,s):(s=i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,s.appendChild(n),i=i._reactRootContainer,i!=null||s.onclick!==null||(s.onclick=Pn));else if(l!==4&&(l===27&&Or(n.type)&&(i=n.stateNode,s=null),n=n.child,n!==null))for(hh(n,s,i),n=n.sibling;n!==null;)hh(n,s,i),n=n.sibling}function ol(n,s,i){var l=n.tag;if(l===5||l===6)n=n.stateNode,s?i.insertBefore(n,s):i.appendChild(n);else if(l!==4&&(l===27&&Or(n.type)&&(i=n.stateNode),n=n.child,n!==null))for(ol(n,s,i),n=n.sibling;n!==null;)ol(n,s,i),n=n.sibling}function nm(n){var s=n.stateNode,i=n.memoizedProps;try{for(var l=n.type,h=s.attributes;h.length;)s.removeAttributeNode(h[0]);bt(s,l,i),s[gt]=n,s[Ct]=i}catch(d){Me(n,n.return,d)}}var Yn=!1,st=!1,fh=!1,rm=typeof WeakSet=="function"?WeakSet:Set,ct=null;function F_(n,s){if(n=n.containerInfo,Nh=kl,n=gp(n),ac(n)){if("selectionStart"in n)var i={start:n.selectionStart,end:n.selectionEnd};else e:{i=(i=n.ownerDocument)&&i.defaultView||window;var l=i.getSelection&&i.getSelection();if(l&&l.rangeCount!==0){i=l.anchorNode;var h=l.anchorOffset,d=l.focusNode;l=l.focusOffset;try{i.nodeType,d.nodeType}catch{i=null;break e}var v=0,S=-1,k=-1,U=0,I=0,V=n,P=null;t:for(;;){for(var B;V!==i||h!==0&&V.nodeType!==3||(S=v+h),V!==d||l!==0&&V.nodeType!==3||(k=v+l),V.nodeType===3&&(v+=V.nodeValue.length),(B=V.firstChild)!==null;)P=V,V=B;for(;;){if(V===n)break t;if(P===i&&++U===h&&(S=v),P===d&&++I===l&&(k=v),(B=V.nextSibling)!==null)break;V=P,P=V.parentNode}V=B}i=S===-1||k===-1?null:{start:S,end:k}}else i=null}i=i||{start:0,end:0}}else i=null;for(Lh={focusedElem:n,selectionRange:i},kl=!1,ct=s;ct!==null;)if(s=ct,n=s.child,(s.subtreeFlags&1028)!==0&&n!==null)n.return=s,ct=n;else for(;ct!==null;){switch(s=ct,d=s.alternate,n=s.flags,s.tag){case 0:if((n&4)!==0&&(n=s.updateQueue,n=n!==null?n.events:null,n!==null))for(i=0;i<n.length;i++)h=n[i],h.ref.impl=h.nextImpl;break;case 11:case 15:break;case 1:if((n&1024)!==0&&d!==null){n=void 0,i=s,h=d.memoizedProps,d=d.memoizedState,l=i.stateNode;try{var te=ds(i.type,h);n=l.getSnapshotBeforeUpdate(te,d),l.__reactInternalSnapshotBeforeUpdate=n}catch(ue){Me(i,i.return,ue)}}break;case 3:if((n&1024)!==0){if(n=s.stateNode.containerInfo,i=n.nodeType,i===9)zh(n);else if(i===1)switch(n.nodeName){case"HEAD":case"HTML":case"BODY":zh(n);break;default:n.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((n&1024)!==0)throw Error(a(163))}if(n=s.sibling,n!==null){n.return=s.return,ct=n;break}ct=s.return}}function sm(n,s,i){var l=i.flags;switch(i.tag){case 0:case 11:case 15:Jn(n,i),l&4&&gi(5,i);break;case 1:if(Jn(n,i),l&4)if(n=i.stateNode,s===null)try{n.componentDidMount()}catch(v){Me(i,i.return,v)}else{var h=ds(i.type,s.memoizedProps);s=s.memoizedState;try{n.componentDidUpdate(h,s,n.__reactInternalSnapshotBeforeUpdate)}catch(v){Me(i,i.return,v)}}l&64&&Zg(i),l&512&&mi(i,i.return);break;case 3:if(Jn(n,i),l&64&&(n=i.updateQueue,n!==null)){if(s=null,i.child!==null)switch(i.child.tag){case 27:case 5:s=i.child.stateNode;break;case 1:s=i.child.stateNode}try{qp(n,s)}catch(v){Me(i,i.return,v)}}break;case 27:s===null&&l&4&&nm(i);case 26:case 5:Jn(n,i),s===null&&l&4&&em(i),l&512&&mi(i,i.return);break;case 12:Jn(n,i);break;case 31:Jn(n,i),l&4&&om(n,i);break;case 13:Jn(n,i),l&4&&lm(n,i),l&64&&(n=i.memoizedState,n!==null&&(n=n.dehydrated,n!==null&&(i=nS.bind(null,i),SS(n,i))));break;case 22:if(l=i.memoizedState!==null||Yn,!l){s=s!==null&&s.memoizedState!==null||st,h=Yn;var d=st;Yn=l,(st=s)&&!d?Xn(n,i,(i.subtreeFlags&8772)!==0):Jn(n,i),Yn=h,st=d}break;case 30:break;default:Jn(n,i)}}function am(n){var s=n.alternate;s!==null&&(n.alternate=null,am(s)),n.child=null,n.deletions=null,n.sibling=null,n.tag===5&&(s=n.stateNode,s!==null&&qu(s)),n.stateNode=null,n.return=null,n.dependencies=null,n.memoizedProps=null,n.memoizedState=null,n.pendingProps=null,n.stateNode=null,n.updateQueue=null}var Ge=null,Mt=!1;function Qn(n,s,i){for(i=i.child;i!==null;)im(n,s,i),i=i.sibling}function im(n,s,i){if(It&&typeof It.onCommitFiberUnmount=="function")try{It.onCommitFiberUnmount($a,i)}catch{}switch(i.tag){case 26:st||xn(i,s),Qn(n,s,i),i.memoizedState?i.memoizedState.count--:i.stateNode&&(i=i.stateNode,i.parentNode.removeChild(i));break;case 27:st||xn(i,s);var l=Ge,h=Mt;Or(i.type)&&(Ge=i.stateNode,Mt=!1),Qn(n,s,i),Ri(i.stateNode),Ge=l,Mt=h;break;case 5:st||xn(i,s);case 6:if(l=Ge,h=Mt,Ge=null,Qn(n,s,i),Ge=l,Mt=h,Ge!==null)if(Mt)try{(Ge.nodeType===9?Ge.body:Ge.nodeName==="HTML"?Ge.ownerDocument.body:Ge).removeChild(i.stateNode)}catch(d){Me(i,s,d)}else try{Ge.removeChild(i.stateNode)}catch(d){Me(i,s,d)}break;case 18:Ge!==null&&(Mt?(n=Ge,Zm(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,i.stateNode),ya(n)):Zm(Ge,i.stateNode));break;case 4:l=Ge,h=Mt,Ge=i.stateNode.containerInfo,Mt=!0,Qn(n,s,i),Ge=l,Mt=h;break;case 0:case 11:case 14:case 15:Sr(2,i,s),st||Sr(4,i,s),Qn(n,s,i);break;case 1:st||(xn(i,s),l=i.stateNode,typeof l.componentWillUnmount=="function"&&Wg(i,s,l)),Qn(n,s,i);break;case 21:Qn(n,s,i);break;case 22:st=(l=st)||i.memoizedState!==null,Qn(n,s,i),st=l;break;default:Qn(n,s,i)}}function om(n,s){if(s.memoizedState===null&&(n=s.alternate,n!==null&&(n=n.memoizedState,n!==null))){n=n.dehydrated;try{ya(n)}catch(i){Me(s,s.return,i)}}}function lm(n,s){if(s.memoizedState===null&&(n=s.alternate,n!==null&&(n=n.memoizedState,n!==null&&(n=n.dehydrated,n!==null))))try{ya(n)}catch(i){Me(s,s.return,i)}}function Y_(n){switch(n.tag){case 31:case 13:case 19:var s=n.stateNode;return s===null&&(s=n.stateNode=new rm),s;case 22:return n=n.stateNode,s=n._retryCache,s===null&&(s=n._retryCache=new rm),s;default:throw Error(a(435,n.tag))}}function ll(n,s){var i=Y_(n);s.forEach(function(l){if(!i.has(l)){i.add(l);var h=rS.bind(null,n,l);l.then(h,h)}})}function Nt(n,s){var i=s.deletions;if(i!==null)for(var l=0;l<i.length;l++){var h=i[l],d=n,v=s,S=v;e:for(;S!==null;){switch(S.tag){case 27:if(Or(S.type)){Ge=S.stateNode,Mt=!1;break e}break;case 5:Ge=S.stateNode,Mt=!1;break e;case 3:case 4:Ge=S.stateNode.containerInfo,Mt=!0;break e}S=S.return}if(Ge===null)throw Error(a(160));im(d,v,h),Ge=null,Mt=!1,d=h.alternate,d!==null&&(d.return=null),h.return=null}if(s.subtreeFlags&13886)for(s=s.child;s!==null;)um(s,n),s=s.sibling}var hn=null;function um(n,s){var i=n.alternate,l=n.flags;switch(n.tag){case 0:case 11:case 14:case 15:Nt(s,n),Lt(n),l&4&&(Sr(3,n,n.return),gi(3,n),Sr(5,n,n.return));break;case 1:Nt(s,n),Lt(n),l&512&&(st||i===null||xn(i,i.return)),l&64&&Yn&&(n=n.updateQueue,n!==null&&(l=n.callbacks,l!==null&&(i=n.shared.hiddenCallbacks,n.shared.hiddenCallbacks=i===null?l:i.concat(l))));break;case 26:var h=hn;if(Nt(s,n),Lt(n),l&512&&(st||i===null||xn(i,i.return)),l&4){var d=i!==null?i.memoizedState:null;if(l=n.memoizedState,i===null)if(l===null)if(n.stateNode===null){e:{l=n.type,i=n.memoizedProps,h=h.ownerDocument||h;t:switch(l){case"title":d=h.getElementsByTagName("title")[0],(!d||d[Ha]||d[gt]||d.namespaceURI==="http://www.w3.org/2000/svg"||d.hasAttribute("itemprop"))&&(d=h.createElement(l),h.head.insertBefore(d,h.querySelector("head >
9 title"))),bt(d,l,i),d[gt]=n,ut(d),l=d;break e;case"link":var v=uy("link","href",h).get(l+(i.href||""));if(v){for(var S=0;S<v.length;S++)if(d=v[S],d.getAttribute("href")===(i.href==null||i.href===""?null:i.href)&&d.getAttribute("rel")===(i.rel==null?null:i.rel)&&d.getAttribute("title")===(i.title==null?null:i.title)&&d.getAttribute("crossorigin")===(i.crossOrigin==null?null:i.crossOrigin)){v.splice(S,1);break t}}d=h.createElement(l),bt(d,l,i),h.head.appendChild(d);break;case"meta":if(v=uy("meta","content",h).get(l+(i.content||""))){for(S=0;S<v.length;S++)if(d=v[S],d.getAttribute("content")===(i.content==null?null:""+i.content)&&d.getAttribute("name")===(i.name==null?null:i.name)&&d.getAttribute("property")===(i.property==null?null:i.property)&&d.getAttribute("http-equiv")===(i.httpEquiv==null?null:i.httpEquiv)&&d.getAttribute("charset")===(i.charSet==null?null:i.charSet)){v.splice(S,1);break t}}d=h.createElement(l),bt(d,l,i),h.head.appendChild(d);break;default:throw Error(a(468,l))}d[gt]=n,ut(d),l=d}n.stateNode=l}else cy(h,n.type,n.stateNode);else n.stateNode=ly(h,l,n.memoizedProps);else d!==l?(d===null?i.stateNode!==null&&(i=i.stateNode,i.parentNode.removeChild(i)):d.count--,l===null?cy(h,n.type,n.stateNode):ly(h,l,n.memoizedProps)):l===null&&n.stateNode!==null&&uh(n,n.memoizedProps,i.memoizedProps)}break;case 27:Nt(s,n),Lt(n),l&512&&(st||i===null||xn(i,i.return)),i!==null&&l&4&&uh(n,n.memoizedProps,i.memoizedProps);break;case 5:if(Nt(s,n),Lt(n),l&512&&(st||i===null||xn(i,i.return)),n.flags&32){h=n.stateNode;try{$s(h,"")}catch(te){Me(n,n.return,te)}}l&4&&n.stateNode!=null&&(h=n.memoizedProps,uh(n,h,i!==null?i.memoizedProps:h)),l&1024&&(fh=!0);break;case 6:if(Nt(s,n),Lt(n),l&4){if(n.stateNode===null)throw Error(a(162));l=n.memoizedProps,i=n.stateNode;try{i.nodeValue=l}catch(te){Me(n,n.return,te)}}break;case 3:if(El=null,h=hn,hn=Sl(s.containerInfo),Nt(s,n),hn=h,Lt(n),l&4&&i!==null&&i.memoizedState.isDehydrated)try{ya(s.containerInfo)}catch(te){Me(n,n.return,te)}fh&&(fh=!1,cm(n));break;case 4:l=hn,hn=Sl(n.stateNode.containerInfo),Nt(s,n),Lt(n),hn=l;break;case 12:Nt(s,n),Lt(n);break;case 31:Nt(s,n),Lt(n),l&4&&(l=n.updateQueue,l!==null&&(n.updateQueue=null,ll(n,l)));break;case 13:Nt(s,n),Lt(n),n.child.flags&8192&&n.memoizedState!==null!=(i!==null&&i.memoizedState!==null)&&(cl=wt()),l&4&&(l=n.updateQueue,l!==null&&(n.updateQueue=null,ll(n,l)));break;case 22:h=n.memoizedState!==null;var k=i!==null&&i.memoizedState!==null,U=Yn,I=st;if(Yn=U||h,st=I||k,Nt(s,n),st=I,Yn=U,Lt(n),l&8192)e:for(s=n.stateNode,s._visibility=h?s._visibility&-2:s._visibility|1,h&&(i===null||k||Yn||st||ps(n)),i=null,s=n;;){if(s.tag===5||s.tag===26){if(i===null){k=i=s;try{if(d=k.stateNode,h)v=d.style,typeof v.setProperty=="function"?v.setProperty("display","none","important"):v.display="none";else{S=k.stateNode;var V=k.memoizedProps.style,P=V!=null&&V.hasOwnProperty("display")?V.display:null;S.style.display=P==null||typeof P=="boolean"?"":(""+P).trim()}}catch(te){Me(k,k.return,te)}}}else if(s.tag===6){if(i===null){k=s;try{k.stateNode.nodeValue=h?"":k.memoizedProps}catch(te){Me(k,k.return,te)}}}else if(s.tag===18){if(i===null){k=s;try{var B=k.stateNode;h?Wm(B,!0):Wm(k.stateNode,!1)}catch(te){Me(k,k.return,te)}}}else if((s.tag!==22&&s.tag!==23||s.memoizedState===null||s===n)&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===n)break e;for(;s.sibling===null;){if(s.return===null||s.return===n)break e;i===s&&(i=null),s=s.return}i===s&&(i=null),s.sibling.return=s.return,s=s.sibling}l&4&&(l=n.updateQueue,l!==null&&(i=l.retryQueue,i!==null&&(l.retryQueue=null,ll(n,i))));break;case 19:Nt(s,n),Lt(n),l&4&&(l=n.updateQueue,l!==null&&(n.updateQueue=null,ll(n,l)));break;case 30:break;case 21:break;default:Nt(s,n),Lt(n)}}function Lt(n){var s=n.flags;if(s&2){try{for(var i,l=n.return;l!==null;){if(tm(l)){i=l;break}l=l.return}if(i==null)throw Error(a(160));switch(i.tag){case 27:var h=i.stateNode,d=ch(n);ol(n,d,h);break;case 5:var v=i.stateNode;i.flags&32&&($s(v,""),i.flags&=-33);var S=ch(n);ol(n,S,v);break;case 3:case 4:var k=i.stateNode.containerInfo,U=ch(n);hh(n,U,k);break;default:throw Error(a(161))}}catch(I){Me(n,n.return,I)}n.flags&=-3}s&4096&&(n.flags&=-4097)}function cm(n){if(n.subtreeFlags&1024)for(n=n.child;n!==null;){var s=n;cm(s),s.tag===5&&s.flags&1024&&s.stateNode.reset(),n=n.sibling}}function Jn(n,s){if(s.subtreeFlags&8772)for(s=s.child;s!==null;)sm(n,s.alternate,s),s=s.sibling}function ps(n){for(n=n.child;n!==null;){var s=n;switch(s.tag){case 0:case 11:case 14:case 15:Sr(4,s,s.return),ps(s);break;case 1:xn(s,s.return);var i=s.stateNode;typeof i.componentWillUnmount=="function"&&Wg(s,s.return,i),ps(s);break;case 27:Ri(s.stateNode);case 26:case 5:xn(s,s.return),ps(s);break;case 22:s.memoizedState===null&&ps(s);break;case 30:ps(s);break;default:ps(s)}n=n.sibling}}function Xn(n,s,i){for(i=i&&(s.subtreeFlags&8772)!==0,s=s.child;s!==null;){var l=s.alternate,h=n,d=s,v=d.flags;switch(d.tag){case 0:case 11:case 15:Xn(h,d,i),gi(4,d);break;case 1:if(Xn(h,d,i),l=d,h=l.stateNode,typeof h.componentDidMount=="function")try{h.componentDidMount()}catch(U){Me(l,l.return,U)}if(l=d,h=l.updateQueue,h!==null){var S=l.stateNode;try{var k=h.shared.hiddenCallbacks;
vendor: 6,126 bytes, line 9
9if(k!==null)for(h.shared.hiddenCallbacks=null,h=0;h<k.length;h++)Ip(k[h],S)}catch(U){Me(l,l.return,U)}}i&&v&64&&Zg(d),mi(d,d.return);break;case 27:nm(d);case 26:case 5:Xn(h,d,i),i&&l===null&&v&4&&em(d),mi(d,d.return);break;case 12:Xn(h,d,i);break;case 31:Xn(h,d,i),i&&v&4&&om(h,d);break;case 13:Xn(h,d,i),i&&v&4&&lm(h,d);break;case 22:d.memoizedState===null&&Xn(h,d,i),mi(d,d.return);break;case 30:break;default:Xn(h,d,i)}s=s.sibling}}function dh(n,s){var i=null;n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(i=n.memoizedState.cachePool.pool),n=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(n=s.memoizedState.cachePool.pool),n!==i&&(n!=null&&n.refCount++,i!=null&&ni(i))}function ph(n,s){n=null,s.alternate!==null&&(n=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==n&&(s.refCount++,n!=null&&ni(n))}function fn(n,s,i,l){if(s.subtreeFlags&10256)for(s=s.child;s!==null;)hm(n,s,i,l),s=s.sibling}function hm(n,s,i,l){var h=s.flags;switch(s.tag){case 0:case 11:case 15:fn(n,s,i,l),h&2048&&gi(9,s);break;case 1:fn(n,s,i,l);break;case 3:fn(n,s,i,l),h&2048&&(n=null,s.alternate!==null&&(n=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==n&&(s.refCount++,n!=null&&ni(n)));break;case 12:if(h&2048){fn(n,s,i,l),n=s.stateNode;try{var d=s.memoizedProps,v=d.id,S=d.onPostCommit;typeof S=="function"&&S(v,s.alternate===null?"mount":"update",n.passiveEffectDuration,-0)}catch(k){Me(s,s.return,k)}}else fn(n,s,i,l);break;case 31:fn(n,s,i,l);break;case 13:fn(n,s,i,l);break;case 23:break;case 22:d=s.stateNode,v=s.alternate,s.memoizedState!==null?d._visibility&2?fn(n,s,i,l):yi(n,s):d._visibility&2?fn(n,s,i,l):(d._visibility|=2,ia(n,s,i,l,(s.subtreeFlags&10256)!==0||!1)),h&2048&&dh(v,s);break;case 24:fn(n,s,i,l),h&2048&&ph(s.alternate,s);break;default:fn(n,s,i,l)}}function ia(n,s,i,l,h){for(h=h&&((s.subtreeFlags&10256)!==0||!1),s=s.child;s!==null;){var d=n,v=s,S=i,k=l,U=v.flags;switch(v.tag){case 0:case 11:case 15:ia(d,v,S,k,h),gi(8,v);break;case 23:break;case 22:var I=v.stateNode;v.memoizedState!==null?I._visibility&2?ia(d,v,S,k,h):yi(d,v):(I._visibility|=2,ia(d,v,S,k,h)),h&&U&2048&&dh(v.alternate,v);break;case 24:ia(d,v,S,k,h),h&&U&2048&&ph(v.alternate,v);break;default:ia(d,v,S,k,h)}s=s.sibling}}function yi(n,s){if(s.subtreeFlags&10256)for(s=s.child;s!==null;){var i=n,l=s,h=l.flags;switch(l.tag){case 22:yi(i,l),h&2048&&dh(l.alternate,l);break;case 24:yi(i,l),h&2048&&ph(l.alternate,l);break;default:yi(i,l)}s=s.sibling}}var vi=8192;function oa(n,s,i){if(n.subtreeFlags&vi)for(n=n.child;n!==null;)fm(n,s,i),n=n.sibling}function fm(n,s,i){switch(n.tag){case 26:oa(n,s,i),n.flags&vi&&n.memoizedState!==null&&LS(i,hn,n.memoizedState,n.memoizedProps);break;case 5:oa(n,s,i);break;case 3:case 4:var l=hn;hn=Sl(n.stateNode.containerInfo),oa(n,s,i),hn=l;break;case 22:n.memoizedState===null&&(l=n.alternate,l!==null&&l.memoizedState!==null?(l=vi,vi=16777216,oa(n,s,i),vi=l):oa(n,s,i));break;default:oa(n,s,i)}}function dm(n){var s=n.alternate;if(s!==null&&(n=s.child,n!==null)){s.child=null;do s=n.sibling,n.sibling=null,n=s;while(n!==null)}}function bi(n){var s=n.deletions;if((n.flags&16)!==0){if(s!==null)for(var i=0;i<s.length;i++){var l=s[i];ct=l,gm(l,n)}dm(n)}if(n.subtreeFlags&10256)for(n=n.child;n!==null;)pm(n),n=n.sibling}function pm(n){switch(n.tag){case 0:case 11:case 15:bi(n),n.flags&2048&&Sr(9,n,n.return);break;case 3:bi(n);break;case 12:bi(n);break;case 22:var s=n.stateNode;n.memoizedState!==null&&s._visibility&2&&(n.return===null||n.return.tag!==13)?(s._visibility&=-3,ul(n)):bi(n);break;default:bi(n)}}function ul(n){var s=n.deletions;if((n.flags&16)!==0){if(s!==null)for(var i=0;i<s.length;i++){var l=s[i];ct=l,gm(l,n)}dm(n)}for(n=n.child;n!==null;){switch(s=n,s.tag){case 0:case 11:case 15:Sr(8,s,s.return),ul(s);break;case 22:i=s.stateNode,i._visibility&2&&(i._visibility&=-3,ul(s));break;default:ul(s)}n=n.sibling}}function gm(n,s){for(;ct!==null;){var i=ct;switch(i.tag){case 0:case 11:case 15:Sr(8,i,s);break;case 23:case 22:if(i.memoizedState!==null&&i.memoizedState.cachePool!==null){var l=i.memoizedState.cachePool.pool;l!=null&&l.refCount++}break;case 24:ni(i.memoizedState.cache)}if(l=i.child,l!==null)l.return=i,ct=l;else e:for(i=n;ct!==null;){l=ct;var h=l.sibling,d=l.return;if(am(l),l===i){ct=null;break e}if(h!==null){h.return=d,ct=h;break e}ct=d}}}var Q_={getCacheForType:function(n){var s=yt(tt),i=s.data.get(n);return i===void 0&&(i=n(),s.data.set(n,i)),i},cacheSignal:function(){return yt(tt).controller.signal}},J_=typeof WeakMap=="function"?WeakMap:Map,Ae=0,ze=null,ge=null,ve=0,je=0,Ft=null,Tr=!1,la=!1,gh=!1,Zn=0,Fe=0,Er=0,gs=0,mh=0,Yt=0,ua=0,wi=null,Dt=null,yh=!1,cl=0,mm=0,hl=1/0,fl=null,Rr=null,it=0,xr=null,ca=null,Wn=0,vh=0,bh=null,ym=null,_i=0,wh=null;function Qt(){return(Ae&2)!==0&&ve!==0?ve&-ve:$.T!==null?xh():Nd()}function vm(){if(Yt===0)if((ve&536870912)===0||we){var n=wo;wo<<=1,(wo&3932160)===0&&(wo=262144),Yt=n}else Yt=536870912;return n=Vt.current,n!==null&&(n.flags|=32),Yt}function Ut(n,s,i){(n===ze&&(je===2||je===9)||n.cancelPendingCommit!==null)&&(ha(n,0),Ar(n,ve,Yt,!1)),qa(n,i),((Ae&2)===0||n!==ze)&&(n===ze&&((Ae&2)===0&&(gs|=i),Fe===4&&Ar(n,ve,Yt,!1)),An(n))}function bm(n,s,i){if((Ae&6)!==0)throw Error(a(327));var l=!i&&(s&127)===0&&(s&n.expiredLanes)===0||Ia(n,s),h=l?W_(n,s):Sh(n,s,!0),d=l;do{if(h===0){la&&!l&&Ar(n,s,0,!1);break}else{if(i=n.current.alternate,d&&!X_(i)){h=Sh(n,s,!1),d=!1;continue}if(h===2){if(d=s,n.errorRecoveryDisabledLanes&d)var v=0;else v=n.pendingLanes&-536870913,v=v!==0?v:v&536870912?536870912:0;if(v!==0){s=v;e:{var S=n;h=wi;var k=S.current.memoizedState.isDehydrated;if(k&&(ha(S,v).flags|=256),v=Sh(S,v,!1),v!==2){if(gh&&!k){S.errorRecoveryDisabledLanes|=d,gs|=d,h=4;break e}d=Dt,Dt=h,d!==null&&(Dt===null?Dt=d:Dt.push.apply(Dt,d))}h=v}if(d=!1,h!==2)continue}}if(h===1){ha(n,0),Ar(n,s,0,!0);break}e:{switch(l=n,d=h,d){case 0:case 1:throw Error(a(345));case 4:if((s&4194048)!==s)break;case 6:Ar(l,s,Yt,!Tr);break e;case 2:Dt=null;break;case 3:case 5:break;default:throw Error(a(329))}if((s&62914560)===s&&(h=cl+300-wt(),10<h)){if(Ar(l,s,Yt,!Tr),So(l,0,!0)!==0)break e;
vendor: 23,260 bytes, lines 9-10
9Wn=s,l.timeoutHandle=Jm(wm.bind(null,l,i,Dt,fl,yh,s,Yt,gs,ua,Tr,d,"Throttled",-0,0),h);break e}wm(l,i,Dt,fl,yh,s,Yt,gs,ua,Tr,d,null,-0,0)}}break}while(!0);An(n)}function wm(n,s,i,l,h,d,v,S,k,U,I,V,P,B){if(n.timeoutHandle=-1,V=s.subtreeFlags,V&8192||(V&16785408)===16785408){V={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Pn},fm(s,d,V);var te=(d&62914560)===d?cl-wt():(d&4194048)===d?mm-wt():0;if(te=DS(V,te),te!==null){Wn=d,n.cancelPendingCommit=te(km.bind(null,n,s,d,i,l,h,v,S,k,I,V,null,P,B)),Ar(n,d,v,!U);return}}km(n,s,d,i,l,h,v,S,k)}function X_(n){for(var s=n;;){var i=s.tag;if((i===0||i===11||i===15)&&s.flags&16384&&(i=s.updateQueue,i!==null&&(i=i.stores,i!==null)))for(var l=0;l<i.length;l++){var h=i[l],d=h.getSnapshot;h=h.value;try{if(!Ht(d(),h))return!1}catch{return!1}}if(i=s.child,s.subtreeFlags&16384&&i!==null)i.return=s,s=i;else{if(s===n)break;for(;s.sibling===null;){if(s.return===null||s.return===n)return!0;s=s.return}s.sibling.return=s.return,s=s.sibling}}return!0}function Ar(n,s,i,l){s&=~mh,s&=~gs,n.suspendedLanes|=s,n.pingedLanes&=~s,l&&(n.warmLanes|=s),l=n.expirationTimes;for(var h=s;0<h;){var d=31-qt(h),v=1<<d;l[d]=-1,h&=~v}i!==0&&Cd(n,i,s)}function dl(){return(Ae&6)===0?(Si(0),!1):!0}function _h(){if(ge!==null){if(je===0)var n=ge.return;else n=ge,qn=is=null,zc(n),ta=null,si=0,n=ge;for(;n!==null;)Xg(n.alternate,n),n=n.return;ge=null}}function ha(n,s){var i=n.timeoutHandle;i!==-1&&(n.timeoutHandle=-1,yS(i)),i=n.cancelPendingCommit,i!==null&&(n.cancelPendingCommit=null,i()),Wn=0,_h(),ze=n,ge=i=$n(n.current,null),ve=s,je=0,Ft=null,Tr=!1,la=Ia(n,s),gh=!1,ua=Yt=mh=gs=Er=Fe=0,Dt=wi=null,yh=!1,(s&8)!==0&&(s|=s&32);var l=n.entangledLanes;if(l!==0)for(n=n.entanglements,l&=s;0<l;){var h=31-qt(l),d=1<<h;s|=n[h],l&=~d}return Zn=s,Lo(),i}function _m(n,s){fe=null,$.H=fi,s===ea||s===qo?(s=zp(),je=3):s===Rc?(s=zp(),je=4):je=s===Wc?8:s!==null&&typeof s=="object"&&typeof s.then=="function"?6:1,Ft=s,ge===null&&(Fe=1,nl(n,en(s,n.current)))}function Sm(){var n=Vt.current;return n===null?!0:(ve&4194048)===ve?sn===null:(ve&62914560)===ve||(ve&536870912)!==0?n===sn:!1}function Tm(){var n=$.H;return $.H=fi,n===null?fi:n}function Em(){var n=$.A;return $.A=Q_,n}function pl(){Fe=4,Tr||(ve&4194048)!==ve&&Vt.current!==null||(la=!0),(Er&134217727)===0&&(gs&134217727)===0||ze===null||Ar(ze,ve,Yt,!1)}function Sh(n,s,i){var l=Ae;Ae|=2;var h=Tm(),d=Em();(ze!==n||ve!==s)&&(fl=null,ha(n,s)),s=!1;var v=Fe;e:do try{if(je!==0&&ge!==null){var S=ge,k=Ft;switch(je){case 8:_h(),v=6;break e;case 3:case 2:case 9:case 6:Vt.current===null&&(s=!0);var U=je;if(je=0,Ft=null,fa(n,S,k,U),i&&la){v=0;break e}break;default:U=je,je=0,Ft=null,fa(n,S,k,U)}}Z_(),v=Fe;break}catch(I){_m(n,I)}while(!0);return s&&n.shellSuspendCounter++,qn=is=null,Ae=l,$.H=h,$.A=d,ge===null&&(ze=null,ve=0,Lo()),v}function Z_(){for(;ge!==null;)Rm(ge)}function W_(n,s){var i=Ae;Ae|=2;var l=Tm(),h=Em();ze!==n||ve!==s?(fl=null,hl=wt()+500,ha(n,s)):la=Ia(n,s);e:do try{if(je!==0&&ge!==null){s=ge;var d=Ft;t:switch(je){case 1:je=0,Ft=null,fa(n,s,d,1);break;case 2:case 9:if(Dp(d)){je=0,Ft=null,xm(s);break}s=function(){je!==2&&je!==9||ze!==n||(je=7),An(n)},d.then(s,s);break e;case 3:je=7;break e;case 4:je=5;break e;case 7:Dp(d)?(je=0,Ft=null,xm(s)):(je=0,Ft=null,fa(n,s,d,7));break;case 5:var v=null;switch(ge.tag){case 26:v=ge.memoizedState;case 5:case 27:var S=ge;if(v?hy(v):S.stateNode.complete){je=0,Ft=null;var k=S.sibling;if(k!==null)ge=k;else{var U=S.return;U!==null?(ge=U,gl(U)):ge=null}break t}}je=0,Ft=null,fa(n,s,d,5);break;case 6:je=0,Ft=null,fa(n,s,d,6);break;case 8:_h(),Fe=6;break e;default:throw Error(a(462))}}eS();break}catch(I){_m(n,I)}while(!0);return qn=is=null,$.H=l,$.A=h,Ae=i,ge!==null?0:(ze=null,ve=0,Lo(),Fe)}function eS(){for(;ge!==null&&!vo();)Rm(ge)}function Rm(n){var s=Qg(n.alternate,n,Zn);n.memoizedProps=n.pendingProps,s===null?gl(n):ge=s}function xm(n){var s=n,i=s.alternate;switch(s.tag){case 15:case 0:s=Hg(i,s,s.pendingProps,s.type,void 0,ve);break;case 11:s=Hg(i,s,s.pendingProps,s.type.render,s.ref,ve);break;case 5:zc(s);default:Xg(i,s),s=ge=Ep(s,Zn),s=Qg(i,s,Zn)}n.memoizedProps=n.pendingProps,s===null?gl(n):ge=s}function fa(n,s,i,l){qn=is=null,zc(s),ta=null,si=0;var h=s.return;try{if(q_(n,h,s,i,ve)){Fe=1,nl(n,en(i,n.current)),ge=null;return}}catch(d){if(h!==null)throw ge=h,d;Fe=1,nl(n,en(i,n.current)),ge=null;return}s.flags&32768?(we||l===1?n=!0:la||(ve&536870912)!==0?n=!1:(Tr=n=!0,(l===2||l===9||l===3||l===6)&&(l=Vt.current,l!==null&&l.tag===13&&(l.flags|=16384))),Am(s,n)):gl(s)}function gl(n){var s=n;do{if((s.flags&32768)!==0){Am(s,Tr);return}n=s.return;var i=V_(s.alternate,s,Zn);if(i!==null){ge=i;return}if(s=s.sibling,s!==null){ge=s;return}ge=s=n}while(s!==null);Fe===0&&(Fe=5)}function Am(n,s){do{var i=K_(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),!s&&(n=n.sibling,n!==null)){ge=n;return}ge=n=i}while(n!==null);Fe=6,ge=null}function km(n,s,i,l,h,d,v,S,k){n.cancelPendingCommit=null;do ml();while(it!==0);if((Ae&6)!==0)throw Error(a(327));if(s!==null){if(s===n.current)throw Error(a(177));if(d=s.lanes|s.childLanes,d|=cc,Nw(n,i,d,v,S,k),n===ze&&(ge=ze=null,ve=0),ca=s,xr=n,Wn=i,vh=d,bh=h,ym=l,(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?(n.callbackNode=null,n.callbackPriority=0,sS(Ns,function(){return Nm(),null})):(n.callbackNode=null,n.callbackPriority=0),l=(s.flags&13878)!==0,(s.subtreeFlags&13878)!==0||l){l=$.T,$.T=null,h=Q.p,Q.p=2,v=Ae,Ae|=4;try{F_(n,s,i)}finally{Ae=v,Q.p=h,$.T=l}}it=1,Om(),Cm(),jm()}}function Om(){if(it===1){it=0;var n=xr,s=ca,i=(s.flags&13878)!==0;if((s.subtreeFlags&13878)!==0||i){i=$.T,$.T=null;var l=Q.p;Q.p=2;var h=Ae;Ae|=4;try{um(s,n);var d=Lh,v=gp(n.containerInfo),S=d.focusedElem,k=d.selectionRange;if(v!==S&&S&&S.ownerDocument&&pp(S.ownerDocument.documentElement,S)){if(k!==null&&ac(S)){var U=k.start,I=k.end;if(I===void 0&&(I=U),"selectionStart"in S)S.selectionStart=U,S.selectionEnd=Math.min(I,S.value.length);else{var V=S.ownerDocument||document,P=V&&V.defaultView||window;if(P.getSelection){var B=P.getSelection(),te=S.textContent.length,ue=Math.min(k.start,te),De=k.end===void 0?ue:Math.min(k.end,te);!B.extend&&ue>De&&(v=De,De=ue,ue=v);var N=dp(S,ue),O=dp(S,De);if(N&&O&&(B.rangeCount!==1||B.anchorNode!==N.node||B.anchorOffset!==N.offset||B.focusNode!==O.node||B.focusOffset!==O.offset)){var D=V.createRange();D.setStart(N.node,N.offset),B.removeAllRanges(),ue>De?(B.addRange(D),B.extend(O.node,O.offset)):(D.setEnd(O.node,O.offset),B.addRange(D))}}}}for(V=[],B=S;B=B.parentNode;)B.nodeType===1&&V.push({element:B,left:B.scrollLeft,top:B.scrollTop});for(typeof S.focus=="function"&&S.focus(),S=0;S<V.length;S++){var H=V[S];H.element.scrollLeft=H.left,H.element.scrollTop=H.top}}kl=!!Nh,Lh=Nh=null}finally{Ae=h,Q.p=l,$.T=i}}n.current=s,it=2}}function Cm(){if(it===2){it=0;var n=xr,s=ca,i=(s.flags&8772)!==0;if((s.subtreeFlags&8772)!==0||i){i=$.T,$.T=null;var l=Q.p;Q.p=2;var h=Ae;Ae|=4;try{sm(n,s.alternate,s)}finally{Ae=h,Q.p=l,$.T=i}}it=3}}function jm(){if(it===4||it===3){it=0,zu();var n=xr,s=ca,i=Wn,l=ym;(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?it=5:(it=0,ca=xr=null,Mm(n,n.pendingLanes));var h=n.pendingLanes;if(h===0&&(Rr=null),$u(i),s=s.stateNode,It&&typeof It.onCommitFiberRoot=="function")try{It.onCommitFiberRoot($a,s,void 0,(s.current.flags&128)===128)}catch{}if(l!==null){s=$.T,h=Q.p,Q.p=2,$.T=null;try{for(var d=n.onRecoverableError,v=0;v<l.length;v++){var S=l[v];d(S.value,{componentStack:S.stack})}}finally{$.T=s,Q.p=h}}(Wn&3)!==0&&ml(),An(n),h=n.pendingLanes,(i&261930)!==0&&(h&42)!==0?n===wh?_i++:(_i=0,wh=n):_i=0,Si(0)}}function Mm(n,s){(n.pooledCacheLanes&=s)===0&&(s=n.pooledCache,s!=null&&(n.pooledCache=null,ni(s)))}function ml(){return Om(),Cm(),jm(),Nm()}function Nm(){if(it!==5)return!1;var n=xr,s=vh;vh=0;var i=$u(Wn),l=$.T,h=Q.p;try{Q.p=32>i?32:i,$.T=null,i=bh,bh=null;var d=xr,v=Wn;if(it=0,ca=xr=null,Wn=0,(Ae&6)!==0)throw Error(a(331));var S=Ae;if(Ae|=4,pm(d.current),hm(d,d.current,v,i),Ae=S,Si(0,!1),It&&typeof It.onPostCommitFiberRoot=="function")try{It.onPostCommitFiberRoot($a,d)}catch{}return!0}finally{Q.p=h,$.T=l,Mm(n,s)}}function Lm(n,s,i){s=en(i,s),s=Zc(n.stateNode,s,2),n=br(n,s,2),n!==null&&(qa(n,2),An(n))}function Me(n,s,i){if(n.tag===3)Lm(n,n,i);else for(;s!==null;){if(s.tag===3){Lm(s,n,i);break}else if(s.tag===1){var l=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(Rr===null||!Rr.has(l))){n=en(i,n),i=Dg(2),l=br(s,i,2),l!==null&&(Ug(i,l,s,n),qa(l,2),An(l));break}}s=s.return}}function Th(n,s,i){var l=n.pingCache;if(l===null){l=n.pingCache=new J_;var h=new Set;l.set(s,h)}else h=l.get(s),h===void 0&&(h=new Set,l.set(s,h));h.has(i)||(gh=!0,h.add(i),n=tS.bind(null,n,s,i),s.then(n,n))}function tS(n,s,i){var l=n.pingCache;l!==null&&l.delete(s),n.pingedLanes|=n.suspendedLanes&i,n.warmLanes&=~i,ze===n&&(ve&i)===i&&(Fe===4||Fe===3&&(ve&62914560)===ve&&300>wt()-cl?(Ae&2)===0&&ha(n,0):mh|=i,ua===ve&&(ua=0)),An(n)}function Dm(n,s){s===0&&(s=Od()),n=rs(n,s),n!==null&&(qa(n,s),An(n))}function nS(n){var s=n.memoizedState,i=0;s!==null&&(i=s.retryLane),Dm(n,i)}function rS(n,s){var i=0;switch(n.tag){case 31:case 13:var l=n.stateNode,h=n.memoizedState;h!==null&&(i=h.retryLane);break;case 19:l=n.stateNode;break;case 22:l=n.stateNode._retryCache;break;default:throw Error(a(314))}l!==null&&l.delete(s),Dm(n,i)}function sS(n,s){return un(n,s)}var yl=null,da=null,Eh=!1,vl=!1,Rh=!1,kr=0;function An(n){n!==da&&n.next===null&&(da===null?yl=da=n:da=da.next=n),vl=!0,Eh||(Eh=!0,iS())}function Si(n,s){if(!Rh&&vl){Rh=!0;do for(var i=!1,l=yl;l!==null;){if(n!==0){var h=l.pendingLanes;if(h===0)var d=0;else{var v=l.suspendedLanes,S=l.pingedLanes;d=(1<<31-qt(42|n)+1)-1,d&=h&~(v&~S),d=d&201326741?d&201326741|1:d?d|2:0}d!==0&&(i=!0,Bm(l,d))}else d=ve,d=So(l,l===ze?d:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(d&3)===0||Ia(l,d)||(i=!0,Bm(l,d));l=l.next}while(i);Rh=!1}}function aS(){Um()}function Um(){vl=Eh=!1;var n=0;kr!==0&&mS()&&(n=kr);for(var s=wt(),i=null,l=yl;l!==null;){var h=l.next,d=zm(l,s);d===0?(l.next=null,i===null?yl=h:i.next=h,h===null&&(da=i)):(i=l,(n!==0||(d&3)!==0)&&(vl=!0)),l=h}it!==0&&it!==5||Si(n),kr!==0&&(kr=0)}function zm(n,s){for(var i=n.suspendedLanes,l=n.pingedLanes,h=n.expirationTimes,d=n.pendingLanes&-62914561;0<d;){var v=31-qt(d),S=1<<v,k=h[v];k===-1?((S&i)===0||(S&l)!==0)&&(h[v]=Mw(S,s)):k<=s&&(n.expiredLanes|=S),d&=~S}if(s=ze,i=ve,i=So(n,n===s?i:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),l=n.callbackNode,i===0||n===s&&(je===2||je===9)||n.cancelPendingCommit!==null)return l!==null&&l!==null&&Ba(l),n.callbackNode=null,n.callbackPriority=0;if((i&3)===0||Ia(n,i)){if(s=i&-i,s===n.callbackPriority)return s;switch(l!==null&&Ba(l),$u(i)){case 2:case 8:i=Tn;break;case 32:i=Ns;break;case 268435456:i=kd;break;default:i=Ns}return l=Pm.bind(null,n),i=un(i,l),n.callbackPriority=s,n.callbackNode=i,s}return l!==null&&l!==null&&Ba(l),n.callbackPriority=2,n.callbackNode=null,2}function Pm(n,s){if(it!==0&&it!==5)return n.callbackNode=null,n.callbackPriority=0,null;var i=n.callbackNode;if(ml()&&n.callbackNode!==i)return null;var l=ve;return l=So(n,n===ze?l:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),l===0?null:(bm(n,l,s),zm(n,wt()),n.callbackNode!=null&&n.callbackNode===i?Pm.bind(null,n):null)}function Bm(n,s){if(ml())return null;bm(n,s,!0)}function iS(){vS(function(){(Ae&6)!==0?un(pt,aS):Um()})}function xh(){if(kr===0){var n=Zs;n===0&&(n=bo,bo<<=1,(bo&261888)===0&&(bo=256)),kr=n}return kr}function $m(n){return n==null||typeof n=="symbol"||typeof n=="boolean"?null:typeof n=="function"?n:xo(""+n)}function Im(n,s){var i=s.ownerDocument.createElement("input");return i.name=s.name,i.value=s.value,n.id&&i.setAttribute("form",n.id),s.parentNode.insertBefore(i,s),n=new FormData(n),i.parentNode.removeChild(i),n}function oS(n,s,i,l,h){if(s==="submit"&&i&&i.stateNode===h){var d=$m((h[Ct]||null).action),v=l.submitter;v&&(s=(s=v[Ct]||null)?$m(s.formAction):v.getAttribute("formAction"),s!==null&&(d=s,v=null));var S=new Co("action","action",null,l,h);n.push({event:S,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(kr!==0){var k=v?Im(h,v):new FormData(h);Kc(i,{pending:!0,data:k,method:h.method,action:d},null,k)}}else typeof d=="function"&&(S.preventDefault(),k=v?Im(h,v):new FormData(h),Kc(i,{pending:!0,data:k,method:h.method,action:d},d,k))},currentTarget:h}]})}}for(var Ah=0;Ah<uc.length;Ah++){var kh=uc[Ah],lS=kh.toLowerCase(),uS=kh[0].toUpperCase()+kh.slice(1);cn(lS,"on"+uS)}cn(vp,"onAnimationEnd"),cn(bp,"onAnimationIteration"),cn(wp,"onAnimationStart"),cn("dblclick","onDoubleClick"),cn("focusin","onFocus"),cn("focusout","onBlur"),cn(R_,"onTransitionRun"),cn(x_,"onTransitionStart"),cn(A_,"onTransitionCancel"),cn(_p,"onTransitionEnd"),Ps("onMouseEnter",["mouseout","mouseover"]),Ps("onMouseLeave",["mouseout","mouseover"]),Ps("onPointerEnter",["pointerout","pointerover"]),Ps("onPointerLeave",["pointerout","pointerover"]),Wr("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Wr("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Wr("onBeforeInput",["compositionend","keypress","textInput","paste"]),Wr("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Wr("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Wr("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ti="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(" "),cS=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ti));function qm(n,s){s=(s&4)!==0;for(var i=0;i<n.length;i++){var l=n[i],h=l.event;l=l.listeners;e:{var d=void 0;if(s)for(var v=l.length-1;0<=v;v--){var S=l[v],k=S.instance,U=S.currentTarget;if(S=S.listener,k!==d&&h.isPropagationStopped())break e;d=S,h.currentTarget=U;try{d(h)}catch(I){No(I)}h.currentTarget=null,d=k}else for(v=0;v<l.length;v++){if(S=l[v],k=S.instance,U=S.currentTarget,S=S.listener,k!==d&&h.isPropagationStopped())break e;d=S,h.currentTarget=U;try{d(h)}catch(I){No(I)}h.currentTarget=null,d=k}}}}function me(n,s){var i=s[Iu];i===void 0&&(i=s[Iu]=new Set);var l=n+"__bubble";i.has(l)||(Hm(s,n,2,!1),i.add(l))}function Oh(n,s,i){var l=0;s&&(l|=4),Hm(i,n,l,s)}var bl="_reactListening"+Math.random().toString(36).slice(2);function Ch(n){if(!n[bl]){n[bl]=!0,Ud.forEach(function(i){i!=="selectionchange"&&(cS.has(i)||Oh(i,!1,n),Oh(i,!0,n))});var s=n.nodeType===9?n:n.ownerDocument;s===null||s[bl]||(s[bl]=!0,Oh("selectionchange",!1,s))}}function Hm(n,s,i,l){switch(vy(s)){case 2:var h=PS;break;case 8:h=BS;break;default:h=Vh}i=h.bind(null,s,i,n),h=void 0,!Ju||s!=="touchstart"&&s!=="touchmove"&&s!=="wheel"||(h=!0),l?h!==void 0?n.addEventListener(s,i,{capture:!0,passive:h}):n.addEventListener(s,i,!0):h!==void 0?n.addEventListener(s,i,{passive:h}):n.addEventListener(s,i,!1)}function jh(n,s,i,l,h){var d=l;if((s&1)===0&&(s&2)===0&&l!==null)e:for(;;){if(l===null)return;var v=l.tag;if(v===3||v===4){var S=l.stateNode.containerInfo;if(S===h)break;if(v===4)for(v=l.return;v!==null;){var k=v.tag;if((k===3||k===4)&&v.stateNode.containerInfo===h)return;v=v.return}for(;S!==null;){if(v=Ds(S),v===null)return;if(k=v.tag,k===5||k===6||k===26||k===27){l=d=v;continue e}S=S.parentNode}}l=l.return}Yd(function(){var U=d,I=Yu(i),V=[];e:{var P=Sp.get(n);if(P!==void 0){var B=Co,te=n;switch(n){case"keypress":if(ko(i)===0)break e;case"keydown":case"keyup":B=r_;break;case"focusin":te="focus",B=ec;break;case"focusout":te="blur",B=ec;break;case"beforeblur":case"afterblur":B=ec;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":B=Xd;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":B=Vw;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":B=i_;break;case vp:case bp:case wp:B=Yw;break;case _p:B=l_;break;case"scroll":case"scrollend":B=Hw;break;case"wheel":B=c_;break;case"copy":case"cut":case"paste":B=Jw;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":B=Wd;break;case"toggle":case"beforetoggle":B=f_}var ue=(s&4)!==0,De=!ue&&(n==="scroll"||n==="scrollend"),N=ue?P!==null?P+"Capture":null:P;ue=[];for(var O=U,D;O!==null;){var H=O;if(D=H.stateNode,H=H.tag,H!==5&&H!==26&&H!==27||D===null||N===null||(H=Va(O,N),H!=null&&ue.push(Ei(O,H,D))),De)break;O=O.return}0<ue.length&&(P=new B(P,te,null,i,I),V.push({event:P,listeners:ue}))}}if((s&7)===0){e:{if(P=n==="mouseover"||n==="pointerover",B=n==="mouseout"||n==="pointerout",P&&i!==Fu&&(te=i.relatedTarget||i.fromElement)&&(Ds(te)||te[Ls]))break e;if((B||P)&&(P=I.window===I?I:(P=I.ownerDocument)?P.defaultView||P.parentWindow:window,B?(te=i.relatedTarget||i.toElement,B=U,te=te?Ds(te):null,te!==null&&(De=u(te),ue=te.tag,te!==De||ue!==5&&ue!==27&&ue!==6)&&(te=null)):(B=null,te=U),B!==te)){if(ue=Xd,H="onMouseLeave",N="onMouseEnter",O="mouse",(n==="pointerout"||n==="pointerover")&&(ue=Wd,H="onPointerLeave",N="onPointerEnter",O="pointer"),De=B==null?P:Ga(B),D=te==null?P:Ga(te),P=new ue(H,O+"leave",B,i,I),P.target=De,P.relatedTarget=D,H=null,Ds(I)===U&&(ue=new ue(N,O+"enter",te,i,I),ue.target=D,ue.relatedTarget=De,H=ue),De=H,B&&te)t:{for(ue=hS,N=B,O=te,D=0,H=N;H;H=ue(H))D++;H=0;for(var ie=O;ie;ie=ue(ie))H++;for(;0<D-H;)N=ue(N),D--;for(;0<H-D;)O=ue(O),H--;for(;D--;){if(N===O||O!==null&&N===O.alternate){ue=N;break t}N=ue(N),O=ue(O)}ue=null}else ue=null;B!==null&&Gm(V,P,B,ue,!1),te!==null&&De!==null&&Gm(V,De,te,ue,!0)}}e:{if(P=U?Ga(U):window,B=P.nodeName&&P.nodeName.toLowerCase(),B==="select"||B==="input"&&P.type==="file")var Te=op;else if(ap(P))if(lp)Te=S_;else{Te=w_;var re=b_}else B=P.nodeName,!B||B.toLowerCase()!=="input"||P.type!=="checkbox"&&P.type!=="radio"?U&&Ku(U.elementType)&&(Te=op):Te=__;if(Te&&(Te=Te(n,U))){ip(V,Te,i,I);break e}re&&re(n,P,U),n==="focusout"&&U&&P.type==="number"&&U.memoizedProps.value!=null&&Vu(P,"number",P.value)}switch(re=U?Ga(U):window,n){case"focusin":(ap(re)||re.contentEditable==="true")&&(Gs=re,ic=U,Wa=null);break;case"focusout":Wa=ic=Gs=null;break;case"mousedown":oc=!0;break;case"contextmenu":case"mouseup":case"dragend":oc=!1,mp(V,i,I);break;case"selectionchange":if(E_)break;case"keydown":case"keyup":mp(V,i,I)}var de;if(nc)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 Hs?rp(n,i)&&(be="onCompositionEnd"):n==="keydown"&&i.keyCode===229&&(be="onCompositionStart");be&&(ep&&i.locale!=="ko"&&(Hs||be!=="onCompositionStart"?be==="onCompositionEnd"&&Hs&&(de=Qd()):(fr=I,Xu="value"in fr?fr.value:fr.textContent,Hs=!0)),re=wl(U,be),0<re.length&&(be=new Zd(be,n,null,i,I),V.push({event:be,listeners:re}),de?be.data=de:(de=sp(i),de!==null&&(be.data=de)))),(de=p_?g_(n,i):m_(n,i))&&(be=wl(U,"onBeforeInput"),0<be.length&&(re=new Zd("onBeforeInput","beforeinput",null,i,I),V.push({event:re,listeners:be}),re.data=de)),oS(V,n,U,i,I)}qm(V,s)})}function Ei(n,s,i){return{instance:n,listener:s,currentTarget:i}}function wl(n,s){for(var i=s+"Capture",l=[];n!==null;){var h=n,d=h.stateNode;if(h=h.tag,h!==5&&h!==26&&h!==27||d===null||(h=Va(n,i),h!=null&&l.unshift(Ei(n,h,d)),h=Va(n,s),h!=null&&l.push(Ei(n,h,d))),n.tag===3)return l;n=n.return}return[]}function hS(n){if(n===null)return null;do n=n.return;while(n&&n.tag!==5&&n.tag!==27);return n||null}function Gm(n,s,i,l,h){for(var d=s._reactName,v=[];i!==null&&i!==l;){var S=i,k=S.alternate,U=S.stateNode;if(S=S.tag,k!==null&&k===l)break;S!==5&&S!==26&&S!==27||U===null||(k=U,h?(U=Va(i,d),U!=null&&v.unshift(Ei(i,U,k))):h||(U=Va(i,d),U!=null&&v.push(Ei(i,U,k)))),i=i.return}v.length!==0&&n.push({event:s,listeners:v})}var fS=/\r\n?/g,dS=/\u0000|\uFFFD/g;function Vm(n){return(typeof n=="string"?n:""+n).replace(fS,` 10`).replace(dS,"")}function Km(n,s){return s=Vm(s),Vm(n)===s}function Le(n,s,i,l,h,d){switch(i){case"children":typeof l=="string"?s==="body"||s==="textarea"&&l===""||$s(n,l):(typeof l=="number"||typeof l=="bigint")&&s!=="body"&&$s(n,""+l);break;case"className":Eo(n,"class",l);break;case"tabIndex":Eo(n,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":Eo(n,i,l);break;case"style":Kd(n,l,d);break;case"data":if(s!=="object"){Eo(n,"data",l);break}case"src":case"href":if(l===""&&(s!=="a"||i!=="href")){n.removeAttribute(i);break}if(l==null||typeof l=="function"||typeof l=="symbol"||typeof l=="boolean"){n.removeAttribute(i);break}l=xo(""+l),n.setAttribute(i,l);break;case"action":case"formAction":if(typeof l=="function"){n.setAttribute(i,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof d=="function"&&(i==="formAction"?(s!=="input"&&Le(n,s,"name",h.name,h,null),Le(n,s,"formEncType",h.formEncType,h,null),Le(n,s,"formMethod",h.formMethod,h,null),Le(n,s,"formTarget",h.formTarget,h,null)):(Le(n,s,"encType",h.encType,h,null),Le(n,s,"method",h.method,h,null),Le(n,s,"target",h.target,h,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){n.removeAttribute(i);break}l=xo(""+l),n.setAttribute(i,l);break;case"onClick":l!=null&&(n.onclick=Pn);break;case"onScroll":l!=null&&me("scroll",n);break;case"onScrollEnd":l!=null&&me("scrollend",n);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(a(61));if(i=l.__html,i!=null){if(h.children!=null)throw Error(a(60));n.innerHTML=i}}break;case"multiple":n.multiple=l&&typeof l!="function"&&typeof l!="symbol";break;case"muted":n.muted=l&&typeof l!="function"&&typeof l!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(l==null||typeof l=="function"||typeof l=="boolean"||typeof l=="symbol"){n.removeAttribute("xlink:href");break}i=xo(""+l),n.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",i);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":l!=null&&typeof l!="function"&&typeof l!="symbol"?n.setAttribute(i,""+l):n.removeAttribute(i);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInl
10ine":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":l&&typeof l!="function"&&typeof l!="symbol"?n.setAttribute(i,""):n.removeAttribute(i);break;case"capture":case"download":l===!0?n.setAttribute(i,""):l!==!1&&l!=null&&typeof l!="function"&&typeof l!="symbol"?n.setAttribute(i,l):n.removeAttribute(i);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!="function"&&typeof l!="symbol"&&!isNaN(l)&&1<=l?n.setAttribute(i,l):n.removeAttribute(i);break;case"rowSpan":case"start":l==null||typeof l=="function"||typeof l=="symbol"||isNaN(l)?n.removeAttribute(i):n.setAttribute(i,l);break;case"popover":me("beforetoggle",n),me("toggle",n),To(n,"popover",l);break;case"xlinkActuate":zn(n,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":zn(n,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":zn(n,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":zn(n,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":zn(n,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":zn(n,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":zn(n,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":zn(n,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":zn(n,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":To(n,"is",l);break;case"innerText":case"textContent":break;default:(!(2<i.length)||i[0]!=="o"&&i[0]!=="O"||i[1]!=="n"&&i[1]!=="N")&&(i=Iw.get(i)||i,To(n,i,l))}}function Mh(n,s,i,l,h,d){switch(i){case"style":Kd(n,l,d);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(a(61));if(i=l.__html,i!=null){if(h.children!=null)throw Error(a(60));n.innerHTML=i}}break;case"children":typeof l=="string"?$s(n,l):(typeof l=="number"||typeof l=="bigint")&&$s(n,""+l);break;case"onScroll":l!=null&&me("scroll",n);break;case"onScrollEnd":l!=null&&me("scrollend",n);break;case"onClick":l!=null&&(n.onclick=Pn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!zd.hasOwnProperty(i))e:{if(i[0]==="o"&&i[1]==="n"&&(h=i.endsWith("Capture"),s=i.slice(2,h?i.length-7:void 0),d=n[
vendor: 6,139 bytes, line 10
10Ct]||null,d=d!=null?d[i]:null,typeof d=="function"&&n.removeEventListener(s,d,h),typeof l=="function")){typeof d!="function"&&d!==null&&(i in n?n[i]=null:n.hasAttribute(i)&&n.removeAttribute(i)),n.addEventListener(s,l,h);break e}i in n?n[i]=l:l===!0?n.setAttribute(i,""):To(n,i,l)}}}function bt(n,s,i){switch(s){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":me("error",n),me("load",n);var l=!1,h=!1,d;for(d in i)if(i.hasOwnProperty(d)){var v=i[d];if(v!=null)switch(d){case"src":l=!0;break;case"srcSet":h=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(a(137,s));default:Le(n,s,d,v,i,null)}}h&&Le(n,s,"srcSet",i.srcSet,i,null),l&&Le(n,s,"src",i.src,i,null);return;case"input":me("invalid",n);var S=d=v=h=null,k=null,U=null;for(l in i)if(i.hasOwnProperty(l)){var I=i[l];if(I!=null)switch(l){case"name":h=I;break;case"type":v=I;break;case"checked":k=I;break;case"defaultChecked":U=I;break;case"value":d=I;break;case"defaultValue":S=I;break;case"children":case"dangerouslySetInnerHTML":if(I!=null)throw Error(a(137,s));break;default:Le(n,s,l,I,i,null)}}qd(n,d,S,k,U,v,h,!1);return;case"select":me("invalid",n),l=v=d=null;for(h in i)if(i.hasOwnProperty(h)&&(S=i[h],S!=null))switch(h){case"value":d=S;break;case"defaultValue":v=S;break;case"multiple":l=S;default:Le(n,s,h,S,i,null)}s=d,i=v,n.multiple=!!l,s!=null?Bs(n,!!l,s,!1):i!=null&&Bs(n,!!l,i,!0);return;case"textarea":me("invalid",n),d=h=l=null;for(v in i)if(i.hasOwnProperty(v)&&(S=i[v],S!=null))switch(v){case"value":l=S;break;case"defaultValue":h=S;break;case"children":d=S;break;case"dangerouslySetInnerHTML":if(S!=null)throw Error(a(91));break;default:Le(n,s,v,S,i,null)}Gd(n,l,h,d);return;case"option":for(k in i)i.hasOwnProperty(k)&&(l=i[k],l!=null)&&(k==="selected"?n.selected=l&&typeof l!="function"&&typeof l!="symbol":Le(n,s,k,l,i,null));return;case"dialog":me("beforetoggle",n),me("toggle",n),me("cancel",n),me("close",n);break;case"iframe":case"object":me("load",n);break;case"video":case"audio":for(l=0;l<Ti.length;l++)me(Ti[l],n);break;case"image":me("error",n),me("load",n);break;case"details":me("toggle",n);break;case"embed":case"source":case"link":me("error",n),me("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(U in i)if(i.hasOwnProperty(U)&&(l=i[U],l!=null))switch(U){case"children":case"dangerouslySetInnerHTML":throw Error(a(137,s));default:Le(n,s,U,l,i,null)}return;default:if(Ku(s)){for(I in i)i.hasOwnProperty(I)&&(l=i[I],l!==void 0&&Mh(n,s,I,l,i,void 0));return}}for(S in i)i.hasOwnProperty(S)&&(l=i[S],l!=null&&Le(n,s,S,l,i,null))}function pS(n,s,i,l){switch(s){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var h=null,d=null,v=null,S=null,k=null,U=null,I=null;for(B in i){var V=i[B];if(i.hasOwnProperty(B)&&V!=null)switch(B){case"checked":break;case"value":break;case"defaultValue":k=V;default:l.hasOwnProperty(B)||Le(n,s,B,null,l,V)}}for(var P in l){var B=l[P];if(V=i[P],l.hasOwnProperty(P)&&(B!=null||V!=null))switch(P){case"type":d=B;break;case"name":h=B;break;case"checked":U=B;break;case"defaultChecked":I=B;break;case"value":v=B;break;case"defaultValue":S=B;break;case"children":case"dangerouslySetInnerHTML":if(B!=null)throw Error(a(137,s));break;default:B!==V&&Le(n,s,P,B,l,V)}}Gu(n,v,S,k,U,I,d,h);return;case"select":B=v=S=P=null;for(d in i)if(k=i[d],i.hasOwnProperty(d)&&k!=null)switch(d){case"value":break;case"multiple":B=k;default:l.hasOwnProperty(d)||Le(n,s,d,null,l,k)}for(h in l)if(d=l[h],k=i[h],l.hasOwnProperty(h)&&(d!=null||k!=null))switch(h){case"value":P=d;break;case"defaultValue":S=d;break;case"multiple":v=d;default:d!==k&&Le(n,s,h,d,l,k)}s=S,i=v,l=B,P!=null?Bs(n,!!i,P,!1):!!l!=!!i&&(s!=null?Bs(n,!!i,s,!0):Bs(n,!!i,i?[]:"",!1));return;case"textarea":B=P=null;for(S in i)if(h=i[S],i.hasOwnProperty(S)&&h!=null&&!l.hasOwnProperty(S))switch(S){case"value":break;case"children":break;default:Le(n,s,S,null,l,h)}for(v in l)if(h=l[v],d=i[v],l.hasOwnProperty(v)&&(h!=null||d!=null))switch(v){case"value":P=h;break;case"defaultValue":B=h;break;case"children":break;case"dangerouslySetInnerHTML":if(h!=null)throw Error(a(91));break;default:h!==d&&Le(n,s,v,h,l,d)}Hd(n,P,B);return;case"option":for(var te in i)P=i[te],i.hasOwnProperty(te)&&P!=null&&!l.hasOwnProperty(te)&&(te==="selected"?n.selected=!1:Le(n,s,te,null,l,P));for(k in l)P=l[k],B=i[k],l.hasOwnProperty(k)&&P!==B&&(P!=null||B!=null)&&(k==="selected"?n.selected=P&&typeof P!="function"&&typeof P!="symbol":Le(n,s,k,P,l,B));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var ue in i)P=i[ue],i.hasOwnProperty(ue)&&P!=null&&!l.hasOwnProperty(ue)&&Le(n,s,ue,null,l,P);for(U in l)if(P=l[U],B=i[U],l.hasOwnProperty(U)&&P!==B&&(P!=null||B!=null))switch(U){case"children":case"dangerouslySetInnerHTML":if(P!=null)throw Error(a(137,s));break;default:Le(n,s,U,P,l,B)}return;default:if(Ku(s)){for(var De in i)P=i[De],i.hasOwnProperty(De)&&P!==void 0&&!l.hasOwnProperty(De)&&Mh(n,s,De,void 0,l,P);for(I in l)P=l[I],B=i[I],!l.hasOwnProperty(I)||P===B||P===void 0&&B===void 0||Mh(n,s,I,P,l,B);return}}for(var N in i)P=i[N],i.hasOwnProperty(N)&&P!=null&&!l.hasOwnProperty(N)&&Le(n,s,N,null,l,P);for(V in l)P=l[V],B=i[V],!l.hasOwnProperty(V)||P===B||P==null&&B==null||Le(n,s,V,P,l,B)}function Fm(n){switch(n){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function gS(){if(typeof performance.getEntriesByType=="function"){for(var n=0,s=0,i=performance.getEntriesByType("resource"),l=0;l<i.length;l++){var h=i[l],d=h.transferSize,v=h.initiatorType,S=h.duration;if(d&&S&&Fm(v)){for(v=0,S=h.responseEnd,l+=1;l<i.length;l++){var k=i[l],U=k.startTime;if(U>S)break;var I=k.transferSize,V=k.initiatorType;I&&Fm(V)&&(k=k.responseEnd,v+=I*(k<S?1:(S-U)/(k-U)))}if(--l,s+=8*(d+v)/(h.duration/1e3),n++,10<n)break}}if(0<n)return s/n/1e6}return navigator.connection&&(n=navigator.connection.downlink,typeof n=="number")?
vendor: 8,957 bytes, line 10
10n:5}var Nh=null,Lh=null;function _l(n){return n.nodeType===9?n:n.ownerDocument}function Ym(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 Qm(n,s){if(n===0)switch(s){case"svg":return 1;case"math":return 2;default:return 0}return n===1&&s==="foreignObject"?0:n}function Dh(n,s){return n==="textarea"||n==="noscript"||typeof s.children=="string"||typeof s.children=="number"||typeof s.children=="bigint"||typeof s.dangerouslySetInnerHTML=="object"&&s.dangerouslySetInnerHTML!==null&&s.dangerouslySetInnerHTML.__html!=null}var Uh=null;function mS(){var n=window.event;return n&&n.type==="popstate"?n===Uh?!1:(Uh=n,!0):(Uh=null,!1)}var Jm=typeof setTimeout=="function"?setTimeout:void 0,yS=typeof clearTimeout=="function"?clearTimeout:void 0,Xm=typeof Promise=="function"?Promise:void 0,vS=typeof queueMicrotask=="function"?queueMicrotask:typeof Xm<"u"?function(n){return Xm.resolve(null).then(n).catch(bS)}:Jm;function bS(n){setTimeout(function(){throw n})}function Or(n){return n==="head"}function Zm(n,s){var i=s,l=0;do{var h=i.nextSibling;if(n.removeChild(i),h&&h.nodeType===8)if(i=h.data,i==="/$"||i==="/&"){if(l===0){n.removeChild(h),ya(s);return}l--}else if(i==="$"||i==="$?"||i==="$~"||i==="$!"||i==="&")l++;else if(i==="html")Ri(n.ownerDocument.documentElement);else if(i==="head"){i=n.ownerDocument.head,Ri(i);for(var d=i.firstChild;d;){var v=d.nextSibling,S=d.nodeName;d[Ha]||S==="SCRIPT"||S==="STYLE"||S==="LINK"&&d.rel.toLowerCase()==="stylesheet"||i.removeChild(d),d=v}}else i==="body"&&Ri(n.ownerDocument.body);i=h}while(i);ya(s)}function Wm(n,s){var i=n;n=0;do{var l=i.nextSibling;if(i.nodeType===1?s?(i._stashedDisplay=i.style.display,i.style.display="none"):(i.style.display=i._stashedDisplay||"",i.getAttribute("style")===""&&i.removeAttribute("style")):i.nodeType===3&&(s?(i._stashedText=i.nodeValue,i.nodeValue=""):i.nodeValue=i._stashedText||""),l&&l.nodeType===8)if(i=l.data,i==="/$"){if(n===0)break;n--}else i!=="$"&&i!=="$?"&&i!=="$~"&&i!=="$!"||n++;i=l}while(i)}function zh(n){var s=n.firstChild;for(s&&s.nodeType===10&&(s=s.nextSibling);s;){var i=s;switch(s=s.nextSibling,i.nodeName){case"HTML":case"HEAD":case"BODY":zh(i),qu(i);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(i.rel.toLowerCase()==="stylesheet")continue}n.removeChild(i)}}function wS(n,s,i,l){for(;n.nodeType===1;){var h=i;if(n.nodeName.toLowerCase()!==s.toLowerCase()){if(!l&&(n.nodeName!=="INPUT"||n.type!=="hidden"))break}else if(l){if(!n[Ha])switch(s){case"meta":if(!n.hasAttribute("itemprop"))break;return n;case"link":if(d=n.getAttribute("rel"),d==="stylesheet"&&n.hasAttribute("data-precedence"))break;if(d!==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(d=n.getAttribute("src"),(d!==(h.src==null?null:h.src)||n.getAttribute("type")!==(h.type==null?null:h.type)||n.getAttribute("crossorigin")!==(h.crossOrigin==null?null:h.crossOrigin))&&d&&n.hasAttribute("async")&&!n.hasAttribute("itemprop"))break;return n;default:return n}}else if(s==="input"&&n.type==="hidden"){var d=h.name==null?null:""+h.name;if(h.type==="hidden"&&n.getAttribute("name")===d)return n}else return n;if(n=an(n.nextSibling),n===null)break}return null}function _S(n,s,i){if(s==="")return null;for(;n.nodeType!==3;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!i||(n=an(n.nextSibling),n===null))return null;return n}function ey(n,s){for(;n.nodeType!==8;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!s||(n=an(n.nextSibling),n===null))return null;return n}function Ph(n){return n.data==="$?"||n.data==="$~"}function Bh(n){return n.data==="$!"||n.data==="$?"&&n.ownerDocument.readyState!=="loading"}function SS(n,s){var i=n.ownerDocument;if(n.data==="$~")n._reactRetry=s;else if(n.data!=="$?"||i.readyState!=="loading")s();else{var l=function(){s(),i.removeEventListener("DOMContentLoaded",l)};i.addEventListener("DOMContentLoaded",l),n._reactRetry=l}}function an(n){for(;n!=null;n=n.nextSibling){var s=n.nodeType;if(s===1||s===3)break;if(s===8){if(s=n.data,s==="$"||s==="$!"||s==="$?"||s==="$~"||s==="&"||s==="F!"||s==="F")break;if(s==="/$"||s==="/&")return null}}return n}var $h=null;function ty(n){n=n.nextSibling;for(var s=0;n;){if(n.nodeType===8){var i=n.data;if(i==="/$"||i==="/&"){if(s===0)return an(n.nextSibling);s--}else i!=="$"&&i!=="$!"&&i!=="$?"&&i!=="$~"&&i!=="&"||s++}n=n.nextSibling}return null}function ny(n){n=n.previousSibling;for(var s=0;n;){if(n.nodeType===8){var i=n.data;if(i==="$"||i==="$!"||i==="$?"||i==="$~"||i==="&"){if(s===0)return n;s--}else i!=="/$"&&i!=="/&"||s++}n=n.previousSibling}return null}function ry(n,s,i){switch(s=_l(i),n){case"html":if(n=s.documentElement,!n)throw Error(a(452));return n;case"head":if(n=s.head,!n)throw Error(a(453));return n;case"body":if(n=s.body,!n)throw Error(a(454));return n;default:throw Error(a(451))}}function Ri(n){for(var s=n.attributes;s.length;)n.removeAttributeNode(s[0]);qu(n)}var on=new Map,sy=new Set;function Sl(n){return typeof n.getRootNode=="function"?n.getRootNode():n.nodeType===9?n:n.ownerDocument}var er=Q.d;Q.d={f:TS,r:ES,D:RS,C:xS,L:AS,m:kS,X:CS,S:OS,M:jS};function TS(){var n=er.f(),s=dl();return n||s}function ES(n){var s=Us(n);s!==null&&s.tag===5&&s.type==="form"?_g(s):er.r(n)}var pa=typeof document>"u"?null:document;function ay(n,s,i){var l=pa;if(l&&typeof s=="string"&&s){var h=Zt(s);h='link[rel="'+n+'"][href="'+h+'"]',typeof i=="string"&&(h+='[crossorigin="'+i+'"]'),sy.has(h)||(sy.add(h),n={rel:n,crossOrigin:i,href:s},l.querySelector(h)===null&&(s=l.createElement("link"),bt(s,"link",n),ut(s),l.head.appendChild(s)))}}function RS(n){er.D(n),ay("dns-prefetch",n,null)}function xS(n,s){er.C(n,s),ay("preconnect",n,s)}function AS(n,s,i){er.L(n,s,i);var l=pa;if(l&&n&&s){var h='link[rel="preload"][as="'+Zt(s)+'"]';s==="image"&&i&&i.imageSrcSet?(h+='[imagesrcset="'+Zt(i.imageSrcSet)+'"]',typeof i.imageSizes=="string"&&(h+='[imagesizes="'+Zt(i.imageSizes)+'"]')):h+='[href="'+Zt(n)+'"]';var d=h;switch(s){case"style":d=ga(n);break;case"script":d=ma(n)}on.has(d)||(n=m({rel:"preload",href:s==="image"&&i&&i.imageSrcSet?void 0:n,as:s},i),on.set(d,n),l.querySelector(h)!==null||s==="style"&&l.querySelector(xi(d))||s==="script"&&l.querySelector(Ai(d))||(s=l.createElement("link"),bt(s,"link",n),ut(s),l.head.appendChild(s)))}}function kS(n,s){er.m(n,s);var i=pa;if(i&&n){var l=s&&typeof s.as=="string"?s.as:"script",h='link[rel="modulepreload"][as="'+Zt(l)+'"][href="'+Zt(n)+'"]',d=h;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":d=ma(n)}if(!on.has(d)&&(n=m({rel:"modulepreload",href:n},s),on.set(d,n),i.querySelector(h)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(i.querySelector(Ai(d)))return}l=i.createElement("link"),bt(l,"link",n),ut(l),i.head.appendChild(l)}}}function OS(n,s,i){er.S(n,s,i);var l=pa;if(l&&n){var h=zs(l).hoistableStyles,d=ga(n);s=s||"default";var v=h.get(d);if(!v){var S={loading:0,preload:null};if(v=l.querySelector(xi(d)))S.loading=5;else{n=m({rel:"stylesheet",href:n,"data-precedence":s},i),(i=on.get(d))&&Ih(n,i);var k=v=l.createElement("link");ut(k),bt(k,"link",n),k._p=new Promise(function(U,I){k.onload=U,k.onerror=I}),k.addEventListener("load",function(){S.loading|=1}),k.addEventListener("error",function(){S.loading|=2}),S.loading|=4,Tl(v,s,l)}v={type:"stylesheet",instance:v,count:1,state:S},h.set(d,v)}}}function CS(n,s){er.X(n,s);var i=pa;if(i&&n){var l=zs(i).hoistableScripts,h=ma(n),d=l.get(h);d||(d=i.querySelector(Ai(h)),d||(n=m({src:n,async:!0},s),(s=on.get(h))&&qh(n,s),d=i.createElement("script"),ut(d),bt(d,"link",n),i.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},l.set(h,d))}}function jS(n,s){er.M(n,s);var i=pa;if(i&&n){var l=zs(i).hoistableScripts,h=ma(n),d=l.get(h);d||(d=i.querySelector(Ai(h)),d||(n=m({src:n,async:!0,type:"module"},s),(s=on.get(h))&&qh(n,s),d=i.createElement("script"),ut(d),bt(d,"link",n),i.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},l.set(h,d))}}function iy(n,s,i,l){var h=(h=pe.current)?Sl(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"?(s=ga(i.href),i=zs(h).hoistableStyles,l=i.get(s),l||(l={type:"style",instance:null,count:0,state:null},i.set(s,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(i.rel==="stylesheet"&&typeof i.href=="string"&&typeof i.precedence=="string"){n=ga(i.href);var d=zs(h).hoistableStyles,v=d.get(n);if(v||(h=h.ownerDocument||h,v={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}}
vendor: 4,212 bytes, line 10
10,d.set(n,v),(d=h.querySelector(xi(n)))&&!d._p&&(v.instance=d,v.state.loading=5),on.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},on.set(n,i),d||MS(h,n,i,v.state))),s&&l===null)throw Error(a(528,""));return v}if(s&&l!==null)throw Error(a(529,""));return null;case"script":return s=i.async,i=i.src,typeof i=="string"&&s&&typeof s!="function"&&typeof s!="symbol"?(s=ma(i),i=zs(h).hoistableScripts,l=i.get(s),l||(l={type:"script",instance:null,count:0,state:null},i.set(s,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(a(444,n))}}function ga(n){return'href="'+Zt(n)+'"'}function xi(n){return'link[rel="stylesheet"]['+n+"]"}function oy(n){return m({},n,{"data-precedence":n.precedence,precedence:null})}function MS(n,s,i,l){n.querySelector('link[rel="preload"][as="style"]['+s+"]")?l.loading=1:(s=n.createElement("link"),l.preload=s,s.addEventListener("load",function(){return l.loading|=1}),s.addEventListener("error",function(){return l.loading|=2}),bt(s,"link",i),ut(s),n.head.appendChild(s))}function ma(n){return'[src="'+Zt(n)+'"]'}function Ai(n){return"script[async]"+n}function ly(n,s,i){if(s.count++,s.instance===null)switch(s.type){case"style":var l=n.querySelector('style[data-href~="'+Zt(i.href)+'"]');if(l)return s.instance=l,ut(l),l;var h=m({},i,{"data-href":i.href,"data-precedence":i.precedence,href:null,precedence:null});return l=(n.ownerDocument||n).createElement("style"),ut(l),bt(l,"style",h),Tl(l,i.precedence,n),s.instance=l;case"stylesheet":h=ga(i.href);var d=n.querySelector(xi(h));if(d)return s.state.loading|=4,s.instance=d,ut(d),d;l=oy(i),(h=on.get(h))&&Ih(l,h),d=(n.ownerDocument||n).createElement("link"),ut(d);var v=d;return v._p=new Promise(function(S,k){v.onload=S,v.onerror=k}),bt(d,"link",l),s.state.loading|=4,Tl(d,i.precedence,n),s.instance=d;case"script":return d=ma(i.src),(h=n.querySelector(Ai(d)))?(s.instance=h,ut(h),h):(l=i,(h=on.get(d))&&(l=m({},i),qh(l,h)),n=n.ownerDocument||n,h=n.createElement("script"),ut(h),bt(h,"link",l),n.head.appendChild(h),s.instance=h);case"void":return null;default:throw Error(a(443,s.type))}else s.type==="stylesheet"&&(s.state.loading&4)===0&&(l=s.instance,s.state.loading|=4,Tl(l,i.precedence,n));return s.instance}function Tl(n,s,i){for(var l=i.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),h=l.length?l[l.length-1]:null,d=h,v=0;v<l.length;v++){var S=l[v];if(S.dataset.precedence===s)d=S;else if(d!==h)break}d?d.parentNode.insertBefore(n,d.nextSibling):(s=i.nodeType===9?i.head:i,s.insertBefore(n,s.firstChild))}function Ih(n,s){n.crossOrigin==null&&(n.crossOrigin=s.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=s.referrerPolicy),n.title==null&&(n.title=s.title)}function qh(n,s){n.crossOrigin==null&&(n.crossOrigin=s.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=s.referrerPolicy),n.integrity==null&&(n.integrity=s.integrity)}var El=null;function uy(n,s,i){if(El===null){var l=new Map,h=El=new Map;h.set(i,l)}else h=El,l=h.get(i),l||(l=new Map,h.set(i,l));if(l.has(n))return l;for(l.set(n,null),i=i.getElementsByTagName(n),h=0;h<i.length;h++){var d=i[h];if(!(d[Ha]||d[gt]||n==="link"&&d.getAttribute("rel")==="stylesheet")&&d.namespaceURI!=="http://www.w3.org/2000/svg"){var v=d.getAttribute(s)||"";v=n+v;var S=l.get(v);S?S.push(d):l.set(v,[d])}}return l}function cy(n,s,i){n=n.ownerDocument||n,n.head.insertBefore(i,s==="title"?n.querySelector("head > title"):null)}function NS(n,s,i){if(i===1||s.itemProp!=null)return!1;switch(n){case"meta":case"title":return!0;case"style":if(typeof s.precedence!="string"||typeof s.href!="string"||s.href==="")break;return!0;case"link":if(typeof s.rel!="string"||typeof s.href!="string"||s.href===""||s.onLoad||s.onError)break;return s.rel==="stylesheet"?(n=s.disabled,typeof s.precedence=="string"&&n==null):!0;case"script":if(s.async&&typeof s.async!="function"&&typeof s.async!="symbol"&&!s.onLoad&&!s.onError&&s.src&&typeof s.src=="string")return!0}return!1}function hy(n){return!(n.type==="stylesheet"&&(n.state.loading&3)===0)}function LS(n,s,i,l){if(i.type==="stylesheet"&&(typeof l.media!="str
10ing"||matchMedia(l.media).matches!==!1)&&(i.state.loading&4)===0){if(i.instance===null){var h=ga(l.href),d=s.querySelector(xi(h));if(d){s=d._p,s!==null&&typeof s=="object"&&typeof s.then=="function"&&(n.count++,n=Rl.bind(n),s.then(n,n)),i.state.loading|=4,i.instance=d,ut(d);return}d=s.ownerDocument||s,l=oy(l),(h=on.get(h))&&Ih(l,h),d=d.createElement("link"),ut(d);var v=d;v._p=new Promise(function(S,k){v.onload=S,v.onerror=k}),bt(d,"link",l),i.instance=d}n.stylesheets===null&&(n.stylesheets=new Map),n.stylesheets.set(i,s),(s=i.state.preload)&&(i.state.loading&3)===0&&(n.count++,i=Rl.bind(n),s.addEventListener("load",i),s.addEventListener("error",i))}}var Hh=0;function DS(n,s){return n.stylesheets&&n.count===0&&Al(n,n.stylesheets),0<n.count||0<n.imgCount?function(i){var l=setTimeout(function(){if(n.stylesheets&&Al(n,n.stylesheets),n.unsuspend){var d=n.unsuspend;n.unsuspend=null,d()}},6e4+s);0<n.imgBytes&&Hh===0&&(Hh=62500*gS());var h=setTimeout(function(){if(n.waitingForImages=!1,n.count===0&&(n.stylesheets&&Al(n,n.stylesheets),n.unsuspend)){var d=n.unsuspend;n.unsuspend=null,d()}},(n.imgBytes>Hh?50:800)+s);return n.unsuspend=i,function(){n.unsuspend=null,clearTimeout(l),clearTimeout(h)}}:null}function Rl(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Al(this,this.stylesheets);else if(this.unsuspend){var n=this.unsuspend;this.unsuspend=null,n()}}}var xl=null;function Al(n,s){n.stylesheets=null,n.unsuspend!==null&&(n.count++,xl=new Map,s.forEac
vendor: 6,889 bytes, line 10
10h(US,n),xl=null,Rl.call(n))}function US(n,s){if(!(s.state.loading&4)){var i=xl.get(n);if(i)var l=i.get(null);else{i=new Map,xl.set(n,i);for(var h=n.querySelectorAll("link[data-precedence],style[data-precedence]"),d=0;d<h.length;d++){var v=h[d];(v.nodeName==="LINK"||v.getAttribute("media")!=="not all")&&(i.set(v.dataset.precedence,v),l=v)}l&&i.set(null,l)}h=s.instance,v=h.getAttribute("data-precedence"),d=i.get(v)||l,d===l&&i.set(null,h),i.set(v,h),this.count++,l=Rl.bind(this),h.addEventListener("load",l),h.addEventListener("error",l),d?d.parentNode.insertBefore(h,d.nextSibling):(n=n.nodeType===9?n.head:n,n.insertBefore(h,n.firstChild)),s.state.loading|=4}}var ki={$$typeof:j,Provider:null,Consumer:null,_currentValue:oe,_currentValue2:oe,_threadCount:0};function zS(n,s,i,l,h,d,v,S,k){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=Pu(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Pu(0),this.hiddenUpdates=Pu(null),this.identifierPrefix=l,this.onUncaughtError=h,this.onCaughtError=d,this.onRecoverableError=v,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=k,this.incompleteTransitions=new Map}function fy(n,s,i,l,h,d,v,S,k,U,I,V){return n=new zS(n,s,i,v,k,U,I,V,S),s=1,d===!0&&(s|=24),d=Gt(3,null,null,s),n.current=d,d.stateNode=n,s=Sc(),s.refCount++,n.pooledCache=s,s.refCount++,d.memoizedState={element:l,isDehydrated:i,cache:s},xc(d),n}function dy(n){return n?(n=Fs,n):Fs}function py(n,s,i,l,h,d){h=dy(h),l.context===null?l.context=h:l.pendingContext=h,l=vr(s),l.payload={element:i},d=d===void 0?null:d,d!==null&&(l.callback=d),i=br(n,l,s),i!==null&&(Ut(i,n,s),ii(i,n,s))}function gy(n,s){if(n=n.memoizedState,n!==null&&n.dehydrated!==null){var i=n.retryLane;n.retryLane=i!==0&&i<s?i:s}}function Gh(n,s){gy(n,s),(n=n.alternate)&&gy(n,s)}function my(n){if(n.tag===13||n.tag===31){var s=rs(n,67108864);s!==null&&Ut(s,n,67108864),Gh(n,67108864)}}function yy(n){if(n.tag===13||n.tag===31){var s=Qt();s=Bu(s);var i=rs(n,s);i!==null&&Ut(i,n,s),Gh(n,s)}}var kl=!0;function PS(n,s,i,l){var h=$.T;$.T=null;var d=Q.p;try{Q.p=2,Vh(n,s,i,l)}finally{Q.p=d,$.T=h}}function BS(n,s,i,l){var h=$.T;$.T=null;var d=Q.p;try{Q.p=8,Vh(n,s,i,l)}finally{Q.p=d,$.T=h}}function Vh(n,s,i,l){if(kl){var h=Kh(l);if(h===null)jh(n,s,l,Ol,i),by(n,l);else if(IS(h,n,s,i,l))l.stopPropagation();else if(by(n,l),s&4&&-1<$S.indexOf(n)){for(;h!==null;){var d=Us(h);if(d!==null)switch(d.tag){case 3:if(d=d.stateNode,d.current.memoizedState.isDehydrated){var v=Zr(d.pendingLanes);if(v!==0){var S=d;for(S.pendingLanes|=2,S.entangledLanes|=2;v;){var k=1<<31-qt(v);S.entanglements[1]|=k,v&=~k}An(d),(Ae&6)===0&&(hl=wt()+500,Si(0))}}break;case 31:case 13:S=rs(d,2),S!==null&&Ut(S,d,2),dl(),Gh(d,2)}if(d=Kh(l),d===null&&jh(n,s,l,Ol,i),d===h)break;h=d}h!==null&&l.stopPropagation()}else jh(n,s,l,null,i)}}function Kh(n){return n=Yu(n),Fh(n)}var Ol=null;function Fh(n){if(Ol=null,n=Ds(n),n!==null){var s=u(n);if(s===null)n=null;else{var i=s.tag;if(i===13){if(n=c(s),n!==null)return n;n=null}else if(i===31){if(n=f(s),n!==null)return n;n=null}else if(i===3){if(s.stateNode.current.memoizedState.isDehydrated)return s.tag===3?s.stateNode.containerInfo:null;n=null}else s!==n&&(n=null)}}return Ol=n,null}function vy(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(Be()){case pt:return 2;case Tn:return 8;case Ns:case xw:return 32;case kd:return 268435456;default:return 32}default:return 32}}var Yh=!1,Cr=null,jr=null,Mr=null,Oi=new Map,Ci=new Map,Nr=[],$S="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function by(n,s){switch(n){case"focusin":case"focusout":Cr=null;break;case"dragenter":case"dragleave":jr=null;break;case"mouseover":case"mouseout":Mr=null;break;case"pointerover":case"pointerout":Oi.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ci.delete(s.pointerId)}}function ji(n,s,i,l,h,d){return n===null||n.nativeEvent!==d?(n={blockedOn:s,domEventName:i,eventSystemFlags:l,nativeEvent:d,targetContainers:[h]},s!==null&&(s=Us(s),s!==null&&my(s)),n):(n.eventSystemFlags|=l,s=n.targetContainers,h!==null&&s.indexOf(h)===-1&&s.push(h),n)}function IS(n,s,i,l,h){switch(s){case"focusin":return Cr=ji(Cr,n,s,i,l,h),!0;case"dragenter":return jr=ji(jr,n,s,i,l,h),!0;case"mouseover":return Mr=ji(Mr,n,s,i,l,h),!0;case"pointerover":var d=h.pointerId;return Oi.set(d,ji(Oi.get(d)||null,n,s,i,l,h)),!0;case"gotpointercapture":return d=h.pointerId,Ci.set(d,ji(Ci.get(d)||null,n,s,i,l,h)),!0}return!1}function wy(n){var s=Ds(n.target);if(s!==null){var i=u(s);if(i!==null){if(s=i.tag,s===13){if(s=c(i),s!==null){n.blockedOn=s,Ld(n.priority,function(){yy(i)});return}}else if(s===31){if(s=f(i),s!==null){n.blockedOn=s,Ld(n.priority,function(){yy(i)});return}}else if(s===3&&i.stateNode.current.memoizedState.isDehydrated){n.blockedOn=i.tag===3?i.stateNode.containerInfo:null;return}}}n.blockedOn=null}function Cl(n){if(n.blockedOn!==null)return!1;for(var s=n.targetContainers;0<s.length;){var i=Kh(n.nativeEvent);if(i===null){i=n.nativeEvent;var l=new i.constructor(i.type,i);Fu=l,i.target.dispatchEvent(l),Fu=null}else return s=Us(i),s!==null&&my(s),n.blockedOn=i,!1;s.shift()}return!0}function _y(n,s,i){Cl(n)&&i.delete(s)}function qS(){Yh=!1,Cr!==null&&Cl(Cr)&&(Cr=null),jr!==null&&Cl(jr)&&(jr=null),Mr!==null&&Cl(Mr)&&(Mr=null),Oi.forEac
10h(_y),Ci.forEach(_y)}function jl(n,s){n.blockedOn===s&&(n.blockedOn=null,Yh||(Yh=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,qS)))}var Ml=null;function Sy(n){Ml!==n&&(Ml=n,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Ml===n&&(Ml=null);for(var s=0;s<n.length;s+=3){var i=n[s],l=n[s+1],h=n[s+2];if(typeof l!="function"){if(Fh(l||i)===null)continue;break}var d=Us(i);d!==null&&(n.splice(s,3),s-=3,Kc(d,{pending:!0,data:h,method:i.method,action:l},l,h))}}))}function ya(n){function s(k){return jl(k,n)}Cr!==null&&jl(Cr,n),jr!==null&&jl(jr,n),Mr!==null&&jl(Mr,n),Oi.forEach(s),Ci.forEach(s);for(var i=0;i<Nr.length;i++){var l=Nr[i];l.blockedOn===n&&(l.blockedOn=null)}for(;0<Nr.length&&(i=Nr[0],i.blockedOn===null);)wy(i),i.blockedOn===null&&Nr.shift();if(i=(n.ownerDocument||n).$$reactFormReplay,i!=null)for(l=0;l<i.length;l+=3){var h=i[l],d=i[l+1],v=h[Ct]||null;if(typeof d=="function")v||Sy(i);else if(v){var S=null;if(d&&d.hasAttribute("formAction")){if(h=d,v=d[Ct]||null)S=v.formAction;else if(Fh(h)!==null)continue}else S=v.action;typeof S=="function"?i[l+1]=S:(i.splice(l,3),l-=3),Sy(i)}}}function Ty(){function n(d){d.canIntercept&&d.info==="react-transition"&&d.intercept({handler:function(){return new Promise(function(v){return h=v})},focusReset:"manual",scroll:"manual"})}function s(){h!==null&&(h(),h=null),l||setTimeout(i,20)}function i(){if(!l&&!navigation.transition){var d=navigation.currentEntry;d&&d.url!=null&&navigation.navigate(d.url,{state:d.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var l=!1,h=null;return navigation.addEventListener("navigate",n),navigation.addEventListener("navigatesuccess",s),navigation.addEventListener("navigateerror",s),setTimeout(i,100),function(){l=!0,navigation.removeEventListener("navigate",n),navigation.removeEventListener("navigatesuccess",s),navigation.removeEventListener("navigateerror",s),h!==null&&(h(),h=null)}}}function Qh(n){this._internalRoot=n}Nl.prototype.render=Qh.prototype.render=function(n){var s=this._internalRoot;if(s===null)throw Error(a(409));var i=s.current,l=Qt();py(i,l,n,s,null,null)},Nl.prototype.unmount=Qh.prototype.unmount=function(){var n=this._internalRoot;if(n!==null){this._internalRoot=null;var s=n.containerInfo;py(n.current,2,null,n,null,null),dl(),s[Ls]=null}};function Nl(n){this._internalRoot=n}Nl.prototype.unstable_scheduleHydration=function(n){if(n){var s=Nd();n={blockedOn:null,target:n,priority:s};for(var i=0;i<Nr.length&&s!==0&&s<Nr[i].priority;i++);Nr.splice(i,0,n),i===0&&wy(n)}};var Ey=e.version;if(Ey!=="19.2.5")throw Error(a(527,Ey,"19.2.5"));Q.findDOMNode=function(n){var s=n._reactInternals;if(s===void 0)throw typeof n.render=="function"?Error(a(188)):(n=Object.keys(n).join(","),Error(a(268,n)));return n=g(s),n=n!==null?y(n):null,n=n===null?null:n.stateNode,n};var HS={bundleType:0,version:"19.2.5",rendererPackageName:"react-dom",currentDispatcherRef:$,reconcilerVersion:"19.2.5"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Ll=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ll.isDisabled&&Ll.supportsFiber)try{$a=Ll.inject(HS),It=Ll}catch{}}return Ni.createRoot=function(n,s){if(!o(n))throw Error(a(299));var i=!1,l="",h=jg,d=Mg,v=Ng;return s!=null&&(s.unstable_strictMode===!0&&(i=!0),s.identifierPrefix!==void 0&&(l=s.identifierPrefix),s.onUncaughtError!==void 0&&(h=s.onUncaughtError),s.onCaughtError!==void 0&&(d=s.onCaughtError),s.onRecoverableError!==void 0&&(v=s.onRecoverableError)),s=fy(n,1,!1,null,null,i,l,null,h,d,v,Ty),n[Ls]=s.current,Ch(n),new Qh(s)},Ni.hydrateRoot=function(n,s,i){if(!o(n))throw Error(a(299));var l=!1,h="",d=jg,v=Mg,S=Ng,k=null;return i!=null&&(i.unstable_strictMode===!0&&(l=!0),i.identifierPrefix!==void 0&&(h=i.identifierPrefix),i.onUncaughtError!==void 0&&(d=i.onUncaughtError),i.onCaughtError!==void 0&&(v=i.onCaughtError),i.onRecoverableError!==void 0&&(S=i.onRecoverableError),i.formState!==void 0&&(k=i.formState)),s=fy(n,1,!0,s,i??null,l,h,k,d,v,S,Ty),s.context=dy(null),i=s.current,l=Qt(),l=Bu(l),h=vr(l),h.callback=null,br(i,h,l),i=l,s.current.lanes=i,qa(s,i),An(s),n[Ls]=s.current,Ch(n),new Nl(s)},Ni.version="19.2.5",Ni}var Ly;function WS(){if(Ly)return Zh.exports;Ly=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),Zh.exports=ZS(),Zh.exports}var eT=WS(),tT="__TSS_CONTEXT",Ef=Symbol.for("TSS_SERVER_FUNCTION"),Dy=Symbol.for("TSS_SERVER_FUNCTION_FACTORY"),nT="application/x-tss-framed",tr={JSON:0,CHUNK:1,END:2,ERROR:3},rT=/;\s*v=(\d+)/;function sT(t){const e=t.match(rT);return e?parseInt(e[1],10):void 0}function aT(t){const e=sT(t);if(e!==void 0&&e!==1)throw new Error(`Incompatible framed protocol version: server=${e}, client=1. Please ensure client and server are using compatible versions.`)}var rd=()=>window.__TSS_START_OPTIONS__,Rb=!1;function Xi(t){return t[t.length-1]}function iT(t){return typeof t=="function"}function $r(t,e){return iT(t)?t(e):t}var oT=Object.prototype.hasOwnProperty,Uy=Object.prototype.propertyIsEnumerable,lT=()=>Object.create(null),ms=(t,e)=>Ir(t,e,lT);function Ir(t,e,r=()=>({}),a=0){if(t===e)return t;if(a>500)return e;const o=e,u=By(t)&&By(o);if(!u&&!(La(t)&&La(o)))return o;const c=u?t:zy(t);if(!c)return o;const f=u?o:zy(o);if(!f)return o;const p=c.length,g=f.length,y=u?new Array(g):r();let m=0;for(let b=0;b<g;b++){const w=u?b:f[b],_=t[w],x=o[w];if(_===x){y[w]=_,(u?b<p:oT.call(t,w))&&m++;continue}if(_===null||x===null||typeof _!="object"||typeof x!="object"){y[w]=x;continue}const E=Ir(_,x,r,a+1);y[w]=E,E===_&&m++}return p===g&&m===p?t:y}function zy(t){const e=Object.getOwnPropertyNames(t);for(const o of e)if(!Uy.call(t,o))return!1;const r=Object.getOwnPropertySymbols(t);if(r.length===0)return e;const a=e;for(const o of r){if(!Uy.call(t,o))return!1;a.push(o)}return a}function La(t){if(!Py(t))return!1;const e=t.constructor;if(typeof e>"u")return!0;const r=e.prototype;return!(!Py(r)||!r.hasOwnProperty("isPrototypeOf"))}function Py(t){return Object.prototype.toString.call(t)==="[object Object]"}function By(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function Pt(t,e,r){if(t===e)return!0;
10if(typeof t!=typeof e)return!1;if(Array.isArray(t)&&Array.isArray(e)){if(t.length!==e.length)return!1;for(let a=0,o=t.length;a<o;a++)if(!Pt(t[a],e[a],r))return!1;return!0}if(La(t)&&La(e)){const a=r?.ignoreUndefined??!0;if(r?.partial){for(const c in e)if((!a||e[c]!==void 0)&&!Pt(t[c],e[c],r))return!1;return!0}let o=0;if(!a)o=Object.keys(t).length;else for(const c in t)t[c]!==void 0&&o++;let u=0;for(const c in e)if((!a||e[c]!==void 0)&&(u++,u>o||!Pt(t[c],e[c],r)))return!1;return o===u}return!1}function As(t){let e,r;const a=new Promise((o,u)=>{e=o,r=u});return a.status="pending",a.resolve=o=>{a.status="resolved",a.value=o,e(o),t?.(o)},a.reject=o=>{a.status="rejected",r(o)},a}function uT(t){return typeof t?.message!="string"?!1:t.message.startsWith("Failed to fetch dynamically imported module")||t.message.startsWith("error loading dynamically imported module")||t.message.startsWith("Importing a module script failed")}function Zi(t){return!!(t&&typeof t=="object"&&typeof t.then=="function")}function cT(t){return t.replace(/[\x00-\x1f\x7f]/g,"")}function $y(t){let e;try{e=decodeURI(t)}catch{e=t.replaceAll(/%[0-9A-F]{2}/gi,r=>{try{return decodeURI(r)}catch{return r}})}return cT(e)}var hT=["http:","https:","mailto:","tel:"];function ru(t,e){if(!t)return!1;try{const r=new URL(t);return!e.has(r.protocol)}catch{return!1}}var fT={"&":"\\u0026",">":"\\u003e","<":"\\u003c","\u2028":"\\u2028","\u2029":"\\u2029"},dT=/[&><\u2028\u2029]/g;function pT(t){return t.replace(dT,e=>fT[e])}function Li(t){if(!t)return{path:t,handledProtocolRelativeURL:!1};if(!/[%\\\x00-\x1f\x7f]/.test(t)&&!t.startsWith("//"))return{path:t,handledProtocolRelativeURL:!1};const e=/%25|%5C/gi;let r=0,a="",o;for(;(o=e.exec(t))!==null;)a+=$y(t.slice(r,o.index))+o[0],r=e.lastIndex;a=a+$y(r?t.slice(r):t);let u=!1;return a.startsWith("//")&&(u=!0,a="/"+a.replace(/^\/+/,"")),{path:a,handledProtocolRelativeURL:u}}function gT(t){return/\s|[^\u0000-\u007F]/.test(t)?t.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):t}function mT(t,e){if(t===e)return!0;if(t.length!==e.length)return!1;for(let r=0;r<t.length;r++)if(t[r]!==e[r])return!1;return!0}function Bt(){throw new Error("Invariant failed")}function Wi(t){const e=new Map;let r,a;const o=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
10)):(u.next.prev=void 0,r=u.next,u.next=void 0,a&&(u.prev=a,a.next=u)),a=u)};return{get(u){const c=e.get(u);if(c)return o(c),c.value},set(u,c){if(e.size>=t&&r){const p=r;e.delete(p.key),p.next&&(r=p.next,p.next.prev=void 0),p===a&&(a=void 0)}const f=e.get(u);if(f)f.value=c,o(f);else{const p={key:u,value:c,prev:a};a&&(a.next=p),a=p,r||(r=p),e.set(u,p)}},clear(){e.clear(),r=void 0,a=void 0}}}var qr=4,xb=5;function yT(t){const e=t.indexOf("{");if(e===-1)return null;const r=t.indexOf("}",e);return r===-1||e+1>=t.length?null:[e,r]}function sd(t,e,r=new Uint16Array(6)){const a=t.indexOf("/",e),o=a===-1?t.length:a,u=t.substring(e,o);if(!u||!u.includes("$"))return r[0]=0,r[1]=e,r[2]=e,r[3]=o,r[4]=o,r[5]=o,r;if(u==="$"){const f=t.length;return r[0]=2,r[1]=e,r[2]=e,r[3]=f,r[4]=f,r[5]=f,r}if(u.charCodeAt(0)===36)return r[0]=1,r[1]=e,r[2]=e+1,r[3]=o,r[4]=o,r[5]=o,r;const c=yT(u);if(c){const[f,p]=c,g=u.charCodeAt(f+1);if(g===45){if(f+2<u.length&&u.charCodeAt(f+2)===36){const y=f+3,m=p;if(y<m)return r[0]=3,r[1]=e+f,r[2]=e+y,r[3]=e+m,r[4]=e+p+1,r[5]=o,r}}else if(g===36){const y=f+1,m=f+2;return m===p?(r[0]=2,r[1]=e+f,r[2]=e+y,r[3]=e+m,r[4]=e+p+1,r[5]=t.length,r):(r[0]=1,r[1]=e+f,r[2]=e+m,r[3]=e+p,r[4]=e+p+1,r[5]=o,r)}}return r[0]=0,r[1]=e,r[2]=e,r[3]=o,r[4]=o,r[5]=o,r}function Su(t,e,r,a,o,u,c){c?.(r);let f=a;{const p=r.fullPath??r.from,g=p.length,y=r.options?.caseSensitive??t,m=!!(r.options?.params?.parse&&r.options?.skipRouteOnParseError?.params);for(;f<g;){const w=sd(p,f,e);let _;const x=f,E=w[5];switch(f=E+1,u++,w[0]){case 0:{const A=p.substring(w[2],w[3]);if(y){const M=o.static?.get(A);if(M)_=M;else{o.static??=new Map;const j=_s(r.fullPath??r.from);j.parent=o,j.depth=u,_=j,o.static.set(A,j)}}else{const M=A.toLowerCase(),j=o.staticInsensitive?.get(M);if(j)_=j;else{o.staticInsensitive??=new Map;const z=_s(r.fullPath??r.from);z.parent=o,z.depth=u,_=z,o.staticInsensitive.set(M,z)}}break}case 1:{const A=p.substring(x,w[1]),M=p.substring(w[4],E),j=y&&!!(A||M),z=A?j?A:A.toLowerCase():void 0,Y=M?j?M:M.toLowerCase():void 0,K=!m&&o.dynamic?.find(q=>!q.skipOnParamError&&q.caseSensitive===j&&q.prefix===z&&q.suffix===Y);if(K)_=K;else{const q=rf(1,r.fullPath??r.from,j,z,Y);_=q,q.depth=u,q.parent=o,o.dynamic??=[],o.dynamic.push(q)}break}case 3:{const A=p.substring(x,w[1]),M=p.substring(w[4],E),j=y&&!!(A||M),z=A?j?A:A.toLowerCase():void 0,Y=M?j?M:M.toLowerCase():void 0,K=!m&&o.optional?.find(q=>!q.skipOnParamError&&q.caseSensitive===j&&q.prefix===z&&q.suffix===Y);if(K)_=K;else{const q=rf(3,r.fullPath??r.from,j,z,Y);_=q,q.parent=o,q.depth=u,o.optional??=[],o.optional.push(q)}break}case 2:{const A=p.substring(x,w[1]),M=p.substring(w[4],E),j=y&&!!(A||M),z=A?j?A:A.toLowerCase():void 0,Y=M?j?M:M.toLowerCase():void 0,K=rf(2,r.fullPath??r.from,j,z,Y);_=K,K.parent=o,K.depth=u,o.wildcard??=[],o.wildcard.push(K)}}o=_}if(m&&r.children&&!r.isRoot&&r.id&&r.id.charCodeAt(r.id.lastIndexOf("/")+1)===95){const w=_s(r.fullPath??r.from);w.kind=xb,w.parent=o,u++,w.depth=u,o.pathless??=[],o.pathless.push(w),o=w}const b=(r.path||!r.children)&&!r.isRoot;if(b&&p.endsWith("/")){const w=_s(r.fullPath??r.from);w.kind=qr,w.parent=o,u++,w.depth=u,o.index=w,o=w}o.parse=r.options?.params?.parse??null,o.skipOnParamError=m,o.parsingPriority=r.options?.skipRouteOnParseError?.priority??0,b&&!o.route&&(o.route=r,o.fullPath=r.fullPath??r.from)}if(r.children)for(const p of r.children)Su(t,e,p,f,o,u,c)}function nf(t,e){if(t.skipOnParamError&&!e.skipOnParamError)return-1;if(!t.skipOnParamError&&e.skipOnParamError)return 1;if(t.skipOnParamError&&e.skipOnParamError&&(t.parsingPriority||e.parsingPriority))return e.parsingPriority-t.parsingPriority;if(t.prefix&&e.prefix&&t.prefix!==e.prefix){if(t.prefix.startsWith(e.prefix))return-1;if(e.prefix.startsWith(t.prefix))return 1}if(t.suffix&&e.suffix&&t.suffix!==e.suffix){if(t.suffix.endsWith(e.suffix))return-1;if(e.suffix.endsWith(t.suffix))return 1}return t.prefix&&!e.prefix?-1:!t.prefix&&e.prefix?1:t.suffix&&!e.suffix?-1:!t.suffix&&e.suffix?1:t.caseSensitive&&!e.caseSensitive?-1:!t.caseSensitive&&e.caseSensitive?1:0}function Ur(t){if(t.pathless)for(const e of t.pathless)Ur(e);
10if(t.static)for(const e of t.static.values())Ur(e);if(t.staticInsensitive)for(const e of t.staticInsensitive.values())Ur(e);if(t.dynamic?.length){t.dynamic.sort(nf);for(const e of t.dynamic)Ur(e)}if(t.optional?.length){t.optional.sort(nf);for(const e of t.optional)Ur(e)}if(t.wildcard?.length){t.wildcard.sort(nf);for(const e of t.wildcard)Ur(e)}}function _s(t){return{kind:0,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}}function rf(t,e,r,a,o){return{kind:t,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null,parse:null,skipOnParamError:!1,parsingPriority:0,caseSensitive:r,prefix:a,suffix:o}}function vT(t,e){const r=_s("/"),a=new Uint16Array(6);for(const o of t)Su(!1,a,o,1,r,0);Ur(r),e.masksTree=r,e.flatCache=Wi(1e3)}function bT(t,e){t||="/";const r=e.flatCache.get(t);if(r)return r;const a=ad(t,e.masksTree);return e.flatCache.set(t,a),a}function wT(t,e,r,a,o){t||="/",a||="/";const u=e?`case\0${t}`:t;let c=o.singleCache.get(u);return c||(c=_s("/"),Su(e,new Uint16Array(6),{from:t},1,c,0),o.singleCache.set(u,c)),ad(a,c,r)}function _T(t,e,r=!1){const a=r?t:`nofuzz\0${t}`,o=e.matchCache.get(a);if(o!==void 0)return o;t||="/";let u;try{u=ad(t,e.segmentTree,r)}catch(c){if(c instanceof URIError)u=null;else throw c}return u&&(u.branch=ET(u.route)),e.matchCache.set(a,u),u}function ST(t){return t==="/"?t:t.replace(/\/{1,}$/,"")}function TT(t,e=!1,r){const a=_s(t.fullPath),o=new Uint16Array(6),u={},c={};let f=0;return Su(e,o,t,1,a,0,p=>{if(r?.(p,f),p.id in u&&Bt(),u[p.id]=p,f!==0&&p.path){const g=ST(p.fullPath);(!c[g]||p.fullPath.endsWith("/"))&&(c[g]=p)}f++}),Ur(a),{processedTree:{segmentTree:a,singleCache:Wi(1e3),matchCache:Wi(1e3),flatCache:null,masksTree:null},routesById:u,routesByPath:c}}function ad(t,e,r=!1){const a=t.split("/"),o=xT(t,a,e,r);if(!o)return null;const[u]=Ab(t,a,o);return{route:o.node.route,rawParams:u,parsedParams:o.parsedParams}}function Ab(t,e,r){const a=RT(r.node);let o=null;const u=Object.create(null);let c=r.extract?.part??0,f=r.extract?.node??0,p=r.extract?.path??0,g=r.extract?.segment??0;for(;f<a.length;c++,f++,p++,g++){const y=a[f];if(y.kind===qr)break;if(y.kind===xb){g--,c--,p--;continue}const m=e[c],b=p;if(m&&(p+=m.length),y.kind===1){o??=r.node.fullPath.split("/");const w=o[g],_=y.prefix?.length??0;if(w.charCodeAt(_)===123){const x=y.suffix?.length??0,E=w.substring(_+2,w.length-x-1),A=m.substring(_,m.length-x);u[E]=decodeURIComponent(A)}else{const x=w.substring(1);u[x]=decodeURIComponent(m)}}else if(y.kind===3){if(r.skipped&1<<f){c--,p=b-1;continue}o??=r.node.fullPath.split("/");const w=o[g],_=y.prefix?.length??0,x=y.suffix?.length??0,E=w.substring(_+3,w.length-x-1),A=y.suffix||y.prefix?m.substring(_,m.length-x):m;A&&(u[E]=decodeURIComponent(A))}else if(y.kind===2){const w=y,_=t.substring(b+(w.prefix?.length??0),t.length-(w.suffix?.length??0)),x=decodeURIComponent(_);u["*"]=x,u._splat=x;break}}return r.rawParams&&Object.assign(u,r.rawParams),[u,{part:c,node:f,path:p,segment:g}]}function ET(t){const e=[t];for(;t.parentRoute;)t=t.parentRoute,e.push(t);return e.reverse(),e}function RT(t){const e=Array(t.depth+1);do e[t.depth]=t,t=t.parent;while(t);return e}function xT(t,e,r,a){if(t==="/"&&r.index)return{node:r.index,skipped:0};const o=!Xi(e),u=o&&t!=="/",c=e.length-(o?1:0),f=[{node:r,index:1,skipped:0,depth:1,statics:0,dynamics:0,optionals:0}];let p=null,g=null;for(;f.length;){const y=f.pop(),{node:m,index:b,skipped:w,depth:_,statics:x,dynamics:E,optionals:A}=y;let{extract:M,rawParams:j,parsedParams:z}=y;if(m.kind===2&&m.route&&!Ul(g,y))continue;if(m.skipOnParamError){if(!Iy(t,e,y))continue;j=y.rawParams,M=y.extract,z=y.parsedParams}a&&m.route&&m.kind!==qr&&Ul(p,y)&&(p=y);const Y=b===c;if(Y&&(m.route&&(!u||m.kind===qr||m.kind===2)&&Ul(g,y)&&(g=y),!m.optional&&!m.wildcard&&!m.index&&!m.pathless))continue;const K=Y?void 0:e[b];let q;if(Y&&m.index){const F={node:m.index,index:b,skipped:w,depth:_+1,statics:x,dynamics:E,optionals:A,extract:M,rawParams:j,parsedParams:z};let J=!0;if(m.index.skipOnParamError&&(Iy(t,e,F)||(J=!1)),J){if(!E&&!A&&!w&&AT(x,c))return F;Ul(g,F)&&(g=F)}}if(m.wildcard)for(let F=m.wildcard.length-1;F>=0;F--){const J=m.wildcard[F],{prefix:le,suffix:se}=J;if(!(le&&(Y||!(J.caseSensitive?K:q??=K.toLowerCase()).startsWith(le)))){if(se){if(Y)continue;const ye=e.slice(b).join("/").slice(-se.length);if((J.caseSensitive?ye:ye.toLowerCase())!==se)continue}f.push({node:J,index:c,skipped:w,depth:_+1,statics:x,dynamics:E,optionals:A,extract:M,rawParams:j,parsedParams:z})}}if(m.optional){const F=w|1<<_,J=_+1;for(let le=m.optional.length-1;le>=0;le--){const se=m.optional[le];f.push({node:se,index:b,skipped:F,depth:J,statics:x,dynamics:E,optionals:A,extract:M,rawParams:j,parsedParams:z})}if(!Y)for(let le=m.optional.length-1;le>=0;le--){const se=m.optional[le],{prefix:ye,suffix:Ce}=se;if(ye||Ce){const Qe=se.caseSensitive?K:q??=K.toLowerCase();if(ye&&!Qe.startsWith(ye)||Ce&&!Qe.endsWith(Ce))continue}f.push({node:se,index:b+1,skipped:w,depth:J,statics:x,dynamics:E,optionals:A+Dl(c,b),extract:M,rawParams:j,parsedParams:z})}}if(!Y&&m.dynamic&&K)for(let F=m.dynamic.length-1;F>=0;F--){const J=m.dynamic[F],{prefix:le,suffix:se}=J;if(le||se){const ye=J.caseSensitive?K:q??=K.toLowerCase();if(le&&!ye.startsWith(le)||se&&!ye.endsWith(se))continue}f.push({node:J,index:b+1,skipped:w,depth:_+1,statics:x,dynamics:E+Dl(c,b),optionals:A,extract:M,rawParams:j,parsedParams:z})}if(!Y&&m.staticInsensitive){const F=m.staticInsensitive.get(q??=K.toLowerCase());F&&f.push({node:F,index:b+1,skipped:w,depth:_+1,statics:x+Dl(c,b),dynamics:E,optionals:A,extract:M,rawParams:j,parsedParams:z})}if(!Y&&m.static){const F=m.static.get(K);F&&f.push({node:F,index:b+1,skipped:w,depth:_+1,statics:x+Dl(c,b),dynamics:E,optionals:A,extract:M,rawParams:j,parsedParams:z})}if(m.pathless){const F=_+1;for(let J=m.pathless.length-1;J>=0;J--){const le=m.pathless[J];f.push({node:le,index:b,skipped:w,depth:F,statics:x,dynamics:E,optionals:A,extract:M,rawParams:j,parsedParams:z})}}}if(g)return g;if(a&&p){let y=p.index;for(let b=0;b<p.index;b++)y+=e[b].length;const m=y===t.length?"/":t.slice(y);return p.rawParams??=Object.create(null),p.rawParams["**"]=decodeURIComponent(m),p}return null}function Dl(t,e){return 2**(t-e-1)}function AT(t,e){return t===2**(e-1)-1}function Iy(t,e,r){try{const[a,o]=Ab(t,e,r);r.rawParams=a,r.extract=o;const u=r.node.parse(a);return r.parsedParams=Object.assign(Object.create(null),r.parsedParams,u),!0}catch{return null}}function Ul(t,e){return t?e.statics>t.statics||e.statics===t.statics&&(e.dynamics>t.dynamics||e.dynamics===t.dynamics&&(e.optionals>t.optionals||e.optionals===t.optionals&&((e.node.kind===qr)>(t.node.kind===qr)||e.node.kind===qr==(t.node.kind===qr)&&e.depth>t.depth))):!0}function Jl(t){return id(t.filter(e=>e!==void 0).join("/"))}function id(t){return t.replace(/\/{2,}/g,"/")}function kb(t){return t==="/"?t:t.replace(/^\/{1,}/,"")}function Gr(t){const e=t.length;return e>1&&t[e-1]==="/"?t.replace(/\/{1,}$/,""):t}function Ob(t){return Gr(kb(t))}function su(t,e){return t?.endsWith("/")&&t!=="/"&&t!==`${e}/`?t.slice(0,-1):t}function kT(t,e,r){return su(t,r)===su(e,r)}function OT({base:t,to:e,trailingSlash:r="never",cache:a}){const o=e.startsWith("/"),u=!o&&e===".";let c;if(a){c=o?e:u?t:t+"\0"+e;const m=a.get(c);if(m)return m}let f;if(u)f=t.split("/");else if(o)f=e.split("/");else{for(f=t.split("/");f.length>1&&Xi(f)==="";)f.pop();const m=e.split("/");for(let b=0,w=m.length;b<w;b++){const _=m[b];_===""?b?b===w-1&&f.push(_):f=[_]:_===".."?f.pop():_==="."||f.push(_)}}f.length>
101&&(Xi(f)===""?r==="never"&&f.pop():r==="always"&&f.push(""));let p,g="";for(let m=0;m<f.length;m++){m>0&&(g+="/");const b=f[m];if(!b)continue;p=sd(b,0,p);const w=p[0];if(w===0){g+=b;continue}const _=p[5],x=b.substring(0,p[1]),E=b.substring(p[4],_),A=b.substring(p[2],p[3]);w===1?g+=x||E?`${x}{$${A}}${E}`:`$${A}`:w===2?g+=x||E?`${x}{$}${E}`:"$":g+=`${x}{-$${A}}${E}`}g=id(g);const y=g||"/";return c&&a&&a.set(c,y),y}function CT(t){const e=new Map(t.map(o=>[encodeURIComponent(o),o])),r=Array.from(e.keys()).map(o=>o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),a=new RegExp(r,"g");return o=>o.replace(a,u=>e.get(u)??u)}function sf(t,e,r){const a=e[t];return typeof a!="string"?a:t==="_splat"?/^[a-zA-Z0-9\-._~!/]*$/.test(a)?a:a.split("/").map(o=>Hy(o,r)).join("/"):Hy(a,r)}function qy({path:t,params:e,decoder:r,...a}){let o=!1;const u=Object.create(null);if(!t||t==="/")return{interpolatedPath:"/",usedParams:u,isMissingParams:o};if(!t.includes("$"))return{interpolatedPath:t,usedParams:u,isMissingParams:o};const c=t.length;let f=0,p,g="";for(;f<c;){const y=f;p=sd(t,y,p);const m=p[5];if(f=m+1,y===m)continue;const b=p[0];if(b===0){g+="/"+t.substring(y,m);continue}if(b===2){const w=e._splat;u._splat=w,u["*"]=w;const _=t.substring(y,p[1]),x=t.substring(p[4],m);if(!w){o=!0,(_||x)&&(g+="/"+_+x);continue}const E=sf("_splat",e,r);g+="/"+_+E+x;continue}if(b===1){const w=t.substring(p[2],p[3]);!o&&!(w in e)&&(o=!0),u[w]=e[w];const _=t.substring(y,p[1]),x=t.substring(p[4],m),E=sf(w,e,r)??"undefined";g+="/"+_+E+x;continue}if(b===3){const w=t.substring(p[2],p[3]),_=e[w];if(_==null)continue;u[w]=_;const x=t.substring(y,p[1]),E=t.substring(p[4],m),A=sf(w,e,r)??"";g+="/"+x+A+E;continue}}return t.endsWith("/")&&(g+="/"),{usedParams:u,interpolatedPath:g||"/",isMissingParams:o}}function Hy(t,e){const r=encodeURIComponent(t);return e?.(r)??r}function jT(t={}){if(t.isNotFound=!0,t.throw)throw t;return t}function ft(t){return t?.isNotFound===!0}function MT(){try{return typeof window<"u"&&typeof window.sessionStorage=="object"?window.sessionStorage:void 0}catch{return}}var NT="tsr-scroll-restoration-v1_3";function LT(){const t=MT();if(!t)return null;let e={};try{const a=JSON.parse(t.getItem("tsr-scroll-restoration-v1_3")||"{}");La(a)&&(e=a)}catch{}return{get state(){return e},set:a=>{e=$r(a,e)||e},persist:()=>{try{t.setItem(NT,JSON.stringify(e))}catch{}}}}var Gy=LT(),DT=t=>t.state.__TSR_key||t.href;function UT(t){const e=[];let r;for(;r=t.parentNode;)e.push(`${t.tagName}:nth-child(${Array.prototype.indexOf.call(r.children,t)+1})`),t=r;return`${e.reverse().join(" > ")}`.toLowerCase()}var zl=!1,Di="window",Vy="data-scroll-restoration-id";function zT(t,e){if(!Gy)return;const r=Gy;if((t.options.scrollRestoration??!1)&&(t.isScrollRestoring=!0),t.isScrollRestorationSetup||!r)return;t.isScrollRestorationSetup=!0,zl=!1;const a=t.options.getScrollRestorationKey||DT,o=new Map;window.history.scrollRestoration="manual";const u=f=>{if(!(zl||!t.isScrollRestoring))if(f.target===document||f.target===window)o.set(Di,{scrollX:window.scrollX||0,scrollY:window.scrollY||0});else{const p=f.target;o.set(p,{scrollX:p.scrollLeft||0,scrollY:p.scrollTop||0})}},c=f=>{if(!t.isScrollRestoring||!f||o.size===0||!r)return;const p=r.state[f]||={};for(const[g,y]of o){let m;if(g===Di)m=Di;else if(g.isConnected){const b=g.getAttribute(Vy);m=b?`[${Vy}="${b}"]`:UT(g)}m&&(p[m]=y)}};document.addEventListener("scroll",u,!0),t.subscribe("onBeforeLoad",f=>{c(f.fromLocation?a(f.fromLocation):void 0),o.clear()}),window.addEventListener("pagehide",()=>{c(a(t.stores.resolvedLocation.get()??t.stores.location.get())),r.persist()}),t.subscribe("onRendered",f=>{const p=a(f.toLocation),g=t.options.scrollRestorationBehavior,y=t.options.scrollToTopSelectors;if(o.clear(),!t.resetNextScroll){t.resetNextScroll=!0;return}if(!(typeof t.options.scrollRestoration=="function"&&!t.options.scrollRestoration({location:t.latestLocation}))){zl=!0;try{const m=t.isScrollRestoring?r.state[p]:void 0;let b=!1;if(m)for(const w in m){const _=m[w];if(!La(_))continue;const{scrollX:x,scrollY:E}=_;if(!(!Number.isFinite(x)||!Number.isFinite(E))){if(w===Di)window.scrollTo({top:E,left:x,behavior:g}),b=!0;else if(w){let A;
10try{A=document.querySelector(w)}catch{continue}A&&(A.scrollLeft=x,A.scrollTop=E,b=!0)}}}if(!b){const w=t.history.location.hash.slice(1);if(w){const _=window.history.state?.__hashScrollIntoViewOptions??!0;if(_){const x=document.getElementById(w);x&&x.scrollIntoView(_)}}else{const _={top:0,left:0,behavior:g};if(window.scrollTo(_),y)for(const x of y){if(x===Di)continue;const E=typeof x=="function"?x():document.querySelector(x);E&&E.scrollTo(_)}}}}finally{zl=!1}t.isScrollRestoring&&r.set(m=>(m[p]||={},m))}})}function Cb(t,e=String){const r=new URLSearchParams;for(const a in t){const o=t[a];o!==void 0&&r.set(a,e(o))}return r.toString()}function af(t){return t?t==="false"?!1:t==="true"?!0:+t*0===0&&+t+""===t?+t:t:""}function PT(t){const e=new URLSearchParams(t),r=Object.create(null);for(const[a,o]of e.entries()){const u=r[a];u==null?r[a]=af(o):Array.isArray(u)?u.push(af(o)):r[a]=[u,af(o)]}return r}var BT=IT(JSON.parse),$T=qT(JSON.stringify,JSON.parse);function IT(t){return e=>{e[0]==="?"&&(e=e.substring(1));const r=PT(e);for(const a in r){const o=r[a];if(typeof o=="string")try{r[a]=t(o)}catch{}}return r}}function qT(t,e){const r=typeof e=="function";function a(o){if(typeof o=="object"&&o!==null)try{return t(o)}catch{}else if(r&&typeof o=="string")try{return e(o),t(o)}catch{}return o}return o=>{const u=Cb(o,a);return u?`?${u}`:""}}var Rs="__root__";function jb(t){if(t.statusCode=t.statusCode||t.code||307,!t._builtLocation&&!t.reloadDocument&&typeof t.href=="string")try{new URL(t.href),t.reloadDocument=!0}catch{}const e=new Headers(t.headers);t.href&&e.get("Location")===null&&e.set("Location",t.href);const r=new Response(null,{status:t.statusCode,headers:e});if(r.options=t,t.throw)throw r;return r}function Ot(t){return t instanceof Response&&!!t.options}function Mb(t){if(t!==null&&typeof t=="object"&&t.isSerializedRedirect)return jb(t)}function HT(t){return{input:({url:e})=>{for(const r of t)e=Rf(r,e);return e},output:({url:e})=>{for(let r=t.length-1;r>=0;r--)e=Nb(t[r],e);return e}}}function GT(t){const e=Ob(t.basepath),r=`/${e}`,a=`${r}/`,o=t.caseSensitive?r:r.toLowerCase(),u=t.caseSensitive?a:a.toLowerCase();return{input:({url:c})=>{const f=t.caseSensitive?c.pathname:c.pathname.toLowerCase();return f===o?c.pathname="/":f.startsWith(u)&&(c.pathname=c.pathname.slice(r.length)),c},output:({url:c})=>(c.pathname=Jl(["/",e,c.pathname]),c)}}function Rf(t,e){const r=t?.input?.({url:e});if(r){if(typeof r=="string")return new URL(r);if(r instanceof URL)return r}return e}function Nb(t,e){const r=t?.output?.({url:e});if(r){if(typeof r=="string")return new URL(r);if(r instanceof URL)return r}return e}function VT(t,e){const{createMutableStore:r,createReadonlyStore:a,batch:o,init:u}=e,c=new Map,f=new Map,p=new Map,g=r(t.status),y=r(t.loadedAt),m=r(t.isLoading),b=r(t.isTransitioning),w=r(t.location),_=r(t.resolvedLocation),x=r(t.statusCode),E=r(t.redirect),A=r([]),M=r([]),j=r([]),z=a(()=>of(c,A.get())),Y=a(()=>of(f,M.get())),K=a(()=>of(p,j.get())),q=a(()=>A.get()[0]),F=a(()=>A.get().some(Q=>c.get(Q)?.get().status==="pending")),J=a(()=>({locationHref:w.get().href,resolvedLocationHref:_.get()?.href,status:g.get()})),le=a(()=>({status:g.get(),loadedAt:y.get(),isLoading:m.get(),isTransitioning:b.get(),matches:z.get(),location:w.get(),resolvedLocation:_.get(),statusCode:x.get(),redirect:E.get()})),se=Wi(64);function ye(Q){let oe=se.get(Q);return oe||(oe=a(()=>{const xe=A.get();for(const ke of xe){const C=c.get(ke);if(C&&C.routeId===Q)return C.get()}}),se.set(Q,oe)),oe}const Ce={status:g,loadedAt:y,isLoading:m,isTransitioning:b,location:w,resolvedLocation:_,statusCode:x,redirect:E,matchesId:A,pendingIds:M,cachedIds:j,matches:z,pendingMatches:Y,cachedMatches:K,firstId:q,hasPending:F,matchRouteDeps:J,matchStores:c,pendingMatchStores:f,cachedMatchStores:p,__store:le,getRouteMatchStore:ye,setMatches:Qe,setPending:Ie,setCached:$};Qe(t.matches),u?.(Ce);function Qe(Q){lf(Q,c,A,r,o)}function Ie(Q){lf(Q,f,M,r,o)}function $(Q){lf(Q,p,j,r,o)}return Ce}function of(t,e){const r=[];for(const a of e){const o=t.get(a);o&&r.push(o.get())}return r}function lf(t,e,r,a,o){const u=t.map(f=>f.id),c=new Set(u);o(()=>{for(const f of e.keys())c.has(f)||e.delete(f);for(const f of t){const p=e.get(f.id);if(!p){const g=a(f);g.routeId=f.routeId,e.set(f.id,g);continue}p.routeId=f.routeId,p.get()!==f&&p.set(f)}mT(r.get(),u)||r.set(u)})}var xf=t=>{if(!t.rendered)return t.rendered=!0,t.onReady?.()},KT=t=>t.stores.matchesId.get().some(e=>
10t.stores.matchStores.get(e)?.get()._forcePending),Tu=(t,e)=>!!(t.preload&&!t.router.stores.matchStores.has(e)),xs=(t,e,r=!0)=>{const a={...t.router.options.context??{}},o=r?e:e-1;for(let u=0;u<=o;u++){const c=t.matches[u];if(!c)continue;const f=t.router.getMatch(c.id);f&&Object.assign(a,f.__routeContext,f.__beforeLoadContext)}return a},Ky=(t,e)=>{if(!t.matches.length)return;const r=e.routeId,a=t.matches.findIndex(c=>c.routeId===t.router.routeTree.id),o=a>=0?a:0;let u=r?t.matches.findIndex(c=>c.routeId===r):t.firstBadMatchIndex??t.matches.length-1;u<0&&(u=o);for(let c=u;c>=0;c--){const f=t.matches[c];if(t.router.looseRoutesById[f.routeId].options.notFoundComponent)return c}return r?u:o},Hr=(t,e,r)=>{if(!(!Ot(r)&&!ft(r)))throw Ot(r)&&r.redirectHandled&&!r.options.reloadDocument||(e&&(e._nonReactive.beforeLoadPromise?.resolve(),e._nonReactive.loaderPromise?.resolve(),e._nonReactive.beforeLoadPromise=void 0,e._nonReactive.loaderPromise=void 0,e._nonReactive.error=r,t.updateMatch(e.id,a=>({...a,status:Ot(r)?"redirected":ft(r)?"notFound":a.status==="pending"?"success":a.status,context:xs(t,e.index),isFetching:!1,error:r})),ft(r)&&!r.routeId&&(r.routeId=e.routeId),e._nonReactive.loadPromise?.resolve()),Ot(r)&&(t.rendered=!0,r.options._fromLocation=t.location,r.redirectHandled=!0,r=t.router.resolveRedirect(r))),r},Lb=(t,e)=>{const r=t.router.getMatch(e);return!!(!r||r._nonReactive.dehydrated)},Fy=(t,e,r)=>{const a=xs(t,r);t.updateMatch(e,o=>({...o,context:a}))},Ui=(t,e,r,a)=>{const{id:o,routeId:u}=t.matches[e],c=t.router.looseRoutesById[u];if(r instanceof Promise)throw r;r.routerCode=a,t.firstBadMatchIndex??=e,Hr(t,t.router.getMatch(o),r);try{c.options.onError?.(r)}catch(f){r=f,Hr(t,t.router.getMatch(o),r)}t.updateMatch(o,f=>(f._nonReactive.beforeLoadPromise?.resolve(),f._nonReactive.beforeLoadPromise=void 0,f._nonReactive.loadPromise?.resolve(),{...f,error:r,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController})),!t.preload&&!Ot(r)&&!ft(r)&&(t.serialError??=r)},Db=(t,e,r,a)=>{if(a._nonReactive.pendingTimeout!==void 0)return;const o=r.options.pendingMs??t.router.options.defaultPendingMs;if(t.onReady&&!Tu(t,e)&&(r.options.loader||r.options.beforeLoad||zb(r))&&typeof o=="number"&&o!==1/0&&(r.options.pendingComponent??t.router.options?.defaultPendingComponent)){const u=setTimeout(()=>{xf(t)},o);a._nonReactive.pendingTimeout=u}},FT=(t,e,r)=>{const a=t.router.getMatch(e);if(!a._nonReactive.beforeLoadPromise&&!a._nonReactive.loaderPromise)return;Db(t,e,r,a);const o=()=>{const u=t.router.getMatch(e);u.preload&&(u.status==="redirected"||u.status==="notFound")&&Hr(t,u,u.error)};return a._nonReactive.beforeLoadPromise?a._nonReactive.beforeLoadPromise.then(o):o()},YT=(t,e,r,a)=>{const o=t.router.getMatch(e);let u=o._nonReactive.loadPromise;o._nonReactive.loadPromise=As(()=>{u?.resolve(),u=void 0});const{paramsError:c,searchError:f}=o;c&&Ui(t,r,c,"PARSE_PARAMS"),f&&Ui(t,r,f,"VALIDATE_SEARCH"),Db(t,e,a,o);const p=new AbortController;let g=!1;const y=()=>{g||(g=!0,t.updateMatch(e,z=>({...z,isFetching:"beforeLoad",fetchCount:z.fetchCount+1,abortController:p})))},m=()=>{o._nonReactive.beforeLoadPromise?.resolve(),o._nonReactive.beforeLoadPromise=void 0,t.updateMatch(e,z=>({...z,isFetching:!1}))};if(!a.options.beforeLoad){t.router.batch(()=>{y(),m()});return}o._nonReactive.beforeLoadPromise=As();const b={...xs(t,r,!1),...o.__routeContext},{search:w,params:_,cause:x}=o,E=Tu(t,e),A={search:w,abortController:p,params:_,preload:E,context:b,location:t.location,navigate:z=>t.router.navigate({...z,_fromLocation:t.location}),buildLocation:t.router.buildLocation,cause:E?"preload":x,matches:t.matches,routeId:a.id,...t.router.options.additionalContext},M=z=>{if(z===void 0){t.router.batch(()=>{y(),m()});return}(Ot(z)||ft(z))&&(y(),Ui(t,r,z,"BEFORE_LOAD")),t.router.batch(()=>{y(),t.updateMatch(e,Y=>({...Y,__beforeLoadContext:z})),m()})};let j;try{if(j=a.options.beforeLoad(A),Zi(j))return y(),j.catch(z=>{Ui(t,r,z,"BEFORE_LOAD")}).then(M)}catch(z){y(),Ui(t,r,z,"BEFORE_LOAD")}M(j)},QT=(t,e)=>{const{id:r,routeId:a}=t.matches[e],o=t.router.looseRoutesById[a],u=()=>f(),c=()=>YT(t,r,e,o),f=()=>{if(Lb(t,r))return;const p=FT(t,r,o);return Zi(p)?p.then(c):c()};return u()},JT=(t,e,r)=>{const a=t.router.getMatch(e);if(!a||!r.options.head&&!r.options.scripts&&!r.options.headers)return;const o={ssr:t.router.options.ssr,matches:t.matches,match:a,params:a.params,loaderData:a.loaderData};return Promise.all([r.options.head?.(o),r.options.scripts?.(o),r.options.headers?.(o)]).then(([u,c,f])=>
10({meta:u?.meta,links:u?.links,headScripts:u?.scripts,headers:f,scripts:c,styles:u?.styles}))},Ub=(t,e,r,a,o)=>{const u=e[a-1],{params:c,loaderDeps:f,abortController:p,cause:g}=t.router.getMatch(r),y=xs(t,a),m=Tu(t,r);return{params:c,deps:f,preload:!!m,parentMatchPromise:u,abortController:p,context:y,location:t.location,navigate:b=>t.router.navigate({...b,_fromLocation:t.location}),cause:m?"preload":g,route:o,...t.router.options.additionalContext}},Yy=async(t,e,r,a,o)=>{try{const u=t.router.getMatch(r);try{(!(Rb??t.router.isServer)||u.ssr===!0)&&eo(o);const c=o.options.loader,f=typeof c=="function"?c:c?.handler,p=f?.(Ub(t,e,r,a,o)),g=!!f&&Zi(p);if((g||o._lazyPromise||o._componentsPromise||o.options.head||o.options.scripts||o.options.headers||u._nonReactive.minPendingPromise)&&t.updateMatch(r,m=>({...m,isFetching:"loader"})),f){const m=g?await p:p;Hr(t,t.router.getMatch(r),m),m!==void 0&&t.updateMatch(r,b=>({...b,loaderData:m}))}o._lazyPromise&&await o._lazyPromise;const y=u._nonReactive.minPendingPromise;y&&await y,o._componentsPromise&&await o._componentsPromise,t.updateMatch(r,m=>({...m,error:void 0,context:xs(t,a),status:"success",isFetching:!1,updatedAt:Date.now()}))}catch(c){let f=c;if(f?.name==="AbortError"){if(u.abortController.signal.aborted){u._nonReactive.loaderPromise?.resolve(),u._nonReactive.loaderPromise=void 0;return}t.updateMatch(r,g=>({...g,status:g.status==="pending"?"success":g.status,isFetching:!1,context:xs(t,a)}));return}const p=u._nonReactive.minPendingPromise;p&&await p,ft(c)&&await o.options.notFoundComponent?.preload?.(),Hr(t,t.router.getMatch(r),c);try{o.options.onError?.(c)}catch(g){f=g,Hr(t,t.router.getMatch(r),g)}!Ot(f)&&!ft(f)&&await eo(o,["errorComponent"]),t.updateMatch(r,g=>({...g,error:f,context:xs(t,a),status:"error",isFetching:!1}))}}catch(u){const c=t.router.getMatch(r);c&&(c._nonReactive.loaderPromise=void 0),Hr(t,c,u)}},XT=async(t,e,r)=>{async function a(w,_,x,E,A){const M=Date.now()-_.updatedAt,j=w?A.options.preloadStaleTime??t.router.options.defaultPreloadStaleTime??3e4:A.options.staleTime??t.router.options.defaultStaleTime??0,z=A.options.shouldReload,Y=typeof z=="function"?z(Ub(t,e,o,r,A)):z,{status:K,invalid:q}=E,F=M>=j&&(!!t.forceStaleReload||E.cause==="enter"||x!==void 0&&x!==E.id);c=K==="success"&&(q||(Y??F)),w&&A.options.preload===!1||(c&&!t.sync&&y?(f=!0,(async()=>{try{await Yy(t,e,o,r,A);const J=t.router.getMatch(o);J._nonReactive.loaderPromise?.resolve(),J._nonReactive.loadPromise?.resolve(),J._nonReactive.loaderPromise=void 0,J._nonReactive.loadPromise=void 0}catch(J){Ot(J)&&await t.router.navigate(J.options)}})()):K!=="success"||c?await Yy(t,e,o,r,A):Fy(t,o,r))}const{id:o,routeId:u}=t.matches[r];let c=!1,f=!1;const p=t.router.looseRoutesById[u],g=p.options.loader,y=((typeof g=="function"?void 0:g?.staleReloadMode)??t.router.options.defaultStaleReloadMode)!=="blocking";if(Lb(t,o)){if(!t.router.getMatch(o))return t.matches[r];Fy(t,o,r)}else{const w=t.router.getMatch(o),_=t.router.stores.matchesId.get()[r],x=(_&&t.router.stores.matchStores.get(_)||null)?.routeId===u?_:t.router.stores.matches.get().find(A=>A.routeId===u)?.id,E=Tu(t,o);if(w._nonReactive.loaderPromise){if(w.status==="success"&&!t.sync&&!w.preload&&y)return w;await w._nonReactive.loaderPromise;const A=t.router.getMatch(o),M=A._nonReactive.error||A.error;M&&Hr(t,A,M),A.status==="pending"&&await a(E,w,x,A,p)}else{const A=E&&!t.router.stores.matchStores.has(o),M=t.router.getMatch(o);M._nonReactive.loaderPromise=As(),A!==M.preload&&t.updateMatch(o,j=>({...j,preload:A})),await a(E,w,x,M,p)}}const m=t.router.getMatch(o);f||(m._nonReactive.loaderPromise?.resolve(),m._nonReactive.loadPromise?.resolve(),m._nonReactive.loadPromise=void 0),clearTimeout(m._nonReactive.pendingTimeout),m._nonReactive.pendingTimeout=void 0,f||(m._nonReactive.loaderPromise=void 0),m._nonReactive.dehydrated=void 0;const b=f?m.isFetching:!1;return b!==m.isFetching||m.invalid!==!1?(t.updateMatch(o,w=>({...w,isFetching:b,invalid:!1})),t.router.getMatch(o)):m};async function Qy(t){const e=t,r=[];KT(e.router)&&xf(e);let a;for(let b=0;b<e.matches.length;b++){try{const w=QT(e,b);Zi(w)&&await w}catch(w){if(Ot(w))throw w;if(ft(w))a=w;else if(!e.preload)throw w;break}if(e.serialError||e.firstBadMatchIndex!=null)break}const o=e.firstBadMatchIndex??e.matches.length,u=a&&!e.preload?Ky(e,a):void 0,c=a&&e.preload?0:u!==void 0?Math.min(u+1,o):o;let f,p;for(let b=0;b<c;b++)r.push(XT(e,r,b));try{await Promise.all(r)}catch{const b=await Promise.allSettled(r);for(const w of b){if(w.status!=="rejected")continue;const _=w.reason;if(Ot(_))throw _;ft(_)?f??=_:p??=_}if(p!==void 0)throw p}const g=f??(a&&!e.preload?a:void 0);let y=e.firstBadMatchIndex!==void 0?e.firstBadMatchIndex:e.matches.length-1;if(!g&&a&&e.preload)return e.matches;if(g){const b=Ky(e,g);b===void 0&&Bt();const w=e.matches[b],_=e.router.looseRoutesById[w.routeId],x=e.router.options?.defaultNotFoundComponent;!_.options.notFoundComponent&&x&&(_.options.notFoundComponent=x),g.routeId=w.routeId;const E=w.routeId===e.router.routeTree.id;e.updateMatch(w.id,A=>({...A,...E?{status:"success",globalNotFound:!0,error:void 0}:{status:"notFound",error:g},isFetching:!1})),y=b,await eo(_,["notFoundComponent"])}else if(!e.preload){const b=e.matches[0];b.globalNotFound||e.router.getMatch(b.id)?.globalNotFound&&e.updateMatch(b.id,w=>({...w,globalNotFound:!1,error:void 0}))}if(e.serialError&&e.firstBadMatchIndex!==void 0){const b=e.router.looseRoutesById[e.matches[e.firstBadMatchIndex].routeId];await eo(b,["errorComponent"])}for(let b=0;b<=y;b++){const{id:w,routeId:_}=e.matches[b],x=e.router.looseRoutesById[_];try{const E=JT(e,w,x);if(E){const A=await E;e.updateMatch(w,M=>({...M,...A}))}}catch(E){console.error(`Error executing head for route ${_}:`,E)}}const m=xf(e);
10if(Zi(m)&&await m,g)throw g;if(e.serialError&&!e.preload&&!e.onReady)throw e.serialError;return e.matches}function Jy(t,e){const r=e.map(a=>t.options[a]?.preload?.()).filter(Boolean);if(r.length!==0)return Promise.all(r)}function eo(t,e=Xl){!t._lazyLoaded&&t._lazyPromise===void 0&&(t.lazyFn?t._lazyPromise=t.lazyFn().then(a=>{const{id:o,...u}=a.options;Object.assign(t.options,u),t._lazyLoaded=!0,t._lazyPromise=void 0}):t._lazyLoaded=!0);const r=()=>t._componentsLoaded?void 0:e===Xl?(()=>{if(t._componentsPromise===void 0){const a=Jy(t,Xl);a?t._componentsPromise=a.then(()=>{t._componentsLoaded=!0,t._componentsPromise=void 0}):t._componentsLoaded=!0}return t._componentsPromise})():Jy(t,e);return t._lazyPromise?t._lazyPromise.then(r):r()}function zb(t){for(const e of Xl)if(t.options[e]?.preload)return!0;return!1}var Xl=["component","errorComponent","pendingComponent","notFoundComponent"],Vr="__TSR_index",Xy="popstate",Zy="beforeunload";function ZT(t){let e=t.getLocation();const r=new Set,a=c=>{e=t.getLocation(),r.forEach(f=>f({location:e,action:c}))},o=c=>{t.notifyOnIndexChange??!0?a(c):e=t.getLocation()},u=async({task:c,navigateOpts:f,...p})=>{if(f?.ignoreBlocker??!1){c();return}const g=t.getBlockers?.()??[],y=p.type==="PUSH"||p.type==="REPLACE";if(typeof document<"u"&&g.length&&y)for(const m of g){const b=au(p.path,p.state);if(await m.blockerFn({currentLocation:e,nextLocation:b,action:p.type})){t.onBlocked?.();return}}c()};return{get location(){return e},get length(){return t.getLength()},subscribers:r,subscribe:c=>(r.add(c),()=>{r.delete(c)}),push:(c,f,p)=>{const g=e.state[Vr];f=Wy(g+1,f),u({task:()=>{t.pushState(c,f),a({type:"PUSH"})},navigateOpts:p,type:"PUSH",path:c,state:f})},replace:(c,f,p)=>{const g=e.state[Vr];f=Wy(g,f),u({task:()=>{t.replaceState(c,f),a({type:"REPLACE"})},navigateOpts:p,type:"REPLACE",path:c,state:f})},go:(c,f)=>{u({task:()=>{t.go(c),o({type:"GO",index:c})},navigateOpts:f,type:"GO"})},back:c=>{u({task:()=>{t.back(c?.ignoreBlocker??!1),o({type:"BACK"})},navigateOpts:c,type:"BACK"})},forward:c=>{u({task:()=>{t.forward(c?.ignoreBlocker??!1),o({type:"FORWARD"})},navigateOpts:c,type:"FORWARD"})},canGoBack:()=>e.state[Vr]!==0,createHref:c=>t.createHref(c),block:c=>{if(!t.setBlockers)return()=>{};const f=t.getBlockers?.()??[];return t.setBlockers([...f,c]),()=>{const p=t.getBlockers?.()??[];t.setBlockers?.(p.filter(g=>g!==c))}},flush:()=>t.flush?.(),destroy:()=>t.destroy?.(),notify:a}}function Wy(t,e){e||(e={});const r=od();return{...e,key:r,__TSR_key:r,[Vr]:t}}function WT(t){const e=typeof document<"u"?window:void 0,r=e.history.pushState,a=e.history.replaceState;let o=[];const u=()=>o,c=F=>o=F,f=(F=>F),p=(()=>au(`${e.location.pathname}${e.location.search}${e.location.hash}`,e.history.state));if(!e.history.state?.__TSR_key&&!e.history.state?.key){const F=od();e.history.replaceState({[Vr]:0,key:F,__TSR_key:F},"")}let g=p(),y,m=!1,b=!1,w=!1,_=!1;const x=()=>g;let E,A;const M=()=>{E&&(q._ignoreSubscribers=!0,(E.isPush?e.history.pushState:e.history.replaceState)(E.state,"",E.href),q._ignoreSubscribers=!1,E=void 0,A=void 0,y=void 0)},j=(F,J,le)=>{const se=f(J);A||(y=g),g=au(J,le),E={href:se,state:le,isPush:E?.isPush||F==="push"},A||(A=Promise.resolve().then(()=>M()))},z=F=>{g=p(),q.notify({type:F})},Y=async()=>{if(b){b=!1;return}const F=p(),J=F.state[Vr]-g.state[Vr],le=J===1,se=J===-1,ye=!le&&!se||m;m=!1;const Ce=ye?"GO":se?"BACK":"FORWARD",Qe=ye?{type:"GO",index:J}:{type:se?"BACK":"FORWARD"};if(w)w=!1;else{const Ie=u();if(typeof document<"u"&&Ie.length){for(const $ of Ie)if(await $.blockerFn({currentLocation:g,nextLocation:F,action:Ce})){b=!0,e.history.go(1),q.notify(Qe);return}}}g=p(),q.notify(Qe)},K=F=>{if(_){_=!1;return}let J=!1;const le=u();if(typeof document<"u"&&le.length)for(const se of le){const ye=se.enableBeforeUnload??!0;if(ye===!0){J=!0;break}if(typeof ye=="function"&&ye()===!0){J=!0;break}}if(J)return F.preventDefault(),F.returnValue=""},q=ZT({getLocation:x,getLength:()=>e.history.length,pushState:(F,J)=>j("push",F,J),replaceState:(F,J)=>j("replace",F,J),back:F=>(F&&(w=!0),_=!0,e.history.back()),forward:F=>{F&&(w=!0),_=!0,e.history.forward()},go:F=>{m=!0,e.history.go(F)},createHref:F=>f(F),flush:M,destroy:()=>{e.history.pushState=r,e.history.replaceState=a,e.removeEventListener(Zy,K,{capture:!0}),e.removeEventListener(Xy,Y)},onBlocked:()=>{y&&g!==y&&(g=y)},getBlockers:u,setBlockers:c,notifyOnIndexChange:!1});return e.addEventListener(Zy,K,{capture:!0}),e.addEventListener(Xy,Y),e.history.pushState=function(...F){const J=r.apply(e.history,F);return q._ignoreSubscribers||z("PUSH"),J},e.history.replaceState=function(...F){const J=a.apply(e.history,F);return q._ignoreSubscribers||z("REPLACE"),J},q}function eE(t){let e=t.replace(/[\x00-\x1f\x7f]/g,"");return e.startsWith("//")&&(e="/"+e.replace(/^\/+/,"")),e}function au(t,e){const r=eE(t),a=r.indexOf("#"),o=r.indexOf("?"),u=od();return{href:r,pathname:r.substring(0,a>0?o>0?Math.min(a,o):a:o>0?o:r.length),hash:a>-1?r.substring(a):"",search:o>-1?r.slice(o,a===-1?void 0:a):"",state:e||{[Vr]:0,key:u,__TSR_key:u}}}function od(){return(Math.random()+1).toString(36).substring(7)}function tE(t){return t instanceof Error?{name:t.name,message:t.message}:{data:t}}function Ca(t,e){const r=e,a=t;return{fromLocation:r,toLocation:a,pathChanged:r?.pathname!==a.pathname,hrefChanged:r?.href!==a.href,hashChanged:r?.hash!==a.hash}}var nE=class{constructor(t,e){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this.resetNextScroll=!0,this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.isScrollRestoring=!1,this.isScrollRestorationSetup=!1,this.startTransition=r=>r(),this.update=r=>{const a=this.options,o=this.basepath??a?.basepath??"/",u=this.basepath===void 0,c=a?.rewrite;if(this.options={...a,...r},this.isServer=this.options.isServer??typeof document>"u",this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=CT(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=WT()),this.origin=this.options.origin,this.origin||(window?.origin&&window.origin!=="null"?this.origin=window.origin:this.origin="http://localhost"),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree){this.routeTree=this.options.routeTree;let y;this.resolvePathCache=Wi(1e3),y=this.buildRouteTree(),this.setRoutes(y)}if(!this.stores&&this.latestLocation){const y=this.getStoreConfig(this);this.batch=y.batch,this.stores=VT(sE(this.latestLocation),y),zT(this)}let f=!1;const p=this.options.basepath??"/",g=this.options.rewrite;if(u||o!==p||c!==g){this.basepath=p;const y=[],m=Ob(p);m&&m!=="/"&&y.push(GT({basepath:p})),g&&y.push(g),this.rewrite=y.length===0?void 0:y.length===1?y[0]:HT(y),this.history&&this.updateLatestLocation(),f=!0}f&&this.stores&&this.stores.location.set(this.latestLocation),typeof window<"u"&&"CSS"in window&&typeof window.CSS?.supports=="function"&&(this.isViewTransitionTypesSupported=window.CSS.supports("selector(:active-view-transition-type(a)"))},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{const r=TT(this.routeTree,this.options.caseSensitive,(a,o)=>{a.init({originalIndex:o})});return this.options.routeMasks&&vT(this.options.routeMasks,r.processedTree),r},this.subscribe=(r,a)=>{const o={eventType:r,fn:a};return this.subscribers.add(o),()=>{this.subscribers.delete(o)}},this.emit=r=>
10{this.subscribers.forEach(a=>{a.eventType===r.type&&a.fn(r)})},this.parseLocation=(r,a)=>{const o=({pathname:p,search:g,hash:y,href:m,state:b})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(p)){const A=this.options.parseSearch(g),M=this.options.stringifySearch(A);return{href:p+M+y,publicHref:p+M+y,pathname:Li(p).path,external:!1,searchStr:M,search:ms(a?.search,A),hash:Li(y.slice(1)).path,state:Ir(a?.state,b)}}const w=new URL(m,this.origin),_=Rf(this.rewrite,w),x=this.options.parseSearch(_.search),E=this.options.stringifySearch(x);return _.search=E,{href:_.href.replace(_.origin,""),publicHref:m,pathname:Li(_.pathname).path,external:!!this.rewrite&&_.origin!==this.origin,searchStr:E,search:ms(a?.search,x),hash:Li(_.hash.slice(1)).path,state:Ir(a?.state,b)}},u=o(r),{__tempLocation:c,__tempKey:f}=u.state;if(c&&(!f||f===this.tempLocationKey)){const p=o(c);return p.state.key=u.state.key,p.state.__TSR_key=u.state.__TSR_key,delete p.state.__tempLocation,{...p,maskedLocation:u}}return u},this.resolvePathWithBase=(r,a)=>OT({base:r,to:id(a),trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(r,a,o)=>typeof r=="string"?this.matchRoutesInternal({pathname:r,search:a},o):this.matchRoutesInternal(r,a),this.getMatchedRoutes=r=>aE({pathname:r,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=r=>{const a=this.getMatch(r);a&&(a.abortController.abort(),clearTimeout(a._nonReactive.pendingTimeout),a._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{this.stores.pendingIds.get().forEach(r=>{this.cancelMatch(r)}),this.stores.matchesId.get().forEach(r=>{if(this.stores.pendingMatchStores.has(r))return;const a=this.stores.matchStores.get(r)?.get();a&&(a.status==="pending"||a.isFetching==="loader")&&this.cancelMatch(r)})},this.buildLocation=r=>{const a=(u={})=>{const c=u._fromLocation||this.pendingBuiltLocation||this.latestLocation,f=this.matchRoutesLightweight(c);u.from;const p=u.unsafeRelative==="path"?c.pathname:u.from??f.fullPath,g=this.resolvePathWithBase(p,"."),y=f.search,m=Object.assign(Object.create(null),f.params),b=u.to?this.resolvePathWithBase(g,`${u.to}`):this.resolvePathWithBase(g,"."),w=u.params===!1||u.params===null?Object.create(null):(u.params??!0)===!0?m:Object.assign(m,$r(u.params,m)),_=this.getMatchedRoutes(b);let x=_.matchedRoutes;if((!_.foundRoute||_.foundRoute.path!=="/"&&_.routeParams["**"])&&this.options.notFoundRoute&&(x=[...x,this.options.notFoundRoute]),Object.keys(w).length>0)for(const le of x){const se=le.options.params?.stringify??le.options.stringifyParams;if(se)try{Object.assign(w,se(w))}catch{}}const E=r.leaveParams?b:Li(qy({path:b,params:w,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path;let A=y;if(r._includeValidateSearch&&this.options.search?.strict){const le={};x.forEach(se=>{if(se.options.validateSearch)try{Object.assign(le,Zl(se.options.validateSearch,{...le,...A}))}catch{}}),A=le}A=iE({search:A,dest:u,destRoutes:x,_includeValidateSearch:r._includeValidateSearch}),A=ms(y,A);const M=this.options.stringifySearch(A),j=u.hash===!0?c.hash:u.hash?$r(u.hash,c.hash):void 0,z=j?`#${j}`:"";let Y=u.state===!0?c.state:u.state?$r(u.state,c.state):{};Y=Ir(c.state,Y);const K=`${E}${M}${z}`;let q,F,J=!1;if(this.rewrite){const le=new URL(K,this.origin),se=Nb(this.rewrite,le);q=le.href.replace(le.origin,""),se.origin!==this.origin?(F=se.href,J=!0):F=se.pathname+se.search+se.hash}else q=gT(K),F=q;return{publicHref:F,href:q,pathname:E,search:A,searchStr:M,state:Y,hash:j??"",external:J,unmaskOnReload:u.unmaskOnReload}},o=(u={},c)=>{const f=a(u);let p=c?a(c):void 0;if(!p){const g=Object.create(null);if(this.options.routeMasks){const y=bT(f.pathname,this.processedTree);if(y){Object.assign(g,y.rawParams);const{from:m,params:b,...w}=y.route,_=b===!1||b===null?Object.create(null):(b??!0)===!0?g:Object.assign(g,$r(b,g));c={from:r.from,...w,params:_},p=a(c)}}}return p&&(f.maskedLocation=p),f};return r.mask?o(r,{from:r.from,...r.mask}):o(r)},this.commitLocation=async({viewTransition:r,ignoreBlocker:a,...o})=>{const u=()=>{const p=["key","__TSR_key","__TSR_index","__hashScrollIntoViewOptions"];p.forEach(y=>{o.state[y]=this.latestLocation.state[y]});const g=Pt(o.state,this.latestLocation.state);return p.forEach(y=>{delete o.state[y]}),g},c=Gr(this.latestLocation.href)===Gr(o.href);let f=this.commitLocationPromise;if(this.commitLocationPromise=As(()=>{f?.resolve(),f=void 0}),c&&u())this.load();else{let{maskedLocation:p,hashScrollIntoView:g,...y}=o;p&&(y={...p,state:{...p.state,__tempKey:void 0,__tempLocation:{...y,search:y.searchStr,state:{...y.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(y.unmaskOnReload??this.options.unmaskOnReload??!1)&&(y.state.__tempKey=this.tempLocationKey)),y.state.__hashScrollIntoViewOptions=g??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=r,this.history[o.replace?"replace":"push"](y.publicHref,y.state,{ignoreBlocker:a})}return this.resetNextScroll=o.resetScroll??!0,this.history.subscribers.size||this.load(),this.commitLocationPromise},this.buildAndCommitLocation=({replace:r,resetScroll:a,hashScrollIntoView:o,viewTransition:u,ignoreBlocker:c,href:f,...p}={})=>
10{if(f){const m=this.history.location.state.__TSR_index,b=au(f,{__TSR_index:r?m:m+1}),w=new URL(b.pathname,this.origin);p.to=Rf(this.rewrite,w).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 y=this.commitLocation({...g,viewTransition:u,replace:r,resetScroll:a,hashScrollIntoView:o,ignoreBlocker:c});return Promise.resolve().then(()=>{this.pendingBuiltLocation===g&&(this.pendingBuiltLocation=void 0)}),y},this.navigate=async({to:r,reloadDocument:a,href:o,publicHref:u,...c})=>{let f=!1;if(o)try{new URL(`${o}`),f=!0}catch{}if(f&&!a&&(a=!0),a){if(r!==void 0||!o){const g=this.buildLocation({to:r,...c});o=o??g.publicHref,u=u??g.publicHref}const p=!f&&u?u:o;if(ru(p,this.protocolAllowlist))return Promise.resolve();if(!c.ignoreBlocker){const g=this.history.getBlockers?.()??[];for(const y of g)if(y?.blockerFn&&await y.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return Promise.resolve()}return c.replace?window.location.replace(p):window.location.href=p,Promise.resolve()}return this.buildAndCommitLocation({...c,href:o,to:r,_isNavigate:!0})},this.beforeLoad=()=>{this.cancelMatches(),this.updateLatestLocation();const r=this.matchRoutes(this.latestLocation),a=this.stores.cachedMatches.get().filter(o=>!r.some(u=>u.id===o.id));this.batch(()=>{this.stores.status.set("pending"),this.stores.statusCode.set(200),this.stores.isLoading.set(!0),this.stores.location.set(this.latestLocation),this.stores.setPending(r),this.stores.setCached(a)})},this.load=async r=>{let a,o,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,y=Ca(g,this.stores.resolvedLocation.get());this.stores.redirect.get()||this.emit({type:"onBeforeNavigate",...y}),this.emit({type:"onBeforeLoad",...y}),await Qy({router:this,sync:r?.sync,forceStaleReload:c.href===g.href,matches:this.stores.pendingMatches.get(),location:g,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{let m=null,b=null,w=null,_=null;this.batch(()=>{const x=this.stores.pendingMatches.get(),E=x.length,A=this.stores.matches.get();m=E?A.filter(z=>!this.stores.pendingMatchStores.has(z.id)):null;const M=new Set;for(const z of this.stores.pendingMatchStores.values())z.routeId&&M.add(z.routeId);const j=new Set;for(const z of this.stores.matchStores.values())z.routeId&&j.add(z.routeId);b=E?A.filter(z=>!M.has(z.routeId)):null,w=E?x.filter(z=>!j.has(z.routeId)):null,_=E?x.filter(z=>j.has(z.routeId)):A,this.stores.isLoading.set(!1),this.stores.loadedAt.set(Date.now()),E&&(this.stores.setMatches(x),this.stores.setPending([]),this.stores.setCached([...this.stores.cachedMatches.get(),...m.filter(z=>z.status!=="error"&&z.status!=="notFound"&&z.status!=="redirected")]),this.clearExpiredCache())});for(const[x,E]of[[b,"onLeave"],[w,"onEnter"],[_,"onStay"]])if(x)for(const A of x)this.looseRoutesById[A.routeId].options[E]?.(A)})})}})}catch(g){Ot(g)?(a=g,this.navigate({...a.options,replace:!0,ignoreBlocker:!0})):ft(g)&&(o=g);const y=a?a.status:o?404:this.stores.matches.get().some(m=>m.status==="error")?500:200;this.batch(()=>{this.stores.statusCode.set(y),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 f;this.hasNotFoundMatch()?f=404:this.stores.matches.get().some(p=>p.status==="error")&&(f=500),f!==void 0&&this.stores.statusCode.set(f)},this.startViewTransition=r=>{const a=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,a&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let o;if(typeof a=="object"&&this.isViewTransitionTypesSupported){const u=this.latestLocation,c=this.stores.resolvedLocation.get(),f=typeof a.types=="function"?a.types(Ca(u,c)):a.types;if(f===!1){r();return}o={update:r,types:f}}else o=r;document.startViewTransition(o)}else r()},this.updateMatch=(r,a)=>{this.startTransition(()=>
10{const o=this.stores.pendingMatchStores.get(r);if(o){o.set(a);return}const u=this.stores.matchStores.get(r);if(u){u.set(a);return}const c=this.stores.cachedMatchStores.get(r);if(c){const f=a(c.get());f.status==="redirected"?this.stores.cachedMatchStores.delete(r)&&this.stores.cachedIds.set(p=>p.filter(g=>g!==r)):c.set(f)}})},this.getMatch=r=>this.stores.cachedMatchStores.get(r)?.get()??this.stores.pendingMatchStores.get(r)?.get()??this.stores.matchStores.get(r)?.get(),this.invalidate=r=>{const a=o=>r?.filter?.(o)??!0?{...o,invalid:!0,...r?.forcePending||o.status==="error"||o.status==="notFound"?{status:"pending",error:void 0}:void 0}:o;return this.batch(()=>{this.stores.setMatches(this.stores.matches.get().map(a)),this.stores.setCached(this.stores.cachedMatches.get().map(a)),this.stores.setPending(this.stores.pendingMatches.get().map(a))}),this.shouldViewTransition=!1,this.load({sync:r?.sync})},this.getParsedLocationHref=r=>r.publicHref||"/",this.resolveRedirect=r=>{const a=r.headers.get("Location");if(!r.options.href||r.options._builtLocation){const o=r.options._builtLocation??this.buildLocation(r.options),u=this.getParsedLocationHref(o);r.options.href=u,r.headers.set("Location",u)}else if(a)try{const o=new URL(a);if(this.origin&&o.origin===this.origin){const u=o.pathname+o.search+o.hash;r.options.href=u,r.headers.set("Location",u)}}catch{}if(r.options.href&&!r.options._builtLocation&&ru(r.options.href,this.protocolAllowlist))throw new Error("Redirect blocked: unsafe protocol");return r.headers.get("Location")||r.headers.set("Location",r.options.href),r},this.clearCache=r=>{const a=r?.filter;a!==void 0?this.stores.setCached(this.stores.cachedMatches.get().filter(o=>!a(o))):this.stores.setCached([])},this.clearExpiredCache=()=>{const r=Date.now(),a=o=>{const u=this.looseRoutesById[o.routeId];if(!u.options.loader)return!0;const c=(o.preload?u.options.preloadGcTime??this.options.defaultPreloadGcTime:u.options.gcTime??this.options.defaultGcTime)??300*1e3;return o.status==="error"?!0:r-o.updatedAt>=c};this.clearCache({filter:a})},this.loadRouteChunk=eo,this.preloadRoute=async r=>{const a=r._builtLocation??this.buildLocation(r);let o=this.matchRoutes(a,{throwOnError:!0,preload:!0,dest:r});const u=new Set([...this.stores.matchesId.get(),...this.stores.pendingIds.get()]),c=new Set([...u,...this.stores.cachedIds.get()]),f=o.filter(p=>!c.has(p.id));if(f.length){const p=this.stores.cachedMatches.get();this.stores.setCached([...p,...f])}try{return o=await Qy({router:this,matches:o,location:a,preload:!0,updateMatch:(p,g)=>{u.has(p)?o=o.map(y=>y.id===p?g(y):y):this.updateMatch(p,g)}}),o}catch(p){if(Ot(p))return p.options.reloadDocument?void 0:await this.preloadRoute({...p.options,_fromLocation:a});ft(p)||console.error(p);return}},this.matchRoute=(r,a)=>{const o={...r,to:r.to?this.resolvePathWithBase(r.from||"",r.to):void 0,params:r.params||{},leaveParams:!0},u=this.buildLocation(o);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(),f=wT(u.pathname,a?.caseSensitive??!1,a?.fuzzy??!1,c.pathname,this.processedTree);return!f||r.params&&!Pt(f.rawParams,r.params,{partial:!0})?!1:a?.includeSearch??!0?Pt(c.search,u.search,{partial:!0})?f.rawParams:!1:f.rawParams},this.hasNotFoundMatch=()=>this.stores.matches.get().some(r=>r.status==="notFound"||r.globalNotFound),this.getStoreConfig=e,this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...t,caseSensitive:t.caseSensitive??!1,notFoundMode:t.notFoundMode??"fuzzy",stringifySearch:t.stringifySearch??$T,parseSearch:t.parseSearch??BT,protocolAllowlist:t.protocolAllowlist??hT}),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:t,routesByPath:e,processedTree:r}){this.routesById=t,this.routesByPath=e,this.processedTree=r;const a=this.options.notFoundRoute;a&&(a.init({originalIndex:99999999999}),this.routesById[a.id]=a)}get looseRoutesById(){return this.routesById}getParentContext(t){return t?.id?t.context??this.options.context??void 0:this.options.context??void 0}matchRoutesInternal(t,e){const r=this.getMatchedRoutes(t.pathname),{foundRoute:a,routeParam
10s:o,parsedParams:u}=r;let{matchedRoutes:c}=r,f=!1;(a?a.path!=="/"&&o["**"]:Gr(t.pathname))&&(this.options.notFoundRoute?c=[...c,this.options.notFoundRoute]:f=!0);const p=f?lE(this.options.notFoundMode,c):void 0,g=new Array(c.length),y=new Map;for(const m of this.stores.matchStores.values())m.routeId&&y.set(m.routeId,m.get());for(let m=0;m<c.length;m++){const b=c[m],w=g[m-1];let _,x,E;{const Ce=w?.search??t.search,Qe=w?._strictSearch??void 0;try{const Ie=Zl(b.options.validateSearch,{...Ce})??void 0;_={...Ce,...Ie},x={...Qe,...Ie},E=void 0}catch(Ie){let $=Ie;if(Ie instanceof iu||($=new iu(Ie.message,{cause:Ie})),e?.throwOnError)throw $;_=Ce,x={},E=$}}const A=b.options.loaderDeps?.({search:_})??"",M=A?JSON.stringify(A):"",{interpolatedPath:j,usedParams:z}=qy({path:b.fullPath,params:o,decoder:this.pathParamsDecoder,server:this.isServer}),Y=b.id+j+M,K=this.getMatch(Y),q=y.get(b.id),F=K?._strictParams??z;let J;if(!K)try{ev(b,z,u,F)}catch(Ce){if(ft(Ce)||Ot(Ce)?J=Ce:J=new rE(Ce.message,{cause:Ce}),e?.throwOnError)throw J}Object.assign(o,F);const le=q?"stay":"enter";let se;if(K)se={...K,cause:le,params:q?.params??o,_strictParams:F,search:ms(q?q.search:K.search,_),_strictSearch:x};else{const Ce=b.options.loader||b.options.beforeLoad||b.lazyFn||zb(b)?"pending":"success";se={id:Y,ssr:b.options.ssr,index:m,routeId:b.id,params:q?.params??o,_strictParams:F,pathname:j,updatedAt:Date.now(),search:q?ms(q.search,_):_,_strictSearch:x,searchError:void 0,status:Ce,isFetching:!1,error:void 0,paramsError:J,__routeContext:void 0,_nonReactive:{loadPromise:As()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:le,loaderDeps:q?Ir(q.loaderDeps,A):A,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:b.options.staticData||{},fullPath:b.fullPath}}e?.preload||(se.globalNotFound=p===b.id),se.searchError=E;const ye=this.getParentContext(w);se.context={...ye,...se.__routeContext,...se.__beforeLoadContext},g[m]=se}for(let m=0;m<g.length;m++){const b=g[m],w=this.looseRoutesById[b.routeId],_=this.getMatch(b.id),x=y.get(b.routeId);if(b.params=x?ms(x.params,o):o,!_){const E=g[m-1],A=this.getParentContext(E);if(w.options.context){const M={deps:b.loaderDeps,params:b.params,context:A??{},location:t,navigate:j=>this.navigate({...j,_fromLocation:t}),buildLocation:this.buildLocation,cause:b.cause,abortController:b.abortController,preload:!!b.preload,matches:g,routeId:w.id};b.__routeContext=w.options.context(M)??void 0}b.context={...A,...b.__routeContext,...b.__beforeLoadContext}}}return g}matchRoutesLightweight(t){const{matchedRoutes:e,routeParams:r,parsedParams:a}=this.getMatchedRoutes(t.pathname),o=Xi(e),u={...t.search};for(const y of e)try{Object.assign(u,Zl(y.options.validateSearch,u))}catch{}const c=Xi(this.stores.matchesId.get()),f=c&&this.stores.matchStores.get(c)?.get(),p=f&&f.routeId===o.id&&f.pathname===t.pathname;let g;if(p)g=f.params;else{const y=Object.assign(Object.create(null),r);for(const m of e)try{ev(m,r,a??{},y)}catch{}g=y}return{matchedRoutes:e,fullPath:o.fullPath,search:u,params:g}}},iu=class extends Error{},rE=class extends Error{};function sE(t){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:t,matches:[],statusCode:200}}function Zl(t,e){if(t==null)return{};if("~standard"in t){const r=t["~standard"].validate(e);if(r instanceof Promise)throw new iu("Async validation not supported");if(r.issues)throw new iu(JSON.stringify(r.issues,void 0,2),{cause:r});return r.value}return"parse"in t?t.parse(e):typeof t=="function"?t(e):{}}function aE({pathname:t,routesById:e,processedTree:r}){const a=Object.create(null),o=Gr(t);let u,c;const f=_T(o,r,!0);return f&&(u=f.route,Object.assign(a,f.rawParams),c=Object.assign(Object.create(null),f.parsedParams)),{matchedRoutes:f?.branch||[e.__root__],routeParams:a,foundRoute:u,parsedParams:c}}function iE({search:t,dest:e,destRoutes:r,_includeValidateSearch:a}){return oE(r)(t,e,a??!1)}function oE(t){const e={dest:null,_includeValidateSearch:!1,middlewares:[]};for(const o of t){if("search"in o.options)o.options.search?.middlewares&&e.middlewares.push(...o.options.search.middlewares);else if(o.options.preSearchFilters||o.options.postSearchFilters){const u=({search:c,next:f})=>{let p=c;
10"preSearchFilters"in o.options&&o.options.preSearchFilters&&(p=o.options.preSearchFilters.reduce((y,m)=>m(y),c));const g=f(p);return"postSearchFilters"in o.options&&o.options.postSearchFilters?o.options.postSearchFilters.reduce((y,m)=>m(y),g):g};e.middlewares.push(u)}if(o.options.validateSearch){const u=({search:c,next:f})=>{const p=f(c);if(!e._includeValidateSearch)return p;try{return{...p,...Zl(o.options.validateSearch,p)??void 0}}catch{return p}};e.middlewares.push(u)}}const r=({search:o})=>{const u=e.dest;return u.search?u.search===!0?o:$r(u.search,o):{}};e.middlewares.push(r);const a=(o,u,c)=>{if(o>=c.length)return u;const f=c[o];return f({search:u,next:g=>a(o+1,g,c)})};return function(u,c,f){return e.dest=c,e._includeValidateSearch=f,a(0,u,e.middlewares)}}function lE(t,e){if(t!=="root")for(let r=e.length-1;r>=0;r--){const a=e[r];if(a.children)return a.id}return Rs}function ev(t,e,r,a){const o=t.options.params?.parse??t.options.parseParams;if(o)if(t.options.skipRouteOnParseError)for(const u in e)u in r&&(a[u]=r[u]);else{const u=o(a);Object.assign(a,u)}}var jn=Symbol.for("TSR_DEFERRED_PROMISE");function uE(t,e){const r=t;return r[jn]||(r[jn]={status:"pending"},r.then(a=>{r[jn].status="success",r[jn].data=a}).catch(a=>{r[jn].status="error",r[jn].error={data:tE(a),__isServerError:!0}})),r}var cE="Error preloading route! âï¸";function tv(t,e){if(t)return typeof t=="string"?t:t[e]}function hE(t){return typeof t=="string"?{href:t,crossOrigin:void 0}:t}function fE(t){if(t.tag!=="link")return;const e=t.attrs?.rel,r=t.attrs?.href;if(typeof r=="string"&&(typeof e=="string"?e.split(/\s+/):[]).includes("stylesheet"))return r}function dE(t,e){const r=fE(e);return!!r&&t?.inlineCss?.styles[r]!==void 0}var Pb=class{get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(t){if(this.init=e=>{this.originalIndex=e.originalIndex;const r=this.options,a=!r?.path&&!r?.id;this.parentRoute=this.options.getParentRoute?.(),a?this._path=Rs:this.parentRoute||Bt();let o=a?Rs:r?.path;o&&o!=="/"&&(o=kb(o));const u=r?.id||o;let c=a?Rs:Jl([this.parentRoute.id==="__root__"?"":this.parentRoute.id,u]);o==="__root__"&&(o="/"),c!=="__root__"&&(c=Jl(["/",c]));const f=c==="__root__"?"/":Jl([this.parentRoute.fullPath,o]);this._path=o,this._id=c,this._fullPath=f,this._to=Gr(f)},this.addChildren=e=>this._addFileChildren(e),this._addFileChildren=e=>(Array.isArray(e)&&(this.children=e),typeof e=="object"&&e!==null&&(this.children=Object.values(e)),this),this._addFileTypes=()=>this,this.updateLoader=e=>(Object.assign(this.options,e),this),this.update=e=>(Object.assign(this.options,e),this),this.lazy=e=>(this.lazyFn=e,this),this.redirect=e=>jb({from:this.fullPath,...e}),this.options=t||{},this.isRoot=!t?.getParentRoute,t?.id&&t?.path)throw new Error("Route cannot have both an 'id' and a 'path' option.")}},pE=class extends Pb{constructor(t){super(t)}};function gE(t){if(typeof document<"u"&&document.querySelector){const e=t.stores.location.get(),r=e.state.__hashScrollIntoViewOptions??!0;if(r&&e.hash!==""){const a=document.getElementById(e.hash);a&&a.scrollIntoView(r)}}}var mE=(t=>(t[t.AggregateError=1]="AggregateError",t[t.ArrowFunction=2]="ArrowFunction",t[t.ErrorPrototypeStack=4]="ErrorPrototypeStack",t[t.ObjectAssign=8]="ObjectAssign",t[t.BigIntTypedArray=16]="BigIntTypedArray",t[t.RegExp=32]="RegExp",t))(mE||{}),ir=Symbol.asyncIterator,Bb=Symbol.hasInstance,ja=Symbol.isConcatSpreadable,or=Symbol.iterator,$b=Symbol.match,Ib=Symbol.matchAll,qb=Symbol.replace,Hb=Symbol.search,Gb=Symbol.species,Vb=Symbol.split,Kb=Symbol.toPrimitive,Ma=Symbol.toStringTag,Fb=Symbol.unscopables,Yb={[ir]:0,[Bb]:1,[ja]:2,[or]:3,[$b]:4,[Ib]:5,[qb]:6,[Hb]:7,[Gb]:8,[Vb]:9,[Kb]:10,[Ma]:11,[Fb]:12},yE={0:ir,1:Bb,2:ja,3:or,4:$b,5:Ib,6:qb,7:Hb,8:Gb,9:Vb,10:Kb,11:Ma,12:Fb},R=void 0,vE={2:!0,3:!1,1:R,0:null,4:-0,5:Number.POSITIVE_INFINITY,6:Number.NEGATIVE_INFINITY,7:Number.NaN},bE={0:"Error",1:"EvalError",2:"RangeError",3:"ReferenceError",4:"SyntaxError",5:"TypeError",6:"URIError"},wE={0:Error,1:EvalError,2:RangeError,3:ReferenceError,4:SyntaxError,5:TypeError,6:URIError};function Re(t,e,r,a,o,u,c,f,p,g,y,m){return{t,i:e,s:r,c:a,m:o,p:u,e:c,a:f,f:p,b:g,o:y,l:m}}function Fr(t){return Re(2,R,t,R,R,R,R,R,R,R,R,R)}var Qb=Fr(2),Jb=Fr(3),_E=Fr(1),SE=Fr(0),TE=Fr(4),EE=Fr(5),RE=Fr(6),xE=Fr(7);function AE(t){switch(t){case'"':return'\\"';case"\\":return"\\\\";case` 11`:return"\\n";case"\r":return"\\r";case"\b":return"\\b";case" ":return"\\t";case"\f":return"\\f";case"<":return"\\x3C";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:return R}}function Yr(t){let e="",r=0,a;for(let o=0,u=t.length;o<u;o++)a=AE(t[o]),a&&(e+=t.slice(r,o)+a,r=o+1);return r===0?e=t:e+=t.slice(r),e}function kE(t){switch(t){case"\\\\":return"\\";case'\\"':return'"';case"\\n":return` 12`;case"\\r":return"\r";case"\\b":return"\b";case"\\t":return" ";case"\\f":return"\f";case"\\x3C":return"<";case"\\u2028":return"\u2028";case"\\u2029":return"\u2029";default:return t}}function Qr(t){return t.replace(/(\\\\|\\"|\\n|\\r|\\b|\\t|\\f|\\u2028|\\u2029|\\x3C)/g,kE)}var Pl="__SEROVAL_REFS__",Xb=new Map,ka=new Map;function Zb(t){return Xb.has(t)}function OE(t){return ka.has(t)}function CE(t){if(Zb(t))return Xb.get(t);throw new oR(t)}function jE(t){if(OE(t))return ka.get(t);throw new lR(t)}typeof globalThis<"u"?Object.defineProperty(globalThis,Pl,{value:ka,configurable:!0,writable:!1,enumerable:!1}):typeof window<"u"?Object.defineProperty(window,Pl,{value:ka,configurable:!0,writable:!1,enumerable:!1}):typeof self<"u"?Object.defineProperty(self,Pl,{value:ka,configurable:!0,writable:!1,enumerable:!1}):typeof global<"u"&&Object.defineProperty(global,Pl,{value:ka,configurable:!0,writable:!1,enumerable:!1});function ld(t){return t instanceof EvalError?1:t instanceof RangeError?2:t instanceof ReferenceError?3:t instanceof SyntaxError?4:t instanceof TypeError?5:t instanceof URIError?6:0}function ME(t){let e=bE[ld(t)];return t.name!==e?{name:t.name}:t.constructor.name!==e?{name:t.constructor.name}:{}}function Wb(t,e){let r=ME(t),a=Object.getOwnPropertyNames(t);for(let o=0,u=a.length,c;o<u;o++)c=a[o],c!=="name"&&c!=="message"&&(c==="stack"?e&4&&(r=r||{},r[c]=t[c]):(r=r||{},r[c]=t[c]));return r}function e0(t){return Object.isFrozen(t)?3:Object.isSealed(t)?2:Object.isExtensible(t)?0:1}function NE(t){switch(t){case Number.POSITIVE_INFINITY:return EE;case Number.NEGATIVE_INFINITY:return RE}return t!==t?xE:Object.is(t,-0)?TE:Re(0,R,t,R,R,R,R,R,R,R,R,R)}function t0(t){return Re(1,R,Yr(t),R,R,R,R,R,R,R,R,R)}function LE(t){return Re(3,R,""+t,R,R,R,R,R,R,R,R,R)}function DE(t){return Re(4,t,R,R,R,R,R,R,R,R,R,R)}function UE(t,e){let r=e.valueOf();return Re(5,t,r!==r?"":e.toISOString(),R,R,R,R,R,R,R,R,R)}function zE(t,e){return Re(6,t,R,Yr(e.source),e.flags,R,R,R,R,R,R,R)}function PE(t,e){return Re(17,t,Yb[e],R,R,R,R,R,R,R,R,R)}function BE(t,e){return Re(18,t,Yr(CE(e)),R,R,R,R,R,R,R,R,R)}function $E(t,e,r){return Re(25,t,r,Yr(e),R,R,R,R,R,R,R,R)}function IE(t,e,r){return Re(9,t,R,R,R,R,R,r,R,R,e0(e),R)}function qE(t,e){return Re(21,t,R,R,R,R,R,R,e,R,R,R)}function HE(t,e,r){return Re(15,t,R,e.constructor.name,R,R,R,R,r,e.byteOffset,R,e.length)}function GE(t,e,r){return Re(16,t,R,e.constructor.name,R,R,R,R,r,e.byteOffset,R,e.byteLength)}function VE(t,e,r){return Re(20,t,R,R,R,R,R,R,r,e.byteOffset,R,e.byteLength)}function KE(t,e,r){return Re(13,t,ld(e),R,Yr(e.message),r,R,R,R,R,R,R)}function FE(t,e,r){return Re(14,t,ld(e),R,Yr(e.message),r,R,R,R,R,R,R)}function YE(t,e){return Re(7,t,R,R,R,R,R,e,R,R,R,R)}function QE(t,e){return Re(28,R,R,R,R,R,R,[t,e],R,R,R,R)}function JE(t,e){return Re(30,R,R,R,R,R,R,[t,e],R,R,R,R)}function XE(t,e,r){return Re(31,t,R,R,R,R,R,r,e,R,R,R)}function ZE(t,e){return Re(32,t,R,R,R,R,R,R,e,R,R,R)}function WE(t,e){return Re(33,t,R,R,R,R,R,R,e,R,R,R)}function eR(t,e){return Re(34,t,R,R,R,R,R,R,e,R,R,R)}function tR(t,e,r,a){return Re(35,t,r,R,R,R,R,e,R,R,R,a)}
12var nR={parsing:1,serialization:2,deserialization:3};function rR(t){return`Seroval Error (step: ${nR[t]})`}var sR=(t,e)=>rR(t),n0=class extends Error{constructor(e,r){super(sR(e)),this.cause=r}},nv=class extends n0{constructor(e){super("parsing",e)}},aR=class extends n0{constructor(e){super("deserialization",e)}};function lr(t){return`Seroval Error (specific: ${t})`}var Eu=class extends Error{constructor(e){super(lr(1)),this.value=e}},r0=class extends Error{constructor(e){super(lr(2))}},iR=class extends Error{constructor(e){super(lr(3))}},fo=class extends Error{constructor(e){super(lr(4))}},oR=class extends Error{constructor(t){super(lr(5)),this.value=t}},lR=class extends Error{constructor(e){super(lr(6))}},uR=class extends Error{constructor(e){super(lr(7))}},Jr=class extends Error{constructor(t){super(lr(8))}},cR=class extends Error{constructor(e){super(lr(9))}},hR=class{constructor(e,r){this.value=e,this.replacement=r}},Ru=()=>{let t={p:0,s:0,f:0};return t.p=new Promise((e,r)=>{t.s=e,t.f=r}),t},fR=(t,e)=>{t.s(e),t.p.s=1,t.p.v=e},dR=(t,e)=>{t.f(e),t.p.s=2,t.p.v=e};Ru.toString();fR.toString();dR.toString();var pR=()=>{let t=[],e=[],r=!0,a=!1,o=0,u=(p,g,y)=>{for(y=0;y<o;y++)e[y]&&e[y][g](p)},c=(p,g,y,m)=>{for(g=0,y=t.length;g<y;g++)m=t[g],!r&&g===y-1?p[a?"return":"throw"](m):p.next(m)},f=(p,g)=>(r&&(g=o++,e[g]=p),c(p),()=>{r&&(e[g]=e[o],e[o--]=void 0)});return{__SEROVAL_STREAM__:!0,on:p=>f(p),next:p=>{r&&(t.push(p),u(p,"next"))},throw:p=>{r&&(t.push(p),u(p,"throw"),r=!1,a=!1,e.length=0)},return:p=>{r&&(t.push(p),u(p,"return"),r=!1,a=!0,e.length=0)}}},gR=t=>e=>()=>{let r=0,a={[t]:()=>a,next:()=>{if(r>e.d)return{done:!0,value:void 0};let o=r++,u=e.v[o];if(o===e.t)throw u;return{done:o===e.d,value:u}}};return a},mR=(t,e)=>r=>()=>{let a=0,o=-1,u=!1,c=[],f=[],p=(y=0,m=f.length)=>{for(;y<m;y++)f[y].s({done:!0,value:void 0})};r.on({next:y=>{let m=f.shift();m&&m.s({done:!1,value:y}),c.push(y)},throw:y=>{let m=f.shift();m&&m.f(y),p(),o=c.length,u=!0,c.push(y)},return:y=>{let m=f.shift();m&&m.s({done:!0,value:y}),p(),o=c.length,c.push(y)}});let g={[t]:()=>g,next:()=>{if(o===-1){let b=a++;if(b>=c.length){let w=e();return f.push(w),w.p}return{done:!1,value:c[b]}}if(a>o)return{done:!0,value:void 0};let y=a++,m=c[y];if(y!==o)return{done:!1,value:m};if(u)throw m;return{done:!0,value:m}}};return g},s0=t=>{let e=atob(t),r=e.length,a=new Uint8Array(r);for(let o=0;o<r;o++)a[o]=e.charCodeAt(o);return a.buffer};s0.toString();function yR(t){return"__SEROVAL_SEQUENCE__"in t}function a0(t,e,r){return{__SEROVAL_SEQUENCE__:!0,v:t,t:e,d:r}}function vR(t){let e=[],r=-1,a=-1,o=t[or]();for(;;)try{let u=o.next();if(e.push(u.value),u.done){a=e.length-1;break}}catch(u){r=e.length,e.push(u)}return a0(e,r,a)}var bR=gR(or);function wR(t){return bR(t)}var _R={},SR={},TR={0:{},1:{},2:{},3:{},4:{},5:{}};function xu(t){return"__SEROVAL_STREAM__"in t}function Os(){return pR()}function ER(t){let e=Os(),r=t[ir]();async function a(){try{let o=await r.next();o.done?e.return(o.value):(e.next(o.value),await a())}catch(o){e.throw(o)}}return a().catch(()=>{}),e}var RR=mR(ir,Ru);function xR(t){return RR(t)}async function AR(t){try{return[1,await t]}catch(e){return[0,e]}}function kR(t,e){return{plugins:e.plugins,mode:t,marked:new Set,features:63^(e.disabledFeatures||0),refs:e.refs||new Map,depthLimit:e.depthLimit||1e3}}function Wl(t,e){t.marked.add(e)}function OR(t,e){let r=t.refs.size;return t.refs.set(e,r),r}function Au(t,e){let r=t.refs.get(e);return r!=null?(Wl(t,r),{type:1,value:DE(r)}):{type:0,value:OR(t,e)}}function ud(t,e){let r=Au(t,e);return r.type===1?r:Zb(e)?{type:2,value:BE(r.value,e)}:r}function Ss(t,e){let r=ud(t,e);if(r.type!==0)return r.value;if(e in Yb)return PE(r.value,e);throw new Eu(e)}function ku(t,e){let r=Au(t,TR[e]);return r.type===1?r.value:Re(26,r.value,e,R,R,R,R,R,R,R,R,R)}function CR(t){let e=Au(t,_R);return e.type===1?e.value:Re(27,e.value,R,R,R,R,R,R,Ss(t,or),R,R,R)}function jR(t){let e=Au(t,SR);return e.type===1?e.value:Re(29,e.value,R,R,R,R,R,[ku(t,1),Ss(t,ir)],R,R,R,R)}function MR(t,e,r,a){return Re(r?11:10,t,R,R,R,a,R,R,R,R,e0(e),R)}function NR(t,e,r,a){return Re(8,e,R,R,R,R,{k:r,v:a},R,ku(t,0),R,R,R)}function LR(t,e,r){let a=new Uint8Array(r),o="";for(let u=0,c=a.length;u<c;u++)o+=String.fromCharCode(a[u]);return Re(19,e,Yr(btoa(o)),R,R,R,R,R,ku(t,5),R,R,R)}function DR(t,e){return{base:kR(t,e),child:void 0}}var UR=class{constructor(t,e){this._p=t,this.depth=e}parse(t){return ot(this._p,this.depth,t)}};async function zR(t,e,r){let a=[];for(let o=0,u=r.length;o<u;o++)o in r?a[o]=await ot(t,e,r[o]):a[o]=0;return a}
12async function PR(t,e,r,a){return IE(r,a,await zR(t,e,a))}async function cd(t,e,r){let a=Object.entries(r),o=[],u=[];for(let c=0,f=a.length;c<f;c++)o.push(Yr(a[c][0])),u.push(await ot(t,e,a[c][1]));return or in r&&(o.push(Ss(t.base,or)),u.push(QE(CR(t.base),await ot(t,e,vR(r))))),ir in r&&(o.push(Ss(t.base,ir)),u.push(JE(jR(t.base),await ot(t,e,ER(r))))),Ma in r&&(o.push(Ss(t.base,Ma)),u.push(t0(r[Ma]))),ja in r&&(o.push(Ss(t.base,ja)),u.push(r[ja]?Qb:Jb)),{k:o,v:u}}async function uf(t,e,r,a,o){return MR(r,a,o,await cd(t,e,a))}async function BR(t,e,r,a){return qE(r,await ot(t,e,a.valueOf()))}async function $R(t,e,r,a){return HE(r,a,await ot(t,e,a.buffer))}async function IR(t,e,r,a){return GE(r,a,await ot(t,e,a.buffer))}async function qR(t,e,r,a){return VE(r,a,await ot(t,e,a.buffer))}async function rv(t,e,r,a){let o=Wb(a,t.base.features);return KE(r,a,o?await cd(t,e,o):R)}async function HR(t,e,r,a){let o=Wb(a,t.base.features);return FE(r,a,o?await cd(t,e,o):R)}async function GR(t,e,r,a){let o=[],u=[];for(let[c,f]of a.entries())o.push(await ot(t,e,c)),u.push(await ot(t,e,f));return NR(t.base,r,o,u)}async function VR(t,e,r,a){let o=[];for(let u of a.keys())o.push(await ot(t,e,u));return YE(r,o)}async function i0(t,e,r,a){let o=t.base.plugins;if(o)for(let u=0,c=o.length;u<c;u++){let f=o[u];if(f.parse.async&&f.test(a))return $E(r,f.tag,await f.parse.async(a,new UR(t,e),{id:r}))}return R}async function KR(t,e,r,a){let[o,u]=await AR(a);return Re(12,r,o,R,R,R,R,R,await ot(t,e,u),R,R,R)}function FR(t,e,r,a,o){let u=[],c=r.on({next:f=>{Wl(this.base,e),ot(this,t,f).then(p=>{u.push(ZE(e,p))},p=>{o(p),c()})},throw:f=>{Wl(this.base,e),ot(this,t,f).then(p=>{u.push(WE(e,p)),a(u),c()},p=>{o(p),c()})},return:f=>{Wl(this.base,e),ot(this,t,f).then(p=>{u.push(eR(e,p)),a(u),c()},p=>{o(p),c()})}})}async function YR(t,e,r,a){return XE(r,ku(t.base,4),await new Promise(FR.bind(t,e,r,a)))}async function QR(t,e,r,a){let o=[];for(let u=0,c=a.v.length;u<c;u++)o[u]=await ot(t,e,a.v[u]);return tR(r,o,a.t,a.d)}async function JR(t,e,r,a){if(Array.isArray(a))return PR(t,e,r,a);if(xu(a))return YR(t,e,r,a);if(yR(a))return QR(t,e,r,a);let o=a.constructor;if(o===hR)return ot(t,e,a.replacement);let u=await i0(t,e,r,a);if(u)return u;switch(o){case Object:return uf(t,e,r,a,!1);case R:return uf(t,e,r,a,!0);case Date:return UE(r,a);case Error:case EvalError:case RangeError:case ReferenceError:case SyntaxError:case TypeError:case URIError:return rv(t,e,r,a);case Number:case Boolean:case String:case BigInt:return BR(t,e,r,a);case ArrayBuffer:return LR(t.base,r,a);case Int8Array:case Int16Array:case Int32Array:case Uint8Array:case Uint16Array:case Uint32Array:case Uint8ClampedArray:case Float32Array:case Float64Array:return $R(t,e,r,a);case DataView:return qR(t,e,r,a);case Map:return GR(t,e,r,a);case Set:return VR(t,e,r,a)}if(o===Promise||a instanceof Promise)return KR(t,e,r,a);let c=t.base.features;if(c&32&&o===RegExp)return zE(r,a);if(c&16)switch(o){case BigInt64Array:case BigUint64Array:return IR(t,e,r,a)}if(c&1&&typeof AggregateError<"u"&&(o===AggregateError||a instanceof AggregateError))return HR(t,e,r,a);if(a instanceof Error)return rv(t,e,r,a);if(or in a||ir in a)return uf(t,e,r,a,!!o);throw new Eu(a)}async function XR(t,e,r){let a=ud(t.base,r);if(a.type!==0)return a.value;let o=await i0(t,e,a.value,r);if(o)return o;throw new Eu(r)}async function ot(t,e,r){switch(typeof r){case"boolean":return r?Qb:Jb;case"undefined":return _E;case"string":return t0(r);case"number":return NE(r);case"bigint":return LE(r);case"object":{if(r){let a=ud(t.base,r);return a.type===0?await JR(t,e+1,a.value,r):a.value}return SE}case"symbol":return Ss(t.base,r);case"function":return XR(t,e,r);default:throw new Eu(r)}}async function ZR(t,e){try{return await ot(t,0,e)}catch(r){throw r instanceof nv?r:new nv(r)}}var WR=(t=>(t[t.Vanilla=1]="Vanilla",t[t.Cross=2]="Cross",t))(WR||{});function o0(t,e){for(let r=0,a=e.length;r<a;r++){let o=e[r];t.has(o)||(t.add(o),o.extends&&o0(t,o.extends))}}function l0(t){if(t){let e=new Set;return o0(e,t),[...e]}}function e1(t){switch(t){case"Int8Array":return Int8Array;case"Int16Array":return Int16Array;case"Int32Array":return Int32Array;case"Uint8Array":return Uint8Array;case"Uint16Array":return Uint16Array;case"Uint32Array":return Uint32Array;case"Uint8ClampedArray":return Uint8ClampedArray;case"Float32Array":return Float32Array;case"Float64Array":return Float64Array;case"BigInt64Array":return BigInt64Array;case"BigUint64Array":return BigUint64Array;default:throw new uR(t)}}var t1=1e6,n1=1e4,r1=2e4;function u0(t,e){switch(e){case 3:return Object.freeze(t);case 1:return Object.preventExtensions(t);case 2:return Object.seal(t);default:return t}}var s1=1e3;function a1(t,e){var r;return{mode:t,plugins:e.plugins,refs:e.refs||new Map,features:(r=e.features)!=null?r:63^(e.disabledFeatures||0),depthLimit:e.depthLimit||s1}}
12function i1(t){return{mode:2,base:a1(2,t),child:R}}var o1=class{constructor(t,e){this._p=t,this.depth=e}deserialize(t){return Pe(this._p,this.depth,t)}};function c0(t,e){if(e<0||!Number.isFinite(e)||!Number.isInteger(e))throw new Jr({t:4,i:e});if(t.refs.has(e))throw new Error("Conflicted ref id: "+e)}function l1(t,e,r){return c0(t.base,e),t.state.marked.has(e)&&t.base.refs.set(e,r),r}function u1(t,e,r){return c0(t.base,e),t.base.refs.set(e,r),r}function lt(t,e,r){return t.mode===1?l1(t,e,r):u1(t,e,r)}function Af(t,e,r){if(Object.hasOwn(e,r))return e[r];throw new Jr(t)}function c1(t,e){return lt(t,e.i,jE(Qr(e.s)))}function h1(t,e,r){let a=r.a,o=a.length,u=lt(t,r.i,new Array(o));for(let c=0,f;c<o;c++)f=a[c],f&&(u[c]=Pe(t,e,f));return u0(u,r.o),u}function f1(t){switch(t){case"constructor":case"__proto__":case"prototype":case"__defineGetter__":case"__defineSetter__":case"__lookupGetter__":case"__lookupSetter__":return!1;default:return!0}}function d1(t){switch(t){case ir:case ja:case Ma:case or:return!0;default:return!1}}function sv(t,e,r){f1(e)?t[e]=r:Object.defineProperty(t,e,{value:r,configurable:!0,enumerable:!0,writable:!0})}function p1(t,e,r,a,o){if(typeof a=="string")sv(r,Qr(a),Pe(t,e,o));else{let u=Pe(t,e,a);switch(typeof u){case"string":sv(r,u,Pe(t,e,o));break;case"symbol":d1(u)&&(r[u]=Pe(t,e,o));break;default:throw new Jr(a)}}}function h0(t,e,r,a){let o=r.k;if(o.length>0)for(let u=0,c=r.v,f=o.length;u<f;u++)p1(t,e,a,o[u],c[u]);return a}function g1(t,e,r){let a=lt(t,r.i,r.t===10?{}:Object.create(null));return h0(t,e,r.p,a),u0(a,r.o),a}function m1(t,e){return lt(t,e.i,new Date(e.s))}function y1(t,e){if(t.base.features&32){let r=Qr(e.c);if(r.length>r1)throw new Jr(e);return lt(t,e.i,new RegExp(r,e.m))}throw new r0(e)}function v1(t,e,r){let a=lt(t,r.i,new Set);for(let o=0,u=r.a,c=u.length;o<c;o++)a.add(Pe(t,e,u[o]));return a}function b1(t,e,r){let a=lt(t,r.i,new Map);for(let o=0,u=r.e.k,c=r.e.v,f=u.length;o<f;o++)a.set(Pe(t,e,u[o]),Pe(t,e,c[o]));return a}function w1(t,e){if(e.s.length>t1)throw new Jr(e);return lt(t,e.i,s0(Qr(e.s)))}function _1(t,e,r){var a;let o=e1(r.c),u=Pe(t,e,r.f),c=(a=r.b)!=null?a:0;if(c<0||c>u.byteLength)throw new Jr(r);return lt(t,r.i,new o(u,c,r.l))}function S1(t,e,r){var a;let o=Pe(t,e,r.f),u=(a=r.b)!=null?a:0;if(u<0||u>o.byteLength)throw new Jr(r);return lt(t,r.i,new DataView(o,u,r.l))}function f0(t,e,r,a){if(r.p){let o=h0(t,e,r.p,{});Object.defineProperties(a,Object.getOwnPropertyDescriptors(o))}return a}function T1(t,e,r){let a=lt(t,r.i,new AggregateError([],Qr(r.m)));return f0(t,e,r,a)}function E1(t,e,r){let a=Af(r,wE,r.s),o=lt(t,r.i,new a(Qr(r.m)));return f0(t,e,r,o)}function R1(t,e,r){let a=Ru(),o=lt(t,r.i,a.p),u=Pe(t,e,r.f);return r.s?a.s(u):a.f(u),o}function x1(t,e,r){return lt(t,r.i,Object(Pe(t,e,r.f)))}function A1(t,e,r){let a=t.base.plugins;if(a){let o=Qr(r.c);for(let u=0,c=a.length;u<c;u++){let f=a[u];if(f.tag===o)return lt(t,r.i,f.deserialize(r.s,new o1(t,e),{id:r.i}))}}throw new iR(r.c)}function k1(t,e){return lt(t,e.i,lt(t,e.s,Ru()).p)}function O1(t,e,r){let a=t.base.refs.get(r.i);if(a)return a.s(Pe(t,e,r.a[1])),R;throw new fo("Promise")}function C1(t,e,r){let a=t.base.refs.get(r.i);if(a)return a.f(Pe(t,e,r.a[1])),R;throw new fo("Promise")}function j1(t,e,r){Pe(t,e,r.a[0]);let a=Pe(t,e,r.a[1]);return wR(a)}function M1(t,e,r){Pe(t,e,r.a[0]);let a=Pe(t,e,r.a[1]);return xR(a)}function N1(t,e,r){let a=lt(t,r.i,Os()),o=r.a,u=o.length;if(u)for(let c=0;c<u;c++)Pe(t,e,o[c]);return a}function L1(t,e,r){let a=t.base.refs.get(r.i);if(a&&xu(a))return a.next(Pe(t,e,r.f)),R;throw new fo("Stream")}function D1(t,e,r){let a=t.base.refs.get(r.i);if(a&&xu(a))return a.throw(Pe(t,e,r.f)),R;throw new fo("Stream")}function U1(t,e,r){let a=t.base.refs.get(r.i);if(a&&xu(a))return a.return(Pe(t,e,r.f)),R;throw new fo("Stream")}function z1(t,e,r){return Pe(t,e,r.f),R}function P1(t,e,r){return Pe(t,e,r.a[1]),R}function B1(t,e,r){let a=lt(t,r.i,a0([],r.s,r.l));for(let o=0,u=r.a.length;o<u;o++)a.v[o]=Pe(t,e,r.a[o]);return a}function Pe(t,e,r){if(e>t.base.depthLimit)throw new cR(t.base.depthLimit);switch(e+=1,r.t){case 2:return Af(r,vE,r.s);case 0:return Number(r.s);case 1:return Qr(String(r.s));case 3:if(String(r.s).length>n1)throw new Jr(r);return BigInt(r.s);case 4:return t.base.refs.get(r.i);case 18:return c1(t,r);case 9:return h1(t,e,r);case 10:case 11:return g1(t,e,r);case 5:return m1(t,r);case 6:return y1(t,r);case 7:return v1(t,e,r);case 8:return b1(t,e,r);case 19:return w1(t,r);case 16:case 15:return _1(t,e,r);case 20:return S1(t,e,r);case 14:return T1(t,e,r);case 13:return E1(t,e,r);case 12:return R1(t,e,r);case 17:return Af(r,yE,r.s);case 21:return x1(t,e,r);case 25:return A1(t,e,r);case 22:return k1(t,r);case 23:return O1(t,e,r);case 24:return C1(t,e,r);case 28:return j1(t,e,r);case 30:return M1(t,e,r);case 31:return N1(t,e,r);case 32:return L1(t,e,r);case 33:return D1(t,e,r);case 34:return U1(t,e,r);case 27:return z1(t,e,r);case 29:return P1(t,e,r);case 35:return B1(t,e,r);default:throw new r0(r)}}function $1(t,e){try{return Pe(t,0,e)}catch(r){throw new aR(r)}}var I1=()=>T;I1.toString();function av(t,e){let r=l0(e.plugins),a=i1({plugins:r,refs:e.refs,features:e.features,disabledFeatures:e.disabledFeatures,depthLimit:e.depthLimit});return $1(a,t)}async function q1(t,e={}){let r=l0(e.plugins),a=DR(1,{plugins:r,disabledFeatures:e.disabledFeatures});return{t:await ZR(a,t),f:a.base.features,m:Array.from(a.base.marked)}}function H1(t){return{tag:"$TSR/t/"+t.key,test:t.test,parse:{sync(e,r,a){return{v:r.parse(t.toSerializable(e))}},async async(e,r,a){return{v:await r.parse(t.toSerializable(e))}},stream(e,r,a){return{v:r.parse(t.toSerializable(e))}}},serialize:void 0,deserialize(e,r,a){return t.fromSerializable(r.deserialize(e.v))}}}var G1=class{constructor(t,e){this.stream=t,this.hint=e?.hint??"binary"}},ou=globalThis.Buffer,d0=!!ou&&typeof ou.from=="function";function p0(t){if(t.length===0)return"";
12if(d0)return ou.from(t).toString("base64");const e=32768,r=[];for(let a=0;a<t.length;a+=e){const o=t.subarray(a,a+e);r.push(String.fromCharCode.apply(null,o))}return btoa(r.join(""))}function g0(t){if(t.length===0)return new Uint8Array(0);if(d0){const a=ou.from(t,"base64");return new Uint8Array(a.buffer,a.byteOffset,a.byteLength)}const e=atob(t),r=new Uint8Array(e.length);for(let a=0;a<e.length;a++)r[a]=e.charCodeAt(a);return r}var zi=Object.create(null),Pi=Object.create(null),V1=t=>new ReadableStream({start(e){t.on({next(r){try{e.enqueue(g0(r))}catch{}},throw(r){e.error(r)},return(){try{e.close()}catch{}}})}}),K1=new TextEncoder,F1=t=>new ReadableStream({start(e){t.on({next(r){try{typeof r=="string"?e.enqueue(K1.encode(r)):e.enqueue(g0(r.$b64))}catch{}},throw(r){e.error(r)},return(){try{e.close()}catch{}}})}}),Y1="(s=>new ReadableStream({start(c){s.on({next(b){try{const d=atob(b),a=new Uint8Array(d.length);for(let i=0;i<d.length;i++)a[i]=d.charCodeAt(i);c.enqueue(a)}catch(_){}},throw(e){c.error(e)},return(){try{c.close()}catch(_){}}})}}))",Q1="(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 iv(t){const e=Os(),r=t.getReader();return(async()=>{try{for(;;){const{done:a,value:o}=await r.read();if(a){e.return(void 0);break}e.next(p0(o))}}catch(a){e.throw(a)}finally{r.releaseLock()}})(),e}function ov(t){const e=Os(),r=t.getReader(),a=new TextDecoder("utf-8",{fatal:!0});return(async()=>{try{for(;;){const{done:o,value:u}=await r.read();if(o){try{const c=a.decode();c.length>0&&e.next(c)}catch{}e.return(void 0);break}try{const c=a.decode(u,{stream:!0});c.length>0&&e.next(c)}catch{e.next({$b64:p0(u)})}}}catch(o){e.throw(o)}finally{r.releaseLock()}})(),e}var J1={tag:"tss/RawStream",extends:[{tag:"tss/RawStreamFactory",test(t){return t===zi},parse:{sync(t,e,r){return{}},async async(t,e,r){return{}},stream(t,e,r){return{}}},serialize(t,e,r){return Y1},deserialize(t,e,r){return zi}},{tag:"tss/RawStreamFactoryText",test(t){return t===Pi},parse:{sync(t,e,r){return{}},async async(t,e,r){return{}},stream(t,e,r){return{}}},serialize(t,e,r){return Q1},deserialize(t,e,r){return Pi}}],test(t){return t instanceof G1},parse:{sync(t,e,r){const a=t.hint==="text"?Pi:zi;return{hint:e.parse(t.hint),factory:e.parse(a),stream:e.parse(Os())}},async async(t,e,r){const a=t.hint==="text"?Pi:zi,o=t.hint==="text"?ov(t.stream):iv(t.stream);return{hint:await e.parse(t.hint),factory:await e.parse(a),stream:await e.parse(o)}},stream(t,e,r){const a=t.hint==="text"?Pi:zi,o=t.hint==="text"?ov(t.stream):iv(t.stream);return{hint:e.parse(t.hint),factory:e.parse(a),stream:e.parse(o)}}},serialize(t,e,r){return"("+e.serialize(t.factory)+")("+e.serialize(t.stream)+")"},deserialize(t,e,r){const a=e.deserialize(t.stream);return e.deserialize(t.hint)==="text"?F1(a):V1(a)}};function X1(t){return{tag:"tss/RawStream",test:()=>!1,parse:{},serialize(){throw new Error("RawStreamDeserializePlugin.serialize should not be called. Client only deserializes.")},deserialize(e,r,a){return t(typeof r?.deserialize=="function"?r.deserialize(e.streamId):e.streamId)}}}var Z1={tag:"$TSR/Error",test(t){return t instanceof Error},parse:{sync(t,e){return{message:e.parse(t.message)}},async async(t,e){return{message:await e.parse(t.message)}},stream(t,e){return{message:e.parse(t.message)}}},serialize(t,e){return"new Error("+e.serialize(t.message)+")"},deserialize(t,e){return new Error(e.deserialize(t.message))}},zr={},m0=t=>new ReadableStream({start:e=>{t.on({next:r=>{try{e.enqueue(r)}catch{}},throw:r=>{e.error(r)},return:()=>{try{e.close()}catch{}}})}}),W1={tag:"seroval-plugins/web/ReadableStreamFactory",test(t){return t===zr},parse:{sync(){return zr},async async(){return await Promise.resolve(zr)},stream(){return zr}},serialize(){return m0.toString()},deserialize(){return zr}};function lv(t){let e=Os(),r=t.getReader();async function a(){try{let o=await r.read();o.done?e.return(o.value):(e.next(o.value),await a())}catch(o){e.throw(o)}}return a().catch(()=>{}),e}var ex={tag:"seroval/plugins/web/ReadableStream",extends:[W1],test(t){return typeof ReadableStream>"u"?!1:t instanceof ReadableStream},parse:{sync(t,e){return{factory:e.parse(zr),stream:e.parse(Os())}},async async(t,e){return{factory:await e.parse(zr),stream:await e.parse(lv(t))}},stream(t,e){return{factory:e.parse(zr),stream:e.parse(lv(t))}}},serialize(t,e){return"("+e.serialize(t.factory)+")("+e.serialize(t.stream)+")"},deserialize(t,e){let r=e.deserialize(t.stream);return m0(r)}},tx=ex,nx=[Z1,J1,tx];function rx(){return[...rd()?.serializationAdapters?.map(H1)??[],...nx]}var uv=new TextDecoder,sx=new Uint8Array(0),cv=16*1024*1024,hv=32*1024*1024,fv=1024,dv=1e5;function ax(t){const e=new Map,r=new Map,a=new Set;let o=!1,u=null,c=0,f;const p=new ReadableStream({start(m){f=m},cancel(){o=!0;try{u?.cancel()}catch{}e.forEach(m=>{try{m.error(new Error("Framed response cancelled"))}catch{}}),e.clear(),r.clear(),a.clear()}});function g(m){const b=r.get(m);
12if(b)return b;if(a.has(m))return new ReadableStream({start(_){_.close()}});if(r.size>=fv)throw new Error(`Too many raw streams in framed response (max ${fv})`);const w=new ReadableStream({start(_){e.set(m,_)},cancel(){a.add(m),e.delete(m),r.delete(m)}});return r.set(m,w),w}function y(m){return g(m),e.get(m)}return(async()=>{const m=t.getReader();u=m;const b=[];let w=0;function _(){if(w<9)return null;const E=b[0];if(E.length>=9)return{type:E[0],streamId:(E[1]<<24|E[2]<<16|E[3]<<8|E[4])>>>0,length:(E[5]<<24|E[6]<<16|E[7]<<8|E[8])>>>0};const A=new Uint8Array(9);let M=0,j=9;for(let z=0;z<b.length&&j>0;z++){const Y=b[z],K=Math.min(Y.length,j);A.set(Y.subarray(0,K),M),M+=K,j-=K}return{type:A[0],streamId:(A[1]<<24|A[2]<<16|A[3]<<8|A[4])>>>0,length:(A[5]<<24|A[6]<<16|A[7]<<8|A[8])>>>0}}function x(E){if(E===0)return sx;const A=new Uint8Array(E);let M=0,j=E;for(;j>0&&b.length>0;){const z=b[0];if(!z)break;const Y=Math.min(z.length,j);A.set(z.subarray(0,Y),M),M+=Y,j-=Y,Y===z.length?b.shift():b[0]=z.subarray(Y)}return w-=E,A}try{for(;;){const{done:E,value:A}=await m.read();if(o||E)break;if(A){if(w+A.length>hv)throw new Error(`Framed response buffer exceeded ${hv} bytes`);for(b.push(A),w+=A.length;;){const M=_();if(!M)break;const{type:j,streamId:z,length:Y}=M;if(j!==tr.JSON&&j!==tr.CHUNK&&j!==tr.END&&j!==tr.ERROR)throw new Error(`Unknown frame type: ${j}`);if(j===tr.JSON){if(z!==0)throw new Error("Invalid JSON frame streamId (expected 0)")}else if(z===0)throw new Error("Invalid raw frame streamId (expected non-zero)");if(Y>cv)throw new Error(`Frame payload too large: ${Y} bytes (max ${cv})`);const K=9+Y;if(w<K)break;if(++c>dv)throw new Error(`Too many frames in framed response (max ${dv})`);x(9);const q=x(Y);switch(j){case tr.JSON:try{f.enqueue(uv.decode(q))}catch{}break;case tr.CHUNK:{const F=y(z);F&&F.enqueue(q);break}case tr.END:{const F=y(z);if(a.add(z),F){try{F.close()}catch{}e.delete(z)}break}case tr.ERROR:{const F=y(z);if(a.add(z),F){const J=uv.decode(q);F.error(new Error(J)),e.delete(z)}break}}}}}if(w!==0)throw new Error("Incomplete frame at end of framed response");try{f.close()}catch{}e.forEach(E=>{try{E.close()}catch{}}),e.clear()}catch(E){try{f.error(E)}catch{}e.forEach(A=>{try{A.error(E)}catch{}}),e.clear()}finally{try{m.releaseLock()}catch{}u=null}})(),{getOrCreateStream:g,jsonChunks:p}}var to=null;async function kf(t){t.length>0&&await Promise.allSettled(t)}var ix=Object.prototype.hasOwnProperty;function y0(t){for(const e in t)if(ix.call(t,e))return!0;return!1}async function ox(t,e,r){to||(to=rx());const a=e[0],o=a.fetch??r,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",`${nT}, application/x-ndjson, application/json`),a.method==="GET"){if(u==="formData")throw new Error("FormData is not supported with GET requests");const p=await v0(a);if(p!==void 0){const g=Cb({payload:p});t.includes("?")?t+=`&${g}`:t+=`?${g}`}}let f;if(a.method==="POST"){const p=await lx(a);p?.contentType&&c.set("content-type",p.contentType),f=p?.body}return await ux(async()=>o(t,{method:a.method,headers:c,signal:a.signal,body:f}))}async function v0(t){let e=!1;const r={};if(t.data!==void 0&&(e=!0,r.data=t.data),t.context&&y0(t.context)&&(e=!0,r.context=t.context),e)return b0(r)}async function b0(t){return JSON.stringify(await Promise.resolve(q1(t,{plugins:to})))}async function lx(t){if(t.data instanceof FormData){let r;return t.context&&y0(t.context)&&(r=await b0(t.context)),r!==void 0&&t.data.set(tT,r),{body:t.data}}const e=await v0(t);if(e)return{body:e,contentType:"application/json"}}async function ux(t){let e;try{e=await t()}catch(a){if(a instanceof Response)e=a;else throw console.log(a),a}if(e.headers.get("x-tss-raw")==="true")return e;const r=e.headers.get("content-type");if(r||Bt(),e.headers.get("x-tss-serialized")){let a;if(r.includes("application/x-tss-framed")){if(aT(r),!e.body)throw new Error("No response body for framed response");const{getOrCreateStream:o,jsonChunks:u}=ax(e.body),c=[X1(o),...to||[]],f=new Map;a=await cx({jsonStream:u,onMessage:p=>av(p,{refs:f,plugins:c}),onError(p,g){console.error(p,g)}})}else if(r.includes("application/json")){const o=await e.json(),u=[];a=av(o,{plugins:to}),await kf(u)}if(a||Bt(),a instanceof Error)throw a;return a}if(r.includes("application/json")){const a=await e.json(),o=Mb(a);if(o)throw o;if(ft(a))throw a;return a}if(!e.ok)throw new Error(await e.text());return e}async function cx({jsonStream:t,onMessage:e,onError:r}){const a=t.getReader(),{value:o,done:u}=await a.read();if(u||!o)throw new Error("Stream ended before first object");const c=JSON.parse(o);let f=!1;const p=(async()=>{try{for(;;){const{value:m,done:b}=await a.read();if(b)break;
12if(m)try{const w=[];try{e(JSON.parse(m))}finally{}await kf(w)}catch(w){r?.(`Invalid JSON: ${m}`,w)}}}catch(m){f||r?.("Stream processing error:",m)}})();let g;const y=[];try{g=e(c)}catch(m){throw f=!0,a.cancel().catch(()=>{}),m}return await kf(y),Promise.resolve(g).catch(()=>{f=!0,a.cancel().catch(()=>{})}),p.finally(()=>{try{a.releaseLock()}catch{}}),g}function w0(t){const e="/_serverFn/"+t;return Object.assign((...o)=>{const u=rd()?.serverFns?.fetch;return ox(e,o,u??fetch)},{url:e,serverFnMeta:{id:t},[Ef]:!0})}var hx={key:"$TSS/serverfn",test:t=>typeof t!="function"||!(Ef in t)?!1:!!t[Ef],toSerializable:({serverFnMeta:t})=>({functionId:t.id}),fromSerializable:({functionId:t})=>w0(t)};function _0(t){if(Array.isArray(t))return t.flatMap(y=>_0(y));if(typeof t!="string")return[];const e=[];let r=0,a,o,u,c,f;const p=()=>{for(;r<t.length&&/\s/.test(t.charAt(r));)r+=1;return r<t.length},g=()=>(o=t.charAt(r),o!=="="&&o!==";"&&o!==",");for(;r<t.length;){for(a=r,f=!1;p();)if(o=t.charAt(r),o===","){for(u=r,r+=1,p(),c=r;r<t.length&&g();)r+=1;r<t.length&&t.charAt(r)==="="?(f=!0,r=c,e.push(t.slice(a,u)),a=r):r=u+1}else r+=1;(!f||r>=t.length)&&e.push(t.slice(a))}return e}function fx(t){return t instanceof Headers?t:Array.isArray(t)?new Headers(t):typeof t=="object"?new Headers(t):null}function dx(...t){return t.reduce((e,r)=>{const a=fx(r);if(!a)return e;for(const[o,u]of a.entries())o==="set-cookie"?_0(u).forEach(c=>e.append("set-cookie",c)):e.set(o,u);return e},new Headers)}function pv(t){return t.replaceAll("\0","/").replaceAll("�","/")}function px(t,e){t.id=e.i,t.__beforeLoadContext=e.b,t.loaderData=e.l,t.status=e.s,t.ssr=e.ssr,t.updatedAt=e.u,t.error=e.e,e.g!==void 0&&(t.globalNotFound=e.g)}async function gx(t){window.$_TSR||Bt();const e=t.options.serializationAdapters;if(e?.length){const E=new Map;e.forEach(A=>{E.set(A.key,A.fromSerializable)}),window.$_TSR.t=E,window.$_TSR.buffer.forEach(A=>A())}window.$_TSR.initialized=!0,window.$_TSR.router||Bt();const r=window.$_TSR.router;r.matches.forEach(E=>{E.i=pv(E.i)}),r.lastMatchId&&(r.lastMatchId=pv(r.lastMatchId));const{manifest:a,dehydratedData:o,lastMatchId:u}=r;t.ssr={manifest:a};const c=document.querySelector('meta[property="csp-nonce"]')?.content;t.options.ssr={nonce:c};const f=t.matchRoutes(t.stores.location.get()),p=Promise.all(f.map(E=>t.loadRouteChunk(t.looseRoutesById[E.routeId])));function g(E){const A=t.looseRoutesById[E.routeId].options.pendingMinMs??t.options.defaultPendingMinMs;if(A){const M=As();E._nonReactive.minPendingPromise=M,E._forcePending=!0,setTimeout(()=>{M.resolve(),t.updateMatch(E.id,j=>(j._nonReactive.minPendingPromise=void 0,{...j,_forcePending:void 0}))},A)}}function y(E){const A=t.looseRoutesById[E.routeId];A&&(A.options.ssr=E.ssr)}let m;f.forEach(E=>{const A=r.matches.find(M=>M.i===E.id);if(!A){E._nonReactive.dehydrated=!1,E.ssr=!1,y(E);return}px(E,A),y(E),E._nonReactive.dehydrated=E.ssr!==!1,(E.ssr==="data-only"||E.ssr===!1)&&m===void 0&&(m=E.index,g(E))}),t.stores.setMatches(f),await t.options.hydrate?.(o);const b=t.stores.matches.get(),w=t.stores.location.get();await Promise.all(b.map(async E=>{try{const A=t.looseRoutesById[E.routeId],M=b[E.index-1]?.context??t.options.context;if(A.options.context){const K={deps:E.loaderDeps,params:E.params,context:M??{},location:w,navigate:q=>t.navigate({...q,_fromLocation:w}),buildLocation:t.buildLocation,cause:E.cause,abortController:E.abortController,preload:!1,matches:f,routeId:A.id};E.__routeContext=A.options.context(K)??void 0}E.context={...M,...E.__routeContext,...E.__beforeLoadContext};const j={ssr:t.options.ssr,matches:b,match:E,params:E.params,loaderData:E.loaderData},z=await A.options.head?.(j),Y=await A.options.scripts?.(j);E.meta=z?.meta,E.links=z?.links,E.headScripts=z?.scripts,E.styles=z?.styles,E.scripts=Y}catch(A){if(ft(A))E.error={isNotFound:!0},console.error(`NotFound error during hydration for routeId: ${E.routeId}`,A);else throw E.error=A,console.error(`Error during hydration for route ${E.routeId}:`,A),A}}));const _=f[f.length-1].id!==u;if(!f.some(E=>E.ssr===!1)&&!_)return f.forEach(E=>{E._nonReactive.dehydrated=void 0}),t.stores.resolvedLocation.set(t.stores.location.get()),p;
12const x=Promise.resolve().then(()=>t.load()).catch(E=>{console.error("Error during router hydration:",E)});if(_){const E=f[1];E||Bt(),g(E),E._displayPending=!0,E._nonReactive.displayPendingPromise=x,x.then(()=>{t.batch(()=>{t.stores.status.get()==="pending"&&(t.stores.status.set("idle"),t.stores.resolvedLocation.set(t.stores.location.get())),t.updateMatch(E.id,A=>({...A,_displayPending:void 0,displayPendingPromise:void 0}))})})}return p}var lu=ee.use,qi=typeof window<"u"?ee.useLayoutEffect:ee.useEffect;function cf(t){const e=ee.useRef({value:t,prev:null}),r=e.current.value;return t!==r&&(e.current={value:t,prev:r}),e.current.prev}function mx(t,e,r={},a={}){ee.useEffect(()=>{if(!t.current||a.disabled||typeof IntersectionObserver!="function")return;const o=new IntersectionObserver(([u])=>{e(u)},r);return o.observe(t.current),()=>{o.disconnect()}},[e,r,a.disabled,t])}function yx(t){const e=ee.useRef(null);return ee.useImperativeHandle(t,()=>e.current,[]),e}function vx({promise:t}){if(lu)return lu(t);const e=uE(t);if(e[jn].status==="pending")throw e;if(e[jn].status==="error")throw e[jn].error;return e[jn].data}function bx(t){const e=L.jsx(wx,{...t});return t.fallback?L.jsx(ee.Suspense,{fallback:t.fallback,children:e}):e}function wx(t){const e=vx(t);return t.children(e)}function hd(t){const e=t.errorComponent??fd;return L.jsx(_x,{getResetKey:t.getResetKey,onCatch:t.onCatch,children:({error:r,reset:a})=>r?ee.createElement(e,{error:r,reset:a}):t.children})}var _x=class extends ee.Component{constructor(...t){super(...t),this.state={error:null}}static getDerivedStateFromProps(t,e){const r=t.getResetKey();return e.error&&e.resetKey!==r?{resetKey:r,error:null}:{resetKey:r}}static getDerivedStateFromError(t){return{error:t}}reset(){this.setState({error:null})}componentDidCatch(t,e){this.props.onCatch&&this.props.onCatch(t,e)}render(){return this.props.children({error:this.state.error,reset:()=>{this.reset()}})}};function fd({error:t}){const[e,r]=ee.useState(!1);return L.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[L.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[L.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),L.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>r(a=>!a),children:e?"Hide Error":"Show Error"})]}),L.jsx("div",{style:{height:".25rem"}}),e?L.jsx("div",{children:L.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:t.message?L.jsx("code",{children:t.message}):null})}):null]})}function Sx({children:t,fallback:e=null}){return dd()?L.jsx(Ji.Fragment,{children:t}):L.jsx(Ji.Fragment,{children:e})}function dd(){return Ji.useSyncExternalStore(Tx,()=>!0,()=>!1)}function Tx(){return()=>{}}var S0=ee.createContext(null);function dt(t){return ee.useContext(S0)}var Ou=ee.createContext(void 0),Ex=ee.createContext(void 0),Ve=(t=>(t[t.None=0]="None",t[t.Mutable=1]="Mutable",t[t.Watching=2]="Watching",t[t.RecursedCheck=4]="RecursedCheck",t[t.Recursed=8]="Recursed",t[t.Dirty=16]="Dirty",t[t.Pending=32]="Pending",t))(Ve||{});function Rx({update:t,notify:e,unwatched:r}){return{link:a,unlink:o,propagate:u,checkDirty:c,shallowPropagate:f};function a(g,y,m){const b=y.depsTail;if(b!==void 0&&b.dep===g)return;const w=b!==void 0?b.nextDep:y.deps;if(w!==void 0&&w.dep===g){w.version=m,y.depsTail=w;return}const _=g.subsTail;if(_!==void 0&&_.version===m&&_.sub===y)return;const x=y.depsTail=g.subsTail={version:m,dep:g,sub:y,prevDep:b,nextDep:w,prevSub:_,nextSub:void 0};w!==void 0&&(w.prevDep=x),b!==void 0?b.nextDep=x:y.deps=x,_!==void 0?_.nextSub=x:g.subs=x}function o(g,y=g.sub){const m=g.dep,b=g.prevDep,w=g.nextDep,_=g.nextSub,x=g.prevSub;return w!==void 0?w.prevDep=b:y.depsTail=b,b!==void 0?b.nextDep=w:y.deps=w,_!==void 0?_.prevSub=x:m.subsTail=x,x!==void 0?x.nextSub=_:(m.subs=_)===void 0&&r(m),w}function u(g){let y=g.nextSub,m;e:do{const b=g.sub;let w=b.flags;if(w&60?w&12?w&4?!(w&48)&&p(g,b)?(b.flags=w|40,w&=1):w=0:b.flags=w&-9|32:w=0:b.flags=w|32,w&2&&e(b),w&1){const _=b.subs;if(_!==void 0){const x=(g=_).nextSub;x!==void 0&&(m={value:y,prev:m},y=x);continue}}if((g=y)!==void 0){y=g.nextSub;continue}for(;m!==void 0;)if(g=m.value,m=m.prev,g!==void 0){y=g.nextSub;continue e}break}while(!0)}function c(g,y){let m,b=0,w=!1;e:do{const _=g.dep,x=_.flags;if(y.flags&16)w=!0;else if((x&17)===17){if(t(_)){const E=_.subs;E.nextSub!==void 0&&f(E),w=!0}}else if((x&33)===33){(g.nextSub!==void 0||g.prevSub!==void 0)&&(m={value:g,prev:m}),g=_.deps,y=_,++b;continue}if(!w){const E=g.nextDep;if(E!==void 0){g=E;continue}}for(;b--;){const E=y.subs,A=E.nextSub!==void 0;if(A?(g=m.value,m=m.prev):g=E,w){if(t(y)){A&&f(E),y=g.sub;continue}w=!1}else y.flags&=-33;y=g.sub;const M=g.nextDep;if(M!==void 0){g=M;continue e}}return w}while(!0)}function f(g){do{const y=g.sub,m=y.flags;(m&48)===32&&(y.flags=m|16,(m&6)===2&&e(y))}while((g=g.nextSub)!==void 0)}function p(g,y){let m=y.depsTail;for(;m!==void 0;){if(m===g)return!0;m=m.prevDep}return!1}}function xx(t,e,r){const a=typeof t=="object",o=a?t:void 0;return{next:(a?t.next:t)?.bind(o),error:(a?t.error:e)?.bind(o),c
12omplete:(a?t.complete:r)?.bind(o)}}const Of=[];let eu=0;const{link:gv,unlink:Ax,propagate:kx,checkDirty:T0,shallowPropagate:mv}=Rx({update(t){return t._update()},notify(t){Of[Cf++]=t,t.flags&=~Ve.Watching},unwatched(t){t.depsTail!==void 0&&(t.depsTail=void 0,t.flags=Ve.Mutable|Ve.Dirty,uu(t))}});let Bl=0,Cf=0,On,jf=0;function E0(t){try{++jf,t()}finally{--jf||R0()}}function uu(t){const e=t.depsTail;let r=e!==void 0?e.nextDep:t.deps;for(;r!==void 0;)r=Ax(r,t)}function R0(){if(!(jf>0)){for(;Bl<Cf;){const t=Of[Bl];Of[Bl++]=void 0,t.notify()}Bl=0,Cf=0}}function yv(t,e){const r=typeof t=="function",a=t,o={_snapshot:r?void 0:t,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:r?Ve.None:Ve.Mutable,get(){return On!==void 0&&gv(o,On,eu),o._snapshot},subscribe(u){const c=xx(u),f={current:!1},p=Ox(()=>{o.get(),f.current?c.next?.(o._snapshot):f.current=!0});return{unsubscribe:()=>{p.stop()}}},_update(u){const c=On,f=e?.compare??Object.is;if(r)On=o,++eu,o.depsTail=void 0;else if(u===void 0)return!1;r&&(o.flags=Ve.Mutable|Ve.RecursedCheck);try{const p=o._snapshot,g=typeof u=="function"?u(p):u===void 0&&r?a(p):u;return p===void 0||!f(p,g)?(o._snapshot=g,!0):!1}finally{On=c,r&&(o.flags&=~Ve.RecursedCheck),uu(o)}}};return r?(o.flags=Ve.Mutable|Ve.Dirty,o.get=function(){const u=o.flags;if(u&Ve.Dirty||u&Ve.Pending&&T0(o.deps,o)){if(o._update()){const c=o.subs;c!==void 0&&mv(c)}}else u&Ve.Pending&&(o.flags=u&~Ve.Pending);return On!==void 0&&gv(o,On,eu),o._snapshot}):o.set=function(u){if(o._update(u)){const c=o.subs;c!==void 0&&(kx(c),mv(c),R0())}},o}function Ox(t){const e=()=>{const a=On;On=r,++eu,r.depsTail=void 0,r.flags=Ve.Watching|Ve.RecursedCheck;try{return t()}finally{On=a,r.flags&=~Ve.RecursedCheck,uu(r)}},r={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:Ve.Watching|Ve.RecursedCheck,notify(){const a=this.flags;a&Ve.Dirty||a&Ve.Pending&&T0(this.deps,this)?e():this.flags=Ve.Watching},stop(){this.flags=Ve.None,this.depsTail=void 0,uu(this)}};return e(),r}var hf={exports:{}},ff={},df={exports:{}},pf={};var vv;function Cx(){if(vv)return pf;vv=1;var t=ho();function e(m,b){return m===b&&(m!==0||1/m===1/b)||m!==m&&b!==b}var r=typeof Object.is=="function"?Object.is:e,a=t.useState,o=t.useEffect,u=t.useLayoutEffect,c=t.useDebugValue;function f(m,b){var w=b(),_=a({inst:{value:w,getSnapshot:b}}),x=_[0].inst,E=_[1];return u(function(){x.value=w,x.getSnapshot=b,p(x)&&E({inst:x})},[m,w,b]),o(function(){return p(x)&&E({inst:x}),m(function(){p(x)&&E({inst:x})})},[m]),c(w),w}function p(m){var b=m.getSnapshot;m=m.value;try{var w=b();return!r(m,w)}catch{return!0}}function g(m,b){return b()}var y=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?g:f;return pf.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:y,pf}var bv;function jx(){return bv||(bv=1,df.exports=Cx()),df.exports}var wv;function Mx(){if(wv)return ff;wv=1;var t=ho(),e=jx();function r(g,y){return g===y&&(g!==0||1/g===1/y)||g!==g&&y!==y}var a=typeof Object.is=="function"?Object.is:r,o=e.useSyncExternalStore,u=t.useRef,c=t.useEffect,f=t.useMemo,p=t.useDebugValue;return ff.useSyncExternalStoreWithSelector=function(g,y,m,b,w){var _=u(null);if(_.current===null){var x={hasValue:!1,value:null};_.current=x}else x=_.current;_=f(function(){function A(K){if(!M){if(M=!0,j=K,K=b(K),w!==void 0&&x.hasValue){var q=x.value;if(w(q,K))return z=q}return z=K}if(q=z,a(j,K))return q;var F=b(K);return w!==void 0&&w(q,F)?(j=K,q):(j=K,z=F)}var M=!1,j,z,Y=m===void 0?null:m;return[function(){return A(y())},Y===null?void 0:function(){return A(Y())}]},[y,m,b,w]);var E=o(g,_[0],_[1]);return c(function(){x.hasValue=!0,x.value=E},[E]),p(E),E},ff}var _v;function Nx(){return _v||(_v=1,hf.exports=Mx()),hf.exports}var Lx=Nx();function Dx(t,e){return t===e}function et(t,e,r=Dx){const a=ee.useCallback(c=>{if(!t)return()=>{};const{unsubscribe:f}=t.subscribe(c);return f},[t]),o=ee.useCallback(()=>t?.get(),[t]);return Lx.useSyncExternalStoreWithSelector(a,o,o,e,r)}var Ux={get:()=>{},subscribe:()=>({unsubscribe:()=>{}})};function Cs(t){const e=dt(),r=ee.useContext(t.from?Ex:Ou),a=t.from??r,o=a?t.from?e.stores.getRouteMatchStore(a):e.stores.matchStores.get(a):void 0,u=ee.useRef(void 0);return et(o??Ux,c=>{if((t.shouldThrow??!0)&&!c&&Bt(),c===void 0)return;const f=t.select?t.select(c):c;if(t.structuralSharing??e.options.defaultStructuralSharing){const p=Ir(u.current,f);return u.current=p,p}return f})}function x0(t){return Cs({from:t.from,strict:t.strict,structuralSharing:t.structuralSharing,select:e=>t.select?t.select(e.loaderData):e.loaderData})}function A0(t){const{select:e,...r}=t;return Cs({...r,select:a=>e?e(a.loaderDeps):a.loaderDeps})}function k0(t){return Cs({from:t.from,shouldThrow:t.shouldThrow,structuralSharing:t.structuralSharing,strict:t.strict,select:e=>{const r=t.strict===!1?e.params:e._strictParams;return t.select?t.select(r):r}})}function O0(t){return Cs({from:t.from,strict:t.strict,shouldThrow:t.shouldThrow,structuralSharing:t.structuralSharing,select:e=>t.select?t.select(e.search):e.search})}function C0(t){const e=dt();return ee.useCallback(r=>e.navigate({...r,from:r.from??t?.from}),[t?.from,e])}function j0(t){return Cs({...t,select:e=>t.select?t.select(e.context):e.context})}var zx=Eb();function Px(t,e){const r=dt(),a=yx(e),{activeProps:o,inactiveProps:u,activeOptions:c,to:f,preload:p,preloadDelay:g,preloadIntentProximity:y,hashScrollIntoView:m,replace:b,startTransition:w,resetScroll:_,viewTransition:x,children:E,target:A,disabled:M,style:j,className:z,onClick:Y,onBlur:K,onFocus:q,onMouseEnter:F,onMouseLeave:J,onTouchStart:le,ignoreBlocker:se,params:ye,search:Ce,hash:Qe,state:Ie,mask:$,reloadDocument:Q,unsafeRelative:oe,from:xe,_fromLocation:ke,...C}=t,G=dd(),X=ee.useMemo(()=>t,[r,t.from,t._fromLocation,t.hash,t.to,t.search,t.params,t.state,t.mask,t.unsafeRelative]),W=et(r.stores.location,Be=>Be,(Be,pt)=>Be.href===pt.href),ae=ee.useMemo(()=>{const Be={_fromLocation:W,...X};return r.buildLocation(Be)},[r,W,X]),pe=ae.maskedLocation?ae.maskedLocation.publicHref:ae.publicHref,Se=ae.maskedLocation?ae.maskedLocation.external:ae.external,Je=ee.useMemo(()=>Gx(pe,Se,r.history,M),[M,Se,pe,r.history]),Ue=ee.useMemo(()=>
12{if(Je?.external)return ru(Je.href,r.protocolAllowlist)?void 0:Je.href;if(!Vx(f)&&!(typeof f!="string"||f.indexOf(":")===-1))try{return new URL(f),ru(f,r.protocolAllowlist)?void 0:f}catch{}},[f,Je,r.protocolAllowlist]),Ln=ee.useMemo(()=>{if(Ue)return!1;if(c?.exact){if(!kT(W.pathname,ae.pathname,r.basepath))return!1}else{const Be=su(W.pathname,r.basepath),pt=su(ae.pathname,r.basepath);if(!(Be.startsWith(pt)&&(Be.length===pt.length||Be[pt.length]==="/")))return!1}return(c?.includeSearch??!0)&&!Pt(W.search,ae.search,{partial:!c?.exact,ignoreUndefined:!c?.explicitUndefined})?!1:c?.includeHash?G&&W.hash===ae.hash:!0},[c?.exact,c?.explicitUndefined,c?.includeHash,c?.includeSearch,W,Ue,G,ae.hash,ae.pathname,ae.search,r.basepath]),Dn=Ln?$r(o,{})??Bx:gf,ur=Ln?gf:$r(u,{})??gf,za=[z,Dn.className,ur.className].filter(Boolean).join(" "),Sn=(j||Dn.style||ur.style)&&{...j,...Dn.style,...ur.style},[Pa,Ms]=ee.useState(!1),yo=ee.useRef(!1),Un=t.reloadDocument||Ue?!1:p??r.options.defaultPreload,Xr=g??r.options.defaultPreloadDelay??0,un=ee.useCallback(()=>{r.preloadRoute({...X,_builtLocation:ae}).catch(Be=>{console.warn(Be),console.warn(cE)})},[r,X,ae]);mx(a,ee.useCallback(Be=>{Be?.isIntersecting&&un()},[un]),Hx,{disabled:!!M||Un!=="viewport"}),ee.useEffect(()=>{yo.current||!M&&Un==="render"&&(un(),yo.current=!0)},[M,un,Un]);const Ba=Be=>{const pt=Be.currentTarget.getAttribute("target"),Tn=A!==void 0?A:pt;if(!M&&!Kx(Be)&&!Be.defaultPrevented&&(!Tn||Tn==="_self")&&Be.button===0){Be.preventDefault(),zx.flushSync(()=>{Ms(!0)});const Ns=r.subscribe("onResolved",()=>{Ns(),Ms(!1)});r.navigate({...X,replace:b,resetScroll:_,hashScrollIntoView:m,startTransition:w,viewTransition:x,ignoreBlocker:se})}};if(Ue)return{...C,ref:a,href:Ue,...E&&{children:E},...A&&{target:A},...M&&{disabled:M},...j&&{style:j},...z&&{className:z},...Y&&{onClick:Y},...K&&{onBlur:K},...q&&{onFocus:q},...F&&{onMouseEnter:F},...J&&{onMouseLeave:J},...le&&{onTouchStart:le}};const vo=Be=>{if(M||Un!=="intent")return;if(!Xr){un();return}const pt=Be.currentTarget;if(Bi.has(pt))return;const Tn=setTimeout(()=>{Bi.delete(pt),un()},Xr);Bi.set(pt,Tn)},zu=Be=>{M||Un!=="intent"||un()},wt=Be=>{if(M||!Un||!Xr)return;const pt=Be.currentTarget,Tn=Bi.get(pt);Tn&&(clearTimeout(Tn),Bi.delete(pt))};return{...C,...Dn,...ur,href:Je?.href,ref:a,onClick:va([Y,Ba]),onBlur:va([K,wt]),onFocus:va([q,vo]),onMouseEnter:va([F,vo]),onMouseLeave:va([J,wt]),onTouchStart:va([le,zu]),disabled:!!M,target:A,...Sn&&{style:Sn},...za&&{className:za},...M&&$x,...Ln&&Ix,...G&&Pa&&qx}}var gf={},Bx={className:"active"},$x={role:"link","aria-disabled":!0},Ix={"data-status":"active","aria-current":"page"},qx={"data-transitioning":"transitioning"},Bi=new WeakMap,Hx={rootMargin:"100px"},va=t=>e=>{for(const r of t)if(r){if(e.defaultPrevented)return;r(e)}};function Gx(t,e,r,a){if(!a)return e?{href:t,external:!0}:{href:r.createHref(t)||"/",external:!1}}function Vx(t){if(typeof t!="string")return!1;const e=t.charCodeAt(0);return e===47?t.charCodeAt(1)!==47:e===46}var Kr=ee.forwardRef((t,e)=>{const{_asChild:r,...a}=t,{type:o,...u}=Px(a,e),c=typeof a.children=="function"?a.children({isActive:u["data-status"]==="active"}):a.children;if(!r){const{disabled:f,...p}=u;return ee.createElement("a",p,c)}return ee.createElement(r,u,c)});function Kx(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}var Fx=class extends Pb{constructor(e){super(e),this.useMatch=r=>Cs({select:r?.select,from:this.id,structuralSharing:r?.structuralSharing}),this.useRouteContext=r=>j0({...r,from:this.id}),this.useSearch=r=>O0({select:r?.select,structuralSharing:r?.structuralSharing,from:this.id}),this.useParams=r=>k0({select:r?.select,structuralSharing:r?.structuralSharing,from:this.id}),this.useLoaderDeps=r=>A0({...r,from:this.id}),this.useLoaderData=r=>x0({...r,from:this.id}),this.useNavigate=()=>C0({from:this.fullPath}),this.Link=Ji.forwardRef((r,a)=>L.jsx(Kr,{ref:a,from:this.fullPath,...r}))}};function Yx(t){return new Fx(t)}function Qx(){return t=>Xx(t)}var Jx=class extends pE{constructor(t){super(t),this.useMatch=e=>Cs({select:e?.select,from:this.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>j0({...e,from:this.id}),this.useSearch=e=>O0({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useParams=e=>k0({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useLoaderDeps=e=>A0({...e,from:this.id}),this.useLoaderData=e=>x0({...e,from:this.id}),this.useNavigate=()=>C0({from:this.fullPath}),this.Link=Ji.forwardRef((e,r)=>L.jsx(Kr,{ref:r,from:this.fullPath,...e}))}};function Xx(t){return new Jx(t)}function $t(t){return new Zx(t,{silent:!0}).createRoute}var Zx=class{constructor(t,e){this.path=t,this.createRoute=r=>{const a=Yx(r);return a.isRoot=!1,a},this.silent=e?.silent}};function Et(t,e){let r,a,o,u;const c=()=>(r||(r=t().then(p=>{r=void 0,a=p[e??"default"]}).catch(p=>{if(o=p,uT(o)&&o instanceof Error&&typeof window<"u"&&typeof sessionStorage<"u"){const g=`tanstack_router_reload:${o.message}`;sessionStorage.getItem(g)||(sessionStorage.setItem(g,"1"),u=!0)}})),r),f=function(g){if(u)throw window.location.reload(),new Promise(()=>{});if(o)throw o;if(!a)if(lu)lu(c());else throw c();return ee.createElement(a,g)};return f.preload=c,f}function Wx(t){const e=dt(),r=`not-found-${et(e.stores.location,a=>a.pathname)}-${et(e.stores.status,a=>a)}`;return L.jsx(hd,{getResetKey:()=>r,onCatch:(a,o)=>
12{if(ft(a))t.onCatch?.(a,o);else throw a},errorComponent:({error:a})=>{if(ft(a))return t.fallback?.(a);throw a},children:t.children})}function eA(){return L.jsx("p",{children:"Not Found"})}function Ea(t){return L.jsx(L.Fragment,{children:t.children})}function M0(t,e,r){return e.options.notFoundComponent?L.jsx(e.options.notFoundComponent,{...r}):t.options.defaultNotFoundComponent?L.jsx(t.options.defaultNotFoundComponent,{...r}):L.jsx(eA,{})}function tA(t){return null}function nA(){return tA(dt()),null}var N0=ee.memo(function({matchId:e}){const r=dt(),a=r.stores.matchStores.get(e);a||Bt();const o=et(r.stores.loadedAt,c=>c),u=et(a,c=>c);return L.jsx(rA,{router:r,matchId:e,resetKey:o,matchState:ee.useMemo(()=>{const c=u.routeId,f=r.routesById[c].parentRoute?.id;return{routeId:c,ssr:u.ssr,_displayPending:u._displayPending,parentRouteId:f}},[u._displayPending,u.routeId,u.ssr,r.routesById])})});function rA({router:t,matchId:e,resetKey:r,matchState:a}){const o=t.routesById[a.routeId],u=o.options.pendingComponent??t.options.defaultPendingComponent,c=u?L.jsx(u,{}):null,f=o.options.errorComponent??t.options.defaultErrorComponent,p=o.options.onCatch??t.options.defaultOnCatch,g=o.isRoot?o.options.notFoundComponent??t.options.notFoundRoute?.options.component:o.options.notFoundComponent,y=a.ssr===!1||a.ssr==="data-only",m=(!o.isRoot||o.options.wrapInSuspense||y)&&(o.options.wrapInSuspense??u??(o.options.errorComponent?.preload||y))?ee.Suspense:Ea,b=f?hd:Ea,w=g?Wx:Ea;return L.jsxs(o.isRoot?o.options.shellComponent??Ea:Ea,{children:[L.jsx(Ou.Provider,{value:e,children:L.jsx(m,{fallback:c,children:L.jsx(b,{getResetKey:()=>r,errorComponent:f||fd,onCatch:(_,x)=>{if(ft(_))throw _.routeId??=a.routeId,_;p?.(_,x)},children:L.jsx(w,{fallback:_=>{if(_.routeId??=a.routeId,!g||_.routeId&&_.routeId!==a.routeId||!_.routeId&&!o.isRoot)throw _;return ee.createElement(g,_)},children:y||a._displayPending?L.jsx(Sx,{fallback:c,children:L.jsx(Sv,{matchId:e})}):L.jsx(Sv,{matchId:e})})})})}),a.parentRouteId===Rs?L.jsxs(L.Fragment,{children:[L.jsx(sA,{resetKey:r}),t.options.scrollRestoration&&Rb?L.jsx(nA,{}):null]}):null]})}function sA({resetKey:t}){const e=dt(),r=ee.useRef(void 0);return qi(()=>{const a=e.latestLocation.href;(r.current===void 0||r.current!==a)&&(e.emit({type:"onRendered",...Ca(e.stores.location.get(),e.stores.resolvedLocation.get())}),r.current=a)},[e.latestLocation.state.__TSR_key,t,e]),null}var Sv=ee.memo(function({matchId:e}){const r=dt(),a=(y,m)=>r.getMatch(y.id)?._nonReactive[m]??y._nonReactive[m],o=r.stores.matchStores.get(e);o||Bt();const u=et(o,y=>y),c=u.routeId,f=r.routesById[c],p=ee.useMemo(()=>{const y=(r.routesById[c].options.remountDeps??r.options.defaultRemountDeps)?.({routeId:c,loaderDeps:u.loaderDeps,params:u._strictParams,search:u._strictSearch});return y?JSON.stringify(y):void 0},[c,u.loaderDeps,u._strictParams,u._strictSearch,r.options.defaultRemountDeps,r.routesById]),g=ee.useMemo(()=>{const y=f.options.component??r.options.defaultComponent;return y?L.jsx(y,{},p):L.jsx(L0,{})},[p,f.options.component,r.options.defaultComponent]);if(u._displayPending)throw a(u,"displayPendingPromise");if(u._forcePending)throw a(u,"minPendingPromise");if(u.status==="pending"){const y=f.options.pendingMinMs??r.options.defaultPendingMinMs;if(y){const m=r.getMatch(u.id);if(m&&!m._nonReactive.minPendingPromise){const b=As();m._nonReactive.minPendingPromise=b,setTimeout(()=>{b.resolve(),m._nonReactive.minPendingPromise=void 0},y)}}throw a(u,"loadPromise")}if(u.status==="notFound")return ft(u.error)||Bt(),M0(r,f,u.error);if(u.status==="redirected")throw Ot(u.error)||Bt(),a(u,"loadPromise");if(u.status==="error")throw u.error;return g}),L0=ee.memo(function(){const e=dt(),r=ee.useContext(Ou);let a,o=!1,u;{const g=r?e.stores.matchStores.get(r):void 0;[a,o]=et(g,y=>[y?.routeId,y?.globalNotFound??!1]),u=et(e.stores.matchesId,y=>y[y.findIndex(m=>m===r)+1])}const c=a?e.routesById[a]:void 0,f=e.options.defaultPendingComponent?L.jsx(e.options.defaultPendingComponent,{}):null;if(o)return c||Bt(),M0(e,c,void 0);if(!u)return null;const p=L.jsx(N0,{matchId:u});return a===Rs?L.jsx(ee.Suspense,{fallback:f,children:p}):p});function aA(){const t=dt(),e=ee.useRef({router:t,mounted:!1}),[r,a]=ee.useState(!1),o=et(t.stores.isLoading,m=>m),u=et(t.stores.hasPending,m=>m),c=cf(o),f=o||r||u,p=cf(f),g=o||u,y=cf(g);return t.startTransition=m=>{a(!0),ee.startTransition(()=>{m(),a(!1)})},ee.useEffect(()=>{const m=t.history.subscribe(t.load),b=t.buildLocation({to:t.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return Gr(t.latestLocation.publicHref)!==Gr(b.publicHref)&&t.commitLocation({...b,replace:!0}),()=>{m()}},[t,t.history]),qi(()=>
12{if(typeof window<"u"&&t.ssr||e.current.router===t&&e.current.mounted)return;e.current={router:t,mounted:!0},(async()=>{try{await t.load()}catch(b){console.error(b)}})()},[t]),qi(()=>{c&&!o&&t.emit({type:"onLoad",...Ca(t.stores.location.get(),t.stores.resolvedLocation.get())})},[c,t,o]),qi(()=>{y&&!g&&t.emit({type:"onBeforeRouteMount",...Ca(t.stores.location.get(),t.stores.resolvedLocation.get())})},[g,y,t]),qi(()=>{if(p&&!f){const m=Ca(t.stores.location.get(),t.stores.resolvedLocation.get());t.emit({type:"onResolved",...m}),E0(()=>{t.stores.status.set("idle"),t.stores.resolvedLocation.set(t.stores.location.get())}),m.hrefChanged&&gE(t)}},[f,p,t]),null}function iA(){const t=dt(),e=t.routesById[Rs].options.pendingComponent??t.options.defaultPendingComponent,r=e?L.jsx(e,{}):null,a=L.jsxs(typeof document<"u"&&t.ssr?Ea:ee.Suspense,{fallback:r,children:[L.jsx(aA,{}),L.jsx(oA,{})]});return t.options.InnerWrap?L.jsx(t.options.InnerWrap,{children:a}):a}function oA(){const t=dt(),e=et(t.stores.firstId,o=>o),r=et(t.stores.loadedAt,o=>o),a=e?L.jsx(N0,{matchId:e}):null;return L.jsx(Ou.Provider,{value:e,children:t.options.disableGlobalCatchBoundary?a:L.jsx(hd,{getResetKey:()=>r,errorComponent:fd,onCatch:void 0,children:a})})}var lA=t=>({createMutableStore:yv,createReadonlyStore:yv,batch:E0}),uA=t=>new cA(t),cA=class extends nE{constructor(t){super(t,lA)}};function hA({router:t,children:e,...r}){Object.keys(r).length>0&&t.update({...t.options,...r,context:{...t.options.context,...r.context}});const a=L.jsx(S0.Provider,{value:t,children:e});return t.options.Wrap?L.jsx(t.options.Wrap,{children:a}):a}function fA({router:t,...e}){return L.jsx(hA,{router:t,...e,children:L.jsx(iA,{})})}function dA(t){const e=dt({warn:t?.router===void 0}),r=t?.router||e,a=ee.useRef(void 0);return et(r.stores.__store,o=>{if(t?.select){if(t.structuralSharing??r.options.defaultStructuralSharing){const u=Ir(a.current,t.select(o));return a.current=u,u}return t.select(o)}return o})}function D0(t){const{attrs:e,children:r,nonce:a}=t;switch(t.tag){case"title":return L.jsx("title",{...e,suppressHydrationWarning:!0,children:r});case"meta":return L.jsx("meta",{...e,suppressHydrationWarning:!0});case"link":return L.jsx("link",{...e,precedence:e?.precedence??(e?.rel==="stylesheet"?"default":void 0),nonce:a,suppressHydrationWarning:!0});case"style":return t.inlineCss,L.jsx("style",{...e,dangerouslySetInnerHTML:{__html:r},nonce:a});case"script":return L.jsx(pA,{attrs:e,children:r});default:return null}}function pA({attrs:t,children:e}){dt();const r=dd(),a=typeof t?.type=="string"&&t.type!==""&&t.type!=="text/javascript"&&t.type!=="module";if(ee.useEffect(()=>{if(!a){if(t?.src){const o=(()=>{try{const c=document.baseURI||window.location.href;return new URL(t.src,c).href}catch{return t.src}})();if(Array.from(document.querySelectorAll("script[src]")).find(c=>c.src===o))return;const u=document.createElement("script");for(const[c,f]of Object.entries(t))c!=="suppressHydrationWarning"&&f!==void 0&&f!==!1&&u.setAttribute(c,typeof f=="boolean"?"":String(f));return document.head.appendChild(u),()=>{u.parentNode&&u.parentNode.removeChild(u)}}if(typeof e=="string"){const o=typeof t?.type=="string"?t.type:"text/javascript",u=typeof t?.nonce=="string"?t.nonce:void 0;if(Array.from(document.querySelectorAll("script:not([src])")).find(f=>{if(!(f instanceof HTMLScriptElement))return!1;const p=f.getAttribute("type")??"text/javascript",g=f.getAttribute("nonce")??void 0;return f.textContent===e&&p===o&&g===u}))return;const c=document.createElement("script");if(c.textContent=e,t)for(const[f,p]of Object.entries(t))f!=="suppressHydrationWarning"&&p!==void 0&&p!==!1&&c.setAttribute(f,typeof p=="boolean"?"":String(p));return document.head.appendChild(c),()=>{c.parentNode&&c.parentNode.removeChild(c)}}}},[t,e,a]),a&&typeof e=="string")return L.jsx("script",{...t,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:e}});if(!r){if(t?.src)return L.jsx("script",{...t,suppressHydrationWarning:!0});if(typeof e=="string")return L.jsx("script",{...t,dangerouslySetInnerHTML:{__html:e},suppressHydrationWarning:!0})}return null}var gA=t=>{const e=dt(),r=e.options.ssr?.nonce,a=et(e.stores.matches,g=>g.map(y=>
12y.meta).filter(Boolean),Pt),o=ee.useMemo(()=>{const g=[],y={};let m;for(let b=a.length-1;b>=0;b--){const w=a[b];for(let _=w.length-1;_>=0;_--){const x=w[_];if(x)if(x.title)m||(m={tag:"title",children:x.title});else if("script:ld+json"in x)try{const E=JSON.stringify(x["script:ld+json"]);g.push({tag:"script",attrs:{type:"application/ld+json"},children:pT(E)})}catch{}else{const E=x.name??x.property;if(E){if(y[E])continue;y[E]=!0}g.push({tag:"meta",attrs:{...x,nonce:r}})}}}return m&&g.push(m),r&&g.push({tag:"meta",attrs:{property:"csp-nonce",content:r}}),g.reverse(),g},[a,r]),u=et(e.stores.matches,g=>{const y=g.map(w=>w.links).filter(Boolean).flat(1).map(w=>({tag:"link",attrs:{...w,nonce:r}})),m=e.ssr?.manifest,b=g.map(w=>m?.routes[w.routeId]?.assets??[]).filter(Boolean).flat(1).flatMap(w=>w.tag==="link"?dE(m,w)?[]:[{tag:"link",attrs:{...w.attrs,crossOrigin:tv(t,"stylesheet")??w.attrs?.crossOrigin,suppressHydrationWarning:!0,nonce:r}}]:w.tag==="style"?[{tag:"style",attrs:{...w.attrs,nonce:r},children:w.children,...w.inlineCss?{inlineCss:!0}:{}}]:[]);return[...y,...b]},Pt),c=et(e.stores.matches,g=>{const y=[];return g.map(m=>e.looseRoutesById[m.routeId]).forEach(m=>e.ssr?.manifest?.routes[m.id]?.preloads?.filter(Boolean).forEach(b=>{const w=hE(b);y.push({tag:"link",attrs:{rel:"modulepreload",href:w.href,crossOrigin:tv(t,"modulepreload")??w.crossOrigin,nonce:r}})})),y},Pt),f=et(e.stores.matches,g=>g.map(y=>y.styles).flat(1).filter(Boolean).map(({children:y,...m})=>({tag:"style",attrs:{...m,nonce:r},children:y})),Pt),p=et(e.stores.matches,g=>g.map(y=>y.headScripts).flat(1).filter(Boolean).map(({children:y,...m})=>({tag:"script",attrs:{...m,nonce:r},children:y})),Pt);return mA([...o,...c,...u,...f,...p],g=>JSON.stringify(g))};function mA(t,e){const r=new Set;return t.filter(a=>{const o=e(a);return r.has(o)?!1:(r.add(o),!0)})}function yA(t){const e=gA(t.assetCrossOrigin),r=dt().options.ssr?.nonce;return L.jsx(L.Fragment,{children:e.map(a=>ee.createElement(D0,{...a,key:`tsr-meta-${JSON.stringify(a)}`,nonce:r}))})}var vA=()=>{const t=dt(),e=t.options.ssr?.nonce,r=u=>{const c=[],f=t.ssr?.manifest;return f?(u.map(p=>t.looseRoutesById[p.routeId]).forEach(p=>f.routes[p.id]?.assets?.filter(g=>g.tag==="script").forEach(g=>{c.push({tag:"script",attrs:{...g.attrs,nonce:e},children:g.children})})),c):[]},a=u=>u.map(c=>c.scripts).flat(1).filter(Boolean).map(({children:c,...f})=>({tag:"script",attrs:{...f,suppressHydrationWarning:!0,nonce:e},children:c})),o=et(t.stores.matches,r,Pt);return bA(t,et(t.stores.matches,a,Pt),o)};function bA(t,e,r){let a;t.serverSsr&&(a=t.serverSsr.takeBufferedScripts());const o=[...e,...r];return a&&o.unshift(a),L.jsx(L.Fragment,{children:o.map((u,c)=>ee.createElement(D0,{...u,key:`tsr-scripts-${u.tag}-${c}`}))})}function Tv(t){return t!=="__proto__"&&t!=="constructor"&&t!=="prototype"}function Mf(t,e){const r=Object.create(null);if(t)for(const a of Object.keys(t))Tv(a)&&(r[a]=t[a]);if(e&&typeof e=="object")for(const a of Object.keys(e))Tv(a)&&(r[a]=e[a]);return r}function U0(t){return Object.create(null)}var z0=()=>{throw new Error("createServerOnlyFn() functions can only be called on the server!")},tu=(t,e)=>{const r=e||t||{};return typeof r.method>"u"&&(r.method="GET"),Object.assign(u=>tu(void 0,{...r,...u}),{options:r,middleware:u=>{const c=[...r.middleware||[]];u.map(p=>{Dy in p?p.options.middleware&&c.push(...p.options.middleware):c.push(p)});const f=tu(void 0,{...r,middleware:c});return f[Dy]=!0,f},inputValidator:u=>tu(void 0,{...r,inputValidator:u}),handler:(...u)=>{const[c,f]=u,p={...r,extractedFn:c,serverFn:f},g=[...p.middleware||[],SA(p)];return c.method=r.method,Object.assign(async y=>{const m=await Ev(g,"client",{...c,...p,data:y?.data,headers:y?.headers,signal:y?.signal,fetch:y?.fetch,context:U0()}),b=Mb(m.error);if(b)throw b;if(m.error)throw m.error;return m.result},{...c,method:r.method,__executeServer:async y=>{const m=z0(),b=m.contextAfterGlobalMiddlewares;return await Ev(g,"server",{...c,...y,serverFnMeta:c.serverFnMeta,context:Mf(y.context,b),request:m.request}).then(w=>({result:w.result,error:w.error,context:w.sendContext}))}})}})};async function Ev(t,e,r){let a=wA([...rd()?.functionMiddleware||[],...t]);if(e==="server"){const u=z0();u?.executedRequestMiddlewares&&(a=a.filter(c=>!u.executedRequestMiddlewares.has(c)))}const o=async u=>{const c=a.shift();if(!c)return u;try{"inputValidator"in c.options&&c.options.inputValidator&&e==="server"&&(u.data=await _A(c.options.inputValidator,u.data));let f;if(e==="client"?"client"in c.options&&(f=c.options.client):"server"in c.options&&(f=c.options.server),f){const g=await f({...u,next:async(y={})=>{const m=await o({...u,...y,context:Mf(u.context,y.context),sendContext:Mf(u.sendContext,y.sendContext),headers:dx(u.headers,y.headers),_callSiteFetch:u._callSiteFetch,fetch:u._callSiteFetch??y.fetch??u.fetch,result:y.result!==void 0?y.result:y instanceof Response?y:u.result,error:y.error??u.error});if(m.error)throw m.error;return m}});if(Ot(g))return{...u,error:g};if(g instanceof Response)return{...u,result:g};if(!g)throw new Error("User middleware returned undefined. You must call next() or return a result in your middlewares.");return g}return o(u)}catch(f){return{...u,error:f}}};return o({...r,headers:r.headers||{},sendContext:r.sendContext||{}
12,context:r.context||U0(),_callSiteFetch:r.fetch})}function wA(t,e=100){const r=new Set,a=[],o=(u,c)=>{if(c>e)throw new Error(`Middleware nesting depth exceeded maximum of ${e}. Check for circular references.`);u.forEach(f=>{f.options.middleware&&o(f.options.middleware,c+1),r.has(f)||(r.add(f),a.push(f))})};return o(t,0),a}async function _A(t,e){if(t==null)return{};if("~standard"in t){const r=await t["~standard"].validate(e);if(r.issues)throw new Error(JSON.stringify(r.issues,void 0,2));return r.value}if("parse"in t)return t.parse(e);if(typeof t=="function")return t(e);throw new Error("Invalid validator type!")}function SA(t){return{"~types":void 0,options:{inputValidator:t.inputValidator,client:async({next:e,sendContext:r,fetch:a,...o})=>{const u={...o,context:r,fetch:a};return e(await t.extractedFn?.(u))},server:async({next:e,...r})=>{const a=await t.serverFn?.(r);return e({...r,result:a})}}}}var Ts=(t,e)=>{const r={type:"request",...e||t};return{options:r,middleware:a=>Ts({},Object.assign(r,{middleware:a})),inputValidator:a=>Ts({},Object.assign(r,{inputValidator:a})),client:a=>Ts({},Object.assign(r,{client:a})),server:a=>Ts({},Object.assign(r,{server:a}))}};function P0(t,e){for(let r=0,a=e.length;r<a;r++){const o=e[r];t.has(o)||(t.add(o),o.extends&&P0(t,o.extends))}}var TA=t=>({getOptions:async()=>{const e=await t();if(e.serializationAdapters){const r=new Set;P0(r,e.serializationAdapters),e.serializationAdapters=Array.from(r)}return e},createMiddleware:Ts});function Cu(t,e){var r={};for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&e.indexOf(a)<0&&(r[a]=t[a]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,a=Object.getOwnPropertySymbols(t);o<a.length;o++)e.indexOf(a[o])<0&&Object.prototype.propertyIsEnumerable.call(t,a[o])&&(r[a[o]]=t[a[o]]);return r}function EA(t,e,r,a){function o(u){return u instanceof r?u:new r(function(c){c(u)})}return new(r||(r=Promise))(function(u,c){function f(y){try{g(a.next(y))}catch(m){c(m)}}function p(y){try{g(a.throw(y))}catch(m){c(m)}}function g(y){y.done?u(y.value):o(y.value).then(f,p)}g((a=a.apply(t,e||[])).next())})}const RA=t=>t?(...e)=>t(...e):(...e)=>fetch(...e);class pd extends Error{constructor(e,r="FunctionsError",a){super(e),this.name=r,this.context=a}toJSON(){return{name:this.name,message:this.message,context:this.context}}}class xA extends pd{constructor(e){super("Failed to send a request to the Edge Function","FunctionsFetchError",e)}}class Rv extends pd{constructor(e){super("Relay Error invoking the Edge Function","FunctionsRelayError",e)}}class xv extends pd{constructor(e){super("Edge Function returned a non-2xx status code","FunctionsHttpError",e)}}var Nf;(function(t){t.Any="any",t.ApNortheast1="ap-northeast-1",t.ApNortheast2="ap-northeast-2",t.ApSouth1="ap-south-1",t.ApSoutheast1="ap-southeast-1",t.ApSoutheast2="ap-southeast-2",t.CaCentral1="ca-central-1",t.EuCentral1="eu-central-1",t.EuWest1="eu-west-1",t.EuWest2="eu-west-2",t.EuWest3="eu-west-3",t.SaEast1="sa-east-1",t.UsEast1="us-east-1",t.UsWest1="us-west-1",t.UsWest2="us-west-2"})(Nf||(Nf={}));class AA{constructor(e,{headers:r={},customFetch:a,region:o=Nf.Any}={}){this.url=e,this.headers=r,this.region=o,this.fetch=RA(a)}setAuth(e){this.headers.Authorization=`Bearer ${e}`}invoke(e){return EA(this,arguments,void 0,function*(r,a={}){var o;let u,c;try{const{headers:f,method:p,body:g,signal:y,timeout:m}=a;let b={},{region:w}=a;w||(w=this.region);const _=new URL(`${this.url}/${r}`);w&&w!=="any"&&(b["x-region"]=w,_.searchParams.set("forceFunctionRegion",w));let x;g&&(f&&!Object.prototype.hasOwnProperty.call(f,"Content-Type")||!f)?typeof Blob<"u"&&g instanceof Blob||g instanceof ArrayBuffer?(b["Content-Type"]="application/octet-stream",x=g):typeof g=="string"?(b["Content-Type"]="text/plain",x=g):typeof FormData<"u"&&g instanceof FormData?x=g:(b["Content-Type"]="application/json",x=JSON.stringify(g)):g&&typeof g!="string"&&!(typeof Blob<"u"&&g instanceof Blob)&&!(g instanceof ArrayBuffer)&&!(typeof FormData<"u"&&g instanceof FormData)?x=JSON.stringify(g):x=g;let E=y;m&&(c=new AbortController,u=setTimeout(()=>c.abort(),m),y?(E=c.signal,y.addEventListener("abort",()=>c.abort())):E=c.signal);const A=yield this.fetch(_.toString(),{method:p||"POST",headers:Object.assign(Object.assign(Object.assign({},b),this.headers),f),body:x,signal:E}).catch(Y=>{throw new xA(Y)}),M=A.headers.get("x-relay-error");
12if(M&&M==="true")throw new Rv(A);if(!A.ok)throw new xv(A);let j=((o=A.headers.get("Content-Type"))!==null&&o!==void 0?o:"text/plain").split(";")[0].trim(),z;return j==="application/json"?z=yield A.json():j==="application/octet-stream"||j==="application/pdf"?z=yield A.blob():j==="text/event-stream"?z=A:j==="multipart/form-data"?z=yield A.formData():z=yield A.text(),{data:z,error:null,response:A}}catch(f){return{data:null,error:f,response:f instanceof xv||f instanceof Rv?f.context:void 0}}finally{u&&clearTimeout(u)}})}}const B0=3,Av=t=>Math.min(1e3*2**t,3e4),kA=[520,503],$0=["GET","HEAD","OPTIONS"];var kv=class extends Error{constructor(t){super(t.message),this.name="PostgrestError",this.details=t.details,this.hint=t.hint,this.code=t.code}toJSON(){return{name:this.name,message:this.message,details:this.details,hint:this.hint,code:this.code}}};function Ov(t,e){return new Promise(r=>{if(e?.aborted){r();return}const a=setTimeout(()=>{e?.removeEventListener("abort",o),r()},t);function o(){clearTimeout(a),r()}e?.addEventListener("abort",o)})}function OA(t,e,r,a){return!(!a||r>=B0||!$0.includes(t)||!kA.includes(e))}var CA=class{constructor(t){var e,r,a,o,u;this.shouldThrowOnError=!1,this.retryEnabled=!0,this.method=t.method,this.url=t.url,this.headers=new Headers(t.headers),this.schema=t.schema,this.body=t.body,this.shouldThrowOnError=(e=t.shouldThrowOnError)!==null&&e!==void 0?e:!1,this.signal=t.signal,this.isMaybeSingle=(r=t.isMaybeSingle)!==null&&r!==void 0?r:!1,this.shouldStripNulls=(a=t.shouldStripNulls)!==null&&a!==void 0?a:!1,this.urlLengthLimit=(o=t.urlLengthLimit)!==null&&o!==void 0?o:8e3,this.retryEnabled=(u
12=t.retry)!==null&&u!==void 0?u:!0,t.fetch?this.fetch=t.fetch:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}stripNulls(){if(this.headers.get("Accept")==="text/csv")throw new Error("stripNulls() cannot be used with csv()");return this.shouldStripNulls=!0,this}setHeader(t,e){return this.headers=new Headers(this.headers),this.headers.set(t,e),this}retry(t){return this.retryEnabled=t,this}then(t,e){var r=this;if(this.schema===void 0||(["GET","HEAD"].includes(this.method)?this.headers.set("Accept-Profile",this.schema):this.headers.set("Content-Profile",this.schema)),this.method!=="GET"&&this.method!=="HEAD"&&this.headers.set("Content-Type","application/json"),this.shouldStripNulls){const 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={};r.headers.forEach((m,b)=>{g[b]=m}),c>0&&(g["X-Retry-Count"]=String(c));let y;try{y=await a(r.url.toString(),{method:r.method,headers:g,body:JSON.stringify(r.body,(m,b)=>typeof b=="bigint"?b.toString():b),signal:r.signal})}
12catch(m){if(m?.name==="AbortError"||m?.code==="ABORT_ERR"||!$0.includes(r.method))throw m;if(r.retryEnabled&&c<B0){const b=Av(c);c++,await Ov(b,r.signal);continue}throw m}if(OA(r.method,y.status,c,r.retryEnabled)){var f,p;const m=(f=(p=y.headers)===null||p===void 0?void 0:p.get("Retry-After"))!==null&&f!==void 0?f:null,b=m!==null?Math.max(0,parseInt(m,10)||0)*1e3:Av(c);await y.text(),c++,await Ov(b,r.signal);continue}return await r.processResponse(y)}})();return this.shouldThrowOnError||(u=u.catch(c=>{var f;let p="",g="",y="";const m=c?.cause;if(m){var b,w,_,x;const M=(b=m?.message)!==null&&b!==void 0?b:"",j=(w=m?.code)!==null&&w!==void 0?w:"";p=`${(_=c?.name)!==null&&_!==void 0?_:"FetchError"}: ${c?.message}`,p+=` 13 14Caused by: ${(x=m?.name)!==null&&x!==void 0?x:"Error"}: ${M}`,j&&(p+=` (${j})`),m?.stack&&(p+=` 15${m.stack}`)}else{var E;p=(E=c?.stack)!==null&&E!==void 0?E:""}const A=this.url.toString().length;return c?.name==="AbortError"||c?.code==="ABORT_ERR"?(y="",g="Request was aborted (timeout or manual cancellation)",A>this.urlLengthLimit&&(g+=`. Note: Your request URL is ${A} 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.`)):(m?.name==="HeadersOverflowError"||m?.code==="UND_ERR_HEADERS_OVERFLOW")&&(y="",g="HTTP headers exceeded server limits (typically 16KB)",A>this.urlLengthLimit&&(g+=`. Your request URL is ${A} characters. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [200+ IDs])), consider using an RPC function instead.`)),{success:!1,error:{message:`${(f=c?.name)!==null&&f!==void 0?f:"FetchError"}: ${c?.message}`,details:p,hint:g,code:y},data:null,count:null,status:0,statusText:""}})),u.then(t,e)}async processResponse(t){var e=this;let r=null,a=null,o=null,u=t.status,c=t.statusText;if(t.ok){var f,p;if(e.method!=="HEAD"){var g;const b=await t.text();if(b!=="")if(e.headers.get("Accept")==="text/csv")a=b;else if(e.headers.get("Accept")&&(!((g=e.headers.get("Accept"))===null||g===void 0)&&g.includes("application/vnd.pgrst.plan+text")))a=b;else try{a=JSON.parse(b)}catch{if(r={message:b},a=null,e.shouldThrowOnError)throw new kv({message:b,details:"",hint:"",code:""})}}const y=(f=e.headers.get("Prefer"))===null||f===void 0?void 0:f.match(/count=(exact|planned|estimated)/),m=(p=t.headers.get("content-range"))===null||p===void 0?void 0:p.split("/");y&&m&&m.length>1&&(o=parseInt(m[1])),e.isMaybeSingle&&Array.isArray(a)&&(a.length>1?(r={code:"PGRST116",details:`Results contain ${a.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},a=null,o=null,u=406,c="Not Acceptable"):a.length===1?a=a[0]:a=null)}else{const y=await t.text();try{r=JSON.parse(y),Array.isArray(r)&&t.status===404&&(a=[],r=null,u=200,c="OK")}catch{t.status===404&&y===""?(u=204,c="No Content"):r={message:y}}if(r&&e.shouldThrowOnError)throw new kv(r)}return{success:r===null,error:r,data:a,count:o,status:u,statusText:c}}returns(){return this}overrideTypes(){return this}},jA=class extends CA{throwOnError(){return super.throwOnError()}select(t){let e=!1;const r=(t??"*").split("").map(a=>/\s/.test(a)&&!e?"":(a==='"'&&(e=!e),a)).join("");return this.url.searchParams.set("select",r),this.headers.append("Prefer","return=representation"),this}order(t,{ascending:e=!0,nullsFirst:r,foreignTable:a,referencedTable:o=a}={}){const u=o?`${o}.order`:"order",c=this.url.searchParams.get(u);return this.url.searchParams.set(u,`${c?`${c},`:""}${t}.${e?"asc":"desc"}${r===void 0?"":r?".nullsfirst":".nullslast"}`),this}limit(t,{foreignTable:e,referencedTable:r=e}={}){const a=typeof r>"u"?"limit":`${r}.limit`;return this.url.searchParams.set(a,`${t}`),this}range(t,e,{foreignTable:r,referencedTable:a=r}={}){const o=typeof a>"u"?"offset":`${a}.offset`,u=typeof a>"u"?"limit":`${a}.limit`;return this.url.searchParams.set(o,`${t}`),this.url.searchParams.set(u,`${e-t+1}`),this}abortSignal(t){return this.signal=t,this}single(){return this.headers.set("Accept","application/vnd.pgrst.object+json"),this}maybeSingle(){return this.isMaybeSingle=!0,this}csv(){return this.headers.set("Accept","text/csv"),this}geojson(){return this.headers.set("Accept","application/geo+json"),this}
15explain({analyze:t=!1,verbose:e=!1,settings:r=!1,buffers:a=!1,wal:o=!1,format:u="text"}={}){var c;const f=[t?"analyze":null,e?"verbose":null,r?"settings":null,a?"buffers":null,o?"wal":null].filter(Boolean).join("|"),p=(c=this.headers.get("Accept"))!==null&&c!==void 0?c:"application/json";return this.headers.set("Accept",`application/vnd.pgrst.plan+${u}; for="${p}"; options=${f};`),u==="json"?this:this}rollback(){return this.headers.append("Prefer","tx=rollback"),this}returns(){return this}maxAffected(t){return this.headers.append("Prefer","handling=strict"),this.headers.append("Prefer",`max-affected=${t}`),this}};const Cv=new RegExp("[,()]");var Ra=class extends jA{throwOnError(){return super.throwOnError()}eq(t,e){return this.url.searchParams.append(t,`eq.${e}`),this}neq(t,e){return this.url.searchParams.append(t,`neq.${e}`),this}gt(t,e){return this.url.searchParams.append(t,`gt.${e}`),this}gte(t,e){return this.url.searchParams.append(t,`gte.${e}`),this}lt(t,e){return this.url.searchParams.append(t,`lt.${e}`),this}lte(t,e){return this.url.searchParams.append(t,`lte.${e}`),this}like(t,e){return this.url.searchParams.append(t,`like.${e}`),this}likeAllOf(t,e){return this.url.searchParams.append(t,`like(all).{${e.join(",")}}`),this}likeAnyOf(t,e){return this.url.searchParams.append(t,`like(any).{${e.join(",")}}`),this}ilike(t,e){return this.url.searchParams.append(t,`ilike.${e}`),this}ilikeAllOf(t,e){return this.url.searchParams.append(t,`ilike(all).{${e.join(",")}}`),this}ilikeAnyOf(t,e){return this.url.searchParams.append(t,`ilike(any).{${e.join(",")}}`),this}regexMatch(t,e){return this.url.searchParams.append(t,`match.${e}`),this}regexIMatch(t,e){return this.url.searchParams.append(t,`imatch.${e}`),this}is(t,e){return this.url.searchParams.append(t,`is.${e}`),this}isDistinct(t,e){return this.url.searchParams.append(t,`isdistinct.${e}`),this}in(t,e){const r=Array.from(new Set(e)).map(a=>typeof a=="string"&&Cv.test(a)?`"${a}"`:`${a}`).join(",");return this.url.searchParams.append(t,`in.(${r})`),this}notIn(t,e){const r=Array.from(new Set(e)).map(a=>typeof a=="string"&&Cv.test(a)?`"${a}"`:`${a}`).join(",");return this.url.searchParams.append(t,`not.in.(${r})`),this}contains(t,e){return typeof e=="string"?this.url.searchParams.append(t,`cs.${e}`):Array.isArray(e)?this.url.searchParams.append(t,`cs.{${e.join(",")}}`):this.url.searchParams.append(t,`cs.${JSON.stringify(e)}`),this}containedBy(t,e){return typeof e=="string"?this.url.searchParams.append(t,`cd.${e}`):Array.isArray(e)?this.url.searchParams.append(t,`cd.{${e.join(",")}}`):this.url.searchParams.append(t,`cd.${JSON.stringify(e)}`),this}rangeGt(t,e){return this.url.searchParams.append(t,`sr.${e}`),this}rangeGte(t,e){return this.url.searchParams.append(t,`nxl.${e}`),this}rangeLt(t,e){return this.url.searchParams.append(t,`sl.${e}`),this}rangeLte(t,e){return this.url.searchParams.append(t,`nxr.${e}`),this}rangeAdjacent(t,e){return this.url.searchParams.append(t,`adj.${e}`),this}overlaps(t,e){return typeof e=="string"?this.url.searchParams.append(t,`ov.${e}`):this.url.searchParams.append(t,`ov.{${e.join(",")}}`),this}textSearch(t,e,{config:r,type:a}={}){let o="";a==="plain"?o="pl":a==="phrase"?o="ph":a==="websearch"&&(o="w");const u=r===void 0?"":`(${r})`;return this.url.searchParams.append(t,`${o}fts${u}.${e}`),this}match(t){return Object.entries(t).filter(([e,r])=>r!==void 0).forEach(([e,r])=>{this.url.searchParams.append(e,`eq.${r}`)}),this}not(t,e,r){return this.url.searchParams.append(t,`not.${e}.${r}`),this}or(t,{foreignTable:e,referencedTable:r=e}={}){const a=r?`${r}.or`:"or";return this.url.searchParams.append(a,`(${t})`),this}filter(t,e,r){return this.url.searchParams.append(t,`${e}.${r}`),this}},MA=class{constructor(t,{headers:e={},schema:r,fetch:a,urlLengthLimit:o=8e3,retry:u}){this.url=t,this.headers=new Headers(e),this.schema=r,this.fetch=a,this.urlLengthLimit=o,this.retry=u}cloneRequestState(){return{url:new URL(this.url.toString()),headers:new Headers(this.headers)}}select(t,e){const{head:r=!1,count:a}=e??{},o=r?"HEAD":"GET";let u=!1;const c=(t??"*").split("").map(g=>/\s/.test(g)&&!u?"":(g==='"'&&(u=!u),g)).join(""),{url:f,headers:p}=this.cloneRequestState();return f.searchParams.set("select",c),a&&p.append("Prefer",`count=${a}`),new Ra({method:o,url:f,headers:p,schema:this.schema,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}insert(t,{count:e,defaultToNull:r=!0}={}){var a;const o="POST",{url:u,headers:c}=this.cloneRequestState();if(e&&c.append("Prefer",`count=${e}`),r||c.append("Prefer","missing=default"),Array.isArray(t)){const f=t.reduce((p,g)=>p.concat(Object.keys(g)),[]);if(f.length>0){const p=[...new Set(f)].map(g=>`"${g}"`);u.searchParams.set("columns",p.join(","))}}return new Ra({method:o,url:u,headers:c,schema:this.schema,body:t,fetch:(a=this.fetch)!==null&&a!==void 0?a:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}upsert(t,{onConflict:e,ignoreDuplicates:r=!1,count:a,defaultToNull:o=!0}={}){var u;const c="POST",{url:f,headers:p}=this.cloneRequestState();if(p.append("Prefer",`resolution=${r?"ignore":"merge"}-duplicates`),e!==void 0&&f.searchParams.set("on_conflict",e),a&&p.append("Prefer",`count=${a}`),o||p.append("Prefer","missing=default"),Array.isArray(t)){const g=t.reduce((y,m)=>y.concat(Object.keys(m)),[]);if(g.length>0){const y=[...new Set(g)].map(m=>`"${m}"`);f.searchParams.set("columns",y.join(","))}}return new Ra({method:c,url:f,headers:p,schema:this.schema,body:t,fetch:(u=this.fetch)!==null&&u!==void 0?u:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}update(t,{count:e}={}){var r;const a="PATCH",{url:o,headers:u}=this.cloneRequestState();
15return e&&u.append("Prefer",`count=${e}`),new Ra({method:a,url:o,headers:u,schema:this.schema,body:t,fetch:(r=this.fetch)!==null&&r!==void 0?r:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}delete({count:t}={}){var e;const r="DELETE",{url:a,headers:o}=this.cloneRequestState();return t&&o.append("Prefer",`count=${t}`),new Ra({method:r,url:a,headers:o,schema:this.schema,fetch:(e=this.fetch)!==null&&e!==void 0?e:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};function no(t){"@babel/helpers - typeof";return no=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},no(t)}function NA(t,e){if(no(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var a=r.call(t,e);if(no(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function LA(t){var e=NA(t,"string");return no(e)=="symbol"?e:e+""}function DA(t,e,r){return(e=LA(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function jv(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),r.push.apply(r,a)}return r}function $l(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?jv(Object(r),!0).forEach(function(a){DA(t,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):jv(Object(r)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(r,a))})}return t}var UA=class I0{constructor(e,{headers:r={},schema:a,fetch:o,timeout:u,urlLengthLimit:c=8e3,retry:f}={}){this.url=e,this.headers=new Headers(r),this.schemaName=a,this.urlLengthLimit=c;const p=o??globalThis.fetch;u!==void 0&&u>0?this.fetch=(g,y)=>{const m=new AbortController,b=setTimeout(()=>m.abort(),u),w=y?.signal;if(w){if(w.aborted)return clearTimeout(b),p(g,y);const _=()=>{clearTimeout(b),m.abort()};return w.addEventListener("abort",_,{once:!0}),p(g,$l($l({},y),{},{signal:m.signal})).finally(()=>{clearTimeout(b),w.removeEventListener("abort",_)})}return p(g,$l($l({},y),{},{signal:m.signal})).finally(()=>clearTimeout(b))}:this.fetch=p,this.retry=f}from(e){if(!e||typeof e!="string"||e.trim()==="")throw new Error("Invalid relation name: relation must be a non-empty string.");return new MA(new URL(`${this.url}/${e}`),{headers:new Headers(this.headers),schema:this.schemaName,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}schema(e){return new I0(this.url,{headers:this.headers,schema:e,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}rpc(e,r={},{head:a=!1,get:o=!1,count:u}={}){var c;let f;const p=new URL(`${this.url}/rpc/${e}`);let g;const y=w=>w!==null&&typeof w=="object"&&(!Array.isArray(w)||w.some(y)),m=a&&Object.values(r).some(y);m?(f="POST",g=r):a||o?(f=a?"HEAD":"GET",Object.entries(r).filter(([w,_])=>_!==void 0).map(([w,_])=>[w,Array.isArray(_)?`{${_.join(",")}}`:`${_}`]).forEach(([w,_])=>{p.searchParams.append(w,_)})):(f="POST",g=r);const b=new Headers(this.headers);return m?b.set("Prefer",u?`count=${u},return=minimal`:"return=minimal"):u&&b.set("Prefer",`count=${u}`),new Ra({method:f,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 zA{constructor(){}static detectEnvironment(){var e;if(typeof WebSocket<"u")return{type:"native",wsConstructor:WebSocket};const r=globalThis;if(typeof globalThis<"u"&&typeof r.WebSocket<"u")return{type:"native",wsConstructor:r.WebSocket};const a=typeof global<"u"?global:void 0;if(a&&typeof a.WebSocket<"u")return{type:"native",wsConstructor:a.WebSocket};if(typeof globalThis<"u"&&typeof r.WebSocketPair<"u"&&typeof globalThis.WebSocket>"u")return{type:"cloudflare",error:"Cloudflare Workers detected. WebSocket clients are not supported in Cloudflare Workers.",workaround:"Use Cloudflare Workers WebSocket API for server-side WebSocket handling, or deploy to a different runtime."};if(typeof globalThis<"u"&&r.EdgeRuntime||typeof navigator<"u"&&(!((e=navigator.userAgent)===null||e===void 0)&&e.includes("Vercel-Edge")))return{type:"unsupported",error:"Edge runtime detected (Vercel Edge/Netlify Edge). WebSockets are not supported in edge functions.",workaround:"Use serverless functions or a different deployment target for WebSocket functionality."};const o=globalThis.process;if(o){const u=o.versions;if(u&&u.node){const c=u.node,f=parseInt(c.replace(/^v/,"").split(".")[0]);return f>=22?typeof globalThis.WebSocket<"u"?{type:"native",wsConstructor:globalThis.WebSocket}:{type:"unsupported",error:`Node.js ${f} detected but native WebSocket not found.`,workaround:"Provide a WebSocket implementation via the transport option."}:{type:"unsupported",error:`Node.js ${f} detected without native WebSocket support.`,workaround:`For Node.js < 22, install "ws" package and provide it via the transport option: 16import ws from "ws" 17new RealtimeClient(url, { transport: ws })`}}}return{type:"unsupported",error:"Unknown JavaScript runtime without WebSocket support.",workaround:"Ensure you're running in a supported environment (browser, Node.js, Deno) or provide a custom WebSocket implementation."}}static getWebSocketConstructor(){const e=this.detectEnvironment();if(e.wsConstructor)return e.wsConstructor;let r=e.error||"WebSocket not supported in this environment.";throw e.workaround&&(r+=` 18 19Suggested solution: ${e.workaround}`),new Error(r)}static isWebSocketSupported(){try{const e=this.detectEnvironment();return e.type==="native"||e.type==="ws"}catch{return!1}}}const PA="2.108.2",BA=`realtime-js/${PA}`,$A="1.0.0",q0="2.0.0",IA=q0,qA=1e4,HA=100,Pr={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},H0={close:"phx_close",error:"phx_error",join:"phx_join",leave:"phx_leave",access_token:"access_token"},Lf={connecting:"connecting",closing:"closing",closed:"closed"};class GA{constructor(e){this.HEADER_LENGTH=1,this.USER_BROADCAST_PUSH_META_LENGTH=6,this.KINDS={userBroadcastPush:3,userBroadcast:4},this.BINARY_ENCODING=0,this.JSON_ENCODING=1,this.BROADCAST_EVENT="broadcast",this.allowedMetadataKeys=[],this.allowedMetadataKeys=e??[]}encode(e,r){if(e.event===this.BROADCAST_EVENT&&!(e.payload instanceof ArrayBuffer)&&typeof e.payload.event=="string")return r(this._binaryEncodeUserBroadcastPush(e));let a=[e.join_ref,e.ref,e.topic,e.event,e.payload];return r(JSON.stringify(a))}_binaryEncodeUserBroadcastPush(e){var r;return this._isArrayBuffer((r=e.payload)===null||r===void 0?void 0:r.payload)?this._encodeBinaryUserBroadcastPush(e):this._encodeJsonUserBroadcastPush(e)}_encodeBinaryUserBroadcastPush(e){var r,a;const o=(a=(r=e.payload)===null||r===void 0?void 0:r.payload)!==null&&a!==void 0?a:new ArrayBuffer(0);return this._encodeUserBroadcastPush(e,this.BINARY_ENCODING,o)}_encodeJsonUserBroadcastPush(e){var r,a;const o=(a=(r=e.payload)===null||r===void 0?void 0:r.payload)!==null&&a!==void 0?a:{},c=new TextEncoder().encode(JSON.stringify(o)).buffer;return this._encodeUserBroadcastPush(e,this.JSON_ENCODING,c)}_encodeUserBroadcastPush(e,r,a){var o,u;const c=e.topic,f=(o=e.ref)!==null&&o!==void 0?o:"",p=(u=e.join_ref)!==null&&u!==void 0?u:"",g=e.payload.event,y=this.allowedMetadataKeys?this._pick(e.payload,this.allowedMetadataKeys):{},m=Object.keys(y).length===0?"":JSON.stringify(y);if(p.length>255)throw new Error(`joinRef length ${p.length} exceeds maximum of 255`);if(f.length>255)throw new Error(`ref length ${f.length} exceeds maximum of 255`);if(c.length>255)throw new Error(`topic length ${c.length} exceeds maximum of 255`);if(g.length>255)throw new Error(`userEvent length ${g.length} exceeds maximum of 255`);if(m.length>255)throw new Error(`metadata length ${m.length} exceeds maximum of 255`);const b=this.USER_BROADCAST_PUSH_META_LENGTH+p.length+f.length+c.length+g.length+m.length,w=new ArrayBuffer(this.HEADER_LENGTH+b);let _=new DataView(w),x=0;_.setUint8(x++,this.KINDS.userBroadcastPush),_.setUint8(x++,p.length),_.setUint8(x++,f.length),_.setUint8(x++,c.length),_.setUint8(x++,g.length),_.setUint8(x++,m.length),_.setUint8(x++,r),Array.from(p,A=>_.setUint8(x++,A.charCodeAt(0))),Array.from(f,A=>_.setUint8(x++,A.charCodeAt(0))),Array.from(c,A=>_.setUint8(x++,A.charCodeAt(0))),Array.from(g,A=>_.setUint8(x++,A.charCodeAt(0))),Array.from(m,A=>_.setUint8(x++,A.charCodeAt(0)));var E=new Uint8Array(w.byteLength+a.byteLength);return E.set(new Uint8Array(w),0),E.set(new Uint8Array(a),w.byteLength),E.buffer}decode(e,r){if(this._isArrayBuffer(e)){let a=this._binaryDecode(e);return r(a)}if(typeof e=="string"){const a=JSON.parse(e),[o,u,c,f,p]=a;return r({join_ref:o,ref:u,topic:c,event:f,payload:p})}return r({})}_binaryDecode(e){const r=new DataView(e),a=r.getUint8(0),o=new TextDecoder;if(a===this.KINDS.userBroadcast)return this._decodeUserBroadcast(e,r,o)}_decodeUserBroadcast(e,r,a){const o=r.getUint8(1),u=r.getUint8(2),c=r.getUint8(3),f=r.getUint8(4);let p=this.HEADER_LENGTH+4;const g=a.decode(e.slice(p,p+o));p=p+o;const y=a.decode(e.slice(p,p+u));p=p+u;const m=a.decode(e.slice(p,p+c));p=p+c;const b=e.slice(p,e.byteLength),w=f===this.JSON_ENCODING?JSON.parse(a.decode(b)):b,_={type:this.BROADCAST_EVENT,event:y,payload:w};return c>0&&(_.meta=JSON.parse(m)),{join_ref:null,ref:null,topic:g,event:this.BROADCAST_EVENT,payload:_}}_isArrayBuffer(e){var r;return e instanceof ArrayBuffer||((r=e?.constructor)===null||r===void 0?void 0:r.name)==="ArrayBuffer"}_pick(e,r){return!e||typeof e!="object"?{}:Object.fromEntries(Object.entries(e).filter(([a])=>r.includes(a)))}}var $e;(function(t){t.abstime="abstime",t.bool="bool",t.date="date",t.daterange="daterange",t.float4="float4",t.float8="float8",t.int2="int2",t.int4="int4",t.int4range="int4range",t.int8="int8",t.int8range="int8range",t.json="json",t.jsonb="jsonb",t.money="money",t.numeric="numeric",t.oid="oid",t.reltime="reltime",t.text="text",t.time="time",t.timestamp="timestamp",t.timestamptz="timestamptz",t.timetz="timetz",t.t
19srange="tsrange",t.tstzrange="tstzrange"})($e||($e={}));const Mv=(t,e,r={})=>{var a;const o=(a=r.skipTypes)!==null&&a!==void 0?a:[];return e?Object.keys(e).reduce((u,c)=>(u[c]=VA(c,t,e,o),u),{}):{}},VA=(t,e,r,a)=>{const o=e.find(f=>f.name===t),u=o?.type,c=r[t];return u&&!a.includes(u)?G0(u,c):Df(c)},G0=(t,e)=>{if(t.charAt(0)==="_"){const r=t.slice(1,t.length);return QA(e,r)}switch(t){case $e.bool:return KA(e);case $e.float4:case $e.float8:case $e.int2:case $e.int4:case $e.int8:case $e.numeric:case $e.oid:return FA(e);case $e.json:case $e.jsonb:return YA(e);case $e.timestamp:return JA(e);case $e.abstime:case $e.date:case $e.daterange:case $e.int4range:case $e.int8range:case $e.money:case $e.reltime:case $e.text:case $e.time:case $e.timestamptz:case $e.timetz:case $e.tsrange:case $e.tstzrange:return Df(e);default:return Df(e)}},Df=t=>t,KA=t=>{switch(t){case"t":return!0;case"f":return!1;default:return t}},FA=t=>{if(typeof t=="string"){const e=parseFloat(t);if(!Number.isNaN(e))return e}return t},YA=t=>{if(typeof t=="string")try{return JSON.parse(t)}catch{return t}return t},QA=(t,e)=>{if(typeof t!="string")return t;const r=t.length-1,a=t[r];if(t[0]==="{"&&a==="}"){let u;const c=t.slice(1,r);try{u=JSON.parse("["+c+"]")}catch{u=c?c.split(","):[]}return u.map(f=>G0(e,f))}return t},JA=t=>typeof t=="string"?t.replace(" ","T"):t,V0=t=>{const e=new URL(t);return e.protocol=e.protocol.replace(/^ws/i,"http"),e.pathname=e.pathname.replace(/\/+$/,"").replace(/\/socket\/websocket$/i,"").replace(/\/socket$/i,"").replace(/\/websocket$/i,""),e.pathname===""||e.pathname==="/"?e.pathname="/api/broadcast":e.pathname=e.pathname+"/api/broadcast",e.href};var Fi=t=>typeof t=="function"?t:function(){return t},XA=typeof self<"u"?self:null,xa=typeof window<"u"?window:null,Cn=XA||xa||globalThis,ZA="2.0.0",WA=1e4,ek=1e3,Mn={connecting:0,open:1,closing:2,closed:3},zt={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},rr={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave"},Uf={longpoll:"longpoll",websocket:"websocket"},tk={complete:4},zf="base64url.bearer.phx.",Il=class{constructor(t,e,r,a){this.channel=t,this.event=e,this.payload=r||function(){return{}},this.receivedResp=null,this.timeout=a,this.timeoutTimer=null,this.recHooks=[],this.sent=!1,this.ref=void 0}resend(t){this.timeout=t,this.reset(),this.send()}send(){this.hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload(),ref:this.ref,join_ref:this.channel.joinRef()}))}receive(t,e){return this.hasReceived(t)&&e(this.receivedResp.response),this.recHooks.push({status:t,callback:e}),this}reset(){this.cancelRefEvent(),this.ref=null,this.refEvent=null,this.receivedResp=null,this.sent=!1}destroy(){this.cancelRefEvent(),this.cancelTimeout()}matchReceive({status:t,response:e,_ref:r}){this.recHooks.filter(a=>a.status===t).forEach(a=>a.callback(e))}cancelRefEvent(){this.refEvent&&this.channel.off(this.refEvent)}cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=null}startTimeout(){this.timeoutTimer&&this.cancelTimeout(),this.ref=this.channel.socket.makeRef(),this.refEvent=this.channel.replyEventName(this.ref),this.channel.on(this.refEvent,t=>{this.cancelRefEvent(),this.cancelTimeout(),this.receivedResp=t,this.matchReceive(t)}),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}hasReceived(t){return this.receivedResp&&this.receivedResp.status===t}trigger(t,e){this.channel.trigger(this.refEvent,{status:t,response:e})}},K0=class{constructor(t,e){this.callback=t,this.timerCalc=e,this.timer=void 0,this.tries=0}reset(){this.tries=0,clearTimeout(this.timer)}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout(()=>{this.tries=this.tries+1,this.callback()},this.timerCalc(this.tries+1))}},nk=class{constructor(t,e,r){this.state=zt.closed,this.topic=t,this.params=Fi(e||{}),this.socket=r,this.bindings=[],this.bindingRef=0,this.timeout=this.socket.timeout,this.joinedOnce=!1,this.joinPush=new Il(this,rr.join,this.params,this.timeout),this.pushBuffer=[],this.stateChangeRefs=[],this.rejoinTimer=new K0(()=>{this.socket.isConnected()&&this.rejoin()},this.socket.rejoinAfterMs),this.stateChangeRefs.push(this.socket.onError(()=>this.rejoinTimer.reset())),this.stateChangeRefs.push(this.socket.onOpen(()=>{this.rejoinTimer.reset(),this.isErrored()&&this.rejoin()})),this.joinPush.receive("ok",()=>{this.state=zt.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(a=>a.send()),this.pushBuffer=[]}),this.joinPush.receive("error",a=>{this.state=zt.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=zt.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=zt.errored,this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.joinPush.receive("timeout",()=>{this.socket.hasLogger()&&this.socket.log("channel",`timeout ${this.topic}`,this.joinPush.timeout),new Il(this,rr.leave,Fi({}),this.timeout).send(),this.state=zt.errored,this.joinPush.reset(),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.on(rr.reply,(a,o)=>{this.trigger(this.replyEventName(o),a)})}join(t=this.timeout){if(this.joinedOnce)throw new Error("tried to join multiple times. 'join' can only be called a single time per channel instance");return this.timeout=t,this.joinedOnce=!0,this.rejoin(),this.joinPush}teardown(){this.pushBuffer.forEach(t=>t.destroy()),this.pushBuffer=[],this.rejoinTimer.reset(),this.joinPush.destroy(),this.state=zt.closed,this.bindings=[]}onClose(t){this.on(rr.close,t)}onError(t){return this.on(rr.error,e=>t(e))}on(t,e){let r=this.bindingRef++;return this.bindings.push({event:t,ref:r,callback:e}),r}off(t,e){this.bindings=this.bindings.filter(r=>!(r.event===t&&(typeof e>"u"||e===r.ref)))}canPush(){return this.socket.isConnected()&&this.isJoined()}push(t,e,r=this.timeout){if(e=e||{},!this.joinedOnce)throw new Error(`tried to push '${t}' to '${this.topic}' before joining. Use channel.join() before pushing events`);let a=new Il(this,t,function(){return e},r);return this.canPush()?a.send():(a.startTimeout(),this.pushBuffer.push(a)),a}leave(t=this.timeout){this.rejoinTimer.reset(),this.joinPush.cancelTimeout(),this.state=zt.leaving;let e=()=>{this.socket.hasLogger()&&this.socket.log("channel",`leave ${this.topic}`),this.trigger(rr.close,"leave")},r=new Il(this,rr.leave,Fi({}),t);return r.receive("ok",()=>e()).receive("timeout",()=>e()),r.send(),this.canPush()||r.trigger("ok",{}),r}onMessage(t,e,r){return e}filterBindings(t,e,r){return!0}isMember(t,e,r,a){return this.topic!==t?!1:a&&a!==this.joinRef()?(this.socket.hasLogger()&&this.socket.log("channel","dropping outdated message",{topic:t,event:e,payload:r,joinRef:a}),!1):!0}joinRef(){return this.joinPush.ref}rejoin(t=this.timeout){this.isLeaving()||(this.socket.leaveOpenTopic(this.topic),this.state=zt.joining,this.joinPush.resend(t))}trigger(t,e,r,a){let o=this.onMessage(t,e,r,a);if(e&&!o)throw new Error("channel onMessage callbacks must return the payload, modified or unmodified");let u=this.bindings.filter(c=>c.event===t&&this.filterBindings(c,e,r));for(let c=0;c<u.length;c++)u[c].callback(o,r,a||this.joinRef())}replyEventName(t){return`chan_reply_${t}`}isClosed(){return this.state===zt.closed}isErrored(){return this.state===zt.errored}isJoined(){return this.state===zt.joined}isJoining(){return this.state===zt.joining}isLeaving(){return this.state===zt.leaving}},cu=class{static request(t,e,r,a,o,u,c){if(Cn.XDomainRequest){let f=new Cn.XDomainRequest;return this.xdomainRequest(f,t,e,a,o,u,c)}else if(Cn.XMLHttpRequest){let f=new Cn.XMLHttpRequest;return this.xhrRequest(f,t,e,r,a,o,u,c)}else{if(Cn.fetch&&Cn.AbortController)return this.fetchRequest(t,e,r,a,o,u,c);throw new Error("No suitable XMLHttpRequest implementation found")}}static fetchRequest(t,e,r,a,o,u,c){let f={method:t,headers:r,body:a},p=null;return o&&(p=new AbortController,setTimeout(()=>p.abort(),o),f.signal=p.signal),Cn.fetch(e,f).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(t,e,r,a,o,u,c){return t.timeout=o,t.open(e,r),t.onload=()=>{let f=this.parseJSON(t.responseText);c&&c(f)},u&&(t.ontimeout=u),t.onprogress=()=>{},t.send(a),t}static xhrRequest(t,e,r,a,o,u,c,f){t.open(e,r,!0),t.timeout=u;for(let[p,g]of Object.entries(a))t.setRequestHeader(p,g);return t.onerror=()=>f&&f(null),t.onreadystatechange=()=>{if(t.readyState===tk.complete&&f){let p=this.parseJSON(t.responseText);f(p)}},c&&(t.ontimeout=c),t.send(o),t}static parseJSON(t){if(!t||t==="")return null;try{return JSON.parse(t)}catch{return console&&console.log("failed to parse JSON response",t),null}}static serialize(t,e){let r=[];for(var a in t){if(!Object.prototype.hasOwnProperty.call(t,a))continue;let o=e?`${e}[${a}]`:a,u=t[a];typeof u=="object"?r.push(this.serialize(u,o)):r.push(encodeURIComponent(o)+"="+encodeURIComponent(u))}return r.join("&")}static appendParams(t,e){if(Object.keys(e).length===0)return t;let r=t.match(/\?/)?"&":"?";return`${t}${r}${this.serialize(e)}`}},rk=t=>{let e="",r=new Uint8Array(t),a=r.byteLength;for(let o=0;o<a;o++)e+=String.fromCharCode(r[o]);return btoa(e)},ba=class{constructor(t,e){e&&e.length===2&&e[1].startsWith(zf)&&(this.authToken=atob(e[1].slice(zf.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(){}
vendor: 1,073 bytes, line 19
19,this.onclose=function(){},this.pollEndpoint=this.normalizeEndpoint(t),this.readyState=Mn.connecting,setTimeout(()=>this.poll(),0)}normalizeEndpoint(t){return t.replace("ws://","http://").replace("wss://","https://").replace(new RegExp("(.*)/"+Uf.websocket),"$1/"+Uf.longpoll)}endpointURL(){return cu.appendParams(this.pollEndpoint,{token:this.token})}closeAndRetry(t,e,r){this.close(t,e,r),this.readyState=Mn.connecting}ontimeout(){this.onerror("timeout"),this.closeAndRetry(1005,"timeout",!1)}isActive(){return this.readyState===Mn.open||this.readyState===Mn.connecting}poll(){const t={Accept:"application/json"};this.authToken&&(t["X-Phoenix-AuthToken"]=this.authToken),this.ajax("GET",t,null,()=>this.ontimeout(),e=>{if(e){var{status:r,token:a,messages:o}=e;if(r===410&&this.token!==null){this.onerror(410),this.closeAndRetry(3410,"session_gone",!1);return}this.token=a}else r=0;switch(r){case 200:o.forEach(u=>{setTimeout(()=>this.onmessage({data:u}),0)}),this.poll();break;case 204:this.poll();break;case 410:this.readyState=Mn.open,this.onopen({}),this.poll();break;
19case 403:this.onerror(403),this.close(1008,"forbidden",!1);break;case 0:case 500:this.onerror(500),this.closeAndRetry(1011,"internal server error",500);break;default:throw new Error(`unhandled poll status ${r}`)}})}send(t){typeof t!="string"&&(t=rk(t)),this.currentBatch?this.currentBatch.push(t):this.awaitingBatchAck?this.batchBuffer.push(t):(this.currentBatch=[t],this.currentBatchTimer=setTimeout(()=>{this.batchSend(this.currentBatch),this.currentBatch=null},0))}batchSend(t){this.awaitingBatchAck=!0,this.ajax("POST",{"Content-Type":"application/x-ndjson"},t.join(` 20`),()=>this.onerror("timeout"),e=>{this.awaitingBatchAck=!1,!e||e.status!==200?(this.onerror(e&&e.status),this.closeAndRetry(1011,"internal server error",!1)):this.batchBuffer.length>0&&(this.batchSend(this.batchBuffer),this.batchBuffer=[])})}close(t,e,r){for(let o of this.reqs)o.abort();this.readyState=Mn.closed;let a=Object.assign({code:1e3,reason:void 0,wasClean:!0},{code:t,reason:e,wasClean:r});this.batchBuffer=[],clearTimeout(this.currentBatchTimer),this.currentBatchTimer=null,typeof CloseEvent<"u"?this.onclose(new CloseEvent("close",a)):this.onclose(a)}ajax(t,e,r,a,o){let u,c=()=>{this.reqs.delete(u),a()};u=cu.request(t,this.endpointURL(),e,r,this.timeout,c,f=>{this.reqs.delete(u),this.isActive()&&o(f)}),this.reqs.add(u)}},sk=class Hi{constructor(e,r={}){let a=r.events||{state:"presence_state",diff:"presence_diff"};this.state={},this.pendingDiffs=[],this.channel=e,this.joinRef=null,this.caller={onJoin:function(){},onLeave:function(){},onSync:function(){}},this.channel.on(a.state,o=>{let{onJoin:u,onLeave:c,onSync:f}=this.caller;this.joinRef=this.channel.joinRef(),this.state=Hi.syncState(this.state,o,u,c),this.pendingDiffs.forEach(p=>{this.state=Hi.syncDiff(this.state,p,u,c)}),this.pendingDiffs=[],f()}),this.channel.on(a.diff,o=>{let{onJoin:u,onLeave:c,onSync:f}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(o):(this.state=Hi.syncDiff(this.state,o,u,c),f())})}onJoin(e){this.caller.onJoin=e}onLeave(e){this.caller.onLeave=e}onSync(e){this.caller.onSync=e}list(e){return Hi.list(this.state,e)}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel.joinRef()}static syncState(e,r,a,o){let u=this.clone(e),c={},f={};return this.map(u,(p,g)=>
20{r[p]||(f[p]=g)}),this.map(r,(p,g)=>{let y=u[p];if(y){let m=g.metas.map(x=>x.phx_ref),b=y.metas.map(x=>x.phx_ref),w=g.metas.filter(x=>b.indexOf(x.phx_ref)<0),_=y.metas.filter(x=>m.indexOf(x.phx_ref)<0);w.length>0&&(c[p]=g,c[p].metas=w),_.length>0&&(f[p]=this.clone(y),f[p].metas=_)}else c[p]=g}),this.syncDiff(u,{joins:c,leaves:f},a,o)}static syncDiff(e,r,a,o){let{joins:u,leaves:c}=this.clone(r);return a||(a=function(){}),o||(o=function(){}),this.map(u,(f,p)=>{let g=e[f];if(e[f]=this.clone(p),g){let y=e[f].metas.map(b=>b.phx_ref),m=g.metas.filter(b=>y.indexOf(b.phx_ref)<0);e[f].metas.unshift(...m)}a(f,g,p)}),this.map(c,(f,p)=>{let g=e[f];if(!g)return;let y=p.metas.map(m=>m.phx_ref);g.metas=g.metas.filter(m=>y.indexOf(m.phx_ref)<0),o(f,g,p),g.metas.length===0&&delete e[f]}),e}static list(e,r){return r||(r=function(a,o){return o}),this.map(e,(a,o)=>r(a,o))}static map(e,r){return Object.getOwnPropertyNames(e).map(a=>r(a,e[a]))}static clone(e){return JSON.parse(JSON.stringify(e))}},ql={HEADER_LENGTH:1,META_LENGTH:4,KINDS:{push:0,reply:1,broadcast:2},encode(t,e){if(t.payload.constructor===ArrayBuffer)return e(this.binaryEncode(t));{let r=[t.join_ref,t.ref,t.topic,t.event,t.payload];return e(JSON.stringify(r))}},decode(t,e){if(t.constructor===ArrayBuffer)return e(this.binaryDecode(t));{let[r,a,o,u,c]=JSON.parse(t);return e({join_ref:r,ref:a,topic:o,event:u,payload:c})}},binaryEncode(t){let{join_ref:e,ref:r,event:a,topic:o,payload:u}=t,c=this.META_LENGTH+e.length+r.length+o.length+a.length,f=new ArrayBuffer(this.HEADER_LENGTH+c),p=new DataView(f),g=0;p.setUint8(g++,this.KINDS.push),p.setUint8(g++,e.length),p.setUint8(g++,r.length),p.setUint8(g++,o.length),p.setUint8(g++,a.length),Array.from(e,m=>p.setUint8(g++,m.charCodeAt(0))),Array.from(r,m=>p.setUint8(g++,m.charCodeAt(0))),Array.from(o,m=>p.setUint8(g++,m.charCodeAt(0))),Array.from(a,m=>p.setUint8(g++,m.charCodeAt(0)));var y=new Uint8Array(f.byteLength+u.byteLength);return y.set(new Uint8Array(f),0),y.set(new Uint8Array(u),f.byteLength),y.buffer},binaryDecode(t){let e=new DataView(t),r=e.getUint8(0),a=new TextDecoder;switch(r){case this.KINDS.push:return this.decodePush(t,e,a);case this.KINDS.reply:return this.decodeReply(t,e,a);case this.KINDS.broadcast:return this.decodeBroadcast(t,e,a)}},decodePush(t,e,r){let a=e.getUint8(1),o=e.getUint8(2),u=e.getUint8(3),c=this.HEADER_LENGTH+this.META_LENGTH-1,f=r.decode(t.slice(c,c+a));c=c+a;let p=r.decode(t.slice(c,c+o));c=c+o;let g=r.decode(t.slice(c,c+u));c=c+u;let y=t.slice(c,t.byteLength);return{join_ref:f,ref:null,topic:p,event:g,payload:y}},decodeReply(t,e,r){let a=e.getUint8(1),o=e.getUint8(2),u=e.getUint8(3),c=e.getUint8(4),f=this.HEADER_LENGTH+this.META_LENGTH,p=r.decode(t.slice(f,f+a));f=f+a;let g=r.decode(t.slice(f,f+o));f=f+o;let y=r.decode(t.slice(f,f+u));f=f+u;let m=r.decode(t.slice(f,f+c));f=f+c;let b=t.slice(f,t.byteLength),w={status:m,response:b};return{join_ref:p,ref:g,topic:y,event:rr.reply,payload:w}},decodeBroadcast(t,e,r){let a=e.getUint8(1),o=e.getUint8(2),u=this.HEADER_LENGTH+2,c=r.decode(t.slice(u,u+a));u=u+a;let f=r.decode(t.slice(u,u+o));u=u+o;let p=t.slice(u,t.byteLength);return{join_ref:null,ref:null,topic:c,event:f,payload:p}}},ak=class{constructor(t,e={}){this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.channels=[],this.sendBuffer=[],this.ref=0,this.fallbackRef=null,this.timeout=e.timeout||WA,this.transport=e.transport||Cn.WebSocket||ba,this.conn=void 0,this.primaryPassedHealthCheck=!1,this.longPollFallbackMs=e.longPollFallbackMs,this.fallbackTimer=null;let r=null;try{r=Cn&&Cn.sessionStorage}catch{}this.sessionStore=e.sessionStorage||r,this.establishedConnections=0,this.defaultEncoder=ql.encode.bind(ql),this.defaultDecoder=ql.decode.bind(ql),this.closeWasClean=!0,this.disconnecting=!1,this.binaryType=e.binaryType||"arraybuffer",this.connectClock=1,this.pageHidden=!1,this.encode=void 0,this.decode=void 0,this.transport!==ba?(this.encode=e.encode||this.defaultEncoder,this.decode=e.decode||this.defaultDecoder):(this.encode=this.defaultEncoder,this.decode=this.defaultDecoder);let a=null;xa&&xa.addEventListener&&(xa.addEventListener("pagehide",o=>{this.conn&&(this.disconnect(),a=this.connectClock)}),xa.addEventListener("pageshow",o=>
20{a===this.connectClock&&(a=null,this.connect())}),xa.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"?this.pageHidden=!0:(this.pageHidden=!1,!this.isConnected()&&!this.closeWasClean&&this.teardown(()=>this.connect()))})),this.heartbeatIntervalMs=e.heartbeatIntervalMs||3e4,this.autoSendHeartbeat=e.autoSendHeartbeat??!0,this.heartbeatCallback=e.heartbeatCallback??(()=>{}),this.rejoinAfterMs=o=>e.rejoinAfterMs?e.rejoinAfterMs(o):[1e3,2e3,5e3][o-1]||1e4,this.reconnectAfterMs=o=>e.reconnectAfterMs?e.reconnectAfterMs(o):[10,50,100,150,200,250,500,1e3,2e3][o-1]||5e3,this.logger=e.logger||null,!this.logger&&e.debug&&(this.logger=(o,u,c)=>{console.log(`${o}: ${u}`,c)}),this.longpollerTimeout=e.longpollerTimeout||2e4,this.params=Fi(e.params||{}),this.endPoint=`${t}/${Uf.websocket}`,this.vsn=e.vsn||ZA,this.heartbeatTimeoutTimer=null,this.heartbeatTimer=null,this.heartbeatSentAt=null,this.pendingHeartbeatRef=null,this.reconnectTimer=new K0(()=>{if(this.pageHidden){this.log("Not reconnecting as page is hidden!"),this.teardown();return}this.teardown(async()=>{e.beforeReconnect&&await e.beforeReconnect(),this.connect()})},this.reconnectAfterMs),this.authToken=e.authToken}getLongPollTransport(){return ba}replaceTransport(t){this.connectClock++,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.conn&&(this.conn.close(),this.conn=null),this.transport=t}protocol(){return location.protocol.match(/^https/)?"wss":"ws"}endPointURL(){let t=cu.appendParams(cu.appendParams(this.endPoint,this.params()),{vsn:this.vsn});return t.charAt(0)!=="/"?t:t.charAt(1)==="/"?`${this.protocol()}:${t}`:`${this.protocol()}://${location.host}${t}`}disconnect(t,e,r){this.connectClock++,this.disconnecting=!0,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.teardown(()=>{this.disconnecting=!1,t&&t()},e,r)}connect(t){t&&(console&&console.log("passing params to connect is deprecated. Instead pass :params to the Socket constructor"),this.params=Fi(t)),!(this.conn&&!this.disconnecting)&&(this.longPollFallbackMs&&this.transport!==ba?this.connectWithF
vendor: 4,353 bytes, line 20
20allback(ba,this.longPollFallbackMs):this.transportConnect())}log(t,e,r){this.logger&&this.logger(t,e,r)}hasLogger(){return this.logger!==null}onOpen(t){let e=this.makeRef();return this.stateChangeCallbacks.open.push([e,t]),e}onClose(t){let e=this.makeRef();return this.stateChangeCallbacks.close.push([e,t]),e}onError(t){let e=this.makeRef();return this.stateChangeCallbacks.error.push([e,t]),e}onMessage(t){let e=this.makeRef();return this.stateChangeCallbacks.message.push([e,t]),e}onHeartbeat(t){this.heartbeatCallback=t}ping(t){if(!this.isConnected())return!1;let e=this.makeRef(),r=Date.now();this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:e});let a=this.onMessage(o=>{o.ref===e&&(this.off([a]),t(Date.now()-r))});return!0}transportName(t){return t===ba?"LongPoll":t.name}transportConnect(){this.connectClock++,this.closeWasClean=!1;let t;this.authToken&&(t=["phoenix",`${zf}${btoa(this.authToken).replace(/=/g,"")}`]),this.conn=new this.transport(this.endPointURL(),t),this.conn.binaryType=this.binaryType,this.conn.timeout=this.longpollerTimeout,this.conn.onopen=()=>this.onConnOpen(),this.conn.onerror=e=>this.onConnError(e),this.conn.onmessage=e=>this.onConnMessage(e),this.conn.onclose=e=>this.onConnClose(e)}getSession(t){return this.sessionStore&&this.sessionStore.getItem(t)}storeSession(t,e){this.sessionStore&&this.sessionStore.setItem(t,e)}connectWithFallback(t,e=2500){clearTimeout(this.fallbackTimer);let r=!1,a=!0,o,u,c=this.transportName(t),f=p=>{this.log("transport",`falling back to ${c}...`,p),this.off([o,u]),a=!1,this.replaceTransport(t),this.transportConnect()};if(this.getSession(`phx:fallback:${c}`))return f("memorized");this.fallbackTimer=setTimeout(f,e),u=this.onError(p=>{this.log("transport","error",p),a&&!r&&(clearTimeout(this.fallbackTimer),f(p))}),this.fallbackRef&&this.off([this.fallbackRef]),this.fallbackRef=this.onOpen(()=>{if(r=!0,!a){let p=this.transportName(t);return this.primaryPassedHealthCheck||this.storeSession(`phx:fallback:${p}`,"true"),this.log("transport",`established ${p} fallback`)}clearTimeout(this.fallbackTimer),this.fallbackTimer=setTimeout(f,e),this.ping(p=>{this.log("transport","connected to primary after",p),this.primaryPassedHealthCheck=!0,clearTimeout(this.fallbackTimer)})}),this.transportConnect()}clearHeartbeats(){clearTimeout(this.heartbeatTimer),clearTimeout(this.heartbeatTimeoutTimer)}onConnOpen(){this.hasLogger()&&this.log("transport",`connected to ${this.endPointURL()}`),this.closeWasClean=!1,this.disconnecting=!1,this.establishedConnections++,this.flushSendBuffer(),this.reconnectTimer.reset(),this.autoSendHeartbeat&&this.resetHeartbeat(),this.triggerStateCallbacks("open")}heartbeatTimeout(){if(this.pendingHeartbeatRef){this.pendingHeartbeatRef=null,this.heartbeatSentAt=null,this.hasLogger()&&this.log("transport","heartbeat timeout. Attempting to re-establish connection");try{this.heartbeatCallback("timeout")}catch(t){this.log("error","error in heartbeat callback",t)}this.triggerChanError(new Error("heartbeat timeout")),this.closeWasClean=!1,this.teardown(()=>this.reconnectTimer.scheduleTimeout(),ek,"heartbeat timeout")}}resetHeartbeat(){this.conn&&this.conn.skipHeartbeat||(this.pendingHeartbeatRef=null,this.clearHeartbeats(),this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}teardown(t,e,r){if(!this.conn)return t&&t();const a=this.conn;this.waitForBufferDone(a,()=>{e?a.close(e,r||""):a.close(),this.waitForSocketClosed(a,()=>{this.conn===a&&(this.conn.onopen=function(){},this.conn.onerror=function(){},this.conn.onmessage=function(){},this.conn.onclose=function(){},this.conn=null),t&&t()})})}waitForBufferDone(t,e,r=1){if(r===5||!t.bufferedAmount){e();return}setTimeout(()=>{this.waitForBufferDone(t,e,r+1)},150*r)}waitForSocketClosed(t,e,r=1){if(r===5||t.readyState===Mn.closed){e();return}setTimeout(()=>{this.waitForSocketClosed(t,e,r+1)},150*r)}onConnClose(t){this.conn&&(this.conn.onclose=()=>{}),this.hasLogger()&&this.log("transport","close",t),this.triggerChanError(t),this.clearHeartbeats(),this.closeWasClean||this.reconnectTimer.scheduleTimeout(),this.triggerStateCallbacks("close",t)}onConnError(t){this.hasLogger()&&this.log("transport","error",t);let e=this.transport,r=this.establishedConnections;this.triggerStateCallbacks("error",t,e,r),(e===this.transport||r>0)&&this.triggerChanError(t)}
20triggerChanError(t){this.channels.forEach(e=>{e.isErrored()||e.isLeaving()||e.isClosed()||e.trigger(rr.error,t)})}connectionState(){switch(this.conn&&this.conn.readyState){case Mn.connecting:return"connecting";case Mn.open:return"open";case Mn.closing:return"closing";default:return"closed"}}isConnected(){return this.connectionState()==="open"}remove(t){this.off(t.stateChangeRefs),this.channels=this.channels.filter(e=>e!==t)}off(t){for(let e in this.stateChangeCallbacks)this.stateChangeCallbacks[e]=this.stateChangeCallbacks[e].filter(([r])=>t.indexOf(r)===-1)}channel(t,e={}){let r=new nk(t,e,this);return this.channels.push(r),r}push(t){if(this.hasLogger()){let{topic:e,event:r,payload:a,ref:o,join_ref:u}=t;this.log("push",`${e} ${r} (${u}, ${o})`,a)}this.isConnected()?this.encode(t,e=>this.conn.send(e)):this.sendBuffer.push(()=>this.encode(t,e=>this.conn.send(e)))}makeRef(){let t=this.ref+1;return t===this.ref?this.ref=0:this.ref=t,this.ref.toString()}sendHeartbeat(){if(!this.isConnected()){try{this.heartbeatCallback("disconnected")}catch(t){this.log("error","error in heartbeat callback",t)}return}if(this.pendingHeartbeatRef){this.heartbeatTimeout();return}this.pendingHeartbeatRef=this.makeRef(),this.heartbeatSentAt=Date.now(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef});try{this.heartbeatCallback("sent")}catch(t){this.log("error","error in heartbeat callback",t)}this.heartbeatTimeoutTimer=setTimeout(()=>this.heartbeatTimeout(),this.heartbeatIntervalMs)}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(t=>t()),this.sendBuffer=[])}onConnMessage(t){this.decode(t.data,e=>{let{topic:r,event:a,payload:o,ref:u,join_ref:c}=e;if(u&&u===this.pendingHeartbeatRef){const f=this.heartbeatSentAt?Date.now()-this.heartbeatSentAt:void 0;this.clearHeartbeats();try{this.heartbeatCallback(o.status==="ok"?"ok":"error",f)}catch(p){this.log("error","error in heartbeat callback",p)}this.pendingHeartbeatRef=null,this.heartbeatSentAt=null,this.autoSendHeartbeat&&(this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}this.hasLogger()&&this.log("receive",`${o.status||""} ${r} ${a} ${u&&"("+u+")"||""}`.trim(),o);for(let f=0;f<this.channels.length;f++){const p=this.channels[f];p.isMember(r,a,o,c)&&p.trigger(a,o,u,c)}this.triggerStateCallbacks("message",e)})}triggerStateCallbacks(t,...e){try{this.stateChangeCallbacks[t].forEach(([r,a])=>{try{a(...e)}catch(o){this.log("error",`error in ${t} callback`,o)}})}catch(r){this.log("error",`error triggering ${t} callbacks`,r)}}leaveOpenTopic(t){let e=this.channels.find(r=>r.topic===t&&(r.isJoined()||r.isJoining()));e&&(this.hasLogger()&&this.log("transport",`leaving duplicate topic "${t}"`),e.leave())}};class Yi{constructor(e,r){const a=ok(r);this.presence=new sk(e.getChannel(),a),this.presence.onJoin((o,u,c)=>{const f=Yi.onJoinPayload(o,u,c);e.getChannel().trigger("presence",f)}),this.presence.onLeave((o,u,c)=>{const f=Yi.onLeavePayload(o,u,c);e.getChannel().trigger("presence",f)}),this.presence.onSync(()=>{e.getChannel().trigger("presence",{event:"sync"})})}get state(){return Yi.transformState(this.presence.state)}static transformState(e){return e=ik(e),Object.getOwnPropertyNames(e).reduce((r,a)=>{const o=e[a];return r[a]=nu(o),r},{})}static onJoinPayload(e,r,a){const o=Nv(r),u=nu(a);return{event:"join",key:e,currentPresences:o,newPresences:u}}static onLeavePayload(e,r,a){const o=Nv(r),u=nu(a);return{event:"leave",key:e,currentPresences:o,leftPresences:u}}}function nu(t){return t.metas.map(e=>(e.presence_ref=e.phx_ref,delete e.phx_ref,delete e.phx_ref_prev,e))}function ik(t){return JSON.parse(JSON.stringify(t))}function ok(t){return t?.events&&{events:t.events}}function Nv(t){return t?.metas?nu(t):[]}var Lv;(function(t){t.SYNC="sync",t.JOIN="join",t.LEAVE="leave"})(Lv||(Lv={}));class lk{get state(){return this.presenceAdapter.state}constructor(e,r){this.channel=e,this.presenceAdapter=new Yi(this.channel.channelAdapter,r)}}function uk(t){if(t instanceof Error)return t;if(typeof t=="string")return new Error(t);if(t&&typeof t=="object"){const e=t;
20if(typeof e.code=="number"){const r=typeof e.reason=="string"&&e.reason?` (${e.reason})`:"";return new Error(`socket closed: ${e.code}${r}`,{cause:t})}return new Error("channel error: transport failure",{cause:t})}return new Error("channel error: connection lost")}class ck{constructor(e,r,a){const o=hk(a);this.channel=e.getSocket().channel(r,o),this.socket=e}get state(){return this.channel.state}set state(e){this.channel.state=e}get joinedOnce(){return this.channel.joinedOnce}get joinPush(){return this.channel.joinPush}get rejoinTimer(){return this.channel.rejoinTimer}on(e,r){return this.channel.on(e,r)}off(e,r){this.channel.off(e,r)}subscribe(e){return this.channel.join(e)}unsubscribe(e){return this.channel.leave(e)}teardown(){this.channel.teardown()}onClose(e){this.channel.onClose(e)}onError(e){return this.channel.onError(e)}push(e,r,a){let o;try{o=this.channel.push(e,r,a)}catch{throw new Error(`tried to push '${e}' to '${this.channel.topic}' before joining. Use channel.subscribe() before pushing events`)}if(this.channel.pushBuffer.length>HA){const u=this.channel.pushBuffer.shift();u.cancelTimeout(),this.socket.log("channel",`discarded push due to buffer overflow: ${u.event}`,u.payload())}return o}updateJoinPayload(e){const r=this.channel.joinPush.payload();this.channel.joinPush.payload=()=>Object.assign(Object.assign({},r),e)}canPush(){return this.socket.isConnected()&&this.state===Pr.joined}isJoined(){return this.state===Pr.joined}isJoining(){return this.state===Pr.joining}isClosed(){return this.state===Pr.closed}isLeaving(){return this.state===Pr.leaving}updateFilterBindings(e){this.channel.filterBindings=e}updatePayloadTransform(e){this.channel.onMessage=e}getChannel(){return this.channel}}function hk(t){return{config:Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},t.config)}}var Dv;(function(t){t.ALL="*",t.INSERT="INSERT",t.UPDATE="UPDATE",t.DELETE="DELETE"})(Dv||(Dv={}));var Oa;(function(t){t.BROADCAST="broadcast",t.PRESENCE="presence",t.POSTGRES_CHANGES="postgres_changes",t.SYSTEM="system"})(Oa||(Oa={}));var sr;(function(t){t.SUBSCRIBED="SUBSCRIBED",t.TIMED_OUT="TIMED_OUT",t.CLOSED="CLOSED",t.CHANNEL_ERROR="CHANNEL_ERROR"})(sr||(sr={}));class Qi{get state(){return this.channelAdapter.state}set state(e){this.channelAdapter.state=e}get joinedOnce(){return this.channelAdapter.joinedOnce}get timeout(){return this.socket.timeout}get joinPush(){return this.channelAdapter.joinPush}get rejoinTimer(){return this.channelAdapter.rejoinTimer}constructor(e,r={config:{}},a){var o,u;if(this.topic=e,this.params=r,this.socket=a,this.bindings={},this.subTopic=e.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},r.config),this.channelAdapter=new ck(this.socket.socketAdapter,e,this.params),this.presence=new lk(this),this._onClose(()=>{this.socket._remove(this)}),this._updateFilterTransform(),this.broadcastEndpointURL=V0(this.socket.socketAdapter.endPointURL()),this.private=this.params.config.private||!1,!this.private&&(!((u=(o=this.params.config)===null||o===void 0?void 0:o.broadcast)===null||u===void 0)&&u.replay))throw new Error(`tried to use replay on public channel '${this.topic}'. It must be a private channel.`)}subscribe(e,r=this.timeout){var a,o,u;if(this.socket.isConnected()||this.socket.connect(),this.channelAdapter.isClosed()){const{config:{broadcast:c,presence:f,private:p}}=this.params,g=(o=(a=this.bindings.postgres_changes)===null||a===void 0?void 0:a.map(w=>w.filter))!==null&&o!==void 0?o:[],y=!!this.bindings[Oa.PRESENCE]&&this.bindings[Oa.PRESENCE].length>0||((u=this.params.config.presence)===null||u===void 0?void 0:u.enabled)===!0,m={},b={broadcast:c,presence:Object.assign(Object.assign({},f),{enabled:y}),postgres_changes:g,private:p};this.socket.accessTokenValue&&(m.access_token=this.socket.accessTokenValue),this._onError(w=>{e?.(sr.CHANNEL_ERROR,uk(w))}),this._onClose(()=>e?.(sr.CLOSED)),this.updateJoinPayload(Object.assign({config:b},m)),this._updateFilterMessage(),this.channelAdapter.subscribe(r).receive("ok",async({postgres_changes:w})=>{if(this.socket._isManualToken()||this.socket.setAuth(),w===void 0){e?.(sr.SUBSCRIBED);return}this._updatePostgresBindings(w,e)}).receive("error",w=>{this.state=Pr.errored;const _=Object.values(w).join(", ")||"error";e?.(sr.CHANNEL_ERROR,new Error(_,{cause:w}))}).receive("timeout",()=>{e?.(sr.TIMED_OUT)})}return this}_updatePostgresBindings(e,r){var a;const o=this.bindings.postgres_changes,u=(a=o?.length)!==null&&a!==void 0?a:0,c=[];for(let f=0;f<u;f++){const p=o[f],{filter:{event:g,schema:y,table:m,filter:b}}=p,w=e&&e[f];if(w&&w.event===g&&Qi.isFilterValueEqual(w.schema,y)&&Qi.isFilterValueEqual(w.table,m)&&Qi.isFilterValueEqual(w.filter,b))c.push(Object.assign(Object.assign({},p),{id:w.id}));else{this.unsubscribe(),this.state=Pr.errored,r?.(sr.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=c,this.state!=Pr.errored&&r&&r(sr.SUBSCRIBED)}presenceState(){return this.presence.state}async track(e,r={}){return await this.send({type:"presence",event:"track",payload:e},r.timeout||this.timeout)}async untrack(e={}){return await this.send({type:"presence",event:"untrack"},e)}on(e,r,a){const o=this.channelAdapter.isJoined()||this.channelAdapter.isJoining(),u=e===Oa.PRESENCE||e===Oa.POSTGRES_CHANGES;if(o&&u)throw this.socket.log("channel",`cannot add \`${e}\` callbacks for ${this.topic} after \`subscribe()\`.`),new Error(`cannot add \`${e}\` callbacks for ${this.topic} after \`subscribe()\`.`);return this._on(e,r,a)}async httpSend(e,r,a={}){var o;if(r==null)return Promise.reject(new Error("Payload is required for httpSend()"));const u=r instanceof ArrayBuffer||ArrayBuffer.isView(r),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 f=new URL(this.broadcastEndpointURL);f.pathname+=`/${encodeURIComponent(this.subTopic)}/events/${encodeURIComponent(e)}`,this.private&&f.searchParams.set("private","true");const p={method:"POST",headers:c,body:u?r:JSON.stringify(r)},g=await this._fetchWithTimeout(f.toString(),p,(o=a.timeout)!==null&&o!==void 0?o:this.timeout);if(g.status===202)return{success:!0};if(g.status===404)return Promise.reject(new Error("httpSend() requires Realtime server v2.97.0 or newer; the endpoint returned 404. Update your Supabase CLI to a recent version, or upgrade the Realtime server in your self-hosted setup. See https://github.com/supabase/supabase-js/blob/master/packages/core/realt
20ime-js/migrations/httpsend-server-version.md"));let y=g.statusText;try{const m=await g.json();y=m.error||m.message||y}catch{}return Promise.reject(new Error(y))}async send(e,r={}){var a,o;if(!this.channelAdapter.canPush()&&e.type==="broadcast"){console.warn("Realtime send() is automatically falling back to REST API. This behavior will be deprecated in the future. Please use httpSend() explicitly for REST delivery.");const{event:u,payload:c}=e,f={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(f.Authorization=`Bearer ${this.socket.accessTokenValue}`);const p={method:"POST",headers:f,body:JSON.stringify({messages:[{topic:this.subTopic,event:u,payload:c,private:this.private}]})};try{const g=await this._fetchWithTimeout(this.broadcastEndpointURL,p,(a=r.timeout)!==null&&a!==void 0?a:this.timeout);return await((o=g.body)===null||o===void 0?void 0:o.cancel()),g.ok?"ok":"error"}catch(g){return g instanceof Error&&g.name==="AbortError"?"timed out":"error"}}else return new Promise(u=>{var c,f,p;const g=this.channelAdapter.push(e.type,e,r.timeout||this.timeout);e.type==="broadcast"&&!(!((p=(f=(c=this.params)===null||c===void 0?void 0:c.config)===null||f===void 0?void 0:f.broadcast)===null||p===void 0)&&p.ack)&&u("ok"),g.receive("ok",()=>u("ok")),g.receive("error",()=>u("error")),g.receive("timeout",()=>u("timed out"))})}updateJoinPayload(e){this.channelAdapter.updateJoinPayload(e)}async unsubscribe(e=this.timeout){return new Promise(r=>{this.channelAdapter.unsubscribe(e).receive("ok",()=>r("ok")).receive("timeout",()=>r("timed out")).receive("error",()=>r("error"))})}teardown(){this.channelAdapter.teardown()}async _fetchWithTimeout(e,r,a){const o=new AbortController,u=setTimeout(()=>o.abort(),a),c=await this.socket.fetch(e,Object.assign(Object.assign({},r),{signal:o.signal}));return clearTimeout(u),c}_on(e,r,a){const o=e.toLocaleLowerCase(),u=this.channelAdapter.on(e,a),c={type:o,filter:r,callback:a,ref:u};return this.bindings[o]?this.bindings[o].push(c):this.bindings[o]=[c],this._updateFilterMessage(),this}_onClose(e){this.channelAdapter.onClose(e)}_onError(e){this.channelAdapter.onError(e)}_updateFilterMessage(){this.channelAdapter.updateFilterBindings((e,r,a)=>{var o,u,c,f,p,g,y;const m=e.event.toLocaleLowerCase();if(this._notThisChannelEvent(m,a))return!1;const b=(o=this.bindings[m])===null||o===void 0?void 0:o.find(w=>w.ref===e.ref);if(!b)return!0;if(["broadcast","presence","postgres_changes"].includes(m))if("id"in b){const w=b.id,_=(u=b.filter)===null||u===void 0?void 0:u.event;return w&&((c=r.ids)===null||c===void 0?void 0:c.includes(w))&&(_==="*"||_?.toLocaleLowerCase()===((f=r.data)===null||f===void 0?void 0:f.type.toLocaleLowerCase()))}else{const w=(g=(p=b?.filter)===null||p===void 0?void 0:p.event)===null||g===void 0?void 0:g.toLocaleLowerCase();return w==="*"||w===((y=r?.event)===null||y===void 0?void 0:y.toLocaleLowerCase())}else return b.type.toLocaleLowerCase()===m})}_notThisChannelEvent(e,r){const{close:a,error:o,leave:u,join:c}=H0;return r&&[a,o,u,c].includes(e)&&r!==this.joinPush.ref}_updateFilterTransform(){this.channelAdapter.updatePayloadTransform((e,r,a)=>{if(typeof r=="object"&&"ids"in r){const o=r.data,{schema:u,table:c,commit_timestamp:f,type:p,errors:g}=o;return Object.assign(Object.assign({},{schema:u,table:c,commit_timestamp:f,eventType:p,new:{},old:{},errors:g}),this._getPayloadRecords(o))}return r})}copyBindings(e){if(this.joinedOnce)throw new Error("cannot copy bindings into joined channel");for(const r in e.bindings)for(const a of e.bindings[r])this._on(a.type,a.filter,a.callback)}static isFilterValueEqual(e,r){return(e??void 0)===(r??void 0)}_getPayloadRecords(e){const r={new:{},old:{}};return(e.type==="INSERT"||e.type==="UPDATE")&&(r.new=Mv(e.columns,e.record)),(e.type==="UPDATE"||e.type==="DELETE")&&(r.old=Mv(e.columns,e.old_record)),r}}class fk{constructor(e,r){this.socket=new ak(e,r)}get timeout(){return this.socket.timeout}get endPoint(){return this.socket.endPoint}get transport(){return this.socket.transport}get heartbeatIntervalMs(){return this.socket.heartbeatIntervalMs}get heartbeatCallback(){return this.socket.heartbeatCallback}set heartbeatCallback(e){this.socket.heartbeatCallback=e}get heartbeatTimer(){return this.socket.heartbeatTimer}get pendingHeartbeatRef(){return this.socket.pendingHeartbeatRef}get reconnectTimer(){return this.socket.reconnectTimer}get vsn(){return this.socket.vsn}get encode(){return this.socket.encode}get decode(){return this.socket.decode}get reconnectAfterMs(){return this.socket.reconnectAfterMs}get sendBuffer(){return this.socket.sendBuffer}get stateChangeCallbacks(){return this.socket.stateChangeCallbacks}connect(){this.socket.connect()}disconnect(e,r,a,o=1e4){return new Promise(u=>{setTimeout(()=>u("timeout"),o),this.socket.disconnect(()=>{e(),u("ok")},r,a)})}push(e){this.socket.push(e)}log(e,r,a){this.socket.log(e,r,a)}makeRef(){return this.socket.makeRef()}onOpen(e){this.socket.onOpen(e)}onClose(e){this.socket.onClose(e)}onError(e){this.socket.onError(e)}onMessage(e){this.socket.onMessage(e)}isConnected(){return this.socket.isConnected()}isConnecting(){return this.socket.connectionState()==Lf.connecting}isDisconnecting(){return this.socket.connectionState()==Lf.closing}connectionState(){return this.socket.connectionState()}endPointURL(){return this.socket.endPointURL()}sendHeartbeat(){this.socket.sendHeartbeat()}getSocket(){return this.socket}}const Uv={HEARTBEAT_INTERVAL:25e3},dk=[1e3,2e3,5e3,1e4],pk=1e4;function gk(){const t=new Map;return{get length(){return t.size},clear(){t.clear()},getItem(e){return t.has(e)?t.get(e):null},key(e){var r;return(r=Array.from(t.keys())[e])!==null&&r!==void 0?r:null},removeItem(e){t.delete(e)},setItem(e,r){t.set(e,String(r))}}}function mk(){try{if(typeof globalThis<"u"&&globalThis.sessionStorage)return globalThis.sessionStorage}catch{}return gk()}const yk=` 21 addEventListener("message", (e) => { 22 if (e.data.event === "start") { 23 setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval); 24 } 25 });`;class vk{get endPoint(){return this.socketAdapter.endPoint}get timeout(){return this.socketAdapter.timeout}get transport(){return this.socketAdapter.transport}get heartbeatCallback(){return this.socketAdapter.heartbeatCallback}get heartbeatIntervalMs(){return this.socketAdapter.heartbeatIntervalMs}get heartbeatTimer(){return this.worker?this._workerHeartbeatTimer:this.socketAdapter.heartbeatTimer}get pendingHeartbeatRef(){return this.worker?this._pendingWorkerHeartbeatRef:this.socketAdapter.pendingHeartbeatRef}get reconnectTimer(){return this.socketAdapter.reconnectTimer}get vsn(){return this.socketAdapter.vsn}get encode(){return this.socketAdapter.encode}get decode(){return this.socketAdapter.decode}get reconnectAfterMs(){return this.socketAdapter.reconnectAfterMs}get sendBuffer(){return this.socketAdapter.sendBuffer}get stateChangeCallbacks(){return this.socketAdapter.stateChangeCallbacks}constructor(e,r){var a;if(this.channels=new Array,this.accessTokenValue=null,this.accessToken=null,this.apiKey=null,this.httpEndpoint="",this.headers={},this.params={}
25,this.ref=0,this.serializer=new GA,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=r?.params)===null||a===void 0)&&a.apikey))throw new Error("API key is required to connect to Realtime");this.apiKey=r.params.apikey;const o=this._initializeOptions(r);this.socketAdapter=new fk(e,o),this.httpEndpoint=V0(e),this.fetch=this._resolveFetch(r?.fetch)}connect(){if(!(this.isConnecting()||this.isDisconnecting()||this.isConnected())){this.accessToken&&!this._authPromise&&this._setAuthSafely("connect"),this._setupConnectionHandlers();try{this.socketAdapter.connect()}catch(e){const r=e.message;throw r.includes("Node.js")?new Error(`${r} 26 27To use Realtime in Node.js, you need to provide a WebSocket implementation: 28 29Option 1: Use Node.js 22+ which has native WebSocket support 30Option 2: Install and provide the "ws" package: 31 32 npm install ws 33 34 import ws from "ws" 35 const client = new RealtimeClient(url, { 36 ...options, 37 transport: ws 38 })`):new Error(`WebSocket not available: ${r}`)}this._handleNodeJsRaceCondition()}}endpointURL(){return this.socketAdapter.endPointURL()}async disconnect(e,r){return this._cancelPendingDisconnect(),this.isDisconnecting()?"ok":await this.socketAdapter.disconnect(()=>{clearInterval(this._workerHeartbeatTimer),this._terminateWorker()},e,r)}getChannels(){return this.channels}async removeChannel(e){const r=await e.unsubscribe();return r==="ok"&&e.teardown(),r}async removeAllChannels(){const e=this.channels.map(async a=>{const o=await a.unsubscribe();return a.teardown(),o}),r=await Promise.all(e);return await this.disconnect(),r}log(e,r,a){this.socketAdapter.log(e,r,a)}connectionState(){return this.socketAdapter.connectionState()||Lf.closed}isConnected(){return this.socketAdapter.isConnected()}isConnecting(){return this.socketAdapter.isConnecting()}isDisconnecting(){return this.socketAdapter.isDisconnecting()}channel(e,r={config:{}}){const a=`realtime:${e}`,o=this.getChannels().find(u=>u.topic===a);if(o)return o;{const u=new Qi(`realtime:${e}`,r,this);return this._cancelPendingDisconnect(),this.channels.push(u),u}}push(e){this.socketAdapter.push(e)}async setAuth(e=null){this._authPromise=this._performAuth(e);try{await this._authPromise}finally{this._authPromise=null}}_isManualToken(){return this._manuallySetToken}async sendHeartbeat(){this.socketAdapter.sendHeartbeat()}onHeartbeat(e){this.socketAdapter.heartbeatCallback=this._wrapHeartbeatCallback(e)}_makeRef(){return this.socketAdapter.makeRef()}_remove(e){this.channels=this.channels.filter(r=>r.topic!==e.topic),this.channels.length===0&&(this.log("transport","no channels remaining, scheduling disconnect"),this._schedulePendingDisconnect())}_schedulePendingDisconnect(){if(this._cancelPendingDisconnect(),this._disconnectOnEmptyChannelsAfterMs===0){this.log("transport","disconnecting immediately - no channels"),this.disconnect();return}
38this._pendingDisconnectTimer=setTimeout(()=>{this._pendingDisconnectTimer=null,this.channels.length===0&&(this.log("transport","deferred disconnect fired - no channels, disconnecting"),this.disconnect())},this._disconnectOnEmptyChannelsAfterMs),this.log("transport",`deferred disconnect scheduled in ${this._disconnectOnEmptyChannelsAfterMs}ms`)}_cancelPendingDisconnect(){this._pendingDisconnectTimer!==null&&(this.log("transport","pending disconnect cancelled - channel activity detected"),clearTimeout(this._pendingDisconnectTimer),this._pendingDisconnectTimer=null)}async _performAuth(e=null){let r,a=!1;if(e)r=e,a=!0;else if(this.accessToken)try{r=await this.accessToken()}catch(o){this.log("error","Error fetching access token from callback",o),r=this.accessTokenValue}else r=this.accessTokenValue;a?this._manuallySetToken=!0:this.accessToken&&(this._manuallySetToken=!1),this.accessTokenValue!=r&&(this.accessTokenValue=r,this.channels.forEach(o=>{const u={access_token:r,version:BA};r&&o.updateJoinPayload(u),o.joinedOnce&&o.channelAdapter.isJoined()&&o.channelAdapter.push(H0.access_token,{access_token:r})}))}async _waitForAuthIfNeeded(){this._authPromise&&await this._authPromise}_setAuthSafely(e="general"){this._isManualToken()||this.setAuth().catch(r=>{this.log("error",`Error setting auth in ${e}`,r)})}_setupConnectionHandlers(){this.socketAdapter.onOpen(()=>{(this._authPromise||(this.accessToken&&!this.accessTokenValue?this.setAuth():Promise.resolve())).catch(r=>{this.log("error","error waiting for auth on connect",r)}),this.worker&&!this.workerRef&&this._startWorkerHeartbeat()}),this.socketAdapter.onClose(()=>{this.worker&&this.workerRef&&this._terminateWorker()}),this.socketAdapter.onMessage(e=>{e.ref&&e.ref===this._pendingWorkerHeartbeatRef&&(this._pendingWorkerHeartbeatRef=null)})}_handleNodeJsRaceCondition(){this.socketAdapter.isConnected()&&this.socketAdapter.getSocket().onConnOpen()}_wrapHeartbeatCallback(e){return(r,a)=>{r=="sent"&&this._setAuthSafely(),e&&e(r,a)}}_startWorkerHeartbeat(){this.workerUrl?this.log("worker",`starting worker for from ${this.workerUrl}`):this.log("worker","starting default worker");const e=this._workerObjectUrl(this.workerUrl);this.workerRef=new Worker(e),this.workerRef.onerror=r=>{this.log("worker","worker error",r.message),this._terminateWorker(),this.disconnect()},this.workerRef.onmessage=r=>{r.data.event==="keepAlive"&&this.sendHeartbeat()},this.workerRef.postMessage({event:"start",interval:this.heartbeatIntervalMs})}_terminateWorker(){this.workerRef&&(this.log("worker","terminating worker"),this.workerRef.terminate(),this.workerRef=void 0)}_workerObjectUrl(e){let r;if(e)r=e;else{const a=new Blob([yk],{type:"application/javascript"});r=URL.createObjectURL(a)}return r}_initializeOptions(e){var r,a,o,u,c,f,p,g,y,m,b,w;this.worker=(r=e?.worker)!==null&&r!==void 0?r:!1,this.accessToken=(a=e?.accessToken)!==null&&a!==void 0?a:null;const _={};_.timeout=(o=e?.timeout)!==null&&o!==void 0?o:qA,_.heartbeatIntervalMs=(u=e?.heartbeatIntervalMs)!==null&&u!==void 0?u:Uv.HEARTBEAT_INTERVAL,this._disconnectOnEmptyChannelsAfterMs=(c=e?.disconnectOnEmptyChannelsAfterMs)!==null&&c!==void 0?c:2*((f=e?.heartbeatIntervalMs)!==null&&f!==void 0?f:Uv.HEARTBEAT_INTERVAL),_.transport=(p=e?.transport)!==null&&p!==void 0?p:zA.getWebSocketConstructor(),_.params=e?.params,_.logger=e?.logger,_.heartbeatCallback=this._wrapHeartbeatCallback(e?.heartbeatCallback),_.sessionStorage=(g=e?.sessionStorage)!==null&&g!==void 0?g:mk(),_.reconnectAfterMs=(y=e?.reconnectAfterMs)!==null&&y!==void 0?y:(M=>dk[M-1]||pk);let x,E;const A=(m=e?.vsn)!==null&&m!==void 0?m:IA;switch(A){case $A:x=(M,j)=>j(JSON.stringify(M)),E=(M,j)=>j(JSON.parse(M));break;case q0:x=this.serializer.encode.bind(this.serializer),E=this.serializer.decode.bind(this.serializer);break;default:throw new Error(`Unsupported serializer version: ${_.vsn}`)}if(_.vsn=A,_.encode=(b=e?.encode)!==null&&b!==void 0?b:x,_.decode=(w=e?.decode)!==null&&w!==void 0?w:E,_.beforeReconnect=this._reconnectAuth.bind(this),(e?.logLevel||e?.log_level)&&(this.logLevel=e.logLevel||e.log_level,_.params=Object.assign(Object.assign({},_.params),{log_level:this.logLevel})),this.worker){if(typeof window<"u"&&!window.Worker)throw new Error("Web Worker is not supported");this.workerUrl=e?.workerUrl,_.autoSendHeartbeat=!this.worker}return _}async _reconnectAuth(){await this._waitForAuthIfNeeded(),this.isConnected()||this.connect()}}
38var ro=class extends Error{constructor(t,e){super(t),this.name="IcebergError",this.status=e.status,this.icebergType=e.icebergType,this.icebergCode=e.icebergCode,this.details=e.details,this.isCommitStateUnknown=e.icebergType==="CommitStateUnknownException"||[500,502,504].includes(e.status)&&e.icebergType?.includes("CommitState")===!0}isNotFound(){return this.status===404}isConflict(){return this.status===409}isAuthenticationTimeout(){return this.status===419}};function bk(t,e,r){const a=new URL(e,t);if(r)for(const[o,u]of Object.entries(r))u!==void 0&&a.searchParams.set(o,u);return a.toString()}async function wk(t){return!t||t.type==="none"?{}:t.type==="bearer"?{Authorization:`Bearer ${t.token}`}:t.type==="header"?{[t.name]:t.value}:t.type==="custom"?await t.getHeaders():{}}function _k(t){const e=t.fetchImpl??globalThis.fetch;return{async request({method:r,path:a,query:o,body:u,headers:c}){const f=bk(t.baseUrl,a,o),p=await wk(t.auth),g=await e(f,{method:r,headers:{...u?{"Content-Type":"application/json"}:{},...p,...c},body:u?JSON.stringify(u):void 0}),y=await g.text(),m=(g.headers.get("content-type")||"").includes("application/json"),b=m&&y?JSON.parse(y):y;if(!g.ok){const w=m?b:void 0,_=w?.error;throw new ro(_?.message??`Request failed with status ${g.status}`,{status:g.status,icebergType:_?.type,icebergCode:_?.code,details:w})}return{status:g.status,headers:g.headers,data:b}}}}function Hl(t){return t.join("�")}var Sk=class{constructor(t,e=""){this.client=t,this.prefix=e}async listNamespaces(t){const e=t?{parent:Hl(t.namespace)}:void 0;return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces`,query:e})).data.namespaces.map(a=>({namespace:a}))}async createNamespace(t,e){const r={namespace:t.namespace,properties:e?.properties};return(await this.client.request({method:"POST",path:`${this.prefix}/namespaces`,body:r})).data}async dropNamespace(t){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${Hl(t.namespace)}`})}async loadNamespaceMetadata(t){return{properties:(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${Hl(t.namespace)}`})).data.properties}}async namespaceExists(t){try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${Hl(t.namespace)}`}),!0}catch(e){if(e instanceof ro&&e.status===404)return!1;throw e}}async createNamespaceIfNotExists(t,e){try{return await this.createNamespace(t,e)}catch(r){if(r instanceof ro&&r.status===409)return;throw r}}};function wa(t){return t.join("�")}var Tk=class{constructor(t,e="",r){this.client=t,this.prefix=e,this.accessDelegation=r}async listTables(t){return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${wa(t.namespace)}/tables`})).data.identifiers}async createTable(t,e){const r={};return this.accessDelegation&&(r["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${wa(t.namespace)}/tables`,body:e,headers:r})).data.metadata}async updateTable(t,e){const r=await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${wa(t.namespace)}/tables/${t.name}`,body:e});return{"metadata-location":r.data["metadata-location"],metadata:r.data.metadata}}async dropTable(t,e){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${wa(t.namespace)}/tables/${t.name}`,query:{purgeRequested:String(e?.purge??!1)}})}async loadTable(t){const e={};return this.accessDelegation&&(e["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${wa(t.namespace)}/tables/${t.name}`,headers:e})).data.metadata}async tableExists(t){const e={};this.accessDelegation&&(e["X-Iceberg-Access-Delegation"]=this.accessDelegation);try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${wa(t.namespace)}/tables/${t.name}`,headers:e}),!0}catch(r){if(r instanceof ro&&r.status===404)return!1;throw r}}async createTableIfNotExists(t,e){try{return await this.createTable(t,e)}catch(r){if(r instanceof ro&&r.status===409)return await this.loadTable({namespace:t.namespace,name:e.name});throw r}}},Ek=class{constructor(t){let e="v1";t.catalogName&&(e+=`/${t.catalogName}`);const r=t.baseUrl.endsWith("/")?t.baseUrl:`${t.baseUrl}/`;this.client=_k({baseUrl:r,auth:t.auth,fetchImpl:t.fetch}),this.accessDelegation=t.accessDelegation?.join(","),this.namespaceOps=new Sk(this.client,e),this.tableOps=new Tk(this.client,e,this.accessDelegation)}async listNamespaces(t){return this.namespaceOps.listNamespaces(t)}async createNamespace(t,e){return this.namespaceOps.createNamespace(t,e)}async dropNamespace(t){await this.namespaceOps.dropNamespace(t)}async loadNamespaceMetadata(t){return this.namespaceOps.loadNamespaceMetadata(t)}async listTables(t){return this.tableOps.listTables(t)}
38async createTable(t,e){return this.tableOps.createTable(t,e)}async updateTable(t,e){return this.tableOps.updateTable(t,e)}async dropTable(t,e){await this.tableOps.dropTable(t,e)}async loadTable(t){return this.tableOps.loadTable(t)}async namespaceExists(t){return this.namespaceOps.namespaceExists(t)}async tableExists(t){return this.tableOps.tableExists(t)}async createNamespaceIfNotExists(t,e){return this.namespaceOps.createNamespaceIfNotExists(t,e)}async createTableIfNotExists(t,e){return this.tableOps.createTableIfNotExists(t,e)}};function so(t){"@babel/helpers - typeof";return so=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},so(t)}function Rk(t,e){if(so(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var a=r.call(t,e);if(so(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function xk(t){var e=Rk(t,"string");return so(e)=="symbol"?e:e+""}function Ak(t,e,r){return(e=xk(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function zv(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),r.push.apply(r,a)}return r}function ce(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?zv(Object(r),!0).forEach(function(a){Ak(t,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):zv(Object(r)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(r,a))})}return t}var ju=class extends Error{constructor(t,e="storage",r,a){super(t),this.__isStorageError=!0,this.namespace=e,this.name=e==="vectors"?"StorageVectorsError":"StorageError",this.status=r,this.statusCode=a}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}};function Mu(t){return typeof t=="object"&&t!==null&&"__isStorageError"in t}var Pf=class extends ju{constructor(t,e,r,a="storage"){super(t,a,e,r),this.name=a==="vectors"?"StorageVectorsApiError":"StorageApiError",this.status=e,this.statusCode=r}toJSON(){return ce({},super.toJSON())}},F0=class extends ju{constructor(t,e,r="storage"){super(t,r),this.name=r==="vectors"?"StorageVectorsUnknownError":"StorageUnknownError",this.originalError=e}};function hu(t,e,r){const a=ce({},t),o=e.toLowerCase();for(const u of Object.keys(a))u.toLowerCase()===o&&delete a[u];return a[o]=r,a}function kk(t){const e={};for(const[r,a]of Object.entries(t))e[r.toLowerCase()]=a;return e}const Ok=t=>t?(...e)=>t(...e):(...e)=>fetch(...e),Ck=t=>{if(typeof t!="object"||t===null)return!1;const e=Object.getPrototypeOf(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},Bf=t=>{if(Array.isArray(t))return t.map(r=>Bf(r));if(typeof t=="function"||t!==Object(t))return t;const e={};return Object.entries(t).forEach(([r,a])=>{const o=r.replace(/([-_][a-z])/gi,u=>u.toUpperCase().replace(/[-_]/g,""));e[o]=Bf(a)}),e},jk=t=>!t||typeof t!="string"||t.length===0||t.length>100||t.trim()!==t||t.includes("/")||t.includes("\\")?!1:/^[\w!.\*'() &$@=;:+,?-]+$/.test(t),Pv=t=>{if(typeof t=="object"&&t!==null){const e=t;if(typeof e.msg=="string")return e.msg;if(typeof e.message=="string")return e.message;if(typeof e.error_description=="string")return e.error_description;if(typeof e.error=="string")return e.error;if(typeof e.error=="object"&&e.error!==null){const r=e.error;if(typeof r.message=="string")return r.message}}return JSON.stringify(t)},Mk=async(t,e,r,a)=>{if(t!==null&&typeof t=="object"&&"json"in t&&typeof t.json=="function"){const o=t;let u=parseInt(String(o.status),10);Number.isFinite(u)||(u=500),o.json().then(c=>{const f=c?.statusCode||c?.code||u+"";e(new Pf(Pv(c),u,f,a))}).catch(()=>{const c=u+"";e(new Pf(o.statusText||`HTTP ${u} error`,u,c,a))})}else e(new F0(Pv(t),t,a))},Nk=(t,e,r,a)=>{const o={method:t,headers:e?.headers||{}};if(t==="GET"||t==="HEAD"||!a)return ce(ce({},o),r);if(Ck(a)){var u;const c=e?.headers||{};let f;for(const[p,g]of Object.entries(c))p.toLowerCase()==="content-type"&&(f=g);o.headers=hu(c,"Content-Type",(u=f)!==null&&u!==void 0?u:"application/json"),o.body=JSON.stringify(a)}else o.body=a;return e?.duplex&&(o.duplex=e.duplex),ce(ce({},o),r)};async function $i(t,e,r,a,o,u,c){return new Promise((f,p)=>{t(r,Nk(e,a,o,u)).then(g=>{if(!g.ok)throw g;if(a?.noResolveJson)return g;if(c==="vectors"){const y=g.headers.get("content-type");if(g.headers.get("content-length")==="0"||g.status===204)return{};if(!y||!y.includes("application/json"))return{}}return g.json()}).then(g=>f(g)).catch(g=>Mk(g,p,a,c))})}function Y0(t="storage"){return{get:async(e,r,a,o)=>$i(e,"GET",r,a,o,void 0,t),post:async(e,r,a,o,u)=>$i(e,"POST",r,o,u,a,t),put:async(e,r,a,o,u)=>$i(e,"PUT",r,o,u,a,t),head:async(e,r,a,o)=>$i(e,"HEAD",r,ce(ce({},a),{},{noResolveJson:!0}),o,void 0,t),remove:async(e,r,a,o,u)=>$i(e,"DELETE",r,o,u,a,t)}}const Lk=Y0("storage"),{get:ao,post:gn,put:$f,head:Dk,remove:gd}=Lk,Jt=Y0("vectors");var Da=class{constructor(t,e={},r,a="storage"){this.shouldThrowOnError=!1,this.url=t,this.headers=kk(e),this.fetch=Ok(r),this.namespace=a}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(t,e){return this.headers=hu(this.headers,t,e),this}async handleOperation(t){var e=this;try{return{data:await t(),error:null}}catch(r){if(e.shouldThrowOnError)throw r;if(Mu(r))return{data:null,error:r};throw r}}};let Q0;Q0=Symbol.toStringTag;var Uk=class{constructor(t,e){this.downloadFn=t,this.shouldThrowOnError=e,this[Q0]="StreamDownloadBuilder",this.promise=null}
38then(t,e){return this.getPromise().then(t,e)}catch(t){return this.getPromise().catch(t)}finally(t){return this.getPromise().finally(t)}getPromise(){return this.promise||(this.promise=this.execute()),this.promise}async execute(){var t=this;try{return{data:(await t.downloadFn()).body,error:null}}catch(e){if(t.shouldThrowOnError)throw e;if(Mu(e))return{data:null,error:e};throw e}}};let J0;J0=Symbol.toStringTag;var zk=class{constructor(t,e){this.downloadFn=t,this.shouldThrowOnError=e,this[J0]="BlobDownloadBuilder",this.promise=null}asStream(){return new Uk(this.downloadFn,this.shouldThrowOnError)}then(t,e){return this.getPromise().then(t,e)}catch(t){return this.getPromise().catch(t)}finally(t){return this.getPromise().finally(t)}getPromise(){return this.promise||(this.promise=this.execute()),this.promise}async execute(){var t=this;try{return{data:await(await t.downloadFn()).blob(),error:null}}catch(e){if(t.shouldThrowOnError)throw e;if(Mu(e))return{data:null,error:e};throw e}}};const Pk={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},Bv={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};var Bk=class extends Da{constructor(t,e={},r,a){super(t,e,a,"storage"),this.bucketId=r}async uploadOrUpdate(t,e,r,a){var o=this;return o.handleOperation(async()=>{let u;const c=ce(ce({},Bv),a);let f=ce(ce({},o.headers),t==="POST"&&{"x-upsert":String(c.upsert)});const p=c.metadata;if(typeof Blob<"u"&&r instanceof Blob?(u=new FormData,u.append("cacheControl",c.cacheControl),p&&u.append("metadata",o.encodeMetadata(p)),u.append("",r)):typeof FormData<"u"&&r instanceof FormData?(u=r,u.has("cacheControl")||u.append("cacheControl",c.cacheControl),p&&!u.has("metadata")&&u.append("metadata",o.encodeMetadata(p))):(u=r,f["cache-control"]=`max-age=${c.cacheControl}`,f["content-type"]=c.contentType,p&&(f["x-metadata"]=o.toBase64(o.encodeMetadata(p))),(typeof ReadableStream<"u"&&u instanceof ReadableStream||u&&typeof u=="object"&&"pipe"in u&&typeof u.pipe=="function")&&!c.duplex&&(c.duplex="half")),a?.headers)for(const[b,w]of Object.entries(a.headers))f=hu(f,b,w);const g=o._removeEmptyFolders(e),y=o._getFinalPath(g),m=await(t=="PUT"?$f:gn)(o.fetch,`${o.url}/object/${y}`,u,ce({headers:f},c?.duplex?{duplex:c.duplex}:{}));return{path:g,id:m.Id,fullPath:m.Key}})}async upload(t,e,r){return this.uploadOrUpdate("POST",t,e,r)}async uploadToSignedUrl(t,e,r,a){var o=this;const u=o._removeEmptyFolders(t),c=o._getFinalPath(u),f=new URL(o.url+`/object/upload/sign/${c}`);return f.searchParams.set("token",e),o.handleOperation(async()=>{let p;const g=ce(ce({},Bv),a);let y=ce(ce({},o.headers),{"x-upsert":String(g.upsert)});const m=g.metadata;if(typeof Blob<"u"&&r instanceof Blob?(p=new FormData,p.append("cacheControl",g.cacheControl),m&&p.append("metadata",o.encodeMetadata(m)),p.append("",r)):typeof FormData<"u"&&r instanceof FormData?(p=r,p.has("cacheControl")||p.append("cacheControl",g.cacheControl),m&&!p.has("metadata")&&p.append("metadata",o.encodeMetadata(m))):(p=r,y["cache-control"]=`max-age=${g.cac
38heControl}`,y["content-type"]=g.contentType,m&&(y["x-metadata"]=o.toBase64(o.encodeMetadata(m))),(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,w]of Object.entries(a.headers))y=hu(y,b,w);return{path:u,fullPath:(await $f(o.fetch,f.toString(),p,ce({headers:y},g?.duplex?{duplex:g.duplex}:{}))).Key}})}async createSignedUploadUrl(t,e){var r=this;return r.handleOperation(async()=>{let a=r._getFinalPath(t);const o=ce({},r.headers);e?.upsert&&(o["x-upsert"]="true");const u=await gn(r.fetch,`${r.url}/object/upload/sign/${a}`,{},{headers:o}),c=new URL(r.url+u.url),f=c.searchParams.get("token");if(!f)throw new ju("No token returned by API");return{signedUrl:c.toString(),path:t,token:f}})}async update(t,e,r){return this.uploadOrUpdate("PUT",t,e,r)}async move(t,e,r){var a=this;return a.handleOperation(async()=>await gn(a.fetch,`${a.url}/object/move`,{bucketId:a.bucketId,sourceKey:t,destinationKey:e,destinationBucket:r?.destinationBucket},{headers:a.headers}))}async copy(t,e,r){var a=this;return a.handleOperation(async()=>({path:(await gn(a.fetch,`${a.url}/object/copy`,{bucketId:a.bucketId,sourceKey:t,destinationKey:e,destinationBucket:r?.destinationBucket},{headers:a.headers})).Key}))}async createSignedUrl(t,e,r){var a=this;return a.handleOperation(async()=>{let o=a._getFinalPath(t);const u=typeof r?.transform=="object"&&r.transform!==null&&Object.keys(r.transform).length>0;let c=await gn(a.fetch,`${a.url}/object/sign/${o}`,ce({expiresIn:e},u?{transform:r.transform}:{}),{headers:a.headers});const f=new URLSearchParams;r?.download&&f.set("download",r.download===!0?"":r.download),r?.cacheNonce!=null&&f.set("cacheNonce",String(r.cacheNonce));const p=f.toString();return{signedUrl:encodeURI(`${a.url}${c.signedURL}${p?`&${p}`:""}`)}})}async createSignedUrls(t,e,r){var a=this;return a.handleOperation(async()=>{const o=await gn(a.fetch,`${a.url}/object/sign/${a.bucketId}`,{expiresIn:e,paths:t},{headers:a.headers}),u=new URLSearchParams;r?.download&&u.set("download",r.download===!0?"":r.download),r?.cacheNonce!=null&&u.set("cacheNonce",String(r.cacheNonce));const c=u.toString();return o.map(f=>ce(ce({},f),{},{signedUrl:f.signedURL?encodeURI(`${a.url}${f.signedURL}${c?`&${c}`:""}`):null}))})}download(t,e,r){const a=typeof e?.transform=="object"&&e.transform!==null&&Object.keys(e.transform).length>0?"render/image/authenticated":"object",o=new URLSearchParams;e?.transform&&this.applyTransformOptsToQuery(o,e.transform),e?.cacheNonce!=null&&o.set("cacheNonce",String(e.cacheNonce));const u=o.toString(),c=this._getFinalPath(t),f=()=>ao(this.fetch,`${this.url}/${a}/${c}${u?`?${u}`:""}`,{headers:this.headers,noResolveJson:!0},r);return new zk(f,this.shouldThrowOnError)}async info(t){var e=this;const r=e._getFinalPath(t);return e.handleOperation(async()=>Bf(await ao(e.fetch,`${e.url}/object/info/${r}`,{headers:e.headers})))}async exists(t){var e=this;const r=e._getFinalPath(t);try{return await Dk(e.fetch,`${e.url}/object/${r}`,{headers:e.headers}),{data:!0,error:null}}catch(o){if(e.shouldThrowOnError)throw o;if(Mu(o)){var a;const u=o instanceof Pf?o.status:o instanceof F0?(a=o.originalError)===null||a===void 0?void 0:a.status:void 0;if(u!==void 0&&[400,404].includes(u))return{data:!1,error:o}}throw o}}getPublicUrl(t,e){const r=this._getFinalPath(t),a=new URLSearchParams;e?.download&&a.set("download",e.download===!0?"":e.download),e?.transform&&this.applyTransformOptsToQuery(a,e.transform),e?.cacheNonce!=null&&a.set("cacheNonce",String(e.cacheNonce));const o=a.toString(),u=typeof e?.transform=="object"&&e.transform!==null&&Object.keys(e.transform).length>0?"render/image":"object";return{data:{publicUrl:encodeURI(`${this.url}/${u}/public/${r}`)+(o?`?${o}`:"")}}}async remove(t){var e=this;return e.handleOperation(async()=>await gd(e.fetch,`${e.url}/object/${e.bucketId}`,{prefixes:t},{headers:e.headers}))}async list(t,e,r){var a=this;return a.handleOperation(async()=>{const o=ce(ce(ce({},Pk),e),{},{prefix:t||""});return await gn(a.fetch,`${a.url}/object/list/${a.bucketId}`,o,{headers:a.headers},r)})}async listV2(t,e){var r=this;return r.handleOperation(async()=>{const a=ce({},t);return await gn(r.fetch,`${r.url}/object/list-v2/${r.bucketId}`,a,{headers:r.headers},e)})}encodeMetadata(t){return JSON.stringify(t)}toBase64(t){return typeof Buffer<"u"?Buffer.from(t).toString("base64"):btoa(t)}_getFinalPath(t){return`${this.bucketId}/${t.replace(/^\/+/,"")}`}_removeEmptyFolders(t){return t.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}applyTransformOptsToQuery(t,e){return e.width&&t.set("width",e.width.toString()),e.height&&t.set("height",e.height.toString()),e.resize&&t.set("resize",e.resize),e.format&&t.set("format",e.format),e.quality&&t.set("qual
38ity",e.quality.toString()),t}};const $k="2.108.2",po={"X-Client-Info":`storage-js/${$k}`};var Ik=class extends Da{constructor(t,e={},r,a){const o=new URL(t);a?.useNewHostname&&/supabase\.(co|in|red)$/.test(o.hostname)&&!o.hostname.includes("storage.supabase.")&&(o.hostname=o.hostname.replace("supabase.","storage.supabase."));const u=o.href.replace(/\/$/,""),c=ce(ce({},po),e);super(u,c,r,"storage")}async listBuckets(t){var e=this;return e.handleOperation(async()=>{const r=e.listBucketOptionsToQueryString(t);return await ao(e.fetch,`${e.url}/bucket${r}`,{headers:e.headers})})}async getBucket(t){var e=this;return e.handleOperation(async()=>await ao(e.fetch,`${e.url}/bucket/${t}`,{headers:e.headers}))}async createBucket(t,e={public:!1}){var r=this;return r.handleOperation(async()=>await gn(r.fetch,`${r.url}/bucket`,{id:t,name:t,type:e.type,public:e.public,file_size_limit:e.fileSizeLimit,allowed_mime_types:e.allowedMimeTypes},{headers:r.headers}))}async updateBucket(t,e){var r=this;return r.handleOperation(async()=>await $f(r.fetch,`${r.url}/bucket/${t}`,{id:t,name:t,public:e.public,file_size_limit:e.fileSizeLimit,allowed_mime_types:e.allowedMimeTypes},{headers:r.headers}))}async emptyBucket(t){var e=this;return e.handleOperation(async()=>await gn(e.fetch,`${e.url}/bucket/${t}/empty`,{},{headers:e.headers}))}async deleteBucket(t){var e=this;return e.handleOperation(async()=>await gd(e.fetch,`${e.url}/bucket/${t}`,{},{headers:e.headers}))}listBucketOptionsToQueryString(t){const e={};return t&&("limit"in t&&(e.limit=String(t.limit)),"offset"in t&&(e.offset=String(t.offset)),t.search&&(e.search=t.search),t.sortColumn&&(e.sortColumn=t.sortColumn),t.sortOrder&&(e.sortOrder=t.sortOrder)),Object.keys(e).length>0?"?"+new URLSearchParams(e).toString():""}},qk=class extends Da{constructor(t,e={},r){const a=t.replace(/\/$/,""),o=ce(ce({},po),e);super(a,o,r,"storage")}async createBucket(t){var e=this;return e.handleOperation(async()=>await gn(e.fetch,`${e.url}/bucket`,{name:t},{headers:e.headers}))}async listBuckets(t){var e=this;return e.handleOperation(async()=>{const r=new URLSearchParams;t?.limit!==void 0&&r.set("limit",t.limit.toString()),t?.offset!==void 0&&r.set("offset",t.offset.toString()),t?.sortColumn&&r.set("sortColumn",t.sortColumn),t?.sortOrder&&r.set("sortOrder",t.sortOrder),t?.search&&r.set("search",t.search);const a=r.toString(),o=a?`${e.url}/bucket?${a}`:`${e.url}/bucket`;return await ao(e.fetch,o,{headers:e.headers})})}async deleteBucket(t){var e=this;return e.handleOperation(async()=>await gd(e.fetch,`${e.url}/bucket/${t}`,{},{headers:e.headers}))}from(t){var e=this;if(!jk(t))throw new ju("Invalid bucket name: File, folder, and bucket names must follow AWS object key naming guidelines and should avoid the use of any other characters.");const r=new Ek({baseUrl:this.url,catalogName:t,auth:{type:"custom",getHeaders:async()=>e.headers},fetch:this.fetch}),a=this.shouldThrowOnError;return new Proxy(r,{get(o,u){const c=o[u];return typeof c!="function"?c:async(...f)=>{try{return{data:await c.apply(o,f),error:null}}catch(p){if(a)throw p;return{data:null,error:p}}}}})}},Hk=class extends Da{constructor(t,e={},r){const a=t.replace(/\/$/,""),o=ce(ce({},po),{},{"Content-Type":"application/json"},e);super(a,o,r,"vectors")}async createIndex(t){var e=this;return e.handleOperation(async()=>await Jt.post(e.fetch,`${e.url}/CreateIndex`,t,{headers:e.headers})||{})}async getIndex(t,e){var r=this;return r.handleOperation(async()=>await Jt.post(r.fetch,`${r.url}/GetIndex`,{vectorBucketName:t,indexName:e},{headers:r.headers}))}async listIndexes(t){var e=this;return e.handleOperation(async()=>await Jt.post(e.fetch,`${e.url}/ListIndexes`,t,{headers:e.headers}))}async deleteIndex(t,e){var r=this;return r.handleOperation(async()=>await Jt.post(r.fetch,`${r.url}/DeleteIndex`,{vectorBucketName:t,indexName:e},{headers:r.headers})||{})}},Gk=class extends Da{constructor(t,e={},r){const a=t.replace(/\/$/,""),o=ce(ce({},po),{},{"Content-Type":"application/json"},e);super(a,o,r,"vectors")}async putVectors(t){var e=this;if(t.vectors.length<1||t.vectors.length>500)throw new Error("Vector batch size must be between 1 and 500 items");return e.handleOperation(async()=>await Jt.post(e.fetch,`${e.url}/PutVectors`,t,{headers:e.headers})||{})}async getVectors(t){var e=this;return e.handleOperation(async()=>await Jt.post(e.fetch,`${e.url}/GetVectors`,t,{headers:e.headers}))}async listVectors(t){var e=this;if(t.segmentCount!==void 0){if(t.segmentCount<1||t.segmentCount>16)throw new Error("segmentCount must be between 1 and 16");
38if(t.segmentIndex!==void 0&&(t.segmentIndex<0||t.segmentIndex>=t.segmentCount))throw new Error(`segmentIndex must be between 0 and ${t.segmentCount-1}`)}return e.handleOperation(async()=>await Jt.post(e.fetch,`${e.url}/ListVectors`,t,{headers:e.headers}))}async queryVectors(t){var e=this;return e.handleOperation(async()=>await Jt.post(e.fetch,`${e.url}/QueryVectors`,t,{headers:e.headers}))}async deleteVectors(t){var e=this;if(t.keys.length<1||t.keys.length>500)throw new Error("Keys batch size must be between 1 and 500 items");return e.handleOperation(async()=>await Jt.post(e.fetch,`${e.url}/DeleteVectors`,t,{headers:e.headers})||{})}},Vk=class extends Da{constructor(t,e={},r){const a=t.replace(/\/$/,""),o=ce(ce({},po),{},{"Content-Type":"application/json"},e);super(a,o,r,"vectors")}async createBucket(t){var e=this;return e.handleOperation(async()=>await Jt.post(e.fetch,`${e.url}/CreateVectorBucket`,{vectorBucketName:t},{headers:e.headers})||{})}async getBucket(t){var e=this;return e.handleOperation(async()=>await Jt.post(e.fetch,`${e.url}/GetVectorBucket`,{vectorBucketName:t},{headers:e.headers}))}async listBuckets(t={}){var e=this;return e.handleOperation(async()=>await Jt.post(e.fetch,`${e.url}/ListVectorBuckets`,t,{headers:e.headers}))}async deleteBucket(t){var e=this;return e.handleOperation(async()=>await Jt.post(e.fetch,`${e.url}/DeleteVectorBucket`,{vectorBucketName:t},{headers:e.headers})||{})}},Kk=class extends Vk{constructor(t,e={}){super(t,e.headers||{},e.fetch)}from(t){return new Fk(this.url,this.headers,t,this.fetch)}async createBucket(t){var e=()=>super.createBucket,r=this;return e().call(r,t)}async getBucket(t){var e=()=>super.getBucket,r=this;return e().call(r,t)}async listBuckets(t={}){var e=()=>super.listBuckets,r=this;return e().call(r,t)}async deleteBucket(t){var e=()=>super.deleteBucket,r=this;return e().call(r,t)}},Fk=class extends Hk{constructor(t,e,r,a){super(t,e,a),this.vectorBucketName=r}async createIndex(t){var e=()=>super.createIndex,r=this;return e().call(r,ce(ce({},t),{},{vectorBucketName:r.vectorBucketName}))}async listIndexes(t={}){var e=()=>super.listIndexes,r=this;return e().call(r,ce(ce({},t),{},{vectorBucketName:r.vectorBucketName}))}async getIndex(t){var e=()=>super.getIndex,r=this;return e().call(r,r.vectorBucketName,t)}async deleteIndex(t){var e=()=>super.deleteIndex,r=this;return e().call(r,r.vectorBucketName,t)}index(t){return new Yk(this.url,this.headers,this.vectorBucketName,t,this.fetch)}},Yk=class extends Gk{constructor(t,e,r,a,o){super(t,e,o),this.vectorBucketName=r,this.indexName=a}async putVectors(t){var e=()=>super.putVectors,r=this;return e().call(r,ce(ce({},t),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async getVectors(t){var e=()=>super.getVectors,r=this;return e().call(r,ce(ce({},t),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async listVectors(t={}){var e=()=>super.listVectors,r=this;return e().call(r,ce(ce({},t),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async queryVectors(t){var e=()=>super.queryVectors,r=this;return e().call(r,ce(ce({},t),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async deleteVectors(t){var e=()=>super.deleteVectors,r=this;return e().call(r,ce(ce({},t),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}},Qk=class extends Ik{constructor(t,e={},r,a){super(t,e,r,a)}from(t){return new Bk(this.url,this.headers,t,this.fetch)}get vectors(){return new Kk(this.url+"/vector",{headers:this.headers,fetch:this.fetch})}get analytics(){return new qk(this.url+"/iceberg",this.headers,this.fetch)}};const X0="2.108.2",ar=30*1e3,Gi=3,mf=Gi*ar,Jk=2*ar,Xk="http://localhost:9999",Zk="supabase.auth.token",Wk={"X-Client-Info":`gotrue-js/${X0}`},If="X-Supabase-Api-Version",Z0={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},eO=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,tO=600*1e3;class io extends Error{constructor(e,r,a){super(e),this.__isAuthError=!0,this.name="AuthError",this.status=r,this.code=a}toJSON(){return{name:this.name,message:this.message,status:this.status,code:this.code}}}function Z(t){return typeof t=="object"&&t!==null&&"__isAuthError"in t}class nO extends io{constructor(e,r,a){super(e,r,a),this.name="AuthApiError",this.status=r,this.co
38de=a}}function rO(t){return Z(t)&&t.name==="AuthApiError"}class _n extends io{constructor(e,r){super(e),this.name="AuthUnknownError",this.originalError=r}}class Nn extends io{constructor(e,r,a,o){super(e,a,o),this.name=r,this.status=a}}class ht extends Nn{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function Gl(t){return Z(t)&&t.name==="AuthSessionMissingError"}class _a extends Nn{constructor(){super("Auth session or user missing","AuthInvalidTokenResponseError",500,void 0)}}class Vl extends Nn{constructor(e){super(e,"AuthInvalidCredentialsError",400,void 0)}}class Kl extends Nn{constructor(e,r=null){super(e,"AuthImplicitGrantRedirectError",500,void 0),this.details=null,this.details=r}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{details:this.details})}}function sO(t){return Z(t)&&t.name==="AuthImplicitGrantRedirectError"}class $v extends Nn{constructor(e,r=null){super(e,"AuthPKCEGrantCodeExchangeError",500,void 0),this.details=null,this.details=r}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{details:this.details})}}class aO extends Nn{constructor(){super("PKCE code verifier not found in storage. This can happen if the auth flow was initiated in a different browser or device, or if the storage was cleared. For SSR frameworks (Next.js, SvelteKit, etc.), use @supabase/ssr on both the server and client to store the code verifier in cookies.","AuthPKCECodeVerifierMissingError",400,"pkce_code_verifier_not_found")}}class qf extends Nn{constructor(e,r){super(e,"AuthRetryableFetchError",r,void 0)}}function Iv(t){return Z(t)&&t.name==="AuthRetryableFetchError"}class qv extends Nn{constructor(e="Refresh result discarded: session state changed mid-flight (e.g., concurrent signOut)"){super(e,"AuthRefreshDiscardedError",409,void 0)}}function iO(t){return Z(t)&&t.name==="AuthRefreshDiscardedError"}class Hv extends Nn{constructor(e,r,a){super(e,"AuthWeakPasswordError",r,"weak_password"),this.reasons=a}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{reasons:this.reasons})}}class fu extends Nn{constructor(e){super(e,"AuthInvalidJwtError",400,"invalid_jwt")}}const du="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),Gv=` 39\r=`.split(""),oO=(()=>{const t=new Array(128);for(let e=0;e<t.length;e+=1)t[e]=-1;for(let e=0;e<Gv.length;e+=1)t[Gv[e].charCodeAt(0)]=-2;for(let e=0;e<du.length;e+=1)t[du[e].charCodeAt(0)]=e;return t})();function Vv(t,e,r){if(t!==null)for(e.queue=e.queue<<8|t,e.queuedBits+=8;e.queuedBits>=6;){const a=e.queue>>e.queuedBits-6&63;r(du[a]),e.queuedBits-=6}else if(e.queuedBits>0)for(e.queue=e.queue<<6-e.queuedBits,e.queuedBits=6;e.queuedBits>=6;){const a=e.queue>>e.queuedBits-6&63;r(du[a]),e.queuedBits-=6}}function W0(t,e,r){const a=oO[t];if(a>-1)for(e.queue=e.queue<<6|a,e.queuedBits+=6;e.queuedBits>=8;)r(e.queue>>e.queuedBits-8&255),e.queuedBits-=8;else{if(a===-2)return;throw new Error(`Invalid Base64-URL character "${String.fromCharCode(t)}"`)}}function Kv(t){const e=[],r=c=>{e.push(String.fromCodePoint(c))},a={utf8seq:0,codepoint:0},o={queue:0,queuedBits:0},u=c=>{cO(c,a,r)};for(let c=0;c<t.length;c+=1)W0(t.charCodeAt(c),o,u);return e.join("")}function lO(t,e){if(t<=127){e(t);return}else if(t<=2047){e(192|t>>6),e(128|t&63);return}else if(t<=65535){e(224|t>>12),e(128|t>>6&63),e(128|t&63);return}else if(t<=1114111){e(240|t>>18),e(128|t>>12&63),e(128|t>>6&63),e(128|t&63);return}throw new Error(`Unrecognized Unicode codepoint: ${t.toString(16)}`)}function uO(t,e){for(let r=0;r<t.length;r+=1){let a=t.charCodeAt(r);if(a>55295&&a<=56319){const o=(a-55296)*1024&65535;a=(t.charCodeAt(r+1)-56320&65535|o)+65536,r+=1}lO(a,e)}}function cO(t,e,r){if(e.utf8seq===0){if(t<=127){r(t);return}for(let a=1;a<6;a+=1)if((t>>7-a&1)===0){e.utf8seq=a;break}if(e.utf8seq===2)e.codepoint=t&31;else if(e.utf8seq===3)e.codepoint=t&15;else if(e.utf8seq===4)e.codepoint=t&7;else throw new Error("Invalid UTF-8 sequence");e.utf8seq-=1}else if(e.utf8seq>0){if(t<=127)throw new Error("Invalid UTF-8 sequence");e.codepoint=e.codepoint<<6|t&63,e.utf8seq-=1,e.utf8seq===0&&r(e.codepoint)}}function Na(t){const e=[],r={queue:0,queuedBits:0},a=o=>{e.push(o)};for(let o=0;o<t.length;o+=1)W0(t.charCodeAt(o),r,a);return new Uint8Array(e)}function hO(t){const e=[];return uO(t,r=>e.push(r)),new Uint8Array(e)}function Es(t){const e=[],r={queue:0,queuedBits:0},a=o=>{e.push(o)};return t.forEach(o=>Vv(o,r,a)),Vv(null,r,a),e.join("")}function fO(t){return Math.round(Date.now()/1e3)+t}function dO(){return Symbol("auth-callback")}const St=()=>typeof window<"u"&&typeof document<"u",ys={tested:!1,writable:!1},ew=()=>
39{if(!St())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(ys.tested)return ys.writable;const t=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(t,t),globalThis.localStorage.removeItem(t),ys.tested=!0,ys.writable=!0}catch{ys.tested=!0,ys.writable=!1}return ys.writable};function pO(t){const e={},r=new URL(t);if(r.hash&&r.hash[0]==="#")try{new URLSearchParams(r.hash.substring(1)).forEach((o,u)=>{e[u]=o})}catch{}return r.searchParams.forEach((a,o)=>{e[o]=a}),e}const tw=t=>t?(...e)=>t(...e):(...e)=>fetch(...e),gO=t=>typeof t=="object"&&t!==null&&"status"in t&&"ok"in t&&"json"in t&&typeof t.json=="function",Aa=async(t,e,r)=>{await t.setItem(e,JSON.stringify(r))},dn=async(t,e)=>{const r=await t.getItem(e);if(!r)return null;try{return JSON.parse(r)}catch{return null}},We=async(t,e)=>{await t.removeItem(e)};class Nu{constructor(){this.promise=new Nu.promiseConstructor((e,r)=>{this.resolve=e,this.reject=r})}}Nu.promiseConstructor=Promise;function Fl(t){const e=t.split(".");if(e.length!==3)throw new fu("Invalid JWT structure");for(let a=0;a<e.length;a++)if(!eO.test(e[a]))throw new fu("JWT not in base64url format");return{header:JSON.parse(Kv(e[0])),payload:JSON.parse(Kv(e[1])),signature:Na(e[2]),raw:{header:e[0],payload:e[1]}}}async function mO(t){return await new Promise(e=>{setTimeout(()=>e(null),t)})}function yO(t,e){return new Promise((a,o)=>{(async()=>{for(let u=0;u<1/0;u++)try{const c=await t(u);if(!e(u,null,c)){a(c);return}}catch(c){if(!e(u,c)){o(c);return}}})()})}function vO(t){return("0"+t.toString(16)).substr(-2)}function bO(){const e=new Uint32Array(56);if(typeof crypto>"u"){const r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",a=r.length;let o="";for(let u=0;u<56;u++)o+=r.charAt(Math.floor(Math.random()*a));return o}return crypto.getRandomValues(e),Array.from(e,vO).join("")}async function wO(t){const r=new TextEncoder().encode(t),a=await crypto.subtle.digest("SHA-256",r),o=new Uint8Array(a);return Array.from(o).map(u=>String.fromCharCode(u)).join("")}async function _O(t){if(!(typeof crypto<"u"&&typeof crypto.subtle<"u"&&typeof TextEncoder<"u"))return console.warn("WebCrypto API is not supported. Code challenge method will default to use plain instead of sha256."),t;const r=await wO(t);return btoa(r).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function vs(t,e,r=!1){const a=bO();let o=a;r&&(o+="/recovery"),await Aa(t,`${e}-code-verifier`,o);const u=await _O(a);return[u,a===u?"plain":"s256"]}const SO=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function TO(t){const e=t.headers.get(If);if(!e||!e.match(SO))return null;try{return new Date(`${e}T00:00:00.0Z`)}catch{return null}}function EO(t){if(!t)throw new Error("Missing exp claim");const e=Math.floor(Date.now()/1e3);if(t<=e)throw new Error("JWT has expired")}function RO(t){switch(t){case"RS256":return{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}};case"ES256":return{name:"ECDSA",namedCurve:"P-256",hash:{name:"SHA-256"}};default:throw new Error("Invalid alg claim")}}const xO=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function nr(t){if(!xO.test(t))throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not")}function pn(t){if(!t.passkey)throw new Error("@supabase/auth-js: the passkey API is experimental and disabled by default. Enable it by passing `auth: { experimental: { passkey: true } }` to createClient (or to the GoTrueClient constructor).")}function yf(){const t={};return new Proxy(t,{get:(e,r)=>{if(r==="__isUserNotAvailableProxy")return!0;if(typeof r=="symbol"){const a=r.toString();if(a==="Symbol(Symbol.toPrimitive)"||a==="Symbol(Symbol.toStringTag)"||a==="Symbol(util.inspect.custom)")return}throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Accessing the "${r}" property of the session object is not supported. Please use getUser() instead.`)},set:(e,r)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Setting the "${r}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)},deleteProperty:(e,r)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Deleting the "${r}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)}})}function AO(t,e){return new Proxy(t,{get:(r,a,o)=>
39{if(a==="__isInsecureUserWarningProxy")return!0;if(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(r,a,o)}return!e.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."),e.value=!0),Reflect.get(r,a,o)}})}function Fv(t){return JSON.parse(JSON.stringify(t))}const bs=t=>{if(typeof t=="object"&&t!==null){const e=t;if(typeof e.msg=="string")return e.msg;if(typeof e.message=="string")return e.message;if(typeof e.error_description=="string")return e.error_description;if(typeof e.error=="string")return e.error}return JSON.stringify(t)},kO=[500,501,502,503,504,520,521,522,523,524,525,526,527,528,529,530];async function Yv(t){var e;if(!gO(t))throw new qf(bs(t),0);if(kO.includes(t.status))throw new qf(bs(t),t.status);let r;try{r=await t.json()}catch(u){throw new _n(bs(u),u)}let a;const o=TO(t);if(o&&o.getTime()>=Z0["2024-01-01"].timestamp&&typeof r=="object"&&r&&typeof r.code=="string"?a=r.code:typeof r=="object"&&r&&typeof r.error_code=="string"&&(a=r.error_code),a){if(a==="weak_password")throw new Hv(bs(r),t.status,((e=r.weak_password)===null||e===void 0?void 0:e.reasons)||[]);if(a==="session_not_found")throw new ht}else if(typeof r=="object"&&r&&typeof r.weak_password=="object"&&r.weak_password&&Array.isArray(r.weak_password.reasons)&&r.weak_password.reasons.length&&r.weak_password.reasons.reduce((u,c)=>u&&typeof c=="string",!0))throw new Hv(bs(r),t.status,r.weak_password.reasons);throw new nO(bs(r),t.status||500,a)}const OO=(t,e,r,a)=>{const o={method:t,headers:e?.headers||{}};return t==="GET"?o:(o.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},e?.headers),o.body=JSON.stringify(a),Object.assign(Object.assign({},o),r))};async function ne(t,e,r,a){var o;const u=Object.assign({},a?.headers);u[If]||(u[If]=Z0["2024-01-01"].name),a?.jwt&&(u.Authorization=`Bearer ${a.jwt}`);const c=(o=a?.query)!==null&&o!==void 0?o:{};a?.redirectTo&&(c.redirect_to=a.redirectTo);const f=Object.keys(c).length?"?"+new URLSearchParams(c).toString():"",p=await CO(t,e,r+f,{headers:u,noResolveJson:a?.noResolveJson},{},a?.body);return a?.xform?a?.xform(p):{data:Object.assign({},p),error:null}}async function CO(t,e,r,a,o,u){const c=OO(e,a,o,u);let f;try{f=await t(r,Object.assign({},c))}catch(p){throw console.error(p),new qf(bs(p),0)}if(f.ok||await Yv(f),a?.noResolveJson)return f;try{return await f.json()}catch(p){await Yv(p)}}function ln(t){var e;let r=null;NO(t)&&(r=Object.assign({},t),t.expires_at||(r.expires_at=fO(t.expires_in)));const a=(e=t.user)!==null&&e!==void 0?e:typeof t?.id=="string"?t:null;return{data:{session:r,user:a},error:null}}function Qv(t){const e=ln(t);return!e.error&&t.weak_password&&typeof t.weak_password=="object"&&Array.isArray(t.weak_password.reasons)&&t.weak_password.reasons.length&&t.weak_password.message&&typeof t.weak_password.message=="string"&&t.weak_password.reasons.reduce((r,a)=>r&&typeof a=="string",!0)&&(e.data.weak_password=t.weak_password),e}function Br(t){var e;return{data:{user:(e=t.user)!==null&&e!==void 0?e:t},error:null}}function jO(t){return{data:t,error:null}}function MO(t){const{action_link:e,email_otp:r,hashed_token:a,redirect_to:o,verification_type:u}=t,c=Cu(t,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),f={action_link:e,email_otp:r,hashed_token:a,redirect_to:o,verification_type:u},p=Object.assign({},c);return{data:{properties:f,user:p},error:null}}function Jv(t){return t}function NO(t){return!!t.access_token&&!!t.refresh_token&&!!t.expires_in}const vf=["global","local","others"];class LO{constructor({url:e="",headers:r={},fetch:a,experimental:o}){this.url=e,this.headers=r,this.fetch=tw(a),this.experimental=o??{},this.mfa={listFactors:this._listFactors.bind(this),deleteFactor:this._deleteFactor.bind(this)},this.oauth={listClients:this._listOAuthClients.bind(this),createClient:this._createOAuthClient.bind(this),getClient:this._getOAuthClient.bind(this),updateClient:this._updateOAuthClient.bind(this),deleteClient:this._deleteOAuthClient.bind(this),regenerateClientSecret:this._regenerateOAuthClientSecret.bind(this)},this.customProviders={listProviders:this._listCustomProviders.bind(this),createProvider:this._createCustomProvider.bind(this),getProvider:this._getCustomProvider.bind(this),updateProvider:this._updateCustomProvider.bind(this),deleteProvider:this._deleteCustomProvider.bind(this)},this.passkey={listPasskeys:this._adminListPasskeys.bind(this),deletePasskey:this._adminDeletePasskey.bind(this)}}async signOut(e,r=vf[0]){if(vf.indexOf(r)<0)throw new Error(`@supabase/auth-js: Parameter scope must be one of ${vf.join(", ")}`);try{return await ne(this.fetch,"POST",`${this.url}/logout?scope=${r}`,{headers:this.headers,jwt:e,noResolveJson:!0}),{data:null,error:null}}catch(a){if(Z(a))return{data:null,error:a};throw a}}async inviteUserByEmail(e,r={}){try{return await ne(this.fetch,"POST",`${this.url}/invite`,{body:{email:e,data:r.data},headers:this.headers,redirectTo:r.redirectTo,xform:Br})}catch(a){if(Z(a))return{data:{user:null},error:a};throw a}}async generateLink(e){try{const{options:r}=e,a=Cu(e,["options"]),o=Object.assign(Object.assign({},a),r);return"newEmail"in a&&(o.new_email=a?.newEmail,delete o.newEmail),await ne(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:o,headers:this.headers,xform:MO,redirectTo:r?.redirectTo})}catch(r){if(Z(r))return{data:{properties:null,user:null},error:r};throw r}}async createUser(e){try{return await ne(this.fetch,"POST",`${this.url}/admin/users`,{body:e,headers:this.headers,xform:Br})}catch(r){if(Z(r))return{data:{user:null},error:r};throw r}}async listUsers(e){var r,a,o,u,c,f,p;try{const g={nextPage:null,lastPage:0,total:0},y=await ne(this.fetch,"GET",`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:(a=(r=e?.page)===null||r===void 0?void 0:r.toString())!==null&&a!==void 0?a:"",per_page:(u=(o=e?.perPage)===null||o===void 0?void 0:o.toString())!==null&&u!==void 0?u:""},xform:Jv});if(y.error)throw y.error;const m=await y.json(),b=(c=y.headers.get("x-total-count"))!==null&&c!==void 0?c:0,w=(p=(f=y.headers.get("link"))===null||f===void 0?void 0:f.split(","))!==null&&p!==void 0?p:[];return w.length>0&&(w.forEach(_=>{const x=parseInt(_.split(";")[0].split("=")[1].substring(0,1)),E=JSON.parse(_.split(";")[1].split("=")[1]);g[`${E}Page`]=x}),g.total=parseInt(b)),{data:Object.assign(Object.assign({},m),g),error:null}}catch(g){if(Z(g))return{data:{users:[]},error:g};throw g}}async getUserById(e){nr(e);try{return await ne(this.fetch,"GET",`${this.url}/admin/users/${e}`,{headers:this.headers,xform:Br})}catch(r){if(Z(r))return{data:{user:null},error:r};throw r}}async updateUserById(e,r){nr(e);try{return await ne(this.fetch,"PUT",`${this.url}/admin/users/${e}`,{body:r,headers:this.headers,xform:Br})}catch(a){if(Z(a))return{data:{user:null},error:a};throw a}}async deleteUser(e,r=!1){nr(e);
39try{return await ne(this.fetch,"DELETE",`${this.url}/admin/users/${e}`,{headers:this.headers,body:{should_soft_delete:r},xform:Br})}catch(a){if(Z(a))return{data:{user:null},error:a};throw a}}async _listFactors(e){nr(e.userId);try{const{data:r,error:a}=await ne(this.fetch,"GET",`${this.url}/admin/users/${e.userId}/factors`,{headers:this.headers,xform:o=>({data:{factors:o},error:null})});return{data:r,error:a}}catch(r){if(Z(r))return{data:null,error:r};throw r}}async _deleteFactor(e){nr(e.userId),nr(e.id);try{return{data:await ne(this.fetch,"DELETE",`${this.url}/admin/users/${e.userId}/factors/${e.id}`,{headers:this.headers}),error:null}}catch(r){if(Z(r))return{data:null,error:r};throw r}}async _listOAuthClients(e){var r,a,o,u,c,f,p;try{const g={nextPage:null,lastPage:0,total:0},y=await ne(this.fetch,"GET",`${this.url}/admin/oauth/clients`,{headers:this.headers,noResolveJson:!0,query:{page:(a=(r=e?.page)===null||r===void 0?void 0:r.toString())!==null&&a!==void 0?a:"",per_page:(u=(o=e?.perPage)===null||o===void 0?void 0:o.toString())!==null&&u!==void 0?u:""},xform:Jv});if(y.error)throw y.error;const m=await y.json(),b=(c=y.headers.get("x-total-count"))!==null&&c!==void 0?c:0,w=(p=(f=y.headers.get("link"))===null||f===void 0?void 0:f.split(","))!==null&&p!==void 0?p:[];return w.length>0&&(w.forEach(_=>{const x=parseInt(_.split(";")[0].split("=")[1].substring(0,1)),E=JSON.parse(_.split(";")[1].split("=")[1]);g[`${E}Page`]=x}),g.total=parseInt(b)),{data:Object.assign(Object.assign({},m),g),error:null}}catch(g){if(Z(g))return{data:{clients:[]},error:g};throw g}}async _createOAuthClient(e){try{return await ne(this.fetch,"POST",`${this.url}/admin/oauth/clients`,{body:e,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(Z(r))return{data:null,error:r};throw r}}async _getOAuthClient(e){try{return await ne(this.fetch,"GET",`${this.url}/admin/oauth/clients/${e}`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(Z(r))return{data:null,error:r};throw r}}async _updateOAuthClient(e,r){try{return await ne(this.fetch,"PUT",`${this.url}/admin/oauth/clients/${e}`,{body:r,headers:this.headers,xform:a=>({data:a,error:null})})}catch(a){if(Z(a))return{data:null,error:a};throw a}}async _deleteOAuthClient(e){try{return await ne(this.fetch,"DELETE",`${this.url}/admin/oauth/clients/${e}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(r){if(Z(r))return{data:null,error:r};throw r}}async _regenerateOAuthClientSecret(e){try{return await ne(this.fetch,"POST",`${this.url}/admin/oauth/clients/${e}/regenerate_secret`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(Z(r))return{data:null,error:r};throw r}}async _listCustomProviders(e){try{const r={};return e?.type&&(r.type=e.type),await ne(this.fetch,"GET",`${this.url}/admin/custom-providers`,{headers:this.headers,query:r,xform:a=>{var o;return{data:{providers:(o=a?.providers)!==null&&o!==void 0?o:[]},error:null}}})}catch(r){if(Z(r))return{data:{providers:[]},error:r};throw r}}async _createCustomProvider(e){try{return await ne(this.fetch,"POST",`${this.url}/admin/custom-providers`,{body:e,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(Z(r))return{data:null,error:r};throw r}}async _getCustomProvider(e){try{return await ne(this.fetch,"GET",`${this.url}/admin/custom-providers/${e}`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(Z(r))return{data:null,error:r};throw r}}async _updateCustomProvider(e,r){try{return await ne(this.fetch,"PUT",`${this.url}/admin/custom-providers/${e}`,{body:r,headers:this.headers,xform:a=>({data:a,error:null})})}catch(a){if(Z(a))return{data:null,error:a};throw a}}async _deleteCustomProvider(e){try{return await ne(this.fetch,"DELETE",`${this.url}/admin/custom-providers/${e}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(r){if(Z(r))return{data:null,error:r};throw r}}async _adminListPasskeys(e){pn(this.experimental),nr(e.userId);try{return await ne(this.fetch,"GET",`${this.url}/admin/users/${e.userId}/passkeys`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(Z(r))return{data:null,error:r};throw r}}async _adminDeletePasskey(e){pn(this.experimental),nr(e.userId),nr(e.passkeyId);
39try{return await ne(this.fetch,"DELETE",`${this.url}/admin/users/${e.userId}/passkeys/${e.passkeyId}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(r){if(Z(r))return{data:null,error:r};throw r}}}function Xv(t={}){return{getItem:e=>t[e]||null,setItem:(e,r)=>{t[e]=r},removeItem:e=>{delete t[e]}}}globalThis&&ew()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug");class DO extends Error{constructor(e){super(e),this.isAcquireTimeout=!0}}function UO(){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 nw(t){if(!/^0x[a-fA-F0-9]{40}$/.test(t))throw new Error(`@supabase/auth-js: Address "${t}" is invalid.`);return t.toLowerCase()}function zO(t){return parseInt(t,16)}function PO(t){const e=new TextEncoder().encode(t);return"0x"+Array.from(e,a=>a.toString(16).padStart(2,"0")).join("")}function BO(t){var e;const{chainId:r,domain:a,expirationTime:o,issuedAt:u=new Date,nonce:c,notBefore:f,requestId:p,resources:g,scheme:y,uri:m,version:b}=t;{if(!Number.isInteger(r))throw new Error(`@supabase/auth-js: Invalid SIWE message field "chainId". Chain ID must be a EIP-155 chain ID. Provided value: ${r}`);if(!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(!m)throw new Error('@supabase/auth-js: Invalid SIWE message field "uri". URI must be provided.');if(b!=="1")throw new Error(`@supabase/auth-js: Invalid SIWE message field "version". Version must be '1'. Provided value: ${b}`);if(!((e=t.statement)===null||e===void 0)&&e.includes(` 40`))throw new Error(`@supabase/auth-js: Invalid SIWE message field "statement". Statement must not include '\\n'. Provided value: ${t.statement}`)}const w=nw(t.address),_=y?`${y}://${a}`:a,x=t.statement?`${t.statement} 41`:"",E=`${_} wants you to sign in with your Ethereum account: 42${w} 43 44${x}`;let A=`URI: ${m} 45Version: ${b} 46Chain ID: ${r}${c?` 47Nonce: ${c}`:""} 48Issued At: ${u.toISOString()}`;if(o&&(A+=` 49Expiration Time: ${o.toISOString()}`),f&&(A+=` 50Not Before: ${f.toISOString()}`),p&&(A+=` 51Request ID: ${p}`),g){let M=` 52Resources:`;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}`);M+=` 53- ${j}`}A+=M}return`${E} 54${A}`}class at extends Error{constructor({message:e,code:r,cause:a,name:o}){var u;super(e,{cause:a}),this.__isWebAuthnError=!0,this.name=(u=o??(a instanceof Error?a.name:void 0))!==null&&u!==void 0?u:"Unknown Error",this.code=r}toJSON(){return{name:this.name,message:this.message,code:this.code}}}class pu extends at{constructor(e,r){super({code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:r,message:e}),this.name="WebAuthnUnknownError",this.originalError=r}}function $O({error:t,options:e}){var r,a,o;const{publicKey:u}=e;if(!u)throw Error("options was missing required publicKey property");if(t.name==="AbortError"){if(e.signal instanceof AbortSignal)return new at({message:"Registration ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:t})}else if(t.name==="ConstraintError"){if(((r=u.authenticatorSelection)===null||r===void 0?void 0:r.requireResidentKey)===!0)return new at({message:"Discoverable credentials were required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT",cause:t});if(e.mediation==="conditional"&&((a=u.authenticatorSelection)===null||a===void 0?void 0:a.userVerification)==="required")return new at({message:"User verification was required during automatic registration but it could not be performed",code:"ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE",cause:t});if(((o=u.authenticatorSelection)===null||o===void 0?void 0:o.userVerification)==="required")return new at({message:"User verification was required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT",cause:t})}else{if(t.name==="InvalidStateError")return new at({message:"The authenticator was previously registered",code:"ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",cause:t});if(t.name==="NotAllowedError")return new at({message:t.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t});if(t.name==="NotSupportedError")return u.pubKeyCredParams.filter(f=>f.type==="public-key").length===0?new at({message:'No entry in pubKeyCredParams was of type "public-key"',code:"ERROR_MALFORMED_PUBKEYCREDPARAMS",cause:t}):new at({message:"No available authenticator supported any of the specified pubKeyCredParams algorithms",code:"ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG",cause:t});if(t.name==="SecurityError"){const c=window.location.hostname;if(rw(c)){if(u.rp.id!==c)return new at({message:`The RP ID "${u.rp.id}
54" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:t})}else return new at({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:t})}else if(t.name==="TypeError"){if(u.user.id.byteLength<1||u.user.id.byteLength>64)return new at({message:"User ID was not between 1 and 64 characters",code:"ERROR_INVALID_USER_ID_LENGTH",cause:t})}else if(t.name==="UnknownError")return new at({message:"The authenticator was unable to process the specified options, or could not create a new credential",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:t})}return new at({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t})}function IO({error:t,options:e}){const{publicKey:r}=e;if(!r)throw Error("options was missing required publicKey property");if(t.name==="AbortError"){if(e.signal instanceof AbortSignal)return new at({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:t})}else{if(t.name==="NotAllowedError")return new at({message:t.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t});if(t.name==="SecurityError"){const a=window.location.hostname;if(rw(a)){if(r.rpId!==a)return new at({message:`The RP ID "${r.rpId}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:t})}else return new at({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:t})}else if(t.name==="UnknownError")return new at({message:"The authenticator was unable to process the specified options, or could not create a new assertion signature",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:t})}return new at({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t})}class qO{createNewAbortSignal(){if(this.controller){const r=new Error("Cancelling existing WebAuthn API call for new one");r.name="AbortError",this.controller.abort(r)}const e=new AbortController;return this.controller=e,e.signal}cancelCeremony(){if(this.controller){const e=new Error("Manually cancelling existing WebAuthn API call");e.name="AbortError",this.controller.abort(e),this.controller=void 0}}}const Hf=new qO;function Zv(t){if(!t)throw new Error("Credential creation options are required");if(typeof PublicKeyCredential<"u"&&"parseCreationOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseCreationOptionsFromJSON=="function")return PublicKeyCredential.parseCreationOptionsFromJSON(t);const{challenge:e,user:r,excludeCredentials:a}=t,o=Cu(t,["challenge","user","excludeCredentials"]),u=Na(e).buffer,c=Object.assign(Object.assign({},r),{id:Na(r.id).buffer}),f=Object.assign(Object.assign({},o),{challenge:u,user:c});if(a&&a.length>0){f.excludeCredentials=new Array(a.length);for(let p=0;p<a.length;p++){const g=a[p];f.excludeCredentials[p]=Object.assign(Object.assign({},g),{id:Na(g.id).buffer,type:g.type||"public-key",transports:g.transports})}}return f}function Wv(t){if(!t)throw new Error("Credential request options are required");if(typeof PublicKeyCredential<"u"&&"parseRequestOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseRequestOptionsFromJSON=="function")return PublicKeyCredential.parseRequestOptionsFromJSON(t);const{challenge:e,allowCredentials:r}=t,a=Cu(t,["challenge","allowCredentials"]),o=Na(e).buffer,u=Object.assign(Object.assign({},a),{challenge:o});if(r&&r.length>0){u.allowCredentials=new Array(r.length);for(let c=0;c<r.length;c++){const f=r[c];u.allowCredentials[c]=Object.assign(Object.assign({},f),{id:Na(f.id).buffer,type:f.type||"public-key",transports:f.transports})}}return u}function eb(t){var e;if("toJSON"in t&&typeof t.toJSON=="function")return t.toJSON();const r=t;return{id:t.id,rawId:t.id,response:{attestationObject:Es(new Uint8Array(t.response.attestationObject)),clientDataJSON:Es(new Uint8Array(t.response.clientDataJSON))},type:"public-key",clientExtensionResults:t.getClientExtensionResults(),authenticatorAttachment:(e=r.authenticatorAttachment)!==null&&e!==void 0?e:void 0}}function tb(t){var e;if("toJSON"in t&&typeof t.toJSON=="function")return t.toJSON();const r=t,a=t.getClientExtensionResults(),o=t.response;return{id:t.id,rawId:t.id,response:{authenticatorData:Es(new Uint8Array(o.authenticatorData)),clientDataJSON:Es(new Uint8Array(o.clientDataJSON)),signature:Es(new Uint8Array(o.signature)),userHandle:o.userHandle?Es(new Uint8Array(o.userHandle)):void 0},type:"public-key",clientExtensionResults:a,authenticatorAttachment:(e=r.authenticatorAttachment)!==null&&e!==void 0?e:void 0}}function rw(t){return t==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(t)}function gu(){var t,e;return!!(St()&&"PublicKeyCredential"in window&&window.PublicKeyCredential&&"credentials"in navigator&&typeof((t=navigator?.credentials)===null||t===void 0?void 0:t.create)=="function"&&typeof((e=navigator?.credentials)===null||e===void 0?void 0:e.get)=="function")}async function sw(t){try{const e=await navigator.credentials.create(t);return e?e instanceof PublicKeyCredential?{data:e,error:null}:{data:null,error:new pu("Browser returned unexpected credential type",e)}:{data:null,error:new pu("Empty credential response",e)}}catch(e){return{data:null,error:$O({error:e,options:t})}}}async function aw(t){try{const e=await navigator.credentials.get(t);return e?e instanceof PublicKeyCredential?{data:e,error:null}:{data:null,error:new pu("Browser returned unexpected credential type",e)}:{data:null,error:new pu("Empty credential response",e)}}catch(e){return{data:null,error:IO({error:e,options:t})}}}const HO={hints:["security-key"],authenticatorSelection:{authenticatorAttachment:"cross-platform",requireResidentKey:!1,userVerification:"preferred",residentKey:"discouraged"},attestation:"direct"},GO={userVerification:"preferred",hints:["security-key"],attestation:"direct"};function mu(...t){const e=o=>o!==null&&typeof o=="object"&&!Array.isArray(o),r=o=>o instanceof ArrayBuffer||ArrayBuffer.isView(o),a={};
54for(const o of t)if(o)for(const u in o){const c=o[u];if(c!==void 0)if(Array.isArray(c))a[u]=c;else if(r(c))a[u]=c;else if(e(c)){const f=a[u];e(f)?a[u]=mu(f,c):a[u]=mu(c)}else a[u]=c}return a}function VO(t,e){return mu(HO,t,e||{})}function KO(t,e){return mu(GO,t,e||{})}class FO{constructor(e){this.client=e,this.enroll=this._enroll.bind(this),this.challenge=this._challenge.bind(this),this.verify=this._verify.bind(this),this.authenticate=this._authenticate.bind(this),this.register=this._register.bind(this)}async _enroll(e){return this.client.mfa.enroll(Object.assign(Object.assign({},e),{factorType:"webauthn"}))}async _challenge({factorId:e,webauthn:r,friendlyName:a,signal:o},u){var c;try{const{data:f,error:p}=await this.client.mfa.challenge({factorId:e,webauthn:r});if(!f)return{data:null,error:p};const g=o??Hf.createNewAbortSignal();if(f.webauthn.type==="create"){const{user:y}=f.webauthn.credential_options.publicKey;if(!y.name){const m=a;if(m)y.name=`${y.id}:${m}`;else{const w=(await this.client.getUser()).data.user,_=((c=w?.user_metadata)===null||c===void 0?void 0:c.name)||w?.email||w?.id||"User";y.name=`${y.id}:${_}`}}y.displayName||(y.displayName=y.name)}switch(f.webauthn.type){case"create":{const y=VO(f.webauthn.credential_options.publicKey,u?.create),{data:m,error:b}=await sw({publicKey:y,signal:g});return m?{data:{factorId:e,challengeId:f.id,webauthn:{type:f.webauthn.type,credential_response:m}},error:null}:{data:null,error:b}}case"request":{const y=KO(f.webauthn.credential_options.publicKey,u?.request),{data:m,error:b}=await aw(Object.assign(Object.assign({},f.webauthn.credential_options),{publicKey:y,signal:g}));return m?{data:{factorId:e,challengeId:f.id,webauthn:{type:f.webauthn.type,credential_response:m}},error:null}:{data:null,error:b}}}}catch(f){return Z(f)?{data:null,error:f}:{data:null,error:new _n("Unexpected error in challenge",f)}}}async _verify({challengeId:e,factorId:r,webauthn:a}){return this.client.mfa.verify({factorId:r,challengeId:e,webauthn:a})}async _authenticate({factorId:e,webauthn:{rpId:r=typeof window<"u"?window.location.hostname:void 0,rpOrigins:a=typeof window<"u"?[window.location.origin]:void 0,signal:o}={}},u){if(!r)return{data:null,error:new io("rpId is required for WebAuthn authentication")};try{if(!gu())return{data:null,error:new _n("Browser does not support WebAuthn",null)};const{data:c,error:f}=await this.challenge({factorId:e,webauthn:{rpId:r,rpOrigins:a},signal:o},{request:u});if(!c)return{data:null,error:f};const{webauthn:p}=c;return this._verify({factorId:e,challengeId:c.challengeId,webauthn:{type:p.type,rpId:r,rpOrigins:a,credential_response:p.credential_response}})}catch(c){return Z(c)?{data:null,error:c}:{data:null,error:new _n("Unexpected error in authenticate",c)}}}async _register({friendlyName:e,webauthn:{rpId:r=typeof window<"u"?window.location.hostname:void 0,rpOrigins:a=typeof window<"u"?[window.location.origin]:void 0,signal:o}={}},u){if(!r)return{data:null,error:new io("rpId is required for WebAuthn registration")};try{if(!gu())return{data:null,error:new _n("Browser does not support WebAuthn",null)};const{data:c,error:f}=await this._enroll({friendlyName:e});if(!c)return await this.client.mfa.listFactors().then(y=>{var m;return(m=y.data)===null||m===void 0?void 0:m.all.find(b=>b.factor_type==="webauthn"&&b.friendly_name===e&&b.status!=="unverified")}).then(y=>y?this.client.mfa.unenroll({factorId:y?.id}):void 0),{data:null,error:f};const{data:p,error:g}=await this._challenge({factorId:c.id,friendlyName:c.friendly_name,webauthn:{rpId:r,rpOrigins:a},signal:o},{create:u});return p?this._verify({factorId:c.id,challengeId:p.challengeId,webauthn:{rpId:r,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 _n("Unexpected error in register",c)}}}}UO();const YO={url:Xk,storageKey:Zk,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:Wk,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1,throwOnError:!1,lockAcquireTimeout:5e3,skipAutoInitialize:!1,experimental:{}},Sa={};class oo{get jwks(){var e,r;return(r=(e=Sa[this.storageKey])===null||e===void 0?void 0:e.jwks)!==null&&r!==void 0?r:{keys:[]}}set jwks(e){Sa[this.storageKey]=Object.assign(Object.assign({},Sa[this.storageKey]),{jwks:e})}get jwks_cached_at(){var e,r;return(r=(e=Sa[this.storageKey])===null||e===void 0?void 0:e.cachedAt)!==null&&r!==void 0?r:Number.MIN_SAFE_INTEGER}set jwks_cached_at(e){Sa[this.storageKey]=Object.assign(Object.assign({},Sa[this.storageKey]),{cachedAt:e})}constructor(e){var r,a,o;this.userStorage=null,this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=null,this.autoRefreshTickTimeout=null,this.visibilityChangedCallback=null,this.refreshingDeferred=null,this.lastRefreshFailure=null,this._sessionRemovalEpoch=0,this.initializePromise=null,this.detectSessionInUrl=!0,this.hasCustomAuthorizationHeader=!1,this.suppressGetSessionWarning=!1,this.lock=null,this.lockAcquired=!1,this.pendingInLock=[],this.broadcastChannel=null,this.logger=console.log;const u=Object.assign(Object.assign({},YO),e);if(this.storageKey=u.storageKey,this.instanceID=(r=oo.nextInstanceID[this.storageKey])!==null&&r!==void 0?r:0,oo.nextInstanceID[this.storageKey]=this.instanceID+1,this.logDebugMessages=!!u.debug,typeof u.debug=="function"&&(this.logger=u.debug),this.instanceID>0&&St()){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 LO({url:u.url,headers:u.headers,fetch:u.fetch,experimental:this.experimental}),this.url=u.url,this.headers=u.headers,this.fetch=tw(u.fetch),this.detectSessionInUrl=u.detectSessionInUrl,this.flowType=u.flowType,this.hasCustomAuthorizationHeader=u.hasCu
54stomAuthorizationHeader,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 FO(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:ew()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=Xv(this.memoryStorage)),u.userStorage&&(this.userStorage=u.userStorage)):(this.memoryStorage={},this.storage=Xv(this.memoryStorage)),St()&&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)}(o=this.broadcastChannel)===null||o===void 0||o.addEventListener("message",async c=>{this._debug("received broadcast notification from other tab or client",c),(c.data.event==="TOKEN_REFRESHED"||c.data.event==="SIGNED_IN")&&(this.lastRefreshFailure=null);try{await this._notifyAllSubscribers(c.data.event,c.data.session,!1)}catch(f){this._debug("#broadcastChannel","error",f)}})}u.skipAutoInitialize||this.initialize().catch(c=>{this._debug("#initialize()","error",c)})}isThrowOnErrorEnabled(){return this.throwOnError}_returnResult(e){if(this.throwOnError&&e&&e.error)throw e.error;return e}_logPrefix(){return`GoTrueClient@${this.storageKey}:${this.instanceID} (${X0}) ${new Date().toISOString()}`}_debug(...e){return this.logDebugMessages&&this.logger(this._logPrefix(),...e),this}async initialize(){return this.initializePromise?await this.initializePromise:(this.initializePromise=(async()=>this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._initialize()):await this._initialize())(),await this.initializePromise)}async _initialize(){var e;try{let r={},a="none";if(St()&&(r=pO(window.location.href),this._isImplicitGrantCallback(r)?a="implicit":await this._isPKCECallback(r)&&(a="pkce")),St()&&this.detectSessionInUrl&&a!=="none"){const{data:o,error:u}=await this._getSessionFromURL(r,a);if(u){if(this._debug("#_initialize()","error detecting session from URL",u),sO(u)){const p=(e=u.details)===null||e===void 0?void 0:e.code;if(p==="identity_already_exists"||p==="identity_not_found"||p==="single_identity_not_deletable")return{error:u}}return{error:u}}const{session:c,redirectType:f}=o;return this._debug("#_initialize()","detected session in URL",c,"redirect type",f),await this._saveSession(c),setTimeout(async()=>{f==="recovery"?await this._notifyAllSubscribers("PASSWORD_RECOVERY",c):await this._notifyAllSubscribers("SIGNED_IN",c)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(r){return Z(r)?this._returnResult({error:r}):this._returnResult({error:new _n("Unexpected error during initialization",r)})}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(e){var r,a,o;try{const u=await ne(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:(a=(r=e?.options)===null||r===void 0?void 0:r.data)!==null&&a!==void 0?a:{},gotrue_meta_security:{captcha_token:(o=e?.options)===null||o===void 0?void 0:o.captchaToken}},xform:ln}),{data:c,error:f}=u;if(f||!c)return this._returnResult({data:{user:null,session:null},error:f});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(e){var r,a,o;try{let u;if("email"in e){const{email:y,password:m,options:b}=e;let w=null,_=null;this.flowType==="pkce"&&([w,_]=await vs(this.storage,this.storageKey)),u=await ne(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:b?.emailRedirectTo,body:{email:y,password:m,data:(r=b?.data)!==null&&r!==void 0?r:{},gotrue_meta_security:{captcha_token:b?.captchaToken},code_challenge:w,code_challenge_method:_},xform:ln})}else if("phone"in e){const{phone:y,password:m,options:b}=e;u=await ne(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:y,password:m,data:(a=b?.data)!==null&&a!==void 0?a:{},channel:(o=b?.channel)!==null&&o!==void 0?o:"sms",gotrue_meta_security:{captcha_token:b?.captchaToken}},xform:ln})}else throw new Vl("You must provide either an email or phone number and a password");const{data:c,error:f}=u;if(f||!c)return await We(this.storage,`${this.storageKey}-code-verifier`),this._returnResult({data:{user:null,session:null},error:f});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 We(this.storage,`${this.storageKey}-code-verifier`),Z(u))return this._returnResult({data:{user:null,session:null},error:u});throw u}}async signInWithPassword(e){try{let r;if("email"in e){const{email:u,password:c,options:f}=e;r=await ne(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:u,password:c,gotrue_meta_security:{captcha_token:f?.captchaToken}},xform:Qv})}else if("phone"in e){const{phone:u,password:c,options:f}=e;r=await ne(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:u,password:c,gotrue_meta_security:{captcha_token:f?.captchaToken}},xform:Qv})}else throw new Vl("You must provide either an email or phone number and a password");const{data:a,error:o}=r;if(o)return this._returnResult({data:{user:null,session:null},error:o});if(!a||!a.session||!a.user){const u=new _a;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:o})}catch(r){if(Z(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async signInWithOAuth(e){var r,a,o,u;return await this._handleProviderSignIn(e.provider,{redirectTo:(r=e.options)===null||r===void 0?void 0:r.redirectTo,scopes:(a=e.options)===null||a===void 0?void 0:a.scopes,queryParams:(o=e.options)===null||o===void 0?void 0:o.queryParams,skipBrowserRedirect:(u=e.options)===null||u===void 0?void 0:u.skipBrowserRedirect})}async exchangeCodeForSession(e){return await this.initializePromise,this.lock!=null?this._acquireLock(this.lockAcquireTimeout,async()=>this._exchangeCodeForSession(e)):this._exchangeCodeForSession(e)}async signInWithWeb3(e){const{chain:r}=e;switch(r){case"ethereum":return await this.signInWithEthereum(e);case"solana":return await this.signInWithSolana(e);default:throw new Error(`@supabase/auth-js: Unsupported chain "${r}"`)}}async signInWithEthereum(e){var r,a,o,u,c,f,p,g,y,m,b;let w,_;if("message"in e)w=e.message,_=e.signature;else{const{chain:x,wallet:E,statement:A,options:M}=e;let j;if(St())if(typeof E=="object")j=E;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 E!="object"||!M?.url)throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");j=E}const z=new URL((r=M?.url)!==null&&r!==void 0?r:window.location.href),Y=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(!Y||Y.length===0)throw new Error("@supabase/auth-js: No accounts available. Please ensure the wallet is connected.");const K=nw(Y[0]);let q=(a=M?.signInWithEthereum)===null||a===void 0?void 0:a.chainId;if(!q){const J=await j.request({method:"eth_chainId"});q=zO(J)}const F={domain:z.host,address:K,statement:A,uri:z.href,version:"1",chainId:q,nonce:(o=M?.signInWithEthereum)===null||o===void 0?void 0:o.nonce,issuedAt:(c=(u=M?.signInWithEthereum)===null||u===void 0?void 0:u.issuedAt)!==null&&c!==void 0?c:new Date,expirationTime:(f=M?.signInWithEthereum)===null||f===void 0?void 0:f.expirationTime,notBefore:(p=M?.signInWithEthereum)===null||p===void 0?void 0:p.notBefore,requestId:(g=M?.signInWithEthereum)===null||g===void 0?void 0:g.requestId,resources:(y=M?.signInWithEthereum)===null||y===void 0?void 0:y.resources};w=BO(F),_=await j.request({method:"personal_sign",params:[PO(w),K]})}try{const{data:x,error:E}=await ne(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"ethereum",message:w,signature:_},!((m=e.options)===null||m===void 0)&&m.captchaToken?{gotrue_meta_security:{captcha_token:(b=e.options)===null||b===void 0?void 0:b.captchaToken}}:null),xform:ln});if(E)throw E;if(!x||!x.session||!x.user){const A=new _a;return this._returnResult({data:{user:null,session:null},error:A})}return x.session&&(await this._saveSession(x.session),await this._notifyAllSubscribers("SIGNED_IN",x.session)),this._returnResult({data:Object.assign({},x),error:E})}
54catch(x){if(Z(x))return this._returnResult({data:{user:null,session:null},error:x});throw x}}async signInWithSolana(e){var r,a,o,u,c,f,p,g,y,m,b,w;let _,x;if("message"in e)_=e.message,x=e.signature;else{const{chain:E,wallet:A,statement:M,options:j}=e;let z;if(St())if(typeof A=="object")z=A;else{const K=window;if("solana"in K&&typeof K.solana=="object"&&("signIn"in K.solana&&typeof K.solana.signIn=="function"||"signMessage"in K.solana&&typeof K.solana.signMessage=="function"))z=K.solana;else throw new Error("@supabase/auth-js: No compatible Solana wallet interface on the window object (window.solana) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'solana', wallet: resolvedUserWallet }) instead.")}else{if(typeof A!="object"||!j?.url)throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");z=A}const Y=new URL((r=j?.url)!==null&&r!==void 0?r:window.location.href);if("signIn"in z&&z.signIn){const K=await z.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},j?.signInWithSolana),{version:"1",domain:Y.host,uri:Y.href}),M?{statement:M}:null));let q;if(Array.isArray(K)&&K[0]&&typeof K[0]=="object")q=K[0];else if(K&&typeof K=="object"&&"signedMessage"in K&&"signature"in K)q=K;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)_=typeof q.signedMessage=="string"?q.signedMessage:new TextDecoder().decode(q.signedMessage),x=q.signature;else throw new Error("@supabase/auth-js: Wallet method signIn() API returned object without signedMessage and signature fields")}else{if(!("signMessage"in z)||typeof z.signMessage!="function"||!("publicKey"in z)||typeof z!="object"||!z.publicKey||!("toBase58"in z.publicKey)||typeof z.publicKey.toBase58!="function")throw new Error("@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API");_=[`${Y.host} wants you to sign in with your Solana account:`,z.publicKey.toBase58(),...M?["",M,""]:[""],"Version: 1",`URI: ${Y.href}`,`Issued At: ${(o=(a=j?.signInWithSolana)===null||a===void 0?void 0:a.issuedAt)!==null&&o!==void 0?o: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}`]:[],...!((f=j?.signInWithSolana)===null||f===void 0)&&f.chainId?[`Chain ID: ${j.signInWithSolana.chainId}`]:[],...!((p=j?.signInWithSolana)===null||p===void 0)&&p.nonce?[`Nonce: ${j.signInWithSolana.nonce}`]:[],...!((g=j?.signInWithSolana)===null||g===void 0)&&g.requestId?[`Request ID: ${j.signInWithSolana.requestId}`]:[],...!((m=(y=j?.signInWithSolana)===null||y===void 0?void 0:y.resources)===null||m===void 0)&&m.length?["Resources",...j.signInWithSolana.resources.map(q=>`- ${q}`)]:[]].join(` 55`);const K=await z.signMessage(new TextEncoder().encode(_),"utf8");if(!K||!(K instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");x=K}}try{const{data:E,error:A}=await ne(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:_,signature:Es(x)},!((b=e.options)===null||b===void 0)&&b.captchaToken?{gotrue_meta_security:{captcha_token:(w=e.options)===null||w===void 0?void 0:w.captchaToken}}:null),xform:ln});if(A)throw A;if(!E||!E.session||!E.user){const M=new _a;return this._returnResult({data:{user:null,session:null},error:M})}return E.session&&(await this._saveSession(E.session),await this._notifyAllSubscribers("SIGNED_IN",E.session)),this._returnResult({data:Object.assign({},E),error:A})}catch(E){if(Z(E))return this._returnResult({data:{user:null,session:null},error:E});throw E}}async _exchangeCodeForSession(e){const r=await dn(this.storage,`${this.storageKey}-code-verifier`),[a,o]=(r??"").split("/");try{if(!a&&this.flowType==="pkce")throw new aO;const{data:u,error:c}=await ne(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:e,code_verifier:a},xform:ln});if(await We(this.storage,`${this.storageKey}-code-verifier`),c)throw c;if(!u||!u.session||!u.user){const f=new _a;return this._returnResult({data:{user:null,session:null,redirectType:null},error:f})}return u.session&&(await this._saveSession(u.session),await this._notifyAllSubscribers(o==="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",u.session)),this._returnResult({data:Object.assign(Object.assign({},u),{redirectType:o??null}),error:c})}catch(u){if(await We(this.storage,`${this.storageKey}-code-verifier`),Z(u))return this._returnResult({data:{user:null,session:null,redirectType:null},error:u});throw u}}async signInWithIdToken(e){try{const{options:r,provider:a,token:o,access_token:u,nonce:c}=e,f=await ne(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:a,id_token:o,access_token:u,nonce:c,gotrue_meta_security:{captcha_token:r?.captchaToken}},xform:ln}),{data:p,error:g}=f;if(g)return this._returnResult({data:{user:null,session:null},error:g});if(!p||!p.session||!p.user){const y=new _a;return this._returnResult({data:{user:null,session:null},error:y})}return p.session&&(await this._saveSession(p.session),await this._notifyAllSubscribers("SIGNED_IN",p.session)),this._returnResult({data:p,error:g})}catch(r){if(Z(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async signInWithOtp(e){var r,a,o,u,c;try{if("email"in e){const{email:f,options:p}=e;let g=null,y=null;this.flowType==="pkce"&&([g,y]=await vs(this.storage,this.storageKey));const{error:m}=await ne(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:f,data:(r=p?.data)!==null&&r!==void 0?r:{},create_user:(a=p?.shouldCreateUser)!==null&&a!==void 0?a:!0,gotrue_meta_security:{captcha_token:p?.captchaToken},code_challenge:g,code_challenge_method:y},redirectTo:p?.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:m})}if("phone"in e){const{phone:f,options:p}=e,{data:g,error:y}=await ne(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:f,data:(o=p?.data)!==null&&o!==void 0?o:{},create_user:(u=p?.shouldCreateUser)!==null&&u!==void 0?u:!0,gotrue_meta_security:{captcha_token:p?.captchaToken},channel:(c=p?.channel)!==null&&c!==void 0?c:"sms"}});return this._returnResult({data:{user:null,session:null,messageId:g?.message_id},error:y})}throw new Vl("You must provide either an email or phone number.")}catch(f){if(await We(this.storage,`${this.storageKey}-code-verifier`),Z(f))return this._returnResult({data:{user:null,session:null},error:f});throw f}}async verifyOtp(e){var r,a;try{let o,u;"options"in e&&(o=(r=e.options)===null||r===void 0?void 0:r.redirectTo,u=(a=e.options)===null||a===void 0?void 0:a.captchaToken);const{data:c,error:f}=await ne(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},e),{gotrue_meta_security:{captcha_token:u}}),redirectTo:o,xform:ln});if(f)throw f;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(e.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",p)),this._returnResult({data:{user:g,session:p},error:null})}catch(o){if(Z(o))return this._returnResult({data:{user:null,session:null},error:o});throw o}}async signInWithSSO(e){var r,a,o,u,c;try{let f=null,p=null;this.flowType==="pkce"&&([f,p]=await vs(this.storage,this.storageKey));const g=await ne(this.fetch,"POST",`${this.url}/sso`,{body:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},"providerId"in e?{provider_id:e.providerId}:null),"domain"in e?{domain:e.domain}:null),{redirect_to:(a=(r=e.options)===null||r===void 0?void 0:r.redirectTo)!==null&&a!==void 0?a:void 0}),!((o=e?.options)===null||o===void 0)&&o.captchaToken?{gotrue_meta_security:{captcha_token:e.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:f,code_challenge_method:p}),headers:this.headers,xform:jO});return!((u=g.data)===null||u===void 0)&&u.url&&St()&&!(!((c=e.options)===null||c===void 0)&&c.skipBrowserRedirect)&&window.location.assign(g.data.url),this._returnResult(g)}catch(f){if(await We(this.storage,`${this.storageKey}-code-verifier`),Z(f))return this._returnResult({data:null,error:f});throw f}}async reauthenticate(){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._reauthenticate()):await this._reauthenticate()}async _reauthenticate(){try{return await this._useSession(async e=>{const{data:{session:r},error:a}=e;if(a)throw a;if(!r)throw new ht;const{error:o}=await ne(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:r.access_token});return this._returnResult({data:{user:null,session:null},error:o})})}catch(e){if(Z(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}}async resend(e){try{const r=`${this.url}/resend`;if("email"in e){const{email:a,type:o,options:u}=e;let c=null,f=null;this.flowType==="pkce"&&([c,f]=await vs(this.storage,this.storageKey));const{error:p}=await ne(this.fetch,"POST",r,{headers:this.headers,body:{email:a,type:o,gotrue_meta_security:{captcha_token:u?.captchaToken},code_challenge:c,code_challenge_method:f},redirectTo:u?.emailRedirectTo});return p&&await We(this.storage,`${this.storageKey}-code-verifier`),this._returnResult({data:{user:null,session:null},error:p})}else if("phone"in e){const{phone:a,type:o,options:u}=e,{data:c,error:f}=await ne(this.fetch,"POST",r,{headers:this.headers,body:{phone:a,type:o,gotrue_meta_security:{captcha_token:u?.captchaToken}}});return this._returnResult({data:{user:null,session:null,messageId:c?.message_id},error:f})}throw new Vl("You must provide either an email or phone number and a type")}catch(r){if(await We(this.storage,`${this.storageKey}-code-verifier`),Z(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async getSession(){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>this._useSession(async e=>e)):await this._useSession(async e=>e)}async _acquireLock(e,r){this._debug("#_acquireLock","begin",e);try{if(this.lockAcquired){const a=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),o=(async()=>(await a,await r()))();return this.pendingInLock.push((async()=>{try{await o}catch{}})()),o}return await this.lock(`lock:${this.storageKey}`,e,async()=>{this._debug("#_acquireLock","lock acquired for storage key",this.storageKey);try{this.lockAcquired=!0;const a=r();for(this.pendingInLock.push((async()=>{try{await a}catch{}})()),await a;this.pendingInLock.length;){const o=[...this.pendingInLock];await Promise.all(o),this.pendingInLock.splice(0,o.length)}return await a}finally{this._debug("#_acquireLock","lock released for storage key",this.storageKey),this.lockAcquired=!1}})}finally{this._debug("#_acquireLock","end")}}async _useSession(e){this._debug("#_useSession","begin");try{const r=await this.__loadSession();return await e(r)}finally{this._debug("#_useSession","end")}}async __loadSession(){this._debug("#__loadSession()","begin"),this.lock!=null&&!this.lockAcquired&&this._debug("#__loadSession()","used outside of an acquired lock!",new Error().stack);try{let e=null;const r=await dn(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",r),r!==null&&(this._isValidSession(r)?e=r:(this._debug("#getSession()","session from storage is not val
55id"),await this._removeSession())),!e)return{data:{session:null},error:null};const a=e.expires_at?e.expires_at*1e3-Date.now()<mf:!1;if(this._debug("#__loadSession()",`session has${a?"":" not"} expired`,"expires_at",e.expires_at),!a){if(this.userStorage){const c=await dn(this.userStorage,this.storageKey+"-user");c?.user?e.user=c.user:e.user=yf()}if(this.storage.isServer&&e.user&&!e.user.__isUserNotAvailableProxy){const c={value:this.suppressGetSessionWarning};e.user=AO(e.user,c),c.value&&(this.suppressGetSessionWarning=!0)}return{data:{session:e},error:null}}const{data:o,error:u}=await this._callRefreshToken(e.refresh_token);if(u){if(!!(e.expires_at&&e.expires_at*1e3>Date.now())){const f=await dn(this.storage,this.storageKey);if(f&&f.refresh_token===e.refresh_token)return this._returnResult({data:{session:e},error:null})}return this._returnResult({data:{session:null},error:u})}return this._returnResult({data:{session:o},error:null})}finally{this._debug("#__loadSession()","end")}}async getUser(e){if(e)return await this._getUser(e);await this.initializePromise;let r;return this.lock!=null?r=await this._acquireLock(this.lockAcquireTimeout,async()=>await this._getUser()):r=await this._getUser(),r.data.user&&(this.suppressGetSessionWarning=!0),r}async _getUser(e){try{return e?await ne(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:e,xform:Br}):await this._useSession(async r=>{var a,o,u;const{data:c,error:f}=r;if(f)throw f;return!(!((a=c.session)===null||a===void 0)&&a.access_token)&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new ht}:await ne(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:(u=(o=c.session)===null||o===void 0?void 0:o.access_token)!==null&&u!==void 0?u:void 0,xform:Br})})}catch(r){if(Z(r))return Gl(r)&&(await this._removeSession(),await We(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({data:{user:null},error:r});throw r}}async updateUser(e,r={}){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._updateUser(e,r)):await this._updateUser(e,r)}async _updateUser(e,r={}){try{return await this._useSession(async a=>{const{data:o,error:u}=a;if(u)throw u;if(!o.session)throw new ht;const c=o.session;let f=null,p=null;this.flowType==="pkce"&&e.email!=null&&([f,p]=await vs(this.storage,this.storageKey));const{data:g,error:y}=await ne(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:r?.emailRedirectTo,body:Object.assign(Object.assign({},e),{code_challenge:f,code_challenge_method:p}),jwt:c.access_token,xform:Br});if(y)throw y;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 We(this.storage,`${this.storageKey}-code-verifier`),Z(a))return this._returnResult({data:{user:null},error:a});throw a}}async setSession(e){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._setSession(e)):await this._setSession(e)}async _setSession(e){try{if(!e.access_token||!e.refresh_token)throw new ht;const r=Date.now()/1e3;let a=r,o=!0,u=null;const{payload:c}=Fl(e.access_token);if(c.exp&&(a=c.exp,o=a<=r),o){const{data:f,error:p}=await this._callRefreshToken(e.refresh_token);if(p)return this._returnResult({data:{user:null,session:null},error:p});if(!f)return{data:{user:null,session:null},error:null};u=f}else{const{data:f,error:p}=await this._getUser(e.access_token);if(p)return this._returnResult({data:{user:null,session:null},error:p});u={access_token:e.access_token,refresh_token:e.refresh_token,user:f.user,token_type:"bearer",expires_in:a-r,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(r){if(Z(r))return this._returnResult({data:{session:null,user:null},error:r});throw r}}async refreshSession(e){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._refreshSession(e)):await this._refreshSession(e)}async _refreshSession(e){try{return await this._useSession(async r=>{var a;if(!e){const{data:c,error:f}=r;if(f)throw f;e=(a=c.session)!==null&&a!==void 0?a:void 0}if(!e?.refresh_token)throw new ht;const{data:o,error:u}=await this._callRefreshToken(e.refresh_token);return u?this._returnResult({data:{user:null,session:null},error:u}):o?this._returnResult({data:{user:o.user,session:o},error:null}):this._returnResult({data:{user:null,session:null},error:null})})}catch(r){if(Z(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async _getSessionFromURL(e,r){var a;try{if(!St())throw new Kl("No browser detected.");
55if(e.error||e.error_description||e.error_code)throw new Kl(e.error_description||"Error in URL with unspecified error_description",{error:e.error||"unspecified_error",code:e.error_code||"unspecified_code"});switch(r){case"implicit":if(this.flowType==="pkce")throw new $v("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new Kl("Not a valid implicit grant flow url.");break;default:}if(r==="pkce"){if(this._debug("#_initialize()","begin","is PKCE flow",!0),!e.code)throw new $v("No code detected.");const{data:j,error:z}=await this._exchangeCodeForSession(e.code);if(z)throw z;const Y=new URL(window.location.href);return Y.searchParams.delete("code"),window.history.replaceState(window.history.state,"",Y.toString()),{data:{session:j.session,redirectType:(a=j.redirectType)!==null&&a!==void 0?a:null},error:null}}const{provider_token:o,provider_refresh_token:u,access_token:c,refresh_token:f,expires_in:p,expires_at:g,token_type:y}=e;if(!c||!p||!f||!y)throw new Kl("No session defined in URL");const m=Math.round(Date.now()/1e3),b=parseInt(p);let w=m+b;g&&(w=parseInt(g));const _=w-m;_*1e3<=ar&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${_}s, should have been closer to ${b}s`);const x=w-b;m-x>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",x,w,m):m-x<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",x,w,m);const{data:E,error:A}=await this._getUser(c);if(A)throw A;const M={provider_token:o,provider_refresh_token:u,access_token:c,expires_in:b,expires_at:w,refresh_token:f,token_type:y,user:E.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),this._returnResult({data:{session:M,redirectType:e.type},error:null})}catch(o){if(Z(o))return this._returnResult({data:{session:null,redirectType:null},error:o});throw o}}_isImplicitGrantCallback(e){return typeof this.detectSessionInUrl=="function"?this.detectSessionInUrl(new URL(window.location.href),e):!!(e.access_token||e.error||e.error_description||e.error_code)}async _isPKCECallback(e){const r=await dn(this.storage,`${this.storageKey}-code-verifier`);return!!(e.code&&r)}async signOut(e={scope:"global"}){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._signOut(e)):await this._signOut(e)}async _signOut({scope:e}={scope:"global"}){return await this._useSession(async r=>{var a;const{data:o,error:u}=r;if(u&&!Gl(u))return this._returnResult({error:u});const c=(a=o.session)===null||a===void 0?void 0:a.access_token;if(c){const{error:f}=await this.admin.signOut(c,e);if(f&&!(rO(f)&&(f.status===404||f.status===401||f.status===403)||Gl(f)))return this._returnResult({error:f})}return e!=="others"&&(await this._removeSession(),await We(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({error:null})})}onAuthStateChange(e){const r=dO(),a={id:r,callback:e,unsubscribe:()=>{this._debug("#unsubscribe()","state change callback with id removed",r),this.stateChangeEmitters.delete(r)}};return this._debug("#onAuthStateChange()","registered callback with id",r),this.stateChangeEmitters.set(r,a),(async()=>(await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>{this._emitInitialSession(r)}):await this._emitInitialSession(r)))(),{data:{subscription:a}}}async _emitInitialSession(e){return await this._useSession(async r=>{var a,o;try{const{data:{session:u},error:c}=r;if(c)throw c;await((a=this.stateChangeEmitters.get(e))===null||a===void 0?void 0:a.callback("INITIAL_SESSION",u)),this._debug("INITIAL_SESSION","callback id",e,"session",u)}catch(u){await((o=this.stateChangeEmitters.get(e))===null||o===void 0?void 0:o.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",e,"error",u),Gl(u)?console.warn(u):console.error(u)}})}async resetPasswordForEmail(e,r={}){let a=null,o=null;this.flowType==="pkce"&&([a,o]=await vs(this.storage,this.storageKey,!0));try{return await ne(this.fetch,"POST",`${this.url}/recover`,{body:{email:e,code_challenge:a,code_challenge_method:o,gotrue_meta_security:{captcha_token:r.captchaToken}},headers:this.headers,redirectTo:r.redirectTo})}catch(u){if(await We(this.storage,`${this.storageKey}-code-verifier`),Z(u))return this._returnResult({data:null,error:u});throw u}}async getUserIdentities(){var e;try{const{data:r,error:a}=await this.getUser();if(a)throw a;return this._returnResult({data:{identities:(e=r.user.identities)!==null&&e!==void 0?e:[]},error:null})}catch(r){if(Z(r))return this._returnResult({data:null,error:r});throw r}}async linkIdentity(e){return"token"in e?this.linkIdentityIdToken(e):this.linkIdentityOAuth(e)}async linkIdentityOAuth(e){var r;try{const{data:a,error:o}=await this._useSession(async u=>{var c,f,p,g,y;const{data:m,error:b}=u;if(b)throw b;const w=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,e.provider,{redirectTo:(c=e.options)===null||c===void 0?void 0:c.redirectTo,scopes:(f=e.options)===null||f===void 0?void 0:f.scopes,queryParams:(p=e.options)===null||p===void 0?void 0:p.queryParams,skipBrowserRedirect:!0});return await ne(this.fetch,"GET",w,{headers:this.headers,jwt:(y=(g=m.session)===null||g===void 0?void 0:g.access_token)!==null&&y!==void 0?y:void 0})});if(o)throw o;return St()&&!(!((r=e.options)===null||r===void 0)&&r.skipBrowserRedirect)&&window.location.assign(a?.url),this._returnResult({data:{provider:e.provider,url:a?.url},error:null})}catch(a){if(Z(a))return this._returnResult({data:{provider:e.provider,url:null},error:a});throw a}}async linkIdentityIdToken(e){return await this._useSession(async r=>{var a;try{const{error:o,data:{session:u}}=r;if(o)throw o;const{options:c,provider:f,token:p,access_token:g,nonce:y}=e,m=await ne(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:f,id_token:p,access_token:g,nonce:y,link_identity:!0,gotrue_meta_security:{captcha_token:c?.captchaToken}},xform:ln}),{data:b,error:w}=m;return w?this._returnResult({data:{user:null,session:null},error:w}
55):!b||!b.session||!b.user?this._returnResult({data:{user:null,session:null},error:new _a}):(b.session&&(await this._saveSession(b.session),await this._notifyAllSubscribers("USER_UPDATED",b.session)),this._returnResult({data:b,error:w}))}catch(o){if(await We(this.storage,`${this.storageKey}-code-verifier`),Z(o))return this._returnResult({data:{user:null,session:null},error:o});throw o}})}async unlinkIdentity(e){try{return await this._useSession(async r=>{var a,o;const{data:u,error:c}=r;if(c)throw c;return await ne(this.fetch,"DELETE",`${this.url}/user/identities/${e.identity_id}`,{headers:this.headers,jwt:(o=(a=u.session)===null||a===void 0?void 0:a.access_token)!==null&&o!==void 0?o:void 0})})}catch(r){if(Z(r))return this._returnResult({data:null,error:r});throw r}}async _refreshAccessToken(e){const r="#_refreshAccessToken()";this._debug(r,"begin");try{const a=Date.now();return await yO(async o=>(o>0&&await mO(200*Math.pow(2,o-1)),this._debug(r,"refreshing attempt",o),await ne(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:e},headers:this.headers,xform:ln})),(o,u)=>{const c=200*Math.pow(2,o);return u&&Iv(u)&&Date.now()+c-a<ar})}catch(a){if(this._debug(r,"error",a),Z(a))return this._returnResult({data:{session:null,user:null},error:a});throw a}finally{this._debug(r,"end")}}_isValidSession(e){return typeof e=="object"&&e!==null&&"access_token"in e&&"refresh_token"in e&&"expires_at"in e}async _handleProviderSignIn(e,r){const a=await this._getUrlForProvider(`${this.url}/authorize`,e,{redirectTo:r.redirectTo,scopes:r.scopes,queryParams:r.queryParams});return this._debug("#_handleProviderSignIn()","provider",e,"options",r,"url",a),St()&&!r.skipBrowserRedirect&&window.location.assign(a),{data:{provider:e,url:a},error:null}}async _recoverAndRefresh(){var e,r;const a="#_recoverAndRefresh()";this._debug(a,"begin");try{const o=await dn(this.storage,this.storageKey);if(o&&this.userStorage){let c=await dn(this.userStorage,this.storageKey+"-user");!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!c&&(c={user:o.user},await Aa(this.userStorage,this.storageKey+"-user",c)),o.user=(e=c?.user)!==null&&e!==void 0?e:yf()}else if(o&&!o.user&&!o.user){const c=await dn(this.storage,this.storageKey+"-user");c&&c?.user?(o.user=c.user,await We(this.storage,this.storageKey+"-user"),await Aa(this.storage,this.storageKey,o)):o.user=yf()}if(this._debug(a,"session from storage",o),!this._isValidSession(o)){this._debug(a,"session is not valid"),o!==null&&await this._removeSession();return}const u=((r=o.expires_at)!==null&&r!==void 0?r:1/0)*1e3-Date.now()<mf;if(this._debug(a,`session has${u?"":" not"} expired with margin of ${mf}s`),u){if(this.autoRefreshToken&&o.refresh_token){const{error:c}=await this._callRefreshToken(o.refresh_token);c&&(iO(c)?this._debug(a,"refresh discarded by commit guard",c):this._debug(a,"refresh failed",c))}}else if(o.user&&o.user.__isUserNotAvailableProxy===!0)try{const{data:c,error:f}=await this._getUser(o.access_token);!f&&c?.user?(o.user=c.user,await this._saveSession(o),await this._notifyAllSubscribers("SIGNED_IN",o)):this._debug(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",o)}catch(o){this._debug(a,"error",o),console.error(o);return}finally{this._debug(a,"end")}}async _callRefreshToken(e){var r,a;if(!e)throw new ht;if(this.refreshingDeferred)return this.refreshingDeferred.promise;if(this.lastRefreshFailure&&this.lastRefreshFailure.refreshToken===e&&Date.now()<this.lastRefreshFailure.expiresAt)return this._debug("#_callRefreshToken()","returning cached failure (cooldown active)"),this.lastRefreshFailure.result;const o="#_callRefreshToken()";this._debug(o,"begin");try{this.refreshingDeferred=new Nu;const u=await dn(this.storage,this.storageKey),{data:c,error:f}=await this._refreshAccessToken(e);if(f)throw f;if(!c.session)throw new ht;const p=await dn(this.storage,this.storageKey);if(u!==null&&(p===null||p.refresh_token!==u.refresh_token)){this._debug(o,"commit guard: storage changed since refresh started, discarding rotated tokens",{startedWith:"present",nowHolds:p?"replaced":"cleared"});const b={data:null,error:new qv};return this.refreshingDeferred.resolve(b),b}const y=this._sessionRemovalEpoch;if(await this._saveSession(c.session),this._sessionRemovalEpoch!==y){this._debug(o,"commit guard (post-save): _removeSession ran during _saveSession, und
55oing write"),await We(this.storage,this.storageKey),this.userStorage&&await We(this.userStorage,this.storageKey+"-user");const b={data:null,error:new qv};return this.refreshingDeferred.resolve(b),b}await this._notifyAllSubscribers("TOKEN_REFRESHED",c.session);const m={data:c.session,error:null};return this.lastRefreshFailure=null,this.refreshingDeferred.resolve(m),m}catch(u){if(this._debug(o,"error",u),Z(u)){const c={data:null,error:u};if(!Iv(u)){const f=await dn(this.storage,this.storageKey);!!(f?.expires_at&&f.expires_at*1e3>Date.now())?this._debug(o,"proactive refresh failed, access token still valid â preserving session"):await this._removeSession()}return this.lastRefreshFailure={refreshToken:e,result:c,expiresAt:Date.now()+Jk},(r=this.refreshingDeferred)===null||r===void 0||r.resolve(c),c}throw(a=this.refreshingDeferred)===null||a===void 0||a.reject(u),u}finally{this.refreshingDeferred=null,this._debug(o,"end")}}async _notifyAllSubscribers(e,r,a=!0){const o=`#_notifyAllSubscribers(${e})`;this._debug(o,"begin",r,`broadcast = ${a}`);try{this.broadcastChannel&&a&&this.broadcastChannel.postMessage({event:e,session:r});const u=[],c=Array.from(this.stateChangeEmitters.values()).map(async f=>{try{await f.callback(e,r)}catch(p){u.push(p)}});if(await Promise.all(c),u.length>0){for(let f=0;f<u.length;f+=1)console.error(u[f]);throw u[0]}}finally{this._debug(o,"end")}}async _saveSession(e){this._debug("#_saveSession()",e),this.suppressGetSessionWarning=!0,await We(this.storage,`${this.storageKey}-code-verifier`);const r=Object.assign({},e),a=r.user&&r.user.__isUserNotAvailableProxy===!0;if(this.userStorage){!a&&r.user&&await Aa(this.userStorage,this.storageKey+"-user",{user:r.user});const o=Object.assign({},r);delete o.user;const u=Fv(o);await Aa(this.storage,this.storageKey,u)}else{const o=Fv(r);await Aa(this.storage,this.storageKey,o)}}async _removeSession(){this._sessionRemovalEpoch+=1,this._debug("#_removeSession()"),this.lastRefreshFailure=null,this.suppressGetSessionWarning=!1,await We(this.storage,this.storageKey),await We(this.storage,this.storageKey+"-code-verifier"),await We(this.storage,this.storageKey+"-user"),this.userStorage&&await We(this.userStorage,this.storageKey+"-user"),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const e=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{e&&St()&&window?.removeEventListener&&window.removeEventListener("visibilitychange",e)}catch(r){console.error("removing visibilitychange callback failed",r)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const e=setInterval(()=>this._autoRefreshTokenTick(),ar);this.autoRefreshTicker=e,e&&typeof e=="object"&&typeof e.unref=="function"?e.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(e);const r=setTimeout(async()=>{await this.initializePromise,await this._autoRefreshTokenTick()},0);this.autoRefreshTickTimeout=r,r&&typeof r=="object"&&typeof r.unref=="function"?r.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(r)}async _stopAutoRefresh(){this._debug("#_stopAutoRefresh()");const e=this.autoRefreshTicker;this.autoRefreshTicker=null,e&&clearInterval(e);const r=this.autoRefreshTickTimeout;this.autoRefreshTickTimeout=null,r&&clearTimeout(r)}async startAutoRefresh(){this._removeVisibilityChangedCallback(),await this._startAutoRefresh()}async stopAutoRefresh(){this._removeVisibilityChangedCallback(),await this._stopAutoRefresh()}async dispose(){var e;this._removeVisibilityChangedCallback(),await this._stopAutoRefresh(),(e=this.broadcastChannel)===null||e===void 0||e.close(),this.broadcastChannel=null,this.stateChangeEmitters.clear()}async _autoRefreshTokenTick(){if(this._debug("#_autoRefreshTokenTick()","begin"),this.lock!=null){try{await this._acquireLock(0,async()=>{try{const e=Date.now();try{return await this._useSession(async r=>{const{data:{session:a}}=r;if(!a||!a.refresh_token||!a.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const o=Math.floor((a.expires_at*1e3-e)/ar);this._debug("#_autoRefreshTokenTick()",`access token expires in ${o} ticks, a tick lasts ${ar}ms, refresh threshold is ${Gi} ticks`),o<=Gi&&await this._callRefreshToken(a.refresh_token)})}catch(r){console.error("Auto refresh tick failed with error. This is likely a transient error.",r)}}finally{this._debug("#_autoRefreshTokenTick()","end")}})}catch(e){if(e instanceof DO)this._debug("auto refresh token tick lock not available");else throw e}return}if(this.refreshingDeferred!==null){this._debug("#_autoRefreshTokenTick()","refresh already in flight, skipping");return}try{const e=Date.now();try{await this._useSession(async r=>{const{data:{session:a}}=r;if(!a||!a.refresh_token||!a.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const o=Math.floor((a.expires_at*1e3-e)/ar);this._debug("#_autoRefreshTokenTick()",`access token expires in ${o} ticks, a tick lasts ${ar}ms, refresh threshold is ${Gi} ticks`),o<=Gi&&await this._callRefreshToken(a.refresh_token)})}catch(r){console.error("Auto refresh tick failed with error. This is likely a transient error.",r)}}finally{this._debug("#_autoRefreshTokenTick()","end")}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!St()||!window?.addEventListener)return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=async()=>{try{await this._onVisibilityChanged(!1)}catch(e){this._debug("#visibilityChangedCallback","error",e)}},window?.addEventListener("visibilitychange",this.visibilityChangedCallback),await this._onVisibilityChanged(!0)}catch(e){console.error("_handleVisibilityChange",e)}}async _onVisibilityChanged(e){const r=`#_onVisibilityChanged(${e})`;if(this._debug(r,"visibilityState",document.visibilityState),document.visibilityState==="visible"){if(this.autoRefreshToken&&this._startAutoRefresh(),!e)if(await this.initializePromise,this.lock!=null)await this._acquireLock(this.lockAcquireTimeout,async()=>
55{if(document.visibilityState!=="visible"){this._debug(r,"acquired the lock to recover the session, but the browser visibilityState is no longer visible, aborting");return}await this._recoverAndRefresh()});else{if(document.visibilityState!=="visible"){this._debug(r,"visibilityState is no longer visible, skipping recovery");return}await this._recoverAndRefresh()}}else document.visibilityState==="hidden"&&this.autoRefreshToken&&this._stopAutoRefresh()}async _getUrlForProvider(e,r,a){const o=[`provider=${encodeURIComponent(r)}`];if(a?.redirectTo&&o.push(`redirect_to=${encodeURIComponent(a.redirectTo)}`),a?.scopes&&o.push(`scopes=${encodeURIComponent(a.scopes)}`),this.flowType==="pkce"){const[u,c]=await vs(this.storage,this.storageKey),f=new URLSearchParams({code_challenge:`${encodeURIComponent(u)}`,code_challenge_method:`${encodeURIComponent(c)}`});o.push(f.toString())}if(a?.queryParams){const u=new URLSearchParams(a.queryParams);o.push(u.toString())}return a?.skipBrowserRedirect&&o.push(`skip_http_redirect=${a.skipBrowserRedirect}`),`${e}?${o.join("&")}`}async _unenroll(e){try{return await this._useSession(async r=>{var a;const{data:o,error:u}=r;return u?this._returnResult({data:null,error:u}):await ne(this.fetch,"DELETE",`${this.url}/factors/${e.factorId}`,{headers:this.headers,jwt:(a=o?.session)===null||a===void 0?void 0:a.access_token})})}catch(r){if(Z(r))return this._returnResult({data:null,error:r});throw r}}async _enroll(e){try{return await this._useSession(async r=>{var a,o;const{data:u,error:c}=r;if(c)return this._returnResult({data:null,error:c});const f=Object.assign({friendly_name:e.friendlyName,factor_type:e.factorType},e.factorType==="phone"?{phone:e.phone}:e.factorType==="totp"?{issuer:e.issuer}:{}),{data:p,error:g}=await ne(this.fetch,"POST",`${this.url}/factors`,{body:f,headers:this.headers,jwt:(a=u?.session)===null||a===void 0?void 0:a.access_token});return g?this._returnResult({data:null,error:g}):(e.factorType==="totp"&&p.type==="totp"&&(!((o=p?.totp)===null||o===void 0)&&o.qr_code)&&(p.totp.qr_code=`data:image/svg+xml;utf-8,${p.totp.qr_code}`),this._returnResult({data:p,error:null}))})}catch(r){if(Z(r))return this._returnResult({data:null,error:r});throw r}}async _verify(e){const r=async()=>{try{return await this._useSession(async a=>{var o;const{data:u,error:c}=a;if(c)return this._returnResult({data:null,error:c});const f=Object.assign({challenge_id:e.challengeId},"webauthn"in e?{webauthn:Object.assign(Object.assign({},e.webauthn),{credential_response:e.webauthn.type==="create"?eb(e.webauthn.credential_response):tb(e.webauthn.credential_response)})}:{code:e.code}),{data:p,error:g}=await ne(this.fetch,"POST",`${this.url}/factors/${e.factorId}/verify`,{body:f,headers:this.headers,jwt:(o=u?.session)===null||o===void 0?void 0:o.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,r):r()}async _challenge(e){const r=async()=>{try{return await this._useSession(async a=>{var o;const{data:u,error:c}=a;if(c)return this._returnResult({data:null,error:c});const f=await ne(this.fetch,"POST",`${this.url}/factors/${e.factorId}/challenge`,{body:e,headers:this.headers,jwt:(o=u?.session)===null||o===void 0?void 0:o.access_token});if(f.error)return f;const{data:p}=f;if(p.type!=="webauthn")return{data:p,error:null};switch(p.webauthn.type){case"create":return{data:Object.assign(Object.assign({},p),{webauthn:Object.assign(Object.assign({},p.webauthn),{credential_options:Object.assign(Object.assign({},p.webauthn.credential_options),{publicKey:Zv(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:Wv(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,r):r()}async _challengeAndVerify(e){const{data:r,error:a}=await this._challenge({factorId:e.factorId});return a?this._returnResult({data:null,error:a}):await this._verify({factorId:e.factorId,challengeId:r.id,code:e.code})}async _listFactors(){var e;const{data:{user:r},error:a}=await this.getUser();if(a)return{data:null,error:a};const o={all:[],phone:[],totp:[],webauthn:[]};for(const u of(e=r?.factors)!==null&&e!==void 0?e:[])o.all.push(u),u.status==="verified"&&o[u.factor_type].push(u);return{data:o,error:null}}async _getAuthenticatorAssuranceLevel(e){var r,a,o,u;if(e)try{const{payload:w}=Fl(e);let _=null;w.aal&&(_=w.aal);let x=_;const{data:{user:E},error:A}=await this.getUser(e);if(A)return this._returnResult({data:null,error:A});((a=(r=E?.factors)===null||r===void 0?void 0:r.filter(z=>z.status==="verified"))!==null&&a!==void 0?a:[]).length>0&&(x="aal2");const j=w.amr||[];return{data:{currentLevel:_,nextLevel:x,currentAuthenticationMethods:j},error:null}}catch(w){if(Z(w))return this._returnResult({data:null,error:w});throw w}const{data:{session:c},error:f}
55=await this.getSession();if(f)return this._returnResult({data:null,error:f});if(!c)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const{payload:p}=Fl(c.access_token);let g=null;p.aal&&(g=p.aal);let y=g;((u=(o=c.user.factors)===null||o===void 0?void 0:o.filter(w=>w.status==="verified"))!==null&&u!==void 0?u:[]).length>0&&(y="aal2");const b=p.amr||[];return{data:{currentLevel:g,nextLevel:y,currentAuthenticationMethods:b},error:null}}async _getAuthorizationDetails(e){try{return await this._useSession(async r=>{const{data:{session:a},error:o}=r;return o?this._returnResult({data:null,error:o}):a?await ne(this.fetch,"GET",`${this.url}/oauth/authorizations/${e}`,{headers:this.headers,jwt:a.access_token,xform:u=>({data:u,error:null})}):this._returnResult({data:null,error:new ht})})}catch(r){if(Z(r))return this._returnResult({data:null,error:r});throw r}}async _approveAuthorization(e,r){try{return await this._useSession(async a=>{const{data:{session:o},error:u}=a;if(u)return this._returnResult({data:null,error:u});if(!o)return this._returnResult({data:null,error:new ht});const c=await ne(this.fetch,"POST",`${this.url}/oauth/authorizations/${e}/consent`,{headers:this.headers,jwt:o.access_token,body:{action:"approve"},xform:f=>({data:f,error:null})});return c.data&&c.data.redirect_url&&St()&&!r?.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(e,r){try{return await this._useSession(async a=>{const{data:{session:o},error:u}=a;if(u)return this._returnResult({data:null,error:u});if(!o)return this._returnResult({data:null,error:new ht});const c=await ne(this.fetch,"POST",`${this.url}/oauth/authorizations/${e}/consent`,{headers:this.headers,jwt:o.access_token,body:{action:"deny"},xform:f=>({data:f,error:null})});return c.data&&c.data.redirect_url&&St()&&!r?.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 e=>{const{data:{session:r},error:a}=e;return a?this._returnResult({data:null,error:a}):r?await ne(this.fetch,"GET",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:r.access_token,xform:o=>({data:o,error:null})}):this._returnResult({data:null,error:new ht})})}catch(e){if(Z(e))return this._returnResult({data:null,error:e});throw e}}async _revokeOAuthGrant(e){try{return await this._useSession(async r=>{const{data:{session:a},error:o}=r;return o?this._returnResult({data:null,error:o}):a?(await ne(this.fetch,"DELETE",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:a.access_token,query:{client_id:e.clientId},noResolveJson:!0}),{data:{},error:null}):this._returnResult({data:null,error:new ht})})}catch(r){if(Z(r))return this._returnResult({data:null,error:r});throw r}}async fetchJwk(e,r={keys:[]}){let a=r.keys.find(f=>f.kid===e);if(a)return a;const o=Date.now();if(a=this.jwks.keys.find(f=>f.kid===e),a&&this.jwks_cached_at+tO>o)return a;const{data:u,error:c}=await ne(this.fetch,"GET",`${this.url}/.well-known/jwks.json`,{headers:this.headers});if(c)throw c;return!u.keys||u.keys.length===0||(this.jwks=u,this.jwks_cached_at=o,a=u.keys.find(f=>f.kid===e),!a)?null:a}async getClaims(e,r={}){try{let a=e;if(!a){const{data:w,error:_}
55=await this.getSession();if(_||!w.session)return this._returnResult({data:null,error:_});a=w.session.access_token}const{header:o,payload:u,signature:c,raw:{header:f,payload:p}}=Fl(a);if(!r?.allowExpired)try{EO(u.exp)}catch(w){throw new fu(w instanceof Error?w.message:"JWT validation failed")}const g=!o.alg||o.alg.startsWith("HS")||!o.kid||!("crypto"in globalThis&&"subtle"in globalThis.crypto)?null:await this.fetchJwk(o.kid,r?.keys?{keys:r.keys}:r?.jwks);if(!g){const{error:w}=await this.getUser(a);if(w)throw w;return{data:{claims:u,header:o,signature:c},error:null}}const y=RO(o.alg),m=await crypto.subtle.importKey("jwk",g,y,!0,["verify"]);if(!await crypto.subtle.verify(y,m,c,hO(`${f}.${p}`)))throw new fu("Invalid JWT signature");return{data:{claims:u,header:o,signature:c},error:null}}catch(a){if(Z(a))return this._returnResult({data:null,error:a});throw a}}async signInWithPasskey(e){var r,a,o;pn(this.experimental);try{if(!gu())return this._returnResult({data:null,error:new _n("Browser does not support WebAuthn",null)});const{data:u,error:c}=await this._startPasskeyAuthentication({options:{captchaToken:(r=e?.options)===null||r===void 0?void 0:r.captchaToken}});if(c||!u)return this._returnResult({data:null,error:c});const f=Wv(u.options),p=(o=(a=e?.options)===null||a===void 0?void 0:a.signal)!==null&&o!==void 0?o:Hf.createNewAbortSignal(),{data:g,error:y}=await aw({publicKey:f,signal:p});if(y||!g)return this._returnResult({data:null,error:y??new _n("WebAuthn ceremony failed",null)});const m=tb(g);return this._verifyPasskeyAuthentication({challengeId:u.challenge_id,credential:m})}catch(u){if(Z(u))return this._returnResult({data:null,error:u});throw u}}async registerPasskey(e){var r,a;pn(this.experimental);try{if(!gu())return this._returnResult({data:null,error:new _n("Browser does not support WebAuthn",null)});const{data:o,error:u}=await this._startPasskeyRegistration();if(u||!o)return this._returnResult({data:null,error:u});const c=Zv(o.options),f=(a=(r=e?.options)===null||r===void 0?void 0:r.signal)!==null&&a!==void 0?a:Hf.createNewAbortSignal(),{data:p,error:g}=await sw({publicKey:c,signal:f});if(g||!p)return this._returnResult({data:null,error:g??new _n("WebAuthn ceremony failed",null)});const y=eb(p);return this._verifyPasskeyRegistration({challengeId:o.challenge_id,credential:y})}catch(o){if(Z(o))return this._returnResult({data:null,error:o});throw o}}async _startPasskeyRegistration(){pn(this.experimental);try{return await this._useSession(async e=>{const{data:{session:r},error:a}=e;if(a)return this._returnResult({data:null,error:a});if(!r)return this._returnResult({data:null,error:new ht});const{data:o,error:u}=await ne(this.fetch,"POST",`${this.url}/passkeys/registration/options`,{headers:this.headers,jwt:r.access_token,body:{}});return u?this._returnResult({data:null,error:u}):this._returnResult({data:o,error:null})})}catch(e){if(Z(e))return this._returnResult({data:null,error:e});throw e}}async _verifyPasskeyRegistration(e){pn(this.experimental);try{return await this._useSession(async r=>{const{data:{session:a},error:o}=r;if(o)return this._returnResult({data:null,error:o});if(!a)return this._returnResult({data:null,error:new ht});const{data:u,error:c}=await ne(this.fetch,"POST",`${this.url}/passkeys/registration/verify`,{headers:this.headers,jwt:a.access_token,body:{challenge_id:e.challengeId,credential:e.credential}});return c?this._returnResult({data:null,error:c}):this._returnResult({data:u,error:null})})}catch(r){if(Z(r))return this._returnResult({data:null,error:r});throw r}}async _startPasskeyAuthentication(e){var r;pn(this.experimental);try{const{data:a,error:o}=await ne(this.fetch,"POST",`${this.url}/passkeys/authentication/options`,{headers:this.headers,body:{gotrue_meta_security:{captcha_token:(r=e?.options)===null||r===void 0?void 0:r.captchaToken}}});return o?this._returnResult({data:null,error:o}):this._returnResult({data:a,error:null})}catch(a){if(Z(a))return this._returnResult({data:null,error:a});throw a}}async _verifyPasskeyAuthentication(e){pn(this.experimental);try{const{data:r,error:a}=await ne(this.fetch,"POST",`${this.url}/passkeys/authentication/verify`,{headers:this.headers,body:{challenge_id:e.challengeId,credential:e.credential},xform:ln});return a?this._returnResult({data:null,error:a}):(r.session&&(await this._saveSession(r.session),await this._notifyAllSubscribers("SIGNED_IN",r.session)),this._returnResult({data:r,error:null}))}catch(r){if(Z(r))return this._returnResult({data:null,error:r});throw r}}async _listPasskeys(){pn(this.experimental);try{return await this._useSession(async e=>{const{data:{session:r},error:a}=e;if(a)return this._returnResult({data:null,error:a});if(!r)return this._returnResult({data:null,error:new ht});const{data:o,error:u}=await ne(this.fetch,"GET",`${this.url}/passkeys`,{headers:this.headers,jwt:r.access_token,xform:c=>({data:c,error:null})});return u?this._returnResult({data:null,error:u}):this._returnResult({data:o,error:null})})}catch(e){if(Z(e))return this._returnResult({data:null,error:e});throw e}}async _updatePasskey(e){pn(this.experimental);try{return await this._useSession(async r=>{const{data:{session:a},error:o}=r;if(o)return this._returnResult({data:null,error:o});if(!a)return this._returnResult({data:null,error:new ht});const{data:u,error:c}=await ne(this.fetch,"PATCH",`${this.url}/passkeys/${e.passkeyId}`,{headers:this.headers,jwt:a.access_token,body:{friendly_name:e.friendlyName}});return c?this._returnResult({data:null,error:c}):this._returnResult({data:u,error:null})})}catch(r){if(Z(r))return this._returnResult({data:null,error:r});throw r}}async _deletePasskey(e){pn(this.experimental);try{return await this._useSession(async r=>{const{data:{session:a},error:o}=r;if(o)return this._returnResult({data:null,error:o});if(!a)return this._returnResult({data:null,error:new ht});const{error:u}
55=await ne(this.fetch,"DELETE",`${this.url}/passkeys/${e.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(r){if(Z(r))return this._returnResult({data:null,error:r});throw r}}}oo.nextInstanceID={};const QO=oo,JO="2.108.2";let Vi="",yu;if(typeof Deno<"u"){var bf;Vi="deno",yu=(bf=Deno.version)===null||bf===void 0?void 0:bf.deno}else if(typeof document<"u")Vi="web";else if(typeof navigator<"u"&&navigator.product==="ReactNative")Vi="react-native";else{var wf;Vi="node",yu=typeof process<"u"?(wf=process.version)===null||wf===void 0?void 0:wf.replace(/^v/,""):void 0}const iw=[`runtime=${Vi}`];yu&&iw.push(`runtime-version=${yu}`);const XO={"X-Client-Info":`supabase-js/${JO}; ${iw.join("; ")}`},ZO={headers:XO},WO={schema:"public"},eC={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},tC={},nC={enabled:!1,respectSamplingDecision:!0};function rC(t,e,r,a){function o(u){return u instanceof r?u:new r(function(c){c(u)})}return new(r||(r=Promise))(function(u,c){function f(y){try{g(a.next(y))}catch(m){c(m)}}function p(y){try{g(a.throw(y))}catch(m){c(m)}}function g(y){y.done?u(y.value):o(y.value).then(f,p)}g((a=a.apply(t,[])).next())})}let _f=null;const sC="@opentelemetry/api";function aC(){return _f===null&&(_f=import(sC).catch(()=>null)),_f}function iC(){return rC(this,void 0,void 0,function*(){try{const t=yield aC();if(!t||!t.propagation||!t.context)return null;const e={};t.propagation.inject(t.context.active(),e);const r=e.traceparent;return r?{traceparent:r,tracestate:e.tracestate,baggage:e.baggage}:null}catch{return null}})}function oC(t){if(!t||typeof t!="string")return null;const e=t.split("-");if(e.length!==4)return null;const[r,a,o,u]=e;if(r.length!==2||a.length!==32||o.length!==16||u.length!==2)return null;const c=/^[0-9a-f]+$/i;return!c.test(r)||!c.test(a)||!c.test(o)||!c.test(u)||a==="00000000000000000000000000000000"||o==="0000000000000000"?null:{version:r,traceId:a,parentId:o,traceFlags:u,isSampled:(parseInt(u,16)&1)===1}}function lC(t,e){if(!t||!e||e.length===0)return!1;let r;if(t instanceof URL)r=t;else try{r=new URL(t)}catch{return!1}for(const a of e)try{if(typeof a=="string"){if(uC(r.hostname,a))return!0}else if(a instanceof RegExp){if(a.test(r.hostname))return!0}else if(typeof a=="function"&&a(r))return!0}catch{continue}return!1}function uC(t,e){if(e===t)return!0;if(e.startsWith("*.")){const r=e.slice(2);if(t.endsWith(r)&&(t===r||t.endsWith("."+r)))return!0}return!1}function cC(t){const e=[];try{const r=new URL(t);e.push(r.hostname)}catch{}return e.push("*.supabase.co","*.supabase.in"),e.push("localhost","127.0.0.1","[::1]"),e}function lo(t){"@babel/helpers - typeof";return lo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},lo(t)}function hC(t,e){if(lo(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var a=r.call(t,e);if(lo(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function fC(t){var e=hC(t,"string");return lo(e)=="symbol"?e:e+""}function dC(t,e,r){return(e=fC(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function nb(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),r.push.apply(r,a)}return r}function Ye(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?nb(Object(r),!0).forEach(function(a){dC(t,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):nb(Object(r)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(r,a))})}return t}const pC=t=>t?(...e)=>t(...e):(...e)=>fetch(...e),gC=()=>Headers,mC=(t,e,r,a,o)=>{const u=pC(a),c=gC(),f=o?.enabled===!0,p=o?.respectSamplingDecision!==!1,g=f?cC(e):null;return async(y,m)=>{var b;const w=(b=await r())!==null&&b!==void 0?b:t;let _=new c(m?.headers);if(_.has("apikey")||_.set("apikey",t),_.has("Authorization")||_.set("Authorization",`Bearer ${w}`),g){const x=await yC(y,g,p);x&&(x.traceparent&&!_.has("traceparent")&&_.set("traceparent",x.traceparent),x.tracestate&&!_.has("tracestate")&&_.set("tracestate",x.tracestate),x.baggage&&!_.has("baggage")&&_.set("baggage",x.baggage))}return u(y,Ye(Ye({},m),{},{headers:_}))}};async function yC(t,e,r){if(!lC(typeof t=="string"||t instanceof URL?t:t.url,e))return null;const a=await iC();if(!a||!a.traceparent)return null;if(r){const o=oC(a.traceparent);if(o&&!o.isSampled)return null}return a}function rb(t){return typeof t=="boolean"?{enabled:t}:t}function vC(t){return t.endsWith("/")?t:t+"/"}function bC(t,e){var r,a,o,u,c,f;const{db:p,auth:g,realtime:y,global:m}=t,{db:b,auth:w,realtime:_,global:x}=e,E=rb(t.tracePropagation),A=rb(e.tracePropagation),M={db:Ye(Ye({},b),p),auth:Ye(Ye({}
55,w),g),realtime:Ye(Ye({},_),y),storage:{},global:Ye(Ye(Ye({},x),m),{},{headers:Ye(Ye({},(r=x?.headers)!==null&&r!==void 0?r:{}),(a=m?.headers)!==null&&a!==void 0?a:{})}),tracePropagation:{enabled:(o=(u=E?.enabled)!==null&&u!==void 0?u:A?.enabled)!==null&&o!==void 0?o:!1,respectSamplingDecision:(c=(f=E?.respectSamplingDecision)!==null&&f!==void 0?f:A?.respectSamplingDecision)!==null&&c!==void 0?c:!0},accessToken:async()=>""};return t.accessToken?M.accessToken=t.accessToken:delete M.accessToken,M}function wC(t){const e=t?.trim();if(!e)throw new Error("supabaseUrl is required.");if(!e.match(/^https?:\/\//i))throw new Error("Invalid supabaseUrl: Must be a valid HTTP or HTTPS URL.");try{return new URL(vC(e))}catch{throw Error("Invalid supabaseUrl: Provided URL is malformed.")}}var _C=class extends QO{constructor(t){super(t)}},SC=class{constructor(t,e,r){var a,o;this.supabaseUrl=t,this.supabaseKey=e;const u=wC(t);if(!e)throw new Error("supabaseKey is required.");this.realtimeUrl=new URL("realtime/v1",u),this.realtimeUrl.protocol=this.realtimeUrl.protocol.replace("http","ws"),this.authUrl=new URL("auth/v1",u),this.storageUrl=new URL("storage/v1",u),this.functionsUrl=new URL("functions/v1",u);const c=`sb-${u.hostname.split(".")[0]}-auth-token`,f={db:WO,realtime:tC,auth:Ye(Ye({},eC),{},{storageKey:c}),global:ZO,tracePropagation:nC},p=bC(r??{},f);if(this.settings=p,this.storageKey=(a=p.auth.storageKey)!==null&&a!==void 0?a:"",this.headers=(o=p.global.headers)!==null&&o!==void 0?o:{},p.accessToken)this.accessToken=p.accessToken,this.auth=new Proxy({},{get:(y,m)=>{throw new Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(m)} 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=mC(e,t,this._getAccessToken.bind(this),p.global.fetch,p.tracePropagation),this.realtime=this._initRealtimeClient(Ye({headers:this.headers,accessToken:this._getAccessToken.bind(this),fetch:this.fetch},p.realtime)),this.accessToken&&Promise.resolve(this.accessToken()).then(y=>this.realtime.setAuth(y)).catch(y=>console.warn("Failed to set initial Realtime auth token:",y)),this.rest=new UA(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 Qk(this.storageUrl.href,this.headers,this.fetch,r?.storage),p.accessToken||this._listenForAuthEvents()}get functions(){return new AA(this.functionsUrl.href,{headers:this.headers,customFetch:this.fetch})}from(t){return this.rest.from(t)}schema(t){return this.rest.schema(t)}rpc(t,e={},r={head:!1,get:!1,count:void 0}){return this.rest.rpc(t,e,r)}channel(t,e={config:{}}){return this.realtime.channel(t,e)}getChannels(){return this.realtime.getChannels()}removeChannel(t){return this.realtime.removeChannel(t)}removeAllChannels(){return this.realtime.removeAllChannels()}async _getAccessToken(){var t=this,e,r;if(t.accessToken)return await t.accessToken();const{data:a}=await t.auth.getSession();return(e=(r=a.session)===null||r===void 0?void 0:r.access_token)!==null&&e!==void 0?e:t.supabaseKey}_initSupabaseAuthClient({autoRefreshToken:t,persistSession:e,detectSessionInUrl:r,storage:a,userStorage:o,storageKey:u,flowType:c,lock:f,debug:p,throwOnError:g,experimental:y,lockAcquireTimeout:m,skipAutoInitialize:b},w,_){const x={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new _C({url:this.authUrl.href,headers:Ye(Ye({},x),w),storageKey:u,autoRefreshToken:t,persistSession:e,detectSessionInUrl:r,storage:a,userStorage:o,flowType:c,lock:f,debug:p,throwOnError:g,experimental:y,fetch:_,lockAcquireTimeout:m,skipAutoInitialize:b,hasCustomAuthorizationHeader:Object.keys(this.headers).some(E=>E.toLowerCase()==="authorization")})}_initRealtimeClient(t){return new vk(this.realtimeUrl.href,Ye(Ye({},t),{},{params:Ye(Ye({},{apikey:this.supabaseKey}),t?.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((t,e)=>{this._handleTokenChanged(t,"CLIENT",e?.access_token)})}_handleTokenChanged(t,e,r){(t==="TOKEN_REFRESHED"||t==="SIGNED_IN")&&this.changedAccessToken!==r?(this.changedAccessToken=r,this.realtime.setAuth(r)):t==="SIGNED_OUT"&&(this.realtime.setAuth(),e=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}};const TC=(t,e,r)=>new SC(t,e,r);function EC(){if(typeof window<"u")return!1;const t=globalThis.process;if(!t)return!1;const e=t.version;if(e==null)return!1;const r=e.match(/^v(\d+)\./);return r?parseInt(r[1],10)<=18:!1}EC()&&console.warn("â ï¸ Node.js 18 and below are deprecated and will no longer be supported in future versions of @supabase/supabase-js. Please upgrade to N
55ode.js 20 or later. For more information, visit: https://github.com/orgs/supabase/discussions/37217");function RC(){return TC("https://dejtwhdvyzzhcsqllucm.supabase.co","eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImRlanR3aGR2eXp6aGNzcWxsdWNtIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NzkzNzA3MzAsImV4cCI6MjA5NDk0NjczMH0.R3sLAVweS4ZubWPT5fMkFmJnt6kW2Tyym63jZjW4Z4Q",{auth:{storage:typeof window<"u"?localStorage:void 0,persistSession:!0,autoRefreshToken:!0}})}let Sf;const xC=new Proxy({},{get(t,e,r){return Sf||(Sf=RC()),Reflect.get(Sf,e,r)}}),AC=Ts({type:"function"}).client(async({next:t})=>{const{data:e}=await xC.auth.getSession(),r=e.session?.access_token;return t({headers:r?{Authorization:`Bearer ${r}`}:{}})}),kC=Ts(),sb=TA(()=>({functionMiddleware:[AC],requestMiddleware:[kC]}));var Lu=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},OC=class extends Lu{#e;#n;#t;constructor(){super(),this.#t=t=>{if(typeof window<"u"&&window.addEventListener){const e=()=>t();return window.addEventListener("visibilitychange",e,!1),()=>{window.removeEventListener("visibilitychange",e)}}}}onSubscribe(){this.#n||this.setEventListener(this.#t)}onUnsubscribe(){this.hasListeners()||(this.#n?.(),this.#n=void 0)}setEventListener(t){this.#t=t,this.#n?.(),this.#n=t(e=>{typeof e=="boolean"?this.setFocused(e):this.onFocus()})}setFocused(t){this.#e!==t&&(this.#e=t,this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(e=>{e(t)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},ow=new OC,CC={setTimeout:(t,e)=>setTimeout(t,e),clearTimeout:t=>clearTimeout(t),setInterval:(t,e)=>setInterval(t,e),clearInterval:t=>clearInterval(t)},jC=class{#e=CC;#n=!1;setTimeoutProvider(t){this.#e=t}setTimeout(t,e){return this.#e.setTimeout(t,e)}clearTimeout(t){this.#e.clearTimeout(t)}setInterval(t,e){return this.#e.setInterval(t,e)}clearInterval(t){this.#e.clearInterval(t)}},Gf=new jC;function MC(t){setTimeout(t,0)}var NC=typeof window>"u"||"Deno"in globalThis;function mn(){}function LC(t,e){return typeof t=="function"?t(e):t}function DC(t){return typeof t=="number"&&t>=0&&t!==1/0}function UC(t,e){return Math.max(t+(e||0)-Date.now(),0)}function Vf(t,e){return typeof t=="function"?t(e):t}function zC(t,e){return typeof t=="function"?t(e):t}function ab(t,e){const{type:r="all",exact:a,fetchStatus:o,predicate:u,queryKey:c,stale:f}=t;if(c){if(a){if(e.queryHash!==md(c,e.options))return!1}else if(!co(e.queryKey,c))return!1}if(r!=="all"){const p=e.isActive();if(r==="active"&&!p||r==="inactive"&&p)return!1}return!(typeof f=="boolean"&&e.isStale()!==f||o&&o!==e.state.fetchStatus||u&&!u(e))}function ib(t,e){const{exact:r,status:a,predicate:o,mutationKey:u}=t;if(u){if(!e.options.mutationKey)return!1;if(r){if(uo(e.options.mutationKey)!==uo(u))return!1}else if(!co(e.options.mutationKey,u))return!1}return!(a&&e.state.status!==a||o&&!o(e))}function md(t,e){return(e?.queryKeyHashFn||uo)(t)}function uo(t){return JSON.stringify(t,(e,r)=>Kf(r)?Object.keys(r).sort().reduce((a,o)=>(a[o]=r[o],a),{}):r)}function co(t,e){return t===e?!0:typeof t!=typeof e?!1:t&&e&&typeof t=="object"&&typeof e=="object"?Object.keys(e).every(r=>co(t[r],e[r])):!1}var PC=Object.prototype.hasOwnProperty;function lw(t,e,r=0){if(t===e)return t;if(r>500)return e;const a=ob(t)&&ob(e);if(!a&&!(Kf(t)&&Kf(e)))return e;const u=(a?t:Object.keys(t)).length,c=a?e:Object.keys(e),f=c.length,p=a?new Array(f):{};let g=0;for(let y=0;y<f;y++){const m=a?y:c[y],b=t[m],w=e[m];if(b===w){p[m]=b,(a?y<u:PC.call(t,m))&&g++;continue}if(b===null||w===null||typeof b!="object"||typeof w!="object"){p[m]=w;continue}const _=lw(b,w,r+1);p[m]=_,_===b&&g++}return u===f&&g===u?t:p}function NM(t,e){if(!e||Object.keys(t).length!==Object.keys(e).length)return!1;for(const r in t)if(t[r]!==e[r])return!1;return!0}function ob(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function Kf(t){if(!lb(t))return!1;const e=t.constructor;if(e===void 0)return!0;const r=e.prototype;return!(!lb(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(t)!==Object.prototype)}function lb(t){return Object.prototype.toString.call(t)==="[object Object]"}function BC(t){return new Promise(e=>{Gf.setTimeout(e,t)})}function $C(t,e,r){return typeof r.structuralSharing=="function"?r.structuralSharing(t,e):r.structuralSharing!==!1?lw(t,e):e}function IC(t,e,r=0){const a=[...t,e];return r&&a.length>r?a.slice(1):a}function qC(t,e,r=0){const a=[e,...t];return r&&a.length>r?a.slice(0,-1):a}var yd=Symbol();function uw(t,e){return!t.queryFn&&e?.initialPromise?()=>e.initialPromise:!t.queryFn||t.queryFn===yd?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}function LM(t,e){return typeof t=="function"?t(...e):!!t}function HC(t,e,r){let a=!1,o;return Object.defineProperty(t,"signal",{enumerable:!0,get:()=>(o??=e(),a||(a=!0,o.aborted?r():o.addEventListener("abort",r,{once:!0})),o)}),t}var cw=(()=>{let t=()=>NC;return{isServer(){return t()},setIsServer(e){t=e}}})();function GC(){let t,e;const r=new Promise((o,u)=>{t=o,e=u});r.status="pending",r.catch(()=>{});function a(o){Object.assign(r,o),delete r.resolve,delete r.reject}return r.resolve=o=>{a({status:"fulfilled",value:o}),t(o)},r.reject=o=>{a({status:"rejected",reason:o}),e(o)},r}var VC=MC;function KC(){let t=[],e=0,r=f=>{f()},a=f=>{f()},o=VC;const u=f=>{e?t.push(f):o(()=>{r(f)})},c=()=>{const f=t;t=[],f.length&&o(()=>{a(()=>{f.forEach(p=>{r(p)})})})};return{batch:f=>{let p;e++;try{p=f()}finally{e--,e||c()}return p},batchCalls:f=>(...p)=>{u(()=>{f(...p)})},schedule:u,setNotifyFunction:f=>{r=f},setBatchNotifyFunction:f=>{a=f},setScheduler:f=>{o=f}}}var kt=KC(),FC=class extends Lu{#e=!0;#n;#t;constructor(){super(),this.#t=t=>{if(typeof window<"u"&&window.addEventListener){const e=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",e,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",e),window.removeEventListener("offline",r)}}}}onSubscribe(){this.#n||this.setEventListener(this.#t)}onUnsubscribe(){this.hasListeners()||(this.#n?.(),this.#n=void 0)}setEventListener(t){this.#t=t,this.#n?.(),this.#n=t(this.setOnline.bind(this))}
vendor: 21,023 bytes, line 55
55setOnline(t){this.#e!==t&&(this.#e=t,this.listeners.forEach(r=>{r(t)}))}isOnline(){return this.#e}},vu=new FC;function YC(t){return Math.min(1e3*2**t,3e4)}function hw(t){return(t??"online")==="online"?vu.isOnline():!0}var Ff=class extends Error{constructor(t){super("CancelledError"),this.revert=t?.revert,this.silent=t?.silent}};function fw(t){let e=!1,r=0,a;const o=GC(),u=()=>o.status!=="pending",c=x=>{if(!u()){const E=new Ff(x);b(E),t.onCancel?.(E)}},f=()=>{e=!0},p=()=>{e=!1},g=()=>ow.isFocused()&&(t.networkMode==="always"||vu.isOnline())&&t.canRun(),y=()=>hw(t.networkMode)&&t.canRun(),m=x=>{u()||(a?.(),o.resolve(x))},b=x=>{u()||(a?.(),o.reject(x))},w=()=>new Promise(x=>{a=E=>{(u()||g())&&x(E)},t.onPause?.()}).then(()=>{a=void 0,u()||t.onContinue?.()}),_=()=>{if(u())return;let x;const E=r===0?t.initialPromise:void 0;try{x=E??t.fn()}catch(A){x=Promise.reject(A)}Promise.resolve(x).then(m).catch(A=>{if(u())return;const M=t.retry??(cw.isServer()?0:3),j=t.retryDelay??YC,z=typeof j=="function"?j(r,A):j,Y=M===!0||typeof M=="number"&&r<M||typeof M=="function"&&M(r,A);if(e||!Y){b(A);return}r++,t.onFail?.(r,A),BC(z).then(()=>g()?void 0:w()).then(()=>{e?b(A):_()})})};return{promise:o,status:()=>o.status,cancel:c,continue:()=>(a?.(),o),cancelRetry:f,continueRetry:p,canStart:y,start:()=>(y()?_():w().then(_),o)}}var dw=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),DC(this.gcTime)&&(this.#e=Gf.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(cw.isServer()?1/0:300*1e3))}clearGcTimeout(){this.#e!==void 0&&(Gf.clearTimeout(this.#e),this.#e=void 0)}},QC=class extends dw{#e;#n;#t;#s;#r;#a;#i;constructor(t){super(),this.#i=!1,this.#a=t.defaultOptions,this.setOptions(t.options),this.observers=[],this.#s=t.client,this.#t=this.#s.getQueryCache(),this.queryKey=t.queryKey,this.queryHash=t.queryHash,this.#e=cb(this.options),this.state=t.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#r?.promise}setOptions(t){if(this.options={...this.#a,...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const e=cb(this.options);e.data!==void 0&&(this.setState(ub(e.data,e.dataUpdatedAt)),this.#e=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#t.remove(this)}setData(t,e){const r=$C(this.state.data,t,this.options);return this.#o({data:r,type:"success",dataUpdatedAt:e?.updatedAt,manual:e?.manual}),r}setState(t,e){this.#o({type:"setState",state:t,setStateOptions:e})}cancel(t){const e=this.#r?.promise;return this.#r?.cancel(t),e?e.then(mn).catch(mn):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(t=>zC(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===yd||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Vf(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!UC(this.state.dataUpdatedAt,t)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#r?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#r?.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),this.#t.notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(e=>e!==t),this.observers.length||(this.#r&&(this.#i||this.#l()?this.#r.cancel({revert:!0}):this.#r.cancelRetry()),this.scheduleGc()),this.#t.notify({type:"observerRemoved",query:this,observer:t}))}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(t,e){if(this.state.fetchStatus!=="idle"&&this.#r?.status()!=="rejected"){if(this.state.data!==void 0&&e?.cancelRefetch)this.cancel({silent:!0});else if(this.#r)return this.#r.continueRetry(),this.#r.promise}if(t&&this.setOptions(t),!this.options.queryFn){const f=this.observers.find(p=>p.options.queryFn);f&&this.setOptions(f.options)}const r=new AbortController,a=f=>{Object.defineProperty(f,"signal",{enumerable:!0,get:()=>(this.#i=!0,r.signal)})},o=()=>{const f=uw(this.options,e),g=(()=>{const y={client:this.#s,queryKey:this.queryKey,meta:this.meta};return a(y),y})();return this.#i=!1,this.options.persister?this.options.persister(f,g,this):f(g)},c=(()=>{const f={fetchOptions:e,options:this.options,queryKey:this.queryKey,client:this.#s,state:this.state,fetchFn:o};return a(f),f})();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=fw({initialPromise:e?.initialPromise,fn:c.fetchFn,onCancel:f=>{f instanceof Ff&&f.revert&&this.setState({...this.#n,fetchStatus:"idle"}),r.abort()},onFail:(f,p)=>{this.#o({type:"failed",failureCount:f,error:p})},onPause:()=>{this.#o({type:"pause"})},onContinue:()=>{this.#o({type:"continue"})},retry:c.options.retry,retryDelay:c.options.retryDelay,networkMode:c.options.networkMode,canRun:()=>!0});try{const f=await this.#r.start();if(f===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(f),this.#t.config.onSuccess?.(f,this),this.#t.config.onSettled?.(f,this.state.error,this),f}catch(f){if(f instanceof Ff){if(f.silent)return this.#r.promise;if(f.revert){if(this.state.data===void 0)throw f;return this.state.data}}throw this.#o({type:"error",error:f}),this.#t.config.onError?.(f,this),this.#t.config.onSettled?.(this.state.data,f,this),f}finally{this.scheduleGc()}}#o(t){const e=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...JC(r.data,this.options),fetchMeta:t.meta??null};case"success":const a={...r,...ub(t.data,t.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#n=t.manual?a:void 0,a;case"error":const o=t.error;return{...r,error:o,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=e(this.state),kt.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),this.#t.notify({query:this,type:"updated",action:t})})}};function JC(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:hw(e.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function ub(t,e){return{data:t,dataUpdatedAt:e??Date.now(),error:null,isInvalidated:!1,status:"success"}}function cb(t){const e=typeof t.initialData=="function"?t.initialData():t.initialData,r=e!==void 0,a=r?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:r?a??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}function hb(t){return{onFetch:(e,r)=>{const a=e.options,o=e.fetchOptions?.meta?.fetchMore?.direction,u=e.state.data?.pages||[],c=e.state.data?.pageParams||[];let f={pages:[],pageParams:[]},p=0;const g=async()=>{let y=!1;const m=_=>{HC(_,()=>e.signal,()=>y=!0)},b=uw(e.options,e.fetchOptions),w=async(_,x,E)=>{if(y)return Promise.reject();if(x==null&&_.pages.length)return Promise.resolve(_);const M=(()=>{const K={client:e.client,queryKey:e.queryKey,pageParam:x,direction:E?"backward":"forward",meta:e.options.meta};return m(K),K})(),j=await b(M),{maxPages:z}=e.options,Y=E?qC:IC;return{pages:Y(_.pages,j,z),pageParams:Y(_.pageParams,x,z)}};if(o&&u.length){const _=o==="backward",x=_?XC:fb,E={pages:u,pageParams:c},A=x(a,E);f=await w(E,A,_)}else{const _=t??u.length;do{const x=p===0?c[0]??a.initialPageParam:fb(a,f);if(p>0&&x==null)break;f=await w(f,x),p++}while(p<_)}return f};e.options.persister?e.fetchFn=()=>e.options.persister?.(g,{client:e.client,queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},r):e.fetchFn=g}}}function fb(t,{pages:e,pageParams:r}){const a=e.length-1;return e.length>0?t.getNextPageParam(e[a],e,r[a],r):void 0}function XC(t,{pages:e,pageParams:r}){return e.length>0?t.getPreviousPageParam?.(e[0],e,r[0],r):void 0}var ZC=class extends dw{#e;#n;#t;#s;constructor(t){super(),this.#e=t.client,this.mutationId=t.mutationId,this.#t=t.mutationCache,this.#n=[],this.state=t.state||WC(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){this.#n.includes(t)||(this.#n.push(t),this.clearGcTimeout(),this.#t.notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){this.#n=this.#n.filter(e=>e!==t),this.scheduleGc(),this.#t.notify({type:"observerRemoved",mutation:this,observer:t})}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(t){const e=()=>{this.#r({type:"continue"})},r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#s=fw({fn:()=>this.options.mutationFn?this.options.mutationFn(t,r):Promise.reject(new Error("No mutationFn found")),onFail:(u,c)=>{this.#r({type:"failed",failureCount:u,error:c})},onPause:()=>{this.#r({type:"pause"})},onContinue:e,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#t.canRun(this)});const a=this.state.status==="pending",o=!this.#s.canStart();try{if(a)e();else{this.#r({type:"pending",variables:t,isPaused:o}),this.#t.config.onMutate&&await this.#t.config.onMutate(t,this,r);const c=await this.options.onMutate?.(t,r);c!==this.state.context&&this.#r({type:"pending",context:c,variables:t,isPaused:o})}const u=await this.#s.start();return await this.#t.config.onSuccess?.(u,t,this.state.context,this,r),await this.options.onSuccess?.(u,t,this.state.context,r),await this.#t.config.onSettled?.(u,null,this.state.variables,this.state.context,this,r),await this.options.onSettled?.(u,null,t,this.state.context,r),this.#r({type:"success",data:u}),u}catch(u){try{await this.#t.config.onError?.(u,t,this.state.context,this,r)}catch(c){Promise.reject(c)}try{await this.options.onError?.(u,t,this.state.context,r)}catch(c){Promise.reject(c)}try{await this.#t.config.onSettled?.(void 0,u,this.state.variables,this.state.context,this,r)}catch(c){Promise.reject(c)}try{await this.options.onSettled?.(void 0,u,t,this.state.context,r)}catch(c){Promise.reject(c)}throw this.#r({type:"error",error:u}),u}finally{this.#t.runNext(this)}}#r(t){const e=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=e(this.state),kt.batch(()=>{this.#n.forEach(r=>{r.onMutationUpdate(t)}),this.#t.notify({mutation:this,type:"updated",action:t})})}};function WC(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var e2=class extends Lu{constructor(t={}){super(),this.config=t,this.#e=new Set,this.#n=new Map,this.#t=0}#e;#n;#t;build(t,e,r){const a=new ZC({client:t,mutationCache:this,mutationId:++this.#t,options:t.defaultMutationOptions(e),state:r});return this.add(a),a}add(t){this.#e.add(t);const e=Yl(t);if(typeof e=="string"){const r=this.#n.get(e);r?r.push(t):this.#n.set(e,[t])}this.notify({type:"added",mutation:t})}remove(t){if(this.#e.delete(t)){const e=Yl(t);if(typeof e=="string"){const r=this.#n.get(e);if(r)if(r.length>1){const a=r.indexOf(t);a!==-1&&r.splice(a,1)}else r[0]===t&&this.#n.delete(e)}}this.notify({type:"removed",mutation:t})}canRun(t){const e=Yl(t);if(typeof e=="string"){const a=this.#n.get(e)?.find(o=>o.state.status==="pending");return!a||a===t}else return!0}runNext(t){const e=Yl(t);return typeof e=="string"?this.#n.get(e)?.find(a=>a!==t&&a.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){kt.batch(()=>{this.#e.forEach(t=>{this.notify({type:"removed",mutation:t})}),this.#e.clear(),this.#n.clear()})}getAll(){return Array.from(this.#e)}find(t){const e={exact:!0,...t};return this.getAll().find(r=>ib(e,r))}findAll(t={}){return this.getAll().filter(e=>ib(t,e))}notify(t){kt.batch(()=>{this.listeners.forEach(e=>{e(t)})})}resumePausedMutations(){const t=this.getAll().filter(e=>e.state.isPaused);return kt.batch(()=>Promise.all(t.map(e=>e.continue().catch(mn))))}};function Yl(t){return t.options.scope?.id}var t2=class extends Lu{constructor(t={}){super(),this.config=t,this.#e=new Map}#e;build(t,e,r){const a=e.queryKey,o=e.queryHash??md(a,e);let u=this.get(o);return u||(u=new QC({client:t,queryKey:a,queryHash:o,options:t.defaultQueryOptions(e),state:r,defaultOptions:t.getQueryDefaults(a)}),this.add(u)),u}add(t){this.#e.has(t.queryHash)||(this.#e.set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const e=this.#e.get(t.queryHash);e&&(t.destroy(),e===t&&this.#e.delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){kt.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return this.#e.get(t)}getAll(){return[...this.#e.values()]}find(t){const e={exact:!0,...t};return this.getAll().find(r=>ab(e,r))}findAll(t={}){const e=this.getAll();return Object.keys(t).length>0?e.filter(r=>ab(t,r)):e}notify(t){kt.batch(()=>{this.listeners.forEach(e=>{e(t)})})}onFocus(){kt.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){kt.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},n2=class{#e;#n;#t;#s;#r;#a;#i;#l;constructor(t={}){this.#e=t.queryCache||new t2,this.#n=t.mutationCache||new e2,this.#t=t.defaultOptions||{},this.#s=new Map,this.#r=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#i=ow.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#l=vu.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#i?.(),this.#i=void 0,this.#l?.(),this.#l=void 0)}isFetching(t){return this.#e.findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return this.#n.findAll({...t,status:"pending"}).length}getQueryData(t){const e=this.defaultQueryOptions({queryKey:t});return this.#e.get(e.queryHash)?.state.data}ensureQueryData(t){const e=this.defaultQueryOptions(t),r=this.#e.build(this,e),a=r.state.data;return a===void 0?this.fetchQuery(t):(t.revalidateIfStale&&r.isStaleByTime(Vf(e.staleTime,r))&&this.prefetchQuery(e),Promise.resolve(a))}getQueriesData(t){return this.#e.findAll(t).map(({queryKey:e,state:r})=>{const a=r.data;return[e,a]})}setQueryData(t,e,r){const a=this.defaultQueryOptions({queryKey:t}),u=this.#e.get(a.queryHash)?.state.data,c=LC(e,u);if(c!==void 0)return this.#e.build(this,a).setData(c,{...r,manual:!0})}setQueriesData(t,e,r){return kt.batch(()=>this.#e.findAll(t).map(({queryKey:a})=>[a,this.setQueryData(a,e,r)]))}getQueryState(t){const e=this.defaultQueryOptions({queryKey:t});return this.#e.get(e.queryHash)?.state}removeQueries(t){const e=this.#e;kt.batch(()=>{e.findAll(t).forEach(r=>{e.remove(r)})})}resetQueries(t,e){const r=this.#e;return kt.batch(()=>(r.findAll(t).forEach(a=>{a.reset()}),this.refetchQueries({type:"active",...t},e)))}cancelQueries(t,e={}){const r={revert:!0,...e},a=kt.batch(()=>this.#e.findAll(t).map(o=>o.cancel(r)));return Promise.all(a).then(mn).catch(mn)}invalidateQueries(t,e={}){return kt.batch(()=>(this.#e.findAll(t).forEach(r=>{r.invalidate()}),t?.refetchType==="none"?Promise.resolve():this.refetchQueries({...t,type:t?.refetchType??t?.type??"active"},e)))}refetchQueries(t,e={}){const r={...e,cancelRefetch:e.cancelRefetch??!0},a=kt.batch(()=>this.#e.findAll(t).filter(o=>!o.isDisabled()&&!o.isStatic()).map(o=>{let u=o.fetch(void 0,r);return r.throwOnError||(u=u.catch(mn)),o.state.fetchStatus==="paused"?Promise.resolve():u}));return Promise.all(a).then(mn)}fetchQuery(t){const e=this.defaultQueryOptions(t);e.retry===void 0&&(e.retry=!1);const r=this.#e.build(this,e);return r.isStaleByTime(Vf(e.staleTime,r))?r.fetch(e):Promise.resolve(r.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(mn).catch(mn)}fetchInfiniteQuery(t){return t.behavior=hb(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(mn).catch(mn)}ensureInfiniteQueryData(t){return t.behavior=hb(t.pages),this.ensureQueryData(t)}resumePausedMutations(){return vu.isOnline()?this.#n.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#n}getDefaultOptions(){return this.#t}setDefaultOptions(t){this.#t=t}setQueryDefaults(t,e){this.#s.set(uo(t),{queryKey:t,defaultOptions:e})}getQueryDefaults(t){const e=[...this.#s.values()],r={};return e.forEach(a=>{co(t,a.queryKey)&&Object.assign(r,a.defaultOptions)}),r}setMutationDefaults(t,e){this.#r.set(uo(t),{mutationKey:t,defaultOptions:e})}getMutationDefaults(t){const e=[...this.#r.values()],r={};return e.forEach(a=>{co(t,a.mutationKey)&&Object.assign(r,a.defaultOptions)}),r}defaultQueryOptions(t){if(t._defaulted)return t;const e={...this.#t.queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return e.queryHash||(e.queryHash=md(e.queryKey,e)),e.refetchOnReconnect===void 0&&(e.refetchOnReconnect=e.networkMode!=="always"),e.throwOnError===void 0&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.queryFn===yd&&(e.enabled=!1),e}defaultMutationOptions(t){return t?._defaulted?t:{...this.#t.mutations,...t?.mutationKey&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){this.#e.clear(),this.#n.clear()}},pw=ee.createContext(void 0),DM=t=>{const e=ee.useContext(pw);if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},r2=({client:t,children:e})=>(ee.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),L.jsx(pw.Provider,{value:t,children:e}));const s2="/assets/styles-CfN12dt4.css";const gw=(...t)=>t.filter((e,r,a)=>!!e&&e.trim()!==""&&a.indexOf(e)===r).join(" ").trim();const a2=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const i2=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,r,a)=>a?a.toUpperCase():r.toLowerCase());const db=t=>{const e=i2(t);return e.charAt(0).toUpperCase()+e.slice(1)};var o2={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const l2=t=>{for(const e in t)if(e.startsWith("aria-")||e==="role"||e==="title")return!0;return!1};const u2=ee.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:r=2,absoluteStrokeWidth:a,className:o="",children:u,iconNode:c,...f},p)=>ee.createElement("svg",{ref:p,...o2,width:e,height:e,stroke:t,strokeWidth:a?Number(r)*24/Number(e):r,className:gw("lucide",o),...!u&&!l2(f)&&{"aria-hidden":"true"},...f},[...c.map(([g,y])=>ee.createElement(g,y)),...Array.isArray(u)?u:[u]]));const go=(t,e)=>{const r=ee.forwardRef(({className:a,...o},u)=>ee.createElement(u2,{ref:u,iconNode:e,className:gw(`lucide-${a2(db(t))}`,`lucide-${t}`,a),...o}));return r.displayName=db(t),r};const c2=[["path",{d:"M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z",key:"1jg4f8"}]],Yf=go("facebook",c2);const h2=[["rect",{width:"20",height:"20",x:"2",y:"2",rx:"5",ry:"5",key:"2e1cvw"}],["path",{d:"M16 11.37A4 4 0 1 1 12.63 8 4 4 0 0 1 16 11.37z",key:"9exkf1"}],["line",{x1:"17.5",x2:"17.51",y1:"6.5",y2:"6.5",key:"r4j83e"}]],Qf=go("instagram",h2);const f2=[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]],d2=go("menu",f2);const p2=[["path",{d:"M18 6 6 18",key:"1bl5f8"}
55],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],g2=go("x",p2);const m2=[["path",{d:"M2.5 17a24.12 24.12 0 0 1 0-10 2 2 0 0 1 1.4-1.4 49.56 49.56 0 0 1 16.2 0A2 2 0 0 1 21.5 7a24.12 24.12 0 0 1 0 10 2 2 0 0 1-1.4 1.4 49.55 49.55 0 0 1-16.2 0A2 2 0 0 1 2.5 17",key:"1q2vi4"}],["path",{d:"m10 15 5-3-5-3z",key:"1jp15x"}]],Jf=go("youtube",m2),vd="https://fairway.tidalwave.ai/signup/danny.tyroch/D8PDBK1BMCRJUFEDU2TG",pb="https://fairway.tidalwave.ai/signup/danny.tyroch/D8PDBK1BMCRJUFEDU2TG",UM="817-269-9762",y2="+18172699762",zM="[email protected]",v2="2445 Technology Forest Blvd, Suite 210, The Woodlands, TX 77381",Xf="https://www.instagram.com/tyrochteam_mortgage/",Zf="https://www.youtube.com/channel/UC-uXc9Jf5amFIJT3Kp2Z1qw",Wf="https://www.facebook.com/TyrochTeam",PM="https://www.google.com/search?q=Tyroch+Team+Mortgage+reviews",BM="https://www.lightstream.com/fairway/home-improvement?cid=LP-L-HIL-home_improvement-Fairway-37055&subid=1572223&aid=3717&fact=37055&isredirect=True",$M="https://www.lightstream.com/fairway/debt-consol?cid=LP-L-CCDCL-CCDCL-Fairway-37056&subid=1572223&aid=3717&fact=37056&isredirect=True",b2="/assets/tyroch-logo-BhSeW4nD.webp",gb=[{to:"/loans",label:"Loans"},{to:"/resources",label:"Resources"},{to:"/aboutus",label:"About Us"},{to:"/contact",label:"Contact"}];function w2(){const[t,e]=ee.useState(!1),[r,a]=ee.useState(!1),o=dA({select:f=>f.location.pathname}),u=o==="/";ee.useEffect(()=>{const f=()=>e(window.scrollY>24);return f(),window.addEventListener("scroll",f,{passive:!0}),()=>window.removeEventListener("scroll",f)},[]),ee.useEffect(()=>a(!1),[o]);const c=t||!u||r;return L.jsxs("header",{className:`fixed top-0 left-0 right-0 z-50 transition-all duration-300 bg-white text-[color:var(--brand)] ${c?"backdrop-blur shadow-sm":""}`,children:[L.jsxs("div",{className:"mx-auto max-w-7xl px-4 sm:px-6 lg:px-10 h-16 sm:h-20 lg:h-28 flex items-center justify-between",children:[L.jsx(Kr,{to:"/",className:"flex items-center","aria-label":"Tyroch Team Mortgage",children:L.jsx("img",{src:b2,alt:"Tyroch Team Mortgage",className:"h-12 sm:h-16 lg:h-24 w-auto"})}),L.jsx("nav",{className:"hidden lg:flex items-center gap-10",children:gb.map(f=>L.jsx(Kr,{to:f.to,className:"btn-label text-[color:var(--brand)] hover:text-[color:var(--lime)] transition-colors",activeProps:{className:"btn-label text-[color:var(--lime)]"},children:f.label},f.to))}),L.jsxs("div",{className:"hidden lg:flex items-center gap-5",children:[L.jsx("a",{href:Xf,target:"_blank",rel:"noreferrer","aria-label":"Instagram",className:"hover:text-[color:var(--lime)] transition-colors",children:L.jsx(Qf,{className:"h-4 w-4"})}),L.jsx("a",{href:Zf,target:"_blank",rel:"noreferrer","aria-label":"YouTube",className:"hover:text-[color:var(--lime)] transition-colors",children:L.jsx(Jf,{className:"h-4 w-4"})}),L.jsx("a",{href:Wf,target:"_blank",rel:"noreferrer","aria-label":"Facebook",className:"hover:text-[color:var(--lime)] transition-colors",children:L.jsx(Yf,{className:"h-4 w-4"})}),L.jsx("a",{href:pb,target:"_blank",rel:"noreferrer",className:"btn-label px-5 py-2.5 rounded-sm border border-[color:var(--brand)] text-[color:var(--brand)] hover:bg-[color:var(--brand)] hover:text-white transition-colors",children:"Log In"})]}),L.jsx("button",{className:"lg:hidden p-2 text-[color:var(--brand)]","aria-label":"Toggle menu",onClick:()=>a(f=>!f),children:r?L.jsx(g2,{className:"h-6 w-6"}):L.jsx(d2,{className:"h-6 w-6"})})]}),r&&L.jsx("div",{className:"lg:hidden bg-white text-[color:var(--brand)] border-t border-[color:var(--brand)]/10",children:L.jsxs("div",{className:"px-6 py-8 flex flex-col gap-6",children:[gb.map(f=>L.jsx(Kr,{to:f.to,className:"btn-label text-[color:var(--brand)] text-base",children:f.label},f.to)),L.jsxs("div",{className:"flex items-center gap-6 pt-4 border-t border-[color:var(--brand)]/10",children:[L.jsx("a",{href:Xf,target:"_blank",rel:"noreferrer","aria-label":"Instagram",className:"hover:text-[color:var(--lime)]",children:L.jsx(Qf,{className:"h-5 w-5"})}),L.jsx("a",{href:Zf,target:"_blank",rel:"noreferrer","aria-label":"YouTube",className:"hover:text-[color:var(--lime)]",children:L.jsx(Jf,{className:"h-5 w-5"})}),L.jsx("a",{href:Wf,target:"_blank",rel:"noreferrer","aria-label":"Facebook",className:"hover:text-[color:var(--lime)]",children:L.jsx(Yf,{className:"h-5 w-5"})})]}),L.jsx("a",{href:pb,target:"_blank",rel:"noreferrer",className:"btn-label border border-[color:var(--brand)] text-[color:var(--brand)] px-5 py-3 text-center hover:bg-[color:var(--brand)] hover:text-white transition-colors",children:"Log In"}),L.jsx("a",{href:vd,target:"_blank",rel:"noreferrer",className:"btn-label bg-[color:var(--brand)] text-white px-5 py-3 text-center",children:"Apply Now"})]})})]})}const _2="/assets/equal-housing-lender-CSd53dS_.png";function S2(){return L.jsx("footer",{className:"bg-[color:var(--brand)] text-white pb-24 lg:pb-0",children:L.jsxs("div",{className:"mx-auto max-w-7xl px-4 sm:px-6 lg:px-10 py-14 sm:py-16 lg:py-20",children:[L.jsxs("div",{className:"grid gap-10 lg:grid-cols-2",children:[L.jsxs("div",{children:[L.jsx("h3",{className:"heading-lg text-2xl mb-6",children:"tyroch team mortgage"}),L.jsxs("ul",{className:"flex flex-wrap gap-x-6 gap-y-2 text-sm mb-6",children:[L.jsx("li",{children:L.jsx(Kr,{to:"/aboutus",className:"hover:text-[color:var(--lime)]",children:"About"})}),L.jsx("li",{children:L.jsx(Kr,{to:"/contact",className:"hover:text-[color:var(--lime)]",children:"Contact"})}),L.jsx("li",{children:L.jsx("span",{className:"opacity-70",children:"Follow"})})]})]}),L.jsxs("div",{className:"lg:text-right",children:[L.jsxs("ul",{className:"space-y-2 text-sm",children:[L.jsx("li",{children:L.jsx("a",{href:"mailto:[email protected]",className:"hover:text-[color:var(--lime)] break-all",children:"[email protected]"})}),L.jsx("li",{children:L.jsx("a",{href:"tel:+18172699762",className:"hover:text-[color:var(--lime)]",children:"817-269-9762"})})]}),L.jsxs("div",{className:"flex items-center gap-4 mt-4 lg:justify-end",children:[L.jsx("a",{href:Xf,target:"_blank",rel:"noreferrer","aria-label":"Instagram",className:"hover:text-[color:var(--lime)]",children:L.jsx(Qf,{className:"h-5 w-5"})}),L.jsx("a",{href:Zf,target:"_blank",rel:"noreferrer","aria-label":"YouTube",className:"hover:text-[color:var(--lime)]",children:L.jsx(Jf,{className:"h-5 w-5"})}),L.jsx("a",{href:Wf,target:"_blank",rel:"noreferrer","aria-label":"Facebook",className:"hover:text-[color:var(--lime)]",children:L.jsx(Yf,{className:"h-5 w-5"})})]})]})]}),L.jsxs("div",{className:"mt-16 pt-10 border-t border-white/20 text-xs leading-relaxed opacity-80 space-y-4",children:[L.jsx("p",{children:"Danny Tyroch  |  NMLS#: 1572223  |  Loan Officer  |  (817) 269-9762  |  2445 Technology Forest Blvd, Suite 210, The Woodlands, TX 77381  |  [email protected]"}),L.jsxs("p",{children:["Copyright ©2022 Fairway Independent Mortgage Corporation. NMLS#2289. 4750 S. Biltmore Lane, Madison, WI 53718, 1-866-912-4800. All rights reserved. This is not an offer to enter into an agreement. Not all customers will qualify. Information, rates, and programs are subject to change without notice. All products are subject to credit and property approval. Other restrictions and limitations may apply. Fairway is not affiliated with any government agencies. EqualHousing Opportunity | Complaints may be directed to: (877) 699-0353 or Email us: ",L.jsx("a",{href:"mailto:[email protected]",className:"hover:text-[color:var(--lime)] underline",children:"[email protected]"})," | ",L.jsx("a",{href:"#",className:"hover:text-[color:var(--lime)] underline",children:"Privacy Policy"})," | ",L.jsx("a",{href:"#",className:"hover:text-[color:var(--lime)] underline",children:"Texas Consumer Complaint & Recovery Fund Notice"})," | Licensed In: TX, LA, TN, CO & FL - ",L.jsx("a",{href:"#",className:"hover:text-[color:var(--lime)] underline",children:"Legal Disclosures"})," | For licensing information, go to ",L.jsx("a",{href:"https://www.nmlsconsumeraccess.org",target:"_blank",rel:"noreferrer",className:"hover:text-[color:var(--lime)] underline",children:"www.nmlsconsumeraccess.org"})," | ",L.jsx("a",{href:"#",className:"hover:text-[color:var(--lime)] underline",children:"Terms of Use"})]}),L.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-6 pt-6",children:[L.jsx("div",{className:"flex items-center gap-3","aria-label":"Equal Housing Lender",children:L.jsx("img",{src:_2,alt:"Equal Housing Lender",className:"h-12 w-auto invert",loading:"lazy"})}),L.jsx("a",{href:vd,target:"_blank",rel:"noreferrer",className:"btn-label bg-white text-[color:var(--brand)] px-6 py-3 hover:bg-[color:var(--lime)] hover:text-black transition-colors",children:"Apply Now"})]})]})]})})}function T2(){return L.jsx("a",{href:vd,target:"_blank",rel:"noreferrer",className:"lg:hidden fixed bottom-4 left-4 right-4 z-40 btn-label bg-[color:var(--brand)] text-white text-center py-4 shadow-lg hover:bg-[color:var(--lime)] hover:text-black transition-colors",children:"Apply Now"})}const E2={"@context":"https://schema.org","@type":"MortgageBroker",name:"Tyroch Team Mortgage",image:"https://tyroch-home-hub.lovable.app/favicon.ico",url:"https://tyroch-home-hub.lovable.app",telephone:y2,address:{"@type":"PostalAddress",streetAddress:"2445 Technology Forest Blvd, Suite 210",addressLocality:"The Woodlands",addressRegion:"TX",postalCode:"77381",addressCountry:"US"},description:v2,areaServed:"TX"};function R2(){return L.jsx("div",{className:"flex min-h-screen items-center justify-center bg-background px-4",children:L.jsxs("div",{className:"max-w-md text-center",children:[L.jsx("h1",{className:"text-7xl font-bold text-foreground",children:"404"}),L.jsx("h2",{className:"mt-4 text-xl font-semibold text-foreground",children:"Page not found"}),L.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:"The page you're looking for doesn't exist or has been moved."}),L.jsx("div",{className:"mt-6",children:L.jsx(Kr,{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 x2({error:t,reset:e}){console.error(t);const r=dt();return L.jsx("div",{className:"flex min-h-screen items-center justify-center bg-background px-4",children:L.jsxs("div",{className:"max-w-md text-center",children:[L.jsx("h1",{className:"text-xl font-semibold tracking-tight text-foreground",children:"This page didn't load"}),L.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."}),L.jsxs("div",{className:"mt-6 flex flex-wrap justify-center gap-2",children:[L.jsx("button",{onClick:()=>{r.invalidate(),e()},className:"inline-flex items-center justify-center rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground transition-colors hover:bg-primary/90",children:"Try again"}),L.jsx("a",{href:"/",className:"inline-flex items-center justify-center rounded-md border border-input bg-background px-4 py-2 text-sm font-medium text-foreground transition-colors hover:bg-accent",children:"Go home"})]})]})})}const Rt=Qx()({head:()=>({meta:[{charSet:"utf-8"},{name:"viewport",content:"width=device-width, initial-scale=1"},{title:"Tyroch Team Mortgage â Expert Home Financing in Texas"}
55,{name:"description",content:"Tyroch Team Mortgage is your trusted partner for home financing in Texas, offering FHA, VA, and conventional loans with expert personal service."},{name:"author",content:"Tyroch Team Mortgage"},{property:"og:title",content:"Tyroch Team Mortgage â Expert Home Financing in Texas"},{property:"og:description",content:"Tyroch Team Mortgage is your trusted partner for home financing in Texas, offering FHA, VA, and conventional loans with expert personal service."},{property:"og:type",content:"website"},{name:"twitter:card",content:"summary_large_image"},{name:"twitter:title",content:"Tyroch Team Mortgage â Expert Home Financing in Texas"},{name:"twitter:description",content:"Tyroch Team Mortgage is your trusted partner for home financing in Texas, offering FHA, VA, and conventional loans with expert personal service."},{property:"og:image",content:"https://pub-bb2e103a32db4e198524a2e9ed8f35b4.r2.dev/6134b1e4-45e2-4389-8ecb-1c9359ed009d/id-preview-16914411--19355e68-0e4b-4f9c-8177-9212bf7be5e7.lovable.app-1779394137292.png"},{name:"twitter:image",content:"https://pub-bb2e103a32db4e198524a2e9ed8f35b4.r2.dev/6134b1e4-45e2-4389-8ecb-1c9359ed009d/id-preview-16914411--19355e68-0e4b-4f9c-8177-9212bf7be5e7.lovable.app-1779394137292.png"}],links:[{rel:"stylesheet",href:s2},{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=Inter:wght@100;200;300;400;500;600;700&display=swap"}],scripts:[{type:"application/ld+json",children:JSON.stringify(E2)}]}),shellComponent:A2,component:k2,notFoundComponent:R2,errorComponent:x2});function A2({children:t}){return L.jsxs("html",{lang:"en",children:[L.jsx("head",{children:L.jsx(yA,{})}),L.jsxs("body",{children:[t,L.jsx(vA,{})]})]})}function k2(){const{queryClient:t}=Rt.useRouteContext();return L.jsxs(r2,{client:t,children:[L.jsx(w2,{}),L.jsx("main",{className:"min-h-screen",children:L.jsx(L0,{})}),L.jsx(S2,{}),L.jsx(T2,{})]})}const O2="modulepreload",C2=function(t){return"/"+t},mb={},xt=function(e,r,a){let o=Promise.resolve();if(r&&r.length>0){let p=function(g){return Promise.all(g.map(y=>Promise.resolve(y).then(m=>({status:"fulfilled",value:m}),m=>({status:"rejected",reason:m}))))};document.getElementsByTagName("link");const c=document.querySelector("meta[property=csp-nonce]"),f=c?.nonce||c?.getAttribute("nonce");o=p(r.map(g=>{if(g=C2(g),g in mb)return;mb[g]=!0;const y=g.endsWith(".css"),m=y?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${g}"]${m}`))return;const b=document.createElement("link");if(b.rel=y?"stylesheet":O2,y||(b.as="script"),b.crossOrigin="",b.href=g,f&&b.setAttribute("nonce",f),document.head.appendChild(b),y)return new Promise((w,_)=>{b.addEventListener("load",w),b.addEventListener("error",()=>_(new Error(`Unable to preload CSS for ${g}`)))})}))}function u(c){const f=new Event("vite:preloadError",{cancelable:!0});if(f.payload=c,window.dispatchEvent(f),!f.defaultPrevented)throw c}return o.then(c=>{for(const f of c||[])f.status==="rejected"&&u(f.reason);return e().catch(u)})},j2=()=>xt(()=>import("./unsubscribe-Bb5oCl59.js"),[]),M2=$t("/unsubscribe")({head:()=>({meta:[{title:"Unsubscribe â Tyroch Team Mortgage"},{name:"robots",content:"noindex"}]}),component:Et(j2,"component")}),N2=()=>xt(()=>import("./resources-BPIr8qqp.js"),__vite__mapDeps([0,1,2,3])),L2=[{q:"How long does a pre-approval take?",a:"Once documents are submitted, we can often issue pre-approvals within 24 business hours."},{q:"How can I best prepare for pre-approval?",a:"Have your documents ready and make sure your credit is unlocked with all 3 bureaus."},{q:"Should I monitor my credit?",a:"Yes â use services like MyFico.com for accurate tracking. Avoid sites like Credit Karma for mortgage-related monitoring."},{q:"How long does my pre-approval letter last?",a:"Pre-approval letters are typically valid for 120 days from the date your credit is pulled."},{q:"What does it mean to lock my interest rate, and when should I do it?",a:"Locking secures your rate for a set period. You can lock once your loan
55is in process to protect against market changes."},{q:"Do I need 20% down to buy a home?",a:"No! Many buyers qualify with as little as 3â3.5% down. VA loans even allow for 0% down if eligible."},{q:"What documents do I need for a mortgage application?",a:"You'll usually need: 2 years of W2s, 2 recent pay stubs, 2 recent bank statements, and a photo ID. Self-employed? Add 2 years of tax returns."},{q:"When should I get pre-approved?",a:"Ideally 6â12 months before buying. Early pre-approval helps identify your budget and credit readiness."},{q:"Will shopping for a mortgage hurt my credit?",a:"Not significantly. Multiple credit pulls within a 45-day window typically count as one inquiry."},{q:"What's the difference between pre-qualification and pre-approval?",a:"Pre-qualification is an estimate. Pre-approval is verified with documentation and credit, making you a stronger buyer."}],D2={"@context":"https://schema.org","@type":"FAQPage",mainEntity:L2.map(t=>({"@type":"Question",name:t.q,acceptedAnswer:{"@type":"Answer",text:t.a}}))},U2=$t("/resources")({head:()=>({meta:[{title:"Resources â Tyroch Team Mortgage"},{name:"description",content:"FAQs, videos, and a home-value lookup to help you feel confident through the homebuying process."},{property:"og:title",content:"Resources â Tyroch Team Mortgage"},{property:"og:description",content:"Everything you need to feel confident through the homebuying process."},{property:"og:url",content:"https://tyroch-home-hub.lovable.app/resources"}],links:[{rel:"canonical",href:"https://tyroch-home-hub.lovable.app/resources"}],scripts:[{type:"application/ld+json",children:JSON.stringify(D2)}]}),component:Et(N2,"component")}),z2=()=>xt(()=>import("./loans-BxgD4Hcf.js"),__vite__mapDeps([4,1,5,6,7,8,9,10,11])),P2=$t("/loans")({head:()=>({meta:[{title:"Loan Products & Options â Tyroch Team Mortgage"},{name:"description",content:"Explore our full catalog of mortgage solutions â conventional, FHA, VA, USDA, jumbo, refinance, non-QM, and free mortgage calculators."},{property:"og:title",content:"Loan Products & Options â Tyroch Team Mortgage"},{property:"og:description",content:"From first-time buyer programs to specialty Non-QM loans, explore mortgage options built around your story."},{property:"og:url",content:"https://tyroch-home-hub.lovable.app/loans"}],links:[{rel:"canonical",href:"https://tyroch-home-hub.lovable.app/loans"}]}),component:Et(z2,"component")}),B2=()=>xt(()=>import("./contact-0s_PdIuw.js"),__vite__mapDeps([12,6,1,7])),$2=$t("/contact")({head:()=>({meta:[{title:"Contact Us â Tyroch Team Mortgage"},{name:"description",content:"Have questions about buying, refinancing, or applying for a loan? Contact the Tyroch Team in The Woodlands, TX."},{property:"og:title",content:"Contact Us â Tyroch Team Mortgage"},{property:"og:description",content:"Reach out to the Tyroch Team for expert mortgage guidance in Texas."},{property:"og:url",content:"https://tyroch-home-hub.lovable.app/contact"}],links:[{rel:"canonical",href:"https://tyroch-home-hub.lovable.app/contact"}]}),component:Et(B2,"component")}),I2=()=>xt(()=>import("./admin-C30OU9O-.js"),__vite__mapDeps([13,14,10,15])),q2=$t("/admin")({head:()=>({meta:[{title:"Admin â Dashboard"},{name:"robots",content:"noindex"}]}),component:Et(I2,"component")}),H2=()=>xt(()=>import("./aboutus-DKW2vHQK.js"),__vite__mapDeps([16,1,17,7,3])),G2=$t("/aboutus")({head:()=>({meta:[{title:"About Us â Tyroch Team Mortgage"},{name:"description",content:"Meet Danny, Kayla, and the Tyroch Team â a 5-star Texas mortgage team built on precision, transparency, and personal service."},{property:"og:title",content:"About Us â Tyroch Team Mortgage"},{property:"og:description",content:"Husband-and-wife loan officers Danny & Kayla Tyroch lead a team rated 5.0 from 105 Google reviews."},{property:"og:url",content:"https://tyroch-home-hub.lovable.app/aboutus"}],links:[{rel:"canonical",href:"https://tyroch-home-hub.lovable.app/aboutus"}]}),component:Et(H2,"component")}),V2=()=>xt(()=>import("./index-D-syS0_D.js"),__vite__mapDeps([18,1,5,6,7,17,3,2])),K2=$t("/")({head:()=>({meta:[{title:"Tyroch Team Mortgage â Expert Home Financing in Texas"}
55,{name:"description",content:"Tyroch Team Mortgage is your trusted partner for home financing in Texas, offering FHA, VA, and conventional loans with expert personal service."},{property:"og:title",content:"Tyroch Team Mortgage â Expert Home Financing in Texas"},{property:"og:description",content:"Tyroch Team Mortgage is your trusted partner for home financing in Texas, offering FHA, VA, and conventional loans with expert personal service."},{property:"og:url",content:"https://tyroch-home-hub.lovable.app/"}],links:[{rel:"canonical",href:"https://tyroch-home-hub.lovable.app/"}]}),component:Et(V2,"component")}),F2=[{q:"What is a good DSCR for a loan?",a:"Most lenders consider 1.25 or higher to be solid. A ratio of 1.0 means the property breaks even on debt coverage. Some lenders will go below 1.0 with compensating factors, but higher ratios generally lead to better rates and terms."},{q:"Can projected rental income be used for a DSCR loan?",a:"Yes. For short-term rentals and vacation properties, lenders often use projected income supported by a market rent analysis or historical rental data. Requirements vary by lender."},{q:"Do DSCR loans require a down payment?",a:"Yes. Most programs require at least 20% down, along with 3 to 6 months of reserves in the bank or retirement assets."},{q:"Can I get a DSCR loan for an Airbnb property?",a:"Yes. DSCR loans are commonly used for short-term rentals including Airbnb and VRBO properties. Lenders typically use a short-term rental income estimate or documented rental history to calculate the ratio."},{q:"Do I need to own my primary home to qualify?",a:"Most lenders want to see 12 months of on-time payment history on a primary residence. It doesn't have to be owned outright, but proof of housing stability is typically part of the file."},{q:"What states are DSCR loans available in?",a:"We're licensed in Texas, Tennessee, Florida, Colorado, Arkansas, Oklahoma, and other states. Contact us to confirm availability in your market."}],Y2=()=>xt(()=>import("./blog.dscr-loans-investment-properties-CMF7VgM9.js"),__vite__mapDeps([19,1,5,6,7,20,8,11])),yn={title:"DSCR Loans for Investment Properties | How They Work",description:"Learn how DSCR loans work, who qualifies, and why real estate investors use them to finance rental properties without tax returns or W-2s. Get started today.",url:"https://tyrochteam.com/blog/dscr-loans-investment-properties",datePublished:"2026-06-10"},Q2={"@context":"https://schema.org","@type":"Article",headline:yn.title,description:yn.description,datePublished:yn.datePublished,author:{"@type":"Organization",name:"Tyroch Team Mortgage"},publisher:{"@type":"Organization",name:"Tyroch Team Mortgage",url:"https://tyrochteam.com"},mainEntityOfPage:yn.url},J2={"@context":"https://schema.org","@type":"FAQPage",mainEntity:F2.map(t=>({"@type":"Question",name:t.q,acceptedAnswer:{"@type":"Answer",text:t.a}}))},X2=$t("/blog/dscr-loans-investment-properties")({head:()=>({meta:[{title:yn.title},{name:"description",content:yn.description},{property:"og:title",content:yn.title},{property:"og:description",content:yn.description},{property:"og:url",content:yn.url},{property:"og:type",content:"article"},{property:"article:published_time",content:yn.datePublished}],links:[{rel:"canonical",href:yn.url}],scripts:[{type:"application/ld+json",children:JSON.stringify(Q2)},{type:"application/ld+json",children:JSON.stringify(J2)}]}),component:Et(Y2,"component")}),vn={title:"Buying a Short-Term Rental in Crystal Beach, Texas with a DSCR Loan? Start Here.",description:"What Danny Tyroch has learned as a lender, investor, and owner of a high-performing Crystal Beach vacation rental â and how to evaluate a DSCR deal before you make an offer.",url:"https://tyrochteam.com/blog/crystal-beach-dscr-short-term-rental",datePublished:"2026-06-29"},Z2=()=>xt(()=>import("./blog.crystal-beach-dscr-short-term-rental-BwggYMuf.js"),__vite__mapDeps([21,1,5,6,7,20,11])),W2={"@context":"https://schema.org","@type":"Article",headline:vn.title,description:vn.description,datePublished:vn.datePublished,author:{"@type":"Person",name:"Danny Tyroch",jobTitle:"Loan Originator | Real Estate Investor",url:"https://tyrochteam.com"},publisher:{"@type":"Organization",name:"Tyroch Team Mortgage",url:"https://tyrochteam.com"},mainEntityOfPage:vn.url},ej=$t("/blog/crystal-beach-dscr-short-term-rental")({head:()=>({meta:[{title:vn.title},{name:"description",content:vn.description},{property:"og:title",content:vn.title},{property:"og:description",content:vn.description},{property:"og:url",content:vn.url},{property:"og:type",content:"article"},{property:"article:published_time",content:vn.datePublished},{property:"article:author",content:"Danny Tyroch"}],links:[{rel:"canonical",href:vn.url}],scripts:[{type:"application/ld+json",children:JSON.stringify(W2)}]}),component:Et(Z2,"component")});function bd(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var js=bd();function mw(t){js=t}var ws={exec:()=>null};function Ta(t){let e=[];return r=>{let a=Math.max(0,Math.min(3,r-1)),o=e[a];return o||(o=t(a),e[a]=o),o}}function _e(t,e=""){let r=typeof t=="string"?t:t.source,a={replace:(o,u)=>{let c=typeof u=="string"?u:u.source;return c=c.replace(Tt.caret,"$1"),r=r.replace(o,c),a},getRegex:()=>new RegExp(r,e)};return a}var tj=((t="")=>{try{return!!new RegExp("(?<=1)(?<!1)"+t)}catch{return!1}})(),Tt={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine
vendor: 28,564 bytes, lines 55-99
55:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:t=>new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:Ta(t=>new RegExp(`^ {0,${t}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),hrRegex:Ta(t=>new RegExp(`^ {0,${t}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`)),fencesBeginRegex:Ta(t=>new RegExp(`^ {0,${t}}(?:\`\`\`|~~~)`)),headingBeginRegex:Ta(t=>new RegExp(`^ {0,${t}}#`)),htmlBeginRegex:Ta(t=>new RegExp(`^ {0,${t}}<(?:[a-z].*>|!--)`,"i")),blockquoteBeginRegex:Ta(t=>new RegExp(`^ {0,${t}}>`))},nj=/^(?:[ \t]*(?:\n|$))+/,rj=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,sj=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,mo=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,aj=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,wd=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,yw=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,vw=_e(yw).replace(/bull/g,wd).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),ij=_e(yw).replace(/bull/g,wd).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),_d=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,oj=/^[^\n]+/,Sd=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,lj=_e(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Sd).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),uj=_e(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g,wd).getRegex(),Du="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Td=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,cj=_e("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Td).replace("tag",Du).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),bw=_e(_d).replace("hr",mo).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Du).getRegex(),hj=_e(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",bw).getRegex(),Ed={blockquote:hj,code:rj,def:lj,fences:sj,heading:aj,hr:mo,html:cj,lheading:vw,list:uj,newline:nj,paragraph:bw,table:ws,text:oj},yb=_e("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",mo).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Du).getRegex(),fj={...Ed,lheading:ij,table:yb,paragraph:_e(_d).replace("hr",mo).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",yb).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Du).getRegex()},dj={...Ed,html:_e(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Td).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:ws,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:_e(_d).replace("hr",mo).replace("heading",` *#{1,6} *[^ 56]`).replace("lheading",vw).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},pj=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,gj=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,ww=/^( {2,}|\\)\n(?!\s*$)/,mj=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Ua=/[\p{P}\p{S}]/u,Uu=/[\s\p{P}\p{S}]/u,Rd=/[^\s\p{P}\p{S}]/u,yj=_e(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Uu).getRegex(),_w=/(?!~)[\p{P}\p{S}]/u,vj=/(?!~)[\s\p{P}\p{S}]/u,bj=/(?:[^\s\p{P}\p{S}]|~)/u,wj=_e(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",tj?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),Sw=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,_j=_e(Sw,"u").replace(/punct/g,Ua).getRegex(),Sj=_e(Sw,"u").replace(/punct/g,_w).getRegex(),Tw="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Tj=_e(Tw,"gu").replace(/notPunctSpace/g,Rd).replace(/punctSpace/g,Uu).replace(/punct/g,Ua).getRegex(),Ej=_e(Tw,"gu").replace(/notPunctSpace/g,bj).replace(/punctSpace/g,vj).replace(/punct/g,_w).getRegex(),Rj=_e("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Rd).replace(/punctSpace/g,Uu).replace(/punct/g,Ua).getRegex(),xj=_e(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,Ua).getRegex(),Aj="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",kj=_e(Aj,"gu").replace(/notPunctSpace/g,Rd).replace(/punctSpace/g,Uu).replace(/punct/g,Ua).getRegex(),Oj=_e(/\\(punct)/,"gu").replace(/punct/g,Ua).getRegex(),Cj=_e(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),jj=_e(Td).replace("(?:-->|$)","-->").getRegex(),Mj=_e("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",jj).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),bu=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,Nj=_e(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",bu).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Ew=_e(/^!?\[(label)\]\[(ref)\]/).replace("label",bu).replace("ref",Sd).getRegex(),Rw=_e(/^!?\[(ref)\](?:\[\])?/).replace("ref",Sd).getRegex(),Lj=_e("reflink|nolink(?!\\()","g").replace("reflink",Ew).replace("nolink",Rw).getRegex(),vb=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,xd={_backpedal:ws,anyPunctuation:Oj,autolink:Cj,blockSkip:wj,br:ww,code:gj,del:ws,delLDelim:ws,delRDelim:ws,emStrongLDelim:_j,emStrongRDelimAst:Tj,emStrongRDelimUnd:Rj,escape:pj,link:Nj,nolink:Rw,punctuation:yj,reflink:Ew,reflinkSearch:Lj,tag:Mj,text:mj,url:ws},Dj={...xd,link:_e(/^!?\[(label)\]\((.*?)\)/).replace("label",bu).getRegex(),reflink:_e(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",bu).getRegex()},ed={...xd,emStrongRDelimAst:Ej,emStrongLDelim:Sj,delLDelim:xj,delRDelim:kj,url:_e(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",vb).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:_e(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",vb).getRegex()},Uj={...ed,br:_e(ww).replace("{2,}","*").getRegex(),text:_e(ed.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Ql={normal:Ed,gfm:fj,pedantic:dj},Ii={normal:xd,gfm:ed,breaks:Uj,pedantic:Dj},zj={"&":"&","<":"<",">":">",'"':""","'":"'"},bb=t=>zj[t];function kn(t,e){if(e){if(Tt.escapeTest.test(t))return t.replace(Tt.escapeReplace,bb)}else if(Tt.escapeTestNoEncode.test(t))return t.replace(Tt.escapeReplaceNoEncode,bb);return t}function wb(t){try{t=encodeURI(t).replace(Tt.percentDecode,"%")}catch{return null}return t}function _b(t,e){let r=t.replace(Tt.findPipe,(u,c,f)=>{let p=!1,g=c;for(;--g>=0&&f[g]==="\\";)p=!p;return p?"|":" |"}),a=r.split(Tt.splitPipe),o=0;if(a[0].trim()||a.shift(),a.length>0&&!a.at(-1)?.trim()&&a.pop(),e)if(a.length>e)a.splice(e);else for(;a.length<e;)a.push("");for(;o<a.length;o++)a[o]=a[o].trim().replace(Tt.slashPipe,"|");return a}function Dr(t,e,r){let a=t.length;if(a===0)return"";let o=0;for(;o<a&&t.charAt(a-o-1)===e;)o++;return t.slice(0,a-o)}function Sb(t){let e=t.split(` 57`),r=e.length-1;for(;r>=0&&Tt.blankLine.test(e[r]);)r--;return e.length-r<=2?t:e.slice(0,r+1).join(` 58`)}function Pj(t,e){if(t.indexOf(e[1])===-1)return-1;let r=0;for(let a=0;a<t.length;a++)if(t[a]==="\\")a++;else if(t[a]===e[0])r++;else if(t[a]===e[1]&&(r--,r<0))return a;return r>0?-2:-1}function Bj(t,e=0){let r=e,a="";for(let o of t)if(o===" "){let u=4-r%4;a+=" ".repeat(u),r+=u}else a+=o,r++;return a}function Tb(t,e,r,a,o){let u=e.href,c=e.title||null,f=t[1].replace(o.other.outputLinkReplace,"$1");a.state.inLink=!0;let p={type:t[0].charAt(0)==="!"?"image":"link",raw:r,href:u,title:c,text:f,tokens:a.inlineTokens(f)};return a.state.inLink=!1,p}function $j(t,e,r){let a=t.match(r.other.indentCodeCompensation);if(a===null)return e;let o=a[1];return e.split(` 59`).map(u=>{let c=u.match(r.other.beginningSpace);if(c===null)return u;let[f]=c;return f.length>=o.length?u.slice(o.length):u}).join(` 60`)}var wu=class{options;rules;lexer;constructor(t){this.options=t||js}space(t){let e=this.rules.block.newline.exec(t);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(t){let e=this.rules.block.code.exec(t);if(e){let r=this.options.pedantic?e[0]:Sb(e[0]),a=r.replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:r,codeBlockStyle:"indented",text:a}}}fences(t){let e=this.rules.block.fences.exec(t);if(e){let r=e[0],a=$j(r,e[3]||"",this.rules);return{type:"code",raw:r,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:a}}}heading(t){let e=this.rules.block.heading.exec(t);if(e){let r=e[2].trim();if(this.rules.other.endingHash.test(r)){let a=Dr(r,"#");(this.options.pedantic||!a||this.rules.other.endingSpaceChar.test(a))&&(r=a.trim())}return{type:"heading",raw:Dr(e[0],` 61`),depth:e[1].length,text:r,tokens:this.lexer.inline(r)}}}hr(t){let e=this.rules.block.hr.exec(t);if(e)return{type:"hr",raw:Dr(e[0],` 62`)}}blockquote(t){let e=this.rules.block.blockquote.exec(t);if(e){let r=Dr(e[0],` 63`).split(` 64`),a="",o="",u=[];for(;r.length>0;){let c=!1,f=[],p;for(p=0;p<r.length;p++)if(this.rules.other.blockquoteStart.test(r[p]))f.push(r[p]),c=!0;else if(!c)f.push(r[p]);else break;r=r.slice(p);let g=f.join(` 65`),y=g.replace(this.rules.other.blockquoteSetextReplace,` 66 $1`).replace(this.rules.other.blockquoteSetextReplace2,"");a=a?`${a} 67${g}`:g,o=o?`${o} 68${y}`:y;let m=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(y,u,!0),this.lexer.state.top=m,r.length===0)break;let b=u.at(-1);if(b?.type==="code")break;if(b?.type==="blockquote"){let w=b,_=w.raw+` 69`+r.join(` 70`),x=this.blockquote(_);u[u.length-1]=x,a=a.substring(0,a.length-w.raw.length)+x.raw,o=o.substring(0,o.length-w.text.length)+x.text;break}else if(b?.type==="list"){let w=b,_=w.raw+` 71`+r.join(` 72`),x=this.list(_);u[u.length-1]=x,a=a.substring(0,a.length-b.raw.length)+x.raw,o=o.substring(0,o.length-w.raw.length)+x.raw,r=_.substring(u.at(-1).raw.length).split(` 73`);continue}}return{type:"blockquote",raw:a,tokens:u,text:o}}}list(t){let e=this.rules.block.list.exec(t);if(e){let r=e[1].trim(),a=r.length>1,o={type:"list",raw:"",ordered:a,start:a?+r.slice(0,-1):"",loose:!1,items:[]};r=a?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=a?r:"[*+-]");let u=this.rules.other.listItemRegex(r),c=!1;for(;t;){let p=!1,g="",y="";if(!(e=u.exec(t))||this.rules.block.hr.test(t))break;g=e[0],t=t.substring(g.length);let m=Bj(e[2].split(` 74`,1)[0],e[1].length),b=t.split(` 75`,1)[0],w=!m.trim(),_=0;if(this.options.pedantic?(_=2,y=m.trimStart()):w?_=e[1].length+1:(_=m.search(this.rules.other.nonSpaceChar),_=_>4?1:_,y=m.slice(_),_+=e[1].length),w&&this.rules.other.blankLine.test(b)&&(g+=b+` 76`,t=t.substring(b.length+1),p=!0),!p){let x=this.rules.other.nextBulletRegex(_),E=this.rules.other.hrRegex(_),A=this.rules.other.fencesBeginRegex(_),M=this.rules.other.headingBeginRegex(_),j=this.rules.other.htmlBeginRegex(_),z=this.rules.other.blockquoteBeginRegex(_);for(;t;){let Y=t.split(` 77`,1)[0],K;if(b=Y,this.options.pedantic?(b=b.replace(this.rules.other.listReplaceNesting," "),K=b):K=b.replace(this.rules.other.tabCharGlobal," "),A.test(b)||M.test(b)||j.test(b)||z.test(b)||x.test(b)||E.test(b))break;if(K.search(this.rules.other.nonSpaceChar)>=_||!b.trim())y+=` 78`+K.slice(_);else{if(w||m.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||A.test(m)||M.test(m)||E.test(m))break;y+=` 79`+b}w=!b.trim(),g+=Y+` 80`,t=t.substring(Y.length+1),m=K.slice(_)}}o.loose||(c?o.loose=!0:this.rules.other.doubleBlankLine.test(g)&&(c=!0)),o.items.push({type:"list_item",raw:g,task:!!this.options.gfm&&this.rules.other.listIsTask.test(y),loose:!1,text:y,tokens:[]}),o.raw+=g}let f=o.items.at(-1);if(f)f.raw=f.raw.trimEnd(),f.text=f.text.trimEnd();else return;o.raw=o.raw.trimEnd();for(let p of o.items){this.lexer.state.top=!1,p.tokens=this.lexer.blockTokens(p.text,[]);let g=p.tokens[0];if(p.task&&(g?.type==="text"||g?.type==="paragraph")){p.text=p.text.replace(this.rules.other.listReplaceTask,""),g.raw=g.raw.replace(this.rules.other.listReplaceTask,""),g.text=g.text.replace(this.rules.other.listReplaceTask,"");for(let m=this.lexer.inlineQueue.length-1;m>=0;m--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[m].src)){this.lexer.inlineQueue[m].src=this.lexer.inlineQueue[m].src.replace(this.rules.other.listReplaceTask,"");break}let y=this.rules.other.listTaskCheckbox.exec(p.raw);if(y){let m={type:"checkbox",raw:y[0]+" ",checked:y[0]!=="[ ]"};p.checked=m.checked,o.loose?p.tokens[0]&&["paragraph","text"].includes(p.tokens[0].type)&&"tokens"in p.tokens[0]&&p.tokens[0].tokens?(p.tokens[0].raw=m.raw+p.tokens[0].raw,p.tokens[0].text=m.raw+p.tokens[0].text,p.tokens[0].tokens.unshift(m)):p.tokens.unshift({type:"paragraph",raw:m.raw,text:m.raw,tokens:[m]}):p.tokens.unshift(m)}}else p.task&&(p.task=!1);if(!o.loose){let y=p.tokens.filter(b=>b.type==="space"),m=y.length>0&&y.some(b=>this.rules.other.anyLine.test(b.raw));o.loose=m}}if(o.loose)for(let p of o.items){p.loose=!0;for(let g of p.tokens)g.type==="text"&&(g.type="paragraph")}return o}}html(t){let e=this.rules.block.html.exec(t);if(e){let r=Sb(e[0]);return{type:"html",block:!0,raw:r,pre:e[1]==="pre"||e[1]==="script"||e[1]==="style",text:r}}}def(t){let e=this.rules.block.def.exec(t);if(e){let r=e[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),a=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",o=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:r,raw:Dr(e[0],` 81`),href:a,title:o}}}table(t){let e=this.rules.block.table.exec(t);if(!e||!this.rules.other.tableDelimiter.test(e[2]))return;let r=_b(e[1]),a=e[2].replace(this.rules.other.tableAlignChars,"").split("|"),o=e[3]?.trim()?e[3].replace(this.rules.other.tableRowBlankLine,"").split(` 82`):[],u={type:"table",raw:Dr(e[0],` 83`),header:[],align:[],rows:[]};if(r.length===a.length){for(let c of a)this.rules.other.tableAlignRight.test(c)?u.align.push("right"):this.rules.other.tableAlignCenter.test(c)?u.align.push("center"):this.rules.other.tableAlignLeft.test(c)?u.align.push("left"):u.align.push(null);for(let c=0;c<r.length;c++)u.header.push({text:r[c],tokens:this.lexer.inline(r[c]),header:!0,align:u.align[c]});for(let c of o)u.rows.push(_b(c,u.header.length).map((f,p)=>({text:f,tokens:this.lexer.inline(f),header:!1,align:u.align[p]})));return u}}lheading(t){let e=this.rules.block.lheading.exec(t);if(e){let r=e[1].trim();return{type:"heading",raw:Dr(e[0],` 84`),depth:e[2].charAt(0)==="="?1:2,text:r,tokens:this.lexer.inline(r)}}}paragraph(t){let e=this.rules.block.paragraph.exec(t);if(e){let r=e[1].charAt(e[1].length-1)===` 85`?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:r,tokens:this.lexer.inline(r)}}}text(t){let e=this.rules.block.text.exec(t);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(t){let e=this.rules.inline.escape.exec(t);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(t){let e=this.rules.inline.tag.exec(t);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(t){let e=this.rules.inline.link.exec(t);if(e){let r=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(r)){if(!this.rules.other.endAngleBracket.test(r))return;let u=Dr(r.slice(0,-1),"\\");if((r.length-u.length)%2===0)return}else{let u=Pj(e[2],"()");if(u===-2)return;if(u>-1){let c=(e[0].indexOf("!")===0?5:4)+e[1].length+u;e[2]=e[2].substring(0,u),e[0]=e[0].substring(0,c).trim(),e[3]=""}}let a=e[2],o="";if(this.options.pedantic){let u=this.rules.other.pedanticHrefTitle.exec(a);u&&(a=u[1],o=u[3])}else o=e[3]?e[3].slice(1,-1):"";return a=a.trim(),this.rules.other.startAngleBracket.test(a)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(r)?a=a.slice(1):a=a.slice(1,-1)),Tb(e,{href:a&&a.replace(this.rules.inline.anyPunctuation,"$1"),title:o&&o.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(t,e){let r;if((r=this.rules.inline.reflink.exec(t))||(r=this.rules.inline.nolink.exec(t))){let a=(r[2]||r[1]).replace(this.rules.other.multipleSpaceGlobal," "),o=e[a.toLowerCase()];if(!o){let u=r[0].charAt(0);return{type:"text",raw:u,text:u}}return Tb(r,o,r[0],this.lexer,this.rules)}}emStrong(t,e,r=""){let a=this.rules.inline.emStrongLDelim.exec(t);if(!(!a||!a[1]&&!a[2]&&!a[3]&&!a[4]||a[4]&&r.match(this.rules.other.unicodeAlphaNumeric))&&(!(a[1]||a[3])||!r||this.rules.inline.punctuation.exec(r))){let o=[...a[0]].length-1,u,c,f=o,p=0,g=a[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(g.lastIndex=0,e=e.slice(-1*t.length+o);(a=g.exec(e))!==null;){if(u=a[1]||a[2]||a[3]||a[4]||a[5]||a[6],!u)continue;if(c=[...u].length,a[3]||a[4]){f+=c;continue}else if((a[5]||a[6])&&o%3&&!((o+c)%3)){p+=c;continue}if(f-=c,f>0)continue;c=Math.min(c,c+f+p);let y=[...a[0]][0].length,m=t.slice(0,o+a.index+y+c);if(Math.min(o,c)%2){let w=m.slice(1,-1);return{type:"em",raw:m,text:w,tokens:this.lexer.inlineTokens(w)}}let b=m.slice(2,-2);return{type:"strong",raw:m,text:b,tokens:this.lexer.inlineTokens(b)}}}}codespan(t){let e=this.rules.inline.code.exec(t);if(e){let r=e[2].replace(this.rules.other.newLineCharGlobal," "),a=this.rules.other.nonSpaceChar.test(r),o=this.rules.other.startingSpaceChar.test(r)&&this.rules.other.endingSpaceChar.test(r);return a&&o&&(r=r.substring(1,r.length-1)),{type:"codespan",raw:e[0],text:r}}}br(t){let e=this.rules.inline.br.exec(t);if(e)return{type:"br",raw:e[0]}}del(t,e,r=""){let a=this.rules.inline.delLDelim.exec(t);if(a&&(!a[1]||!r||this.rules.inline.punctuation.exec(r))){let o=[...a[0]].length-1,u,c,f=o,p=this.rules.inline.delRDelim;for(p.lastIndex=0,e=e.slice(-1*t.length+o);(a=p.exec(e))!==null;){if(u=a[1]||a[2]||a[3]||a[4]||a[5]||a[6],!u||(c=[...u].length,c!==o))continue;if(a[3]||a[4]){f+=c;continue}if(f-=c,f>0)continue;c=Math.min(c,c+f);let g=[...a[0]][0].length,y=t.slice(0,o+a.index+g+c),m=y.slice(o,-o);return{type:"del",raw:y,text:m,tokens:this.lexer.inlineTokens(m)}}}}autolink(t){let e=this.rules.inline.autolink.exec(t);if(e){let r,a;return e[2]==="@"?(r=e[1],a="mailto:"+r):(r=e[1],a=r),{type:"link",raw:e[0],text:r,href:a,tokens:[{type:"text",raw:r,text:r}]}}}url(t){let e;if(e=this.rules.inline.url.exec(t)){let r,a;if(e[2]==="@")r=e[0],a="mailto:"+r;else{let o;do o=e[0],e[0]=this.rules.inline._backpedal.exec(e[0])?.[0]??"";while(o!==e[0]);r=e[0],e[1]==="www."?a="http://"+e[0]:a=e[0]}return{type:"link",raw:e[0],text:r,href:a,tokens:[{type:"text",raw:r,text:r}]}}}inlineText(t){let e=this.rules.inline.text.exec(t);if(e){let r=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:r}}}},bn=class td{tokens;options;state;inlineQueue;tokenizer;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||js,this.options.tokenizer=this.options.tokenizer||new wu,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let r={other:Tt,block:Ql.normal,inline:Ii.normal};this.options.pedantic?(r.block=Ql.pedantic,r.inline=Ii.pedantic):this.options.gfm&&(r.block=Ql.gfm,this.options.breaks?r.inline=Ii.breaks:r.inline=Ii.gfm),this.tokenizer.rules=r}static get rules(){return{block:Ql,inline:Ii}}static lex(e,r){return new td(r).lex(e)}static lexInline(e,r){return new td(r).inlineTokens(e)}lex(e){e=e.replace(Tt.carriageReturn,` 86`),this.blockTokens(e,this.tokens);for(let r=0;r<this.inlineQueue.length;r++){let a=this.inlineQueue[r];this.inlineTokens(a.src,a.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,r=[],a=!1){this.tokenizer.lexer=this,this.options.pedantic&&(e=e.replace(Tt.tabCharGlobal," ").replace(Tt.spaceLine,""));let o=1/0;for(;e;){if(e.length<o)o=e.length;else{this.infiniteLoopError(e.charCodeAt(0));break}let u;if(this.options.extensions?.block?.some(f=>(u=f.call({lexer:this},e,r))?(e=e.substring(u.raw.length),r.push(u),!0):!1))continue;if(u=this.tokenizer.space(e)){e=e.substring(u.raw.length);let f=r.at(-1);u.raw.length===1&&f!==void 0?f.raw+=` 87`:r.push(u);continue}if(u=this.tokenizer.code(e)){e=e.substring(u.raw.length);let f=r.at(-1);f?.type==="paragraph"||f?.type==="text"?(f.raw+=(f.raw.endsWith(` 88`)?"":` 89`)+u.raw,f.text+=` 90`+u.text,this.inlineQueue.at(-1).src=f.text):r.push(u);continue}if(u=this.tokenizer.fences(e)){e=e.substring(u.raw.length),r.push(u);continue}if(u=this.tokenizer.heading(e)){e=e.substring(u.raw.length),r.push(u);continue}if(u=this.tokenizer.hr(e)){e=e.substring(u.raw.length),r.push(u);continue}if(u=this.tokenizer.blockquote(e)){e=e.substring(u.raw.length),r.push(u);continue}if(u=this.tokenizer.list(e)){e=e.substring(u.raw.length),r.push(u);continue}if(u=this.tokenizer.html(e)){e=e.substring(u.raw.length),r.push(u);continue}if(u=this.tokenizer.def(e)){e=e.substring(u.raw.length);let f=r.at(-1);f?.type==="paragraph"||f?.type==="text"?(f.raw+=(f.raw.endsWith(` 91`)?"":` 92`)+u.raw,f.text+=` 93`+u.raw,this.inlineQueue.at(-1).src=f.text):this.tokens.links[u.tag]||(this.tokens.links[u.tag]={href:u.href,title:u.title},r.push(u));continue}if(u=this.tokenizer.table(e)){e=e.substring(u.raw.length),r.push(u);continue}if(u=this.tokenizer.lheading(e)){e=e.substring(u.raw.length),r.push(u);continue}let c=e;if(this.options.extensions?.startBlock){let f=1/0,p=e.slice(1),g;this.options.extensions.startBlock.forEach(y=>{g=y.call({lexer:this},p),typeof g=="number"&&g>=0&&(f=Math.min(f,g))}),f<1/0&&f>=0&&(c=e.substring(0,f+1))}if(this.state.top&&(u=this.tokenizer.paragraph(c))){let f=r.at(-1);a&&f?.type==="paragraph"?(f.raw+=(f.raw.endsWith(` 94`)?"":` 95`)+u.raw,f.text+=` 96`+u.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=f.text):r.push(u),a=c.length!==e.length,e=e.substring(u.raw.length);continue}if(u=this.tokenizer.text(e)){e=e.substring(u.raw.length);let f=r.at(-1);f?.type==="text"?(f.raw+=(f.raw.endsWith(` 97`)?"":` 98`)+u.raw,f.text+=` 99`+u.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=f.text):r.push(u);continue}if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return this.state.top=!0,r}inline(e,r=[]){return this.inlineQueue.push({src:e,tokens:r}),r}inlineTokens(e,r=[]){this.tokenizer.lexer=this;let a=e,o=null;if(this.tokens.links){let g=Object.keys(this.tokens.links);if(g.length>0)for(;(o=this.tokenizer.rules.inline.reflinkSearch.exec(a))!==null;)g.includes(o[0].slice(o[0].lastIndexOf("[")+1,-1))&&(a=a.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+a.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(o=this.tokenizer.rules.inline.anyPunctuation.exec(a))!==null;)a=a.slice(0,o.index)+"++"+a.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let u;for(;(o=this.tokenizer.rules.inline.blockSkip.exec(a))!==null;)u=o[2]?o[2].length:0,a=a.slice(0,o.index+u)+"["+"a".repeat(o[0].length-u-2)+"]"+a.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);a=this.options.hooks?.emStrongMask?.call({lexer:this},a)??a;let c=!1,f="",p=1/0;for(;e;){if(e.length<p)p=e.length;else{this.infiniteLoopError(e.charCodeAt(0));break}c||(f=""),c=!1;let g;if(this.options.extensions?.inline?.some(m=>(g=m.call({lexer:this},e,r))?(e=e.substring(g.raw.length),r.push(g),!0):!1))continue;if(g=this.tokenizer.escape(e)){e=e.substring(g.raw.length),r.push(g);continue}if(g=this.tokenizer.tag(e)){e=e.substring(g.raw.length),r.push(g);continue}if(g=this.tokenizer.link(e)){e=e.substring(g.raw.length),r.push(g);continue}if(g=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(g.raw.length);let m=r.at(-1);
vendor: 8,740 bytes, lines 99-117
99g.type==="text"&&m?.type==="text"?(m.raw+=g.raw,m.text+=g.text):r.push(g);continue}if(g=this.tokenizer.emStrong(e,a,f)){e=e.substring(g.raw.length),r.push(g);continue}if(g=this.tokenizer.codespan(e)){e=e.substring(g.raw.length),r.push(g);continue}if(g=this.tokenizer.br(e)){e=e.substring(g.raw.length),r.push(g);continue}if(g=this.tokenizer.del(e,a,f)){e=e.substring(g.raw.length),r.push(g);continue}if(g=this.tokenizer.autolink(e)){e=e.substring(g.raw.length),r.push(g);continue}if(!this.state.inLink&&(g=this.tokenizer.url(e))){e=e.substring(g.raw.length),r.push(g);continue}let y=e;if(this.options.extensions?.startInline){let m=1/0,b=e.slice(1),w;this.options.extensions.startInline.forEach(_=>{w=_.call({lexer:this},b),typeof w=="number"&&w>=0&&(m=Math.min(m,w))}),m<1/0&&m>=0&&(y=e.substring(0,m+1))}if(g=this.tokenizer.inlineText(y)){e=e.substring(g.raw.length),g.raw.slice(-1)!=="_"&&(f=g.raw.slice(-1)),c=!0;let m=r.at(-1);m?.type==="text"?(m.raw+=g.raw,m.text+=g.text):r.push(g);continue}if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return r}infiniteLoopError(e){let r="Infinite loop on byte: "+e;if(this.options.silent)console.error(r);else throw new Error(r)}},_u=class{options;parser;constructor(t){this.options=t||js}space(t){return""}code({text:t,lang:e,escaped:r}){let a=(e||"").match(Tt.notSpaceStart)?.[0],o=t.replace(Tt.endingNewline,"")+` 100`;return a?'<pre><code class="language-'+kn(a)+'">'+(r?o:kn(o,!0))+`</code></pre> 101`:"<pre><code>"+(r?o:kn(o,!0))+`</code></pre> 102`}blockquote({tokens:t}){return`<blockquote> 103${this.parser.parse(t)}</blockquote> 104`}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:e}){return`<h${e}>${this.parser.parseInline(t)}</h${e}> 105`}hr(t){return`<hr> 106`}list(t){let e=t.ordered,r=t.start,a="";for(let c=0;c<t.items.length;c++){let f=t.items[c];a+=this.listitem(f)}let o=e?"ol":"ul",u=e&&r!==1?' start="'+r+'"':"";return"<"+o+u+`> 107`+a+"</"+o+`> 108`}listitem(t){return`<li>${this.parser.parse(t.tokens)}</li> 109`}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p> 110`}table(t){let e="",r="";for(let o=0;o<t.header.length;o++)r+=this.tablecell(t.header[o]);e+=this.tablerow({text:r});let a="";for(let o=0;o<t.rows.length;o++){let u=t.rows[o];r="";for(let c=0;c<u.length;c++)r+=this.tablecell(u[c]);a+=this.tablerow({text:r})}return a&&(a=`<tbody>${a}</tbody>`),`<table> 111<thead> 112`+e+`</thead> 113`+a+`</table> 114`}tablerow({text:t}){return`<tr> 115${t}</tr> 116`}tablecell(t){let e=this.parser.parseInline(t.tokens),r=t.header?"th":"td";return(t.align?`<${r} align="${t.align}">`:`<${r}>`)+e+`</${r}> 117`}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${kn(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:e,tokens:r}){let a=this.parser.parseInline(r),o=wb(t);if(o===null)return a;t=o;let u='<a href="'+t+'"';return e&&(u+=' title="'+kn(e)+'"'),u+=">"+a+"</a>",u}image({href:t,title:e,text:r,tokens:a}){a&&(r=this.parser.parseInline(a,this.parser.textRenderer));let o=wb(t);if(o===null)return kn(r);t=o;let u=`<img src="${t}" alt="${kn(r)}"`;return e&&(u+=` title="${kn(e)}"`),u+=">",u}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:kn(t.text)}},Ad=class{strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}checkbox({raw:t}){return t}},wn=class nd{options;renderer;textRenderer;constructor(e){this.options=e||js,this.options.renderer=this.options.renderer||new _u,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Ad}static parse(e,r){return new nd(r).parse(e)}static parseInline(e,r){return new nd(r).parseInline(e)}parse(e){this.renderer.parser=this;let r="";for(let a=0;a<e.length;a++){let o=e[a];if(this.options.extensions?.renderers?.[o.type]){let c=o,f=this.options.extensions.renderers[c.type].call({parser:this},c);if(f!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(c.type)){r+=f||"";continue}}let u=o;switch(u.type){case"space":{r+=this.renderer.space(u);break}case"hr":{r+=this.renderer.hr(u);break}case"heading":{r+=this.renderer.heading(u);break}case"code":{r+=this.renderer.code(u);break}case"table":{r+=this.renderer.table(u);break}case"blockquote":{r+=this.renderer.blockquote(u);break}case"list":{r+=this.renderer.list(u);break}case"checkbox":{r+=this.renderer.checkbox(u);break}case"html":{r+=this.renderer.html(u);break}case"def":{r+=this.renderer.def(u);break}case"paragraph":{r+=this.renderer.paragraph(u);break}case"text":{r+=this.renderer.text(u);break}default:{let c='Token with "'+u.type+'" type was not found.';if(this.options.silent)return console.error(c),"";throw new Error(c)}}}return r}parseInline(e,r=this.renderer){this.renderer.parser=this;let a="";for(let o=0;o<e.length;o++){let u=e[o];if(this.options.extensions?.renderers?.[u.type]){let f=this.options.extensions.renderers[u.type].call({parser:this},u);if(f!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(u.type)){a+=f||"";continue}}let c=u;switch(c.type){case"escape":{a+=r.text(c);break}case"html":{a+=r.html(c);break}case"link":{a+=r.link(c);break}case"image":{a+=r.image(c);break}case"checkbox":{a+=r.checkbox(c);break}case"strong":{a+=r.strong(c);break}case"em":{a+=r.em(c);break}case"codespan":{a+=r.codespan(c);break}case"br":{a+=r.br(c);break}case"del":{a+=r.del(c);break}case"text":{a+=r.text(c);break}default:{let f='Token with "'+c.type+'" type was not found.';if(this.options.silent)return console.error(f),"";throw new Error(f)}}}return a}},Ki=class{options;block;constructor(t){this.options=t||js}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}emStrongMask(t){return t}provideLexer(t=this.block){return t?bn.lex:bn.lexInline}provideParser(t=this.block){return t?wn.parse:wn.parseInline}},Ij=class{defaults=bd();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=wn;Renderer=_u;TextRenderer=Ad;Lexer=bn;Tokenizer=wu;Hooks=Ki;constructor(...t){this.use(...t)}walkTokens(t,e){let r=[];for(let a of t)switch(r=r.concat(e.call(this,a)),a.type){case"table":{let o=a;for(let u of o.header)r=r.concat(this.walkTokens(u.tokens,e));for(let u of o.rows)for(let c of u)r=r.concat(this.walkTokens(c.tokens,e));break}case"list":{let o=a;r=r.concat(this.walkTokens(o.items,e));break}default:{let o=a;this.defaults.extensions?.childTokens?.[o.type]?this.defaults.extensions.childTokens[o.type].forEach(u=>{let c=o[u].flat(1/0);r=r.concat(this.walkTokens(c,e))}):o.tokens&&(r=r.concat(this.walkTokens(o.tokens,e)))}}return r}use(...t){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(r=>{let a={...r};if(a.async=this.defaults.async||a.async||!1,r.extensions&&(r.extensions.forEach(o=>{if(!o.name)throw new Error("extension name required");if("renderer"in o){let u=e.renderers[o.name];u?e.renderers[o.name]=function(...c){let f=o.renderer.apply(this,c);return f===!1&&(f=u.apply(this,c)),f}:e.renderers[o.name]=o.renderer}if("tokenizer"in o){if(!o.level||o.level!=="block"&&o.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let u=e[o.level];u?u.unshift(o.tokenizer):e[o.level]=[o.tokenizer],o.start&&(o.level==="block"?e.startBlock?e.startBlock.push(o.start):e.startBlock=[o.start]:o.level==="inline"&&(e.startInline?e.startInline.push(o.start):e.startInline=[o.start]))}"childTokens"in o&&o.childTokens&&(e.childTokens[o.name]=o.childTokens)}),a.extensions=e),r.renderer){let o=this.defaults.renderer||new _u(this.defaults);for(let u in r.renderer){if(!(u in o))throw new Error(`renderer '${u}' does not exist`);if(["options","parser"].includes(u))continue;let c=u,f=r.renderer[c],p=o[c];o[c]=(...g)=>{let y=f.apply(o,g);return y===!1&&(y=p.apply(o,g)),y||""}}a.renderer=o}if(r.tokenizer){let o=this.defaults.tokenizer||new wu(this.defaults);for(let u in r.tokenizer){if(!(u in o))throw new Error(`tokenizer '${u}' does not exist`);if(["options","rules","lexer"].includes(u))continue;let c=u,f=r.tokenizer[c],p=o[c];o[c]=(...g)=>{let y=f.apply(o,g);return y===!1&&(y=p.apply(o,g)),y}}a.tokenizer=o}
117if(r.hooks){let o=this.defaults.hooks||new Ki;for(let u in r.hooks){if(!(u in o))throw new Error(`hook '${u}' does not exist`);if(["options","block"].includes(u))continue;let c=u,f=r.hooks[c],p=o[c];Ki.passThroughHooks.has(u)?o[c]=g=>{if(this.defaults.async&&Ki.passThroughHooksRespectAsync.has(u))return(async()=>{let m=await f.call(o,g);return p.call(o,m)})();let y=f.call(o,g);return p.call(o,y)}:o[c]=(...g)=>{if(this.defaults.async)return(async()=>{let m=await f.apply(o,g);return m===!1&&(m=await p.apply(o,g)),m})();let y=f.apply(o,g);return y===!1&&(y=p.apply(o,g)),y}}a.hooks=o}if(r.walkTokens){let o=this.defaults.walkTokens,u=r.walkTokens;a.walkTokens=function(c){let f=[];return f.push(u.call(this,c)),o&&(f=f.concat(o.call(this,c))),f}}this.defaults={...this.defaults,...a}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,e){return bn.lex(t,e??this.defaults)}parser(t,e){return wn.parse(t,e??this.defaults)}parseMarkdown(t){return(e,r)=>{let a={...r},o={...this.defaults,...a},u=this.onError(!!o.silent,!!o.async);if(this.defaults.async===!0&&a.async===!1)return u(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof e>"u"||e===null)return u(new Error("marked(): input parameter is undefined or null"));if(typeof e!="string")return u(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected"));if(o.hooks&&(o.hooks.options=o,o.hooks.block=t),o.async)return(async()=>{let c=o.hooks?await o.hooks.preprocess(e):e,f=await(o.hooks?await o.hooks.provideLexer(t):t?bn.lex:bn.lexInline)(c,o),p=o.hooks?await o.hooks.processAllTokens(f):f;o.walkTokens&&await Promise.all(this.walkTokens(p,o.walkTokens));let g=await(o.hooks?await o.hooks.provideParser(t):t?wn.parse:wn.parseInline)(p,o);return o.hooks?await o.hooks.postprocess(g):g})().catch(u);try{o.hooks&&(e=o.hooks.preprocess(e));let c=(o.hooks?o.hooks.provideLexer(t):t?bn.lex:bn.lexInline)(e,o);o.hooks&&(c=o.hooks.processAllTokens(c)),o.walkTokens&&this.walkTokens(c,o.walkTokens);let f=(o.hooks?o.hooks.provideParser(t):t?wn.parse:wn.parseInline)(c,o);return o.hooks&&(f=o.hooks.postprocess(f)),f}catch(c){return u(c)}}}onError(t,e){return r=>{if(r.message+=` 118Please report this to https://github.com/markedjs/marked.`,t){let a="<p>An error occurred:</p><pre>"+kn(r.message+"",!0)+"</pre>";return e?Promise.resolve(a):a}if(e)return Promise.reject(r);throw r}}},ks=new Ij;function Oe(t,e){return ks.parse(t,e)}Oe.options=Oe.setOptions=function(t){return ks.setOptions(t),Oe.defaults=ks.defaults,mw(Oe.defaults),Oe};Oe.getDefaults=bd;Oe.defaults=js;Oe.use=function(...t){return ks.use(...t),Oe.defaults=ks.defaults,mw(Oe.defaults),Oe};Oe.walkTokens=function(t,e){return ks.walkTokens(t,e)};Oe.parseInline=ks.parseInline;Oe.Parser=wn;Oe.parser=wn.parse;Oe.Renderer=_u;Oe.TextRenderer=Ad;Oe.Lexer=bn;Oe.lexer=bn.lex;Oe.Tokenizer=wu;Oe.Hooks=Ki;Oe.parse=Oe;Oe.options;Oe.setOptions;Oe.use;Oe.walkTokens;Oe.parseInline;wn.parse;bn.lex;const qj=()=>xt(()=>import("./blog._slug-DMIhZfKC.js"),__vite__mapDeps([22,1])),Hj=()=>xt(()=>import("./blog._slug-UGTBx9Zy.js"),[]),Gj=()=>xt(()=>import("./blog._slug-B3pw5BIf.js"),[]),Vj=tu({method:"GET"}).handler(w0("517dc55c0deef49418080819e411d72c89ee0d3818234766d11a0d6a0f2adf2f"));Oe.setOptions({gfm:!0,breaks:!1});const Kj=$t("/blog/$slug")({loader:async({params:t})=>{const e=await Vj({data:{slug:t.slug}});if(!e)throw jT();const r=await Oe.parse(e.content);return{post:e,html:r}},head:({loaderData:t})=>{if(!t)return{meta:[{title:"Blog"}]};const{post:e}=t,r=`https://tyrochteam.com/blog/${e.slug}`,a=e.excerpt||e.title,o={"@context":"https://schema.org","@type":"Article",headline:e.title,description:a,author:{"@type":"Organization",name:e.author},publisher:{"@type":"Organization",name:"Tyroch Team Mortgage",url:"https://tyrochteam.com"},datePublished:e.published_at,mainEntityOfPage:r,...e.cover_image_url?{image:e.cover_image_url}:{}};return{meta:[{title:`${e.title} | Tyroch Team`},{name:"description",content:a},{property:"og:title",content:e.title},{property:"og:description",content:a},{property:"og:url",content:r},{property:"og:type",content:"article"},...e.cover_image_url?[{property:"og:image",content:e.cover_image_url}]:[],...e.published_at?[{property:"article:published_time",content:e.published_at}]:[]],links:[{rel:"canonical",href:r}],scripts:[{type:"application/ld+json",children:JSON.stringify(o)}]}},errorComponent:Et(Gj,"errorComponent"),notFoundComponent:Et(Hj,"notFoundComponent"),component:Et(qj,"component")}),Fj=()=>xt(()=>import("./admin_.videos-C9FxqXEk.js"),__vite__mapDeps([23,14,24])),Yj=$t("/admin_/videos")({head:()=>({meta:[{title:"Admin â Videos"},{name:"robots",content:"noindex"}
118]}),component:Et(Fj,"component")}),Qj=()=>xt(()=>import("./admin_.login-ChT44uHK.js"),[]),Jj=$t("/admin_/login")({head:()=>({meta:[{title:"Admin Login"},{name:"robots",content:"noindex"}]}),component:Et(Qj,"component")}),Xj=()=>xt(()=>import("./admin_.inquiries-D0xmR_qp.js"),__vite__mapDeps([25,14,9,24])),Zj=$t("/admin_/inquiries")({head:()=>({meta:[{title:"Admin â Inquiries"},{name:"robots",content:"noindex"}]}),component:Et(Xj,"component")}),Wj=()=>xt(()=>import("./admin_.blogs-BlhYe-Uo.js"),__vite__mapDeps([26,14,15,24])),eM=$t("/admin_/blogs")({head:()=>({meta:[{title:"Admin â Blogs"},{name:"robots",content:"noindex"}]}),component:Et(Wj,"component")}),tM=M2.update({id:"/unsubscribe",path:"/unsubscribe",getParentRoute:()=>Rt}),nM=U2.update({id:"/resources",path:"/resources",getParentRoute:()=>Rt}),rM=P2.update({id:"/loans",path:"/loans",getParentRoute:()=>Rt}),sM=$2.update({id:"/contact",path:"/contact",getParentRoute:()=>Rt}),aM=q2.update({id:"/admin",path:"/admin",getParentRoute:()=>Rt}),iM=G2.update({id:"/aboutus",path:"/aboutus",getParentRoute:()=>Rt}),oM=K2.update({id:"/",path:"/",getParentRoute:()=>Rt}),lM=X2.update({id:"/blog/dscr-loans-investment-properties",path:"/blog/dscr-loans-investment-properties",getParentRoute:()=>Rt}),uM=ej.update({id:"/blog/crystal-beach-dscr-short-term-rental",path:"/blog/crystal-beach-dscr-short-term-rental",getParentRoute:()=>Rt}),cM=Kj.update({id:"/blog/$slug",path:"/blog/$slug",getParentRoute:()=>Rt}),hM=Yj.update({id:"/admin_/videos",path:"/admin/videos",getParentRoute:()=>Rt}),fM=Jj.update({id:"/admin_/login",path:"/admin/login",getParentRoute:()=>Rt}),dM=Zj.update({id:"/admin_/inquiries",path:"/admin/inquiries",getParentRoute:()=>Rt}),pM=eM.update({id:"/admin_/blogs",path:"/admin/blogs",getParentRoute:()=>Rt}),gM={IndexRoute:oM,AboutusRoute:iM,AdminRoute:aM,ContactRoute:sM,LoansRoute:rM,ResourcesRoute:nM,UnsubscribeRoute:tM,AdminBlogsRoute:pM,AdminInquiriesRoute:dM,AdminLoginRoute:fM,AdminVideosRoute:hM,BlogSlugRoute:cM,BlogCrystalBeachDscrShortTermRentalRoute:uM,BlogDscrLoansInvestmentPropertiesRoute:lM},mM=Rt._addFileChildren(gM),yM=()=>{const t=new n2;return uA({routeTree:mM,context:{queryClient:t},scrollRestoration:!0,defaultPreloadStaleTime:0})};async function vM(){const t=await yM();let e;if(sb){const r=await sb.getOptions();r.serializationAdapters=r.serializationAdapters??[],window.__TSS_START_OPTIONS__=r,e=r.serializationAdapters,t.options.defaultSsr=r.defaultSsr}else e=[],window.__TSS_START_OPTIONS__={serializationAdapters:e};return e.push(hx),t.options.serializationAdapters&&e.push(...t.options.serializationAdapters),t.update({basepath:"",serializationAdapters:e}),t.stores.matchesId.get().length||await gx(t),t}async function bM(){const t=await vM();return window.$_TSR?.h(),t}var Tf;function wM(){return Tf||(Tf=bM()),L.jsx(bx,{promise:Tf,children:t=>L.jsx(fA,{router:t})})}ee.startTransition(()=>{eT.hydrateRoot(document,L.jsx(ee.StrictMode,{children:L.jsx(wM,{})}))});export{vd as A,F2 as B,vn as C,v2 as D,zM as E,dt as F,PM as G,Ot as H,Kr as L,y2 as P,Kj as R,Lu as S,Zf as Y,UM as a,zC as b,go as c,NM as d,Vf as e,cw as f,Gf as g,ow as h,DC as i,L as j,JC as k,$C as l,kt as m,mn as n,LM as o,GC as p,DM as q,ee as r,xC as s,UC as t,C0 as u,tu as v,w0 as w,BM as x,$M as y,pb as z};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.