PageSourceSearch

https://kobra-kladno.lovable.app/assets/index-BYkFCx3B.js

js kobra-kladno.lovable.app collected 2026-10-03 03:35:02 UTC 634,826 bytes, 55 lines download raw bytes

vendor: 4,155 bytes, lines 1-2
1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/treninky-B_NwlYMj.js","assets/PageHero-D8foT27q.js","assets/sporty-bt1CaO_1.js","assets/akademie-BQ8AurlJ.js","assets/_authenticated-CmDkzU0r.js","assets/newspaper-Bo7elztS.js","assets/aktuality.index-DxiZQ2Ld.js","assets/admin.index-B16f6T0p.js","assets/admin.zpravy-DtfXs-0X.js","assets/trash-2-CYBdHdSb.js","assets/admin.sporty-DAYRMGqk.js","assets/save-BBHaoEgq.js","assets/admin.rozvrh-DOft3DvM.js","assets/plus-CBS2ttt_.js","assets/admin.aktuality-DO6aoDfV.js"])))=>i.map(i=>d[i]);
2function Vv(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Vd={exports:{}},Gi={};var ny;function V_(){if(ny)return Gi;ny=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function r(a,l,c){var u=null;if(c!==void 0&&(u=""+c),l.key!==void 0&&(u=""+l.key),"key"in l){c={};for(var h in l)h!=="key"&&(c[h]=l[h])}else c=l;return l=c.ref,{$$typeof:e,type:a,key:u,ref:l!==void 0?l:null,props:c}}return Gi.Fragment=t,Gi.jsx=r,Gi.jsxs=r,Gi}var ry;function G_(){return ry||(ry=1,Vd.exports=V_()),Vd.exports}var _=G_(),Gd={exports:{}},me={};var sy;function Y_(){if(sy)return me;sy=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler"),c=Symbol.for("react.consumer"),u=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),g=Symbol.for("react.activity"),b=Symbol.iterator;function w(C){return C===null||typeof C!="object"?null:(C=b&&C[b]||C["@@iterator"],typeof C=="function"?C:null)}var x={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},k=Object.assign,E={};function A(C,$,G){this.props=C,this.context=$,this.refs=E,this.updater=G||x}A.prototype.isReactComponent={},A.prototype.setState=function(C,$){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,$,"setState")},A.prototype.forceUpdate=function(C){this.updater.enqueueForceUpdate(this,C,"forceUpdate")};function M(){}M.prototype=A.prototype;function N(C,$,G){this.props=C,this.context=$,this.refs=E,this.updater=G||x}var L=N.prototype=new M;L.constructor=N,k(L,A.prototype),L.isPureReactComponent=!0;var X=Array.isArray;function Y(){}var I={H:null,A:null,T:null,S:null},F=Object.prototype.hasOwnProperty;function Z(C,$,G){var Q=G.ref;return{$$typeof:e,type:C,key:$,ref:Q!==void 0?Q:null,props:G}}function le(C,$){return Z(C.type,$,C.props)}function ie(C){return typeof C=="object"&&C!==null&&C.$$typeof===e}function ge(C){var $={"=":"=0",":":"=2"};return"$"+C.replace(/[=:]/g,function(G){return $[G]})}var we=/\/+/g;function $e(C,$){return typeof C=="object"&&C!==null&&C.key!=null?ge(""+C.key):$.toString(36)}function Me(C){switch(C.status){case"fulfilled":return C.value;case"rejected":throw C.reason;default:switch(typeof C.status=="string"?C.then(Y,Y):(C.status="pending",C.then(function($){C.status==="pending"&&(C.status="fulfilled",C.value=$)},function($){C.status==="pending"&&(C.status="rejected",C.reason=$)})),C.status){case"fulfilled":return C.value;case"rejected":throw C.reason}}throw C}function z(C,$,G,Q,te){var ue=typeof C;(ue==="undefined"||ue==="boolean")&&(C=null);var _e=!1;if(C===null)_e=!0;else switch(ue){case"bigint":case"string":case"number":_e=!0;break;case"object":switch(C.$$typeof){case e:case t:_e=!0;break;case y:return _e=C._init,z(_e(C._payload),$,G,Q,te)}}if(_e)return te=te(C),_e=Q===""?"."+$e(C,0):Q,X(te)?(G="",_e!=null&&(G=_e.replace(we,"$&/")+"/"),z(te,$,G,"",function(Lt){return Lt})):te!=null&&(ie(te)&&(te=le(te,G+(te.key==null||C&&C.key===te.key?"":(""+te.key).replace(we,"$&/")+"/")+_e)),$.push(te)),1;_e=0;var fe=Q===""?".":Q+":";if(X(C))for(var ke=0;ke<C.length;ke++)Q=C[ke],ue=fe+$e(Q,ke),_e+=z(Q,$,G,ue,te);else if(ke=w(C),typeof ke=="function")for(C=ke.call(C),ke=0;!(Q=C.next()).done;
vendor: 17,105 bytes, lines 2-4
2)Q=Q.value,ue=fe+$e(Q,ke++),_e+=z(Q,$,G,ue,te);else if(ue==="object"){if(typeof C.then=="function")return z(Me(C),$,G,Q,te);throw $=String(C),Error("Objects are not valid as a React child (found: "+($==="[object Object]"?"object with keys {"+Object.keys(C).join(", ")+"}":$)+"). If you meant to render a collection of children, use an array instead.")}return _e}function J(C,$,G){if(C==null)return C;var Q=[],te=0;return z(C,Q,"","",function(ue){return $.call(G,ue,te++)}),Q}function ae(C){if(C._status===-1){var $=C._result;$=$(),$.then(function(G){(C._status===0||C._status===-1)&&(C._status=1,C._result=G)},function(G){(C._status===0||C._status===-1)&&(C._status=2,C._result=G)}),C._status===-1&&(C._status=0,C._result=$)}if(C._status===1)return C._result.default;throw C._result}var Se=typeof reportError=="function"?reportError:function(C){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var $=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($))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",C);return}console.error(C)},ye={map:J,forEach:function(C,$,G){J(C,function(){$.apply(this,arguments)},G)},count:function(C){var $=0;return J(C,function(){$++}),$},toArray:function(C){return J(C,function($){return $})||[]},only:function(C){if(!ie(C))throw Error("React.Children.only expected to receive a single React element child.");return C}};return me.Activity=g,me.Children=ye,me.Component=A,me.Fragment=r,me.Profiler=l,me.PureComponent=N,me.StrictMode=a,me.Suspense=p,me.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=I,me.__COMPILER_RUNTIME={__proto__:null,c:function(C){return I.H.useMemoCache(C)}},me.cache=function(C){return function(){return C.apply(null,arguments)}},me.cacheSignal=function(){return null},me.cloneElement=function(C,$,G){if(C==null)throw Error("The argument must be a React element, but you passed "+C+".");var Q=k({},C.props),te=C.key;if($!=null)for(ue in $.key!==void 0&&(te=""+$.key),$)!F.call($,ue)||ue==="key"||ue==="__self"||ue==="__source"||ue==="ref"&&$.ref===void 0||(Q[ue]=$[ue]);var ue=arguments.length-2;if(ue===1)Q.children=G;else if(1<ue){for(var _e=Array(ue),fe=0;fe<ue;fe++)_e[fe]=arguments[fe+2];Q.children=_e}return Z(C.type,te,Q)},me.createContext=function(C){return C={$$typeof:u,_currentValue:C,_currentValue2:C,_threadCount:0,Provider:null,Consumer:null},C.Provider=C,C.Consumer={$$typeof:c,_context:C},C},me.createElement=function(C,$,G){var Q,te={},ue=null;if($!=null)for(Q in $.key!==void 0&&(ue=""+$.key),$)F.call($,Q)&&Q!=="key"&&Q!=="__self"&&Q!=="__source"&&(te[Q]=$[Q]);var _e=arguments.length-2;if(_e===1)te.children=G;else if(1<_e){for(var fe=Array(_e),ke=0;ke<_e;ke++)fe[ke]=arguments[ke+2];te.children=fe}if(C&&C.defaultProps)for(Q in _e=C.defaultProps,_e)te[Q]===void 0&&(te[Q]=_e[Q]);return Z(C,ue,te)},me.createRef=function(){return{current:null}},me.forwardRef=function(C){return{$$typeof:h,render:C}},me.isValidElement=ie,me.lazy=function(C){return{$$typeof:y,_payload:{_status:-1,_result:C},_init:ae}},me.memo=function(C,$){return{$$typeof:m,type:C,compare:$===void 0?null:$}},me.startTransition=function(C){var $=I.T,G={};I.T=G;try{var Q=C(),te=I.S;te!==null&&te(G,Q),typeof Q=="object"&&Q!==null&&typeof Q.then=="function"&&Q.then(Y,Se)}catch(ue){Se(ue)}finally{$!==null&&G.types!==null&&($.types=G.types),I.T=$}},me.unstable_useCacheRefresh=function(){return I.H.useCacheRefresh()},me.use=function(C){return I.H.use(C)},me.useActionState=function(C,$,G){return I.H.useActionState(C,$,G)},me.useCallback=function(C,$){return I.H.useCallback(C,$)},me.useContext=function(C){return I.H.useContext(C)},me.useDebugValue=function(){},me.useDeferredValue=function(C,$){return I.H.useDeferredValue(C,$)},me.useEffect=function(C,$){return I.H.useEffect(C,$)},me.useEffectEvent=function(C){return I.H.useEffectEvent(C)},me.useId=function(){return I.H.useId()},me.useImperativeHandle=function(C,$,G){return I.H.useImperativeHandle(C,$,G)},me.useInsertionEffect=function(C,$){return I.H.useInsertionEffect(C,$)},me.useLayoutEffect=function(C,$){return I.H.useLayoutEffect(C,$)},me.useMemo=function(C,$){return I.H.useMemo(C,$)},me.useOptimistic=function(C,$){return I.H.useOptimistic(C,$)},me.useReducer=function(C,$,G){return I.H.useReducer(C,$,G)},me.useRef=function(C){return I.H.useRef(C)},me.useState=function(C){return I.H.useState(C)},me.useSyncExternalStore=function(C,$,G){return I.H.useSyncExternalStore(C,$,G)},me.useTransition=function(){return I.H.useTransition()},me.version="19.2.5",me}var ay;function xo(){return ay||(ay=1,Gd.exports=Y_()),Gd.exports}var ee=xo();const W=Vv(ee);var Yd={exports:{}},Yi={},Fd={exports:{}},Jd={};var iy;function F_(){return iy||(iy=1,(function(e){function t(z,J){var ae=z.length;z.push(J);e:for(;0<ae;){var Se=ae-1>>>1,ye=z[Se];if(0<l(ye,J))z[Se]=J,z[ae]=ye,ae=Se;else break e}}function r(z){return z.length===0?null:z[0]}function a(z){if(z.length===0)return null;var J=z[0],ae=z.pop();if(ae!==J){z[0]=ae;e:for(var Se=0,ye=z.length,C=ye>>>1;Se<C;){var $=2*(Se+1)-1,G=z[$],Q=$+1,te=z[Q];if(0>l(G,ae))Q<ye&&0>l(te,G)?(z[Se]=te,z[Q]=ae,Se=Q):(z[Se]=G,z[$]=ae,Se=$);else if(Q<ye&&0>l(te,ae))z[Se]=te,z[Q]=ae,Se=Q;else break e}}return J}function l(z,J){var ae=z.sortIndex-J.sortIndex;return ae!==0?ae:z.id-J.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var c=performance;e.unstable_now=function(){return c.now()}}else{var u=Date,h=u.now();e.unstable_now=function(){return u.now()-h}}var p=[],m=[],y=1,g=null,b=3,w=!1,x=!1,k=!1,E=!1,A=typeof setTimeout=="function"?setTimeout:null,M=typeof clearTimeout=="function"?clearTimeout:null,N=typeof setImmediate<"u"?setImmediate:null;function L(z){for(var J=r(m);J!==null;){if(J.callback===null)a(m);else if(J.startTime<=z)a(m),J.sortIndex=J.expirationTime,t(p,J);else break;J=r(m)}}function X(z){if(k=!1,L(z),!x)if(r(p)!==null)x=!0,Y||(Y=!0,ge());else{var J=r(m);J!==null&&Me(X,J.startTime-z)}}var Y=!1,I=-1,F=5,Z=-1;function le(){return E?!0:!(e.unstable_now()-Z<F)}function ie(){if(E=!1,Y){var z=e.unstable_now();Z=z;var J=!0;try{e:{x=!1,k&&(k=!1,M(I),I=-1),w=!0;var ae=b;try{t:{for(L(z),g=r(p);g!==null&&!(g.expirationTime>z&&le());){var Se=g.callback;if(typeof Se=="function"){g.callback=null,b=g.priorityLevel;var ye=Se(g.expirationTime<=z);if(z=e.unstable_now(),typeof ye=="function"){g.callback=ye,L(z),J=!0;break t}g===r(p)&&a(p),L(z)}else a(p);g=r(p)}if(g!==null)J=!0;else{var C=r(m);C!==null&&Me(X,C.startTime-z),J=!1}}break e}finally{g=null,b=ae,w=!1}J=void 0}}finally{J?ge():Y=!1}}}var ge;if(typeof N=="function")ge=function(){N(ie)};else if(typeof MessageChannel<"u"){var we=new MessageChannel,$e=we.port2;we.port1.onmessage=ie,ge=function(){$e.postMessage(null)}}else ge=function(){A(ie,0)};function Me(z,J){I=A(function(){z(e.unstable_now())},J)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(z){z.callback=null},e.unstable_forceFrameRate=function(z){0>z||125<z?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):F=0<z?Math.floor(1e3/z):5},e.unstable_getCurrentPriorityLevel=function(){return b},e.unstable_next=function(z){switch(b){case 1:case 2:case 3:var J=3;break;default:J=b}var ae=b;b=J;try{return z()}finally{b=ae}},e.unstable_requestPaint=function(){E=!0},e.unstable_runWithPriority=function(z,J){switch(z){case 1:case 2:case 3:case 4:case 5:break;default:z=3}var ae=b;b=z;try{return J()}finally{b=ae}},e.unstable_scheduleCallback=function(z,J,ae){var Se=e.unstable_now();switch(typeof ae=="object"&&ae!==null?(ae=ae.delay,ae=typeof ae=="number"&&0<ae?Se+ae:Se):ae=Se,z){case 1:var ye=-1;break;case 2:ye=250;break;case 5:ye=1073741823;break;case 4:ye=1e4;break;default:ye=5e3}return ye=ae+ye,z={id:y++,callback:J,priorityLevel:z,startTime:ae,expirationTime:ye,sortIndex:-1},ae>Se?(z.sortIndex=ae,t(m,z),r(p)===null&&z===r(m)&&(k?(M(I),I=-1):k=!0,Me(X,ae-Se))):(z.sortIndex=ye,t(p,z),x||w||(x=!0,Y||(Y=!0,ge()))),z},e.unstable_shouldYield=le,e.unstable_wrapCallback=function(z){var J=b;return function(){var ae=b;b=J;try{return z.apply(this,arguments)}finally{b=ae}}}})(Jd)),Jd}var oy;function J_(){return oy||(oy=1,Fd.exports=F_()),Fd.exports}var Qd={exports:{}},Ct={};var ly;function Q_(){if(ly)return Ct;ly=1;var e=xo();function t(p){var m="https://react.dev/errors/"+p;if(1<arguments.length){m+="?args[]="+encodeURIComponent(arguments[1]);for(var y=2;y<arguments.length;y++)m+="&args[]="+encodeURIComponent(arguments[y])}return"Minified React error #"+p+"; visit "+m+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(){}var a={d:{f:r,r:function(){throw Error(t(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},l=Symbol.for("react.portal");function c(p,m,y){var g=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:l,key:g==null?null:""+g,children:p,containerInfo:m,implementation:y}}var u=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function h(p,m){if(p==="font")return"";if(typeof m=="string")return m==="use-credentials"?m:""}return Ct.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,Ct.createPortal=function(p,m){var y=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!m||m.nodeType!==1&&m.nodeType!==9&&m.nodeType!==11)throw Error(t(299));return c(p,m,null,y)},Ct.flushSync=function(p){var m=u.T,y=a.p;try{if(u.T=null,a.p=2,p)return p()}finally{u.T=m,a.p=y,a.d.f()}},Ct.preconnect=function(p,m){typeof p=="string"&&(m?(m=m.crossOrigin,m=typeof m=="string"?m==="use-credentials"?m:"":void 0):m=null,a.d.C(p,m))},Ct.prefetchDNS=function(p){typeof p=="string"&&a.d.D(p)},Ct.preinit=function(p,m){if(typeof p=="string"&&m&&typeof m.as=="string"){var y=m.as,g=h(y,m.crossOrigin),b=typeof m.integrity=="string"?m.integrity:void 0,w=typeof m.fetchPriority=="string"?m.fetchPriority:void 0;y==="style"?a.d.S(p,typeof m.precedence=="string"?m.precedence:void 0,{crossOrigin:g,integrity:b,fetchPriority:w}):y==="script"&&a.d.X(p,{crossOrigin:g,integrity:b,fetchPriority:w,nonce:typeof m.nonce=="string"?m.nonce:void 0})}},Ct.preinitModule=function(p,m){if(typeof p=="string")if(typeof m=="object"&&m!==null){if(m.as==null||m.as==="script"){var y=h(m.as,m.crossOrigin);a.d.M(p,{crossOrigin:y,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0})}}else m==null&&a.d.M(p)},Ct.preload=function(p,m){if(typeof p=="string"&&typeof m=="object"&&m!==null&&typeof m.as=="string"){var y=m.as,g=h(y,m.crossOrigin);a.d.L(p,y,{crossOrigin:g,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0,type:typeof m.type=="string"?m.type:void 0,fetchPriority:typeof m.fetchPriority=="string"?m.fetchPriority:void 0,referrerPolicy:typeof m.referrerPolicy=="string"?m.referrerPolicy:void 0,imageSrcSet:typeof m.imageSrcSet=="string"?m.imageSrcSet:void 0,imageSizes:typeof m.imageSizes=="string"?m.imageSizes:void 0,media:typeof m.media=="string"?m.media:void 0})}},Ct.preloadModule=function(p,m){if(typeof p=="string")if(m){var y=h(m.as,m.crossOrigin);a.d.m(p,{as:typeof m.as=="string"&&m.as!=="script"?m.as:void 0,crossOrigin:y,integrity:typeof m.integrity=="string"?m.integrity:void 0})}else a.d.m(p)},Ct.requestFormReset=function(p){a.d.r(p)},Ct.unstable_batchedUpdates=function(p,m){return p(m)},Ct.useFormState=function(p,m,y){return u.H.useFormState(p,m,y)},Ct.useFormStatus=function(){return u.H.useHostTransitionStatus()},Ct.version="19.2.5",Ct}var cy;function Gv(){if(cy)return Qd.exports;cy=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Qd.exports=Q_(),Qd.exports}var uy;function X_(){if(uy)return Yi;uy=1;var e=J_(),t=xo(),r=Gv();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 l(n){return!(!n||n.nodeType!==1&&n.nodeType!==9&&n.nodeType!==11)}function c(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 u(n){if(n.tag===13){var s=n.memoizedState;if(s===null&&(n=n.alternate,n!==null&&(s=n.memoizedState)),s!==null)return s.dehydrated}return null}function h(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(c(n)!==n)throw Error(a(188))}function m(n){var s=n.alternate;if(!s){if(s=c(n),s===null)throw Error(a(188));return s!==n?null:n}for(var i=n,o=s;;){var d=i.return;if(d===null)break;var f=d.alternate;if(f===null){if(o=d.return,o!==null){i=o;continue}break}if(d.child===f.child){for(f=d.child;f;){if(f===i)return p(d),n;if(f===o)return p(d),s;f=f.sibling}throw Error(a(188))}if(i.return!==o.return)i=d,o=f;else{for(var v=!1,S=d.child;S;){if(S===i){v=!0,i=d,o=f;break}if(S===o){v=!0,o=d,i=f;break}S=S.sibling}if(!v){for(S=f.child;S;){if(S===i){v=!0,i=f,o=d;break}if(S===o){v=!0,o=f,i=d;break}S=S.sibling}if(!v)throw Error(a(189))}}if(i.alternate!==o)throw Error(a(190))}if(i.tag!==3)throw Error(a(188));return i.stateNode.current===i?n:s}function y(n){var s=n.tag;if(s===5||s===26||s===27||s===6)return n;for(n=n.child;n!==null;){if(s=y(n),s!==null)return s;n=n.sibling}return null}var g=Object.assign,b=Symbol.for("react.element"),w=Symbol.for("react.transitional.element"),x=Symbol.for("react.portal"),k=Symbol.for("react.fragment"),E=Symbol.for("react.strict_mode"),A=Symbol.for("react.profiler"),M=Symbol.for("react.consumer"),N=Symbol.for("react.context"),L=Symbol.for("react.forward_ref"),X=Symbol.for("react.suspense"),Y=Symbol.for("react.suspense_list"),I=Symbol.for("react.memo"),F=Symbol.for("react.lazy"),Z=Symbol.for("react.activity"),le=Symbol.for("react.memo_cache_sentinel"),ie=Symbol.iterator;function ge(n){return n===null||typeof n!="object"?null:(n=ie&&n[ie]||n["@@iterator"],typeof n=="function"?n:null)}var we=Symbol.for("react.client.reference");function $e(n){if(n==null)return null;if(typeof n=="function")return n.$$typeof===we?null:n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case k:return"Fragment";case A:return"Profiler";case E:return"StrictMode";case X:return"Suspense";case Y:return"SuspenseList";case Z:return"Activity"}if(typeof n=="object")switch(n.$$typeof){case x:return"Portal";case N:return n.displayName||"Context";case M:return(n._context.displayName||"Context")+".Consumer";case L:var s=n.render;return n=n.displayName,n||(n=s.displayName||s.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case I:return s=n.displayName||null,s!==null?s:$e(n.type)||"Memo";case F:s=n._payload,n=n._init;try{return $e(n(s))}catch{}}return null}var Me=Array.isArray,z=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,J=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ae={pending:!1,data:null,method:null,action:null},Se=[],ye=-1;function C(n){return{current:n}}function $(n){0>ye||(n.current=Se[ye],Se[ye]=null,ye--)}function G(n,s){ye++,Se[ye]=n.current,n.current=s}var Q=C(null),te=C(null),ue=C(null),_e=C(null);function fe(n,s){switch(G(ue,s),G(te,n),G(Q,null),s.nodeType){case 9:case 11:n=(n=s.documentElement)&&(n=n.namespaceURI)?Tg(n):0;break;default:if(n=s.tagName,s=s.namespaceURI)s=Tg(s),n=Rg(s,n);else switch(n){case"svg":n=1;break;case"math":n=2;break;default:n=0}}$(Q),G(Q,n)}function ke(){$(Q),$(te),$(ue)}function Lt(n){n.memoizedState!==null&&G(_e,n);var s=Q.current,i=Rg(s,n.type);s!==i&&(G(te,n),G(Q,i))}function Ut(n){te.current===n&&($(Q),$(te)),_e.current===n&&($(_e),qi._currentValue=ae)}var jt,ds;function zt(n){if(jt===void 0)try{throw Error()}catch(i){var s=i.stack.trim().match(/\n( *(at )?)/);jt=s&&s[1]||"",ds=-1<i.stack.indexOf(`
3    at`)?" (<anonymous>)":-1<i.stack.indexOf("@")?"@unknown:0:0":""}return`
4`+jt+n+ds}var hs=!1;function Xn(n,s){if(!n||hs)return"";hs=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var o={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(H){var B=H}Reflect.construct(n,[],V)}else{try{V.call()}catch(H){B=H}n.call(V.prototype)}}else{try{throw Error()}catch(H){B=H}(V=n())&&typeof V.catch=="function"&&V.catch(function(){})}}
vendor: 6,458 bytes, lines 4-9
4catch(H){if(H&&B&&typeof H.stack=="string")return[H.stack,B.stack]}return[null,null]}};o.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var d=Object.getOwnPropertyDescriptor(o.DetermineComponentFrameRoot,"name");d&&d.configurable&&Object.defineProperty(o.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var f=o.DetermineComponentFrameRoot(),v=f[0],S=f[1];if(v&&S){var O=v.split(`
5`),P=S.split(`
6`);for(d=o=0;o<O.length&&!O[o].includes("DetermineComponentFrameRoot");)o++;for(;d<P.length&&!P[d].includes("DetermineComponentFrameRoot");)d++;if(o===O.length||d===P.length)for(o=O.length-1,d=P.length-1;1<=o&&0<=d&&O[o]!==P[d];)d--;for(;1<=o&&0<=d;o--,d--)if(O[o]!==P[d]){if(o!==1||d!==1)do if(o--,d--,0>d||O[o]!==P[d]){var q=`
7`+O[o].replace(" at new "," at ");return n.displayName&&q.includes("<anonymous>")&&(q=q.replace("<anonymous>",n.displayName)),q}while(1<=o&&0<=d);break}}}finally{hs=!1,Error.prepareStackTrace=i}return(i=n?n.displayName||n.name:"")?zt(i):""}function Un(n,s){switch(n.tag){case 26:case 27:case 5:return zt(n.type);case 16:return zt("Lazy");case 13:return n.child!==s&&s!==null?zt("Suspense Fallback"):zt("Suspense");case 19:return zt("SuspenseList");case 0:case 15:return Xn(n.type,!1);case 11:return Xn(n.type.render,!1);case 1:return Xn(n.type,!0);case 31:return zt("Activity");default:return""}}function un(n){try{var s="",i=null;do s+=Un(n,i),i=n,n=n.return;while(n);return s}catch(o){return`
8Error generating stack: `+o.message+`
9`+o.stack}}var bt=Object.prototype.hasOwnProperty,en=e.unstable_scheduleCallback,fs=e.unstable_cancelCallback,ht=e.unstable_shouldYield,zn=e.unstable_requestPaint,ft=e.unstable_now,ze=e.unstable_getCurrentPriorityLevel,Xe=e.unstable_ImmediatePriority,dn=e.unstable_UserBlockingPriority,Zn=e.unstable_NormalPriority,ti=e.unstable_LowPriority,Wn=e.unstable_IdlePriority,Ro=e.log,Rr=e.unstable_setDisableYieldValue,ps=null,Nt=null;function Tn(n){if(typeof Ro=="function"&&Rr(n),Nt&&typeof Nt.setStrictMode=="function")try{Nt.setStrictMode(ps,n)}catch{}}var kt=Math.clz32?Math.clz32:Pn,Dc=Math.log,ni=Math.LN2;function Pn(n){return n>>>=0,n===0?32:31-(Dc(n)/ni|0)|0}var Fs=256,Js=262144,ms=4194304;function Bn(n){var s=n&42;if(s!==0)return s;switch(n&-n){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return n&261888;case 262144:case 524288:case 1048576:case 2097152:return n&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return n&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return n}}function pe(n,s,i){var o=n.pendingLanes;if(o===0)return 0;var d=0,f=n.suspendedLanes,v=n.pingedLanes;n=n.warmLanes;var S=o&134217727;return S!==0?(o=S&~f,o!==0?d=Bn(o):(v&=S,v!==0?d=Bn(v):i||(i=S&~n,i!==0&&(d=Bn(i))))):(S=o&~f,S!==0?d=Bn(S):v!==0?d=Bn(v):i||(i=o&~n,i!==0&&(d=Bn(i)))),d===0?0:s!==0&&s!==d&&(s&f)===0&&(f=d&-d,i=s&-s,f>=i||f===32&&(i&4194048)!==0)?s:d}function Ye(n,s){return(n.pendingLanes&~(n.suspendedLanes&~n.pingedLanes)&s)===0}function pt(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 Ot(){var n=ms;return ms<<=1,(ms&62914560)===0&&(ms=4194304),n}function Ar(n){for(var s=[],i=0;31>i;i++)s.push(n);return s}function Qe(n,s){n.pendingLanes|=s,s!==268435456&&(n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0)}function Pt(n,s,i,o,d,f){var v=n.pendingLanes;n.pendingLanes=i,n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0,n.expiredLanes&=i,n.entangledLanes&=i,n.errorRecoveryDisabledLanes&=i,n.shellSuspendCounter=0;var S=n.entanglements,O=n.expirationTimes,P=n.hiddenUpdates;for(i=v&~i;0<i;){var q=31-kt(i),V=1<<q;S[q]=0,O[q]=-1;var B=P[q];if(B!==null)for(P[q]=null,q=0;q<B.length;q++){var H=B[q];H!==null&&(H.lane&=-536870913)}i&=~V}o!==0&&gs(n,o,0),f!==0&&d===0&&n.tag!==0&&(n.suspendedLanes|=f&~(v&~s))}function gs(n,s,i){n.pendingLanes|=s,n.suspendedLanes&=~s;var o=31-kt(s);n.entangledLanes|=s,n.entanglements[o]=n.entanglements[o]|1073741824|i&261930}function Bt(n,s){var i=n.entangledLanes|=s;for(n=n.entanglements;i;){var o=31-kt(i),d=1<<o;d&s|n[o]&s&&(n[o]|=s),i&=~d}}function Ht(n,s){var i=s&-s;return i=(i&42)!==0?1:Qs(i),(i&(n.suspendedLanes|s))!==0?0:i}function Qs(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 Rn(n){return n&=-n,2<n?8<n?(n&134217727)!==0?32:268435456:8:2}function Lc(){var n=J.p;return n!==0?n:(n=window.event,n===void 0?32:Jg(n.type))}function df(n,s){var i=J.p;try{return J.p=n,s()}finally{J.p=i}}var kr=Math.random().toString(36).slice(2),wt="__reactFiber$"+kr,It="__reactProps$"+kr,Xs="__reactContainer$"+kr,Uc="__reactEvents$"+kr,Db="__reactListeners$"+kr,Lb="__reactHandles$"+kr,hf="__reactResources$"+kr,ri="__reactMarker$"+kr;function zc(n){delete n[wt],delete n[It],delete n[Uc],delete n[Db],delete n[Lb]}function Zs(n){var s=n[wt];if(s)return s;for(var i=n.parentNode;i;){if(s=i[Xs]||i[wt]){if(i=s.alternate,s.child!==null||i!==null&&i.child!==null)for(n=Mg(n);n!==null;){if(i=n[wt])return i;n=Mg(n)}return s}n=i,i=n.parentNode}return null}function Ws(n){if(n=n[wt]||n[Xs]){var s=n.tag;if(s===5||s===6||s===13||s===31||s===26||s===27||s===3)return n}return null}function si(n){var s=n.tag;if(s===5||s===26||s===27||s===6)return n.stateNode;throw Error(a(33))}function ea(n){var s=n[hf];return s||(s=n[hf]={hoistableStyles:new Map,hoistableScripts:new Map}),s}function mt(n){n[ri]=!0}var ff=new Set,pf={};function ys(n,s){ta(n,s),ta(n+"Capture",s)}function ta(n,s){for(pf[n]=s,n=0;n<s.length;n++)ff.add(s[n])}var Ub=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u
vendor: 6,765 bytes, line 9
9037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),mf={},gf={};function zb(n){return bt.call(gf,n)?!0:bt.call(mf,n)?!1:Ub.test(n)?gf[n]=!0:(mf[n]=!0,!1)}function Ao(n,s,i){if(zb(s))if(i===null)n.removeAttribute(s);else{switch(typeof i){case"undefined":case"function":case"symbol":n.removeAttribute(s);return;case"boolean":var o=s.toLowerCase().slice(0,5);if(o!=="data-"&&o!=="aria-"){n.removeAttribute(s);return}}n.setAttribute(s,""+i)}}function ko(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 er(n,s,i,o){if(o===null)n.removeAttribute(i);else{switch(typeof o){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(i);return}n.setAttributeNS(s,i,""+o)}}function hn(n){switch(typeof n){case"bigint":case"boolean":case"number":case"string":case"undefined":return n;case"object":return n;default:return""}}function yf(n){var s=n.type;return(n=n.nodeName)&&n.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function Pb(n,s,i){var o=Object.getOwnPropertyDescriptor(n.constructor.prototype,s);if(!n.hasOwnProperty(s)&&typeof o<"u"&&typeof o.get=="function"&&typeof o.set=="function"){var d=o.get,f=o.set;return Object.defineProperty(n,s,{configurable:!0,get:function(){return d.call(this)},set:function(v){i=""+v,f.call(this,v)}}),Object.defineProperty(n,s,{enumerable:o.enumerable}),{getValue:function(){return i},setValue:function(v){i=""+v},stopTracking:function(){n._valueTracker=null,delete n[s]}}}}function Pc(n){if(!n._valueTracker){var s=yf(n)?"checked":"value";n._valueTracker=Pb(n,s,""+n[s])}}function vf(n){if(!n)return!1;var s=n._valueTracker;if(!s)return!0;var i=s.getValue(),o="";return n&&(o=yf(n)?n.checked?"true":"false":n.value),n=o,n!==i?(s.setValue(n),!0):!1}function Oo(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 Bb=/[\n"\\]/g;function fn(n){return n.replace(Bb,function(s){return"\\"+s.charCodeAt(0).toString(16)+" "})}function Bc(n,s,i,o,d,f,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=""+hn(s)):n.value!==""+hn(s)&&(n.value=""+hn(s)):v!=="submit"&&v!=="reset"||n.removeAttribute("value"),s!=null?Hc(n,v,hn(s)):i!=null?Hc(n,v,hn(i)):o!=null&&n.removeAttribute("value"),d==null&&f!=null&&(n.defaultChecked=!!f),d!=null&&(n.checked=d&&typeof d!="function"&&typeof d!="symbol"),S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"?n.name=""+hn(S):n.removeAttribute("name")}function bf(n,s,i,o,d,f,v,S){if(f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"&&(n.type=f),s!=null||i!=null){if(!(f!=="submit"&&f!=="reset"||s!=null)){Pc(n);return}i=i!=null?""+hn(i):"",s=s!=null?""+hn(s):i,S||s===n.value||(n.value=s),n.defaultValue=s}o=o??d,o=typeof o!="function"&&typeof o!="symbol"&&!!o,n.checked=S?n.checked:!!o,n.defaultChecked=!!o,v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"&&(n.name=v),Pc(n)}function Hc(n,s,i){s==="number"&&Oo(n.ownerDocument)===n||n.defaultValue===""+i||(n.defaultValue=""+i)}function na(n,s,i,o){if(n=n.options,s){s={};for(var d=0;d<i.length;d++)s["$"+i[d]]=!0;for(i=0;i<n.length;i++)d=s.hasOwnProperty("$"+n[i].value),n[i].selected!==d&&(n[i].selected=d),d&&o&&(n[i].defaultSelected=!0)}else{for(i=""+hn(i),s=null,d=0;d<n.length;d++){if(n[d].value===i){n[d].selected=!0,o&&(n[d].defaultSelected=!0);return}s!==null||n[d].disabled||(s=n[d])}s!==null&&(s.selected=!0)}}function wf(n,s,i){if(s!=null&&(s=""+hn(s),s!==n.value&&(n.value=s),i==null)){n.defaultValue!==s&&(n.defaultValue=s);return}n.defaultValue=i!=null?""+hn(i):""}function _f(n,s,i,o){if(s==null){if(o!=null){if(i!=null)throw Error(a(92));if(Me(o)){if(1<o.length)throw Error(a(93));o=o[0]}i=o}i==null&&(i=""),s=i}i=hn(s),n.defaultValue=i,o=n.textContent,o===i&&o!==""&&o!==null&&(n.value=o),Pc(n)}function ra(n,s){if(s){var i=n.firstChild;if(i&&i===n.lastChild&&i.nodeType===3){i.nodeValue=s;return}}n.textContent=s}var Hb=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 Sf(n,s,i){var o=s.indexOf("--")===0;i==null||typeof i=="boolean"||i===""?o?n.setProperty(s,""):s==="float"?n.cssFloat="":n[s]="":o?n.setProperty(s,i):typeof i!="number"||i===0||Hb.has(s)?s==="float"?n.cssFloat=i:n[s]=(""+i).trim():n[s]=i+"px"}function xf(n,s,i){if(s!=null&&typeof s!="object")throw Error(a(62));if(n=n.style,i!=null){for(var o in i)!i.hasOwnProperty(o)||s!=null&&s.hasOwnProperty(o)||(o.indexOf("--")===0?n.setProperty(o,""):o==="float"?n.cssFloat="":n[o]="");for(var d in s)o=s[d],s.hasOwnProperty(d)&&i[d]!==o&&Sf(n,d,o)}else for(var f in s)s.hasOwnProperty(f)&&Sf(n,f,s[f])}function Ic(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 Ib=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"]]),qb=/^[\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 Co(n){return qb.test(""+n)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":n}function tr(){}var qc=null;function $c(n){return n=n.target||n.srcElement||window,n.correspondingUseElement&&(n=n.correspondingUseElement),n.nodeType===3?n.parentNode:n}var sa=null,aa=null;function Ef(n){var s=Ws(n);if(s&&(n=s.stateNode)){var i=n[It]||null;e:switch(n=s.stateNode,s.type){case"input":if(Bc(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="'+fn(""+s)+'"][type="radio"]'),s=0;s<i.length;s++){var o=i[s];if(o!==n&&o.form===n.form){var d=o[It]||null;if(!d)throw Error(a(90));Bc(o,d.value,d.defaultValue,d.defaultValue,d.checked,d.defaultChecked,d.type,d.name)}}for(s=0;s<i.length;s++)o=i[s],o.form===n.form&&vf(o)}break e;case"textarea":wf(n,i.value,i.defaultValue);break e;case"select":s=i.value,s!=null&&na(n,!!i.multiple,s,!1)}}}var Kc=!1;function Tf(n,s,i){if(Kc)return n(s,i);Kc=!0;try{var o=n(s);return o}finally{if(Kc=!1,(sa!==null||aa!==null)&&(yl(),sa&&(s=sa,n=aa,aa=sa=null,Ef(s),n)))for(s=0;s<n.length;s++)Ef(n[s])}}function ai(n,s){var i=n.stateNode;if(i===null)return null;var o=i[It]||null;if(o===null)return null;i=o[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":(o=!o.disabled)||(n=n.type,o=!(n==="button"||n==="input"||n==="select"||n==="textarea")),n=!o;break e;default:n=!1}if(n)return null;if(i&&typeof i!="function")throw Error(a(231,s,typeof i));return i}var nr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Vc=!1;if(nr)try{var ii={};Object.defineProperty(ii,"passive",{get:function(){Vc=!0}}),window.addEventListener("test",ii,ii),window.removeEventListener("test",ii,ii)}catch{Vc=!1}var Or=null,Gc=null,jo=null;function Rf(){if(jo)return jo;var n,s=Gc,i=s.length,o,d="value"in Or?Or.value:Or.textContent,f=d.length;for(n=0;n<i&&s[n]===d[n];n++);var v=i-n;for(o=1;o<=v&&s[i-o]===d[f-o];o++);return jo=d.slice(n,1<o?1-o:void 0)}function No(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 Mo(){return!0}function Af(){return!1}function qt(n){function s(i,o,d,f,v){this._reactName=i,this._targetInst=d,this.type=o,this.nativeEvent=f,this.target=v,this.currentTarget=null;for(var S in n)n.hasOwnProperty(S)&&(i=n[S],this[S]=i?i(f):f[S]);return this.isDefaultPrevented=(f.defaultPrevented!=null?f.defaultPrevented:f.returnValue===!1)?Mo:Af,this.isPropagationStopped=Af,this}return g(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=Mo)},stopPropagation:function(){var i=this.nativeEvent;i&&(i.stopPropagation?i.stopPropagation():typeof i.cancelBubble!="unknown"&&(i.cancelBubble=!0),this.isPropagationStopped=Mo)},persist:function(){},isPersistent:Mo}),s}var vs={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(n){return n.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Do=qt(vs),oi=g({},vs,{view:0,detail:0}),$b=qt(oi),Yc,Fc,li,Lo=g({},oi,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Qc,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!==li&&(li&&n.type==="mousemove"?(Yc=n.screenX-li.screenX,Fc=n.screenY-li.screenY):Fc=Yc=0,li=n),Yc)},movementY:function(n){return"movementY"in n?n.movementY:Fc}}),kf=qt(Lo),Kb=g({},Lo,{dataTransfer:0}),Vb=qt(Kb),Gb=g({},oi,{relatedTarget:0}),Jc=qt(Gb),Yb=g({},vs,{animationName:0,elapsedTime:0,pseudoElement:0}),Fb=qt(Yb),Jb=g({},vs,{clipboardData:function(n){return"clipboardData"in n?n.clipboardData:window.clipboardData}}),Qb=qt(Jb),Xb=g({},vs,{data:0}),Of=qt(Xb),Zb={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Wb={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"},ew={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function tw(n){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(n):(n=ew[n])?!!s[n]:!1}function Qc(){return tw}var nw=g({},oi,{key:function(n){if(n.key){var s=Zb[n.key]||n.key;if(s!=="Unidentified")return s}
vendor: 5,186 bytes, line 9
9return n.type==="keypress"?(n=No(n),n===13?"Enter":String.fromCharCode(n)):n.type==="keydown"||n.type==="keyup"?Wb[n.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Qc,charCode:function(n){return n.type==="keypress"?No(n):0},keyCode:function(n){return n.type==="keydown"||n.type==="keyup"?n.keyCode:0},which:function(n){return n.type==="keypress"?No(n):n.type==="keydown"||n.type==="keyup"?n.keyCode:0}}),rw=qt(nw),sw=g({},Lo,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Cf=qt(sw),aw=g({},oi,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Qc}),iw=qt(aw),ow=g({},vs,{propertyName:0,elapsedTime:0,pseudoElement:0}),lw=qt(ow),cw=g({},Lo,{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}),uw=qt(cw),dw=g({},vs,{newState:0,oldState:0}),hw=qt(dw),fw=[9,13,27,32],Xc=nr&&"CompositionEvent"in window,ci=null;nr&&"documentMode"in document&&(ci=document.documentMode);var pw=nr&&"TextEvent"in window&&!ci,jf=nr&&(!Xc||ci&&8<ci&&11>=ci),Nf=" ",Mf=!1;function Df(n,s){switch(n){case"keyup":return fw.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Lf(n){return n=n.detail,typeof n=="object"&&"data"in n?n.data:null}var ia=!1;function mw(n,s){switch(n){case"compositionend":return Lf(s);case"keypress":return s.which!==32?null:(Mf=!0,Nf);case"textInput":return n=s.data,n===Nf&&Mf?null:n;default:return null}}function gw(n,s){if(ia)return n==="compositionend"||!Xc&&Df(n,s)?(n=Rf(),jo=Gc=Or=null,ia=!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 jf&&s.locale!=="ko"?null:s.data;default:return null}}var yw={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 Uf(n){var s=n&&n.nodeName&&n.nodeName.toLowerCase();return s==="input"?!!yw[n.type]:s==="textarea"}function zf(n,s,i,o){sa?aa?aa.push(o):aa=[o]:sa=o,s=El(s,"onChange"),0<s.length&&(i=new Do("onChange","change",null,i,o),n.push({event:i,listeners:s}))}var ui=null,di=null;function vw(n){bg(n,0)}function Uo(n){var s=si(n);if(vf(s))return n}function Pf(n,s){if(n==="change")return s}var Bf=!1;if(nr){var Zc;if(nr){var Wc="oninput"in document;if(!Wc){var Hf=document.createElement("div");Hf.setAttribute("oninput","return;"),Wc=typeof Hf.oninput=="function"}Zc=Wc}else Zc=!1;Bf=Zc&&(!document.documentMode||9<document.documentMode)}function If(){ui&&(ui.detachEvent("onpropertychange",qf),di=ui=null)}function qf(n){if(n.propertyName==="value"&&Uo(di)){var s=[];zf(s,di,n,$c(n)),Tf(vw,s)}}function bw(n,s,i){n==="focusin"?(If(),ui=s,di=i,ui.attachEvent("onpropertychange",qf)):n==="focusout"&&If()}function ww(n){if(n==="selectionchange"||n==="keyup"||n==="keydown")return Uo(di)}function _w(n,s){if(n==="click")return Uo(s)}function Sw(n,s){if(n==="input"||n==="change")return Uo(s)}function xw(n,s){return n===s&&(n!==0||1/n===1/s)||n!==n&&s!==s}var tn=typeof Object.is=="function"?Object.is:xw;function hi(n,s){if(tn(n,s))return!0;if(typeof n!="object"||n===null||typeof s!="object"||s===null)return!1;var i=Object.keys(n),o=Object.keys(s);if(i.length!==o.length)return!1;for(o=0;o<i.length;o++){var d=i[o];if(!bt.call(s,d)||!tn(n[d],s[d]))return!1}return!0}function $f(n){for(;n&&n.firstChild;)n=n.firstChild;return n}function Kf(n,s){var i=$f(n);n=0;for(var o;i;){if(i.nodeType===3){if(o=n+i.textContent.length,n<=s&&o>=s)return{node:i,offset:s-n};n=o}e:{for(;i;){if(i.nextSibling){i=i.nextSibling;break e}i=i.parentNode}i=void 0}i=$f(i)}}function Vf(n,s){return n&&s?n===s?!0:n&&n.nodeType===3?!1:s&&s.nodeType===3?Vf(n,s.parentNode):"contains"in n?n.contains(s):n.compareDocumentPosition?!!(n.compareDocumentPosition(s)&16):!1:!1}function Gf(n){n=n!=null&&n.ownerDocument!=null&&n.ownerDocument.defaultView!=null?n.ownerDocument.defaultView:window;for(var s=Oo(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=Oo(n.document)}return s}function eu(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 Ew=nr&&"documentMode"in document&&11>=document.documentMode,oa=null,tu=null,fi=null,nu=!1;function Yf(n,s,i){var o=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;nu||oa==null||oa!==Oo(o)||(o=oa,"selectionStart"in o&&eu(o)?o={start:o.selectionStart,end:o.selectionEnd}:(o=(o.ownerDocument&&o.ownerDocument.defaultView||window).getSelection(),o={anchorNode:o.anchorNode,anchorOffset:o.anchorOffset,focu
vendor: 16,403 bytes, line 9
9sNode:o.focusNode,focusOffset:o.focusOffset}),fi&&hi(fi,o)||(fi=o,o=El(tu,"onSelect"),0<o.length&&(s=new Do("onSelect","select",null,s,i),n.push({event:s,listeners:o}),s.target=oa)))}function bs(n,s){var i={};return i[n.toLowerCase()]=s.toLowerCase(),i["Webkit"+n]="webkit"+s,i["Moz"+n]="moz"+s,i}var la={animationend:bs("Animation","AnimationEnd"),animationiteration:bs("Animation","AnimationIteration"),animationstart:bs("Animation","AnimationStart"),transitionrun:bs("Transition","TransitionRun"),transitionstart:bs("Transition","TransitionStart"),transitioncancel:bs("Transition","TransitionCancel"),transitionend:bs("Transition","TransitionEnd")},ru={},Ff={};nr&&(Ff=document.createElement("div").style,"AnimationEvent"in window||(delete la.animationend.animation,delete la.animationiteration.animation,delete la.animationstart.animation),"TransitionEvent"in window||delete la.transitionend.transition);function ws(n){if(ru[n])return ru[n];if(!la[n])return n;var s=la[n],i;for(i in s)if(s.hasOwnProperty(i)&&i in Ff)return ru[n]=s[i];return n}var Jf=ws("animationend"),Qf=ws("animationiteration"),Xf=ws("animationstart"),Tw=ws("transitionrun"),Rw=ws("transitionstart"),Aw=ws("transitioncancel"),Zf=ws("transitionend"),Wf=new Map,su="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(" ");su.push("scrollEnd");function An(n,s){Wf.set(n,s),ys(s,[n])}var zo=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)},pn=[],ca=0,au=0;function Po(){for(var n=ca,s=au=ca=0;s<n;){var i=pn[s];pn[s++]=null;var o=pn[s];pn[s++]=null;var d=pn[s];pn[s++]=null;var f=pn[s];if(pn[s++]=null,o!==null&&d!==null){var v=o.pending;v===null?d.next=d:(d.next=v.next,v.next=d),o.pending=d}f!==0&&ep(i,d,f)}}function Bo(n,s,i,o){pn[ca++]=n,pn[ca++]=s,pn[ca++]=i,pn[ca++]=o,au|=o,n.lanes|=o,n=n.alternate,n!==null&&(n.lanes|=o)}function iu(n,s,i,o){return Bo(n,s,i,o),Ho(n)}function _s(n,s){return Bo(n,null,null,s),Ho(n)}function ep(n,s,i){n.lanes|=i;var o=n.alternate;o!==null&&(o.lanes|=i);for(var d=!1,f=n.return;f!==null;)f.childLanes|=i,o=f.alternate,o!==null&&(o.childLanes|=i),f.tag===22&&(n=f.stateNode,n===null||n._visibility&1||(d=!0)),n=f,f=f.return;return n.tag===3?(f=n.stateNode,d&&s!==null&&(d=31-kt(i),n=f.hiddenUpdates,o=n[d],o===null?n[d]=[s]:o.push(s),s.lane=i|536870912),f):null}function Ho(n){if(50<Li)throw Li=0,md=null,Error(a(185));for(var s=n.return;s!==null;)n=s,s=n.return;return n.tag===3?n.stateNode:null}var ua={};function kw(n,s,i,o){this.tag=n,this.key=i,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=s,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=o,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function nn(n,s,i,o){return new kw(n,s,i,o)}function ou(n){return n=n.prototype,!(!n||!n.isReactComponent)}function rr(n,s){var i=n.alternate;return i===null?(i=nn(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 tp(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 Io(n,s,i,o,d,f){var v=0;if(o=n,typeof n=="function")ou(n)&&(v=1);else if(typeof n=="string")v=M_(n,i,Q.current)?26:n==="html"||n==="head"||n==="body"?27:5;else e:switch(n){case Z:return n=nn(31,i,s,d),n.elementType=Z,n.lanes=f,n;case k:return Ss(i.children,d,f,s);case E:v=8,d|=24;break;case A:return n=nn(12,i,s,d|2),n.elementType=A,n.lanes=f,n;case X:return n=nn(13,i,s,d),n.elementType=X,n.lanes=f,n;case Y:return n=nn(19,i,s,d),n.elementType=Y,n.lanes=f,n;default:if(typeof n=="object"&&n!==null)switch(n.$$typeof){case N:v=10;break e;case M:v=9;break e;case L:v=11;break e;case I:v=14;break e;case F:v=16,o=null;break e}v=29,i=Error(a(130,n===null?"null":typeof n,"")),o=null}return s=nn(v,i,s,d),s.elementType=n,s.type=o,s.lanes=f,s}function Ss(n,s,i,o){return n=nn(7,n,o,s),n.lanes=i,n}function lu(n,s,i){return n=nn(6,n,null,s),n.lanes=i,n}function np(n){var s=nn(18,null,null,0);return s.stateNode=n,s}function cu(n,s,i){return s=nn(4,n.children!==null?n.children:[],n.key,s),s.lanes=i,s.stateNode={containerInfo:n.containerInfo,pendingChildren:null,implementation:n.implementation},s}var rp=new WeakMap;function mn(n,s){if(typeof n=="object"&&n!==null){var i=rp.get(n);return i!==void 0?i:(s={value:n,source:s,stack:un(s)},rp.set(n,s),s)}return{value:n,source:s,stack:un(s)}}var da=[],ha=0,qo=null,pi=0,gn=[],yn=0,Cr=null,Hn=1,In="";function sr(n,s){da[ha++]=pi,da[ha++]=qo,qo=n,pi=s}function sp(n,s,i){gn[yn++]=Hn,gn[yn++]=In,gn[yn++]=Cr,Cr=n;var o=Hn;n=In;var d=32-kt(o)-1;o&=~(1<<d),i+=1;var f=32-kt(s)+d;if(30<f){var v=d-d%5;f=(o&(1<<v)-1).toString(32),o>>=v,d-=v,Hn=1<<32-kt(s)+d|i<<d|o,In=f+n}else Hn=1<<f|i<<d|o,In=n}function uu(n){n.return!==null&&(sr(n,1),sp(n,1,0))}function du(n){for(;n===qo;)qo=da[--ha],da[ha]=null,pi=da[--ha],da[ha]=null;for(;n===Cr;)Cr=gn[--yn],gn[yn]=null,In=gn[--yn],gn[yn]=null,Hn=gn[--yn],gn[yn]=null}function ap(n,s){gn[yn++]=Hn,gn[yn++]=In,gn[yn++]=Cr,Hn=s.id,In=s.overflow,Cr=n}var _t=null,Ve=null,Ae=!1,jr=null,vn=!1,hu=Error(a(519));function Nr(n){var s=Error(a(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw mi(mn(s,n)),hu}function ip(n){var s=n.stateNode,i=n.type,o=n.memoizedProps;switch(s[wt]=n,s[It]=o,i){case"dialog":Ee("cancel",s),Ee("close",s);break;case"iframe":case"object":case"embed":Ee("load",s);break;case"video":case"audio":for(i=0;i<zi.length;i++)Ee(zi[i],s);break;case"source":Ee("error",s);break;case"img":case"image":case"link":Ee("error",s),Ee("load",s);break;case"details":Ee("toggle",s);break;case"input":Ee("invalid",s),bf(s,o.value,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name,!0);break;case"select":Ee("invalid",s);break;case"textarea":Ee("invalid",s),_f(s,o.value,o.defaultValue,o.children)}i=o.children,typeof i!="string"&&typeof i!="number"&&typeof i!="bigint"||s.textContent===""+i||o.suppressHydrationWarning===!0||xg(s.textContent,i)?(o.popover!=null&&(Ee("beforetoggle",s),Ee("toggle",s)),o.onScroll!=null&&Ee("scroll",s),o.onScrollEnd!=null&&Ee("scrollend",s),o.onClick!=null&&(s.onclick=tr),s=!0):s=!1,s||Nr(n,!0)}function op(n){for(_t=n.return;_t;)switch(_t.tag){case 5:case 31:case 13:vn=!1;return;case 27:case 3:vn=!0;return;default:_t=_t.return}}function fa(n){if(n!==_t)return!1;if(!Ae)return op(n),Ae=!0,!1;var s=n.tag,i;if((i=s!==3&&s!==27)&&((i=s===5)&&(i=n.type,i=!(i!=="form"&&i!=="button")||Cd(n.type,n.memoizedProps)),i=!i),i&&Ve&&Nr(n),op(n),s===13){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(a(317));Ve=Ng(n)}else if(s===31){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(a(317));Ve=Ng(n)}else s===27?(s=Ve,Gr(n.type)?(n=Ld,Ld=null,Ve=n):Ve=s):Ve=_t?wn(n.stateNode.nextSibling):null;return!0}function xs(){Ve=_t=null,Ae=!1}function fu(){var n=jr;return n!==null&&(Gt===null?Gt=n:Gt.push.apply(Gt,n),jr=null),n}function mi(n){jr===null?jr=[n]:jr.push(n)}var pu=C(null),Es=null,ar=null;function Mr(n,s,i){G(pu,s._currentValue),s._currentValue=i}function ir(n){n._currentValue=pu.current,$(pu)}function mu(n,s,i){for(;n!==null;){var o=n.alternate;if((n.childLanes&s)!==s?(n.childLanes|=s,o!==null&&(o.childLanes|=s)):o!==null&&(o.childLanes&s)!==s&&(o.childLanes|=s),n===i)break;n=n.return}}function gu(n,s,i,o){var d=n.child;for(d!==null&&(d.return=n);d!==null;){var f=d.dependencies;if(f!==null){var v=d.child;f=f.firstContext;e:for(;f!==null;){var S=f;f=d;for(var O=0;O<s.length;O++)if(S.context===s[O]){f.lanes|=i,S=f.alternate,S!==null&&(S.lanes|=i),mu(f.return,i,n),o||(v=null);break e}f=S.next}}else if(d.tag===18){if(v=d.return,v===null)throw Error(a(341));v.lanes|=i,f=v.alternate,f!==null&&(f.lanes|=i),mu(v,i,n),v=null}else v=d.child;if(v!==null)v.return=d;else for(v=d;v!==null;){if(v===n){v=null;break}if(d=v.sibling,d!==null){d.return=v.return,v=d;break}v=v.return}d=v}}function pa(n,s,i,o){n=null;for(var d=s,f=!1;d!==null;){if(!f){if((d.flags&524288)!==0)f=!0;else if((d.flags&262144)!==0)break}if(d.tag===10){var v=d.alternate;if(v===null)throw Error(a(387));if(v=v.memoizedProps,v!==null){var S=d.type;tn(d.pendingProps.value,v.value)||(n!==null?n.push(S):n=[S])}}else if(d===_e.current){if(v=d.alternate,v===null)throw Error(a(387));v.memoizedState.memoizedState!==d.memoizedState.memoizedState&&(n!==null?n.push(qi):n=[qi])}d=d.return}n!==null&&gu(s,n,i,o),s.flags|=262144}function $o(n){for(n=n.firstContext;n!==null;){if(!tn(n.context._currentValue,n.memoizedValue))return!0;n=n.next}return!1}function Ts(n){Es=n,ar=null,n=n.dependencies,n!==null&&(n.firstContext=null)}function St(n){return lp(Es,n)}function Ko(n,s){return Es===null&&Ts(n),lp(n,s)}function lp(n,s){var i=s._currentValue;if(s={context:s,memoizedValue:i,next:null},ar===null){if(n===null)throw Error(a(308));ar=s,n.dependencies={lanes:0,firstContext:s},n.flags|=524288}else ar=ar.next=s;return i}var Ow=typeof AbortController<"u"?AbortController:function(){var n=[],s=this.signal={aborted:!1,addEventListener:function(i,o){n.push(o)}};this.abort=function(){s.aborted=!0,n.forEach(function(i){return i()})}},Cw=e.unstable_scheduleCallback,jw=e.unstable_NormalPriority,rt={$$typeof:N,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function yu(){return{controller:new Ow,data:new Map,refCount:0}}function gi(n){n.refCount--,n.refCount===0&&Cw(jw,function(){n.controller.abort()})}var yi=null,vu=0,ma=0,ga=null;function Nw(n,s){if(yi===null){var i=yi=[];vu=0,ma=_d(),ga={status:"pending",value:void 0,then:function(o){i.push(o)}}}return vu++,s.then(cp,cp),s}function cp(){if(--vu===0&&yi!==null){ga!==null&&(ga.status="fulfilled");var n=yi;yi=null,ma=0,ga=null;for(var s=0;s<n.length;s++)(0,n[s])()}}function Mw(n,s){var i=[],o={status:"pending",value:null,reason:null,then:function(d){i.push(d)}};return n.then(function(){o.status="fulfilled",o.value=s;for(var d=0;d<i.length;d++)(0,i[d])(s)},function(d){for(o.status="rejected",o.reason=d,d=0;d<i.length;d++)(0,i[d])(void 0)}),o}var up=z.S;z.S=function(n,s){Ym=ft(),typeof s=="object"&&s!==null&&typeof s.then=="function"&&Nw(n,s),up!==null&&up(n,s)};var Rs=C(null);function bu(){var n=Rs.current;return n!==null?n:Ie.pooledCache}function Vo(n,s){s===null?G(Rs,Rs.current):G(Rs,s.pool)}function dp(){var n=bu();return n===null?null:{parent:rt._currentValue,pool:n}}var ya=Error(a(460)),wu=Error(a(474)),Go=Error(a(542)),Yo={then:function(){}};function hp(n){return n=n.status,n==="fulfilled"||n==="rejected"}function fp(n,s,i){switch(i=n[i],i===void 0?n.push(s):i!==s&&(s.then(tr,tr),s=i),s.status){case"fulfilled":return s.value;case"rejected":throw n=s.reason,mp(n),n;default:if(typeof s.status=="string")s.then(tr,tr);else{if(n=Ie,n!==null&&100<n.shellSuspendCounter)throw Error(a(482));n=s,n.status="pending",n.then(function(o){if(s.status==="pending"){var d=s;d.status="fulfilled",d.value=o}},function(o){if(s.status==="pending"){var d=s;d.status="rejected",d.reason=o}})}switch(s.status){case"fulfilled":return s.value;case"rejected":throw n=s.reason,mp(n),n}throw ks=s,ya}}function As(n){try{var s=n._init;return s(n._payload)}catch(i){throw i!==null&&typeof i=="object"&&typeof i.then=="function"?(ks=i,ya):i}}var ks=null;function pp(){if(ks===null)throw Error(a(459));var n=ks;return ks=null,n}function mp(n){if(n===ya||n===Go)throw Error(a(483))}var va=null,vi=0;function Fo(n){var s=vi;return vi+=1,va===null&&(va=[]),fp(va,n,s)}function bi(n,s){s=s.props.ref,n.ref=s!==void 0?s:null}function Jo(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 gp(n){function s(D,j){if(n){var U=D.deletions;U===null?(D.deletions=[j],D.flags|=16):U.push(j)}}function i(D,j){if(!n)return null;for(;j!==null;)s(D,j),j=j.sibling;return null}function o(D){for(var j=new Map;D!==null;)D.key!==null?j.set(D.key,D):j.set(D.index,D),D=D.sibling;return j}function d(D,j){return D=rr(D,j),D.index=0,D.sibling=null,D}function f(D,j,U){return D.index=U,n?(U=D.alternate,U!==null?(U=U.index,U<j?(D.flags|=67108866,j):U):(D.flags|=67108866,j)):(D.flags|=1048576,j)}function v(D){return n&&D.alternate===null&&(D.flags|=67108866),D}function S(D,j,U,K){return j===null||j.tag!==6?(j=lu(U,D.mode,K),j.return=D,j):(j=d(j,U),j.return=D,j)}function O(D,j,U,K){var ce=U.type;return ce===k?q(D,j,U.props.children,K,U.key):j!==null&&(j.elementType===ce||typeof ce=="object"&&ce!==null&&ce.$$typeof===F&&As(ce)===j.type)?(j=d(j,U.props),bi(j,U),j.return=D,j):(j=Io(U.type,U.key,U.props,null,D.mode,K),bi(j,U),j.return=D,j)}function P(D,j,U,K){return j===null||j.tag!==4||j.stateNode.containerInfo!==U.containerInfo||j.stateNode.implementation!==U.implementation?(j=cu(U,D.mode,K),j.return=D,j):(j=d(j,U.children||[]),j.return=D,j)}function q(D,j,U,K,ce){return j===null||j.tag!==7?(j=Ss(U,D.mode,K,ce),j.return=D,j):(j=d(j,U),j.return=D,j)}function V(D,j,U){if(typeof j=="string"&&j!==""||typeof j=="number"||typeof j=="bigint")return j=lu(""+j,D.mode,U),j.return=D,j;if(typeof j=="object"&&j!==null){switch(j.$$typeof){case w:return U=Io(j.type,j.key,j.props,null,D.mode,U),bi(U,j),U.return=D,U;case x:return j=cu(j,D.mode,U),j.return=D,j;case F:return j=As(j),V(D,j,U)}if(Me(j)||ge(j))return j=Ss(j,D.mode,U,null),j.return=D,j;if(typeof j.then=="function")return V(D,Fo(j),U);if(j.$$typeof===N)return V(D,Ko(D,j),U);Jo(D,j)}return null}function B(D,j,U,K){var ce=j!==null?j.key:null;if(typeof U=="string"&&U!==""||typeof U=="number"||typeof U=="bigint")return ce!==null?null:S(D,j,""+U,K);if(typeof U=="object"&&U!==null){switch(U.$$typeof){case w:return U.key===ce?O(D,j,U,K):null;case x:return U.key===ce?P(D,j,U,K):null;case F:return U=As(U),B(D,j,U,K)}if(Me(U)||ge(U))return ce!==null?null:q(D,j,U,K,null);if(typeof U.then=="function")return B(D,j,Fo(U),K);if(U.$$typeof===N)return B(D,j,Ko(D,U),K);Jo(D,U)}return null}function H(D,j,U,K,ce){if(typeof K=="string"&&K!==""||typeof K=="number"||typeof K=="bigint")return D=D.get(U)||null,S(j,D,""+K,ce);if(typeof K=="object"&&K!==null){switch(K.$$typeof){case w:return D=D.get(K.key===null?U:K.key)||null,O(j,D,K,ce);case x:return D=D.get(K.key===null?U:K.key)||null,P(j,D,K,ce);case F:return K=As(K),H(D,j,U,K,ce)}if(Me(K)||ge(K))return D=D.get(U)||null,q(j,D,K,ce,null);if(typeof K.then=="function")return H(D,j,U,Fo(K),ce);if(K.$$typeof===N)return H(D,j,U,Ko(j,K),ce);Jo(j,K)}return null}function re(D,j,U,K){for(var ce=null,Oe=null,oe=j,be=j=0,Re=null;oe!==null&&be<U.length;be++){oe.index>
vendor: 5,769 bytes, line 9
9be?(Re=oe,oe=null):Re=oe.sibling;var Ce=B(D,oe,U[be],K);if(Ce===null){oe===null&&(oe=Re);break}n&&oe&&Ce.alternate===null&&s(D,oe),j=f(Ce,j,be),Oe===null?ce=Ce:Oe.sibling=Ce,Oe=Ce,oe=Re}if(be===U.length)return i(D,oe),Ae&&sr(D,be),ce;if(oe===null){for(;be<U.length;be++)oe=V(D,U[be],K),oe!==null&&(j=f(oe,j,be),Oe===null?ce=oe:Oe.sibling=oe,Oe=oe);return Ae&&sr(D,be),ce}for(oe=o(oe);be<U.length;be++)Re=H(oe,D,be,U[be],K),Re!==null&&(n&&Re.alternate!==null&&oe.delete(Re.key===null?be:Re.key),j=f(Re,j,be),Oe===null?ce=Re:Oe.sibling=Re,Oe=Re);return n&&oe.forEach(function(Xr){return s(D,Xr)}),Ae&&sr(D,be),ce}function de(D,j,U,K){if(U==null)throw Error(a(151));for(var ce=null,Oe=null,oe=j,be=j=0,Re=null,Ce=U.next();oe!==null&&!Ce.done;be++,Ce=U.next()){oe.index>be?(Re=oe,oe=null):Re=oe.sibling;var Xr=B(D,oe,Ce.value,K);if(Xr===null){oe===null&&(oe=Re);break}n&&oe&&Xr.alternate===null&&s(D,oe),j=f(Xr,j,be),Oe===null?ce=Xr:Oe.sibling=Xr,Oe=Xr,oe=Re}if(Ce.done)return i(D,oe),Ae&&sr(D,be),ce;if(oe===null){for(;!Ce.done;be++,Ce=U.next())Ce=V(D,Ce.value,K),Ce!==null&&(j=f(Ce,j,be),Oe===null?ce=Ce:Oe.sibling=Ce,Oe=Ce);return Ae&&sr(D,be),ce}for(oe=o(oe);!Ce.done;be++,Ce=U.next())Ce=H(oe,D,be,Ce.value,K),Ce!==null&&(n&&Ce.alternate!==null&&oe.delete(Ce.key===null?be:Ce.key),j=f(Ce,j,be),Oe===null?ce=Ce:Oe.sibling=Ce,Oe=Ce);return n&&oe.forEach(function(K_){return s(D,K_)}),Ae&&sr(D,be),ce}function He(D,j,U,K){if(typeof U=="object"&&U!==null&&U.type===k&&U.key===null&&(U=U.props.children),typeof U=="object"&&U!==null){switch(U.$$typeof){case w:e:{for(var ce=U.key;j!==null;){if(j.key===ce){if(ce=U.type,ce===k){if(j.tag===7){i(D,j.sibling),K=d(j,U.props.children),K.return=D,D=K;break e}}else if(j.elementType===ce||typeof ce=="object"&&ce!==null&&ce.$$typeof===F&&As(ce)===j.type){i(D,j.sibling),K=d(j,U.props),bi(K,U),K.return=D,D=K;break e}i(D,j);break}else s(D,j);j=j.sibling}U.type===k?(K=Ss(U.props.children,D.mode,K,U.key),K.return=D,D=K):(K=Io(U.type,U.key,U.props,null,D.mode,K),bi(K,U),K.return=D,D=K)}return v(D);case x:e:{for(ce=U.key;j!==null;){if(j.key===ce)if(j.tag===4&&j.stateNode.containerInfo===U.containerInfo&&j.stateNode.implementation===U.implementation){i(D,j.sibling),K=d(j,U.children||[]),K.return=D,D=K;break e}else{i(D,j);break}else s(D,j);j=j.sibling}K=cu(U,D.mode,K),K.return=D,D=K}return v(D);case F:return U=As(U),He(D,j,U,K)}if(Me(U))return re(D,j,U,K);if(ge(U)){if(ce=ge(U),typeof ce!="function")throw Error(a(150));return U=ce.call(U),de(D,j,U,K)}if(typeof U.then=="function")return He(D,j,Fo(U),K);if(U.$$typeof===N)return He(D,j,Ko(D,U),K);Jo(D,U)}return typeof U=="string"&&U!==""||typeof U=="number"||typeof U=="bigint"?(U=""+U,j!==null&&j.tag===6?(i(D,j.sibling),K=d(j,U),K.return=D,D=K):(i(D,j),K=lu(U,D.mode,K),K.return=D,D=K),v(D)):i(D,j)}return function(D,j,U,K){try{vi=0;var ce=He(D,j,U,K);return va=null,ce}catch(oe){if(oe===ya||oe===Go)throw oe;var Oe=nn(29,oe,null,D.mode);return Oe.lanes=K,Oe.return=D,Oe}}}var Os=gp(!0),yp=gp(!1),Dr=!1;function _u(n){n.updateQueue={baseState:n.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Su(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 Lr(n){return{lane:n,tag:0,payload:null,callback:null,next:null}}function Ur(n,s,i){var o=n.updateQueue;if(o===null)return null;if(o=o.shared,(De&2)!==0){var d=o.pending;return d===null?s.next=s:(s.next=d.next,d.next=s),o.pending=s,s=Ho(n),ep(n,null,i),s}return Bo(n,o,s,i),Ho(n)}function wi(n,s,i){if(s=s.updateQueue,s!==null&&(s=s.shared,(i&4194048)!==0)){var o=s.lanes;o&=n.pendingLanes,i|=o,s.lanes=i,Bt(n,i)}}function xu(n,s){var i=n.updateQueue,o=n.alternate;if(o!==null&&(o=o.updateQueue,i===o)){var d=null,f=null;if(i=i.firstBaseUpdate,i!==null){do{var v={lane:i.lane,tag:i.tag,payload:i.payload,callback:null,next:null};f===null?d=f=v:f=f.next=v,i=i.next}while(i!==null);f===null?d=f=s:f=f.next=s}else d=f=s;i={baseState:o.baseState,firstBaseUpdate:d,lastBaseUpdate:f,shared:o.shared,callbacks:o.callbacks},n.updateQueue=i;return}n=i.lastBaseUpdate,n===null?i.firstBaseUpdate=s:n.next=s,i.lastBaseUpdate=s}var Eu=!1;function _i(){if(Eu){var n=ga;if(n!==null)throw n}}function Si(n,s,i,o){Eu=!1;var d=n.updateQueue;Dr=!1;var f=d.firstBaseUpdate,v=d.lastBaseUpdate,S=d.shared.pending;if(S!==null){d.shared.pending=null;var O=S,P=O.next;O.next=null,v===null?f=P:v.next=P,v=O;var q=n.alternate;q!==null&&(q=q.updateQueue,S=q.lastBaseUpdate,S!==v&&(S===null?q.firstBaseUpdate=P:S.next=P,q.lastBaseUpdate=O))}if(f!==null){var V=d.baseState;v=0,q=P=O=null,S=f;do{var B=S.lane&-536870913,H=B!==S.lane;if(H?(Te&B)===B:(o&B)===B){B!==0&&B===ma&&(Eu=!0),q!==null&&(q=q.next={lane:0,tag:S.tag,payload:S.payload,callback:null,next:null});e:{var re=n,de=S;B=s;var He=i;switch(de.tag){case 1:if(re=de.payload,typeof re=="function"){V=re.call(He,V,B);break e}V=re;break e;case 3:re.flags=re.flags&-65537|128;case 0:if(re=de.payload,B=typeof re=="function"?re.call(He,V,B):re,B==null)break e;V=g({},V,B);break e;case 2:Dr=!0}}B=S.callback,B!==null&&(n.flags|=64,H&&(n.flags|=8192),H=d.callbacks,H===null?d.callbacks=[B]:H.push(B))}else H={lane:B,tag:S.tag,payload:S.payload,callback:S.callback,next:null},q===null?(P=q=H,O=V):q=q.next=H,v|=B;if(S=S.next,S===null){if(S=d.shared.pending,S===null)break;H=S,S=H.next,H.next=null,d.lastBaseUpdate=H,d.shared.pending=null}}while(!0);q===null&&(O=V),d.baseState=O,d.firstBaseUpdate=P,d.lastBaseUpdate=q,f===null&&(d.shared.lanes=0),Ir|=v,n.lanes=v,n.memoizedState=V}}function vp(n,s){if(typeof n!="function")throw Error(a(191,n));n.call(s)}function bp(n,s){var i=n.callbacks;
vendor: 4,963 bytes, line 9
9if(i!==null)for(n.callbacks=null,n=0;n<i.length;n++)vp(i[n],s)}var ba=C(null),Qo=C(0);function wp(n,s){n=mr,G(Qo,n),G(ba,s),mr=n|s.baseLanes}function Tu(){G(Qo,mr),G(ba,ba.current)}function Ru(){mr=Qo.current,$(ba),$(Qo)}var rn=C(null),bn=null;function zr(n){var s=n.alternate;G(tt,tt.current&1),G(rn,n),bn===null&&(s===null||ba.current!==null||s.memoizedState!==null)&&(bn=n)}function Au(n){G(tt,tt.current),G(rn,n),bn===null&&(bn=n)}function _p(n){n.tag===22?(G(tt,tt.current),G(rn,n),bn===null&&(bn=n)):Pr()}function Pr(){G(tt,tt.current),G(rn,rn.current)}function sn(n){$(rn),bn===n&&(bn=null),$(tt)}var tt=C(0);function Xo(n){for(var s=n;s!==null;){if(s.tag===13){var i=s.memoizedState;if(i!==null&&(i=i.dehydrated,i===null||Md(i)||Dd(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 or=0,ve=null,Pe=null,st=null,Zo=!1,wa=!1,Cs=!1,Wo=0,xi=0,_a=null,Dw=0;function Ze(){throw Error(a(321))}function ku(n,s){if(s===null)return!1;for(var i=0;i<s.length&&i<n.length;i++)if(!tn(n[i],s[i]))return!1;return!0}function Ou(n,s,i,o,d,f){return or=f,ve=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,z.H=n===null||n.memoizedState===null?sm:Ku,Cs=!1,f=i(o,d),Cs=!1,wa&&(f=xp(s,i,o,d)),Sp(n),f}function Sp(n){z.H=Ri;var s=Pe!==null&&Pe.next!==null;if(or=0,st=Pe=ve=null,Zo=!1,xi=0,_a=null,s)throw Error(a(300));n===null||at||(n=n.dependencies,n!==null&&$o(n)&&(at=!0))}function xp(n,s,i,o){ve=n;var d=0;do{if(wa&&(_a=null),xi=0,wa=!1,25<=d)throw Error(a(301));if(d+=1,st=Pe=null,n.updateQueue!=null){var f=n.updateQueue;f.lastEffect=null,f.events=null,f.stores=null,f.memoCache!=null&&(f.memoCache.index=0)}z.H=am,f=s(i,o)}while(wa);return f}function Lw(){var n=z.H,s=n.useState()[0];return s=typeof s.then=="function"?Ei(s):s,n=n.useState()[0],(Pe!==null?Pe.memoizedState:null)!==n&&(ve.flags|=1024),s}function Cu(){var n=Wo!==0;return Wo=0,n}function ju(n,s,i){s.updateQueue=n.updateQueue,s.flags&=-2053,n.lanes&=~i}function Nu(n){if(Zo){for(n=n.memoizedState;n!==null;){var s=n.queue;s!==null&&(s.pending=null),n=n.next}Zo=!1}or=0,st=Pe=ve=null,wa=!1,xi=Wo=0,_a=null}function Mt(){var n={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return st===null?ve.memoizedState=st=n:st=st.next=n,st}function nt(){if(Pe===null){var n=ve.alternate;n=n!==null?n.memoizedState:null}else n=Pe.next;var s=st===null?ve.memoizedState:st.next;if(s!==null)st=s,Pe=n;else{if(n===null)throw ve.alternate===null?Error(a(467)):Error(a(310));Pe=n,n={memoizedState:Pe.memoizedState,baseState:Pe.baseState,baseQueue:Pe.baseQueue,queue:Pe.queue,next:null},st===null?ve.memoizedState=st=n:st=st.next=n}return st}function el(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ei(n){var s=xi;return xi+=1,_a===null&&(_a=[]),n=fp(_a,n,s),s=ve,(st===null?s.memoizedState:st.next)===null&&(s=s.alternate,z.H=s===null||s.memoizedState===null?sm:Ku),n}function tl(n){if(n!==null&&typeof n=="object"){if(typeof n.then=="function")return Ei(n);if(n.$$typeof===N)return St(n)}throw Error(a(438,String(n)))}function Mu(n){var s=null,i=ve.updateQueue;if(i!==null&&(s=i.memoCache),s==null){var o=ve.alternate;o!==null&&(o=o.updateQueue,o!==null&&(o=o.memoCache,o!=null&&(s={data:o.data.map(function(d){return d.slice()}),index:0})))}if(s==null&&(s={data:[],index:0}),i===null&&(i=el(),ve.updateQueue=i),i.memoCache=s,i=s.data[s.index],i===void 0)for(i=s.data[s.index]=Array(n),o=0;o<n;o++)i[o]=le;return s.index++,i}function lr(n,s){return typeof s=="function"?s(n):s}function nl(n){var s=nt();return Du(s,Pe,n)}function Du(n,s,i){var o=n.queue;if(o===null)throw Error(a(311));o.lastRenderedReducer=i;var d=n.baseQueue,f=o.pending;if(f!==null){if(d!==null){var v=d.next;d.next=f.next,f.next=v}s.baseQueue=d=f,o.pending=null}if(f=n.baseState,d===null)n.memoizedState=f;else{s=d.next;var S=v=null,O=null,P=s,q=!1;do{var V=P.lane&-536870913;if(V!==P.lane?(Te&V)===V:(or&V)===V){var B=P.revertLane;if(B===0)O!==null&&(O=O.next={lane:0,revertLane:0,gesture:null,action:P.action,hasEagerState:P.hasEagerState,eagerState:P.eagerState,next:null}),V===ma&&(q=!0);else if((or&B)===B){P=P.next,B===ma&&(q=!0);continue}else V={lane:0,revertLane:P.revertLane,gesture:null,action:P.action,hasEagerState:P.hasEagerState,eagerState:P.eagerState,next:null},O===null?(S=O=V,v=f):O=O.next=V,ve.lanes|=B,Ir|=B;V=P.action,Cs&&i(f,V),f=P.hasEagerState?P.eagerState:i(f,V)}else B={lane:V,revertLane:P.revertLane,gesture:P.gesture,action:P.action,hasEagerState:P.hasEagerState,eagerState:P.eagerState,next:null},O===null?(S=O=B,v=f):O=O.next=B,ve.lanes|=V,Ir|=V;P=P.next}
vendor: 4,340 bytes, line 9
9while(P!==null&&P!==s);if(O===null?v=f:O.next=S,!tn(f,n.memoizedState)&&(at=!0,q&&(i=ga,i!==null)))throw i;n.memoizedState=f,n.baseState=v,n.baseQueue=O,o.lastRenderedState=f}return d===null&&(o.lanes=0),[n.memoizedState,o.dispatch]}function Lu(n){var s=nt(),i=s.queue;if(i===null)throw Error(a(311));i.lastRenderedReducer=n;var o=i.dispatch,d=i.pending,f=s.memoizedState;if(d!==null){i.pending=null;var v=d=d.next;do f=n(f,v.action),v=v.next;while(v!==d);tn(f,s.memoizedState)||(at=!0),s.memoizedState=f,s.baseQueue===null&&(s.baseState=f),i.lastRenderedState=f}return[f,o]}function Ep(n,s,i){var o=ve,d=nt(),f=Ae;if(f){if(i===void 0)throw Error(a(407));i=i()}else i=s();var v=!tn((Pe||d).memoizedState,i);if(v&&(d.memoizedState=i,at=!0),d=d.queue,Pu(Ap.bind(null,o,d,n),[n]),d.getSnapshot!==s||v||st!==null&&st.memoizedState.tag&1){if(o.flags|=2048,Sa(9,{destroy:void 0},Rp.bind(null,o,d,i,s),null),Ie===null)throw Error(a(349));f||(or&127)!==0||Tp(o,s,i)}return i}function Tp(n,s,i){n.flags|=16384,n={getSnapshot:s,value:i},s=ve.updateQueue,s===null?(s=el(),ve.updateQueue=s,s.stores=[n]):(i=s.stores,i===null?s.stores=[n]:i.push(n))}function Rp(n,s,i,o){s.value=i,s.getSnapshot=o,kp(s)&&Op(n)}function Ap(n,s,i){return i(function(){kp(s)&&Op(n)})}function kp(n){var s=n.getSnapshot;n=n.value;try{var i=s();return!tn(n,i)}catch{return!0}}function Op(n){var s=_s(n,2);s!==null&&Yt(s,n,2)}function Uu(n){var s=Mt();if(typeof n=="function"){var i=n;if(n=i(),Cs){Tn(!0);try{i()}finally{Tn(!1)}}}return s.memoizedState=s.baseState=n,s.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:lr,lastRenderedState:n},s}function Cp(n,s,i,o){return n.baseState=i,Du(n,Pe,typeof o=="function"?o:lr)}function Uw(n,s,i,o,d){if(al(n))throw Error(a(485));if(n=s.action,n!==null){var f={payload:d,action:n,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(v){f.listeners.push(v)}};z.T!==null?i(!0):f.isTransition=!1,o(f),i=s.pending,i===null?(f.next=s.pending=f,jp(s,f)):(f.next=i.next,s.pending=i.next=f)}}function jp(n,s){var i=s.action,o=s.payload,d=n.state;if(s.isTransition){var f=z.T,v={};z.T=v;try{var S=i(d,o),O=z.S;O!==null&&O(v,S),Np(n,s,S)}catch(P){zu(n,s,P)}finally{f!==null&&v.types!==null&&(f.types=v.types),z.T=f}}else try{f=i(d,o),Np(n,s,f)}catch(P){zu(n,s,P)}}function Np(n,s,i){i!==null&&typeof i=="object"&&typeof i.then=="function"?i.then(function(o){Mp(n,s,o)},function(o){return zu(n,s,o)}):Mp(n,s,i)}function Mp(n,s,i){s.status="fulfilled",s.value=i,Dp(s),n.state=i,s=n.pending,s!==null&&(i=s.next,i===s?n.pending=null:(i=i.next,s.next=i,jp(n,i)))}function zu(n,s,i){var o=n.pending;if(n.pending=null,o!==null){o=o.next;do s.status="rejected",s.reason=i,Dp(s),s=s.next;while(s!==o)}n.action=null}function Dp(n){n=n.listeners;for(var s=0;s<n.length;s++)(0,n[s])()}function Lp(n,s){return s}function Up(n,s){if(Ae){var i=Ie.formState;if(i!==null){e:{var o=ve;if(Ae){if(Ve){t:{for(var d=Ve,f=vn;d.nodeType!==8;){if(!f){d=null;break t}if(d=wn(d.nextSibling),d===null){d=null;break t}}f=d.data,d=f==="F!"||f==="F"?d:null}if(d){Ve=wn(d.nextSibling),o=d.data==="F!";break e}}Nr(o)}o=!1}o&&(s=i[0])}}return i=Mt(),i.memoizedState=i.baseState=s,o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Lp,lastRenderedState:s},i.queue=o,i=tm.bind(null,ve,o),o.dispatch=i,o=Uu(!1),f=$u.bind(null,ve,!1,o.queue),o=Mt(),d={state:s,dispatch:null,action:n,pending:null},o.queue=d,i=Uw.bind(null,ve,d,f,i),d.dispatch=i,o.memoizedState=n,[s,i,!1]}function zp(n){var s=nt();return Pp(s,Pe,n)}function Pp(n,s,i){if(s=Du(n,s,Lp)[0],n=nl(lr)[0],typeof s=="object"&&s!==null&&typeof s.then=="function")try{var o=Ei(s)}catch(v){throw v===ya?Go:v}else o=s;s=nt();var d=s.queue,f=d.dispatch;return i!==s.memoizedState&&(ve.flags|=2048,Sa(9,{destroy:void 0},zw.bind(null,d,i),null)),[o,f,n]}function zw(n,s){n.action=s}function Bp(n){var s=nt(),i=Pe;if(i!==null)return Pp(s,i,n);nt(),s=s.memoizedState,i=nt();var o=i.queue.dispatch;return i.memoizedState=n,[s,o,!1]}function Sa(n,s,i,o){return n={tag:n,create:i,deps:o,inst:s,next:null},s=ve.updateQueue,s===null&&(s=el(),ve.updateQueue=s),i=s.lastEffect,i===null?s.lastEffect=n.next=n:(o=i.next,i.next=n,n.next=o,s.lastEffect=n),n}function Hp(){return nt().memoizedState}function rl(n,s,i,o){var d=Mt();ve.flags|=n,d.memoizedState=Sa(1|s,{destroy:void 0}
vendor: 5,168 bytes, line 9
9,i,o===void 0?null:o)}function sl(n,s,i,o){var d=nt();o=o===void 0?null:o;var f=d.memoizedState.inst;Pe!==null&&o!==null&&ku(o,Pe.memoizedState.deps)?d.memoizedState=Sa(s,f,i,o):(ve.flags|=n,d.memoizedState=Sa(1|s,f,i,o))}function Ip(n,s){rl(8390656,8,n,s)}function Pu(n,s){sl(2048,8,n,s)}function Pw(n){ve.flags|=4;var s=ve.updateQueue;if(s===null)s=el(),ve.updateQueue=s,s.events=[n];else{var i=s.events;i===null?s.events=[n]:i.push(n)}}function qp(n){var s=nt().memoizedState;return Pw({ref:s,nextImpl:n}),function(){if((De&2)!==0)throw Error(a(440));return s.impl.apply(void 0,arguments)}}function $p(n,s){return sl(4,2,n,s)}function Kp(n,s){return sl(4,4,n,s)}function Vp(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 Gp(n,s,i){i=i!=null?i.concat([n]):null,sl(4,4,Vp.bind(null,s,n),i)}function Bu(){}function Yp(n,s){var i=nt();s=s===void 0?null:s;var o=i.memoizedState;return s!==null&&ku(s,o[1])?o[0]:(i.memoizedState=[n,s],n)}function Fp(n,s){var i=nt();s=s===void 0?null:s;var o=i.memoizedState;if(s!==null&&ku(s,o[1]))return o[0];if(o=n(),Cs){Tn(!0);try{n()}finally{Tn(!1)}}return i.memoizedState=[o,s],o}function Hu(n,s,i){return i===void 0||(or&1073741824)!==0&&(Te&261930)===0?n.memoizedState=s:(n.memoizedState=i,n=Jm(),ve.lanes|=n,Ir|=n,i)}function Jp(n,s,i,o){return tn(i,s)?i:ba.current!==null?(n=Hu(n,i,o),tn(n,s)||(at=!0),n):(or&42)===0||(or&1073741824)!==0&&(Te&261930)===0?(at=!0,n.memoizedState=i):(n=Jm(),ve.lanes|=n,Ir|=n,s)}function Qp(n,s,i,o,d){var f=J.p;J.p=f!==0&&8>f?f:8;var v=z.T,S={};z.T=S,$u(n,!1,s,i);try{var O=d(),P=z.S;if(P!==null&&P(S,O),O!==null&&typeof O=="object"&&typeof O.then=="function"){var q=Mw(O,o);Ti(n,s,q,ln(n))}else Ti(n,s,o,ln(n))}catch(V){Ti(n,s,{then:function(){},status:"rejected",reason:V},ln())}finally{J.p=f,v!==null&&S.types!==null&&(v.types=S.types),z.T=v}}function Bw(){}function Iu(n,s,i,o){if(n.tag!==5)throw Error(a(476));var d=Xp(n).queue;Qp(n,d,s,ae,i===null?Bw:function(){return Zp(n),i(o)})}function Xp(n){var s=n.memoizedState;if(s!==null)return s;s={memoizedState:ae,baseState:ae,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:lr,lastRenderedState:ae},next:null};var i={};return s.next={memoizedState:i,baseState:i,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:lr,lastRenderedState:i},next:null},n.memoizedState=s,n=n.alternate,n!==null&&(n.memoizedState=s),s}function Zp(n){var s=Xp(n);s.next===null&&(s=n.alternate.memoizedState),Ti(n,s.next.queue,{},ln())}function qu(){return St(qi)}function Wp(){return nt().memoizedState}function em(){return nt().memoizedState}function Hw(n){for(var s=n.return;s!==null;){switch(s.tag){case 24:case 3:var i=ln();n=Lr(i);var o=Ur(s,n,i);o!==null&&(Yt(o,s,i),wi(o,s,i)),s={cache:yu()},n.payload=s;return}s=s.return}}function Iw(n,s,i){var o=ln();i={lane:o,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},al(n)?nm(s,i):(i=iu(n,s,i,o),i!==null&&(Yt(i,n,o),rm(i,s,o)))}function tm(n,s,i){var o=ln();Ti(n,s,i,o)}function Ti(n,s,i,o){var d={lane:o,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null};if(al(n))nm(s,d);else{var f=n.alternate;if(n.lanes===0&&(f===null||f.lanes===0)&&(f=s.lastRenderedReducer,f!==null))try{var v=s.lastRenderedState,S=f(v,i);if(d.hasEagerState=!0,d.eagerState=S,tn(S,v))return Bo(n,s,d,0),Ie===null&&Po(),!1}catch{}if(i=iu(n,s,d,o),i!==null)return Yt(i,n,o),rm(i,s,o),!0}return!1}function $u(n,s,i,o){if(o={lane:2,revertLane:_d(),gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null},al(n)){if(s)throw Error(a(479))}else s=iu(n,i,o,2),s!==null&&Yt(s,n,2)}function al(n){var s=n.alternate;return n===ve||s!==null&&s===ve}function nm(n,s){wa=Zo=!0;var i=n.pending;i===null?s.next=s:(s.next=i.next,i.next=s),n.pending=s}function rm(n,s,i){if((i&4194048)!==0){var o=s.lanes;o&=n.pendingLanes,i|=o,s.lanes=i,Bt(n,i)}}var Ri={readContext:St,use:tl,useCallback:Ze,useContext:Ze,useEffect:Ze,useImperativeHandle:Ze,useLayoutEffect:Ze,useInsertionEffect:Ze,useMemo:Ze,useReducer:Ze,useRef:Ze,useState:Ze,useDebugValue:Ze,useDeferredValue:Ze,useTransition:Ze,useSyncExternalStore:Ze,useId:Ze,useHostTransitionStatus:Ze,useFormState:Ze,useActionState:Ze,useOptimistic:Ze,useMemoCache:Ze,useCacheRefresh:Ze};Ri.useEffectEvent=Ze;var sm={readContext:St,use:tl,useCallback:function(n,s){return Mt().memoizedState=[n,s===void 0?null:s],n},useContext:St,useEffect:Ip,useImperativeHandle:function(n,s,i){i=i!=null?i.concat([n]):null,rl(4194308,4,Vp.bind(null,s,n),i)},useLayoutEffect:function(n,s){return rl(4194308,4,n,s)},useInsertionEffect:function(n,s){rl(4,2,n,s)},useMemo:function(n,s){var i=Mt();s=s===void 0?null:s;var o=n();if(Cs){Tn(!0);try{n()}finally{Tn(!1)}}return i.memoizedState=[o,s],o},useReducer:function(n,s,i){var o=Mt();if(i!==void 0){var d=i(s);if(Cs){Tn(!0);try{i(s)}finally{Tn(!1)}}}else d=s;return o.memoizedState=o.baseState=d,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:n,lastRenderedState:d},o.queue=n,n=n.dispatch=Iw.bind(null,ve,n),[o.memoizedState,n]}
vendor: 6,043 bytes, line 9
9,useRef:function(n){var s=Mt();return n={current:n},s.memoizedState=n},useState:function(n){n=Uu(n);var s=n.queue,i=tm.bind(null,ve,s);return s.dispatch=i,[n.memoizedState,i]},useDebugValue:Bu,useDeferredValue:function(n,s){var i=Mt();return Hu(i,n,s)},useTransition:function(){var n=Uu(!1);return n=Qp.bind(null,ve,n.queue,!0,!1),Mt().memoizedState=n,[!1,n]},useSyncExternalStore:function(n,s,i){var o=ve,d=Mt();if(Ae){if(i===void 0)throw Error(a(407));i=i()}else{if(i=s(),Ie===null)throw Error(a(349));(Te&127)!==0||Tp(o,s,i)}d.memoizedState=i;var f={value:i,getSnapshot:s};return d.queue=f,Ip(Ap.bind(null,o,f,n),[n]),o.flags|=2048,Sa(9,{destroy:void 0},Rp.bind(null,o,f,i,s),null),i},useId:function(){var n=Mt(),s=Ie.identifierPrefix;if(Ae){var i=In,o=Hn;i=(o&~(1<<32-kt(o)-1)).toString(32)+i,s="_"+s+"R_"+i,i=Wo++,0<i&&(s+="H"+i.toString(32)),s+="_"}else i=Dw++,s="_"+s+"r_"+i.toString(32)+"_";return n.memoizedState=s},useHostTransitionStatus:qu,useFormState:Up,useActionState:Up,useOptimistic:function(n){var s=Mt();s.memoizedState=s.baseState=n;var i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return s.queue=i,s=$u.bind(null,ve,!0,i),i.dispatch=s,[n,s]},useMemoCache:Mu,useCacheRefresh:function(){return Mt().memoizedState=Hw.bind(null,ve)},useEffectEvent:function(n){var s=Mt(),i={impl:n};return s.memoizedState=i,function(){if((De&2)!==0)throw Error(a(440));return i.impl.apply(void 0,arguments)}}},Ku={readContext:St,use:tl,useCallback:Yp,useContext:St,useEffect:Pu,useImperativeHandle:Gp,useInsertionEffect:$p,useLayoutEffect:Kp,useMemo:Fp,useReducer:nl,useRef:Hp,useState:function(){return nl(lr)},useDebugValue:Bu,useDeferredValue:function(n,s){var i=nt();return Jp(i,Pe.memoizedState,n,s)},useTransition:function(){var n=nl(lr)[0],s=nt().memoizedState;return[typeof n=="boolean"?n:Ei(n),s]},useSyncExternalStore:Ep,useId:Wp,useHostTransitionStatus:qu,useFormState:zp,useActionState:zp,useOptimistic:function(n,s){var i=nt();return Cp(i,Pe,n,s)},useMemoCache:Mu,useCacheRefresh:em};Ku.useEffectEvent=qp;var am={readContext:St,use:tl,useCallback:Yp,useContext:St,useEffect:Pu,useImperativeHandle:Gp,useInsertionEffect:$p,useLayoutEffect:Kp,useMemo:Fp,useReducer:Lu,useRef:Hp,useState:function(){return Lu(lr)},useDebugValue:Bu,useDeferredValue:function(n,s){var i=nt();return Pe===null?Hu(i,n,s):Jp(i,Pe.memoizedState,n,s)},useTransition:function(){var n=Lu(lr)[0],s=nt().memoizedState;return[typeof n=="boolean"?n:Ei(n),s]},useSyncExternalStore:Ep,useId:Wp,useHostTransitionStatus:qu,useFormState:Bp,useActionState:Bp,useOptimistic:function(n,s){var i=nt();return Pe!==null?Cp(i,Pe,n,s):(i.baseState=n,[n,i.queue.dispatch])},useMemoCache:Mu,useCacheRefresh:em};am.useEffectEvent=qp;function Vu(n,s,i,o){s=n.memoizedState,i=i(o,s),i=i==null?s:g({},s,i),n.memoizedState=i,n.lanes===0&&(n.updateQueue.baseState=i)}var Gu={enqueueSetState:function(n,s,i){n=n._reactInternals;var o=ln(),d=Lr(o);d.payload=s,i!=null&&(d.callback=i),s=Ur(n,d,o),s!==null&&(Yt(s,n,o),wi(s,n,o))},enqueueReplaceState:function(n,s,i){n=n._reactInternals;var o=ln(),d=Lr(o);d.tag=1,d.payload=s,i!=null&&(d.callback=i),s=Ur(n,d,o),s!==null&&(Yt(s,n,o),wi(s,n,o))},enqueueForceUpdate:function(n,s){n=n._reactInternals;var i=ln(),o=Lr(i);o.tag=2,s!=null&&(o.callback=s),s=Ur(n,o,i),s!==null&&(Yt(s,n,i),wi(s,n,i))}};function im(n,s,i,o,d,f,v){return n=n.stateNode,typeof n.shouldComponentUpdate=="function"?n.shouldComponentUpdate(o,f,v):s.prototype&&s.prototype.isPureReactComponent?!hi(i,o)||!hi(d,f):!0}function om(n,s,i,o){n=s.state,typeof s.componentWillReceiveProps=="function"&&s.componentWillReceiveProps(i,o),typeof s.UNSAFE_componentWillReceiveProps=="function"&&s.UNSAFE_componentWillReceiveProps(i,o),s.state!==n&&Gu.enqueueReplaceState(s,s.state,null)}function js(n,s){var i=s;if("ref"in s){i={};for(var o in s)o!=="ref"&&(i[o]=s[o])}if(n=n.defaultProps){i===s&&(i=g({},i));for(var d in n)i[d]===void 0&&(i[d]=n[d])}return i}function lm(n){zo(n)}function cm(n){console.error(n)}function um(n){zo(n)}function il(n,s){try{var i=n.onUncaughtError;i(s.value,{componentStack:s.stack})}catch(o){setTimeout(function(){throw o})}}function dm(n,s,i){try{var o=n.onCaughtError;o(i.value,{componentStack:i.stack,errorBoundary:s.tag===1?s.stateNode:null})}catch(d){setTimeout(function(){throw d})}}function Yu(n,s,i){return i=Lr(i),i.tag=3,i.payload={element:null},i.callback=function(){il(n,s)},i}function hm(n){return n=Lr(n),n.tag=3,n}function fm(n,s,i,o){var d=i.type.getDerivedStateFromError;if(typeof d=="function"){var f=o.value;n.payload=function(){return d(f)},n.callback=function(){dm(s,i,o)}}var v=i.stateNode;v!==null&&typeof v.componentDidCatch=="function"&&(n.callback=function(){dm(s,i,o),typeof d!="function"&&(qr===null?qr=new Set([this]):qr.add(this));var S=o.stack;this.componentDidCatch(o.value,{componentStack:S!==null?S:""})})}function qw(n,s,i,o,d){if(i.flags|=32768,o!==null&&typeof o=="object"&&typeof o.then=="function"){if(s=i.alternate,s!==null&&pa(s,i,d,!0),i=rn.current,i!==null){switch(i.tag){case 31:case 13:return bn===null?vl():i.alternate===null&&We===0&&(We=3),i.flags&=-257,i.flags|=65536,i.lanes=d,o===Yo?i.flags|=16384:(s=i.updateQueue,s===null?i.updateQueue=new Set([o]):s.add(o),vd(n,o,d)),!1;case 22:return i.flags|=65536,o===Yo?i.flags|=16384:(s=i.updateQueue,s===null?(s={transitions:null,markerInstances:null,retryQueue:new Set([o])},i.updateQueue=s):(i=s.retryQueue,i===null?s.retryQueue=new Set([o]):i.add(o)),vd(n,o,d)),!1}throw Error(a(435,i.tag))}return vd(n,o,d),vl(),!1}if(Ae)return s=rn.current,s!==null?((s.flags&65536)===0&&(s.flags|=256),s.flags|=65536,s.lanes=d,o!==hu&&(n=Error(a(422),{cause:o}),mi(mn(n,i)))):(o!==hu&&(s=Error(a(423),{cause:o}),mi(mn(s,i))),n=n.current.alternate,n.flags|=65536,d&=-d,n.lanes|=d,o=mn(o,i),d=Yu(n.stateNode,o,d),xu(n,d),We!==4&&(We=2)),!1;var f=Error(a(520),{cause:o});if(f=mn(f,i),Di===null?Di=[f]:Di.push(f),We!==4&&(We=2),s===null)return!0;o=mn(o,i),i=s;do{switch(i.tag){case 3:return i.flags|=65536,n=d&-d,i.lanes|=n,n=Yu
vendor: 12,653 bytes, line 9
9(i.stateNode,o,n),xu(i,n),!1;case 1:if(s=i.type,f=i.stateNode,(i.flags&128)===0&&(typeof s.getDerivedStateFromError=="function"||f!==null&&typeof f.componentDidCatch=="function"&&(qr===null||!qr.has(f))))return i.flags|=65536,d&=-d,i.lanes|=d,d=hm(d),fm(d,n,i,o),xu(i,d),!1}i=i.return}while(i!==null);return!1}var Fu=Error(a(461)),at=!1;function xt(n,s,i,o){s.child=n===null?yp(s,null,i,o):Os(s,n.child,i,o)}function pm(n,s,i,o,d){i=i.render;var f=s.ref;if("ref"in o){var v={};for(var S in o)S!=="ref"&&(v[S]=o[S])}else v=o;return Ts(s),o=Ou(n,s,i,v,f,d),S=Cu(),n!==null&&!at?(ju(n,s,d),cr(n,s,d)):(Ae&&S&&uu(s),s.flags|=1,xt(n,s,o,d),s.child)}function mm(n,s,i,o,d){if(n===null){var f=i.type;return typeof f=="function"&&!ou(f)&&f.defaultProps===void 0&&i.compare===null?(s.tag=15,s.type=f,gm(n,s,f,o,d)):(n=Io(i.type,null,o,s,s.mode,d),n.ref=s.ref,n.return=s,s.child=n)}if(f=n.child,!nd(n,d)){var v=f.memoizedProps;if(i=i.compare,i=i!==null?i:hi,i(v,o)&&n.ref===s.ref)return cr(n,s,d)}return s.flags|=1,n=rr(f,o),n.ref=s.ref,n.return=s,s.child=n}function gm(n,s,i,o,d){if(n!==null){var f=n.memoizedProps;if(hi(f,o)&&n.ref===s.ref)if(at=!1,s.pendingProps=o=f,nd(n,d))(n.flags&131072)!==0&&(at=!0);else return s.lanes=n.lanes,cr(n,s,d)}return Ju(n,s,i,o,d)}function ym(n,s,i,o){var d=o.children,f=n!==null?n.memoizedState:null;if(n===null&&s.stateNode===null&&(s.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),o.mode==="hidden"){if((s.flags&128)!==0){if(f=f!==null?f.baseLanes|i:i,n!==null){for(o=s.child=n.child,d=0;o!==null;)d=d|o.lanes|o.childLanes,o=o.sibling;o=d&~f}else o=0,s.child=null;return vm(n,s,f,i,o)}if((i&536870912)!==0)s.memoizedState={baseLanes:0,cachePool:null},n!==null&&Vo(s,f!==null?f.cachePool:null),f!==null?wp(s,f):Tu(),_p(s);else return o=s.lanes=536870912,vm(n,s,f!==null?f.baseLanes|i:i,i,o)}else f!==null?(Vo(s,f.cachePool),wp(s,f),Pr(),s.memoizedState=null):(n!==null&&Vo(s,null),Tu(),Pr());return xt(n,s,d,i),s.child}function Ai(n,s){return n!==null&&n.tag===22||s.stateNode!==null||(s.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.sibling}function vm(n,s,i,o,d){var f=bu();return f=f===null?null:{parent:rt._currentValue,pool:f},s.memoizedState={baseLanes:i,cachePool:f},n!==null&&Vo(s,null),Tu(),_p(s),n!==null&&pa(n,s,o,!0),s.childLanes=d,null}function ol(n,s){return s=cl({mode:s.mode,children:s.children},n.mode),s.ref=n.ref,n.child=s,s.return=n,s}function bm(n,s,i){return Os(s,n.child,null,i),n=ol(s,s.pendingProps),n.flags|=2,sn(s),s.memoizedState=null,n}function $w(n,s,i){var o=s.pendingProps,d=(s.flags&128)!==0;if(s.flags&=-129,n===null){if(Ae){if(o.mode==="hidden")return n=ol(s,o),s.lanes=536870912,Ai(null,n);if(Au(s),(n=Ve)?(n=jg(n,vn),n=n!==null&&n.data==="&"?n:null,n!==null&&(s.memoizedState={dehydrated:n,treeContext:Cr!==null?{id:Hn,overflow:In}:null,retryLane:536870912,hydrationErrors:null},i=np(n),i.return=s,s.child=i,_t=s,Ve=null)):n=null,n===null)throw Nr(s);return s.lanes=536870912,null}return ol(s,o)}var f=n.memoizedState;if(f!==null){var v=f.dehydrated;if(Au(s),d)if(s.flags&256)s.flags&=-257,s=bm(n,s,i);else if(s.memoizedState!==null)s.child=n.child,s.flags|=128,s=null;else throw Error(a(558));else if(at||pa(n,s,i,!1),d=(i&n.childLanes)!==0,at||d){if(o=Ie,o!==null&&(v=Ht(o,i),v!==0&&v!==f.retryLane))throw f.retryLane=v,_s(n,v),Yt(o,n,v),Fu;vl(),s=bm(n,s,i)}else n=f.treeContext,Ve=wn(v.nextSibling),_t=s,Ae=!0,jr=null,vn=!1,n!==null&&ap(s,n),s=ol(s,o),s.flags|=4096;return s}return n=rr(n.child,{mode:o.mode,children:o.children}),n.ref=s.ref,s.child=n,n.return=s,n}function ll(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 Ju(n,s,i,o,d){return Ts(s),i=Ou(n,s,i,o,void 0,d),o=Cu(),n!==null&&!at?(ju(n,s,d),cr(n,s,d)):(Ae&&o&&uu(s),s.flags|=1,xt(n,s,i,d),s.child)}function wm(n,s,i,o,d,f){return Ts(s),s.updateQueue=null,i=xp(s,o,i,d),Sp(n),o=Cu(),n!==null&&!at?(ju(n,s,f),cr(n,s,f)):(Ae&&o&&uu(s),s.flags|=1,xt(n,s,i,f),s.child)}function _m(n,s,i,o,d){if(Ts(s),s.stateNode===null){var f=ua,v=i.contextType;typeof v=="object"&&v!==null&&(f=St(v)),f=new i(o,f),s.memoizedState=f.state!==null&&f.state!==void 0?f.state:null,f.updater=Gu,s.stateNode=f,f._reactInternals=s,f=s.stateNode,f.props=o,f.state=s.memoizedState,f.refs={},_u(s),v=i.contextType,f.context=typeof v=="object"&&v!==null?St(v):ua,f.state=s.memoizedState,v=i.getDerivedStateFromProps,typeof v=="function"&&(Vu(s,i,v,o),f.state=s.memoizedState),typeof i.getDerivedStateFromProps=="function"||typeof f.getSnapshotBeforeUpdate=="function"||typeof f.UNSAFE_componentWillMount!="function"&&typeof f.componentWillMount!="function"||(v=f.state,typeof f.componentWillMount=="function"&&f.componentWillMount(),typeof f.UNSAFE_componentWillMount=="function"&&f.UNSAFE_componentWillMount(),v!==f.state&&Gu.enqueueReplaceState(f,f.state,null),Si(s,o,f,d),_i(),f.state=s.memoizedState),typeof f.componentDidMount=="function"&&(s.flags|=4194308),o=!0}else if(n===null){f=s.stateNode;var S=s.memoizedProps,O=js(i,S);f.props=O;var P=f.context,q=i.contextType;v=ua,typeof q=="object"&&q!==null&&(v=St(q));var V=i.getDerivedStateFromProps;q=typeof V=="function"||typeof f.getSnapshotBeforeUpdate=="function",S=s.pendingProps!==S,q||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(S||P!==v)&&om(s,f,o,v),Dr=!1;var B=s.memoizedState;f.state=B,Si(s,o,f,d),_i(),P=s.memoizedState,S||B!==P||Dr?(typeof V=="function"&&(Vu(s,i,V,o),P=s.memoizedState),(O=Dr||im(s,i,O,o,B,P,v))?(q||typeof f.UNSAFE_componentWillMount!="function"&&typeof f.componentWillMount!="function"||(typeof f.componentWillMount=="function"&&f.componentWillMount(),typeof f.UNSAFE_componentWillMount=="function"&&f.UNSAFE_componentWillMount()),typeof f.componentDidMount=="function"&&(s.flags|=4194308)):(typeof f.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=o,s.memoizedState=P),f.props=o,f.state=P,f.context=v,o=O):(typeof f.componentDidMount=="function"&&(s.flags|=4194308),o=!1)}else{f=s.stateNode,Su(n,s),v=s.memoizedProps,q=js(i,v),f.props=q,V=s.pendingProps,B=f.context,P=i.contextType,O=ua,typeof P=="object"&&P!==null&&(O=St(P)),S=i.getDerivedStateFromProps,(P=typeof S=="function"||typeof f.getSnapshotBeforeUpdate=="function")||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(v!==V||B!==O)&&om(s,f,o,O),Dr=!1,B=s.memoizedState,f.state=B,Si(s,o,f,d),_i();var H=s.memoizedState;v!==V||B!==H||Dr||n!==null&&n.dependencies!==null&&$o(n.dependencies)?(typeof S=="function"&&(Vu(s,i,S,o),H=s.memoizedState),(q=Dr||im(s,i,q,o,B,H,O)||n!==null&&n.dependencies!==null&&$o(n.dependencies))?(P||typeof f.UNSAFE_componentWillUpdate!="function"&&typeof f.componentWillUpdate!="function"||(typeof f.componentWillUpdate=="function"&&f.componentWillUpdate(o,H,O),typeof f.UNSAFE_componentWillUpdate=="function"&&f.UNSAFE_componentWillUpdate(o,H,O)),typeof f.componentDidUpdate=="function"&&(s.flags|=4),typeof f.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof f.componentDidUpdate!="function"||v===n.memoizedProps&&B===n.memoizedState||(s.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||v===n.memoizedProps&&B===n.memoizedState||(s.flags|=1024),s.memoizedProps=o,s.memoizedState=H),f.props=o,f.state=H,f.context=O,o=q):(typeof f.componentDidUpdate!="function"||v===n.memoizedProps&&B===n.memoizedState||(s.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||v===n.memoizedProps&&B===n.memoizedState||(s.flags|=1024),o=!1)}return f=o,ll(n,s),o=(s.flags&128)!==0,f||o?(f=s.stateNode,i=o&&typeof i.getDerivedStateFromError!="function"?null:f.render(),s.flags|=1,n!==null&&o?(s.child=Os(s,n.child,null,d),s.child=Os(s,null,i,d)):xt(n,s,i,d),s.memoizedState=f.state,n=s.child):n=cr(n,s,d),n}function Sm(n,s,i,o){return xs(),s.flags|=256,xt(n,s,i,o),s.child}var Qu={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Xu(n){return{baseLanes:n,cachePool:dp()}}function Zu(n,s,i){return n=n!==null?n.childLanes&~i:0,s&&(n|=on),n}function xm(n,s,i){var o=s.pendingProps,d=!1,f=(s.flags&128)!==0,v;if((v=f)||(v=n!==null&&n.memoizedState===null?!1:(tt.current&2)!==0),v&&(d=!0,s.flags&=-129),v=(s.flags&32)!==0,s.flags&=-33,n===null){if(Ae){if(d?zr(s):Pr(),(n=Ve)?(n=jg(n,vn),n=n!==null&&n.data!=="&"?n:null,n!==null&&(s.memoizedState={dehydrated:n,treeContext:Cr!==null?{id:Hn,overflow:In}:null,retryLane:536870912,hydrationErrors:null},i=np(n),i.return=s,s.child=i,_t=s,Ve=null)):n=null,n===null)throw Nr(s);return Dd(n)?s.lanes=32:s.lanes=536870912,null}var S=o.children;return o=o.fallback,d?(Pr(),d=s.mode,S=cl({mode:"hidden",children:S},d),o=Ss(o,d,i,null),S.return=s,o.return=s,S.sibling=o,s.child=S,o=s.child,o.memoizedState=Xu(i),o.childLanes=Zu(n,v,i),s.memoizedState=Qu,Ai(null,o)):(zr(s),Wu(s,S))}var O=n.memoizedState;if(O!==null&&(S=O.dehydrated,S!==null)){if(f)s.flags&256?(zr(s),s.flags&=-257,s=ed(n,s,i)):s.memoizedState!==null?(Pr(),s.child=n.child,s.flags|=128,s=null):(Pr(),S=o.fallback,d=s.mode,o=cl({mode:"visible",children:o.children},d),S=Ss(S,d,i,null),S.flags|=2,o.return=s,S.return=s,o.sibling=S,s.child=o,Os(s,n.child,null,i),o=s.child,o.memoizedState=Xu(i),o.childLanes=Zu(n,v,i),s.memoizedState=Qu,s=Ai(null,o));else if(zr(s),Dd(S)){if(v=S.nextSibling&&S.nextSibling.dataset,v)var P=v.dgst;v=P,o=Error(a(419)),o.stack="",o.digest=v,mi({value:o,source:null,stack:null}),s=ed(n,s,i)}else if(at||pa(n,s,i,!1),v=(i&n.childLanes)!==0,at||v){if(v=Ie,v!==null&&(o=Ht(v,i),o!==0&&o!==O.retryLane))throw O.retryLane=o,_s(n,o),Yt(v,n,o),Fu;Md(S)||vl(),s=ed(n,s,i)}else Md(S)?(s.flags|=192,s.child=n.child,s=null):(n=O.treeContext,Ve=wn(S.nextSibling),_t=s,Ae=!0,jr=null,vn=!1,n!==null&&ap(s,n),s=Wu(s,o.children),s.flags|=4096);return s}return d?(Pr(),S=o.fallback,d=s.mode,O=n.child,P=O.sibling,o=rr(O,{mode:"hidden",children:o.children}),o.subtreeFlags=O.subtreeFlags&65011712,P!==null?S=rr(P,S):(S=Ss(S,d,i,null),S.flags|=2),S.return=s,o.return=s,o.sibling=S,s.child=o,Ai(null,o),o=s.child,S=n.child.memoizedState,S===null?S=Xu(i):(d=S.cachePool,d!==null?(O=rt._currentValue,d=d.parent!==O?{parent:O,pool:O}:d):d=dp(),S={baseLanes:S.baseLanes|i,cachePool:d}),o.memoizedState=S,o.childLanes=Zu(n,v,i),s.memoizedState=Qu,Ai(n.child,o)):(zr(s),i=n.child,n=i.sibling,i=rr(i,{mode:"visible",children:o.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 Wu(n,s){return s=cl({mode:"visible",children:s},n.mode),s.return=n,n.child=s}function cl(n,s){return n=nn(22,n,null,s),n.lanes=0,n}function ed(n,s,i){return Os(s,n.child,null,i),n=Wu(s,s.pendingProps.children),n.flags|=2,s.memoizedState=null,n}function Em(n,s,i){n.lanes|=s;var o=n.alternate;o!==null&&(o.lanes|=s),mu(n.return,s,i)}function td(n,s,i,o,d,f){var v=n.memoizedState;v===null?n.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:o,tail:i,tailMode:d,treeForkCount:f}:(v.isBackwards=s,v.rendering=null,v.renderingStartTime=0,v.last=o,v.tail=i,v.tailMode=d,v.treeForkCount=f)}function Tm(n,s,i){var o=s.pendingProps,d=o.revealOrder,f=o.tail;o=o.children;var v=tt.current,S=(v&2)!==0;if(S?(v=v&1|2,s.flags|=128):v&=1,G(tt,v),xt(n,s,o,i),o=Ae?pi:0,!S&&n!==null&&(n.flags&128)!==0)e:for(n=s.child;n!==null;){if(n.tag===13)n.memoizedState!==null&&Em(n,i,s);else if(n.tag===19)Em(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(d){case"forwards":for(i=s.child,d=null;i!==null;)n=i.alternate,n!==null&&Xo(n)===null&&(d=i),i=i.sibling;i=d,i===null?(d=s.child,s.child=null):(d=i.sibling,i.sibling=null),td(s,!1,d,i,f,o);break;case"backwards":case"unstable_legacy-backwards":for(i=null,d=s.child,s.child=null;d!==null;){if(n=d.alternate,n!==null&&Xo(n)===null){s.child=d;break}n=d.sibling,d.sibling=i,i=d,d=n}td(s,!0,i,null,f,o);break;case"together":td(s,!1,null,null,void 0,o);break;default:s.memoizedState=null}return s.child}function cr(n,s,i){if(n!==null&&(s.dependencies=n.dependencies),Ir|=s.lanes,(i&s.childLanes)===0)if(n!==null){if(pa(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=rr(n,n.pendingProps),s.child=i,i.return=s;n.sibling!==null;)n=n.sibling,i=i.sibling=rr(n,n.pendingProps),i.return=s;i.sibling=null}return s.child}
vendor: 4,861 bytes, line 9
9function nd(n,s){return(n.lanes&s)!==0?!0:(n=n.dependencies,!!(n!==null&&$o(n)))}function Kw(n,s,i){switch(s.tag){case 3:fe(s,s.stateNode.containerInfo),Mr(s,rt,n.memoizedState.cache),xs();break;case 27:case 5:Lt(s);break;case 4:fe(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,Au(s),null;break;case 13:var o=s.memoizedState;if(o!==null)return o.dehydrated!==null?(zr(s),s.flags|=128,null):(i&s.child.childLanes)!==0?xm(n,s,i):(zr(s),n=cr(n,s,i),n!==null?n.sibling:null);zr(s);break;case 19:var d=(n.flags&128)!==0;if(o=(i&s.childLanes)!==0,o||(pa(n,s,i,!1),o=(i&s.childLanes)!==0),d){if(o)return Tm(n,s,i);s.flags|=128}if(d=s.memoizedState,d!==null&&(d.rendering=null,d.tail=null,d.lastEffect=null),G(tt,tt.current),o)break;return null;case 22:return s.lanes=0,ym(n,s,i,s.pendingProps);case 24:Mr(s,rt,n.memoizedState.cache)}return cr(n,s,i)}function Rm(n,s,i){if(n!==null)if(n.memoizedProps!==s.pendingProps)at=!0;else{if(!nd(n,i)&&(s.flags&128)===0)return at=!1,Kw(n,s,i);at=(n.flags&131072)!==0}else at=!1,Ae&&(s.flags&1048576)!==0&&sp(s,pi,s.index);switch(s.lanes=0,s.tag){case 16:e:{var o=s.pendingProps;if(n=As(s.elementType),s.type=n,typeof n=="function")ou(n)?(o=js(n,o),s.tag=1,s=_m(null,s,n,o,i)):(s.tag=0,s=Ju(null,s,n,o,i));else{if(n!=null){var d=n.$$typeof;if(d===L){s.tag=11,s=pm(null,s,n,o,i);break e}else if(d===I){s.tag=14,s=mm(null,s,n,o,i);break e}}throw s=$e(n)||n,Error(a(306,s,""))}}return s;case 0:return Ju(n,s,s.type,s.pendingProps,i);case 1:return o=s.type,d=js(o,s.pendingProps),_m(n,s,o,d,i);case 3:e:{if(fe(s,s.stateNode.containerInfo),n===null)throw Error(a(387));o=s.pendingProps;var f=s.memoizedState;d=f.element,Su(n,s),Si(s,o,null,i);var v=s.memoizedState;if(o=v.cache,Mr(s,rt,o),o!==f.cache&&gu(s,[rt],i,!0),_i(),o=v.element,f.isDehydrated)if(f={element:o,isDehydrated:!1,cache:v.cache},s.updateQueue.baseState=f,s.memoizedState=f,s.flags&256){s=Sm(n,s,o,i);break e}else if(o!==d){d=mn(Error(a(424)),s),mi(d),s=Sm(n,s,o,i);break e}else for(n=s.stateNode.containerInfo,n.nodeType===9?n=n.body:n=n.nodeName==="HTML"?n.ownerDocument.body:n,Ve=wn(n.firstChild),_t=s,Ae=!0,jr=null,vn=!0,i=yp(s,null,o,i),s.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling;else{if(xs(),o===d){s=cr(n,s,i);break e}xt(n,s,o,i)}s=s.child}return s;case 26:return ll(n,s),n===null?(i=zg(s.type,null,s.pendingProps,null))?s.memoizedState=i:Ae||(i=s.type,n=s.pendingProps,o=Tl(ue.current).createElement(i),o[wt]=s,o[It]=n,Et(o,i,n),mt(o),s.stateNode=o):s.memoizedState=zg(s.type,n.memoizedProps,s.pendingProps,n.memoizedState),null;case 27:return Lt(s),n===null&&Ae&&(o=s.stateNode=Dg(s.type,s.pendingProps,ue.current),_t=s,vn=!0,d=Ve,Gr(s.type)?(Ld=d,Ve=wn(o.firstChild)):Ve=d),xt(n,s,s.pendingProps.children,i),ll(n,s),n===null&&(s.flags|=4194304),s.child;case 5:return n===null&&Ae&&((d=o=Ve)&&(o=w_(o,s.type,s.pendingProps,vn),o!==null?(s.stateNode=o,_t=s,Ve=wn(o.firstChild),vn=!1,d=!0):d=!1),d||Nr(s)),Lt(s),d=s.type,f=s.pendingProps,v=n!==null?n.memoizedProps:null,o=f.children,Cd(d,f)?o=null:v!==null&&Cd(d,v)&&(s.flags|=32),s.memoizedState!==null&&(d=Ou(n,s,Lw,null,null,i),qi._currentValue=d),ll(n,s),xt(n,s,o,i),s.child;case 6:return n===null&&Ae&&((n=i=Ve)&&(i=__(i,s.pendingProps,vn),i!==null?(s.stateNode=i,_t=s,Ve=null,n=!0):n=!1),n||Nr(s)),null;case 13:return xm(n,s,i);case 4:return fe(s,s.stateNode.containerInfo),o=s.pendingProps,n===null?s.child=Os(s,null,o,i):xt(n,s,o,i),s.child;case 11:return pm(n,s,s.type,s.pendingProps,i);case 7:return xt(n,s,s.pendingProps,i),s.child;case 8:return xt(n,s,s.pendingProps.children,i),s.child;case 12:return xt(n,s,s.pendingProps.children,i),s.child;case 10:return o=s.pendingProps,Mr(s,s.type,o.value),xt(n,s,o.children,i),s.child;case 9:return d=s.type._context,o=s.pendingProps.children,Ts(s),d=St(d),o=o(d),s.flags|=1,xt(n,s,o,i),s.child;case 14:return mm(n,s,s.type,s.pendingProps,i);case 15:return gm(n,s,s.type,s.pendingProps,i);case 19:return Tm(n,s,i);case 31:return $w(n,s,i);case 22:return ym(n,s,i,s.pendingProps);case 24:return Ts(s),o=St(rt),n===null?(d=bu(),d===null&&(d=Ie,f=yu(),d.pooledCache=f,f.refCount++,f!==null&&(d.pooledCacheLanes|=i),d=f),s.memoizedState={parent:o,cache:d},_u(s),Mr(s,rt,d)):((n.lanes&i)!==0&&(Su(n,s),Si(s,null,null,i),_i()),d=n.memoizedState,f=s.memoizedState,d.parent!==o?(d={parent:o,cache:o},s.memoizedState=d,s.lanes===0&&(s.memoizedState=s.updateQueue.baseState=d),Mr(s,rt,o)):(o=f.cache,Mr(s,rt,o),o!==d.cache&&gu(s,[rt],i,!0))),xt(n,s,s.pendingProps.children,i),s.child;case 29:throw s.pendingProps}throw Error(a(156,s.tag))}function ur(n){n.flags|=4}function rd(n,s,i,o,d){if((s=(n.mode&32)!==0)&&(s=!1),s){if(n.flags|=16777216,(d&335544128)===d)if(n.stateNode.complete)n.flags|=8192;else if(Wm())n.flags|=8192;else throw ks=Yo,wu}else n.flags&=-16777217}
vendor: 2,514 bytes, line 9
9function Am(n,s){if(s.type!=="stylesheet"||(s.state.loading&4)!==0)n.flags&=-16777217;else if(n.flags|=16777216,!qg(s))if(Wm())n.flags|=8192;else throw ks=Yo,wu}function ul(n,s){s!==null&&(n.flags|=4),n.flags&16384&&(s=n.tag!==22?Ot():536870912,n.lanes|=s,Ra|=s)}function ki(n,s){if(!Ae)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 o=null;i!==null;)i.alternate!==null&&(o=i),i=i.sibling;o===null?s||n.tail===null?n.tail=null:n.tail.sibling=null:o.sibling=null}}function Ge(n){var s=n.alternate!==null&&n.alternate.child===n.child,i=0,o=0;if(s)for(var d=n.child;d!==null;)i|=d.lanes|d.childLanes,o|=d.subtreeFlags&65011712,o|=d.flags&65011712,d.return=n,d=d.sibling;else for(d=n.child;d!==null;)i|=d.lanes|d.childLanes,o|=d.subtreeFlags,o|=d.flags,d.return=n,d=d.sibling;return n.subtreeFlags|=o,n.childLanes=i,s}function Vw(n,s,i){var o=s.pendingProps;switch(du(s),s.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ge(s),null;case 1:return Ge(s),null;case 3:return i=s.stateNode,o=null,n!==null&&(o=n.memoizedState.cache),s.memoizedState.cache!==o&&(s.flags|=2048),ir(rt),ke(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(n===null||n.child===null)&&(fa(s)?ur(s):n===null||n.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,fu())),Ge(s),null;case 26:var d=s.type,f=s.memoizedState;return n===null?(ur(s),f!==null?(Ge(s),Am(s,f)):(Ge(s),rd(s,d,null,o,i))):f?f!==n.memoizedState?(ur(s),Ge(s),Am(s,f)):(Ge(s),s.flags&=-16777217):(n=n.memoizedProps,n!==o&&ur(s),Ge(s),rd(s,d,n,o,i)),null;case 27:if(Ut(s),i=ue.current,d=s.type,n!==null&&s.stateNode!=null)n.memoizedProps!==o&&ur(s);else{if(!o){if(s.stateNode===null)throw Error(a(166));return Ge(s),null}n=Q.current,fa(s)?ip(s):(n=Dg(d,o,i),s.stateNode=n,ur(s))}return Ge(s),null;case 5:if(Ut(s),d=s.type,n!==null&&s.stateNode!=null)n.memoizedProps!==o&&ur(s);else{if(!o){if(s.stateNode===null)throw Error(a(166));return Ge(s),null}if(f=Q.current,fa(s))ip(s);else{var v=Tl(ue.current);switch(f){case 1:f=v.createElementNS("http://www.w3.org/2000/svg",d);break;case 2:f=v.createElementNS("http://www.w3.org/1998/Math/MathML",d);break;default:switch(d){case"svg":f=v.createElementNS("http://www.w3.org/2000/svg",d);break;case"math":f=v.createElementNS("http://www.w3.org/1998/Math/MathML",d);break;case"script":f=v.createElement("div"),f.innerHTML="<script><\/script>
9",f=f.removeChild(f.firstChild);break;case"select":f=typeof o.is=="string"?v.createElement("select",{is:o.is}):v.createElement("select"),o.multiple?f.multiple=!0:o.size&&(f.size=o.size);break;default:f=typeof o.is=="string"?v.createElement(d,{is:o.is}):v.createElement(d)}}f[wt]=s,f[It]=o;e:for(v=s.child;v!==null;){if(v.tag===5||v.tag===6)f.appendChild(v.stateNode);else if(v.tag!==4&&v.tag!==27&&v.child!==null){v.child.return=v,v=v.child;continue}if(v===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=f;e:switch(Et(f,d,o),d){case"button":case"input":case"select":case"textarea":o=!!o.autoFocus;break e;case"img":o=!0;break e;default:o=!1}o&&ur(s)}}return Ge(s),rd(s,s.type,n===null?null:n.memoizedProps,s.pendingProps,i),null;case 6:if(n&&s.stateNode!=null)n.memoizedProps!==o&&ur(s);else{if(typeof o!="string"&&s.stateNode===null)throw Error(a(166));if(n=ue.current,fa(s)){if(n=s.stateNode,i=s.memoizedProps,o=null,d=_t,d!==null)switch(d.tag){case 27:case 5:o=d.memoizedProps}n[wt]=s,n=!!(n.nodeValue===i||o!==null&&o.suppressHydrationWarning===!0||xg(n.nodeValue,i)),n||Nr(s,!0)}else n=Tl(n).createTextNode(o),n[wt]=s,s.stateNode=n}return Ge(s),null;case 31:if(i=s.memoizedState,n===null||n.memoizedState!==null){if(o=fa(s),i!==null){if(n===null){if(!o)throw Error(a(318));if(n=s.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(a(557));n[wt]=s}else xs(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;Ge(s),n=!1}else i=fu(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=i),n=!0;if(!n)return s.flags&256?(sn(s),s):(sn(s),null);if((s.flags&128)!==0)throw Error(a(558))}return Ge(s),null;case 13:if(o=s.memoizedState,n===null||n.memoizedState!==null&&n.memoizedState.dehydrated!==null){if(d=fa(s),o!==null&&o.dehydrated!==null){if(n===null){if(!d)throw Error(a(318));if(d=s.memoizedState,d=d!==null?d.dehydrated:null,!d)throw Error(a(317));d[wt]=s}else xs(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;Ge(s),d=!1}else d=fu(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=d),d=!0;if(!d)return s.flags&256?(sn(s),s):(sn(s),null)}return sn(s),(s.flags&128)!==0?(s.lanes=i,s):(i=o!==null,n=n!==null&&n.memoizedState!==null,i&&(o=s.child,d=null,o.alternate!==null&&o.alternate.memoizedState!==null&&o.alternate.memoizedState.cachePool!==null&&(d=o.alternate.memoizedState.cachePool.pool),f=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(f=o.memoizedState.cachePool.pool),f!==d&&(o.flags|=2048)),i!==n&&i&&(s.child.flags|=8192),ul(s,s.updateQueue),Ge(s),null);case 4:return ke(),n===null&&Td(s.stateNode.containerInfo),Ge(s),null;case 10:return ir(s.type),Ge(s),null;case 19:if($(tt),o=s.memoizedState,o===null)return Ge(s),null;if(d=(s.flags&128)!==0,f=o.rendering,f===null)if(d)ki(o,!1);else{if(We!==0||n!==null&&(n.flags&128)!==0)for(n=s.child;n!==null;){if(f=Xo(n),f!==null){for(s.flags|=128,ki(o,!1),n=f.updateQueue,s.updateQueue=n,ul(s,n),s.subtreeFlags=0,n=i,i=s.child;i!==null;)tp(i,n),i=i.sibling;return G(tt,tt.current&1|2),Ae&&sr(s,o.treeForkCount),s.child}n=n.sibling}o.tail!==null&&ft()>ml&&(s.flags|=128,d=!0,ki(o,!1),s.lanes=4194304)}else{if(!d)if(n=Xo(f),n!==null){if(s.flags|=128,d=!0,n=n.updateQueue,s.updateQueue=n,ul(s,n),ki(o,!0),o.tail===null&&o.tailMode==="hidden"&&!f.alternate&&!Ae)return Ge(s),null}else 2*ft()-o.renderingStartTime>ml&&i!==536870912&&(s.flags|=128,d=!0,ki(o,!1),s.lanes=4194304);o.isBackwards?(f.sibling=s.child,s.child=f):(n=o.last,n!==null?n.sibling=f:s.child=f,o.last=f)}return o.tail!==null?(n=o.tail,o.rendering=n,o.tail=n.sibling,o.renderingStartTime=ft(),n.sibling=null,i=tt.current,G(tt,d?i&1|2:i&1),Ae&&sr(s,o.treeForkCount),n):(Ge(s),null);case 22:case 23:return sn(s),Ru(),o=s.memoizedState!==null,n!==null?n.memoizedState!==null!==o&&(s.flags|=8192):o&&(s.flags|=8192),o?(i&536870912)!==0&&(s.flags&128)===0&&(Ge(s),s.subtreeFlags&6&&(s.flags|=8192)):Ge(s),i=s.updateQueue,i!==null&&ul(s,i.retryQueue),i=null,n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(i=n.memoizedState.cachePool.pool),o=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(o=s.memoizedState.cachePool.pool),o!==i&&(s.flags|=2048),n!==null&&$(Rs),null;case 24:return i=null,n!==null&&(i=n.memoizedState.cache),s.memoizedState.cache!==i&&(s.flags|=2048),ir(rt),Ge(s),null;case 25:return null;case 30:return null}throw Error(a(156,s.tag))}function Gw(n,s){switch(du(s),s.tag){case 1:return n=s.flags,n&65536?(s.flags=n&-65537|128,s):null;case 3:return ir(rt),ke(),n=s.flags,(n&65536)!==0&&(n&128)===0?(s.flags=n&-65537|128,s):null;case 26:case 27:case 5:return Ut(s),null;case 31:if(s.memoizedState!==null){if(sn(s),s.alternate===null)throw Error(a(340));xs()}return n=s.flags,n&65536?(s.flags=n&-65537|128,s):null;case 13:if(sn(s),n=s.memoizedState,n!==null&&n.dehydrated!==null){if(s.alternate===null)throw Error(a(340));xs()}return n=s.flags,n&65536?(s.flags=n&-65537|128,s):null;case 19:return $(tt),null;case 4:return ke(),null;case 10:return ir(s.type),null;case 22:case 23:return sn(s),Ru(),n!==null&&$(Rs),n=s.flags,n&65536?(s.flags=n&-65537|128,s):null;case 24:return ir(rt),null;case 25:return null;default:return null}}function km(n,s){switch(du(s),s.tag){case 3:ir(rt),ke();break;case 26:case 27:case 5:Ut(s);break;case 4:ke();break;case 31:s.memoizedState!==null&&sn(s);break;case 13:sn(s);break;case 19:$(tt);break;case 10:ir(s.type);break;case 22:case 23:sn(s),Ru(),n!==null&&$(Rs);break;case 24:ir(rt)}}function Oi(n,s){try{var i=s.updateQueue,o=i!==null?i.lastEffect:null;if(o!==null){var d=o.next;i=d;do{if((i.tag&n)===n){o=void 0;var f=i.create,v=i.inst;o=f(),v.destroy=o}i=i.next}while(i!==d)}}catch(S){Ue(s,s.return,S)}}function Br(n,s,i){try{var o=s.updateQueue,d=o!==null?o.lastEffect:null;if(d!==null){var f=d.next;o=f;do{if((o.tag&n)===n){var v=o.inst,S=v.destroy;if(S!==void 0){v.destroy=void 0,d=s;var O=i,P=S;try{P()}catch(q){Ue(d,O,q)}}}o=o.next}while(o!==f)}}catch(q){Ue(s,s.return,q)}}
vendor: 19,105 bytes, line 9
9function Om(n){var s=n.updateQueue;if(s!==null){var i=n.stateNode;try{bp(s,i)}catch(o){Ue(n,n.return,o)}}}function Cm(n,s,i){i.props=js(n.type,n.memoizedProps),i.state=n.memoizedState;try{i.componentWillUnmount()}catch(o){Ue(n,s,o)}}function Ci(n,s){try{var i=n.ref;if(i!==null){switch(n.tag){case 26:case 27:case 5:var o=n.stateNode;break;case 30:o=n.stateNode;break;default:o=n.stateNode}typeof i=="function"?n.refCleanup=i(o):i.current=o}}catch(d){Ue(n,s,d)}}function qn(n,s){var i=n.ref,o=n.refCleanup;if(i!==null)if(typeof o=="function")try{o()}catch(d){Ue(n,s,d)}finally{n.refCleanup=null,n=n.alternate,n!=null&&(n.refCleanup=null)}else if(typeof i=="function")try{i(null)}catch(d){Ue(n,s,d)}else i.current=null}function jm(n){var s=n.type,i=n.memoizedProps,o=n.stateNode;try{e:switch(s){case"button":case"input":case"select":case"textarea":i.autoFocus&&o.focus();break e;case"img":i.src?o.src=i.src:i.srcSet&&(o.srcset=i.srcSet)}}catch(d){Ue(n,n.return,d)}}function sd(n,s,i){try{var o=n.stateNode;p_(o,n.type,i,s),o[It]=s}catch(d){Ue(n,n.return,d)}}function Nm(n){return n.tag===5||n.tag===3||n.tag===26||n.tag===27&&Gr(n.type)||n.tag===4}function ad(n){e:for(;;){for(;n.sibling===null;){if(n.return===null||Nm(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&&Gr(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 id(n,s,i){var o=n.tag;if(o===5||o===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=tr));else if(o!==4&&(o===27&&Gr(n.type)&&(i=n.stateNode,s=null),n=n.child,n!==null))for(id(n,s,i),n=n.sibling;n!==null;)id(n,s,i),n=n.sibling}function dl(n,s,i){var o=n.tag;if(o===5||o===6)n=n.stateNode,s?i.insertBefore(n,s):i.appendChild(n);else if(o!==4&&(o===27&&Gr(n.type)&&(i=n.stateNode),n=n.child,n!==null))for(dl(n,s,i),n=n.sibling;n!==null;)dl(n,s,i),n=n.sibling}function Mm(n){var s=n.stateNode,i=n.memoizedProps;try{for(var o=n.type,d=s.attributes;d.length;)s.removeAttributeNode(d[0]);Et(s,o,i),s[wt]=n,s[It]=i}catch(f){Ue(n,n.return,f)}}var dr=!1,it=!1,od=!1,Dm=typeof WeakSet=="function"?WeakSet:Set,gt=null;function Yw(n,s){if(n=n.containerInfo,kd=Nl,n=Gf(n),eu(n)){if("selectionStart"in n)var i={start:n.selectionStart,end:n.selectionEnd};else e:{i=(i=n.ownerDocument)&&i.defaultView||window;var o=i.getSelection&&i.getSelection();if(o&&o.rangeCount!==0){i=o.anchorNode;var d=o.anchorOffset,f=o.focusNode;o=o.focusOffset;try{i.nodeType,f.nodeType}catch{i=null;break e}var v=0,S=-1,O=-1,P=0,q=0,V=n,B=null;t:for(;;){for(var H;V!==i||d!==0&&V.nodeType!==3||(S=v+d),V!==f||o!==0&&V.nodeType!==3||(O=v+o),V.nodeType===3&&(v+=V.nodeValue.length),(H=V.firstChild)!==null;)B=V,V=H;for(;;){if(V===n)break t;if(B===i&&++P===d&&(S=v),B===f&&++q===o&&(O=v),(H=V.nextSibling)!==null)break;V=B,B=V.parentNode}V=H}i=S===-1||O===-1?null:{start:S,end:O}}else i=null}i=i||{start:0,end:0}}else i=null;for(Od={focusedElem:n,selectionRange:i},Nl=!1,gt=s;gt!==null;)if(s=gt,n=s.child,(s.subtreeFlags&1028)!==0&&n!==null)n.return=s,gt=n;else for(;gt!==null;){switch(s=gt,f=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++)d=n[i],d.ref.impl=d.nextImpl;break;case 11:case 15:break;case 1:if((n&1024)!==0&&f!==null){n=void 0,i=s,d=f.memoizedProps,f=f.memoizedState,o=i.stateNode;try{var re=js(i.type,d);n=o.getSnapshotBeforeUpdate(re,f),o.__reactInternalSnapshotBeforeUpdate=n}catch(de){Ue(i,i.return,de)}}break;case 3:if((n&1024)!==0){if(n=s.stateNode.containerInfo,i=n.nodeType,i===9)Nd(n);else if(i===1)switch(n.nodeName){case"HEAD":case"HTML":case"BODY":Nd(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,gt=n;break}gt=s.return}}function Lm(n,s,i){var o=i.flags;switch(i.tag){case 0:case 11:case 15:fr(n,i),o&4&&Oi(5,i);break;case 1:if(fr(n,i),o&4)if(n=i.stateNode,s===null)try{n.componentDidMount()}catch(v){Ue(i,i.return,v)}else{var d=js(i.type,s.memoizedProps);s=s.memoizedState;try{n.componentDidUpdate(d,s,n.__reactInternalSnapshotBeforeUpdate)}catch(v){Ue(i,i.return,v)}}o&64&&Om(i),o&512&&Ci(i,i.return);break;case 3:if(fr(n,i),o&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{bp(n,s)}catch(v){Ue(i,i.return,v)}}break;case 27:s===null&&o&4&&Mm(i);case 26:case 5:fr(n,i),s===null&&o&4&&jm(i),o&512&&Ci(i,i.return);break;case 12:fr(n,i);break;case 31:fr(n,i),o&4&&Pm(n,i);break;case 13:fr(n,i),o&4&&Bm(n,i),o&64&&(n=i.memoizedState,n!==null&&(n=n.dehydrated,n!==null&&(i=n_.bind(null,i),S_(n,i))));break;case 22:if(o=i.memoizedState!==null||dr,!o){s=s!==null&&s.memoizedState!==null||it,d=dr;var f=it;dr=o,(it=s)&&!f?pr(n,i,(i.subtreeFlags&8772)!==0):fr(n,i),dr=d,it=f}break;case 30:break;default:fr(n,i)}}function Um(n){var s=n.alternate;s!==null&&(n.alternate=null,Um(s)),n.child=null,n.deletions=null,n.sibling=null,n.tag===5&&(s=n.stateNode,s!==null&&zc(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 Fe=null,$t=!1;function hr(n,s,i){for(i=i.child;i!==null;)zm(n,s,i),i=i.sibling}function zm(n,s,i){if(Nt&&typeof Nt.onCommitFiberUnmount=="function")try{Nt.onCommitFiberUnmount(ps,i)}catch{}switch(i.tag){case 26:it||qn(i,s),hr(n,s,i),i.memoizedState?i.memoizedState.count--:i.stateNode&&(i=i.stateNode,i.parentNode.removeChild(i));break;case 27:it||qn(i,s);var o=Fe,d=$t;Gr(i.type)&&(Fe=i.stateNode,$t=!1),hr(n,s,i),Bi(i.stateNode),Fe=o,$t=d;break;case 5:it||qn(i,s);case 6:if(o=Fe,d=$t,Fe=null,hr(n,s,i),Fe=o,$t=d,Fe!==null)if($t)try{(Fe.nodeType===9?Fe.body:Fe.nodeName==="HTML"?Fe.ownerDocument.body:Fe).removeChild(i.stateNode)}catch(f){Ue(i,s,f)}else try{Fe.removeChild(i.stateNode)}catch(f){Ue(i,s,f)}break;case 18:Fe!==null&&($t?(n=Fe,Og(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,i.stateNode),Da(n)):Og(Fe,i.stateNode));break;case 4:o=Fe,d=$t,Fe=i.stateNode.containerInfo,$t=!0,hr(n,s,i),Fe=o,$t=d;break;case 0:case 11:case 14:case 15:Br(2,i,s),it||Br(4,i,s),hr(n,s,i);break;case 1:it||(qn(i,s),o=i.stateNode,typeof o.componentWillUnmount=="function"&&Cm(i,s,o)),hr(n,s,i);break;case 21:hr(n,s,i);break;case 22:it=(o=it)||i.memoizedState!==null,hr(n,s,i),it=o;break;default:hr(n,s,i)}}function Pm(n,s){if(s.memoizedState===null&&(n=s.alternate,n!==null&&(n=n.memoizedState,n!==null))){n=n.dehydrated;try{Da(n)}catch(i){Ue(s,s.return,i)}}}function Bm(n,s){if(s.memoizedState===null&&(n=s.alternate,n!==null&&(n=n.memoizedState,n!==null&&(n=n.dehydrated,n!==null))))try{Da(n)}catch(i){Ue(s,s.return,i)}}function Fw(n){switch(n.tag){case 31:case 13:case 19:var s=n.stateNode;return s===null&&(s=n.stateNode=new Dm),s;case 22:return n=n.stateNode,s=n._retryCache,s===null&&(s=n._retryCache=new Dm),s;default:throw Error(a(435,n.tag))}}function hl(n,s){var i=Fw(n);s.forEach(function(o){if(!i.has(o)){i.add(o);var d=r_.bind(null,n,o);o.then(d,d)}})}function Kt(n,s){var i=s.deletions;if(i!==null)for(var o=0;o<i.length;o++){var d=i[o],f=n,v=s,S=v;e:for(;S!==null;){switch(S.tag){case 27:if(Gr(S.type)){Fe=S.stateNode,$t=!1;break e}break;case 5:Fe=S.stateNode,$t=!1;break e;case 3:case 4:Fe=S.stateNode.containerInfo,$t=!0;break e}S=S.return}if(Fe===null)throw Error(a(160));zm(f,v,d),Fe=null,$t=!1,f=d.alternate,f!==null&&(f.return=null),d.return=null}if(s.subtreeFlags&13886)for(s=s.child;s!==null;)Hm(s,n),s=s.sibling}var kn=null;function Hm(n,s){var i=n.alternate,o=n.flags;switch(n.tag){case 0:case 11:case 14:case 15:Kt(s,n),Vt(n),o&4&&(Br(3,n,n.return),Oi(3,n),Br(5,n,n.return));break;case 1:Kt(s,n),Vt(n),o&512&&(it||i===null||qn(i,i.return)),o&64&&dr&&(n=n.updateQueue,n!==null&&(o=n.callbacks,o!==null&&(i=n.shared.hiddenCallbacks,n.shared.hiddenCallbacks=i===null?o:i.concat(o))));break;case 26:var d=kn;if(Kt(s,n),Vt(n),o&512&&(it||i===null||qn(i,i.return)),o&4){var f=i!==null?i.memoizedState:null;if(o=n.memoizedState,i===null)if(o===null)if(n.stateNode===null){e:{o=n.type,i=n.memoizedProps,d=d.ownerDocument||d;t:switch(o){case"title":f=d.getElementsByTagName("title")[0],(!f||f[ri]||f[wt]||f.namespaceURI==="http://www.w3.org/2000/svg"||f.hasAttribute("itemprop"))&&(f=d.createElement(o),d.head.insertBefore(f,d.querySelector("head > title"))),Et(f,o,i),f[wt]=n,mt(f),o=f;break e;case"link":var v=Hg("link","href",d).get(o+(i.href||""));if(v){for(var S=0;S<v.length;S++)if(f=v[S],f.getAttribute("href")===(i.href==null||i.href===""?null:i.href)&&f.getAttribute("rel")===(i.rel==null?null:i.rel)&&f.getAttribute("title")===(i.title==null?null:i.title)&&f.getAttribute("crossorigin")===(i.crossOrigin==null?null:i.crossOrigin)){v.splice(S,1);break t}}f=d.createElement(o),Et(f,o,i),d.head.appendChild(f);break;case"meta":if(v=Hg("meta","content",d).get(o+(i.content||""))){for(S=0;S<v.length;S++)if(f=v[S],f.getAttribute("content")===(i.content==null?null:""+i.content)&&f.getAttribute("name")===(i.name==null?null:i.name)&&f.getAttribute("property")===(i.property==null?null:i.property)&&f.getAttribute("http-equiv")===(i.httpEquiv==null?null:i.httpEquiv)&&f.getAttribute("charset")===(i.charSet==null?null:i.charSet)){v.splice(S,1);break t}}f=d.createElement(o),Et(f,o,i),d.head.appendChild(f);break;default:throw Error(a(468,o))}f[wt]=n,mt(f),o=f}n.stateNode=o}else Ig(d,n.type,n.stateNode);else n.stateNode=Bg(d,o,n.memoizedProps);else f!==o?(f===null?i.stateNode!==null&&(i=i.stateNode,i.parentNode.removeChild(i)):f.count--,o===null?Ig(d,n.type,n.stateNode):Bg(d,o,n.memoizedProps)):o===null&&n.stateNode!==null&&sd(n,n.memoizedProps,i.memoizedProps)}break;case 27:Kt(s,n),Vt(n),o&512&&(it||i===null||qn(i,i.return)),i!==null&&o&4&&sd(n,n.memoizedProps,i.memoizedProps);break;case 5:if(Kt(s,n),Vt(n),o&512&&(it||i===null||qn(i,i.return)),n.flags&32){d=n.stateNode;try{ra(d,"")}catch(re){Ue(n,n.return,re)}}o&4&&n.stateNode!=null&&(d=n.memoizedProps,sd(n,d,i!==null?i.memoizedProps:d)),o&1024&&(od=!0);break;case 6:if(Kt(s,n),Vt(n),o&4){if(n.stateNode===null)throw Error(a(162));o=n.memoizedProps,i=n.stateNode;try{i.nodeValue=o}catch(re){Ue(n,n.return,re)}}break;case 3:if(kl=null,d=kn,kn=Rl(s.containerInfo),Kt(s,n),kn=d,Vt(n),o&4&&i!==null&&i.memoizedState.isDehydrated)try{Da(s.containerInfo)}catch(re){Ue(n,n.return,re)}od&&(od=!1,Im(n));break;case 4:o=kn,kn=Rl(n.stateNode.containerInfo),Kt(s,n),Vt(n),kn=o;break;case 12:Kt(s,n),Vt(n);break;case 31:Kt(s,n),Vt(n),o&4&&(o=n.updateQueue,o!==null&&(n.updateQueue=null,hl(n,o)));break;case 13:Kt(s,n),Vt(n),n.child.flags&8192&&n.memoizedState!==null!=(i!==null&&i.memoizedState!==null)&&(pl=ft()),o&4&&(o=n.updateQueue,o!==null&&(n.updateQueue=null,hl(n,o)));break;case 22:d=n.memoizedState!==null;var O=i!==null&&i.memoizedState!==null,P=dr,q=it;if(dr=P||d,it=q||O,Kt(s,n),it=q,dr=P,Vt(n),o&8192)e:for(s=n.stateNode,s._visibility=d?s._visibility&-2:s._visibility|1,d&&(i===null||O||dr||it||Ns(n)),i=null,s=n;;){if(s.tag===5||s.tag===26){if(i===null){O=i=s;try{if(f=O.stateNode,d)v=f.style,typeof v.setProperty=="function"?v.setProperty("display","none","important"):v.display="none";else{S=O.stateNode;var V=O.memoizedProps.style,B=V!=null&&V.hasOwnProperty("display")?V.display:null;S.style.display=B==null||typeof B=="boolean"?"":(""+B).trim()}}catch(re){Ue(O,O.return,re)}}}else if(s.tag===6){if(i===null){O=s;try{O.stateNode.nodeValue=d?"":O.memoizedProps}catch(re){Ue(O,O.return,re)}}}else if(s.tag===18){if(i===null){O=s;try{var H=O.stateNode;d?Cg(H,!0):Cg(O.stateNode,!1)}catch(re){Ue(O,O.return,re)}}}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}o&4&&(o=n.updateQueue,o!==null&&(i=o.retryQueue,i!==null&&(o.retryQueue=null,hl(n,i))));break;case 19:Kt(s,n),Vt(n),o&4&&(o=n.updateQueue,o!==null&&(n.updateQueue=null,hl(n,o)));break;case 30:break;case 21:break;default:Kt(s,n),Vt(n)}}function Vt(n){var s=n.flags;if(s&2){try{for(var i,o=n.return;o!==null;){if(Nm(o)){i=o;break}o=o.return}if(i==null)throw Error(a(160));switch(i.tag){case 27:var d=i.stateNode,f=ad(n);dl(n,f,d);break;case 5:var v=i.stateNode;i.flags&32&&(ra(v,""),i.flags&=-33);var S=ad(n);dl(n,S,v);break;case 3:case 4:var O=i.stateNode.containerInfo,P=ad(n);id(n,P,O);break;default:throw Error(a(161))}}catch(q){Ue(n,n.return,q)}n.flags&=-3}s&4096&&(n.flags&=-4097)}function Im(n){if(n.subtreeFlags&1024)for(n=n.child;n!==null;){var s=n;Im(s),s.tag===5&&s.flags&1024&&s.stateNode.reset(),n=n.sibling}}function fr(n,s){if(s.subtreeFlags&8772)for(s=s.child;s!==null;)Lm(n,s.alternate,s),s=s.sibling}function Ns(n){for(n=n.child;n!==null;){var s=n;switch(s.tag){case 0:case 11:case 14:case 15:Br(4,s,s.return),Ns(s);break;case 1:qn(s,s.return);var i=s.stateNode;typeof i.componentWillUnmount=="function"&&Cm(s,s.return,i),Ns(s);break;case 27:Bi(s.stateNode);case 26:case 5:qn(s,s.return),Ns(s);break;case 22:s.memoizedState===null&&Ns(s);break;case 30:Ns(s);break;default:Ns(s)}n=n.sibling}}function pr(n,s,i){for(i=i&&(s.subtreeFlags&8772)!==0,s=s.child;s!==null;){var o=s.alternate,d=n,f=s,v=f.flags;switch(f.tag){case 0:case 11:case 15:pr(d,f,i),Oi(4,f);break;case 1:if(pr(d,f,i),o=f,d=o.stateNode,typeof d.componentDidMount=="function")try{d.componentDidMount()}catch(P){Ue(o,o.return,P)}if(o=f,d=o.updateQueue,d!==null){var S=o.stateNode;try{var O=d.shared.hiddenCallbacks;if(O!==null)for(d.shared.hiddenCallbacks=null,d=0;d<O.length;d++)vp(O[d],S)}catch(P){Ue(o,o.return,P)}}i&&v&64&&Om(f),Ci(f,f.return);break;case 27:Mm(f);case 26:case 5:pr(d,f,i),i&&o===null&&v&4&&jm(f),Ci(f,f.return);break;case 12:pr(d,f,i);break;case 31:pr(d,f,i),i&&v&4&&Pm(d,f);break;case 13:pr(d,f,i),i&&v&4&&Bm(d,f);break;case 22:f.memoizedState===null&&pr(d,f,i),Ci(f,f.return);break;case 30:break;default:pr(d,f,i)}s=s.sibling}}function ld(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&&gi(i))}function cd(n,s){n=null,s.alternate!==null&&(n=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==n&&(s.refCount++,n!=null&&gi(n))}function On(n,s,i,o){if(s.subtreeFlags&10256)for(s=s.child;s!==null;)qm(n,s,i,o),s=s.sibling}function qm(n,s,i,o){var d=s.flags;switch(s.tag){case 0:case 11:case 15:On(n,s,i,o),d&2048&&Oi(9,s);break;case 1:On(n,s,i,o);break;case 3:On(n,s,i,o),d&2048&&(n=null,s.alternate!==null&&(n=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==n&&(s.refCount++,n!=null&&gi(n)));break;case 12:if(d&2048){On(n,s,i,o),n=s.stateNode;try{var f=s.memoizedProps,v=f.id,S=f.onPostCommit;typeof S=="function"&&S(v,s.alternate===null?"mount":"update",n.passiveEffectDuration,-0)}catch(O){Ue(s,s.return,O)}}else On(n,s,i,o);break;case 31:On(n,s,i,o);break;case 13:On(n,s,i,o);break;case 23:break;case 22:f=s.stateNode,v=s.alternate,s.memoizedState!==null?f._visibility&2?On(n,s,i,o):ji(n,s):f._visibility&2?On(n,s,i,o):(f._visibility|=2,xa(n,s,i,o,(s.subtreeFlags&10256)!==0||!1)),d&2048&&ld(v,s);break;case 24:On(n,s,i,o),d&2048&&cd(s.alternate,s);break;default:On(n,s,i,o)}}function xa(n,s,i,o,d){for(d=d&&((s.subtreeFlags&10256)!==0||!1),s=s.child;s!==null;){var f=n,v=s,S=i,O=o,P=v.flags;switch(v.tag){case 0:case 11:case 15:xa(f,v,S,O,d),Oi(8,v);break;case 23:break;case 22:var q=v.stateNode;v.memoizedState!==null?q._visibility&2?xa(f,v,S,O,d):ji(f,v):(q._visibility|=2,xa(f,v,S,O,d)),d&&P&2048&&ld(v.alternate,v);break;case 24:xa(f,v,S,O,d),d&&P&2048&&cd(v.alternate,v);break;default:xa(f,v,S,O,d)}s=s.sibling}}function ji(n,s){if(s.subtreeFlags&10256)for(s=s.child;s!==null;){var i=n,o=s,d=o.flags;switch(o.tag){case 22:ji(i,o),d&2048&&ld(o.alternate,o);break;case 24:ji(i,o),d&2048&&cd(o.alternate,o);break;default:ji(i,o)}s=s.sibling}}var Ni=8192;function Ea(n,s,i){if(n.subtreeFlags&Ni)for(n=n.child;n!==null;)$m(n,s,i),n=n.sibling}function $m(n,s,i){switch(n.tag){case 26:Ea(n,s,i),n.flags&Ni&&n.memoizedState!==null&&D_(i,kn,n.memoizedState,n.memoizedProps);break;case 5:Ea(n,s,i);break;case 3:case 4:var o=kn;kn=Rl(n.stateNode.containerInfo),Ea(n,s,i),kn=o;break;case 22:n.memoizedState===null&&(o=n.alternate,o!==null&&o.memoizedState!==null?(o=Ni,Ni=16777216,Ea(n,s,i),Ni=o):Ea(n,s,i));break;default:Ea(n,s,i)}}function Km(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 Mi(n){var s=n.deletions;if((n.flags&16)!==0){if(s!==null)for(var i=0;i<s.length;i++){var o=s[i];gt=o,Gm(o,n)}Km(n)}if(n.subtreeFlags&10256)for(n=n.child;n!==null;)Vm(n),n=n.sibling}function Vm(n){switch(n.tag){case 0:case 11:case 15:Mi(n),n.flags&2048&&Br(9,n,n.return);break;case 3:Mi(n);break;case 12:Mi(n);break;case 22:var s=n.stateNode;n.memoizedState!==null&&s._visibility&2&&(n.return===null||n.return.tag!==13)?(s._visibility&=-3,fl(n)):Mi(n);break;default:Mi(n)}}function fl(n){var s=n.deletions;if((n.flags&16)!==0){if(s!==null)for(var i=0;i<s.length;i++){var o=s[i];gt=o,Gm(o,n)}Km(n)}for(n=n.child;n!==null;){switch(s=n,s.tag){case 0:case 11:case 15:Br(8,s,s.return),fl(s);break;case 22:i=s.stateNode,i._visibility&2&&(i._visibility&=-3,fl(s));break;default:fl(s)}n=n.sibling}}function Gm(n,s){for(;gt!==null;){var i=gt;switch(i.tag){case 0:case 11:case 15:Br(8,i,s);break;case 23:case 22:if(i.memoizedState!==null&&i.memoizedState.cachePool!==null){var o=i.memoizedState.cachePool.pool;o!=null&&o.refCount++}break;case 24:gi(i.memoizedState.cache)}if(o=i.child,o!==null)o.return=i,gt=o;else e:for(i=n;gt!==null;){o=gt;var d=o.sibling,f=o.return;if(Um(o),o===i){gt=null;break e}if(d!==null){d.return=f,gt=d;break e}gt=f}}}var Jw={getCacheForType:function(n){var s=St(rt),i=s.data.get(n);return i===void 0&&(i=n(),s.data.set(n,i)),i},cacheSignal:function(){return St(rt).controller.signal}},Qw=typeof WeakMap=="function"?WeakMap:Map,De=0,Ie=null,xe=null,Te=0,Le=0,an=null,Hr=!1,Ta=!1,ud=!1,mr=0,We=0,Ir=0,Ms=0,dd=0,on=0,Ra=0,Di=null,Gt=null,hd=!1,pl=0,Ym=0,ml=1/0,gl=null,qr=null,ct=0,$r=null,Aa=null,gr=0,fd=0,pd=null,Fm=null,Li=0,md=null;function ln(){return(De&2)!==0&&Te!==0?Te&-Te:z.T!==null?_d():Lc()}function Jm(){if(on===0)if((Te&536870912)===0||Ae){var n=Js;Js<<=1,(Js&3932160)===0&&(Js=262144),on=n}else on=536870912;return n=rn.current,n!==null&&(n.flags|=32),on}function Yt(n,s,i){(n===Ie&&(Le===2||Le===9)||n.cancelPendingCommit!==null)&&(ka(n,0),Kr(n,Te,on,!1)),Qe(n,i),((De&2)===0||n!==Ie)&&(n===Ie&&((De&2)===0&&(Ms|=i),We===4&&Kr(n,Te,on,!1)),$n(n))}function Qm(n,s,i){if((De&6)!==0)throw Error(a(327));
vendor: 24,146 bytes, lines 9-10
9var o=!i&&(s&127)===0&&(s&n.expiredLanes)===0||Ye(n,s),d=o?Ww(n,s):yd(n,s,!0),f=o;do{if(d===0){Ta&&!o&&Kr(n,s,0,!1);break}else{if(i=n.current.alternate,f&&!Xw(i)){d=yd(n,s,!1),f=!1;continue}if(d===2){if(f=s,n.errorRecoveryDisabledLanes&f)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;d=Di;var O=S.current.memoizedState.isDehydrated;if(O&&(ka(S,v).flags|=256),v=yd(S,v,!1),v!==2){if(ud&&!O){S.errorRecoveryDisabledLanes|=f,Ms|=f,d=4;break e}f=Gt,Gt=d,f!==null&&(Gt===null?Gt=f:Gt.push.apply(Gt,f))}d=v}if(f=!1,d!==2)continue}}if(d===1){ka(n,0),Kr(n,s,0,!0);break}e:{switch(o=n,f=d,f){case 0:case 1:throw Error(a(345));case 4:if((s&4194048)!==s)break;case 6:Kr(o,s,on,!Hr);break e;case 2:Gt=null;break;case 3:case 5:break;default:throw Error(a(329))}if((s&62914560)===s&&(d=pl+300-ft(),10<d)){if(Kr(o,s,on,!Hr),pe(o,0,!0)!==0)break e;gr=s,o.timeoutHandle=Ag(Xm.bind(null,o,i,Gt,gl,hd,s,on,Ms,Ra,Hr,f,"Throttled",-0,0),d);break e}Xm(o,i,Gt,gl,hd,s,on,Ms,Ra,Hr,f,null,-0,0)}}break}while(!0);$n(n)}function Xm(n,s,i,o,d,f,v,S,O,P,q,V,B,H){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:tr},$m(s,f,V);var re=(f&62914560)===f?pl-ft():(f&4194048)===f?Ym-ft():0;if(re=L_(V,re),re!==null){gr=f,n.cancelPendingCommit=re(ag.bind(null,n,s,f,i,o,d,v,S,O,q,V,null,B,H)),Kr(n,f,v,!P);return}}ag(n,s,f,i,o,d,v,S,O)}function Xw(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 o=0;o<i.length;o++){var d=i[o],f=d.getSnapshot;d=d.value;try{if(!tn(f(),d))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 Kr(n,s,i,o){s&=~dd,s&=~Ms,n.suspendedLanes|=s,n.pingedLanes&=~s,o&&(n.warmLanes|=s),o=n.expirationTimes;for(var d=s;0<d;){var f=31-kt(d),v=1<<f;o[f]=-1,d&=~v}i!==0&&gs(n,i,s)}function yl(){return(De&6)===0?(Ui(0),!1):!0}function gd(){if(xe!==null){if(Le===0)var n=xe.return;else n=xe,ar=Es=null,Nu(n),va=null,vi=0,n=xe;for(;n!==null;)km(n.alternate,n),n=n.return;xe=null}}function ka(n,s){var i=n.timeoutHandle;i!==-1&&(n.timeoutHandle=-1,y_(i)),i=n.cancelPendingCommit,i!==null&&(n.cancelPendingCommit=null,i()),gr=0,gd(),Ie=n,xe=i=rr(n.current,null),Te=s,Le=0,an=null,Hr=!1,Ta=Ye(n,s),ud=!1,Ra=on=dd=Ms=Ir=We=0,Gt=Di=null,hd=!1,(s&8)!==0&&(s|=s&32);var o=n.entangledLanes;if(o!==0)for(n=n.entanglements,o&=s;0<o;){var d=31-kt(o),f=1<<d;s|=n[d],o&=~f}return mr=s,Po(),i}function Zm(n,s){ve=null,z.H=Ri,s===ya||s===Go?(s=pp(),Le=3):s===wu?(s=pp(),Le=4):Le=s===Fu?8:s!==null&&typeof s=="object"&&typeof s.then=="function"?6:1,an=s,xe===null&&(We=1,il(n,mn(s,n.current)))}function Wm(){var n=rn.current;return n===null?!0:(Te&4194048)===Te?bn===null:(Te&62914560)===Te||(Te&536870912)!==0?n===bn:!1}function eg(){var n=z.H;return z.H=Ri,n===null?Ri:n}function tg(){var n=z.A;return z.A=Jw,n}function vl(){We=4,Hr||(Te&4194048)!==Te&&rn.current!==null||(Ta=!0),(Ir&134217727)===0&&(Ms&134217727)===0||Ie===null||Kr(Ie,Te,on,!1)}function yd(n,s,i){var o=De;De|=2;var d=eg(),f=tg();(Ie!==n||Te!==s)&&(gl=null,ka(n,s)),s=!1;var v=We;e:do try{if(Le!==0&&xe!==null){var S=xe,O=an;switch(Le){case 8:gd(),v=6;break e;case 3:case 2:case 9:case 6:rn.current===null&&(s=!0);var P=Le;if(Le=0,an=null,Oa(n,S,O,P),i&&Ta){v=0;break e}break;default:P=Le,Le=0,an=null,Oa(n,S,O,P)}}Zw(),v=We;break}catch(q){Zm(n,q)}while(!0);return s&&n.shellSuspendCounter++,ar=Es=null,De=o,z.H=d,z.A=f,xe===null&&(Ie=null,Te=0,Po()),v}function Zw(){for(;xe!==null;)ng(xe)}function Ww(n,s){var i=De;De|=2;var o=eg(),d=tg();Ie!==n||Te!==s?(gl=null,ml=ft()+500,ka(n,s)):Ta=Ye(n,s);e:do try{if(Le!==0&&xe!==null){s=xe;var f=an;t:switch(Le){case 1:Le=0,an=null,Oa(n,s,f,1);break;case 2:case 9:if(hp(f)){Le=0,an=null,rg(s);break}s=function(){Le!==2&&Le!==9||Ie!==n||(Le=7),$n(n)},f.then(s,s);break e;case 3:Le=7;break e;case 4:Le=5;break e;case 7:hp(f)?(Le=0,an=null,rg(s)):(Le=0,an=null,Oa(n,s,f,7));break;case 5:var v=null;switch(xe.tag){case 26:v=xe.memoizedState;case 5:case 27:var S=xe;if(v?qg(v):S.stateNode.complete){Le=0,an=null;var O=S.sibling;if(O!==null)xe=O;else{var P=S.return;P!==null?(xe=P,bl(P)):xe=null}break t}}Le=0,an=null,Oa(n,s,f,5);break;case 6:Le=0,an=null,Oa(n,s,f,6);break;case 8:gd(),We=6;break e;default:throw Error(a(462))}}e_();break}catch(q){Zm(n,q)}while(!0);return ar=Es=null,z.H=o,z.A=d,De=i,xe!==null?0:(Ie=null,Te=0,Po(),We)}function e_(){for(;xe!==null&&!ht();)ng(xe)}function ng(n){var s=Rm(n.alternate,n,mr);n.memoizedProps=n.pendingProps,s===null?bl(n):xe=s}function rg(n){var s=n,i=s.alternate;switch(s.tag){case 15:case 0:s=wm(i,s,s.pendingProps,s.type,void 0,Te);break;case 11:s=wm(i,s,s.pendingProps,s.type.render,s.ref,Te);break;case 5:Nu(s);default:km(i,s),s=xe=tp(s,mr),s=Rm(i,s,mr)}n.memoizedProps=n.pendingProps,s===null?bl(n):xe=s}function Oa(n,s,i,o){ar=Es=null,Nu(s),va=null,vi=0;var d=s.return;try{if(qw(n,d,s,i,Te)){We=1,il(n,mn(i,n.current)),xe=null;return}}catch(f){if(d!==null)throw xe=d,f;We=1,il(n,mn(i,n.current)),xe=null;return}s.flags&32768?(Ae||o===1?n=!0:Ta||(Te&536870912)!==0?n=!1:(Hr=n=!0,(o===2||o===9||o===3||o===6)&&(o=rn.current,o!==null&&o.tag===13&&(o.flags|=16384))),sg(s,n)):bl(s)}function bl(n){var s=n;do{if((s.flags&32768)!==0){sg(s,Hr);return}n=s.return;var i=Vw(s.alternate,s,mr);if(i!==null){xe=i;return}if(s=s.sibling,s!==null){xe=s;return}xe=s=n}while(s!==null);We===0&&(We=5)}function sg(n,s){do{var i=Gw(n.alternate,n);if(i!==null){i.flags&=32767,xe=i;return}if(i=n.return,i!==null&&(i.flags|=32768,i.subtreeFlags=0,i.deletions=null),!s&&(n=n.sibling,n!==null)){xe=n;return}xe=n=i}while(n!==null);We=6,xe=null}function ag(n,s,i,o,d,f,v,S,O){n.cancelPendingCommit=null;do wl();while(ct!==0);if((De&6)!==0)throw Error(a(327));if(s!==null){if(s===n.current)throw Error(a(177));if(f=s.lanes|s.childLanes,f|=au,Pt(n,i,f,v,S,O),n===Ie&&(xe=Ie=null,Te=0),Aa=s,$r=n,gr=i,fd=f,pd=d,Fm=o,(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?(n.callbackNode=null,n.callbackPriority=0,s_(Zn,function(){return ug(),null})):(n.callbackNode=null,n.callbackPriority=0),o=(s.flags&13878)!==0,(s.subtreeFlags&13878)!==0||o){o=z.T,z.T=null,d=J.p,J.p=2,v=De,De|=4;try{Yw(n,s,i)}finally{De=v,J.p=d,z.T=o}}ct=1,ig(),og(),lg()}}function ig(){if(ct===1){ct=0;var n=$r,s=Aa,i=(s.flags&13878)!==0;if((s.subtreeFlags&13878)!==0||i){i=z.T,z.T=null;var o=J.p;J.p=2;var d=De;De|=4;try{Hm(s,n);var f=Od,v=Gf(n.containerInfo),S=f.focusedElem,O=f.selectionRange;if(v!==S&&S&&S.ownerDocument&&Vf(S.ownerDocument.documentElement,S)){if(O!==null&&eu(S)){var P=O.start,q=O.end;if(q===void 0&&(q=P),"selectionStart"in S)S.selectionStart=P,S.selectionEnd=Math.min(q,S.value.length);else{var V=S.ownerDocument||document,B=V&&V.defaultView||window;if(B.getSelection){var H=B.getSelection(),re=S.textContent.length,de=Math.min(O.start,re),He=O.end===void 0?de:Math.min(O.end,re);!H.extend&&de>He&&(v=He,He=de,de=v);var D=Kf(S,de),j=Kf(S,He);if(D&&j&&(H.rangeCount!==1||H.anchorNode!==D.node||H.anchorOffset!==D.offset||H.focusNode!==j.node||H.focusOffset!==j.offset)){var U=V.createRange();U.setStart(D.node,D.offset),H.removeAllRanges(),de>He?(H.addRange(U),H.extend(j.node,j.offset)):(U.setEnd(j.node,j.offset),H.addRange(U))}}}}for(V=[],H=S;H=H.parentNode;)H.nodeType===1&&V.push({element:H,left:H.scrollLeft,top:H.scrollTop});for(typeof S.focus=="function"&&S.focus(),S=0;S<V.length;S++){var K=V[S];K.element.scrollLeft=K.left,K.element.scrollTop=K.top}}Nl=!!kd,Od=kd=null}finally{De=d,J.p=o,z.T=i}}n.current=s,ct=2}}function og(){if(ct===2){ct=0;var n=$r,s=Aa,i=(s.flags&8772)!==0;if((s.subtreeFlags&8772)!==0||i){i=z.T,z.T=null;var o=J.p;J.p=2;var d=De;De|=4;try{Lm(n,s.alternate,s)}finally{De=d,J.p=o,z.T=i}}ct=3}}function lg(){if(ct===4||ct===3){ct=0,zn();var n=$r,s=Aa,i=gr,o=Fm;(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?ct=5:(ct=0,Aa=$r=null,cg(n,n.pendingLanes));var d=n.pendingLanes;if(d===0&&(qr=null),Rn(i),s=s.stateNode,Nt&&typeof Nt.onCommitFiberRoot=="function")try{Nt.onCommitFiberRoot(ps,s,void 0,(s.current.flags&128)===128)}catch{}if(o!==null){s=z.T,d=J.p,J.p=2,z.T=null;try{for(var f=n.onRecoverableError,v=0;v<o.length;v++){var S=o[v];f(S.value,{componentStack:S.stack})}}finally{z.T=s,J.p=d}}(gr&3)!==0&&wl(),$n(n),d=n.pendingLanes,(i&261930)!==0&&(d&42)!==0?n===md?Li++:(Li=0,md=n):Li=0,Ui(0)}}function cg(n,s){(n.pooledCacheLanes&=s)===0&&(s=n.pooledCache,s!=null&&(n.pooledCache=null,gi(s)))}function wl(){return ig(),og(),lg(),ug()}function ug(){if(ct!==5)return!1;var n=$r,s=fd;fd=0;var i=Rn(gr),o=z.T,d=J.p;try{J.p=32>i?32:i,z.T=null,i=pd,pd=null;var f=$r,v=gr;if(ct=0,Aa=$r=null,gr=0,(De&6)!==0)throw Error(a(331));var S=De;if(De|=4,Vm(f.current),qm(f,f.current,v,i),De=S,Ui(0,!1),Nt&&typeof Nt.onPostCommitFiberRoot=="function")try{Nt.onPostCommitFiberRoot(ps,f)}catch{}return!0}finally{J.p=d,z.T=o,cg(n,s)}}function dg(n,s,i){s=mn(i,s),s=Yu(n.stateNode,s,2),n=Ur(n,s,2),n!==null&&(Qe(n,2),$n(n))}function Ue(n,s,i){if(n.tag===3)dg(n,n,i);else for(;s!==null;){if(s.tag===3){dg(s,n,i);break}else if(s.tag===1){var o=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof o.componentDidCatch=="function"&&(qr===null||!qr.has(o))){n=mn(i,n),i=hm(2),o=Ur(s,i,2),o!==null&&(fm(i,o,s,n),Qe(o,2),$n(o));break}}s=s.return}}function vd(n,s,i){var o=n.pingCache;if(o===null){o=n.pingCache=new Qw;var d=new Set;o.set(s,d)}else d=o.get(s),d===void 0&&(d=new Set,o.set(s,d));d.has(i)||(ud=!0,d.add(i),n=t_.bind(null,n,s,i),s.then(n,n))}function t_(n,s,i){var o=n.pingCache;o!==null&&o.delete(s),n.pingedLanes|=n.suspendedLanes&i,n.warmLanes&=~i,Ie===n&&(Te&i)===i&&(We===4||We===3&&(Te&62914560)===Te&&300>ft()-pl?(De&2)===0&&ka(n,0):dd|=i,Ra===Te&&(Ra=0)),$n(n)}function hg(n,s){s===0&&(s=Ot()),n=_s(n,s),n!==null&&(Qe(n,s),$n(n))}function n_(n){var s=n.memoizedState,i=0;s!==null&&(i=s.retryLane),hg(n,i)}function r_(n,s){var i=0;switch(n.tag){case 31:case 13:var o=n.stateNode,d=n.memoizedState;d!==null&&(i=d.retryLane);break;case 19:o=n.stateNode;break;case 22:o=n.stateNode._retryCache;break;default:throw Error(a(314))}o!==null&&o.delete(s),hg(n,i)}function s_(n,s){return en(n,s)}var _l=null,Ca=null,bd=!1,Sl=!1,wd=!1,Vr=0;function $n(n){n!==Ca&&n.next===null&&(Ca===null?_l=Ca=n:Ca=Ca.next=n),Sl=!0,bd||(bd=!0,i_())}function Ui(n,s){if(!wd&&Sl){wd=!0;do for(var i=!1,o=_l;o!==null;){if(n!==0){var d=o.pendingLanes;if(d===0)var f=0;else{var v=o.suspendedLanes,S=o.pingedLanes;f=(1<<31-kt(42|n)+1)-1,f&=d&~(v&~S),f=f&201326741?f&201326741|1:f?f|2:0}f!==0&&(i=!0,gg(o,f))}else f=Te,f=pe(o,o===Ie?f:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),(f&3)===0||Ye(o,f)||(i=!0,gg(o,f));o=o.next}while(i);wd=!1}}function a_(){fg()}function fg(){Sl=bd=!1;var n=0;Vr!==0&&g_()&&(n=Vr);for(var s=ft(),i=null,o=_l;o!==null;){var d=o.next,f=pg(o,s);f===0?(o.next=null,i===null?_l=d:i.next=d,d===null&&(Ca=i)):(i=o,(n!==0||(f&3)!==0)&&(Sl=!0)),o=d}ct!==0&&ct!==5||Ui(n),Vr!==0&&(Vr=0)}function pg(n,s){for(var i=n.suspendedLanes,o=n.pingedLanes,d=n.expirationTimes,f=n.pendingLanes&-62914561;0<f;){var v=31-kt(f),S=1<<v,O=d[v];O===-1?((S&i)===0||(S&o)!==0)&&(d[v]=pt(S,s)):O<=s&&(n.expiredLanes|=S),f&=~S}if(s=Ie,i=Te,i=pe(n,n===s?i:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),o=n.callbackNode,i===0||n===s&&(Le===2||Le===9)||n.cancelPendingCommit!==null)return o!==null&&o!==null&&fs(o),n.callbackNode=null,n.callbackPriority=0;if((i&3)===0||Ye(n,i)){if(s=i&-i,s===n.callbackPriority)return s;switch(o!==null&&fs(o),Rn(i)){case 2:case 8:i=dn;break;case 32:i=Zn;break;case 268435456:i=Wn;break;default:i=Zn}return o=mg.bind(null,n),i=en(i,o),n.callbackPriority=s,n.callbackNode=i,s}return o!==null&&o!==null&&fs(o),n.callbackPriority=2,n.callbackNode=null,2}function mg(n,s){if(ct!==0&&ct!==5)return n.callbackNode=null,n.callbackPriority=0,null;var i=n.callbackNode;if(wl()&&n.callbackNode!==i)return null;var o=Te;return o=pe(n,n===Ie?o:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),o===0?null:(Qm(n,o,s),pg(n,ft()),n.callbackNode!=null&&n.callbackNode===i?mg.bind(null,n):null)}function gg(n,s){if(wl())return null;Qm(n,s,!0)}function i_(){v_(function(){(De&6)!==0?en(Xe,a_):fg()})}function _d(){if(Vr===0){var n=ma;n===0&&(n=Fs,Fs<<=1,(Fs&261888)===0&&(Fs=256)),Vr=n}return Vr}function yg(n){return n==null||typeof n=="symbol"||typeof n=="boolean"?null:typeof n=="function"?n:Co(""+n)}function vg(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 o_(n,s,i,o,d){if(s==="submit"&&i&&i.stateNode===d){var f=yg((d[It]||null).action),v=o.submitter;v&&(s=(s=v[It]||null)?yg(s.formAction):v.getAttribute("formAction"),s!==null&&(f=s,v=null));var S=new Do("action","action",null,o,d);n.push({event:S,listeners:[{instance:null,listener:function(){if(o.defaultPrevented){if(Vr!==0){var O=v?vg(d,v):new FormData(d);Iu(i,{pending:!0,data:O,method:d.method,action:f},null,O)}}else typeof f=="function"&&(S.preventDefault(),O=v?vg(d,v):new FormData(d),Iu(i,{pending:!0,data:O,method:d.method,action:f},f,O))},currentTarget:d}]})}}for(var Sd=0;Sd<su.length;Sd++){var xd=su[Sd],l_=xd.toLowerCase(),c_=xd[0].toUpperCase()+xd.slice(1);An(l_,"on"+c_)}An(Jf,"onAnimationEnd"),An(Qf,"onAnimationIteration"),An(Xf,"onAnimationStart"),An("dblclick","onDoubleClick"),An("focusin","onFocus"),An("focusout","onBlur"),An(Tw,"onTransitionRun"),An(Rw,"onTransitionStart"),An(Aw,"onTransitionCancel"),An(Zf,"onTransitionEnd"),ta("onMouseEnter",["mouseout","mouseover"]),ta("onMouseLeave",["mouseout","mouseover"]),ta("onPointerEnter",["pointerout","pointerover"]),ta("onPointerLeave",["pointerout","pointerover"]),ys("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ys("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),ys("onBeforeInput",["compositionend","keypress","textInput","paste"]),ys("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ys("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ys("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var zi="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(" "),u_=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(zi));function bg(n,s){s=(s&4)!==0;for(var i=0;i<n.length;i++){var o=n[i],d=o.event;o=o.listeners;e:{var f=void 0;if(s)for(var v=o.length-1;0<=v;v--){var S=o[v],O=S.instance,P=S.currentTarget;if(S=S.listener,O!==f&&d.isPropagationStopped())break e;f=S,d.currentTarget=P;try{f(d)}catch(q){zo(q)}d.currentTarget=null,f=O}else for(v=0;v<o.length;v++){if(S=o[v],O=S.instance,P=S.currentTarget,S=S.listener,O!==f&&d.isPropagationStopped())break e;f=S,d.currentTarget=P;try{f(d)}catch(q){zo(q)}d.currentTarget=null,f=O}}}}function Ee(n,s){var i=s[Uc];i===void 0&&(i=s[Uc]=new Set);var o=n+"__bubble";i.has(o)||(wg(s,n,2,!1),i.add(o))}function Ed(n,s,i){var o=0;s&&(o|=4),wg(i,n,o,s)}var xl="_reactListening"+Math.random().toString(36).slice(2);function Td(n){if(!n[xl]){n[xl]=!0,ff.forEach(function(i){i!=="selectionchange"&&(u_.has(i)||Ed(i,!1,n),Ed(i,!0,n))});var s=n.nodeType===9?n:n.ownerDocument;s===null||s[xl]||(s[xl]=!0,Ed("selectionchange",!1,s))}}function wg(n,s,i,o){switch(Jg(s)){case 2:var d=P_;break;case 8:d=B_;break;default:d=Hd}i=d.bind(null,s,i,n),d=void 0,!Vc||s!=="touchstart"&&s!=="touchmove"&&s!=="wheel"||(d=!0),o?d!==void 0?n.addEventListener(s,i,{capture:!0,passive:d}):n.addEventListener(s,i,!0):d!==void 0?n.addEventListener(s,i,{passive:d}):n.addEventListener(s,i,!1)}function Rd(n,s,i,o,d){var f=o;if((s&1)===0&&(s&2)===0&&o!==null)e:for(;;){if(o===null)return;var v=o.tag;if(v===3||v===4){var S=o.stateNode.containerInfo;if(S===d)break;if(v===4)for(v=o.return;v!==null;){var O=v.tag;if((O===3||O===4)&&v.stateNode.containerInfo===d)return;v=v.return}for(;S!==null;){if(v=Zs(S),v===null)return;if(O=v.tag,O===5||O===6||O===26||O===27){o=f=v;continue e}S=S.parentNode}}o=o.return}Tf(function(){var P=f,q=$c(i),V=[];e:{var B=Wf.get(n);if(B!==void 0){var H=Do,re=n;switch(n){case"keypress":if(No(i)===0)break e;case"keydown":case"keyup":H=rw;break;case"focusin":re="focus",H=Jc;break;case"focusout":re="blur",H=Jc;break;case"beforeblur":case"afterblur":H=Jc;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":H=kf;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":H=Vb;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":H=iw;break;case Jf:case Qf:case Xf:H=Fb;break;case Zf:H=lw;break;case"scroll":case"scrollend":H=$b;break;case"wheel":H=uw;break;case"copy":case"cut":case"paste":H=Qb;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":H=Cf;break;case"toggle":case"beforetoggle":H=hw}var de=(s&4)!==0,He=!de&&(n==="scroll"||n==="scrollend"),D=de?B!==null?B+"Capture":null:B;de=[];for(var j=P,U;j!==null;){var K=j;if(U=K.stateNode,K=K.tag,K!==5&&K!==26&&K!==27||U===null||D===null||(K=ai(j,D),K!=null&&de.push(Pi(j,K,U))),He)break;j=j.return}0<de.length&&(B=new H(B,re,null,i,q),V.push({event:B,listeners:de}))}}if((s&7)===0){e:{if(B=n==="mouseover"||n==="pointerover",H=n==="mouseout"||n==="pointerout",B&&i!==qc&&(re=i.relatedTarget||i.fromElement)&&(Zs(re)||re[Xs]))break e;if((H||B)&&(B=q.window===q?q:(B=q.ownerDocument)?B.defaultView||B.parentWindow:window,H?(re=i.relatedTarget||i.toElement,H=P,re=re?Zs(re):null,re!==null&&(He=c(re),de=re.tag,re!==He||de!==5&&de!==27&&de!==6)&&(re=null)):(H=null,re=P),H!==re)){if(de=kf,K="onMouseLeave",D="onMouseEnter",j="mouse",(n==="pointerout"||n==="pointerover")&&(de=Cf,K="onPointerLeave",D="onPointerEnter",j="pointer"),He=H==null?B:si(H),U=re==null?B:si(re),B=new de(K,j+"leave",H,i,q),B.target=He,B.relatedTarget=U,K=null,Zs(q)===P&&(de=new de(D,j+"enter",re,i,q),de.target=U,de.relatedTarget=He,K=de),He=K,H&&re)t:{for(de=d_,D=H,j=re,U=0,K=D;K;K=de(K))U++;K=0;for(var ce=j;ce;ce=de(ce))K++;for(;0<U-K;)D=de(D),U--;for(;0<K-U;)j=de(j),K--;for(;U--;){if(D===j||j!==null&&D===j.alternate){de=D;break t}D=de(D),j=de(j)}de=null}else de=null;H!==null&&_g(V,B,H,de,!1),re!==null&&He!==null&&_g(V,He,re,de,!0)}}e:{if(B=P?si(P):window,H=B.nodeName&&B.nodeName.toLowerCase(),H==="select"||H==="input"&&B.type==="file")var Oe=Pf;else if(Uf(B))if(Bf)Oe=Sw;else{Oe=ww;var oe=bw}else H=B.nodeName,!H||H.toLowerCase()!=="input"||B.type!=="checkbox"&&B.type!=="radio"?P&&Ic(P.elementType)&&(Oe=Pf):Oe=_w;if(Oe&&(Oe=Oe(n,P))){zf(V,Oe,i,q);break e}oe&&oe(n,B,P),n==="focusout"&&P&&B.type==="number"&&P.memoizedProps.value!=null&&Hc(B,"number",B.value)}switch(oe=P?si(P):window,n){case"focusin":(Uf(oe)||oe.contentEditable==="true")&&(oa=oe,tu=P,fi=null);break;case"focusout":fi=tu=oa=null;break;case"mousedown":nu=!0;break;case"contextmenu":case"mouseup":case"dragend":nu=!1,Yf(V,i,q);break;case"selectionchange":if(Ew)break;case"keydown":case"keyup":Yf(V,i,q)}var be;if(Xc)e:{switch(n){case"compositionstart":var Re="onCompositionStart";break e;case"compositionend":Re="onCompositionEnd";break e;case"compositionupdate":Re="onCompositionUpdate";break e}Re=void 0}else ia?Df(n,i)&&(Re="onCompositionEnd"):n==="keydown"&&i.keyCode===229&&(Re="onCompositionStart");Re&&(jf&&i.locale!=="ko"&&(ia||Re!=="onCompositionStart"?Re==="onCompositionEnd"&&ia&&(be=Rf()):(Or=q,Gc="value"in Or?Or.value:Or.textContent,ia=!0)),oe=El(P,Re),0<oe.length&&(Re=new Of(Re,n,null,i,q),V.push({event:Re,listeners:oe}),be?Re.data=be:(be=Lf(i),be!==null&&(Re.data=be)))),(be=pw?mw(n,i):gw(n,i))&&(Re=El(P,"onBeforeInput"),0<Re.length&&(oe=new Of("onBeforeInput","beforeinput",null,i,q),V.push({event:oe,listeners:Re}),oe.data=be)),o_(V,n,P,i,q)}bg(V,s)})}function Pi(n,s,i){return{instance:n,listener:s,currentTarget:i}}function El(n,s){for(var i=s+"Capture",o=[];n!==null;){var d=n,f=d.stateNode;if(d=d.tag,d!==5&&d!==26&&d!==27||f===null||(d=ai(n,i),d!=null&&o.unshift(Pi(n,d,f)),d=ai(n,s),d!=null&&o.push(Pi(n,d,f))),n.tag===3)return o;n=n.return}return[]}function d_(n){if(n===null)return null;do n=n.return;while(n&&n.tag!==5&&n.tag!==27);return n||null}function _g(n,s,i,o,d){for(var f=s._reactName,v=[];i!==null&&i!==o;){var S=i,O=S.alternate,P=S.stateNode;if(S=S.tag,O!==null&&O===o)break;S!==5&&S!==26&&S!==27||P===null||(O=P,d?(P=ai(i,f),P!=null&&v.unshift(Pi(i,P,O))):d||(P=ai(i,f),P!=null&&v.push(Pi(i,P,O)))),i=i.return}v.length!==0&&n.push({event:s,listeners:v})}var h_=/\r\n?/g,f_=/\u0000|\uFFFD/g;function Sg(n){return(typeof n=="string"?n:""+n).replace(h_,`
10`).replace(f_,"")}function xg(n,s){return s=Sg(s),Sg(n)===s}function Be(n,s,i,o,d,f){switch(i){case"children":typeof o=="string"?s==="body"||s==="textarea"&&o===""||ra(n,o):(typeof o=="number"||typeof o=="bigint")&&s!=="body"&&ra(n,""+o);break;case"className":ko(n,"class",o);break;case"tabIndex":ko(n,"tabindex",o);break;case"dir":case"role":case"viewBox":case"width":case"height":ko(n,i,o);break;case"style":xf(n,o,f);break;case"data":if(s!=="object"){ko(n,"data",o);break}case"src":case"href":if(o===""&&(s!=="a"||i!=="href")){n.removeAttribute(i);break}if(o==null||typeof o=="function"||typeof o=="symbol"||typeof o=="boolean"){n.removeAttribute(i);break}o=Co(""+o),n.setAttribute(i,o);break;case"action":case"formAction":if(typeof o=="function"){n.setAttribute(i,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof f=="function"&&(i==="formAction"?(s!=="input"&&Be(n,s,"name",d.name,d,null),Be(n,s,"formEncType",d.formEncType,d,null),Be(n,s,"formMethod",d.formMethod,d,null),Be(n,s,"formTarget",d.formTarget,d,null)):(Be(n,s,"encType",d.encType,d,null),Be(n,s,"method",d.method,d,null),Be(n,s,"target",d.target,d,null)));if(o==null||typeof o=="symbol"||typeof o=="boolean"){n.removeAttribute(i);break}o=Co(""+o),n.setAttribute(i,o);break;case"onClick":o!=null&&(n.onclick=tr);break;case"onScroll":o!=null&&Ee("scroll",n);break;case"onScrollEnd":o!=null&&Ee("scrollend",n);break;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(a(61));if(i=o.__html,i!=null){if(d.children!=null)throw Error(a(60));n.innerHTML=i}}break;case"multiple":n.multiple=o&&typeof o!="function"&&typeof o!="symbol";break;case"muted":n.muted=o&&typeof o!="function"&&typeof o!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(o==null||typeof o=="function"||typeof o=="boolean"||typeof o=="symbol"){n.removeAttribute("xlink:href");break}i=Co(""+o),n.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",i);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":o!=null&&typeof o!="function"&&typeof o!="symbol"?n.setAttribute(i,""+o):n.removeAttribute(i);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInl
10ine":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":o&&typeof o!="function"&&typeof o!="symbol"?n.setAttribute(i,""):n.removeAttribute(i);break;case"capture":case"download":o===!0?n.setAttribute(i,""):o!==!1&&o!=null&&typeof o!="function"&&typeof o!="symbol"?n.setAttribute(i,o):n.removeAttribute(i);break;case"cols":case"rows":case"size":case"span":o!=null&&typeof o!="function"&&typeof o!="symbol"&&!isNaN(o)&&1<=o?n.setAttribute(i,o):n.removeAttribute(i);break;case"rowSpan":case"start":o==null||typeof o=="function"||typeof o=="symbol"||isNaN(o)?n.removeAttribute(i):n.setAttribute(i,o);break;case"popover":Ee("beforetoggle",n),Ee("toggle",n),Ao(n,"popover",o);break;case"xlinkActuate":er(n,"http://www.w3.org/1999/xlink","xlink:actuate",o);break;case"xlinkArcrole":er(n,"http://www.w3.org/1999/xlink","xlink:arcrole",o);break;case"xlinkRole":er(n,"http://www.w3.org/1999/xlink","xlink:role",o);break;case"xlinkShow":er(n,"http://www.w3.org/1999/xlink","xlink:show",o);break;case"xlinkTitle":er(n,"http://www.w3.org/1999/xlink","xlink:title",o);break;case"xlinkType":er(n,"http://www.w3.org/1999/xlink","xlink:type",o);break;case"xmlBase":er(n,"http://www.w3.org/XML/1998/namespace","xml:base",o);break;case"xmlLang":er(n,"http://www.w3.org/XML/1998/namespace","xml:lang",o);break;case"xmlSpace":er(n,"http://www.w3.org/XML/1998/namespace","xml:space",o);break;case"is":Ao(n,"is",o);break;case"innerText":case"textContent":break;default:(!(2<i.length)||i[0]!=="o"&&i[0]!=="O"||i[1]!=="n"&&i[1]!=="N")&&(i=Ib.get(i)||i,Ao(n,i,o))}}function Ad(n,s,i,o,d,f){switch(i){case"style":xf(n,o,f);break;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(a(61));if(i=o.__html,i!=null){if(d.children!=null)throw Error(a(60));n.innerHTML=i}}break;case"children":typeof o=="string"?ra(n,o):(typeof o=="number"||typeof o=="bigint")&&ra(n,""+o);break;case"onScroll":o!=null&&Ee("scroll",n);break;case"onScrollEnd":o!=null&&Ee("scrollend",n);break;case"onClick":o!=null&&(n.onclick=tr);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!pf.hasOwnProperty(i))e:{if(i[0]==="o"&&i[1]==="n"&&(d=i.endsWith("Capture"),s=i.slice(2,d?i.length-7:void 0),f=n[It]||null,f=f!=null?f[i]:null,typeof f=="function"&&n.removeEventListener(s,f,d),typeof o=="function")){typeof f!="function"&&f!==null&&(i in n?n[i]=null:n.hasAttribute(i)&&n.removeAttribute(i)),n.addEventListener(s,o,d);break e}i in n?n[i]=o:o===!0?n.setAttribute(i,""):Ao(n,i,o)}}}function Et(n,s,i){switch(s){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ee("error",n),Ee("load",n);var o=!1,d=!1,f;for(f in i)if(i.hasOwnProperty(f)){var v=i[f];if(v!=null)switch(f){case"src":o=!0;break;case"srcSet":d=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(a(137,s));default:Be(n,s,f,v,i,null)}}d&&Be(n,s,"srcSet",i.srcSet,i,null),o&&Be(n,s,"src",i.src,i,null);return;case"input":Ee("invalid",n);var S=f=v=d=null,O=null,P=null;for(o in i)if(i.hasOwnProperty(o)){var q=i[o];if(q!=null)switch(o){case"name":d=q;break;case"type":v=q;break;case"checked":O=q;break;case"defaultChecked":P=q;break;case"value":f=q;break;case"defaultValue":S=q;break;case"children":case"dangerouslySetInnerHTML":if(q!=null)throw Error(a(137,s));break;default:Be(n,s,o,q,i,null)}}bf(n,f,S,O,P,v,d,!1);return;case"select":Ee("invalid",n),o=v=f=null;for(d in i)if(i.hasOwnProperty(d)&&(S=i[d],S!=null))switch(d){case"value":f=S;break;case"defaultValue":v=S;break;case"multiple":o=S;default:Be(n,s,d,S,i,null)}s=f,i=v,n.multiple=!!o,s!=null?na(n,!!o,s,!1):i!=null&&na(n,!!o,i,!0);return;case"textarea":Ee("invalid",n),f=d=o=null;for(v in i)if(i.hasOwnProperty(v)&&(S=i[v],S!=null))switch(v){case"value":o=S;break;case"defaultValue":d=S;break;case"children":f=S;break;case"dangerouslySetInnerHTML":if(S!=null)throw Error(a(91));break;default:Be(n,s,v,S,i,null)}_f(n,o,d,f);return;case"option":for(O in i)i.hasOwnProperty(O)&&(o=i[O],o!=null)&&(O==="selected"?n.selected=o&&typeof o!="function"&&typeof o!="symbol":Be(n,s,O,o,i,null));return;case"dialog":Ee("beforetoggle",n),Ee("toggle",n),Ee("cancel",n),Ee("close",n);break;case"iframe":case"object":Ee("load",n);break;case"video":case"audio":for(o=0;o<zi.length;o++)Ee(zi[o],n);break;case"image":Ee("error",n),Ee("load",n);break;case"details":Ee("toggle",n);break;case"embed":case"source":case"link":Ee("error",n),Ee("load",n);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(P in i)if(i.hasOwnProperty(P)&&(o=i[P],o!=null))switch(P){case"children":case"dangerouslySetInnerHTML":throw Error(a(137,s));default:Be(n,s,P,o,i,null)}return;default:if(Ic(s)){for(q in i)i.hasOwnProperty(q)&&(o=i[q],o!==void 0&&Ad(n,s,q,o,i,void 0));return}}for(S in i)i.hasOwnProperty(S)&&(o=i[S],o!=null&&Be(n,s,S,o,i,null))}function p_(n,s,i,o){switch(s){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var d=null,f=null,v=null,S=null,O=null,P=null,q=null;for(H in i){var V=i[H];if(i.hasOwnProperty(H)&&V!=null)switch(H){case"checked":break;case"value":break;case"defaultValue":O=V;default:o.hasOwnProperty(H)||Be(n,s,H,null,o,V)}}for(var B in o){var H=o[B];if(V=i[B],o.hasOwnProperty(B)&&(H!=null||V!=null))switch(B){case"type":f=H;break;case"name":d=H;break;case"checked":P=H;break;case"defaultChecked":q=H;break;case"value":v=H;break;case"defaultValue":S=H;break;case"children":case"dangerouslySetInnerHTML":if(H!=null)throw Error(a(137,s));break;default:H!==V&&Be(n,s,B,H,o,V)}}Bc(n,v,S,O,P,q,f,d);return;case"select":H=v=S=B=null;for(f in i)if(O=i[f],i.hasOwnProperty(f)&&O!=null)switch(f){case"value":break;case"multiple":H=O;default:o.hasOwnProperty(f)||Be(n,s,f,null,o,O)}for(d in o)if(f=o[d],O=i[d],o.hasOwnProperty(d)&&(f!=null||O!=null))switch(d){case"value":B=f;break;case"defaultValue":S=f;break;case"multiple":v=f;default:f!==O&&Be(n,s,d,f,o,O)}s=S,i=v,o=H,B!=null?na(n,!!i,B,!1):!!o!=!!i&&(s!=null?na(n,!!i,s,!0):na(n,!!i,i?[]:"",!1));return;case"textarea":H=B=null;for(S in i)if(d=i[S],i.hasOwnProperty(S)&&d!=null&&!o.hasOwnProperty(S))switch(S){case"value":break;case"children":break;default:Be(n,s,S,null,o,d)}for(v in o)if(d=o[v],f=i[v],o.hasOwnProperty(v)&&(d!=null||f!=null))switch(v){case"value":B=d;break;case"defaultValue":H=d;break;case"children":break;case"dangerouslySetInnerHTML":if(d!=null)throw Error(a(91));break;default:d!==f&&Be(n,s,v,d,o,f)}wf(n,B,H);return;case"option":for(var re in i)B=i[re],i.hasOwnProperty(re)&&B!=null&&!o.hasOwnProperty(re)&&(re==="selected"?n.selected=!1:Be(n,s,re,null,o,B));for(O in o)B=o[O],H=i[O],o.hasOwnProperty(O)&&B!==H&&(B!=null||H!=null)&&(O==="selected"?n.selected=B&&typeof B!="function"&&typeof B!="symbol":Be(n,s,O,B,o,H));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 de in i)B=i[de],i.hasOwnProperty(de)&&B!=null&&!o.hasOwnProperty(de)&&Be(n,s,de,null,o,B);for(P in o)if(B=o[P],H=i[P],o.hasOwnProperty(P)&&B!==H&&(B!=null||H!=null))switch(P){case"children":case"dangerouslySetInnerHTML":if(B!=null)throw Error(a(137,s));break;default:Be(n,s,P,B,o,H)}return;default:if(Ic(s)){for(var He in i)B=i[He],i.hasOwnProperty(He)&&B!==void 0&&!o.hasOwnProperty(He)&&Ad(n,s,He,void 0,o,B);for(q in o)B=o[q],H=i[q],!o.hasOwnProperty(q)||B===H||B===void 0&&H===void 0||Ad(n,s,q,B,o,H);return}}for(var D in i)B=i[D],i.hasOwnProperty(D)&&B!=null&&!o.hasOwnProperty(D)&&Be(n,s,D,null,o,B);for(V in o)B=o[V],H=i[V],!o.hasOwnProperty(V)||B===H||B==null&&H==null||Be(n,s,V,B,o,H)}function Eg(n){switch(n){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function m_(){if(typeof performance.getEntriesByType=="function"){for(var n=0,s=0,i=performance.getEntriesByType("resource"),o=0;o<i.length;o++){var d=i[o],f=d.transferSize,v=d.initiatorType,S=d.duration;if(f&&S&&Eg(v)){for(v=0,S=d.responseEnd,o+=1;o<i.length;o++){var O=i[o],P=O.startTime;if(P>S)break;var q=O.transferSize,V=O.initiatorType;q&&Eg(V)&&(O=O.responseEnd,v+=q*(O<S?1:(S-P)/(O-P)))}if(--o,s+=8*(f+v)/(d.duration/1e3),n++,10<n)break}}if(0<n)return s/n/1e6}return navigator.connection&&(n=navigator.connection.downlink,typeof n=="number")?
vendor: 9,435 bytes, line 10
10n:5}var kd=null,Od=null;function Tl(n){return n.nodeType===9?n:n.ownerDocument}function Tg(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 Rg(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 Cd(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 jd=null;function g_(){var n=window.event;return n&&n.type==="popstate"?n===jd?!1:(jd=n,!0):(jd=null,!1)}var Ag=typeof setTimeout=="function"?setTimeout:void 0,y_=typeof clearTimeout=="function"?clearTimeout:void 0,kg=typeof Promise=="function"?Promise:void 0,v_=typeof queueMicrotask=="function"?queueMicrotask:typeof kg<"u"?function(n){return kg.resolve(null).then(n).catch(b_)}:Ag;function b_(n){setTimeout(function(){throw n})}function Gr(n){return n==="head"}function Og(n,s){var i=s,o=0;do{var d=i.nextSibling;if(n.removeChild(i),d&&d.nodeType===8)if(i=d.data,i==="/$"||i==="/&"){if(o===0){n.removeChild(d),Da(s);return}o--}else if(i==="$"||i==="$?"||i==="$~"||i==="$!"||i==="&")o++;else if(i==="html")Bi(n.ownerDocument.documentElement);else if(i==="head"){i=n.ownerDocument.head,Bi(i);for(var f=i.firstChild;f;){var v=f.nextSibling,S=f.nodeName;f[ri]||S==="SCRIPT"||S==="STYLE"||S==="LINK"&&f.rel.toLowerCase()==="stylesheet"||i.removeChild(f),f=v}}else i==="body"&&Bi(n.ownerDocument.body);i=d}while(i);Da(s)}function Cg(n,s){var i=n;n=0;do{var o=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||""),o&&o.nodeType===8)if(i=o.data,i==="/$"){if(n===0)break;n--}else i!=="$"&&i!=="$?"&&i!=="$~"&&i!=="$!"||n++;i=o}while(i)}function Nd(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":Nd(i),zc(i);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(i.rel.toLowerCase()==="stylesheet")continue}n.removeChild(i)}}function w_(n,s,i,o){for(;n.nodeType===1;){var d=i;if(n.nodeName.toLowerCase()!==s.toLowerCase()){if(!o&&(n.nodeName!=="INPUT"||n.type!=="hidden"))break}else if(o){if(!n[ri])switch(s){case"meta":if(!n.hasAttribute("itemprop"))break;return n;case"link":if(f=n.getAttribute("rel"),f==="stylesheet"&&n.hasAttribute("data-precedence"))break;if(f!==d.rel||n.getAttribute("href")!==(d.href==null||d.href===""?null:d.href)||n.getAttribute("crossorigin")!==(d.crossOrigin==null?null:d.crossOrigin)||n.getAttribute("title")!==(d.title==null?null:d.title))break;return n;case"style":if(n.hasAttribute("data-precedence"))break;return n;case"script":if(f=n.getAttribute("src"),(f!==(d.src==null?null:d.src)||n.getAttribute("type")!==(d.type==null?null:d.type)||n.getAttribute("crossorigin")!==(d.crossOrigin==null?null:d.crossOrigin))&&f&&n.hasAttribute("async")&&!n.hasAttribute("itemprop"))break;return n;default:return n}}else if(s==="input"&&n.type==="hidden"){var f=d.name==null?null:""+d.name;if(d.type==="hidden"&&n.getAttribute("name")===f)return n}else return n;if(n=wn(n.nextSibling),n===null)break}return null}function __(n,s,i){if(s==="")return null;for(;n.nodeType!==3;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!i||(n=wn(n.nextSibling),n===null))return null;return n}function jg(n,s){for(;n.nodeType!==8;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!s||(n=wn(n.nextSibling),n===null))return null;return n}function Md(n){return n.data==="$?"||n.data==="$~"}function Dd(n){return n.data==="$!"||n.data==="$?"&&n.ownerDocument.readyState!=="loading"}function S_(n,s){var i=n.ownerDocument;if(n.data==="$~")n._reactRetry=s;else if(n.data!=="$?"||i.readyState!=="loading")s();else{var o=function(){s(),i.removeEventListener("DOMContentLoaded",o)};i.addEventListener("DOMContentLoaded",o),n._reactRetry=o}}function wn(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 Ld=null;function Ng(n){n=n.nextSibling;for(var s=0;n;){if(n.nodeType===8){var i=n.data;if(i==="/$"||i==="/&"){if(s===0)return wn(n.nextSibling);s--}else i!=="$"&&i!=="$!"&&i!=="$?"&&i!=="$~"&&i!=="&"||s++}n=n.nextSibling}return null}function Mg(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 Dg(n,s,i){switch(s=Tl(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 Bi(n){for(var s=n.attributes;s.length;)n.removeAttributeNode(s[0]);zc(n)}var _n=new Map,Lg=new Set;function Rl(n){return typeof n.getRootNode=="function"?n.getRootNode():n.nodeType===9?n:n.ownerDocument}var yr=J.d;J.d={f:x_,r:E_,D:T_,C:R_,L:A_,m:k_,X:C_,S:O_,M:j_};function x_(){var n=yr.f(),s=yl();return n||s}function E_(n){var s=Ws(n);s!==null&&s.tag===5&&s.type==="form"?Zp(s):yr.r(n)}var ja=typeof document>"u"?null:document;function Ug(n,s,i){var o=ja;if(o&&typeof s=="string"&&s){var d=fn(s);d='link[rel="'+n+'"][href="'+d+'"]',typeof i=="string"&&(d+='[crossorigin="'+i+'"]'),Lg.has(d)||(Lg.add(d),n={rel:n,crossOrigin:i,href:s},o.querySelector(d)===null&&(s=o.createElement("link"),Et(s,"link",n),mt(s),o.head.appendChild(s)))}}function T_(n){yr.D(n),Ug("dns-prefetch",n,null)}function R_(n,s){yr.C(n,s),Ug("preconnect",n,s)}function A_(n,s,i){yr.L(n,s,i);var o=ja;if(o&&n&&s){var d='link[rel="preload"][as="'+fn(s)+'"]';s==="image"&&i&&i.imageSrcSet?(d+='[imagesrcset="'+fn(i.imageSrcSet)+'"]',typeof i.imageSizes=="string"&&(d+='[imagesizes="'+fn(i.imageSizes)+'"]')):d+='[href="'+fn(n)+'"]';var f=d;switch(s){case"style":f=Na(n);break;case"script":f=Ma(n)}_n.has(f)||(n=g({rel:"preload",href:s==="image"&&i&&i.imageSrcSet?void 0:n,as:s},i),_n.set(f,n),o.querySelector(d)!==null||s==="style"&&o.querySelector(Hi(f))||s==="script"&&o.querySelector(Ii(f))||(s=o.createElement("link"),Et(s,"link",n),mt(s),o.head.appendChild(s)))}}function k_(n,s){yr.m(n,s);var i=ja;if(i&&n){var o=s&&typeof s.as=="string"?s.as:"script",d='link[rel="modulepreload"][as="'+fn(o)+'"][href="'+fn(n)+'"]',f=d;switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":f=Ma(n)}if(!_n.has(f)&&(n=g({rel:"modulepreload",href:n},s),_n.set(f,n),i.querySelector(d)===null)){switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(i.querySelector(Ii(f)))return}o=i.createElement("link"),Et(o,"link",n),mt(o),i.head.appendChild(o)}}}function O_(n,s,i){yr.S(n,s,i);var o=ja;if(o&&n){var d=ea(o).hoistableStyles,f=Na(n);s=s||"default";var v=d.get(f);if(!v){var S={loading:0,preload:null};if(v=o.querySelector(Hi(f)))S.loading=5;else{n=g({rel:"stylesheet",href:n,"data-precedence":s},i),(i=_n.get(f))&&Ud(n,i);var O=v=o.createElement("link");mt(O),Et(O,"link",n),O._p=new Promise(function(P,q){O.onload=P,O.onerror=q}),O.addEventListener("load",function(){S.loading|=1}),O.addEventListener("error",function(){S.loading|=2}),S.loading|=4,Al(v,s,o)}v={type:"stylesheet",instance:v,count:1,state:S},d.set(f,v)}}}function C_(n,s){yr.X(n,s);var i=ja;if(i&&n){var o=ea(i).hoistableScripts,d=Ma(n),f=o.get(d);f||(f=i.querySelector(Ii(d)),f||(n=g({src:n,async:!0},s),(s=_n.get(d))&&zd(n,s),f=i.createElement("script"),mt(f),Et(f,"link",n),i.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},o.set(d,f))}}function j_(n,s){yr.M(n,s);var i=ja;if(i&&n){var o=ea(i).hoistableScripts,d=Ma(n),f=o.get(d);f||(f=i.querySelector(Ii(d)),f||(n=g({src:n,async:!0,type:"module"},s),(s=_n.get(d))&&zd(n,s),f=i.createElement("script"),mt(f),Et(f,"link",n),i.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},o.set(d,f))}}function zg(n,s,i,o){var d=(d=ue.current)?Rl(d):null;if(!d)throw Error(a(446));switch(n){case"meta":case"title":return null;case"style":return typeof i.precedence=="string"&&typeof i.href=="string"?(s=Na(i.href),i=ea(d).hoistableStyles,o=i.get(s),o||(o={type:"style",instance:null,count:0,state:null},i.set(s,o)),o):{type:"void",instance:null,count:0,state:null};case"link":if(i.rel==="stylesheet"&&typeof i.href=="string"&&typeof i.precedence=="string"){n=Na(i.href);var f=ea(d).hoistableStyles,v=f.get(n);if(v||(d=d.ownerDocument||d,v={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},f.set(n,v),(f=d.querySelector(Hi(n)))&&!f._p&&(v.instance=f,v.state.loading=5),_n.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},_n.set(n,i),f||N_(d,n,i,v.state))),s&&o===null)throw Error(a(528,""));return v}if(s&&o!==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"?
vendor: 5,251 bytes, line 10
10(s=Ma(i),i=ea(d).hoistableScripts,o=i.get(s),o||(o={type:"script",instance:null,count:0,state:null},i.set(s,o)),o):{type:"void",instance:null,count:0,state:null};default:throw Error(a(444,n))}}function Na(n){return'href="'+fn(n)+'"'}function Hi(n){return'link[rel="stylesheet"]['+n+"]"}function Pg(n){return g({},n,{"data-precedence":n.precedence,precedence:null})}function N_(n,s,i,o){n.querySelector('link[rel="preload"][as="style"]['+s+"]")?o.loading=1:(s=n.createElement("link"),o.preload=s,s.addEventListener("load",function(){return o.loading|=1}),s.addEventListener("error",function(){return o.loading|=2}),Et(s,"link",i),mt(s),n.head.appendChild(s))}function Ma(n){return'[src="'+fn(n)+'"]'}function Ii(n){return"script[async]"+n}function Bg(n,s,i){if(s.count++,s.instance===null)switch(s.type){case"style":var o=n.querySelector('style[data-href~="'+fn(i.href)+'"]');if(o)return s.instance=o,mt(o),o;var d=g({},i,{"data-href":i.href,"data-precedence":i.precedence,href:null,precedence:null});return o=(n.ownerDocument||n).createElement("style"),mt(o),Et(o,"style",d),Al(o,i.precedence,n),s.instance=o;case"stylesheet":d=Na(i.href);var f=n.querySelector(Hi(d));if(f)return s.state.loading|=4,s.instance=f,mt(f),f;o=Pg(i),(d=_n.get(d))&&Ud(o,d),f=(n.ownerDocument||n).createElement("link"),mt(f);var v=f;return v._p=new Promise(function(S,O){v.onload=S,v.onerror=O}),Et(f,"link",o),s.state.loading|=4,Al(f,i.precedence,n),s.instance=f;case"script":return f=Ma(i.src),(d=n.querySelector(Ii(f)))?(s.instance=d,mt(d),d):(o=i,(d=_n.get(f))&&(o=g({},i),zd(o,d)),n=n.ownerDocument||n,d=n.createElement("script"),mt(d),Et(d,"link",o),n.head.appendChild(d),s.instance=d);case"void":return null;default:throw Error(a(443,s.type))}else s.type==="stylesheet"&&(s.state.loading&4)===0&&(o=s.instance,s.state.loading|=4,Al(o,i.precedence,n));return s.instance}function Al(n,s,i){for(var o=i.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),d=o.length?o[o.length-1]:null,f=d,v=0;v<o.length;v++){var S=o[v];if(S.dataset.precedence===s)f=S;else if(f!==d)break}f?f.parentNode.insertBefore(n,f.nextSibling):(s=i.nodeType===9?i.head:i,s.insertBefore(n,s.firstChild))}function Ud(n,s){n.crossOrigin==null&&(n.crossOrigin=s.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=s.referrerPolicy),n.title==null&&(n.title=s.title)}function zd(n,s){n.crossOrigin==null&&(n.crossOrigin=s.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=s.referrerPolicy),n.integrity==null&&(n.integrity=s.integrity)}var kl=null;function Hg(n,s,i){if(kl===null){var o=new Map,d=kl=new Map;d.set(i,o)}else d=kl,o=d.get(i),o||(o=new Map,d.set(i,o));if(o.has(n))return o;for(o.set(n,null),i=i.getElementsByTagName(n),d=0;d<i.length;d++){var f=i[d];if(!(f[ri]||f[wt]||n==="link"&&f.getAttribute("rel")==="stylesheet")&&f.namespaceURI!=="http://www.w3.org/2000/svg"){var v=f.getAttribute(s)||"";v=n+v;var S=o.get(v);S?S.push(f):o.set(v,[f])}}return o}function Ig(n,s,i){n=n.ownerDocument||n,n.head.insertBefore(i,s==="title"?n.querySelector("head > title"):null)}function M_(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 qg(n){return!(n.type==="stylesheet"&&(n.state.loading&3)===0)}function D_(n,s,i,o){if(i.type==="stylesheet"&&(typeof o.media!="string"||matchMedia(o.media).matches!==!1)&&(i.state.loading&4)===0){if(i.instance===null){var d=Na(o.href),f=s.querySelector(Hi(d));if(f){s=f._p,s!==null&&typeof s=="object"&&typeof s.then=="function"&&(n.count++,n=Ol.bind(n),s.then(n,n)),i.state.loading|=4,i.instance=f,mt(f);return}f=s.ownerDocument||s,o=Pg(o),(d=_n.get(d))&&Ud(o,d),f=f.createElement("link"),mt(f);var v=f;v._p=new Promise(function(S,O){v.onload=S,v.onerror=O}),Et(f,"link",o),i.instance=f}n.stylesheets===null&&(n.stylesheets=new Map),n.stylesheets.set(i,s),(s=i.state.preload)&&(i.state.loading&3)===0&&(n.count++,i=Ol.bind(n),s.addEventListener("load",i),s.addEventListener("error",i))}}var Pd=0;function L_(n,s){return n.stylesheets&&n.count===0&&jl(n,n.stylesheets),0<n.count||0<n.imgCount?function(i){var o=setTimeout(function(){if(n.stylesheets&&jl(n,n.stylesheets),n.unsuspend){var f=n.unsuspend;n.unsuspend=null,f()}},6e4+s);0<n.imgBytes&&Pd===0&&(Pd=62500*m_());var d=setTimeout(function(){if(n.waitingForImages=!1,n.count===0&&(n.stylesheets&&jl(n,n.stylesheets),n.unsuspend)){var f=n.unsuspend;n.unsuspend=null,f()}},(n.imgBytes>Pd?50:800)+s);return n.unsuspend=i,function(){n.unsuspend=null,clearTimeout(o),clearTimeout(d)}}:null}function Ol(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)jl(this,this.stylesheets);else if(this.unsuspend){var n=this.unsuspend;this.unsuspend=null,n()}}}var Cl=null;function jl(n,s){n.stylesheets=null,n.unsuspend!==null&&(n.count++,Cl=new Map,s.forEac
vendor: 9,940 bytes, line 10
10h(U_,n),Cl=null,Ol.call(n))}function U_(n,s){if(!(s.state.loading&4)){var i=Cl.get(n);if(i)var o=i.get(null);else{i=new Map,Cl.set(n,i);for(var d=n.querySelectorAll("link[data-precedence],style[data-precedence]"),f=0;f<d.length;f++){var v=d[f];(v.nodeName==="LINK"||v.getAttribute("media")!=="not all")&&(i.set(v.dataset.precedence,v),o=v)}o&&i.set(null,o)}d=s.instance,v=d.getAttribute("data-precedence"),f=i.get(v)||o,f===o&&i.set(null,d),i.set(v,d),this.count++,o=Ol.bind(this),d.addEventListener("load",o),d.addEventListener("error",o),f?f.parentNode.insertBefore(d,f.nextSibling):(n=n.nodeType===9?n.head:n,n.insertBefore(d,n.firstChild)),s.state.loading|=4}}var qi={$$typeof:N,Provider:null,Consumer:null,_currentValue:ae,_currentValue2:ae,_threadCount:0};function z_(n,s,i,o,d,f,v,S,O){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=Ar(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ar(0),this.hiddenUpdates=Ar(null),this.identifierPrefix=o,this.onUncaughtError=d,this.onCaughtError=f,this.onRecoverableError=v,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=O,this.incompleteTransitions=new Map}function $g(n,s,i,o,d,f,v,S,O,P,q,V){return n=new z_(n,s,i,v,O,P,q,V,S),s=1,f===!0&&(s|=24),f=nn(3,null,null,s),n.current=f,f.stateNode=n,s=yu(),s.refCount++,n.pooledCache=s,s.refCount++,f.memoizedState={element:o,isDehydrated:i,cache:s},_u(f),n}function Kg(n){return n?(n=ua,n):ua}function Vg(n,s,i,o,d,f){d=Kg(d),o.context===null?o.context=d:o.pendingContext=d,o=Lr(s),o.payload={element:i},f=f===void 0?null:f,f!==null&&(o.callback=f),i=Ur(n,o,s),i!==null&&(Yt(i,n,s),wi(i,n,s))}function Gg(n,s){if(n=n.memoizedState,n!==null&&n.dehydrated!==null){var i=n.retryLane;n.retryLane=i!==0&&i<s?i:s}}function Bd(n,s){Gg(n,s),(n=n.alternate)&&Gg(n,s)}function Yg(n){if(n.tag===13||n.tag===31){var s=_s(n,67108864);s!==null&&Yt(s,n,67108864),Bd(n,67108864)}}function Fg(n){if(n.tag===13||n.tag===31){var s=ln();s=Qs(s);var i=_s(n,s);i!==null&&Yt(i,n,s),Bd(n,s)}}var Nl=!0;function P_(n,s,i,o){var d=z.T;z.T=null;var f=J.p;try{J.p=2,Hd(n,s,i,o)}finally{J.p=f,z.T=d}}function B_(n,s,i,o){var d=z.T;z.T=null;var f=J.p;try{J.p=8,Hd(n,s,i,o)}finally{J.p=f,z.T=d}}function Hd(n,s,i,o){if(Nl){var d=Id(o);if(d===null)Rd(n,s,o,Ml,i),Qg(n,o);else if(I_(d,n,s,i,o))o.stopPropagation();else if(Qg(n,o),s&4&&-1<H_.indexOf(n)){for(;d!==null;){var f=Ws(d);if(f!==null)switch(f.tag){case 3:if(f=f.stateNode,f.current.memoizedState.isDehydrated){var v=Bn(f.pendingLanes);if(v!==0){var S=f;for(S.pendingLanes|=2,S.entangledLanes|=2;v;){var O=1<<31-kt(v);S.entanglements[1]|=O,v&=~O}$n(f),(De&6)===0&&(ml=ft()+500,Ui(0))}}break;case 31:case 13:S=_s(f,2),S!==null&&Yt(S,f,2),yl(),Bd(f,2)}if(f=Id(o),f===null&&Rd(n,s,o,Ml,i),f===d)break;d=f}d!==null&&o.stopPropagation()}else Rd(n,s,o,null,i)}}function Id(n){return n=$c(n),qd(n)}var Ml=null;function qd(n){if(Ml=null,n=Zs(n),n!==null){var s=c(n);if(s===null)n=null;else{var i=s.tag;if(i===13){if(n=u(s),n!==null)return n;n=null}else if(i===31){if(n=h(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 Ml=n,null}function Jg(n){switch(n){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(ze()){case Xe:return 2;case dn:return 8;case Zn:case ti:return 32;case Wn:return 268435456;default:return 32}default:return 32}}var $d=!1,Yr=null,Fr=null,Jr=null,$i=new Map,Ki=new Map,Qr=[],H_="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 Qg(n,s){switch(n){case"focusin":case"focusout":Yr=null;break;case"dragenter":case"dragleave":Fr=null;break;case"mouseover":case"mouseout":Jr=null;break;case"pointerover":case"pointerout":$i.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ki.delete(s.pointerId)}}function Vi(n,s,i,o,d,f){return n===null||n.nativeEvent!==f?(n={blockedOn:s,domEventName:i,eventSystemFlags:o,nativeEvent:f,targetContainers:[d]},s!==null&&(s=Ws(s),s!==null&&Yg(s)),n):(n.eventSystemFlags|=o,s=n.targetContainers,d!==null&&s.indexOf(d)===-1&&s.push(d),n)}function I_(n,s,i,o,d){switch(s){case"focusin":return Yr=Vi(Yr,n,s,i,o,d),!0;case"dragenter":return Fr=Vi(Fr,n,s,i,o,d),!0;case"mouseover":return Jr=Vi(Jr,n,s,i,o,d),!0;case"pointerover":var f=d.pointerId;return $i.set(f,Vi($i.get(f)||null,n,s,i,o,d)),!0;case"gotpointercapture":return f=d.pointerId,Ki.set(f,Vi(Ki.get(f)||null,n,s,i,o,d)),!0}return!1}function Xg(n){var s=Zs(n.target);if(s!==null){var i=c(s);if(i!==null){if(s=i.tag,s===13){if(s=u(i),s!==null){n.blockedOn=s,df(n.priority,function(){Fg(i)});return}}else if(s===31){if(s=h(i),s!==null){n.blockedOn=s,df(n.priority,function(){Fg(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 Dl(n){if(n.blockedOn!==null)return!1;for(var s=n.targetContainers;0<s.length;){var i=Id(n.nativeEvent);if(i===null){i=n.nativeEvent;var o=new i.constructor(i.type,i);qc=o,i.target.dispatchEvent(o),qc=null}else return s=Ws(i),s!==null&&Yg(s),n.blockedOn=i,!1;s.shift()}return!0}function Zg(n,s,i){Dl(n)&&i.delete(s)}function q_(){$d=!1,Yr!==null&&Dl(Yr)&&(Yr=null),Fr!==null&&Dl(Fr)&&(Fr=null),Jr!==null&&Dl(Jr)&&(Jr=null),$i.forEach(Zg),Ki.forEach(Zg)}function Ll(n,s){n.blockedOn===s&&(n.blockedOn=null,$d||($d=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,q_)))}var Ul=null;function Wg(n){Ul!==n&&(Ul=n,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Ul===n&&(Ul=null);for(var s=0;s<n.length;s+=3){var i=n[s],o=n[s+1],d=n[s+2];if(typeof o!="function"){if(qd(o||i)===null)continue;break}var f=Ws(i);f!==null&&(n.splice(s,3),s-=3,Iu(f,{pending:!0,data:d,method:i.method,action:o},o,d))}}))}function Da(n){function s(O){return Ll(O,n)}Yr!==null&&Ll(Yr,n),Fr!==null&&Ll(Fr,n),Jr!==null&&Ll(Jr,n),$i.forEach(s),Ki.forEach(s);for(var i=0;i<Qr.length;i++){var o=Qr[i];o.blockedOn===n&&(o.blockedOn=null)}for(;0<Qr.length&&(i=Qr[0],i.blockedOn===null);)Xg(i),i.blockedOn===null&&Qr.shift();if(i=(n.ownerDocument||n).$$reactFormReplay,i!=null)for(o=0;o<i.length;o+=3){var d=i[o],f=i[o+1],v=d[It]||null;if(typeof f=="function")v||Wg(i);else if(v){var S=null;if(f&&f.hasAttribute("formAction")){if(d=f,v=f[It]||null)S=v.formAction;else if(qd(d)!==null)continue}else S=v.action;typeof S=="function"?i[o+1]=S:(i.splice(o,3),o-=3),Wg(i)}}}function ey(){function n(f){f.canIntercept&&f.info==="react-transition"&&f.intercept({handler:function(){return new Promise(function(v){return d=v})},focusReset:"manual",scroll:"manual"})}function s(){d!==null&&(d(),d=null),o||setTimeout(i,20)}function i(){if(!o&&!navigation.transition){var f=navigation.currentEntry;f&&f.url!=null&&navigation.navigate(f.url,{state:f.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var o=!1,d=null;return navigation.addEventListener("navigate",n),navigation.addEventListener("navigatesuccess",s),navigation.addEventListener("navigateerror",s),setTimeout(i,100),function(){o=!0,navigation.removeEventListener("navigate",n),navigation.removeEventListener("navigatesuccess",s),navigation.removeEventListener("navigateerror",s),d!==null&&(d(),d=null)}}}function Kd(n){this._internalRoot=n}zl.prototype.render=Kd.prototype.render=function(n){var s=this._internalRoot;if(s===null)throw Error(a(409));var i=s.current,o=ln();Vg(i,o,n,s,null,null)},zl.prototype.unmount=Kd.prototype.unmount=function(){var n=this._internalRoot;if(n!==null){this._internalRoot=null;var s=n.containerInfo;Vg(n.current,2,null,n,null,null),yl(),s[Xs]=null}};function zl(n){this._internalRoot=n}zl.prototype.unstable_scheduleHydration=function(n){if(n){var s=Lc();n={blockedOn:null,target:n,priority:s};for(var i=0;i<Qr.length&&s!==0&&s<Qr[i].priority;i++);Qr.splice(i,0,n),i===0&&Xg(n)}};var ty=t.version;if(ty!=="19.2.5")throw Error(a(527,ty,"19.2.5"));J.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=m(s),n=n!==null?y(n):null,n=n===null?null:n.stateNode,n};var $_={bundleType:0,version:"19.2.5",rendererPackageName:"react-dom",currentDispatcherRef:z,reconcilerVersion:"19.2.5"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Pl=__REACT_DEVTOOLS_GLOBAL_HOOK__;
10if(!Pl.isDisabled&&Pl.supportsFiber)try{ps=Pl.inject($_),Nt=Pl}catch{}}return Yi.createRoot=function(n,s){if(!l(n))throw Error(a(299));var i=!1,o="",d=lm,f=cm,v=um;return s!=null&&(s.unstable_strictMode===!0&&(i=!0),s.identifierPrefix!==void 0&&(o=s.identifierPrefix),s.onUncaughtError!==void 0&&(d=s.onUncaughtError),s.onCaughtError!==void 0&&(f=s.onCaughtError),s.onRecoverableError!==void 0&&(v=s.onRecoverableError)),s=$g(n,1,!1,null,null,i,o,null,d,f,v,ey),n[Xs]=s.current,Td(n),new Kd(s)},Yi.hydrateRoot=function(n,s,i){if(!l(n))throw Error(a(299));var o=!1,d="",f=lm,v=cm,S=um,O=null;return i!=null&&(i.unstable_strictMode===!0&&(o=!0),i.identifierPrefix!==void 0&&(d=i.identifierPrefix),i.onUncaughtError!==void 0&&(f=i.onUncaughtError),i.onCaughtError!==void 0&&(v=i.onCaughtError),i.onRecoverableError!==void 0&&(S=i.onRecoverableError),i.formState!==void 0&&(O=i.formState)),s=$g(n,1,!0,s,i??null,o,d,O,f,v,S,ey),s.context=Kg(null),i=s.current,o=ln(),o=Qs(o),d=Lr(o),d.callback=null,Ur(i,d,o),i=o,s.current.lanes=i,Qe(s,i),$n(s),n[Xs]=s.current,Td(n),new zl(s)},Yi.version="19.2.5",Yi}var dy;function Z_(){if(dy)return Yd.exports;dy=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Yd.exports=X_(),Yd.exports}var W_=Z_(),eS="__TSS_CONTEXT",bh=Symbol.for("TSS_SERVER_FUNCTION"),tS="application/x-tss-framed",vr={JSON:0,CHUNK:1,END:2,ERROR:3},nS=/;\s*v=(\d+)/;function rS(e){const t=e.match(nS);return t?parseInt(t[1],10):void 0}function sS(e){const t=rS(e);if(t!==void 0&&t!==1)throw new Error(`Incompatible framed protocol version: server=${t}, client=1. Please ensure client and server are using compatible versions.`)}var Yv=()=>window.__TSS_START_OPTIONS__,Fv=!1;function lo(e){return e[e.length-1]}function aS(e){return typeof e=="function"}function ns(e,t){return aS(e)?e(t):e}var iS=Object.prototype.hasOwnProperty,hy=Object.prototype.propertyIsEnumerable,oS=()=>Object.create(null),Ds=(e,t)=>Ps(e,t,oS);function Ps(e,t,r=()=>({}),a=0){if(e===t)return e;if(a>500)return t;const l=t,c=my(e)&&my(l);if(!c&&!(Za(e)&&Za(l)))return l;const u=c?e:fy(e);if(!u)return l;const h=c?l:fy(l);if(!h)return l;const p=u.length,m=h.length,y=c?new Array(m):r();let g=0;for(let b=0;b<m;b++){const w=c?b:h[b],x=e[w],k=l[w];if(x===k){y[w]=x,(c?b<p:iS.call(e,w))&&g++;continue}if(x===null||k===null||typeof x!="object"||typeof k!="object"){y[w]=k;continue}const E=Ps(x,k,r,a+1);y[w]=E,E===x&&g++}return p===m&&g===p?e:y}function fy(e){const t=Object.getOwnPropertyNames(e);for(const l of t)if(!hy.call(e,l))return!1;const r=Object.getOwnPropertySymbols(e);if(r.length===0)return t;const a=t;for(const l of r){if(!hy.call(e,l))return!1;a.push(l)}return a}function Za(e){if(!py(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const r=t.prototype;return!(!py(r)||!r.hasOwnProperty("isPrototypeOf"))}function py(e){return Object.prototype.toString.call(e)==="[object Object]"}function my(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Qt(e,t,r){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let a=0,l=e.length;a<l;a++)if(!Qt(e[a],t[a],r))return!1;return!0}if(Za(e)&&Za(t)){const a=r?.ignoreUndefined??!0;if(r?.partial){for(const u in t)if((!a||t[u]!==void 0)&&!Qt(e[u],t[u],r))return!1;return!0}let l=0;if(!a)l=Object.keys(e).length;else for(const u in e)e[u]!==void 0&&l++;let c=0;for(const u in t)if((!a||t[u]!==void 0)&&(c++,c>l||!Qt(e[u],t[u],r)))return!1;return l===c}return!1}function Vs(e){let t,r;const a=new Promise((l,c)=>{t=l,r=c});return a.status="pending",a.resolve=l=>{a.status="resolved",a.value=l,t(l),e?.(l)},a.reject=l=>{a.status="rejected",r(l)},a}function lS(e){return typeof e?.message!="string"?!1:e.message.startsWith("Failed to fetch dynamically imported module")||e.message.startsWith("error loading dynamically imported module")||e.message.startsWith("Importing a module script failed")}function co(e){return!!(e&&typeof e=="object"&&typeof e.then=="function")}function cS(e){return e.replace(/[\x00-\x1f\x7f]/g,"")}function gy(e){let t;try{t=decodeURI(e)}catch{t=e.replaceAll(/%[0-9A-F]{2}/gi,r=>{try{return decodeURI(r)}catch{return r}})}return cS(t)}var uS=["http:","https:","mailto:","tel:"];function ic(e,t){if(!e)return!1;
10try{const r=new URL(e);return!t.has(r.protocol)}catch{return!1}}var dS={"&":"\\u0026",">":"\\u003e","<":"\\u003c","\u2028":"\\u2028","\u2029":"\\u2029"},hS=/[&><\u2028\u2029]/g;function fS(e){return e.replace(hS,t=>dS[t])}function Fi(e){if(!e)return{path:e,handledProtocolRelativeURL:!1};if(!/[%\\\x00-\x1f\x7f]/.test(e)&&!e.startsWith("//"))return{path:e,handledProtocolRelativeURL:!1};const t=/%25|%5C/gi;let r=0,a="",l;for(;(l=t.exec(e))!==null;)a+=gy(e.slice(r,l.index))+l[0],r=t.lastIndex;a=a+gy(r?e.slice(r):e);let c=!1;return a.startsWith("//")&&(c=!0,a="/"+a.replace(/^\/+/,"")),{path:a,handledProtocolRelativeURL:c}}function pS(e){return/\s|[^\u0000-\u007F]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function mS(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}function Zt(){throw new Error("Invariant failed")}function uo(e){const t=new Map;let r,a;const l=c=>{c.next&&(c.prev?(c.prev.next=c.next,c.next.prev=c.prev,c.next=void 0,a&&(a.next=c,c.prev=a)):(c.next.prev=void 0,r=c.next,c.next=void 0,a&&(c.prev=a,a.next=c)),a=c)};return{get(c){const u=t.get(c);if(u)return l(u),u.value},set(c,u){if(t.size>=e&&r){const p=r;t.delete(p.key),p.next&&(r=p.next,p.next.prev=void 0),p===a&&(a=void 0)}const h=t.get(c);if(h)h.value=u,l(h);else{const p={key:c,value:u,prev:a};a&&(a.next=p),a=p,r||(r=p),t.set(c,p)}},clear(){t.clear(),r=void 0,a=void 0}}}var rs=4,Jv=5;function gS(e){const t=e.indexOf("{");if(t===-1)return null;const r=e.indexOf("}",t);return r===-1||t+1>=e.length?null:[t,r]}function Yh(e,t,r=new Uint16Array(6)){const a=e.indexOf("/",t),l=a===-1?e.length:a,c=e.substring(t,l);if(!c||!c.includes("$"))return r[0]=0,r[1]=t,r[2]=t,r[3]=l,r[4]=l,r[5]=l,r;if(c==="$"){const h=e.length;return r[0]=2,r[1]=t,r[2]=t,r[3]=h,r[4]=h,r[5]=h,r}if(c.charCodeAt(0)===36)return r[0]=1,r[1]=t,r[2]=t+1,r[3]=l,r[4]=l,r[5]=l,r;const u=gS(c);if(u){const[h,p]=u,m=c.charCodeAt(h+1);if(m===45){if(h+2<c.length&&c.charCodeAt(h+2)===36){const y=h+3,g=p;if(y<g)return r[0]=3,r[1]=t+h,r[2]=t+y,r[3]=t+g,r[4]=t+p+1,r[5]=l,r}}else if(m===36){const y=h+1,g=h+2;return g===p?(r[0]=2,r[1]=t+h,r[2]=t+y,r[3]=t+g,r[4]=t+p+1,r[5]=e.length,r):(r[0]=1,r[1]=t+h,r[2]=t+g,r[3]=t+p,r[4]=t+p+1,r[5]=l,r)}}return r[0]=0,r[1]=t,r[2]=t,r[3]=l,r[4]=l,r[5]=l,r}function _c(e,t,r,a,l,c,u){u?.(r);let h=a;{const p=r.fullPath??r.from,m=p.length,y=r.options?.caseSensitive??e,g=!!(r.options?.params?.parse&&r.options?.skipRouteOnParseError?.params);for(;h<m;){const w=Yh(p,h,t);let x;const k=h,E=w[5];switch(h=E+1,c++,w[0]){case 0:{const A=p.substring(w[2],w[3]);if(y){const M=l.static?.get(A);if(M)x=M;else{l.static??=new Map;const N=Bs(r.fullPath??r.from);N.parent=l,N.depth=c,x=N,l.static.set(A,N)}}else{const M=A.toLowerCase(),N=l.staticInsensitive?.get(M);if(N)x=N;else{l.staticInsensitive??=new Map;const L=Bs(r.fullPath??r.from);L.parent=l,L.depth=c,x=L,l.staticInsensitive.set(M,L)}}break}case 1:{const A=p.substring(k,w[1]),M=p.substring(w[4],E),N=y&&!!(A||M),L=A?N?A:A.toLowerCase():void 0,X=M?N?M:M.toLowerCase():void 0,Y=!g&&l.dynamic?.find(I=>!I.skipOnParamError&&I.caseSensitive===N&&I.prefix===L&&I.suffix===X);if(Y)x=Y;else{const I=Zd(1,r.fullPath??r.from,N,L,X);x=I,I.depth=c,I.parent=l,l.dynamic??=[],l.dynamic.push(I)}break}case 3:{const A=p.substring(k,w[1]),M=p.substring(w[4],E),N=y&&!!(A||M),L=A?N?A:A.toLowerCase():void 0,X=M?N?M:M.toLowerCase():void 0,Y=!g&&l.optional?.find(I=>!I.skipOnParamError&&I.caseSensitive===N&&I.prefix===L&&I.suffix===X);if(Y)x=Y;else{const I=Zd(3,r.fullPath??r.from,N,L,X);x=I,I.parent=l,I.depth=c,l.optional??=[],l.optional.push(I)}break}case 2:{const A=p.substring(k,w[1]),M=p.substring(w[4],E),N=y&&!!(A||M),L=A?N?A:A.toLowerCase():void 0,X=M?N?M:M.toLowerCase():void 0,Y=Zd(2,r.fullPath??r.from,N,L,X);x=Y,Y.parent=l,Y.depth=c,l.wildcard??=[],l.wildcard.push(Y)}}l=x}if(g&&r.children&&!r.isRoot&&r.id&&r.id.charCodeAt(r.id.lastIndexOf("/")+1)===95){const w=Bs(r.fullPath??r.from);w.kind=Jv,w.parent=l,c++,w.depth=c,l.pathless??=[],l.pathless.push(w),l=w}const b=(r.path||!r.children)&&!r.isRoot;if(b&&p.endsWith("/")){const w=Bs(r.fullPath??r.from);w.kind=rs,w.parent=l,c++,w.depth=c,l.index=w,l=w}l.parse=r.options?.params?.parse??null,l.skipOnParamError=g,l.parsingPriority=r.options?.skipRouteOnParseError?.priority??0,b&&!l.route&&(l.route=r,l.fullPath=r.fullPath??r.from)}if(r.children)for(const p of r.children)_c(e,t,p,h,l,c,u)}function Xd(e,t){if(e.skipOnParamError&&!t.skipOnParamError)return-1;if(!e.skipOnParamError&&t.skipOnParamError)return 1;if(e.skipOnParamError&&t.skipOnParamError&&(e.parsingPriority||t.parsingPriority))return t.parsingPriority-e.parsingPriority;if(e.prefix&&t.prefix&&e.prefix!==t.prefix){if(e.prefix.startsWith(t.prefix))return-1;if(t.prefix.startsWith(e.prefix))return 1}if(e.suffix&&t.suffix&&e.suffix!==t.suffix){if(e.suffix.endsWith(t.suffix))return-1;if(t.suffix.endsWith(e.suffix))return 1}return e.prefix&&!t.prefix?-1:!e.prefix&&t.prefix?1:e.suffix&&!t.suffix?-1:!e.suffix&&t.suffix?1:e.caseSensitive&&!t.caseSensitive?-1:!e.caseSensitive&&t.caseSensitive?1:0}function Zr(e){if(e.pathless)for(const t of e.pathless)Zr(t);if(e.static)for(const t of e.static.values())Zr(t);if(e.staticInsensitive)for(const t of e.staticInsensitive.values())Zr(t);if(e.dynamic?.length){e.dynamic.sort(Xd);for(const t of e.dynamic)Zr(t)}if(e.optional?.length){e.optional.sort(Xd);for(const t of e.optional)Zr(t)}if(e.wildcard?.length){e.wildcard.sort(Xd);for(const t of e.wildcard)Zr(t)}
10}function Bs(e){return{kind:0,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null,parse:null,skipOnParamError:!1,parsingPriority:0}}function Zd(e,t,r,a,l){return{kind:e,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:t,parent:null,parse:null,skipOnParamError:!1,parsingPriority:0,caseSensitive:r,prefix:a,suffix:l}}function yS(e,t){const r=Bs("/"),a=new Uint16Array(6);for(const l of e)_c(!1,a,l,1,r,0);Zr(r),t.masksTree=r,t.flatCache=uo(1e3)}function vS(e,t){e||="/";const r=t.flatCache.get(e);if(r)return r;const a=Fh(e,t.masksTree);return t.flatCache.set(e,a),a}function bS(e,t,r,a,l){e||="/",a||="/";const c=t?`case\0${e}`:e;let u=l.singleCache.get(c);return u||(u=Bs("/"),_c(t,new Uint16Array(6),{from:e},1,u,0),l.singleCache.set(c,u)),Fh(a,u,r)}function wS(e,t,r=!1){const a=r?e:`nofuzz\0${e}`,l=t.matchCache.get(a);if(l!==void 0)return l;e||="/";let c;try{c=Fh(e,t.segmentTree,r)}catch(u){if(u instanceof URIError)c=null;else throw u}return c&&(c.branch=xS(c.route)),t.matchCache.set(a,c),c}function _S(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function SS(e,t=!1,r){const a=Bs(e.fullPath),l=new Uint16Array(6),c={},u={};let h=0;return _c(t,l,e,1,a,0,p=>{if(r?.(p,h),p.id in c&&Zt(),c[p.id]=p,h!==0&&p.path){const m=_S(p.fullPath);(!u[m]||p.fullPath.endsWith("/"))&&(u[m]=p)}h++}),Zr(a),{processedTree:{segmentTree:a,singleCache:uo(1e3),matchCache:uo(1e3),flatCache:null,masksTree:null},routesById:c,routesByPath:u}}function Fh(e,t,r=!1){const a=e.split("/"),l=TS(e,a,t,r);if(!l)return null;const[c]=Qv(e,a,l);return{route:l.node.route,rawParams:c,parsedParams:l.parsedParams}}function Qv(e,t,r){const a=ES(r.node);let l=null;const c=Object.create(null);let u=r.extract?.part??0,h=r.extract?.node??0,p=r.extract?.path??0,m=r.extract?.segment??0;for(;h<a.length;u++,h++,p++,m++){const y=a[h];if(y.kind===rs)break;if(y.kind===Jv){m--,u--,p--;continue}const g=t[u],b=p;if(g&&(p+=g.length),y.kind===1){l??=r.node.fullPath.split("/");const w=l[m],x=y.prefix?.length??0;if(w.charCodeAt(x)===123){const k=y.suffix?.length??0,E=w.substring(x+2,w.length-k-1),A=g.substring(x,g.length-k);c[E]=decodeURIComponent(A)}else{const k=w.substring(1);c[k]=decodeURIComponent(g)}}else if(y.kind===3){if(r.skipped&1<<h){u--,p=b-1;continue}l??=r.node.fullPath.split("/");const w=l[m],x=y.prefix?.length??0,k=y.suffix?.length??0,E=w.substring(x+3,w.length-k-1),A=y.suffix||y.prefix?g.substring(x,g.length-k):g;A&&(c[E]=decodeURIComponent(A))}else if(y.kind===2){const w=y,x=e.substring(b+(w.prefix?.length??0),e.length-(w.suffix?.length??0)),k=decodeURIComponent(x);c["*"]=k,c._splat=k;break}}return r.rawParams&&Object.assign(c,r.rawParams),[c,{part:u,node:h,path:p,segment:m}]}function xS(e){const t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function ES(e){const t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function TS(e,t,r,a){if(e==="/"&&r.index)return{node:r.index,skipped:0};const l=!lo(t),c=l&&e!=="/",u=t.length-(l?1:0),h=[{node:r,index:1,skipped:0,depth:1,statics:0,dynamics:0,optionals:0}];let p=null,m=null;for(;h.length;){const y=h.pop(),{node:g,index:b,skipped:w,depth:x,statics:k,dynamics:E,optionals:A}=y;let{extract:M,rawParams:N,parsedParams:L}=y;if(g.kind===2&&g.route&&!Hl(m,y))continue;if(g.skipOnParamError){if(!yy(e,t,y))continue;N=y.rawParams,M=y.extract,L=y.parsedParams}a&&g.route&&g.kind!==rs&&Hl(p,y)&&(p=y);const X=b===u;if(X&&(g.route&&(!c||g.kind===rs||g.kind===2)&&Hl(m,y)&&(m=y),!g.optional&&!g.wildcard&&!g.index&&!g.pathless))continue;const Y=X?void 0:t[b];let I;if(X&&g.index){const F={node:g.index,index:b,skipped:w,depth:x+1,statics:k,dynamics:E,optionals:A,extract:M,rawParams:N,parsedParams:L};let Z=!0;if(g.index.skipOnParamError&&(yy(e,t,F)||(Z=!1)),Z){if(!E&&!A&&!w&&RS(k,u))return F;Hl(m,F)&&(m=F)}}if(g.wildcard)for(let F=g.wildcard.length-1;F>=0;F--){const Z=g.wildcard[F],{prefix:le,suffix:ie}=Z;if(!(le&&(X||!(Z.caseSensitive?Y:I??=Y.toLowerCase()).startsWith(le)))){if(ie){if(X)continue;const ge=t.slice(b).join("/").slice(-ie.length);if((Z.caseSensitive?ge:ge.toLowerCase())!==ie)continue}h.push({node:Z,index:u,skipped:w,depth:x+1,statics:k,dynamics:E,optionals:A,extract:M,rawParams:N,parsedParams:L})}}if(g.optional){const F=w|1<<x,Z=x+1;for(let le=g.optional.length-1;le>=0;le--){const ie=g.optional[le];h.push({node:ie,index:b,skipped:F,depth:Z,statics:k,dynamics:E,optionals:A,extract:M,rawParams:N,parsedParams:L})}if(!X)for(let le=g.optional.length-1;le>=0;le--){const ie=g.optional[le],{prefix:ge,suffix:we}=ie;if(ge||we){const $e=ie.caseSensitive?Y:I??=Y.toLowerCase();if(ge&&!$e.startsWith(ge)||we&&!$e.endsWith(we))continue}h.push({node:ie,index:b+1,skipped:w,depth:Z,statics:k,dynamics:E,optionals:A+Bl(u,b),extract:M,rawParams:N,parsedParams:L})}}if(!X&&g.dynamic&&Y)for(let F=g.dynamic.length-1;F>=0;F--){const Z=g.dynamic[F],{prefix:le,suffix:ie}=Z;if(le||ie){const ge=Z.caseSensitive?Y:I??=Y.toLowerCase();if(le&&!ge.startsWith(le)||ie&&!ge.endsWith(ie))continue}h.push({node:Z,index:b+1,skipped:w,depth:x+1,statics:k,dynamics:E+Bl(u,b),optionals:A,extract:M,rawParams:N,parsedParams:L})}if(!X&&g.staticInsensitive){const F=g.staticInsensitive.get(I??=Y.toLowerCase());F&&h.push({node:F,index:b+1,skipped:w,depth:x+1,statics:k+Bl(u,b),dynamics:E,optionals:A,extract:M,rawParams:N,parsedParams:L})}if(!X&&g.static){const F=g.static.get(Y);F&&h.push({node:F,index:b+1,skipped:w,depth:x+1,statics:k+Bl(u,b),dynamics:E,optionals:A,extract:M,rawParams:N,parsedParams:L})}if(g.pathless){const F=x+1;for(let Z=g.pathless.length-1;Z>=0;Z--){const le=g.pathless[Z];h.push({node:le,index:b,skipped:w,depth:F,statics:k,dynamics:E,optionals:A,extract:M,rawParams:N,parsedParams:L})}}}if(m)return m;if(a&&p){let y=p.index;for(let b=0;b<p.index;b++)y+=t[b].length;const g=y===e.length?"/":e.slice(y);return p.rawParams??=Object.create(null),p.rawParams["**"]=decodeURIComponent(g),p}return null}function Bl(e,t){return 2**(e-t-1)}function RS(e,t){return e===2**(t-1)-1}function yy(e,t,r){try{const[a,l]=Qv(e,t,r);r.rawParams=a,r.extract=l;const c=r.node.parse(a);return r.parsedParams=Object.assign(Object.create(null),r.parsedParams,c),!0}catch{return null}}function Hl(e,t){return e?t.statics>e.statics||t.statics===e.statics&&(t.dynamics>e.dynamics||t.dynamics===e.dynamics&&(t.optionals>e.optionals||t.optionals===e.optionals&&((t.node.kind===rs)>(e.node.kind===rs)||t.node.kind===rs==(e.node.kind===rs)&&t.depth>e.depth))):!0}function ec(e){return Jh(e.filter(t=>t!==void 0).join("/"))}function Jh(e){return e.replace(/\/{2,}/g,"/")}function Xv(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function as(e){const t=e.length;return t>1&&e[t-1]==="/"?e.replace(/\/{1,}$/,""):e}function Zv(e){return as(Xv(e))}function oc(e,t){return e?.endsWith("/")&&e!=="/"&&e!==`${t}/`?e.slice(0,-1):e}function AS(e,t,r){return oc(e,r)===oc(t,r)}function kS({base:e,to:t,trailingSlash:r="never",cache:a}){const l=t.startsWith("/"),c=!l&&t===".";let u;if(a){u=l?t:c?e:e+"\0"+t;const g=a.get(u);if(g)return g}let h;
10if(c)h=e.split("/");else if(l)h=t.split("/");else{for(h=e.split("/");h.length>1&&lo(h)==="";)h.pop();const g=t.split("/");for(let b=0,w=g.length;b<w;b++){const x=g[b];x===""?b?b===w-1&&h.push(x):h=[x]:x===".."?h.pop():x==="."||h.push(x)}}h.length>1&&(lo(h)===""?r==="never"&&h.pop():r==="always"&&h.push(""));let p,m="";for(let g=0;g<h.length;g++){g>0&&(m+="/");const b=h[g];if(!b)continue;p=Yh(b,0,p);const w=p[0];if(w===0){m+=b;continue}const x=p[5],k=b.substring(0,p[1]),E=b.substring(p[4],x),A=b.substring(p[2],p[3]);w===1?m+=k||E?`${k}{$${A}}${E}`:`$${A}`:w===2?m+=k||E?`${k}{$}${E}`:"$":m+=`${k}{-$${A}}${E}`}m=Jh(m);const y=m||"/";return u&&a&&a.set(u,y),y}function OS(e){const t=new Map(e.map(l=>[encodeURIComponent(l),l])),r=Array.from(t.keys()).map(l=>l.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),a=new RegExp(r,"g");return l=>l.replace(a,c=>t.get(c)??c)}function Wd(e,t,r){const a=t[e];return typeof a!="string"?a:e==="_splat"?/^[a-zA-Z0-9\-._~!/]*$/.test(a)?a:a.split("/").map(l=>by(l,r)).join("/"):by(a,r)}function vy({path:e,params:t,decoder:r,...a}){let l=!1;const c=Object.create(null);if(!e||e==="/")return{interpolatedPath:"/",usedParams:c,isMissingParams:l};if(!e.includes("$"))return{interpolatedPath:e,usedParams:c,isMissingParams:l};const u=e.length;let h=0,p,m="";for(;h<u;){const y=h;p=Yh(e,y,p);const g=p[5];if(h=g+1,y===g)continue;const b=p[0];if(b===0){m+="/"+e.substring(y,g);continue}if(b===2){const w=t._splat;c._splat=w,c["*"]=w;const x=e.substring(y,p[1]),k=e.substring(p[4],g);if(!w){l=!0,(x||k)&&(m+="/"+x+k);continue}const E=Wd("_splat",t,r);m+="/"+x+E+k;continue}if(b===1){const w=e.substring(p[2],p[3]);!l&&!(w in t)&&(l=!0),c[w]=t[w];const x=e.substring(y,p[1]),k=e.substring(p[4],g),E=Wd(w,t,r)??"undefined";m+="/"+x+E+k;continue}if(b===3){const w=e.substring(p[2],p[3]),x=t[w];if(x==null)continue;c[w]=x;const k=e.substring(y,p[1]),E=e.substring(p[4],g),A=Wd(w,t,r)??"";m+="/"+k+A+E;continue}}return e.endsWith("/")&&(m+="/"),{usedParams:c,interpolatedPath:m||"/",isMissingParams:l}}function by(e,t){const r=encodeURIComponent(e);return t?.(r)??r}function vt(e){return e?.isNotFound===!0}function CS(){try{return typeof window<"u"&&typeof window.sessionStorage=="object"?window.sessionStorage:void 0}catch{return}}var jS="tsr-scroll-restoration-v1_3";function NS(){const e=CS();if(!e)return null;let t={};try{const a=JSON.parse(e.getItem("tsr-scroll-restoration-v1_3")||"{}");Za(a)&&(t=a)}catch{}return{get state(){return t},set:a=>{t=ns(a,t)||t},persist:()=>{try{e.setItem(jS,JSON.stringify(t))}catch{}}}}var wy=NS(),MS=e=>e.state.__TSR_key||e.href;function DS(e){const t=[];let r;for(;r=e.parentNode;)t.push(`${e.tagName}:nth-child(${Array.prototype.indexOf.call(r.children,e)+1})`),e=r;return`${t.reverse().join(" > ")}`.toLowerCase()}var Il=!1,Ji="window",_y="data-scroll-restoration-id";function LS(e,t){if(!wy)return;const r=wy;if((e.options.scrollRestoration??!1)&&(e.isScrollRestoring=!0),e.isScrollRestorationSetup||!r)return;e.isScrollRestorationSetup=!0,Il=!1;const a=e.options.getScrollRestorationKey||MS,l=new Map;window.history.scrollRestoration="manual";const c=h=>{if(!(Il||!e.isScrollRestoring))if(h.target===document||h.target===window)l.set(Ji,{scrollX:window.scrollX||0,scrollY:window.scrollY||0});else{const p=h.target;l.set(p,{scrollX:p.scrollLeft||0,scrollY:p.scrollTop||0})}},u=h=>{if(!e.isScrollRestoring||!h||l.size===0||!r)return;const p=r.state[h]||={};for(const[m,y]of l){let g;if(m===Ji)g=Ji;else if(m.isConnected){const b=m.getAttribute(_y);g=b?`[${_y}="${b}"]`:DS(m)}g&&(p[g]=y)}};document.addEventListener("scroll",c,!0),e.subscribe("onBeforeLoad",h=>{u(h.fromLocation?a(h.fromLocation):void 0),l.clear()}),window.addEventListener("pagehide",()=>{u(a(e.stores.resolvedLocation.get()??e.stores.location.get())),r.persist()}),e.subscribe("onRendered",h=>{const p=a(h.toLocation),m=e.options.scrollRestorationBehavior,y=e.options.scrollToTopSelectors;if(l.clear(),!e.resetNextScroll){e.resetNextScroll=!0;return}if(!(typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation}))){Il=!0;try{const g=e.isScrollRestoring?r.state[p]:void 0;let b=!1;if(g)for(const w in g){const x=g[w];if(!Za(x))continue;const{scrollX:k,scrollY:E}=x;
10if(!(!Number.isFinite(k)||!Number.isFinite(E))){if(w===Ji)window.scrollTo({top:E,left:k,behavior:m}),b=!0;else if(w){let A;try{A=document.querySelector(w)}catch{continue}A&&(A.scrollLeft=k,A.scrollTop=E,b=!0)}}}if(!b){const w=e.history.location.hash.slice(1);if(w){const x=window.history.state?.__hashScrollIntoViewOptions??!0;if(x){const k=document.getElementById(w);k&&k.scrollIntoView(x)}}else{const x={top:0,left:0,behavior:m};if(window.scrollTo(x),y)for(const k of y){if(k===Ji)continue;const E=typeof k=="function"?k():document.querySelector(k);E&&E.scrollTo(x)}}}}finally{Il=!1}e.isScrollRestoring&&r.set(g=>(g[p]||={},g))}})}function Wv(e,t=String){const r=new URLSearchParams;for(const a in e){const l=e[a];l!==void 0&&r.set(a,t(l))}return r.toString()}function eh(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function US(e){const t=new URLSearchParams(e),r=Object.create(null);for(const[a,l]of t.entries()){const c=r[a];c==null?r[a]=eh(l):Array.isArray(c)?c.push(eh(l)):r[a]=[c,eh(l)]}return r}var zS=BS(JSON.parse),PS=HS(JSON.stringify,JSON.parse);function BS(e){return t=>{t[0]==="?"&&(t=t.substring(1));const r=US(t);for(const a in r){const l=r[a];if(typeof l=="string")try{r[a]=e(l)}catch{}}return r}}function HS(e,t){const r=typeof t=="function";function a(l){if(typeof l=="object"&&l!==null)try{return e(l)}catch{}else if(r&&typeof l=="string")try{return t(l),e(l)}catch{}return l}return l=>{const c=Wv(l,a);return c?`?${c}`:""}}var $s="__root__";function Qh(e){if(e.statusCode=e.statusCode||e.code||307,!e._builtLocation&&!e.reloadDocument&&typeof e.href=="string")try{new URL(e.href),e.reloadDocument=!0}catch{}const t=new Headers(e.headers);e.href&&t.get("Location")===null&&t.set("Location",e.href);const r=new Response(null,{status:e.statusCode,headers:t});if(r.options=e,e.throw)throw r;return r}function Xt(e){return e instanceof Response&&!!e.options}function IS(e){if(e!==null&&typeof e=="object"&&e.isSerializedRedirect)return Qh(e)}function qS(e){return{input:({url:t})=>{for(const r of e)t=wh(r,t);return t},output:({url:t})=>{for(let r=e.length-1;r>=0;r--)t=e0(e[r],t);return t}}}function $S(e){const t=Zv(e.basepath),r=`/${t}`,a=`${r}/`,l=e.caseSensitive?r:r.toLowerCase(),c=e.caseSensitive?a:a.toLowerCase();return{input:({url:u})=>{const h=e.caseSensitive?u.pathname:u.pathname.toLowerCase();return h===l?u.pathname="/":h.startsWith(c)&&(u.pathname=u.pathname.slice(r.length)),u},output:({url:u})=>(u.pathname=ec(["/",t,u.pathname]),u)}}function wh(e,t){const r=e?.input?.({url:t});if(r){if(typeof r=="string")return new URL(r);if(r instanceof URL)return r}return t}function e0(e,t){const r=e?.output?.({url:t});if(r){if(typeof r=="string")return new URL(r);if(r instanceof URL)return r}return t}function KS(e,t){const{createMutableStore:r,createReadonlyStore:a,batch:l,init:c}=t,u=new Map,h=new Map,p=new Map,m=r(e.status),y=r(e.loadedAt),g=r(e.isLoading),b=r(e.isTransitioning),w=r(e.location),x=r(e.resolvedLocation),k=r(e.statusCode),E=r(e.redirect),A=r([]),M=r([]),N=r([]),L=a(()=>th(u,A.get())),X=a(()=>th(h,M.get())),Y=a(()=>th(p,N.get())),I=a(()=>A.get()[0]),F=a(()=>A.get().some(J=>u.get(J)?.get().status==="pending")),Z=a(()=>({locationHref:w.get().href,resolvedLocationHref:x.get()?.href,status:m.get()})),le=a(()=>({status:m.get(),loadedAt:y.get(),isLoading:g.get(),isTransitioning:b.get(),matches:L.get(),location:w.get(),resolvedLocation:x.get(),statusCode:k.get(),redirect:E.get()})),ie=uo(64);function ge(J){let ae=ie.get(J);return ae||(ae=a(()=>{const Se=A.get();for(const ye of Se){const C=u.get(ye);if(C&&C.routeId===J)return C.get()}}),ie.set(J,ae)),ae}const we={status:m,loadedAt:y,isLoading:g,isTransitioning:b,location:w,resolvedLocation:x,statusCode:k,redirect:E,matchesId:A,pendingIds:M,cachedIds:N,matches:L,pendingMatches:X,cachedMatches:Y,firstId:I,hasPending:F,matchRouteDeps:Z,matchStores:u,pendingMatchStores:h,cachedMatchStores:p,__store:le,getRouteMatchStore:ge,setMatches:$e,setPending:Me,setCached:z};$e(e.matches),c?.(we);function $e(J){nh(J,u,A,r,l)}function Me(J){nh(J,h,M,r,l)}function z(J){nh(J,p,N,r,l)}return we}function th(e,t){const r=[];for(const a of t){const l=e.get(a);l&&r.push(l.get())}return r}function nh(e,t,r,a,l){const c=e.map(h=>h.id),u=new Set(c);l(()=>{for(const h of t.keys())u.has(h)||t.delete(h);for(const h of e){const p=t.get(h.id);if(!p){const m=a(h);m.routeId=h.routeId,t.set(h.id,m);continue}p.routeId=h.routeId,p.get()!==h&&p.set(h)}mS(r.get(),c)||r.set(c)})}var _h=e=>{if(!e.rendered)return e.rendered=!0,e.onReady?.()},VS=e=>e.stores.matchesId.get().some(t=>e.stores.matchStores.get(t)?.get()._forcePending),Sc=(e,t)=>!!(e.preload&&!e.router.stores.matchStores.has(t)),Ks=(e,t,r=!0)=>{const a={...e.router.options.context??{}},l=r?t:t-1;for(let c=0;c<=l;c++){const u=e.matches[c];if(!u)continue;const h=e.router.getMatch(u.id);
10h&&Object.assign(a,h.__routeContext,h.__beforeLoadContext)}return a},Sy=(e,t)=>{if(!e.matches.length)return;const r=t.routeId,a=e.matches.findIndex(u=>u.routeId===e.router.routeTree.id),l=a>=0?a:0;let c=r?e.matches.findIndex(u=>u.routeId===r):e.firstBadMatchIndex??e.matches.length-1;c<0&&(c=l);for(let u=c;u>=0;u--){const h=e.matches[u];if(e.router.looseRoutesById[h.routeId].options.notFoundComponent)return u}return r?c:l},ss=(e,t,r)=>{if(!(!Xt(r)&&!vt(r)))throw Xt(r)&&r.redirectHandled&&!r.options.reloadDocument||(t&&(t._nonReactive.beforeLoadPromise?.resolve(),t._nonReactive.loaderPromise?.resolve(),t._nonReactive.beforeLoadPromise=void 0,t._nonReactive.loaderPromise=void 0,t._nonReactive.error=r,e.updateMatch(t.id,a=>({...a,status:Xt(r)?"redirected":vt(r)?"notFound":a.status==="pending"?"success":a.status,context:Ks(e,t.index),isFetching:!1,error:r})),vt(r)&&!r.routeId&&(r.routeId=t.routeId),t._nonReactive.loadPromise?.resolve()),Xt(r)&&(e.rendered=!0,r.options._fromLocation=e.location,r.redirectHandled=!0,r=e.router.resolveRedirect(r))),r},t0=(e,t)=>{const r=e.router.getMatch(t);return!!(!r||r._nonReactive.dehydrated)},xy=(e,t,r)=>{const a=Ks(e,r);e.updateMatch(t,l=>({...l,context:a}))},Qi=(e,t,r,a)=>{const{id:l,routeId:c}=e.matches[t],u=e.router.looseRoutesById[c];if(r instanceof Promise)throw r;r.routerCode=a,e.firstBadMatchIndex??=t,ss(e,e.router.getMatch(l),r);try{u.options.onError?.(r)}catch(h){r=h,ss(e,e.router.getMatch(l),r)}e.updateMatch(l,h=>(h._nonReactive.beforeLoadPromise?.resolve(),h._nonReactive.beforeLoadPromise=void 0,h._nonReactive.loadPromise?.resolve(),{...h,error:r,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController})),!e.preload&&!Xt(r)&&!vt(r)&&(e.serialError??=r)},n0=(e,t,r,a)=>{if(a._nonReactive.pendingTimeout!==void 0)return;const l=r.options.pendingMs??e.router.options.defaultPendingMs;if(e.onReady&&!Sc(e,t)&&(r.options.loader||r.options.beforeLoad||s0(r))&&typeof l=="number"&&l!==1/0&&(r.options.pendingComponent??e.router.options?.defaultPendingComponent)){const c=setTimeout(()=>{_h(e)},l);a._nonReactive.pendingTimeout=c}},GS=(e,t,r)=>{const a=e.router.getMatch(t);if(!a._nonReactive.beforeLoadPromise&&!a._nonReactive.loaderPromise)return;n0(e,t,r,a);const l=()=>{const c=e.router.getMatch(t);c.preload&&(c.status==="redirected"||c.status==="notFound")&&ss(e,c,c.error)};return a._nonReactive.beforeLoadPromise?a._nonReactive.beforeLoadPromise.then(l):l()},YS=(e,t,r,a)=>{const l=e.router.getMatch(t);let c=l._nonReactive.loadPromise;l._nonReactive.loadPromise=Vs(()=>{c?.resolve(),c=void 0});const{paramsError:u,searchError:h}=l;u&&Qi(e,r,u,"PARSE_PARAMS"),h&&Qi(e,r,h,"VALIDATE_SEARCH"),n0(e,t,a,l);const p=new AbortController;let m=!1;const y=()=>{m||(m=!0,e.updateMatch(t,L=>({...L,isFetching:"beforeLoad",fetchCount:L.fetchCount+1,abortController:p})))},g=()=>{l._nonReactive.beforeLoadPromise?.resolve(),l._nonReactive.beforeLoadPromise=void 0,e.updateMatch(t,L=>({...L,isFetching:!1}))};if(!a.options.beforeLoad){e.router.batch(()=>{y(),g()});return}l._nonReactive.beforeLoadPromise=Vs();const b={...Ks(e,r,!1),...l.__routeContext},{search:w,params:x,cause:k}=l,E=Sc(e,t),A={search:w,abortController:p,params:x,preload:E,context:b,location:e.location,navigate:L=>e.router.navigate({...L,_fromLocation:e.location}),buildLocation:e.router.buildLocation,cause:E?"preload":k,matches:e.matches,routeId:a.id,...e.router.options.additionalContext},M=L=>{if(L===void 0){e.router.batch(()=>{y(),g()});return}(Xt(L)||vt(L))&&(y(),Qi(e,r,L,"BEFORE_LOAD")),e.router.batch(()=>{y(),e.updateMatch(t,X=>({...X,__beforeLoadContext:L})),g()})};let N;try{if(N=a.options.beforeLoad(A),co(N))return y(),N.catch(L=>{Qi(e,r,L,"BEFORE_LOAD")}).then(M)}catch(L){y(),Qi(e,r,L,"BEFORE_LOAD")}M(N)},FS=(e,t)=>{const{id:r,routeId:a}=e.matches[t],l=e.router.looseRoutesById[a],c=()=>h(),u=()=>YS(e,r,t,l),h=()=>{if(t0(e,r))return;const p=GS(e,r,l);return co(p)?p.then(u):u()};return c()},JS=(e,t,r)=>{const a=e.router.getMatch(t);if(!a||!r.options.head&&!r.options.scripts&&!r.options.headers)return;const l={ssr:e.router.options.ssr,matches:e.matches,match:a,params:a.params,loaderData:a.loaderData};return Promise.all([r.options.head?.(l),r.options.scripts?.(l),r.options.headers?.(l)]).then(([c,u,h])=>({meta:c?.meta,links:c?.links,headScripts:c?.scripts,headers:h,scripts:u,styles:c?.styles}))},r0=(e,t,r,a,l)=>{const c=t[a-1],{params:u,loaderDeps:h,abortController:p,cause:m}=e.router.getMatch(r),y=Ks(e,a),g=Sc(e,r);return{params:u,deps:h,preload:!!g,parentMatchPromise:c,abortController:p,context:y,location:e.location,navigate:b=>e.router.navigate({...b,_fromLocation:e.location}),cause:g?"preload":m,route:l,...e.router.options.additionalContext}},Ey=async(e,t,r,a,l)=>{try{const c=e.router.getMatch(r);try{(!(Fv??e.router.isServer)||c.ssr===!0)&&ho(l);const u=l.options.loader,h=typeof u=="function"?u:u?.handler,p=h?.(r0(e,t,r,a,l)),m=!!h&&co(p);if((m||l._lazyPromise||l._componentsPromise||l.options.head||l.options.scripts||l.options.headers||c._nonReactive.minPendingPromise)&&e.updateMatch(r,g=>({...g,isFetching:"loader"})),h){const g=m?await p:p;ss(e,e.router.getMatch(r),g),g!==void 0&&e.updateMatch(r,b=>({...b,loaderData:g}))}l._lazyPromise&&await l._lazyPromise;const y=c._nonReactive.minPendingPromise;y&&await y,l._componentsPromise&&await l._componentsPromise,e.updateMatch(r,g=>({...g,error:void 0,context:Ks(e,a),status:"success",isFetching:!1,updatedAt:Date.now()}))}catch(u){let h=u;if(h?.name==="AbortError"){if(c.abortController.signal.aborted){c._nonReactive.loaderPromise?.resolve(),c._nonReactive.loaderPromise=void 0;return}e.updateMatch(r,m=>({...m,status:m.status==="pending"?"success":m.status,isFetching:!1,context:Ks(e,a)}));return}const p=c._nonReactive.minPendingPromise;p&&await p,vt(u)&&await l.options.notFoundComponent?.preload?.(),ss(e,e.router.getMatch(r),u);try{l.options.onError?.(u)}catch(m){h=m,ss(e,e.router.getMatch(r),m)}!Xt(h)&&!vt(h)&&await ho(l,["errorComponent"]),e.updateMatch(r,m=>({...m,error:h,context:Ks(e,a),status:"error",isFetching:!1}))}}catch(c){const u=e.router.getMatch(r);u&&(u._nonReactive.loaderPromise=void 0),ss(e,u,c)}},QS=async(e,t,r)=>{async function a(w,x,k,E,A){const M=Date.now()-x.updatedAt,N=w?A.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:A.options.staleTime??e.router.options.defaultStaleTime??0,L=A.options.shouldReload,X=typeof L=="function"?L(r0(e,t,l,r,A)):L,{status:Y,invalid:I}=E,F=M>=N&&(!!e.forceStaleReload||E.cause==="enter"||k!==void 0&&k!==E.id);u=Y==="success"&&(I||(X??F)),w&&A.options.preload===!1||(u&&!e.sync&&y?(h=!0,(async()=>{try{await Ey(e,t,l,r,A);const Z=e.router.getMatch(l);Z._nonReactive.loaderPromise?.resolve(),Z._nonReactive.loadPromise?.resolve(),Z._nonReactive.loaderPromise=void 0,Z._nonReactive.loadPromise=void 0}catch(Z){Xt(Z)&&await e.router.navigate(Z.options)}})()):Y!=="success"||u?await Ey(e,t,l,r,A):xy(e,l,r))}const{id:l,routeId:c}=e.matches[r];let u=!1,h=!1;const p=e.router.looseRoutesById[c],m=p.options.loader,y=((typeof m=="function"?void 0:m?.staleReloadMode)??e.router.options.defaultStaleReloadMode)!=="blocking";if(t0(e,l)){if(!e.router.getMatch(l))return e.matches[r];xy(e,l,r)}else{const w=e.router.getMatch(l),x=e.router.stores.matchesId.get()[r],k=(x&&e.router.stores.matchStores.get(x)||null)?.routeId===c?x:e.router.stores.matches.get().find(A=>A.routeId===c)?.id,E=Sc(e,l);if(w._nonReactive.loaderPromise){if(w.status==="success"&&!e.sync&&!w.preload&&y)return w;await w._nonReactive.loaderPromise;const A=e.router.getMatch(l),M=A._nonReactive.error||A.error;M&&ss(e,A,M),A.status==="pending"&&await a(E,w,k,A,p)}else{const A=E&&!e.router.stores.matchStores.has(l),M=e.router.getMatch(l);M._nonReactive.loaderPromise=Vs(),A!==M.preload&&e.updateMatch(l,N=>({...N,preload:A})),await a(E,w,k,M,p)}}const g=e.router.getMatch(l);h||(g._nonReactive.loaderPromise?.resolve(),g._nonReactive.loadPromise?.resolve(),g._nonReactive.loadPromise=void 0),clearTimeout(g._nonReactive.pen
10dingTimeout),g._nonReactive.pendingTimeout=void 0,h||(g._nonReactive.loaderPromise=void 0),g._nonReactive.dehydrated=void 0;const b=h?g.isFetching:!1;return b!==g.isFetching||g.invalid!==!1?(e.updateMatch(l,w=>({...w,isFetching:b,invalid:!1})),e.router.getMatch(l)):g};async function Ty(e){const t=e,r=[];VS(t.router)&&_h(t);let a;for(let b=0;b<t.matches.length;b++){try{const w=FS(t,b);co(w)&&await w}catch(w){if(Xt(w))throw w;if(vt(w))a=w;else if(!t.preload)throw w;break}if(t.serialError||t.firstBadMatchIndex!=null)break}const l=t.firstBadMatchIndex??t.matches.length,c=a&&!t.preload?Sy(t,a):void 0,u=a&&t.preload?0:c!==void 0?Math.min(c+1,l):l;let h,p;for(let b=0;b<u;b++)r.push(QS(t,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 x=w.reason;if(Xt(x))throw x;vt(x)?h??=x:p??=x}if(p!==void 0)throw p}const m=h??(a&&!t.preload?a:void 0);let y=t.firstBadMatchIndex!==void 0?t.firstBadMatchIndex:t.matches.length-1;if(!m&&a&&t.preload)return t.matches;if(m){const b=Sy(t,m);b===void 0&&Zt();const w=t.matches[b],x=t.router.looseRoutesById[w.routeId],k=t.router.options?.defaultNotFoundComponent;!x.options.notFoundComponent&&k&&(x.options.notFoundComponent=k),m.routeId=w.routeId;const E=w.routeId===t.router.routeTree.id;t.updateMatch(w.id,A=>({...A,...E?{status:"success",globalNotFound:!0,error:void 0}:{status:"notFound",error:m},isFetching:!1})),y=b,await ho(x,["notFoundComponent"])}else if(!t.preload){const b=t.matches[0];b.globalNotFound||t.router.getMatch(b.id)?.globalNotFound&&t.updateMatch(b.id,w=>({...w,globalNotFound:!1,error:void 0}))}if(t.serialError&&t.firstBadMatchIndex!==void 0){const b=t.router.looseRoutesById[t.matches[t.firstBadMatchIndex].routeId];await ho(b,["errorComponent"])}for(let b=0;b<=y;b++){const{id:w,routeId:x}=t.matches[b],k=t.router.looseRoutesById[x];try{const E=JS(t,w,k);if(E){const A=await E;t.updateMatch(w,M=>({...M,...A}))}}catch(E){console.error(`Error executing head for route ${x}:`,E)}}const g=_h(t);if(co(g)&&await g,m)throw m;if(t.serialError&&!t.preload&&!t.onReady)throw t.serialError;return t.matches}function Ry(e,t){const r=t.map(a=>e.options[a]?.preload?.()).filter(Boolean);if(r.length!==0)return Promise.all(r)}function ho(e,t=tc){!e._lazyLoaded&&e._lazyPromise===void 0&&(e.lazyFn?e._lazyPromise=e.lazyFn().then(a=>{const{id:l,...c}=a.options;Object.assign(e.options,c),e._lazyLoaded=!0,e._lazyPromise=void 0}):e._lazyLoaded=!0);const r=()=>e._componentsLoaded?void 0:t===tc?(()=>{if(e._componentsPromise===void 0){const a=Ry(e,tc);a?e._componentsPromise=a.then(()=>{e._componentsLoaded=!0,e._componentsPromise=void 0}):e._componentsLoaded=!0}return e._componentsPromise})():Ry(e,t);return e._lazyPromise?e._lazyPromise.then(r):r()}function s0(e){for(const t of tc)if(e.options[t]?.preload)return!0;return!1}var tc=["component","errorComponent","pendingComponent","notFoundComponent"],is="__TSR_index",Ay="popstate",ky="beforeunload";function XS(e){let t=e.getLocation();const r=new Set,a=u=>{t=e.getLocation(),r.forEach(h=>h({location:t,action:u}))},l=u=>{e.notifyOnIndexChange??!0?a(u):t=e.getLocation()},c=async({task:u,navigateOpts:h,...p})=>{if(h?.ignoreBlocker??!1){u();return}const m=e.getBlockers?.()??[],y=p.type==="PUSH"||p.type==="REPLACE";if(typeof document<"u"&&m.length&&y)for(const g of m){const b=lc(p.path,p.state);if(await g.blockerFn({currentLocation:t,nextLocation:b,action:p.type})){e.onBlocked?.();return}}u()};return{get location(){return t},get length(){return e.getLength()},subscribers:r,subscribe:u=>(r.add(u),()=>{r.delete(u)}),push:(u,h,p)=>{const m=t.state[is];h=Oy(m+1,h),c({task:()=>{e.pushState(u,h),a({type:"PUSH"})},navigateOpts:p,type:"PUSH",path:u,state:h})},replace:(u,h,p)=>{const m=t.state[is];h=Oy(m,h),c({task:()=>{e.replaceState(u,h),a({type:"REPLACE"})},navigateOpts:p,type:"REPLACE",path:u,state:h})},go:(u,h)=>{c({task:()=>{e.go(u),l({type:"GO",index:u})},navigateOpts:h,type:"GO"})},back:u=>{c({task:()=>{e.back(u?.ignoreBlocker??!1),l({type:"BACK"})},navigateOpts:u,type:"BACK"})},forward:u=>{c({task:()=>{e.forward(u?.ignoreBlocker??!1),l({type:"FORWARD"})},navigateOpts:u,type:"FORWARD"})},canGoBack:()=>t.state[is]!==0,createHref:u=>e.createHref(u),block:u=>{if(!e.setBlockers)return()=>{};const h=e.getBlockers?.()??[];return e.setBlockers([...h,u]),()=>{const p=e.getBlockers?.()??[];e.setBlockers?.(p.filter(m=>m!==u))}},flush:()=>e.flush?.(),destroy:()=>e.destroy?.(),notify:a}}function Oy(e,t){t||(t={});const r=Xh();return{...t,key:r,__TSR_key:r,[is]:e}}function ZS(e){const t=typeof document<"u"?window:void 0,r=t.history.pushState,a=t.history.replaceState;let l=[];const c=()=>l,u=F=>l=F,h=(F=>F),p=(()=>lc(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){const F=Xh();t.history.replaceState({[is]:0,key:F,__TSR_key:F},"")}let m=p(),y,g=!1,b=!1,w=!1,x=!1;const k=()=>m;let E,A;const M=()=>{E&&(I._ignoreSubscribers=!0,(E.isPush?t.history.pushState:t.history.replaceState)(E.state,"",E.href),I._ignoreSubscribers=!1,E=void 0,A=void 0,y=void 0)},N=(F,Z,le)=>{const ie=h(Z);A||(y=m),m=lc(Z,le),E={href:ie,state:le,isPush:E?.isPush||F==="push"},A||(A=Promise.resolve().then(()=>M()))},L=F=>{m=p(),I.notify({type:F})},X=async()=>
10{if(b){b=!1;return}const F=p(),Z=F.state[is]-m.state[is],le=Z===1,ie=Z===-1,ge=!le&&!ie||g;g=!1;const we=ge?"GO":ie?"BACK":"FORWARD",$e=ge?{type:"GO",index:Z}:{type:ie?"BACK":"FORWARD"};if(w)w=!1;else{const Me=c();if(typeof document<"u"&&Me.length){for(const z of Me)if(await z.blockerFn({currentLocation:m,nextLocation:F,action:we})){b=!0,t.history.go(1),I.notify($e);return}}}m=p(),I.notify($e)},Y=F=>{if(x){x=!1;return}let Z=!1;const le=c();if(typeof document<"u"&&le.length)for(const ie of le){const ge=ie.enableBeforeUnload??!0;if(ge===!0){Z=!0;break}if(typeof ge=="function"&&ge()===!0){Z=!0;break}}if(Z)return F.preventDefault(),F.returnValue=""},I=XS({getLocation:k,getLength:()=>t.history.length,pushState:(F,Z)=>N("push",F,Z),replaceState:(F,Z)=>N("replace",F,Z),back:F=>(F&&(w=!0),x=!0,t.history.back()),forward:F=>{F&&(w=!0),x=!0,t.history.forward()},go:F=>{g=!0,t.history.go(F)},createHref:F=>h(F),flush:M,destroy:()=>{t.history.pushState=r,t.history.replaceState=a,t.removeEventListener(ky,Y,{capture:!0}),t.removeEventListener(Ay,X)},onBlocked:()=>{y&&m!==y&&(m=y)},getBlockers:c,setBlockers:u,notifyOnIndexChange:!1});return t.addEventListener(ky,Y,{capture:!0}),t.addEventListener(Ay,X),t.history.pushState=function(...F){const Z=r.apply(t.history,F);return I._ignoreSubscribers||L("PUSH"),Z},t.history.replaceState=function(...F){const Z=a.apply(t.history,F);return I._ignoreSubscribers||L("REPLACE"),Z},I}function WS(e){let t=e.replace(/[\x00-\x1f\x7f]/g,"");return t.startsWith("//")&&(t="/"+t.replace(/^\/+/,"")),t}function lc(e,t){const r=WS(e),a=r.indexOf("#"),l=r.indexOf("?"),c=Xh();return{href:r,pathname:r.substring(0,a>0?l>0?Math.min(a,l):a:l>0?l:r.length),hash:a>-1?r.substring(a):"",search:l>-1?r.slice(l,a===-1?void 0:a):"",state:t||{[is]:0,key:c,__TSR_key:c}}}function Xh(){return(Math.random()+1).toString(36).substring(7)}function ex(e){return e instanceof Error?{name:e.name,message:e.message}:{data:e}}function Fa(e,t){const r=t,a=e;return{fromLocation:r,toLocation:a,pathChanged:r?.pathname!==a.pathname,hrefChanged:r?.href!==a.href,hashChanged:r?.hash!==a.hash}}var tx=class{constructor(e,t){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this.resetNextScroll=!0,this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.isScrollRestoring=!1,this.isScrollRestorationSetup=!1,this.startTransition=r=>r(),this.update=r=>{const a=this.options,l=this.basepath??a?.basepath??"/",c=this.basepath===void 0,u=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=OS(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=ZS()),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=uo(1e3),y=this.buildRouteTree(),this.setRoutes(y)}if(!this.stores&&this.latestLocation){const y=this.getStoreConfig(this);this.batch=y.batch,this.stores=KS(rx(this.latestLocation),y),LS(this)}let h=!1;const p=this.options.basepath??"/",m=this.options.rewrite;if(c||l!==p||u!==m){this.basepath=p;const y=[],g=Zv(p);g&&g!=="/"&&y.push($S({basepath:p})),m&&y.push(m),this.rewrite=y.length===0?void 0:y.length===1?y[0]:qS(y),this.history&&this.updateLatestLocation(),h=!0}h&&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=SS(this.routeTree,this.options.caseSensitive,(a,l)=>{a.init({originalIndex:l})});return this.options.routeMasks&&yS(this.options.routeMasks,r.processedTree),r},this.subscribe=(r,a)=>{const l={eventType:r,fn:a};return this.subscribers.add(l),()=>{this.subscribers.delete(l)}},this.emit=r=>
10{this.subscribers.forEach(a=>{a.eventType===r.type&&a.fn(r)})},this.parseLocation=(r,a)=>{const l=({pathname:p,search:m,hash:y,href:g,state:b})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(p)){const A=this.options.parseSearch(m),M=this.options.stringifySearch(A);return{href:p+M+y,publicHref:p+M+y,pathname:Fi(p).path,external:!1,searchStr:M,search:Ds(a?.search,A),hash:Fi(y.slice(1)).path,state:Ps(a?.state,b)}}const w=new URL(g,this.origin),x=wh(this.rewrite,w),k=this.options.parseSearch(x.search),E=this.options.stringifySearch(k);return x.search=E,{href:x.href.replace(x.origin,""),publicHref:g,pathname:Fi(x.pathname).path,external:!!this.rewrite&&x.origin!==this.origin,searchStr:E,search:Ds(a?.search,k),hash:Fi(x.hash.slice(1)).path,state:Ps(a?.state,b)}},c=l(r),{__tempLocation:u,__tempKey:h}=c.state;if(u&&(!h||h===this.tempLocationKey)){const p=l(u);return p.state.key=c.state.key,p.state.__TSR_key=c.state.__TSR_key,delete p.state.__tempLocation,{...p,maskedLocation:c}}return c},this.resolvePathWithBase=(r,a)=>kS({base:r,to:Jh(a),trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(r,a,l)=>typeof r=="string"?this.matchRoutesInternal({pathname:r,search:a},l):this.matchRoutesInternal(r,a),this.getMatchedRoutes=r=>sx({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=(c={})=>{const u=c._fromLocation||this.pendingBuiltLocation||this.latestLocation,h=this.matchRoutesLightweight(u);c.from;const p=c.unsafeRelative==="path"?u.pathname:c.from??h.fullPath,m=this.resolvePathWithBase(p,"."),y=h.search,g=Object.assign(Object.create(null),h.params),b=c.to?this.resolvePathWithBase(m,`${c.to}`):this.resolvePathWithBase(m,"."),w=c.params===!1||c.params===null?Object.create(null):(c.params??!0)===!0?g:Object.assign(g,ns(c.params,g)),x=this.getMatchedRoutes(b);let k=x.matchedRoutes;if((!x.foundRoute||x.foundRoute.path!=="/"&&x.routeParams["**"])&&this.options.notFoundRoute&&(k=[...k,this.options.notFoundRoute]),Object.keys(w).length>0)for(const le of k){const ie=le.options.params?.stringify??le.options.stringifyParams;if(ie)try{Object.assign(w,ie(w))}catch{}}const E=r.leaveParams?b:Fi(vy({path:b,params:w,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path;let A=y;if(r._includeValidateSearch&&this.options.search?.strict){const le={};k.forEach(ie=>{if(ie.options.validateSearch)try{Object.assign(le,nc(ie.options.validateSearch,{...le,...A}))}catch{}}),A=le}A=ax({search:A,dest:c,destRoutes:k,_includeValidateSearch:r._includeValidateSearch}),A=Ds(y,A);const M=this.options.stringifySearch(A),N=c.hash===!0?u.hash:c.hash?ns(c.hash,u.hash):void 0,L=N?`#${N}`:"";let X=c.state===!0?u.state:c.state?ns(c.state,u.state):{};X=Ps(u.state,X);const Y=`${E}${M}${L}`;let I,F,Z=!1;if(this.rewrite){const le=new URL(Y,this.origin),ie=e0(this.rewrite,le);I=le.href.replace(le.origin,""),ie.origin!==this.origin?(F=ie.href,Z=!0):F=ie.pathname+ie.search+ie.hash}else I=pS(Y),F=I;return{publicHref:F,href:I,pathname:E,search:A,searchStr:M,state:X,hash:N??"",external:Z,unmaskOnReload:c.unmaskOnReload}},l=(c={},u)=>{const h=a(c);let p=u?a(u):void 0;if(!p){const m=Object.create(null);if(this.options.routeMasks){const y=vS(h.pathname,this.processedTree);if(y){Object.assign(m,y.rawParams);const{from:g,params:b,...w}=y.route,x=b===!1||b===null?Object.create(null):(b??!0)===!0?m:Object.assign(m,ns(b,m));u={from:r.from,...w,params:x},p=a(u)}}}return p&&(h.maskedLocation=p),h};return r.mask?l(r,{from:r.from,...r.mask}):l(r)},this.commitLocation=async({viewTransition:r,ignoreBlocker:a,...l})=>{const c=()=>{const p=["key","__TSR_key","__TSR_index","__hashScrollIntoViewOptions"];p.forEach(y=>{l.state[y]=this.latestLocation.state[y]});const m=Qt(l.state,this.latestLocation.state);return p.forEach(y=>{delete l.state[y]}),m},u=as(this.latestLocation.href)===as(l.href);let h=this.commitLocationPromise;if(this.commitLocationPromise=Vs(()=>{h?.resolve(),h=void 0}),u&&c())this.load();else{let{maskedLocation:p,hashScrollIntoView:m,...y}=l;p&&(y={...p,state:{...p.state,__tempKey:void 0,__tempLocation:{...y,search:y.searchStr,state:{...y.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(y.unmaskOnReload??this.options.unmaskOnReload??!1)&&(y.state.__tempKey=this.tempLocationKey)),y.state.__hashScrollIntoViewOptions=m??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=r,this.history[l.replace?"replace":"push"](y.publicHref,y.state,{ignoreBlocker:a})}return this.resetNextScroll=l.resetScroll??!0,this.history.subscribers.size||this.load(),this.commitLocationPromise},this.buildAndCommitLocation=({replace:r,resetScroll:a,hashScrollIntoView:l,viewTransition:c,ignoreBlocker:u,href:h,...p}={})=>
10{if(h){const g=this.history.location.state.__TSR_index,b=lc(h,{__TSR_index:r?g:g+1}),w=new URL(b.pathname,this.origin);p.to=wh(this.rewrite,w).pathname,p.search=this.options.parseSearch(b.search),p.hash=b.hash.slice(1)}const m=this.buildLocation({...p,_includeValidateSearch:!0});this.pendingBuiltLocation=m;const y=this.commitLocation({...m,viewTransition:c,replace:r,resetScroll:a,hashScrollIntoView:l,ignoreBlocker:u});return Promise.resolve().then(()=>{this.pendingBuiltLocation===m&&(this.pendingBuiltLocation=void 0)}),y},this.navigate=async({to:r,reloadDocument:a,href:l,publicHref:c,...u})=>{let h=!1;if(l)try{new URL(`${l}`),h=!0}catch{}if(h&&!a&&(a=!0),a){if(r!==void 0||!l){const m=this.buildLocation({to:r,...u});l=l??m.publicHref,c=c??m.publicHref}const p=!h&&c?c:l;if(ic(p,this.protocolAllowlist))return Promise.resolve();if(!u.ignoreBlocker){const m=this.history.getBlockers?.()??[];for(const y of m)if(y?.blockerFn&&await y.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return Promise.resolve()}return u.replace?window.location.replace(p):window.location.href=p,Promise.resolve()}return this.buildAndCommitLocation({...u,href:l,to:r,_isNavigate:!0})},this.beforeLoad=()=>{this.cancelMatches(),this.updateLatestLocation();const r=this.matchRoutes(this.latestLocation),a=this.stores.cachedMatches.get().filter(l=>!r.some(c=>c.id===l.id));this.batch(()=>{this.stores.status.set("pending"),this.stores.statusCode.set(200),this.stores.isLoading.set(!0),this.stores.location.set(this.latestLocation),this.stores.setPending(r),this.stores.setCached(a)})},this.load=async r=>{let a,l,c;const u=this.stores.resolvedLocation.get()??this.stores.location.get();for(c=new Promise(p=>{this.startTransition(async()=>{try{this.beforeLoad();const m=this.latestLocation,y=Fa(m,this.stores.resolvedLocation.get());this.stores.redirect.get()||this.emit({type:"onBeforeNavigate",...y}),this.emit({type:"onBeforeLoad",...y}),await Ty({router:this,sync:r?.sync,forceStaleReload:u.href===m.href,matches:this.stores.pendingMatches.get(),location:m,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{let g=null,b=null,w=null,x=null;this.batch(()=>{const k=this.stores.pendingMatches.get(),E=k.length,A=this.stores.matches.get();g=E?A.filter(L=>!this.stores.pendingMatchStores.has(L.id)):null;const M=new Set;for(const L of this.stores.pendingMatchStores.values())L.routeId&&M.add(L.routeId);const N=new Set;for(const L of this.stores.matchStores.values())L.routeId&&N.add(L.routeId);b=E?A.filter(L=>!M.has(L.routeId)):null,w=E?k.filter(L=>!N.has(L.routeId)):null,x=E?k.filter(L=>N.has(L.routeId)):A,this.stores.isLoading.set(!1),this.stores.loadedAt.set(Date.now()),E&&(this.stores.setMatches(k),this.stores.setPending([]),this.stores.setCached([...this.stores.cachedMatches.get(),...g.filter(L=>L.status!=="error"&&L.status!=="notFound"&&L.status!=="redirected")]),this.clearExpiredCache())});for(const[k,E]of[[b,"onLeave"],[w,"onEnter"],[x,"onStay"]])if(k)for(const A of k)this.looseRoutesById[A.routeId].options[E]?.(A)})})}})}catch(m){Xt(m)?(a=m,this.navigate({...a.options,replace:!0,ignoreBlocker:!0})):vt(m)&&(l=m);const y=a?a.status:l?404:this.stores.matches.get().some(g=>g.status==="error")?500:200;this.batch(()=>{this.stores.statusCode.set(y),this.stores.redirect.set(a)})}this.latestLoadPromise===c&&(this.commitLocationPromise?.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),p()})}),this.latestLoadPromise=c,await c;this.latestLoadPromise&&c!==this.latestLoadPromise;)await this.latestLoadPromise;let h;this.hasNotFoundMatch()?h=404:this.stores.matches.get().some(p=>p.status==="error")&&(h=500),h!==void 0&&this.stores.statusCode.set(h)},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 l;if(typeof a=="object"&&this.isViewTransitionTypesSupported){const c=this.latestLocation,u=this.stores.resolvedLocation.get(),h=typeof a.types=="function"?a.types(Fa(c,u)):a.types;if(h===!1){r();return}l={update:r,types:h}}else l=r;document.startViewTransition(l)}else r()},this.updateMatch=(r,a)=>{this.startTransition(()=>
10{const l=this.stores.pendingMatchStores.get(r);if(l){l.set(a);return}const c=this.stores.matchStores.get(r);if(c){c.set(a);return}const u=this.stores.cachedMatchStores.get(r);if(u){const h=a(u.get());h.status==="redirected"?this.stores.cachedMatchStores.delete(r)&&this.stores.cachedIds.set(p=>p.filter(m=>m!==r)):u.set(h)}})},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=l=>r?.filter?.(l)??!0?{...l,invalid:!0,...r?.forcePending||l.status==="error"||l.status==="notFound"?{status:"pending",error:void 0}:void 0}:l;return this.batch(()=>{this.stores.setMatches(this.stores.matches.get().map(a)),this.stores.setCached(this.stores.cachedMatches.get().map(a)),this.stores.setPending(this.stores.pendingMatches.get().map(a))}),this.shouldViewTransition=!1,this.load({sync:r?.sync})},this.getParsedLocationHref=r=>r.publicHref||"/",this.resolveRedirect=r=>{const a=r.headers.get("Location");if(!r.options.href||r.options._builtLocation){const l=r.options._builtLocation??this.buildLocation(r.options),c=this.getParsedLocationHref(l);r.options.href=c,r.headers.set("Location",c)}else if(a)try{const l=new URL(a);if(this.origin&&l.origin===this.origin){const c=l.pathname+l.search+l.hash;r.options.href=c,r.headers.set("Location",c)}}catch{}if(r.options.href&&!r.options._builtLocation&&ic(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(l=>!a(l))):this.stores.setCached([])},this.clearExpiredCache=()=>{const r=Date.now(),a=l=>{const c=this.looseRoutesById[l.routeId];if(!c.options.loader)return!0;const u=(l.preload?c.options.preloadGcTime??this.options.defaultPreloadGcTime:c.options.gcTime??this.options.defaultGcTime)??300*1e3;return l.status==="error"?!0:r-l.updatedAt>=u};this.clearCache({filter:a})},this.loadRouteChunk=ho,this.preloadRoute=async r=>{const a=r._builtLocation??this.buildLocation(r);let l=this.matchRoutes(a,{throwOnError:!0,preload:!0,dest:r});const c=new Set([...this.stores.matchesId.get(),...this.stores.pendingIds.get()]),u=new Set([...c,...this.stores.cachedIds.get()]),h=l.filter(p=>!u.has(p.id));if(h.length){const p=this.stores.cachedMatches.get();this.stores.setCached([...p,...h])}try{return l=await Ty({router:this,matches:l,location:a,preload:!0,updateMatch:(p,m)=>{c.has(p)?l=l.map(y=>y.id===p?m(y):y):this.updateMatch(p,m)}}),l}catch(p){if(Xt(p))return p.options.reloadDocument?void 0:await this.preloadRoute({...p.options,_fromLocation:a});vt(p)||console.error(p);return}},this.matchRoute=(r,a)=>{const l={...r,to:r.to?this.resolvePathWithBase(r.from||"",r.to):void 0,params:r.params||{},leaveParams:!0},c=this.buildLocation(l);if(a?.pending&&this.stores.status.get()!=="pending")return!1;const u=(a?.pending===void 0?!this.stores.isLoading.get():a.pending)?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),h=bS(c.pathname,a?.caseSensitive??!1,a?.fuzzy??!1,u.pathname,this.processedTree);return!h||r.params&&!Qt(h.rawParams,r.params,{partial:!0})?!1:a?.includeSearch??!0?Qt(u.search,c.search,{partial:!0})?h.rawParams:!1:h.rawParams},this.hasNotFoundMatch=()=>this.stores.matches.get().some(r=>r.status==="notFound"||r.globalNotFound),this.getStoreConfig=t,this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...e,caseSensitive:e.caseSensitive??!1,notFoundMode:e.notFoundMode??"fuzzy",stringifySearch:e.stringifySearch??PS,parseSearch:e.parseSearch??zS,protocolAllowlist:e.protocolAllowlist??uS}),typeof document<"u"&&(self.__TSR_ROUTER__=this)}isShell(){return!!this.options.isShell}isPrerendering(){return!!this.options.isPrerendering}get state(){return this.stores.__store.get()}setRoutes({routesById:e,routesByPath:t,processedTree:r}){this.routesById=e,this.routesByPath=t,this.processedTree=r;const a=this.options.notFoundRoute;a&&(a.init({originalIndex:99999999999}),this.routesById[a.id]=a)}get looseRoutesById(){return this.routesById}getParentContext(e){return e?.id?e.context??this.options.context??void 0:this.options.context??void 0}matchRoutesInternal(e,t){const r=this.getMatchedRoutes(e.pathname),{foundRoute:a,routeParam
10s:l,parsedParams:c}=r;let{matchedRoutes:u}=r,h=!1;(a?a.path!=="/"&&l["**"]:as(e.pathname))&&(this.options.notFoundRoute?u=[...u,this.options.notFoundRoute]:h=!0);const p=h?ox(this.options.notFoundMode,u):void 0,m=new Array(u.length),y=new Map;for(const g of this.stores.matchStores.values())g.routeId&&y.set(g.routeId,g.get());for(let g=0;g<u.length;g++){const b=u[g],w=m[g-1];let x,k,E;{const we=w?.search??e.search,$e=w?._strictSearch??void 0;try{const Me=nc(b.options.validateSearch,{...we})??void 0;x={...we,...Me},k={...$e,...Me},E=void 0}catch(Me){let z=Me;if(Me instanceof cc||(z=new cc(Me.message,{cause:Me})),t?.throwOnError)throw z;x=we,k={},E=z}}const A=b.options.loaderDeps?.({search:x})??"",M=A?JSON.stringify(A):"",{interpolatedPath:N,usedParams:L}=vy({path:b.fullPath,params:l,decoder:this.pathParamsDecoder,server:this.isServer}),X=b.id+N+M,Y=this.getMatch(X),I=y.get(b.id),F=Y?._strictParams??L;let Z;if(!Y)try{Cy(b,L,c,F)}catch(we){if(vt(we)||Xt(we)?Z=we:Z=new nx(we.message,{cause:we}),t?.throwOnError)throw Z}Object.assign(l,F);const le=I?"stay":"enter";let ie;if(Y)ie={...Y,cause:le,params:I?.params??l,_strictParams:F,search:Ds(I?I.search:Y.search,x),_strictSearch:k};else{const we=b.options.loader||b.options.beforeLoad||b.lazyFn||s0(b)?"pending":"success";ie={id:X,ssr:b.options.ssr,index:g,routeId:b.id,params:I?.params??l,_strictParams:F,pathname:N,updatedAt:Date.now(),search:I?Ds(I.search,x):x,_strictSearch:k,searchError:void 0,status:we,isFetching:!1,error:void 0,paramsError:Z,__routeContext:void 0,_nonReactive:{loadPromise:Vs()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:le,loaderDeps:I?Ps(I.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}}t?.preload||(ie.globalNotFound=p===b.id),ie.searchError=E;const ge=this.getParentContext(w);ie.context={...ge,...ie.__routeContext,...ie.__beforeLoadContext},m[g]=ie}for(let g=0;g<m.length;g++){const b=m[g],w=this.looseRoutesById[b.routeId],x=this.getMatch(b.id),k=y.get(b.routeId);if(b.params=k?Ds(k.params,l):l,!x){const E=m[g-1],A=this.getParentContext(E);if(w.options.context){const M={deps:b.loaderDeps,params:b.params,context:A??{},location:e,navigate:N=>this.navigate({...N,_fromLocation:e}),buildLocation:this.buildLocation,cause:b.cause,abortController:b.abortController,preload:!!b.preload,matches:m,routeId:w.id};b.__routeContext=w.options.context(M)??void 0}b.context={...A,...b.__routeContext,...b.__beforeLoadContext}}}return m}matchRoutesLightweight(e){const{matchedRoutes:t,routeParams:r,parsedParams:a}=this.getMatchedRoutes(e.pathname),l=lo(t),c={...e.search};for(const y of t)try{Object.assign(c,nc(y.options.validateSearch,c))}catch{}const u=lo(this.stores.matchesId.get()),h=u&&this.stores.matchStores.get(u)?.get(),p=h&&h.routeId===l.id&&h.pathname===e.pathname;let m;if(p)m=h.params;else{const y=Object.assign(Object.create(null),r);for(const g of t)try{Cy(g,r,a??{},y)}catch{}m=y}return{matchedRoutes:t,fullPath:l.fullPath,search:c,params:m}}},cc=class extends Error{},nx=class extends Error{};function rx(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:e,matches:[],statusCode:200}}function nc(e,t){if(e==null)return{};if("~standard"in e){const r=e["~standard"].validate(t);if(r instanceof Promise)throw new cc("Async validation not supported");if(r.issues)throw new cc(JSON.stringify(r.issues,void 0,2),{cause:r});return r.value}return"parse"in e?e.parse(t):typeof e=="function"?e(t):{}}function sx({pathname:e,routesById:t,processedTree:r}){const a=Object.create(null),l=as(e);let c,u;const h=wS(l,r,!0);return h&&(c=h.route,Object.assign(a,h.rawParams),u=Object.assign(Object.create(null),h.parsedParams)),{matchedRoutes:h?.branch||[t.__root__],routeParams:a,foundRoute:c,parsedParams:u}}function ax({search:e,dest:t,destRoutes:r,_includeValidateSearch:a}){return ix(r)(e,t,a??!1)}function ix(e){const t={dest:null,_includeValidateSearch:!1,middlewares:[]};for(const l of e){if("search"in l.options)l.options.search?.middlewares&&t.middlewares.push(...l.options.search.middlewares);else if(l.options.preSearchFilters||l.options.postSearchFilters){const c=({search:u,next:h})=>{let p=u;
10"preSearchFilters"in l.options&&l.options.preSearchFilters&&(p=l.options.preSearchFilters.reduce((y,g)=>g(y),u));const m=h(p);return"postSearchFilters"in l.options&&l.options.postSearchFilters?l.options.postSearchFilters.reduce((y,g)=>g(y),m):m};t.middlewares.push(c)}if(l.options.validateSearch){const c=({search:u,next:h})=>{const p=h(u);if(!t._includeValidateSearch)return p;try{return{...p,...nc(l.options.validateSearch,p)??void 0}}catch{return p}};t.middlewares.push(c)}}const r=({search:l})=>{const c=t.dest;return c.search?c.search===!0?l:ns(c.search,l):{}};t.middlewares.push(r);const a=(l,c,u)=>{if(l>=u.length)return c;const h=u[l];return h({search:c,next:m=>a(l+1,m,u)})};return function(c,u,h){return t.dest=u,t._includeValidateSearch=h,a(0,c,t.middlewares)}}function ox(e,t){if(e!=="root")for(let r=t.length-1;r>=0;r--){const a=t[r];if(a.children)return a.id}return $s}function Cy(e,t,r,a){const l=e.options.params?.parse??e.options.parseParams;if(l)if(e.options.skipRouteOnParseError)for(const c in t)c in r&&(a[c]=r[c]);else{const c=l(a);Object.assign(a,c)}}var Fn=Symbol.for("TSR_DEFERRED_PROMISE");function lx(e,t){const r=e;return r[Fn]||(r[Fn]={status:"pending"},r.then(a=>{r[Fn].status="success",r[Fn].data=a}).catch(a=>{r[Fn].status="error",r[Fn].error={data:ex(a),__isServerError:!0}})),r}var cx="Error preloading route! ☝️";function jy(e,t){if(e)return typeof e=="string"?e:e[t]}function ux(e){return typeof e=="string"?{href:e,crossOrigin:void 0}:e}function dx(e){if(e.tag!=="link")return;const t=e.attrs?.rel,r=e.attrs?.href;if(typeof r=="string"&&(typeof t=="string"?t.split(/\s+/):[]).includes("stylesheet"))return r}function hx(e,t){const r=dx(t);return!!r&&e?.inlineCss?.styles[r]!==void 0}var a0=class{get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(e){if(this.init=t=>{this.originalIndex=t.originalIndex;const r=this.options,a=!r?.path&&!r?.id;this.parentRoute=this.options.getParentRoute?.(),a?this._path=$s:this.parentRoute||Zt();let l=a?$s:r?.path;l&&l!=="/"&&(l=Xv(l));const c=r?.id||l;let u=a?$s:ec([this.parentRoute.id==="__root__"?"":this.parentRoute.id,c]);l==="__root__"&&(l="/"),u!=="__root__"&&(u=ec(["/",u]));const h=u==="__root__"?"/":ec([this.parentRoute.fullPath,l]);this._path=l,this._id=u,this._fullPath=h,this._to=as(h)},this.addChildren=t=>this._addFileChildren(t),this._addFileChildren=t=>(Array.isArray(t)&&(this.children=t),typeof t=="object"&&t!==null&&(this.children=Object.values(t)),this),this._addFileTypes=()=>this,this.updateLoader=t=>(Object.assign(this.options,t),this),this.update=t=>(Object.assign(this.options,t),this),this.lazy=t=>(this.lazyFn=t,this),this.redirect=t=>Qh({from:this.fullPath,...t}),this.options=e||{},this.isRoot=!e?.getParentRoute,e?.id&&e?.path)throw new Error("Route cannot have both an 'id' and a 'path' option.")}},fx=class extends a0{constructor(e){super(e)}};function px(e){if(typeof document<"u"&&document.querySelector){const t=e.stores.location.get(),r=t.state.__hashScrollIntoViewOptions??!0;if(r&&t.hash!==""){const a=document.getElementById(t.hash);a&&a.scrollIntoView(r)}}}var mx=(e=>(e[e.AggregateError=1]="AggregateError",e[e.ArrowFunction=2]="ArrowFunction",e[e.ErrorPrototypeStack=4]="ErrorPrototypeStack",e[e.ObjectAssign=8]="ObjectAssign",e[e.BigIntTypedArray=16]="BigIntTypedArray",e[e.RegExp=32]="RegExp",e))(mx||{}),Sr=Symbol.asyncIterator,i0=Symbol.hasInstance,Ja=Symbol.isConcatSpreadable,xr=Symbol.iterator,o0=Symbol.match,l0=Symbol.matchAll,c0=Symbol.replace,u0=Symbol.search,d0=Symbol.species,h0=Symbol.split,f0=Symbol.toPrimitive,Qa=Symbol.toStringTag,p0=Symbol.unscopables,m0={[Sr]:0,[i0]:1,[Ja]:2,[xr]:3,[o0]:4,[l0]:5,[c0]:6,[u0]:7,[d0]:8,[h0]:9,[f0]:10,[Qa]:11,[p0]:12},gx={0:Sr,1:i0,2:Ja,3:xr,4:o0,5:l0,6:c0,7:u0,8:d0,9:h0,10:f0,11:Qa,12:p0},R=void 0,yx={2:!0,3:!1,1:R,0:null,4:-0,5:Number.POSITIVE_INFINITY,6:Number.NEGATIVE_INFINITY,7:Number.NaN},vx={0:"Error",1:"EvalError",2:"RangeError",3:"ReferenceError",4:"SyntaxError",5:"TypeError",6:"URIError"},bx={0:Error,1:EvalError,2:RangeError,3:ReferenceError,4:SyntaxError,5:TypeError,6:URIError};function Ne(e,t,r,a,l,c,u,h,p,m,y,g){return{t:e,i:t,s:r,c:a,m:l,p:c,e:u,a:h,f:p,b:m,o:y,l:g}}function os(e){return Ne(2,R,e,R,R,R,R,R,R,R,R,R)}var g0=os(2),y0=os(3),wx=os(1),_x=os(0),Sx=os(4),xx=os(5),Ex=os(6),Tx=os(7);function Rx(e){switch(e){case'"':return'\\"';case"\\":return"\\\\";case`
11`:return"\\n";case"\r":return"\\r";case"\b":return"\\b";case"	":return"\\t";case"\f":return"\\f";case"<":return"\\x3C";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:return R}}function ls(e){let t="",r=0,a;for(let l=0,c=e.length;l<c;l++)a=Rx(e[l]),a&&(t+=e.slice(r,l)+a,r=l+1);return r===0?t=e:t+=e.slice(r),t}function Ax(e){switch(e){case"\\\\":return"\\";case'\\"':return'"';case"\\n":return`
12`;case"\\r":return"\r";case"\\b":return"\b";case"\\t":return"	";case"\\f":return"\f";case"\\x3C":return"<";case"\\u2028":return"\u2028";case"\\u2029":return"\u2029";default:return e}}function cs(e){return e.replace(/(\\\\|\\"|\\n|\\r|\\b|\\t|\\f|\\u2028|\\u2029|\\x3C)/g,Ax)}var ql="__SEROVAL_REFS__",v0=new Map,Ga=new Map;function b0(e){return v0.has(e)}function kx(e){return Ga.has(e)}function Ox(e){if(b0(e))return v0.get(e);throw new i1(e)}function Cx(e){if(kx(e))return Ga.get(e);throw new o1(e)}typeof globalThis<"u"?Object.defineProperty(globalThis,ql,{value:Ga,configurable:!0,writable:!1,enumerable:!1}):typeof window<"u"?Object.defineProperty(window,ql,{value:Ga,configurable:!0,writable:!1,enumerable:!1}):typeof self<"u"?Object.defineProperty(self,ql,{value:Ga,configurable:!0,writable:!1,enumerable:!1}):typeof global<"u"&&Object.defineProperty(global,ql,{value:Ga,configurable:!0,writable:!1,enumerable:!1});function Zh(e){return e instanceof EvalError?1:e instanceof RangeError?2:e instanceof ReferenceError?3:e instanceof SyntaxError?4:e instanceof TypeError?5:e instanceof URIError?6:0}function jx(e){let t=vx[Zh(e)];return e.name!==t?{name:e.name}:e.constructor.name!==t?{name:e.constructor.name}:{}}function w0(e,t){let r=jx(e),a=Object.getOwnPropertyNames(e);for(let l=0,c=a.length,u;l<c;l++)u=a[l],u!=="name"&&u!=="message"&&(u==="stack"?t&4&&(r=r||{},r[u]=e[u]):(r=r||{},r[u]=e[u]));return r}function _0(e){return Object.isFrozen(e)?3:Object.isSealed(e)?2:Object.isExtensible(e)?0:1}
12function Nx(e){switch(e){case Number.POSITIVE_INFINITY:return xx;case Number.NEGATIVE_INFINITY:return Ex}return e!==e?Tx:Object.is(e,-0)?Sx:Ne(0,R,e,R,R,R,R,R,R,R,R,R)}function S0(e){return Ne(1,R,ls(e),R,R,R,R,R,R,R,R,R)}function Mx(e){return Ne(3,R,""+e,R,R,R,R,R,R,R,R,R)}function Dx(e){return Ne(4,e,R,R,R,R,R,R,R,R,R,R)}function Lx(e,t){let r=t.valueOf();return Ne(5,e,r!==r?"":t.toISOString(),R,R,R,R,R,R,R,R,R)}function Ux(e,t){return Ne(6,e,R,ls(t.source),t.flags,R,R,R,R,R,R,R)}function zx(e,t){return Ne(17,e,m0[t],R,R,R,R,R,R,R,R,R)}function Px(e,t){return Ne(18,e,ls(Ox(t)),R,R,R,R,R,R,R,R,R)}function Bx(e,t,r){return Ne(25,e,r,ls(t),R,R,R,R,R,R,R,R)}function Hx(e,t,r){return Ne(9,e,R,R,R,R,R,r,R,R,_0(t),R)}function Ix(e,t){return Ne(21,e,R,R,R,R,R,R,t,R,R,R)}function qx(e,t,r){return Ne(15,e,R,t.constructor.name,R,R,R,R,r,t.byteOffset,R,t.length)}function $x(e,t,r){return Ne(16,e,R,t.constructor.name,R,R,R,R,r,t.byteOffset,R,t.byteLength)}function Kx(e,t,r){return Ne(20,e,R,R,R,R,R,R,r,t.byteOffset,R,t.byteLength)}function Vx(e,t,r){return Ne(13,e,Zh(t),R,ls(t.message),r,R,R,R,R,R,R)}function Gx(e,t,r){return Ne(14,e,Zh(t),R,ls(t.message),r,R,R,R,R,R,R)}function Yx(e,t){return Ne(7,e,R,R,R,R,R,t,R,R,R,R)}function Fx(e,t){return Ne(28,R,R,R,R,R,R,[e,t],R,R,R,R)}function Jx(e,t){return Ne(30,R,R,R,R,R,R,[e,t],R,R,R,R)}function Qx(e,t,r){return Ne(31,e,R,R,R,R,R,r,t,R,R,R)}function Xx(e,t){return Ne(32,e,R,R,R,R,R,R,t,R,R,R)}function Zx(e,t){return Ne(33,e,R,R,R,R,R,R,t,R,R,R)}function Wx(e,t){return Ne(34,e,R,R,R,R,R,R,t,R,R,R)}function e1(e,t,r,a){return Ne(35,e,r,R,R,R,R,t,R,R,R,a)}var t1={parsing:1,serialization:2,deserialization:3};function n1(e){return`Seroval Error (step: ${t1[e]})`}var r1=(e,t)=>n1(e),x0=class extends Error{constructor(e,t){super(r1(e)),this.cause=t}},Ny=class extends x0{constructor(e){super("parsing",e)}},s1=class extends x0{constructor(e){super("deserialization",e)}};function Er(e){return`Seroval Error (specific: ${e})`}var xc=class extends Error{constructor(t){super(Er(1)),this.value=t}},E0=class extends Error{constructor(t){super(Er(2))}},a1=class extends Error{constructor(e){super(Er(3))}},Eo=class extends Error{constructor(e){super(Er(4))}},i1=class extends Error{constructor(e){super(Er(5)),this.value=e}},o1=class extends Error{constructor(e){super(Er(6))}},l1=class extends Error{constructor(e){super(Er(7))}},us=class extends Error{constructor(e){super(Er(8))}},c1=class extends Error{constructor(t){super(Er(9))}},u1=class{constructor(e,t){this.value=e,this.replacement=t}},Ec=()=>{let e={p:0,s:0,f:0};return e.p=new Promise((t,r)=>{e.s=t,e.f=r}),e},d1=(e,t)=>{e.s(t),e.p.s=1,e.p.v=t},h1=(e,t)=>{e.f(t),e.p.s=2,e.p.v=t};Ec.toString();d1.toString();h1.toString();var f1=()=>{let e=[],t=[],r=!0,a=!1,l=0,c=(p,m,y)=>{for(y=0;y<l;y++)t[y]&&t[y][m](p)},u=(p,m,y,g)=>{for(m=0,y=e.length;m<y;m++)g=e[m],!r&&m===y-1?p[a?"return":"throw"](g):p.next(g)},h=(p,m)=>(r&&(m=l++,t[m]=p),u(p),()=>{r&&(t[m]=t[l],t[l--]=void 0)});return{__SEROVAL_STREAM__:!0,on:p=>h(p),next:p=>{r&&(e.push(p),c(p,"next"))},throw:p=>{r&&(e.push(p),c(p,"throw"),r=!1,a=!1,t.length=0)},return:p=>{r&&(e.push(p),c(p,"return"),r=!1,a=!0,t.length=0)}}},p1=e=>t=>()=>{let r=0,a={[e]:()=>a,next:()=>{if(r>t.d)return{done:!0,value:void 0};let l=r++,c=t.v[l];if(l===t.t)throw c;return{done:l===t.d,value:c}}};return a},m1=(e,t)=>r=>()=>{let a=0,l=-1,c=!1,u=[],h=[],p=(y=0,g=h.length)=>{for(;y<g;y++)h[y].s({done:!0,value:void 0})};r.on({next:y=>{let g=h.shift();g&&g.s({done:!1,value:y}),u.push(y)},throw:y=>{let g=h.shift();g&&g.f(y),p(),l=u.length,c=!0,u.push(y)},return:y=>{let g=h.shift();g&&g.s({done:!0,value:y}),p(),l=u.length,u.push(y)}});let m={[e]:()=>m,next:()=>{if(l===-1){let b=a++;if(b>=u.length){let w=t();return h.push(w),w.p}return{done:!1,value:u[b]}}if(a>l)return{done:!0,value:void 0};let y=a++,g=u[y];if(y!==l)return{done:!1,value:g};if(c)throw g;return{done:!0,value:g}}};return m},T0=e=>{let t=atob(e),r=t.length,a=new Uint8Array(r);for(let l=0;l<r;l++)a[l]=t.charCodeAt(l);return a.buffer};T0.toString();
12function g1(e){return"__SEROVAL_SEQUENCE__"in e}function R0(e,t,r){return{__SEROVAL_SEQUENCE__:!0,v:e,t,d:r}}function y1(e){let t=[],r=-1,a=-1,l=e[xr]();for(;;)try{let c=l.next();if(t.push(c.value),c.done){a=t.length-1;break}}catch(c){r=t.length,t.push(c)}return R0(t,r,a)}var v1=p1(xr);function b1(e){return v1(e)}var w1={},_1={},S1={0:{},1:{},2:{},3:{},4:{},5:{}};function Tc(e){return"__SEROVAL_STREAM__"in e}function Gs(){return f1()}function x1(e){let t=Gs(),r=e[Sr]();async function a(){try{let l=await r.next();l.done?t.return(l.value):(t.next(l.value),await a())}catch(l){t.throw(l)}}return a().catch(()=>{}),t}var E1=m1(Sr,Ec);function T1(e){return E1(e)}async function R1(e){try{return[1,await e]}catch(t){return[0,t]}}function A1(e,t){return{plugins:t.plugins,mode:e,marked:new Set,features:63^(t.disabledFeatures||0),refs:t.refs||new Map,depthLimit:t.depthLimit||1e3}}function rc(e,t){e.marked.add(t)}function k1(e,t){let r=e.refs.size;return e.refs.set(t,r),r}function Rc(e,t){let r=e.refs.get(t);return r!=null?(rc(e,r),{type:1,value:Dx(r)}):{type:0,value:k1(e,t)}}function Wh(e,t){let r=Rc(e,t);return r.type===1?r:b0(t)?{type:2,value:Px(r.value,t)}:r}function Hs(e,t){let r=Wh(e,t);if(r.type!==0)return r.value;if(t in m0)return zx(r.value,t);throw new xc(t)}function Ac(e,t){let r=Rc(e,S1[t]);return r.type===1?r.value:Ne(26,r.value,t,R,R,R,R,R,R,R,R,R)}function O1(e){let t=Rc(e,w1);return t.type===1?t.value:Ne(27,t.value,R,R,R,R,R,R,Hs(e,xr),R,R,R)}function C1(e){let t=Rc(e,_1);return t.type===1?t.value:Ne(29,t.value,R,R,R,R,R,[Ac(e,1),Hs(e,Sr)],R,R,R,R)}function j1(e,t,r,a){return Ne(r?11:10,e,R,R,R,a,R,R,R,R,_0(t),R)}function N1(e,t,r,a){return Ne(8,t,R,R,R,R,{k:r,v:a},R,Ac(e,0),R,R,R)}function M1(e,t,r){let a=new Uint8Array(r),l="";for(let c=0,u=a.length;c<u;c++)l+=String.fromCharCode(a[c]);return Ne(19,t,ls(btoa(l)),R,R,R,R,R,Ac(e,5),R,R,R)}function D1(e,t){return{base:A1(e,t),child:void 0}}var L1=class{constructor(e,t){this._p=e,this.depth=t}parse(e){return ut(this._p,this.depth,e)}};async function U1(e,t,r){let a=[];for(let l=0,c=r.length;l<c;l++)l in r?a[l]=await ut(e,t,r[l]):a[l]=0;return a}async function z1(e,t,r,a){return Hx(r,a,await U1(e,t,a))}async function ef(e,t,r){let a=Object.entries(r),l=[],c=[];for(let u=0,h=a.length;u<h;u++)l.push(ls(a[u][0])),c.push(await ut(e,t,a[u][1]));return xr in r&&(l.push(Hs(e.base,xr)),c.push(Fx(O1(e.base),await ut(e,t,y1(r))))),Sr in r&&(l.push(Hs(e.base,Sr)),c.push(Jx(C1(e.base),await ut(e,t,x1(r))))),Qa in r&&(l.push(Hs(e.base,Qa)),c.push(S0(r[Qa]))),Ja in r&&(l.push(Hs(e.base,Ja)),c.push(r[Ja]?g0:y0)),{k:l,v:c}}async function rh(e,t,r,a,l){return j1(r,a,l,await ef(e,t,a))}async function P1(e,t,r,a){return Ix(r,await ut(e,t,a.valueOf()))}async function B1(e,t,r,a){return qx(r,a,await ut(e,t,a.buffer))}async function H1(e,t,r,a){return $x(r,a,await ut(e,t,a.buffer))}async function I1(e,t,r,a){return Kx(r,a,await ut(e,t,a.buffer))}async function My(e,t,r,a){let l=w0(a,e.base.features);return Vx(r,a,l?await ef(e,t,l):R)}async function q1(e,t,r,a){let l=w0(a,e.base.features);return Gx(r,a,l?await ef(e,t,l):R)}async function $1(e,t,r,a){let l=[],c=[];for(let[u,h]of a.entries())l.push(await ut(e,t,u)),c.push(await ut(e,t,h));return N1(e.base,r,l,c)}async function K1(e,t,r,a){let l=[];for(let c of a.keys())l.push(await ut(e,t,c));return Yx(r,l)}async function A0(e,t,r,a){let l=e.base.plugins;if(l)for(let c=0,u=l.length;c<u;c++){let h=l[c];if(h.parse.async&&h.test(a))return Bx(r,h.tag,await h.parse.async(a,new L1(e,t),{id:r}))}return R}async function V1(e,t,r,a){let[l,c]=await R1(a);return Ne(12,r,l,R,R,R,R,R,await ut(e,t,c),R,R,R)}function G1(e,t,r,a,l){let c=[],u=r.on({next:h=>{rc(this.base,t),ut(this,e,h).then(p=>{c.push(Xx(t,p))},p=>{l(p),u()})},throw:h=>{rc(this.base,t),ut(this,e,h).then(p=>{c.push(Zx(t,p)),a(c),u()},p=>{l(p),u()})},return:h=>{rc(this.base,t),ut(this,e,h).then(p=>{c.push(Wx(t,p)),a(c),u()},p=>{l(p),u()})}})}async function Y1(e,t,r,a){return Qx(r,Ac(e.base,4),await new Promise(G1.bind(e,t,r,a)))}async function F1(e,t,r,a){let l=[];for(let c=0,u=a.v.length;c<u;c++)l[c]=await ut(e,t,a.v[c]);return e1(r,l,a.t,a.d)}async function J1(e,t,r,a){if(Array.isArray(a))return z1(e,t,r,a);if(Tc(a))return Y1(e,t,r,a);if(g1(a))return F1(e,t,r,a);let l=a.constructor;if(l===u1)return ut(e,t,a.replacement);let c=await A0(e,t,r,a);if(c)return c;switch(l){case Object:return rh(e,t,r,a,!1);case R:return rh(e,t,r,a,!0);case Date:return Lx(r,a);case Error:case EvalError:case RangeError:case ReferenceError:case SyntaxError:case TypeError:case URIError:return My(e,t,r,a);case Number:case Boolean:case String:case BigInt:return P1(e,t,r,a);case ArrayBuffer:return M1(e.base,r,a);case Int8Array:case Int16Array:case Int32Array:case Uint8Array:case Uint16Array:case Uint32Array:case Uint8ClampedArray:case Float32Array:case Float64Array:return B1(e,t,r,a);case DataView:return I1(e,t,r,a);case Map:return $1(e,t,r,a);case Set:return K1(e,t,r,a)}
12if(l===Promise||a instanceof Promise)return V1(e,t,r,a);let u=e.base.features;if(u&32&&l===RegExp)return Ux(r,a);if(u&16)switch(l){case BigInt64Array:case BigUint64Array:return H1(e,t,r,a)}if(u&1&&typeof AggregateError<"u"&&(l===AggregateError||a instanceof AggregateError))return q1(e,t,r,a);if(a instanceof Error)return My(e,t,r,a);if(xr in a||Sr in a)return rh(e,t,r,a,!!l);throw new xc(a)}async function Q1(e,t,r){let a=Wh(e.base,r);if(a.type!==0)return a.value;let l=await A0(e,t,a.value,r);if(l)return l;throw new xc(r)}async function ut(e,t,r){switch(typeof r){case"boolean":return r?g0:y0;case"undefined":return wx;case"string":return S0(r);case"number":return Nx(r);case"bigint":return Mx(r);case"object":{if(r){let a=Wh(e.base,r);return a.type===0?await J1(e,t+1,a.value,r):a.value}return _x}case"symbol":return Hs(e.base,r);case"function":return Q1(e,t,r);default:throw new xc(r)}}async function X1(e,t){try{return await ut(e,0,t)}catch(r){throw r instanceof Ny?r:new Ny(r)}}var Z1=(e=>(e[e.Vanilla=1]="Vanilla",e[e.Cross=2]="Cross",e))(Z1||{});function k0(e,t){for(let r=0,a=t.length;r<a;r++){let l=t[r];e.has(l)||(e.add(l),l.extends&&k0(e,l.extends))}}function O0(e){if(e){let t=new Set;return k0(t,e),[...t]}}function W1(e){switch(e){case"Int8Array":return Int8Array;case"Int16Array":return Int16Array;case"Int32Array":return Int32Array;case"Uint8Array":return Uint8Array;case"Uint16Array":return Uint16Array;case"Uint32Array":return Uint32Array;case"Uint8ClampedArray":return Uint8ClampedArray;case"Float32Array":return Float32Array;case"Float64Array":return Float64Array;case"BigInt64Array":return BigInt64Array;case"BigUint64Array":return BigUint64Array;default:throw new l1(e)}}var eE=1e6,tE=1e4,nE=2e4;function C0(e,t){switch(t){case 3:return Object.freeze(e);case 1:return Object.preventExtensions(e);case 2:return Object.seal(e);default:return e}}var rE=1e3;function sE(e,t){var r;return{mode:e,plugins:t.plugins,refs:t.refs||new Map,features:(r=t.features)!=null?r:63^(t.disabledFeatures||0),depthLimit:t.depthLimit||rE}}function aE(e){return{mode:2,base:sE(2,e),child:R}}var iE=class{constructor(e,t){this._p=e,this.depth=t}deserialize(e){return qe(this._p,this.depth,e)}};function j0(e,t){if(t<0||!Number.isFinite(t)||!Number.isInteger(t))throw new us({t:4,i:t});if(e.refs.has(t))throw new Error("Conflicted ref id: "+t)}function oE(e,t,r){return j0(e.base,t),e.state.marked.has(t)&&e.base.refs.set(t,r),r}function lE(e,t,r){return j0(e.base,t),e.base.refs.set(t,r),r}function dt(e,t,r){return e.mode===1?oE(e,t,r):lE(e,t,r)}function Sh(e,t,r){if(Object.hasOwn(t,r))return t[r];throw new us(e)}function cE(e,t){return dt(e,t.i,Cx(cs(t.s)))}function uE(e,t,r){let a=r.a,l=a.length,c=dt(e,r.i,new Array(l));for(let u=0,h;u<l;u++)h=a[u],h&&(c[u]=qe(e,t,h));return C0(c,r.o),c}function dE(e){switch(e){case"constructor":case"__proto__":case"prototype":case"__defineGetter__":case"__defineSetter__":case"__lookupGetter__":case"__lookupSetter__":return!1;default:return!0}}function hE(e){switch(e){case Sr:case Ja:case Qa:case xr:return!0;default:return!1}}function Dy(e,t,r){dE(t)?e[t]=r:Object.defineProperty(e,t,{value:r,configurable:!0,enumerable:!0,writable:!0})}function fE(e,t,r,a,l){if(typeof a=="string")Dy(r,cs(a),qe(e,t,l));else{let c=qe(e,t,a);switch(typeof c){case"string":Dy(r,c,qe(e,t,l));break;case"symbol":hE(c)&&(r[c]=qe(e,t,l));break;default:throw new us(a)}}}function N0(e,t,r,a){let l=r.k;if(l.length>0)for(let c=0,u=r.v,h=l.length;c<h;c++)fE(e,t,a,l[c],u[c]);return a}function pE(e,t,r){let a=dt(e,r.i,r.t===10?{}:Object.create(null));return N0(e,t,r.p,a),C0(a,r.o),a}function mE(e,t){return dt(e,t.i,new Date(t.s))}function gE(e,t){if(e.base.features&32){let r=cs(t.c);if(r.length>nE)throw new us(t);return dt(e,t.i,new RegExp(r,t.m))}throw new E0(t)}function yE(e,t,r){let a=dt(e,r.i,new Set);for(let l=0,c=r.a,u=c.length;l<u;l++)a.add(qe(e,t,c[l]));return a}function vE(e,t,r){let a=dt(e,r.i,new Map);for(let l=0,c=r.e.k,u=r.e.v,h=c.length;l<h;l++)a.set(qe(e,t,c[l]),qe(e,t,u[l]));return a}function bE(e,t){if(t.s.length>eE)throw new us(t);return dt(e,t.i,T0(cs(t.s)))}function wE(e,t,r){var a;let l=W1(r.c),c=qe(e,t,r.f),u=(a=r.b)!=null?a:0;if(u<0||u>c.byteLength)throw new us(r);return dt(e,r.i,new l(c,u,r.l))}function _E(e,t,r){var a;let l=qe(e,t,r.f),c=(a=r.b)!=null?a:0;if(c<0||c>l.byteLength)throw new us(r);return dt(e,r.i,new DataView(l,c,r.l))}function M0(e,t,r,a){if(r.p){let l=N0(e,t,r.p,{});Object.defineProperties(a,Object.getOwnPropertyDescriptors(l))}return a}function SE(e,t,r){let a=dt(e,r.i,new AggregateError([],cs(r.m)));return M0(e,t,r,a)}function xE(e,t,r){let a=Sh(r,bx,r.s),l=dt(e,r.i,new a(cs(r.m)));return M0(e,t,r,l)}function EE(e,t,r){let a=Ec(),l=dt(e,r.i,a.p),c=qe(e,t,r.f);return r.s?a.s(c):a.f(c),l}function TE(e,t,r){return dt(e,r.i,Object(qe(e,t,r.f)))}function RE(e,t,r){let a=e.base.plugins;if(a){let l=cs(r.c);for(let c=0,u=a.length;c<u;c++){let h=a[c];if(h.tag===l)return dt(e,r.i,h.deserialize(r.s,new iE(e,t),{id:r.i}))}}throw new a1(r.c)}function AE(e,t){return dt(e,t.i,dt(e,t.s,Ec()).p)}function kE(e,t,r){let a=e.base.refs.get(r.i);if(a)return a.s(qe(e,t,r.a[1])),R;throw new Eo("Promise")}function OE(e,t,r){let a=e.base.refs.get(r.i);if(a)return a.f(qe(e,t,r.a[1])),R;throw new Eo("Promise")}function CE(e,t,r){qe(e,t,r.a[0]);let a=qe(e,t,r.a[1]);return b1(a)}function jE(e,t,r){qe(e,t,r.a[0]);let a=qe(e,t,r.a[1]);return T1(a)}function NE(e,t,r){let a=dt(e,r.i,Gs()),l=r.a,c=l.length;if(c)for(let u=0;u<c;u++)qe(e,t,l[u]);return a}function ME(e,t,r){let a=e.base.refs.get(r.i);if(a&&Tc(a))return a.next(qe(e,t,r.f)),R;throw new Eo("Stream")}function DE(e,t,r){let a=e.base.refs.get(r.i);if(a&&Tc(a))return a.throw(qe(e,t,r.f)),R;throw new Eo("Stream")}function LE(e,t,r){let a=e.base.refs.get(r.i);if(a&&Tc(a))return a.return(qe(e,t,r.f)),R;throw new Eo("Stream")}function UE(e,t,r){return qe(e,t,r.f),R}function zE(e,t,r){return qe(e,t,r.a[1]),R}function PE(e,t,r){let a=dt(e,r.i,R0([],r.s,r.l));for(let l=0,c=r.a.length;l<c;l++)a.v[l]=qe(e,t,r.a[l]);return a}function qe(e,t,r){if(t>e.base.depthLimit)throw new c1(e.base.depthLimit);switch(t+=1,r.t){case 2:return Sh(r,yx,r.s);case 0:return Number(r.s);case 1:return cs(String(r.s));case 3:if(String(r.s).length>tE)throw new us(r);return BigInt(r.s);case 4:return e.base.refs.get(r.i);case 18:return cE(e,r);case 9:return uE(e,t,r);case 10:case 11:return pE(e,t,r);case 5:return mE(e,r);case 6:return gE(e,r);case 7:return yE(e,t,r);case 8:return vE(e,t,r);case 19:return bE(e,r);case 16:case 15:return wE(e,t,r);case 20:return _E(e,t,r);case 14:return SE(e,t,r);case 13:return xE(e,t,r);case 12:return EE(e,t,r);case 17:return Sh(r,gx,r.s);case 21:return TE(e,t,r);case 25:return RE(e,t,r);case 22:return AE(e,r);case 23:return kE(e,t,r);case 24:return OE(e,t,r);case 28:return CE(e,t,r);case 30:return jE(e,t,r);case 31:return NE(e,t,r);case 32:return ME(e,t,r);case 33:return DE(e,t,r);case 34:return LE(e,t,r);case 27:return UE(e,t,r);case 29:return zE(e,t,r);case 35:return PE(e,t,r);default:throw new E0(r)}}function BE(e,t){try{return qe(e,0,t)}catch(r){throw new s1(r)}}var HE=()=>T;HE.toString();function Ly(e,t){let r=O0(t.plugins),a=aE({plugins:r,refs:t.refs,features:t.features,disabledFeatures:t.disabledFeatures,depthLimit:t.depthLimit});return BE(a,e)}async function IE(e,t={}){let r=O0(t.plugins),a=D1(1,{plugins:r,disabledFeatures:t.disabledFeatures});return{t:await X1(a,e),f:a.base.features,m:Array.from(a.base.marked)}}function qE(e){return{tag:"$TSR/t/"+e.key,test:e.test,parse:{sync(t,r,a){return{v:r.parse(e.toSerializable(t))}},async async(t,r,a){return{v:await r.parse(e.toSerializable(t))}},stream(t,r,a){return{v:r.parse(e.toSerializable(t))}}},serialize:void 0,deserialize(t,r,a){return e.fromSerializable(r.deserialize(t.v))}}}var $E=class{constructor(e,t){this.stream=e,this.hint=t?.hint??"binary"}},uc=globalThis.Buffer,D0=!!uc&&typeof uc.from=="function";function L0(e){if(e.length===0)return"";if(D0)return uc.from(e).toString("base64");const t=32768,r=[];for(let a=0;a<e.length;a+=t){const l=e.subarray(a,a+t);r.push(String.fromCharCode.apply(null,l))}return btoa(r.join(""))}function U0(e){if(e.length===0)return new Uint8Array(0);if(D0){const a=uc.from(e,"base64");return new Uint8Array(a.buffer,a.byteOffset,a.byteLength)}const t=atob(e),r=new Uint8Array(t.length);for(let a=0;a<t.length;a++)r[a]=t.charCodeAt(a);return r}var Xi=Object.create(null),Zi=Object.create(null),KE=e=>new ReadableStream({start(t){e.on({next(r){try{t.enqueue(U0(r))}catch{}},throw(r){t.error(r)},return(){try{t.close()}catch{}}})}}),VE=new TextEncoder,GE=e=>
12new ReadableStream({start(t){e.on({next(r){try{typeof r=="string"?t.enqueue(VE.encode(r)):t.enqueue(U0(r.$b64))}catch{}},throw(r){t.error(r)},return(){try{t.close()}catch{}}})}}),YE="(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(_){}}})}}))",FE="(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 Uy(e){const t=Gs(),r=e.getReader();return(async()=>{try{for(;;){const{done:a,value:l}=await r.read();if(a){t.return(void 0);break}t.next(L0(l))}}catch(a){t.throw(a)}finally{r.releaseLock()}})(),t}function zy(e){const t=Gs(),r=e.getReader(),a=new TextDecoder("utf-8",{fatal:!0});return(async()=>{try{for(;;){const{done:l,value:c}=await r.read();if(l){try{const u=a.decode();u.length>0&&t.next(u)}catch{}t.return(void 0);break}try{const u=a.decode(c,{stream:!0});u.length>0&&t.next(u)}catch{t.next({$b64:L0(c)})}}}catch(l){t.throw(l)}finally{r.releaseLock()}})(),t}var JE={tag:"tss/RawStream",extends:[{tag:"tss/RawStreamFactory",test(e){return e===Xi},parse:{sync(e,t,r){return{}},async async(e,t,r){return{}},stream(e,t,r){return{}}},serialize(e,t,r){return YE},deserialize(e,t,r){return Xi}},{tag:"tss/RawStreamFactoryText",test(e){return e===Zi},parse:{sync(e,t,r){return{}},async async(e,t,r){return{}},stream(e,t,r){return{}}},serialize(e,t,r){return FE},deserialize(e,t,r){return Zi}}],test(e){return e instanceof $E},parse:{sync(e,t,r){const a=e.hint==="text"?Zi:Xi;return{hint:t.parse(e.hint),factory:t.parse(a),stream:t.parse(Gs())}},async async(e,t,r){const a=e.hint==="text"?Zi:Xi,l=e.hint==="text"?zy(e.stream):Uy(e.stream);return{hint:await t.parse(e.hint),factory:await t.parse(a),stream:await t.parse(l)}},stream(e,t,r){const a=e.hint==="text"?Zi:Xi,l=e.hint==="text"?zy(e.stream):Uy(e.stream);return{hint:t.parse(e.hint),factory:t.parse(a),stream:t.parse(l)}}},serialize(e,t,r){return"("+t.serialize(e.factory)+")("+t.serialize(e.stream)+")"},deserialize(e,t,r){const a=t.deserialize(e.stream);return t.deserialize(e.hint)==="text"?GE(a):KE(a)}};function QE(e){return{tag:"tss/RawStream",test:()=>!1,parse:{},serialize(){throw new Error("RawStreamDeserializePlugin.serialize should not be called. Client only deserializes.")},deserialize(t,r,a){return e(typeof r?.deserialize=="function"?r.deserialize(t.streamId):t.streamId)}}}var XE={tag:"$TSR/Error",test(e){return e instanceof Error},parse:{sync(e,t){return{message:t.parse(e.message)}},async async(e,t){return{message:await t.parse(e.message)}},stream(e,t){return{message:t.parse(e.message)}}},serialize(e,t){return"new Error("+t.serialize(e.message)+")"},deserialize(e,t){return new Error(t.deserialize(e.message))}},Wr={},z0=e=>new ReadableStream({start:t=>{e.on({next:r=>{try{t.enqueue(r)}catch{}},throw:r=>{t.error(r)},return:()=>{try{t.close()}catch{}}})}}),ZE={tag:"seroval-plugins/web/ReadableStreamFactory",test(e){return e===Wr},parse:{sync(){return Wr},async async(){return await Promise.resolve(Wr)},stream(){return Wr}},serialize(){return z0.toString()},deserialize(){return Wr}};function Py(e){let t=Gs(),r=e.getReader();async function a(){try{let l=await r.read();l.done?t.return(l.value):(t.next(l.value),await a())}catch(l){t.throw(l)}}return a().catch(()=>{}),t}var WE={tag:"seroval/plugins/web/ReadableStream",extends:[ZE],test(e){return typeof ReadableStream>"u"?!1:e instanceof ReadableStream},parse:{sync(e,t){return{factory:t.parse(Wr),stream:t.parse(Gs())}},async async(e,t){return{factory:await t.parse(Wr),stream:await t.parse(Py(e))}},stream(e,t){return{factory:t.parse(Wr),stream:t.parse(Py(e))}}},serialize(e,t){return"("+t.serialize(e.factory)+")("+t.serialize(e.stream)+")"},deserialize(e,t){let r=t.deserialize(e.stream);return z0(r)}},eT=WE,tT=[XE,JE,eT];function nT(){return[...Yv()?.serializationAdapters?.map(qE)??[],...tT]}var By=new TextDecoder,rT=new Uint8Array(0),Hy=16*1024*1024,Iy=32*1024*1024,qy=1024,$y=1e5;function sT(e){const t=new Map,r=new Map,a=new Set;let l=!1,c=null,u=0,h;const p=new ReadableStream({start(g){h=g},cancel(){l=!0;try{c?.cancel()}catch{}t.forEach(g=>{try{g.error(new Error("Framed response cancelled"))}catch{}}),t.clear(),r.clear(),a.clear()}});function m(g){const b=r.get(g);if(b)return b;
12if(a.has(g))return new ReadableStream({start(x){x.close()}});if(r.size>=qy)throw new Error(`Too many raw streams in framed response (max ${qy})`);const w=new ReadableStream({start(x){t.set(g,x)},cancel(){a.add(g),t.delete(g),r.delete(g)}});return r.set(g,w),w}function y(g){return m(g),t.get(g)}return(async()=>{const g=e.getReader();c=g;const b=[];let w=0;function x(){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,N=9;for(let L=0;L<b.length&&N>0;L++){const X=b[L],Y=Math.min(X.length,N);A.set(X.subarray(0,Y),M),M+=Y,N-=Y}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 k(E){if(E===0)return rT;const A=new Uint8Array(E);let M=0,N=E;for(;N>0&&b.length>0;){const L=b[0];if(!L)break;const X=Math.min(L.length,N);A.set(L.subarray(0,X),M),M+=X,N-=X,X===L.length?b.shift():b[0]=L.subarray(X)}return w-=E,A}try{for(;;){const{done:E,value:A}=await g.read();if(l||E)break;if(A){if(w+A.length>Iy)throw new Error(`Framed response buffer exceeded ${Iy} bytes`);for(b.push(A),w+=A.length;;){const M=x();if(!M)break;const{type:N,streamId:L,length:X}=M;if(N!==vr.JSON&&N!==vr.CHUNK&&N!==vr.END&&N!==vr.ERROR)throw new Error(`Unknown frame type: ${N}`);if(N===vr.JSON){if(L!==0)throw new Error("Invalid JSON frame streamId (expected 0)")}else if(L===0)throw new Error("Invalid raw frame streamId (expected non-zero)");if(X>Hy)throw new Error(`Frame payload too large: ${X} bytes (max ${Hy})`);const Y=9+X;if(w<Y)break;if(++u>$y)throw new Error(`Too many frames in framed response (max ${$y})`);k(9);const I=k(X);switch(N){case vr.JSON:try{h.enqueue(By.decode(I))}catch{}break;case vr.CHUNK:{const F=y(L);F&&F.enqueue(I);break}case vr.END:{const F=y(L);if(a.add(L),F){try{F.close()}catch{}t.delete(L)}break}case vr.ERROR:{const F=y(L);if(a.add(L),F){const Z=By.decode(I);F.error(new Error(Z)),t.delete(L)}break}}}}}if(w!==0)throw new Error("Incomplete frame at end of framed response");try{h.close()}catch{}t.forEach(E=>{try{E.close()}catch{}}),t.clear()}catch(E){try{h.error(E)}catch{}t.forEach(A=>{try{A.error(E)}catch{}}),t.clear()}finally{try{g.releaseLock()}catch{}c=null}})(),{getOrCreateStream:m,jsonChunks:p}}var fo=null;async function xh(e){e.length>0&&await Promise.allSettled(e)}var aT=Object.prototype.hasOwnProperty;function P0(e){for(const t in e)if(aT.call(e,t))return!0;return!1}async function iT(e,t,r){fo||(fo=nT());const a=t[0],l=a.fetch??r,c=a.data instanceof FormData?"formData":"payload",u=a.headers?new Headers(a.headers):new Headers;if(u.set("x-tsr-serverFn","true"),c==="payload"&&u.set("accept",`${tS}, application/x-ndjson, application/json`),a.method==="GET"){if(c==="formData")throw new Error("FormData is not supported with GET requests");const p=await B0(a);if(p!==void 0){const m=Wv({payload:p});e.includes("?")?e+=`&${m}`:e+=`?${m}`}}let h;if(a.method==="POST"){const p=await oT(a);p?.contentType&&u.set("content-type",p.contentType),h=p?.body}return await lT(async()=>l(e,{method:a.method,headers:u,signal:a.signal,body:h}))}async function B0(e){let t=!1;const r={};if(e.data!==void 0&&(t=!0,r.data=e.data),e.context&&P0(e.context)&&(t=!0,r.context=e.context),t)return H0(r)}async function H0(e){return JSON.stringify(await Promise.resolve(IE(e,{plugins:fo})))}async function oT(e){if(e.data instanceof FormData){let r;return e.context&&P0(e.context)&&(r=await H0(e.context)),r!==void 0&&e.data.set(eS,r),{body:e.data}}const t=await B0(e);if(t)return{body:t,contentType:"application/json"}}async function lT(e){let t;try{t=await e()}catch(a){if(a instanceof Response)t=a;else throw console.log(a),a}if(t.headers.get("x-tss-raw")==="true")return t;const r=t.headers.get("content-type");if(r||Zt(),t.headers.get("x-tss-serialized")){let a;if(r.includes("application/x-tss-framed")){if(sS(r),!t.body)throw new Error("No response body for framed response");const{getOrCreateStream:l,jsonChunks:c}=sT(t.body),u=[QE(l),...fo||[]],h=new Map;a=await cT({jsonStream:c,onMessage:p=>Ly(p,{refs:h,plugins:u}),onError(p,m){console.error(p,m)}})}else if(r.includes("application/json")){const l=await t.json(),c=[];a=Ly(l,{plugins:fo}),await xh(c)}if(a||Zt(),a instanceof Error)throw a;return a}if(r.includes("application/json")){const a=await t.json(),l=IS(a);if(l)throw l;if(vt(a))throw a;return a}if(!t.ok)throw new Error(await t.text());return t}async function cT({jsonStream:e,onMessage:t,onError:r}){const a=e.getReader(),{value:l,done:c}=await a.read();if(c||!l)throw new Error("Stream ended before first object");const u=JSON.parse(l);let h=!1;const p=(async()=>{try{for(;;){const{value:g,done:b}=await a.read();if(b)break;
12if(g)try{const w=[];try{t(JSON.parse(g))}finally{}await xh(w)}catch(w){r?.(`Invalid JSON: ${g}`,w)}}}catch(g){h||r?.("Stream processing error:",g)}})();let m;const y=[];try{m=t(u)}catch(g){throw h=!0,a.cancel().catch(()=>{}),g}return await xh(y),Promise.resolve(m).catch(()=>{h=!0,a.cancel().catch(()=>{})}),p.finally(()=>{try{a.releaseLock()}catch{}}),m}function uT(e){const t="/_serverFn/"+e;return Object.assign((...l)=>{const c=Yv()?.serverFns?.fetch;return iT(t,l,c??fetch)},{url:t,serverFnMeta:{id:e},[bh]:!0})}var dT={key:"$TSS/serverfn",test:e=>typeof e!="function"||!(bh in e)?!1:!!e[bh],toSerializable:({serverFnMeta:e})=>({functionId:e.id}),fromSerializable:({functionId:e})=>uT(e)};function Ky(e){return e.replaceAll("\0","/").replaceAll("�","/")}function hT(e,t){e.id=t.i,e.__beforeLoadContext=t.b,e.loaderData=t.l,e.status=t.s,e.ssr=t.ssr,e.updatedAt=t.u,e.error=t.e,t.g!==void 0&&(e.globalNotFound=t.g)}async function fT(e){window.$_TSR||Zt();const t=e.options.serializationAdapters;if(t?.length){const E=new Map;t.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||Zt();const r=window.$_TSR.router;r.matches.forEach(E=>{E.i=Ky(E.i)}),r.lastMatchId&&(r.lastMatchId=Ky(r.lastMatchId));const{manifest:a,dehydratedData:l,lastMatchId:c}=r;e.ssr={manifest:a};const u=document.querySelector('meta[property="csp-nonce"]')?.content;e.options.ssr={nonce:u};const h=e.matchRoutes(e.stores.location.get()),p=Promise.all(h.map(E=>e.loadRouteChunk(e.looseRoutesById[E.routeId])));function m(E){const A=e.looseRoutesById[E.routeId].options.pendingMinMs??e.options.defaultPendingMinMs;if(A){const M=Vs();E._nonReactive.minPendingPromise=M,E._forcePending=!0,setTimeout(()=>{M.resolve(),e.updateMatch(E.id,N=>(N._nonReactive.minPendingPromise=void 0,{...N,_forcePending:void 0}))},A)}}function y(E){const A=e.looseRoutesById[E.routeId];A&&(A.options.ssr=E.ssr)}let g;h.forEach(E=>{const A=r.matches.find(M=>M.i===E.id);if(!A){E._nonReactive.dehydrated=!1,E.ssr=!1,y(E);return}hT(E,A),y(E),E._nonReactive.dehydrated=E.ssr!==!1,(E.ssr==="data-only"||E.ssr===!1)&&g===void 0&&(g=E.index,m(E))}),e.stores.setMatches(h),await e.options.hydrate?.(l);const b=e.stores.matches.get(),w=e.stores.location.get();await Promise.all(b.map(async E=>{try{const A=e.looseRoutesById[E.routeId],M=b[E.index-1]?.context??e.options.context;if(A.options.context){const Y={deps:E.loaderDeps,params:E.params,context:M??{},location:w,navigate:I=>e.navigate({...I,_fromLocation:w}),buildLocation:e.buildLocation,cause:E.cause,abortController:E.abortController,preload:!1,matches:h,routeId:A.id};E.__routeContext=A.options.context(Y)??void 0}E.context={...M,...E.__routeContext,...E.__beforeLoadContext};const N={ssr:e.options.ssr,matches:b,match:E,params:E.params,loaderData:E.loaderData},L=await A.options.head?.(N),X=await A.options.scripts?.(N);E.meta=L?.meta,E.links=L?.links,E.headScripts=L?.scripts,E.styles=L?.styles,E.scripts=X}catch(A){if(vt(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 x=h[h.length-1].id!==c;if(!h.some(E=>E.ssr===!1)&&!x)return h.forEach(E=>{E._nonReactive.dehydrated=void 0}),e.stores.resolvedLocation.set(e.stores.location.get()),p;const k=Promise.resolve().then(()=>e.load()).catch(E=>{console.error("Error during router hydration:",E)});if(x){const E=h[1];E||Zt(),m(E),E._displayPending=!0,E._nonReactive.displayPendingPromise=k,k.then(()=>{e.batch(()=>{e.stores.status.get()==="pending"&&(e.stores.status.set("idle"),e.stores.resolvedLocation.set(e.stores.location.get())),e.updateMatch(E.id,A=>({...A,_displayPending:void 0,displayPendingPromise:void 0}))})})}return p}var dc=ee.use,no=typeof window<"u"?ee.useLayoutEffect:ee.useEffect;function sh(e){const t=ee.useRef({value:e,prev:null}),r=t.current.value;return e!==r&&(t.current={value:e,prev:r}),t.current.prev}function pT(e,t,r={},a={}){ee.useEffect(()=>{if(!e.current||a.disabled||typeof IntersectionObserver!="function")return;const l=new IntersectionObserver(([c])=>{t(c)},r);return l.observe(e.current),()=>{l.disconnect()}},[t,r,a.disabled,e])}function mT(e){const t=ee.useRef(null);return ee.useImperativeHandle(e,()=>t.current,[]),t}function gT({promise:e}){if(dc)return dc(e);const t=lx(e);if(t[Fn].status==="pending")throw t;if(t[Fn].status==="error")throw t[Fn].error;return t[Fn].data}function yT(e){const t=_.jsx(vT,{...e});
12return e.fallback?_.jsx(ee.Suspense,{fallback:e.fallback,children:t}):t}function vT(e){const t=gT(e);return e.children(t)}function tf(e){const t=e.errorComponent??nf;return _.jsx(bT,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:r,reset:a})=>r?ee.createElement(t,{error:r,reset:a}):e.children})}var bT=class extends ee.Component{constructor(...e){super(...e),this.state={error:null}}static getDerivedStateFromProps(e,t){const r=e.getResetKey();return t.error&&t.resetKey!==r?{resetKey:r,error:null}:{resetKey:r}}static getDerivedStateFromError(e){return{error:e}}reset(){this.setState({error:null})}componentDidCatch(e,t){this.props.onCatch&&this.props.onCatch(e,t)}render(){return this.props.children({error:this.state.error,reset:()=>{this.reset()}})}};function nf({error:e}){const[t,r]=ee.useState(!1);return _.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[_.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[_.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),_.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>r(a=>!a),children:t?"Hide Error":"Show Error"})]}),_.jsx("div",{style:{height:".25rem"}}),t?_.jsx("div",{children:_.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:e.message?_.jsx("code",{children:e.message}):null})}):null]})}function wT({children:e,fallback:t=null}){return rf()?_.jsx(W.Fragment,{children:e}):_.jsx(W.Fragment,{children:t})}function rf(){return W.useSyncExternalStore(_T,()=>!0,()=>!1)}function _T(){return()=>{}}var I0=ee.createContext(null);function At(e){return ee.useContext(I0)}var kc=ee.createContext(void 0),ST=ee.createContext(void 0),Je=(e=>(e[e.None=0]="None",e[e.Mutable=1]="Mutable",e[e.Watching=2]="Watching",e[e.RecursedCheck=4]="RecursedCheck",e[e.Recursed=8]="Recursed",e[e.Dirty=16]="Dirty",e[e.Pending=32]="Pending",e))(Je||{});function xT({update:e,notify:t,unwatched:r}){return{link:a,unlink:l,propagate:c,checkDirty:u,shallowPropagate:h};function a(m,y,g){const b=y.depsTail;if(b!==void 0&&b.dep===m)return;const w=b!==void 0?b.nextDep:y.deps;if(w!==void 0&&w.dep===m){w.version=g,y.depsTail=w;return}const x=m.subsTail;if(x!==void 0&&x.version===g&&x.sub===y)return;const k=y.depsTail=m.subsTail={version:g,dep:m,sub:y,prevDep:b,nextDep:w,prevSub:x,nextSub:void 0};w!==void 0&&(w.prevDep=k),b!==void 0?b.nextDep=k:y.deps=k,x!==void 0?x.nextSub=k:m.subs=k}function l(m,y=m.sub){const g=m.dep,b=m.prevDep,w=m.nextDep,x=m.nextSub,k=m.prevSub;return w!==void 0?w.prevDep=b:y.depsTail=b,b!==void 0?b.nextDep=w:y.deps=w,x!==void 0?x.prevSub=k:g.subsTail=k,k!==void 0?k.nextSub=x:(g.subs=x)===void 0&&r(g),w}function c(m){let y=m.nextSub,g;e:do{const b=m.sub;let w=b.flags;if(w&60?w&12?w&4?!(w&48)&&p(m,b)?(b.flags=w|40,w&=1):w=0:b.flags=w&-9|32:w=0:b.flags=w|32,w&2&&t(b),w&1){const x=b.subs;if(x!==void 0){const k=(m=x).nextSub;k!==void 0&&(g={value:y,prev:g},y=k);continue}}if((m=y)!==void 0){y=m.nextSub;continue}for(;g!==void 0;)if(m=g.value,g=g.prev,m!==void 0){y=m.nextSub;continue e}break}while(!0)}function u(m,y){let g,b=0,w=!1;e:do{const x=m.dep,k=x.flags;if(y.flags&16)w=!0;else if((k&17)===17){if(e(x)){const E=x.subs;E.nextSub!==void 0&&h(E),w=!0}}else if((k&33)===33){(m.nextSub!==void 0||m.prevSub!==void 0)&&(g={value:m,prev:g}),m=x.deps,y=x,++b;continue}if(!w){const E=m.nextDep;if(E!==void 0){m=E;continue}}for(;b--;){const E=y.subs,A=E.nextSub!==void 0;if(A?(m=g.value,g=g.prev):m=E,w){if(e(y)){A&&h(E),y=m.sub;continue}w=!1}else y.flags&=-33;y=m.sub;const M=m.nextDep;if(M!==void 0){m=M;continue e}}return w}while(!0)}function h(m){do{const y=m.sub,g=y.flags;(g&48)===32&&(y.flags=g|16,(g&6)===2&&t(y))}while((m=m.nextSub)!==void 0)}function p(m,y){let g=y.depsTail;for(;g!==void 0;){if(g===m)return!0;g=g.prevDep}return!1}}function ET(e,t,r){const a=typeof e=="object",l=a?e:void 0;return{next:(a?e.next:e)?.bind(l),error:(a?e.error:t)?.bind(l),complete:(a?e.complete:r)?.b
12ind(l)}}const Eh=[];let sc=0;const{link:Vy,unlink:TT,propagate:RT,checkDirty:q0,shallowPropagate:Gy}=xT({update(e){return e._update()},notify(e){Eh[Th++]=e,e.flags&=~Je.Watching},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=Je.Mutable|Je.Dirty,hc(e))}});let $l=0,Th=0,Gn,Rh=0;function $0(e){try{++Rh,e()}finally{--Rh||K0()}}function hc(e){const t=e.depsTail;let r=t!==void 0?t.nextDep:e.deps;for(;r!==void 0;)r=TT(r,e)}function K0(){if(!(Rh>0)){for(;$l<Th;){const e=Eh[$l];Eh[$l++]=void 0,e.notify()}$l=0,Th=0}}function Yy(e,t){const r=typeof e=="function",a=e,l={_snapshot:r?void 0:e,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:r?Je.None:Je.Mutable,get(){return Gn!==void 0&&Vy(l,Gn,sc),l._snapshot},subscribe(c){const u=ET(c),h={current:!1},p=AT(()=>{l.get(),h.current?u.next?.(l._snapshot):h.current=!0});return{unsubscribe:()=>{p.stop()}}},_update(c){const u=Gn,h=t?.compare??Object.is;if(r)Gn=l,++sc,l.depsTail=void 0;else if(c===void 0)return!1;r&&(l.flags=Je.Mutable|Je.RecursedCheck);try{const p=l._snapshot,m=typeof c=="function"?c(p):c===void 0&&r?a(p):c;return p===void 0||!h(p,m)?(l._snapshot=m,!0):!1}finally{Gn=u,r&&(l.flags&=~Je.RecursedCheck),hc(l)}}};return r?(l.flags=Je.Mutable|Je.Dirty,l.get=function(){const c=l.flags;if(c&Je.Dirty||c&Je.Pending&&q0(l.deps,l)){if(l._update()){const u=l.subs;u!==void 0&&Gy(u)}}else c&Je.Pending&&(l.flags=c&~Je.Pending);return Gn!==void 0&&Vy(l,Gn,sc),l._snapshot}):l.set=function(c){if(l._update(c)){const u=l.subs;u!==void 0&&(RT(u),Gy(u),K0())}},l}function AT(e){const t=()=>{const a=Gn;Gn=r,++sc,r.depsTail=void 0,r.flags=Je.Watching|Je.RecursedCheck;try{return e()}finally{Gn=a,r.flags&=~Je.RecursedCheck,hc(r)}},r={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:Je.Watching|Je.RecursedCheck,notify(){const a=this.flags;a&Je.Dirty||a&Je.Pending&&q0(this.deps,this)?t():this.flags=Je.Watching},stop(){this.flags=Je.None,this.depsTail=void 0,hc(this)}};return t(),r}var ah={exports:{}},ih={},oh={exports:{}},lh={};var Fy;function kT(){if(Fy)return lh;Fy=1;var e=xo();function t(g,b){return g===b&&(g!==0||1/g===1/b)||g!==g&&b!==b}var r=typeof Object.is=="function"?Object.is:t,a=e.useState,l=e.useEffect,c=e.useLayoutEffect,u=e.useDebugValue;function h(g,b){var w=b(),x=a({inst:{value:w,getSnapshot:b}}),k=x[0].inst,E=x[1];return c(function(){k.value=w,k.getSnapshot=b,p(k)&&E({inst:k})},[g,w,b]),l(function(){return p(k)&&E({inst:k}),g(function(){p(k)&&E({inst:k})})},[g]),u(w),w}function p(g){var b=g.getSnapshot;g=g.value;try{var w=b();return!r(g,w)}catch{return!0}}function m(g,b){return b()}var y=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?m:h;return lh.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:y,lh}var Jy;function OT(){return Jy||(Jy=1,oh.exports=kT()),oh.exports}var Qy;function CT(){if(Qy)return ih;Qy=1;var e=xo(),t=OT();function r(m,y){return m===y&&(m!==0||1/m===1/y)||m!==m&&y!==y}var a=typeof Object.is=="function"?Object.is:r,l=t.useSyncExternalStore,c=e.useRef,u=e.useEffect,h=e.useMemo,p=e.useDebugValue;return ih.useSyncExternalStoreWithSelector=function(m,y,g,b,w){var x=c(null);if(x.current===null){var k={hasValue:!1,value:null};x.current=k}else k=x.current;x=h(function(){function A(Y){if(!M){if(M=!0,N=Y,Y=b(Y),w!==void 0&&k.hasValue){var I=k.value;if(w(I,Y))return L=I}return L=Y}if(I=L,a(N,Y))return I;var F=b(Y);return w!==void 0&&w(I,F)?(N=Y,I):(N=Y,L=F)}var M=!1,N,L,X=g===void 0?null:g;return[function(){return A(y())},X===null?void 0:function(){return A(X())}]},[y,g,b,w]);var E=l(m,x[0],x[1]);return u(function(){k.hasValue=!0,k.value=E},[E]),p(E),E},ih}var Xy;function jT(){return Xy||(Xy=1,ah.exports=CT()),ah.exports}var NT=jT();function MT(e,t){return e===t}function lt(e,t,r=MT){const a=ee.useCallback(u=>{if(!e)return()=>{};const{unsubscribe:h}=e.subscribe(u);return h},[e]),l=ee.useCallback(()=>e?.get(),[e]);return NT.useSyncExternalStoreWithSelector(a,l,l,t,r)}var DT={get:()=>{},subscribe:()=>({unsubscribe:()=>{}})};function Ys(e){const t=At(),r=ee.useContext(e.from?ST:kc),a=e.from??r,l=a?e.from?t.stores.getRouteMatchStore(a):t.stores.matchStores.get(a):void 0,c=ee.useRef(void 0);return lt(l??DT,u=>{if((e.shouldThrow??!0)&&!u&&Zt(),u===void 0)return;const h=e.select?e.select(u):u;if(e.structuralSharing??t.options.defaultStructuralSharing){const p=Ps(c.current,h);return c.current=p,p}return h})}function V0(e){return Ys({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function G0(e){const{select:t,...r}=e;return Ys({...r,select:a=>t?t(a.loaderDeps):a.loaderDeps})}function Y0(e){return Ys({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:t=>{const r=e.strict===!1?t.params:t._strictParams;return e.select?e.select(r):r}})}function F0(e){return Ys({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function sf(e){const t=At();return ee.useCallback(r=>t.navigate({...r,from:r.from??e?.from}),[e?.from,t])}function J0(e){return Ys({...e,select:t=>e.select?e.select(t.context):t.context})}var Q0=Gv();const LT=Vv(Q0);function UT(e,t){const r=At(),a=mT(t),{activeProps:l,inactiveProps:c,activeOptions:u,to:h,preload:p,preloadDelay:m,preloadIntentProximity:y,hashScrollIntoView:g,replace:b,startTransition:w,resetScroll:x,viewTransition:k,children:E,target:A,disabled:M,style:N,className:L,onClick:X,onBlur:Y,onFocus:I,onMouseEnter:F,onMouseLeave:Z,onTouchStart:le,ignoreBlocker:ie,params:ge,search:we,hash:$e,state:Me,mask:z,reloadDocument:J,unsafeRelative:ae,from:Se,_fromLocation:ye,...C}=e,$=rf(),G=ee.useMemo(()=>e,[r,e.from,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),Q=lt(r.stores.location,ze=>ze,(ze,Xe)=>ze.href===Xe.href),te=ee.useMemo(()=>{const ze={_fromLocation:Q,...G};return r.buildLocation(ze)},[r,Q,G]),ue=te.maskedLocation?te.maskedLocation.publicHref:te.publicHref,_e=te.maskedLocation?te.maskedLocation.external:te.external,fe=ee.useMemo(()=>qT(ue,_e,r.history,M),[M,_e,ue,r.history]),ke=ee.useMemo(()=>
12{if(fe?.external)return ic(fe.href,r.protocolAllowlist)?void 0:fe.href;if(!$T(h)&&!(typeof h!="string"||h.indexOf(":")===-1))try{return new URL(h),ic(h,r.protocolAllowlist)?void 0:h}catch{}},[h,fe,r.protocolAllowlist]),Lt=ee.useMemo(()=>{if(ke)return!1;if(u?.exact){if(!AS(Q.pathname,te.pathname,r.basepath))return!1}else{const ze=oc(Q.pathname,r.basepath),Xe=oc(te.pathname,r.basepath);if(!(ze.startsWith(Xe)&&(ze.length===Xe.length||ze[Xe.length]==="/")))return!1}return(u?.includeSearch??!0)&&!Qt(Q.search,te.search,{partial:!u?.exact,ignoreUndefined:!u?.explicitUndefined})?!1:u?.includeHash?$&&Q.hash===te.hash:!0},[u?.exact,u?.explicitUndefined,u?.includeHash,u?.includeSearch,Q,ke,$,te.hash,te.pathname,te.search,r.basepath]),Ut=Lt?ns(l,{})??zT:ch,jt=Lt?ch:ns(c,{})??ch,ds=[L,Ut.className,jt.className].filter(Boolean).join(" "),zt=(N||Ut.style||jt.style)&&{...N,...Ut.style,...jt.style},[hs,Xn]=ee.useState(!1),Un=ee.useRef(!1),un=e.reloadDocument||ke?!1:p??r.options.defaultPreload,bt=m??r.options.defaultPreloadDelay??0,en=ee.useCallback(()=>{r.preloadRoute({...G,_builtLocation:te}).catch(ze=>{console.warn(ze),console.warn(cx)})},[r,G,te]);pT(a,ee.useCallback(ze=>{ze?.isIntersecting&&en()},[en]),IT,{disabled:!!M||un!=="viewport"}),ee.useEffect(()=>{Un.current||!M&&un==="render"&&(en(),Un.current=!0)},[M,en,un]);const fs=ze=>{const Xe=ze.currentTarget.getAttribute("target"),dn=A!==void 0?A:Xe;if(!M&&!KT(ze)&&!ze.defaultPrevented&&(!dn||dn==="_self")&&ze.button===0){ze.preventDefault(),Q0.flushSync(()=>{Xn(!0)});const Zn=r.subscribe("onResolved",()=>{Zn(),Xn(!1)});r.navigate({...G,replace:b,resetScroll:x,hashScrollIntoView:g,startTransition:w,viewTransition:k,ignoreBlocker:ie})}};if(ke)return{...C,ref:a,href:ke,...E&&{children:E},...A&&{target:A},...M&&{disabled:M},...N&&{style:N},...L&&{className:L},...X&&{onClick:X},...Y&&{onBlur:Y},...I&&{onFocus:I},...F&&{onMouseEnter:F},...Z&&{onMouseLeave:Z},...le&&{onTouchStart:le}};const ht=ze=>{if(M||un!=="intent")return;if(!bt){en();return}const Xe=ze.currentTarget;if(Wi.has(Xe))return;const dn=setTimeout(()=>{Wi.delete(Xe),en()},bt);Wi.set(Xe,dn)},zn=ze=>{M||un!=="intent"||en()},ft=ze=>{if(M||!un||!bt)return;const Xe=ze.currentTarget,dn=Wi.get(Xe);dn&&(clearTimeout(dn),Wi.delete(Xe))};return{...C,...Ut,...jt,href:fe?.href,ref:a,onClick:La([X,fs]),onBlur:La([Y,ft]),onFocus:La([I,ht]),onMouseEnter:La([F,ht]),onMouseLeave:La([Z,ft]),onTouchStart:La([le,zn]),disabled:!!M,target:A,...zt&&{style:zt},...ds&&{className:ds},...M&&PT,...Lt&&BT,...$&&hs&&HT}}var ch={},zT={className:"active"},PT={role:"link","aria-disabled":!0},BT={"data-status":"active","aria-current":"page"},HT={"data-transitioning":"transitioning"},Wi=new WeakMap,IT={rootMargin:"100px"},La=e=>t=>{for(const r of e)if(r){if(t.defaultPrevented)return;r(t)}};function qT(e,t,r,a){if(!a)return t?{href:e,external:!0}:{href:r.createHref(e)||"/",external:!1}}function $T(e){if(typeof e!="string")return!1;const t=e.charCodeAt(0);return t===47?e.charCodeAt(1)!==47:t===46}var je=ee.forwardRef((e,t)=>{const{_asChild:r,...a}=e,{type:l,...c}=UT(a,t),u=typeof a.children=="function"?a.children({isActive:c["data-status"]==="active"}):a.children;if(!r){const{disabled:h,...p}=c;return ee.createElement("a",p,u)}return ee.createElement(r,c,u)});function KT(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}var VT=class extends a0{constructor(t){super(t),this.useMatch=r=>Ys({select:r?.select,from:this.id,structuralSharing:r?.structuralSharing}),this.useRouteContext=r=>J0({...r,from:this.id}),this.useSearch=r=>F0({select:r?.select,structuralSharing:r?.structuralSharing,from:this.id}),this.useParams=r=>Y0({select:r?.select,structuralSharing:r?.structuralSharing,from:this.id}),this.useLoaderDeps=r=>G0({...r,from:this.id}),this.useLoaderData=r=>V0({...r,from:this.id}),this.useNavigate=()=>sf({from:this.fullPath}),this.Link=W.forwardRef((r,a)=>_.jsx(je,{ref:a,from:this.fullPath,...r}))}};function GT(e){return new VT(e)}function YT(){return e=>JT(e)}var FT=class extends fx{constructor(e){super(e),this.useMatch=t=>Ys({select:t?.select,from:this.id,structuralSharing:t?.structuralSharing}),this.useRouteContext=t=>J0({...t,from:this.id}),this.useSearch=t=>F0({select:t?.select,structuralSharing:t?.structuralSharing,from:this.id}),this.useParams=t=>Y0({select:t?.select,structuralSharing:t?.structuralSharing,from:this.id}),this.useLoaderDeps=t=>G0({...t,from:this.id}),this.useLoaderData=t=>V0({...t,from:this.id}),this.useNavigate=()=>sf({from:this.fullPath}),this.Link=W.forwardRef((t,r)=>_.jsx(je,{ref:r,from:this.fullPath,...t}))}};function JT(e){return new FT(e)}function Wt(e){return new QT(e,{silent:!0}).createRoute}var QT=class{constructor(e,t){this.path=e,this.createRoute=r=>{const a=GT(r);return a.isRoot=!1,a},this.silent=t?.silent}};function xn(e,t){let r,a,l,c;const u=()=>(r||(r=e().then(p=>{r=void 0,a=p[t]}).catch(p=>{if(l=p,lS(l)&&l instanceof Error&&typeof window<"u"&&typeof sessionStorage<"u"){const m=`tanstack_router_reload:${l.message}`;sessionStorage.getItem(m)||(sessionStorage.setItem(m,"1"),c=!0)}})),r),h=function(m){if(c)throw window.location.reload(),new Promise(()=>{});if(l)throw l;if(!a)if(dc)dc(u());else throw u();return ee.createElement(a,m)};return h.preload=u,h}function XT(e){const t=At(),r=`not-found-${lt(t.stores.location,a=>a.pathname)}-${lt(t.stores.status,a=>a)}`;return _.jsx(tf,{getResetKey:()=>r,onCatch:(a,l)=>
12{if(vt(a))e.onCatch?.(a,l);else throw a},errorComponent:({error:a})=>{if(vt(a))return e.fallback?.(a);throw a},children:e.children})}function ZT(){return _.jsx("p",{children:"Not Found"})}function Ia(e){return _.jsx(_.Fragment,{children:e.children})}function X0(e,t,r){return t.options.notFoundComponent?_.jsx(t.options.notFoundComponent,{...r}):e.options.defaultNotFoundComponent?_.jsx(e.options.defaultNotFoundComponent,{...r}):_.jsx(ZT,{})}function WT(e){return null}function eR(){return WT(At()),null}var Z0=ee.memo(function({matchId:t}){const r=At(),a=r.stores.matchStores.get(t);a||Zt();const l=lt(r.stores.loadedAt,u=>u),c=lt(a,u=>u);return _.jsx(tR,{router:r,matchId:t,resetKey:l,matchState:ee.useMemo(()=>{const u=c.routeId,h=r.routesById[u].parentRoute?.id;return{routeId:u,ssr:c.ssr,_displayPending:c._displayPending,parentRouteId:h}},[c._displayPending,c.routeId,c.ssr,r.routesById])})});function tR({router:e,matchId:t,resetKey:r,matchState:a}){const l=e.routesById[a.routeId],c=l.options.pendingComponent??e.options.defaultPendingComponent,u=c?_.jsx(c,{}):null,h=l.options.errorComponent??e.options.defaultErrorComponent,p=l.options.onCatch??e.options.defaultOnCatch,m=l.isRoot?l.options.notFoundComponent??e.options.notFoundRoute?.options.component:l.options.notFoundComponent,y=a.ssr===!1||a.ssr==="data-only",g=(!l.isRoot||l.options.wrapInSuspense||y)&&(l.options.wrapInSuspense??c??(l.options.errorComponent?.preload||y))?ee.Suspense:Ia,b=h?tf:Ia,w=m?XT:Ia;return _.jsxs(l.isRoot?l.options.shellComponent??Ia:Ia,{children:[_.jsx(kc.Provider,{value:t,children:_.jsx(g,{fallback:u,children:_.jsx(b,{getResetKey:()=>r,errorComponent:h||nf,onCatch:(x,k)=>{if(vt(x))throw x.routeId??=a.routeId,x;p?.(x,k)},children:_.jsx(w,{fallback:x=>{if(x.routeId??=a.routeId,!m||x.routeId&&x.routeId!==a.routeId||!x.routeId&&!l.isRoot)throw x;return ee.createElement(m,x)},children:y||a._displayPending?_.jsx(wT,{fallback:u,children:_.jsx(Zy,{matchId:t})}):_.jsx(Zy,{matchId:t})})})})}),a.parentRouteId===$s?_.jsxs(_.Fragment,{children:[_.jsx(nR,{resetKey:r}),e.options.scrollRestoration&&Fv?_.jsx(eR,{}):null]}):null]})}function nR({resetKey:e}){const t=At(),r=ee.useRef(void 0);return no(()=>{const a=t.latestLocation.href;(r.current===void 0||r.current!==a)&&(t.emit({type:"onRendered",...Fa(t.stores.location.get(),t.stores.resolvedLocation.get())}),r.current=a)},[t.latestLocation.state.__TSR_key,e,t]),null}var Zy=ee.memo(function({matchId:t}){const r=At(),a=(y,g)=>r.getMatch(y.id)?._nonReactive[g]??y._nonReactive[g],l=r.stores.matchStores.get(t);l||Zt();const c=lt(l,y=>y),u=c.routeId,h=r.routesById[u],p=ee.useMemo(()=>{const y=(r.routesById[u].options.remountDeps??r.options.defaultRemountDeps)?.({routeId:u,loaderDeps:c.loaderDeps,params:c._strictParams,search:c._strictSearch});return y?JSON.stringify(y):void 0},[u,c.loaderDeps,c._strictParams,c._strictSearch,r.options.defaultRemountDeps,r.routesById]),m=ee.useMemo(()=>{const y=h.options.component??r.options.defaultComponent;return y?_.jsx(y,{},p):_.jsx(W0,{})},[p,h.options.component,r.options.defaultComponent]);if(c._displayPending)throw a(c,"displayPendingPromise");if(c._forcePending)throw a(c,"minPendingPromise");if(c.status==="pending"){const y=h.options.pendingMinMs??r.options.defaultPendingMinMs;if(y){const g=r.getMatch(c.id);if(g&&!g._nonReactive.minPendingPromise){const b=Vs();g._nonReactive.minPendingPromise=b,setTimeout(()=>{b.resolve(),g._nonReactive.minPendingPromise=void 0},y)}}throw a(c,"loadPromise")}if(c.status==="notFound")return vt(c.error)||Zt(),X0(r,h,c.error);if(c.status==="redirected")throw Xt(c.error)||Zt(),a(c,"loadPromise");if(c.status==="error")throw c.error;return m}),W0=ee.memo(function(){const t=At(),r=ee.useContext(kc);let a,l=!1,c;{const m=r?t.stores.matchStores.get(r):void 0;[a,l]=lt(m,y=>[y?.routeId,y?.globalNotFound??!1]),c=lt(t.stores.matchesId,y=>y[y.findIndex(g=>g===r)+1])}const u=a?t.routesById[a]:void 0,h=t.options.defaultPendingComponent?_.jsx(t.options.defaultPendingComponent,{}):null;if(l)return u||Zt(),X0(t,u,void 0);if(!c)return null;const p=_.jsx(Z0,{matchId:c});return a===$s?_.jsx(ee.Suspense,{fallback:h,children:p}):p});function rR(){const e=At(),t=ee.useRef({router:e,mounted:!1}),[r,a]=ee.useState(!1),l=lt(e.stores.isLoading,g=>g),c=lt(e.stores.hasPending,g=>g),u=sh(l),h=l||r||c,p=sh(h),m=l||c,y=sh(m);return e.startTransition=g=>{a(!0),ee.startTransition(()=>{g(),a(!1)})},ee.useEffect(()=>{const g=e.history.subscribe(e.load),b=e.buildLocation({to:e.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return as(e.latestLocation.publicHref)!==as(b.publicHref)&&e.commitLocation({...b,replace:!0}),()=>{g()}},[e,e.history]),no(()=>
12{if(typeof window<"u"&&e.ssr||t.current.router===e&&t.current.mounted)return;t.current={router:e,mounted:!0},(async()=>{try{await e.load()}catch(b){console.error(b)}})()},[e]),no(()=>{u&&!l&&e.emit({type:"onLoad",...Fa(e.stores.location.get(),e.stores.resolvedLocation.get())})},[u,e,l]),no(()=>{y&&!m&&e.emit({type:"onBeforeRouteMount",...Fa(e.stores.location.get(),e.stores.resolvedLocation.get())})},[m,y,e]),no(()=>{if(p&&!h){const g=Fa(e.stores.location.get(),e.stores.resolvedLocation.get());e.emit({type:"onResolved",...g}),$0(()=>{e.stores.status.set("idle"),e.stores.resolvedLocation.set(e.stores.location.get())}),g.hrefChanged&&px(e)}},[h,p,e]),null}function sR(){const e=At(),t=e.routesById[$s].options.pendingComponent??e.options.defaultPendingComponent,r=t?_.jsx(t,{}):null,a=_.jsxs(typeof document<"u"&&e.ssr?Ia:ee.Suspense,{fallback:r,children:[_.jsx(rR,{}),_.jsx(aR,{})]});return e.options.InnerWrap?_.jsx(e.options.InnerWrap,{children:a}):a}function aR(){const e=At(),t=lt(e.stores.firstId,l=>l),r=lt(e.stores.loadedAt,l=>l),a=t?_.jsx(Z0,{matchId:t}):null;return _.jsx(kc.Provider,{value:t,children:e.options.disableGlobalCatchBoundary?a:_.jsx(tf,{getResetKey:()=>r,errorComponent:nf,onCatch:void 0,children:a})})}var iR=e=>({createMutableStore:Yy,createReadonlyStore:Yy,batch:$0}),oR=e=>new lR(e),lR=class extends tx{constructor(e){super(e,iR)}};function cR({router:e,children:t,...r}){Object.keys(r).length>0&&e.update({...e.options,...r,context:{...e.options.context,...r.context}});const a=_.jsx(I0.Provider,{value:e,children:t});return e.options.Wrap?_.jsx(e.options.Wrap,{children:a}):a}function uR({router:e,...t}){return _.jsx(cR,{router:e,...t,children:_.jsx(sR,{})})}function eb(e){const{attrs:t,children:r,nonce:a}=e;switch(e.tag){case"title":return _.jsx("title",{...t,suppressHydrationWarning:!0,children:r});case"meta":return _.jsx("meta",{...t,suppressHydrationWarning:!0});case"link":return _.jsx("link",{...t,precedence:t?.precedence??(t?.rel==="stylesheet"?"default":void 0),nonce:a,suppressHydrationWarning:!0});case"style":return e.inlineCss,_.jsx("style",{...t,dangerouslySetInnerHTML:{__html:r},nonce:a});case"script":return _.jsx(dR,{attrs:t,children:r});default:return null}}function dR({attrs:e,children:t}){At();const r=rf(),a=typeof e?.type=="string"&&e.type!==""&&e.type!=="text/javascript"&&e.type!=="module";if(ee.useEffect(()=>{if(!a){if(e?.src){const l=(()=>{try{const u=document.baseURI||window.location.href;return new URL(e.src,u).href}catch{return e.src}})();if(Array.from(document.querySelectorAll("script[src]")).find(u=>u.src===l))return;const c=document.createElement("script");for(const[u,h]of Object.entries(e))u!=="suppressHydrationWarning"&&h!==void 0&&h!==!1&&c.setAttribute(u,typeof h=="boolean"?"":String(h));return document.head.appendChild(c),()=>{c.parentNode&&c.parentNode.removeChild(c)}}if(typeof t=="string"){const l=typeof e?.type=="string"?e.type:"text/javascript",c=typeof e?.nonce=="string"?e.nonce:void 0;if(Array.from(document.querySelectorAll("script:not([src])")).find(h=>{if(!(h instanceof HTMLScriptElement))return!1;const p=h.getAttribute("type")??"text/javascript",m=h.getAttribute("nonce")??void 0;return h.textContent===t&&p===l&&m===c}))return;const u=document.createElement("script");if(u.textContent=t,e)for(const[h,p]of Object.entries(e))h!=="suppressHydrationWarning"&&p!==void 0&&p!==!1&&u.setAttribute(h,typeof p=="boolean"?"":String(p));return document.head.appendChild(u),()=>{u.parentNode&&u.parentNode.removeChild(u)}}}},[e,t,a]),a&&typeof t=="string")return _.jsx("script",{...e,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:t}});if(!r){if(e?.src)return _.jsx("script",{...e,suppressHydrationWarning:!0});if(typeof t=="string")return _.jsx("script",{...e,dangerouslySetInnerHTML:{__html:t},suppressHydrationWarning:!0})}return null}var hR=e=>{const t=At(),r=t.options.ssr?.nonce,a=lt(t.stores.matches,m=>m.map(y=>y.meta).filter(Boolean),Qt),l=ee.useMemo(()=>{const m=[],y={};let g;for(let b=a.length-1;b>=0;b--){const w=a[b];for(let x=w.length-1;x>=0;x--){const k=w[x];if(k)if(k.title)g||(g={tag:"title",children:k.title});else if("script:ld+json"in k)try{const E=JSON.stringify(k["script:ld+json"]);m.push({tag:"script",attrs:{type:"application/ld+json"},children:fS(E)})}catch{}else{const E=k.name??k.property;if(E){if(y[E])continue;y[E]=!0}m.push({tag:"meta",attrs:{...k,nonce:r}})}}}return g&&m.push(g),r&&m.push({tag:"meta",attrs:{property:"csp-nonce",content:r}}),m.reverse(),m},[a,r]),c=lt(t.stores.matches,m=>{const y=m.map(w=>
12w.links).filter(Boolean).flat(1).map(w=>({tag:"link",attrs:{...w,nonce:r}})),g=t.ssr?.manifest,b=m.map(w=>g?.routes[w.routeId]?.assets??[]).filter(Boolean).flat(1).flatMap(w=>w.tag==="link"?hx(g,w)?[]:[{tag:"link",attrs:{...w.attrs,crossOrigin:jy(e,"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]},Qt),u=lt(t.stores.matches,m=>{const y=[];return m.map(g=>t.looseRoutesById[g.routeId]).forEach(g=>t.ssr?.manifest?.routes[g.id]?.preloads?.filter(Boolean).forEach(b=>{const w=ux(b);y.push({tag:"link",attrs:{rel:"modulepreload",href:w.href,crossOrigin:jy(e,"modulepreload")??w.crossOrigin,nonce:r}})})),y},Qt),h=lt(t.stores.matches,m=>m.map(y=>y.styles).flat(1).filter(Boolean).map(({children:y,...g})=>({tag:"style",attrs:{...g,nonce:r},children:y})),Qt),p=lt(t.stores.matches,m=>m.map(y=>y.headScripts).flat(1).filter(Boolean).map(({children:y,...g})=>({tag:"script",attrs:{...g,nonce:r},children:y})),Qt);return fR([...l,...u,...c,...h,...p],m=>JSON.stringify(m))};function fR(e,t){const r=new Set;return e.filter(a=>{const l=t(a);return r.has(l)?!1:(r.add(l),!0)})}function pR(e){const t=hR(e.assetCrossOrigin),r=At().options.ssr?.nonce;return _.jsx(_.Fragment,{children:t.map(a=>ee.createElement(eb,{...a,key:`tsr-meta-${JSON.stringify(a)}`,nonce:r}))})}var mR=()=>{const e=At(),t=e.options.ssr?.nonce,r=c=>{const u=[],h=e.ssr?.manifest;return h?(c.map(p=>e.looseRoutesById[p.routeId]).forEach(p=>h.routes[p.id]?.assets?.filter(m=>m.tag==="script").forEach(m=>{u.push({tag:"script",attrs:{...m.attrs,nonce:t},children:m.children})})),u):[]},a=c=>c.map(u=>u.scripts).flat(1).filter(Boolean).map(({children:u,...h})=>({tag:"script",attrs:{...h,suppressHydrationWarning:!0,nonce:t},children:u})),l=lt(e.stores.matches,r,Qt);return gR(e,lt(e.stores.matches,a,Qt),l)};function gR(e,t,r){let a;e.serverSsr&&(a=e.serverSsr.takeBufferedScripts());const l=[...t,...r];return a&&l.unshift(a),_.jsx(_.Fragment,{children:l.map((c,u)=>ee.createElement(eb,{...c,key:`tsr-scripts-${c.tag}-${u}`}))})}var Is=(e,t)=>{const r={type:"request",...t||e};return{options:r,middleware:a=>Is({},Object.assign(r,{middleware:a})),inputValidator:a=>Is({},Object.assign(r,{inputValidator:a})),client:a=>Is({},Object.assign(r,{client:a})),server:a=>Is({},Object.assign(r,{server:a}))}};function tb(e,t){for(let r=0,a=t.length;r<a;r++){const l=t[r];e.has(l)||(e.add(l),l.extends&&tb(e,l.extends))}}var yR=e=>({getOptions:async()=>{const t=await e();if(t.serializationAdapters){const r=new Set;tb(r,t.serializationAdapters),t.serializationAdapters=Array.from(r)}return t},createMiddleware:Is});function Oc(e,t){var r={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(r[a]=e[a]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var l=0,a=Object.getOwnPropertySymbols(e);l<a.length;l++)t.indexOf(a[l])<0&&Object.prototype.propertyIsEnumerable.call(e,a[l])&&(r[a[l]]=e[a[l]]);return r}function vR(e,t,r,a){function l(c){return c instanceof r?c:new r(function(u){u(c)})}return new(r||(r=Promise))(function(c,u){function h(y){try{m(a.next(y))}catch(g){u(g)}}function p(y){try{m(a.throw(y))}catch(g){u(g)}}function m(y){y.done?c(y.value):l(y.value).then(h,p)}m((a=a.apply(e,t||[])).next())})}const bR=e=>e?(...t)=>e(...t):(...t)=>fetch(...t);class af extends Error{constructor(t,r="FunctionsError",a){super(t),this.name=r,this.context=a}toJSON(){return{name:this.name,message:this.message,context:this.context}}}class wR extends af{constructor(t){super("Failed to send a request to the Edge Function","FunctionsFetchError",t)}}class Wy extends af{constructor(t){super("Relay Error invoking the Edge Function","FunctionsRelayError",t)}}class ev extends af{constructor(t){super("Edge Function returned a non-2xx status code","FunctionsHttpError",t)}}var Ah;(function(e){e.Any="any",e.ApNortheast1="ap-northeast-1",e.ApNortheast2="ap-northeast-2",e.ApSouth1="ap-south-1",e.ApSoutheast1="ap-southeast-1",e.ApSoutheast2="ap-southeast-2",e.CaCentral1="ca-central-1",e.EuCentral1="eu-central-1",e.EuWest1="eu-west-1",e.EuWest2="eu-west-2",e.EuWest3="eu-west-3",e.SaEast1="sa-east-1",e.UsEast1="us-east-1",e.UsWest1="us-west-1",e.UsWest2="us-west-2"})(Ah||(Ah={}));class _R{constructor(t,{headers:r={},customFetch:a,region:l=Ah.Any}={}){this.url=t,this.headers=r,this.region=l,this.fetch=bR(a)}setAuth(t){this.headers.Authorization=`Bearer ${t}`}invoke(t){return vR(this,arguments,void 0,function*(r,a={}){var l;let c,u;try{const{headers:h,method:p,body:m,signal:y,timeout:g}=a;let b={},{region:w}=a;w||(w=this.region);const x=new URL(`${this.url}/${r}`);w&&w!=="any"&&(b["x-region"]=w,x.searchParams.set("forceFunctionRegion",w));let k;m&&(h&&!Object.prototype.hasOwnProperty.call(h,"Content-Type")||!h)?typeof Blob<"u"&&m instanceof Blob||m instanceof ArrayBuffer?(b["Content-Type"]="application/octet-stream",k=m):typeof m=="string"?(b["Content-Type"]="text/plain",k=m):typeof FormData<"u"&&m instanceof FormData?k=m:(b["Content-Type"]="application/json",k=JSON.stringify(m)):m&&typeof m!="string"&&!(typeof Blob<"u"&&m instanceof Blob)&&!(m instanceof ArrayBuffer)&&!(typeof FormData<"u"&&m instanceof FormData)?k=JSON.stringify(m):k=m;let E=y;g&&(u=new AbortController,c=setTimeout(()=>u.abort(),g),y?(E=u.signal,y.addEventListener("abort",()=>u.abort())):E=u.signal);const A=yield this.fetch(x.toString(),{method:p||"POST",headers:Object.assign(Object.assign(Object.assign({},b),this.headers),h),body:k,signal:E}).catch(X=>{throw new wR(X)}),M=A.headers.get("x-relay-error");
12if(M&&M==="true")throw new Wy(A);if(!A.ok)throw new ev(A);let N=((l=A.headers.get("Content-Type"))!==null&&l!==void 0?l:"text/plain").split(";")[0].trim(),L;return N==="application/json"?L=yield A.json():N==="application/octet-stream"||N==="application/pdf"?L=yield A.blob():N==="text/event-stream"?L=A:N==="multipart/form-data"?L=yield A.formData():L=yield A.text(),{data:L,error:null,response:A}}catch(h){return{data:null,error:h,response:h instanceof ev||h instanceof Wy?h.context:void 0}}finally{c&&clearTimeout(c)}})}}const nb=3,tv=e=>Math.min(1e3*2**e,3e4),SR=[520,503],rb=["GET","HEAD","OPTIONS"];var xR=class extends Error{constructor(e){super(e.message),this.name="PostgrestError",this.details=e.details,this.hint=e.hint,this.code=e.code}toJSON(){return{name:this.name,message:this.message,details:this.details,hint:this.hint,code:this.code}}};function nv(e,t){return new Promise(r=>{if(t?.aborted){r();return}const a=setTimeout(()=>{t?.removeEventListener("abort",l),r()},e);function l(){clearTimeout(a),r()}t?.addEventListener("abort",l)})}function ER(e,t,r,a){return!(!a||r>=nb||!rb.includes(e)||!SR.includes(t))}var TR=class{constructor(e){var t,r,a,l,c;this.shouldThrowOnError=!1,this.retryEnabled=!0,this.method=e.method,this.url=e.url,this.headers=new Headers(e.headers),this.schema=e.schema,this.body=e.body,this.shouldThrowOnError=(t=e.shouldThrowOnError)!==null&&t!==void 0?t:!1,this.signal=e.signal,this.isMaybeSingle=(r=e.isMaybeSingle)!==null&&r!==void 0?r:!1,this.shouldStripNulls=(a=e.shouldStripNulls)!==null&&a!==void 0?a:!1,this.urlLengthLimit=(l=e.urlLengthLimit)!==null&&l!==void 0?l:8e3,this.retryEnabled=(c=e.retry)!==null&&c!==void 0?c:!0,e.fetch?this.fetch=e.fetch:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}stripNulls(){if(this.headers.get("Accept")==="text/csv")throw new Error("stripNulls() cannot be used with csv()");return this.shouldStripNulls=!0,this}setHeader(e,t){return this.headers=new Headers(this.headers),this.headers.set(e,t),this}retry(e){return this.retryEnabled=e,this}then(e,t){var r=this;if(this.schema===void 0||(["GET","HEAD"].includes(this.method)?this.headers.set("Accept-Profile",this.schema):this.headers.set("Content-Profile",this.schema)),this.method!=="GET"&&this.method!=="HEAD"&&this.headers.set("Content-Type","application/json"),this.shouldStripNulls){const u=this.headers.get("Accept");u==="application/vnd.pgrst.object+json"?this.headers.set("Accept","application/vnd.pgrst.object+json;nulls=stripped"):(!u||u==="application/json")&&this.headers.set("Accept","application/vnd.pgrst.array+json;nulls=stripped")}const a=this.fetch;let c=(async()=>{let u=0;for(;;){const m=new Headers(r.headers);u>0&&m.set("X-Retry-Count",String(u));let y;try{y=await a(r.url.toString(),{method:r.method,headers:m,body:JSON.stringify(r.body,(g,b)=>typeof b=="bigint"?b.toString():b),signal:r.signal})}catch(g){if(g?.name==="AbortError"||g?.code==="ABORT_ERR"||!rb.includes(r.method))throw g;if(r.retryEnabled&&u<nb){const b=tv(u);u++,await nv(b,r.signal);continue}throw g}if(ER(r.method,y.status,u,r.retryEnabled)){var h,p;const g=(h=(p=y.headers)===null||p===void 0?void 0:p.get("Retry-After"))!==null&&h!==void 0?h:null,b=g!==null?Math.max(0,parseInt(g,10)||0)*1e3:tv(u);await y.text(),u++,await nv(b,r.signal);continue}return await r.processResponse(y)}})();return this.shouldThrowOnError||(c=c.catch(u=>{var h;let p="",m="",y="";const g=u?.cause;if(g){var b,w,x,k;const M=(b=g?.message)!==null&&b!==void 0?b:"",N=(w=g?.code)!==null&&w!==void 0?w:"";p=`${(x=u?.name)!==null&&x!==void 0?x:"FetchError"}: ${u?.message}`,p+=`
13
14Caused by: ${(k=g?.name)!==null&&k!==void 0?k:"Error"}: ${M}`,N&&(p+=` (${N})`),g?.stack&&(p+=`
15${g.stack}`)}else{var E;p=(E=u?.stack)!==null&&E!==void 0?E:""}const A=this.url.toString().length;return u?.name==="AbortError"||u?.code==="ABORT_ERR"?(y="",m="Request was aborted (timeout or manual cancellation)",A>this.urlLengthLimit&&(m+=`. 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.`)):(g?.name==="HeadersOverflowError"||g?.code==="UND_ERR_HEADERS_OVERFLOW")&&(y="",m="HTTP headers exceeded server limits (typically 16KB)",A>this.urlLengthLimit&&(m+=`. 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:`${(h=u?.name)!==null&&h!==void 0?h:"FetchError"}: ${u?.message}`,details:p,hint:m,code:y},data:null,count:null,status:0,statusText:""}}
15)),c.then(e,t)}async processResponse(e){var t=this;let r=null,a=null,l=null,c=e.status,u=e.statusText;if(e.ok){var h,p;if(t.method!=="HEAD"){var m;const b=await e.text();b===""||(t.headers.get("Accept")==="text/csv"||t.headers.get("Accept")&&(!((m=t.headers.get("Accept"))===null||m===void 0)&&m.includes("application/vnd.pgrst.plan+text"))?a=b:a=JSON.parse(b))}const y=(h=t.headers.get("Prefer"))===null||h===void 0?void 0:h.match(/count=(exact|planned|estimated)/),g=(p=e.headers.get("content-range"))===null||p===void 0?void 0:p.split("/");y&&g&&g.length>1&&(l=parseInt(g[1])),t.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,l=null,c=406,u="Not Acceptable"):a.length===1?a=a[0]:a=null)}else{const y=await e.text();try{r=JSON.parse(y),Array.isArray(r)&&e.status===404&&(a=[],r=null,c=200,u="OK")}catch{e.status===404&&y===""?(c=204,u="No Content"):r={message:y}}if(r&&t.shouldThrowOnError)throw new xR(r)}return{success:r===null,error:r,data:a,count:l,status:c,statusText:u}}returns(){return this}overrideTypes(){return this}},RR=class extends TR{select(e){let t=!1;const r=(e??"*").split("").map(a=>/\s/.test(a)&&!t?"":(a==='"'&&(t=!t),a)).join("");return this.url.searchParams.set("select",r),this.headers.append("Prefer","return=representation"),this}order(e,{ascending:t=!0,nullsFirst:r,foreignTable:a,referencedTable:l=a}={}){const c=l?`${l}.order`:"order",u=this.url.searchParams.get(c);return this.url.searchParams.set(c,`${u?`${u},`:""}${e}.${t?"asc":"desc"}${r===void 0?"":r?".nullsfirst":".nullslast"}`),this}limit(e,{foreignTable:t,referencedTable:r=t}={}){const a=typeof r>"u"?"limit":`${r}.limit`;return this.url.searchParams.set(a,`${e}`),this}range(e,t,{foreignTable:r,referencedTable:a=r}={}){const l=typeof a>"u"?"offset":`${a}.offset`,c=typeof a>"u"?"limit":`${a}.limit`;return this.url.searchParams.set(l,`${e}`),this.url.searchParams.set(c,`${t-e+1}`),this}abortSignal(e){return this.signal=e,this}single(){return this.headers.set("Accept","application/vnd.pgrst.object+json"),this}maybeSingle(){return this.isMaybeSingle=!0,this}csv(){return this.headers.set("Accept","text/csv"),this}geojson(){return this.headers.set("Accept","application/geo+json"),this}explain({analyze:e=!1,verbose:t=!1,settings:r=!1,buffers:a=!1,wal:l=!1,format:c="text"}={}){var u;const h=[e?"analyze":null,t?"verbose":null,r?"settings":null,a?"buffers":null,l?"wal":null].filter(Boolean).join("|"),p=(u=this.headers.get("Accept"))!==null&&u!==void 0?u:"application/json";return this.headers.set("Accept",`application/vnd.pgrst.plan+${c}; for="${p}"; options=${h};`),c==="json"?this:this}rollback(){return this.headers.append("Prefer","tx=rollback"),this}returns(){return this}maxAffected(e){return this.headers.append("Prefer","handling=strict"),this.headers.append("Prefer",`max-affected=${e}`),this}};const rv=new RegExp("[,()]");var qa=class extends RR{eq(e,t){return this.url.searchParams.append(e,`eq.${t}`),this}neq(e,t){return this.url.searchParams.append(e,`neq.${t}`),this}gt(e,t){return this.url.searchParams.append(e,`gt.${t}`),this}gte(e,t){return this.url.searchParams.append(e,`gte.${t}`),this}lt(e,t){return this.url.searchParams.append(e,`lt.${t}`),this}lte(e,t){return this.url.searchParams.append(e,`lte.${t}`),this}like(e,t){return this.url.searchParams.append(e,`like.${t}`),this}likeAllOf(e,t){return this.url.searchParams.append(e,`like(all).{${t.join(",")}}`),this}likeAnyOf(e,t){return this.url.searchParams.append(e,`like(any).{${t.join(",")}}`),this}ilike(e,t){return this.url.searchParams.append(e,`ilike.${t}`),this}ilikeAllOf(e,t){return this.url.searchParams.append(e,`ilike(all).{${t.join(",")}}`),this}ilikeAnyOf(e,t){return this.url.searchParams.append(e,`ilike(any).{${t.join(",")}}`),this}regexMatch(e,t){return this.url.searchParams.append(e,`match.${t}`),this}regexIMatch(e,t){return this.url.searchParams.append(e,`imatch.${t}`),this}is(e,t){return this.url.searchParams.append(e,`is.${t}`),this}isDistinct(e,t){return this.url.searchParams.append(e,`isdistinct.${t}`),this}in(e,t){const r=Array.from(new Set(t)).map(a=>
15typeof a=="string"&&rv.test(a)?`"${a}"`:`${a}`).join(",");return this.url.searchParams.append(e,`in.(${r})`),this}notIn(e,t){const r=Array.from(new Set(t)).map(a=>typeof a=="string"&&rv.test(a)?`"${a}"`:`${a}`).join(",");return this.url.searchParams.append(e,`not.in.(${r})`),this}contains(e,t){return typeof t=="string"?this.url.searchParams.append(e,`cs.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cs.{${t.join(",")}}`):this.url.searchParams.append(e,`cs.${JSON.stringify(t)}`),this}containedBy(e,t){return typeof t=="string"?this.url.searchParams.append(e,`cd.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cd.{${t.join(",")}}`):this.url.searchParams.append(e,`cd.${JSON.stringify(t)}`),this}rangeGt(e,t){return this.url.searchParams.append(e,`sr.${t}`),this}rangeGte(e,t){return this.url.searchParams.append(e,`nxl.${t}`),this}rangeLt(e,t){return this.url.searchParams.append(e,`sl.${t}`),this}rangeLte(e,t){return this.url.searchParams.append(e,`nxr.${t}`),this}rangeAdjacent(e,t){return this.url.searchParams.append(e,`adj.${t}`),this}overlaps(e,t){return typeof t=="string"?this.url.searchParams.append(e,`ov.${t}`):this.url.searchParams.append(e,`ov.{${t.join(",")}}`),this}textSearch(e,t,{config:r,type:a}={}){let l="";a==="plain"?l="pl":a==="phrase"?l="ph":a==="websearch"&&(l="w");const c=r===void 0?"":`(${r})`;return this.url.searchParams.append(e,`${l}fts${c}.${t}`),this}match(e){return Object.entries(e).filter(([t,r])=>r!==void 0).forEach(([t,r])=>{this.url.searchParams.append(t,`eq.${r}`)}),this}not(e,t,r){return this.url.searchParams.append(e,`not.${t}.${r}`),this}or(e,{foreignTable:t,referencedTable:r=t}={}){const a=r?`${r}.or`:"or";return this.url.searchParams.append(a,`(${e})`),this}filter(e,t,r){return this.url.searchParams.append(e,`${t}.${r}`),this}},AR=class{constructor(e,{headers:t={},schema:r,fetch:a,urlLengthLimit:l=8e3,retry:c}){this.url=e,this.headers=new Headers(t),this.schema=r,this.fetch=a,this.urlLengthLimit=l,this.retry=c}cloneRequestState(){return{url:new URL(this.url.toString()),headers:new Headers(this.headers)}}select(e,t){const{head:r=!1,count:a}=t??{},l=r?"HEAD":"GET";let c=!1;const u=(e??"*").split("").map(m=>/\s/.test(m)&&!c?"":(m==='"'&&(c=!c),m)).join(""),{url:h,headers:p}=this.cloneRequestState();return h.searchParams.set("select",u),a&&p.append("Prefer",`count=${a}`),new qa({method:l,url:h,headers:p,schema:this.schema,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}insert(e,{count:t,defaultToNull:r=!0}={}){var a;const l="POST",{url:c,headers:u}=this.cloneRequestState();
15if(t&&u.append("Prefer",`count=${t}`),r||u.append("Prefer","missing=default"),Array.isArray(e)){const h=e.reduce((p,m)=>p.concat(Object.keys(m)),[]);if(h.length>0){const p=[...new Set(h)].map(m=>`"${m}"`);c.searchParams.set("columns",p.join(","))}}return new qa({method:l,url:c,headers:u,schema:this.schema,body:e,fetch:(a=this.fetch)!==null&&a!==void 0?a:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}upsert(e,{onConflict:t,ignoreDuplicates:r=!1,count:a,defaultToNull:l=!0}={}){var c;const u="POST",{url:h,headers:p}=this.cloneRequestState();if(p.append("Prefer",`resolution=${r?"ignore":"merge"}-duplicates`),t!==void 0&&h.searchParams.set("on_conflict",t),a&&p.append("Prefer",`count=${a}`),l||p.append("Prefer","missing=default"),Array.isArray(e)){const m=e.reduce((y,g)=>y.concat(Object.keys(g)),[]);if(m.length>0){const y=[...new Set(m)].map(g=>`"${g}"`);h.searchParams.set("columns",y.join(","))}}return new qa({method:u,url:h,headers:p,schema:this.schema,body:e,fetch:(c=this.fetch)!==null&&c!==void 0?c:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}update(e,{count:t}={}){var r;const a="PATCH",{url:l,headers:c}=this.cloneRequestState();return t&&c.append("Prefer",`count=${t}`),new qa({method:a,url:l,headers:c,schema:this.schema,body:e,fetch:(r=this.fetch)!==null&&r!==void 0?r:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}delete({count:e}={}){var t;const r="DELETE",{url:a,headers:l}=this.cloneRequestState();return e&&l.append("Prefer",`count=${e}`),new qa({method:r,url:a,headers:l,schema:this.schema,fetch:(t=this.fetch)!==null&&t!==void 0?t:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};function po(e){"@babel/helpers - typeof";return po=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},po(e)}function kR(e,t){if(po(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var a=r.call(e,t);if(po(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function OR(e){var t=kR(e,"string");return po(t)=="symbol"?t:t+""}function CR(e,t,r){return(t=OR(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function sv(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(l){return Object.getOwnPropertyDescriptor(e,l).enumerable})),r.push.apply(r,a)}return r}function Kl(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?sv(Object(r),!0).forEach(function(a){CR(e,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):sv(Object(r)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(r,a))})}return e}var jR=class sb{constructor(t,{headers:r={},schema:a,fetch:l,timeout:c,urlLengthLimit:u=8e3,retry:h}={}){this.url=t,this.headers=new Headers(r),this.schemaName=a,this.urlLengthLimit=u;const p=l??globalThis.fetch;c!==void 0&&c>0?this.fetch=(m,y)=>{const g=new AbortController,b=setTimeout(()=>g.abort(),c),w=y?.signal;if(w){if(w.aborted)return clearTimeout(b),p(m,y);const x=()=>{clearTimeout(b),g.abort()};return w.addEventListener("abort",x,{once:!0}),p(m,Kl(Kl({},y),{},{signal:g.signal})).finally(()=>{clearTimeout(b),w.removeEventListener("abort",x)})}return p(m,Kl(Kl({},y),{},{signal:g.signal})).finally(()=>clearTimeout(b))}:this.fetch=p,this.retry=h}from(t){if(!t||typeof t!="string"||t.trim()==="")throw new Error("Invalid relation name: relation must be a non-empty string.");return new AR(new URL(`${this.url}/${t}`),{headers:new Headers(this.headers),schema:this.schemaName,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}schema(t){return new sb(this.url,{headers:this.headers,schema:t,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}rpc(t,r={},{head:a=!1,get:l=!1,count:c}={}){var u;let h;const p=new URL(`${this.url}/rpc/${t}`);let m;const y=w=>w!==null&&typeof w=="object"&&(!Array.isArray(w)||w.some(y)),g=a&&Object.values(r).some(y);g?(h="POST",m=r):a||l?(h=a?"HEAD":"GET",Object.entries(r).filter(([w,x])=>x!==void 0).map(([w,x])=>[w,Array.isArray(x)?`{${x.join(",")}}`:`${x}
15`]).forEach(([w,x])=>{p.searchParams.append(w,x)})):(h="POST",m=r);const b=new Headers(this.headers);return g?b.set("Prefer",c?`count=${c},return=minimal`:"return=minimal"):c&&b.set("Prefer",`count=${c}`),new qa({method:h,url:p,headers:b,schema:this.schemaName,body:m,fetch:(u=this.fetch)!==null&&u!==void 0?u:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};class NR{constructor(){}static detectEnvironment(){var t;if(typeof WebSocket<"u")return{type:"native",wsConstructor:WebSocket};const r=globalThis;if(typeof globalThis<"u"&&typeof r.WebSocket<"u")return{type:"native",wsConstructor:r.WebSocket};const 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"&&(!((t=navigator.userAgent)===null||t===void 0)&&t.includes("Vercel-Edge")))return{type:"unsupported",error:"Edge runtime detected (Vercel Edge/Netlify Edge). WebSockets are not supported in edge functions.",workaround:"Use serverless functions or a different deployment target for WebSocket functionality."};const l=globalThis.process;if(l){const c=l.versions;if(c&&c.node){const u=c.node,h=parseInt(u.replace(/^v/,"").split(".")[0]);return h>=22?typeof globalThis.WebSocket<"u"?{type:"native",wsConstructor:globalThis.WebSocket}:{type:"unsupported",error:`Node.js ${h} detected but native WebSocket not found.`,workaround:"Provide a WebSocket implementation via the transport option."}:{type:"unsupported",error:`Node.js ${h} 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 t=this.detectEnvironment();if(t.wsConstructor)return t.wsConstructor;let r=t.error||"WebSocket not supported in this environment.";throw t.workaround&&(r+=`
18
19Suggested solution: ${t.workaround}`),new Error(r)}static isWebSocketSupported(){try{const t=this.detectEnvironment();return t.type==="native"||t.type==="ws"}catch{return!1}}}const MR="2.106.0",DR=`realtime-js/${MR}`,LR="1.0.0",ab="2.0.0",UR=ab,zR=1e4,PR=100,es={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},ib={close:"phx_close",error:"phx_error",join:"phx_join",leave:"phx_leave",access_token:"access_token"},kh={connecting:"connecting",closing:"closing",closed:"closed"};class BR{constructor(t){this.HEADER_LENGTH=1,this.USER_BROADCAST_PUSH_META_LENGTH=6,this.KINDS={userBroadcastPush:3,userBroadcast:4},this.BINARY_ENCODING=0,this.JSON_ENCODING=1,this.BROADCAST_EVENT="broadcast",this.allowedMetadataKeys=[],this.allowedMetadataKeys=t??[]}encode(t,r){if(t.event===this.BROADCAST_EVENT&&!(t.payload instanceof ArrayBuffer)&&typeof t.payload.event=="string")return r(this._binaryEncodeUserBroadcastPush(t));let a=[t.join_ref,t.ref,t.topic,t.event,t.payload];return r(JSON.stringify(a))}_binaryEncodeUserBroadcastPush(t){var r;return this._isArrayBuffer((r=t.payload)===null||r===void 0?void 0:r.payload)?this._encodeBinaryUserBroadcastPush(t):this._encodeJsonUserBroadcastPush(t)}_encodeBinaryUserBroadcastPush(t){var r,a;const l=(a=(r=t.payload)===null||r===void 0?void 0:r.payload)!==null&&a!==void 0?a:new ArrayBuffer(0);return this._encodeUserBroadcastPush(t,this.BINARY_ENCODING,l)}_encodeJsonUserBroadcastPush(t){var r,a;const l=(a=(r=t.payload)===null||r===void 0?void 0:r.payload)!==null&&a!==void 0?a:{},u=new TextEncoder().encode(JSON.stringify(l)).buffer;return this._encodeUserBroadcastPush(t,this.JSON_ENCODING,u)}_encodeUserBroadcastPush(t,r,a){var l,c;const u=t.topic,h=(l=t.ref)!==null&&l!==void 0?l:"",p=(c=t.join_ref)!==null&&c!==void 0?c:"",m=t.payload.event,y=this.allowedMetadataKeys?this._pick(t.payload,this.allowedMetadataKeys):{},g=Object.keys(y).length===0?"":JSON.stringify(y);if(p.length>255)throw new Error(`joinRef length ${p.length} exceeds maximum of 255`);if(h.length>255)throw new Error(`ref length ${h.length} exceeds maximum of 255`);if(u.length>255)throw new Error(`topic length ${u.length} exceeds maximum of 255`);if(m.length>255)throw new Error(`userEvent length ${m.length} exceeds maximum of 255`);if(g.length>255)throw new Error(`metadata length ${g.length} exceeds maximum of 255`);const b=this.USER_BROADCAST_PUSH_META_LENGTH+p.length+h.length+u.length+m.length+g.length,w=new ArrayBuffer(this.HEADER_LENGTH+b);let x=new DataView(w),k=0;x.setUint8(k++,this.KINDS.userBroadcastPush),x.setUint8(k++,p.length),x.setUint8(k++,h.length),x.setUint8(k++,u.length),x.setUint8(k++,m.length),x.setUint8(k++,g.length),x.setUint8(k++,r),Array.from(p,A=>x.setUint8(k++,A.charCodeAt(0))),Array.from(h,A=>x.setUint8(k++,A.charCodeAt(0))),Array.from(u,A=>x.setUint8(k++,A.charCodeAt(0))),Array.from(m,A=>x.setUint8(k++,A.charCodeAt(0))),Array.from(g,A=>x.setUint8(k++,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(t,r){if(this._isArrayBuffer(t)){let a=this._binaryDecode(t);return r(a)}if(typeof t=="string"){const a=JSON.parse(t),[l,c,u,h,p]=a;return r({join_ref:l,ref:c,topic:u,event:h,payload:p})}return r({})}_binaryDecode(t){const r=new DataView(t),a=r.getUint8(0),l=new TextDecoder;if(a===this.KINDS.userBroadcast)return this._decodeUserBroadcast(t,r,l)}_decodeUserBroadcast(t,r,a){const l=r.getUint8(1),c=r.getUint8(2),u=r.getUint8(3),h=r.getUint8(4);let p=this.HEADER_LENGTH+4;const m=a.decode(t.slice(p,p+l));p=p+l;const y=a.decode(t.slice(p,p+c));p=p+c;const g=a.decode(t.slice(p,p+u));p=p+u;const b=t.slice(p,t.byteLength),w=h===this.JSON_ENCODING?JSON.parse(a.decode(b)):b,x={type:this.BROADCAST_EVENT,event:y,payload:w};return u>0&&(x.meta=JSON.parse(g)),{join_ref:null,ref:null,topic:m,event:this.BROADCAST_EVENT,payload:x}}_isArrayBuffer(t){var r;return t instanceof ArrayBuffer||((r=t?.constructor)===null||r===void 0?void 0:r.name)==="ArrayBuffer"}_pick(t,r){return!t||typeof t!="object"?{}:Object.fromEntries(Object.entries(t).filter(([a])=>r.includes(a)))}}var Ke;(function(e){e.abstime="abstime",e.bool="bool",e.date="date",e.daterange="daterange",e.float4="float4",e.float8="float8",e.int2="int2",e.int4="int4",e.int4range="int4range",e.int8="int8",e.int8range="int8range",e.json="json",e.jsonb="jsonb",e.money="money",e.numeric="numeric",e.oid="oid",e.reltime="reltime",e.text="text",e.time="time",e.timestamp="timestamp",e.timestamptz="timestamptz",e.timetz="timetz",e.tsrange="tsrange",e.tstzrange="tstzrange"})(Ke||(Ke={}));const av=(e,t,r={})=>{var a;const l=(a=r.skipTypes)!==null&&a!==void 0?a:[];return t?Object.keys(t).reduce((c,u)=>(c[u]=HR(u,e,t,l),c),{}):{}},HR=(e,t,r,a)=>{const l=t.find(h=>h.name===e),c=l?.type,u=r[e];return c&&!a.includes(c)?ob(c,u):Oh(u)},ob=(e,t)=>
19{if(e.charAt(0)==="_"){const r=e.slice(1,e.length);return KR(t,r)}switch(e){case Ke.bool:return IR(t);case Ke.float4:case Ke.float8:case Ke.int2:case Ke.int4:case Ke.int8:case Ke.numeric:case Ke.oid:return qR(t);case Ke.json:case Ke.jsonb:return $R(t);case Ke.timestamp:return VR(t);case Ke.abstime:case Ke.date:case Ke.daterange:case Ke.int4range:case Ke.int8range:case Ke.money:case Ke.reltime:case Ke.text:case Ke.time:case Ke.timestamptz:case Ke.timetz:case Ke.tsrange:case Ke.tstzrange:return Oh(t);default:return Oh(t)}},Oh=e=>e,IR=e=>{switch(e){case"t":return!0;case"f":return!1;default:return e}},qR=e=>{if(typeof e=="string"){const t=parseFloat(e);if(!Number.isNaN(t))return t}return e},$R=e=>{if(typeof e=="string")try{return JSON.parse(e)}catch{return e}return e},KR=(e,t)=>{if(typeof e!="string")return e;const r=e.length-1,a=e[r];if(e[0]==="{"&&a==="}"){let c;const u=e.slice(1,r);try{c=JSON.parse("["+u+"]")}catch{c=u?u.split(","):[]}return c.map(h=>ob(t,h))}return e},VR=e=>typeof e=="string"?e.replace(" ","T"):e,lb=e=>{const t=new URL(e);return t.protocol=t.protocol.replace(/^ws/i,"http"),t.pathname=t.pathname.replace(/\/+$/,"").replace(/\/socket\/websocket$/i,"").replace(/\/socket$/i,"").replace(/\/websocket$/i,""),t.pathname===""||t.pathname==="/"?t.pathname="/api/broadcast":t.pathname=t.pathname+"/api/broadcast",t.href};var ao=e=>typeof e=="function"?e:function(){return e},GR=typeof self<"u"?self:null,$a=typeof window<"u"?window:null,Yn=GR||$a||globalThis,YR="2.0.0",FR=1e4,JR=1e3,Jn={connecting:0,open:1,closing:2,closed:3},Ft={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},wr={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave"},Ch={longpoll:"longpoll",websocket:"websocket"},QR={complete:4},jh="base64url.bearer.phx.",Vl=class{constructor(e,t,r,a){this.channel=e,this.event=t,this.payload=r||function(){return{}},this.receivedResp=null,this.timeout=a,this.timeoutTimer=null,this.recHooks=[],this.sent=!1,this.ref=void 0}resend(e){this.timeout=e,this.reset(),this.send()}send(){this.hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload(),ref:this.ref,join_ref:this.channel.joinRef()}))}receive(e,t){return this.hasReceived(e)&&t(this.receivedResp.response),this.recHooks.push({status:e,callback:t}),this}reset(){this.cancelRefEvent(),this.ref=null,this.refEvent=null,this.receivedResp=null,this.sent=!1}destroy(){this.cancelRefEvent(),this.cancelTimeout()}matchReceive({status:e,response:t,_ref:r}){this.recHooks.filter(a=>a.status===e).forEach(a=>a.callback(t))}cancelRefEvent(){this.refEvent&&this.channel.off(this.refEvent)}cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=null}startTimeout(){this.timeoutTimer&&this.cancelTimeout(),this.ref=this.channel.socket.makeRef(),this.refEvent=this.channel.replyEventName(this.ref),this.channel.on(this.refEvent,e=>{this.cancelRefEvent(),this.cancelTimeout(),this.receivedResp=e,this.matchReceive(e)}),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}hasReceived(e){return this.receivedResp&&this.receivedResp.status===e}trigger(e,t){this.channel.trigger(this.refEvent,{status:e,response:t})}},cb=class{constructor(e,t){this.callback=e,this.timerCalc=t,this.timer=void 0,this.tries=0}reset(){this.tries=0,clearTimeout(this.timer)}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout(()=>{this.tries=this.tries+1,this.callback()},this.timerCalc(this.tries+1))}},XR=class{constructor(e,t,r){this.state=Ft.closed,this.topic=e,this.params=ao(t||{}),this.socket=r,this.bindings=[],this.bindingRef=0,this.timeout=this.socket.timeout,this.joinedOnce=!1,this.joinPush=new Vl(this,wr.join,this.params,this.timeout),this.pushBuffer=[],this.stateChangeRefs=[],this.rejoinTimer=new cb(()=>{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=Ft.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(a=>a.send()),this.pushBuffer=[]}),this.joinPush.receive("error",a=>{this.state=Ft.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=Ft.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=Ft.errored,this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.joinPush.receive("timeout",()=>{this.socket.hasLogger()&&this.socket.log("channel",`timeout ${this.topic}`,this.joinPush.timeout),new Vl(this,wr.leave,ao({}),this.timeout).send(),this.state=Ft.errored,this.joinPush.reset(),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.on(wr.reply,(a,l)=>{this.trigger(this.replyEventName(l),a)})}join(e=this.timeout){if(this.joinedOnce)throw new Error("tried to join multiple times. 'join' can only be called a single time per channel instance");return this.timeout=e,this.joinedOnce=!0,this.rejoin(),this.joinPush}
vendor: 5,263 bytes, line 19
19teardown(){this.pushBuffer.forEach(e=>e.destroy()),this.pushBuffer=[],this.rejoinTimer.reset(),this.joinPush.destroy(),this.state=Ft.closed,this.bindings=[]}onClose(e){this.on(wr.close,e)}onError(e){return this.on(wr.error,t=>e(t))}on(e,t){let r=this.bindingRef++;return this.bindings.push({event:e,ref:r,callback:t}),r}off(e,t){this.bindings=this.bindings.filter(r=>!(r.event===e&&(typeof t>"u"||t===r.ref)))}canPush(){return this.socket.isConnected()&&this.isJoined()}push(e,t,r=this.timeout){if(t=t||{},!this.joinedOnce)throw new Error(`tried to push '${e}' to '${this.topic}' before joining. Use channel.join() before pushing events`);let a=new Vl(this,e,function(){return t},r);return this.canPush()?a.send():(a.startTimeout(),this.pushBuffer.push(a)),a}leave(e=this.timeout){this.rejoinTimer.reset(),this.joinPush.cancelTimeout(),this.state=Ft.leaving;let t=()=>{this.socket.hasLogger()&&this.socket.log("channel",`leave ${this.topic}`),this.trigger(wr.close,"leave")},r=new Vl(this,wr.leave,ao({}),e);return r.receive("ok",()=>t()).receive("timeout",()=>t()),r.send(),this.canPush()||r.trigger("ok",{}),r}onMessage(e,t,r){return t}filterBindings(e,t,r){return!0}isMember(e,t,r,a){return this.topic!==e?!1:a&&a!==this.joinRef()?(this.socket.hasLogger()&&this.socket.log("channel","dropping outdated message",{topic:e,event:t,payload:r,joinRef:a}),!1):!0}joinRef(){return this.joinPush.ref}rejoin(e=this.timeout){this.isLeaving()||(this.socket.leaveOpenTopic(this.topic),this.state=Ft.joining,this.joinPush.resend(e))}trigger(e,t,r,a){let l=this.onMessage(e,t,r,a);if(t&&!l)throw new Error("channel onMessage callbacks must return the payload, modified or unmodified");let c=this.bindings.filter(u=>u.event===e&&this.filterBindings(u,t,r));for(let u=0;u<c.length;u++)c[u].callback(l,r,a||this.joinRef())}replyEventName(e){return`chan_reply_${e}`}isClosed(){return this.state===Ft.closed}isErrored(){return this.state===Ft.errored}isJoined(){return this.state===Ft.joined}isJoining(){return this.state===Ft.joining}isLeaving(){return this.state===Ft.leaving}},fc=class{static request(e,t,r,a,l,c,u){if(Yn.XDomainRequest){let h=new Yn.XDomainRequest;return this.xdomainRequest(h,e,t,a,l,c,u)}else if(Yn.XMLHttpRequest){let h=new Yn.XMLHttpRequest;return this.xhrRequest(h,e,t,r,a,l,c,u)}else{if(Yn.fetch&&Yn.AbortController)return this.fetchRequest(e,t,r,a,l,c,u);throw new Error("No suitable XMLHttpRequest implementation found")}}static fetchRequest(e,t,r,a,l,c,u){let h={method:e,headers:r,body:a},p=null;return l&&(p=new AbortController,setTimeout(()=>p.abort(),l),h.signal=p.signal),Yn.fetch(t,h).then(m=>m.text()).then(m=>this.parseJSON(m)).then(m=>u&&u(m)).catch(m=>{m.name==="AbortError"&&c?c():u&&u(null)}),p}static xdomainRequest(e,t,r,a,l,c,u){return e.timeout=l,e.open(t,r),e.onload=()=>{let h=this.parseJSON(e.responseText);u&&u(h)},c&&(e.ontimeout=c),e.onprogress=()=>{},e.send(a),e}static xhrRequest(e,t,r,a,l,c,u,h){e.open(t,r,!0),e.timeout=c;for(let[p,m]of Object.entries(a))e.setRequestHeader(p,m);return e.onerror=()=>h&&h(null),e.onreadystatechange=()=>{if(e.readyState===QR.complete&&h){let p=this.parseJSON(e.responseText);h(p)}},u&&(e.ontimeout=u),e.send(l),e}static parseJSON(e){if(!e||e==="")return null;try{return JSON.parse(e)}catch{return console&&console.log("failed to parse JSON response",e),null}}static serialize(e,t){let r=[];for(var a in e){if(!Object.prototype.hasOwnProperty.call(e,a))continue;let l=t?`${t}[${a}]`:a,c=e[a];typeof c=="object"?r.push(this.serialize(c,l)):r.push(encodeURIComponent(l)+"="+encodeURIComponent(c))}return r.join("&")}static appendParams(e,t){if(Object.keys(t).length===0)return e;let r=e.match(/\?/)?"&":"?";return`${e}${r}${this.serialize(t)}`}},ZR=e=>{let t="",r=new Uint8Array(e),a=r.byteLength;for(let l=0;l<a;l++)t+=String.fromCharCode(r[l]);return btoa(t)},Ua=class{constructor(e,t){t&&t.length===2&&t[1].startsWith(jh)&&(this.authToken=atob(t[1].slice(jh.length))),this.endPoint=null,this.token=null,this.skipHeartbeat=!0,this.reqs=new Set,this.awaitingBatchAck=!1,this.currentBatch=null,this.currentBatchTimer=null,this.batchBuffer=[],this.onopen=function(){},this.onerror=function(){},this.onmessage=function(){},this.onclose=function(){},this.pollEndpoint=this.normalizeEndpoint(e),this.readyState=Jn.connecting,setTimeout(()=>this.poll(),0)}normalizeEndpoint(e){return e.replace("ws://","http://").replace("wss://","https://").replace(new RegExp("(.*)/"+Ch.websocket),"$1/"+Ch.longpoll)}endpointURL(){return fc.appendParams(this.pollEndpoint,{token:this.token})}closeAndRetry(e,t,r){this.close(e,t,r),this.readyState=Jn.connecting}ontimeout(){this.onerror("timeout"),this.closeAndRetry(1005,"timeout",!1)}isActive(){return this.readyState===Jn.open||this.readyState===Jn.connecting}poll(){const e={Accept:"application/json"};this.authToken&&(e["X-Phoenix-AuthToken"]=this.authToken),this.ajax("GET",e,null,()=>this.ontimeout(),t=>{if(t){var{status:r,token:a,messages:l}=t;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:l.forEach(c=>{setTimeout(()=>this.onmessage({data:c}),0)}),this.poll();break;case 204:this.poll();break;case 410:this.readyState=Jn.open,this.onopen({}),this.poll();break;
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(e){typeof e!="string"&&(e=ZR(e)),this.currentBatch?this.currentBatch.push(e):this.awaitingBatchAck?this.batchBuffer.push(e):(this.currentBatch=[e],this.currentBatchTimer=setTimeout(()=>{this.batchSend(this.currentBatch),this.currentBatch=null},0))}batchSend(e){this.awaitingBatchAck=!0,this.ajax("POST",{"Content-Type":"application/x-ndjson"},e.join(`
20`),()=>this.onerror("timeout"),t=>{this.awaitingBatchAck=!1,!t||t.status!==200?(this.onerror(t&&t.status),this.closeAndRetry(1011,"internal server error",!1)):this.batchBuffer.length>0&&(this.batchSend(this.batchBuffer),this.batchBuffer=[])})}close(e,t,r){for(let l of this.reqs)l.abort();this.readyState=Jn.closed;let a=Object.assign({code:1e3,reason:void 0,wasClean:!0},{code:e,reason:t,wasClean:r});this.batchBuffer=[],clearTimeout(this.currentBatchTimer),this.currentBatchTimer=null,typeof CloseEvent<"u"?this.onclose(new CloseEvent("close",a)):this.onclose(a)}ajax(e,t,r,a,l){let c,u=()=>{this.reqs.delete(c),a()};c=fc.request(e,this.endpointURL(),t,r,this.timeout,u,h=>{this.reqs.delete(c),this.isActive()&&l(h)}),this.reqs.add(c)}},WR=class ro{constructor(t,r={}){let a=r.events||{state:"presence_state",diff:"presence_diff"};this.state={},this.pendingDiffs=[],this.channel=t,this.joinRef=null,this.caller={onJoin:function(){},onLeave:function(){},onSync:function(){}},this.channel.on(a.state,l=>{let{onJoin:c,onLeave:u,onSync:h}=this.caller;this.joinRef=this.channel.joinRef(),this.state=ro.syncState(this.state,l,c,u),this.pendingDiffs.forEach(p=>{this.state=ro.syncDiff(this.state,p,c,u)}),this.pendingDiffs=[],h()}),this.channel.on(a.diff,l=>{let{onJoin:c,onLeave:u,onSync:h}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(l):(this.state=ro.syncDiff(this.state,l,c,u),h())})}onJoin(t){this.caller.onJoin=t}onLeave(t){this.caller.onLeave=t}onSync(t){this.caller.onSync=t}list(t){return ro.list(this.state,t)}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel.joinRef()}static syncState(t,r,a,l){let c=this.clone(t),u={},h={};return this.map(c,(p,m)=>{r[p]||(h[p]=m)}),this.map(r,(p,m)=>{let y=c[p];if(y){let g=m.metas.map(k=>k.phx_ref),b=y.metas.map(k=>k.phx_ref),w=m.metas.filter(k=>b.indexOf(k.phx_ref)<0),x=y.metas.filter(k=>g.indexOf(k.phx_ref)<0);w.length>0&&(u[p]=m,u[p].metas=w),x.length>0&&(h[p]=this.clone(y),h[p].metas=x)}else u[p]=m}),this.syncDiff(c,{joins:u,leaves:h},a,l)}static syncDiff(t,r,a,l){let{joins:c,leaves:u}=this.clone(r);return a||(a=function(){}),l||(l=function(){}),this.map(c,(h,p)=>{let m=t[h];if(t[h]=this.clone(p),m){let y=t[h].metas.map(b=>b.phx_ref),g=m.metas.filter(b=>y.indexOf(b.phx_ref)<0);t[h].metas.unshift(...g)}a(h,m,p)}),this.map(u,(h,p)=>{let m=t[h];if(!m)return;let y=p.metas.map(g=>g.phx_ref);m.metas=m.metas.filter(g=>y.indexOf(g.phx_ref)<0),l(h,m,p),m.metas.length===0&&delete t[h]}),t}static list(t,r){return r||(r=function(a,l){return l}),this.map(t,(a,l)=>r(a,l))}static map(t,r){return Object.getOwnPropertyNames(t).map(a=>r(a,t[a]))}static clone(t){return JSON.parse(JSON.stringify(t))}},Gl={HEADER_LENGTH:1,META_LENGTH:4,KINDS:{push:0,reply:1,broadcast:2},encode(e,t){if(e.payload.constructor===ArrayBuffer)return t(this.binaryEncode(e));{let r=[e.join_ref,e.ref,e.topic,e.event,e.payload];return t(JSON.stringify(r))}},decode(e,t){if(e.constructor===ArrayBuffer)return t(this.binaryDecode(e));{let[r,a,l,c,u]=JSON.parse(e);return t({join_ref:r,ref:a,topic:l,event:c,payload:u})}},binaryEncode(e){let{join_ref:t,ref:r,event:a,topic:l,payload:c}=e,u=this.META_LENGTH+t.length+r.length+l.length+a.length,h=new ArrayBuffer(this.HEADER_LENGTH+u),p=new DataView(h),m=0;p.setUint8(m++,this.KINDS.push),p.setUint8(m++,t.length),p.setUint8(m++,r.length),p.setUint8(m++,l.length),p.setUint8(m++,a.length),Array.from(t,g=>p.setUint8(m++,g.charCodeAt(0))),Array.from(r,g=>p.setUint8(m++,g.charCodeAt(0))),Array.from(l,g=>p.setUint8(m++,g.charCodeAt(0))),Array.from(a,g=>p.setUint8(m++,g.charCodeAt(0)));var y=new Uint8Array(h.byteLength+c.byteLength);return y.set(new Uint8Array(h),0),y.set(new Uint8Array(c),h.byteLength),y.buffer},binaryDecode(e){let t=new DataView(e),r=t.getUint8(0),a=new TextDecoder;switch(r){case this.KINDS.push:return this.decodePush(e,t,a);case this.KINDS.reply:return this.decodeReply(e,t,a);case this.KINDS.broadcast:return this.decodeBroadcast(e,t,a)}},decodePush(e,t,r){let a=t.getUint8(1),l=t.getUint8(2),c=t.getUint8(3),u=this.HEADER_LENGTH+this.META_LENGTH-1,h=r.decode(e.slice(u,u+a));u=u+a;let p=r.decode(e.slice(u,u+l));u=u+l;let m=r.decode(e.slice(u,u+c));u=u+c;let y=e.slice(u,e.byteLength);return{join_ref:h,ref:null,topic:p,event:m,payload:y}},decodeReply(e,t,r){let a=t.getUint8(1),l=t.getUint8(2),c=t.getUint8(3),u=t.getUint8(4),h=this.HEADER_LENGTH+this.META_LENGTH,p=r.decode(e.slice(h,h+a));h=h+a;let m=r.decode(e.slice(h,h+l));h=h+l;let y=r.decode(e.slice(h,h+c));h=h+c;let g=r.decode(e.slice(h,h+u));h=h+u;let b=e.slice(h,e.byteLength),w={status:g,response:b};return{join_ref:p,ref:m,topic:y,event:wr.reply,payload:w}},decodeBroadcast(e,t,r){let a=t.getUint8(1),l=t.getUint8(2),c=this.HEADER_LENGTH+2,u=r.decode(e.slice(c,c+a));c=c+a;let h=r.decode(e.slice(c,c+l));c=c+l;let p=e.slice(c,e.byteLength);return{join_ref:null,ref:null,topic:u,event:h,payload:p}}},eA=class{constructor(e,t={}){this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.channels=[],this.sendBuffer=[],this.ref=0,this.fallbackRef=null,this.timeout=t.timeout||FR,this.transport=t.transport||Yn.WebSocket||Ua,this.conn=void 0,this.primaryPassedHealthCheck=!1,this.longPollFallbackMs=t.longPollFallbackMs,this.fallbackTimer=null;let r=null;try{r=Yn&&Yn.sessionStorage}catch{}this.sessionStore=t.sessionStorage||r,this.establishedConnections=0,this.defaultEncoder=Gl.encode.bind(Gl),this.defaultDecoder=Gl.decode.bind(Gl),this.closeWasClean=!0,this.disconnecting=!1,this.binaryType=t.binaryType||"arraybuffer",this.connectClock=1,this.pageHidden=!1,this.encode=void 0,this.decode=void 0,this.transport!==Ua?(this.encode=t.encode||this.defaultEncoder,this.decode=t.decode||this.defaultDecoder):(this.encode=this.defaultEncoder,this.decode=this.defaultDecoder);let a=null;$a&&$a.addEventListener&&($a.addEventListener("pagehide",l=>{this.conn&&(this.disconnect(),a=this.connectClock)}),$a.addEventListener("pageshow",l=>{a===this.connectClock&&(a=null,this.connect())}),$a.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"?this.pageHidden=!0:(this.pageHidden=!1,!this.isConnected()&&!this.closeWasClean&&this.teardown(()=>this.connect()))})),this.heartbeatIntervalMs=t.heartbeatIntervalMs||3e4,this.autoSendHeartbeat=t.autoSendHeartbeat??!0,this.heartbeatCallback=t.heartbeatCallback??(()=>{}),this.rejoinAfterMs=l=>t.rejoinAfterMs?t.rejoinAfterMs(l):[1e3,2e3,5e3][l-1]||1e4,this.reconnectAfterMs=l=>t.reconnectAfterMs?t.reconnectAfterMs(l):[10,50,100,150,200,250,500,1e3,2e3][l-1]||5e3,this.logger=t.logger||null,!this.logger&&t.debug&&(this.logger=(l,c,u)=>{console.log(`${l}: ${c}`,u)}),this.longpollerTimeout=t.longpollerTimeout||2e4,this.params=ao(t.params||{}),this.endPoint=`${e}/${Ch.websocket}`,this.vsn=t.vsn||YR,this.heartbeatTimeoutTimer=null,this.heartbeatTimer=null,this.heartbeatSentAt=null,this.pendingHeartbeatRef=null,this.reconnectTimer=new cb(()=>{if(this.pageHidden){this.log("Not reconnecting as page is hidden!"),this.teardown();return}this.teardown(async()=>{t.beforeReconnect&&await t.beforeReconnect(),this.connect()})},this.reconnectAfterMs),this.authToken=t.authToken}getLongPollTransport(){return Ua}replaceTransport(e){this.connectClock++,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.conn&&(this.conn.
vendor: 4,337 bytes, line 20
20close(),this.conn=null),this.transport=e}protocol(){return location.protocol.match(/^https/)?"wss":"ws"}endPointURL(){let e=fc.appendParams(fc.appendParams(this.endPoint,this.params()),{vsn:this.vsn});return e.charAt(0)!=="/"?e:e.charAt(1)==="/"?`${this.protocol()}:${e}`:`${this.protocol()}://${location.host}${e}`}disconnect(e,t,r){this.connectClock++,this.disconnecting=!0,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.teardown(()=>{this.disconnecting=!1,e&&e()},t,r)}connect(e){e&&(console&&console.log("passing params to connect is deprecated. Instead pass :params to the Socket constructor"),this.params=ao(e)),!(this.conn&&!this.disconnecting)&&(this.longPollFallbackMs&&this.transport!==Ua?this.connectWithFallback(Ua,this.longPollFallbackMs):this.transportConnect())}log(e,t,r){this.logger&&this.logger(e,t,r)}hasLogger(){return this.logger!==null}onOpen(e){let t=this.makeRef();return this.stateChangeCallbacks.open.push([t,e]),t}onClose(e){let t=this.makeRef();return this.stateChangeCallbacks.close.push([t,e]),t}onError(e){let t=this.makeRef();return this.stateChangeCallbacks.error.push([t,e]),t}onMessage(e){let t=this.makeRef();return this.stateChangeCallbacks.message.push([t,e]),t}onHeartbeat(e){this.heartbeatCallback=e}ping(e){if(!this.isConnected())return!1;let t=this.makeRef(),r=Date.now();this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:t});let a=this.onMessage(l=>{l.ref===t&&(this.off([a]),e(Date.now()-r))});return!0}transportName(e){return e===Ua?"LongPoll":e.name}transportConnect(){this.connectClock++,this.closeWasClean=!1;let e;this.authToken&&(e=["phoenix",`${jh}${btoa(this.authToken).replace(/=/g,"")}`]),this.conn=new this.transport(this.endPointURL(),e),this.conn.binaryType=this.binaryType,this.conn.timeout=this.longpollerTimeout,this.conn.onopen=()=>this.onConnOpen(),this.conn.onerror=t=>this.onConnError(t),this.conn.onmessage=t=>this.onConnMessage(t),this.conn.onclose=t=>this.onConnClose(t)}getSession(e){return this.sessionStore&&this.sessionStore.getItem(e)}storeSession(e,t){this.sessionStore&&this.sessionStore.setItem(e,t)}connectWithFallback(e,t=2500){clearTimeout(this.fallbackTimer);let r=!1,a=!0,l,c,u=this.transportName(e),h=p=>{this.log("transport",`falling back to ${u}...`,p),this.off([l,c]),a=!1,this.replaceTransport(e),this.transportConnect()};if(this.getSession(`phx:fallback:${u}`))return h("memorized");this.fallbackTimer=setTimeout(h,t),c=this.onError(p=>{this.log("transport","error",p),a&&!r&&(clearTimeout(this.fallbackTimer),h(p))}),this.fallbackRef&&this.off([this.fallbackRef]),this.fallbackRef=this.onOpen(()=>{if(r=!0,!a){let p=this.transportName(e);return this.primaryPassedHealthCheck||this.storeSession(`phx:fallback:${p}`,"true"),this.log("transport",`established ${p} fallback`)}clearTimeout(this.fallbackTimer),this.fallbackTimer=setTimeout(h,t),this.ping(p=>{this.log("transport","connected to primary after",p),this.primaryPassedHealthCheck=!0,clearTimeout(this.fallbackTimer)})}),this.transportConnect()}clearHeartbeats(){clearTimeout(this.heartbeatTimer),clearTimeout(this.heartbeatTimeoutTimer)}onConnOpen(){this.hasLogger()&&this.log("transport",`connected to ${this.endPointURL()}`),this.closeWasClean=!1,this.disconnecting=!1,this.establishedConnections++,this.flushSendBuffer(),this.reconnectTimer.reset(),this.autoSendHeartbeat&&this.resetHeartbeat(),this.triggerStateCallbacks("open")}heartbeatTimeout(){if(this.pendingHeartbeatRef){this.pendingHeartbeatRef=null,this.heartbeatSentAt=null,this.hasLogger()&&this.log("transport","heartbeat timeout. Attempting to re-establish connection");try{this.heartbeatCallback("timeout")}catch(e){this.log("error","error in heartbeat callback",e)}this.triggerChanError(new Error("heartbeat timeout")),this.closeWasClean=!1,this.teardown(()=>this.reconnectTimer.scheduleTimeout(),JR,"heartbeat timeout")}}resetHeartbeat(){this.conn&&this.conn.skipHeartbeat||(this.pendingHeartbeatRef=null,this.clearHeartbeats(),this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}teardown(e,t,r){if(!this.conn)return e&&e();const a=this.conn;this.waitForBufferDone(a,()=>{t?a.close(t,r||""):a.close(),this.waitForSocketClosed(a,()=>{this.conn===a&&(this.conn.onopen=function(){},this.conn.onerror=function(){},this.conn.onmessage=function(){}
20,this.conn.onclose=function(){},this.conn=null),e&&e()})})}waitForBufferDone(e,t,r=1){if(r===5||!e.bufferedAmount){t();return}setTimeout(()=>{this.waitForBufferDone(e,t,r+1)},150*r)}waitForSocketClosed(e,t,r=1){if(r===5||e.readyState===Jn.closed){t();return}setTimeout(()=>{this.waitForSocketClosed(e,t,r+1)},150*r)}onConnClose(e){this.conn&&(this.conn.onclose=()=>{}),this.hasLogger()&&this.log("transport","close",e),this.triggerChanError(e),this.clearHeartbeats(),this.closeWasClean||this.reconnectTimer.scheduleTimeout(),this.triggerStateCallbacks("close",e)}onConnError(e){this.hasLogger()&&this.log("transport","error",e);let t=this.transport,r=this.establishedConnections;this.triggerStateCallbacks("error",e,t,r),(t===this.transport||r>0)&&this.triggerChanError(e)}triggerChanError(e){this.channels.forEach(t=>{t.isErrored()||t.isLeaving()||t.isClosed()||t.trigger(wr.error,e)})}connectionState(){switch(this.conn&&this.conn.readyState){case Jn.connecting:return"connecting";case Jn.open:return"open";case Jn.closing:return"closing";default:return"closed"}}isConnected(){return this.connectionState()==="open"}remove(e){this.off(e.stateChangeRefs),this.channels=this.channels.filter(t=>t!==e)}off(e){for(let t in this.stateChangeCallbacks)this.stateChangeCallbacks[t]=this.stateChangeCallbacks[t].filter(([r])=>e.indexOf(r)===-1)}channel(e,t={}){let r=new XR(e,t,this);return this.channels.push(r),r}push(e){if(this.hasLogger()){let{topic:t,event:r,payload:a,ref:l,join_ref:c}=e;this.log("push",`${t} ${r} (${c}, ${l})`,a)}this.isConnected()?this.encode(e,t=>this.conn.send(t)):this.sendBuffer.push(()=>this.encode(e,t=>this.conn.send(t)))}makeRef(){let e=this.ref+1;return e===this.ref?this.ref=0:this.ref=e,this.ref.toString()}sendHeartbeat(){if(!this.isConnected()){try{this.heartbeatCallback("disconnected")}catch(e){this.log("error","error in heartbeat callback",e)}return}if(this.pendingHeartbeatRef){this.heartbeatTimeout();return}this.pendingHeartbeatRef=this.makeRef(),this.heartbeatSentAt=Date.now(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef});try{this.heartbeatCallback("sent")}catch(e){this.log("error","error in heartbeat callback",e)}this.heartbeatTimeoutTimer=setTimeout(()=>this.heartbeatTimeout(),this.heartbeatIntervalMs)}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(e=>e()),this.sendBuffer=[])}onConnMessage(e){this.decode(e.data,t=>{let{topic:r,event:a,payload:l,ref:c,join_ref:u}=t;if(c&&c===this.pendingHeartbeatRef){const h=this.heartbeatSentAt?Date.now()-this.heartbeatSentAt:void 0;this.clearHeartbeats();try{this.heartbeatCallback(l.status==="ok"?"ok":"error",h)}catch(p){this.log("error","error in heartbeat callback",p)}this.pendingHeartbeatRef=null,this.heartbeatSentAt=null,this.autoSendHeartbeat&&(this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}this.hasLogger()&&this.log("receive",`${l.status||""} ${r} ${a} ${c&&"("+c+")"||""}`.trim(),l);for(let h=0;h<this.channels.length;h++){const p=this.channels[h];p.isMember(r,a,l,u)&&p.trigger(a,l,c,u)}this.triggerStateCallbacks("message",t)})}triggerStateCallbacks(e,...t){try{this.stateChangeCallbacks[e].forEach(([r,a])=>{try{a(...t)}catch(l){this.log("error",`error in ${e} callback`,l)}})}catch(r){this.log("error",`error triggering ${e} callbacks`,r)}}leaveOpenTopic(e){let t=this.channels.find(r=>r.topic===e&&(r.isJoined()||r.isJoining()));t&&(this.hasLogger()&&this.log("transport",`leaving duplicate topic "${e}"`),t.leave())}};class io{constructor(t,r){const a=nA(r);this.presence=new WR(t.getChannel(),a),this.presence.onJoin((l,c,u)=>{const h=io.onJoinPayload(l,c,u);t.getChannel().trigger("presence",h)}),this.presence.onLeave((l,c,u)=>{const h=io.onLeavePayload(l,c,u);t.getChannel().trigger("presence",h)}),this.presence.onSync(()=>{t.getChannel().trigger("presence",{event:"sync"})})}get state(){return io.transformState(this.presence.state)}static transformState(t){return t=tA(t),Object.getOwnPropertyNames(t).reduce((r,a)=>{const l=t[a];return r[a]=ac(l),r},{})}static onJoinPayload(t,r,a){const l=iv(r),c=ac(a);return{event:"join",key:t,currentPresences:l,newPresences:c}}static onLeavePayload(t,r,a){const l=iv(r),c=ac(a);return{event:"leave",key:t,currentPresences:l,leftPresences:c}}}function ac(e){return e.metas.map(t=>(t.presence_ref=t.phx_ref,delete t.phx_ref,delete t.phx_ref_prev,t))}function tA(e){return JSON.parse(JSON.stringify(e))}function nA(e){return e?.events&&{events:e.events}}function iv(e){return e?.metas?ac(e):[]}var ov;(function(e){e.SYNC="sync",e.JOIN="join",e.LEAVE="leave"})(ov||(ov={}));class rA{get state(){return this.presenceAdapter.state}constructor(t,r){this.channel=t,this.presenceAdapter=new io(this.channel.channelAdapter,r)}}function sA(e){if(e instanceof Error)return e;if(typeof e=="string")return new Error(e);
20if(e&&typeof e=="object"){const t=e;if(typeof t.code=="number"){const r=typeof t.reason=="string"&&t.reason?` (${t.reason})`:"";return new Error(`socket closed: ${t.code}${r}`,{cause:e})}return new Error("channel error: transport failure",{cause:e})}return new Error("channel error: connection lost")}class aA{constructor(t,r,a){const l=iA(a);this.channel=t.getSocket().channel(r,l),this.socket=t}get state(){return this.channel.state}set state(t){this.channel.state=t}get joinedOnce(){return this.channel.joinedOnce}get joinPush(){return this.channel.joinPush}get rejoinTimer(){return this.channel.rejoinTimer}on(t,r){return this.channel.on(t,r)}off(t,r){this.channel.off(t,r)}subscribe(t){return this.channel.join(t)}unsubscribe(t){return this.channel.leave(t)}teardown(){this.channel.teardown()}onClose(t){this.channel.onClose(t)}onError(t){return this.channel.onError(t)}push(t,r,a){let l;try{l=this.channel.push(t,r,a)}catch{throw new Error(`tried to push '${t}' to '${this.channel.topic}' before joining. Use channel.subscribe() before pushing events`)}if(this.channel.pushBuffer.length>PR){const c=this.channel.pushBuffer.shift();c.cancelTimeout(),this.socket.log("channel",`discarded push due to buffer overflow: ${c.event}`,c.payload())}return l}updateJoinPayload(t){const r=this.channel.joinPush.payload();this.channel.joinPush.payload=()=>Object.assign(Object.assign({},r),t)}canPush(){return this.socket.isConnected()&&this.state===es.joined}isJoined(){return this.state===es.joined}isJoining(){return this.state===es.joining}isClosed(){return this.state===es.closed}isLeaving(){return this.state===es.leaving}updateFilterBindings(t){this.channel.filterBindings=t}updatePayloadTransform(t){this.channel.onMessage=t}getChannel(){return this.channel}}function iA(e){return{config:Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},e.config)}}var lv;(function(e){e.ALL="*",e.INSERT="INSERT",e.UPDATE="UPDATE",e.DELETE="DELETE"})(lv||(lv={}));var Ya;(function(e){e.BROADCAST="broadcast",e.PRESENCE="presence",e.POSTGRES_CHANGES="postgres_changes",e.SYSTEM="system"})(Ya||(Ya={}));var _r;(function(e){e.SUBSCRIBED="SUBSCRIBED",e.TIMED_OUT="TIMED_OUT",e.CLOSED="CLOSED",e.CHANNEL_ERROR="CHANNEL_ERROR"})(_r||(_r={}));class oo{get state(){return this.channelAdapter.state}set state(t){this.channelAdapter.state=t}get joinedOnce(){return this.channelAdapter.joinedOnce}get timeout(){return this.socket.timeout}get joinPush(){return this.channelAdapter.joinPush}get rejoinTimer(){return this.channelAdapter.rejoinTimer}constructor(t,r={config:{}},a){var l,c;if(this.topic=t,this.params=r,this.socket=a,this.bindings={},this.subTopic=t.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},r.config),this.channelAdapter=new aA(this.socket.socketAdapter,t,this.params),this.presence=new rA(this),this._onClose(()=>{this.socket._remove(this)}),this._updateFilterTransform(),this.broadcastEndpointURL=lb(this.socket.socketAdapter.endPointURL()),this.private=this.params.config.private||!1,!this.private&&(!((c=(l=this.params.config)===null||l===void 0?void 0:l.broadcast)===null||c===void 0)&&c.replay))throw new Error(`tried to use replay on public channel '${this.topic}'. It must be a private channel.`)}subscribe(t,r=this.timeout){var a,l,c;if(this.socket.isConnected()||this.socket.connect(),this.channelAdapter.isClosed()){const{config:{broadcast:u,presence:h,private:p}}=this.params,m=(l=(a=this.bindings.postgres_changes)===null||a===void 0?void 0:a.map(w=>w.filter))!==null&&l!==void 0?l:[],y=!!this.bindings[Ya.PRESENCE]&&this.bindings[Ya.PRESENCE].length>0||((c=this.params.config.presence)===null||c===void 0?void 0:c.enabled)===!0,g={},b={broadcast:u,presence:Object.assign(Object.assign({},h),{enabled:y}),postgres_changes:m,private:p};this.socket.accessTokenValue&&(g.access_token=this.socket.accessTokenValue),this._onError(w=>{t?.(_r.CHANNEL_ERROR,sA(w))}),this._onClose(()=>t?.(_r.CLOSED)),this.updateJoinPayload(Object.assign({config:b},g)),this._updateFilterMessage(),this.channelAdapter.subscribe(r).receive("ok",async({postgres_changes:w})=>{if(this.socket._isManualToken()||this.socket.setAuth(),w===void 0){t?.(_r.SUBSCRIBED);return}this._updatePostgresBindings(w,t)}).receive("error",w=>{this.state=es.errored;const x=Object.values(w).join(", ")||"error";t?.(_r.CHANNEL_ERROR,new Error(x,{cause:w}))}).receive("timeout",()=>{t?.(_r.TIMED_OUT)})}return this}_updatePostgresBindings(t,r){var a;const l=this.bindings.postgres_changes,c=(a=l?.length)!==null&&a!==void 0?a:0,u=[];for(let h=0;h<c;h++){const p=l[h],{filter:{event:m,schema:y,table:g,filter:b}}=p,w=t&&t[h];if(w&&w.event===m&&oo.isFilterValueEqual(w.schema,y)&&oo.isFilterValueEqual(w.table,g)&&oo.isFilterValueEqual(w.filter,b))u.push(Object.assign(Object.assign({},p),{id:w.id}));else{this.unsubscribe(),this.state=es.errored,r?.(_r.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=u,this.state!=es.errored&&r&&r(_r.SUBSCRIBED)}presenceState(){return this.presence.state}async track(t,r={}){return await this.send({type:"presence",event:"track",payload:t},r.timeout||this.timeout)}async untrack(t={}){return await this.send({type:"presence",event:"untrack"},t)}on(t,r,a){const l=this.channelAdapter.isJoined()||this.channelAdapter.isJoining(),c=t===Ya.PRESENCE||t===Ya.POSTGRES_CHANGES;if(l&&c)throw this.socket.log("channel",`cannot add \`${t}\` callbacks for ${this.topic} after \`subscribe()\`.`),new Error(`cannot add \`${t}\` callbacks for ${this.topic} after \`subscribe()\`.`);return this._on(t,r,a)}async httpSend(t,r,a={}){var l;if(r==null)return Promise.reject(new Error("Payload is required for httpSend()"));const c={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(c.Authorization=`Bearer ${this.socket.accessTokenValue}`);const u={method:"POST",headers:c,body:JSON.stringify({messages:[{topic:this.subTopic,event:t,payload:r,private:this.private}]})},h=await this._fetchWithTimeout(this.broadcastEndpointURL,u,(l=a.timeout)!==null&&l!==void 0?l:this.timeout);if(h.status===202)return{success:!0};let p=h.statusText;
20try{const m=await h.json();p=m.error||m.message||p}catch{}return Promise.reject(new Error(p))}async send(t,r={}){var a,l;if(!this.channelAdapter.canPush()&&t.type==="broadcast"){console.warn("Realtime send() is automatically falling back to REST API. This behavior will be deprecated in the future. Please use httpSend() explicitly for REST delivery.");const{event:c,payload:u}=t,h={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(h.Authorization=`Bearer ${this.socket.accessTokenValue}`);const p={method:"POST",headers:h,body:JSON.stringify({messages:[{topic:this.subTopic,event:c,payload:u,private:this.private}]})};try{const m=await this._fetchWithTimeout(this.broadcastEndpointURL,p,(a=r.timeout)!==null&&a!==void 0?a:this.timeout);return await((l=m.body)===null||l===void 0?void 0:l.cancel()),m.ok?"ok":"error"}catch(m){return m instanceof Error&&m.name==="AbortError"?"timed out":"error"}}else return new Promise(c=>{var u,h,p;const m=this.channelAdapter.push(t.type,t,r.timeout||this.timeout);t.type==="broadcast"&&!(!((p=(h=(u=this.params)===null||u===void 0?void 0:u.config)===null||h===void 0?void 0:h.broadcast)===null||p===void 0)&&p.ack)&&c("ok"),m.receive("ok",()=>c("ok")),m.receive("error",()=>c("error")),m.receive("timeout",()=>c("timed out"))})}updateJoinPayload(t){this.channelAdapter.updateJoinPayload(t)}async unsubscribe(t=this.timeout){return new Promise(r=>{this.channelAdapter.unsubscribe(t).receive("ok",()=>r("ok")).receive("timeout",()=>r("timed out")).receive("error",()=>r("error"))})}teardown(){this.channelAdapter.teardown()}async _fetchWithTimeout(t,r,a){const l=new AbortController,c=setTimeout(()=>l.abort(),a),u=await this.socket.fetch(t,Object.assign(Object.assign({},r),{signal:l.signal}));return clearTimeout(c),u}_on(t,r,a){const l=t.toLocaleLowerCase(),c=this.channelAdapter.on(t,a),u={type:l,filter:r,callback:a,ref:c};return this.bindings[l]?this.bindings[l].push(u):this.bindings[l]=[u],this._updateFilterMessage(),this}_onClose(t){this.channelAdapter.onClose(t)}_onError(t){this.channelAdapter.onError(t)}_updateFilterMessage(){this.channelAdapter.updateFilterBindings((t,r,a)=>{var l,c,u,h,p,m,y;const g=t.event.toLocaleLowerCase();if(this._notThisChannelEvent(g,a))return!1;const b=(l=this.bindings[g])===null||l===void 0?void 0:l.find(w=>w.ref===t.ref);if(!b)return!0;if(["broadcast","presence","postgres_changes"].includes(g))if("id"in b){const w=b.id,x=(c=b.filter)===null||c===void 0?void 0:c.event;return w&&((u=r.ids)===null||u===void 0?void 0:u.includes(w))&&(x==="*"||x?.toLocaleLowerCase()===((h=r.data)===null||h===void 0?void 0:h.type.toLocaleLowerCase()))}else{const w=(m=(p=b?.filter)===null||p===void 0?void 0:p.event)===null||m===void 0?void 0:m.toLocaleLowerCase();return w==="*"||w===((y=r?.event)===null||y===void 0?void 0:y.toLocaleLowerCase())}else return b.type.toLocaleLowerCase()===g})}_notThisChannelEvent(t,r){const{close:a,error:l,leave:c,join:u}=ib;return r&&[a,l,c,u].includes(t)&&r!==this.joinPush.ref}_updateFilterTransform(){this.channelAdapter.updatePayloadTransform((t,r,a)=>{if(typeof r=="object"&&"ids"in r){const l=r.data,{schema:c,table:u,commit_timestamp:h,type:p,errors:m}=l;return Object.assign(Object.assign({},{schema:c,table:u,commit_timestamp:h,eventType:p,new:{},old:{},errors:m}),this._getPayloadRecords(l))}return r})}copyBindings(t){if(this.joinedOnce)throw new Error("cannot copy bindings into joined channel");for(const r in t.bindings)for(const a of t.bindings[r])this._on(a.type,a.filter,a.callback)}static isFilterValueEqual(t,r){return(t??void 0)===(r??void 0)}_getPayloadRecords(t){const r={new:{},old:{}};return(t.type==="INSERT"||t.type==="UPDATE")&&(r.new=av(t.columns,t.record)),(t.type==="UPDATE"||t.type==="DELETE")&&(r.old=av(t.columns,t.old_record)),r}}class oA{constructor(t,r){this.socket=new eA(t,r)}get timeout(){return this.socket.timeout}get endPoint(){return this.socket.endPoint}get transport(){return this.socket.transport}get heartbeatIntervalMs(){return this.socket.heartbeatIntervalMs}get heartbeatCallback(){return this.socket.heartbeatCallback}set heartbeatCallback(t){this.socket.heartbeatCallback=t}get heartbeatTimer(){return this.socket.heartbeatTimer}get pendingHeartbeatRef(){return this.socket.pendingHeartbeatRef}get reconnectTimer(){return this.socket.reconnectTimer}get vsn(){return this.socket.vsn}get encode(){return this.socket.encode}get decode(){return this.socket.decode}get reconnectAfterMs(){return this.socket.reconnectAfterMs}get sendBuffer(){return this.socket.sendBuffer}get stateChangeCallbacks(){return this.socket.stateChangeCallbacks}connect(){this.socket.connect()}disconnect(t,r,a,l=1e4){return new Promise(c=>{setTimeout(()=>c("timeout"),l),this.socket.disconnect(()=>{t(),c("ok")},r,a)})}push(t){this.socket.push(t)}log(t,r,a){this.socket.log(t,r,a)}makeRef(){return this.socket.makeRef()}onOpen(t){this.socket.onOpen(t)}onClose(t){this.socket.onClose(t)}onError(t){this.socket.onError(t)}onMessage(t){this.socket.onMessage(t)}isConnected(){return this.socket.isConnected()}isConnecting(){return this.socket.connectionState()==kh.connecting}isDisconnecting(){return this.socket.connectionState()==kh.closing}connectionState(){return this.socket.connectionState()}endPointURL(){return this.socket.endPointURL()}sendHeartbeat(){this.socket.sendHeartbeat()}getSocket(){return this.socket}}const cv={HEARTBEAT_INTERVAL:25e3},lA=[1e3,2e3,5e3,1e4],cA=1e4;function uA(){const e=new Map;return{get length(){return e.size},clear(){e.clear()},getItem(t){return e.has(t)?e.get(t):null},key(t){var r;return(r=Array.from(e.keys())[t])!==null&&r!==void 0?r:null},removeItem(t){e.delete(t)},setItem(t,r){e.set(t,String(r))}}}function dA(){try{if(typeof globalThis<"u"&&globalThis.sessionStorage)return globalThis.sessionStorage}catch{}return uA()}const hA=`
21  addEventListener("message", (e) => {
22    if (e.data.event === "start") {
23      setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval);
24    }
25  });`;class fA{get endPoint(){return this.socketAdapter.endPoint}get timeout(){return this.socketAdapter.timeout}get transport(){return this.socketAdapter.transport}get heartbeatCallback(){return this.socketAdapter.heartbeatCallback}get heartbeatIntervalMs(){return this.socketAdapter.heartbeatIntervalMs}get heartbeatTimer(){return this.worker?this._workerHeartbeatTimer:this.socketAdapter.heartbeatTimer}get pendingHeartbeatRef(){return this.worker?this._pendingWorkerHeartbeatRef:this.socketAdapter.pendingHeartbeatRef}get reconnectTimer(){return this.socketAdapter.reconnectTimer}get vsn(){return this.socketAdapter.vsn}get encode(){return this.socketAdapter.encode}get decode(){return this.socketAdapter.decode}get reconnectAfterMs(){return this.socketAdapter.reconnectAfterMs}get sendBuffer(){return this.socketAdapter.sendBuffer}get stateChangeCallbacks(){return this.socketAdapter.stateChangeCallbacks}constructor(t,r){var 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 BR,this._manuallySetToken=!1,this._authPromise=null,this._workerHeartbeatTimer=void 0,this._pendingWorkerHeartbeatRef=null,this._pendingDisconnectTimer=null,this._disconnectOnEmptyChannelsAfterMs=0,this._resolveFetch=c=>c?(...u)=>c(...u):(...u)=>fetch(...u),!(!((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 l=this._initializeOptions(r);this.socketAdapter=new oA(t,l),this.httpEndpoint=lb(t),this.fetch=this._resolveFetch(r?.fetch)}connect(){if(!(this.isConnecting()||this.isDisconnecting()||this.isConnected())){this.accessToken&&!this._authPromise&&this._setAuthSafely("connect"),this._setupConnectionHandlers();try{this.socketAdapter.connect()}catch(t){const r=t.message;throw 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(t,r){return this._cancelPendingDisconnect(),this.isDisconnecting()?"ok":await this.socketAdapter.disconnect(()=>{clearInterval(this._workerHeartbeatTimer),this._terminateWorker()},t,r)}getChannels(){return this.channels}async removeChannel(t){const r=await t.unsubscribe();return r==="ok"&&t.teardown(),r}async removeAllChannels(){const t=this.channels.map(async a=>{const l=await a.unsubscribe();return a.teardown(),l}),r=await Promise.all(t);return await this.disconnect(),r}log(t,r,a){this.socketAdapter.log(t,r,a)}connectionState(){return this.socketAdapter.connectionState()||kh.closed}isConnected(){return this.socketAdapter.isConnected()}isConnecting(){return this.socketAdapter.isConnecting()}isDisconnecting(){return this.socketAdapter.isDisconnecting()}channel(t,r={config:{}}){const a=`realtime:${t}`,l=this.getChannels().find(c=>c.topic===a);if(l)return l;{const c=new oo(`realtime:${t}`,r,this);return this._cancelPendingDisconnect(),this.channels.push(c),c}}push(t){this.socketAdapter.push(t)}async setAuth(t=null){this._authPromise=this._performAuth(t);try{await this._authPromise}finally{this._authPromise=null}}_isManualToken(){return this._manuallySetToken}async sendHeartbeat(){this.socketAdapter.sendHeartbeat()}onHeartbeat(t){this.socketAdapter.heartbeatCallback=this._wrapHeartbeatCallback(t)}_makeRef(){return this.socketAdapter.makeRef()}_remove(t){this.channels=this.channels.filter(r=>r.topic!==t.topic),this.channels.length===0&&(this.log("transport","no channels remaining, scheduling disconnect"),this._schedulePendingDisconnect())}_schedulePendingDisconnect(){if(this._cancelPendingDisconnect(),this._disconnectOnEmptyChannelsAfterMs===0){this.log("transport","disconnecting immediately - no channels"),this.disconnect();return}
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(t=null){let r,a=!1;if(t)r=t,a=!0;else if(this.accessToken)try{r=await this.accessToken()}catch(l){this.log("error","Error fetching access token from callback",l),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(l=>{const c={access_token:r,version:DR};r&&l.updateJoinPayload(c),l.joinedOnce&&l.channelAdapter.isJoined()&&l.channelAdapter.push(ib.access_token,{access_token:r})}))}async _waitForAuthIfNeeded(){this._authPromise&&await this._authPromise}_setAuthSafely(t="general"){this._isManualToken()||this.setAuth().catch(r=>{this.log("error",`Error setting auth in ${t}`,r)})}_setupConnectionHandlers(){this.socketAdapter.onOpen(()=>{(this._authPromise||(this.accessToken&&!this.accessTokenValue?this.setAuth():Promise.resolve())).catch(r=>{this.log("error","error waiting for auth on connect",r)}),this.worker&&!this.workerRef&&this._startWorkerHeartbeat()}),this.socketAdapter.onClose(()=>{this.worker&&this.workerRef&&this._terminateWorker()}),this.socketAdapter.onMessage(t=>{t.ref&&t.ref===this._pendingWorkerHeartbeatRef&&(this._pendingWorkerHeartbeatRef=null)})}_handleNodeJsRaceCondition(){this.socketAdapter.isConnected()&&this.socketAdapter.getSocket().onConnOpen()}_wrapHeartbeatCallback(t){return(r,a)=>{r=="sent"&&this._setAuthSafely(),t&&t(r,a)}}_startWorkerHeartbeat(){this.workerUrl?this.log("worker",`starting worker for from ${this.workerUrl}`):this.log("worker","starting default worker");const t=this._workerObjectUrl(this.workerUrl);this.workerRef=new Worker(t),this.workerRef.onerror=r=>{this.log("worker","worker error",r.message),this._terminateWorker(),this.disconnect()},this.workerRef.onmessage=r=>{r.data.event==="keepAlive"&&this.sendHeartbeat()},this.workerRef.postMessage({event:"start",interval:this.heartbeatIntervalMs})}_terminateWorker(){this.workerRef&&(this.log("worker","terminating worker"),this.workerRef.terminate(),this.workerRef=void 0)}_workerObjectUrl(t){let r;if(t)r=t;else{const a=new Blob([hA],{type:"application/javascript"});r=URL.createObjectURL(a)}return r}_initializeOptions(t){var r,a,l,c,u,h,p,m,y,g,b,w;this.worker=(r=t?.worker)!==null&&r!==void 0?r:!1,this.accessToken=(a=t?.accessToken)!==null&&a!==void 0?a:null;const x={};x.timeout=(l=t?.timeout)!==null&&l!==void 0?l:zR,x.heartbeatIntervalMs=(c=t?.heartbeatIntervalMs)!==null&&c!==void 0?c:cv.HEARTBEAT_INTERVAL,this._disconnectOnEmptyChannelsAfterMs=(u=t?.disconnectOnEmptyChannelsAfterMs)!==null&&u!==void 0?u:2*((h=t?.heartbeatIntervalMs)!==null&&h!==void 0?h:cv.HEARTBEAT_INTERVAL),x.transport=(p=t?.transport)!==null&&p!==void 0?p:NR.getWebSocketConstructor(),x.params=t?.params,x.logger=t?.logger,x.heartbeatCallback=this._wrapHeartbeatCallback(t?.heartbeatCallback),x.sessionStorage=(m=t?.sessionStorage)!==null&&m!==void 0?m:dA(),x.reconnectAfterMs=(y=t?.reconnectAfterMs)!==null&&y!==void 0?y:(M=>lA[M-1]||cA);let k,E;const A=(g=t?.vsn)!==null&&g!==void 0?g:UR;switch(A){case LR:k=(M,N)=>N(JSON.stringify(M)),E=(M,N)=>N(JSON.parse(M));break;case ab:k=this.serializer.encode.bind(this.serializer),E=this.serializer.decode.bind(this.serializer);break;default:throw new Error(`Unsupported serializer version: ${x.vsn}`)}if(x.vsn=A,x.encode=(b=t?.encode)!==null&&b!==void 0?b:k,x.decode=(w=t?.decode)!==null&&w!==void 0?w:E,x.beforeReconnect=this._reconnectAuth.bind(this),(t?.logLevel||t?.log_level)&&(this.logLevel=t.logLevel||t.log_level,x.params=Object.assign(Object.assign({},x.params),{log_level:this.logLevel})),this.worker){if(typeof window<"u"&&!window.Worker)throw new Error("Web Worker is not supported");this.workerUrl=t?.workerUrl,x.autoSendHeartbeat=!this.worker}return x}async _reconnectAuth(){await this._waitForAuthIfNeeded(),this.isConnected()||this.connect()}}
38var mo=class extends Error{constructor(e,t){super(e),this.name="IcebergError",this.status=t.status,this.icebergType=t.icebergType,this.icebergCode=t.icebergCode,this.details=t.details,this.isCommitStateUnknown=t.icebergType==="CommitStateUnknownException"||[500,502,504].includes(t.status)&&t.icebergType?.includes("CommitState")===!0}isNotFound(){return this.status===404}isConflict(){return this.status===409}isAuthenticationTimeout(){return this.status===419}};function pA(e,t,r){const a=new URL(t,e);if(r)for(const[l,c]of Object.entries(r))c!==void 0&&a.searchParams.set(l,c);return a.toString()}async function mA(e){return!e||e.type==="none"?{}:e.type==="bearer"?{Authorization:`Bearer ${e.token}`}:e.type==="header"?{[e.name]:e.value}:e.type==="custom"?await e.getHeaders():{}}function gA(e){const t=e.fetchImpl??globalThis.fetch;return{async request({method:r,path:a,query:l,body:c,headers:u}){const h=pA(e.baseUrl,a,l),p=await mA(e.auth),m=await t(h,{method:r,headers:{...c?{"Content-Type":"application/json"}:{},...p,...u},body:c?JSON.stringify(c):void 0}),y=await m.text(),g=(m.headers.get("content-type")||"").includes("application/json"),b=g&&y?JSON.parse(y):y;if(!m.ok){const w=g?b:void 0,x=w?.error;throw new mo(x?.message??`Request failed with status ${m.status}`,{status:m.status,icebergType:x?.type,icebergCode:x?.code,details:w})}return{status:m.status,headers:m.headers,data:b}}}}function Yl(e){return e.join("�")}var yA=class{constructor(e,t=""){this.client=e,this.prefix=t}async listNamespaces(e){const t=e?{parent:Yl(e.namespace)}:void 0;return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces`,query:t})).data.namespaces.map(a=>({namespace:a}))}async createNamespace(e,t){const r={namespace:e.namespace,properties:t?.properties};return(await this.client.request({method:"POST",path:`${this.prefix}/namespaces`,body:r})).data}async dropNamespace(e){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${Yl(e.namespace)}`})}async loadNamespaceMetadata(e){return{properties:(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${Yl(e.namespace)}`})).data.properties}}async namespaceExists(e){try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${Yl(e.namespace)}`}),!0}catch(t){if(t instanceof mo&&t.status===404)return!1;throw t}}async createNamespaceIfNotExists(e,t){try{return await this.createNamespace(e,t)}catch(r){if(r instanceof mo&&r.status===409)return;throw r}}};function za(e){return e.join("�")}var vA=class{constructor(e,t="",r){this.client=e,this.prefix=t,this.accessDelegation=r}async listTables(e){return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${za(e.namespace)}/tables`})).data.identifiers}async createTable(e,t){const r={};return this.accessDelegation&&(r["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${za(e.namespace)}/tables`,body:t,headers:r})).data.metadata}async updateTable(e,t){const r=await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${za(e.namespace)}/tables/${e.name}`,body:t});return{"metadata-location":r.data["metadata-location"],metadata:r.data.metadata}}async dropTable(e,t){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${za(e.namespace)}/tables/${e.name}`,query:{purgeRequested:String(t?.purge??!1)}})}async loadTable(e){const t={};return this.accessDelegation&&(t["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${za(e.namespace)}/tables/${e.name}`,headers:t})).data.metadata}async tableExists(e){const t={};this.accessDelegation&&(t["X-Iceberg-Access-Delegation"]=this.accessDelegation);try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${za(e.namespace)}/tables/${e.name}`,headers:t}),!0}catch(r){if(r instanceof mo&&r.status===404)return!1;throw r}}async createTableIfNotExists(e,t){try{return await this.createTable(e,t)}catch(r){if(r instanceof mo&&r.status===409)return await this.loadTable({namespace:e.namespace,name:t.name});throw r}}},bA=class{constructor(e){let t="v1";e.catalogName&&(t+=`/${e.catalogName}`);const r=e.baseUrl.endsWith("/")?e.baseUrl:`${e.baseUrl}/`;this.client=gA({baseUrl:r,auth:e.auth,fetchImpl:e.fetch}),this.accessDelegation=e.accessDelegation?.join(","),this.namespaceOps=new yA(this.client,t),this.tableOps=new vA(this.client,t,this.accessDelegation)}async listNamespaces(e){return this.namespaceOps.listNamespaces(e)}async createNamespace(e,t){return this.namespaceOps.createNamespace(e,t)}async dropNamespace(e){await this.namespaceOps.dropNamespace(e)}async loadNamespaceMetadata(e){return this.namespaceOps.loadNamespaceMetadata(e)}async listTables(e){return this.tableOps.listTables(e)}
38async createTable(e,t){return this.tableOps.createTable(e,t)}async updateTable(e,t){return this.tableOps.updateTable(e,t)}async dropTable(e,t){await this.tableOps.dropTable(e,t)}async loadTable(e){return this.tableOps.loadTable(e)}async namespaceExists(e){return this.namespaceOps.namespaceExists(e)}async tableExists(e){return this.tableOps.tableExists(e)}async createNamespaceIfNotExists(e,t){return this.namespaceOps.createNamespaceIfNotExists(e,t)}async createTableIfNotExists(e,t){return this.tableOps.createTableIfNotExists(e,t)}};function go(e){"@babel/helpers - typeof";return go=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},go(e)}function wA(e,t){if(go(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var a=r.call(e,t);if(go(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function _A(e){var t=wA(e,"string");return go(t)=="symbol"?t:t+""}function SA(e,t,r){return(t=_A(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function uv(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(l){return Object.getOwnPropertyDescriptor(e,l).enumerable})),r.push.apply(r,a)}return r}function he(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?uv(Object(r),!0).forEach(function(a){SA(e,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):uv(Object(r)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(r,a))})}return e}var Cc=class extends Error{constructor(e,t="storage",r,a){super(e),this.__isStorageError=!0,this.namespace=t,this.name=t==="vectors"?"StorageVectorsError":"StorageError",this.status=r,this.statusCode=a}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}};function jc(e){return typeof e=="object"&&e!==null&&"__isStorageError"in e}var Nh=class extends Cc{constructor(e,t,r,a="storage"){super(e,a,t,r),this.name=a==="vectors"?"StorageVectorsApiError":"StorageApiError",this.status=t,this.statusCode=r}toJSON(){return he({},super.toJSON())}},ub=class extends Cc{constructor(e,t,r="storage"){super(e,r),this.name=r==="vectors"?"StorageVectorsUnknownError":"StorageUnknownError",this.originalError=t}};function pc(e,t,r){const a=he({},e),l=t.toLowerCase();for(const c of Object.keys(a))c.toLowerCase()===l&&delete a[c];return a[l]=r,a}function xA(e){const t={};for(const[r,a]of Object.entries(e))t[r.toLowerCase()]=a;return t}const EA=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),TA=e=>{if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},Mh=e=>{if(Array.isArray(e))return e.map(r=>Mh(r));if(typeof e=="function"||e!==Object(e))return e;const t={};return Object.entries(e).forEach(([r,a])=>{const l=r.replace(/([-_][a-z])/gi,c=>c.toUpperCase().replace(/[-_]/g,""));t[l]=Mh(a)}),t},RA=e=>!e||typeof e!="string"||e.length===0||e.length>100||e.trim()!==e||e.includes("/")||e.includes("\\")?!1:/^[\w!.\*'() &$@=;:+,?-]+$/.test(e),dv=e=>{if(typeof e=="object"&&e!==null){const t=e;if(typeof t.msg=="string")return t.msg;if(typeof t.message=="string")return t.message;if(typeof t.error_description=="string")return t.error_description;if(typeof t.error=="string")return t.error;if(typeof t.error=="object"&&t.error!==null){const r=t.error;if(typeof r.message=="string")return r.message}}return JSON.stringify(e)},AA=async(e,t,r,a)=>{if(e!==null&&typeof e=="object"&&"json"in e&&typeof e.json=="function"){const l=e;let c=parseInt(String(l.status),10);Number.isFinite(c)||(c=500),l.json().then(u=>{const h=u?.statusCode||u?.code||c+"";t(new Nh(dv(u),c,h,a))}).catch(()=>{const u=c+"";t(new Nh(l.statusText||`HTTP ${c} error`,c,u,a))})}else t(new ub(dv(e),e,a))},kA=(e,t,r,a)=>{const l={method:e,headers:t?.headers||{}};if(e==="GET"||e==="HEAD"||!a)return he(he({},l),r);if(TA(a)){var c;const u=t?.headers||{};let h;for(const[p,m]of Object.entries(u))p.toLowerCase()==="content-type"&&(h=m);l.headers=pc(u,"Content-Type",(c=h)!==null&&c!==void 0?c:"application/json"),l.body=JSON.stringify(a)}else l.body=a;return t?.duplex&&(l.duplex=t.duplex),he(he({},l),r)};async function eo(e,t,r,a,l,c,u){return new Promise((h,p)=>{e(r,kA(t,a,l,c)).then(m=>{if(!m.ok)throw m;if(a?.noResolveJson)return m;if(u==="vectors"){const y=m.headers.get("content-type");if(m.headers.get("content-length")==="0"||m.status===204)return{};if(!y||!y.includes("application/json"))return{}}return m.json()}).then(m=>h(m)).catch(m=>AA(m,p,a,u))})}function db(e="storage"){return{get:async(t,r,a,l)=>eo(t,"GET",r,a,l,void 0,e),post:async(t,r,a,l,c)=>eo(t,"POST",r,l,c,a,e),put:async(t,r,a,l,c)=>eo(t,"PUT",r,l,c,a,e),head:async(t,r,a,l)=>eo(t,"HEAD",r,he(he({},a),{},{noResolveJson:!0}),l,void 0,e),remove:async(t,r,a,l,c)=>eo(t,"DELETE",r,l,c,a,e)}}const OA=db("storage"),{get:yo,post:jn,put:Dh,head:CA,remove:of}=OA,cn=db("vectors");var Wa=class{constructor(e,t={},r,a="storage"){this.shouldThrowOnError=!1,this.url=e,this.headers=xA(t),this.fetch=EA(r),this.namespace=a}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(e,t){return this.headers=pc(this.headers,e,t),this}async handleOperation(e){var t=this;try{return{data:await e(),error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(jc(r))return{data:null,error:r};throw r}}};let hb;hb=Symbol.toStringTag;var jA=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t,this[hb]="StreamDownloadBuilder",this.promise=null}
38then(e,t){return this.getPromise().then(e,t)}catch(e){return this.getPromise().catch(e)}finally(e){return this.getPromise().finally(e)}getPromise(){return this.promise||(this.promise=this.execute()),this.promise}async execute(){var e=this;try{return{data:(await e.downloadFn()).body,error:null}}catch(t){if(e.shouldThrowOnError)throw t;if(jc(t))return{data:null,error:t};throw t}}};let fb;fb=Symbol.toStringTag;var NA=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t,this[fb]="BlobDownloadBuilder",this.promise=null}asStream(){return new jA(this.downloadFn,this.shouldThrowOnError)}then(e,t){return this.getPromise().then(e,t)}catch(e){return this.getPromise().catch(e)}finally(e){return this.getPromise().finally(e)}getPromise(){return this.promise||(this.promise=this.execute()),this.promise}async execute(){var e=this;try{return{data:await(await e.downloadFn()).blob(),error:null}}catch(t){if(e.shouldThrowOnError)throw t;if(jc(t))return{data:null,error:t};throw t}}};const MA={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},hv={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};var DA=class extends Wa{constructor(e,t={},r,a){super(e,t,a,"storage"),this.bucketId=r}async uploadOrUpdate(e,t,r,a){var l=this;return l.handleOperation(async()=>{let c;const u=he(he({},hv),a);let h=he(he({},l.headers),e==="POST"&&{"x-upsert":String(u.upsert)});const p=u.metadata;if(typeof Blob<"u"&&r instanceof Blob?(c=new FormData,c.append("cacheControl",u.cacheControl),p&&c.append("metadata",l.encodeMetadata(p)),c.append("",r)):typeof FormData<"u"&&r instanceof FormData?(c=r,c.has("cacheControl")||c.append("cacheControl",u.cacheControl),p&&!c.has("metadata")&&c.append("metadata",l.encodeMetadata(p))):(c=r,h["cache-control"]=`max-age=${u.cacheControl}`,h["content-type"]=u.contentType,p&&(h["x-metadata"]=l.toBase64(l.encodeMetadata(p))),(typeof ReadableStream<"u"&&c instanceof ReadableStream||c&&typeof c=="object"&&"pipe"in c&&typeof c.pipe=="function")&&!u.duplex&&(u.duplex="half")),a?.headers)for(const[b,w]of Object.entries(a.headers))h=pc(h,b,w);const m=l._removeEmptyFolders(t),y=l._getFinalPath(m),g=await(e=="PUT"?Dh:jn)(l.fetch,`${l.url}/object/${y}`,c,he({headers:h},u?.duplex?{duplex:u.duplex}:{}));return{path:m,id:g.Id,fullPath:g.Key}})}async upload(e,t,r){return this.uploadOrUpdate("POST",e,t,r)}async uploadToSignedUrl(e,t,r,a){var l=this;const c=l._removeEmptyFolders(e),u=l._getFinalPath(c),h=new URL(l.url+`/object/upload/sign/${u}`);return h.searchParams.set("token",t),l.handleOperation(async()=>{let p;const m=he(he({},hv),a);let y=he(he({},l.headers),{"x-upsert":String(m.upsert)});const g=m.metadata;if(typeof Blob<"u"&&r instanceof Blob?(p=new FormData,p.append("cacheControl",m.cacheControl),g&&p.append("metadata",l.encodeMetadata(g)),p.append("",r)):typeof FormData<"u"&&r instanceof FormData?(p=r,p.has("cacheControl")||p.append("cacheControl",m.cacheControl),g&&!p.has("metadata")&&p.append("metadata",l.encodeMetadata(g))):(p=r,y["cache-control"]=`max-age=${m.cacheControl}`,y["content-type"]=m.contentType,g&&(y["x-metadata"]=l.toBase64(l.encodeMetadata(g))),(typeof ReadableStream<"u"&&p instanceof ReadableStream||p&&typeof p=="object"&&"pipe"in p&&typeof p.pipe=="function")&&!m.duplex&&(m.duplex="half")),a?.headers)for(const[b,w]of Object.entries(a.headers))y=pc(y,b,w);return{path:c,fullPath:(await Dh(l.fetch,h.toString(),p,he({headers:y},m?.duplex?{duplex:m.duplex}:{}))).Key}})}async createSignedUploadUrl(e,t){var r=this;return r.handleOperation(async()=>{let a=r._getFinalPath(e);const l=he({},r.headers);t?.upsert&&(l["x-upsert"]="true");const c=await jn(r.fetch,`${r.url}/object/upload/sign/${a}`,{},{headers:l}),u=new URL(r.url+c.url),h=u.searchParams.get("token");if(!h)throw new Cc("No token returned by API");return{signedUrl:u.toString(),path:e,token:h}})}async update(e,t,r){return this.uploadOrUpdate("PUT",e,t,r)}async move(e,t,r){var a=this;return a.handleOperation(async()=>await jn(a.fetch,`${a.url}/object/move`,{bucketId:a.bucketId,sourceKey:e,destinationKey:t,de
38stinationBucket:r?.destinationBucket},{headers:a.headers}))}async copy(e,t,r){var a=this;return a.handleOperation(async()=>({path:(await jn(a.fetch,`${a.url}/object/copy`,{bucketId:a.bucketId,sourceKey:e,destinationKey:t,destinationBucket:r?.destinationBucket},{headers:a.headers})).Key}))}async createSignedUrl(e,t,r){var a=this;return a.handleOperation(async()=>{let l=a._getFinalPath(e);const c=typeof r?.transform=="object"&&r.transform!==null&&Object.keys(r.transform).length>0;let u=await jn(a.fetch,`${a.url}/object/sign/${l}`,he({expiresIn:t},c?{transform:r.transform}:{}),{headers:a.headers});const h=new URLSearchParams;r?.download&&h.set("download",r.download===!0?"":r.download),r?.cacheNonce!=null&&h.set("cacheNonce",String(r.cacheNonce));const p=h.toString();return{signedUrl:encodeURI(`${a.url}${u.signedURL}${p?`&${p}`:""}`)}})}async createSignedUrls(e,t,r){var a=this;return a.handleOperation(async()=>{const l=await jn(a.fetch,`${a.url}/object/sign/${a.bucketId}`,{expiresIn:t,paths:e},{headers:a.headers}),c=new URLSearchParams;r?.download&&c.set("download",r.download===!0?"":r.download),r?.cacheNonce!=null&&c.set("cacheNonce",String(r.cacheNonce));const u=c.toString();return l.map(h=>he(he({},h),{},{signedUrl:h.signedURL?encodeURI(`${a.url}${h.signedURL}${u?`&${u}`:""}`):null}))})}download(e,t,r){const a=typeof t?.transform=="object"&&t.transform!==null&&Object.keys(t.transform).length>0?"render/image/authenticated":"object",l=new URLSearchParams;t?.transform&&this.applyTransformOptsToQuery(l,t.transform),t?.cacheNonce!=null&&l.set("cacheNonce",String(t.cacheNonce));const c=l.toString(),u=this._getFinalPath(e),h=()=>yo(this.fetch,`${this.url}/${a}/${u}${c?`?${c}`:""}`,{headers:this.headers,noResolveJson:!0},r);return new NA(h,this.shouldThrowOnError)}async info(e){var t=this;const r=t._getFinalPath(e);return t.handleOperation(async()=>Mh(await yo(t.fetch,`${t.url}/object/info/${r}`,{headers:t.headers})))}async exists(e){var t=this;const r=t._getFinalPath(e);try{return await CA(t.fetch,`${t.url}/object/${r}`,{headers:t.headers}),{data:!0,error:null}}catch(l){if(t.shouldThrowOnError)throw l;if(jc(l)){var a;const c=l instanceof Nh?l.status:l instanceof ub?(a=l.originalError)===null||a===void 0?void 0:a.status:void 0;if(c!==void 0&&[400,404].includes(c))return{data:!1,error:l}}throw l}}getPublicUrl(e,t){const r=this._getFinalPath(e),a=new URLSearchParams;t?.download&&a.set("download",t.download===!0?"":t.download),t?.transform&&this.applyTransformOptsToQuery(a,t.transform),t?.cacheNonce!=null&&a.set("cacheNonce",String(t.cacheNonce));const l=a.toString(),c=typeof t?.transform=="object"&&t.transform!==null&&Object.keys(t.transform).length>0?"render/image":"object";return{data:{publicUrl:encodeURI(`${this.url}/${c}/public/${r}`)+(l?`?${l}`:"")}}}async remove(e){var t=this;return t.handleOperation(async()=>await of(t.fetch,`${t.url}/object/${t.bucketId}`,{prefixes:e},{headers:t.headers}))}async list(e,t,r){var a=this;return a.handleOperation(async()=>{const l=he(he(he({},MA),t),{},{prefix:e||""});return await jn(a.fetch,`${a.url}/object/list/${a.bucketId}`,l,{headers:a.headers},r)})}async listV2(e,t){var r=this;return r.handleOperation(async()=>{const a=he({},e);return await jn(r.fetch,`${r.url}/object/list-v2/${r.bucketId}`,a,{headers:r.headers},t)})}encodeMetadata(e){return JSON.stringify(e)}toBase64(e){return typeof Buffer<"u"?Buffer.from(e).toString("base64"):btoa(e)}_getFinalPath(e){return`${this.bucketId}/${e.replace(/^\/+/,"")}`}_removeEmptyFolders(e){return e.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}applyTransformOptsToQuery(e,t){return t.width&&e.set("width",t.width.toString()),t.height&&e.set("height",t.height.toString()),t.resize&&e.set("resize",t.resize),t.format&&e.set("format",t.format),t.quality&&e.set("quality",t.quality.toString()),e}};const LA="2.106.0",To={"X-Client-Info":`storage-js/${LA}`};var UA=class extends Wa{constructor(e,t={},r,a){const l=new URL(e);a?.useNewHostname&&/supabase\.(co|in|red)$/.test(l.hostname)&&!l.hostname.includes("storage.supabase.")&&(l.hostname=l.hostname.replace("supabase.","storage.supabase."));const c=l.href.replace(/\/$/,""),u=he(he({},To),t);super(c,u,r,"storage")}async listBuckets(e){var t=this;return t.handleOperation(async()=>{const r=t.listBucketOptionsToQueryString(e);return await yo(t.fetch,`${t.url}/bucket${r}`,{headers:t.headers})})}async getBucket(e){var t=this;return t.handleOperation(async()=>await yo(t.fetch,`${t.url}/bucket/${e}`,{headers:t.headers}))}async createBucket(e,t={public:!1}){var r=this;return r.handleOperation(async()=>await jn(r.fetch,`${r.url}/bucket`,{id:e,name:e,type:t.type,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:r.headers}))}async updateBucket(e,t){var r=this;return r.handleOperation(async()=>await Dh(r.fetch,`${r.url}/bucket/${e}`,{id:e,name:e,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:r.headers}))}async emptyBucket(e){var t=this;return t.handleOperation(async()=>await jn(t.fetch,`${t.url}/bucket/${e}/empty`,{},{headers:t.headers}))}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await of(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}))}listBucketOptionsToQueryString(e){const t={};return e&&("limit"in e&&(t.limit=String(e.limit)),"offset"in e&&(t.offset=String(e.offset)),e.search&&(t.search=e.search),e.sortColumn&&(t.sortColumn=e.sortColumn),e.sortOrder&&(t.sortOrder=e.sortOrder)),Object.keys(t).length>0?"?"+new URLSearchParams(t).toString():""}},zA=class extends Wa{constructor(e,t={},r){const a=e.replace(/\/$/,""),l=he(he({},To),t);super(a,l,r,"storage")}async createBucket(e){var t=this;return t.handleOperation(async()=>await jn(t.fetch,`${t.url}/bucket`,{name:e},{headers:t.headers}))}async listBuckets(e){var t=this;return t.handleOperation(async()=>
38{const r=new URLSearchParams;e?.limit!==void 0&&r.set("limit",e.limit.toString()),e?.offset!==void 0&&r.set("offset",e.offset.toString()),e?.sortColumn&&r.set("sortColumn",e.sortColumn),e?.sortOrder&&r.set("sortOrder",e.sortOrder),e?.search&&r.set("search",e.search);const a=r.toString(),l=a?`${t.url}/bucket?${a}`:`${t.url}/bucket`;return await yo(t.fetch,l,{headers:t.headers})})}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await of(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}))}from(e){var t=this;if(!RA(e))throw new Cc("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 bA({baseUrl:this.url,catalogName:e,auth:{type:"custom",getHeaders:async()=>t.headers},fetch:this.fetch}),a=this.shouldThrowOnError;return new Proxy(r,{get(l,c){const u=l[c];return typeof u!="function"?u:async(...h)=>{try{return{data:await u.apply(l,h),error:null}}catch(p){if(a)throw p;return{data:null,error:p}}}}})}},PA=class extends Wa{constructor(e,t={},r){const a=e.replace(/\/$/,""),l=he(he({},To),{},{"Content-Type":"application/json"},t);super(a,l,r,"vectors")}async createIndex(e){var t=this;return t.handleOperation(async()=>await cn.post(t.fetch,`${t.url}/CreateIndex`,e,{headers:t.headers})||{})}async getIndex(e,t){var r=this;return r.handleOperation(async()=>await cn.post(r.fetch,`${r.url}/GetIndex`,{vectorBucketName:e,indexName:t},{headers:r.headers}))}async listIndexes(e){var t=this;return t.handleOperation(async()=>await cn.post(t.fetch,`${t.url}/ListIndexes`,e,{headers:t.headers}))}async deleteIndex(e,t){var r=this;return r.handleOperation(async()=>await cn.post(r.fetch,`${r.url}/DeleteIndex`,{vectorBucketName:e,indexName:t},{headers:r.headers})||{})}},BA=class extends Wa{constructor(e,t={},r){const a=e.replace(/\/$/,""),l=he(he({},To),{},{"Content-Type":"application/json"},t);super(a,l,r,"vectors")}async putVectors(e){var t=this;if(e.vectors.length<1||e.vectors.length>500)throw new Error("Vector batch size must be between 1 and 500 items");return t.handleOperation(async()=>await cn.post(t.fetch,`${t.url}/PutVectors`,e,{headers:t.headers})||{})}async getVectors(e){var t=this;return t.handleOperation(async()=>await cn.post(t.fetch,`${t.url}/GetVectors`,e,{headers:t.headers}))}async listVectors(e){var t=this;if(e.segmentCount!==void 0){if(e.segmentCount<1||e.segmentCount>16)throw new Error("segmentCount must be between 1 and 16");if(e.segmentIndex!==void 0&&(e.segmentIndex<0||e.segmentIndex>=e.segmentCount))throw new Error(`segmentIndex must be between 0 and ${e.segmentCount-1}`)}return t.handleOperation(async()=>await cn.post(t.fetch,`${t.url}/ListVectors`,e,{headers:t.headers}))}async queryVectors(e){var t=this;return t.handleOperation(async()=>await cn.post(t.fetch,`${t.url}/QueryVectors`,e,{headers:t.headers}))}async deleteVectors(e){var t=this;if(e.keys.length<1||e.keys.length>500)throw new Error("Keys batch size must be between 1 and 500 items");return t.handleOperation(async()=>await cn.post(t.fetch,`${t.url}/DeleteVectors`,e,{headers:t.headers})||{})}},HA=class extends Wa{constructor(e,t={},r){const a=e.replace(/\/$/,""),l=he(he({},To),{},{"Content-Type":"application/json"},t);super(a,l,r,"vectors")}async createBucket(e){var t=this;return t.handleOperation(async()=>await cn.post(t.fetch,`${t.url}/CreateVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{})}async getBucket(e){var t=this;return t.handleOperation(async()=>await cn.post(t.fetch,`${t.url}/GetVectorBucket`,{vectorBucketName:e},{headers:t.headers}))}async listBuckets(e={}){var t=this;return t.handleOperation(async()=>await cn.post(t.fetch,`${t.url}/ListVectorBuckets`,e,{headers:t.headers}))}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await cn.post(t.fetch,`${t.url}/DeleteVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{})}},IA=class extends HA{constructor(e,t={}){super(e,t.headers||{},t.fetch)}from(e){return new qA(this.url,this.headers,e,this.fetch)}async createBucket(e){var t=()=>super.createBucket,r=this;return t().call(r,e)}async getBucket(e){var t=()=>super.getBucket,r=this;return t().call(r,e)}async listBuckets(e={}){var t=()=>super.listBuckets,r=this;return t().call(r,e)}async deleteBucket(e){var t=()=>super.deleteBucket,r=this;return t().call(r,e)}},qA=class extends PA{constructor(e,t,r,a){super(e,t,a),this.vectorBucketName=r}async createIndex(e){var t=()=>super.createIndex,r=this;return t().call(r,he(he({},e),{},{vectorBucketName:r.vectorBucketName}))}
38async listIndexes(e={}){var t=()=>super.listIndexes,r=this;return t().call(r,he(he({},e),{},{vectorBucketName:r.vectorBucketName}))}async getIndex(e){var t=()=>super.getIndex,r=this;return t().call(r,r.vectorBucketName,e)}async deleteIndex(e){var t=()=>super.deleteIndex,r=this;return t().call(r,r.vectorBucketName,e)}index(e){return new $A(this.url,this.headers,this.vectorBucketName,e,this.fetch)}},$A=class extends BA{constructor(e,t,r,a,l){super(e,t,l),this.vectorBucketName=r,this.indexName=a}async putVectors(e){var t=()=>super.putVectors,r=this;return t().call(r,he(he({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async getVectors(e){var t=()=>super.getVectors,r=this;return t().call(r,he(he({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async listVectors(e={}){var t=()=>super.listVectors,r=this;return t().call(r,he(he({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async queryVectors(e){var t=()=>super.queryVectors,r=this;return t().call(r,he(he({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async deleteVectors(e){var t=()=>super.deleteVectors,r=this;return t().call(r,he(he({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}},KA=class extends UA{constructor(e,t={},r,a){super(e,t,r,a)}from(e){return new DA(this.url,this.headers,e,this.fetch)}get vectors(){return new IA(this.url+"/vector",{headers:this.headers,fetch:this.fetch})}get analytics(){return new zA(this.url+"/iceberg",this.headers,this.fetch)}};const pb="2.106.0",Ka=30*1e3,Lh=3,uh=Lh*Ka,VA="http://localhost:9999",GA="supabase.auth.token",YA={"X-Client-Info":`gotrue-js/${pb}`},Uh="X-Supabase-Api-Version",mb={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},FA=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,JA=600*1e3;
38class vo extends Error{constructor(t,r,a){super(t),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 ne(e){return typeof e=="object"&&e!==null&&"__isAuthError"in e}class QA extends vo{constructor(t,r,a){super(t,r,a),this.name="AuthApiError",this.status=r,this.code=a}}function XA(e){return ne(e)&&e.name==="AuthApiError"}class Mn extends vo{constructor(t,r){super(t),this.name="AuthUnknownError",this.originalError=r}}class Tr extends vo{constructor(t,r,a,l){super(t,a,l),this.name=r,this.status=a}}class yt extends Tr{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function Fl(e){return ne(e)&&e.name==="AuthSessionMissingError"}class Pa extends Tr{constructor(){super("Auth session or user missing","AuthInvalidTokenResponseError",500,void 0)}}class Jl extends Tr{constructor(t){super(t,"AuthInvalidCredentialsError",400,void 0)}}class Ql extends Tr{constructor(t,r=null){super(t,"AuthImplicitGrantRedirectError",500,void 0),this.details=null,this.details=r}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{details:this.details})}}function ZA(e){return ne(e)&&e.name==="AuthImplicitGrantRedirectError"}class fv extends Tr{constructor(t,r=null){super(t,"AuthPKCEGrantCodeExchangeError",500,void 0),this.details=null,this.details=r}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{details:this.details})}}class WA extends Tr{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 zh extends Tr{constructor(t,r){super(t,"AuthRetryableFetchError",r,void 0)}}function dh(e){return ne(e)&&e.name==="AuthRetryableFetchError"}class pv extends Tr{constructor(t,r,a){super(t,"AuthWeakPasswordError",r,"weak_password"),this.reasons=a}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{reasons:this.reasons})}}class Ph extends Tr{constructor(t){super(t,"AuthInvalidJwtError",400,"invalid_jwt")}}const mc="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),mv=` 	
39\r=`.split(""),ek=(()=>{const e=new Array(128);for(let t=0;t<e.length;t+=1)e[t]=-1;for(let t=0;t<mv.length;t+=1)e[mv[t].charCodeAt(0)]=-2;for(let t=0;t<mc.length;t+=1)e[mc[t].charCodeAt(0)]=t;return e})();function gv(e,t,r){if(e!==null)for(t.queue=t.queue<<8|e,t.queuedBits+=8;t.queuedBits>=6;){const a=t.queue>>t.queuedBits-6&63;r(mc[a]),t.queuedBits-=6}else if(t.queuedBits>0)for(t.queue=t.queue<<6-t.queuedBits,t.queuedBits=6;t.queuedBits>=6;){const a=t.queue>>t.queuedBits-6&63;r(mc[a]),t.queuedBits-=6}}function gb(e,t,r){const a=ek[e];if(a>-1)for(t.queue=t.queue<<6|a,t.queuedBits+=6;t.queuedBits>=8;)r(t.queue>>t.queuedBits-8&255),t.queuedBits-=8;else{if(a===-2)return;throw new Error(`Invalid Base64-URL character "${String.fromCharCode(e)}"`)}}function yv(e){const t=[],r=u=>{t.push(String.fromCodePoint(u))},a={utf8seq:0,codepoint:0},l={queue:0,queuedBits:0},c=u=>{rk(u,a,r)};for(let u=0;u<e.length;u+=1)gb(e.charCodeAt(u),l,c);return t.join("")}function tk(e,t){if(e<=127){t(e);return}else if(e<=2047){t(192|e>>6),t(128|e&63);return}else if(e<=65535){t(224|e>>12),t(128|e>>6&63),t(128|e&63);return}else if(e<=1114111){t(240|e>>18),t(128|e>>12&63),t(128|e>>6&63),t(128|e&63);return}throw new Error(`Unrecognized Unicode codepoint: ${e.toString(16)}`)}function nk(e,t){for(let r=0;r<e.length;r+=1){let a=e.charCodeAt(r);if(a>55295&&a<=56319){const l=(a-55296)*1024&65535;a=(e.charCodeAt(r+1)-56320&65535|l)+65536,r+=1}tk(a,t)}}function rk(e,t,r){if(t.utf8seq===0){if(e<=127){r(e);return}for(let a=1;a<6;a+=1)if((e>>7-a&1)===0){t.utf8seq=a;break}if(t.utf8seq===2)t.codepoint=e&31;else if(t.utf8seq===3)t.codepoint=e&15;else if(t.utf8seq===4)t.codepoint=e&7;else throw new Error("Invalid UTF-8 sequence");t.utf8seq-=1}else if(t.utf8seq>0){if(e<=127)throw new Error("Invalid UTF-8 sequence");t.codepoint=t.codepoint<<6|e&63,t.utf8seq-=1,t.utf8seq===0&&r(t.codepoint)}}function Xa(e){const t=[],r={queue:0,queuedBits:0},a=l=>{t.push(l)};for(let l=0;l<e.length;l+=1)gb(e.charCodeAt(l),r,a);return new Uint8Array(t)}function sk(e){const t=[];return nk(e,r=>t.push(r)),new Uint8Array(t)}function qs(e){const t=[],r={queue:0,queuedBits:0},a=l=>{t.push(l)};return e.forEach(l=>gv(l,r,a)),gv(null,r,a),t.join("")}function ak(e){return Math.round(Date.now()/1e3)+e}function ik(){return Symbol("auth-callback")}const Rt=()=>typeof window<"u"&&typeof document<"u",Ls={tested:!1,writable:!1},yb=()=>
39{if(!Rt())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(Ls.tested)return Ls.writable;const e=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(e,e),globalThis.localStorage.removeItem(e),Ls.tested=!0,Ls.writable=!0}catch{Ls.tested=!0,Ls.writable=!1}return Ls.writable};function ok(e){const t={},r=new URL(e);if(r.hash&&r.hash[0]==="#")try{new URLSearchParams(r.hash.substring(1)).forEach((l,c)=>{t[c]=l})}catch{}return r.searchParams.forEach((a,l)=>{t[l]=a}),t}const vb=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),lk=e=>typeof e=="object"&&e!==null&&"status"in e&&"ok"in e&&"json"in e&&typeof e.json=="function",Va=async(e,t,r)=>{await e.setItem(t,JSON.stringify(r))},Us=async(e,t)=>{const r=await e.getItem(t);if(!r)return null;try{return JSON.parse(r)}catch{return null}},Tt=async(e,t)=>{await e.removeItem(t)};class Nc{constructor(){this.promise=new Nc.promiseConstructor((t,r)=>{this.resolve=t,this.reject=r})}}Nc.promiseConstructor=Promise;function Xl(e){const t=e.split(".");if(t.length!==3)throw new Ph("Invalid JWT structure");for(let a=0;a<t.length;a++)if(!FA.test(t[a]))throw new Ph("JWT not in base64url format");return{header:JSON.parse(yv(t[0])),payload:JSON.parse(yv(t[1])),signature:Xa(t[2]),raw:{header:t[0],payload:t[1]}}}async function ck(e){return await new Promise(t=>{setTimeout(()=>t(null),e)})}function uk(e,t){return new Promise((a,l)=>{(async()=>{for(let c=0;c<1/0;c++)try{const u=await e(c);if(!t(c,null,u)){a(u);return}}catch(u){if(!t(c,u)){l(u);return}}})()})}function dk(e){return("0"+e.toString(16)).substr(-2)}function hk(){const t=new Uint32Array(56);if(typeof crypto>"u"){const r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",a=r.length;let l="";for(let c=0;c<56;c++)l+=r.charAt(Math.floor(Math.random()*a));return l}return crypto.getRandomValues(t),Array.from(t,dk).join("")}async function fk(e){const r=new TextEncoder().encode(e),a=await crypto.subtle.digest("SHA-256",r),l=new Uint8Array(a);return Array.from(l).map(c=>String.fromCharCode(c)).join("")}async function pk(e){if(!(typeof crypto<"u"&&typeof crypto.subtle<"u"&&typeof TextEncoder<"u"))return console.warn("WebCrypto API is not supported. Code challenge method will default to use plain instead of sha256."),e;const r=await fk(e);return btoa(r).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function Ba(e,t,r=!1){const a=hk();let l=a;r&&(l+="/recovery"),await Va(e,`${t}-code-verifier`,l);const c=await pk(a);return[c,a===c?"plain":"s256"]}const mk=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function gk(e){const t=e.headers.get(Uh);if(!t||!t.match(mk))return null;try{return new Date(`${t}T00:00:00.0Z`)}catch{return null}}function yk(e){if(!e)throw new Error("Missing exp claim");const t=Math.floor(Date.now()/1e3);if(e<=t)throw new Error("JWT has expired")}function vk(e){switch(e){case"RS256":return{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}};case"ES256":return{name:"ECDSA",namedCurve:"P-256",hash:{name:"SHA-256"}};default:throw new Error("Invalid alg claim")}}const bk=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function br(e){if(!bk.test(e))throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not")}function Cn(e){if(!e.passkey)throw new Error("@supabase/auth-js: the passkey API is experimental and disabled by default. Enable it by passing `auth: { experimental: { passkey: true } }` to createClient (or to the GoTrueClient constructor).")}function hh(){const e={};return new Proxy(e,{get:(t,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:(t,r)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Setting the "${r}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)},deleteProperty:(t,r)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Deleting the "${r}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)}})}function wk(e,t){return new Proxy(e,{get:(r,a,l)=>{if(a==="__isInsecureUserWarningProxy")return!0;
39if(typeof a=="symbol"){const c=a.toString();if(c==="Symbol(Symbol.toPrimitive)"||c==="Symbol(Symbol.toStringTag)"||c==="Symbol(util.inspect.custom)"||c==="Symbol(nodejs.util.inspect.custom)")return Reflect.get(r,a,l)}return!t.value&&typeof a=="string"&&(console.warn("Using the user object as returned from supabase.auth.getSession() or from some supabase.auth.onAuthStateChange() events could be insecure! This value comes directly from the storage medium (usually cookies on the server) and may not be authentic. Use supabase.auth.getUser() instead which authenticates the data by contacting the Supabase Auth server."),t.value=!0),Reflect.get(r,a,l)}})}function vv(e){return JSON.parse(JSON.stringify(e))}const zs=e=>{if(typeof e=="object"&&e!==null){const t=e;if(typeof t.msg=="string")return t.msg;if(typeof t.message=="string")return t.message;if(typeof t.error_description=="string")return t.error_description;if(typeof t.error=="string")return t.error}return JSON.stringify(e)},_k=[502,503,504,520,521,522,523,524,530];async function bv(e){var t;if(!lk(e))throw new zh(zs(e),0);if(_k.includes(e.status))throw new zh(zs(e),e.status);let r;try{r=await e.json()}catch(c){throw new Mn(zs(c),c)}let a;const l=gk(e);if(l&&l.getTime()>=mb["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 pv(zs(r),e.status,((t=r.weak_password)===null||t===void 0?void 0:t.reasons)||[]);if(a==="session_not_found")throw new yt}else if(typeof r=="object"&&r&&typeof r.weak_password=="object"&&r.weak_password&&Array.isArray(r.weak_password.reasons)&&r.weak_password.reasons.length&&r.weak_password.reasons.reduce((c,u)=>c&&typeof u=="string",!0))throw new pv(zs(r),e.status,r.weak_password.reasons);throw new QA(zs(r),e.status||500,a)}const Sk=(e,t,r,a)=>{const l={method:e,headers:t?.headers||{}};return e==="GET"?l:(l.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},t?.headers),l.body=JSON.stringify(a),Object.assign(Object.assign({},l),r))};async function se(e,t,r,a){var l;const c=Object.assign({},a?.headers);c[Uh]||(c[Uh]=mb["2024-01-01"].name),a?.jwt&&(c.Authorization=`Bearer ${a.jwt}`);const u=(l=a?.query)!==null&&l!==void 0?l:{};a?.redirectTo&&(u.redirect_to=a.redirectTo);const h=Object.keys(u).length?"?"+new URLSearchParams(u).toString():"",p=await xk(e,t,r+h,{headers:c,noResolveJson:a?.noResolveJson},{},a?.body);return a?.xform?a?.xform(p):{data:Object.assign({},p),error:null}}async function xk(e,t,r,a,l,c){const u=Sk(t,a,l,c);let h;try{h=await e(r,Object.assign({},u))}catch(p){throw console.error(p),new zh(zs(p),0)}if(h.ok||await bv(h),a?.noResolveJson)return h;try{return await h.json()}catch(p){await bv(p)}}function Sn(e){var t;let r=null;Rk(e)&&(r=Object.assign({},e),e.expires_at||(r.expires_at=ak(e.expires_in)));const a=(t=e.user)!==null&&t!==void 0?t:null;return{data:{session:r,user:a},error:null}}function wv(e){const t=Sn(e);return!t.error&&e.weak_password&&typeof e.weak_password=="object"&&Array.isArray(e.weak_password.reasons)&&e.weak_password.reasons.length&&e.weak_password.message&&typeof e.weak_password.message=="string"&&e.weak_password.reasons.reduce((r,a)=>r&&typeof a=="string",!0)&&(t.data.weak_password=e.weak_password),t}function ts(e){var t;return{data:{user:(t=e.user)!==null&&t!==void 0?t:e},error:null}}function Ek(e){return{data:e,error:null}}function Tk(e){const{action_link:t,email_otp:r,hashed_token:a,redirect_to:l,verification_type:c}=e,u=Oc(e,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),h={action_link:t,email_otp:r,hashed_token:a,redirect_to:l,verification_type:c},p=Object.assign({},u);return{data:{properties:h,user:p},error:null}}function _v(e){return e}function Rk(e){return!!e.access_token&&!!e.refresh_token&&!!e.expires_in}const fh=["global","local","others"];class Ak{constructor({url:t="",headers:r={},fetch:a,experimental:l}){this.url=t,this.headers=r,this.fetch=vb(a),this.experimental=l??{},this.mfa={listFactors:this._listFactors.bind(this),deleteFactor:this._deleteFactor.bind(this)},this.oauth={listClients:this._listOAuthClients.bind(this),createClient:this._createOAuthClient.bind(this),getClient:this._getOAuthClient.bind(this),updateClient:this._updateOAuthClient.bind(this),deleteClient:this._deleteOAuthClient.bind(this),regenerateClientSecret:this._regenerateOAuthClientSecret.bind(this)},this.customProviders={listProviders:this._listCustomProviders.bind(this),createProvider:this._createCustomProvider.bind(this),getProvider:this._getCustomProvider.bind(this),updateProvider:this._updateCustomProvider.bind(this),deleteProvider:this._deleteCustomProvider.bind(this)},this.passkey={listPasskeys:this._adminListPasskeys.bind(this),deletePasskey:this._adminDeletePasskey.bind(this)}}async signOut(t,r=fh[0]){if(fh.indexOf(r)<0)throw new Error(`@supabase/auth-js: Parameter scope must be one of ${fh.join(", ")}`);try{return await se(this.fetch,"POST",`${this.url}/logout?scope=${r}`,{headers:this.headers,jwt:t,noResolveJson:!0}),{data:null,error:null}}catch(a){if(ne(a))return{data:null,error:a};throw a}}async inviteUserByEmail(t,r={}){try{return await se(this.fetch,"POST",`${this.url}/invite`,{body:{email:t,data:r.data},headers:this.headers,redirectTo:r.redirectTo,xform:ts})}catch(a){if(ne(a))return{data:{user:null},error:a};throw a}}async generateLink(t){try{const{options:r}=t,a=Oc(t,["options"]),l=Object.assign(Object.assign({},a),r);return"newEmail"in a&&(l.new_email=a?.newEmail,delete l.newEmail),await se(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:l,headers:this.headers,xform:Tk,redirectTo:r?.redirectTo})}catch(r){if(ne(r))return{data:{properties:null,user:null},error:r};throw r}}async createUser(t){try{return await se(this.fetch,"POST",`${this.url}/admin/users`,{body:t,headers:this.headers,xform:ts})}catch(r){if(ne(r))return{data:{user:null},error:r};throw r}}async listUsers(t){var r,a,l,c,u,h,p;try{const m={nextPage:null,lastPage:0,total:0},y=await se(this.fetch,"GET",`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:(a=(r=t?.page)===null||r===void 0?void 0:r.toString())!==null&&a!==void 0?a:"",per_page:(c=(l=t?.perPage)===null||l===void 0?void 0:l.toString())!==null&&c!==void 0?c:""},xform:_v});if(y.error)throw y.error;const g=await y.json(),b=(u=y.headers.get("x-total-count"))!==null&&u!==void 0?u:0,w=(p=(h=y.headers.get("link"))===null||h===void 0?void 0:h.split(","))!==null&&p!==void 0?p:[];return w.length>0&&(w.forEach(x=>{const k=parseInt(x.split(";")[0].split("=")[1].substring(0,1)),E=JSON.parse(x.split(";")[1].split("=")[1]);m[`${E}Page`]=k}),m.total=parseInt(b)),{data:Object.assign(Object.assign({},g),m),error:null}}catch(m){if(ne(m))return{data:{users:[]},error:m};throw m}}async getUserById(t){br(t);try{return await se(this.fetch,"GET",`${this.url}/admin/users/${t}`,{headers:this.headers,xform:ts})}catch(r){if(ne(r))return{data:{user:null},error:r};throw r}}async updateUserById(t,r){br(t);try{return await se(this.fetch,"PUT",`${this.url}/admin/users/${t}`,{body:r,headers:this.headers,xform:ts})}catch(a){if(ne(a))return{data:{user:null},error:a};throw a}}async deleteUser(t,r=!1){br(t);
39try{return await se(this.fetch,"DELETE",`${this.url}/admin/users/${t}`,{headers:this.headers,body:{should_soft_delete:r},xform:ts})}catch(a){if(ne(a))return{data:{user:null},error:a};throw a}}async _listFactors(t){br(t.userId);try{const{data:r,error:a}=await se(this.fetch,"GET",`${this.url}/admin/users/${t.userId}/factors`,{headers:this.headers,xform:l=>({data:{factors:l},error:null})});return{data:r,error:a}}catch(r){if(ne(r))return{data:null,error:r};throw r}}async _deleteFactor(t){br(t.userId),br(t.id);try{return{data:await se(this.fetch,"DELETE",`${this.url}/admin/users/${t.userId}/factors/${t.id}`,{headers:this.headers}),error:null}}catch(r){if(ne(r))return{data:null,error:r};throw r}}async _listOAuthClients(t){var r,a,l,c,u,h,p;try{const m={nextPage:null,lastPage:0,total:0},y=await se(this.fetch,"GET",`${this.url}/admin/oauth/clients`,{headers:this.headers,noResolveJson:!0,query:{page:(a=(r=t?.page)===null||r===void 0?void 0:r.toString())!==null&&a!==void 0?a:"",per_page:(c=(l=t?.perPage)===null||l===void 0?void 0:l.toString())!==null&&c!==void 0?c:""},xform:_v});if(y.error)throw y.error;const g=await y.json(),b=(u=y.headers.get("x-total-count"))!==null&&u!==void 0?u:0,w=(p=(h=y.headers.get("link"))===null||h===void 0?void 0:h.split(","))!==null&&p!==void 0?p:[];return w.length>0&&(w.forEach(x=>{const k=parseInt(x.split(";")[0].split("=")[1].substring(0,1)),E=JSON.parse(x.split(";")[1].split("=")[1]);m[`${E}Page`]=k}),m.total=parseInt(b)),{data:Object.assign(Object.assign({},g),m),error:null}}catch(m){if(ne(m))return{data:{clients:[]},error:m};throw m}}async _createOAuthClient(t){try{return await se(this.fetch,"POST",`${this.url}/admin/oauth/clients`,{body:t,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(ne(r))return{data:null,error:r};throw r}}async _getOAuthClient(t){try{return await se(this.fetch,"GET",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(ne(r))return{data:null,error:r};throw r}}async _updateOAuthClient(t,r){try{return await se(this.fetch,"PUT",`${this.url}/admin/oauth/clients/${t}`,{body:r,headers:this.headers,xform:a=>({data:a,error:null})})}catch(a){if(ne(a))return{data:null,error:a};throw a}}async _deleteOAuthClient(t){try{return await se(this.fetch,"DELETE",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(r){if(ne(r))return{data:null,error:r};throw r}}async _regenerateOAuthClientSecret(t){try{return await se(this.fetch,"POST",`${this.url}/admin/oauth/clients/${t}/regenerate_secret`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(ne(r))return{data:null,error:r};throw r}}async _listCustomProviders(t){try{const r={};return t?.type&&(r.type=t.type),await se(this.fetch,"GET",`${this.url}/admin/custom-providers`,{headers:this.headers,query:r,xform:a=>{var l;return{data:{providers:(l=a?.providers)!==null&&l!==void 0?l:[]},error:null}}})}catch(r){if(ne(r))return{data:{providers:[]},error:r};throw r}}async _createCustomProvider(t){try{return await se(this.fetch,"POST",`${this.url}/admin/custom-providers`,{body:t,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(ne(r))return{data:null,error:r};throw r}}async _getCustomProvider(t){try{return await se(this.fetch,"GET",`${this.url}/admin/custom-providers/${t}`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(ne(r))return{data:null,error:r};throw r}}async _updateCustomProvider(t,r){try{return await se(this.fetch,"PUT",`${this.url}/admin/custom-providers/${t}`,{body:r,headers:this.headers,xform:a=>({data:a,error:null})})}catch(a){if(ne(a))return{data:null,error:a};throw a}}async _deleteCustomProvider(t){try{return await se(this.fetch,"DELETE",`${this.url}/admin/custom-providers/${t}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(r){if(ne(r))return{data:null,error:r};throw r}}async _adminListPasskeys(t){Cn(this.experimental),br(t.userId);try{return await se(this.fetch,"GET",`${this.url}/admin/users/${t.userId}/passkeys`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(ne(r))return{data:null,error:r};throw r}}async _adminDeletePasskey(t){Cn(this.experimental),br(t.userId),br(t.passkeyId);
39try{return await se(this.fetch,"DELETE",`${this.url}/admin/users/${t.userId}/passkeys/${t.passkeyId}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(r){if(ne(r))return{data:null,error:r};throw r}}}function Sv(e={}){return{getItem:t=>e[t]||null,setItem:(t,r)=>{e[t]=r},removeItem:t=>{delete e[t]}}}const Kn={debug:!!(globalThis&&yb()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug")==="true")};class bb extends Error{constructor(t){super(t),this.isAcquireTimeout=!0}}class xv extends bb{}async function kk(e,t,r){Kn.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire lock",e,t);const a=new globalThis.AbortController;let l;t>0&&(l=setTimeout(()=>{a.abort(),Kn.debug&&console.log("@supabase/gotrue-js: navigatorLock acquire timed out",e)},t)),await Promise.resolve();try{return await globalThis.navigator.locks.request(e,t===0?{mode:"exclusive",ifAvailable:!0}:{mode:"exclusive",signal:a.signal},async c=>{if(c){clearTimeout(l),Kn.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquired",e,c.name);try{return await r()}finally{Kn.debug&&console.log("@supabase/gotrue-js: navigatorLock: released",e,c.name)}}else{if(t===0)throw Kn.debug&&console.log("@supabase/gotrue-js: navigatorLock: not immediately available",e),new xv(`Acquiring an exclusive Navigator LockManager lock "${e}" immediately failed`);if(Kn.debug)try{const u=await globalThis.navigator.locks.query();console.log("@supabase/gotrue-js: Navigator LockManager state",JSON.stringify(u,null,"  "))}catch(u){console.warn("@supabase/gotrue-js: Error when querying Navigator LockManager state",u)}return console.warn("@supabase/gotrue-js: Navigator LockManager returned a null lock when using #request without ifAvailable set to true, it appears this browser is not following the LockManager spec https://developer.mozilla.org/en-US/docs/Web/API/LockManager/request"),clearTimeout(l),await r()}})}catch(c){if(t>0&&clearTimeout(l),c!==null&&typeof c=="object"&&"name"in c&&c.name==="AbortError"&&t>0){if(a.signal.aborted)return Kn.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire timeout, recovering by stealing lock",e),console.warn(`@supabase/gotrue-js: Lock "${e}" was not released within ${t}ms. This may indicate an orphaned lock from a component unmount (e.g., React Strict Mode). Forcefully acquiring the lock to recover.`),await Promise.resolve().then(()=>globalThis.navigator.locks.request(e,{mode:"exclusive",steal:!0},async u=>{if(u){Kn.debug&&console.log("@supabase/gotrue-js: navigatorLock: recovered (stolen)",e,u.name);try{return await r()}finally{Kn.debug&&console.log("@supabase/gotrue-js: navigatorLock: released (stolen)",e,u.name)}}else return console.warn("@supabase/gotrue-js: Navigator LockManager returned null lock even with steal: true"),await r()}));throw Kn.debug&&console.log("@supabase/gotrue-js: navigatorLock: lock was stolen by another request",e),new xv(`Lock "${e}" was released because another request stole it`)}throw c}}function Ok(){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 wb(e){if(!/^0x[a-fA-F0-9]{40}$/.test(e))throw new Error(`@supabase/auth-js: Address "${e}" is invalid.`);return e.toLowerCase()}function Ck(e){return parseInt(e,16)}function jk(e){const t=new TextEncoder().encode(e);return"0x"+Array.from(t,a=>a.toString(16).padStart(2,"0")).join("")}function Nk(e){var t;const{chainId:r,domain:a,expirationTime:l,issuedAt:c=new Date,nonce:u,notBefore:h,requestId:p,resources:m,scheme:y,uri:g,version:b}=e;{if(!Number.isInteger(r))throw new Error(`@supabase/auth-js: Invalid SIWE message field "chainId". Chain ID must be a EIP-155 chain ID. Provided value: ${r}`);if(!a)throw new Error('@supabase/auth-js: Invalid SIWE message field "domain". Domain must be provided.');if(u&&u.length<8)throw new Error(`@supabase/auth-js: Invalid SIWE message field "nonce". Nonce must be at least 8 characters. Provided value: ${u}`);if(!g)throw new Error('@supabase/auth-js: Invalid SIWE message field "uri". URI must be provided.');if(b!=="1")throw new Error(`@supabase/auth-js: Invalid SIWE message field "version". Version must be '1'. Provided value: ${b}`);if(!((t=e.statement)===null||t===void 0)&&t.includes(`
40`))throw new Error(`@supabase/auth-js: Invalid SIWE message field "statement". Statement must not include '\\n'. Provided value: ${e.statement}`)}const w=wb(e.address),x=y?`${y}://${a}`:a,k=e.statement?`${e.statement}
41`:"",E=`${x}
41 wants you to sign in with your Ethereum account:
42${w}
43
44${k}`;let A=`URI: ${g}
45Version: ${b}
46Chain ID: ${r}${u?`
47Nonce: ${u}`:""}
48Issued At: ${c.toISOString()}`;if(l&&(A+=`
49Expiration Time: ${l.toISOString()}`),h&&(A+=`
50Not Before: ${h.toISOString()}`),p&&(A+=`
51Request ID: ${p}`),m){let M=`
52Resources:`;for(const N of m){if(!N||typeof N!="string")throw new Error(`@supabase/auth-js: Invalid SIWE message field "resources". Every resource must be a valid string. Provided value: ${N}`);M+=`
53- ${N}`}A+=M}return`${E}
54${A}`}class ot extends Error{constructor({message:t,code:r,cause:a,name:l}){var c;super(t,{cause:a}),this.__isWebAuthnError=!0,this.name=(c=l??(a instanceof Error?a.name:void 0))!==null&&c!==void 0?c:"Unknown Error",this.code=r}toJSON(){return{name:this.name,message:this.message,code:this.code}}}class gc extends ot{constructor(t,r){super({code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:r,message:t}),this.name="WebAuthnUnknownError",this.originalError=r}}function Mk({error:e,options:t}){var r,a,l;const{publicKey:c}=t;if(!c)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new ot({message:"Registration ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else if(e.name==="ConstraintError"){if(((r=c.authenticatorSelection)===null||r===void 0?void 0:r.requireResidentKey)===!0)return new ot({message:"Discoverable credentials were required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT",cause:e});if(t.mediation==="conditional"&&((a=c.authenticatorSelection)===null||a===void 0?void 0:a.userVerification)==="required")return new ot({message:"User verification was required during automatic registration but it could not be performed",code:"ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE",cause:e});if(((l=c.authenticatorSelection)===null||l===void 0?void 0:l.userVerification)==="required")return new ot({message:"User verification was required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT",cause:e})}else{if(e.name==="InvalidStateError")return new ot({message:"The authenticator was previously registered",code:"ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",cause:e});if(e.name==="NotAllowedError")return new ot({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="NotSupportedError")return c.pubKeyCredParams.filter(h=>h.type==="public-key").length===0?new ot({message:'No entry in pubKeyCredParams was of type "public-key"',code:"ERROR_MALFORMED_PUBKEYCREDPARAMS",cause:e}):new ot({message:"No available authenticator supported any of the specified pubKeyCredParams algorithms",code:"ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG",cause:e});if(e.name==="SecurityError"){const u=window.location.hostname;if(_b(u)){if(c.rp.id!==u)return new ot({message:`The RP ID "${c.rp.id}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new ot({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="TypeError"){if(c.user.id.byteLength<1||c.user.id.byteLength>64)return new ot({message:"User ID was not between 1 and 64 characters",code:"ERROR_INVALID_USER_ID_LENGTH",cause:e})}else if(e.name==="UnknownError")return new ot({message:"The authenticator was unable to process the specified options, or could not create a new credential",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:e})}return new ot({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}function Dk({error:e,options:t}){const{publicKey:r}=t;if(!r)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new ot({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else{if(e.name==="NotAllowedError")return new ot({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="SecurityError"){const a=window.location.hostname;if(_b(a)){if(r.rpId!==a)return new ot({message:`The RP ID "${r.rpId}
54" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new ot({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="UnknownError")return new ot({message:"The authenticator was unable to process the specified options, or could not create a new assertion signature",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:e})}return new ot({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}class Lk{createNewAbortSignal(){if(this.controller){const r=new Error("Cancelling existing WebAuthn API call for new one");r.name="AbortError",this.controller.abort(r)}const t=new AbortController;return this.controller=t,t.signal}cancelCeremony(){if(this.controller){const t=new Error("Manually cancelling existing WebAuthn API call");t.name="AbortError",this.controller.abort(t),this.controller=void 0}}}const Bh=new Lk;function Ev(e){if(!e)throw new Error("Credential creation options are required");if(typeof PublicKeyCredential<"u"&&"parseCreationOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseCreationOptionsFromJSON=="function")return PublicKeyCredential.parseCreationOptionsFromJSON(e);const{challenge:t,user:r,excludeCredentials:a}=e,l=Oc(e,["challenge","user","excludeCredentials"]),c=Xa(t).buffer,u=Object.assign(Object.assign({},r),{id:Xa(r.id).buffer}),h=Object.assign(Object.assign({},l),{challenge:c,user:u});if(a&&a.length>0){h.excludeCredentials=new Array(a.length);for(let p=0;p<a.length;p++){const m=a[p];h.excludeCredentials[p]=Object.assign(Object.assign({},m),{id:Xa(m.id).buffer,type:m.type||"public-key",transports:m.transports})}}return h}function Tv(e){if(!e)throw new Error("Credential request options are required");if(typeof PublicKeyCredential<"u"&&"parseRequestOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseRequestOptionsFromJSON=="function")return PublicKeyCredential.parseRequestOptionsFromJSON(e);const{challenge:t,allowCredentials:r}=e,a=Oc(e,["challenge","allowCredentials"]),l=Xa(t).buffer,c=Object.assign(Object.assign({},a),{challenge:l});if(r&&r.length>0){c.allowCredentials=new Array(r.length);for(let u=0;u<r.length;u++){const h=r[u];c.allowCredentials[u]=Object.assign(Object.assign({},h),{id:Xa(h.id).buffer,type:h.type||"public-key",transports:h.transports})}}return c}function Rv(e){var t;if("toJSON"in e&&typeof e.toJSON=="function")return e.toJSON();const r=e;return{id:e.id,rawId:e.id,response:{attestationObject:qs(new Uint8Array(e.response.attestationObject)),clientDataJSON:qs(new Uint8Array(e.response.clientDataJSON))},type:"public-key",clientExtensionResults:e.getClientExtensionResults(),authenticatorAttachment:(t=r.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function Av(e){var t;if("toJSON"in e&&typeof e.toJSON=="function")return e.toJSON();const r=e,a=e.getClientExtensionResults(),l=e.response;return{id:e.id,rawId:e.id,response:{authenticatorData:qs(new Uint8Array(l.authenticatorData)),clientDataJSON:qs(new Uint8Array(l.clientDataJSON)),signature:qs(new Uint8Array(l.signature)),userHandle:l.userHandle?qs(new Uint8Array(l.userHandle)):void 0},type:"public-key",clientExtensionResults:a,authenticatorAttachment:(t=r.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function _b(e){return e==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e)}function yc(){var e,t;return!!(Rt()&&"PublicKeyCredential"in window&&window.PublicKeyCredential&&"credentials"in navigator&&typeof((e=navigator?.credentials)===null||e===void 0?void 0:e.create)=="function"&&typeof((t=navigator?.credentials)===null||t===void 0?void 0:t.get)=="function")}async function Sb(e){try{const t=await navigator.credentials.create(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new gc("Browser returned unexpected credential type",t)}:{data:null,error:new gc("Empty credential response",t)}}catch(t){return{data:null,error:Mk({error:t,options:e})}}}async function xb(e){try{const t=await navigator.credentials.get(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new gc("Browser returned unexpected credential type",t)}:{data:null,error:new gc("Empty credential response",t)}}
54catch(t){return{data:null,error:Dk({error:t,options:e})}}}const Uk={hints:["security-key"],authenticatorSelection:{authenticatorAttachment:"cross-platform",requireResidentKey:!1,userVerification:"preferred",residentKey:"discouraged"},attestation:"direct"},zk={userVerification:"preferred",hints:["security-key"],attestation:"direct"};function vc(...e){const t=l=>l!==null&&typeof l=="object"&&!Array.isArray(l),r=l=>l instanceof ArrayBuffer||ArrayBuffer.isView(l),a={};for(const l of e)if(l)for(const c in l){const u=l[c];if(u!==void 0)if(Array.isArray(u))a[c]=u;else if(r(u))a[c]=u;else if(t(u)){const h=a[c];t(h)?a[c]=vc(h,u):a[c]=vc(u)}else a[c]=u}return a}function Pk(e,t){return vc(Uk,e,t||{})}function Bk(e,t){return vc(zk,e,t||{})}class Hk{constructor(t){this.client=t,this.enroll=this._enroll.bind(this),this.challenge=this._challenge.bind(this),this.verify=this._verify.bind(this),this.authenticate=this._authenticate.bind(this),this.register=this._register.bind(this)}async _enroll(t){return this.client.mfa.enroll(Object.assign(Object.assign({},t),{factorType:"webauthn"}))}async _challenge({factorId:t,webauthn:r,friendlyName:a,signal:l},c){var u;try{const{data:h,error:p}=await this.client.mfa.challenge({factorId:t,webauthn:r});if(!h)return{data:null,error:p};const m=l??Bh.createNewAbortSignal();if(h.webauthn.type==="create"){const{user:y}=h.webauthn.credential_options.publicKey;if(!y.name){const g=a;if(g)y.name=`${y.id}:${g}`;else{const w=(await this.client.getUser()).data.user,x=((u=w?.user_metadata)===null||u===void 0?void 0:u.name)||w?.email||w?.id||"User";y.name=`${y.id}:${x}`}}y.displayName||(y.displayName=y.name)}switch(h.webauthn.type){case"create":{const y=Pk(h.webauthn.credential_options.publicKey,c?.create),{data:g,error:b}=await Sb({publicKey:y,signal:m});return g?{data:{factorId:t,challengeId:h.id,webauthn:{type:h.webauthn.type,credential_response:g}},error:null}:{data:null,error:b}}case"request":{const y=Bk(h.webauthn.credential_options.publicKey,c?.request),{data:g,error:b}=await xb(Object.assign(Object.assign({},h.webauthn.credential_options),{publicKey:y,signal:m}));return g?{data:{factorId:t,challengeId:h.id,webauthn:{type:h.webauthn.type,credential_response:g}},error:null}:{data:null,error:b}}}}catch(h){return ne(h)?{data:null,error:h}:{data:null,error:new Mn("Unexpected error in challenge",h)}}}async _verify({challengeId:t,factorId:r,webauthn:a}){return this.client.mfa.verify({factorId:r,challengeId:t,webauthn:a})}async _authenticate({factorId:t,webauthn:{rpId:r=typeof window<"u"?window.location.hostname:void 0,rpOrigins:a=typeof window<"u"?[window.location.origin]:void 0,signal:l}={}},c){if(!r)return{data:null,error:new vo("rpId is required for WebAuthn authentication")};try{if(!yc())return{data:null,error:new Mn("Browser does not support WebAuthn",null)};const{data:u,error:h}=await this.challenge({factorId:t,webauthn:{rpId:r,rpOrigins:a},signal:l},{request:c});if(!u)return{data:null,error:h};const{webauthn:p}=u;return this._verify({factorId:t,challengeId:u.challengeId,webauthn:{type:p.type,rpId:r,rpOrigins:a,credential_response:p.credential_response}})}catch(u){return ne(u)?{data:null,error:u}:{data:null,error:new Mn("Unexpected error in authenticate",u)}}}async _register({friendlyName:t,webauthn:{rpId:r=typeof window<"u"?window.location.hostname:void 0,rpOrigins:a=typeof window<"u"?[window.location.origin]:void 0,signal:l}={}},c){if(!r)return{data:null,error:new vo("rpId is required for WebAuthn registration")};try{if(!yc())return{data:null,error:new Mn("Browser does not support WebAuthn",null)};const{data:u,error:h}=await this._enroll({friendlyName:t});if(!u)return await this.client.mfa.listFactors().then(y=>{var g;return(g=y.data)===null||g===void 0?void 0:g.all.find(b=>b.factor_type==="webauthn"&&b.friendly_name===t&&b.status!=="unverified")}).then(y=>y?this.client.mfa.unenroll({factorId:y?.id}):void 0),{data:null,error:h};const{data:p,error:m}=await this._challenge({factorId:u.id,friendlyName:u.friendly_name,webauthn:{rpId:r,rpOrigins:a},signal:l},{create:c});return p?this._verify({factorId:u.id,challengeId:p.challengeId,webauthn:{rpId:r,rpOrigins:a,type:p.webauthn.type,credential_response:p.webauthn.credential_response}}):{data:null,error:m}}catch(u){return ne(u)?{data:null,error:u}:{data:null,error:new Mn("Unexpected error in register",u)}}}}Ok();const Ik={url:VA,storageKey:GA,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:YA,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1,throwOnError:!1,lockAcquireTimeout:5e3,skipAutoInitialize:!1,experimental:{}};async function kv(e,t,r){return await r()}const Ha={};class bo{get jwks(){var t,r;return(r=(t=Ha[this.storageKey])===null||t===void 0?void 0:t.jwks)!==null&&r!==void 0?r:{keys:[]}}set jwks(t){Ha[this.storageKey]=Object.assign(Object.assign({},Ha[this.storageKey]),{jwks:t})}get jwks_cached_at(){var t,r;return(r=(t=Ha[this.storageKey])===null||t===void 0?void 0:t.cachedAt)!==null&&r!==void 0?r:Number.MIN_SAFE_INTEGER}set jwks_cached_at(t){Ha[this.storageKey]=Object.assign(Object.assign({},Ha[this.storageKey]),{cachedAt:t})}constructor(t){var r,a,l,c;this.userStorage=null,this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=null,this.autoRefreshTickTimeout=null,this.visibilityChangedCallback=null,this.refreshingDeferred=null,this.initializePromise=null,this.detectSessionInUrl=!0,this.hasCustomAuthorizationHeader=!1,this.suppressGetSessionWarning=!1,this.lockAcquired=!1,this.pendingInLock=[],this.broadcastChannel=null,this.logger=console.log;const u=Object.assign(Object.assign({},Ik),t);
54if(this.storageKey=u.storageKey,this.instanceID=(r=bo.nextInstanceID[this.storageKey])!==null&&r!==void 0?r:0,bo.nextInstanceID[this.storageKey]=this.instanceID+1,this.logDebugMessages=!!u.debug,typeof u.debug=="function"&&(this.logger=u.debug),this.instanceID>0&&Rt()){const h=`${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(h),this.logDebugMessages&&console.trace(h)}if(this.persistSession=u.persistSession,this.autoRefreshToken=u.autoRefreshToken,this.experimental=(a=u.experimental)!==null&&a!==void 0?a:{},this.admin=new Ak({url:u.url,headers:u.headers,fetch:u.fetch,experimental:this.experimental}),this.url=u.url,this.headers=u.headers,this.fetch=vb(u.fetch),this.lock=u.lock||kv,this.detectSessionInUrl=u.detectSessionInUrl,this.flowType=u.flowType,this.hasCustomAuthorizationHeader=u.hasCustomAuthorizationHeader,this.throwOnError=u.throwOnError,this.lockAcquireTimeout=u.lockAcquireTimeout,u.lock?this.lock=u.lock:this.persistSession&&Rt()&&(!((l=globalThis?.navigator)===null||l===void 0)&&l.locks)?this.lock=kk:this.lock=kv,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 Hk(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:yb()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=Sv(this.memoryStorage)),u.userStorage&&(this.userStorage=u.userStorage)):(this.memoryStorage={},this.storage=Sv(this.memoryStorage)),Rt()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(h){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",h)}(c=this.broadcastChannel)===null||c===void 0||c.addEventListener("message",async h=>{this._debug("received broadcast notification from other tab or client",h);try{await this._notifyAllSubscribers(h.data.event,h.data.session,!1)}catch(p){this._debug("#broadcastChannel","error",p)}})}u.skipAutoInitialize||this.initialize().catch(h=>{this._debug("#initialize()","error",h)})}isThrowOnErrorEnabled(){return this.throwOnError}_returnResult(t){if(this.throwOnError&&t&&t.error)throw t.error;return t}_logPrefix(){return`GoTrueClient@${this.storageKey}:${this.instanceID} (${pb}) ${new Date().toISOString()}`}_debug(...t){return this.logDebugMessages&&this.logger(this._logPrefix(),...t),this}async initialize(){return this.initializePromise?await this.initializePromise:(this.initializePromise=(async()=>await this._acquireLock(this.lockAcquireTimeout,async()=>await this._initialize()))(),await this.initializePromise)}async _initialize(){var t;try{let r={},a="none";if(Rt()&&(r=ok(window.location.href),this._isImplicitGrantCallback(r)?a="implicit":await this._isPKCECallback(r)&&(a="pkce")),Rt()&&this.detectSessionInUrl&&a!=="none"){const{data:l,error:c}=await this._getSessionFromURL(r,a);if(c){if(this._debug("#_initialize()","error detecting session from URL",c),ZA(c)){const p=(t=c.details)===null||t===void 0?void 0:t.code;if(p==="identity_already_exists"||p==="identity_not_found"||p==="single_identity_not_deletable")return{error:c}}return{error:c}}const{session:u,redirectType:h}=l;return this._debug("#_initialize()","detected session in URL",u,"redirect type",h),await this._saveSession(u),setTimeout(async()=>{h==="recovery"?await this._notifyAllSubscribers("PASSWORD_RECOVERY",u):await this._notifyAllSubscribers("SIGNED_IN",u)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(r){return ne(r)?this._returnResult({error:r}):this._returnResult({error:new Mn("Unexpected error during initialization",r)}
54)}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(t){var r,a,l;try{const c=await se(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:(a=(r=t?.options)===null||r===void 0?void 0:r.data)!==null&&a!==void 0?a:{},gotrue_meta_security:{captcha_token:(l=t?.options)===null||l===void 0?void 0:l.captchaToken}},xform:Sn}),{data:u,error:h}=c;if(h||!u)return this._returnResult({data:{user:null,session:null},error:h});const p=u.session,m=u.user;return u.session&&(await this._saveSession(u.session),await this._notifyAllSubscribers("SIGNED_IN",p)),this._returnResult({data:{user:m,session:p},error:null})}catch(c){if(ne(c))return this._returnResult({data:{user:null,session:null},error:c});throw c}}async signUp(t){var r,a,l;try{let c;if("email"in t){const{email:y,password:g,options:b}=t;let w=null,x=null;this.flowType==="pkce"&&([w,x]=await Ba(this.storage,this.storageKey)),c=await se(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:b?.emailRedirectTo,body:{email:y,password:g,data:(r=b?.data)!==null&&r!==void 0?r:{},gotrue_meta_security:{captcha_token:b?.captchaToken},code_challenge:w,code_challenge_method:x},xform:Sn})}else if("phone"in t){const{phone:y,password:g,options:b}=t;c=await se(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:y,password:g,data:(a=b?.data)!==null&&a!==void 0?a:{},channel:(l=b?.channel)!==null&&l!==void 0?l:"sms",gotrue_meta_security:{captcha_token:b?.captchaToken}},xform:Sn})}else throw new Jl("You must provide either an email or phone number and a password");const{data:u,error:h}=c;if(h||!u)return await Tt(this.storage,`${this.storageKey}-code-verifier`),this._returnResult({data:{user:null,session:null},error:h});const p=u.session,m=u.user;return u.session&&(await this._saveSession(u.session),await this._notifyAllSubscribers("SIGNED_IN",p)),this._returnResult({data:{user:m,session:p},error:null})}catch(c){if(await Tt(this.storage,`${this.storageKey}-code-verifier`),ne(c))return this._returnResult({data:{user:null,session:null},error:c});throw c}}async signInWithPassword(t){try{let r;if("email"in t){const{email:c,password:u,options:h}=t;r=await se(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:c,password:u,gotrue_meta_security:{captcha_token:h?.captchaToken}},xform:wv})}else if("phone"in t){const{phone:c,password:u,options:h}=t;r=await se(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:c,password:u,gotrue_meta_security:{captcha_token:h?.captchaToken}},xform:wv})}else throw new Jl("You must provide either an email or phone number and a password");const{data:a,error:l}=r;if(l)return this._returnResult({data:{user:null,session:null},error:l});if(!a||!a.session||!a.user){const c=new Pa;return this._returnResult({data:{user:null,session:null},error:c})}return a.session&&(await this._saveSession(a.session),await this._notifyAllSubscribers("SIGNED_IN",a.session)),this._returnResult({data:Object.assign({user:a.user,session:a.session},a.weak_password?{weakPassword:a.weak_password}:null),error:l})}catch(r){if(ne(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async signInWithOAuth(t){var r,a,l,c;return await this._handleProviderSignIn(t.provider,{redirectTo:(r=t.options)===null||r===void 0?void 0:r.redirectTo,scopes:(a=t.options)===null||a===void 0?void 0:a.scopes,queryParams:(l=t.options)===null||l===void 0?void 0:l.queryParams,skipBrowserRedirect:(c=t.options)===null||c===void 0?void 0:c.skipBrowserRedirect})}async exchangeCodeForSession(t){return await this.initializePromise,this._acquireLock(this.lockAcquireTimeout,async()=>this._exchangeCodeForSession(t))}async signInWithWeb3(t){const{chain:r}=t;switch(r){case"ethereum":return await this.signInWithEthereum(t);case"solana":return await this.signInWithSolana(t);default:throw new Error(`@supabase/auth-js: Unsupported chain "${r}"`)}}async signInWithEthereum(t){var r,a,l,c,u,h,p,m,y,g,b;let w,x;if("message"in t)w=t.message,x=t.signature;else{const{chain:k,wallet:E,statement:A,options:M}=t;let N;if(Rt())if(typeof E=="object")N=E;else{const Z=window;if("ethereum"in Z&&typeof Z.ethereum=="object"&&"request"in Z.ethereum&&typeof Z.ethereum.request=="function")N=Z.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.");N=E}const L=new URL((r=M?.url)!==null&&r!==void 0?r:window.location.href),X=await N.request({method:"eth_requestAccounts"}).then(Z=>Z).catch(()=>{throw new Error("@supabase/auth-js: Wallet method eth_requestAccounts is missing or invalid")});if(!X||X.length===0)throw new Error("@supabase/auth-js: No accounts available. Please ensure the wallet is connected.");const Y=wb(X[0]);let I=(a=M?.signInWithEthereum)===null||a===void 0?void 0:a.chainId;if(!I){const Z=await N.request({method:"eth_chainId"});I=Ck(Z)}const F={domain:L.host,address:Y,statement:A,uri:L.href,version:"1",chainId:I,nonce:(l=M?.signInWithEthereum)===null||l===void 0?void 0:l.nonce,issuedAt:(u=(c=M?.signInWithEthereum)===null||c===void 0?void 0:c.issuedAt)!==null&&u!==void 0?u:new Date,expirationTime:(h=M?.signInWithEthereum)===null||h===void 0?void 0:h.expirationTime,notBefore:(p=M?.signInWithEthereum)===null||p===void 0?void 0:p.notBefore,requestId:(m=M?.signInWithEthereum)===null||m===void 0?void 0:m.requestId,resources:(y=M?.signInWithEthereum)===null||y===void 0?void 0:y.resources};w=Nk(F),x=await N.request({method:"personal_sign",params:[jk(w),Y]})}try{const{data:k,error:E}=await se(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"ethereum",message:w,signature:x},!((g=t.options)===null||g===void 0)&&g.captchaToken?{gotrue_meta_security:{captcha_token:(b=t.options)===null||b===void 0?void 0:b.captchaToken}}:null),xform:Sn});if(E)throw E;if(!k||!k.session||!k.user){const A=new Pa;return this._returnResult({data:{user:null,session:null},error:A})}return k.session&&(await this._saveSession(k.session),await this._notifyAllSubscribers("SIGNED_IN",k.session)),this._returnResult({data:Object.assign({},k),error:E})}catch(k){if(ne(k))return this._returnResult({data:{user:null,session:null},error:k});throw k}}async signInWithSolana(t){var r,a,l,c,u,h,p,m,y,g,b,w;let x,k;if("message"in t)x=t.message,k=t.signature;else{const{chain:E,wallet:A,statement:M,options:N}=t;let L;if(Rt())if(typeof A=="object")L=A;else{const Y=window;
54if("solana"in Y&&typeof Y.solana=="object"&&("signIn"in Y.solana&&typeof Y.solana.signIn=="function"||"signMessage"in Y.solana&&typeof Y.solana.signMessage=="function"))L=Y.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"||!N?.url)throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");L=A}const X=new URL((r=N?.url)!==null&&r!==void 0?r:window.location.href);if("signIn"in L&&L.signIn){const Y=await L.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},N?.signInWithSolana),{version:"1",domain:X.host,uri:X.href}),M?{statement:M}:null));let I;if(Array.isArray(Y)&&Y[0]&&typeof Y[0]=="object")I=Y[0];else if(Y&&typeof Y=="object"&&"signedMessage"in Y&&"signature"in Y)I=Y;else throw new Error("@supabase/auth-js: Wallet method signIn() returned unrecognized value");if("signedMessage"in I&&"signature"in I&&(typeof I.signedMessage=="string"||I.signedMessage instanceof Uint8Array)&&I.signature instanceof Uint8Array)x=typeof I.signedMessage=="string"?I.signedMessage:new TextDecoder().decode(I.signedMessage),k=I.signature;else throw new Error("@supabase/auth-js: Wallet method signIn() API returned object without signedMessage and signature fields")}else{if(!("signMessage"in L)||typeof L.signMessage!="function"||!("publicKey"in L)||typeof L!="object"||!L.publicKey||!("toBase58"in L.publicKey)||typeof L.publicKey.toBase58!="function")throw new Error("@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API");x=[`${X.host} wants you to sign in with your Solana account:`,L.publicKey.toBase58(),...M?["",M,""]:[""],"Version: 1",`URI: ${X.href}`,`Issued At: ${(l=(a=N?.signInWithSolana)===null||a===void 0?void 0:a.issuedAt)!==null&&l!==void 0?l:new Date().toISOString()}`,...!((c=N?.signInWithSolana)===null||c===void 0)&&c.notBefore?[`Not Before: ${N.signInWithSolana.notBefore}`]:[],...!((u=N?.signInWithSolana)===null||u===void 0)&&u.expirationTime?[`Expiration Time: ${N.signInWithSolana.expirationTime}`]:[],...!((h=N?.signInWithSolana)===null||h===void 0)&&h.chainId?[`Chain ID: ${N.signInWithSolana.chainId}`]:[],...!((p=N?.signInWithSolana)===null||p===void 0)&&p.nonce?[`Nonce: ${N.signInWithSolana.nonce}`]:[],...!((m=N?.signInWithSolana)===null||m===void 0)&&m.requestId?[`Request ID: ${N.signInWithSolana.requestId}`]:[],...!((g=(y=N?.signInWithSolana)===null||y===void 0?void 0:y.resources)===null||g===void 0)&&g.length?["Resources",...N.signInWithSolana.resources.map(I=>`- ${I}`)]:[]].join(`
55`);const Y=await L.signMessage(new TextEncoder().encode(x),"utf8");if(!Y||!(Y instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");k=Y}}try{const{data:E,error:A}=await se(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:x,signature:qs(k)},!((b=t.options)===null||b===void 0)&&b.captchaToken?{gotrue_meta_security:{captcha_token:(w=t.options)===null||w===void 0?void 0:w.captchaToken}}:null),xform:Sn});if(A)throw A;if(!E||!E.session||!E.user){const M=new Pa;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(ne(E))return this._returnResult({data:{user:null,session:null},error:E});throw E}}async _exchangeCodeForSession(t){const r=await Us(this.storage,`${this.storageKey}-code-verifier`),[a,l]=(r??"").split("/");try{if(!a&&this.flowType==="pkce")throw new WA;const{data:c,error:u}=await se(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:t,code_verifier:a},xform:Sn});if(await Tt(this.storage,`${this.storageKey}-code-verifier`),u)throw u;if(!c||!c.session||!c.user){const h=new Pa;return this._returnResult({data:{user:null,session:null,redirectType:null},error:h})}return c.session&&(await this._saveSession(c.session),await this._notifyAllSubscribers(l==="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",c.session)),this._returnResult({data:Object.assign(Object.assign({},c),{redirectType:l??null}),error:u})}catch(c){if(await Tt(this.storage,`${this.storageKey}-code-verifier`),ne(c))return this._returnResult({data:{user:null,session:null,redirectType:null},error:c});throw c}}async signInWithIdToken(t){try{const{options:r,provider:a,token:l,access_token:c,nonce:u}=t,h=await se(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:a,id_token:l,access_token:c,nonce:u,gotrue_meta_security:{captcha_token:r?.captchaToken}},xform:Sn}),{data:p,error:m}=h;if(m)return this._returnResult({data:{user:null,session:null},error:m});if(!p||!p.session||!p.user){const y=new Pa;return this._returnResult({data:{user:null,session:null},error:y})}return p.session&&(await this._saveSession(p.session),await this._notifyAllSubscribers("SIGNED_IN",p.session)),this._returnResult({data:p,error:m})}catch(r){if(ne(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async signInWithOtp(t){var r,a,l,c,u;try{if("email"in t){const{email:h,options:p}=t;let m=null,y=null;this.flowType==="pkce"&&([m,y]=await Ba(this.storage,this.storageKey));const{error:g}=await se(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:h,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:m,code_challenge_method:y},redirectTo:p?.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:g})}if("phone"in t){const{phone:h,options:p}=t,{data:m,error:y}=await se(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:h,data:(l=p?.data)!==null&&l!==void 0?l:{},create_user:(c=p?.shouldCreateUser)!==null&&c!==void 0?c:!0,gotrue_meta_security:{captcha_token:p?.captchaToken},channel:(u=p?.channel)!==null&&u!==void 0?u:"sms"}});return this._returnResult({data:{user:null,session:null,messageId:m?.message_id},error:y})}throw new Jl("You must provide either an email or phone number.")}catch(h){if(await Tt(this.storage,`${this.storageKey}-code-verifier`),ne(h))return this._returnResult({data:{user:null,session:null},error:h});throw h}}async verifyOtp(t){var r,a;try{let l,c;"options"in t&&(l=(r=t.options)===null||r===void 0?void 0:r.redirectTo,c=(a=t.options)===null||a===void 0?void 0:a.captchaToken);const{data:u,error:h}=await se(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},t),{gotrue_meta_security:{captcha_token:c}}),redirectTo:l,xform:Sn});if(h)throw h;if(!u)throw new Error("An error occurred on token verification.");const p=u.session,m=u.user;return p?.access_token&&(await this._saveSession(p),await this._notifyAllSubscribers(t.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",p)),this._returnResult({data:{user:m,session:p},error:null})}catch(l){if(ne(l))return this._returnResult({data:{user:null,session:null},error:l});throw l}}async signInWithSSO(t){var r,a,l,c,u;try{let h=null,p=null;this.flowType==="pkce"&&([h,p]=await Ba(this.storage,this.storageKey));const m=await se(this.fetch,"POST",`${this.url}/sso`,{body:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},"providerId"in t?{provider_id:t.providerId}:null),"domain"in t?{domain:t.domain}:null),{redirect_to:(a=(r=t.options)===null||r===void 0?void 0:r.redirectTo)!==null&&a!==void 0?a:void 0}),!((l=t?.options)===null||l===void 0)&&l.captchaToken?{gotrue_meta_security:{captcha_token:t.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:h,code_challenge_method:p}),headers:this.headers,xform:Ek});return!((c=m.data)===null||c===void 0)&&c.url&&Rt()&&!(!((u=t.options)===null||u===void 0)&&u.skipBrowserRedirect)&&window.location.assign(m.data.url),this._returnResult(m)}catch(h){if(await Tt(this.storage,`${this.storageKey}-code-verifier`),ne(h))return this._returnResult({data:null,error:h});throw h}}async reauthenticate(){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._reauthenticate())}async _reauthenticate(){try{return await this._useSession(async t=>{const{data:{session:r},error:a}=t;if(a)throw a;if(!r)throw new yt;const{error:l}=await se(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:r.access_token});return this._returnResult({data:{user:null,session:null},error:l})})}catch(t){if(ne(t))return this._returnResult({data:{user:null,session:null},error:t});throw t}}async resend(t){try{const r=`${this.url}/resend`;if("email"in t){const{email:a,type:l,options:c}=t,{error:u}=await se(this.fetch,"POST",r,{headers:this.headers,body:{email:a,type:l,gotrue_meta_security:{captcha_token:c?.captchaToken}},redirectTo:c?.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:u})}else if("phone"in t){const{phone:a,type:l,options:c}=t,{data:u,error:h}=await se(this.fetch,"POST",r,{headers:this.headers,body:{phone:a,type:l,gotrue_meta_security:{captcha_token:c?.captchaToken}}});return this._returnResult({data:{user:null,session:null,messageId:u?.message_id},error:h})}throw new Jl("You must provide either an email or phone number and a type")}catch(r){if(ne(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async getSession(){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>this._useSession(async r=>r))}async _acquireLock(t,r){this._debug("#_acquireLock","begin",t);try{if(this.lockAcquired){const a=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),l=(async()=>(await a,await r()))();return this.pendingInLock.push((async()=>{try{await l}catch{}})()),l}return await this.lock(`lock:${this.storageKey}`,t,async()=>{this._debug("#_acquireLock","lock acquired for storage key",this.storageKey);try{this.lockAcquired=!0;const a=r();for(this.pendingInLock.push((async()=>{try{await a}catch{}})()),await a;this.pendingInLock.length;){const l=[...this.pendingInLock];await Promise.all(l),this.pendingInLock.splice(0,l.length)}return await a}finally{this._debug("#_acquireLock","lock released for storage key",this.storageKey),this.lockAcquired=!1}})}finally{this._debug("#_acquireLock","end")}}async _useSession(t){this._debug("#_useSession","begin");try{const r=await this.__loadSession();return await t(r)}finally{this._debug("#_useSession","end")}}async __loadSession(){this._debug("#__loadSession()","begin"),this.lockAcquired||this._debug("#__loadSession()","used outside of an acquired lock!",new Error().stack);try{let t=null;const r=await Us(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",r),r!==null&&(this._isValidSession(r)?t=r:(this._debug("#getSession()","session from storage is not val
55id"),await this._removeSession())),!t)return{data:{session:null},error:null};const a=t.expires_at?t.expires_at*1e3-Date.now()<uh:!1;if(this._debug("#__loadSession()",`session has${a?"":" not"} expired`,"expires_at",t.expires_at),!a){if(this.userStorage){const u=await Us(this.userStorage,this.storageKey+"-user");u?.user?t.user=u.user:t.user=hh()}if(this.storage.isServer&&t.user&&!t.user.__isUserNotAvailableProxy){const u={value:this.suppressGetSessionWarning};t.user=wk(t.user,u),u.value&&(this.suppressGetSessionWarning=!0)}return{data:{session:t},error:null}}const{data:l,error:c}=await this._callRefreshToken(t.refresh_token);return c?this._returnResult({data:{session:null},error:c}):this._returnResult({data:{session:l},error:null})}finally{this._debug("#__loadSession()","end")}}async getUser(t){if(t)return await this._getUser(t);await this.initializePromise;const r=await this._acquireLock(this.lockAcquireTimeout,async()=>await this._getUser());return r.data.user&&(this.suppressGetSessionWarning=!0),r}async _getUser(t){try{return t?await se(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:t,xform:ts}):await this._useSession(async r=>{var a,l,c;const{data:u,error:h}=r;if(h)throw h;return!(!((a=u.session)===null||a===void 0)&&a.access_token)&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new yt}:await se(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:(c=(l=u.session)===null||l===void 0?void 0:l.access_token)!==null&&c!==void 0?c:void 0,xform:ts})})}catch(r){if(ne(r))return Fl(r)&&(await this._removeSession(),await Tt(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({data:{user:null},error:r});throw r}}async updateUser(t,r={}){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._updateUser(t,r))}async _updateUser(t,r={}){try{return await this._useSession(async a=>{const{data:l,error:c}=a;if(c)throw c;if(!l.session)throw new yt;const u=l.session;let h=null,p=null;this.flowType==="pkce"&&t.email!=null&&([h,p]=await Ba(this.storage,this.storageKey));const{data:m,error:y}=await se(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:r?.emailRedirectTo,body:Object.assign(Object.assign({},t),{code_challenge:h,code_challenge_method:p}),jwt:u.access_token,xform:ts});if(y)throw y;return u.user=m.user,await this._saveSession(u),await this._notifyAllSubscribers("USER_UPDATED",u),this._returnResult({data:{user:u.user},error:null})})}catch(a){if(await Tt(this.storage,`${this.storageKey}-code-verifier`),ne(a))return this._returnResult({data:{user:null},error:a});throw a}}async setSession(t){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._setSession(t))}async _setSession(t){try{if(!t.access_token||!t.refresh_token)throw new yt;const r=Date.now()/1e3;let a=r,l=!0,c=null;const{payload:u}=Xl(t.access_token);if(u.exp&&(a=u.exp,l=a<=r),l){const{data:h,error:p}=await this._callRefreshToken(t.refresh_token);if(p)return this._returnResult({data:{user:null,session:null},error:p});if(!h)return{data:{user:null,session:null},error:null};c=h}else{const{data:h,error:p}=await this._getUser(t.access_token);if(p)return this._returnResult({data:{user:null,session:null},error:p});c={access_token:t.access_token,refresh_token:t.refresh_token,user:h.user,token_type:"bearer",expires_in:a-r,expires_at:a},await this._saveSession(c),await this._notifyAllSubscribers("SIGNED_IN",c)}return this._returnResult({data:{user:c.user,session:c},error:null})}catch(r){if(ne(r))return this._returnResult({data:{session:null,user:null},error:r});throw r}}async refreshSession(t){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._refreshSession(t))}async _refreshSession(t){try{return await this._useSession(async r=>{var a;if(!t){const{data:u,error:h}=r;if(h)throw h;t=(a=u.session)!==null&&a!==void 0?a:void 0}if(!t?.refresh_token)throw new yt;const{data:l,error:c}=await this._callRefreshToken(t.refresh_token);return c?this._returnResult({data:{user:null,session:null},error:c}):l?this._returnResult({data:{user:l.user,session:l},error:null}):this._returnResult({data:{user:null,session:null},error:null})})}catch(r){if(ne(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async _getSessionFromURL(t,r){var a;
55try{if(!Rt())throw new Ql("No browser detected.");if(t.error||t.error_description||t.error_code)throw new Ql(t.error_description||"Error in URL with unspecified error_description",{error:t.error||"unspecified_error",code:t.error_code||"unspecified_code"});switch(r){case"implicit":if(this.flowType==="pkce")throw new fv("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new Ql("Not a valid implicit grant flow url.");break;default:}if(r==="pkce"){if(this._debug("#_initialize()","begin","is PKCE flow",!0),!t.code)throw new fv("No code detected.");const{data:N,error:L}=await this._exchangeCodeForSession(t.code);if(L)throw L;const X=new URL(window.location.href);return X.searchParams.delete("code"),window.history.replaceState(window.history.state,"",X.toString()),{data:{session:N.session,redirectType:(a=N.redirectType)!==null&&a!==void 0?a:null},error:null}}const{provider_token:l,provider_refresh_token:c,access_token:u,refresh_token:h,expires_in:p,expires_at:m,token_type:y}=t;if(!u||!p||!h||!y)throw new Ql("No session defined in URL");const g=Math.round(Date.now()/1e3),b=parseInt(p);let w=g+b;m&&(w=parseInt(m));const x=w-g;x*1e3<=Ka&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${x}s, should have been closer to ${b}s`);const k=w-b;g-k>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",k,w,g):g-k<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",k,w,g);const{data:E,error:A}=await this._getUser(u);if(A)throw A;const M={provider_token:l,provider_refresh_token:c,access_token:u,expires_in:b,expires_at:w,refresh_token:h,token_type:y,user:E.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),this._returnResult({data:{session:M,redirectType:t.type},error:null})}catch(l){if(ne(l))return this._returnResult({data:{session:null,redirectType:null},error:l});throw l}}_isImplicitGrantCallback(t){return typeof this.detectSessionInUrl=="function"?this.detectSessionInUrl(new URL(window.location.href),t):!!(t.access_token||t.error_description)}async _isPKCECallback(t){const r=await Us(this.storage,`${this.storageKey}-code-verifier`);return!!(t.code&&r)}async signOut(t={scope:"global"}){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._signOut(t))}async _signOut({scope:t}={scope:"global"}){return await this._useSession(async r=>{var a;const{data:l,error:c}=r;if(c&&!Fl(c))return this._returnResult({error:c});const u=(a=l.session)===null||a===void 0?void 0:a.access_token;if(u){const{error:h}=await this.admin.signOut(u,t);if(h&&!(XA(h)&&(h.status===404||h.status===401||h.status===403)||Fl(h)))return this._returnResult({error:h})}return t!=="others"&&(await this._removeSession(),await Tt(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({error:null})})}onAuthStateChange(t){const r=ik(),a={id:r,callback:t,unsubscribe:()=>{this._debug("#unsubscribe()","state change callback with id removed",r),this.stateChangeEmitters.delete(r)}};return this._debug("#onAuthStateChange()","registered callback with id",r),this.stateChangeEmitters.set(r,a),(async()=>(await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>{this._emitInitialSession(r)})))(),{data:{subscription:a}}}async _emitInitialSession(t){return await this._useSession(async r=>{var a,l;try{const{data:{session:c},error:u}=r;if(u)throw u;await((a=this.stateChangeEmitters.get(t))===null||a===void 0?void 0:a.callback("INITIAL_SESSION",c)),this._debug("INITIAL_SESSION","callback id",t,"session",c)}catch(c){await((l=this.stateChangeEmitters.get(t))===null||l===void 0?void 0:l.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",t,"error",c),Fl(c)?console.warn(c):console.error(c)}})}async resetPasswordForEmail(t,r={}){let a=null,l=null;this.flowType==="pkce"&&([a,l]=await Ba(this.storage,this.storageKey,!0));try{return await se(this.fetch,"POST",`${this.url}/recover`,{body:{email:t,code_challenge:a,code_challenge_method:l,gotrue_meta_security:{captcha_token:r.captchaToken}},headers:this.headers,redirectTo:r.redirectTo})}catch(c){if(await Tt(this.storage,`${this.storageKey}-code-verifier`),ne(c))return this._returnResult({data:null,error:c});throw c}}async getUserIdentities(){var t;try{const{data:r,error:a}=await this.getUser();if(a)throw a;return this._returnResult({data:{identities:(t=r.user.identities)!==null&&t!==void 0?t:[]},error:null})}catch(r){if(ne(r))return this._returnResult({data:null,error:r});throw r}}async linkIdentity(t){return"token"in t?this.linkIdentityIdToken(t):this.linkIdentityOAuth(t)}async linkIdentityOAuth(t){var r;try{const{data:a,error:l}=await this._useSession(async c=>{var u,h,p,m,y;const{data:g,error:b}=c;if(b)throw b;const w=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,t.provider,{redirectTo:(u=t.options)===null||u===void 0?void 0:u.redirectTo,scopes:(h=t.options)===null||h===void 0?void 0:h.scopes,queryParams:(p=t.options)===null||p===void 0?void 0:p.queryParams,skipBrowserRedirect:!0});return await se(this.fetch,"GET",w,{headers:this.headers,jwt:(y=(m=g.session)===null||m===void 0?void 0:m.access_token)!==null&&y!==void 0?y:void 0})});if(l)throw l;return Rt()&&!(!((r=t.options)===null||r===void 0)&&r.skipBrowserRedirect)&&window.location.assign(a?.url),this._returnResult({data:{provider:t.provider,url:a?.url},error:null})}catch(a){if(ne(a))return this._returnResult({data:{provider:t.provider,url:null},error:a});throw a}}async linkIdentityIdToken(t){return await this._useSession(async r=>{var a;try{const{error:l,data:{session:c}}=r;if(l)throw l;const{options:u,provider:h,token:p,access_token:m,nonce:y}=t,g=await se(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,jwt:(a=c?.access_token)!==null&&a!==void 0?a:void 0,body:{provider:h,id_token:p,access_token:m,nonce:y,link_identity:!0,gotrue_meta_security:{captcha_token:u?.captchaToken}},xform:Sn}),{data:b,error:w}=g;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 Pa}):(b.session&&(await this._saveSession(b.session),await this._notifyAllSubscribers("USER_UPDATED",b.session)),this._returnResult({data:b,error:w}))}catch(l){if(await Tt(this.storage,`${this.storageKey}-code-verifier`),ne(l))return this._returnResult({data:{user:null,session:null},error:l});throw l}})}async unlinkIdentity(t){try{return await this._useSession(async r=>{var a,l;const{data:c,error:u}=r;if(u)throw u;return await se(this.fetch,"DELETE",`${this.url}/user/identities/${t.identity_id}`,{headers:this.headers,jwt:(l=(a=c.session)===null||a===void 0?void 0:a.access_token)!==null&&l!==void 0?l:void 0})})}catch(r){if(ne(r))return this._returnResult({data:null,error:r});throw r}}async _refreshAccessToken(t){const r=`#_refreshAccessToken(${t.substring(0,5)}...)`;this._debug(r,"begin");try{const a=Date.now();return await uk(async l=>(l>0&&await ck(200*Math.pow(2,l-1)),this._debug(r,"refreshing attempt",l),await se(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:t},headers:this.headers,xform:Sn})),(l,c)=>{const u=200*Math.pow(2,l);return c&&dh(c)&&Date.now()+u-a<Ka})}catch(a){if(this._debug(r,"error",a),ne(a))return this._returnResult({data:{session:null,user:null},error:a});throw a}finally{this._debug(r,"end")}}_isValidSession(t){return typeof t=="object"&&t!==null&&"access_token"in t&&"refresh_token"in t&&"expires_at"in t}async _handleProviderSignIn(t,r){const a=await this._getUrlForProvider(`${this.url}/authorize`,t,{redirectTo:r.redirectTo,scopes:r.scopes,queryParams:r.queryParams});return this._debug("#_handleProviderSignIn()","provider",t,"options",r,"url",a),Rt()&&!r.skipBrowserRedirect&&window.location.assign(a),{data:{provider:t,url:a},error:null}}async _recoverAndRefresh(){var t,r;const a="#_recoverAndRefresh()";this._debug(a,"begin");try{const l=await Us(this.storage,this.storageKey);if(l&&this.userStorage){let u=await Us(this.userStorage,this.storageKey+"-user");!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!u&&(u={user:l.user},await Va(this.userStorage,this.storageKey+"-user",u)),l.user=(t=u?.user)!==null&&t!==void 0?t:hh()}else if(l&&!l.user&&!l.user){const u=await Us(this.storage,this.storageKey+"-user");u&&u?.user?(l.user=u.user,await Tt(this.storage,this.storageKey+"-user"),await Va(this.storage,this.storageKey,l)):l.user=hh()}if(this._debug(a,"session from storage",l),!this._isValidSession(l)){this._debug(a,"session is not valid"),l!==null&&await this._removeSession();return}const c=((r=l.expires_at)!==null&&r!==void 0?r:1/0)*1e3-Date.now()<uh;if(this._debug(a,`session has${c?"":" not"} expired with margin of ${uh}s`),c){if(this.autoRefreshToken&&l.refresh_token){const{error:u}=await this._callRefreshToken(l.refresh_token);u&&(console.error(u),dh(u)||(this._debug(a,"refresh failed with a non-retryable error, removing the session",u),await this._removeSession()))}}else if(l.user&&l.user.__isUserNotAvailableProxy===!0)try{const{data:u,error:h}=await this._getUser(l.access_token);!h&&u?.user?(l.user=u.user,await this._saveSession(l),await this._notifyAllSubscribers("SIGNED_IN",l)):this._debug(a,"could not get user data, skipping SIGNED_IN notification")}catch(u){console.error("Error getting user data:",u),this._debug(a,"error getting user data, skipping SIGNED_IN notification",u)}else await this._notifyAllSubscribers("SIGNED_IN",l)}catch(l){this._debug(a,"error",l),console.error(l);return}finally{this._debug(a,"end")}}async _callRefreshToken(t){var r,a;if(!t)throw new yt;if(this.refreshingDeferred)return this.refreshingDeferred.promise;const l=`#_callRefreshToken(${t.substring(0,5)}...)`;this._debug(l,"begin");try{this.refreshingDeferred=new Nc;const{data:c,error:u}=await this._refreshAccessToken(t);if(u)throw u;if(!c.session)throw new yt;await this._saveSession(c.session),await this._notifyAllSubscribers("TOKEN_REFRESHED",c.session);const h={data:c.session,error:null};return this.refreshingDeferred.resolve(h),h}catch(c){if(this._debug(l,"error",c),ne(c)){const u={data:null,error:c};return dh(c)||await this._removeSession(),(r=this.refreshingDeferred)===null||r===void 0||r.resolve(u),u}throw(a=this.refreshingDeferred)===null||a===void 0||a.reject(c),c}finally{this.refreshingDeferred=null,this._debug(l,"end")}}async _notifyAllSubscribers(t,r,a=!0){const l=`#_notifyAllSubscribers(${t})`;this._debug(l,"begin",r,`broadcast = ${a}`);try{this.broadcastChannel&&a&&this.broadcastChannel.postMessage({event:t,session:r});const c=[],u=Array.from(this.stateChangeEmitters.values()).map(async h=>{try{await h.callback(t,r)}catch(p){c.push(p)}});if(await Promise.all(u),c.length>0){for(let h=0;h<c.length;h+=1)console.error(c[h]);throw c[0]}}finally{this._debug(l,"end")}}async _saveSession(t){this._debug("#_saveSession()",t),this.suppressGetSessionWarning=!0,await Tt(this.storage,`${this.storageKey}-code-verifier`);const r=Object.assign({},t),a=r.user&&r.user.__isUserNotAvailableProxy===!0;if(this.userStorage){!a&&r.user&&await Va(this.userStorage,this.storageKey+"-user",{user:r.user});const l=Object.assign({},r);delete l.user;const c=vv(l);await Va(this.storage,this.storageKey,c)}else{const l=vv(r);await Va(this.storage,this.storageKey,l)}}async _removeSession(){this._debug("#_removeSession()"),this.suppressGetSessionWarning=!1,await Tt(this.storage,this.storageKey),await Tt(this.storage,this.storageKey+"-code-verifier"),await Tt(this.storage,this.storageKey+"-user"),this.userStorage&&await Tt(this.userStorage,this.storageKey+"-user"),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const t=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{t&&Rt()&&window?.removeEventListener&&window.removeEventListener("visibilitychange",t)}
55catch(r){console.error("removing visibilitychange callback failed",r)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const t=setInterval(()=>this._autoRefreshTokenTick(),Ka);this.autoRefreshTicker=t,t&&typeof t=="object"&&typeof t.unref=="function"?t.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(t);const r=setTimeout(async()=>{await this.initializePromise,await this._autoRefreshTokenTick()},0);this.autoRefreshTickTimeout=r,r&&typeof r=="object"&&typeof r.unref=="function"?r.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(r)}async _stopAutoRefresh(){this._debug("#_stopAutoRefresh()");const t=this.autoRefreshTicker;this.autoRefreshTicker=null,t&&clearInterval(t);const r=this.autoRefreshTickTimeout;this.autoRefreshTickTimeout=null,r&&clearTimeout(r)}async startAutoRefresh(){this._removeVisibilityChangedCallback(),await this._startAutoRefresh()}async stopAutoRefresh(){this._removeVisibilityChangedCallback(),await this._stopAutoRefresh()}async _autoRefreshTokenTick(){this._debug("#_autoRefreshTokenTick()","begin");try{await this._acquireLock(0,async()=>{try{const t=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 l=Math.floor((a.expires_at*1e3-t)/Ka);this._debug("#_autoRefreshTokenTick()",`access token expires in ${l} ticks, a tick lasts ${Ka}ms, refresh threshold is ${Lh} ticks`),l<=Lh&&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(t){if(t instanceof bb)this._debug("auto refresh token tick lock not available");else throw t}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!Rt()||!window?.addEventListener)return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=async()=>{try{await this._onVisibilityChanged(!1)}catch(t){this._debug("#visibilityChangedCallback","error",t)}},window?.addEventListener("visibilitychange",this.visibilityChangedCallback),await this._onVisibilityChanged(!0)}catch(t){console.error("_handleVisibilityChange",t)}}async _onVisibilityChanged(t){const r=`#_onVisibilityChanged(${t})`;this._debug(r,"visibilityState",document.visibilityState),document.visibilityState==="visible"?(this.autoRefreshToken&&this._startAutoRefresh(),t||(await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>{if(document.visibilityState!=="visible"){this._debug(r,"acquired the lock to recover the session, but the browser visibilityState is no longer visible, aborting");return}await this._recoverAndRefresh()}))):document.visibilityState==="hidden"&&this.autoRefreshToken&&this._stopAutoRefresh()}async _getUrlForProvider(t,r,a){const l=[`provider=${encodeURIComponent(r)}`];if(a?.redirectTo&&l.push(`redirect_to=${encodeURIComponent(a.redirectTo)}`),a?.scopes&&l.push(`scopes=${encodeURIComponent(a.scopes)}`),this.flowType==="pkce"){const[c,u]=await Ba(this.storage,this.storageKey),h=new URLSearchParams({code_challenge:`${encodeURIComponent(c)}`,code_challenge_method:`${encodeURIComponent(u)}`});l.push(h.toString())}if(a?.queryParams){const c=new URLSearchParams(a.queryParams);l.push(c.toString())}return a?.skipBrowserRedirect&&l.push(`skip_http_redirect=${a.skipBrowserRedirect}`),`${t}?${l.join("&")}`}async _unenroll(t){try{return await this._useSession(async r=>{var a;const{data:l,error:c}=r;return c?this._returnResult({data:null,error:c}):await se(this.fetch,"DELETE",`${this.url}/factors/${t.factorId}`,{headers:this.headers,jwt:(a=l?.session)===null||a===void 0?void 0:a.access_token})})}catch(r){if(ne(r))return this._returnResult({data:null,error:r});throw r}}async _enroll(t){try{return await this._useSession(async r=>{var a,l;const{data:c,error:u}=r;if(u)return this._returnResult({data:null,error:u});const h=Object.assign({friendly_name:t.friendlyName,factor_type:t.factorType},t.factorType==="phone"?{phone:t.phone}:t.factorType==="totp"?{issuer:t.issuer}:{}),{data:p,error:m}=await se(this.fetch,"POST",`${this.url}/factors`,{body:h,headers:this.headers,jwt:(a=c?.session)===null||a===void 0?void 0:a.access_token});return m?this._returnResult({data:null,error:m}):(t.factorType==="totp"&&p.type==="totp"&&(!((l=p?.totp)===null||l===void 0)&&l.qr_code)&&(p.totp.qr_code=`data:image/svg+xml;utf-8,${p.totp.qr_code}`),this._returnResult({data:p,error:null}))})}catch(r){if(ne(r))return this._returnResult({data:null,error:r});throw r}}async _verify(t){return this._acquireLock(this.lockAcquireTimeout,async()=>{try{return await this._useSession(async r=>{var a;const{data:l,error:c}=r;if(c)return this._returnResult({data:null,error:c});const u=Object.assign({challenge_id:t.challengeId},"webauthn"in t?{webauthn:Object.assign(Object.assign({},t.webauthn),{credential_response:t.webauthn.type==="create"?Rv(t.webauthn.credential_response):Av(t.webauthn.credential_response)})}:{code:t.code}),{data:h,error:p}=await se(this.fetch,"POST",`${this.url}/factors/${t.factorId}/verify`,{body:u,headers:this.headers,jwt:(a=l?.session)===null||a===void 0?void 0:a.access_token});return p?this._returnResult({data:null,error:p}):(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+h.expires_in},h)),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",h),this._returnResult({data:h,error:p}))})}catch(r){if(ne(r))return this._returnResult({data:null,error:r});throw r}})}async _challenge(t){return this._acquireLock(this.lockAcquireTimeout,async()=>{try{return await this._useSession(async r=>{var a;const{data:l,error:c}=r;if(c)return this._returnResult({data:null,error:c});const u=await se(this.fetch,"POST",`${this.url}/factors/${t.factorId}/challenge`,{body:t,headers:this.headers,jwt:(a=l?.session)===null||a===void 0?void 0:a.access_token});if(u.error)return u;const{data:h}=u;if(h.type!=="webauthn")return{data:h,error:null};switch(h.webauthn.type){case"create":return{data:Object.assign(Object.assign({},h),{webauthn:Object.assign(Object.assign({},h.webauthn),{credential_options:Object.assign(Object.assign({},h.webauthn.credential_options),{publicKey:Ev(h.webauthn.credential_options.publicKey)})})}),error:null};case"request":return{data:Object.assign(Object.assign({},h),{webauthn:Object.assign(Object.assign({},h.webauthn),{credential_options:Object.assign(Object.assign({}
55,h.webauthn.credential_options),{publicKey:Tv(h.webauthn.credential_options.publicKey)})})}),error:null}}})}catch(r){if(ne(r))return this._returnResult({data:null,error:r});throw r}})}async _challengeAndVerify(t){const{data:r,error:a}=await this._challenge({factorId:t.factorId});return a?this._returnResult({data:null,error:a}):await this._verify({factorId:t.factorId,challengeId:r.id,code:t.code})}async _listFactors(){var t;const{data:{user:r},error:a}=await this.getUser();if(a)return{data:null,error:a};const l={all:[],phone:[],totp:[],webauthn:[]};for(const c of(t=r?.factors)!==null&&t!==void 0?t:[])l.all.push(c),c.status==="verified"&&l[c.factor_type].push(c);return{data:l,error:null}}async _getAuthenticatorAssuranceLevel(t){var r,a,l,c;if(t)try{const{payload:w}=Xl(t);let x=null;w.aal&&(x=w.aal);let k=x;const{data:{user:E},error:A}=await this.getUser(t);if(A)return this._returnResult({data:null,error:A});((a=(r=E?.factors)===null||r===void 0?void 0:r.filter(L=>L.status==="verified"))!==null&&a!==void 0?a:[]).length>0&&(k="aal2");const N=w.amr||[];return{data:{currentLevel:x,nextLevel:k,currentAuthenticationMethods:N},error:null}}catch(w){if(ne(w))return this._returnResult({data:null,error:w});throw w}const{data:{session:u},error:h}
55=await this.getSession();if(h)return this._returnResult({data:null,error:h});if(!u)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const{payload:p}=Xl(u.access_token);let m=null;p.aal&&(m=p.aal);let y=m;((c=(l=u.user.factors)===null||l===void 0?void 0:l.filter(w=>w.status==="verified"))!==null&&c!==void 0?c:[]).length>0&&(y="aal2");const b=p.amr||[];return{data:{currentLevel:m,nextLevel:y,currentAuthenticationMethods:b},error:null}}async _getAuthorizationDetails(t){try{return await this._useSession(async r=>{const{data:{session:a},error:l}=r;return l?this._returnResult({data:null,error:l}):a?await se(this.fetch,"GET",`${this.url}/oauth/authorizations/${t}`,{headers:this.headers,jwt:a.access_token,xform:c=>({data:c,error:null})}):this._returnResult({data:null,error:new yt})})}catch(r){if(ne(r))return this._returnResult({data:null,error:r});throw r}}async _approveAuthorization(t,r){try{return await this._useSession(async a=>{const{data:{session:l},error:c}=a;if(c)return this._returnResult({data:null,error:c});if(!l)return this._returnResult({data:null,error:new yt});const u=await se(this.fetch,"POST",`${this.url}/oauth/authorizations/${t}/consent`,{headers:this.headers,jwt:l.access_token,body:{action:"approve"},xform:h=>({data:h,error:null})});return u.data&&u.data.redirect_url&&Rt()&&!r?.skipBrowserRedirect&&window.location.assign(u.data.redirect_url),u})}catch(a){if(ne(a))return this._returnResult({data:null,error:a});throw a}}async _denyAuthorization(t,r){try{return await this._useSession(async a=>{const{data:{session:l},error:c}=a;if(c)return this._returnResult({data:null,error:c});if(!l)return this._returnResult({data:null,error:new yt});const u=await se(this.fetch,"POST",`${this.url}/oauth/authorizations/${t}/consent`,{headers:this.headers,jwt:l.access_token,body:{action:"deny"},xform:h=>({data:h,error:null})});return u.data&&u.data.redirect_url&&Rt()&&!r?.skipBrowserRedirect&&window.location.assign(u.data.redirect_url),u})}catch(a){if(ne(a))return this._returnResult({data:null,error:a});throw a}}async _listOAuthGrants(){try{return await this._useSession(async t=>{const{data:{session:r},error:a}=t;return a?this._returnResult({data:null,error:a}):r?await se(this.fetch,"GET",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:r.access_token,xform:l=>({data:l,error:null})}):this._returnResult({data:null,error:new yt})})}catch(t){if(ne(t))return this._returnResult({data:null,error:t});throw t}}async _revokeOAuthGrant(t){try{return await this._useSession(async r=>{const{data:{session:a},error:l}=r;return l?this._returnResult({data:null,error:l}):a?(await se(this.fetch,"DELETE",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:a.access_token,query:{client_id:t.clientId},noResolveJson:!0}),{data:{},error:null}):this._returnResult({data:null,error:new yt})})}catch(r){if(ne(r))return this._returnResult({data:null,error:r});throw r}}async fetchJwk(t,r={keys:[]}){let a=r.keys.find(h=>h.kid===t);if(a)return a;const l=Date.now();if(a=this.jwks.keys.find(h=>h.kid===t),a&&this.jwks_cached_at+JA>l)return a;const{data:c,error:u}=await se(this.fetch,"GET",`${this.url}/.well-known/jwks.json`,{headers:this.headers});if(u)throw u;return!c.keys||c.keys.length===0||(this.jwks=c,this.jwks_cached_at=l,a=c.keys.find(h=>h.kid===t),!a)?null:a}async getClaims(t,r={}){try{let a=t;if(!a){const{data:w,error:x}
55=await this.getSession();if(x||!w.session)return this._returnResult({data:null,error:x});a=w.session.access_token}const{header:l,payload:c,signature:u,raw:{header:h,payload:p}}=Xl(a);r?.allowExpired||yk(c.exp);const m=!l.alg||l.alg.startsWith("HS")||!l.kid||!("crypto"in globalThis&&"subtle"in globalThis.crypto)?null:await this.fetchJwk(l.kid,r?.keys?{keys:r.keys}:r?.jwks);if(!m){const{error:w}=await this.getUser(a);if(w)throw w;return{data:{claims:c,header:l,signature:u},error:null}}const y=vk(l.alg),g=await crypto.subtle.importKey("jwk",m,y,!0,["verify"]);if(!await crypto.subtle.verify(y,g,u,sk(`${h}.${p}`)))throw new Ph("Invalid JWT signature");return{data:{claims:c,header:l,signature:u},error:null}}catch(a){if(ne(a))return this._returnResult({data:null,error:a});throw a}}async signInWithPasskey(t){var r,a,l;Cn(this.experimental);try{if(!yc())return this._returnResult({data:null,error:new Mn("Browser does not support WebAuthn",null)});const{data:c,error:u}=await this._startPasskeyAuthentication({options:{captchaToken:(r=t?.options)===null||r===void 0?void 0:r.captchaToken}});if(u||!c)return this._returnResult({data:null,error:u});const h=Tv(c.options),p=(l=(a=t?.options)===null||a===void 0?void 0:a.signal)!==null&&l!==void 0?l:Bh.createNewAbortSignal(),{data:m,error:y}=await xb({publicKey:h,signal:p});if(y||!m)return this._returnResult({data:null,error:y??new Mn("WebAuthn ceremony failed",null)});const g=Av(m);return this._verifyPasskeyAuthentication({challengeId:c.challenge_id,credential:g})}catch(c){if(ne(c))return this._returnResult({data:null,error:c});throw c}}async registerPasskey(t){var r,a;Cn(this.experimental);try{if(!yc())return this._returnResult({data:null,error:new Mn("Browser does not support WebAuthn",null)});const{data:l,error:c}=await this._startPasskeyRegistration();if(c||!l)return this._returnResult({data:null,error:c});const u=Ev(l.options),h=(a=(r=t?.options)===null||r===void 0?void 0:r.signal)!==null&&a!==void 0?a:Bh.createNewAbortSignal(),{data:p,error:m}=await Sb({publicKey:u,signal:h});if(m||!p)return this._returnResult({data:null,error:m??new Mn("WebAuthn ceremony failed",null)});const y=Rv(p);return this._verifyPasskeyRegistration({challengeId:l.challenge_id,credential:y})}catch(l){if(ne(l))return this._returnResult({data:null,error:l});throw l}}async _startPasskeyRegistration(){Cn(this.experimental);try{return await this._useSession(async t=>{const{data:{session:r},error:a}=t;if(a)return this._returnResult({data:null,error:a});if(!r)return this._returnResult({data:null,error:new yt});const{data:l,error:c}=await se(this.fetch,"POST",`${this.url}/passkeys/registration/options`,{headers:this.headers,jwt:r.access_token,body:{}});return c?this._returnResult({data:null,error:c}):this._returnResult({data:l,error:null})})}catch(t){if(ne(t))return this._returnResult({data:null,error:t});throw t}}async _verifyPasskeyRegistration(t){Cn(this.experimental);try{return await this._useSession(async r=>{const{data:{session:a},error:l}=r;if(l)return this._returnResult({data:null,error:l});if(!a)return this._returnResult({data:null,error:new yt});const{data:c,error:u}=await se(this.fetch,"POST",`${this.url}/passkeys/registration/verify`,{headers:this.headers,jwt:a.access_token,body:{challenge_id:t.challengeId,credential:t.credential}});return u?this._returnResult({data:null,error:u}):this._returnResult({data:c,error:null})})}catch(r){if(ne(r))return this._returnResult({data:null,error:r});throw r}}async _startPasskeyAuthentication(t){var r;Cn(this.experimental);try{const{data:a,error:l}=await se(this.fetch,"POST",`${this.url}/passkeys/authentication/options`,{headers:this.headers,body:{gotrue_meta_security:{captcha_token:(r=t?.options)===null||r===void 0?void 0:r.captchaToken}}});return l?this._returnResult({data:null,error:l}):this._returnResult({data:a,error:null})}catch(a){if(ne(a))return this._returnResult({data:null,error:a});throw a}}async _verifyPasskeyAuthentication(t){Cn(this.experimental);try{const{data:r,error:a}=await se(this.fetch,"POST",`${this.url}/passkeys/authentication/verify`,{headers:this.headers,body:{challenge_id:t.challengeId,credential:t.credential},xform:Sn});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(ne(r))return this._returnResult({data:null,error:r});throw r}}async _listPasskeys(){Cn(this.experimental);try{return await this._useSession(async t=>{const{data:{session:r},error:a}=t;if(a)return this._returnResult({data:null,error:a});if(!r)return this._returnResult({data:null,error:new yt});const{data:l,error:c}=await se(this.fetch,"GET",`${this.url}/passkeys`,{headers:this.headers,jwt:r.access_token,xform:u=>({data:u,error:null})});return c?this._returnResult({data:null,error:c}):this._returnResult({data:l,error:null})})}catch(t){if(ne(t))return this._returnResult({data:null,error:t});throw t}}async _updatePasskey(t){Cn(this.experimental);try{return await this._useSession(async r=>{const{data:{session:a},error:l}=r;if(l)return this._returnResult({data:null,error:l});if(!a)return this._returnResult({data:null,error:new yt});const{data:c,error:u}=await se(this.fetch,"PATCH",`${this.url}/passkeys/${t.passkeyId}`,{headers:this.headers,jwt:a.access_token,body:{friendly_name:t.friendlyName}});return u?this._returnResult({data:null,error:u}):this._returnResult({data:c,error:null})})}catch(r){if(ne(r))return this._returnResult({data:null,error:r});throw r}}async _deletePasskey(t){Cn(this.experimental);try{return await this._useSession(async r=>{const{data:{session:a},error:l}=r;if(l)return this._returnResult({data:null,error:l});if(!a)return this._returnResult({data:null,error:new yt});const{error:c}
55=await se(this.fetch,"DELETE",`${this.url}/passkeys/${t.passkeyId}`,{headers:this.headers,jwt:a.access_token,noResolveJson:!0});return c?this._returnResult({data:null,error:c}):this._returnResult({data:null,error:null})})}catch(r){if(ne(r))return this._returnResult({data:null,error:r});throw r}}}bo.nextInstanceID={};const qk=bo,$k="2.106.0";let so="";typeof Deno<"u"?so="deno":typeof document<"u"?so="web":typeof navigator<"u"&&navigator.product==="ReactNative"?so="react-native":so="node";const Kk={"X-Client-Info":`supabase-js-${so}/${$k}`},Vk={headers:Kk},Gk={schema:"public"},Yk={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},Fk={},Jk={enabled:!1,respectSamplingDecision:!0};function Qk(e,t,r,a){function l(c){return c instanceof r?c:new r(function(u){u(c)})}return new(r||(r=Promise))(function(c,u){function h(y){try{m(a.next(y))}catch(g){u(g)}}function p(y){try{m(a.throw(y))}catch(g){u(g)}}function m(y){y.done?c(y.value):l(y.value).then(h,p)}m((a=a.apply(e,[])).next())})}let ph=null;const Xk="@opentelemetry/api";function Zk(){return ph===null&&(ph=import(Xk).catch(()=>null)),ph}function Wk(){return Qk(this,void 0,void 0,function*(){try{const e=yield Zk();if(!e||!e.propagation||!e.context)return null;const t={};e.propagation.inject(e.context.active(),t);const r=t.traceparent;return r?{traceparent:r,tracestate:t.tracestate,baggage:t.baggage}:null}catch{return null}})}function eO(e){if(!e||typeof e!="string")return null;const t=e.split("-");if(t.length!==4)return null;const[r,a,l,c]=t;if(r.length!==2||a.length!==32||l.length!==16||c.length!==2)return null;const u=/^[0-9a-f]+$/i;return!u.test(r)||!u.test(a)||!u.test(l)||!u.test(c)||a==="00000000000000000000000000000000"||l==="0000000000000000"?null:{version:r,traceId:a,parentId:l,traceFlags:c,isSampled:(parseInt(c,16)&1)===1}}function tO(e,t){if(!e||!t||t.length===0)return!1;let r;if(e instanceof URL)r=e;else try{r=new URL(e)}catch{return!1}for(const a of t)try{if(typeof a=="string"){if(nO(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 nO(e,t){if(t===e)return!0;if(t.startsWith("*.")){const r=t.slice(2);if(e.endsWith(r)&&(e===r||e.endsWith("."+r)))return!0}return!1}function rO(e){const t=[];try{const r=new URL(e);t.push(r.hostname)}catch{}return t.push("*.supabase.co","*.supabase.in"),t.push("localhost","127.0.0.1","[::1]"),t}function wo(e){"@babel/helpers - typeof";return wo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},wo(e)}function sO(e,t){if(wo(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var a=r.call(e,t);if(wo(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function aO(e){var t=sO(e,"string");return wo(t)=="symbol"?t:t+""}function iO(e,t,r){return(t=aO(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ov(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(l){return Object.getOwnPropertyDescriptor(e,l).enumerable})),r.push.apply(r,a)}return r}function et(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ov(Object(r),!0).forEach(function(a){iO(e,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ov(Object(r)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(r,a))})}return e}const oO=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),lO=()=>Headers,cO=(e,t,r,a,l)=>{const c=oO(a),u=lO(),h=l?.enabled===!0,p=l?.respectSamplingDecision!==!1,m=h?rO(t):null;return async(y,g)=>{var b;const w=(b=await r())!==null&&b!==void 0?b:e;let x=new u(g?.headers);if(x.has("apikey")||x.set("apikey",e),x.has("Authorization")||x.set("Authorization",`Bearer ${w}`),m){const k=await uO(y,m,p);k&&(k.traceparent&&!x.has("traceparent")&&x.set("traceparent",k.traceparent),k.tracestate&&!x.has("tracestate")&&x.set("tracestate",k.tracestate),k.baggage&&!x.has("baggage")&&x.set("baggage",k.baggage))}return c(y,et(et({},g),{},{headers:x}))}};async function uO(e,t,r){if(!tO(typeof e=="string"||e instanceof URL?e:e.url,t))return null;const a=await Wk();if(!a||!a.traceparent)return null;if(r){const l=eO(a.traceparent);if(l&&!l.isSampled)return null}return a}function Cv(e){return typeof e=="boolean"?{enabled:e}:e}function dO(e){return e.endsWith("/")?e:e+"/"}function hO(e,t){var r,a,l,c,u,h;const{db:p,auth:m,realtime:y,global:g}=e,{db:b,auth:w,realtime:x,global:k}=t,E=Cv(e.tracePropagation),A=Cv(t.tracePropagation),M={db:et(et({},b),p),auth:et(et({},w),m),realtime:et(et({},x),y),storage:{},global:et(et(et({},k),g),{},{headers:et(et({},(r=k?.headers)!==null&&r!==void 0?r:{}),(a=g?.headers)!==null&&a!==void 0?a:{})}),tracePropagation:{enabled:(l=(c=E?.enabled)!==null&&c!==void 0?c:A?.enabled)!==null&&l!==void 0?l:!1,respectSamplingDecision:(u=(h=E?.respectSamplingDecision)!==null&&h!==void 0?h:A?.respectSamplingDecision)!==null&&u!==void 0?u:!0},accessToken:async()=>""};return e.accessToken?M.accessToken=e.accessToken:delete M.accessToken,M}function fO(e){const t=e?.trim();if(!t)throw new Error("supabaseUrl is required.");
55if(!t.match(/^https?:\/\//i))throw new Error("Invalid supabaseUrl: Must be a valid HTTP or HTTPS URL.");try{return new URL(dO(t))}catch{throw Error("Invalid supabaseUrl: Provided URL is malformed.")}}var pO=class extends qk{constructor(e){super(e)}},mO=class{constructor(e,t,r){var a,l;this.supabaseUrl=e,this.supabaseKey=t;const c=fO(e);if(!t)throw new Error("supabaseKey is required.");this.realtimeUrl=new URL("realtime/v1",c),this.realtimeUrl.protocol=this.realtimeUrl.protocol.replace("http","ws"),this.authUrl=new URL("auth/v1",c),this.storageUrl=new URL("storage/v1",c),this.functionsUrl=new URL("functions/v1",c);const u=`sb-${c.hostname.split(".")[0]}-auth-token`,h={db:Gk,realtime:Fk,auth:et(et({},Yk),{},{storageKey:u}),global:Vk,tracePropagation:Jk},p=hO(r??{},h);if(this.settings=p,this.storageKey=(a=p.auth.storageKey)!==null&&a!==void 0?a:"",this.headers=(l=p.global.headers)!==null&&l!==void 0?l:{},p.accessToken)this.accessToken=p.accessToken,this.auth=new Proxy({},{get:(y,g)=>{throw new Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(g)} is not possible`)}});else{var m;this.auth=this._initSupabaseAuthClient((m=p.auth)!==null&&m!==void 0?m:{},this.headers,p.global.fetch)}this.fetch=cO(t,e,this._getAccessToken.bind(this),p.global.fetch,p.tracePropagation),this.realtime=this._initRealtimeClient(et({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 jR(new URL("rest/v1",c).href,{headers:this.headers,schema:p.db.schema,fetch:this.fetch,timeout:p.db.timeout,urlLengthLimit:p.db.urlLengthLimit}),this.storage=new KA(this.storageUrl.href,this.headers,this.fetch,r?.storage),p.accessToken||this._listenForAuthEvents()}get functions(){return new _R(this.functionsUrl.href,{headers:this.headers,customFetch:this.fetch})}from(e){return this.rest.from(e)}schema(e){return this.rest.schema(e)}rpc(e,t={},r={head:!1,get:!1,count:void 0}){return this.rest.rpc(e,t,r)}channel(e,t={config:{}}){return this.realtime.channel(e,t)}getChannels(){return this.realtime.getChannels()}removeChannel(e){return this.realtime.removeChannel(e)}removeAllChannels(){return this.realtime.removeAllChannels()}async _getAccessToken(){var e=this,t,r;if(e.accessToken)return await e.accessToken();const{data:a}=await e.auth.getSession();return(t=(r=a.session)===null||r===void 0?void 0:r.access_token)!==null&&t!==void 0?t:e.supabaseKey}_initSupabaseAuthClient({autoRefreshToken:e,persistSession:t,detectSessionInUrl:r,storage:a,userStorage:l,storageKey:c,flowType:u,lock:h,debug:p,throwOnError:m,experimental:y,lockAcquireTimeout:g,skipAutoInitialize:b},w,x){const k={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new pO({url:this.authUrl.href,headers:et(et({},k),w),storageKey:c,autoRefreshToken:e,persistSession:t,detectSessionInUrl:r,storage:a,userStorage:l,flowType:u,lock:h,debug:p,throwOnError:m,experimental:y,fetch:x,lockAcquireTimeout:g,skipAutoInitialize:b,hasCustomAuthorizationHeader:Object.keys(this.headers).some(E=>E.toLowerCase()==="authorization")})}_initRealtimeClient(e){return new fA(this.realtimeUrl.href,et(et({},e),{},{params:et(et({},{apikey:this.supabaseKey}),e?.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((e,t)=>{this._handleTokenChanged(e,"CLIENT",t?.access_token)})}_handleTokenChanged(e,t,r){(e==="TOKEN_REFRESHED"||e==="SIGNED_IN")&&this.changedAccessToken!==r?(this.changedAccessToken=r,this.realtime.setAuth(r)):e==="SIGNED_OUT"&&(this.realtime.setAuth(),t=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}};const gO=(e,t,r)=>new mO(e,t,r);function yO(){if(typeof window<"u")return!1;const e=globalThis.process;if(!e)return!1;const t=e.version;if(t==null)return!1;const r=t.match(/^v(\d+)\./);return r?parseInt(r[1],10)<=18:!1}yO()&&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 vO(){return gO("https://vyfwpkzlpoiopmhjnydf.supabase.co","eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InZ5Zndwa3pscG9pb3BtaGpueWRmIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NzkxOTIyOTYsImV4cCI6MjA5NDc2ODI5Nn0.pPtWgxGh9zpPliaujqKDHHfpw-fwibJkeU58in_MprU",{auth:{storage:typeof window<"u"?localStorage:void 0,persistSession:!0,autoRefreshToken:!0}})}let mh;const Dn=new Proxy({},{get(e,t,r){return mh||(mh=vO()),Reflect.get(mh,t,r)}}),bO=Is({type:"function"}).client(async({next:e})=>{const{data:t}=await Dn.auth.getSession(),r=t.session?.access_token;return e({headers:r?{Authorization:`Bearer ${r}`}:{}})}),wO=Is(),jv=yR(()=>({requestMiddleware:[wO],functionMiddleware:[bO]}));var Mc=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},_O=class extends Mc{#e;#n;#t;constructor(){super(),this.#t=e=>{if(typeof window<"u"&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#n||this.setEventListener(this.#t)}onUnsubscribe(){this.hasListeners()||(this.#n?.(),this.#n=void 0)}setEventListener(e){this.#t=e,this.#n?.(),this.#n=e(t=>{typeof t=="boolean"?this.setFocused(t):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},Eb=new _O,SO={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},xO=class{#e=SO;#n=!1;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}},Hh=new xO;function EO(e){setTimeout(e,0)}var TO=typeof window>"u"||"Deno"in globalThis;function Nn(){}function RO(e,t){return typeof e=="function"?e(t):e}function AO(e){return typeof e=="number"&&e>=0&&e!==1/0}function kO(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Ih(e,t){return typeof e=="function"?e(t):e}function OO(e,t){return typeof e=="function"?e(t):e}function Nv(e,t){const{type:r="all",exact:a,fetchStatus:l,predicate:c,queryKey:u,stale:h}=e;if(u){if(a){if(t.queryHash!==lf(u,t.options))return!1}else if(!So(t.queryKey,u))return!1}if(r!=="all"){const p=t.isActive();if(r==="active"&&!p||r==="inactive"&&p)return!1}return!(typeof h=="boolean"&&t.isStale()!==h||l&&l!==t.state.fetchStatus||c&&!c(t))}function Mv(e,t){const{exact:r,status:a,predicate:l,mutationKey:c}=e;if(c){if(!t.options.mutationKey)return!1;if(r){if(_o(t.options.mutationKey)!==_o(c))return!1}else if(!So(t.options.mutationKey,c))return!1}return!(a&&t.state.status!==a||l&&!l(t))}function lf(e,t){return(t?.queryKeyHashFn||_o)(e)}function _o(e){return JSON.stringify(e,(t,r)=>qh(r)?Object.keys(r).sort().reduce((a,l)=>(a[l]=r[l],a),{}):r)}function So(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>So(e[r],t[r])):!1}var CO=Object.prototype.hasOwnProperty;function Tb(e,t,r=0){if(e===t)return e;if(r>500)return t;const a=Dv(e)&&Dv(t);if(!a&&!(qh(e)&&qh(t)))return t;const c=(a?e:Object.keys(e)).length,u=a?t:Object.keys(t),h=u.length,p=a?new Array(h):{};let m=0;for(let y=0;y<h;y++){const g=a?y:u[y],b=e[g],w=t[g];if(b===w){p[g]=b,(a?y<c:CO.call(e,g))&&m++;continue}if(b===null||w===null||typeof b!="object"||typeof w!="object"){p[g]=w;continue}const x=Tb(b,w,r+1);p[g]=x,x===b&&m++}return c===h&&m===c?e:p}function Dv(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function qh(e){if(!Lv(e))return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(!Lv(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Lv(e){return Object.prototype.toString.call(e)==="[object Object]"}function jO(e){return new Promise(t=>{Hh.setTimeout(t,e)})}function NO(e,t,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?Tb(e,t):t}function MO(e,t,r=0){const a=[...e,t];return r&&a.length>r?a.slice(1):a}function DO(e,t,r=0){const a=[t,...e];return r&&a.length>r?a.slice(0,-1):a}var cf=Symbol();function Rb(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===cf?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function LO(e,t,r){let a=!1,l;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(l??=t(),a||(a=!0,l.aborted?r():l.addEventListener("abort",r,{once:!0})),l)}),e}var Ab=(()=>{let e=()=>TO;return{isServer(){return e()},setIsServer(t){e=t}}})();function UO(){let e,t;const r=new Promise((l,c)=>{e=l,t=c});r.status="pending",r.catch(()=>{});function a(l){Object.assign(r,l),delete r.resolve,delete r.reject}return r.resolve=l=>{a({status:"fulfilled",value:l}),e(l)},r.reject=l=>{a({status:"rejected",reason:l}),t(l)},r}var zO=EO;function PO(){let e=[],t=0,r=h=>{h()},a=h=>{h()},l=zO;const c=h=>{t?e.push(h):l(()=>{r(h)})},u=()=>{const h=e;e=[],h.length&&l(()=>{a(()=>{h.forEach(p=>{r(p)})})})};return{batch:h=>{let p;t++;try{p=h()}finally{t--,t||u()}return p},batchCalls:h=>(...p)=>{c(()=>{h(...p)})},schedule:c,setNotifyFunction:h=>{r=h},setBatchNotifyFunction:h=>{a=h},setScheduler:h=>{l=h}}}var Dt=PO(),BO=class extends Mc{#e=!0;#n;#t;constructor(){super(),this.#t=e=>{if(typeof window<"u"&&window.addEventListener){const t=()=>e(!0),r=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",r)}}}}onSubscribe(){this.#n||this.setEventListener(this.#t)}onUnsubscribe(){this.hasListeners()||(this.#n?.(),this.#n=void 0)}setEventListener(e){this.#t=e,this.#n?.(),this.#n=e(this.setOnline.bind(this))}
vendor: 19,647 bytes, line 55
55setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(r=>{r(e)}))}isOnline(){return this.#e}},bc=new BO;function HO(e){return Math.min(1e3*2**e,3e4)}function kb(e){return(e??"online")==="online"?bc.isOnline():!0}var $h=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function Ob(e){let t=!1,r=0,a;const l=UO(),c=()=>l.status!=="pending",u=k=>{if(!c()){const E=new $h(k);b(E),e.onCancel?.(E)}},h=()=>{t=!0},p=()=>{t=!1},m=()=>Eb.isFocused()&&(e.networkMode==="always"||bc.isOnline())&&e.canRun(),y=()=>kb(e.networkMode)&&e.canRun(),g=k=>{c()||(a?.(),l.resolve(k))},b=k=>{c()||(a?.(),l.reject(k))},w=()=>new Promise(k=>{a=E=>{(c()||m())&&k(E)},e.onPause?.()}).then(()=>{a=void 0,c()||e.onContinue?.()}),x=()=>{if(c())return;let k;const E=r===0?e.initialPromise:void 0;try{k=E??e.fn()}catch(A){k=Promise.reject(A)}Promise.resolve(k).then(g).catch(A=>{if(c())return;const M=e.retry??(Ab.isServer()?0:3),N=e.retryDelay??HO,L=typeof N=="function"?N(r,A):N,X=M===!0||typeof M=="number"&&r<M||typeof M=="function"&&M(r,A);if(t||!X){b(A);return}r++,e.onFail?.(r,A),jO(L).then(()=>m()?void 0:w()).then(()=>{t?b(A):x()})})};return{promise:l,status:()=>l.status,cancel:u,continue:()=>(a?.(),l),cancelRetry:h,continueRetry:p,canStart:y,start:()=>(y()?x():w().then(x),l)}}var Cb=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),AO(this.gcTime)&&(this.#e=Hh.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Ab.isServer()?1/0:300*1e3))}clearGcTimeout(){this.#e!==void 0&&(Hh.clearTimeout(this.#e),this.#e=void 0)}},IO=class extends Cb{#e;#n;#t;#s;#r;#a;#i;constructor(e){super(),this.#i=!1,this.#a=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#s=e.client,this.#t=this.#s.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=zv(this.options),this.state=e.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#r?.promise}setOptions(e){if(this.options={...this.#a,...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const t=zv(this.options);t.data!==void 0&&(this.setState(Uv(t.data,t.dataUpdatedAt)),this.#e=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#t.remove(this)}setData(e,t){const r=NO(this.state.data,e,this.options);return this.#o({data:r,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),r}setState(e,t){this.#o({type:"setState",state:e,setStateOptions:t})}cancel(e){const t=this.#r?.promise;return this.#r?.cancel(e),t?t.then(Nn).catch(Nn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#e}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>OO(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===cf||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>Ih(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!kO(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(t=>t.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#r?.continue()}onOnline(){this.observers.find(t=>t.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#r?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#t.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#r&&(this.#i||this.#l()?this.#r.cancel({revert:!0}):this.#r.cancelRetry()),this.scheduleGc()),this.#t.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}#l(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"}invalidate(){this.state.isInvalidated||this.#o({type:"invalidate"})}async fetch(e,t){if(this.state.fetchStatus!=="idle"&&this.#r?.status()!=="rejected"){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#r)return this.#r.continueRetry(),this.#r.promise}if(e&&this.setOptions(e),!this.options.queryFn){const h=this.observers.find(p=>p.options.queryFn);h&&this.setOptions(h.options)}const r=new AbortController,a=h=>{Object.defineProperty(h,"signal",{enumerable:!0,get:()=>(this.#i=!0,r.signal)})},l=()=>{const h=Rb(this.options,t),m=(()=>{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(h,m,this):h(m)},u=(()=>{const h={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#s,state:this.state,fetchFn:l};return a(h),h})();this.options.behavior?.onFetch(u,this),this.#n=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==u.fetchOptions?.meta)&&this.#o({type:"fetch",meta:u.fetchOptions?.meta}),this.#r=Ob({initialPromise:t?.initialPromise,fn:u.fetchFn,onCancel:h=>{h instanceof $h&&h.revert&&this.setState({...this.#n,fetchStatus:"idle"}),r.abort()},onFail:(h,p)=>{this.#o({type:"failed",failureCount:h,error:p})},onPause:()=>{this.#o({type:"pause"})},onContinue:()=>{this.#o({type:"continue"})},retry:u.options.retry,retryDelay:u.options.retryDelay,networkMode:u.options.networkMode,canRun:()=>!0});try{const h=await this.#r.start();if(h===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(h),this.#t.config.onSuccess?.(h,this),this.#t.config.onSettled?.(h,this.state.error,this),h}catch(h){if(h instanceof $h){if(h.silent)return this.#r.promise;if(h.revert){if(this.state.data===void 0)throw h;return this.state.data}}throw this.#o({type:"error",error:h}),this.#t.config.onError?.(h,this),this.#t.config.onSettled?.(this.state.data,h,this),h}finally{this.scheduleGc()}}#o(e){const t=r=>{switch(e.type){case"failed":return{...r,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...qO(r.data,this.options),fetchMeta:e.meta??null};case"success":const a={...r,...Uv(e.data,e.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#n=e.manual?a:void 0,a;case"error":const l=e.error;return{...r,error:l,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:l,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...e.state}}};this.state=t(this.state),Dt.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),this.#t.notify({query:this,type:"updated",action:e})})}};function qO(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:kb(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Uv(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function zv(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,r=t!==void 0,a=r?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,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 Pv(e){return{onFetch:(t,r)=>{const a=t.options,l=t.fetchOptions?.meta?.fetchMore?.direction,c=t.state.data?.pages||[],u=t.state.data?.pageParams||[];let h={pages:[],pageParams:[]},p=0;const m=async()=>{let y=!1;const g=x=>{LO(x,()=>t.signal,()=>y=!0)},b=Rb(t.options,t.fetchOptions),w=async(x,k,E)=>{if(y)return Promise.reject();if(k==null&&x.pages.length)return Promise.resolve(x);const M=(()=>{const Y={client:t.client,queryKey:t.queryKey,pageParam:k,direction:E?"backward":"forward",meta:t.options.meta};return g(Y),Y})(),N=await b(M),{maxPages:L}=t.options,X=E?DO:MO;return{pages:X(x.pages,N,L),pageParams:X(x.pageParams,k,L)}};if(l&&c.length){const x=l==="backward",k=x?$O:Bv,E={pages:c,pageParams:u},A=k(a,E);h=await w(E,A,x)}else{const x=e??c.length;do{const k=p===0?u[0]??a.initialPageParam:Bv(a,h);if(p>0&&k==null)break;h=await w(h,k),p++}while(p<x)}return h};t.options.persister?t.fetchFn=()=>t.options.persister?.(m,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r):t.fetchFn=m}}}function Bv(e,{pages:t,pageParams:r}){const a=t.length-1;return t.length>0?e.getNextPageParam(t[a],t,r[a],r):void 0}function $O(e,{pages:t,pageParams:r}){return t.length>0?e.getPreviousPageParam?.(t[0],t,r[0],r):void 0}var KO=class extends Cb{#e;#n;#t;#s;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#t=e.mutationCache,this.#n=[],this.state=e.state||VO(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#n.includes(e)||(this.#n.push(e),this.clearGcTimeout(),this.#t.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#n=this.#n.filter(t=>t!==e),this.scheduleGc(),this.#t.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#n.length||(this.state.status==="pending"?this.scheduleGc():this.#t.remove(this))}continue(){return this.#s?.continue()??this.execute(this.state.variables)}async execute(e){const t=()=>{this.#r({type:"continue"})},r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#s=Ob({fn:()=>this.options.mutationFn?this.options.mutationFn(e,r):Promise.reject(new Error("No mutationFn found")),onFail:(c,u)=>{this.#r({type:"failed",failureCount:c,error:u})},onPause:()=>{this.#r({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#t.canRun(this)});const a=this.state.status==="pending",l=!this.#s.canStart();try{if(a)t();else{this.#r({type:"pending",variables:e,isPaused:l}),this.#t.config.onMutate&&await this.#t.config.onMutate(e,this,r);const u=await this.options.onMutate?.(e,r);u!==this.state.context&&this.#r({type:"pending",context:u,variables:e,isPaused:l})}const c=await this.#s.start();return await this.#t.config.onSuccess?.(c,e,this.state.context,this,r),await this.options.onSuccess?.(c,e,this.state.context,r),await this.#t.config.onSettled?.(c,null,this.state.variables,this.state.context,this,r),await this.options.onSettled?.(c,null,e,this.state.context,r),this.#r({type:"success",data:c}),c}catch(c){try{await this.#t.config.onError?.(c,e,this.state.context,this,r)}catch(u){Promise.reject(u)}try{await this.options.onError?.(c,e,this.state.context,r)}catch(u){Promise.reject(u)}try{await this.#t.config.onSettled?.(void 0,c,this.state.variables,this.state.context,this,r)}catch(u){Promise.reject(u)}try{await this.options.onSettled?.(void 0,c,e,this.state.context,r)}catch(u){Promise.reject(u)}throw this.#r({type:"error",error:c}),c}finally{this.#t.runNext(this)}}#r(e){const t=r=>{switch(e.type){case"failed":return{...r,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...r,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:e.error,failureCount:r.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=t(this.state),Dt.batch(()=>{this.#n.forEach(r=>{r.onMutationUpdate(e)}),this.#t.notify({mutation:this,type:"updated",action:e})})}};function VO(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var GO=class extends Mc{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#n=new Map,this.#t=0}#e;#n;#t;build(e,t,r){const a=new KO({client:e,mutationCache:this,mutationId:++this.#t,options:e.defaultMutationOptions(t),state:r});return this.add(a),a}add(e){this.#e.add(e);const t=Zl(e);if(typeof t=="string"){const r=this.#n.get(t);r?r.push(e):this.#n.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#e.delete(e)){const t=Zl(e);if(typeof t=="string"){const r=this.#n.get(t);if(r)if(r.length>1){const a=r.indexOf(e);a!==-1&&r.splice(a,1)}else r[0]===e&&this.#n.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=Zl(e);if(typeof t=="string"){const a=this.#n.get(t)?.find(l=>l.state.status==="pending");return!a||a===e}else return!0}runNext(e){const t=Zl(e);return typeof t=="string"?this.#n.get(t)?.find(a=>a!==e&&a.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){Dt.batch(()=>{this.#e.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#e.clear(),this.#n.clear()})}getAll(){return Array.from(this.#e)}find(e){const t={exact:!0,...e};return this.getAll().find(r=>Mv(t,r))}findAll(e={}){return this.getAll().filter(t=>Mv(e,t))}notify(e){Dt.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return Dt.batch(()=>Promise.all(e.map(t=>t.continue().catch(Nn))))}};function Zl(e){return e.options.scope?.id}var YO=class extends Mc{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,r){const a=t.queryKey,l=t.queryHash??lf(a,t);let c=this.get(l);return c||(c=new IO({client:e,queryKey:a,queryHash:l,options:e.defaultQueryOptions(t),state:r,defaultOptions:e.getQueryDefaults(a)}),this.add(c)),c}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){Dt.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){const t={exact:!0,...e};return this.getAll().find(r=>Nv(t,r))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(r=>Nv(e,r)):t}notify(e){Dt.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){Dt.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Dt.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},FO=class{#e;#n;#t;#s;#r;#a;#i;#l;constructor(e={}){this.#e=e.queryCache||new YO,this.#n=e.mutationCache||new GO,this.#t=e.defaultOptions||{},this.#s=new Map,this.#r=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#i=Eb.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#l=bc.subscribe(async e=>{e&&(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(e){return this.#e.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#n.findAll({...e,status:"pending"}).length}getQueryData(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=this.#e.build(this,t),a=r.state.data;return a===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(Ih(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(a))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:t,state:r})=>{const a=r.data;return[t,a]})}setQueryData(e,t,r){const a=this.defaultQueryOptions({queryKey:e}),c=this.#e.get(a.queryHash)?.state.data,u=RO(t,c);if(u!==void 0)return this.#e.build(this,a).setData(u,{...r,manual:!0})}setQueriesData(e,t,r){return Dt.batch(()=>this.#e.findAll(e).map(({queryKey:a})=>[a,this.setQueryData(a,t,r)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){const t=this.#e;Dt.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=this.#e;return Dt.batch(()=>(r.findAll(e).forEach(a=>{a.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},a=Dt.batch(()=>this.#e.findAll(e).map(l=>l.cancel(r)));return Promise.all(a).then(Nn).catch(Nn)}invalidateQueries(e,t={}){return Dt.batch(()=>(this.#e.findAll(e).forEach(r=>{r.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t)))}refetchQueries(e,t={}){const r={...t,cancelRefetch:t.cancelRefetch??!0},a=Dt.batch(()=>this.#e.findAll(e).filter(l=>!l.isDisabled()&&!l.isStatic()).map(l=>{let c=l.fetch(void 0,r);return r.throwOnError||(c=c.catch(Nn)),l.state.fetchStatus==="paused"?Promise.resolve():c}));return Promise.all(a).then(Nn)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=this.#e.build(this,t);return r.isStaleByTime(Ih(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Nn).catch(Nn)}fetchInfiniteQuery(e){return e.behavior=Pv(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Nn).catch(Nn)}ensureInfiniteQueryData(e){return e.behavior=Pv(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return bc.isOnline()?this.#n.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#n}getDefaultOptions(){return this.#t}setDefaultOptions(e){this.#t=e}setQueryDefaults(e,t){this.#s.set(_o(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#s.values()],r={};return t.forEach(a=>{So(e,a.queryKey)&&Object.assign(r,a.defaultOptions)}),r}setMutationDefaults(e,t){this.#r.set(_o(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#r.values()],r={};return t.forEach(a=>{So(e,a.mutationKey)&&Object.assign(r,a.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...this.#t.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=lf(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===cf&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#t.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#n.clear()}},JO=ee.createContext(void 0),QO=({client:e,children:t})=>(ee.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),_.jsx(JO.Provider,{value:e,children:t}));function XO(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}const ZO=e=>{switch(e){case"success":return tC;case"info":return rC;case"warning":return nC;case"error":return sC;default:return null}},WO=Array(12).fill(0),eC=({visible:e,className:t})=>W.createElement("div",{className:["sonner-loading-wrapper",t].filter(
vendor: 6,020 bytes, line 55
55Boolean).join(" "),"data-visible":e},W.createElement("div",{className:"sonner-spinner"},WO.map((r,a)=>W.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${a}`})))),tC=W.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},W.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),nC=W.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},W.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),rC=W.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},W.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),sC=W.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},W.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),aC=W.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},W.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),W.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),iC=()=>{const[e,t]=W.useState(document.hidden);return W.useEffect(()=>{const r=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",r),()=>window.removeEventListener("visibilitychange",r)},[]),e};let Kh=1;class oC{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{const r=this.subscribers.indexOf(t);this.subscribers.splice(r,1)}),this.publish=t=>{this.subscribers.forEach(r=>r(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var r;const{message:a,...l}=t,c=typeof t?.id=="number"||((r=t.id)==null?void 0:r.length)>0?t.id:Kh++,u=this.toasts.find(p=>p.id===c),h=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(c)&&this.dismissedToasts.delete(c),u?this.toasts=this.toasts.map(p=>p.id===c?(this.publish({...p,...t,id:c,title:a}),{...p,...t,id:c,dismissible:h,title:a}):p):this.addToast({title:a,...l,dismissible:h,id:c}),c},this.dismiss=t=>(t?(this.dismissedToasts.add(t),requestAnimationFrame(()=>this.subscribers.forEach(r=>r({id:t,dismiss:!0})))):this.toasts.forEach(r=>{this.subscribers.forEach(a=>a({id:r.id,dismiss:!0}))}),t),this.message=(t,r)=>this.create({...r,message:t}),this.error=(t,r)=>this.create({...r,message:t,type:"error"}),this.success=(t,r)=>this.create({...r,type:"success",message:t}),this.info=(t,r)=>this.create({...r,type:"info",message:t}),this.warning=(t,r)=>this.create({...r,type:"warning",message:t}),this.loading=(t,r)=>this.create({...r,type:"loading",message:t}),this.promise=(t,r)=>{if(!r)return;let a;r.loading!==void 0&&(a=this.create({...r,promise:t,type:"loading",message:r.loading,description:typeof r.description!="function"?r.description:void 0}));const l=Promise.resolve(t instanceof Function?t():t);let c=a!==void 0,u;const h=l.then(async m=>{if(u=["resolve",m],W.isValidElement(m))c=!1,this.create({id:a,type:"default",message:m});else if(cC(m)&&!m.ok){c=!1;const g=typeof r.error=="function"?await r.error(`HTTP error! status: ${m.status}`):r.error,b=typeof r.description=="function"?await r.description(`HTTP error! status: ${m.status}`):r.description,x=typeof g=="object"&&!W.isValidElement(g)?g:{message:g};this.create({id:a,type:"error",description:b,...x})}else if(m instanceof Error){c=!1;const g=typeof r.error=="function"?await r.error(m):r.error,b=typeof r.description=="function"?await r.description(m):r.description,x=typeof g=="object"&&!W.isValidElement(g)?g:{message:g};this.create({id:a,type:"error",description:b,...x})}else if(r.success!==void 0){c=!1;const g=typeof r.success=="function"?await r.success(m):r.success,b=typeof r.description=="function"?await r.description(m):r.description,x=typeof g=="object"&&!W.isValidElement(g)?g:{message:g};this.create({id:a,type:"success",description:b,...x})}}).catch(async m=>{if(u=["reject",m],r.error!==void 0){c=!1;const y=typeof r.error=="function"?await r.error(m):r.error,g=typeof r.description=="function"?await r.description(m):r.description,w=typeof y=="object"&&!W.isValidElement(y)?y:{message:y};this.create({id:a,type:"error",description:g,...w})}}).finally(()=>{c&&(this.dismiss(a),a=void 0),r.finally==null||r.finally.call(r)}),p=()=>new Promise((m,y)=>h.then(()=>u[0]==="reject"?y(u[1]):m(u[1])).catch(y));return typeof a!="string"&&typeof a!="number"?{unwrap:p}:Object.assign(a,{unwrap:p})},this.custom=(t,r)=>{const a=r?.id||Kh++;return this.create({jsx:t(a),id:a,...r}),a},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const Jt=new oC,lC=(e,t)=>{const r=t?.id||Kh++;return Jt.addToast({title:e,...t,id:r}),r},cC=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",uC=lC,dC=()=>Jt.toasts,hC=()=>Jt.getActiveToasts(),H2=Object.assign(uC,{success:Jt.success,info:Jt.info,warning:Jt.warning,error:Jt.error,custom:Jt.custom,message:Jt.message,promise:Jt.promise,dismiss:Jt.dismiss,loading:Jt.loading},{getHistory:dC,getToasts:hC});XO
vendor: 4,787 bytes, line 55
55("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;
vendor: 10,086 bytes, line 55
55left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function 
vendor: 1,090 bytes, line 55
55Wl(e){return e.label!==void 0}const fC=3,pC="24px",mC="16px",Hv=4e3,gC=356,yC=14,vC=45,bC=200;function Vn(...e){return e.filter(Boolean).join(" ")}function wC(e){const[t,r]=e.split("-"),a=[];return t&&a.push(t),r&&a.push(r),a}const _C=e=>{var t,r,a,l,c,u,h,p,m;const{invert:y,toast:g,unstyled:b,interacting:w,setHeights:x,visibleToasts:k,heights:E,index:A,toasts:M,expanded:N,removeToast:L,defaultRichColors:X,closeButton:Y,style:I,cancelButtonStyle:F,actionButtonStyle:Z,className:le="",descriptionClassName:ie="",duration:ge,position:we,gap:$e,expandByDefault:Me,classNames:z,icons:J,closeButtonAriaLabel:ae="Close toast"}=e,[Se,ye]=W.useState(null),[C,$]=W.useState(null),[G,Q]=W.useState(!1),[te,ue]=W.useState(!1),[_e,fe]=W.useState(!1),[ke,Lt]=W.useState(!1),[Ut,jt]=W.useState(!1),[ds,zt]=W.useState(0),[hs,Xn]=W.useState(0),Un=W.useRef(g.duration||ge||Hv),un=W.useRef(null),bt=W.useRef(null),en=A===0,fs=A+1<=k,ht=g.type,zn=g.dismissible!==!1,ft=g.className||"",ze=g.descriptionClassName||"",Xe=W.useMemo(()=>E.findIndex(pe=>pe.toastId===g.id)||0,[E,g.id]),dn=W.useMemo(()=>{var pe;
vendor: 4,539 bytes, line 55
55return(pe=g.closeButton)!=null?pe:Y},[g.closeButton,Y]),Zn=W.useMemo(()=>g.duration||ge||Hv,[g.duration,ge]),ti=W.useRef(0),Wn=W.useRef(0),Ro=W.useRef(0),Rr=W.useRef(null),[ps,Nt]=we.split("-"),Tn=W.useMemo(()=>E.reduce((pe,Ye,pt)=>pt>=Xe?pe:pe+Ye.height,0),[E,Xe]),kt=iC(),Dc=g.invert||y,ni=ht==="loading";Wn.current=W.useMemo(()=>Xe*$e+Tn,[Xe,Tn]),W.useEffect(()=>{Un.current=Zn},[Zn]),W.useEffect(()=>{Q(!0)},[]),W.useEffect(()=>{const pe=bt.current;if(pe){const Ye=pe.getBoundingClientRect().height;return Xn(Ye),x(pt=>[{toastId:g.id,height:Ye,position:g.position},...pt]),()=>x(pt=>pt.filter(Ot=>Ot.toastId!==g.id))}},[x,g.id]),W.useLayoutEffect(()=>{if(!G)return;const pe=bt.current,Ye=pe.style.height;pe.style.height="auto";const pt=pe.getBoundingClientRect().height;pe.style.height=Ye,Xn(pt),x(Ot=>Ot.find(Qe=>Qe.toastId===g.id)?Ot.map(Qe=>Qe.toastId===g.id?{...Qe,height:pt}:Qe):[{toastId:g.id,height:pt,position:g.position},...Ot])},[G,g.title,g.description,x,g.id,g.jsx,g.action,g.cancel]);const Pn=W.useCallback(()=>{ue(!0),zt(Wn.current),x(pe=>pe.filter(Ye=>Ye.toastId!==g.id)),setTimeout(()=>{L(g)},bC)},[g,L,x,Wn]);W.useEffect(()=>{if(g.promise&&ht==="loading"||g.duration===1/0||g.type==="loading")return;let pe;return N||w||kt?(()=>{if(Ro.current<ti.current){const Ot=new Date().getTime()-ti.current;Un.current=Un.current-Ot}Ro.current=new Date().getTime()})():Un.current!==1/0&&(ti.current=new Date().getTime(),pe=setTimeout(()=>{g.onAutoClose==null||g.onAutoClose.call(g,g),Pn()},Un.current)),()=>clearTimeout(pe)},[N,w,g,ht,kt,Pn]),W.useEffect(()=>{g.delete&&(Pn(),g.onDismiss==null||g.onDismiss.call(g,g))},[Pn,g.delete]);function Fs(){var pe;if(J?.loading){var Ye;return W.createElement("div",{className:Vn(z?.loader,g==null||(Ye=g.classNames)==null?void 0:Ye.loader,"sonner-loader"),"data-visible":ht==="loading"},J.loading)}return W.createElement(eC,{className:Vn(z?.loader,g==null||(pe=g.classNames)==null?void 0:pe.loader),visible:ht==="loading"})}const Js=g.icon||J?.[ht]||ZO(ht);var ms,Bn;return W.createElement("li",{tabIndex:0,ref:bt,className:Vn(le,ft,z?.toast,g==null||(t=g.classNames)==null?void 0:t.toast,z?.default,z?.[ht],g==null||(r=g.classNames)==null?void 0:r[ht]),"data-sonner-toast":"","data-rich-colors":(ms=g.richColors)!=null?ms:X,"data-styled":!(g.jsx||g.unstyled||b),"data-mounted":G,"data-promise":!!g.promise,"data-swiped":Ut,"data-removed":te,"data-visible":fs,"data-y-position":ps,"data-x-position":Nt,"data-index":A,"data-front":en,"data-swiping":_e,"data-dismissible":zn,"data-type":ht,"data-invert":Dc,"data-swipe-out":ke,"data-swipe-direction":C,"data-expanded":!!(N||Me&&G),"data-testid":g.testId,style:{"--index":A,"--toasts-before":A,"--z-index":M.length-A,"--offset":`${te?ds:Wn.current}px`,"--initial-height":Me?"auto":`${hs}px`,...I,...g.style},onDragEnd:()=>{fe(!1),ye(null),Rr.current=null},onPointerDown:pe=>{pe.button!==2&&(ni||!zn||(un.current=new Date,zt(Wn.current),pe.target.setPointerCapture(pe.pointerId),pe.target.tagName!=="BUTTON"&&(fe(!0),Rr.current={x:pe.clientX,y:pe.clientY})))},onPointerUp:()=>{var pe,Ye,pt;if(ke||!zn)return;Rr.current=null;const Ot=Number(((pe=bt.current)==null?void 0:pe.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Ar=Number(((Ye=bt.current)==null?void 0:Ye.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Qe=new Date().getTime()-((pt=un.current)==null?void 0:pt.getTime()),Pt=Se==="x"?Ot:Ar,gs=Math.abs(Pt)/Qe;if(Math.abs(Pt)>=vC||gs>.11){zt(Wn.current),g.onDismiss==null||g.onDismiss.call(g,g),$(Se==="x"?Ot>0?"right":"left":Ar>0?"down":"up"),Pn(),Lt(!0);return}else{var Bt,Ht;(Bt=bt.current)==null||Bt.style.setProperty("--swipe-amount-x","0px"),(Ht=bt.current)==null||Ht.style.setProperty("--swipe-amount-y","0px")}jt(!1),fe(!1),ye(null)},onPointerMove:pe=>{var Ye,pt,Ot;if(!Rr.current||!zn||((Ye=window.getSelection())==null?void 0:Ye.toString().length)>0)return;const Qe=pe.clientY-Rr.current.y,Pt=pe.clientX-Rr.current.x;var gs;const Bt=(gs=e.swipeDirections)!=null?gs:wC(we);!Se&&(Math.abs(Pt)>1||Math.abs(Qe)>1)&&ye(Math.abs(Pt)>Math.abs(Qe)?"x":"y");let Ht={x:0,y:0};const Qs=Rn=>1/(1.5+Math.abs(Rn)/20);if(Se==="y"){if(Bt.includes("top")||Bt.includes("bottom"))if(Bt.includes("top")&&Qe<0||Bt.includes("bottom")&&Qe>0)Ht.y=Qe;else{const Rn=Qe*Qs(Qe);Ht.y=Math.abs(Rn)<Math.abs(Qe)?Rn:Qe}}else if(Se==="x"&&(Bt.includes("left")||Bt.includes("right")))if(Bt.includes("left")&&Pt<0||Bt.includes("right")&&Pt>0)Ht.x=Pt;else{const Rn=Pt*Qs(Pt);Ht.x=Math.abs(Rn)<Math.abs(Pt)?Rn:Pt}(Math.abs(Ht.x)>
vendor: 6,575 bytes, line 55
550||Math.abs(Ht.y)>0)&&jt(!0),(pt=bt.current)==null||pt.style.setProperty("--swipe-amount-x",`${Ht.x}px`),(Ot=bt.current)==null||Ot.style.setProperty("--swipe-amount-y",`${Ht.y}px`)}},dn&&!g.jsx&&ht!=="loading"?W.createElement("button",{"aria-label":ae,"data-disabled":ni,"data-close-button":!0,onClick:ni||!zn?()=>{}:()=>{Pn(),g.onDismiss==null||g.onDismiss.call(g,g)},className:Vn(z?.closeButton,g==null||(a=g.classNames)==null?void 0:a.closeButton)},(Bn=J?.close)!=null?Bn:aC):null,(ht||g.icon||g.promise)&&g.icon!==null&&(J?.[ht]!==null||g.icon)?W.createElement("div",{"data-icon":"",className:Vn(z?.icon,g==null||(l=g.classNames)==null?void 0:l.icon)},g.promise||g.type==="loading"&&!g.icon?g.icon||Fs():null,g.type!=="loading"?Js:null):null,W.createElement("div",{"data-content":"",className:Vn(z?.content,g==null||(c=g.classNames)==null?void 0:c.content)},W.createElement("div",{"data-title":"",className:Vn(z?.title,g==null||(u=g.classNames)==null?void 0:u.title)},g.jsx?g.jsx:typeof g.title=="function"?g.title():g.title),g.description?W.createElement("div",{"data-description":"",className:Vn(ie,ze,z?.description,g==null||(h=g.classNames)==null?void 0:h.description)},typeof g.description=="function"?g.description():g.description):null),W.isValidElement(g.cancel)?g.cancel:g.cancel&&Wl(g.cancel)?W.createElement("button",{"data-button":!0,"data-cancel":!0,style:g.cancelButtonStyle||F,onClick:pe=>{Wl(g.cancel)&&zn&&(g.cancel.onClick==null||g.cancel.onClick.call(g.cancel,pe),Pn())},className:Vn(z?.cancelButton,g==null||(p=g.classNames)==null?void 0:p.cancelButton)},g.cancel.label):null,W.isValidElement(g.action)?g.action:g.action&&Wl(g.action)?W.createElement("button",{"data-button":!0,"data-action":!0,style:g.actionButtonStyle||Z,onClick:pe=>{Wl(g.action)&&(g.action.onClick==null||g.action.onClick.call(g.action,pe),!pe.defaultPrevented&&Pn())},className:Vn(z?.actionButton,g==null||(m=g.classNames)==null?void 0:m.actionButton)},g.action.label):null)};function Iv(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function SC(e,t){const r={};return[e,t].forEach((a,l)=>{const c=l===1,u=c?"--mobile-offset":"--offset",h=c?mC:pC;function p(m){["top","right","bottom","left"].forEach(y=>{r[`${u}-${y}`]=typeof m=="number"?`${m}px`:m})}typeof a=="number"||typeof a=="string"?p(a):typeof a=="object"?["top","right","bottom","left"].forEach(m=>{a[m]===void 0?r[`${u}-${m}`]=h:r[`${u}-${m}`]=typeof a[m]=="number"?`${a[m]}px`:a[m]}):p(h)}),r}const xC=W.forwardRef(function(t,r){const{id:a,invert:l,position:c="bottom-right",hotkey:u=["altKey","KeyT"],expand:h,closeButton:p,className:m,offset:y,mobileOffset:g,theme:b="light",richColors:w,duration:x,style:k,visibleToasts:E=fC,toastOptions:A,dir:M=Iv(),gap:N=yC,icons:L,containerAriaLabel:X="Notifications"}=t,[Y,I]=W.useState([]),F=W.useMemo(()=>a?Y.filter(G=>G.toasterId===a):Y.filter(G=>!G.toasterId),[Y,a]),Z=W.useMemo(()=>Array.from(new Set([c].concat(F.filter(G=>G.position).map(G=>G.position)))),[F,c]),[le,ie]=W.useState([]),[ge,we]=W.useState(!1),[$e,Me]=W.useState(!1),[z,J]=W.useState(b!=="system"?b:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),ae=W.useRef(null),Se=u.join("+").replace(/Key/g,"").replace(/Digit/g,""),ye=W.useRef(null),C=W.useRef(!1),$=W.useCallback(G=>{I(Q=>{var te;return(te=Q.find(ue=>ue.id===G.id))!=null&&te.delete||Jt.dismiss(G.id),Q.filter(({id:ue})=>ue!==G.id)})},[]);return W.useEffect(()=>Jt.subscribe(G=>{if(G.dismiss){requestAnimationFrame(()=>{I(Q=>Q.map(te=>te.id===G.id?{...te,delete:!0}:te))});return}setTimeout(()=>{LT.flushSync(()=>{I(Q=>{const te=Q.findIndex(ue=>ue.id===G.id);return te!==-1?[...Q.slice(0,te),{...Q[te],...G},...Q.slice(te+1)]:[G,...Q]})})})}),[Y]),W.useEffect(()=>{if(b!=="system"){J(b);return}if(b==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?J("dark"):J("light")),typeof window>"u")return;const G=window.matchMedia("(prefers-color-scheme: dark)");try{G.addEventListener("change",({matches:Q})=>{J(Q?"dark":"light")})}catch{G.addListener(({matches:te})=>{try{J(te?"dark":"light")}catch(ue){console.error(ue)}})}},[b]),W.useEffect(()=>{Y.length<=1&&we(!1)},[Y]),W.useEffect(()=>{const G=Q=>{var te;if(u.every(fe=>Q[fe]||Q.code===fe)){var _e;we(!0),(_e=ae.current)==null||_e.focus()}Q.code==="Escape"&&(document.activeElement===ae.current||(te=ae.current)!=null&&te.contains(document.activeElement))&&we(!1)};return document.addEventListener("keydown",G),()=>document.removeEventListener("keydown",G)},[u]),W.useEffect(()=>{if(ae.current)return()=>{ye.current&&(ye.current.focus({preventScroll:!0}),ye.current=null,C.current=!1)}},[ae.current]),W.createElement("section",{ref:r,"aria-label":`${X} ${Se}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},Z.map((G,Q)=>{var te;const[ue,_e]=G.split("-");return F.length?W.createElement("ol",{key:G,dir:M==="auto"?Iv():M,tabIndex:-1,ref:ae,className:m,"data-sonner-toaster":!0,"data-sonner-theme":z,"data-y-position":ue,"data-x-position":_e,style:{"--front-toast-height":`${((te=le[0])==null?void 0:te.height)||0}px`,"--width":`${gC}px`,"--gap":`${N}px`,...k,...SC(y,g)},onBlur:fe=>{C.current&&!fe.currentTarget.contains(fe.relatedTarget)&&(C.current=!1,ye.current&&(ye.current.focus({preventScroll:!0}),ye.current=null))},onFocus:fe=>{fe.target instanceof HTMLElement&&fe.target.dataset.dismissible==="false"||C.current||(C.current=!0,ye.current=fe.relatedTarget)},onMouseEnter:()=>we(!0),onMouseMove:()=>we(!0),onMouseLeave:()=>{$e||we(!1)},onDragEnd:()=>we(!1),onPointerDown:fe=>{fe.target instanceof HTMLElement&&fe.target.dataset.dismissible==="false"||Me(!0)},onPointerUp:()=>Me(!1)},F.filter(fe=>!fe.position&&Q===0||fe.position===G).map((fe,ke)=>{var Lt,Ut;return W.createElement(_C,{key:fe.id,icons:L,index:ke,toast:fe,defaultRichColors:w,duration:(Lt=A?.duration)!=null?Lt:x,className:A?.className,descriptionClassName:A?.descriptionClassName,invert:l,visibleToasts:E,closeButton:(Ut=A?.closeButton)!=null?Ut:p,interacting:$e,position:G,style:A?.style,unstyled:A?.unstyled,classNames:A?.classNames,cancelButtonStyle:A?.cancelButtonStyle,actionButtonStyle:A?.actionButtonStyle,closeButtonAriaLabel:A?.closeButtonAriaLabel,removeToast:$,toasts:F.filter(jt=>jt.position==fe.position),heights:le.filter(jt=>jt.position==fe.position),setHeights:ie,expandByDefault:h,gap:N,exp
55anded:ge,swipeDirections:t.swipeDirections})})):null}))}),EC=({...e})=>_.jsx(xC,{className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...e}),jb=ee.createContext(null);function TC({children:e}){const[t,r]=ee.useState(null),[a,l]=ee.useState(!1),[c,u]=ee.useState(!0);ee.useEffect(()=>{const{data:{subscription:y}}=Dn.auth.onAuthStateChange((g,b)=>{r(b),b?.user?setTimeout(()=>h(b.user.id),0):l(!1)});return Dn.auth.getSession().then(({data:{session:g}})=>{r(g),g?.user?h(g.user.id).then(()=>u(!1)):u(!1)}),()=>y.unsubscribe()},[]);async function h(y){const{data:g}=await Dn.from("user_roles").select("role").eq("user_id",y).eq("role","admin").maybeSingle();l(!!g)}const p=async(y,g)=>{const{error:b}=await Dn.auth.signInWithPassword({email:y,password:g});return{error:b?.message??null}},m=async()=>{await Dn.auth.signOut()};return _.jsx(jb.Provider,{value:{session:t,user:t?.user??null,isAdmin:a,loading:c,signIn:p,signOut:m},children:e})}function I2(){const e=ee.useContext(jb);if(!e)throw new Error("useAuth must be used within AuthProvider");return e}const RC="/assets/styles-C1VgNMLY.css";function AC(){return _.jsx("div",{className:"flex min-h-screen items-center justify-center bg-background px-4",children:_.jsxs("div",{className:"max-w-md text-center",children:[_.jsx("h1",{className:"text-7xl font-bold text-foreground",children:"404"}),_.jsx("h2",{className:"mt-4 text-xl font-semibold text-foreground",children:"Stránka nenalezena"}),_.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:"Stránka, kterou hledáš, neexistuje nebo byla přesunuta."}),_.jsx("div",{className:"mt-6",children:_.jsx(je,{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:"Zpět domů"})})]})})}function kC({error:e,reset:t}){console.error(e);const r=At();return _.jsx("div",{className:"flex min-h-screen items-center justify-center bg-background px-4",children:_.jsxs("div",{className:"max-w-md text-center",children:[_.jsx("h1",{className:"text-xl font-semibold tracking-tight text-foreground",children:"Stránku se nepodařilo načíst"}),_.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:"Něco se pokazilo. Zkus to znovu nebo se vrať na úvod."}),_.jsxs("div",{className:"mt-6 flex flex-wrap justify-center gap-2",children:[_.jsx("button",{onClick:()=>{r.invalidate(),t()},className:"inline-flex items-center justify-center rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground transition-colors hover:bg-primary/90",children:"Zkusit znovu"}),_.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:"Zpět domů"})]})]})})}const Ln=YT()({head:()=>({meta:[{charSet:"utf-8"},{name:"viewport",content:"width=device-width, initial-scale=1"},{title:"Kobra Kladno — Karate, Kickbox, Jiu-Jitsu pro děti i dospělé"},{name:"description",content:"Akademie bojových sportů Kobra Kladno. Karate, kickbox a sebeobrana SDS Jiu-Jitsu pro děti od 6 let, mládež i dospělé. Tradice od 1985, hala BIOS."},{name:"author",content:"Kobra Kladno, z.s."},{property:"og:title",content:"Kobra Kladno — Akademie bojových sportů"},{property:"og:description",content:"Karate, kickbox, sebeobrana a sparing pro děti od 6 let, mládež i dospělé. Hala BIOS Kladno."},{property:"og:type",content:"website"},{property:"og:locale",content:"cs_CZ"},{name:"twitter:card",content:"summary_large_image"}],links:[{rel:"stylesheet",href:RC}]}),shellComponent:OC,component:CC,notFoundComponent:AC,errorComponent:kC});function OC({children:e}){return _.jsxs("html",{lang:"cs",children:[_.jsx("head",{children:_.jsx(pR,{})}
55),_.jsxs("body",{children:[e,_.jsx(mR,{})]})]})}function CC(){const{queryClient:e}=Ln.useRouteContext();return _.jsx(QO,{client:e,children:_.jsxs(TC,{children:[_.jsx(W0,{}),_.jsx(EC,{richColors:!0,position:"top-right"})]})})}const jC="modulepreload",NC=function(e){return"/"+e},qv={},En=function(t,r,a){let l=Promise.resolve();if(r&&r.length>0){let p=function(m){return Promise.all(m.map(y=>Promise.resolve(y).then(g=>({status:"fulfilled",value:g}),g=>({status:"rejected",reason:g}))))};document.getElementsByTagName("link");const u=document.querySelector("meta[property=csp-nonce]"),h=u?.nonce||u?.getAttribute("nonce");l=p(r.map(m=>{if(m=NC(m),m in qv)return;qv[m]=!0;const y=m.endsWith(".css"),g=y?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${m}"]${g}`))return;const b=document.createElement("link");if(b.rel=y?"stylesheet":jC,y||(b.as="script"),b.crossOrigin="",b.href=m,h&&b.setAttribute("nonce",h),document.head.appendChild(b),y)return new Promise((w,x)=>{b.addEventListener("load",w),b.addEventListener("error",()=>x(new Error(`Unable to preload CSS for ${m}`)))})}))}function c(u){const h=new Event("vite:preloadError",{cancelable:!0});if(h.payload=u,window.dispatchEvent(h),!h.defaultPrevented)throw u}return l.then(u=>{for(const h of u||[])h.status==="rejected"&&c(h.reason);return t().catch(c)})},MC=()=>En(()=>import("./treninky-B_NwlYMj.js"),__vite__mapDeps([0,1])),DC=Wt("/treninky")({head:()=>({meta:[{title:"Tréninky a rozvrh — Kobra Kladno"},{name:"description",content:"Aktuální rozvrh tréninků akademie Kobra Kladno. Karate, kickbox, jiu-jitsu a sparing."}]}),component:xn(MC,"component")}),LC=()=>En(()=>import("./sporty-bt1CaO_1.js"),__vite__mapDeps([2,1])),UC=Wt("/sporty")({head:()=>({meta:[{title:"Sporty — Kobra Kladno"},{name:"description",content:"Karate, kickbox, sebeobrana SDS Jiu-Jitsu a sparing pro děti od 6 let, mládež i dospělé."}]}),component:xn(LC,"component")}),zC=()=>En(()=>import("./login-BC5UZPD2.js"),[]),PC=Wt("/login")({head:()=>({meta:[{title:"Přihlášení — Kobra Kladno"},{name:"robots",content:"noindex,nofollow"}]}),component:xn(zC,"component")}),BC=Wt("/kontakt")({beforeLoad:()=>{throw Qh({to:"/",hash:"kontakt"})}}),HC=()=>En(()=>import("./akademie-BQ8AurlJ.js"),__vite__mapDeps([3,1])),IC=Wt("/akademie")({head:()=>({meta:[{title:"O akademii — Kobra Kladno"},{name:"description",content:"Akademie Kobra Kladno — tradice od roku 1985. Profesionální trenéři, vlastní dojo a komunita lidí, kteří berou bojová umění vážně."}]}),component:xn(HC,"component")}),qC=()=>En(()=>import("./_authenticated-CmDkzU0r.js"),__vite__mapDeps([4,5])),$C=Wt("/_authenticated")({head:()=>({meta:[{name:"robots",content:"noindex,nofollow"}]}),component:xn(qC,"component")});const Nb=(...e)=>e.filter((t,r,a)=>!!t&&t.trim()!==""&&a.indexOf(t)===r).join(" ").trim();const KC=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const VC=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,r,a)=>a?a.toUpperCase():r.toLowerCase());const $v=e=>{const t=VC(e);return t.charAt(0).toUpperCase()+t.slice(1)};var GC={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 YC=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};const FC=ee.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:a,className:l="",children:c,iconNode:u,...h},p)=>ee.createElement("svg",{ref:p,...GC,width:t,height:t,stroke:e,strokeWidth:a?Number(r)*24/Number(t):r,className:Nb("lucide",l),...!c&&!YC(h)&&{"aria-hidden":"true"},...h},[...u.map(([m,y])=>ee.createElement(m,y)),...Array.isArray(c)?c:[c]]));const Qn=(e,t)=>{const r=ee.forwardRef(({className:a,...l},c)=>ee.createElement(FC,{ref:c,iconNode:t,className:Nb(`lucide-${KC($v(e))}`,`lucide-${e}`,a),...l}));return r.displayName=$v(e),r};const JC=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],to=Qn("arrow-right",JC);const QC=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]],XC=Qn("calendar",QC);const ZC=[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]],WC=Qn("credit-card",ZC);const ej=[["path",{d:"M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z",key:"1jg4f8"}]],Vh=Qn("facebook",ej);const tj=[["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"}]],Gh=Qn("instagram",tj);const nj=[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]],uf=Qn("mail",nj);const rj=[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}
55]],Mb=Qn("map-pin",rj);const sj=[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]],aj=Qn("menu",sj);const ij=[["path",{d:"M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384",key:"9njp5v"}]],wc=Qn("phone",ij);const oj=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],lj=Qn("x",oj),cj="/__l5e/assets-v1/18534fb3-6cc9-485a-bc38-53706e79c623/kobra-logo.png",uj={url:cj};function dj(){setTimeout(()=>{const e=document.getElementById("kontakt");if(e){const t=e.getBoundingClientRect(),r=window.scrollY+t.top-80;window.scrollTo({top:Math.max(r,0),behavior:"smooth"})}},50)}function hj(){const[e,t]=ee.useState(!1),r=sf(),a=l=>{l.preventDefault(),r({to:"/",hash:"kontakt"}).then(()=>dj())};return _.jsxs("header",{className:"fixed top-0 left-0 right-0 z-50 bg-background/95 backdrop-blur-md border-b border-border",children:[_.jsx("div",{className:"hidden md:block bg-foreground text-background",children:_.jsxs("div",{className:"mx-auto max-w-7xl px-6 h-9 flex items-center justify-between text-xs",children:[_.jsxs("div",{className:"flex items-center gap-5",children:[_.jsxs("a",{href:"mailto:[email protected]",className:"flex items-center gap-2 opacity-90 hover:opacity-100 transition-opacity",children:[_.jsx(uf,{size:12})," [email protected]"]}),_.jsxs("a",{href:"tel:+420603847060",className:"flex items-center gap-2 opacity-90 hover:opacity-100 transition-opacity",children:[_.jsx(wc,{size:12})," +420 603 847 060"]}),_.jsx("span",{className:"opacity-70",children:"Po–Pá · Sportovní hala BIOS, Kladno"})]}),_.jsxs("div",{className:"flex items-center gap-4",children:[_.jsxs("a",{href:"https://facebook.com/kobrakladno",target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-1.5 opacity-90 hover:opacity-100 transition-opacity",children:[_.jsx(Vh,{size:14})," ",_.jsx("span",{children:"Facebook"})]}),_.jsxs("a",{href:"https://instagram.com/kobrakladno",target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-1.5 opacity-90 hover:opacity-100 transition-opacity",children:[_.jsx(Gh,{size:14})," ",_.jsx("span",{children:"Instagram"})]})]})]})}),_.jsxs("div",{className:"mx-auto max-w-7xl px-6 h-20 flex items-center justify-between",children:[_.jsxs(je,{to:"/",className:"flex items-center gap-3 group",children:[_.jsx("img",{src:uj.url,alt:"Kobra Kladno",className:"h-12 w-auto group-hover:scale-105 transition-transform"}),_.jsxs("div",{className:"leading-none hidden sm:block",children:[_.jsx("div",{className:"font-display text-2xl tracking-wider text-foreground",children:"KOBRA KLADNO"}),_.jsx("div",{className:"text-[10px] tracking-[0.3em] text-muted-foreground uppercase mt-1",children:"Akademie · od 1985"})]})]}),_.jsxs("nav",{className:"hidden md:flex items-center gap-1",children:[_.jsx(je,{to:"/",className:"px-4 py-2 text-sm font-medium text-muted-foreground hover:text-foreground transition-colors",activeProps:{className:"!text-foreground"},activeOptions:{exact:!0},children:"Úvod"}),_.jsx(je,{to:"/aktuality",className:"px-4 py-2 text-sm font-medium text-muted-foreground hover:text-foreground transition-colors",activeProps:{className:"!text-foreground"},children:"Aktuality"}),_.jsxs("div",{className:"relative group",children:[_.jsx(je,{to:"/treninky",className:"px-4 py-2 text-sm font-medium text-muted-foreground hover:text-foreground transition-colors inline-block",activeProps:{className:"!text-foreground"},children:"Tréninky"}),_.jsx("div",{className:"absolute left-0 top-full pt-1 hidden group-hover:block z-50",children:_.jsxs("div",{className:"bg-background border border-border rounded-md shadow-[var(--shadow-soft)] min-w-[200px] py-2",children:[_.jsx(je,{to:"/treninky",className:"block px-4 py-2 text-sm hover:bg-muted font-medium",children:"Rozvrh"}),_.jsx("div",{className:"my-1 h-px bg-border"}),_.jsx(je,{to:"/treninky",hash:"karate",className:"block px-4 py-2 text-sm hover:bg-muted",children:"Karate"}),_.jsx(je,{to:"/treninky",hash:"kickbox",className:"block px-4 py-2 text-sm hover:bg-muted",children:"Kickbox"}),_.jsx(je,{to:"/treninky",hash:"jiujitsu",className:"block px-4 py-2 text-sm hover:bg-muted",children:"Jiu-Jitsu"}),_.jsx(je,{to:"/treninky",hash:"sparing",className:"block px-4 py-2 text-sm hover:bg-muted",children:"Sparing"})]})})]}),_.jsx(je,{to:"/akademie",className:"px-4 py-2 text-sm font-medium text-muted-foreground hover:text-foreground transition-colors",activeProps:{className:"!text-foreground"},children:"O nás"}),_.jsx(je,{to:"/",onClick:a,className:"px-4 py-2 text-sm font-medium text-muted-foreground hover:text-foreground transition-colors",children:"Kontakt"}),_.jsx(je,{to:"/",onClick:a,className:"ml-3 inline-flex items-center px-5 py-2.5 bg-primary text-primary-foreground font-display tracking-widest text-sm rounded-md hover:bg-accent transition-colors shadow-[var(--shadow-brand)]",children:"Chci začít"})]}),_.jsx("button",{onClick:()=>t(!e),className:"md:hidden text-foreground","aria-label":"menu",children:e?_.jsx(lj,{size:28}):_.jsx(aj,{size:28})})]}),e&&_.jsx("div",{className:"md:hidden border-t border-border bg-card",children:_.jsxs("nav",{className:"px-6 py-4 flex flex-col gap-1",children:[_.jsx(je,{to:"/",onClick:()=>t(!1),className:"py-3 font-display text-xl tracking-wider border-b border-border",children:"Úvod"}),_.jsx(je,{to:"/aktuality",onClick:()=>t(!1),className:"py-3 font-display text-xl tracking-wider border-b border-border",children:"Aktuality"}),_.jsx(je,{to:"/treninky",onClick:()=>t(!1),className:"py-3 font-display text-xl tracking-wider border-b border-border",children:"Tréninky"}),_.jsx(je,{to:"/akademie",onClick:()=>t(!1),className:"py-3 font-display text-xl tracking-wider border-b border-border",children:"O nás"}),_.jsx(je,{to:"/",onClick:l=>{t(!1),a(l)},className:"py-3 font-display text-xl tracking-wider border-b border-border",children:"Kontakt"}),_.jsx(je,{to:"/",onClick:l=>{t(!1),a(l)},className:"mt-3 inline-flex items-center justify-center px-5 py-3 bg-primary text-primary-foreground font-display tracking-widest rounded-md",children:"Chci začít"}),_.jsxs("div",{className:"flex gap-4 pt-4 text-muted-foreground",children:[_.jsx("a",{href:"https://facebook.com/kobrakladno","aria-label":"Facebook",children:_.jsx(Vh,{size:20})}),_.jsx("a",{href:"https://instagram.com/kobrakladno","aria-label":"Instagram",children:_.jsx(Gh,{size:20})}),_.jsx("a",{href:"tel:+420603847060","aria-label":"Telefon",children:_.jsx(wc,{size:20})})]})]})})]})}const fj="/assets/kladno-mk-DYxbCiIF.jpg",pj="/assets/stredocesky-ZOUUSvBb.jpg",mj="/assets/NSA-BTvPzFca.png",gj="/assets/cus-C3ChMmCG.png",yj="/__l5e/assets-v1/b90c9bdc-3011-4e7e-934f-a7f5edb9f81b/czech-karate.jpg",vj={url:yj},bj="/__l5e/assets-v1/8c43da9d-25eb-4984-897b-0570fe1c10ec/csbs.png",wj={url:bj},_j="/__l5e/assets-v1/299fc858-ea29-44f3-9bfb-d8340fe0cef2/cak-wako.webp",Sj={url:_j},xj=[{name:"Statutární město Kladno",href:"https://www.mestokladno.cz/",
55src:fj},{name:"ČSKe — Český svaz karate",href:"https://www.czechkarate.cz/",src:vj.url},{name:"Česká asociace kickboxu (WAKO)",href:"https://www.czechkickbox.cz/",src:Sj.url},{name:"ČSBS — Český svaz bojových sportů",href:"https://www.csbs.cz/",src:wj.url},{name:"Národní sportovní agentura",href:"https://nsa.gov.cz/",src:mj},{name:"Česká unie sportu",href:"https://www.cuscz.cz/",src:gj},{name:"Středočeský kraj",href:"https://stredoceskykraj.cz/",src:pj}];function Ej(){return _.jsxs("footer",{className:"bg-foreground text-background",children:[_.jsx("div",{className:"bg-background text-foreground border-b border-border",children:_.jsxs("div",{className:"mx-auto max-w-7xl px-6 py-10",children:[_.jsx("div",{className:"text-xs tracking-[0.4em] uppercase text-muted-foreground mb-6 text-center",children:"Partneři & podpora"}),_.jsx("div",{className:"flex flex-wrap items-center justify-center gap-4",children:xj.map(e=>_.jsx("a",{href:e.href,target:"_blank",rel:"noreferrer",title:e.name,className:"bg-card border border-border rounded-md p-3 flex items-center justify-center h-20 w-36 hover:border-primary transition-colors",children:e.src?_.jsx("img",{src:e.src,alt:e.name,loading:"lazy",className:"max-h-full max-w-full object-contain"}):_.jsx("span",{className:"font-display text-xl tracking-wider text-foreground",children:e.label})},e.name))})]})}),_.jsx("div",{className:"border-b border-background/10",children:_.jsxs("div",{className:"mx-auto max-w-7xl px-6 py-10 text-center",children:[_.jsx("h3",{className:"font-display text-2xl md:text-3xl tracking-wider mb-5",children:"Sledujte nás"}),_.jsxs("div",{className:"flex flex-wrap justify-center gap-3",children:[_.jsxs("a",{href:"https://facebook.com/kobrakladno",target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-3 px-5 py-3 border border-background/20 rounded-md hover:bg-primary hover:border-primary transition-colors",children:[_.jsx(Vh,{size:18})," ",_.jsx("span",{className:"font-medium",children:"Facebook"})]}),_.jsxs("a",{href:"https://instagram.com/kobrakladno",target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-3 px-5 py-3 border border-background/20 rounded-md hover:bg-primary hover:border-primary transition-colors",children:[_.jsx(Gh,{size:18})," ",_.jsx("span",{className:"font-medium",children:"Instagram"})]})]})]})}),_.jsxs("div",{className:"mx-auto max-w-7xl px-6 py-14 grid gap-10 md:grid-cols-4",children:[_.jsxs("div",{className:"md:col-span-2",children:[_.jsx("div",{className:"font-display text-3xl tracking-wider",children:"KOBRA KLADNO"}),_.jsx("p",{className:"mt-2 text-xs tracking-[0.3em] uppercase text-primary",children:"Akademie bojových sportů od 1985"}),_.jsx("p",{className:"mt-5 text-sm text-background/70 max-w-md leading-relaxed",children:"Karate, kickbox a Jiu-Jitsu pro děti od 6 let, mládež i dospělé."})]}),_.jsxs("div",{children:[_.jsx("h4",{className:"font-display text-lg tracking-wider mb-4",children:"Stránky"}),_.jsxs("ul",{className:"space-y-2 text-sm text-background/70",children:[_.jsx("li",{children:_.jsx(je,{to:"/",className:"hover:text-background",children:"Úvod"})}),_.jsx("li",{children:_.jsx(je,{to:"/aktuality",className:"hover:text-background",children:"Aktuality"})}),_.jsx("li",{children:_.jsx(je,{to:"/treninky",className:"hover:text-background",children:"Tréninky"})}),_.jsx("li",{children:_.jsx(je,{to:"/akademie",className:"hover:text-background",children:"O akademii"})}),_.jsx("li",{children:_.jsx(je,{to:"/",hash:"kontakt",className:"hover:text-background",children:"Kontakt"})})]})]}),_.jsxs("div",{children:[_.jsx("h4",{className:"font-display text-lg tracking-wider mb-4",children:"Kontakt"}),_.jsxs("ul",{className:"space-y-3 text-sm text-background/70",children:[_.jsxs("li",{className:"flex items-start gap-2",children:[_.jsx(Mb,{size:16,className:"mt-0.5 text-primary shrink-0"})," Hokejových legend 3368, Kladno"]}),_.jsxs("li",{className:"flex items-center gap-2",children:[_.jsx(wc,{size:16,className:"text-primary"})," ",_.jsx("a",{href:"tel:+420603847060",className:"hover:text-background",children:"+420 603 847 060"})]}),_.jsxs("li",{className:"flex items-center gap-2",children:[_.jsx(uf,{size:16,className:"text-primary"})," ",_.jsx("a",{href:"mailto:[email protected]",className:"hover:text-background break-all",children:"[email protected]"})]})]})]})]}),_.jsx("div",{className:"border-t border-background/10",children:_.jsxs("div",{className:"mx-auto max-w-7xl px-6 py-5 text-xs text-background/50 text-center",children:["© ",new Date().getFullYear()," Kobra Kladno, z.s. · IČO 708 57 865"]})})]})}const gh="kobra-cookies-consent-v1";function Tj(){const[e,t]=ee.useState(!1);ee.useEffect(()=>{if(!(typeof window>"u"))try{localStorage.getItem(gh)||t(!0)}catch{}},[]);const r=()=>{try{localStorage.setItem(gh,"accepted")}catch{}t(!1)},a=()=>{try{localStorage.setItem(gh,"rejected")}catch{}t(!1)};return e?_.jsx("div",{className:"fixed inset-x-3 bottom-3 z-[60] md:inset-x-auto md:right-6 md:left-6 md:bottom-6",children:_.jsxs("div",{className:"mx-auto max-w-3xl bg-foreground text-background rounded-xl shadow-[var(--shadow-soft)] p-5 md:p-6 flex flex-col md:flex-row md:items-center gap-4",children:[_.jsxs("div",{className:"flex-1 text-sm leading-relaxed",children:[_.jsx("div",{className:"font-display text-lg tracking-wider mb-1",children:"Cookies"}),_.jsx("p",{className:"text-background/75",children:"Pro správný chod webu používáme nezbytné cookies. Pro vylepÅ¡ení obsahu můžeme dále využívat analytické cookies — ty si můžeÅ¡ odmítnout."})]}),_.jsxs("div",{className:"flex gap-2 shrink-0",children:[_.jsx("button",{onClick:a,className:"px-4 py-2.5 text-sm font-medium border border-background/30 rounded-md hover:bg-background/10 transition-colors",children:"Odmítnout"}),_.jsx("button",{onClick:r,className:"px-5 py-2.5 text-sm font-medium bg-primary text-primary-foreground rounded-md hover:bg-accent transition-colors",children:"Přijmout vÅ¡e"})]})]})}):null}function Rj({children:e}){return _.jsxs("div",{className:"min-h-screen flex flex-col",children:[_.jsx(hj,{}),_.jsx("main",{className:"flex-1 pt-20",children:e}),_.jsx(Ej,{}),_.jsx(Tj,{})]})}const Aj=["Neděle","Pondělí","Úterý","Středa","Čtvrtek","Pátek","Sobota"],kj=["Pondělí","Úterý","Středa","Čtvrtek","Pátek"],Oj=["Karate","Kickbox","Jiu-Jitsu","Sparing"],Cj={karate:"Karate",kickbox:"Kickbox",jiujitsu:"Jiu-Jitsu","jiu-jitsu":"Jiu-Jitsu",sparing:"Sparing",sparring:"Sparing",free:"Free Training","free-training":"Free Training","free training":"Free Training"};function Kv(e){return parseInt(e.slice(0,2),10)}function jj(e){return e.map(t=>{const r=Cj[t.sport.toLowerCase()]??t.sport;return{day:Aj[t.day]??"",startHour:Kv(t.time_from),endHour:Kv(t.time_to),sport:r,group:t.age_group||"VÅ¡ichni"}}
55).filter(t=>t.day)}const yh={Karate:{bg:"#8898c0",text:"#0e1828",dot:"#8898c0"},Kickbox:{bg:"#c08870",text:"#280e04",dot:"#c08870"},"Jiu-Jitsu":{bg:"#78a080",text:"#0e2016",dot:"#78a080"},Sparing:{bg:"#b0a070",text:"#201604",dot:"#b0a070"},"Free Training":{bg:"#c4c4c4",text:"#1a1a1a",dot:"#c4c4c4"}};function Nj(){const[e,t]=ee.useState(null),[r,a]=ee.useState([]);ee.useEffect(()=>{let c=!1;const u=async(p=0)=>{const{data:m,error:y}=await Dn.from("schedule").select("*").order("day").order("time_from");if(!c){if(y){console.warn("[schedule] load failed",y.message),p<2&&setTimeout(()=>{c||u(p+1)},800*(p+1));return}a(jj(m??[]))}};u();const h=Dn.channel("schedule-public").on("postgres_changes",{event:"*",schema:"public",table:"schedule"},()=>u()).subscribe();return()=>{c=!0,Dn.removeChannel(h)}},[]);const l=ee.useMemo(()=>{if(r.length===0)return[];const c=Math.min(...r.map(p=>p.startHour)),u=Math.max(...r.map(p=>p.endHour)),h=[];for(let p=c;p<u;p++)h.push(p);return h},[r]);return _.jsxs("div",{children:[_.jsxs("div",{className:"mb-5 flex flex-col md:flex-row md:items-center md:gap-3",children:[_.jsx("div",{className:"text-[10px] md:text-[11px] tracking-[0.3em] uppercase text-muted-foreground mb-2 md:mb-0 md:mr-2",children:"Filtr"}),_.jsxs("div",{className:"flex flex-wrap gap-1.5",children:[_.jsx("button",{onClick:()=>t(null),className:`px-2.5 py-1 text-xs font-medium rounded-full border transition-colors ${e===null?"bg-foreground text-background border-foreground":"bg-card text-muted-foreground border-border hover:text-foreground"}`,children:"Vše"}),Oj.map(c=>{const u=e===c,h=yh[c];return _.jsxs("button",{onClick:()=>t(u?null:c),style:u?{backgroundColor:h.bg,color:h.text,borderColor:h.bg}:void 0,className:`px-2.5 py-1 text-xs font-medium rounded-full border transition-colors inline-flex items-center gap-1.5 ${u?"":"bg-card text-muted-foreground border-border hover:text-foreground"}`,children:[_.jsx("span",{className:"w-1.5 h-1.5 rounded-full",style:{backgroundColor:h.dot}}),c]},c)})]})]}),r.length===0?_.jsx("p",{className:"text-sm text-muted-foreground py-8 text-center",children:"Rozvrh zatím není k dispozici."}):_.jsx("div",{className:"overflow-x-auto -mx-4 px-4 md:mx-0 md:px-0",children:_.jsxs("table",{className:"w-full border-collapse min-w-[560px] table-fixed",children:[_.jsxs("colgroup",{children:[_.jsx("col",{className:"w-20 md:w-24"}),l.map(c=>_.jsx("col",{style:{width:`calc((100% - 6rem) / ${l.length})`}},c))]}),_.jsx("thead",{children:_.jsxs("tr",{children:[_.jsx("th",{className:"text-left p-2 text-[10px] tracking-[0.25em] uppercase text-foreground",children:"Den"}),l.map(c=>_.jsxs("th",{className:"text-left p-2 text-[10px] tracking-[0.25em] uppercase text-foreground whitespace-nowrap",children:[String(c).padStart(2,"0"),"–",String(c+1).padStart(2,"0")]},c))]})}),_.jsx("tbody",{children:kj.map(c=>{const u=r.filter(y=>y.day===c);if(u.length===0)return null;const h=[];let p=l[0];const m=l[l.length-1]+1;for(;p<m;){const y=u.find(g=>g.startHour===p);if(y){const g=y.endHour-y.startHour,b=yh[y.sport]??yh.Karate,w=e!==null&&e!==y.sport;h.push(_.jsx("td",{colSpan:g,className:"p-1 align-top",children:_.jsxs("div",{style:{backgroundColor:b.bg,color:b.text},className:`rounded-md px-2 py-1.5 min-h-[58px] flex flex-col justify-center transition-opacity ${w?"opacity-25":"opacity-100"}`,children:[_.jsx("div",{className:"font-display tracking-wider text-xs md:text-sm leading-tight",children:y.sport}),_.jsx("div",{className:"text-[10px] opacity-80 leading-tight mt-0.5",children:y.group})]})},p)),p+=g}else h.push(_.jsx("td",{className:"p-1 align-top"},p)),p+=1}return _.jsxs("tr",{className:"border-t border-border",children:[_.jsx("td",{className:"p-2 align-top font-display text-xs md:text-sm text-foreground whitespace-nowrap",children:c}),h]},c)})})]})})]})}function Mj(e){return e.cover_url??null}function Dj(e){const t=["ledna","února","března","dubna","května","června","července","srpna","září","října","listopadu","prosince"],r=new Date(e);return isNaN(r.getTime())?e:`${r.getDate()}. ${t[r.getMonth()]} ${r.getFullYear()}`}function q2(e){return e.split(/\n\s*\n/).map(t=>
55t.trim()).filter(Boolean)}const Lj="/__l5e/assets-v1/8d5b0229-5480-4663-be87-ef5508bdc85c/hero-hala.webp",Uj={url:Lj},zj="/__l5e/assets-v1/b460a01e-8c72-40f5-843d-429382061dee/karate.webp",Pj={url:zj},Bj="/__l5e/assets-v1/977e9fe8-2d29-450d-9576-36b52e32108a/kickbox.webp",Hj={url:Bj},Ij="/__l5e/assets-v1/2bb69961-495c-4fcb-9397-ca8920943af2/jiu-jitsu.webp",qj={url:Ij},$j="/__l5e/assets-v1/0bee5c28-4ea3-4d5a-b958-24ca6106e454/sparing.webp",Kj={url:$j},Vj=Uj.url,Gj=Pj.url,Yj=Hj.url,Fj=qj.url,Jj=Kj.url,Qj=Wt("/")({head:()=>({meta:[{title:"Kobra Kladno — Karate, Kickbox, Jiu-Jitsu pro děti i dospělé"},{name:"description",content:"Akademie bojových sportů v Kladně. Karate, kickbox a sebeobrana SDS Jiu-Jitsu pro děti od 6 let, mládež i dospělé. Přijímáme nové zájemce celoročně."},{property:"og:title",content:"Kobra Kladno — bojové sporty pro celou rodinu"},{property:"og:description",content:"Karate, kickbox a jiu-jitsu pro děti od 6 let, mládež i dospělé. Tradice od roku 1985."}]}),component:Wj}),Xj=[{slug:"karate",name:"Karate",desc:"Rozvoj disciplíny, respektu a obratnosti pro děti od 6 let i dospělé.",days:"Po, St",img:Gj,accent:"bg-sport-karate/10 text-sport-karate border-sport-karate/30"},{slug:"kickbox",name:"Kickbox",desc:"Dynamický trénink a rozvoj kondice pro děti od 6 let i dospělé.",days:"Út, Čt",img:Yj,accent:"bg-sport-kickbox/10 text-sport-kickbox border-sport-kickbox/30"},{slug:"jiujitsu",name:"Jiu-Jitsu (SDS)",desc:"Všeobecný rozvoj a reálná sebeobrana pro děti od 6 let i dospělé.",days:"Po, St",img:Fj,accent:"bg-sport-jiujitsu/10 text-sport-jiujitsu border-sport-jiujitsu/30"},{slug:"sparing",name:"Sparing",desc:"Zápasová příprava a rozvoj kondice pro pokročilé cvičence z našich oborů.",days:"Pá",img:Jj,accent:"bg-sport-sparing/10 text-sport-sparing border-sport-sparing/30"}],Zj=[{title:"Od 6 let po dospělé",desc:"Tři různé sporty, skupiny podle věku i pokročilosti. Podpora individuálního rozvoje."},{title:"Tradice přes generace",desc:"Spousta rodičů u nás cvičila jako děti — a teď přivedli vlastní. Fungujeme od roku 1985 a tohle nás těší nejvíc."},{title:"Sebeobrana, která funguje",desc:"SDS Jiu-Jitsu je systém vyvinutý pro reálné situace. Jednoduchý k naučení, účinný v praxi."},{title:"Zkušení trenéři",desc:"Naši trenéři jsou medailisté z národních a mezinárodních turnajů a držitelé černých pásů. Umí techniku předávat srozumitelně a sami se neustále vzdělávají."}];function Wj(){const[e,t]=ee.useState([]);ee.useEffect(()=>{let a=!1;const l=async(c=0)=>{const{data:u,error:h}=await Dn.from("news").select("*").eq("published",!0).order("date",{ascending:!1}).limit(3);if(!a){if(h){console.warn("[news] load failed",h.message),c<2&&setTimeout(()=>{a||l(c+1)},800*(c+1));return}t(u??[])}};return l(),()=>{a=!0}},[]),ee.useEffect(()=>{if(typeof window<"u"&&window.location.hash==="#kontakt"){const a=setTimeout(()=>{const l=document.getElementById("kontakt");if(l){const c=l.getBoundingClientRect(),u=window.scrollY+c.top-80;window.scrollTo({top:Math.max(u,0),behavior:"smooth"})}},150);return()=>clearTimeout(a)}},[]);const r=a=>{a.preventDefault();const l=document.getElementById("kontakt");if(l){const c=l.getBoundingClientRect(),u=window.scrollY+c.top-80;window.scrollTo({top:Math.max(u,0),behavior:"smooth"})}};return _.jsxs(Rj,{children:[_.jsxs("section",{className:"relative overflow-hidden bg-card",children:[_.jsx("div",{className:"absolute inset-0 bg-grid-soft opacity-30"}),_.jsxs("div",{className:"relative mx-auto max-w-7xl px-6 pt-12 pb-16 md:pt-16 md:pb-24 grid lg:grid-cols-12 gap-10 items-center",children:[_.jsxs("div",{className:"lg:col-span-5 space-y-6",children:[_.jsxs("h1",{className:"font-display text-3xl md:text-4xl lg:text-5xl tracking-wide text-foreground leading-[1.05]",children:["Bojová umění a sporty",_.jsx("br",{}),_.jsx("span",{className:"text-primary",children:"s tradicí na Kladně"})]}),_.jsx("p",{className:"text-base md:text-lg text-muted-foreground leading-relaxed max-w-xl",children:"Přijímáme nové zájemce i v průběhu roku — přijďte na první nezávazný trénink."}),_.jsx("div",{className:"flex flex-wrap gap-3 pt-1",children:_.jsxs("button",{onClick:r,className:"group inline-flex items-center gap-2 px-7 py-4 bg-primary text-primary-foreground font-display tracking-widest rounded-md hover:bg-accent transition-colors shadow-[var(--shadow-brand)] cursor-pointer",children:["Chci začít ",_.jsx(to,{className:"group-hover:translate-x-1 transition-transform",size:18})]})}),_.jsxs("div",{className:"grid sm:grid-cols-3 gap-3 pt-4",children:[_.jsxs("a",{href:"#sporty",className:"group bg-background border border-border rounded-lg p-4 hover:border-primary/60 hover:bg-card transition-colors text-left",children:[_.jsx("div",{className:"text-[11px] tracking-[0.25em] uppercase text-muted-foreground",children:"3 Sporty"}),_.jsxs("div",{className:"font-display text-base md:text-lg tracking-wider mt-1 text-foreground group-hover:text-primary transition-colors leading-tight",children:["Karate, Kickbox,",_.jsx("br",{}),"Jiu-Jitsu"]})]}),_.jsxs("a",{href:"#rozvrh",className:"group bg-background border border-border rounded-lg p-4 hover:border-primary/60 hover:bg-card transition-colors text-left",children:[_.jsx("div",{className:"text-[11px] tracking-[0.25em] uppercase text-muted-foreground",children:"Cvičíme Po – Pá"}),_.jsx("div",{className:"font-display text-base md:text-lg tracking-wider mt-1 text-foreground group-hover:text-primary transition-colors",children:"Rozvrh tréninků"})]}),_.jsxs("button",{onClick:r,className:"group bg-background border border-border rounded-lg p-4 hover:border-primary/60 hover:bg-card transition-colors text-left cursor-pointer w-full",children:[_.jsx("div",{className:"text-[11px] tracking-[0.25em] uppercase text-muted-foreground",children:"Najdete nás"}),_.jsx("div",{className:"font-display text-base md:text-lg tracking-wider mt-1 text-foreground group-hover:text-primary transition-colors",children:"Hala BIOS na Kladně"}),_.jsx("div",{className:"text-[11px] text-muted-foreground mt-1",children:"Hokejových legend 3368"})]})]})]}),_.jsxs("div",{className:"lg:col-span-7 relative lg:-mr-12 xl:-mr-20",children:[_.jsx("div",{className:"relative aspect-[5/4] rounded-2xl overflow-hidden shadow-[var(--shadow-soft)]",children:_.jsx("img",{src:Vj,alt:"Tréninky Kobra Kladno",width:1920,height:1280,className:"w-full h-full object-cover object-right"})}),_.jsxs("div",{className:"hidden md:block absolute -top-6 -right-6 bg-foreground text-background rounded-xl p-5 shadow-[var(--shadow-soft)] max-w-[240px]",children:[_.jsx("div",{className:"font-display text-3xl tracking-wider font-bold",children:"40 let"}),_.jsx("div",{className:"text-xs tracking-[0.3em] uppercase font-bold mt-1",children:"Tradice od 1985"})]})]})]})]}),_.jsx("section",{id:"sporty",className:"py-20 border-t border-border scroll-mt-24",children:_.jsxs("div",{className:"mx-auto max-w-7xl px-6",children:[_.jsxs("div",{className:"flex items-end justify-between gap-6 mb-10 flex-wrap",children:[_.jsx("div",{children:_.jsx("h2",{className:"font-display text-4xl md:text-5xl tracking-wider",children:"Naše sporty"})}),_.jsxs(je,{to:"/sporty",className:"inline-flex items-center gap-2 text-foreground font-medium hover:text-primary transition-colors",children:["Zobrazit všechny ",_.jsx(to,{size:16})]})]}),_.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4",children:Xj.map(a=>_.jsxs(je,{to:"/sporty",hash:a.slug,className:"group relative bg-card border border-border rounded-xl overflow-hidden hover:border-primary hover:-translate-y-1 transition-all duration-300",children:[_.jsxs("div",{className:"aspect-[4/3] overflow-hidden relative",children:[_.jsx("img",{src:a.img,alt:a.name,loading:"lazy",className:"w-full h-full object-cover group-hover:scale-105 transition-transform duration-500"}),_.jsx("span",{className:`absolute top-3 left-3 inline-block w-2.5 h-2.5 rounded-full border ${a.accent}`})]}),_.jsxs("div",{className:"p-5",children:[_.jsxs("div",{className:"flex items-baseline justify-between gap-2",children:[_.jsx("h3",{className:"font-display text-2xl tracking-wider text-foreground",children:a.name}),_.jsx("span",{className:"text-xs tracking-[0.2em] uppercase text-primary font-medium whitespace-nowrap",children:a.days})]}),_.jsx("p",{className:"text-sm text-muted-foreground mt-2 leading-relaxed",children:a.desc})]})]},a.slug))})]})}),_.jsx("section",{id:"rozvrh",className:"py-16 bg-muted/40 border-t border-border scroll-mt-24",children:_.jsxs("div",{className:"mx-auto max-w-7xl px-4 md:px-6",children:[_.jsxs("div",{className:"text-center mb-8",children:[_.jsx("div",{className:"text-xs tracking-[0.4em] uppercase text-primary mb-2",children:"Kdy trénujeme"}),_.jsx("h2",{className:"font-display text-3xl md:text-5xl tracking-wider",children:"Rozvrh tréninků"}),_.jsx("p",{className:"text-muted-foreground mt-3 max-w-xl mx-auto text-sm md:text-base",children:"Tréninky probíhají od pondělí do neděle v hale BIOS."})]}),_.jsx(Nj,{}),_.jsx("div",{className:"text-center mt-8",children:_.jsxs(je,{to:"/treninky",className:"inline-flex items-center gap-2 px-6 py-3 bg-foreground text-background font-display tracking-widest rounded-md hover:bg-primary transition-colors text-sm",children:["Otevřít rozvrh & sporty ",_.jsx(to,{size:16})]})})]})}),_.jsx("section",{className:"py-20 border-t border-border",children:_.jsxs("div",{className:"mx-auto max-w-7xl px-6",children:[_.jsxs("div",{className:"flex items-end justify-between gap-6 mb-10 flex-wrap",children:[_.jsxs("div",{children:[_.jsx("div",{className:"text-xs tracking-[0.4em] uppercase text-primary mb-2",children:"Co je nového"}),_.jsx("h2",{className:"font-display text-4xl md:text-5xl tracking-wider",children:"Aktuality"})]}),_.jsxs(je,{to:"/aktuality",className:"inline-flex items-center gap-2 text-foreground font-medium hover:text-primary transition-colors",children:["Všechny aktuality ",_.jsx(to,{size:16})]})]}),_.jsx("div",{className:"grid md:grid-cols-3 gap-5",children:e.map(a=>{const l=Mj(a);return _.jsxs(je,{to:"/aktuality/$slug",params:{slug:a.slug},className:"group bg-card border border-border rounded-xl overflow-hidden hover:border-primary hover:shadow-[var(--shadow-soft)] transition-all",children:[l&&_.jsx("div",{className:"aspect-[16/10] overflow-hidden bg-muted flex items-center justify-center",children:_.jsx("img",{src:l,alt:a.title,loading:"lazy",className:"w-full h-full object-contain group-hover:scale-105 transition-transform duration-500"})}),_.jsxs("div",{className:"p-5",children:[_.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground mb-2",children:[_.jsx(XC,{size:12})," ",Dj(a.date)]}),_.jsx("h3",{className:"font-display text-xl tracking-wider text-foreground mb-2 group-hover:text-primary transition-colors",children:a.title}),_.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2",children:a.excerpt})]})]},a.id)})})]})}),_.jsx("section",{className:"py-16 md:py-20 border-t border-border bg-muted/40",children:_.jsxs("div",{className:"mx-auto max-w-7xl px-6",children:[_.jsx("div",{className:"mb-10",children:_.jsx("div",{className:"inline-block text-xs tracking-[0.4em] uppercase text-primary border-b-2 border-primary pb-1.5",children:"Proč Kobra"})}),_.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-8 lg:gap-0",children:Zj.map((a,l)=>_.jsxs("div",{className:`space-y-3 lg:px-7 ${l>0?"lg:border-l lg:border-border":""}`,children:[_.jsx("div",{className:"font-mono text-sm text-primary font-medium",children:String(l+1).padStart(2,"0")}),_.jsx("h3",{className:"font-display text-xl md:text-2xl tracking-wider text-foreground",children:a.title}),_.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:a.desc})]},a.title))}),_.jsx("div",{className:"mt-10",children:_.jsxs(je,{to:"/akademie",className:"inline-flex items-center gap-2 text-primary font-medium hover:gap-3 transition-all",children:["Více o akademii ",_.jsx(to,{size:16})]})})]})}),_.jsx(e2,{})]})}function e2(){const[e,t]=ee.useState(!1),[r,a]=ee.useState(!1),[l,c]=ee.useState(null),u=async h=>{h.preventDefault();const p=new FormData(h.currentTarget),m=String(p.get("name")||"").trim(),y=String(p.get("email")||"").trim(),g=String(p.get("phone")||"").trim(),b=String(p.get("message")||"").trim();if(!m||m.length>100){c("Vyplňte prosím jméno (max 100 znaků).");return}if(!y||!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(y)||y.length>255){c("Zadejte platný e-mail.");return}if(!b||b.length>1e3){c("Vyplňte prosím zprávu (max 1000 znaků).");return}a(!0);const{error:w}=await Dn.from("contact_messages").insert({name:m,email:y,phone:g||null,sport:null,message:b});if(a(!1),w){c("Nepodařilo se odeslat. Zkuste to prosím znovu nebo nám napište e-mail.");return}t(!0),c(null),h.target.reset()};return _.jsx("section",{id:"kontakt",className:"py-12 md:py-16 bg-card border-t border-border scroll-mt-24",children:_.jsxs("div",{className:"mx-auto max-w-6xl px-6",children:[_.jsxs("div",{className:"text-center mb-6",children:[_.jsx("div",{className:"text-xs tracking-[0.4em] uppercase text-primary mb-2",children:"Kontakt"}),_.jsx("h2",{className:"font-display text-3xl md:text-4xl tracking-wider mb-3",children:"Přijďte, Kobra je tu pro vás"}
55),_.jsx("p",{className:"text-foreground/85 max-w-2xl mx-auto leading-relaxed text-sm",children:"Kontaktujte nás přes formulář níže nebo si přijďte rovnou zacvičit. Při první návÅ¡těvě stačí přijít 10 minut před začátkem tréninku – 1. patro, Sál bojových umění."})]}),_.jsxs("div",{className:"grid lg:grid-cols-5 gap-6 lg:gap-8",children:[_.jsxs("div",{className:"lg:col-span-2 space-y-4",children:[_.jsxs("div",{className:"space-y-2.5 text-sm",children:[_.jsxs("div",{className:"flex items-start gap-3",children:[_.jsx(wc,{size:16,className:"text-primary mt-0.5 shrink-0"}),_.jsx("a",{href:"tel:+420603847060",className:"hover:text-primary transition-colors",children:"+420 603 847 060"})]}),_.jsxs("div",{className:"flex items-start gap-3",children:[_.jsx(uf,{size:16,className:"text-primary mt-0.5 shrink-0"}),_.jsx("a",{href:"mailto:[email protected]",className:"hover:text-primary transition-colors break-all",children:"[email protected]"})]}),_.jsxs("div",{className:"flex items-start gap-3",children:[_.jsx(Mb,{size:16,className:"text-primary mt-0.5 shrink-0"}),_.jsx("span",{children:"Sportovní hala BIOS, Hokejových legend 3368, Kladno"})]})]}),_.jsx("div",{className:"rounded-xl overflow-hidden border border-border aspect-[4/3]",children:_.jsx("iframe",{title:"Mapa Kobra Kladno",src:"https://www.google.com/maps?q=Hokejov%C3%BDch+legend+3368,+Kladno&output=embed",width:"100%",height:"100%",style:{border:0},loading:"lazy",referrerPolicy:"no-referrer-when-downgrade",allowFullScreen:!0})}),_.jsxs("div",{className:"flex items-start gap-3 bg-background border border-border rounded-lg p-3",children:[_.jsx(WC,{size:16,className:"text-primary mt-0.5 shrink-0"}),_.jsxs("div",{children:[_.jsx("div",{className:"text-[10px] tracking-[0.3em] uppercase text-muted-foreground",children:"Bankovní účet"}),_.jsx("div",{className:"font-mono text-sm",children:"4007 333 69 / 0800"})]})]})]}),_.jsxs("form",{id:"kontakt-form",onSubmit:u,className:"lg:col-span-3 bg-background rounded-xl p-5 md:p-6 space-y-3 border border-border shadow-[var(--shadow-soft)]",children:[_.jsx("input",{name:"name",required:!0,maxLength:100,type:"text",placeholder:"Jméno *",className:"w-full bg-muted border border-border rounded-md px-3 py-2 text-sm focus:border-primary outline-none transition-colors"}),_.jsx("input",{name:"email",required:!0,maxLength:255,type:"email",placeholder:"E-mail *",className:"w-full bg-muted border border-border rounded-md px-3 py-2 text-sm focus:border-primary outline-none transition-colors"}),_.jsx("input",{name:"phone",maxLength:30,type:"tel",placeholder:"Telefon (nepovinné)",className:"w-full bg-muted border border-border rounded-md px-3 py-2 text-sm focus:border-primary outline-none transition-colors"}),_.jsx("textarea",{name:"message",required:!0,maxLength:1e3,rows:3,placeholder:"Krátká zpráva (otázky ke sportu, věk dítěte,…) *",className:"w-full bg-muted border border-border rounded-md px-3 py-2 text-sm focus:border-primary outline-none transition-colors resize-none"}),l&&_.jsx("div",{className:"text-sm text-destructive",children:l}),e&&_.jsx("div",{className:"text-sm text-primary font-medium",children:"Děkujeme! Zpráva byla odeslána, brzy se Vám ozveme."}),_.jsx("button",{type:"submit",disabled:r,className:"w-full px-5 py-2.5 bg-primary text-primary-foreground font-display tracking-widest rounded-md hover:bg-accent transition-colors disabled:opacity-60",children:r?"Odesílám…":"Odeslat"}),_.jsx("p",{className:"text-[11px] text-muted-foreground",children:"Odesláním souhlasíte se zpracováním údajů pro účely odpovědi."})]})]})]})})}const t2=()=>En(()=>import("./aktuality.index-DxiZQ2Ld.js"),__vite__mapDeps([6,1])),n2=Wt("/aktuality/")({head:()=>({meta:[{title:"Aktuality — Kobra Kladno"},{name:"description",content:"Novinky a aktuální informace z akademie Kobra Kladno."}]}),component:xn(t2,"component")}),r2=()=>En(()=>import("./aktuality._slug-Bm1Fikas.js"),[]),s2=Wt("/aktuality/$slug")({head:()=>({meta:[{title:"Aktualita — Kobra Kladno"}]}),component:xn(r2,"component")}),a2=()=>En(()=>import("./admin.index-B16f6T0p.js"),__vite__mapDeps([7,5])),i2=Wt("/_authenticated/admin/")({component:xn(a2,"component")}),o2=()=>En(()=>import("./admin.zpravy-DtfXs-0X.js"),__vite__mapDeps([8,9])),l2=Wt("/_authenticated/admin/zpravy")({component:xn(o2,"component")}),c2=()=>En(()=>import("./admin.sporty-DAYRMGqk.js"),__vite__mapDeps([10,11])),u2=Wt("/_authenticated/admin/sporty")({component:xn(c2,"component")}),d2=()=>En(()=>import("./admin.rozvrh-DOft3DvM.js"),__vite__mapDeps([12,13,9])),h2=Wt("/_authenticated/admin/rozvrh")({component:xn(d2,"component")}),f2=()=>En(()=>import("./admin.aktuality-DO6aoDfV.js"),__vite__mapDeps([14,13,11,9])),p2=Wt("/_authenticated/admin/aktuality")({component:xn(f2,"component")}),m2=DC.update({id:"/treninky",path:"/treninky",getParentRoute:()=>Ln}),g2=UC.update({id:"/sporty",path:"/sporty",getParentRoute:()=>Ln}),y2=PC.update({id:"/login",path:"/login",getParentRoute:()=>Ln}),v2=BC.update({id:"/kontakt",path:"/kontakt",getParentRoute:()=>Ln}),b2=IC.update({id:"/akademie",path:"/akademie",getParentRoute:()=>Ln}),ei=$C.update({id:"/_authenticated",getParentRoute:()=>Ln}),w2=Qj.update({id:"/",path:"/",getParentRoute:()=>Ln}),_2=n2.update({id:"/aktuality/",path:"/aktuality/",getParentRoute:()=>Ln}),S2=s2.update({id:"/aktuality/$slug",path:"/aktuality/$slug",getParentRoute:()=>Ln}),x2=i2.update({id:"/admin/",path:"/admin/",getParentRoute:()=>ei}),E2=l2.update({id:"/admin/zpravy",path:"/admin/zpravy",getParentRoute:()=>ei}),T2=u2.update({id:"/admin/sporty",path:"/admin/sporty",getParentRoute:()=>ei}),R2=h2.update({id:"/admin/rozvrh",path:"/admin/rozvrh",getParentRoute:()=>ei}),A2=p2.update({id:"/admin/aktuality",path:"/admin/aktuality",getParentRoute:()=>ei}),k2={AuthenticatedAdminAktualityRoute:A2,AuthenticatedAdminRozvrhRoute:R2,AuthenticatedAdminSportyRoute:T2,AuthenticatedAdminZpravyRoute:E2,AuthenticatedAdminIndexRoute:x2},O2=ei._addFileChildren(k2),C2={IndexRoute:w2,AuthenticatedRoute:O2,AkademieRoute:b2,KontaktRoute:v2,LoginRoute:y2,SportyRoute:g2,TreninkyRoute:m2,AktualitySlugRoute:S2,AktualityIndexRoute:_2},j2=Ln._addFileChildren(C2),N2=()=>{const e=new FO;return oR({routeTree:j2,context:{queryClient:e},scrollRestoration:!0,defaultPreloadStaleTime:0})};async function M2(){const e=await N2();let t;if(jv){const r=await jv.getOptions();r.serializationAdapters=r.serializationAdapters??[],window.__TSS_START_OPTIONS__=r,t=r.serializationAdapters,e.options.defaultSsr=r.defaultSsr}else t=[],window.__TSS_START_OPTIONS__={serializationAdapters:t};
55return t.push(dT),e.options.serializationAdapters&&t.push(...e.options.serializationAdapters),e.update({basepath:"",serializationAdapters:t}),e.stores.matchesId.get().length||await fT(e),e}async function D2(){const e=await M2();return window.$_TSR?.h(),e}var vh;function L2(){return vh||(vh=D2()),_.jsx(yT,{promise:vh,children:e=>_.jsx(uR,{router:e})})}ee.startTransition(()=>{W_.hydrateRoot(document,_.jsx(ee.StrictMode,{children:_.jsx(L2,{})}))});export{to as A,XC as C,Rj as L,uf as M,W0 as O,wc as P,s2 as R,Nj as S,Hj as a,qj as b,je as c,Qn as d,sf as e,At as f,lt as g,Ps as h,Dn as i,_ as j,Pj as k,Mj as l,Dj as m,q2 as n,ee as r,Kj as s,H2 as t,I2 as u};

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